@lapis-notes/api 0.1.4 → 0.2.1

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 (188) hide show
  1. package/CHANGELOG.md +206 -0
  2. package/README.md +21 -2
  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 +21 -9
  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 +21 -3
  31. package/dist/context.svelte.js +63 -20
  32. package/dist/diagnostics.d.ts +8 -0
  33. package/dist/diagnostics.js +6 -0
  34. package/dist/editor-save-context.d.ts +12 -1
  35. package/dist/editor-save-context.js +32 -1
  36. package/dist/editor-view-registry.d.ts +10 -0
  37. package/dist/editor-view-registry.js +44 -4
  38. package/dist/editor.svelte.js +128 -37
  39. package/dist/embed-registry.d.ts +10 -0
  40. package/dist/embed-registry.js +15 -0
  41. package/dist/file-editing-failures.d.ts +2 -0
  42. package/dist/file-editing-failures.js +29 -0
  43. package/dist/file-editing-native-issues.d.ts +19 -0
  44. package/dist/file-editing-native-issues.js +65 -0
  45. package/dist/file-editing-sessions.d.ts +56 -8
  46. package/dist/file-editing-sessions.js +185 -15
  47. package/dist/file-manager.d.ts +8 -1
  48. package/dist/file-manager.js +37 -3
  49. package/dist/file-state-store.d.ts +5 -0
  50. package/dist/file-state-store.js +34 -0
  51. package/dist/file-text-conflicts.d.ts +25 -0
  52. package/dist/file-text-conflicts.js +35 -0
  53. package/dist/file-text-mutation.d.ts +13 -0
  54. package/dist/file-text-mutation.js +100 -0
  55. package/dist/file-text-persistence.d.ts +36 -0
  56. package/dist/file-text-persistence.js +234 -0
  57. package/dist/file-text-state-writer.d.ts +34 -0
  58. package/dist/file-text-state-writer.js +183 -0
  59. package/dist/files-configuration.d.ts +20 -0
  60. package/dist/files-configuration.js +47 -0
  61. package/dist/generated/plugin-host-modules.schema.generated.d.ts +87 -37
  62. package/dist/generated/plugin-host-modules.schema.generated.js +102 -37
  63. package/dist/glob.d.ts +3 -0
  64. package/dist/glob.js +2 -1
  65. package/dist/icons/changes.d.ts +3 -0
  66. package/dist/icons/changes.js +16 -0
  67. package/dist/icons/index.d.ts +5 -1
  68. package/dist/icons/index.js +44 -3
  69. package/dist/icons/registry.d.ts +35 -0
  70. package/dist/icons/registry.js +154 -0
  71. package/dist/icons/safe-svg.d.ts +2 -0
  72. package/dist/icons/safe-svg.js +44 -0
  73. package/dist/index.d.ts +5 -1
  74. package/dist/index.js +3 -1
  75. package/dist/lapis-extension.d.ts +6 -2
  76. package/dist/lapis-extension.js +2 -0
  77. package/dist/metadata.svelte.js +45 -2
  78. package/dist/native-background-indexing.d.ts +48 -0
  79. package/dist/native-background-indexing.js +208 -0
  80. package/dist/native-database-protocol.d.ts +29 -0
  81. package/dist/native-database-protocol.js +1 -0
  82. package/dist/native-editing-intent-lease.d.ts +17 -0
  83. package/dist/native-editing-intent-lease.js +188 -0
  84. package/dist/native-editing-intents-protocol.d.ts +70 -0
  85. package/dist/native-editing-intents-protocol.js +1 -0
  86. package/dist/native-editing-intents.d.ts +8 -0
  87. package/dist/native-editing-intents.js +1 -0
  88. package/dist/native-editing-problems.d.ts +3 -0
  89. package/dist/native-editing-problems.js +180 -0
  90. package/dist/native-editing-recovery.d.ts +24 -0
  91. package/dist/native-editing-recovery.js +198 -0
  92. package/dist/native-editing-session.d.ts +51 -0
  93. package/dist/native-editing-session.js +251 -0
  94. package/dist/native-history-index-protocol.d.ts +80 -0
  95. package/dist/native-history-index-protocol.js +1 -0
  96. package/dist/native-history-index.d.ts +6 -0
  97. package/dist/native-history-index.js +1 -0
  98. package/dist/native-indexing-protocol.d.ts +63 -0
  99. package/dist/native-indexing-protocol.js +1 -0
  100. package/dist/native-participant-protocol.d.ts +67 -0
  101. package/dist/native-participant-protocol.js +3 -0
  102. package/dist/native-queue-protocol.d.ts +73 -0
  103. package/dist/native-queue-protocol.js +3 -0
  104. package/dist/native-tasks-protocol.d.ts +264 -0
  105. package/dist/native-tasks-protocol.js +1 -0
  106. package/dist/native-tasks.d.ts +35 -0
  107. package/dist/native-tasks.js +79 -0
  108. package/dist/native-turn-protocol.d.ts +81 -0
  109. package/dist/native-turn-protocol.js +1 -0
  110. package/dist/native-turns.d.ts +29 -0
  111. package/dist/native-turns.js +2 -0
  112. package/dist/plugin-asset-server.js +3 -2
  113. package/dist/plugin-dependency-resolver.d.ts +1 -1
  114. package/dist/plugin-distribution/compatibility.d.ts +1 -1
  115. package/dist/plugin-distribution/compatibility.js +10 -5
  116. package/dist/plugin-distribution/installed-plugin-state.js +2 -1
  117. package/dist/plugin-distribution/installer.d.ts +6 -0
  118. package/dist/plugin-distribution/installer.js +90 -37
  119. package/dist/plugin-distribution/manager.d.ts +4 -1
  120. package/dist/plugin-distribution/manager.js +12 -5
  121. package/dist/plugin-distribution/registry-cache.js +2 -1
  122. package/dist/plugin-distribution/registry-source-state.js +2 -1
  123. package/dist/plugin-distribution/schemas.d.ts +26 -8
  124. package/dist/plugin-distribution/schemas.js +2 -1
  125. package/dist/plugin-distribution/types.d.ts +4 -0
  126. package/dist/plugin-manager.d.ts +20 -4
  127. package/dist/plugin-manager.js +228 -64
  128. package/dist/plugin-runtime-entry.d.ts +1 -1
  129. package/dist/plugin-runtime-entry.js +16 -0
  130. package/dist/plugin.d.ts +18 -2
  131. package/dist/plugin.js +93 -39
  132. package/dist/registry-schema/catalog-v1.d.ts +60 -9
  133. package/dist/registry-schema/catalog-v1.js +2 -1
  134. package/dist/registry-schema/catalog-v2.d.ts +60 -9
  135. package/dist/registry-schema/catalog-v2.js +1 -1
  136. package/dist/search-result-provider.d.ts +95 -0
  137. package/dist/search-result-provider.js +42 -0
  138. package/dist/status-bar.svelte.d.ts +26 -20
  139. package/dist/status-bar.svelte.js +1 -0
  140. package/dist/storage/app-database.d.ts +6 -2
  141. package/dist/storage/app-database.js +41 -34
  142. package/dist/storage/desktop-native.d.ts +5 -3
  143. package/dist/storage/desktop-native.js +59 -6
  144. package/dist/storage/directory-watcher.d.ts +27 -0
  145. package/dist/storage/directory-watcher.js +201 -0
  146. package/dist/storage/fs.d.ts +14 -27
  147. package/dist/storage/fs.js +2 -168
  148. package/dist/storage/index-projection.js +33 -15
  149. package/dist/storage/memory-vault-adapter.d.ts +2 -0
  150. package/dist/storage/memory-vault-adapter.js +14 -1
  151. package/dist/storage/path.d.ts +6 -2
  152. package/dist/storage/path.js +8 -2
  153. package/dist/storage/projection-query-candidates.d.ts +3 -0
  154. package/dist/storage/projection-query-candidates.js +69 -0
  155. package/dist/storage/remote-app-database.d.ts +2 -2
  156. package/dist/storage/remote-app-database.js +1 -1
  157. package/dist/storage/runtime.d.ts +3 -0
  158. package/dist/storage/runtime.js +3 -0
  159. package/dist/storage/search-embedding-record.d.ts +3 -0
  160. package/dist/storage/search-embedding-record.js +18 -0
  161. package/dist/storage/turso-app-database.d.ts +2 -0
  162. package/dist/storage/turso-app-database.js +67 -30
  163. package/dist/storage/vault-listing.d.ts +3 -0
  164. package/dist/storage/vault-listing.js +36 -0
  165. package/dist/storage/vault-reconciliation.d.ts +19 -0
  166. package/dist/storage/vault-reconciliation.js +137 -0
  167. package/dist/storage/vault-session.d.ts +8 -0
  168. package/dist/storage/vault-session.js +10 -2
  169. package/dist/storage/vault.svelte.d.ts +53 -4
  170. package/dist/storage/vault.svelte.js +223 -87
  171. package/dist/sync-host.d.ts +12 -3
  172. package/dist/sync-host.js +5 -1
  173. package/dist/vault-change-views.d.ts +4 -0
  174. package/dist/vault-change-views.js +43 -0
  175. package/dist/vault-changes.d.ts +37 -0
  176. package/dist/vault-changes.js +228 -0
  177. package/dist/view.svelte.d.ts +182 -149
  178. package/dist/view.svelte.js +11 -2
  179. package/dist/workspace-close-guard.d.ts +3 -0
  180. package/dist/workspace-close-guard.js +35 -0
  181. package/dist/workspace-host-internal.js +10 -2
  182. package/dist/workspace-layout-normalizer.d.ts +4 -2
  183. package/dist/workspace-layout-normalizer.js +5 -5
  184. package/dist/workspace-view-document.d.ts +3 -0
  185. package/dist/workspace-view-document.js +12 -0
  186. package/dist/workspace.svelte.d.ts +13 -2
  187. package/dist/workspace.svelte.js +371 -82
  188. package/package.json +45 -8
