atom-agent 1.2.0 → 1.3.0

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 (54) hide show
  1. package/CHANGELOG.md +75 -0
  2. package/README.md +13 -4
  3. package/atom.example.json +11 -0
  4. package/dist/App.js +923 -200
  5. package/dist/adapters.js +82 -13
  6. package/dist/agent/goal-evaluator.js +69 -0
  7. package/dist/agent/loop.js +517 -76
  8. package/dist/cli.js +11 -3
  9. package/dist/compact.js +41 -15
  10. package/dist/config.js +43 -7
  11. package/dist/context-manager.js +16 -198
  12. package/dist/context-windows.js +4 -2
  13. package/dist/env-block.js +5 -5
  14. package/dist/extension-commands.js +196 -0
  15. package/dist/extension-ui.js +153 -0
  16. package/dist/extensions.js +1571 -0
  17. package/dist/goal.js +583 -0
  18. package/dist/project-trust.js +96 -0
  19. package/dist/providers.js +6 -6
  20. package/dist/scheduler.js +74 -36
  21. package/dist/session.js +23 -5
  22. package/dist/sessions.js +25 -6
  23. package/dist/telemetry-dashboard.js +28 -0
  24. package/dist/telemetry.js +39 -0
  25. package/dist/tools/compaction-hooks.js +165 -0
  26. package/dist/tools/custom.js +189 -0
  27. package/dist/tools/intercept.js +145 -0
  28. package/dist/tools/overrides.js +105 -0
  29. package/dist/tools/provider-hooks.js +224 -0
  30. package/dist/tools/registry.js +246 -17
  31. package/dist/tools.js +44 -0
  32. package/dist/ui/palette.js +1 -1
  33. package/dist/ui/status-bar.js +80 -5
  34. package/dist/zen.js +305 -75
  35. package/documentation/architecture.md +114 -0
  36. package/documentation/cli.md +82 -0
  37. package/documentation/compaction.md +50 -0
  38. package/documentation/configuration.md +111 -0
  39. package/documentation/development.md +62 -0
  40. package/documentation/extensions.md +160 -0
  41. package/documentation/getting-started.md +63 -0
  42. package/documentation/goals.md +41 -0
  43. package/documentation/index.md +41 -0
  44. package/documentation/observability.md +70 -0
  45. package/documentation/permissions.md +66 -0
  46. package/documentation/providers.md +78 -0
  47. package/documentation/sessions.md +92 -0
  48. package/documentation/skills.md +57 -0
  49. package/documentation/tools.md +94 -0
  50. package/documentation/troubleshooting.md +54 -0
  51. package/examples/extensions/01-audit-gate.js +24 -0
  52. package/examples/extensions/02-notes-tool.js +32 -0
  53. package/examples/extensions/03-custom-command.js +32 -0
  54. package/package.json +6 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,80 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.3.0 — 2026-09-11
