atom-agent 1.2.0 → 1.4.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 (60) hide show
  1. package/CHANGELOG.md +97 -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/diff-panel.js +5 -5
  33. package/dist/ui/diff-view.js +3 -2
  34. package/dist/ui/diff.js +7 -52
  35. package/dist/ui/modals.js +5 -5
  36. package/dist/ui/palette.js +1 -1
  37. package/dist/ui/side-by-side.js +7 -5
  38. package/dist/ui/status-bar.js +80 -5
  39. package/dist/ui/transcript.js +3 -3
  40. package/dist/zen.js +305 -75
  41. package/documentation/architecture.md +114 -0
  42. package/documentation/cli.md +82 -0
  43. package/documentation/compaction.md +50 -0
  44. package/documentation/configuration.md +111 -0
  45. package/documentation/development.md +62 -0
  46. package/documentation/extensions.md +160 -0
  47. package/documentation/getting-started.md +63 -0
  48. package/documentation/goals.md +41 -0
  49. package/documentation/index.md +41 -0
  50. package/documentation/observability.md +70 -0
  51. package/documentation/permissions.md +66 -0
  52. package/documentation/providers.md +78 -0
  53. package/documentation/sessions.md +92 -0
  54. package/documentation/skills.md +57 -0
  55. package/documentation/tools.md +94 -0
  56. package/documentation/troubleshooting.md +54 -0
  57. package/examples/extensions/01-audit-gate.js +24 -0
  58. package/examples/extensions/02-notes-tool.js +32 -0
  59. package/examples/extensions/03-custom-command.js +32 -0
  60. package/package.json +6 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,102 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.4.0 — 2026-09-11
