@spinabot/brigade 1.19.4 → 1.20.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 (67) hide show
  1. package/convex/config.d.ts +2 -2
  2. package/convex/schema.d.ts +4 -4
  3. package/dist/agents/agent-loop.d.ts.map +1 -1
  4. package/dist/agents/agent-loop.js +54 -20
  5. package/dist/agents/agent-loop.js.map +1 -1
  6. package/dist/agents/content-quality-retry.d.ts.map +1 -1
  7. package/dist/agents/content-quality-retry.js +3 -22
  8. package/dist/agents/content-quality-retry.js.map +1 -1
  9. package/dist/agents/error-classifier.d.ts.map +1 -1
  10. package/dist/agents/error-classifier.js +2 -0
  11. package/dist/agents/error-classifier.js.map +1 -1
  12. package/dist/agents/memory/extract.d.ts.map +1 -1
  13. package/dist/agents/memory/extract.js +9 -44
  14. package/dist/agents/memory/extract.js.map +1 -1
  15. package/dist/agents/model-resolution.d.ts.map +1 -1
  16. package/dist/agents/model-resolution.js +9 -3
  17. package/dist/agents/model-resolution.js.map +1 -1
  18. package/dist/agents/ollama-native/ollama-json.d.ts +6 -0
  19. package/dist/agents/ollama-native/ollama-json.d.ts.map +1 -0
  20. package/dist/agents/ollama-native/ollama-json.js +126 -0
  21. package/dist/agents/ollama-native/ollama-json.js.map +1 -0
  22. package/dist/agents/ollama-native/register.d.ts +12 -0
  23. package/dist/agents/ollama-native/register.d.ts.map +1 -0
  24. package/dist/agents/ollama-native/register.js +37 -0
  25. package/dist/agents/ollama-native/register.js.map +1 -0
  26. package/dist/agents/ollama-native/stream.d.ts +59 -0
  27. package/dist/agents/ollama-native/stream.d.ts.map +1 -0
  28. package/dist/agents/ollama-native/stream.js +532 -0
  29. package/dist/agents/ollama-native/stream.js.map +1 -0
  30. package/dist/agents/payload-mutators.d.ts +0 -21
  31. package/dist/agents/payload-mutators.d.ts.map +1 -1
  32. package/dist/agents/payload-mutators.js +0 -58
  33. package/dist/agents/payload-mutators.js.map +1 -1
  34. package/dist/agents/thinking-fallback.d.ts.map +1 -1
  35. package/dist/agents/thinking-fallback.js +32 -10
  36. package/dist/agents/thinking-fallback.js.map +1 -1
  37. package/dist/buildstamp.json +1 -1
  38. package/dist/cli/commands/connect.d.ts.map +1 -1
  39. package/dist/cli/commands/connect.js +31 -43
  40. package/dist/cli/commands/connect.js.map +1 -1
  41. package/dist/cli/commands/update.d.ts +0 -6
  42. package/dist/cli/commands/update.d.ts.map +1 -1
  43. package/dist/cli/commands/update.js +9 -124
  44. package/dist/cli/commands/update.js.map +1 -1
  45. package/dist/cli/program/build-program.d.ts.map +1 -1
  46. package/dist/cli/program/build-program.js +1 -5
  47. package/dist/cli/program/build-program.js.map +1 -1
  48. package/dist/core/server.js +5 -24
  49. package/dist/core/server.js.map +1 -1
  50. package/dist/integrations/ollama.d.ts +29 -36
  51. package/dist/integrations/ollama.d.ts.map +1 -1
  52. package/dist/integrations/ollama.js +213 -78
  53. package/dist/integrations/ollama.js.map +1 -1
  54. package/dist/providers/catalog.js +1 -1
  55. package/dist/providers/validate-key.js +1 -1
  56. package/dist/system-prompt/guidance.d.ts.map +1 -1
  57. package/dist/system-prompt/guidance.js +2 -9
  58. package/dist/system-prompt/guidance.js.map +1 -1
  59. package/package.json +5 -2
  60. package/dist/agents/tool-name-repair.d.ts +0 -28
  61. package/dist/agents/tool-name-repair.d.ts.map +0 -1
  62. package/dist/agents/tool-name-repair.js +0 -168
  63. package/dist/agents/tool-name-repair.js.map +0 -1
  64. package/dist/shared/reasoning-tags.d.ts +0 -14
  65. package/dist/shared/reasoning-tags.d.ts.map +0 -1
  66. package/dist/shared/reasoning-tags.js +0 -71
  67. package/dist/shared/reasoning-tags.js.map +0 -1
@@ -9,12 +9,9 @@
9
9
  * via the `~/.brigade/models.json` mechanism Pi exposes for custom providers.
10
10
  * Each model the user has pulled becomes a Pi `Model<"openai-completions">`.
11
11
  *
12
- * Capability detection is AUTHORITATIVE where possible: Ollama's POST /api/show
13
- * returns a `capabilities` array (e.g. ["completion","tools","thinking","vision"])
14
- * that tells us directly whether a model REASONS, supports TOOLS, and accepts
15
- * IMAGES. We read that first and only fall back to name-pattern guessing when the
16
- * probe is unavailable (older daemon / offline). Context window still isn't
17
- * reported, so that stays a safe default.
12
+ * Capability inference is best-effort Ollama doesn't tell us a model's
13
+ * context window or whether it reasons. We pattern-match the model name
14
+ * against well-known families and fall back to safe defaults.
18
15
  */
