@octocodeai/freellama-mcp-server 0.9.0 → 0.10.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.
- package/README.md +42 -0
- package/dist/index.js +558 -314
- package/dist/research/bash-agent.js +21 -12
- package/dist/research/coder-agent.js +21 -12
- package/dist/research/github-agent.js +22 -13
- package/dist/research/octocode-agent.js +21 -12
- package/docs/MODEL_SELECTION.md +1 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -97,6 +97,15 @@ do not need it, and `run_task` `files` uses `FREELLAMA_FILE_ROOTS` instead. Add
|
|
|
97
97
|
`claude mcp add freellama -e FREELLAMA_MCP_ALLOWED_ROOTS=/absolute/path/to/your-project -- npx -y @octocodeai/freellama-mcp-server`
|
|
98
98
|
or an `"env": { ... }` entry in JSON. All settings: [MCP configuration](packages/mcp/CONFIGURATION.md).
|
|
99
99
|
|
|
100
|
+
Without `model` (and without `FREELLAMA_MCP_DEFAULT_MODEL`), `delegate_research` uses the first
|
|
101
|
+
research-agent catalog pick (stronger, default, small) that is installed and fits in memory now;
|
|
102
|
+
GitHub research skips the small pick, which scored 1 of 6 there. When none fits, it takes the
|
|
103
|
+
installed default (then stronger) pick and lets serve's memory gate admit, wait or refuse the load;
|
|
104
|
+
with no pick installed it falls back to routing. The receipt's `researchModel` says which and why.
|
|
105
|
+
GitHub answers are grounded against the adapter's own `gh` results; local adapters check the workspace on disk. A sweep whose
|
|
106
|
+
server process exited reports `interrupted` with the `sweep{action:"resume", sweepId}` call, which
|
|
107
|
+
reuses saved chunk results; sweeps never resume on their own.
|
|
108
|
+
|
|
100
109
|
### CLI (for the terminal)
|
|
101
110
|
|
|
102
111
|
```bash
|
|
@@ -188,6 +197,39 @@ sequenceDiagram
|
|
|
188
197
|
An explicit `model` always wins over routing; FreeLlama never swaps in another model. With
|
|
189
198
|
`defer:true` the same path runs in the background and `task_jobs` returns the receipt.
|
|
190
199
|
|
|
200
|
+
#### Where an answer goes
|
|
201
|
+
|
|
202
|
+
Every result is saved whole (`response_file`; read one part with `read_response{file, section}`).
|
|
203
|
+
`run_task` and `delegate_research` take two more fields that choose what comes back inline:
|
|
204
|
+
|
|
205
|
+
- `output`: `auto` (default) returns the answer inline up to 8,000 characters (about 2,000 tokens),
|
|
206
|
+
and above that a short view: the label line, the first lines of the answer, every `check:`,
|
|
207
|
+
`handoff_file:`, `verification:` and `cited:` line unchanged, and the file holding the whole
|
|
208
|
+
answer. `inline` always returns the whole text; `file` always returns the short view. The
|
|
209
|
+
default exists because hosts limit tool output (Claude Code warns above 10,000 tokens and caps
|
|
210
|
+
it at 25,000 by default) and every inline character costs the calling agent tokens.
|
|
211
|
+
A shortened view also replaces the answer's text inside `structuredContent` with
|
|
212
|
+
`answer moved: <output_file or read_response location>` and adds `output: {mode, chars, file}`.
|
|
213
|
+
- `outputPath`: also write the answer there as Markdown (the `saveAs` handoff format), returned as
|
|
214
|
+
`output_file`. The caller owns the path: a new file is created and an existing one replaced. It
|
|
215
|
+
must resolve inside the readable roots (the project, the temp directory, `FREELLAMA_FILE_ROOTS`),
|
|
216
|
+
outside any `.git` directory, and not be a directory. It is checked before the model runs, so it
|
|
217
|
+
is refused with `preview` or `defer`; with `tasks` one file holds the combined text. A failed
|
|
218
|
+
write keeps the whole answer inline and names the error.
|
|
219
|
+
|
|
220
|
+
A shortened view without an `outputPath` writes the answer to a new
|
|
221
|
+
`${FREELLAMA_HOME}/tmp/<timestamp>-<pid>-<n>.md` (default `~/.octocode/freellama`) and ends with
|
|
222
|
+
`output_file: <path> (the full answer, N chars)`; a later `run_task{files:[output_file]}` can read
|
|
223
|
+
it. Those files are deleted after `FREELLAMA_RESPONSE_TTL_DAYS` (default 7; `0` keeps them). If
|
|
224
|
+
that write fails, the view points at the saved response
|
|
225
|
+
(`read_response{file, section:"/result/content/0/text"}`); with neither, the whole answer is
|
|
226
|
+
returned with a note.
|
|
227
|
+
|
|
228
|
+
`task_jobs{action:"get"}` shapes a finished deferred job the same way (its own `output`, default
|
|
229
|
+
`auto`). Receipts keep the routing, timing and token counts inline; telemetry and nested metrics move
|
|
230
|
+
to the saved `response_file`. `models{view:"installed"}` and `resident` return a slim per-model set;
|
|
231
|
+
`includeVerbose:true` returns the full records.
|
|
232
|
+
|
|
191
233
|
### The memory gate
|
|
192
234
|
|
|
193
235
|
A model load has to fit before it starts, so a new load cannot push the machine into swap:
|