@lapis-notes/api 0.1.3 → 0.2.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 (199) hide show
  1. package/CHANGELOG.md +304 -13
  2. package/README.md +19 -0
  3. package/dist/__tests__/fixtures/indexed-mutations.json +6862 -0
  4. package/dist/__tests__/fixtures/memory-storage.json +309 -0
  5. package/dist/__tests__/fixtures/native-facade-contract.json +3224 -0
  6. package/dist/__tests__/fixtures/projection-query.json +195 -0
  7. package/dist/__tests__/fixtures/projection-values.json +60 -0
  8. package/dist/__tests__/fixtures/search-preparation.json +1513 -0
  9. package/dist/__tests__/fixtures/search-retrieval.json +15409 -0
  10. package/dist/__tests__/fixtures/search-semantic-model.json +3691 -0
  11. package/dist/__tests__/fixtures/search-semantic-retrieval.json +6603 -0
  12. package/dist/__tests__/fixtures/search-storage.json +409 -0
  13. package/dist/__tests__/fixtures/task-projection.json +428 -0
  14. package/dist/__tests__/indexed-mutation-support.js +262 -0
  15. package/dist/__tests__/projection-query-support.js +40 -0
  16. package/dist/__tests__/search-retrieval-support.js +47 -0
  17. package/dist/app-database-host.d.ts +1 -0
  18. package/dist/app-shell-plugin-persistence.d.ts +3 -2
  19. package/dist/app-shell-plugin-persistence.js +37 -3
  20. package/dist/cache.svelte.d.ts +8 -1
  21. package/dist/cache.svelte.js +103 -5
  22. package/dist/command.svelte.js +29 -2
  23. package/dist/components/editor/editor.css +4 -0
  24. package/dist/components/editor/editor.svelte +24 -11
  25. package/dist/components/editor/embedded-editor-surface.js +3 -1
  26. package/dist/components/editor/inline-title-alignment.d.ts +3 -0
  27. package/dist/components/editor/inline-title-alignment.js +57 -0
  28. package/dist/configuration.svelte.d.ts +270 -206
  29. package/dist/configuration.svelte.js +161 -86
  30. package/dist/context.svelte.d.ts +23 -3
  31. package/dist/context.svelte.js +68 -30
  32. package/dist/diagnostics.d.ts +8 -0
  33. package/dist/diagnostics.js +6 -0
  34. package/dist/editor-save-context.d.ts +35 -0
  35. package/dist/editor-save-context.js +132 -0
  36. package/dist/editor-view-registry.d.ts +10 -0
  37. package/dist/editor-view-registry.js +44 -4
  38. package/dist/editor.svelte.d.ts +19 -1
  39. package/dist/editor.svelte.js +528 -55
  40. package/dist/embed-registry.d.ts +10 -0
  41. package/dist/embed-registry.js +15 -0
  42. package/dist/file-editing-failures.d.ts +2 -0
  43. package/dist/file-editing-failures.js +29 -0
  44. package/dist/file-editing-native-issues.d.ts +19 -0
  45. package/dist/file-editing-native-issues.js +65 -0
  46. package/dist/file-editing-sessions.d.ts +76 -0
  47. package/dist/file-editing-sessions.js +367 -0
  48. package/dist/file-manager.d.ts +9 -1
  49. package/dist/file-manager.js +45 -3
  50. package/dist/file-state-store.d.ts +5 -0
  51. package/dist/file-state-store.js +34 -0
  52. package/dist/file-text-conflicts.d.ts +25 -0
  53. package/dist/file-text-conflicts.js +35 -0
  54. package/dist/file-text-mutation.d.ts +13 -0
  55. package/dist/file-text-mutation.js +100 -0
  56. package/dist/file-text-persistence.d.ts +36 -0
  57. package/dist/file-text-persistence.js +234 -0
  58. package/dist/file-text-state-writer.d.ts +34 -0
  59. package/dist/file-text-state-writer.js +183 -0
  60. package/dist/files-configuration.d.ts +20 -0
  61. package/dist/files-configuration.js +47 -0
  62. package/dist/generated/plugin-host-modules.schema.generated.d.ts +114 -34
  63. package/dist/generated/plugin-host-modules.schema.generated.js +132 -34
  64. package/dist/glob.d.ts +3 -0
  65. package/dist/glob.js +2 -1
  66. package/dist/icons/changes.d.ts +3 -0
  67. package/dist/icons/changes.js +16 -0
  68. package/dist/icons/index.d.ts +5 -1
  69. package/dist/icons/index.js +44 -3
  70. package/dist/icons/registry.d.ts +35 -0
  71. package/dist/icons/registry.js +154 -0
  72. package/dist/icons/safe-svg.d.ts +2 -0
  73. package/dist/icons/safe-svg.js +44 -0
  74. package/dist/index.d.ts +6 -1
  75. package/dist/index.js +4 -1
  76. package/dist/lapis-extension.d.ts +6 -2
  77. package/dist/lapis-extension.js +2 -0
  78. package/dist/metadata-store.d.ts +23 -0
  79. package/dist/metadata-store.js +1 -0
  80. package/dist/metadata.svelte.js +45 -2
  81. package/dist/native-background-indexing.d.ts +48 -0
  82. package/dist/native-background-indexing.js +208 -0
  83. package/dist/native-database-protocol.d.ts +29 -0
  84. package/dist/native-database-protocol.js +1 -0
  85. package/dist/native-editing-intent-lease.d.ts +17 -0
  86. package/dist/native-editing-intent-lease.js +188 -0
  87. package/dist/native-editing-intents-protocol.d.ts +70 -0
  88. package/dist/native-editing-intents-protocol.js +1 -0
  89. package/dist/native-editing-intents.d.ts +8 -0
  90. package/dist/native-editing-intents.js +1 -0
  91. package/dist/native-editing-problems.d.ts +3 -0
  92. package/dist/native-editing-problems.js +180 -0
  93. package/dist/native-editing-recovery.d.ts +24 -0
  94. package/dist/native-editing-recovery.js +198 -0
  95. package/dist/native-editing-session.d.ts +51 -0
  96. package/dist/native-editing-session.js +251 -0
  97. package/dist/native-history-index-protocol.d.ts +80 -0
  98. package/dist/native-history-index-protocol.js +1 -0
  99. package/dist/native-history-index.d.ts +6 -0
  100. package/dist/native-history-index.js +1 -0
  101. package/dist/native-indexing-protocol.d.ts +63 -0
  102. package/dist/native-indexing-protocol.js +1 -0
  103. package/dist/native-participant-protocol.d.ts +67 -0
  104. package/dist/native-participant-protocol.js +3 -0
  105. package/dist/native-queue-protocol.d.ts +73 -0
  106. package/dist/native-queue-protocol.js +3 -0
  107. package/dist/native-tasks-protocol.d.ts +264 -0
  108. package/dist/native-tasks-protocol.js +1 -0
  109. package/dist/native-tasks.d.ts +35 -0
  110. package/dist/native-tasks.js +79 -0
  111. package/dist/native-turn-protocol.d.ts +81 -0
  112. package/dist/native-turn-protocol.js +1 -0
  113. package/dist/native-turns.d.ts +29 -0
  114. package/dist/native-turns.js +2 -0
  115. package/dist/plugin-asset-server.js +3 -2
  116. package/dist/plugin-dependency-resolver.d.ts +1 -1
  117. package/dist/plugin-distribution/compatibility.d.ts +1 -1
  118. package/dist/plugin-distribution/compatibility.js +10 -5
  119. package/dist/plugin-distribution/installed-plugin-state.js +2 -1
  120. package/dist/plugin-distribution/installer.d.ts +6 -0
  121. package/dist/plugin-distribution/installer.js +90 -37
  122. package/dist/plugin-distribution/manager.d.ts +4 -1
  123. package/dist/plugin-distribution/manager.js +12 -5
  124. package/dist/plugin-distribution/registry-cache.js +2 -1
  125. package/dist/plugin-distribution/registry-source-state.js +2 -1
  126. package/dist/plugin-distribution/schemas.d.ts +26 -8
  127. package/dist/plugin-distribution/schemas.js +2 -1
  128. package/dist/plugin-distribution/types.d.ts +4 -0
  129. package/dist/plugin-manager.d.ts +21 -5
  130. package/dist/plugin-manager.js +228 -64
  131. package/dist/plugin-runtime-entry.d.ts +1 -1
  132. package/dist/plugin-runtime-entry.js +16 -0
  133. package/dist/plugin.d.ts +19 -3
  134. package/dist/plugin.js +110 -44
  135. package/dist/registry-schema/catalog-v1.d.ts +60 -9
  136. package/dist/registry-schema/catalog-v1.js +2 -1
  137. package/dist/registry-schema/catalog-v2.d.ts +60 -9
  138. package/dist/registry-schema/catalog-v2.js +1 -1
  139. package/dist/search-result-provider.d.ts +95 -0
  140. package/dist/search-result-provider.js +42 -0
  141. package/dist/status-bar.svelte.d.ts +26 -20
  142. package/dist/status-bar.svelte.js +1 -0
  143. package/dist/storage/app-database.d.ts +9 -23
  144. package/dist/storage/app-database.js +41 -34
  145. package/dist/storage/desktop-native.d.ts +5 -3
  146. package/dist/storage/desktop-native.js +59 -6
  147. package/dist/storage/directory-watcher.d.ts +27 -0
  148. package/dist/storage/directory-watcher.js +201 -0
  149. package/dist/storage/fs.d.ts +14 -27
  150. package/dist/storage/fs.js +2 -168
  151. package/dist/storage/index-projection.js +33 -15
  152. package/dist/storage/memory-vault-adapter.d.ts +2 -0
  153. package/dist/storage/memory-vault-adapter.js +14 -1
  154. package/dist/storage/path.d.ts +6 -2
  155. package/dist/storage/path.js +8 -2
  156. package/dist/storage/projection-query-candidates.d.ts +3 -0
  157. package/dist/storage/projection-query-candidates.js +69 -0
  158. package/dist/storage/remote-app-database.d.ts +2 -2
  159. package/dist/storage/remote-app-database.js +1 -1
  160. package/dist/storage/runtime.d.ts +3 -0
  161. package/dist/storage/runtime.js +3 -0
  162. package/dist/storage/search-embedding-record.d.ts +3 -0
  163. package/dist/storage/search-embedding-record.js +18 -0
  164. package/dist/storage/turso-app-database.d.ts +2 -0
  165. package/dist/storage/turso-app-database.js +67 -30
  166. package/dist/storage/vault-listing.d.ts +3 -0
  167. package/dist/storage/vault-listing.js +36 -0
  168. package/dist/storage/vault-reconciliation.d.ts +19 -0
  169. package/dist/storage/vault-reconciliation.js +137 -0
  170. package/dist/storage/vault-session.d.ts +8 -0
  171. package/dist/storage/vault-session.js +10 -2
  172. package/dist/storage/vault.svelte.d.ts +53 -4
  173. package/dist/storage/vault.svelte.js +223 -87
  174. package/dist/sync-editor-flush.d.ts +6 -0
  175. package/dist/sync-editor-flush.js +22 -0
  176. package/dist/sync-host-local.d.ts +15 -0
  177. package/dist/sync-host-local.js +228 -0
  178. package/dist/sync-host-security.d.ts +24 -9
  179. package/dist/sync-host-security.js +47 -14
  180. package/dist/sync-host.d.ts +33 -4
  181. package/dist/sync-host.js +160 -10
  182. package/dist/sync-repository.d.ts +106 -0
  183. package/dist/sync-repository.js +18 -0
  184. package/dist/vault-change-views.d.ts +4 -0
  185. package/dist/vault-change-views.js +43 -0
  186. package/dist/vault-changes.d.ts +37 -0
  187. package/dist/vault-changes.js +228 -0
  188. package/dist/view.svelte.d.ts +182 -149
  189. package/dist/view.svelte.js +39 -21
  190. package/dist/workspace-close-guard.d.ts +3 -0
  191. package/dist/workspace-close-guard.js +35 -0
  192. package/dist/workspace-host-internal.js +10 -2
  193. package/dist/workspace-layout-normalizer.d.ts +4 -2
  194. package/dist/workspace-layout-normalizer.js +5 -5
  195. package/dist/workspace-view-document.d.ts +3 -0
  196. package/dist/workspace-view-document.js +12 -0
  197. package/dist/workspace.svelte.d.ts +13 -2
  198. package/dist/workspace.svelte.js +371 -82
  199. package/package.json +61 -8
