@mcoda/agents 0.1.9 → 0.1.11

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.
@@ -1 +1 @@
1
- {"version":3,"file":"OllamaRemoteAdapter.d.ts","sourceRoot":"","sources":["../../../src/adapters/ollama/OllamaRemoteAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAStG,qBAAa,mBAAoB,YAAW,YAAY;IAM1C,OAAO,CAAC,MAAM;IAL1B,OAAO,CAAC,OAAO,CAAqB;IACpC,OAAO,CAAC,OAAO,CAAqC;IACpD,OAAO,CAAC,SAAS,CAAsB;IACvC,OAAO,CAAC,QAAQ,CAAyB;gBAErB,MAAM,EAAE,aAAa,GAAG;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAAC,SAAS,CAAC,EAAE,OAAO,CAAA;KAAE;IAWvH,OAAO,CAAC,YAAY;IASd,eAAe,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAIpC,WAAW,IAAI,OAAO,CAAC,WAAW,CAAC;IA+BzC,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,WAAW;IAQnB,OAAO,CAAC,cAAc;IAShB,MAAM,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAmC5D,YAAY,CAAC,OAAO,EAAE,iBAAiB,GAAG,cAAc,CAAC,gBAAgB,EAAE,IAAI,EAAE,OAAO,CAAC;CA4EjG"}
1
+ {"version":3,"file":"OllamaRemoteAdapter.d.ts","sourceRoot":"","sources":["../../../src/adapters/ollama/OllamaRemoteAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAStG,qBAAa,mBAAoB,YAAW,YAAY;IAM1C,OAAO,CAAC,MAAM;IAL1B,OAAO,CAAC,OAAO,CAAqB;IACpC,OAAO,CAAC,OAAO,CAAqC;IACpD,OAAO,CAAC,SAAS,CAAsB;IACvC,OAAO,CAAC,QAAQ,CAAyB;gBAErB,MAAM,EAAE,aAAa,GAAG;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAAC,SAAS,CAAC,EAAE,OAAO,CAAA;KAAE;IAWvH,OAAO,CAAC,YAAY;IASd,eAAe,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAIpC,WAAW,IAAI,OAAO,CAAC,WAAW,CAAC;IA+BzC,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,WAAW;IAQnB,OAAO,CAAC,cAAc;IAShB,MAAM,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAsC5D,YAAY,CAAC,OAAO,EAAE,iBAAiB,GAAG,cAAc,CAAC,gBAAgB,EAAE,IAAI,EAAE,OAAO,CAAC;CA+EjG"}
@@ -96,6 +96,9 @@ export class OllamaRemoteAdapter {
96
96
  const resp = await fetch(`${url}/api/generate`, init);
97
97
  if (!resp.ok) {
98
98
  const text = await resp.text().catch(() => "");
99
+ if (resp.status === 404 && /model.*not found/i.test(text)) {
100
+ throw new Error(`MODEL_NOT_FOUND: model=${model} baseUrl=${url} ${text}`.trim());
101
+ }
99
102
  throw new Error(`Ollama generate failed (${resp.status}): ${text}`);
100
103
  }
101
104
  const data = await resp.json().catch(() => ({}));
@@ -130,6 +133,9 @@ export class OllamaRemoteAdapter {
130
133
  const resp = await fetch(`${url}/api/generate`, init);
131
134
  if (!resp.ok || !resp.body) {
132
135
  const text = !resp.ok ? await resp.text().catch(() => "") : "";
136
+ if (resp.status === 404 && /model.*not found/i.test(text)) {
137
+ throw new Error(`MODEL_NOT_FOUND: model=${model} baseUrl=${url} ${text}`.trim());
138
+ }
133
139
  throw new Error(`Ollama generate (stream) failed (${resp.status}): ${text}`);
134
140
  }
135
141
  const reader = resp.body.getReader();
package/dist/index.d.ts CHANGED
@@ -6,6 +6,8 @@ export * from "./adapters/codex/CodexAdapter.js";
6
6
  export * from "./adapters/gemini/GeminiAdapter.js";
7
7
  export * from "./adapters/local/LocalAdapter.js";
8
8
  export * from "./adapters/ollama/OllamaCliAdapter.js";
9
+ export * from "./adapters/codali/CodaliAdapter.js";
10
+ export { cliHealthy } from "./adapters/codali/CodaliCliRunner.js";
9
11
  export * from "./adapters/ollama/OllamaRemoteAdapter.js";
10
12
  export * from "./adapters/zhipu/ZhipuApiAdapter.js";
11
13
  export * from "./adapters/qa/QaAdapter.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oCAAoC,CAAC;AACnD,cAAc,uCAAuC,CAAC;AACtD,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AACjD,cAAc,uCAAuC,CAAC;AACtD,cAAc,0CAA0C,CAAC;AACzD,cAAc,qCAAqC,CAAC;AACpD,cAAc,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oCAAoC,CAAC;AACnD,cAAc,uCAAuC,CAAC;AACtD,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AACjD,cAAc,uCAAuC,CAAC;AACtD,cAAc,oCAAoC,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAClE,cAAc,0CAA0C,CAAC;AACzD,cAAc,qCAAqC,CAAC;AACpD,cAAc,4BAA4B,CAAC"}
package/dist/index.js CHANGED
@@ -6,6 +6,8 @@ export * from "./adapters/codex/CodexAdapter.js";
6
6
  export * from "./adapters/gemini/GeminiAdapter.js";
7
7
  export * from "./adapters/local/LocalAdapter.js";
8
8
  export * from "./adapters/ollama/OllamaCliAdapter.js";
9
+ export * from "./adapters/codali/CodaliAdapter.js";
10
+ export { cliHealthy } from "./adapters/codali/CodaliCliRunner.js";
9
11
  export * from "./adapters/ollama/OllamaRemoteAdapter.js";
10
12
  export * from "./adapters/zhipu/ZhipuApiAdapter.js";
11
13
  export * from "./adapters/qa/QaAdapter.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcoda/agents",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "description": "Agent registry and capabilities for mcoda.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -30,8 +30,8 @@
30
30
  "access": "public"
31
31
  },
32
32
  "dependencies": {
33
- "@mcoda/shared": "0.1.9",
34
- "@mcoda/db": "0.1.9"
33
+ "@mcoda/shared": "0.1.11",
34
+ "@mcoda/db": "0.1.11"
35
35
  },
36
36
  "scripts": {
37
37
  "build": "tsc -p tsconfig.json",