4
+
5
+ - Session goals (`src/goal.ts`, `src/App.tsx`, `src/agent/loop.ts`,
6
+ `src/agent/goal-evaluator.ts`): `/goal <objective>` pins one session
7
+ objective that runs turn-to-turn with no turn cap until paused, cleared,
8
+ or a `complete`/`blocked` verdict. Bare `/goal` shows text, state, and
9
+ cumulative stats (turns · requests · tokens · work); `pause` halts with
10
+ everything kept; `resume` re-arms (idle starts a continuation turn, busy
11
+ resumes at turn end); `clear` ends it. Cancel and spent step/tool-call
12
+ budgets pause, never clear; `/clear` and `/new` end the goal. The model
13
+ reports each turn via the goal-scoped `update_goal` tool
14
+ (`continue`/`complete`/`blocked`); report-less turns get one bounded
15
+ judge call when configured, else continue; unclear/failed judges pause
16
+ with the goal preserved. Three repeated tool results redirect with a
17
+ replan nudge (goal stays active). `complete` with unverified code or open
18
+ todos continues instead of stopping; `blocked` stops unconditionally
19
+ (declared-unverifiable checks print in the verdict, never gate). The live
20
+ goal rides every session save with stats intact (restore on `/resume` and
21
+ session switches; corrupt data loads as no goal); compaction appends a
22
+ `Goal:` line (text, state, stats, open todos) to the summary
23
+ - Goal surface: status line shows `goal: <objective> [active|paused]`
24
+ (lowest-priority segment, hidden with no goal; `src/ui/status-bar.tsx`,
25
+ wired in `src/App.tsx`); turn telemetry traces carry the goal snapshot
26
+ with dashboard fragments and a Goal-turns card rendered only when goal
27
+ turns exist (`src/telemetry.ts`, `src/telemetry-dashboard.ts`); `/help`
28
+ lists `/goal` with subcommand descriptions; user docs in
29
+ `documentation/goals.md` (linked from `cli.md`, `index.md`,
30
+ `observability.md`), glossary entries in `CONTEXT.md`. Known limits: the
31
+ `update_goal` schema is not in the chat-payload tools list (the model
32
+ discovers it via continuation prose); multi-turn behavior against live
33
+ models is unproven (mocked suites only)
34
+
35
+ - History caps removed (Pi parity): the 100-message / 200K-char ceilings are
36
+ gone — no `MAX_HISTORY_*` constants, no `ATOM_MAX_HISTORY_*` env vars, no
37
+ `maxHistory*` config keys (present keys are ignored as unknown), no trim
38
+ step in the loop, submit, resume, or session-switch paths. Full history
39
+ rides every POST; auto-compact at ~83% of the verified window plus manual
40
+ `/compact` is the only pressure valve. `LoopStats.truncationNotices` and
41
+ the 4-stage submit pipeline's budget-check stage are removed with them
42
+ - Real context accounting (`src/adapters.ts`): Anthropic `input_tokens`
43
+ excludes `cache_read`/`cache_creation`, which previously made P%, NK, and
44
+ the 83% auto-compact trigger blind to cached context. Exclusive cache
45
+ counters are now folded into `prompt_tokens` at parse time (detail fields
46
+ stay provider-faithful), so load, spend, and compaction all see true
47
+ input-side tokens. OpenAI/Gemini paths already include cache — untouched,
48
+ with a regression test pinning no double-counting
49
+ - Compaction retention raised (`src/compact.ts`): verbatim newest tail
50
+ 8000 → 20000 estimated tokens (Pi parity); summary template restructured
51
+ to Objective / Important Details / Work State (Completed, Active,
52
+ Blocked) / Next Move / Relevant Files
53
+ - Parallel-by-default reads (`src/scheduler.ts`): the conservative
54
+ same-tool+same-target overlap rule is gone — pure reads batch
55
+ unconditionally (same file, same task polls included). Same-file
56
+ read/write order, `bash` isolation, todo exclusivity, prompts, and
57
+ ordered commits are unchanged
58
+ - Extension host (`src/extensions.ts`, `src/extension-commands.ts`,
59
+ `src/extension-ui.ts`, `src/project-trust.ts`, `src/tools/custom.ts`,
60
+ `src/tools/intercept.ts`, `src/tools/overrides.ts`,
61
+ `src/tools/provider-hooks.ts`, `src/tools/compaction-hooks.ts`):
62
+ project plus global extension scopes with trust-gated project execution,
63
+ enable/disable patterns, `--no-extensions` lockdown, model-callable custom
64
+ tools, pre/post tool interception, audited builtin overrides, slash
65
+ commands, session lifecycle events, provider request/response hooks,
66
+ compaction hooks, and status/widget/dialog UI. Guide plus three working
67
+ samples in `documentation/extensions.md` and `examples/extensions/`.
68
+ Known limits: non-UI registrations are runtime-global (no per-extension
69
+ unload); `session_start` covers startup/resume/switch/new; `overflow`
70
+ compaction reason is reserved for future callers; staged notices cap at
71
+ 100 drop-oldest
72
+ - `/effort` now applies on every provider (reasoning effort for
73
+ OpenAI-chat kinds, thinking budgets for Anthropic, thinking levels for
74
+ Gemini; `Auto` omits the knob) — previously zen-only
75
+ - `reasoningEffort: default` renamed to `auto` (`default` still accepted as
76
+ an alias); `atom.example.json` gains an `extensions` example
77
+
3
78
  ## 1.2.0 — 2026-09-10
4
79
 
5
80
  - Durable multi-session store (`src/sessions.ts`): one JSON record per
package/README.md CHANGED
@@ -30,6 +30,8 @@ Full docs live in [`documentation/`](documentation/index.md), same layout as ope
30
30
  - [Permissions and Modes](documentation/permissions.md) — normal/yolo/plan, trust, allow/deny rules
31
31
  - [Skills](documentation/skills.md) — discovery, frontmatter contract, auto-invoke