@@ -0,0 +1,409 @@
1
+ {
2
+ "records": [
3
+ {
4
+ "input": {
5
+ "path": "A.md",
6
+ "sourceProviderId": "markdown",
7
+ "name": "A",
8
+ "extension": "md",
9
+ "checksum": "hash-a",
10
+ "content": "alpha🪨 beta\noops\nagain",
11
+ "tags": ["#Legacy"],
12
+ "tagParts": ["Legacy"],
13
+ "tagHierarchy": ["Legacy"],
14
+ "metadataText": "legacy metadata",
15
+ "chunks": [
16
+ {
17
+ "id": "A.md#ready",
18
+ "text": "alpha🪨",
19
+ "startOffset": 0,
20
+ "endOffset": 7,
21
+ "heading": "Alpha",
22
+ "kind": "paragraph",
23
+ "embedding": {
24
+ "status": "ready",
25
+ "modelId": "fixture/vector",
26
+ "modelVersion": "1",
27
+ "dimensions": 3,
28
+ "vector": [1, 0, 0],
29
+ "fingerprint": "ready-fingerprint",
30
+ "dirty": false,
31
+ "updatedAt": 11.25
32
+ }
33
+ },
34
+ {
35
+ "id": "A.md#pending",
36
+ "text": "beta",
37
+ "startOffset": 8,
38
+ "endOffset": 12,
39
+ "kind": "list",
40
+ "embedding": {
41
+ "status": "pending",
42
+ "modelId": "fixture/vector",
43
+ "dimensions": 3,
44
+ "dirty": true
45
+ }
46
+ },
47
+ {
48
+ "id": "A.md#error",
49
+ "text": "oops",
50
+ "startOffset": 13,
51
+ "endOffset": 17,
52
+ "kind": "code",
53
+ "embedding": {
54
+ "status": "error",
55
+ "modelId": "fixture/vector",
56
+ "error": ""
57
+ }
58
+ },
59
+ {
60
+ "id": "A.md#error-2",
61
+ "text": "again",
62
+ "startOffset": 18,
63
+ "endOffset": 23,
64
+ "kind": "fallback",
65
+ "embedding": {
66
+ "status": "error",
67
+ "modelId": "fixture/vector",
68
+ "error": "model-missing"
69
+ }
70
+ }
71
+ ]
72
+ },
73
+ "stored": {
74
+ "path": "A.md",
75
+ "sourceProviderId": "markdown",
76
+ "name": "A",
77
+ "extension": "md",
78
+ "checksum": "hash-a",
79
+ "content": "alpha🪨 beta\noops\nagain",
80
+ "tags": ["#Legacy"],
81
+ "tagParts": ["Legacy"],
82
+ "tagHierarchy": ["Legacy"],
83
+ "metadataText": "legacy metadata",
84
+ "chunks": [
85
+ {
86
+ "id": "A.md#ready",
87
+ "text": "alpha🪨",
88
+ "startOffset": 0,
89
+ "endOffset": 7,
90
+ "heading": "Alpha",
91
+ "kind": "paragraph",
92
+ "embedding": {
93
+ "status": "ready",
94
+ "modelId": "fixture/vector",
95
+ "modelVersion": "1",
96
+ "dimensions": 3,
97
+ "vector": [1, 0, 0],
98
+ "fingerprint": "ready-fingerprint",
99
+ "dirty": false,
100
+ "updatedAt": 11.25
101
+ }
102
+ },
103
+ {
104
+ "id": "A.md#pending",
105
+ "text": "beta",
106
+ "startOffset": 8,
107
+ "endOffset": 12,
108
+ "kind": "list",
109
+ "embedding": {
110
+ "status": "pending",
111
+ "modelId": "fixture/vector",
112
+ "dimensions": 3,
113
+ "dirty": true
114
+ }
115
+ },
116
+ {
117
+ "id": "A.md#error",
118
+ "text": "oops",
119
+ "startOffset": 13,
120
+ "endOffset": 17,
121
+ "kind": "code",
122
+ "embedding": {
123
+ "status": "error",
124
+ "modelId": "fixture/vector",
125
+ "error": ""
126
+ }
127
+ },
128
+ {
129
+ "id": "A.md#error-2",
130
+ "text": "again",
131
+ "startOffset": 18,
132
+ "endOffset": 23,
133
+ "kind": "fallback",
134
+ "embedding": {
135
+ "status": "error",
136
+ "modelId": "fixture/vector",
137
+ "error": "model-missing"
138
+ }
139
+ }
140
+ ]
141
+ }
142
+ },
143
+ {
144
+ "input": {
145
+ "path": "B.md",
146
+ "sourceProviderId": "markdown",
147
+ "name": "B",
148
+ "extension": "md",
149
+ "checksum": "hash-b",
150
+ "content": "---\ntitle: B\n---\n# B\nhello",
151
+ "tags": ["stale"],
152
+ "tagParts": [],
153
+ "tagHierarchy": [],
154
+ "metadataText": "old",
155
+ "sourceMetadata": {
156
+ "metadataHash": "hash-b-meta",
157
+ "providerVersion": "markdown-1",
158
+ "projectionSignature": "chunks-1",
159
+ "sourceMtime": 12.5,
160
+ "sourceSize": 26,
161
+ "rawTags": ["#Work/Notes", "#Team", "#Work/Notes", ""],
162
+ "frontmatter": {
163
+ "title": "B",
164
+ "2": "two",
165
+ "1": "one"
166
+ },
167
+ "frontmatterEndOffset": 17,
168
+ "headings": [
169
+ {
170
+ "heading": "B",
171
+ "level": 1,
172
+ "position": {
173
+ "start": {
174
+ "offset": 17
175
+ },
176
+ "end": {
177
+ "offset": 20
178
+ }
179
+ }
180
+ }
181
+ ],
182
+ "sections": [
183
+ {
184
+ "type": "heading",
185
+ "position": {
186
+ "start": {
187
+ "offset": 17
188
+ },
189
+ "end": {
190
+ "offset": 20
191
+ }
192
+ }
193
+ },
194
+ {
195
+ "type": "paragraph",
196
+ "position": {
197
+ "start": {
198
+ "offset": 21
199
+ },
200
+ "end": {
201
+ "offset": 26
202
+ }
203
+ }
204
+ }
205
+ ],
206
+ "chunking": {
207
+ "targetChars": 1000,
208
+ "breakpointWindowChars": 100,
209
+ "breakpointDecay": 0.5
210
+ }
211
+ }
212
+ },
213
+ "stored": {
214
+ "path": "B.md",
215
+ "sourceProviderId": "markdown",
216
+ "name": "B",
217
+ "extension": "md",
218
+ "checksum": "hash-b",
219
+ "content": "---\ntitle: B\n---\n# B\nhello",
220
+ "tags": ["Work/Notes", "Team"],
221
+ "tagParts": ["Work", "Notes", "Team"],
222
+ "tagHierarchy": ["Work", "Work/Notes", "Team"],
223
+ "metadataText": "{\"1\":\"one\",\"2\":\"two\",\"title\":\"B\"}",
224
+ "sourceMetadata": {
225
+ "metadataHash": "hash-b-meta",
226
+ "providerVersion": "markdown-1",
227
+ "projectionSignature": "chunks-1",
228
+ "sourceMtime": 12.5,
229
+ "sourceSize": 26,
230
+ "rawTags": ["#Work/Notes", "#Team", "#Work/Notes", ""],
231
+ "frontmatter": {
232
+ "title": "B",
233
+ "2": "two",
234
+ "1": "one"
235
+ },
236
+ "frontmatterEndOffset": 17,
237
+ "headings": [
238
+ {
239
+ "heading": "B",
240
+ "level": 1,
241
+ "position": {
242
+ "start": {
243
+ "offset": 17
244
+ },
245
+ "end": {
246
+ "offset": 20
247
+ }
248
+ }
249
+ }
250
+ ],
251
+ "sections": [
252
+ {
253
+ "type": "heading",
254
+ "position": {
255
+ "start": {
256
+ "offset": 17
257
+ },
258
+ "end": {
259
+ "offset": 20
260
+ }
261
+ }
262
+ },
263
+ {
264
+ "type": "paragraph",
265
+ "position": {
266
+ "start": {
267
+ "offset": 21
268
+ },
269
+ "end": {
270
+ "offset": 26
271
+ }
272
+ }
273
+ }
274
+ ],
275
+ "chunking": {
276
+ "targetChars": 1000,
277
+ "breakpointWindowChars": 100,
278
+ "breakpointDecay": 0.5
279
+ }
280
+ },
281
+ "chunks": [
282
+ {
283
+ "id": "B.md#chunk-17-26",
284
+ "text": "# B\nhello",
285
+ "startOffset": 17,
286
+ "endOffset": 26,
287
+ "heading": "B",
288
+ "kind": "heading"
289
+ }
290
+ ]
291
+ }
292
+ },
293
+ {
294
+ "input": {
295
+ "path": "C.md",
296
+ "sourceProviderId": "memory-curated",
297
+ "name": "C",
298
+ "extension": "md",
299
+ "checksum": "hash-c",
300
+ "content": " \n\t",
301
+ "tags": [],
302
+ "tagParts": [],
303
+ "tagHierarchy": [],
304
+ "sourceMetadata": {
305
+ "rawTags": ["#Empty"],
306
+ "frontmatter": null,
307
+ "headings": [],
308
+ "sections": [],
309
+ "chunking": {
310
+ "targetChars": 100,
311
+ "breakpointWindowChars": 10,
312
+ "breakpointDecay": 0.5
313
+ }
314
+ }
315
+ },
316
+ "stored": {
317
+ "path": "C.md",
318
+ "sourceProviderId": "memory-curated",
319
+ "name": "C",
320
+ "extension": "md",
321
+ "checksum": "hash-c",
322
+ "content": " \n\t",
323
+ "tags": ["Empty"],
324
+ "tagParts": ["Empty"],
325
+ "tagHierarchy": ["Empty"],
326
+ "sourceMetadata": {
327
+ "rawTags": ["#Empty"],
328
+ "frontmatter": null,
329
+ "headings": [],
330
+ "sections": [],
331
+ "chunking": {
332
+ "targetChars": 100,
333
+ "breakpointWindowChars": 10,
334
+ "breakpointDecay": 0.5
335
+ }
336
+ },
337
+ "metadataText": "{}",
338
+ "chunks": []
339
+ }
340
+ },
341
+ {
342
+ "input": {
343
+ "path": "D.md",
344
+ "name": "D",
345
+ "extension": "md",
346
+ "checksum": "hash-d",
347
+ "content": "no authored chunks",
348
+ "tags": [],
349
+ "tagParts": [],
350
+ "tagHierarchy": []
351
+ },
352
+ "stored": {
353
+ "path": "D.md",
354
+ "name": "D",
355
+ "extension": "md",
356
+ "checksum": "hash-d",
357
+ "content": "no authored chunks",
358
+ "tags": [],
359
+ "tagParts": [],
360
+ "tagHierarchy": []
361
+ }
362
+ }
363
+ ],
364
+ "manifest": [
365
+ {
366
+ "path": "A.md",
367
+ "checksum": "hash-a",
368
+ "sourceProviderId": "markdown"
369
+ },
370
+ {
371
+ "path": "B.md",
372
+ "checksum": "hash-b",
373
+ "sourceProviderId": "markdown",
374
+ "metadataHash": "hash-b-meta",
375
+ "providerVersion": "markdown-1",
376
+ "projectionSignature": "chunks-1",
377
+ "sourceMtime": 12.5,
378
+ "sourceSize": 26
379
+ },
380
+ {
381
+ "path": "C.md",
382
+ "checksum": "hash-c",
383
+ "sourceProviderId": "memory-curated"
384
+ },
385
+ {
386
+ "path": "D.md",
387
+ "checksum": "hash-d"
388
+ }
389
+ ],
390
+ "stats": {
391
+ "documentCount": 4,
392
+ "chunkCount": 5,
393
+ "readyChunkCount": 1,
394
+ "pendingChunkCount": 2,
395
+ "errorChunkCount": 2,
396
+ "lastError": ""
397
+ },
398
+ "replacement": {
399
+ "path": "B.md",
400
+ "name": "B replaced",
401
+ "extension": "md",
402
+ "checksum": "replaced",
403
+ "content": "replacement",
404
+ "tags": [],
405
+ "tagParts": [],
406
+ "tagHierarchy": [],
407
+ "chunks": []
408
+ }
409
+ }