sapper-iq 1.1.37 โ 1.1.39
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.
- package/README.md +426 -52
- package/package.json +7 -1
- package/sapper-ui.mjs +66 -19
- package/sapper.mjs +2832 -416
- package/.github/workflows/ci.yml +0 -35
- package/.github/workflows/publish.yml +0 -46
- package/.sapper/agents/reviewer.md +0 -32
- package/.sapper/agents/sapper-it.md +0 -23
- package/.sapper/agents/writer.md +0 -31
- package/.sapper/config.json +0 -4
- package/.sapper/context.json +0 -14
- package/.sapper/logs/session-2026-04-06T06-20-07.md +0 -29
- package/.sapper/skills/git-workflow.md +0 -44
- package/.sapper/skills/node-project.md +0 -52
- package/.sapper/workspace.json +0 -52
- package/.sapperignore +0 -137
- package/PUBLISHING.md +0 -148
- package/old/sapper copy 2.mjs +0 -673
- package/old/sapper copy 3.mjs +0 -1154
- package/old/sapper copy.mjs +0 -483
- package/old/sapper copy4.mjs +0 -1950
package/README.md
CHANGED
|
@@ -1,99 +1,473 @@
|
|
|
1
1
|
# Sapper
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/sapper-iq)
|
|
4
|
+
[](https://nodejs.org)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
[](https://www.npmjs.com/package/sapper-iq)
|
|
4
7
|
|
|
5
|
-
|
|
8
|
+
**Terminal-first AI coding assistant for real developer workflows.**
|
|
9
|
+
|
|
10
|
+
Sapper is a Node.js CLI that connects to locally running Ollama models and acts as an autonomous development agent โ reading, writing, searching, running shell commands, managing git, and browsing the web, all from a single conversational interface in your terminal.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Table of Contents
|
|
15
|
+
|
|
16
|
+
- [Terminal Interface](#terminal-interface)
|
|
17
|
+
- [Architecture](#architecture)
|
|
18
|
+
- [Features](#features)
|
|
19
|
+
- [Prerequisites](#prerequisites)
|
|
20
|
+
- [Installation](#installation)
|
|
21
|
+
- [Quick Start](#quick-start)
|
|
22
|
+
- [How It Works](#how-it-works)
|
|
23
|
+
- [Commands](#commands)
|
|
24
|
+
- [Tool Catalog](#tool-catalog)
|
|
25
|
+
- [Agents and Skills](#agents-and-skills)
|
|
26
|
+
- [Configuration](#configuration)
|
|
27
|
+
- [Session Memory](#session-memory)
|
|
28
|
+
- [Development](#development)
|
|
29
|
+
- [License](#license)
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Terminal Interface
|
|
34
|
+
|
|
35
|
+
Sapper presents three distinct screens during a session, each with a focused purpose.
|
|
36
|
+
|
|
37
|
+
### Startup โ Session Dashboard
|
|
38
|
+
|
|
39
|
+
When Sapper launches it immediately displays the full state of the current working directory before asking for any input.
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
Sapper terminal workspace
|
|
43
|
+
Local models, live tools, and focused coding in one loop
|
|
44
|
+
/your/project ยท v1.1.38
|
|
45
|
+
|
|
46
|
+
Quick start @file attach ยท /help commands ยท /agents modes
|
|
47
|
+
|
|
48
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
49
|
+
โ [workspace] 5 files ยท 0 symbols ยท indexed 36103m ago โ
|
|
50
|
+
โ [memory] .sapper/ ยท auto-attach on โ
|
|
51
|
+
โ [prompt] default prompt โ
|
|
52
|
+
โ [thinking] mode auto โ
|
|
53
|
+
โ [tools] limit 40 rounds โ
|
|
54
|
+
โ [shell] stream on ยท bg auto ยท 0 active โ
|
|
55
|
+
โ [stream] heartbeat on ยท phases on โ
|
|
56
|
+
โ [summary] phases on ยท trigger 65% โ
|
|
57
|
+
โ [agents] 3 ยท [skills] 2 โ
|
|
58
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
59
|
+
|
|
60
|
+
Previous session found in .sapper/context.json
|
|
61
|
+
Resume session? [y/N]
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
The dashboard shows workspace indexing state, memory configuration, active agents and skills count, shell mode, and context summarization trigger. If a previous session exists, Sapper offers to resume it.
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
### Model Selection โ Interactive Picker
|
|
69
|
+
|
|
70
|
+
Before each session, Sapper reads the locally available Ollama models and presents an interactive picker. Models are listed with their disk footprint and last-used time.
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
Model selection use โโ or j/k, enter to confirm
|
|
74
|
+
|
|
75
|
+
> 01 gemma4:e4b-mlx-bf16 14.9 GB ยท 54m ago
|
|
76
|
+
02 qwen3.6:35b-a3b-coding-nvfp4 20.4 GB ยท 9d ago
|
|
77
|
+
03 gemma-4-E4B-it-heretic-GGUF 7.48 GB ยท 13d ago ยท 7.5B
|
|
78
|
+
04 qwen3-14b-abliterated:q8_0 14.6 GB ยท 13d ago ยท 14.8B
|
|
79
|
+
05 qwen3.5:4b-mlx-bf16 8.47 GB ยท 18d ago
|
|
80
|
+
|
|
81
|
+
Preview
|
|
82
|
+
Selected gemma4:e4b-mlx-bf16
|
|
83
|
+
Footprint 14.9 GB
|
|
84
|
+
Updated 54m ago
|
|
85
|
+
Profile safetensors
|
|
86
|
+
Quant default
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Keyboard controls: `โ` `โ` or `j` / `k` to navigate, `Enter` to confirm. A live preview panel shows model metadata before committing.
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
### Active Session โ Context Bar
|
|
94
|
+
|
|
95
|
+
Once a model is selected the prompt loop begins. A persistent context bar at the bottom of each turn shows token consumption against the configured limit.
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
Session
|
|
99
|
+
|
|
100
|
+
[model] gemma4:e4b-mlx-bf16
|
|
101
|
+
[tools] native tool calling
|
|
102
|
+
[context] 35,000 tokens (custom limit, model: 131,072)
|
|
103
|
+
|
|
104
|
+
[gemma4] [default] [2% ctx]
|
|
105
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 765 / 35,000 tokens
|
|
106
|
+
>
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
The bar updates after every turn. When usage approaches the configured `summarizeTriggerPercent` threshold, Sapper automatically compresses older turns into a summary and continues without interruption.
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
### .sapper/ Data Folder
|
|
114
|
+
|
|
115
|
+
All persistent state is isolated inside `.sapper/` at the root of each project, keeping your workspace clean.
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
.sapper/
|
|
119
|
+
โโโ config.json runtime configuration (hot-reload)
|
|
120
|
+
โโโ context.json conversation history for session resume
|
|
121
|
+
โโโ embeddings.json semantic vector memory, cosine similarity recall
|
|
122
|
+
โโโ workspace.json file index and dependency graph
|
|
123
|
+
โโโ agents/ custom agent definitions (.md + YAML frontmatter)
|
|
124
|
+
โโโ skills/ reusable instruction blocks (.md + YAML frontmatter)
|
|
125
|
+
โโโ logs/ per-session activity audit logs (.md)
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Architecture
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
134
|
+
โ SAPPER CLI โ
|
|
135
|
+
โ โ
|
|
136
|
+
โ User Input โโโบ Prompt Builder โโโบ Ollama API โ
|
|
137
|
+
โ โ โ โ
|
|
138
|
+
โ Context / Memory Streaming โ
|
|
139
|
+
โ Embeddings Response โ
|
|
140
|
+
โ Agent / Skills โ โ
|
|
141
|
+
โ โ โผ โ
|
|
142
|
+
โ Tool Parser โโโโโ AI Response โ
|
|
143
|
+
โ โ โ
|
|
144
|
+
โ โโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโ โ
|
|
145
|
+
โ โผ โผ โผ โ
|
|
146
|
+
โ File System Shell Git / Web โ
|
|
147
|
+
โ READ WRITE PATCH SHELL SHELL(bg) COMMIT PUSH FETCH โ
|
|
148
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
.sapper/
|
|
153
|
+
โโโ config.json โ Runtime configuration
|
|
154
|
+
โโโ context.json โ Conversation history
|
|
155
|
+
โโโ embeddings.json โ Vector memory store
|
|
156
|
+
โโโ workspace.json โ Project dependency graph
|
|
157
|
+
โโโ agents/ โ Custom agent definitions (.md)
|
|
158
|
+
โโโ skills/ โ Reusable skill definitions (.md)
|
|
159
|
+
โโโ logs/ โ Per-session activity logs (.md)
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
---
|
|
6
163
|
|
|
7
164
|
## Features
|
|
8
165
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
166
|
+
| Area | Capability |
|
|
167
|
+
|---|---|
|
|
168
|
+
| AI Integration | Connects to any local Ollama model; model picker on startup |
|
|
169
|
+
| Tool Execution | 28 built-in tools covering files, shell, git, and web |
|
|
170
|
+
| Context Management | Auto-summarization when context window approaches limit |
|
|
171
|
+
| Session Memory | Embedding-based semantic memory with cosine similarity recall |
|
|
172
|
+
| Agents & Skills | Custom `.md` agent files with YAML frontmatter and tool restrictions |
|
|
173
|
+
| Background Shell | Long-running commands hand off to tracked background sessions |
|
|
174
|
+
| Approval Gate | Prompted approval with inline feedback for shell and write operations |
|
|
175
|
+
| Activity Logging | Every tool call and AI turn is logged to `.sapper/logs/` |
|
|
176
|
+
| AST Parsing | Symbol extraction (functions, classes) with `/symbol` search |
|
|
177
|
+
| Streaming | Live token-by-token output with heartbeat and phase status |
|
|
16
178
|
|
|
17
|
-
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## Prerequisites
|
|
182
|
+
|
|
183
|
+
- [Node.js](https://nodejs.org) >= 16.0.0
|
|
184
|
+
- [Ollama](https://ollama.ai) installed and running locally
|
|
185
|
+
- At least one model pulled, for example:
|
|
18
186
|
|
|
19
187
|
```bash
|
|
20
|
-
|
|
188
|
+
ollama pull llama3
|
|
21
189
|
```
|
|
22
190
|
|
|
23
|
-
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## Installation
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
npm install -g sapper-iq
|
|
197
|
+
```
|
|
24
198
|
|
|
25
|
-
|
|
26
|
-
- [Ollama](https://ollama.ai/) installed and running
|
|
27
|
-
- At least one Ollama model downloaded
|
|
199
|
+
---
|
|
28
200
|
|
|
29
|
-
##
|
|
201
|
+
## Quick Start
|
|
30
202
|
|
|
31
203
|
```bash
|
|
32
204
|
sapper
|
|
33
205
|
```
|
|
34
206
|
|
|
35
|
-
|
|
207
|
+
Sapper will prompt you to select a model, then you can start conversing immediately.
|
|
208
|
+
|
|
209
|
+
```
|
|
210
|
+
Model: llama3
|
|
211
|
+
Working directory: /your/project
|
|
212
|
+
|
|
213
|
+
> analyze this project and list what it does
|
|
214
|
+
> add a REST endpoint for user authentication
|
|
215
|
+
> run the tests and fix any failures
|
|
216
|
+
> commit the changes with a descriptive message
|
|
217
|
+
```
|
|
36
218
|
|
|
37
|
-
|
|
38
|
-
- `/session-info` - Show current session details
|
|
39
|
-
- `/step` - Toggle step-by-step mode
|
|
40
|
-
- `/help` - Show command help
|
|
41
|
-
- `exit` - Exit Sapper
|
|
219
|
+
---
|
|
42
220
|
|
|
43
|
-
|
|
221
|
+
## How It Works
|
|
44
222
|
|
|
45
223
|
```
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
224
|
+
User prompt
|
|
225
|
+
โ
|
|
226
|
+
โผ
|
|
227
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
228
|
+
โ 1. Build system prompt โ
|
|
229
|
+
โ - Core instructions โ
|
|
230
|
+
โ - Active agent / skills โ
|
|
231
|
+
โ - Workspace context โ
|
|
232
|
+
โ - Conversation history โ
|
|
233
|
+
โ - Semantic memory recall โ
|
|
234
|
+
โโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโ
|
|
235
|
+
โ
|
|
236
|
+
โผ
|
|
237
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
238
|
+
โ 2. Stream response from Ollama โ
|
|
239
|
+
โ - Parse tool calls in real time โ
|
|
240
|
+
โ - Execute tools as they arrive โ
|
|
241
|
+
โ - Feed results back to model โ
|
|
242
|
+
โโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโ
|
|
243
|
+
โ
|
|
244
|
+
โผ
|
|
245
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
246
|
+
โ 3. Tool execution loop โ
|
|
247
|
+
โ - Approval prompts for โ
|
|
248
|
+
โ shell / write operations โ
|
|
249
|
+
โ - Inline feedback to revise โ
|
|
250
|
+
โ - Loop until no more tool calls โ
|
|
251
|
+
โโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโ
|
|
252
|
+
โ
|
|
253
|
+
โผ
|
|
254
|
+
Final answer rendered
|
|
255
|
+
to terminal with syntax
|
|
256
|
+
highlighting and markdown
|
|
50
257
|
```
|
|
51
258
|
|
|
52
|
-
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
## Commands
|
|
262
|
+
|
|
263
|
+
Run these inside Sapper at the prompt:
|
|
264
|
+
|
|
265
|
+
| Command | Description |
|
|
266
|
+
|---|---|
|
|
267
|
+
| `/help` | Show all available commands |
|
|
268
|
+
| `/reset` | Start a new conversation session |
|
|
269
|
+
| `/clear-session` | Alias for `/reset` |
|
|
270
|
+
| `/session-info` | Display current session metadata |
|
|
271
|
+
| `/summary` | View or change auto-summarization settings |
|
|
272
|
+
| `/summary phases off` | Hide summarization step list |
|
|
273
|
+
| `/summary trigger 60` | Set summarization trigger to 60 % of context |
|
|
274
|
+
| `/shell` | Inspect shell config and list tracked background sessions |
|
|
275
|
+
| `/shell read <id>` | Read buffered output from a background session |
|
|
276
|
+
| `/shell stop <id>` | Stop a tracked background shell session |
|
|
277
|
+
| `/step` | Toggle step-by-step tool approval mode |
|
|
278
|
+
| `/tools` | Browse the built-in tool catalog |
|
|
279
|
+
| `/git` | Inspect repository state and git shortcuts |
|
|
280
|
+
| `/symbol <name>` | Search for a code symbol via AST index |
|
|
281
|
+
| `/recall <query>` | Search semantic memory for past context |
|
|
282
|
+
| `/log` | View the current session activity log |
|
|
283
|
+
| `/attach <file>` | Attach a file to the next prompt |
|
|
284
|
+
| `exit` | Exit Sapper |
|
|
285
|
+
|
|
286
|
+
---
|
|
287
|
+
|
|
288
|
+
## Tool Catalog
|
|
289
|
+
|
|
290
|
+
### File System
|
|
291
|
+
|
|
292
|
+
| Tool | Description |
|
|
293
|
+
|---|---|
|
|
294
|
+
| `READ` | Read a file's full contents |
|
|
295
|
+
| `CAT` | Alias for READ |
|
|
296
|
+
| `HEAD` | Read the first N lines of a file |
|
|
297
|
+
| `TAIL` | Read the last N lines of a file |
|
|
298
|
+
| `WRITE` | Create or overwrite a file |
|
|
299
|
+
| `PATCH` | Replace a specific block of text inside an existing file |
|
|
300
|
+
| `MKDIR` | Create a directory tree |
|
|
301
|
+
| `RMDIR` | Remove a directory (requires user approval) |
|
|
302
|
+
| `LIST` / `LS` | List directory contents |
|
|
303
|
+
| `FIND` | Find files and directories by name pattern |
|
|
304
|
+
| `SEARCH` / `GREP` | Search file contents with regex |
|
|
305
|
+
| `PWD` | Show the current tool working directory |
|
|
306
|
+
| `CD` | Change the tool working directory |
|
|
307
|
+
|
|
308
|
+
### Shell
|
|
53
309
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
4. **Review & approve** - Security prompts for shell commands
|
|
58
|
-
5. **Context awareness** - Sapper understands your project structure
|
|
310
|
+
| Tool | Description |
|
|
311
|
+
|---|---|
|
|
312
|
+
| `SHELL` | Execute a terminal command, with optional background handoff |
|
|
59
313
|
|
|
60
|
-
|
|
314
|
+
### Git
|
|
61
315
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
316
|
+
| Tool | Description |
|
|
317
|
+
|---|---|
|
|
318
|
+
| `STATUS` | Show concise git status |
|
|
319
|
+
| `CHANGES` | Show git status and diffs |
|
|
320
|
+
| `BRANCH` | List, create, or switch branches (changes require approval) |
|
|
321
|
+
| `COMMIT` | Create a git commit (requires approval) |
|
|
322
|
+
| `STASH` | List or apply/drop stashes (state changes require approval) |
|
|
323
|
+
| `TAG` | List, inspect, create, or delete tags (changes require approval) |
|
|
324
|
+
| `PUSH` | Push a branch to a remote (requires approval) |
|
|
68
325
|
|
|
69
|
-
|
|
326
|
+
### Web
|
|
70
327
|
|
|
71
|
-
|
|
328
|
+
| Tool | Description |
|
|
329
|
+
|---|---|
|
|
330
|
+
| `FETCH` | Fetch a web page as plain readable text |
|
|
331
|
+
| `FETCH_MAIN` | Extract main article body from a web page |
|
|
332
|
+
| `FETCH_MULTI` | Fetch multiple URLs in one call |
|
|
333
|
+
| `OPEN` | Open a URL in the default browser (requires approval) |
|
|
334
|
+
|
|
335
|
+
### Interaction
|
|
336
|
+
|
|
337
|
+
| Tool | Description |
|
|
338
|
+
|---|---|
|
|
339
|
+
| `ASK` | Pause and ask the user a clarifying question mid-task |
|
|
340
|
+
| `MEMORY` | Search saved semantic memory from past sessions |
|
|
341
|
+
|
|
342
|
+
---
|
|
343
|
+
|
|
344
|
+
## Agents and Skills
|
|
345
|
+
|
|
346
|
+
Sapper supports custom agents and reusable skills defined as Markdown files with YAML frontmatter, stored in `.sapper/agents/` and `.sapper/skills/`.
|
|
347
|
+
|
|
348
|
+
**Example agent** โ `.sapper/agents/backend.md`:
|
|
349
|
+
|
|
350
|
+
```markdown
|
|
351
|
+
---
|
|
352
|
+
name: Backend Engineer
|
|
353
|
+
description: Focused on API design, database queries, and server-side code
|
|
354
|
+
tools: [read, write, patch, shell, search, find, git]
|
|
355
|
+
---
|
|
356
|
+
|
|
357
|
+
You are a senior backend engineer. Prefer typed interfaces, validate inputs at boundaries,
|
|
358
|
+
and write efficient SQL. Always check existing patterns before introducing new abstractions.
|
|
72
359
|
```
|
|
73
|
-
|
|
360
|
+
|
|
361
|
+
Frontmatter fields:
|
|
362
|
+
|
|
363
|
+
| Field | Description |
|
|
364
|
+
|---|---|
|
|
365
|
+
| `name` | Display name for the agent |
|
|
366
|
+
| `description` | Short description shown in the agent picker |
|
|
367
|
+
| `tools` | Comma-separated list of allowed tools (restricts the default set) |
|
|
368
|
+
| `model` | Override the active Ollama model for this agent |
|
|
369
|
+
|
|
370
|
+
Skills follow the same format and are injected into the system prompt as reusable instruction blocks.
|
|
371
|
+
|
|
372
|
+
---
|
|
373
|
+
|
|
374
|
+
## Configuration
|
|
375
|
+
|
|
376
|
+
Sapper writes `.sapper/config.json` on first run. All fields are optional; missing values use the defaults shown below.
|
|
377
|
+
|
|
378
|
+
```json
|
|
379
|
+
{
|
|
380
|
+
"autoAttach": true,
|
|
381
|
+
"contextLimit": null,
|
|
382
|
+
"toolRoundLimit": 40,
|
|
383
|
+
"summaryPhases": true,
|
|
384
|
+
"summarizeTriggerPercent": 65,
|
|
385
|
+
"shell": {
|
|
386
|
+
"streamToModel": true,
|
|
387
|
+
"backgroundMode": "auto",
|
|
388
|
+
"backgroundAfterSeconds": 8,
|
|
389
|
+
"outputChunkChars": 4000
|
|
390
|
+
},
|
|
391
|
+
"thinking": {
|
|
392
|
+
"mode": "auto"
|
|
393
|
+
},
|
|
394
|
+
"streaming": {
|
|
395
|
+
"showPhaseStatus": true,
|
|
396
|
+
"showHeartbeat": true,
|
|
397
|
+
"idleNoticeSeconds": 4
|
|
398
|
+
},
|
|
399
|
+
"prompt": {
|
|
400
|
+
"prepend": "",
|
|
401
|
+
"append": "",
|
|
402
|
+
"coreOverride": ""
|
|
403
|
+
}
|
|
404
|
+
}
|
|
74
405
|
```
|
|
75
406
|
|
|
76
|
-
|
|
407
|
+
| Key | Default | Description |
|
|
408
|
+
|---|---|---|
|
|
409
|
+
| `autoAttach` | `true` | Automatically include directory contents in context |
|
|
410
|
+
| `contextLimit` | `null` | Override the model's context window size in tokens |
|
|
411
|
+
| `toolRoundLimit` | `40` | Maximum tool-call rounds before forcing a final answer |
|
|
412
|
+
| `summaryPhases` | `true` | Show step list during auto-summarization |
|
|
413
|
+
| `summarizeTriggerPercent` | `65` | Summarize when context reaches this % of the window |
|
|
414
|
+
| `shell.streamToModel` | `true` | Stream shell output chunks back to the model in background mode |
|
|
415
|
+
| `shell.backgroundMode` | `"auto"` | `off` โ always attached; `auto` โ background long commands; `on` โ background everything |
|
|
416
|
+
| `shell.backgroundAfterSeconds` | `8` | Seconds before a running command is handed off to a background session |
|
|
417
|
+
| `shell.outputChunkChars` | `4000` | Max chars per background shell output chunk returned to the model |
|
|
418
|
+
| `thinking.mode` | `"auto"` | `auto` / `on` / `off` โ controls model reasoning block visibility |
|
|
419
|
+
| `streaming.showPhaseStatus` | `true` | Show status lines during tool execution and model turns |
|
|
420
|
+
| `streaming.showHeartbeat` | `true` | Update progress line during quiet streaming phases |
|
|
421
|
+
| `streaming.idleNoticeSeconds` | `4` | Print an idle notice after N seconds of no visible output |
|
|
422
|
+
| `prompt.prepend` | `""` | Inject custom instructions before the default system prompt |
|
|
423
|
+
| `prompt.append` | `""` | Inject custom instructions after the default system prompt |
|
|
424
|
+
| `prompt.coreOverride` | `""` | Replace the core prompt block entirely (tool and context sections are preserved) |
|
|
425
|
+
|
|
426
|
+
Configuration is hot-reloaded โ edit the file while Sapper is running and changes take effect on the next prompt turn.
|
|
427
|
+
|
|
428
|
+
---
|
|
429
|
+
|
|
430
|
+
## Session Memory
|
|
431
|
+
|
|
432
|
+
Sapper maintains two layers of memory per project:
|
|
433
|
+
|
|
77
434
|
```
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
435
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
436
|
+
โ Short-term โ .sapper/context.json โ
|
|
437
|
+
โ Full conversation history for the current session โ
|
|
438
|
+
โ Auto-summarized as the context window fills up โ
|
|
439
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
440
|
+
โ Long-term โ .sapper/embeddings.json โ
|
|
441
|
+
โ Chunked text embedded with cosine similarity โ
|
|
442
|
+
โ Recalled automatically on relevant prompts โ
|
|
443
|
+
โ Searchable manually with /recall <query> โ
|
|
444
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
81
445
|
```
|
|
82
446
|
|
|
447
|
+
All activity is also written to `.sapper/logs/session-<timestamp>.md` for auditing.
|
|
448
|
+
|
|
449
|
+
---
|
|
450
|
+
|
|
83
451
|
## Development
|
|
84
452
|
|
|
85
453
|
```bash
|
|
86
|
-
git clone https://github.com/
|
|
454
|
+
git clone https://github.com/aledanee/sapper.git
|
|
87
455
|
cd sapper
|
|
88
456
|
npm install
|
|
89
457
|
chmod +x sapper.mjs
|
|
90
|
-
|
|
458
|
+
node sapper.mjs
|
|
91
459
|
```
|
|
92
460
|
|
|
461
|
+
CI runs automatically on push to `main` across Node.js 16, 18, and 20.
|
|
462
|
+
|
|
463
|
+
---
|
|
464
|
+
|
|
93
465
|
## License
|
|
94
466
|
|
|
95
|
-
MIT
|
|
467
|
+
MIT โ see [LICENSE](LICENSE)
|
|
96
468
|
|
|
97
|
-
|
|
469
|
+
---
|
|
98
470
|
|
|
99
|
-
Ibrahim Ihsan
|
|
471
|
+
**Author:** Ibrahim Ihsan
|
|
472
|
+
**Package:** [sapper-iq on npm](https://www.npmjs.com/package/sapper-iq)
|
|
473
|
+
**Repository:** [github.com/aledanee/sapper](https://github.com/aledanee/sapper)
|
package/package.json
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sapper-iq",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.39",
|
|
4
4
|
"description": "AI-powered development assistant that executes commands and builds projects",
|
|
5
5
|
"main": "sapper.mjs",
|
|
6
6
|
"bin": {
|
|
7
7
|
"sapper": "sapper.mjs",
|
|
8
8
|
"sapper-ui": "sapper-ui.mjs"
|
|
9
9
|
},
|
|
10
|
+
"files": [
|
|
11
|
+
"sapper.mjs",
|
|
12
|
+
"sapper-ui.mjs",
|
|
13
|
+
"README.md"
|
|
14
|
+
],
|
|
10
15
|
"type": "module",
|
|
11
16
|
"scripts": {
|
|
12
17
|
"start": "node sapper.mjs"
|
|
@@ -14,6 +19,7 @@
|
|
|
14
19
|
"dependencies": {
|
|
15
20
|
"acorn": "^8.15.0",
|
|
16
21
|
"chalk": "^5.3.0",
|
|
22
|
+
"cli-highlight": "^2.1.11",
|
|
17
23
|
"marked": "^15.0.12",
|
|
18
24
|
"marked-terminal": "^7.3.0",
|
|
19
25
|
"ollama": "^0.5.0",
|