@broberg/lens-daemon 0.1.68 → 0.1.72

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 (2) hide show
  1. package/package.json +3 -3
  2. package/src/flow.ts +11 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@broberg/lens-daemon",
3
- "version": "0.1.68",
3
+ "version": "0.1.72",
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",
@@ -15,9 +15,9 @@
15
15
  "sharp": "^0.35.5",
16
16
  "turndown": "^7.2.4",
17
17
  "zod": "^3.23.8",
18
- "@broberg/lens-measure": "0.1.2",
18
+ "@broberg/lens-engine": "0.14.1",
19
19
  "@broberg/lens-svg": "0.1.1",
20
- "@broberg/lens-engine": "0.14.1"
20
+ "@broberg/lens-measure": "0.1.4"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@happy-dom/global-registrator": "^20.10.6",
package/src/flow.ts CHANGED
@@ -1347,6 +1347,15 @@ export const MANUSCRIPT_VERBS = [
1347
1347
  'waitForPopup', 'waitForPopupClose', 'approve',
1348
1348
  ] as const;
1349
1349
 
1350
+ // F011.7 — `fill [x] mads` (no «=») used to fill the empty string and pass; the
1351
+ // flow then failed a step later on an assert that read as an app bug (fysio.work).
1352
+ // `fill [x] =` stays legal: an explicit empty value is a choice, a missing one a typo.
1353
+ function valueAfterEquals(s: string, verb: 'fill' | 'select'): string {
1354
+ const rest = s.replace(/^[^\]]*\]/, '');
1355
+ if (!rest.includes('=')) throw new Error(`${verb} step "${s}" needs "= value" (e.g. "${verb} [x] = mads"); without it the value would be empty.`);
1356
+ return rest.split('=').slice(1).join('=').trim();
1357
+ }
1358
+
1350
1359
  function parseManuscriptStep(s: string): FlowStep {
1351
1360
  const testid = () => {
1352
1361
  const m = s.match(/\[([^\]]+)\]/);
@@ -1401,12 +1410,10 @@ function parseManuscriptStep(s: string): FlowStep {
1401
1410
  const kind = from[1]!.toLowerCase();
1402
1411
  return { type: 'fill', testid: testid(), valueFrom: kind === 'file' ? { path: src } : kind === 'env' ? { env: src } : { vault: src } };
1403
1412
  }
1404
- const v = s.split('=').slice(1).join('=').trim();
1405
- return { type: 'fill', testid: testid(), value: v };
1413
+ return { type: 'fill', testid: testid(), value: valueAfterEquals(s, 'fill') };
1406
1414
  }
1407
1415
  case 'select': {
1408
- const v = s.split('=').slice(1).join('=').trim();
1409
- return { type: 'select', testid: testid(), value: v };
1416
+ return { type: 'select', testid: testid(), value: valueAfterEquals(s, 'select') };
1410
1417
  }
1411
1418
  case 'clear': return { type: 'clear', testid: testid() };
1412
1419
  case 'press': {