longer-agent 0.1.1 → 0.1.3

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 (134) hide show
  1. package/README.md +74 -178
  2. package/README.zh-CN.md +74 -178
  3. package/agent_templates/executor/agent.yaml +1 -0
  4. package/agent_templates/executor/system_prompt.md +1 -1
  5. package/agent_templates/explorer/agent.yaml +1 -0
  6. package/agent_templates/explorer/system_prompt.md +1 -1
  7. package/agent_templates/main/agent.yaml +1 -0
  8. package/agent_templates/main/system_prompt.md +3 -2
  9. package/dist/agents/tool-loop.d.ts.map +1 -1
  10. package/dist/agents/tool-loop.js +6 -0
  11. package/dist/agents/tool-loop.js.map +1 -1
  12. package/dist/auth/openai-oauth.d.ts.map +1 -1
  13. package/dist/auth/openai-oauth.js +6 -10
  14. package/dist/auth/openai-oauth.js.map +1 -1
  15. package/dist/cli.d.ts +1 -2
  16. package/dist/cli.d.ts.map +1 -1
  17. package/dist/cli.js +81 -60
  18. package/dist/cli.js.map +1 -1
  19. package/dist/commands.d.ts +6 -1
  20. package/dist/commands.d.ts.map +1 -1
  21. package/dist/commands.js +115 -27
  22. package/dist/commands.js.map +1 -1
  23. package/dist/config.d.ts +19 -26
  24. package/dist/config.d.ts.map +1 -1
  25. package/dist/config.js +80 -120
  26. package/dist/config.js.map +1 -1
  27. package/dist/dotenv.d.ts +18 -0
  28. package/dist/dotenv.d.ts.map +1 -0
  29. package/dist/dotenv.js +91 -0
  30. package/dist/dotenv.js.map +1 -0
  31. package/dist/home-path.d.ts +3 -0
  32. package/dist/home-path.d.ts.map +1 -0
  33. package/dist/home-path.js +7 -0
  34. package/dist/home-path.js.map +1 -0
  35. package/dist/index.d.ts +6 -2
  36. package/dist/index.d.ts.map +1 -1
  37. package/dist/index.js +10 -2
  38. package/dist/index.js.map +1 -1
  39. package/dist/init-wizard.d.ts +2 -3
  40. package/dist/init-wizard.d.ts.map +1 -1
  41. package/dist/init-wizard.js +349 -145
  42. package/dist/init-wizard.js.map +1 -1
  43. package/dist/log-projection.d.ts.map +1 -1
  44. package/dist/log-projection.js +71 -12
  45. package/dist/log-projection.js.map +1 -1
  46. package/dist/managed-provider-credentials.d.ts +23 -0
  47. package/dist/managed-provider-credentials.d.ts.map +1 -0
  48. package/dist/managed-provider-credentials.js +56 -0
  49. package/dist/managed-provider-credentials.js.map +1 -0
  50. package/dist/mcp-client.d.ts.map +1 -1
  51. package/dist/mcp-client.js +2 -1
  52. package/dist/mcp-client.js.map +1 -1
  53. package/dist/mcp-config.d.ts +13 -0
  54. package/dist/mcp-config.d.ts.map +1 -0
  55. package/dist/mcp-config.js +64 -0
  56. package/dist/mcp-config.js.map +1 -0
  57. package/dist/model-discovery.d.ts +20 -0
  58. package/dist/model-discovery.d.ts.map +1 -0
  59. package/dist/model-discovery.js +47 -0
  60. package/dist/model-discovery.js.map +1 -0
  61. package/dist/model-selection.d.ts +1 -1
  62. package/dist/model-selection.d.ts.map +1 -1
  63. package/dist/model-selection.js +20 -10
  64. package/dist/model-selection.js.map +1 -1
  65. package/dist/persistence.d.ts +14 -1
  66. package/dist/persistence.d.ts.map +1 -1
  67. package/dist/persistence.js +12 -8
  68. package/dist/persistence.js.map +1 -1
  69. package/dist/provider-credential-flow.d.ts +28 -0
  70. package/dist/provider-credential-flow.d.ts.map +1 -0
  71. package/dist/provider-credential-flow.js +112 -0
  72. package/dist/provider-credential-flow.js.map +1 -0
  73. package/dist/provider-presets.d.ts +4 -0
  74. package/dist/provider-presets.d.ts.map +1 -1
  75. package/dist/provider-presets.js +26 -9
  76. package/dist/provider-presets.js.map +1 -1
  77. package/dist/providers/registry.d.ts.map +1 -1
  78. package/dist/providers/registry.js +3 -2
  79. package/dist/providers/registry.js.map +1 -1
  80. package/dist/session.d.ts +6 -17
  81. package/dist/session.d.ts.map +1 -1
  82. package/dist/session.js +82 -216
  83. package/dist/session.js.map +1 -1
  84. package/dist/settings.d.ts +8 -27
  85. package/dist/settings.d.ts.map +1 -1
  86. package/dist/settings.js +4 -108
  87. package/dist/settings.js.map +1 -1
  88. package/dist/templates/loader.d.ts.map +1 -1
  89. package/dist/templates/loader.js +2 -0
  90. package/dist/templates/loader.js.map +1 -1
  91. package/dist/tools/basic.d.ts +2 -2
  92. package/dist/tools/basic.d.ts.map +1 -1
  93. package/dist/tools/basic.js +54 -7
  94. package/dist/tools/basic.js.map +1 -1
  95. package/dist/tools/comm.d.ts.map +1 -1
  96. package/dist/tools/comm.js +8 -7
  97. package/dist/tools/comm.js.map +1 -1
  98. package/dist/tui/app.d.ts.map +1 -1
  99. package/dist/tui/app.js +176 -39
  100. package/dist/tui/app.js.map +1 -1
  101. package/dist/tui/components/command-prompt-panel.d.ts +22 -0
  102. package/dist/tui/components/command-prompt-panel.d.ts.map +1 -0
  103. package/dist/tui/components/command-prompt-panel.js +26 -0
  104. package/dist/tui/components/command-prompt-panel.js.map +1 -0
  105. package/dist/tui/components/input-panel.d.ts.map +1 -1
  106. package/dist/tui/components/input-panel.js +8 -6
  107. package/dist/tui/components/input-panel.js.map +1 -1
  108. package/dist/tui/components/logo-panel.d.ts.map +1 -1
  109. package/dist/tui/components/logo-panel.js +2 -4
  110. package/dist/tui/components/logo-panel.js.map +1 -1
  111. package/dist/tui/components/plan-panel.d.ts +3 -1
  112. package/dist/tui/components/plan-panel.d.ts.map +1 -1
  113. package/dist/tui/components/plan-panel.js +15 -2
  114. package/dist/tui/components/plan-panel.js.map +1 -1
  115. package/dist/tui/components/status-bar.d.ts.map +1 -1
  116. package/dist/tui/components/status-bar.js +17 -4
  117. package/dist/tui/components/status-bar.js.map +1 -1
  118. package/dist/tui/status-bar-model-name.d.ts +2 -0
  119. package/dist/tui/status-bar-model-name.d.ts.map +1 -0
  120. package/dist/tui/status-bar-model-name.js +81 -0
  121. package/dist/tui/status-bar-model-name.js.map +1 -0
  122. package/dist/update-check.d.ts +19 -0
  123. package/dist/update-check.d.ts.map +1 -0
  124. package/dist/update-check.js +116 -0
  125. package/dist/update-check.js.map +1 -0
  126. package/dist/version.d.ts +2 -0
  127. package/dist/version.d.ts.map +1 -0
  128. package/dist/version.js +7 -0
  129. package/dist/version.js.map +1 -0
  130. package/package.json +9 -5
  131. package/prompts/tools/plan.md +11 -240
  132. package/prompts/tools/summarize_context.md +1 -1
  133. package/prompts/tools/time.md +6 -0
  134. package/configExample.yaml +0 -83
