@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.
Files changed (45) hide show
  1. package/CONFIGURATION.md +11 -3
  2. package/DEVELOPING.md +6 -6
  3. package/README.md +224 -402
  4. package/dist/index.js +11714 -4251
  5. package/dist/research/bash-agent.js +1495 -71
  6. package/dist/research/coder-agent.js +4668 -0
  7. package/dist/research/github-agent.js +2923 -0
  8. package/dist/research/octocode-agent.js +1407 -116
  9. package/docs/ARCHITECTURE.md +101 -45
  10. package/docs/BUILD_AND_NOTES.md +31 -0
  11. package/docs/CLI.md +76 -27
  12. package/docs/COMPARISON.md +40 -0
  13. package/docs/CPU_GPU_ROUTING.md +127 -25
  14. package/docs/DEFERRED_JOBS.md +79 -0
  15. package/docs/FEATURES.md +303 -0
  16. package/docs/LOCAL_MODELS.md +190 -0
  17. package/docs/MODEL_FORMS_AND_RESULTS.md +55 -0
  18. package/docs/MODEL_INTROSPECTION.md +128 -0
  19. package/docs/MODEL_SELECTION.md +74 -22
  20. package/docs/MONITORING.md +115 -33
  21. package/docs/PRODUCTION.md +76 -13
  22. package/docs/README.md +11 -6
  23. package/docs/SCOPES_AND_WARMING.md +55 -7
  24. package/docs/TESTING.md +24 -2
  25. package/docs/TUNING.md +86 -0
  26. package/docs/cookbooks/README.md +22 -0
  27. package/docs/cookbooks/batch-text.md +19 -0
  28. package/docs/cookbooks/classify.md +25 -0
  29. package/docs/cookbooks/coding.md +17 -0
  30. package/docs/cookbooks/duplicates.md +17 -0
  31. package/docs/cookbooks/find-code.md +21 -0
  32. package/docs/cookbooks/image-recognition.md +15 -0
  33. package/docs/cookbooks/image-search.md +13 -0
  34. package/docs/cookbooks/jobs.md +60 -0
  35. package/docs/cookbooks/memory-and-caching.md +31 -0
  36. package/docs/cookbooks/ocr.md +17 -0
  37. package/docs/cookbooks/research-agent.md +27 -0
  38. package/docs/cookbooks/speech-to-text.md +19 -0
  39. package/docs/cookbooks/sweep.md +66 -0
  40. package/docs/cookbooks/text-to-speech.md +15 -0
  41. package/docs/octocode/GITHUB.md +30 -0
  42. package/docs/octocode/LOCAL.md +29 -0
  43. package/native/index.d.ts +1 -11
  44. package/native/index.js +18 -34
  45. package/package.json +13 -15
package/native/index.js CHANGED
@@ -6,40 +6,24 @@ const path = require("node:path");
6
6
  const { createRequire } = require("node:module");
7
7
  const requireFromHere = createRequire(__filename);
8
8
 
9
- // napi-rs filenames: `freellama.<platform>-<arch>[-<abi>].node`. ABI suffix is present on
10
- // Linux/Windows, absent on macOS. On Linux try both gnu and musl — Node's glibc probe does not
11
- // have to match how the addon was compiled.
12
- const ABI_SUFFIXES = {
13
- linux: process.report?.getReport()?.header?.glibcVersionRuntime ? ["-gnu", "-musl"] : ["-musl", "-gnu"],
14
- win32: ["-msvc"],
15
- };
9
+ // napi-rs filenames: `freellama.<platform>-<arch>[-<abi>].node`. Linux ships glibc builds, Windows
10
+ // MSVC builds; macOS has no ABI suffix.
11
+ const ABI_SUFFIX = { linux: "-gnu", win32: "-msvc" }[process.platform] ?? "";
12
+ const id = `${process.platform}-${process.arch}${ABI_SUFFIX}`;
13
+ const localAddon = path.join(__dirname, `freellama.${id}.node`);
14
+ const packageName = `@octocodeai/freellama-native-${id}`;
16
15
 
