atom-lite 0.4.1 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/CHANGELOG.md +35 -1
  2. package/README.md +41 -108
  3. package/dist/agent/loop.d.ts +15 -0
  4. package/dist/agent/loop.js +277 -57
  5. package/dist/agent/loop.js.map +1 -1
  6. package/dist/agent/model-turn.d.ts +37 -0
  7. package/dist/agent/model-turn.js +53 -0
  8. package/dist/agent/model-turn.js.map +1 -0
  9. package/dist/agent/system-prompt.d.ts +1 -0
  10. package/dist/agent/system-prompt.js +23 -0
  11. package/dist/agent/system-prompt.js.map +1 -0
  12. package/dist/agent/turn-recorder.d.ts +33 -0
  13. package/dist/agent/turn-recorder.js +74 -0
  14. package/dist/agent/turn-recorder.js.map +1 -0
  15. package/dist/agent/types.d.ts +15 -0
  16. package/dist/cli/app.js +570 -68
  17. package/dist/cli/app.js.map +1 -1
  18. package/dist/cli/commands.d.ts +3 -0
  19. package/dist/cli/commands.js +20 -5
  20. package/dist/cli/commands.js.map +1 -1
  21. package/dist/cli/diff-view.d.ts +18 -0
  22. package/dist/cli/diff-view.js +66 -0
  23. package/dist/cli/diff-view.js.map +1 -0
  24. package/dist/cli/main.js +2 -2
  25. package/dist/cli/main.js.map +1 -1
  26. package/dist/cli/mouse.js +4 -1
  27. package/dist/cli/mouse.js.map +1 -1
  28. package/dist/cli/panel.js +8 -8
  29. package/dist/cli/panel.js.map +1 -1
  30. package/dist/cli/status-line.d.ts +2 -0
  31. package/dist/cli/status-line.js +9 -1
  32. package/dist/cli/status-line.js.map +1 -1
  33. package/dist/cli/stream-text.js +1 -0
  34. package/dist/cli/stream-text.js.map +1 -1
  35. package/dist/cli/theme.d.ts +1 -1
  36. package/dist/cli/theme.js +2 -0
  37. package/dist/cli/theme.js.map +1 -1
  38. package/dist/cli/tool-box.d.ts +1 -1
  39. package/dist/cli/tool-box.js +44 -39
  40. package/dist/cli/tool-box.js.map +1 -1
  41. package/dist/cli/transcript.d.ts +15 -1
  42. package/dist/cli/transcript.js +40 -1
  43. package/dist/cli/transcript.js.map +1 -1
  44. package/dist/cli/trust-prompt.d.ts +24 -0
  45. package/dist/cli/trust-prompt.js +89 -0
  46. package/dist/cli/trust-prompt.js.map +1 -0
  47. package/dist/config/defaults.d.ts +6 -5
  48. package/dist/config/defaults.js +8 -3
  49. package/dist/config/defaults.js.map +1 -1
  50. package/dist/config/load.js +33 -3
  51. package/dist/config/load.js.map +1 -1
  52. package/dist/config/paths.d.ts +2 -0
  53. package/dist/config/paths.js +12 -1
  54. package/dist/config/paths.js.map +1 -1
  55. package/dist/config/schema.d.ts +14 -14
  56. package/dist/config/schema.js +6 -5
  57. package/dist/config/schema.js.map +1 -1
  58. package/dist/context/manager.d.ts +17 -3
  59. package/dist/context/manager.js +129 -41
  60. package/dist/context/manager.js.map +1 -1
  61. package/dist/extensions/api.d.ts +51 -1
  62. package/dist/extensions/api.js +124 -6
  63. package/dist/extensions/api.js.map +1 -1
  64. package/dist/extensions/discovery.d.ts +16 -0
  65. package/dist/extensions/discovery.js +191 -108
  66. package/dist/extensions/discovery.js.map +1 -1
  67. package/dist/extensions/loader.d.ts +42 -1
  68. package/dist/extensions/loader.js +272 -32
  69. package/dist/extensions/loader.js.map +1 -1
  70. package/dist/extensions/session-manager.d.ts +44 -0
  71. package/dist/extensions/session-manager.js +137 -0
  72. package/dist/extensions/session-manager.js.map +1 -0
  73. package/dist/extensions/tool-adapter.d.ts +12 -0
  74. package/dist/extensions/tool-adapter.js +157 -0
  75. package/dist/extensions/tool-adapter.js.map +1 -0
  76. package/dist/extensions/trust.d.ts +2 -0
  77. package/dist/extensions/trust.js +32 -17
  78. package/dist/extensions/trust.js.map +1 -1
  79. package/dist/extensions/types.d.ts +45 -3
  80. package/dist/extensions/ui.d.ts +21 -0
  81. package/dist/extensions/ui.js +75 -0
  82. package/dist/extensions/ui.js.map +1 -0
  83. package/dist/index.d.ts +1 -0
  84. package/dist/index.js +1 -0
  85. package/dist/index.js.map +1 -1
  86. package/dist/mcp/stdio-transport.js +3 -20
  87. package/dist/mcp/stdio-transport.js.map +1 -1
  88. package/dist/runtime/modes.d.ts +3 -0
  89. package/dist/runtime/modes.js +8 -0
  90. package/dist/runtime/modes.js.map +1 -0
  91. package/dist/runtime/scheduler.d.ts +4 -3
  92. package/dist/runtime/scheduler.js +7 -105
  93. package/dist/runtime/scheduler.js.map +1 -1
  94. package/dist/runtime/tool-executor.d.ts +18 -0
  95. package/dist/runtime/tool-executor.js +136 -0
  96. package/dist/runtime/tool-executor.js.map +1 -0
  97. package/dist/security/process.d.ts +10 -0
  98. package/dist/security/process.js +36 -0
  99. package/dist/security/process.js.map +1 -1
  100. package/dist/sessions/store.js +2 -3
  101. package/dist/sessions/store.js.map +1 -1
  102. package/dist/skills/registry.js +8 -1
  103. package/dist/skills/registry.js.map +1 -1
  104. package/dist/tools/bash.js +7 -4
  105. package/dist/tools/bash.js.map +1 -1
  106. package/dist/tools/glob.d.ts +2 -0
  107. package/dist/tools/glob.js +97 -0
  108. package/dist/tools/glob.js.map +1 -0
  109. package/dist/tools/grep.d.ts +2 -0
  110. package/dist/tools/grep.js +290 -0
  111. package/dist/tools/grep.js.map +1 -0
  112. package/dist/tools/index.d.ts +2 -0
  113. package/dist/tools/index.js +2 -0
  114. package/dist/tools/index.js.map +1 -1
  115. package/dist/tools/types.d.ts +8 -0
  116. package/dist/types.d.ts +0 -3
  117. package/dist/types.js +1 -4
  118. package/dist/types.js.map +1 -1
  119. package/package.json +5 -2
  120. package/skills/atom-lite-extensions/SKILL.md +240 -0
  121. package/skills/caveman/SKILL.md +89 -0
  122. package/skills/code-review/SKILL.md +46 -0
  123. package/skills/optimization/SKILL.md +51 -0