@@ -0,0 +1,3224 @@
1
+ {
2
+ "cases": [
3
+ {
4
+ "name": "migrate",
5
+ "request": {
6
+ "method": "migrate",
7
+ "args": []
8
+ },
9
+ "expected": {
10
+ "kind": "undefined"
11
+ }
12
+ },
13
+ {
14
+ "name": "beginSearchIndexingBatch",
15
+ "request": {
16
+ "method": "beginSearchIndexingBatch",
17
+ "args": []
18
+ },
19
+ "expected": {
20
+ "kind": "undefined"
21
+ }
22
+ },
23
+ {
24
+ "name": "endSearchIndexingBatch",
25
+ "request": {
26
+ "method": "endSearchIndexingBatch",
27
+ "args": []
28
+ },
29
+ "expected": {
30
+ "kind": "undefined"
31
+ }
32
+ },
33
+ {
34
+ "name": "configureSearchEmbeddingProvider",
35
+ "request": {
36
+ "method": "configureSearchEmbeddingProvider",
37
+ "args": [
38
+ {
39
+ "kind": "value",
40
+ "value": null
41
+ }
42
+ ]
43
+ },
44
+ "expected": {
45
+ "kind": "undefined"
46
+ }
47
+ },
48
+ {
49
+ "name": "getSearchEmbeddingProvider",
50
+ "request": {
51
+ "method": "getSearchEmbeddingProvider",
52
+ "args": []
53
+ },
54
+ "expected": {
55
+ "kind": "value",
56
+ "value": null
57
+ }
58
+ },
59
+ {
60
+ "name": "getSearchEmbeddingRuntimeStatus",
61
+ "request": {
62
+ "method": "getSearchEmbeddingRuntimeStatus",
63
+ "args": []
64
+ },
65
+ "expected": {
66
+ "kind": "value",
67
+ "value": null
68
+ }
69
+ },
70
+ {
71
+ "name": "getSearchIndexStats",
72
+ "request": {
73
+ "method": "getSearchIndexStats",
74
+ "args": []
75
+ },
76
+ "expected": {
77
+ "kind": "value",
78
+ "value": {
79
+ "documentCount": 0,
80
+ "chunkCount": 0,
81
+ "readyChunkCount": 0,
82
+ "pendingChunkCount": 0,
83
+ "errorChunkCount": 0,
84
+ "lastError": null
85
+ }
86
+ }
87
+ },
88
+ {
89
+ "name": "getMeta",
90
+ "request": {
91
+ "method": "getMeta",
92
+ "args": [
93
+ {
94
+ "kind": "value",
95
+ "value": "calls:missing"
96
+ }
97
+ ]
98
+ },
99
+ "expected": {
100
+ "kind": "undefined"
101
+ }
102
+ },
103
+ {
104
+ "name": "setMeta",
105
+ "request": {
106
+ "method": "setMeta",
107
+ "args": [
108
+ {
109
+ "kind": "value",
110
+ "value": "calls:json"
111
+ },
112
+ {
113
+ "kind": "value",
114
+ "value": null
115
+ }
116
+ ]
117
+ },
118
+ "expected": {
119
+ "kind": "undefined"
120
+ }
121
+ },
122
+ {
123
+ "name": "getMeta explicit null",
124
+ "request": {
125
+ "method": "getMeta",
126
+ "args": [
127
+ {
128
+ "kind": "value",
129
+ "value": "calls:json"
130
+ }
131
+ ]
132
+ },
133
+ "expected": {
134
+ "kind": "value",
135
+ "value": null
136
+ }
137
+ },
138
+ {
139
+ "name": "setMeta undefined deletes",
140
+ "request": {
141
+ "method": "setMeta",
142
+ "args": [
143
+ {
144
+ "kind": "value",
145
+ "value": "calls:json"
146
+ },
147
+ {
148
+ "kind": "undefined"
149
+ }
150
+ ]
151
+ },
152
+ "expected": {
153
+ "kind": "undefined"
154
+ }
155
+ },
156
+ {
157
+ "name": "scanMeta",
158
+ "request": {
159
+ "method": "scanMeta",
160
+ "args": [
161
+ {
162
+ "kind": "value",
163
+ "value": {
164
+ "prefix": "calls:"
165
+ }
166
+ }
167
+ ]
168
+ },
169
+ "expected": {
170
+ "kind": "value",
171
+ "value": {
172
+ "entries": []
173
+ }
174
+ }
175
+ },
176
+ {
177
+ "name": "transactMeta",
178
+ "request": {
179
+ "method": "transactMeta",
180
+ "args": [
181
+ {
182
+ "kind": "value",
183
+ "value": {
184
+ "mutations": [
185
+ {
186
+ "key": "calls:json",
187
+ "value": {
188
+ "note": "日本語 🪨"
189
+ }
190
+ }
191
+ ]
192
+ }
193
+ }
194
+ ]
195
+ },
196
+ "expected": {
197
+ "kind": "value",
198
+ "value": {
199
+ "applied": true
200
+ }
201
+ }
202
+ },
203
+ {
204
+ "name": "transactMeta rejected check",
205
+ "request": {
206
+ "method": "transactMeta",
207
+ "args": [
208
+ {
209
+ "kind": "value",
210
+ "value": {
211
+ "checks": [
212
+ {
213
+ "key": "calls:missing",
214
+ "exists": true
215
+ }
216
+ ],
217
+ "mutations": [
218
+ {
219
+ "key": "calls:must-not-write",
220
+ "value": true
221
+ }
222
+ ]
223
+ }
224
+ }
225
+ ]
226
+ },
227
+ "expected": {
228
+ "kind": "value",
229
+ "value": {
230
+ "applied": false
231
+ }
232
+ }
233
+ },
234
+ {
235
+ "name": "getMeta after rejected transaction",
236
+ "request": {
237
+ "method": "getMeta",
238
+ "args": [
239
+ {
240
+ "kind": "value",
241
+ "value": "calls:must-not-write"
242
+ }
243
+ ]
244
+ },
245
+ "expected": {
246
+ "kind": "undefined"
247
+ }
248
+ },
249
+ {
250
+ "name": "getNotebookState",
251
+ "request": {
252
+ "method": "getNotebookState",
253
+ "args": [
254
+ {
255
+ "kind": "value",
256
+ "value": "Notebook.md"
257
+ }
258
+ ]
259
+ },
260
+ "expected": {
261
+ "kind": "undefined"
262
+ }
263
+ },
264
+ {
265
+ "name": "setNotebookState",
266
+ "request": {
267
+ "method": "setNotebookState",
268
+ "args": [
269
+ {
270
+ "kind": "value",
271
+ "value": "Notebook.md"
272
+ },
273
+ {
274
+ "kind": "value",
275
+ "value": {
276
+ "sourcePath": "Notebook.md",
277
+ "mtime": 1,
278
+ "updatedAt": 2,
279
+ "cells": {}
280
+ }
281
+ }
282
+ ]
283
+ },
284
+ "expected": {
285
+ "kind": "undefined"
286
+ }
287
+ },
288
+ {
289
+ "name": "getNotebookState saved",
290
+ "request": {
291
+ "method": "getNotebookState",
292
+ "args": [
293
+ {
294
+ "kind": "value",
295
+ "value": "Notebook.md"
296
+ }
297
+ ]
298
+ },
299
+ "expected": {
300
+ "kind": "value",
301
+ "value": {
302
+ "sourcePath": "Notebook.md",
303
+ "mtime": 1,
304
+ "updatedAt": 2,
305
+ "cells": {}
306
+ }
307
+ }
308
+ },
309
+ {
310
+ "name": "deleteNotebookState",
311
+ "request": {
312
+ "method": "deleteNotebookState",
313
+ "args": [
314
+ {
315
+ "kind": "value",
316
+ "value": "Notebook.md"
317
+ }
318
+ ]
319
+ },
320
+ "expected": {
321
+ "kind": "undefined"
322
+ }
323
+ },
324
+ {
325
+ "name": "loadMetadataSnapshot",
326
+ "request": {
327
+ "method": "loadMetadataSnapshot",
328
+ "args": []
329
+ },
330
+ "expected": {
331
+ "kind": "value",
332
+ "value": null
333
+ }
334
+ },
335
+ {
336
+ "name": "saveMetadataSnapshot",
337
+ "request": {
338
+ "method": "saveMetadataSnapshot",
339
+ "args": [
340
+ {
341
+ "kind": "value",
342
+ "value": {
343
+ "fileCache": {},
344
+ "metadataCache": {},
345
+ "resolvedLinks": {},
346
+ "unresolvedLinks": {}
347
+ }
348
+ }
349
+ ]
350
+ },
351
+ "expected": {
352
+ "kind": "undefined"
353
+ }
354
+ },
355
+ {
356
+ "name": "getFileHistory",
357
+ "request": {
358
+ "method": "getFileHistory",
359
+ "args": [
360
+ {
361
+ "kind": "value",
362
+ "value": "History.md"
363
+ }
364
+ ]
365
+ },
366
+ "expected": {
367
+ "kind": "value",
368
+ "value": null
369
+ }
370
+ },
371
+ {
372
+ "name": "storeFileHistoryRevision",
373
+ "request": {
374
+ "method": "storeFileHistoryRevision",
375
+ "args": [
376
+ {
377
+ "kind": "value",
378
+ "value": {
379
+ "path": "History.md",
380
+ "eventType": "create",
381
+ "createdAt": 100,
382
+ "content": "# Native call history"
383
+ }
384
+ }
385
+ ]
386
+ },
387
+ "expected": {
388
+ "kind": "value",
389
+ "value": {
390
+ "fileId": "<generated-file>",
391
+ "stored": true,
392
+ "deduplicated": false,
393
+ "revision": {
394
+ "revisionId": "<generated-revision>",
395
+ "fileId": "<generated-file>",
396
+ "currentPath": "History.md",
397
+ "capturedPath": "History.md",
398
+ "eventType": "create",
399
+ "createdAt": 100,
400
+ "contentHash": "11b7515b",
401
+ "content": "# Native call history"
402
+ }
403
+ }
404
+ }
405
+ },
406
+ {
407
+ "name": "upsertNotification",
408
+ "request": {
409
+ "method": "upsertNotification",
410
+ "args": [
411
+ {
412
+ "kind": "value",
413
+ "value": {
414
+ "id": "n",
415
+ "message": "Native call notice",
416
+ "severity": "info",
417
+ "createdAt": 10,
418
+ "updatedAt": 20,
419
+ "read": false,
420
+ "cleared": false
421
+ }
422
+ }
423
+ ]
424
+ },
425
+ "expected": {
426
+ "kind": "undefined"
427
+ }
428
+ },
429
+ {
430
+ "name": "listNotifications",
431
+ "request": {
432
+ "method": "listNotifications",
433
+ "args": []
434
+ },
435
+ "expected": {
436
+ "kind": "value",
437
+ "value": [
438
+ {
439
+ "id": "n",
440
+ "message": "Native call notice",
441
+ "severity": "info",
442
+ "createdAt": 10,
443
+ "updatedAt": 20,
444
+ "read": false,
445
+ "cleared": false
446
+ }
447
+ ]
448
+ }
449
+ },
450
+ {
451
+ "name": "markNotificationRead",
452
+ "request": {
453
+ "method": "markNotificationRead",
454
+ "args": [
455
+ {
456
+ "kind": "value",
457
+ "value": "n"
458
+ }
459
+ ]
460
+ },
461
+ "expected": {
462
+ "kind": "undefined"
463
+ }
464
+ },
465
+ {
466
+ "name": "clearNotification",
467
+ "request": {
468
+ "method": "clearNotification",
469
+ "args": [
470
+ {
471
+ "kind": "value",
472
+ "value": "n"
473
+ }
474
+ ]
475
+ },
476
+ "expected": {
477
+ "kind": "undefined"
478
+ }
479
+ },
480
+ {
481
+ "name": "clearAllNotifications",
482
+ "request": {
483
+ "method": "clearAllNotifications",
484
+ "args": []
485
+ },
486
+ "expected": {
487
+ "kind": "undefined"
488
+ }
489
+ },
490
+ {
491
+ "name": "getMemorySourceState",
492
+ "request": {
493
+ "method": "getMemorySourceState",
494
+ "args": [
495
+ {
496
+ "kind": "value",
497
+ "value": "conversation-1"
498
+ }
499
+ ]
500
+ },
501
+ "expected": {
502
+ "kind": "undefined"
503
+ }
504
+ },
505
+ {
506
+ "name": "upsertMemorySourceState",
507
+ "request": {
508
+ "method": "upsertMemorySourceState",
509
+ "args": [
510
+ {
511
+ "kind": "value",
512
+ "value": {
513
+ "sourceKey": "conversation-1",
514
+ "sourcePath": ".lapis/agents/sessions/conversation-1/transcript.jsonl",
515
+ "sourceHash": "sha256:source",
516
+ "lastEntryId": "entry-1",
517
+ "lastEntryHash": "sha256:entry",
518
+ "status": "ready",
519
+ "indexedAt": 100
520
+ }
521
+ }
522
+ ]
523
+ },
524
+ "expected": {
525
+ "kind": "undefined"
526
+ }
527
+ },
528
+ {
529
+ "name": "listMemorySourceStates",
530
+ "request": {
531
+ "method": "listMemorySourceStates",
532
+ "args": []
533
+ },
534
+ "expected": {
535
+ "kind": "value",
536
+ "value": [
537
+ {
538
+ "sourceKey": "conversation-1",
539
+ "sourcePath": ".lapis/agents/sessions/conversation-1/transcript.jsonl",
540
+ "sourceHash": "sha256:source",
541
+ "lastEntryId": "entry-1",
542
+ "lastEntryHash": "sha256:entry",
543
+ "status": "ready",
544
+ "indexedAt": 100
545
+ }
546
+ ]
547
+ }
548
+ },
549
+ {
550
+ "name": "deleteMemorySourceState",
551
+ "request": {
552
+ "method": "deleteMemorySourceState",
553
+ "args": [
554
+ {
555
+ "kind": "value",
556
+ "value": "conversation-1"
557
+ }
558
+ ]
559
+ },
560
+ "expected": {
561
+ "kind": "undefined"
562
+ }
563
+ },
564
+ {
565
+ "name": "upsertMemoryCandidate",
566
+ "request": {
567
+ "method": "upsertMemoryCandidate",
568
+ "args": [
569
+ {
570
+ "kind": "value",
571
+ "value": {
572
+ "candidate": {
573
+ "id": "a",
574
+ "scopeKind": "project",
575
+ "scopePath": "Projects/Alpha",
576
+ "kind": "preference",
577
+ "normalizedClaim": "Use compact headings",
578
+ "claimHash": "sha256:claim",
579
+ "supersessionKey": "writing.headings",
580
+ "originClass": "owner",
581
+ "importance": 4,
582
+ "triggers": ["writing", "headings"],
583
+ "state": "staged",
584
+ "firstSeenAt": 100,
585
+ "lastSeenAt": 200,
586
+ "recurrenceCount": 2,
587
+ "conversationCount": 2
588
+ },
589
+ "origins": [
590
+ {
591
+ "candidateId": "a",
592
+ "conversationId": "conversation-1",
593
+ "entryId": "entry-1",
594
+ "entryHash": "sha256:entry",
595
+ "observedAt": 100
596
+ },
597
+ {
598
+ "candidateId": "a",
599
+ "conversationId": "conversation-2",
600
+ "entryId": "entry-2",
601
+ "entryHash": "sha256:entry",
602
+ "observedAt": 200
603
+ }
604
+ ]
605
+ }
606
+ }
607
+ ]
608
+ },
609
+ "expected": {
610
+ "kind": "undefined"
611
+ }
612
+ },
613
+ {
614
+ "name": "queryMemoryCandidates",
615
+ "request": {
616
+ "method": "queryMemoryCandidates",
617
+ "args": []
618
+ },
619
+ "expected": {
620
+ "kind": "value",
621
+ "value": [
622
+ {
623
+ "candidate": {
624
+ "id": "a",
625
+ "scopeKind": "project",
626
+ "scopePath": "Projects/Alpha",
627
+ "kind": "preference",
628
+ "normalizedClaim": "Use compact headings",
629
+ "claimHash": "sha256:claim",
630
+ "supersessionKey": "writing.headings",
631
+ "originClass": "owner",
632
+ "importance": 4,
633
+ "triggers": ["writing", "headings"],
634
+ "state": "staged",
635
+ "firstSeenAt": 100,
636
+ "lastSeenAt": 200,
637
+ "recurrenceCount": 2,
638
+ "conversationCount": 2
639
+ },
640
+ "origins": [
641
+ {
642
+ "candidateId": "a",
643
+ "conversationId": "conversation-1",
644
+ "entryId": "entry-1",
645
+ "entryHash": "sha256:entry",
646
+ "observedAt": 100
647
+ },
648
+ {
649
+ "candidateId": "a",
650
+ "conversationId": "conversation-2",
651
+ "entryId": "entry-2",
652
+ "entryHash": "sha256:entry",
653
+ "observedAt": 200
654
+ }
655
+ ]
656
+ }
657
+ ]
658
+ }
659
+ },
660
+ {
661
+ "name": "deleteMemoryCandidatesByConversation",
662
+ "request": {
663
+ "method": "deleteMemoryCandidatesByConversation",
664
+ "args": [
665
+ {
666
+ "kind": "value",
667
+ "value": "conversation-1"
668
+ }
669
+ ]
670
+ },
671
+ "expected": {
672
+ "kind": "undefined"
673
+ }
674
+ },
675
+ {
676
+ "name": "recordMemoryRecallSignal",
677
+ "request": {
678
+ "method": "recordMemoryRecallSignal",
679
+ "args": [
680
+ {
681
+ "kind": "value",
682
+ "value": {
683
+ "targetRef": "Memory/Rule.md",
684
+ "queryFingerprint": "salted:fingerprint",
685
+ "day": "2026-10-24",
686
+ "bestScore": 0.8,
687
+ "hitCount": 1
688
+ }
689
+ }
690
+ ]
691
+ },
692
+ "expected": {
693
+ "kind": "undefined"
694
+ }
695
+ },
696
+ {
697
+ "name": "listMemoryRecallSignals",
698
+ "request": {
699
+ "method": "listMemoryRecallSignals",
700
+ "args": []
701
+ },
702
+ "expected": {
703
+ "kind": "value",
704
+ "value": [
705
+ {
706
+ "targetRef": "Memory/Rule.md",
707
+ "queryFingerprint": "salted:fingerprint",
708
+ "day": "2026-10-24",
709
+ "bestScore": 0.8,
710
+ "hitCount": 1
711
+ }
712
+ ]
713
+ }
714
+ },
715
+ {
716
+ "name": "claimMemoryJob",
717
+ "request": {
718
+ "method": "claimMemoryJob",
719
+ "args": [
720
+ {
721
+ "kind": "value",
722
+ "value": {
723
+ "job": {
724
+ "id": "ingest:conversation-1",
725
+ "kind": "ingest",
726
+ "scopeKey": "project:Projects/Alpha",
727
+ "status": "queued",
728
+ "attempts": 0,
729
+ "maxAttempts": 2,
730
+ "createdAt": 100,
731
+ "cursor": "entry-0"
732
+ },
733
+ "ownerId": "calls",
734
+ "now": 200,
735
+ "leaseMs": 100
736
+ }
737
+ }
738
+ ]
739
+ },
740
+ "expected": {
741
+ "kind": "value",
742
+ "value": {
743
+ "id": "ingest:conversation-1",
744
+ "kind": "ingest",
745
+ "scopeKey": "project:Projects/Alpha",
746
+ "status": "running",
747
+ "attempts": 1,
748
+ "maxAttempts": 2,
749
+ "createdAt": 100,
750
+ "cursor": "entry-0",
751
+ "ownerId": "calls",
752
+ "leaseUntil": 300,
753
+ "startedAt": 200
754
+ }
755
+ }
756
+ },
757
+ {
758
+ "name": "updateMemoryJob",
759
+ "request": {
760
+ "method": "updateMemoryJob",
761
+ "args": [
762
+ {
763
+ "kind": "value",
764
+ "value": {
765
+ "jobId": "ingest:conversation-1",
766
+ "ownerId": "calls",
767
+ "now": 250,
768
+ "patch": {
769
+ "status": "completed",
770
+ "finishedAt": 250
771
+ }
772
+ }
773
+ }
774
+ ]
775
+ },
776
+ "expected": {
777
+ "kind": "value",
778
+ "value": {
779
+ "id": "ingest:conversation-1",
780
+ "kind": "ingest",
781
+ "scopeKey": "project:Projects/Alpha",
782
+ "status": "completed",
783
+ "attempts": 1,
784
+ "maxAttempts": 2,
785
+ "createdAt": 100,
786
+ "cursor": "entry-0",
787
+ "startedAt": 200,
788
+ "finishedAt": 250
789
+ }
790
+ }
791
+ },
792
+ {
793
+ "name": "listMemoryJobs",
794
+ "request": {
795
+ "method": "listMemoryJobs",
796
+ "args": []
797
+ },
798
+ "expected": {
799
+ "kind": "value",
800
+ "value": [
801
+ {
802
+ "id": "ingest:conversation-1",
803
+ "kind": "ingest",
804
+ "scopeKey": "project:Projects/Alpha",
805
+ "status": "completed",
806
+ "attempts": 1,
807
+ "maxAttempts": 2,
808
+ "createdAt": 100,
809
+ "cursor": "entry-0",
810
+ "startedAt": 200,
811
+ "finishedAt": 250
812
+ }
813
+ ]
814
+ }
815
+ },
816
+ {
817
+ "name": "clearMemoryDerivedState",
818
+ "request": {
819
+ "method": "clearMemoryDerivedState",
820
+ "args": []
821
+ },
822
+ "expected": {
823
+ "kind": "undefined"
824
+ }
825
+ },
826
+ {
827
+ "name": "getChangeRevision",
828
+ "request": {
829
+ "method": "getChangeRevision",
830
+ "args": []
831
+ },
832
+ "expected": {
833
+ "kind": "value",
834
+ "value": 19
835
+ }
836
+ },
837
+ {
838
+ "name": "upsertIndexedFile",
839
+ "request": {
840
+ "method": "upsertIndexedFile",
841
+ "args": [
842
+ {
843
+ "kind": "value",
844
+ "value": {
845
+ "file": {
846
+ "path": "Notes/Öld.md",
847
+ "normalizedPath": "Notes/Öld.md",
848
+ "extension": ".MD",
849
+ "mtime": 1,
850
+ "size": 12,
851
+ "hash": "changed",
852
+ "indexed": true
853
+ },
854
+ "metadata": {
855
+ "path": "Notes/Öld.md",
856
+ "hash": "changed",
857
+ "parserVersion": "fixture",
858
+ "metadata": {
859
+ "title": "Fixture 🪨"
860
+ }
861
+ },
862
+ "links": [
863
+ {
864
+ "sourcePath": "Notes/Öld.md",
865
+ "targetText": "Old",
866
+ "resolvedTargetPath": "Links.md",
867
+ "type": "link",
868
+ "count": 1,
869
+ "kind": "reference"
870
+ }
871
+ ],
872
+ "tags": [
873
+ {
874
+ "path": "Notes/Öld.md",
875
+ "tag": "#Work/Notes",
876
+ "parts": ["Work", "Notes"],
877
+ "hierarchy": ["Work", "Work/Notes"]
878
+ }
879
+ ],
880
+ "properties": [
881
+ {
882
+ "path": "Notes/Öld.md",
883
+ "name": "Score",
884
+ "inferredType": "number",
885
+ "value": 2
886
+ }
887
+ ]
888
+ }
889
+ }
890
+ ]
891
+ },
892
+ "expected": {
893
+ "kind": "undefined"
894
+ }
895
+ },
896
+ {
897
+ "name": "getIndexedFile",
898
+ "request": {
899
+ "method": "getIndexedFile",
900
+ "args": [
901
+ {
902
+ "kind": "value",
903
+ "value": "Notes/Öld.md"
904
+ }
905
+ ]
906
+ },
907
+ "expected": {
908
+ "kind": "value",
909
+ "value": {
910
+ "file": {
911
+ "path": "Notes/Öld.md",
912
+ "normalizedPath": "Notes/Öld.md",
913
+ "extension": "md",
914
+ "mtime": 1,
915
+ "size": 12,
916
+ "hash": "changed",
917
+ "indexed": true,
918
+ "deleted": false
919
+ },
920
+ "metadata": {
921
+ "path": "Notes/Öld.md",
922
+ "hash": "changed",
923
+ "parserVersion": "fixture",
924
+ "metadata": {
925
+ "title": "Fixture 🪨"
926
+ }
927
+ },
928
+ "properties": [
929
+ {
930
+ "path": "Notes/Öld.md",
931
+ "name": "Score",
932
+ "inferredType": "number",
933
+ "value": 2
934
+ }
935
+ ],
936
+ "tags": [
937
+ {
938
+ "path": "Notes/Öld.md",
939
+ "tag": "#Work/Notes",
940
+ "parts": ["Work", "Notes"],
941
+ "hierarchy": ["Work", "Work/Notes"]
942
+ }
943
+ ],
944
+ "links": [
945
+ {
946
+ "sourcePath": "Notes/Öld.md",
947
+ "targetText": "Old",
948
+ "resolvedTargetPath": "Links.md",
949
+ "type": "link",
950
+ "count": 1,
951
+ "kind": "reference",
952
+ "ordinal": 0
953
+ }
954
+ ]
955
+ }
956
+ }
957
+ },
958
+ {
959
+ "name": "listIndexedFileManifest",
960
+ "request": {
961
+ "method": "listIndexedFileManifest",
962
+ "args": []
963
+ },
964
+ "expected": {
965
+ "kind": "value",
966
+ "value": {
967
+ "rows": [
968
+ {
969
+ "path": "Notes/Öld.md",
970
+ "normalizedPath": "Notes/Öld.md",
971
+ "extension": "md",
972
+ "mtime": 1,
973
+ "size": 12,
974
+ "hash": "changed",
975
+ "parserVersion": "fixture",
976
+ "indexed": true,
977
+ "deleted": false
978
+ }
979
+ ]
980
+ }
981
+ }
982
+ },
983
+ {
984
+ "name": "queryIndexedMetadata",
985
+ "request": {
986
+ "method": "queryIndexedMetadata",
987
+ "args": []
988
+ },
989
+ "expected": {
990
+ "kind": "value",
991
+ "value": [
992
+ {
993
+ "file": {
994
+ "path": "Notes/Öld.md",
995
+ "normalizedPath": "Notes/Öld.md",
996
+ "extension": "md",
997
+ "mtime": 1,
998
+ "size": 12,
999
+ "hash": "changed",
1000
+ "parserVersion": "fixture",
1001
+ "indexed": true,
1002
+ "deleted": false
1003
+ },
1004
+ "metadata": {
1005
+ "path": "Notes/Öld.md",
1006
+ "hash": "changed",
1007
+ "parserVersion": "fixture",
1008
+ "metadata": {
1009
+ "title": "Fixture 🪨"
1010
+ }
1011
+ },
1012
+ "properties": [
1013
+ {
1014
+ "path": "Notes/Öld.md",
1015
+ "name": "Score",
1016
+ "inferredType": "number",
1017
+ "value": 2
1018
+ }
1019
+ ],
1020
+ "tags": [
1021
+ {
1022
+ "path": "Notes/Öld.md",
1023
+ "tag": "#Work/Notes",
1024
+ "parts": ["Work", "Notes"],
1025
+ "hierarchy": ["Work", "Work/Notes"]
1026
+ }
1027
+ ],
1028
+ "links": [
1029
+ {
1030
+ "sourcePath": "Notes/Öld.md",
1031
+ "targetText": "Old",
1032
+ "resolvedTargetPath": "Links.md",
1033
+ "type": "link",
1034
+ "count": 1,
1035
+ "kind": "reference",
1036
+ "ordinal": 0
1037
+ }
1038
+ ]
1039
+ }
1040
+ ]
1041
+ }
1042
+ },
1043
+ {
1044
+ "name": "queryIndexedMetadataPage",
1045
+ "request": {
1046
+ "method": "queryIndexedMetadataPage",
1047
+ "args": []
1048
+ },
1049
+ "expected": {
1050
+ "kind": "value",
1051
+ "value": {
1052
+ "rows": [
1053
+ {
1054
+ "file": {
1055
+ "path": "Notes/Öld.md",
1056
+ "normalizedPath": "Notes/Öld.md",
1057
+ "extension": "md",
1058
+ "mtime": 1,
1059
+ "size": 12,
1060
+ "hash": "changed",
1061
+ "parserVersion": "fixture",
1062
+ "indexed": true,
1063
+ "deleted": false
1064
+ },
1065
+ "metadata": {
1066
+ "path": "Notes/Öld.md",
1067
+ "hash": "changed",
1068
+ "parserVersion": "fixture",
1069
+ "metadata": {
1070
+ "title": "Fixture 🪨"
1071
+ }
1072
+ },
1073
+ "properties": [
1074
+ {
1075
+ "path": "Notes/Öld.md",
1076
+ "name": "Score",
1077
+ "inferredType": "number",
1078
+ "value": 2
1079
+ }
1080
+ ],
1081
+ "tags": [
1082
+ {
1083
+ "path": "Notes/Öld.md",
1084
+ "tag": "#Work/Notes",
1085
+ "parts": ["Work", "Notes"],
1086
+ "hierarchy": ["Work", "Work/Notes"]
1087
+ }
1088
+ ],
1089
+ "links": [
1090
+ {
1091
+ "sourcePath": "Notes/Öld.md",
1092
+ "targetText": "Old",
1093
+ "resolvedTargetPath": "Links.md",
1094
+ "type": "link",
1095
+ "count": 1,
1096
+ "kind": "reference",
1097
+ "ordinal": 0
1098
+ }
1099
+ ]
1100
+ }
1101
+ ]
1102
+ }
1103
+ }
1104
+ },
1105
+ {
1106
+ "name": "queryMetadataFacets",
1107
+ "request": {
1108
+ "method": "queryMetadataFacets",
1109
+ "args": [
1110
+ {
1111
+ "kind": "value",
1112
+ "value": {
1113
+ "kind": "tag"
1114
+ }
1115
+ }
1116
+ ]
1117
+ },
1118
+ "expected": {
1119
+ "kind": "value",
1120
+ "value": [
1121
+ {
1122
+ "value": "work",
1123
+ "valueType": "string",
1124
+ "count": 1
1125
+ },
1126
+ {
1127
+ "value": "work/notes",
1128
+ "valueType": "string",
1129
+ "count": 1
1130
+ }
1131
+ ]
1132
+ }
1133
+ },
1134
+ {
1135
+ "name": "queryMetadataLinks",
1136
+ "request": {
1137
+ "method": "queryMetadataLinks",
1138
+ "args": [
1139
+ {
1140
+ "kind": "value",
1141
+ "value": {
1142
+ "direction": "outgoing",
1143
+ "path": "Notes/Öld.md"
1144
+ }
1145
+ }
1146
+ ]
1147
+ },
1148
+ "expected": {
1149
+ "kind": "value",
1150
+ "value": [
1151
+ {
1152
+ "sourcePath": "Notes/Öld.md",
1153
+ "targetText": "Old",
1154
+ "resolvedTargetPath": "Links.md",
1155
+ "type": "link",
1156
+ "count": 1,
1157
+ "kind": "reference",
1158
+ "ordinal": 0
1159
+ }
1160
+ ]
1161
+ }
1162
+ },
1163
+ {
1164
+ "name": "deleteIndexedFile",
1165
+ "request": {
1166
+ "method": "deleteIndexedFile",
1167
+ "args": [
1168
+ {
1169
+ "kind": "value",
1170
+ "value": "Absent.md"
1171
+ }
1172
+ ]
1173
+ },
1174
+ "expected": {
1175
+ "kind": "undefined"
1176
+ }
1177
+ },
1178
+ {
1179
+ "name": "renameIndexedFile",
1180
+ "request": {
1181
+ "method": "renameIndexedFile",
1182
+ "args": [
1183
+ {
1184
+ "kind": "value",
1185
+ "value": "Notes/Öld.md"
1186
+ },
1187
+ {
1188
+ "kind": "value",
1189
+ "value": "Archive/Renamed.md"
1190
+ }
1191
+ ]
1192
+ },
1193
+ "expected": {
1194
+ "kind": "undefined"
1195
+ }
1196
+ },
1197
+ {
1198
+ "name": "getIndexedFile after rename",
1199
+ "request": {
1200
+ "method": "getIndexedFile",
1201
+ "args": [
1202
+ {
1203
+ "kind": "value",
1204
+ "value": "Archive/Renamed.md"
1205
+ }
1206
+ ]
1207
+ },
1208
+ "expected": {
1209
+ "kind": "value",
1210
+ "value": {
1211
+ "file": {
1212
+ "path": "Archive/Renamed.md",
1213
+ "normalizedPath": "Archive/Renamed.md",
1214
+ "extension": "md",
1215
+ "mtime": 1,
1216
+ "size": 12,
1217
+ "hash": "changed",
1218
+ "indexed": true,
1219
+ "deleted": false
1220
+ },
1221
+ "metadata": {
1222
+ "path": "Archive/Renamed.md",
1223
+ "hash": "changed",
1224
+ "parserVersion": "fixture",
1225
+ "metadata": {
1226
+ "title": "Fixture 🪨"
1227
+ }
1228
+ },
1229
+ "properties": [
1230
+ {
1231
+ "path": "Archive/Renamed.md",
1232
+ "name": "Score",
1233
+ "inferredType": "number",
1234
+ "value": 2
1235
+ }
1236
+ ],
1237
+ "tags": [
1238
+ {
1239
+ "path": "Archive/Renamed.md",
1240
+ "tag": "#Work/Notes",
1241
+ "parts": ["Work", "Notes"],
1242
+ "hierarchy": ["Work", "Work/Notes"]
1243
+ }
1244
+ ],
1245
+ "links": [
1246
+ {
1247
+ "sourcePath": "Archive/Renamed.md",
1248
+ "targetText": "Old",
1249
+ "resolvedTargetPath": "Links.md",
1250
+ "type": "link",
1251
+ "count": 1,
1252
+ "kind": "reference",
1253
+ "ordinal": 0
1254
+ }
1255
+ ]
1256
+ }
1257
+ }
1258
+ },
1259
+ {
1260
+ "name": "upsertSearchDocument",
1261
+ "request": {
1262
+ "method": "upsertSearchDocument",
1263
+ "args": [
1264
+ {
1265
+ "kind": "value",
1266
+ "value": {
1267
+ "path": "Search.md",
1268
+ "name": "Search",
1269
+ "extension": "md",
1270
+ "checksum": "native-call",
1271
+ "content": "alpha note",
1272
+ "tags": [],
1273
+ "tagParts": [],
1274
+ "tagHierarchy": [],
1275
+ "chunks": [
1276
+ {
1277
+ "id": "Search.md#0",
1278
+ "text": "alpha note",
1279
+ "startOffset": 0,
1280
+ "endOffset": 10
1281
+ }
1282
+ ]
1283
+ }
1284
+ }
1285
+ ]
1286
+ },
1287
+ "expected": {
1288
+ "kind": "undefined"
1289
+ }
1290
+ },
1291
+ {
1292
+ "name": "getSearchDocument",
1293
+ "request": {
1294
+ "method": "getSearchDocument",
1295
+ "args": [
1296
+ {
1297
+ "kind": "value",
1298
+ "value": "Search.md"
1299
+ }
1300
+ ]
1301
+ },
1302
+ "expected": {
1303
+ "kind": "value",
1304
+ "value": {
1305
+ "path": "Search.md",
1306
+ "name": "Search",
1307
+ "extension": "md",
1308
+ "checksum": "native-call",
1309
+ "content": "alpha note",
1310
+ "tags": [],
1311
+ "tagParts": [],
1312
+ "tagHierarchy": [],
1313
+ "chunks": [
1314
+ {
1315
+ "id": "Search.md#0",
1316
+ "text": "alpha note",
1317
+ "startOffset": 0,
1318
+ "endOffset": 10
1319
+ }
1320
+ ]
1321
+ }
1322
+ }
1323
+ },
1324
+ {
1325
+ "name": "listSearchDocumentManifest",
1326
+ "request": {
1327
+ "method": "listSearchDocumentManifest",
1328
+ "args": []
1329
+ },
1330
+ "expected": {
1331
+ "kind": "value",
1332
+ "value": {
1333
+ "rows": [
1334
+ {
1335
+ "path": "Search.md",
1336
+ "checksum": "native-call"
1337
+ }
1338
+ ]
1339
+ }
1340
+ }
1341
+ },
1342
+ {
1343
+ "name": "listSearchDocuments",
1344
+ "request": {
1345
+ "method": "listSearchDocuments",
1346
+ "args": []
1347
+ },
1348
+ "expected": {
1349
+ "kind": "value",
1350
+ "value": [
1351
+ {
1352
+ "path": "Search.md",
1353
+ "name": "Search",
1354
+ "extension": "md",
1355
+ "checksum": "native-call",
1356
+ "content": "alpha note",
1357
+ "tags": [],
1358
+ "tagParts": [],
1359
+ "tagHierarchy": [],
1360
+ "chunks": [
1361
+ {
1362
+ "id": "Search.md#0",
1363
+ "text": "alpha note",
1364
+ "startOffset": 0,
1365
+ "endOffset": 10
1366
+ }
1367
+ ]
1368
+ }
1369
+ ]
1370
+ }
1371
+ },
1372
+ {
1373
+ "name": "rebuildSearchIndex",
1374
+ "request": {
1375
+ "method": "rebuildSearchIndex",
1376
+ "args": []
1377
+ },
1378
+ "expected": {
1379
+ "kind": "undefined"
1380
+ }
1381
+ },
1382
+ {
1383
+ "name": "searchDocuments",
1384
+ "request": {
1385
+ "method": "searchDocuments",
1386
+ "args": [
1387
+ {
1388
+ "kind": "value",
1389
+ "value": "alpha"
1390
+ }
1391
+ ]
1392
+ },
1393
+ "expected": {
1394
+ "kind": "value",
1395
+ "value": [
1396
+ {
1397
+ "document": {
1398
+ "path": "Search.md",
1399
+ "name": "Search",
1400
+ "extension": "md",
1401
+ "checksum": "native-call",
1402
+ "content": "alpha note",
1403
+ "tags": [],
1404
+ "tagParts": [],
1405
+ "tagHierarchy": [],
1406
+ "chunks": [
1407
+ {
1408
+ "id": "Search.md#0",
1409
+ "text": "alpha note",
1410
+ "startOffset": 0,
1411
+ "endOffset": 10
1412
+ }
1413
+ ]
1414
+ },
1415
+ "score": 10,
1416
+ "snippets": [
1417
+ {
1418
+ "field": "content",
1419
+ "text": "alpha note",
1420
+ "ranges": [
1421
+ {
1422
+ "start": 0,
1423
+ "end": 5
1424
+ }
1425
+ ],
1426
+ "offset": 0,
1427
+ "chunkId": "Search.md#0"
1428
+ }
1429
+ ],
1430
+ "retrievalMode": "lexical",
1431
+ "scoreBreakdown": {
1432
+ "lexical": 10,
1433
+ "fused": 10,
1434
+ "fusion": {
1435
+ "algorithm": "lexical-score",
1436
+ "lexicalRank": 1,
1437
+ "lexicalContribution": 10
1438
+ }
1439
+ },
1440
+ "matchedChunkIds": ["Search.md#0"]
1441
+ }
1442
+ ]
1443
+ }
1444
+ },
1445
+ {
1446
+ "name": "searchDocumentPaths",
1447
+ "request": {
1448
+ "method": "searchDocumentPaths",
1449
+ "args": [
1450
+ {
1451
+ "kind": "value",
1452
+ "value": "alpha"
1453
+ }
1454
+ ]
1455
+ },
1456
+ "expected": {
1457
+ "kind": "value",
1458
+ "value": ["Search.md"]
1459
+ }
1460
+ },
1461
+ {
1462
+ "name": "query enhancement tauri-desktop",
1463
+ "request": {
1464
+ "method": "searchDocuments",
1465
+ "args": [
1466
+ {
1467
+ "kind": "value",
1468
+ "value": "alpha"
1469
+ },
1470
+ {
1471
+ "kind": "value",
1472
+ "value": {
1473
+ "includeDiagnostics": true,
1474
+ "queryEnhancement": {
1475
+ "runtimeTarget": "tauri-desktop",
1476
+ "provider": {
1477
+ "kind": "local-model",
1478
+ "queryExpansionModelId": "test/expand",
1479
+ "rerankerModelId": "test/rerank",
1480
+ "maxExpandedQueries": 3,
1481
+ "maxRerankCandidates": 20
1482
+ },
1483
+ "expandQuery": true,
1484
+ "rerankResults": true
1485
+ }
1486
+ }
1487
+ }
1488
+ ]
1489
+ },
1490
+ "expected": {
1491
+ "kind": "value",
1492
+ "value": [
1493
+ {
1494
+ "document": {
1495
+ "path": "Search.md",
1496
+ "name": "Search",
1497
+ "extension": "md",
1498
+ "checksum": "native-call",
1499
+ "content": "alpha note",
1500
+ "tags": [],
1501
+ "tagParts": [],
1502
+ "tagHierarchy": [],
1503
+ "chunks": [
1504
+ {
1505
+ "id": "Search.md#0",
1506
+ "text": "alpha note",
1507
+ "startOffset": 0,
1508
+ "endOffset": 10
1509
+ }
1510
+ ]
1511
+ },
1512
+ "score": 10,
1513
+ "snippets": [
1514
+ {
1515
+ "field": "content",
1516
+ "text": "alpha note",
1517
+ "ranges": [
1518
+ {
1519
+ "start": 0,
1520
+ "end": 5
1521
+ }
1522
+ ],
1523
+ "offset": 0,
1524
+ "chunkId": "Search.md#0"
1525
+ }
1526
+ ],
1527
+ "retrievalMode": "lexical",
1528
+ "scoreBreakdown": {
1529
+ "lexical": 10,
1530
+ "fused": 10,
1531
+ "fusion": {
1532
+ "algorithm": "lexical-score",
1533
+ "lexicalRank": 1,
1534
+ "lexicalContribution": 10
1535
+ }
1536
+ },
1537
+ "matchedChunkIds": ["Search.md#0"],
1538
+ "diagnostics": {
1539
+ "requestedMode": "auto",
1540
+ "appliedMode": "lexical",
1541
+ "backendKind": "turso-native",
1542
+ "lexicalCandidateCount": 1,
1543
+ "vectorCandidateCount": 0,
1544
+ "totalCandidateCount": 1,
1545
+ "modelReady": false,
1546
+ "queryEnhancement": {
1547
+ "runtimeTarget": "tauri-desktop",
1548
+ "providerKind": "local-model",
1549
+ "expandQuery": true,
1550
+ "rerankResults": true,
1551
+ "applied": false,
1552
+ "skipReason": "unsupported-runtime",
1553
+ "signal": {
1554
+ "requestedMode": "auto",
1555
+ "topLexicalScore": 10,
1556
+ "topVectorScore": 0,
1557
+ "topFusedScore": 10,
1558
+ "resultCount": 1
1559
+ }
1560
+ }
1561
+ }
1562
+ }
1563
+ ]
1564
+ }
1565
+ },
1566
+ {
1567
+ "name": "query enhancement node-server",
1568
+ "request": {
1569
+ "method": "searchDocuments",
1570
+ "args": [
1571
+ {
1572
+ "kind": "value",
1573
+ "value": "alpha"
1574
+ },
1575
+ {
1576
+ "kind": "value",
1577
+ "value": {
1578
+ "includeDiagnostics": true,
1579
+ "queryEnhancement": {
1580
+ "runtimeTarget": "node-server",
1581
+ "provider": {
1582
+ "kind": "local-model",
1583
+ "queryExpansionModelId": "test/expand",
1584
+ "rerankerModelId": "test/rerank",
1585
+ "maxExpandedQueries": 3,
1586
+ "maxRerankCandidates": 20
1587
+ },
1588
+ "expandQuery": true,
1589
+ "rerankResults": true
1590
+ }
1591
+ }
1592
+ }
1593
+ ]
1594
+ },
1595
+ "expected": {
1596
+ "kind": "value",
1597
+ "value": [
1598
+ {
1599
+ "document": {
1600
+ "path": "Search.md",
1601
+ "name": "Search",
1602
+ "extension": "md",
1603
+ "checksum": "native-call",
1604
+ "content": "alpha note",
1605
+ "tags": [],
1606
+ "tagParts": [],
1607
+ "tagHierarchy": [],
1608
+ "chunks": [
1609
+ {
1610
+ "id": "Search.md#0",
1611
+ "text": "alpha note",
1612
+ "startOffset": 0,
1613
+ "endOffset": 10
1614
+ }
1615
+ ]
1616
+ },
1617
+ "score": 10,
1618
+ "snippets": [
1619
+ {
1620
+ "field": "content",
1621
+ "text": "alpha note",
1622
+ "ranges": [
1623
+ {
1624
+ "start": 0,
1625
+ "end": 5
1626
+ }
1627
+ ],
1628
+ "offset": 0,
1629
+ "chunkId": "Search.md#0"
1630
+ }
1631
+ ],
1632
+ "retrievalMode": "lexical",
1633
+ "scoreBreakdown": {
1634
+ "lexical": 10,
1635
+ "fused": 10,
1636
+ "fusion": {
1637
+ "algorithm": "lexical-score",
1638
+ "lexicalRank": 1,
1639
+ "lexicalContribution": 10
1640
+ }
1641
+ },
1642
+ "matchedChunkIds": ["Search.md#0"],
1643
+ "diagnostics": {
1644
+ "requestedMode": "auto",
1645
+ "appliedMode": "lexical",
1646
+ "backendKind": "turso-native",
1647
+ "lexicalCandidateCount": 1,
1648
+ "vectorCandidateCount": 0,
1649
+ "totalCandidateCount": 1,
1650
+ "modelReady": false,
1651
+ "queryEnhancement": {
1652
+ "runtimeTarget": "node-server",
1653
+ "providerKind": "local-model",
1654
+ "expandQuery": true,
1655
+ "rerankResults": true,
1656
+ "applied": false,
1657
+ "skipReason": "unsupported-runtime",
1658
+ "signal": {
1659
+ "requestedMode": "auto",
1660
+ "topLexicalScore": 10,
1661
+ "topVectorScore": 0,
1662
+ "topFusedScore": 10,
1663
+ "resultCount": 1
1664
+ }
1665
+ }
1666
+ }
1667
+ }
1668
+ ]
1669
+ }
1670
+ },
1671
+ {
1672
+ "name": "query enhancement web-pwa",
1673
+ "request": {
1674
+ "method": "searchDocuments",
1675
+ "args": [
1676
+ {
1677
+ "kind": "value",
1678
+ "value": "alpha"
1679
+ },
1680
+ {
1681
+ "kind": "value",
1682
+ "value": {
1683
+ "includeDiagnostics": true,
1684
+ "queryEnhancement": {
1685
+ "runtimeTarget": "web-pwa",
1686
+ "provider": {
1687
+ "kind": "local-model",
1688
+ "queryExpansionModelId": "test/expand",
1689
+ "rerankerModelId": "test/rerank",
1690
+ "maxExpandedQueries": 3,
1691
+ "maxRerankCandidates": 20
1692
+ },
1693
+ "expandQuery": true,
1694
+ "rerankResults": true
1695
+ }
1696
+ }
1697
+ }
1698
+ ]
1699
+ },
1700
+ "expected": {
1701
+ "kind": "value",
1702
+ "value": [
1703
+ {
1704
+ "document": {
1705
+ "path": "Search.md",
1706
+ "name": "Search",
1707
+ "extension": "md",
1708
+ "checksum": "native-call",
1709
+ "content": "alpha note",
1710
+ "tags": [],
1711
+ "tagParts": [],
1712
+ "tagHierarchy": [],
1713
+ "chunks": [
1714
+ {
1715
+ "id": "Search.md#0",
1716
+ "text": "alpha note",
1717
+ "startOffset": 0,
1718
+ "endOffset": 10
1719
+ }
1720
+ ]
1721
+ },
1722
+ "score": 10,
1723
+ "snippets": [
1724
+ {
1725
+ "field": "content",
1726
+ "text": "alpha note",
1727
+ "ranges": [
1728
+ {
1729
+ "start": 0,
1730
+ "end": 5
1731
+ }
1732
+ ],
1733
+ "offset": 0,
1734
+ "chunkId": "Search.md#0"
1735
+ }
1736
+ ],
1737
+ "retrievalMode": "lexical",
1738
+ "scoreBreakdown": {
1739
+ "lexical": 10,
1740
+ "fused": 10,
1741
+ "fusion": {
1742
+ "algorithm": "lexical-score",
1743
+ "lexicalRank": 1,
1744
+ "lexicalContribution": 10
1745
+ }
1746
+ },
1747
+ "matchedChunkIds": ["Search.md#0"],
1748
+ "diagnostics": {
1749
+ "requestedMode": "auto",
1750
+ "appliedMode": "lexical",
1751
+ "backendKind": "turso-native",
1752
+ "lexicalCandidateCount": 1,
1753
+ "vectorCandidateCount": 0,
1754
+ "totalCandidateCount": 1,
1755
+ "modelReady": false,
1756
+ "queryEnhancement": {
1757
+ "runtimeTarget": "web-pwa",
1758
+ "providerKind": "local-model",
1759
+ "expandQuery": true,
1760
+ "rerankResults": true,
1761
+ "applied": false,
1762
+ "skipReason": "unsupported-runtime",
1763
+ "signal": {
1764
+ "requestedMode": "auto",
1765
+ "topLexicalScore": 10,
1766
+ "topVectorScore": 0,
1767
+ "topFusedScore": 10,
1768
+ "resultCount": 1
1769
+ }
1770
+ }
1771
+ }
1772
+ }
1773
+ ]
1774
+ }
1775
+ },
1776
+ {
1777
+ "name": "query enhancement deno-desktop",
1778
+ "request": {
1779
+ "method": "searchDocuments",
1780
+ "args": [
1781
+ {
1782
+ "kind": "value",
1783
+ "value": "alpha"
1784
+ },
1785
+ {
1786
+ "kind": "value",
1787
+ "value": {
1788
+ "includeDiagnostics": true,
1789
+ "queryEnhancement": {
1790
+ "runtimeTarget": "deno-desktop",
1791
+ "provider": {
1792
+ "kind": "local-model",
1793
+ "queryExpansionModelId": "test/expand",
1794
+ "rerankerModelId": "test/rerank",
1795
+ "maxExpandedQueries": 3,
1796
+ "maxRerankCandidates": 20
1797
+ },
1798
+ "expandQuery": true,
1799
+ "rerankResults": true
1800
+ }
1801
+ }
1802
+ }
1803
+ ]
1804
+ },
1805
+ "expected": {
1806
+ "kind": "value",
1807
+ "value": [
1808
+ {
1809
+ "document": {
1810
+ "path": "Search.md",
1811
+ "name": "Search",
1812
+ "extension": "md",
1813
+ "checksum": "native-call",
1814
+ "content": "alpha note",
1815
+ "tags": [],
1816
+ "tagParts": [],
1817
+ "tagHierarchy": [],
1818
+ "chunks": [
1819
+ {
1820
+ "id": "Search.md#0",
1821
+ "text": "alpha note",
1822
+ "startOffset": 0,
1823
+ "endOffset": 10
1824
+ }
1825
+ ]
1826
+ },
1827
+ "score": 10,
1828
+ "snippets": [
1829
+ {
1830
+ "field": "content",
1831
+ "text": "alpha note",
1832
+ "ranges": [
1833
+ {
1834
+ "start": 0,
1835
+ "end": 5
1836
+ }
1837
+ ],
1838
+ "offset": 0,
1839
+ "chunkId": "Search.md#0"
1840
+ }
1841
+ ],
1842
+ "retrievalMode": "lexical",
1843
+ "scoreBreakdown": {
1844
+ "lexical": 10,
1845
+ "fused": 10,
1846
+ "fusion": {
1847
+ "algorithm": "lexical-score",
1848
+ "lexicalRank": 1,
1849
+ "lexicalContribution": 10
1850
+ }
1851
+ },
1852
+ "matchedChunkIds": ["Search.md#0"],
1853
+ "diagnostics": {
1854
+ "requestedMode": "auto",
1855
+ "appliedMode": "lexical",
1856
+ "backendKind": "turso-native",
1857
+ "lexicalCandidateCount": 1,
1858
+ "vectorCandidateCount": 0,
1859
+ "totalCandidateCount": 1,
1860
+ "modelReady": false,
1861
+ "queryEnhancement": {
1862
+ "runtimeTarget": "deno-desktop",
1863
+ "providerKind": "local-model",
1864
+ "expandQuery": true,
1865
+ "rerankResults": true,
1866
+ "applied": false,
1867
+ "skipReason": "provider-unavailable",
1868
+ "signal": {
1869
+ "requestedMode": "auto",
1870
+ "topLexicalScore": 10,
1871
+ "topVectorScore": 0,
1872
+ "topFusedScore": 10,
1873
+ "resultCount": 1
1874
+ }
1875
+ }
1876
+ }
1877
+ }
1878
+ ]
1879
+ }
1880
+ },
1881
+ {
1882
+ "name": "query enhancement deno-server",
1883
+ "request": {
1884
+ "method": "searchDocuments",
1885
+ "args": [
1886
+ {
1887
+ "kind": "value",
1888
+ "value": "alpha"
1889
+ },
1890
+ {
1891
+ "kind": "value",
1892
+ "value": {
1893
+ "includeDiagnostics": true,
1894
+ "queryEnhancement": {
1895
+ "runtimeTarget": "deno-server",
1896
+ "provider": {
1897
+ "kind": "local-model",
1898
+ "queryExpansionModelId": "test/expand",
1899
+ "rerankerModelId": "test/rerank",
1900
+ "maxExpandedQueries": 3,
1901
+ "maxRerankCandidates": 20
1902
+ },
1903
+ "expandQuery": true,
1904
+ "rerankResults": true
1905
+ }
1906
+ }
1907
+ }
1908
+ ]
1909
+ },
1910
+ "expected": {
1911
+ "kind": "value",
1912
+ "value": [
1913
+ {
1914
+ "document": {
1915
+ "path": "Search.md",
1916
+ "name": "Search",
1917
+ "extension": "md",
1918
+ "checksum": "native-call",
1919
+ "content": "alpha note",
1920
+ "tags": [],
1921
+ "tagParts": [],
1922
+ "tagHierarchy": [],
1923
+ "chunks": [
1924
+ {
1925
+ "id": "Search.md#0",
1926
+ "text": "alpha note",
1927
+ "startOffset": 0,
1928
+ "endOffset": 10
1929
+ }
1930
+ ]
1931
+ },
1932
+ "score": 10,
1933
+ "snippets": [
1934
+ {
1935
+ "field": "content",
1936
+ "text": "alpha note",
1937
+ "ranges": [
1938
+ {
1939
+ "start": 0,
1940
+ "end": 5
1941
+ }
1942
+ ],
1943
+ "offset": 0,
1944
+ "chunkId": "Search.md#0"
1945
+ }
1946
+ ],
1947
+ "retrievalMode": "lexical",
1948
+ "scoreBreakdown": {
1949
+ "lexical": 10,
1950
+ "fused": 10,
1951
+ "fusion": {
1952
+ "algorithm": "lexical-score",
1953
+ "lexicalRank": 1,
1954
+ "lexicalContribution": 10
1955
+ }
1956
+ },
1957
+ "matchedChunkIds": ["Search.md#0"],
1958
+ "diagnostics": {
1959
+ "requestedMode": "auto",
1960
+ "appliedMode": "lexical",
1961
+ "backendKind": "turso-native",
1962
+ "lexicalCandidateCount": 1,
1963
+ "vectorCandidateCount": 0,
1964
+ "totalCandidateCount": 1,
1965
+ "modelReady": false,
1966
+ "queryEnhancement": {
1967
+ "runtimeTarget": "deno-server",
1968
+ "providerKind": "local-model",
1969
+ "expandQuery": true,
1970
+ "rerankResults": true,
1971
+ "applied": false,
1972
+ "skipReason": "unsupported-runtime",
1973
+ "signal": {
1974
+ "requestedMode": "auto",
1975
+ "topLexicalScore": 10,
1976
+ "topVectorScore": 0,
1977
+ "topFusedScore": 10,
1978
+ "resultCount": 1
1979
+ }
1980
+ }
1981
+ }
1982
+ }
1983
+ ]
1984
+ }
1985
+ },
1986
+ {
1987
+ "name": "query enhancement test",
1988
+ "request": {
1989
+ "method": "searchDocuments",
1990
+ "args": [
1991
+ {
1992
+ "kind": "value",
1993
+ "value": "alpha"
1994
+ },
1995
+ {
1996
+ "kind": "value",
1997
+ "value": {
1998
+ "includeDiagnostics": true,
1999
+ "queryEnhancement": {
2000
+ "runtimeTarget": "test",
2001
+ "provider": {
2002
+ "kind": "local-model",
2003
+ "queryExpansionModelId": "test/expand",
2004
+ "rerankerModelId": "test/rerank",
2005
+ "maxExpandedQueries": 3,
2006
+ "maxRerankCandidates": 20
2007
+ },
2008
+ "expandQuery": true,
2009
+ "rerankResults": true
2010
+ }
2011
+ }
2012
+ }
2013
+ ]
2014
+ },
2015
+ "expected": {
2016
+ "kind": "value",
2017
+ "value": [
2018
+ {
2019
+ "document": {
2020
+ "path": "Search.md",
2021
+ "name": "Search",
2022
+ "extension": "md",
2023
+ "checksum": "native-call",
2024
+ "content": "alpha note",
2025
+ "tags": [],
2026
+ "tagParts": [],
2027
+ "tagHierarchy": [],
2028
+ "chunks": [
2029
+ {
2030
+ "id": "Search.md#0",
2031
+ "text": "alpha note",
2032
+ "startOffset": 0,
2033
+ "endOffset": 10
2034
+ }
2035
+ ]
2036
+ },
2037
+ "score": 10,
2038
+ "snippets": [
2039
+ {
2040
+ "field": "content",
2041
+ "text": "alpha note",
2042
+ "ranges": [
2043
+ {
2044
+ "start": 0,
2045
+ "end": 5
2046
+ }
2047
+ ],
2048
+ "offset": 0,
2049
+ "chunkId": "Search.md#0"
2050
+ }
2051
+ ],
2052
+ "retrievalMode": "lexical",
2053
+ "scoreBreakdown": {
2054
+ "lexical": 10,
2055
+ "fused": 10,
2056
+ "fusion": {
2057
+ "algorithm": "lexical-score",
2058
+ "lexicalRank": 1,
2059
+ "lexicalContribution": 10
2060
+ }
2061
+ },
2062
+ "matchedChunkIds": ["Search.md#0"],
2063
+ "diagnostics": {
2064
+ "requestedMode": "auto",
2065
+ "appliedMode": "lexical",
2066
+ "backendKind": "turso-native",
2067
+ "lexicalCandidateCount": 1,
2068
+ "vectorCandidateCount": 0,
2069
+ "totalCandidateCount": 1,
2070
+ "modelReady": false,
2071
+ "queryEnhancement": {
2072
+ "runtimeTarget": "test",
2073
+ "providerKind": "local-model",
2074
+ "expandQuery": true,
2075
+ "rerankResults": true,
2076
+ "applied": false,
2077
+ "skipReason": "unsupported-runtime",
2078
+ "signal": {
2079
+ "requestedMode": "auto",
2080
+ "topLexicalScore": 10,
2081
+ "topVectorScore": 0,
2082
+ "topFusedScore": 10,
2083
+ "resultCount": 1
2084
+ }
2085
+ }
2086
+ }
2087
+ }
2088
+ ]
2089
+ }
2090
+ },
2091
+ {
2092
+ "name": "query enhancement disabled",
2093
+ "request": {
2094
+ "method": "searchDocuments",
2095
+ "args": [
2096
+ {
2097
+ "kind": "value",
2098
+ "value": "alpha"
2099
+ },
2100
+ {
2101
+ "kind": "value",
2102
+ "value": {
2103
+ "includeDiagnostics": true,
2104
+ "queryEnhancement": {
2105
+ "runtimeTarget": "tauri-desktop",
2106
+ "provider": {
2107
+ "kind": "local-model",
2108
+ "queryExpansionModelId": "test/expand",
2109
+ "rerankerModelId": "test/rerank",
2110
+ "maxExpandedQueries": 3,
2111
+ "maxRerankCandidates": 20
2112
+ },
2113
+ "expandQuery": false,
2114
+ "rerankResults": false
2115
+ }
2116
+ }
2117
+ }
2118
+ ]
2119
+ },
2120
+ "expected": {
2121
+ "kind": "value",
2122
+ "value": [
2123
+ {
2124
+ "document": {
2125
+ "path": "Search.md",
2126
+ "name": "Search",
2127
+ "extension": "md",
2128
+ "checksum": "native-call",
2129
+ "content": "alpha note",
2130
+ "tags": [],
2131
+ "tagParts": [],
2132
+ "tagHierarchy": [],
2133
+ "chunks": [
2134
+ {
2135
+ "id": "Search.md#0",
2136
+ "text": "alpha note",
2137
+ "startOffset": 0,
2138
+ "endOffset": 10
2139
+ }
2140
+ ]
2141
+ },
2142
+ "score": 10,
2143
+ "snippets": [
2144
+ {
2145
+ "field": "content",
2146
+ "text": "alpha note",
2147
+ "ranges": [
2148
+ {
2149
+ "start": 0,
2150
+ "end": 5
2151
+ }
2152
+ ],
2153
+ "offset": 0,
2154
+ "chunkId": "Search.md#0"
2155
+ }
2156
+ ],
2157
+ "retrievalMode": "lexical",
2158
+ "scoreBreakdown": {
2159
+ "lexical": 10,
2160
+ "fused": 10,
2161
+ "fusion": {
2162
+ "algorithm": "lexical-score",
2163
+ "lexicalRank": 1,
2164
+ "lexicalContribution": 10
2165
+ }
2166
+ },
2167
+ "matchedChunkIds": ["Search.md#0"],
2168
+ "diagnostics": {
2169
+ "requestedMode": "auto",
2170
+ "appliedMode": "lexical",
2171
+ "backendKind": "turso-native",
2172
+ "lexicalCandidateCount": 1,
2173
+ "vectorCandidateCount": 0,
2174
+ "totalCandidateCount": 1,
2175
+ "modelReady": false
2176
+ }
2177
+ }
2178
+ ]
2179
+ }
2180
+ },
2181
+ {
2182
+ "name": "query enhancement without diagnostics",
2183
+ "request": {
2184
+ "method": "searchDocuments",
2185
+ "args": [
2186
+ {
2187
+ "kind": "value",
2188
+ "value": "alpha"
2189
+ },
2190
+ {
2191
+ "kind": "value",
2192
+ "value": {
2193
+ "includeDiagnostics": false,
2194
+ "queryEnhancement": {
2195
+ "runtimeTarget": "tauri-desktop",
2196
+ "provider": {
2197
+ "kind": "local-model",
2198
+ "queryExpansionModelId": "test/expand",
2199
+ "rerankerModelId": "test/rerank",
2200
+ "maxExpandedQueries": 3,
2201
+ "maxRerankCandidates": 20
2202
+ },
2203
+ "expandQuery": true,
2204
+ "rerankResults": true
2205
+ }
2206
+ }
2207
+ }
2208
+ ]
2209
+ },
2210
+ "expected": {
2211
+ "kind": "value",
2212
+ "value": [
2213
+ {
2214
+ "document": {
2215
+ "path": "Search.md",
2216
+ "name": "Search",
2217
+ "extension": "md",
2218
+ "checksum": "native-call",
2219
+ "content": "alpha note",
2220
+ "tags": [],
2221
+ "tagParts": [],
2222
+ "tagHierarchy": [],
2223
+ "chunks": [
2224
+ {
2225
+ "id": "Search.md#0",
2226
+ "text": "alpha note",
2227
+ "startOffset": 0,
2228
+ "endOffset": 10
2229
+ }
2230
+ ]
2231
+ },
2232
+ "score": 10,
2233
+ "snippets": [
2234
+ {
2235
+ "field": "content",
2236
+ "text": "alpha note",
2237
+ "ranges": [
2238
+ {
2239
+ "start": 0,
2240
+ "end": 5
2241
+ }
2242
+ ],
2243
+ "offset": 0,
2244
+ "chunkId": "Search.md#0"
2245
+ }
2246
+ ],
2247
+ "retrievalMode": "lexical",
2248
+ "scoreBreakdown": {
2249
+ "lexical": 10,
2250
+ "fused": 10,
2251
+ "fusion": {
2252
+ "algorithm": "lexical-score",
2253
+ "lexicalRank": 1,
2254
+ "lexicalContribution": 10
2255
+ }
2256
+ },
2257
+ "matchedChunkIds": ["Search.md#0"]
2258
+ }
2259
+ ]
2260
+ }
2261
+ },
2262
+ {
2263
+ "name": "query enhancement second record",
2264
+ "request": {
2265
+ "method": "upsertSearchDocument",
2266
+ "args": [
2267
+ {
2268
+ "kind": "value",
2269
+ "value": {
2270
+ "path": "alpha.md",
2271
+ "name": "alpha",
2272
+ "extension": "md",
2273
+ "checksum": "enhance",
2274
+ "content": "alpha note",
2275
+ "tags": [],
2276
+ "tagParts": [],
2277
+ "tagHierarchy": [],
2278
+ "chunks": [
2279
+ {
2280
+ "id": "alpha.md#0",
2281
+ "text": "alpha note",
2282
+ "startOffset": 0,
2283
+ "endOffset": 10
2284
+ }
2285
+ ]
2286
+ }
2287
+ }
2288
+ ]
2289
+ },
2290
+ "expected": {
2291
+ "kind": "undefined"
2292
+ }
2293
+ },
2294
+ {
2295
+ "name": "query enhancement strong signal",
2296
+ "request": {
2297
+ "method": "searchDocuments",
2298
+ "args": [
2299
+ {
2300
+ "kind": "value",
2301
+ "value": "alpha"
2302
+ },
2303
+ {
2304
+ "kind": "value",
2305
+ "value": {
2306
+ "includeDiagnostics": true,
2307
+ "queryEnhancement": {
2308
+ "runtimeTarget": "deno-desktop",
2309
+ "provider": {
2310
+ "kind": "local-model",
2311
+ "queryExpansionModelId": "test/expand",
2312
+ "rerankerModelId": "test/rerank",
2313
+ "maxExpandedQueries": 3,
2314
+ "maxRerankCandidates": 20
2315
+ },
2316
+ "expandQuery": true,
2317
+ "rerankResults": true
2318
+ }
2319
+ }
2320
+ }
2321
+ ]
2322
+ },
2323
+ "expected": {
2324
+ "kind": "value",
2325
+ "value": [
2326
+ {
2327
+ "document": {
2328
+ "path": "alpha.md",
2329
+ "name": "alpha",
2330
+ "extension": "md",
2331
+ "checksum": "enhance",
2332
+ "content": "alpha note",
2333
+ "tags": [],
2334
+ "tagParts": [],
2335
+ "tagHierarchy": [],
2336
+ "chunks": [
2337
+ {
2338
+ "id": "alpha.md#0",
2339
+ "text": "alpha note",
2340
+ "startOffset": 0,
2341
+ "endOffset": 10
2342
+ }
2343
+ ]
2344
+ },
2345
+ "score": 25,
2346
+ "snippets": [
2347
+ {
2348
+ "field": "name",
2349
+ "text": "alpha",
2350
+ "ranges": [
2351
+ {
2352
+ "start": 0,
2353
+ "end": 5
2354
+ }
2355
+ ],
2356
+ "offset": 0
2357
+ },
2358
+ {
2359
+ "field": "path",
2360
+ "text": "alpha.md",
2361
+ "ranges": [
2362
+ {
2363
+ "start": 0,
2364
+ "end": 5
2365
+ }
2366
+ ],
2367
+ "offset": 0
2368
+ },
2369
+ {
2370
+ "field": "content",
2371
+ "text": "alpha note",
2372
+ "ranges": [
2373
+ {
2374
+ "start": 0,
2375
+ "end": 5
2376
+ }
2377
+ ],
2378
+ "offset": 0,
2379
+ "chunkId": "alpha.md#0"
2380
+ }
2381
+ ],
2382
+ "retrievalMode": "lexical",
2383
+ "scoreBreakdown": {
2384
+ "lexical": 25,
2385
+ "fused": 25,
2386
+ "fusion": {
2387
+ "algorithm": "lexical-score",
2388
+ "lexicalRank": 1,
2389
+ "lexicalContribution": 25
2390
+ }
2391
+ },
2392
+ "matchedChunkIds": ["alpha.md#0"],
2393
+ "diagnostics": {
2394
+ "requestedMode": "auto",
2395
+ "appliedMode": "lexical",
2396
+ "backendKind": "turso-native",
2397
+ "lexicalCandidateCount": 2,
2398
+ "vectorCandidateCount": 0,
2399
+ "totalCandidateCount": 2,
2400
+ "modelReady": false,
2401
+ "queryEnhancement": {
2402
+ "runtimeTarget": "deno-desktop",
2403
+ "providerKind": "local-model",
2404
+ "expandQuery": true,
2405
+ "rerankResults": true,
2406
+ "applied": false,
2407
+ "skipReason": "strong-signal",
2408
+ "signal": {
2409
+ "requestedMode": "auto",
2410
+ "topLexicalScore": 25,
2411
+ "topVectorScore": 0,
2412
+ "topFusedScore": 25,
2413
+ "resultCount": 2
2414
+ }
2415
+ }
2416
+ }
2417
+ },
2418
+ {
2419
+ "document": {
2420
+ "path": "Search.md",
2421
+ "name": "Search",
2422
+ "extension": "md",
2423
+ "checksum": "native-call",
2424
+ "content": "alpha note",
2425
+ "tags": [],
2426
+ "tagParts": [],
2427
+ "tagHierarchy": [],
2428
+ "chunks": [
2429
+ {
2430
+ "id": "Search.md#0",
2431
+ "text": "alpha note",
2432
+ "startOffset": 0,
2433
+ "endOffset": 10
2434
+ }
2435
+ ]
2436
+ },
2437
+ "score": 10,
2438
+ "snippets": [
2439
+ {
2440
+ "field": "content",
2441
+ "text": "alpha note",
2442
+ "ranges": [
2443
+ {
2444
+ "start": 0,
2445
+ "end": 5
2446
+ }
2447
+ ],
2448
+ "offset": 0,
2449
+ "chunkId": "Search.md#0"
2450
+ }
2451
+ ],
2452
+ "retrievalMode": "lexical",
2453
+ "scoreBreakdown": {
2454
+ "lexical": 10,
2455
+ "fused": 10,
2456
+ "fusion": {
2457
+ "algorithm": "lexical-score",
2458
+ "lexicalRank": 2,
2459
+ "lexicalContribution": 10
2460
+ }
2461
+ },
2462
+ "matchedChunkIds": ["Search.md#0"],
2463
+ "diagnostics": {
2464
+ "requestedMode": "auto",
2465
+ "appliedMode": "lexical",
2466
+ "backendKind": "turso-native",
2467
+ "lexicalCandidateCount": 2,
2468
+ "vectorCandidateCount": 0,
2469
+ "totalCandidateCount": 2,
2470
+ "modelReady": false,
2471
+ "queryEnhancement": {
2472
+ "runtimeTarget": "deno-desktop",
2473
+ "providerKind": "local-model",
2474
+ "expandQuery": true,
2475
+ "rerankResults": true,
2476
+ "applied": false,
2477
+ "skipReason": "strong-signal",
2478
+ "signal": {
2479
+ "requestedMode": "auto",
2480
+ "topLexicalScore": 25,
2481
+ "topVectorScore": 0,
2482
+ "topFusedScore": 25,
2483
+ "resultCount": 2
2484
+ }
2485
+ }
2486
+ }
2487
+ }
2488
+ ]
2489
+ }
2490
+ },
2491
+ {
2492
+ "name": "query enhancement signal before final limit",
2493
+ "request": {
2494
+ "method": "searchDocuments",
2495
+ "args": [
2496
+ {
2497
+ "kind": "value",
2498
+ "value": "alpha"
2499
+ },
2500
+ {
2501
+ "kind": "value",
2502
+ "value": {
2503
+ "includeDiagnostics": true,
2504
+ "queryEnhancement": {
2505
+ "runtimeTarget": "tauri-desktop",
2506
+ "provider": {
2507
+ "kind": "local-model",
2508
+ "queryExpansionModelId": "test/expand",
2509
+ "rerankerModelId": "test/rerank",
2510
+ "maxExpandedQueries": 3,
2511
+ "maxRerankCandidates": 20
2512
+ },
2513
+ "expandQuery": true,
2514
+ "rerankResults": true
2515
+ },
2516
+ "limit": 1,
2517
+ "caseSensitive": true
2518
+ }
2519
+ }
2520
+ ]
2521
+ },
2522
+ "expected": {
2523
+ "kind": "value",
2524
+ "value": [
2525
+ {
2526
+ "document": {
2527
+ "path": "alpha.md",
2528
+ "name": "alpha",
2529
+ "extension": "md",
2530
+ "checksum": "enhance",
2531
+ "content": "alpha note",
2532
+ "tags": [],
2533
+ "tagParts": [],
2534
+ "tagHierarchy": [],
2535
+ "chunks": [
2536
+ {
2537
+ "id": "alpha.md#0",
2538
+ "text": "alpha note",
2539
+ "startOffset": 0,
2540
+ "endOffset": 10
2541
+ }
2542
+ ]
2543
+ },
2544
+ "score": 77,
2545
+ "snippets": [
2546
+ {
2547
+ "field": "name",
2548
+ "text": "alpha",
2549
+ "ranges": [
2550
+ {
2551
+ "start": 0,
2552
+ "end": 5
2553
+ }
2554
+ ],
2555
+ "offset": 0
2556
+ },
2557
+ {
2558
+ "field": "path",
2559
+ "text": "alpha.md",
2560
+ "ranges": [
2561
+ {
2562
+ "start": 0,
2563
+ "end": 5
2564
+ }
2565
+ ],
2566
+ "offset": 0
2567
+ },
2568
+ {
2569
+ "field": "content",
2570
+ "text": "alpha note",
2571
+ "ranges": [
2572
+ {
2573
+ "start": 0,
2574
+ "end": 5
2575
+ }
2576
+ ],
2577
+ "offset": 0,
2578
+ "chunkId": "alpha.md#0"
2579
+ }
2580
+ ],
2581
+ "retrievalMode": "lexical",
2582
+ "scoreBreakdown": {
2583
+ "lexical": 77,
2584
+ "fused": 77,
2585
+ "fusion": {
2586
+ "algorithm": "lexical-score",
2587
+ "lexicalRank": 1,
2588
+ "lexicalContribution": 77
2589
+ }
2590
+ },
2591
+ "matchedChunkIds": ["alpha.md#0"],
2592
+ "diagnostics": {
2593
+ "requestedMode": "auto",
2594
+ "appliedMode": "lexical",
2595
+ "backendKind": "turso-native",
2596
+ "lexicalCandidateCount": 2,
2597
+ "vectorCandidateCount": 0,
2598
+ "totalCandidateCount": 2,
2599
+ "modelReady": false,
2600
+ "queryEnhancement": {
2601
+ "runtimeTarget": "tauri-desktop",
2602
+ "providerKind": "local-model",
2603
+ "expandQuery": true,
2604
+ "rerankResults": true,
2605
+ "applied": false,
2606
+ "skipReason": "unsupported-runtime",
2607
+ "signal": {
2608
+ "requestedMode": "auto",
2609
+ "topLexicalScore": 77,
2610
+ "topVectorScore": 0,
2611
+ "topFusedScore": 77,
2612
+ "resultCount": 2
2613
+ }
2614
+ }
2615
+ }
2616
+ }
2617
+ ]
2618
+ }
2619
+ },
2620
+ {
2621
+ "name": "deleteSearchDocument",
2622
+ "request": {
2623
+ "method": "deleteSearchDocument",
2624
+ "args": [
2625
+ {
2626
+ "kind": "value",
2627
+ "value": "Search.md"
2628
+ }
2629
+ ]
2630
+ },
2631
+ "expected": {
2632
+ "kind": "undefined"
2633
+ }
2634
+ },
2635
+ {
2636
+ "name": "upsertTaskProjection",
2637
+ "request": {
2638
+ "method": "upsertTaskProjection",
2639
+ "args": [
2640
+ {
2641
+ "kind": "value",
2642
+ "value": {
2643
+ "documentPath": "tasks/full.md",
2644
+ "documentId": "full",
2645
+ "kind": "task",
2646
+ "title": "Full task",
2647
+ "status": "open",
2648
+ "inbox": false,
2649
+ "startKind": "anytime",
2650
+ "checklistTotal": 4,
2651
+ "checklistCompleted": 1,
2652
+ "commentCount": 2,
2653
+ "projectionVersion": 4,
2654
+ "priority": "high",
2655
+ "startDate": null,
2656
+ "planDate": "2026-10-24",
2657
+ "planKind": "time",
2658
+ "planTime": "09:30",
2659
+ "durationMinutes": 45,
2660
+ "deadline": "2026-10-30",
2661
+ "completedAt": null,
2662
+ "repeat": {
2663
+ "start": "2026-10-01",
2664
+ "rrule": "FREQ=WEEKLY;BYDAY=MO,FR",
2665
+ "anchor": "schedule",
2666
+ "missed": "carry",
2667
+ "rdate": ["2026-11-01"],
2668
+ "exdate": ["2026-11-02"],
2669
+ "resetChecklist": true,
2670
+ "paused": false,
2671
+ "pausedSince": "2026-10-02",
2672
+ "pauseRanges": [
2673
+ {
2674
+ "start": "2026-10-02",
2675
+ "end": "2026-10-03"
2676
+ }
2677
+ ],
2678
+ "lastCompletedAt": "2026-10-20T12:00:00Z",
2679
+ "completionCount": 3
2680
+ },
2681
+ "tracking": {
2682
+ "type": "count",
2683
+ "unit": "pages",
2684
+ "target": 20
2685
+ },
2686
+ "effectiveOccurrenceDate": "2026-10-24",
2687
+ "effectiveOccurrenceState": "current",
2688
+ "effectiveForDate": "2026-10-24",
2689
+ "repeatStrategy": null,
2690
+ "repeatFrequency": "weekly",
2691
+ "repeatInterval": 2,
2692
+ "repeatAnchor": "schedule",
2693
+ "structure": {
2694
+ "version": 1,
2695
+ "sourceHash": "hash",
2696
+ "entries": [
2697
+ {
2698
+ "sourceDocumentId": "full",
2699
+ "sourceDocumentPath": "tasks/full.md",
2700
+ "targetDocumentId": "child",
2701
+ "targetDocumentPath": "tasks/child.md",
2702
+ "kind": "task-entry",
2703
+ "headingPath": ["Tasks"],
2704
+ "headingLevel": 2,
2705
+ "headingText": "Tasks",
2706
+ "runId": "run",
2707
+ "positionInRun": 0,
2708
+ "sourceStart": 10,
2709
+ "sourceEnd": 30,
2710
+ "authoredLabel": "Child",
2711
+ "authoredHref": "child.md"
2712
+ }
2713
+ ],
2714
+ "runs": [
2715
+ {
2716
+ "id": "run",
2717
+ "documentId": "full",
2718
+ "documentPath": "tasks/full.md",
2719
+ "headingPath": ["Tasks"],
2720
+ "headingLevel": null,
2721
+ "headingText": null,
2722
+ "listDepth": 0,
2723
+ "startOffset": 10,
2724
+ "endOffset": 30,
2725
+ "entryCount": 1
2726
+ }
2727
+ ],
2728
+ "diagnostics": [
2729
+ {
2730
+ "code": "sample",
2731
+ "message": "retained",
2732
+ "sourceStart": 10,
2733
+ "sourceEnd": 30,
2734
+ "target": "child"
2735
+ }
2736
+ ]
2737
+ }
2738
+ }
2739
+ }
2740
+ ]
2741
+ },
2742
+ "expected": {
2743
+ "kind": "undefined"
2744
+ }
2745
+ },
2746
+ {
2747
+ "name": "queryTasks",
2748
+ "request": {
2749
+ "method": "queryTasks",
2750
+ "args": []
2751
+ },
2752
+ "expected": {
2753
+ "kind": "value",
2754
+ "value": [
2755
+ {
2756
+ "documentPath": "tasks/full.md",
2757
+ "documentId": "full",
2758
+ "kind": "task",
2759
+ "title": "Full task",
2760
+ "status": "open",
2761
+ "inbox": false,
2762
+ "startKind": "anytime",
2763
+ "checklistTotal": 4,
2764
+ "checklistCompleted": 1,
2765
+ "commentCount": 2,
2766
+ "projectionVersion": 4,
2767
+ "priority": "high",
2768
+ "startDate": null,
2769
+ "planDate": "2026-10-24",
2770
+ "planKind": "time",
2771
+ "planTime": "09:30",
2772
+ "durationMinutes": 45,
2773
+ "deadline": "2026-10-30",
2774
+ "completedAt": null,
2775
+ "repeat": {
2776
+ "start": "2026-10-01",
2777
+ "rrule": "FREQ=WEEKLY;BYDAY=MO,FR",
2778
+ "anchor": "schedule",
2779
+ "missed": "carry",
2780
+ "rdate": ["2026-11-01"],
2781
+ "exdate": ["2026-11-02"],
2782
+ "resetChecklist": true,
2783
+ "paused": false,
2784
+ "pausedSince": "2026-10-02",
2785
+ "pauseRanges": [
2786
+ {
2787
+ "start": "2026-10-02",
2788
+ "end": "2026-10-03"
2789
+ }
2790
+ ],
2791
+ "lastCompletedAt": "2026-10-20T12:00:00Z",
2792
+ "completionCount": 3
2793
+ },
2794
+ "tracking": {
2795
+ "type": "count",
2796
+ "unit": "pages",
2797
+ "target": 20
2798
+ },
2799
+ "effectiveOccurrenceDate": "2026-10-24",
2800
+ "effectiveOccurrenceState": "current",
2801
+ "effectiveForDate": "2026-10-24",
2802
+ "repeatStrategy": null,
2803
+ "repeatFrequency": "weekly",
2804
+ "repeatInterval": 2,
2805
+ "repeatAnchor": "schedule",
2806
+ "structure": {
2807
+ "version": 1,
2808
+ "sourceHash": "hash",
2809
+ "entries": [
2810
+ {
2811
+ "sourceDocumentId": "full",
2812
+ "sourceDocumentPath": "tasks/full.md",
2813
+ "targetDocumentId": "child",
2814
+ "targetDocumentPath": "tasks/child.md",
2815
+ "kind": "task-entry",
2816
+ "headingPath": ["Tasks"],
2817
+ "headingLevel": 2,
2818
+ "headingText": "Tasks",
2819
+ "runId": "run",
2820
+ "positionInRun": 0,
2821
+ "sourceStart": 10,
2822
+ "sourceEnd": 30,
2823
+ "authoredLabel": "Child",
2824
+ "authoredHref": "child.md"
2825
+ }
2826
+ ],
2827
+ "runs": [
2828
+ {
2829
+ "id": "run",
2830
+ "documentId": "full",
2831
+ "documentPath": "tasks/full.md",
2832
+ "headingPath": ["Tasks"],
2833
+ "headingLevel": null,
2834
+ "headingText": null,
2835
+ "listDepth": 0,
2836
+ "startOffset": 10,
2837
+ "endOffset": 30,
2838
+ "entryCount": 1
2839
+ }
2840
+ ],
2841
+ "diagnostics": [
2842
+ {
2843
+ "code": "sample",
2844
+ "message": "retained",
2845
+ "sourceStart": 10,
2846
+ "sourceEnd": 30,
2847
+ "target": "child"
2848
+ }
2849
+ ]
2850
+ }
2851
+ }
2852
+ ]
2853
+ }
2854
+ },
2855
+ {
2856
+ "name": "getTaskRow",
2857
+ "request": {
2858
+ "method": "getTaskRow",
2859
+ "args": [
2860
+ {
2861
+ "kind": "value",
2862
+ "value": {
2863
+ "id": "full"
2864
+ }
2865
+ }
2866
+ ]
2867
+ },
2868
+ "expected": {
2869
+ "kind": "value",
2870
+ "value": {
2871
+ "documentPath": "tasks/full.md",
2872
+ "documentId": "full",
2873
+ "kind": "task",
2874
+ "title": "Full task",
2875
+ "status": "open",
2876
+ "inbox": false,
2877
+ "startKind": "anytime",
2878
+ "checklistTotal": 4,
2879
+ "checklistCompleted": 1,
2880
+ "commentCount": 2,
2881
+ "projectionVersion": 4,
2882
+ "priority": "high",
2883
+ "startDate": null,
2884
+ "planDate": "2026-10-24",
2885
+ "planKind": "time",
2886
+ "planTime": "09:30",
2887
+ "durationMinutes": 45,
2888
+ "deadline": "2026-10-30",
2889
+ "completedAt": null,
2890
+ "repeat": {
2891
+ "start": "2026-10-01",
2892
+ "rrule": "FREQ=WEEKLY;BYDAY=MO,FR",
2893
+ "anchor": "schedule",
2894
+ "missed": "carry",
2895
+ "rdate": ["2026-11-01"],
2896
+ "exdate": ["2026-11-02"],
2897
+ "resetChecklist": true,
2898
+ "paused": false,
2899
+ "pausedSince": "2026-10-02",
2900
+ "pauseRanges": [
2901
+ {
2902
+ "start": "2026-10-02",
2903
+ "end": "2026-10-03"
2904
+ }
2905
+ ],
2906
+ "lastCompletedAt": "2026-10-20T12:00:00Z",
2907
+ "completionCount": 3
2908
+ },
2909
+ "tracking": {
2910
+ "type": "count",
2911
+ "unit": "pages",
2912
+ "target": 20
2913
+ },
2914
+ "effectiveOccurrenceDate": "2026-10-24",
2915
+ "effectiveOccurrenceState": "current",
2916
+ "effectiveForDate": "2026-10-24",
2917
+ "repeatStrategy": null,
2918
+ "repeatFrequency": "weekly",
2919
+ "repeatInterval": 2,
2920
+ "repeatAnchor": "schedule",
2921
+ "structure": {
2922
+ "version": 1,
2923
+ "sourceHash": "hash",
2924
+ "entries": [
2925
+ {
2926
+ "sourceDocumentId": "full",
2927
+ "sourceDocumentPath": "tasks/full.md",
2928
+ "targetDocumentId": "child",
2929
+ "targetDocumentPath": "tasks/child.md",
2930
+ "kind": "task-entry",
2931
+ "headingPath": ["Tasks"],
2932
+ "headingLevel": 2,
2933
+ "headingText": "Tasks",
2934
+ "runId": "run",
2935
+ "positionInRun": 0,
2936
+ "sourceStart": 10,
2937
+ "sourceEnd": 30,
2938
+ "authoredLabel": "Child",
2939
+ "authoredHref": "child.md"
2940
+ }
2941
+ ],
2942
+ "runs": [
2943
+ {
2944
+ "id": "run",
2945
+ "documentId": "full",
2946
+ "documentPath": "tasks/full.md",
2947
+ "headingPath": ["Tasks"],
2948
+ "headingLevel": null,
2949
+ "headingText": null,
2950
+ "listDepth": 0,
2951
+ "startOffset": 10,
2952
+ "endOffset": 30,
2953
+ "entryCount": 1
2954
+ }
2955
+ ],
2956
+ "diagnostics": [
2957
+ {
2958
+ "code": "sample",
2959
+ "message": "retained",
2960
+ "sourceStart": 10,
2961
+ "sourceEnd": 30,
2962
+ "target": "child"
2963
+ }
2964
+ ]
2965
+ }
2966
+ }
2967
+ }
2968
+ },
2969
+ {
2970
+ "name": "listChildLinks",
2971
+ "request": {
2972
+ "method": "listChildLinks",
2973
+ "args": [
2974
+ {
2975
+ "kind": "value",
2976
+ "value": {
2977
+ "sourcePath": "tasks/full.md"
2978
+ }
2979
+ }
2980
+ ]
2981
+ },
2982
+ "expected": {
2983
+ "kind": "value",
2984
+ "value": []
2985
+ }
2986
+ },
2987
+ {
2988
+ "name": "listTaskDescendants",
2989
+ "request": {
2990
+ "method": "listTaskDescendants",
2991
+ "args": [
2992
+ {
2993
+ "kind": "value",
2994
+ "value": "tasks/full.md"
2995
+ }
2996
+ ]
2997
+ },
2998
+ "expected": {
2999
+ "kind": "value",
3000
+ "value": []
3001
+ }
3002
+ },
3003
+ {
3004
+ "name": "deleteTaskProjection",
3005
+ "request": {
3006
+ "method": "deleteTaskProjection",
3007
+ "args": [
3008
+ {
3009
+ "kind": "value",
3010
+ "value": "tasks/full.md"
3011
+ }
3012
+ ]
3013
+ },
3014
+ "expected": {
3015
+ "kind": "undefined"
3016
+ }
3017
+ },
3018
+ {
3019
+ "name": "registerProjectionDefinition",
3020
+ "request": {
3021
+ "method": "registerProjectionDefinition",
3022
+ "args": [
3023
+ {
3024
+ "kind": "value",
3025
+ "value": {
3026
+ "projectionId": "calls/items",
3027
+ "ownerPluginId": "calls",
3028
+ "schemaVersion": 1,
3029
+ "configHash": "calls-v1",
3030
+ "visibility": "private",
3031
+ "fields": {
3032
+ "title": {
3033
+ "type": "string",
3034
+ "indexed": true
3035
+ }
3036
+ },
3037
+ "active": true,
3038
+ "updatedAt": 100
3039
+ }
3040
+ }
3041
+ ]
3042
+ },
3043
+ "expected": {
3044
+ "kind": "undefined"
3045
+ }
3046
+ },
3047
+ {
3048
+ "name": "replaceProjectionSource",
3049
+ "request": {
3050
+ "method": "replaceProjectionSource",
3051
+ "args": [
3052
+ {
3053
+ "kind": "value",
3054
+ "value": {
3055
+ "projectionId": "calls/items",
3056
+ "sourcePath": "Projection.md",
3057
+ "sourceHash": "hash",
3058
+ "writerPluginId": "calls",
3059
+ "rows": [
3060
+ {
3061
+ "id": "row",
3062
+ "kind": "note",
3063
+ "data": {
3064
+ "title": "日本語 🪨"
3065
+ }
3066
+ }
3067
+ ],
3068
+ "edges": []
3069
+ }
3070
+ }
3071
+ ]
3072
+ },
3073
+ "expected": {
3074
+ "kind": "undefined"
3075
+ }
3076
+ },
3077
+ {
3078
+ "name": "queryProjection",
3079
+ "request": {
3080
+ "method": "queryProjection",
3081
+ "args": [
3082
+ {
3083
+ "kind": "value",
3084
+ "value": "calls/items"
3085
+ },
3086
+ {
3087
+ "kind": "undefined"
3088
+ },
3089
+ {
3090
+ "kind": "value",
3091
+ "value": "calls"
3092
+ }
3093
+ ]
3094
+ },
3095
+ "expected": {
3096
+ "kind": "value",
3097
+ "value": {
3098
+ "rows": [
3099
+ {
3100
+ "title": "日本語 🪨"
3101
+ }
3102
+ ],
3103
+ "revision": 32,
3104
+ "complete": true,
3105
+ "indexStatus": "ready"
3106
+ }
3107
+ }
3108
+ },
3109
+ {
3110
+ "name": "getProjectionRow",
3111
+ "request": {
3112
+ "method": "getProjectionRow",
3113
+ "args": [
3114
+ {
3115
+ "kind": "value",
3116
+ "value": "calls/items"
3117
+ },
3118
+ {
3119
+ "kind": "value",
3120
+ "value": "row"
3121
+ },
3122
+ {
3123
+ "kind": "value",
3124
+ "value": "calls"
3125
+ }
3126
+ ]
3127
+ },
3128
+ "expected": {
3129
+ "kind": "value",
3130
+ "value": {
3131
+ "title": "日本語 🪨"
3132
+ }
3133
+ }
3134
+ },
3135
+ {
3136
+ "name": "queryRelated",
3137
+ "request": {
3138
+ "method": "queryRelated",
3139
+ "args": [
3140
+ {
3141
+ "kind": "value",
3142
+ "value": {
3143
+ "projectionId": "calls/items",
3144
+ "rowId": "row",
3145
+ "relation": "reference"
3146
+ }
3147
+ },
3148
+ {
3149
+ "kind": "value",
3150
+ "value": "calls"
3151
+ }
3152
+ ]
3153
+ },
3154
+ "expected": {
3155
+ "kind": "value",
3156
+ "value": {
3157
+ "rows": [],
3158
+ "revision": 32,
3159
+ "complete": true,
3160
+ "indexStatus": "ready"
3161
+ }
3162
+ }
3163
+ },
3164
+ {
3165
+ "name": "markProjectionSourceError",
3166
+ "request": {
3167
+ "method": "markProjectionSourceError",
3168
+ "args": [
3169
+ {
3170
+ "kind": "value",
3171
+ "value": {
3172
+ "projectionId": "calls/items",
3173
+ "sourcePath": "Projection.md",
3174
+ "sourceHash": "hash",
3175
+ "writerPluginId": "calls",
3176
+ "error": "processor failed"
3177
+ }
3178
+ }
3179
+ ]
3180
+ },
3181
+ "expected": {
3182
+ "kind": "undefined"
3183
+ }
3184
+ },
3185
+ {
3186
+ "name": "deleteProjectionSource",
3187
+ "request": {
3188
+ "method": "deleteProjectionSource",
3189
+ "args": [
3190
+ {
3191
+ "kind": "value",
3192
+ "value": "calls/items"
3193
+ },
3194
+ {
3195
+ "kind": "value",
3196
+ "value": "Projection.md"
3197
+ },
3198
+ {
3199
+ "kind": "value",
3200
+ "value": "calls"
3201
+ }
3202
+ ]
3203
+ },
3204
+ "expected": {
3205
+ "kind": "undefined"
3206
+ }
3207
+ },
3208
+ {
3209
+ "name": "unregisterProjectionDefinition",
3210
+ "request": {
3211
+ "method": "unregisterProjectionDefinition",
3212
+ "args": [
3213
+ {
3214
+ "kind": "value",
3215
+ "value": "calls/items"
3216
+ }
3217
+ ]
3218
+ },
3219
+ "expected": {
3220
+ "kind": "undefined"
3221
+ }
3222
+ }
3223
+ ]
3224
+ }