package/README.md CHANGED
@@ -2,88 +2,83 @@
2
2
  <img src="https://raw.githubusercontent.com/FelixRuiGao/LongerAgent/main/assets/logo.png" alt="LongerAgent" width="360" />
3
3
  </p>
4
4
  <p align="center">
5
- <strong>Built to work longer.</strong>
5
+ <strong>Exploring agent autonomy.</strong>
6
6
  </p>
7
7
  <p align="center">
8
8
  English | <a href="./README.zh-CN.md">中文</a>
9
9
  </p>
10
10
  <p align="center">
11
+ <a href="https://felixruigao.github.io/LongerAgent/"><img alt="Docs" src="https://img.shields.io/badge/docs-website-4b4bf0?style=flat-square" /></a>
11
12
  <a href="./LICENSE"><img alt="License" src="https://img.shields.io/badge/license-MIT-blue?style=flat-square" /></a>
12
- <img alt="Node" src="https://img.shields.io/badge/node-%3E%3D18-brightgreen?style=flat-square" />
13
- <img alt="TypeScript" src="https://img.shields.io/badge/TypeScript-5-blue?style=flat-square&logo=typescript&logoColor=white" />
14
13
  <img alt="Author" src="https://img.shields.io/badge/author-Felix%20Rui%20Gao-4b4bf0?style=flat-square" />