package/CHANGELOG.md CHANGED
@@ -5,9 +5,43 @@ All notable changes to this project are documented here.
5
5
  The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [Unreleased]
8
+ ## [0.6.2] - 2026-11-05
9
+
10
+ ### Fixed
11
+ - Direct publish (bypass staged registry conflict).
12
+
13
+ ## [0.6.1] - 2026-11-05
14
+
15
+ ### Fixed
16
+ - Shell mode result rendering and @ mention fuzzy search (fd path).
17
+ - npm publish (staged 0.6.0 could not be approved locally).
18
+
19
+ ## [0.6.0] - 2026-11-05
9
20
 
10
21
  ### Added
22
+ - Autonomy primitives: removed hard caps, added optional token budgets, plan/yolo modes with Tab toggle, higher scheduler parallelism, improved compaction fidelity.
23
+ - Interactive `@` file/folder mentions (including hidden files via `fd`) and `!` shell mode.
24
+ - Built-in skills: `atom-lite-extensions`, `code-review`, `caveman`, `optimization`.
25
+ - Richer default system prompt.
26
+
27
+ ### Changed
28
+ - Replaced ask/trusted/deny approval modes with plan/yolo modes.
29
+ - Configuration: `approvalMode` -> `mode`; added `maxTokensPerSession`/`maxTokensPerTurn`.
30
+
31
+ ### Fixed
32
+ - Shell command results now render (resolve on process exit).
33
+ - Hidden files included in `glob`/`grep` tools.
34
+
35
+ ## [0.5.0] - 2026-11-05
36
+
37
+ ### Added
38
+
39
+ - Unmodified Pi coding-agent extension support: discovery, project trust,
40
+ in-process loading via `jiti`, extension tools, commands, events, and
41
+ session entries, plus ADR-0011 and the extensions guide.
42
+ - `/extensions doctor` diagnostics, `/steer` mid-turn injection, and
43
+ message queuing during active turns.
44
+ - Continuous dimmed thinking blocks in the TUI.
11
45
 