17
- function candidateIds() {
18
- const { platform, arch } = process;
19
- const suffixes = ABI_SUFFIXES[platform] ?? [];
20
- return [...new Set(suffixes.concat("").map((suffix) => `${platform}-${arch}${suffix}`))];
21
- }
22
-
23
- const candidates = candidateIds();
24
- const found = candidates.find((id) => existsSync(path.join(__dirname, `freellama.${id}.node`)));
25
-
26
- if (!found) {
27
- const failures = [];
28
- for (const id of candidates) {
29
- const packageName = `@octocodeai/freellama-native-${id}`;
30
- try {
31
- module.exports = requireFromHere(packageName);
32
- return;
33
- } catch (error) {
34
- failures.push(`${packageName}: ${error?.message ?? error}`);
35
- }
16
+ if (existsSync(localAddon)) {
17
+ module.exports = require(localAddon);
18
+ } else {
19
+ try {
20
+ module.exports = requireFromHere(packageName);
21
+ } catch (error) {
22
+ throw new Error(
23
+ `freellama: no usable native addon for ${process.platform}-${process.arch}.\n` +
24
+ `Tried ${localAddon} and the optional package ${packageName}.\n` +
25
+ "Reinstall without --omit=optional. From a source checkout, run `yarn build:native`.\n" +
26
+ `Load failure: ${error?.message ?? error}`,
27
+ );
36
28
  }
37
- throw new Error(
38
- `freellama: no usable native addon for ${process.platform}-${process.arch}.\n` +
39
- `Tried local development artifacts and optional packages: ${candidates.map((id) => `@octocodeai/freellama-native-${id}`).join(", ")}.\n` +
40
- "Reinstall without --omit=optional. From a source checkout, run `yarn build:native`.\n" +
41
- `Load failures:\n ${failures.join("\n ")}`,
42
- );
43
29
  }
44
-
45
- module.exports = require(`./freellama.${found}.node`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@octocodeai/freellama-mcp-server",
3
- "version": "0.6.2",
3
+ "version": "0.9.0",
4
4
  "description": "MCP server exposing FreeLlama core as tools, via native NAPI bindings into packages/rust-core.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -16,7 +16,7 @@
16
16
  "coding-agent"
17
17
  ],
18
18
  "engines": {
19
- "node": ">=20.0.0"
19
+ "node": ">=22"
20
20
  },
21
21
  "type": "module",
22
22
  "main": "dist/index.js",
@@ -46,18 +46,15 @@
46
46
  "build:native": "yarn --cwd ../.. build:native"
47
47
  },
48
48
  "dependencies": {
49
- "@modelcontextprotocol/sdk": "^1.30.0",
50
- "zod": "^3.24.1"
49
+ "@modelcontextprotocol/sdk": "^1.32.2",
50
+ "zod": "^4.6.7"
51
51
  },
52
52
  "optionalDependencies": {
53
- "@octocodeai/freellama-native-darwin-arm64": "0.6.2",
54
- "@octocodeai/freellama-native-darwin-x64": "0.6.2",
55
- "@octocodeai/freellama-native-linux-arm64-gnu": "0.6.2",
56
- "@octocodeai/freellama-native-linux-arm64-musl": "0.6.2",
57
- "@octocodeai/freellama-native-linux-x64-gnu": "0.6.2",
58
- "@octocodeai/freellama-native-linux-x64-musl": "0.6.2",
59
- "@octocodeai/freellama-native-win32-arm64-msvc": "0.6.2",
60
- "@octocodeai/freellama-native-win32-x64-msvc": "0.6.2"
53
+ "@octocodeai/freellama-native-darwin-arm64": "0.9.0",
54
+ "@octocodeai/freellama-native-linux-arm64-gnu": "0.9.0",
55
+ "@octocodeai/freellama-native-linux-x64-gnu": "0.9.0",
56
+ "@octocodeai/freellama-native-win32-arm64-msvc": "0.9.0",
57
+ "@octocodeai/freellama-native-win32-x64-msvc": "0.9.0"
61
58
  },
62
59
  "author": "Guy Bary",
63
60
  "license": "Apache-2.0 OR MIT",
@@ -66,9 +63,10 @@
66
63
  "registry": "https://registry.npmjs.org/"
67
64
  },
68
65
  "devDependencies": {
69
- "@types/node": "^22.10.0",
66
+ "@types/node": "^22.20.5",
70
67
  "esbuild": "^0.28.2",
71
- "typescript": "^5.7.2",
72
- "vitest": "^4.1.11"
68
+ "typescript": "^7.0.2",
69
+ "vite": "^8.3.5",
70
+ "vitest": "^5.0.5"
73
71
  }
74
72
  }