@octocodeai/freellama-mcp-server 0.6.2 → 0.9.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/CONFIGURATION.md +11 -3
- package/DEVELOPING.md +6 -6
- package/README.md +224 -402
- package/dist/index.js +11714 -4251
- package/dist/research/bash-agent.js +1495 -71
- package/dist/research/coder-agent.js +4668 -0
- package/dist/research/github-agent.js +2923 -0
- package/dist/research/octocode-agent.js +1407 -116
- package/docs/ARCHITECTURE.md +101 -45
- package/docs/BUILD_AND_NOTES.md +31 -0
- package/docs/CLI.md +76 -27
- package/docs/COMPARISON.md +40 -0
- package/docs/CPU_GPU_ROUTING.md +127 -25
- package/docs/DEFERRED_JOBS.md +79 -0
- package/docs/FEATURES.md +303 -0
- package/docs/LOCAL_MODELS.md +190 -0
- package/docs/MODEL_FORMS_AND_RESULTS.md +55 -0
- package/docs/MODEL_INTROSPECTION.md +128 -0
- package/docs/MODEL_SELECTION.md +74 -22
- package/docs/MONITORING.md +115 -33
- package/docs/PRODUCTION.md +76 -13
- package/docs/README.md +11 -6
- package/docs/SCOPES_AND_WARMING.md +55 -7
- package/docs/TESTING.md +24 -2
- package/docs/TUNING.md +86 -0
- package/docs/cookbooks/README.md +22 -0
- package/docs/cookbooks/batch-text.md +19 -0
- package/docs/cookbooks/classify.md +25 -0
- package/docs/cookbooks/coding.md +17 -0
- package/docs/cookbooks/duplicates.md +17 -0
- package/docs/cookbooks/find-code.md +21 -0
- package/docs/cookbooks/image-recognition.md +15 -0
- package/docs/cookbooks/image-search.md +13 -0
- package/docs/cookbooks/jobs.md +60 -0
- package/docs/cookbooks/memory-and-caching.md +31 -0
- package/docs/cookbooks/ocr.md +17 -0
- package/docs/cookbooks/research-agent.md +27 -0
- package/docs/cookbooks/speech-to-text.md +19 -0
- package/docs/cookbooks/sweep.md +66 -0
- package/docs/cookbooks/text-to-speech.md +15 -0
- package/docs/octocode/GITHUB.md +30 -0
- package/docs/octocode/LOCAL.md +29 -0
- package/native/index.d.ts +1 -11
- package/native/index.js +18 -34
- package/package.json +13 -15
package/CONFIGURATION.md
CHANGED
|
@@ -15,9 +15,10 @@ server-launch config (for example `.mcp.json`'s `env` block) or the launching sh
|
|
|
15
15
|
| `FREELLAMA_MCP_DEFAULT_ADAPTER` | `bash` | `delegate_research`'s adapter (`octocode` to switch) |
|
|
16
16
|
| `FREELLAMA_MCP_MAX_TURNS` | `8` | Max agent turns for `delegate_research` |
|
|
17
17
|
| `FREELLAMA_MCP_DELEGATE_TIMEOUT_SECONDS` | `180` | Whole-subprocess timeout for `delegate_research` |
|
|
18
|
-
| `FREELLAMA_MCP_PULL_TIMEOUT_SECONDS` | `1200` | Default `
|
|
18
|
+
| `FREELLAMA_MCP_PULL_TIMEOUT_SECONDS` | `1200` | Default `ollama_pull` timeout |
|
|
19
19
|
| `FREELLAMA_MCP_FETCH_TIMEOUT_SECONDS` | `30` | Timeout for other direct Ollama HTTP calls |
|
|
20
|
-
| `FREELLAMA_MCP_ALLOWED_ROOTS` | checkout: this repository; published:
|
|
20
|
+
| `FREELLAMA_MCP_ALLOWED_ROOTS` | checkout: this repository; published: unset | Required for `delegate_research` in a published install: unset, every call with a `workspacePath` is refused. Platform-separated allowlist of directories it may read (`:` on macOS/Linux, `;` on Windows), for example `/Users/me/code/project:/Users/me/work`. `run_task` and `audio` `files` use `FREELLAMA_FILE_ROOTS` instead |
|
|
21
|
+
| `FREELLAMA_FILE_ROOTS` | unset | Platform-separated extra directories `run_task` and `audio` may read `files` from and `audio` may write `outputFile` to, besides the temp directory and the server's working directory (the working directory is skipped when it is `/` or the home directory) |
|
|
21
22
|
| `FREELLAMA_MCP_MODEL_EVIDENCE` | checkout: `packages/mcp/evidence/model-evidence.json`; published: unset | Path to per-model research grades (see "Runtime evidence") |
|
|
22
23
|
| `FREELLAMA_EXTERNAL_COST_MODEL` | unset | External-model label in estimated avoided-cost telemetry; set all three cost variables or none |
|
|
23
24
|
| `FREELLAMA_EXTERNAL_COST_INPUT_USD_PER_M` | unset | External input USD per million tokens |
|
|
@@ -30,6 +31,11 @@ server-launch config (for example `.mcp.json`'s `env` block) or the launching sh
|
|
|
30
31
|
| `FREELLAMA_SERVE_BINARY` | checkout `target/release`/`debug`, then the platform package | Binary used for serve autostart |
|
|
31
32
|
| `FREELLAMA_AGENT_OS_SANDBOX` | `auto` | Bash adapter OS confinement: `bwrap` on Linux, `sandbox-exec` on macOS, when present. `off` keeps only the restricted shell |
|
|
32
33
|
| `FREELLAMA_AGENT_OCTOCODE_PACKAGE` | `octocode@19.1.0` | Pinned npm spec the Octocode adapter runs through `npx` |
|
|
34
|
+
| `FREELLAMA_MCP_ALLOW_CODER` | unset (off) | `1` enables `delegate_research` `adapter:"coder"`, which edits files and runs the caller's `agent.commands` in an isolated copy of the workspace (see [the coder adapter](README.md#the-coder-adapter)) |
|
|
35
|
+
| `FREELLAMA_CODER_RUN_TIMEOUT_SECONDS` | `300` (at most `1800`) | Timeout of one coder `run`; the whole call is still bounded by `agent.timeoutSeconds` (coder default at least 600 s) |
|
|
36
|
+
| `FREELLAMA_CODER_MAX_COPY_BYTES` | `209715200` (200 MB) | Size cap of a coder copy of a workspace that is not a git repository (`node_modules`, `target`, `dist` and `.git` excluded) |
|
|
37
|
+
| `FREELLAMA_CODER_WRITABLE` | unset | Platform-separated extra directories the coder's allowed commands may write, such as `~/.cargo` for `cargo test`; an entry that holds or lies inside the workspace is refused |
|
|
38
|
+
| `FREELLAMA_CODER_UNSANDBOXED_RUN` | unset | `1` lets the coder `run` without an OS sandbox (`sandbox-exec` or `bwrap`); without one, `run` is refused |
|
|
33
39
|
|
|
34
40
|
Serve-side placement settings (read by `freellama serve`, not the MCP process):
|
|
35
41
|
|
|
@@ -82,7 +88,9 @@ between model templates.
|
|
|
82
88
|
|
|
83
89
|
**Security:** `delegate_research` grants a local model read access to `workspacePath`. The path is
|
|
84
90
|
confined to `FREELLAMA_MCP_ALLOWED_ROOTS` (default: this repository in a checkout; unset in a published
|
|
85
|
-
install
|
|
91
|
+
install, where it is required and every call is refused until you set it). A relative `workspacePath`
|
|
92
|
+
resolves against the server's working directory unless that is `/` or the home directory, then is
|
|
93
|
+
resolved through symlinks so a link inside an allowed root can't escape
|
|
86
94
|
it. The default `bash` adapter runs an allowlist of read-only tools in a restricted shell with a
|
|
87
95
|
scrubbed environment and, where available, an OS sandbox; it also rejects command substitution,
|
|
88
96
|
home-directory paths, `..`, and absolute paths outside that workspace. Production deployments should generate a permission-restricted token with
|
package/DEVELOPING.md
CHANGED
|
@@ -61,14 +61,14 @@ to an explicit non-default endpoint; see `FREELLAMA_MCP_AUTOSTART_SERVE` in
|
|
|
61
61
|
## Platform support
|
|
62
62
|
|
|
63
63
|
The native addon is named by target triple (`freellama.<platform>-<arch>[-<abi>].node`). The base
|
|
64
|
-
package has
|
|
65
|
-
|
|
66
|
-
then the host's optional package. A release is supported only when
|
|
64
|
+
package has one npm optional dependency per platform in `scripts/release-platforms.mjs` (macOS
|
|
65
|
+
arm64, Linux arm64/x64 with glibc, Windows arm64/x64 with MSVC). `native/index.js` tries the checkout artifact first,
|
|
66
|
+
then the host's optional package. A release is supported only when every artifact package passes
|
|
67
67
|
the publish verifier; an installation made with `--omit=optional` cannot load the addon. `engines`
|
|
68
68
|
requires Node >= 20.
|
|
69
69
|
|
|
70
70
|
Machine discovery distinguishes total host memory (`memory_bytes`) from known unified memory
|
|
71
|
-
(`
|
|
71
|
+
(`memory_kind: "unified"`). Library-tag `fitsInMemory` is a conservative host-memory preflight and
|
|
72
72
|
includes `fitScope: "host_memory_budget_only"`; inspect `/api/ps` for actual accelerator placement.
|
|
73
73
|
|
|
74
74
|
Start the serve-backed tools' dependency from the repository root:
|
|
@@ -84,8 +84,8 @@ these tools call.
|
|
|
84
84
|
|
|
85
85
|
`packages/mcp/` is the portable JavaScript package. Its `package.json` lists the platform packages
|
|
86
86
|
as exact-version optional dependencies; it intentionally does not embed a `.node` binary. Publish
|
|
87
|
-
|
|
88
|
-
at the same version. `yarn release:verify:publish` refuses a release if any of
|
|
87
|
+
every `packages/native/*` package first, then publish `@octocodeai/freellama` (`npx @octocodeai/freellama`) and `@octocodeai/freellama-mcp-server` (`npx @octocodeai/freellama-mcp-server`)
|
|
88
|
+
at the same version. `yarn release:verify:publish` refuses a release if any of these packages
|
|
89
89
|
omits `assets/logo.jpg`, or if any platform package has a missing, empty, or unpacked
|
|
90
90
|
executable/addon pair.
|
|
91
91
|
|