12
46
  ## [0.4.1] - 2026-11-04
13
47
 
package/README.md CHANGED
@@ -6,54 +6,33 @@
6
6
  [![TypeScript](https://img.shields.io/badge/TypeScript-strict-3178C6?logo=typescript&logoColor=white)](https://www.typescriptlang.org)
7
7
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)
8
8
 
9
- **Atom-lite** is a local-first, model-agnostic coding agent with an intentionally small harness: one agent loop, four core built-in tools (`read`, `write`, `edit`, `bash`) plus network tools (`webfetch`, `websearch`), a deterministic conflict-aware scheduler, durable JSONL sessions, and explicit safety boundaries. It runs against local or hosted model providers through interchangeable adapters — no cloud account, telemetry service, or hosted control plane required.
10
-
11
- > See [`docs/README.md`](./docs/README.md) for the documentation index and [`docs/adr/`](./docs/adr/) for architectural decisions.
12
-
13
- ---
14
-
15
- ## Table of contents
16
-
17
- - [Why Atom-lite](#why-atom-lite)
18
- - [Features](#features)
19
- - [Install](#install)
20
- - [Quick start](#quick-start)
21
- - [Default provider](#default-provider)
22
- - [Configuration](#configuration)
23
- - [Usage](#usage)
24
- - [Tools](#tools)
25
- - [Providers](#providers)
26
- - [Safety & security](#safety--security)
27
- - [Sessions](#sessions)
28
- - [Context management](#context-management)
29
- - [Development](#development)
30
- - [Architecture](#architecture)
31
- - [Contributing](#contributing)
32
- - [License](#license)
9
+ Atom-lite is a local-first, model-agnostic coding agent built on a deliberately small harness: one agent loop, eight built-in tools, a conflict-aware scheduler, durable JSONL sessions, and explicit safety boundaries. It runs against local or hosted providers through interchangeable adapters — no cloud account, telemetry, or control plane required.
10
+
11
+ > Documentation index: [`docs/README.md`](./docs/README.md). Architectural decisions: [`docs/adr/`](./docs/adr/).
33
12
 
34
13
  ## Why Atom-lite
35
14
 
36
- Most coding agents accumulate tools, sub-agents, planning frameworks, retrieval pipelines, and orchestration layers until the harness itself becomes the product. Atom-lite takes the opposite stance:
15
+ Most coding agents accumulate tools, sub-agents, and orchestration until the harness becomes the product. Atom-lite takes the opposite stance:
37
16
 
38
- - **Small core, strong primitives.** The core contains only a provider interface, a session model, a single agent loop, four core tools plus two network tools, a scheduler/executor, context-window management, configuration, and a CLI.
39
- - **The model decides; the runtime enforces.** The model chooses which tool to call and what to do next. The runtime validates arguments, enforces workspace boundaries, applies approval rules, schedules calls safely, and returns accurate results. There is no hard-coded "plan → inspect → edit → test" workflow.
40
- - **Thin harness, not weak engineering.** Provider-specific formats, streaming failures, concurrent file access, shell timeouts, large outputs, context exhaustion, and session recovery are all handled — they are the reliability layer that makes a small harness useful.
17
+ - **Small core, strong primitives.** Provider interface, session model, one agent loop, six tools, scheduler/executor, context management, config, and CLI.
18
+ - **The model decides; the runtime enforces.** The model chooses tools and next steps; the runtime validates arguments, enforces workspace boundaries, applies approval rules, schedules calls safely, and returns accurate results. No hard-coded workflow.
19
+ - **Thin harness, not weak engineering.** Streaming failures, concurrent file access, shell timeouts, large outputs, context exhaustion, and session recovery are handled as the reliability layer.
41
20
 
42
21
  ## Features
43
22
 
44
- - **Six built-in tools** — four core tools (`read`, `write`, `edit`, `bash`) plus `webfetch` and `websearch`. Everything else (search, tests, git, builds) goes through `bash`.
45
- - **Single agent loop** — one agent, one conversation, one tool registry, one control loop. Parallelism lives inside a tool-call batch.
46
- - **Conflict-aware scheduler** — per-file read/write locks and a global bash barrier. Parallelism is governed by resource conflicts, not applied blindly.
47
- - **Durable sessions** — append-only JSONL event logs, resumable across CLI restarts, grouped by workspace.
48
- - **Context management** — token estimation, compaction (summarization of older history) before the context budget is exceeded, while retaining the full transcript.
49
- - **Live context meter** — the status line shows context tokens used against the selected model's real window (e.g. `tokens: 4.5k/256k`), resolved from provider metadata with known-model fallbacks.
23
+ - **Eight built-in tools** — `read`, `write`, `edit`, `bash`, `grep`, `glob`, `webfetch`, `websearch`. Everything else (tests, git, builds) runs through `bash`.
24
+ - **Single agent loop** — one agent, one conversation, one registry, one control loop. Parallelism lives inside a tool-call batch.
25
+ - **Conflict-aware scheduler** — per-file read/write locks and a global bash barrier.
26
+ - **Durable sessions** — append-only JSONL event logs, resumable across restarts, grouped by workspace.
27
+ - **Context management** — token estimation and compaction before the budget is exceeded, full transcript retained.
28
+ - **Live context meter** — `tokens: 4.5k/256k` against the model's real window, resolved from provider metadata with fallbacks.
50
29
  - **Approval modes** — `ask` / `trusted` / `deny` for shell commands, with session-level trust.
51
- - **Hash guards** — `expected_hash` rejects stale `write`/`edit` operations when the file changed since it was read.
52
- - **Provider-agnostic** — Ollama, Gemini, and any OpenAI-compatible endpoint (LM Studio, llama.cpp, Kilo AI Gateway, OpenAI, Anthropic, OpenRouter, Groq, Mistral, xAI, …).
53
- - **Interactive provider/model pickers** — `/provider` adds a provider and stores its key securely; `/model` fuzzy-searches every configured provider's models.
54
- - **Command palette and themes** — `ctrl+p` fuzzy-searches commands, skills, providers, models, themes, and recent sessions. `/theme` switches between auto, dark, light, and no-colour modes.
55
- - **Local-first** — runs fully against local providers with no cloud account, telemetry, or hosted database.
56
- - **Safe path handling** — file tools resolve against the workspace and reject escapes; shell is an explicit, sandbox-aware boundary.
30
+ - **Hash guards** — `expected_hash` rejects stale `write`/`edit` when a file changed since read.
31
+ - **Provider-agnostic** — Ollama, Gemini, and any OpenAI-compatible endpoint (LM Studio, llama.cpp, Kilo, OpenAI, Anthropic, OpenRouter, Groq, Mistral, xAI, …).
32
+ - **Interactive pickers** — `/provider` adds a provider and stores its key securely; `/model` fuzzy-searches every configured provider's models.
33
+ - **Command palette & themes** — `ctrl+p` fuzzy-searches commands, skills, providers, models, themes, sessions. `/theme` switches auto/dark/light/no-colour.
34
+ - **Local-first** — runs fully against local providers; no telemetry or hosted database.
35
+ - **Safe path handling** — file tools resolve against the workspace and reject escapes; shell is an explicit boundary.
57
36
 
58
37
  ## Install
59
38
 
@@ -67,7 +46,7 @@ Or run without installing:
67
46
  npx atom-lite "fix the failing test"
68
47
  ```
69
48
 
70
- Requires **Node.js >= 22.19** (see `engines` in `package.json`).
49
+ Requires **Node.js >= 22.19**.
71
50
 
72
51
  ## Quick start
73
52
 
@@ -87,61 +66,22 @@ echo "summarize this repo" | atom-lite
87
66
 
88
67
  ## Default provider
89
68
 
90
- Out of the box, Atom-lite uses the **Kilo AI Gateway** (`https://api.kilo.ai/api/gateway`) with the free `kilo-auto/free` model. No API key is required (rate-limited to 200 requests/hour per IP for anonymous use). Override via `--provider`/`--model` or config.
69
+ Out of the box, Atom-lite uses the **Kilo AI Gateway** (`https://api.kilo.ai/api/gateway`) with the free `kilo-auto/free` model. No API key required (rate-limited to 200 requests/hour per IP for anonymous use). Override via `--provider`/`--model` or config.
91
70
 
92
71
  ## Configuration
93
72
 
94
- User config: `~/.config/atom-lite/config.json`
95
- Project config: `.atom-lite/config.json` (non-secrets only)
96
-
97
- Precedence (low → high): defaults → user config → project config (non-secret) → environment → CLI overrides. Security-critical user settings (e.g. `approvalMode`) are **not** overridable by project config.
73
+ - User config: `~/.config/atom-lite/config.json`
74
+ - Project config: `.atom-lite/config.json` (non-secrets only)
98
75
 
99
- Secrets are stored in `~/.config/atom-lite/credentials.json` with owner-only permissions (`0600`). Environment variables named by a provider's `apiKeyEnv` take precedence over the stored key. Secrets are never written to project config or session files.
76
+ Precedence (low → high): defaults → user config → project config (non-secret) → environment → CLI overrides. Security-critical user settings (e.g. `approvalMode`) are not overridable by project config.
100
77
 
101
- Environment overrides:
78
+ Secrets live in `~/.config/atom-lite/credentials.json` (`0600`). Environment variables named by a provider's `apiKeyEnv` take precedence over the stored key. Secrets are never written to project config or session files.
102
79
 
103
80
  | Variable | Effect |
104
81
  | --- | --- |
105
82
  | `ATOM_LITE_PROVIDER` | Default provider profile name |
106
83
  | `ATOM_LITE_APPROVAL_MODE` | `ask` / `trusted` / `deny` |
107
84
 
108
- Example `config.json`:
109
-
110
- ```json
111
- {
112
- "defaultProvider": "kilo",
113
- "providers": {
114
- "kilo": {
115
- "type": "openai-compatible",
116
- "baseUrl": "https://api.kilo.ai/api/gateway",
117
- "model": "kilo-auto/free",
118
- "apiKeyEnv": null
119
- },
120
- "ollama": {
121
- "type": "ollama",
122
- "baseUrl": "http://127.0.0.1:11434",
123
- "model": "qwen2.5-coder:7b"
124
- },
125
- "gemini": {
126
- "type": "gemini",
127
- "model": "gemini-2.0-flash",
128
- "apiKeyEnv": "GEMINI_API_KEY"
129
- }
130
- },
131
- "runtime": {
132
- "approvalMode": "ask",
133
- "bashConcurrency": "serial",
134
- "maxIterations": 40,
135
- "maxToolCalls": 100
136
- },
137
- "context": {
138
- "maxInputTokens": null,
139
- "reserveOutputTokens": 4096,
140
- "compactAtPercent": 85
141
- }
142
- }
143
- ```
144
-
145
85
  See [`docs/configuration.md`](./docs/configuration.md) for every field, default, and precedence rule.
146
86
 
147
87
  ## Usage
@@ -169,17 +109,11 @@ atom-lite [task] [--provider NAME] [--model MODEL] [--continue] [--session ID]
169
109
  | `--version` | Print version |
170
110
  | `--help` | Show help |
171
111
 
172
- In the TUI, type `/help` to see every command grouped by category, or press
173
- `ctrl+p` for the fuzzy command palette. `/theme` opens a live-preview picker and
174
- persists your choice to user config; `NO_COLOR` and `--no-color` always win.
175
- `/sessions` opens a searchable session picker scoped to the current workspace,
176
- with a toggle for all workspaces, and `/search <query>` prints matching sessions
177
- with content snippets. Mouse wheel scrolling and click-to-focus are enabled for
178
- interactive terminals and can be disabled with `ui.mouse: false`.
112
+ In the TUI, type `/help` for every command grouped by category, or press `ctrl+p` for the fuzzy command palette. `/theme` opens a live-preview picker and persists your choice; `NO_COLOR` and `--no-color` always win. `/sessions` opens a searchable picker scoped to the current workspace; `/search <query>` prints matching sessions with snippets. Mouse wheel scrolling and click-to-focus are enabled for interactive terminals and can be disabled with `ui.mouse: false`.
179
113
 
180
114
  ## Tools
181
115
 
182
- Four core tools (see [ADR 0001](./docs/adr/0001-four-built-in-tools-only.md)) plus the additive network tools from [ADR 0006](./docs/adr/0006-expanded-toolset.md):
116
+ Eight built-in tools — the four core tools from [ADR 0001](./docs/adr/0001-four-built-in-tools-only.md), file search, plus the additive network tools from [ADR 0006](./docs/adr/0006-expanded-toolset.md):
183
117
 
184
118
  | Tool | Purpose |
185
119
  | --- | --- |
@@ -187,16 +121,18 @@ Four core tools (see [ADR 0001](./docs/adr/0001-four-built-in-tools-only.md)) pl
187
121
  | `write` | Create or replace files safely (hash-guarded) |
188
122
  | `edit` | Precise find-and-replace edits (hash-guarded) |
189
123
  | `bash` | Execute shell commands (global exclusive barrier by default) |
124
+ | `grep` | Search file contents by regex (ripgrep-backed, falls back to JS) |
125
+ | `glob` | Find files matching a glob pattern |
190
126
  | `webfetch` | Fetch a URL and convert HTML to markdown |
191
127
  | `websearch` | Search the web and return ranked results |
192
128
 
193
- File discovery, search, tests, Git, builds, formatters, and package managers are available through `bash`, not through additional built-in tools.
129
+ Tests, Git, builds, formatters, and package managers are available through `bash`.
194
130
 
195
131
  ## Providers
196
132
 
197
133
  | Type | Adapter | Notes |
198
134
  | --- | --- | --- |
199
- | `openai-compatible` | `OpenAICompatibleAdapter` | LM Studio, llama.cpp/llama-server, Kilo AI Gateway, and other compatible endpoints |
135
+ | `openai-compatible` | `OpenAICompatibleAdapter` | LM Studio, llama.cpp/llama-server, Kilo, and other compatible endpoints |
200
136
  | `ollama` | `OllamaAdapter` | Native Ollama chat API |
201
137
  | `gemini` | `GeminiAdapter` | Official Gemini API |
202
138
 
@@ -204,25 +140,24 @@ Provider profiles are named combinations of endpoint, model, auth source, and op
204
140
 
205
141
  ### Interactive setup
206
142
 
207
- - `/provider` opens a searchable list of built-in providers (Kilo, OpenAI, Anthropic, Google Gemini, OpenRouter, Groq, Mistral, xAI, Ollama, LM Studio, llama.cpp). Selecting a hosted provider prompts for an API key with hidden input, validates it against the provider, and saves it to `~/.config/atom-lite/credentials.json` (`0600`).
208
- - `/model` opens a fuzzy-searchable picker containing models from **every configured provider** (plus providers whose key is present in the environment). Live model lists are fetched in the background while the picker stays responsive.
143
+ - `/provider` opens a searchable list of built-in providers (Kilo, OpenAI, Anthropic, Google Gemini, OpenRouter, Groq, Mistral, xAI, Ollama, LM Studio, llama.cpp). Selecting a hosted provider prompts for an API key with hidden input, validates it, and saves it to `~/.config/atom-lite/credentials.json` (`0600`).
144
+ - `/model` opens a fuzzy-searchable picker containing models from every configured provider (plus providers whose key is present in the environment). Live model lists are fetched in the background.
209
145
  - `/model <provider>/<model>` and `/provider <name>` are the non-interactive forms.
210
146
 
211
- The selected provider/model is persisted to the user config, so the next session starts where you left off.
147
+ The selected provider/model is persisted to user config, so the next session starts where you left off.
212
148
 
213
149
  ## Safety & security
214
150
 
215
- - **Workspace boundary** — `read`/`write`/`edit` resolve paths against the workspace and reject escapes. Shell commands are not constrained by this boundary (their effects are unknown), so `bash` runs as a global exclusive barrier.
151
+ - **Workspace boundary** — `read`/`write`/`edit` resolve paths against the workspace and reject escapes. Shell commands are not constrained by this boundary, so `bash` runs as a global exclusive barrier.
216
152
  - **Approval modes** — `ask` prompts before each shell command; `trusted` auto-approves; `deny` blocks. Session trust can be granted interactively (`t`).
217
153
  - **Hash guards** — prevent stale overwrites when a file changed since it was read.
218
154
  - **Sandboxing flags** — reported per command; see `src/security/`.
219
- - **No secrets in config** — interactive provider setup stores API keys in `~/.config/atom-lite/credentials.json` with `0600` permissions; environment variables still take precedence.
155
+ - **No secrets in config** — interactive setup stores API keys in `~/.config/atom-lite/credentials.json` (`0600`); environment variables take precedence.
220
156
  - **Local-first** — no cloud account, telemetry, or remote control plane required (see [ADR 0004](./docs/adr/0004-local-first-no-cloud-dependency.md)).
221
157
 
222
158
  ## Commands
223
159
 
224
- Type `/help` for the grouped list, or press `ctrl+p` for the fuzzy command
225
- palette. Common commands:
160
+ Type `/help` for the grouped list, or press `ctrl+p` for the fuzzy command palette. Common commands:
226
161
 
227
162
  | Command | Description |
228
163
  | --- | --- |
@@ -234,7 +169,7 @@ palette. Common commands:
234
169
  | `/search <query>` | Search sessions by title or content |
235
170
  | `/export [path]` | Export the session transcript |
236
171
  | `/mcp [reconnect [server]]` | Inspect or reconnect MCP servers |
237
- | `/extensions` | List loaded extensions |
172
+ | `/extensions` | List discovered extensions and load status |
238
173
  | `/compact` | Compact older context |
239
174
  | `/clear` | Clear the transcript view |
240
175
  | `/approval` | Change approval mode |
@@ -246,9 +181,7 @@ palette. Common commands:
246
181
 
247
182
  ## Sessions
248
183
 
249
- Sessions are append-only JSONL event logs recording everything that happened in one conversation. They are resumable across CLI restarts and grouped by workspace. Stored under the session store (see `src/sessions/`). Compaction summarizes older history to stay within the context budget while retaining the full transcript.
250
-
251
- The session index derives a title from the first user message unless `/session rename <title>` overrides it, and records the provider, update time, and message count. `/sessions` resumes a session in place: retained messages are replayed into the transcript and a `session_resumed` event is appended. `/search <query>` matches titles, message content, and workspace paths, ranking title hits first. `--list-sessions` and `--search-sessions` print the same index as stable tab-separated rows for scripts.
184
+ Sessions are append-only JSONL event logs recording everything in one conversation. They are resumable across CLI restarts and grouped by workspace. The session index derives a title from the first user message unless `/session rename <title>` overrides it, and records the provider, update time, and message count. `/sessions` resumes a session in place: retained messages are replayed into the transcript and a `session_resumed` event is appended. `/search <query>` matches titles, message content, and workspace paths, ranking title hits first. `--list-sessions` and `--search-sessions` print the same index as stable tab-separated rows for scripts. Compaction summarizes older history to stay within the context budget while retaining the full transcript.
252
185
 
253
186
  ## Context management
254
187
 
@@ -290,7 +223,7 @@ src/
290
223
  runtime/ # scheduler, approvals
291
224
  security/ # paths, process, redaction
292
225
  sessions/ # store, events, recovery
293
- tools/ # read, write, edit, bash, webfetch, websearch, registry
226
+ tools/ # read, write, edit, bash, grep, glob, webfetch, websearch, registry
294
227
  ```
295
228
 
296
229
  Key design decisions are recorded as ADRs in [`docs/adr/`](./docs/adr/):
@@ -305,7 +238,7 @@ Key design decisions are recorded as ADRs in [`docs/adr/`](./docs/adr/):
305
238
 
306
239
  ## Contributing
307
240
 
308
- Read [`CONTRIBUTING.md`](./CONTRIBUTING.md) before opening a pull request. Issues and specs live as markdown under `.scratch/` (see [`docs/agents/issue-tracker.md`](./docs/agents/issue-tracker.md)). Please keep changes consistent with the "small core" principle: new tools require strong justification against ADR 0001.
241
+ Read [`CONTRIBUTING.md`](./CONTRIBUTING.md) before opening a pull request. Issues and specs live as markdown under `.scratch/` (see [`docs/agents/issue-tracker.md`](./docs/agents/issue-tracker.md)). Keep changes consistent with the "small core" principle: new tools require strong justification against ADR 0001.
309
242
 
310
243
  Report vulnerabilities privately as described in [`SECURITY.md`](./SECURITY.md).
311
244
 
@@ -5,6 +5,10 @@ export declare class AgentRuntime {
5
5
  private model;
6
6
  private workspace;
7
7
  private approvals;
8
+ private mode;
9
+ private maxTokensPerSession;
10
+ private maxTokensPerTurn;
11
+ private totalTokensUsed;
8
12
  private contextManager;
9
13
  private onEvent;
10
14
  private tools;
@@ -12,6 +16,8 @@ export declare class AgentRuntime {
12
16
  private bashConcurrency;
13
17
  private toolMap;
14
18
  private limits;
19
+ private extensionDispatch;
20
+ private steeringQueue;
15
21
  private systemPrompt;
16
22
  private contextWindow;
17
23
  private contextUsed;
@@ -22,11 +28,20 @@ export declare class AgentRuntime {
22
28
  getContextUsage(): ContextUsage;
23
29
  private emitContextUsage;
24
30
  setEffort(effort: string): void;
31
+ setMode(mode: "plan" | "yolo"): void;
32
+ getMode(): "plan" | "yolo";
33
+ setSteeringQueue(queue: string[]): void;
34
+ compactSession(session: {
35
+ messages: Message[];
36
+ appendMessage(m: Message): void;
37
+ appendEvent?(partial: any): any;
38
+ }, focus?: string): Promise<string | null>;
25
39
  /** Replace the toolset, e.g. after MCP discovery or a list_changed refresh. */
26
40
  setTools(tools: AgentRuntimeOptions["tools"]): void;
27
41
  getEffort(): string;
28
42
  runAgentTurn(input: string, session: {
29
43
  messages: Message[];
30
44
  appendMessage(m: Message): void;
45
+ appendEvent?(partial: any): any;
31
46
  }, signal: AbortSignal): Promise<string>;
32
47
  }