@broberg/lens-daemon 0.1.13 → 0.1.14
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/package.json +3 -3
- package/src/critic-vision.ts +2 -1
- package/src/validate-vision.ts +2 -1
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@broberg/lens-daemon",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.14",
|
|
4
4
|
"description": "The Lens module of the cardmem daemon (flows, critic, coverage, capture sessions, the /lens/* routes and the cardmem-lens MCP) as a package. The daemon mounts createLensRouter(deps) + createLensMcpRouter(deps). Bun runtime.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@broberg/ai-sdk": "0.
|
|
8
|
+
"@broberg/ai-sdk": "0.63.0",
|
|
9
9
|
"@modelcontextprotocol/sdk": "^1.0.4",
|
|
10
10
|
"@mozilla/readability": "^0.6.0",
|
|
11
11
|
"hono": "^4.6.14",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"turndown": "^7.2.4",
|
|
17
17
|
"zod": "^3.23.8",
|
|
18
18
|
"@broberg/lens-svg": "0.1.0",
|
|
19
|
-
"@broberg/lens-engine": "0.13.
|
|
19
|
+
"@broberg/lens-engine": "0.13.1"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@happy-dom/global-registrator": "^20.10.6",
|
package/src/critic-vision.ts
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
// when projects.settings_json.composition_critic.vision === true (F126.3). This
|
|
11
11
|
// module makes a call ONLY when asked; it never runs itself.
|
|
12
12
|
|
|
13
|
+
import { AI_AGENT_NAME } from '@broberg/lens-engine';
|
|
13
14
|
import type { CriticSeverity } from './critic-dom.ts';
|
|
14
15
|
|
|
15
16
|
export interface VisionFinding {
|
|
@@ -126,7 +127,7 @@ function getDaemonAi() {
|
|
|
126
127
|
if (process.env.OPENROUTER_API_KEY) providers.openrouter = sdk.openrouterAdapter({ apiKey: process.env.OPENROUTER_API_KEY });
|
|
127
128
|
if (Object.keys(providers).length === 0) return null;
|
|
128
129
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
129
|
-
return sdk.createAI({ providers: providers as any }) as any;
|
|
130
|
+
return sdk.createAI({ providers: providers as any, agentName: AI_AGENT_NAME }) as any;
|
|
130
131
|
} catch {
|
|
131
132
|
return null;
|
|
132
133
|
}
|
package/src/validate-vision.ts
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
// MISTRAL_API_KEY auto-loaded from .env:
|
|
12
12
|
// bun run apps/agent/src/lens/validate-vision.ts
|
|
13
13
|
|
|
14
|
+
import { AI_AGENT_NAME } from '@broberg/lens-engine';
|
|
14
15
|
import { withPage } from './browser.ts';
|
|
15
16
|
|
|
16
17
|
const FIXTURES = [
|
|
@@ -58,7 +59,7 @@ const sdk = await import('@broberg/ai-sdk');
|
|
|
58
59
|
const providers: Record<string, unknown> = {};
|
|
59
60
|
if (process.env.MISTRAL_API_KEY) providers.mistral = sdk.mistralAdapter({ apiKey: process.env.MISTRAL_API_KEY });
|
|
60
61
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
61
|
-
const ai = sdk.createAI({ providers: providers as any }) as any;
|
|
62
|
+
const ai = sdk.createAI({ providers: providers as any, agentName: AI_AGENT_NAME }) as any;
|
|
62
63
|
|
|
63
64
|
for (const fx of FIXTURES) {
|
|
64
65
|
const url = 'data:text/html;charset=utf-8,' + encodeURIComponent(fx.html);
|