15
14
  </p>
16
15
 
17
- A terminal AI coding agent that manages its own context proactively, runs parallel sub-agents, and lets you message it while it's working.
16
+ LongerAgent is a TUI demo exploring a design philosophy: what if the system just provided the tools and safety net, and let the agent proactively manage its own context and workflow?
18
17
 
19
- ![LongerAgent Terminal UI](https://raw.githubusercontent.com/FelixRuiGao/LongerAgent/main/assets/screenshot.png)
18
+ Parallel sub-agents investigating a codebase, an async message mid-task, and context summarization — all in one session:
20
19
 
21
- > **Platform:** macOS.
22
-
23
- ## Why LongerAgent
24
-
25
- Most coding agents work well for short bursts, then degrade as the session gets longer. LongerAgent is built for the opposite case:
26
-
27
- - **Long-running sessions** — context is monitored, summarized, and compacted before it collapses
28
- - **Interruptible work** — you can send a new message while the agent is still executing
29
- - **Parallel execution** — delegate exploration and implementation to sub-agents in the same session
30
- - **Project memory** — `AGENTS.md` and the Important Log survive across sessions and compactions
20
+ https://github.com/user-attachments/assets/377fe648-d43c-45da-b111-9434b2a0dc61
31
21
 
32
- If you want a terminal-native agent that can stay productive through a long refactor, investigation, or multi-step task, this is the point of the project.
22
+ ---
33
23
 
34
- ## Quick Start
24
+ ## Try It
35
25
 
36
26
  ```bash
37
- # Install globally
38
27
  npm install -g longer-agent
39
-
40
- # Run the setup wizard (creates ~/.longeragent/config.yaml)
41
28
  longeragent init
42
-
43
- # Start
44
29
  longeragent
45
30
  ```
46
31
 
47
- The setup wizard walks you through provider and model selection. If you prefer to edit config yourself, use [configExample.yaml](./configExample.yaml) as the reference.
32
+ The setup wizard walks you through provider selection (Anthropic, OpenAI, Kimi, MiniMax, GLM, Ollama, oMLX, LM Studio, OpenRouter) and model selection.
48
33
 
49
- ### First 5 Minutes
34
+ > **Platform:** macOS. **Safety:** LongerAgent does not sandbox shell commands or file edits. Run it in trusted environments and review what it does.
50
35
 
51
- Typical first session:
36
+ ### CLI
52
37
 
53
38
  ```text
54
- $ longeragent
55
- You: audit the auth flow and find dead code
56
- You: while you do that, also check whether password reset uses the same token path
57
- You: /summarize keep the final findings and file references
39
+ longeragent # Start with auto-detected config
40
+ longeragent init # Run setup wizard
41
+ longeragent oauth # Log in to OpenAI via OAuth (device code / browser)
42
+ longeragent oauth status # Check OAuth login status
43
+ longeragent oauth logout # Log out
44
+ longeragent --templates <path> # Use a specific templates directory
45
+ longeragent --verbose # Enable debug logging
46
+ longeragent --version # Show the current version
58
47
  ```
59
48
 
60
- Useful early commands:
49
+ ### Commands
61
50
 
62
- ```text
63
- /model # switch model/provider for the current session
64
- /thinking # raise or lower reasoning depth
65
- /skills # enable or disable installed skills
66
- /resume # reopen an older session from log
67
- ```
51
+ | Command | Description |
52
+ |---------|-------------|
53
+ | `/model` | Switch between configured models at runtime; can prompt for missing managed-provider keys |
54
+ | `/mcp` | Connect configured MCP servers on demand and list discovered tools |
55
+ | `/thinking` | Control thinking/reasoning depth per model |
56
+ | `/skills` | Enable/disable skills with a checkbox picker |
57
+ | `/resume` | Resume a previous session from its log |
58
+ | `/summarize` | Summarize older context segments to free up space |
59
+ | `/compact` | Full context reset with a continuation summary |
68
60
 
69
- > **Safety:** LongerAgent does not sandbox shell commands or file edits. Run it in trusted environments and review what it does.
61
+ ---
70
62
 
71
- ## Demo
63
+ ## The Design Ideas
72
64
 
73
- Parallel sub-agents investigating a codebase, an async message mid-task, and context summarization — all in one session.
65
+ ### Agent-Driven Context Management
74
66
 
75
- https://github.com/user-attachments/assets/377fe648-d43c-45da-b111-9434b2a0dc61
67
+ LongerAgent gives the agent tools to inspect its own context distribution (`show_context`) and surgically compress what it chooses (`summarize_context`). Each conversation segment is internally tagged with a unique ID and a token-cost annotation, so the agent can make rational cost-benefit decisions about what to keep and what to compress. The system only steps in as a last-resort safety net.
76
68
 
77
- ---
69
+ Three layers work together: hint compression nudges the agent early, agent-initiated summarization gives it precise control, and auto-compact catches anything that slips through.
70
+
71
+ ### Parallel Sub-Agents
72
+
73
+ Instead of doing everything sequentially, the agent can spawn sub-agents — each with its own context window and tool access — to explore or execute in parallel. Three built-in templates (`main`, `explorer`, `executor`) scope what each sub-agent can do. Results are delivered back to the main agent for synthesis.
78
74
 
79
- ## Highlights
75
+ ### Interruptible Execution
80
76
 
81
- - **Three-layer context management**hinting, surgical summarization, and full compaction
82
- - **Parallel sub-agents** — spawn workers from chat or YAML call files
83
- - **Skills system** — install, manage, and create reusable skill packages from inside the agent
84
- - **Persistent memory** — `AGENTS.md` files and Important Log survive across sessions and compactions
85
- - **Async messaging** talk to the agent while it's mid-task
86
- - **7 provider families** — Anthropic, OpenAI, Kimi, MiniMax, GLM, OpenRouter, and OpenRouter-compatible models
77
+ You can type a message at any time even while the agent is mid-task. Messages are queued and delivered at the next activation boundary. No need to wait, no need to restart.
78
+
79
+ ### Persistent Memory
80
+
81
+ Two `AGENTS.md` files (global and project-level) and an Important Log survive across sessions and context resets. The agent reads them for continuity and writes to them to save long-term knowledge.
87
82
 
88
83
  ## What It Feels Like
89
84
 
@@ -94,95 +89,39 @@ LongerAgent is optimized for a specific workflow:
94
89
  3. Interrupt it with clarifications or side requests without losing momentum.
95
90
  4. Keep the session alive by summarizing or compacting instead of restarting from scratch.
96
91
 
97
- That combination is the core product, more than any individual slash command or tool.
98
-
99
- ## Usage
100
-
101
- ### Context Management
102
-
103
- The agent manages its own context automatically, but you can also intervene:
104
-
105
- ```text
106
- /summarize # Summarize older context segments
107
- /summarize Keep the auth refactor details # Summarize with specific instructions
108
- /compact # Full context reset with continuation summary
109
- /compact Preserve the DB schema decisions # Compact with specific instructions
110
- ```
111
-
112
- `/summarize` surgically compresses selected segments while preserving key decisions — use it when context is growing but you're not ready for a full reset. `/compact` is the nuclear option: full reset with a continuation summary so the agent picks up where it left off.
113
-
114
- The agent can also do both on its own via `show_context` and `summarize_context` tools — no user action needed.
115
-
116
- An **Important Log** is maintained throughout the session — key discoveries, failed approaches, and architectural decisions are written here and survive every compaction.
117
-
118
- ### Sub-Agents
119
-
120
- Tell the agent to spawn sub-agents, or define tasks in a YAML call file:
121
-
122
- ```yaml
123
- # tasks.yaml
124
- tasks:
125
- - name: research
126
- template: explorer
127
- prompt: "Investigate how authentication works in this codebase"
128
- - name: refactor
129
- template: executor
130
- prompt: "Rename all legacy API endpoints to v2"
131
- ```
92
+ That combination is the core of the demo, more than any individual slash command or tool.
132
93
 
133
- Three built-in templates: **main** (full tools), **explorer** (read-only), **executor** (task-focused). Sub-agents run concurrently and report back when done.
94
+ ## Read More
134
95
 
135
- ### Skills
96
+ - **[Design Philosophy Deep-Dive](https://felixruigao.hashnode.dev/exploring-agent-autonomy-building-a-coding-cli-that-manages-its-own-context)** — the ideas behind this demo in detail
97
+ - **[Documentation Site](https://felixruigao.github.io/LongerAgent/)** — full guides on context management, sub-agents, skills, providers, and more
136
98
 
137
- Skills are reusable tool definitions the agent can load on demand.
138
-
139
- ```text
140
- You: "Install skill: apple-notes" # Agent uses built-in skill-manager
141
- You: /skills # Toggle skills on/off with a picker
142
- ```
143
-
144
- Create your own by adding a `SKILL.md` to `~/.longeragent/skills/<name>/`.
145
-
146
- ### Persistent Memory
147
-
148
- Two `AGENTS.md` files are loaded on every turn:
149
-
150
- - **`~/AGENTS.md`** — Global preferences across all projects
151
- - **`<project>/AGENTS.md`** — Project-specific patterns and architecture notes
152
-
153
- The agent reads them for context and can write to them to save long-term knowledge. These persist across sessions and context resets.
154
-
155
- ### Async Messaging
156
-
157
- Type messages at any time — even while the agent is working. Messages are queued and delivered at the next activation boundary.
99
+ ---
158
100
 
159
101
  <details>
160
- <summary><strong>How context management works (details)</strong></summary>
161
-
162
- Three layers work together to keep context under control:
163
-
164
- 1. **Hint Compression** — As context grows, the system prompts the agent to proactively summarize older segments
165
- 2. **Agent-Initiated Summarization** — The agent inspects its own context distribution via `show_context` and surgically compresses selected segments with `summarize_context`, preserving key decisions and unresolved issues
166
- 3. **Auto-Compact** — Near the limit, the system performs a full context reset with a continuation summary — the agent picks up exactly where it left off
102
+ <summary><strong>Reference</strong></summary>
167
103
 
168
- </details>
169
-
170
- ## Supported Providers
104
+ ### Supported Providers
171
105
 
172
- | Provider | Models | Env Variable |
106
+ | Provider | Models | Auth |
173
107
  |----------|--------|-------------|
174
108
  | **Anthropic** | Claude Haiku 4.5, Opus 4.6, Sonnet 4.6 (+ 1M context variants) | `ANTHROPIC_API_KEY` |
175
109
  | **OpenAI** | GPT-5.2, GPT-5.2 Codex, GPT-5.3 Codex, GPT-5.4 | `OPENAI_API_KEY` or OAuth |
176
- | **Kimi / Moonshot** | Kimi K2.5, K2 Instruct (Global, China, Coding Plan) | `KIMI_CN_API_KEY` / `KIMI_API_KEY` |
177
- | **MiniMax** | M2.1, M2.5 (Global, China) | `MINIMAX_API_KEY` |
178
- | **GLM / Zhipu** | GLM-5, GLM-4.7 (Global, China, Coding Plan) | `GLM_API_KEY` |
110
+ | **Kimi / Moonshot** | Kimi K2.5, K2 Instruct (Global, China, Coding Plan\*) | LongerAgent-managed slots (`LONGERAGENT_KIMI_*`); detects `MOONSHOT_API_KEY` and `KIMI_*` during setup |
111
+ | **MiniMax** | M2.1, M2.5 (Global, China) | LongerAgent-managed slots (`LONGERAGENT_MINIMAX_*`); detects `MINIMAX_*` during setup |
112
+ | **GLM / Zhipu** | GLM-5, GLM-4.7 (Global, China, Coding Plan) | LongerAgent-managed slots (`LONGERAGENT_GLM_*`); detects `GLM_*` during setup |
113
+ | **Ollama** | Any local Ollama model (dynamic discovery) | — |
114
+ | **oMLX** | Any local MLX model (dynamic discovery) | — |
115
+ | **LM Studio** | Any local GGUF model (dynamic discovery) | — |
179
116
  | **OpenRouter** | Curated presets for Claude, GPT, Kimi, MiniMax, GLM, plus any custom model | `OPENROUTER_API_KEY` |
180
117
 
181
- ## Tools
118
+ > \* **Kimi Coding Plan note:** The `kimi-code` endpoint (`api.kimi.com/coding/v1`) is currently restricted by Moonshot to whitelisted agents. You may receive a `403 Kimi For Coding is currently only available for Coding Agents` error. Use `kimi` or `kimi-cn` (standard API) instead.
119
+
120
+ ### Tools
182
121
 
183
- **15 built-in tools:**
122
+ **16 built-in tools:**
184
123
 
185
- `read_file` · `list_dir` · `glob` · `grep` · `edit_file` · `write_file` · `apply_patch` · `bash` · `bash_background` · `bash_output` · `kill_shell` · `diff` · `test` · `web_search` · `web_fetch`
124
+ `read_file` · `list_dir` · `glob` · `grep` · `edit_file` · `write_file` · `apply_patch` · `bash` · `bash_background` · `bash_output` · `kill_shell` · `diff` · `test` · `time` · `web_search` · `web_fetch`
186
125
 
187
126
  `read_file` supports image files (PNG, JPG, GIF, WebP, etc.) on multimodal models — the agent can directly see and analyze images.
188
127
 
@@ -192,75 +131,34 @@ Three layers work together to keep context under control:
192
131
 
193
132
  **Skills system** — Load reusable skill definitions as a dynamic `skill` tool. Manage with `/skills` (checkbox picker for enable/disable), hot-reload with `reload_skills`. Includes a built-in `skill-manager` that teaches the agent to search, download, and install new skills autonomously.
194
133
 
195
- **MCP Integration** — Connect to Model Context Protocol servers for additional tools.
134
+ **MCP Integration** — Connect to Model Context Protocol servers for additional tools. Use `/mcp` to verify configured servers and inspect discovered tools before your first turn.
196
135
 
197
- ## Slash Commands
198
-
199
- | Command | Description |
200
- |---------|-------------|
201
- | `/model` | Switch between configured models at runtime |
202
- | `/thinking` | Control thinking/reasoning depth per model |
203
- | `/skills` | Enable/disable skills with a checkbox picker |
204
- | `/resume` | Resume a previous session from its log |
205
- | `/summarize` | Summarize older context segments to free up space |
206
- | `/compact` | Full context reset with a continuation summary |
207
-
208
- ## Configuration
209
-
210
- LongerAgent loads bundled defaults from the installed package and user overrides from `~/.longeragent/`.
211
- `longeragent init` creates `config.yaml` plus empty override directories.
136
+ ### Configuration
212
137
 
213
138
  ```text
214
139
  ~/.longeragent/
215
- ├── config.yaml # Model and provider configurations (created by init)
216
- ├── settings.json # Runtime tuning (optional)
217
- ├── tui-preferences.json # Auto-saved TUI state
140
+ ├── tui-preferences.json # Model selection, local provider config, preferences (auto-managed)
141
+ ├── .env # API keys and managed provider slots (0600 perms)
142
+ ├── mcp.json # MCP server configurations (optional, user-edited)
143
+ ├── auth.json # OAuth tokens (auto-managed)
218
144
  ├── agent_templates/ # User template overrides
219
145
  ├── skills/ # User skills
220
146
  └── prompts/ # User prompt overrides
221
147
  ```
222
148
 
223
- See [configExample.yaml](./configExample.yaml) for a configuration reference.
224
-
225
- ### Runtime Settings (`settings.json`)
226
-
227
- ```jsonc
228
- {
229
- // Override max output tokens (clamped to [4096, model max])
230
- "max_output_tokens": 32000,
231
- // Context management thresholds (percentage of effective context, 20-95)
232
- "context": {
233
- "summarize_hint_level1": 60,
234
- "summarize_hint_level2": 80,
235
- "compact_output": 85,
236
- "compact_toolcall": 90
237
- }
238
- }
239
- ```
240
-
241
- ## Architecture
149
+ ### Architecture
242
150
 
243
151
  LongerAgent is built around a **Session → Agent → Provider** pipeline:
244
152
 
245
153
  - **Session** orchestrates the turn loop, message delivery, summarization, compaction, and sub-agent lifecycle
246
154
  - **Session Log** is the single source of truth — 20+ entry types capture every runtime event; the TUI display and provider input are both projections of the same data
247
155
  - **Agent** wraps a model + system prompt + tools into a reusable execution unit
248
- - **Provider** adapters normalize streaming, reasoning, tool calls, and usage across 7 provider families
249
-
250
- ## CLI Options
156
+ - **Provider** adapters normalize streaming, reasoning, tool calls, and usage across 10 providers
251
157
 
252
- ```text
253
- longeragent # Start with auto-detected config
254
- longeragent init # Run setup wizard
255
- longeragent oauth # Log in to OpenAI via OAuth (device code / browser)
256
- longeragent oauth status # Check OAuth login status
257
- longeragent oauth logout # Log out
258
- longeragent --config <path> # Use a specific config file
259
- longeragent --templates <path> # Use a specific templates directory
260
- longeragent --verbose # Enable debug logging
261
- ```
158
+ </details>
262
159
 
263
- ## Development
160
+ <details>
161
+ <summary><strong>Development</strong></summary>
264
162
 
265
163
  ```bash
266
164
  pnpm install # Install dependencies
@@ -270,9 +168,7 @@ pnpm test # Run tests (vitest)
270
168
  pnpm typecheck # Type check
271
169
  ```
272
170
 
273
- ## Security
274
-
275
- LongerAgent does not sandbox commands or require approval before file edits and shell execution. Use it in trusted environments and review what it does.
171
+ </details>
276
172
 
277
173
  ## License
278
174