4
+
5
+ - Uncapped TUI diffs (`src/ui/diff.ts`, `src/ui/side-by-side.tsx`,
6
+ `src/ui/diff-view.tsx`, `src/ui/transcript.tsx`, `src/ui/modals.tsx`,
7
+ `src/ui/diff-panel.tsx`): the diff engine no longer truncates at 400
8
+ changed lines — `computeDiff` and `computeSideBySide` return the full
9
+ hunk/row list with `truncated: false`, and the transcript, approval
10
+ preview, and `/diff` panel render it whole (no more `… N more rows` or
11
+ `(diff truncated at 400 changed lines)` trailers). A 500-line write now
12
+ shows its complete before/after instead of a capped head. Smoothness is
13
+ preserved by the existing per-mount memoization (`SideBySideInner`,
14
+ `DiffViewInner`, `LineBody`, `TranscriptRow`), append-once `<Static>`
15
+ commits, and the engine's linear-time fallbacks (Myers prefix/suffix past
16
+ 1000 lines, flat word runs past 200 tokens/line). Safety caps stay
17
+ enforced: binary detect and the 1MB file skip. `MAX_CHANGED_LINES`,
18
+ `TRANSCRIPT_DIFF_MAX_LINES`, `APPROVAL_DIFF_MAX_LINES`, and
19
+ `DIFF_PANEL_MAX_LINES` are retained as compatibility exports (the row
20
+ caps now read `Infinity`); `maxRows`/`maxLines` remain as opt-in windows
21
+ for callers that want a collapsed tail. Known tradeoff: large approvals
22
+ grow the permission modal, pushing the `y/a/t/n` options further down —
23
+ the file on disk was and remains the whole truth
24
+
25
+ ## 1.3.0 — 2026-09-11
26
+
27
+ - Session goals (`src/goal.ts`, `src/App.tsx`, `src/agent/loop.ts`,
28
+ `src/agent/goal-evaluator.ts`): `/goal <objective>` pins one session
29
+ objective that runs turn-to-turn with no turn cap until paused, cleared,
30
+ or a `complete`/`blocked` verdict. Bare `/goal` shows text, state, and
31
+ cumulative stats (turns · requests · tokens · work); `pause` halts with
32
+ everything kept; `resume` re-arms (idle starts a continuation turn, busy
33
+ resumes at turn end); `clear` ends it. Cancel and spent step/tool-call
34
+ budgets pause, never clear; `/clear` and `/new` end the goal. The model
35
+ reports each turn via the goal-scoped `update_goal` tool
36
+ (`continue`/`complete`/`blocked`); report-less turns get one bounded
37
+ judge call when configured, else continue; unclear/failed judges pause
38
+ with the goal preserved. Three repeated tool results redirect with a
39
+ replan nudge (goal stays active). `complete` with unverified code or open
40
+ todos continues instead of stopping; `blocked` stops unconditionally
41
+ (declared-unverifiable checks print in the verdict, never gate). The live
42
+ goal rides every session save with stats intact (restore on `/resume` and
43
+ session switches; corrupt data loads as no goal); compaction appends a
44
+ `Goal:` line (text, state, stats, open todos) to the summary
45
+ - Goal surface: status line shows `goal: <objective> [active|paused]`
46
+ (lowest-priority segment, hidden with no goal; `src/ui/status-bar.tsx`,
47
+ wired in `src/App.tsx`); turn telemetry traces carry the goal snapshot
48
+ with dashboard fragments and a Goal-turns card rendered only when goal
49
+ turns exist (`src/telemetry.ts`, `src/telemetry-dashboard.ts`); `/help`
50
+ lists `/goal` with subcommand descriptions; user docs in
51
+ `documentation/goals.md` (linked from `cli.md`, `index.md`,
52
+ `observability.md`), glossary entries in `CONTEXT.md`. Known limits: the
53
+ `update_goal` schema is not in the chat-payload tools list (the model
54
+ discovers it via continuation prose); multi-turn behavior against live
55
+ models is unproven (mocked suites only)
56
+
57
+ - History caps removed (Pi parity): the 100-message / 200K-char ceilings are
58
+ gone — no `MAX_HISTORY_*` constants, no `ATOM_MAX_HISTORY_*` env vars, no
59
+ `maxHistory*` config keys (present keys are ignored as unknown), no trim
60
+ step in the loop, submit, resume, or session-switch paths. Full history
61
+ rides every POST; auto-compact at ~83% of the verified window plus manual
62
+ `/compact` is the only pressure valve. `LoopStats.truncationNotices` and
63
+ the 4-stage submit pipeline's budget-check stage are removed with them
64
+ - Real context accounting (`src/adapters.ts`): Anthropic `input_tokens`
65
+ excludes `cache_read`/`cache_creation`, which previously made P%, NK, and
66
+ the 83% auto-compact trigger blind to cached context. Exclusive cache
67
+ counters are now folded into `prompt_tokens` at parse time (detail fields
68
+ stay provider-faithful), so load, spend, and compaction all see true
69
+ input-side tokens. OpenAI/Gemini paths already include cache — untouched,
70
+ with a regression test pinning no double-counting
71
+ - Compaction retention raised (`src/compact.ts`): verbatim newest tail
72
+ 8000 → 20000 estimated tokens (Pi parity); summary template restructured
73
+ to Objective / Important Details / Work State (Completed, Active,
74
+ Blocked) / Next Move / Relevant Files
75
+ - Parallel-by-default reads (`src/scheduler.ts`): the conservative
76
+ same-tool+same-target overlap rule is gone — pure reads batch
77
+ unconditionally (same file, same task polls included). Same-file
78
+ read/write order, `bash` isolation, todo exclusivity, prompts, and
79
+ ordered commits are unchanged
80
+ - Extension host (`src/extensions.ts`, `src/extension-commands.ts`,
81
+ `src/extension-ui.ts`, `src/project-trust.ts`, `src/tools/custom.ts`,
82
+ `src/tools/intercept.ts`, `src/tools/overrides.ts`,
83
+ `src/tools/provider-hooks.ts`, `src/tools/compaction-hooks.ts`):
84
+ project plus global extension scopes with trust-gated project execution,
85
+ enable/disable patterns, `--no-extensions` lockdown, model-callable custom
86
+ tools, pre/post tool interception, audited builtin overrides, slash
87
+ commands, session lifecycle events, provider request/response hooks,
88
+ compaction hooks, and status/widget/dialog UI. Guide plus three working
89
+ samples in `documentation/extensions.md` and `examples/extensions/`.
90
+ Known limits: non-UI registrations are runtime-global (no per-extension
91
+ unload); `session_start` covers startup/resume/switch/new; `overflow`
92
+ compaction reason is reserved for future callers; staged notices cap at
93
+ 100 drop-oldest
94
+ - `/effort` now applies on every provider (reasoning effort for
95
+ OpenAI-chat kinds, thinking budgets for Anthropic, thinking levels for
96
+ Gemini; `Auto` omits the knob) — previously zen-only
97
+ - `reasoningEffort: default` renamed to `auto` (`default` still accepted as
98
+ an alias); `atom.example.json` gains an `extensions` example
99
+
3
100
  ## 1.2.0 — 2026-09-10
4
101
 
5
102
  - 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
+ }