feral-agent 2026.6.31 → 2026.7.19

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 (189) hide show
  1. package/bin/feral.js +72 -2
  2. package/brain.example.json +32 -18
  3. package/package.json +15 -15
  4. package/dist/feral-agent.js +0 -233623
  5. package/src/AGENTS.md +0 -51
  6. package/src/IDENTITY.md +0 -19
  7. package/src/SOUL.md +0 -116
  8. package/src/brain/brain-config.ts +0 -180
  9. package/src/brain/brain-stack.ts +0 -376
  10. package/src/brain/capability-registry.ts +0 -183
  11. package/src/brain/task-classifier.ts +0 -171
  12. package/src/cli.ts +0 -156
  13. package/src/core/agent-loop.ts +0 -1764
  14. package/src/core/ask-user-bridge.ts +0 -120
  15. package/src/core/desktop-control-bridge.ts +0 -99
  16. package/src/core/executables.ts +0 -73
  17. package/src/core/feral-prompt.ts +0 -121
  18. package/src/core/heartbeat.ts +0 -118
  19. package/src/core/hook-registry.ts +0 -120
  20. package/src/core/inner-thoughts.ts +0 -345
  21. package/src/core/lead-desk.ts +0 -75
  22. package/src/core/mood.ts +0 -94
  23. package/src/core/soul-loader.ts +0 -239
  24. package/src/core/subagent.ts +0 -290
  25. package/src/core/tokenizer.ts +0 -81
  26. package/src/core/tool-grammar.ts +0 -74
  27. package/src/core/user-loader.ts +0 -101
  28. package/src/cron/delivery.ts +0 -79
  29. package/src/cron/index.ts +0 -14
  30. package/src/cron/jobs.ts +0 -204
  31. package/src/cron/schedule.ts +0 -58
  32. package/src/cron/scheduler.ts +0 -245
  33. package/src/db.ts +0 -337
  34. package/src/index.ts +0 -1913
  35. package/src/memory/episodic.ts +0 -245
  36. package/src/memory/extractor.ts +0 -413
  37. package/src/memory/fractal/bench/README.md +0 -69
  38. package/src/memory/fractal/bench/corpus/generate-corpus.ts +0 -227
  39. package/src/memory/fractal/bench/corpus/memories.jsonl +0 -221
  40. package/src/memory/fractal/bench/corpus/queries.jsonl +0 -64
  41. package/src/memory/fractal/bench/corpus/seed-corpus.ts +0 -49
  42. package/src/memory/fractal/bench/metrics.ts +0 -88
  43. package/src/memory/fractal/bench/orchestrator.ts +0 -292
  44. package/src/memory/fractal/bench/query-gen.ts +0 -95
  45. package/src/memory/fractal/bench/run-benchmark.ts +0 -114
  46. package/src/memory/fractal/bench/runner.ts +0 -120
  47. package/src/memory/fractal/cosine.ts +0 -34
  48. package/src/memory/fractal/cross-session-dedup.ts +0 -111
  49. package/src/memory/fractal/embed.ts +0 -158
  50. package/src/memory/fractal/eviction.ts +0 -68
  51. package/src/memory/fractal/fractal-memory.ts +0 -941
  52. package/src/memory/fractal/fractal-recall.ts +0 -287
  53. package/src/memory/fractal/kmeans.ts +0 -165
  54. package/src/memory/fractal/leaf-store.ts +0 -129
  55. package/src/memory/fractal/migration.ts +0 -161
  56. package/src/memory/fractal/prng.ts +0 -36
  57. package/src/memory/fractal/project-centroids.ts +0 -57
  58. package/src/memory/fractal/summarize.ts +0 -147
  59. package/src/memory/fractal/tree-builder.ts +0 -354
  60. package/src/memory/fractal/tree-query.ts +0 -81
  61. package/src/memory/fractal/tree-store.ts +0 -129
  62. package/src/memory/fractal/types.ts +0 -57
  63. package/src/memory/graph-cleaner.ts +0 -67
  64. package/src/memory/graph.ts +0 -178
  65. package/src/memory/privacy.ts +0 -148
  66. package/src/memory/recall.ts +0 -159
  67. package/src/memory/reconciler.ts +0 -152
  68. package/src/memory/semantic.ts +0 -124
  69. package/src/memory/working.ts +0 -307
  70. package/src/research/research-loop.ts +0 -518
  71. package/src/rsi/activity-monitor.ts +0 -73
  72. package/src/rsi/adapters.ts +0 -256
  73. package/src/rsi/birth-policy.ts +0 -79
  74. package/src/rsi/bridge.ts +0 -85
  75. package/src/rsi/budget.ts +0 -208
  76. package/src/rsi/champion-tree.ts +0 -167
  77. package/src/rsi/champion.ts +0 -102
  78. package/src/rsi/code-genome-io.ts +0 -64
  79. package/src/rsi/code-genome.ts +0 -433
  80. package/src/rsi/code-leaves.ts +0 -187
  81. package/src/rsi/code-proposer.ts +0 -250
  82. package/src/rsi/code-rsi.ts +0 -220
  83. package/src/rsi/code-sandbox.ts +0 -278
  84. package/src/rsi/confidence.ts +0 -259
  85. package/src/rsi/contract-deps.ts +0 -94
  86. package/src/rsi/contract-leaves.ts +0 -217
  87. package/src/rsi/contract-runner.ts +0 -279
  88. package/src/rsi/contract-stages.ts +0 -227
  89. package/src/rsi/contract.ts +0 -211
  90. package/src/rsi/crossover-selection.ts +0 -82
  91. package/src/rsi/crossover.ts +0 -65
  92. package/src/rsi/dataset-builder.ts +0 -0
  93. package/src/rsi/default-tier-specs.ts +0 -151
  94. package/src/rsi/dream-config.ts +0 -184
  95. package/src/rsi/dream-cycle.ts +0 -271
  96. package/src/rsi/dream-scheduler.ts +0 -183
  97. package/src/rsi/dream-telemetry.ts +0 -51
  98. package/src/rsi/engine.ts +0 -165
  99. package/src/rsi/episode-options.ts +0 -85
  100. package/src/rsi/escape-time-recorder.ts +0 -102
  101. package/src/rsi/escape-time.ts +0 -110
  102. package/src/rsi/eval-spec.ts +0 -98
  103. package/src/rsi/eval-worker.ts +0 -96
  104. package/src/rsi/event-bus.ts +0 -138
  105. package/src/rsi/extinction-handler.ts +0 -118
  106. package/src/rsi/fitness.ts +0 -184
  107. package/src/rsi/fractal.ts +0 -68
  108. package/src/rsi/genome.ts +0 -28
  109. package/src/rsi/get-specs.ts +0 -56
  110. package/src/rsi/goal-mode.ts +0 -274
  111. package/src/rsi/instance-paths.ts +0 -91
  112. package/src/rsi/invoke-agent.ts +0 -275
  113. package/src/rsi/journal.ts +0 -205
  114. package/src/rsi/lora-eval-gate.ts +0 -122
  115. package/src/rsi/lora-eval-runner.ts +0 -103
  116. package/src/rsi/lora-pipeline.ts +0 -323
  117. package/src/rsi/lora-registry.ts +0 -277
  118. package/src/rsi/mod.ts +0 -96
  119. package/src/rsi/mutation.ts +0 -197
  120. package/src/rsi/passive-supervisor.ts +0 -164
  121. package/src/rsi/pbt-controller.ts +0 -245
  122. package/src/rsi/pbt-handler.ts +0 -67
  123. package/src/rsi/pending-patches.ts +0 -265
  124. package/src/rsi/personal-fitness.ts +0 -179
  125. package/src/rsi/population-manager.ts +0 -405
  126. package/src/rsi/population-snapshot.ts +0 -82
  127. package/src/rsi/provenance.ts +0 -279
  128. package/src/rsi/ratchet-handler.ts +0 -187
  129. package/src/rsi/recalcitrance.ts +0 -71
  130. package/src/rsi/resource-monitor.ts +0 -96
  131. package/src/rsi/rsi-cost.ts +0 -45
  132. package/src/rsi/run-eval.ts +0 -100
  133. package/src/rsi/selection-handler.ts +0 -156
  134. package/src/rsi/sidecar.ts +0 -995
  135. package/src/rsi/strategy-seeds.ts +0 -185
  136. package/src/rsi/taste-miner.ts +0 -259
  137. package/src/rsi/taste.ts +0 -140
  138. package/src/rsi/tier-loader.ts +0 -121
  139. package/src/rsi/trainers/cli-trainer.ts +0 -211
  140. package/src/sandbox/audit-log.ts +0 -0
  141. package/src/sandbox/circuit-breaker.ts +0 -184
  142. package/src/sandbox/egress-proxy.ts +0 -341
  143. package/src/sandbox/field-crypto.ts +0 -86
  144. package/src/sandbox/inference-providers.ts +0 -1282
  145. package/src/sandbox/inference-router.ts +0 -736
  146. package/src/sandbox/mcp-client.ts +0 -461
  147. package/src/sandbox/perf-policy.ts +0 -161
  148. package/src/sandbox/process-sandbox.ts +0 -459
  149. package/src/sandbox/tool-permissions.ts +0 -267
  150. package/src/telemetry/tool-observations.ts +0 -162
  151. package/src/tools/builtin/ask-user.ts +0 -264
  152. package/src/tools/builtin/calculator.ts +0 -276
  153. package/src/tools/builtin/capture-lead.ts +0 -68
  154. package/src/tools/builtin/code-quality.ts +0 -308
  155. package/src/tools/builtin/control-app.ts +0 -433
  156. package/src/tools/builtin/deep-research.ts +0 -152
  157. package/src/tools/builtin/delegate-task.ts +0 -136
  158. package/src/tools/builtin/edit-file.ts +0 -197
  159. package/src/tools/builtin/escalate-to-human.ts +0 -92
  160. package/src/tools/builtin/fetch-url.ts +0 -74
  161. package/src/tools/builtin/file-search.ts +0 -221
  162. package/src/tools/builtin/git.ts +0 -365
  163. package/src/tools/builtin/grep.ts +0 -276
  164. package/src/tools/builtin/http-request.ts +0 -135
  165. package/src/tools/builtin/list-directory.ts +0 -79
  166. package/src/tools/builtin/list-skills.ts +0 -118
  167. package/src/tools/builtin/read-file.ts +0 -66
  168. package/src/tools/builtin/read-skill.ts +0 -163
  169. package/src/tools/builtin/read-webpage.ts +0 -82
  170. package/src/tools/builtin/recall.ts +0 -88
  171. package/src/tools/builtin/scan-workspace.ts +0 -227
  172. package/src/tools/builtin/schedule-meeting.ts +0 -89
  173. package/src/tools/builtin/shell-exec.ts +0 -283
  174. package/src/tools/builtin/time-date.ts +0 -171
  175. package/src/tools/builtin/todo-write.ts +0 -190
  176. package/src/tools/builtin/tool-drawer.ts +0 -143
  177. package/src/tools/builtin/tool-health.ts +0 -84
  178. package/src/tools/builtin/web-search.ts +0 -124
  179. package/src/tools/builtin/write-file.ts +0 -67
  180. package/src/tools/registry.ts +0 -726
  181. package/src/tools/tiers.ts +0 -58
  182. package/src/transports/connectors.ts +0 -891
  183. package/src/transports/interface.ts +0 -18
  184. package/src/transports/tauri.ts +0 -192
  185. package/src/transports/tui.ts +0 -87
  186. package/src/tui/chat.ts +0 -174
  187. package/src/tui/render.ts +0 -249
  188. package/src/tui/setup.ts +0 -161
  189. package/src/types.ts +0 -1290