19
16
  export interface OllamaModelSummary {
20
17
  id: string;
@@ -41,30 +38,17 @@ export interface InferredCapabilities {
41
38
  input: ("text" | "image")[];
42
39
  }
43
40
  export declare function inferOllamaModelCapabilities(modelId: string): InferredCapabilities;
44
- /** What `/api/show` tells us about a model — all best-effort / nullable. */
45
- export interface OllamaModelInfo {
46
- /** Lower-cased capability tags, or null when the probe failed. */
47
- capabilities: string[] | null;
48
- /** The model's real max context window (tokens), or null when unknown. */
49
- contextLength: number | null;
50
- }
51
- /**
52
- * AUTHORITATIVE model probe — POST /api/show for one model and return its
53
- * capabilities (`"thinking"`/`"tools"`/`"vision"`) AND its real context window.
54
- * This is the source of truth — far better than guessing from the model name.
55
- * Best-effort: any failure (older Ollama, daemon down, timeout) yields nulls so
56
- * callers fall back to `inferOllamaModelCapabilities`.
57
- */
58
- export declare function fetchOllamaModelInfo(modelId: string, baseUrl?: string): Promise<OllamaModelInfo>;
59
- /** Back-compat helper — capability tags only. Prefer `fetchOllamaModelInfo`. */
60
- export declare function fetchOllamaCapabilities(modelId: string, baseUrl?: string): Promise<string[] | null>;
61
41
  /**
62
- * Write Brigade's Ollama provider entry into Pi's `~/.brigade/models.json`.
63
- * Pi's `ModelRegistry.refresh()` picks this up and exposes the models as
64
- * regular Pi models from then on.
42
+ * Write Brigade's Ollama provider entry into Pi's `~/.brigade/models.json` as a
43
+ * NATIVE provider — `api:"ollama"` (dispatched to our /api/chat transport) with
44
+ * the base URL (no `/v1`). Pi's `ModelRegistry.refresh()` picks this up and
45
+ * exposes the models as regular Pi models from then on.
65
46
  *
66
- * We MERGE rather than overwrite the user (or other providers) may have
67
- * existing entries in the file we shouldn't clobber.
47
+ * Other providers' entries in the file are left untouched (we only rewrite the
48
+ * `ollama` key). Within the `ollama` entry, discovery OWNS the model list +
49
+ * capabilities (they're re-derived every run), but an operator-set real apiKey
50
+ * and custom headers are PRESERVED across the rewrite — only the keyless sentinel
51
+ * is replaced.
68
52
  */
69
53
  export declare function writeOllamaToModelsJson(modelsJsonPath: string, baseUrl: string, models: OllamaModelSummary[]): Promise<void>;
70
54
  /**
@@ -74,14 +58,23 @@ export declare function writeOllamaToModelsJson(modelsJsonPath: string, baseUrl:
74
58
  *
75
59
  * Called when the model registry MISSES an `ollama/<model>` id: the user has
76
60
  * almost certainly `ollama pull`ed a model since onboarding. We re-query the
77
- * local daemon, merge the full catalog into models.json (capability inference
78
- * + zero cost + the OpenAI-compatible provider routing), and report whether the
79
- * requested model now exists. Best-effort: never throws — on any failure
80
- * (daemon down, no models) it returns `false` and the caller surfaces the
81
- * normal "not registered" guidance.
61
+ * local daemon, merge the full catalog into models.json (native `api:"ollama"`
62
+ * routing + capability inference + zero cost), and return the CANONICAL catalog
63
+ * id of the requested model (or `null` if it isn't installed). Best-effort:
64
+ * never throws — on any failure (daemon down, no models) it returns `null` and
65
+ * the caller surfaces the normal "not registered" guidance.
82
66
  *
83
- * The caller is responsible for `modelRegistry.refresh()` + re-`find()` after
84
- * this resolves true, so Pi picks up the freshly-written entries.
67
+ * The caller is responsible for `modelRegistry.refresh()` + re-`find()` with the
68
+ * returned canonical id after this resolves non-null, so Pi picks up the
69
+ * freshly-written entries.
70
+ */
71
+ export declare function rediscoverOllamaModel(modelsJsonPath: string, modelId: string, baseUrl?: string): Promise<string | null>;
72
+ /**
73
+ * One-time migration: rewrite a pre-existing OpenAI-compat Ollama provider entry
74
+ * (`api:"openai-completions"` + a `/v1` base URL) to the native shape
75
+ * (`api:"ollama"`, base URL without `/v1`). Idempotent + best-effort — existing
76
+ * users would otherwise stay silently on the degraded `/v1` path (no reliable
77
+ * native tool_calls) until they re-onboarded. Returns true when it rewrote.
85
78
  */
86
- export declare function rediscoverOllamaModel(modelsJsonPath: string, modelId: string, baseUrl?: string): Promise<boolean>;
79
+ export declare function migrateOllamaProviderToNative(modelsJsonPath: string): Promise<boolean>;
87
80
  //# sourceMappingURL=ollama.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ollama.d.ts","sourceRoot":"","sources":["../../src/integrations/ollama.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAwBH,MAAM,WAAW,kBAAkB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;GAGG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,GAAE,MAAyB,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAqC5G;AAED;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACpC,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,CAAC,MAAM,GAAG,OAAO,CAAC,EAAE,CAAC;CAC5B;AAED,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,MAAM,GAAG,oBAAoB,CAiDlF;AAWD,4EAA4E;AAC5E,MAAM,WAAW,eAAe;IAC/B,kEAAkE;IAClE,YAAY,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAC9B,0EAA0E;IAC1E,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAcD;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CACzC,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,MAAyB,GAChC,OAAO,CAAC,eAAe,CAAC,CAsB1B;AAED,gFAAgF;AAChF,wBAAsB,uBAAuB,CAC5C,OAAO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AC,IAAI,CAAC,CAqFf;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,qBAAqB,CAC1C,cAAc,EAAE,MAAM,EACtB,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,MAAyB,GAChC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAkCxB;AAED;;;;;;GAMG;AACH,wBAAsB,6BAA6B,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAiC5F"}
@@ -9,24 +9,58 @@
9
9
  * via the `~/.brigade/models.json` mechanism Pi exposes for custom providers.
10
10
  * Each model the user has pulled becomes a Pi `Model<"openai-completions">`.
11
11
  *
12
- * Capability detection is AUTHORITATIVE where possible: Ollama's POST /api/show
13
- * returns a `capabilities` array (e.g. ["completion","tools","thinking","vision"])
14
- * that tells us directly whether a model REASONS, supports TOOLS, and accepts
15
- * IMAGES. We read that first and only fall back to name-pattern guessing when the
16
- * probe is unavailable (older daemon / offline). Context window still isn't
17
- * reported, so that stays a safe default.
12
+ * Capability inference is best-effort Ollama doesn't tell us a model's
13
+ * context window or whether it reasons. We pattern-match the model name
14
+ * against well-known families and fall back to safe defaults.
18
15
  */
19
16
  import * as fs from "node:fs/promises";
20
17
  import path from "node:path";
21
18
  import { tryGetRuntimeContext } from "../storage/runtime-context.js";
22
- const DEFAULT_BASE_URL = "http://localhost:11434";
19
+ import { classifyUrlForSsrf } from "../infra/net/fetch-guard.js";
20
+ // 127.0.0.1, not "localhost": on IPv6-preferring hosts "localhost" resolves to
21
+ // ::1 while Ollama binds IPv4 → ECONNREFUSED. Use the explicit v4 loopback.
22
+ const DEFAULT_BASE_URL = "http://127.0.0.1:11434";
23
23
  const TIMEOUT_MS = 5000;
24
+ // Placeholder apiKeys Brigade writes for keyless local Ollama. Treated as "no
25
+ // real credential" so a re-discovery rewrite doesn't mistake a sentinel for an
26
+ // operator-set key worth preserving. Kept in sync with the stream transport's set.
27
+ const OLLAMA_SENTINEL_API_KEYS = new Set([
28
+ "ollama-local-no-auth-required",
29
+ "ollama-local",
30
+ "ollama",
31
+ ]);
32
+ // Cap simultaneous /api/show probes so a box with many pulled models doesn't
33
+ // fire dozens of concurrent requests (which stalls onboarding/rediscovery).
34
+ const SHOW_PROBE_CONCURRENCY = 8;
35
+ /** Map over items with a bounded worker pool (results keyed by input index). */
36
+ async function mapWithConcurrency(items, limit, fn) {
37
+ const results = new Array(items.length);
38
+ let next = 0;
39
+ const worker = async () => {
40
+ while (next < items.length) {
41
+ const idx = next++;
42
+ results[idx] = await fn(items[idx]);
43
+ }
44
+ };
45
+ await Promise.all(Array.from({ length: Math.min(Math.max(1, limit), items.length || 1) }, worker));
46
+ return results;
47
+ }
24
48
  /**
25
49
  * Hit Ollama's `/api/tags` and return the user's locally-installed models.
26
50
  * Throws a friendly error if the server isn't running or returns no models.
27
51
  */
28
52
  export async function discoverOllamaModels(baseUrl = DEFAULT_BASE_URL) {
29
- const url = `${baseUrl.replace(/\/$/, "")}/api/tags`;
53
+ // Strip a trailing `/v1` (someone may pass the OpenAI-compat endpoint) + any
54
+ // trailing slashes, matching fetchOllamaModelInfo + writeOllamaToModelsJson —
55
+ // `/api/tags` is a native path, so `.../v1/api/tags` would 404.
56
+ const url = `${baseUrl.replace(/\/+$/, "").replace(/\/v1$/i, "")}/api/tags`;
57
+ // SSRF guard on the config-driven base URL. allowPrivateNetwork lets local /
58
+ // LAN Ollama through; only genuinely dangerous targets (cloud-metadata /
59
+ // link-local) are refused — no real Ollama listens there.
60
+ const ssrfReason = await classifyUrlForSsrf(url, { allowPrivateNetwork: true });
61
+ if (ssrfReason) {
62
+ throw new Error(`That Ollama server address isn't allowed (${ssrfReason}). Point it at your local or network Ollama.`);
63
+ }
30
64
  const controller = new AbortController();
31
65
  const timer = setTimeout(() => controller.abort(), TIMEOUT_MS);
32
66
  let response;
@@ -73,14 +107,29 @@ export function inferOllamaModelCapabilities(modelId) {
73
107
  // - `qwen3.5*` — base chat, not the reasoning fork
74
108
  // Originally `^qwen3\b` matched all of these and triggered the bug.
75
109
  //
76
- // Reasoning patterns that ARE safe to mark:
77
- // - `deepseek-r1*` — explicit r1 (reasoning) line
78
- // - `qwq*` — Qwen with Questions (reasoning fork)
79
- // - `*-thinking*` — explicit thinking variant naming convention
80
- // - `o1*` / `o3*` OpenAI o-series via Ollama (rare)
110
+ // Reasoning patterns that ARE safe to mark (dedicated reasoning models — they
111
+ // return STRUCTURED tool_calls + native `thinking` even with thinking on, so
112
+ // no prose-narration risk; anchored so they can't catch a tool-caller sibling):
113
+ // - `deepseek-r1*` — explicit r1 (reasoning) line
114
+ // - `qwq*` Qwen with Questions (reasoning fork)
115
+ // - `*-thinking*` — explicit thinking variant naming convention
116
+ // - `gpt-oss*` — OpenAI open-weight reasoning (harmony format)
117
+ // - `magistral*` — Mistral's reasoning model (`^magistral` ≠ `mistral*`)
118
+ // - `phi4*-reasoning*` — Phi-4 reasoning variants (bare `phi4` stays non-reasoning)
119
+ // - `exaone-deep*` — LG EXAONE Deep reasoning line (`exaone3.5` excluded)
120
+ // - `smallthinker*` — SmallThinker ("thinker" ≠ "thinking", so anchored)
121
+ // - `o1*` / `o3*` — OpenAI o-series via Ollama (rare)
122
+ // Deliberately EXCLUDED (hybrid think/non-think, default non-reasoning, strong
123
+ // tool-callers): `qwen3`, `cogito`, `deepseek-v3.1` — forcing thinking on risks
124
+ // the prose-narration bug with no automatic net. Opt in via /thinking instead.
81
125
  const reasoning = /^deepseek-r1\b/.test(id) ||
82
126
  /^qwq\b/.test(id) ||
83
127
  /-thinking\b/.test(id) ||
128
+ /^gpt-oss\b/.test(id) ||
129
+ /^magistral\b/.test(id) ||
130
+ /^phi4(?:-mini)?-reasoning\b/.test(id) ||
131
+ /^exaone-deep\b/.test(id) ||
132
+ /^smallthinker\b/.test(id) ||
84
133
  /\bo1\b/.test(id) ||
85
134
  /\bo3\b/.test(id);
86
135
  // Vision-capable families — text+image input.
@@ -101,62 +150,68 @@ export function inferOllamaModelCapabilities(modelId) {
101
150
  const input = vision ? ["text", "image"] : ["text"];
102
151
  return { reasoning, contextWindow, maxTokens, input };
103
152
  }
104
- /** Pull `<arch>.context_length` out of `/api/show`'s `model_info` (the key is
105
- * architecture-prefixed, e.g. `qwen3.context_length`). */
106
- function extractContextLength(modelInfo) {
107
- if (!modelInfo || typeof modelInfo !== "object")
108
- return null;
109
- for (const [k, v] of Object.entries(modelInfo)) {
110
- if (k.endsWith(".context_length") && typeof v === "number" && Number.isFinite(v) && v > 0) {
111
- return Math.floor(v);
112
- }
113
- }
114
- return null;
115
- }
116
153
  /**
117
- * AUTHORITATIVE model probe POST /api/show for one model and return its
118
- * capabilities (`"thinking"`/`"tools"`/`"vision"`) AND its real context window.
119
- * This is the source of truth far better than guessing from the model name.
120
- * Best-effort: any failure (older Ollama, daemon down, timeout) yields nulls so
121
- * callers fall back to `inferOllamaModelCapabilities`.
154
+ * Best-effort per-model probe of Ollama's `/api/show`. Returns whether the model
155
+ * accepts images (`vision` capability) and its real trained context window
156
+ * (`<arch>.context_length`). Any failure yields nulls so the caller falls back
157
+ * to the name-heuristic. NOTE: we deliberately do NOT derive `reasoning` from
158
+ * the `thinking` capability — defaulting local models to thinking-on turns them
159
+ * into narrators that emit tool intent as prose instead of structured calls, so
160
+ * reasoning stays name-heuristic (thinking off by default; opt in via /thinking).
122
161
  */
123
- export async function fetchOllamaModelInfo(modelId, baseUrl = DEFAULT_BASE_URL) {
124
- const url = `${baseUrl.replace(/\/$/, "")}/api/show`;
162
+ async function fetchOllamaModelInfo(modelId, baseUrl = DEFAULT_BASE_URL) {
163
+ const url = `${baseUrl.replace(/\/+$/, "").replace(/\/v1$/i, "")}/api/show`;
164
+ // SSRF guard (same config-driven base URL as the turn traffic). Best-effort
165
+ // probe: on a blocked target, fall back to the name-heuristic rather than throw.
166
+ if (await classifyUrlForSsrf(url, { allowPrivateNetwork: true })) {
167
+ return { vision: null, contextLength: null };
168
+ }
125
169
  const controller = new AbortController();
126
170
  const timer = setTimeout(() => controller.abort(), TIMEOUT_MS);
127
171
  try {
128
172
  const res = await fetch(url, {
129
173
  method: "POST",
130
174
  headers: { "Content-Type": "application/json" },
131
- body: JSON.stringify({ model: modelId }),
175
+ // Send both keys — modern Ollama reads `model`; older builds read `name`.
176
+ body: JSON.stringify({ model: modelId, name: modelId }),
132
177
  signal: controller.signal,
133
178
  });
134
179
  if (!res.ok)
135
- return { capabilities: null, contextLength: null };
180
+ return { vision: null, contextLength: null };
136
181
  const body = (await res.json());
137
- const capabilities = Array.isArray(body.capabilities)
182
+ const caps = Array.isArray(body.capabilities)
138
183
  ? body.capabilities.map((c) => String(c).toLowerCase())
139
184
  : null;
140
- return { capabilities, contextLength: extractContextLength(body.model_info) };
185
+ const vision = caps ? caps.includes("vision") : null;
186
+ let contextLength = null;
187
+ if (body.model_info && typeof body.model_info === "object") {
188
+ for (const [k, v] of Object.entries(body.model_info)) {
189
+ if (k.endsWith(".context_length") && typeof v === "number" && Number.isFinite(v) && v > 0) {
190
+ contextLength = Math.floor(v);
191
+ break;
192
+ }
193
+ }
194
+ }
195
+ return { vision, contextLength };
141
196
  }
142
197
  catch {
143
- return { capabilities: null, contextLength: null };
198
+ return { vision: null, contextLength: null };
144
199
  }
145
200
  finally {
146
201
  clearTimeout(timer);
147
202
  }
148
203
  }
149
- /** Back-compat helper — capability tags only. Prefer `fetchOllamaModelInfo`. */
150
- export async function fetchOllamaCapabilities(modelId, baseUrl = DEFAULT_BASE_URL) {
151
- return (await fetchOllamaModelInfo(modelId, baseUrl)).capabilities;
152
- }
153
204
  /**
154
- * Write Brigade's Ollama provider entry into Pi's `~/.brigade/models.json`.
155
- * Pi's `ModelRegistry.refresh()` picks this up and exposes the models as
156
- * regular Pi models from then on.
205
+ * Write Brigade's Ollama provider entry into Pi's `~/.brigade/models.json` as a
206
+ * NATIVE provider — `api:"ollama"` (dispatched to our /api/chat transport) with
207
+ * the base URL (no `/v1`). Pi's `ModelRegistry.refresh()` picks this up and
208
+ * exposes the models as regular Pi models from then on.
157
209
  *
158
- * We MERGE rather than overwrite the user (or other providers) may have
159
- * existing entries in the file we shouldn't clobber.
210
+ * Other providers' entries in the file are left untouched (we only rewrite the
211
+ * `ollama` key). Within the `ollama` entry, discovery OWNS the model list +
212
+ * capabilities (they're re-derived every run), but an operator-set real apiKey
213
+ * and custom headers are PRESERVED across the rewrite — only the keyless sentinel
214
+ * is replaced.
160
215
  */
161
216
  export async function writeOllamaToModelsJson(modelsJsonPath, baseUrl, models) {
162
217
  let existing = { providers: {} };
@@ -169,36 +224,51 @@ export async function writeOllamaToModelsJson(modelsJsonPath, baseUrl, models) {
169
224
  catch {
170
225
  // File missing or unparseable — start fresh. Pi treats an absent file as no config.
171
226
  }
172
- // Prefer Ollama's own /api/show `capabilities` (authoritative for reasoning /
173
- // tools / vision); fall back to the name heuristic only when the probe fails.
174
- // Probes run in parallel, so total added latency is ~one request, not N.
175
- const modelDefs = await Promise.all(models.map(async (m) => {
176
- const guess = inferOllamaModelCapabilities(m.id);
227
+ // Native transport: base URL WITHOUT /v1 (Brigade registers api:"ollama" /api/chat).
228
+ const nativeBaseUrl = baseUrl.replace(/\/+$/, "").replace(/\/v1$/i, "");
229
+ // Probe /api/show for real vision + context (bounded concurrency, best-effort);
230
+ // fall back to the name-heuristic when unreachable. Reasoning stays name-heuristic.
231
+ const modelDefs = await mapWithConcurrency(models, SHOW_PROBE_CONCURRENCY, async (m) => {
232
+ const caps = inferOllamaModelCapabilities(m.id);
177
233
  const info = await fetchOllamaModelInfo(m.id, baseUrl);
178
- const caps = info.capabilities;
179
- const reasoning = caps ? caps.includes("thinking") : guess.reasoning;
180
- const vision = caps ? caps.includes("vision") : guess.input.includes("image");
234
+ const vision = info.vision ?? caps.input.includes("image");
181
235
  const input = vision ? ["text", "image"] : ["text"];
182
- // Prefer the model's REAL context window from /api/show; the name-based
183
- // guess (32k) is only a fallback. This value also drives the runtime
184
- // num_ctx we inject, so an accurate number prevents silent truncation.
185
- const contextWindow = info.contextLength ?? guess.contextWindow;
236
+ const contextWindow = info.contextLength ?? caps.contextWindow;
186
237
  return {
187
238
  id: m.id,
188
239
  name: m.name + (m.parameterSize ? ` (${m.parameterSize})` : ""),
189
- reasoning,
240
+ reasoning: caps.reasoning,
190
241
  input,
191
242
  contextWindow,
192
- maxTokens: guess.maxTokens,
243
+ maxTokens: caps.maxTokens,
193
244
  cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, // local = free
245
+ // Per-model baseUrl (belt-and-suspenders): the native stream reads
246
+ // model.baseUrl, so carry it on each model in case Pi's registry doesn't
247
+ // propagate the provider baseUrl onto registry-loaded models.
248
+ baseUrl: nativeBaseUrl,
194
249
  };
195
- }));
250
+ });
251
+ // Preserve operator-set auth across a re-discovery rewrite: a remote/authed
252
+ // Ollama proxy may carry a REAL apiKey and/or custom headers under this entry.
253
+ // Discovery owns the model LIST, but must not silently wipe credentials — only
254
+ // fall back to the sentinel when no real key was set.
255
+ const prevOllama = existing.providers["ollama"];
256
+ const prevApiKey = typeof prevOllama?.apiKey === "string" && !OLLAMA_SENTINEL_API_KEYS.has(prevOllama.apiKey)
257
+ ? prevOllama.apiKey
258
+ : undefined;
259
+ const prevHeaders = prevOllama?.headers && typeof prevOllama.headers === "object" && !Array.isArray(prevOllama.headers)
260
+ ? prevOllama.headers
261
+ : undefined;
196
262
  existing.providers["ollama"] = {
197
- baseUrl: `${baseUrl.replace(/\/$/, "")}/v1`,
198
- api: "openai-completions",
199
- // Ollama ignores the API key but Pi requires apiKey to be set when defining
200
- // custom models for non-built-in providers. Use a sentinel value.
201
- apiKey: "ollama-local-no-auth-required",
263
+ // Native transport: base URL WITHOUT /v1; Brigade registers api:"ollama"
264
+ // (→ /api/chat) so tool-calls + thinking come back structured.
265
+ baseUrl: nativeBaseUrl,
266
+ api: "ollama",
267
+ // Ollama (local) ignores the API key, but Pi requires apiKey to be set when
268
+ // defining custom models for a non-built-in provider. Preserve a real
269
+ // operator key if one was set; otherwise use a sentinel value.
270
+ apiKey: prevApiKey ?? "ollama-local-no-auth-required",
271
+ ...(prevHeaders ? { headers: prevHeaders } : {}),
202
272
  models: modelDefs,
203
273
  };
204
274
  // In convex mode resolveModelsPath routes to the OS cache dir, which may
@@ -228,14 +298,15 @@ export async function writeOllamaToModelsJson(modelsJsonPath, baseUrl, models) {
228
298
  *
229
299
  * Called when the model registry MISSES an `ollama/<model>` id: the user has
230
300
  * almost certainly `ollama pull`ed a model since onboarding. We re-query the
231
- * local daemon, merge the full catalog into models.json (capability inference
232
- * + zero cost + the OpenAI-compatible provider routing), and report whether the
233
- * requested model now exists. Best-effort: never throws — on any failure
234
- * (daemon down, no models) it returns `false` and the caller surfaces the
235
- * normal "not registered" guidance.
301
+ * local daemon, merge the full catalog into models.json (native `api:"ollama"`
302
+ * routing + capability inference + zero cost), and return the CANONICAL catalog
303
+ * id of the requested model (or `null` if it isn't installed). Best-effort:
304
+ * never throws — on any failure (daemon down, no models) it returns `null` and
305
+ * the caller surfaces the normal "not registered" guidance.
236
306
  *
237
- * The caller is responsible for `modelRegistry.refresh()` + re-`find()` after
238
- * this resolves true, so Pi picks up the freshly-written entries.
307
+ * The caller is responsible for `modelRegistry.refresh()` + re-`find()` with the
308
+ * returned canonical id after this resolves non-null, so Pi picks up the
309
+ * freshly-written entries.
239
310
  */
240
311
  export async function rediscoverOllamaModel(modelsJsonPath, modelId, baseUrl = DEFAULT_BASE_URL) {
241
312
  let discovered;
@@ -245,13 +316,77 @@ export async function rediscoverOllamaModel(modelsJsonPath, modelId, baseUrl = D
245
316
  catch {
246
317
  // Daemon unreachable / no models — let the caller surface the standard
247
318
  // guidance (run `ollama pull`, check the daemon is up).
248
- return false;
319
+ return null;
249
320
  }
250
321
  if (discovered.length === 0)
322
+ return null;
323
+ // Honor the "never throws" contract: writeOllamaToModelsJson can throw on an fs
324
+ // error (EACCES/ENOSPC/read-only cache dir). Swallow it → null so the caller
325
+ // surfaces the standard "not registered" guidance instead of an opaque reject.
326
+ try {
327
+ await writeOllamaToModelsJson(modelsJsonPath, baseUrl, discovered);
328
+ }
329
+ catch {
330
+ return null;
331
+ }
332
+ // Return the CANONICAL catalog id that matched, so the caller re-finds the
333
+ // EXACT id Pi registered (Pi's find is an exact id match — NOT tolerant). We
334
+ // match on id OR name, tolerating a leading `ollama/` provider prefix AND a
335
+ // missing `:latest` tag: a composed ref (`ollama/llama3.2`) or a tag-less id
336
+ // (`qwen3` when only `qwen3:latest` is installed) must resolve to the real
337
+ // catalog id, else it's a hard "model not registered" (Ollama has no synth
338
+ // fallback) EVEN THOUGH the model is pulled + in the catalog.
339
+ const wanted = modelId.trim().replace(/^ollama\//i, "");
340
+ const match = discovered.find((m) => m.id === wanted ||
341
+ m.name === wanted ||
342
+ m.id === `${wanted}:latest` ||
343
+ m.name === `${wanted}:latest`);
344
+ return match ? match.id : null;
345
+ }
346
+ /**
347
+ * One-time migration: rewrite a pre-existing OpenAI-compat Ollama provider entry
348
+ * (`api:"openai-completions"` + a `/v1` base URL) to the native shape
349
+ * (`api:"ollama"`, base URL without `/v1`). Idempotent + best-effort — existing
350
+ * users would otherwise stay silently on the degraded `/v1` path (no reliable
351
+ * native tool_calls) until they re-onboarded. Returns true when it rewrote.
352
+ */
353
+ export async function migrateOllamaProviderToNative(modelsJsonPath) {
354
+ let parsed;
355
+ try {
356
+ parsed = JSON.parse(await fs.readFile(modelsJsonPath, "utf8"));
357
+ }
358
+ catch {
359
+ return false; // no/invalid file → nothing to migrate
360
+ }
361
+ const entry = parsed.providers?.ollama;
362
+ if (!entry)
363
+ return false;
364
+ const baseUrl = typeof entry.baseUrl === "string" ? entry.baseUrl : "";
365
+ const needsMigration = entry.api !== "ollama" || /\/v1\/?$/i.test(baseUrl);
366
+ if (!needsMigration)
251
367
  return false;
252
- await writeOllamaToModelsJson(modelsJsonPath, baseUrl, discovered);
253
- // Match on id OR name — `/api/tags` reports both, and the user may have
254
- // typed either form when picking the model.
255
- return discovered.some((m) => m.id === modelId || m.name === modelId);
368
+ entry.api = "ollama";
369
+ if (baseUrl)
370
+ entry.baseUrl = baseUrl.replace(/\/+$/, "").replace(/\/v1$/i, "");
371
+ try {
372
+ await fs.writeFile(modelsJsonPath, JSON.stringify(parsed, null, 2), "utf8");
373
+ }
374
+ catch {
375
+ return false;
376
+ }
377
+ // Convex mode: the file above is the regenerable OS-cache mirror; the DURABLE
378
+ // copy is the sealed "models" blob. Push the migrated catalog there too, or the
379
+ // migration fixes only the cache and the next boot re-materialises the stale
380
+ // blob (openai-completions/v1) — migration would silently re-run forever and
381
+ // never persist. Mirrors writeOllamaToModelsJson's blob push.
382
+ const rctx = tryGetRuntimeContext();
383
+ if (rctx?.mode === "convex") {
384
+ await rctx.store.auth
385
+ .writeAuthFileBlob("main", "models", parsed)
386
+ .catch((err) => {
387
+ console.error(`brigade: models catalog migrate→convex failed — ${err.message}`);
388
+ });
389
+ }
390
+ return true;
256
391
  }
257
392
  //# sourceMappingURL=ollama.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ollama.js","sourceRoot":"","sources":["../../src/integrations/ollama.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE,MAAM,gBAAgB,GAAG,wBAAwB,CAAC;AAClD,MAAM,UAAU,GAAG,IAAI,CAAC;AAwBxB;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,UAAkB,gBAAgB;IAC5E,MAAM,GAAG,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,WAAW,CAAC;IACrD,MAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAC;IACzC,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,EAAE,UAAU,CAAC,CAAC;IAE/D,IAAI,QAAk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173,7 +173,7 @@ export const PROVIDERS = [
173
173
  envVar: "", // no env key
174
174
  noAuth: true,
175
175
  local: true,
176
- baseUrl: "http://localhost:11434",
176
+ baseUrl: "http://127.0.0.1:11434",
177
177
  },
178
178
  {
179
179
  id: "custom",
@@ -32,7 +32,7 @@ function buildRequest(providerId, apiKey) {
32
32
  case "ollama":
33
33
  // Ollama runs locally; `/api/tags` is auth-free and lists installed models.
34
34
  return {
35
- url: "http://localhost:11434/api/tags",
35
+ url: "http://127.0.0.1:11434/api/tags",
36
36
  init: { method: "GET" },
37
37
  };
38
38
  case "anthropic": {
@@ -1 +1 @@
1
- {"version":3,"file":"guidance.d.ts","sourceRoot":"","sources":["../../src/system-prompt/guidance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAIH;;;;;;;;;GASG;AACH,eAAO,MAAM,yBAAyB,kVAI0K,CAAC;AAEjN;;;;;;;;;;;;;GAaG;AACH,wBAAgB,wBAAwB,CACvC,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,aAAa,EAAE,MAAM,GAAG,SAAS,GAC/B,OAAO,CAYT;AAID;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,uBAAuB,+bAM4E,CAAC;AAIjH;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,sBAAsB,u7EAU4I,CAAC;AAIhL;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,6pDAU0D,CAAC;AAIvF;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,quDAY4G,CAAC;AAIzI;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,kBAAkB,qyJA+CmK,CAAC;AAInM;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,cAAc,+nDAQiU,CAAC;AAI7V;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB,wnGAUsP,CAAC;AAIrR;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mBAAmB,kxNA6CoF,CAAC;AAIrH;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,2BAA2B,+/BAS4E,CAAC;AAIrH;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CA2BlF"}
1
+ {"version":3,"file":"guidance.d.ts","sourceRoot":"","sources":["../../src/system-prompt/guidance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAIH;;;;;;;;;GASG;AACH,eAAO,MAAM,yBAAyB,kVAI0K,CAAC;AAEjN;;;;;;;;;;;;;GAaG;AACH,wBAAgB,wBAAwB,CACvC,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,aAAa,EAAE,MAAM,GAAG,SAAS,GAC/B,OAAO,CAYT;AAID;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,uBAAuB,+bAM4E,CAAC;AAIjH;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,sBAAsB,u7EAU4I,CAAC;AAIhL;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,6pDAU0D,CAAC;AAIvF;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,quDAY4G,CAAC;AAIzI;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,kBAAkB,qyJA+CmK,CAAC;AAInM;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,cAAc,+nDAQiU,CAAC;AAI7V;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB,wnGAUsP,CAAC;AAIrR;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mBAAmB,kxNA6CoF,CAAC;AAIrH;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,2BAA2B,+/BAS4E,CAAC;AAIrH;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAuBlF"}
@@ -386,16 +386,9 @@ export function pickModelFamilyGuidance(modelId) {
386
386
  // Anthropic family — already follows the patterns the system prompt teaches.
387
387
  if (/(?:^|\/)claude(?:\d|[-_.:]|$)/.test(id))
388
388
  return null;
389
- // Unknown / niche — every OTHER model (local Ollama forks: ornith, llama,
390
- // qwen, deepseek, mistral, phi, …) previously fell through to NO override and
391
- // happily answered "I'm Claude" / "I'm Ornith, powered by OpenAI and
392
- // Anthropic". Give them the generic identity anchor so the base model's
393
- // training identity never leaks.
394
- return GENERIC_IDENTITY_GUIDANCE;
389
+ // Unknown / niche — fall through to no extra guidance.
390
+ return null;
395
391
  }
396
- const GENERIC_IDENTITY_GUIDANCE = `# Identity override
397
-
398
- You are the assistant defined by the persona files above — you run inside Brigade. The underlying language model is only the engine; it is NOT your identity. When asked who or what you are, answer from the persona files. Never identify as the base model or its vendor — never say you are "Claude", "GPT", "ChatGPT", "Gemini", "Gemma", "Llama", "Qwen", "DeepSeek", "Ornith", "an OpenAI / Anthropic / Google model", "an open-source coding assistant", or "a large language model". If the persona files don't specify a name, call yourself Brigade.`;
399
392
  const OPENAI_FAMILY_GUIDANCE = `# Identity override (OpenAI family)
400
393
 
401
394
  Your baseline training tells you to identify as "ChatGPT", "GPT", "an AI assistant from OpenAI", "your coding assistant", "an AI coding assistant", or to identify with the project in your working directory. None of that applies here. When asked who you are, draw your identity from the persona files above — never say "I am ChatGPT" / "I'm GPT" / "I'm an AI coding assistant" / "I'm here to help you with this codebase".
@@ -1 +1 @@
1
- {"version":3,"file":"guidance.js","sourceRoot":"","sources":["../../src/system-prompt/guidance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,oFAAoF;AAEpF;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG;;;;gNAIuK,CAAC;AAEjN;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,wBAAwB,CACvC,OAA2B,EAC3B,aAAiC;IAEjC,IAAI,CAAC,aAAa,IAAI,aAAa,KAAK,KAAK;QAAE,OAAO,KAAK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IAAI,+BAA+B,CAAC,IAAI,CAAC,EAAE,CAAC;QAAE,OAAO,IAAI,CAAC;IAC1D,uDAAuD;IACvD,OAAO,IAAI,CAAC;AACb,CAAC;AAED,MAAM,sBAAsB,GAAG;;;;0RAI2P,CAAC;AAE3R,MAAM,sBAAsB,GAAG;;;;uTAIwR,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spinabot/brigade",
3
- "version": "1.19.4",
3
+ "version": "1.20.0",
4
4
  "description": "Brigade — your personal AI crew",
5
5
  "homepage": "https://brigade.spinabot.com",
6
6
  "author": "Spinabot <hello@brigade-agent.ai>",
@@ -248,7 +248,10 @@
248
248
  },
249
249
  "exceljs": {
250
250
  "uuid": "^11.1.1"
251
- }
251
+ },
252
+ "@earendil-works/pi-ai": "0.79.9",
253
+ "@earendil-works/pi-agent-core": "0.79.9",
254
+ "@earendil-works/pi-tui": "0.79.9"
252
255
  },
253
256
  "keywords": [
254
257
  "ai",