32
32
  - [Sessions](documentation/sessions.md) — durable multi-session store, rename, switcher, resume, clear, rewind
33
+ - [Goals](documentation/goals.md) — pin one session objective that runs turn-to-turn
34
+ - [Extensions](documentation/extensions.md) — zero-to-running guide plus working samples
33
35
  - [Observability](documentation/observability.md) — local telemetry, `/telemetry`, dashboard drill-down
34
36
  - [Compaction and Token Display](documentation/compaction.md) — auto-compact, manual compact, footer format
35
37
  - [Configuration](documentation/configuration.md) — env vars, auth file, AGENTS.md layering
@@ -113,13 +115,18 @@ in `package.json`, add a `CHANGELOG.md` entry, commit, tag `vX.Y.Z`, push —
113
115
  `~/.atom/auth.json`), `/effort` (reasoning-effort picker), `/tools`,
114
116
  `/skills`, `/skill:name` (invoke a skill; skills complete in `/`), `/context`
115
117
  (context usage by source), `/queue` + `/steer <text>` (follow-ups while
116
- busy: queue until the turn ends, or inject into the running turn), `/help`, `/mode`, `/trust`,
117
- `/clear`, `/exit` — plus `/`-autocomplete as you type (`/yolo` and `/plan` are retired as typed commands — `Tab` switches modes)
118
+ busy: queue until the turn ends, or inject into the running turn),
119
+ `/goal <objective>` (pin one session objective; bare shows it,
120
+ `pause`/`resume`/`clear` manage it), `/compact`, `/telemetry`,
121
+ `/dashboard`, `/rewind`, `/session`, `/resume`, `/rename`, `/new`, `/help`, `/mode`, `/trust`,
122
+ `/clear`, `/exit` — plus `/`-autocomplete as you type (`/yolo` and `/plan` are retired as typed commands — `Tab` switches modes). Full list: [CLI and TUI](documentation/cli.md)
118
123
  - 📊 **Status line** — provider · model · session token usage (`token:
119
124
  (P%) NK`: NK is the cumulative spend in K, P% is the current context load
120
125
  over the model's verified window — last `prompt_tokens`, else the
121
126
  4ch/token estimate; bare `token: NK` where no window is verified,
122
127
  `token: n/a` until reported — never estimated) · reasoning · mode, plus
128
+ `goal: <objective> [active|paused]` while a goal is live (lowest priority,
129
+ yields first under width pressure), plus
123
130
  live phase/elapsed/waiting while busy. It is the sole info bar: there is
124
131
  no persistent header, only the launch-time banner art.
125
132
  - 🗜️ **Context compaction** — auto-compacts at ~83% of the verified window
@@ -183,8 +190,10 @@ provider, chat. Switching provider keeps session history text; system prompt
183
190
  stays. `/model` is a unified picker: the active provider's live models first
184
191
  (fallback on any failure), then every other keyed provider's models plus the
185
192
  always-visible keyless Kilo list (free models carry a `(free)` badge) —
186
- picking one switches provider too. `/effort` sends `reasoning_effort` only
187
- for opencode-zen supported models; elsewhere kept but never sent. Your
193
+ picking one switches provider too. `/effort` (`Auto`/`Low`/`Medium`/`High`/`Max`)
194
+ applies on every provider `reasoning_effort` for OpenAI-chat kinds,
195
+ thinking budgets for Anthropic, thinking levels for Gemini (`Auto` omits
196
+ it). Your
188
197
  `/model` + `/provider` + `/effort` picks persist across restarts (fresh
189
198
  conversation each launch; `/resume` restores it). Project defaults live in
190
199
  `atom.json` — see [Configuration](documentation/configuration.md).
@@ -0,0 +1,11 @@
1
+ {
2
+ "$comment": "ATOM config — copy to ./atom.json (project) or ~/.atom/atom.json (global). Every key is optional; unknown keys are ignored, invalid values fall back with a warning in /context. Precedence: env vars > saved session picks (/model, /provider, /effort) > project atom.json > global atom.json > compiled defaults.",
3
+ "provider": "kilo",
4
+ "model": "kilo-auto/free",
5
+ "reasoningEffort": "auto",
6
+ "maxToolSteps": 30,
7
+ "compactPct": 83,
8
+ "network": { "allowPublic": true, "allowLocalhost": true, "allowPrivate": false, "allowLinkLocal": false },
9
+ "telemetry": { "enabled": true },
10
+ "extensions": { "enabled": [], "disabled": [] }
11
+ }