package/bin/feral.js CHANGED
@@ -1,2 +1,72 @@
1
- #!/usr/bin/env bun
2
- import '../dist/feral-agent.js';
1
+ #!/usr/bin/env node
2
+ // Feral launcher — cross-platform. npm guarantees node (not bun), so this thin
3
+ // shim (node) locates the bundled Rust `feral` binary for the host platform and
4
+ // execs it; the Rust binary in turn spawns the TS sidecar sitting NEXT TO it in
5
+ // the same package. The user only ever types `feral ...`; Rust/Bun/sidecar/
6
+ // gateway are internal.
7
+ //
8
+ // Distribution model (esbuild/swc-style): the platform binaries do NOT ship in
9
+ // this package. They live in per-platform packages — `feral-agent-<os>-<arch>`
10
+ // — declared as optionalDependencies. npm installs only the one whose `os`/`cpu`
11
+ // matches the host and skips the rest, so a mac user never downloads the Windows
12
+ // binary. This shim resolves whichever one got installed.
13
+ //
14
+ // ESM (package.json has "type": "module").
15
+ import { spawnSync } from "node:child_process";
16
+ import { createRequire } from "node:module";
17
+ import { join, dirname } from "node:path";
18
+ import { existsSync, readFileSync } from "node:fs";
19
+ import { fileURLToPath } from "node:url";
20
+
21
+ const here = dirname(fileURLToPath(import.meta.url));
22
+ const require = createRequire(import.meta.url);
23
+ const ext = process.platform === "win32" ? ".exe" : "";
24
+
25
+ // 1. Production: the matching per-platform package (an optionalDependency).
26
+ const platformPkg = `@bloommedia/feral-agent-${process.platform}-${process.arch}`;
27
+ let exe = null;
28
+ try {
29
+ exe = require.resolve(`${platformPkg}/feral-cli${ext}`);
30
+ } catch {
31
+ /* package not installed for this platform — fall through to the dev path */
32
+ }
33
+
34
+ // 2. Dev / manual build: binaries staged in ./vendor next to this shim
35
+ // (what `node scripts/package-win.mjs` produces for a local Windows build).
36
+ if (!exe || !existsSync(exe)) {
37
+ const local = join(here, "..", "vendor", `feral-cli${ext}`);
38
+ if (existsSync(local)) exe = local;
39
+ }
40
+
41
+ if (!exe || !existsSync(exe)) {
42
+ process.stderr.write(
43
+ `Feral could not find its runtime for ${process.platform}-${process.arch}.\n` +
44
+ `The matching package \`${platformPkg}\` may have failed to install ` +
45
+ "(a blocked optional dependency, an unsupported platform, or " +
46
+ "`--ignore-optional`).\n" +
47
+ "Reinstall with: npm install -g feral-agent\n" +
48
+ "Report: https://github.com/bloom500/feral/issues\n",
49
+ );
50
+ process.exit(1);
51
+ }
52
+
53
+ // Report a single coherent version: the npm package version is the source of
54
+ // truth. The Rust `version` command prefers FERAL_VERSION when set.
55
+ let version = "";
56
+ try {
57
+ const pkg = JSON.parse(readFileSync(join(here, "..", "package.json"), "utf8"));
58
+ version = pkg.version || "";
59
+ } catch {
60
+ /* keep empty — Rust falls back to its compiled version */
61
+ }
62
+
63
+ const res = spawnSync(exe, process.argv.slice(2), {
64
+ stdio: "inherit",
65
+ env: version ? { ...process.env, FERAL_VERSION: version } : process.env,
66
+ });
67
+
68
+ if (res.error) {
69
+ process.stderr.write(`Feral failed to launch: ${res.error.message}\n`);
70
+ process.exit(1);
71
+ }
72
+ process.exit(res.status == null ? 1 : res.status);
@@ -1,20 +1,34 @@
1
1
  {
2
- "//": "Feral Brain Stack config — S5 example. Drop this into ~/.feral/brain.json",
3
- "primary": {
4
- "provider": "openai_compatible",
5
- "model": "qwen2.5:7b",
6
- "baseUrl": "http://127.0.0.1:11435"
7
- },
8
- "fallback": {
9
- "provider": "openai_compatible",
10
- "model": "claude-sonnet-4-20250514",
11
- "baseUrl": "https://api.anthropic.com/v1",
12
- "apiKey": "${ANTHROPIC_API_KEY}"
13
- },
14
- "capabilities": {
15
- "vision": false,
16
- "offline": true,
17
- "coding": true,
18
- "reasoning": false
19
- }
2
+ "//": "Feral Brain Stack config — drop into ~/.feral/brain.json (or $FERAL_HOME/brain.json). Loaded by loadBrainConfig(). `feral setup` writes this shape for you.",
3
+ "enabled": true,
4
+ "//mode": "budget = prefer cheap/local, balanced = capability weighted by cost, quality = best capability wins",
5
+ "mode": "balanced",
6
+ "//offlineModelId": "forced primary when no cloud is reachable (classifier category 'offline')",
7
+ "offlineModelId": "local",
8
+ "//registry": "every model Brain Stack may route to. capabilities are 0..10 per skill; cost 1=local/cheap 2=mid 3=premium.",
9
+ "registry": [
10
+ {
11
+ "id": "local",
12
+ "target": {
13
+ "provider": "openai_compatible",
14
+ "model": "qwen2.5:7b",
15
+ "baseUrl": "http://127.0.0.1:11435"
16
+ },
17
+ "capabilities": { "reasoning": 5, "coding": 6, "vision": 0, "speed": 8, "multilingual": 5 },
18
+ "cost": 1,
19
+ "local": true
20
+ },
21
+ {
22
+ "id": "cloud",
23
+ "target": {
24
+ "provider": "anthropic",
25
+ "model": "claude-sonnet-4-20250514",
26
+ "baseUrl": "https://api.anthropic.com/v1",
27
+ "apiKey": "sk-ant-..."
28
+ },
29
+ "capabilities": { "reasoning": 9, "coding": 9, "vision": 7, "speed": 6, "multilingual": 8 },
30
+ "cost": 3,
31
+ "local": false
32
+ }
33
+ ]
20
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "feral-agent",
3
- "version": "2026.6.31",
3
+ "version": "2026.7.19",
4
4
  "description": "Feral Agent — proactive, portable AI agent with a native security sandbox",
5
5
  "type": "module",
6
6
  "module": "src/index.ts",
@@ -9,12 +9,10 @@
9
9
  },
10
10
  "files": [
11
11
  "bin",
12
- "src",
13
- "dist/feral-agent.js",
14
12
  "brain.example.json",
15
13
  "README.md"
16
14
  ],
17
- "license": "MIT",
15
+ "license": "BUSL-1.1",
18
16
  "author": "Bloom Media",
19
17
  "homepage": "https://github.com/bloom500/feral#readalme",
20
18
  "repository": {
@@ -34,7 +32,7 @@
34
32
  "llm"
35
33
  ],
36
34
  "engines": {
37
- "bun": ">=1.0.0"
35
+ "node": ">=18"
38
36
  },
39
37
  "publishConfig": {
40
38
  "access": "public"
@@ -44,24 +42,26 @@
44
42
  "dev": "bun --watch run src/index.ts",
45
43
  "typecheck": "bunx tsc --noEmit",
46
44
  "build": "bun build src/index.ts --compile --outfile dist/feral-agent",
47
- "build:js": "bun build src/index.ts --target=bun --outfile dist/feral-agent.js"
45
+ "build:js": "bun build src/index.ts --target=bun --outfile dist/feral-agent.js",
46
+ "package:win": "node scripts/package-win.mjs"
48
47
  },
49
- "devDependencies": {
50
- "@types/bun": "latest",
51
- "@types/qrcode-terminal": "^0.12.2",
52
- "typescript": "^5.6.0"
53
- },
54
- "peerDependencies": {
55
- "typescript": "^5.6.0"
48
+ "optionalDependencies": {
49
+ "@bloommedia/feral-agent-win32-x64": "2026.7.19",
50
+ "@bloommedia/feral-agent-darwin-arm64": "2026.7.19",
51
+ "@bloommedia/feral-agent-darwin-x64": "2026.7.19",
52
+ "@bloommedia/feral-agent-linux-x64": "2026.7.19"
56
53
  },
57
- "dependencies": {
54
+ "devDependencies": {
58
55
  "@slack/socket-mode": "^2.0.7",
59
56
  "@slack/web-api": "^7.17.0",
60
57
  "@whiskeysockets/baileys": "^7.0.0-rc13",
58
+ "@types/bun": "latest",
59
+ "@types/qrcode-terminal": "^0.12.2",
61
60
  "cron-parser": "^5.5.0",
62
61
  "discord.js": "^14.26.4",
63
62
  "gpt-tokenizer": "^3.4.0",
64
- "qrcode-terminal": "^0.12.0"
63
+ "qrcode-terminal": "^0.12.0",
64
+ "typescript": "^5.6.0"
65
65
  },
66
66
  "overrides": {
67
67
  "undici": ">=6.27.0"