@qvac/core 1.0.0-rc.2 → 1.0.0-rc.3

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 (195) hide show
  1. package/CHANGELOG.md +158 -2
  2. package/dist-lib/index.d.ts +1 -0
  3. package/dist-lib/index.js +1 -0
  4. package/dist-lib/lib/api/chunk-delta.d.ts +7 -2
  5. package/dist-lib/lib/api/chunk-delta.js +89 -7
  6. package/dist-lib/lib/api/chunks.js +14 -8
  7. package/dist-lib/lib/api/config.d.ts +4 -1
  8. package/dist-lib/lib/api/config.js +45 -4
  9. package/dist-lib/lib/api/custom-models.js +3 -5
  10. package/dist-lib/lib/api/devices.js +3 -1
  11. package/dist-lib/lib/api/files.d.ts +1 -1
  12. package/dist-lib/lib/api/files.js +65 -8
  13. package/dist-lib/lib/api/instrument.js +12 -4
  14. package/dist-lib/lib/api/members.js +7 -13
  15. package/dist-lib/lib/api/mesh.d.ts +1 -3
  16. package/dist-lib/lib/api/mesh.js +2 -2
  17. package/dist-lib/lib/api/notifications.js +8 -4
  18. package/dist-lib/lib/api/projects.js +5 -1
  19. package/dist-lib/lib/api/rag.js +32 -19
  20. package/dist-lib/lib/api/served.js +2 -1
  21. package/dist-lib/lib/api/workspace.js +0 -1
  22. package/dist-lib/lib/assistant/harness.d.ts +8 -2
  23. package/dist-lib/lib/assistant/harness.js +17 -4
  24. package/dist-lib/lib/assistant/history.d.ts +1 -1
  25. package/dist-lib/lib/assistant/history.js +19 -13
  26. package/dist-lib/lib/assistant/message.d.ts +6 -1
  27. package/dist-lib/lib/assistant/message.js +22 -2
  28. package/dist-lib/lib/assistant/model-round.d.ts +5 -0
  29. package/dist-lib/lib/assistant/model-round.js +46 -18
  30. package/dist-lib/lib/assistant/pdf-budget.d.ts +10 -2
  31. package/dist-lib/lib/assistant/pdf-budget.js +10 -11
  32. package/dist-lib/lib/assistant/pdf-pages.d.ts +25 -0
  33. package/dist-lib/lib/assistant/pdf-pages.js +75 -0
  34. package/dist-lib/lib/assistant/round-host.js +5 -3
  35. package/dist-lib/lib/assistant-client.d.ts +2 -1
  36. package/dist-lib/lib/assistant-client.js +24 -6
  37. package/dist-lib/lib/assistant-tree.d.ts +2 -0
  38. package/dist-lib/lib/assistant-tree.js +8 -5
  39. package/dist-lib/lib/assistant.d.ts +20 -7
  40. package/dist-lib/lib/assistant.js +468 -240
  41. package/dist-lib/lib/client.js +10 -1
  42. package/dist-lib/lib/compaction.d.ts +3 -1
  43. package/dist-lib/lib/compaction.js +18 -4
  44. package/dist-lib/lib/constants.d.ts +3 -0
  45. package/dist-lib/lib/constants.js +3 -0
  46. package/dist-lib/lib/core/chat-activity.js +13 -16
  47. package/dist-lib/lib/core/chat-copy.js +1 -1
  48. package/dist-lib/lib/core/chat-fork.js +2 -1
  49. package/dist-lib/lib/core/chat-move.d.ts +4 -0
  50. package/dist-lib/lib/core/chat-move.js +42 -11
  51. package/dist-lib/lib/core/chat.d.ts +0 -1
  52. package/dist-lib/lib/core/chat.js +1 -1
  53. package/dist-lib/lib/core/chunk.d.ts +14 -3
  54. package/dist-lib/lib/core/chunk.js +112 -22
  55. package/dist-lib/lib/core/collections.d.ts +12 -1
  56. package/dist-lib/lib/core/collections.js +12 -1
  57. package/dist-lib/lib/core/config-value.d.ts +6 -0
  58. package/dist-lib/lib/core/config-value.js +14 -0
  59. package/dist-lib/lib/core/contract/activity.d.ts +3 -2
  60. package/dist-lib/lib/core/contract/activity.js +39 -21
  61. package/dist-lib/lib/core/contract/agent-join.js +15 -19
  62. package/dist-lib/lib/core/contract/agents.js +8 -7
  63. package/dist-lib/lib/core/contract/chat.d.ts +3 -0
  64. package/dist-lib/lib/core/contract/chat.js +12 -1
  65. package/dist-lib/lib/core/contract/chunks.js +16 -6
  66. package/dist-lib/lib/core/contract/devices.js +6 -4
  67. package/dist-lib/lib/core/contract/index.js +2 -1
  68. package/dist-lib/lib/core/contract/invites.js +12 -31
  69. package/dist-lib/lib/core/contract/joined-meshes.js +2 -1
  70. package/dist-lib/lib/core/contract/mesh-rules.js +4 -0
  71. package/dist-lib/lib/core/contract/model-requests.js +7 -6
  72. package/dist-lib/lib/core/contract/project-device-keys.js +15 -6
  73. package/dist-lib/lib/core/contract/project-host-keys.js +5 -4
  74. package/dist-lib/lib/core/contract/projects.js +12 -13
  75. package/dist-lib/lib/core/contract/public-seeds.js +5 -5
  76. package/dist-lib/lib/core/contract/roles.js +2 -1
  77. package/dist-lib/lib/core/contract/run-requests.d.ts +1 -1
  78. package/dist-lib/lib/core/contract/run-requests.js +19 -13
  79. package/dist-lib/lib/core/contract/shipped-rows.d.ts +2 -0
  80. package/dist-lib/lib/core/contract/shipped-rows.js +22 -0
  81. package/dist-lib/lib/core/contract/workspace.js +4 -10
  82. package/dist-lib/lib/core/contract/writers.js +20 -6
  83. package/dist-lib/lib/core/devices.d.ts +2 -1
  84. package/dist-lib/lib/core/devices.js +4 -2
  85. package/dist-lib/lib/core/document-attachment.d.ts +6 -3
  86. package/dist-lib/lib/core/document-attachment.js +10 -5
  87. package/dist-lib/lib/core/files/attachments.js +3 -3
  88. package/dist-lib/lib/core/files/index.d.ts +8 -5
  89. package/dist-lib/lib/core/files/index.js +109 -18
  90. package/dist-lib/lib/core/files/processing/index.d.ts +1 -1
  91. package/dist-lib/lib/core/files/processing/index.js +8 -2
  92. package/dist-lib/lib/core/files/processing/source.d.ts +1 -0
  93. package/dist-lib/lib/core/files/processing/source.js +3 -0
  94. package/dist-lib/lib/core/files/processing/state.d.ts +1 -0
  95. package/dist-lib/lib/core/files/processing/state.js +7 -0
  96. package/dist-lib/lib/core/files/rag/build.d.ts +1 -0
  97. package/dist-lib/lib/core/files/rag/build.js +14 -1
  98. package/dist-lib/lib/core/files/rag/index.d.ts +1 -1
  99. package/dist-lib/lib/core/files/rag/index.js +1 -1
  100. package/dist-lib/lib/core/files/rag/produce.js +1 -0
  101. package/dist-lib/lib/core/files/rag/retrieval/full-text.d.ts +2 -0
  102. package/dist-lib/lib/core/files/rag/retrieval/full-text.js +7 -1
  103. package/dist-lib/lib/core/first-event.d.ts +6 -0
  104. package/dist-lib/lib/core/first-event.js +13 -0
  105. package/dist-lib/lib/core/invite.d.ts +2 -2
  106. package/dist-lib/lib/core/invite.js +5 -4
  107. package/dist-lib/lib/core/local/index.d.ts +10 -1
  108. package/dist-lib/lib/core/local/index.js +105 -10
  109. package/dist-lib/lib/core/mesh.d.ts +15 -4
  110. package/dist-lib/lib/core/mesh.js +128 -57
  111. package/dist-lib/lib/core/migrations/chat-chunks.d.ts +4 -0
  112. package/dist-lib/lib/core/migrations/chat-chunks.js +47 -0
  113. package/dist-lib/lib/core/migrations/file-index.d.ts +1 -1
  114. package/dist-lib/lib/core/migrations/file-index.js +6 -2
  115. package/dist-lib/lib/core/migrations/index.d.ts +2 -1
  116. package/dist-lib/lib/core/migrations/index.js +66 -9
  117. package/dist-lib/lib/core/notification.js +96 -23
  118. package/dist-lib/lib/core/pdf/figure.d.ts +22 -0
  119. package/dist-lib/lib/core/pdf/figure.js +64 -0
  120. package/dist-lib/lib/core/pdf/rasterize.d.ts +10 -1
  121. package/dist-lib/lib/core/pdf/rasterize.js +72 -22
  122. package/dist-lib/lib/core/peer-duplex.js +57 -5
  123. package/dist-lib/lib/core/public-mesh.js +8 -2
  124. package/dist-lib/lib/core/run-requests.js +2 -3
  125. package/dist-lib/lib/core/senders.d.ts +7 -6
  126. package/dist-lib/lib/core/senders.js +23 -30
  127. package/dist-lib/lib/core/shared-agents.d.ts +1 -0
  128. package/dist-lib/lib/core/shared-agents.js +47 -19
  129. package/dist-lib/lib/core/sync/background.d.ts +3 -15
  130. package/dist-lib/lib/core/sync/background.js +25 -102
  131. package/dist-lib/lib/core/sync/devices.js +6 -3
  132. package/dist-lib/lib/core/sync/index.js +12 -2
  133. package/dist-lib/lib/core/sync-status.js +3 -3
  134. package/dist-lib/lib/core.d.ts +59 -10
  135. package/dist-lib/lib/core.js +706 -174
  136. package/dist-lib/lib/credential-pusher.d.ts +11 -7
  137. package/dist-lib/lib/credential-pusher.js +40 -8
  138. package/dist-lib/lib/device-tree.d.ts +18 -0
  139. package/dist-lib/lib/device-tree.js +32 -0
  140. package/dist-lib/lib/doctor/redact.js +1 -1
  141. package/dist-lib/lib/errors.d.ts +4 -0
  142. package/dist-lib/lib/errors.js +4 -0
  143. package/dist-lib/lib/fs-drive-bridge.d.ts +7 -0
  144. package/dist-lib/lib/fs-drive-bridge.js +308 -30
  145. package/dist-lib/lib/integrations/setup-routes.js +7 -5
  146. package/dist-lib/lib/knowledge-search.d.ts +1 -1
  147. package/dist-lib/lib/knowledge-search.js +5 -46
  148. package/dist-lib/lib/kv-cache-retention.d.ts +35 -0
  149. package/dist-lib/lib/kv-cache-retention.js +98 -0
  150. package/dist-lib/lib/latest-frame.d.ts +10 -0
  151. package/dist-lib/lib/latest-frame.js +48 -0
  152. package/dist-lib/lib/model-download.d.ts +6 -1
  153. package/dist-lib/lib/model-download.js +32 -17
  154. package/dist-lib/lib/oauth/resolve.js +13 -5
  155. package/dist-lib/lib/reconnecting-watch.js +19 -11
  156. package/dist-lib/lib/run-notices.d.ts +2 -0
  157. package/dist-lib/lib/run-notices.js +5 -0
  158. package/dist-lib/lib/run-replay.d.ts +13 -1
  159. package/dist-lib/lib/run-replay.js +58 -21
  160. package/dist-lib/schema/build.js +66 -57
  161. package/dist-lib/schema/content.js +2 -1
  162. package/dist-lib/schema/engine.js +37 -5
  163. package/dist-lib/schema/field-order.js +7 -1
  164. package/dist-lib/schema/indexes.d.ts +4 -0
  165. package/dist-lib/schema/indexes.js +18 -0
  166. package/dist-lib/schema/local.js +9 -2
  167. package/dist-lib/schema/qvac.js +112 -4
  168. package/dist-lib/spec/bind.js +3 -0
  169. package/dist-lib/spec/calls.js +1 -0
  170. package/dist-lib/spec/capabilities.d.ts +2 -0
  171. package/dist-lib/spec/hrpc/hrpc.json +13 -0
  172. package/dist-lib/spec/hrpc/index.js +15 -3
  173. package/dist-lib/spec/hrpc/messages.js +1475 -1392
  174. package/dist-lib/spec/hyperschema/index.js +1475 -1392
  175. package/dist-lib/spec/hyperschema/schema.json +86 -1
  176. package/dist-lib/spec/hyperschema/types.d.ts +21 -1
  177. package/dist-lib/spec/local/hyperdb/messages.js +110 -54
  178. package/dist-lib/spec/local/hyperschema/index.js +56 -28
  179. package/dist-lib/spec/local/hyperschema/schema.json +55 -20
  180. package/dist-lib/spec/local/hyperschema/types.d.ts +8 -1
  181. package/dist-lib/spec/mesh/hyperdb/db.json +255 -51
  182. package/dist-lib/spec/mesh/hyperdb/index.js +1063 -404
  183. package/dist-lib/spec/mesh/hyperdb/messages.js +1647 -1214
  184. package/dist-lib/spec/mesh/hyperdispatch/dispatch.json +62 -56
  185. package/dist-lib/spec/mesh/hyperdispatch/index.js +156 -139
  186. package/dist-lib/spec/mesh/hyperdispatch/messages.js +787 -629
  187. package/dist-lib/spec/mesh/hyperschema/index.js +787 -629
  188. package/dist-lib/spec/mesh/hyperschema/schema.json +283 -174
  189. package/dist-lib/spec/mesh/hyperschema/types.d.ts +29 -1
  190. package/package.json +23 -17
  191. package/worker/assistant-sidecar.mjs +3 -0
  192. package/dist-lib/lib/core/files/processing/settle.d.ts +0 -13
  193. package/dist-lib/lib/core/files/processing/settle.js +0 -86
  194. package/dist-lib/lib/core/migrations/device-indexes.d.ts +0 -2
  195. package/dist-lib/lib/core/migrations/device-indexes.js +0 -7
@@ -1,5 +1,5 @@
1
1
  // This file is autogenerated by hyperschema-ts
2
- // Schema version: 17
2
+ // Schema version: 18
3
3
  // Do not edit manually.
4
4
 
5
5
  export type QvacChunkType = "user-message" | "content" | "thinking" | "tool-call" | "tool-result" | "attachment" | "approval-request" | "run-status" | "run-request" | "sources" | "compaction" | "context" | "model-request" | "round-reset" | "agent-switch"
@@ -142,6 +142,7 @@ export interface QvacChunkV1 {
142
142
  capabilityArgs?: unknown | null
143
143
  enhance?: QvacEnhanceMode | null
144
144
  sourceId?: string | null
145
+ falsyResult?: string | null
145
146
  requesterMemberId?: Buffer | null
146
147
  senderNameAtSend?: string | null
147
148
  context?: QvacChunkContentContext | null
@@ -194,6 +195,7 @@ export interface QvacAppendChunkOperationV1 {
194
195
  capabilityArgs?: unknown | null
195
196
  enhance?: QvacEnhanceMode | null
196
197
  sourceId?: string | null
198
+ falsyResult?: string | null
197
199
  senderNameAtSend?: string | null
198
200
  context?: QvacChunkContentContext | null
199
201
  modelRequest?: QvacChunkContentModelRequest | null
@@ -315,6 +317,7 @@ export interface QvacDeviceV1 {
315
317
  claimedMemberId?: Buffer | null
316
318
  inviteToken?: Buffer | null
317
319
  deviceSignature?: Buffer | null
320
+ customModels?: QvacCustomModelReportEntry[] | null
318
321
  }
319
322
 
320
323
  export type QvacDevice = (QvacDeviceV1 & { version?: number })
@@ -366,6 +369,7 @@ export interface QvacReportDeviceCapabilitiesOperationV1 {
366
369
  cachedModelNames?: string[] | null
367
370
  readySkillNames?: string[] | null
368
371
  toolCatalog?: QvacToolReportEntry[] | null
372
+ customModels?: QvacCustomModelReportEntry[] | null
369
373
  }
370
374
 
371
375
  export type QvacReportDeviceCapabilitiesOperation = (QvacReportDeviceCapabilitiesOperationV1 & { version?: number })
@@ -432,6 +436,7 @@ export interface QvacMeshInviteV1 {
432
436
  deviceProof?: Buffer | null
433
437
  workspace?: boolean
434
438
  workspaceName?: string | null
439
+ publicHeads?: QvacInvitePublicHead[] | null
435
440
  }
436
441
 
437
442
  export type QvacMeshInvite = (QvacMeshInviteV1 & { version?: number })
@@ -702,6 +707,7 @@ export interface QvacJoinedMeshV1 {
702
707
  shared?: boolean
703
708
  sharedAt?: number
704
709
  workspace?: boolean
710
+ kicked?: boolean
705
711
  }
706
712
 
707
713
  export type QvacJoinedMesh = (QvacJoinedMeshV1 & { version?: number })
@@ -882,6 +888,19 @@ export interface QvacChatForkSource {
882
888
  runId?: string | null
883
889
  }
884
890
 
891
+ export interface QvacCustomModelReportEntry {
892
+ name: string
893
+ label: string
894
+ taskType?: string | null
895
+ expectedSize?: number
896
+ }
897
+
898
+ export interface QvacReindexChatChunksOperationV1 {
899
+ chatId: string
900
+ }
901
+
902
+ export type QvacReindexChatChunksOperation = (QvacReindexChatChunksOperationV1 & { version?: number })
903
+
885
904
  export interface QvacChunkContentSourcesV2 {
886
905
  sources: QvacRagSource[]
887
906
  notice?: string | null
@@ -933,6 +952,11 @@ export interface QvacChatSuggestion {
933
952
  runId: string
934
953
  }
935
954
 
955
+ export interface QvacInvitePublicHead {
956
+ meshKey: Buffer
957
+ head: QvacAutobeeHead
958
+ }
959
+
936
960
  export interface QvacKnowledgeV2 {
937
961
  id: string
938
962
  chatId?: string | null
@@ -1384,6 +1408,9 @@ export interface SchemaTypes {
1384
1408
  "@qvac/mesh-seed-v1": QvacMeshSeedV1
1385
1409
  "@qvac/mesh-seed": QvacMeshSeed
1386
1410
  "@qvac/chat-fork-source": QvacChatForkSource
1411
+ "@qvac/custom-model-report-entry": QvacCustomModelReportEntry
1412
+ "@qvac/reindex-chat-chunks-operation-v1": QvacReindexChatChunksOperationV1
1413
+ "@qvac/reindex-chat-chunks-operation": QvacReindexChatChunksOperation
1387
1414
  "@qvac/chunk-content-sources-v2": QvacChunkContentSourcesV2
1388
1415
  "@qvac/model-request-state": QvacModelRequestState
1389
1416
  "@qvac/chunk-content-context-v1": QvacChunkContentContextV1
@@ -1395,6 +1422,7 @@ export interface SchemaTypes {
1395
1422
  "@qvac/chunk-content-agent-switch-v1": QvacChunkContentAgentSwitchV1
1396
1423
  "@qvac/chunk-content-agent-switch": QvacChunkContentAgentSwitch
1397
1424
  "@qvac/chat-suggestion": QvacChatSuggestion
1425
+ "@qvac/invite-public-head": QvacInvitePublicHead
1398
1426
  "@qvac/knowledge-v2": QvacKnowledgeV2
1399
1427
  "@qvac/indexing-status-v2": QvacIndexingStatusV2
1400
1428
  "@qvac/mesh-rules-v1": QvacMeshRulesV1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qvac/core",
3
- "version": "1.0.0-rc.2",
3
+ "version": "1.0.0-rc.3",
4
4
  "type": "module",
5
5
  "description": "Peer-to-peer AI across your devices",
6
6
  "engines": {
@@ -136,6 +136,9 @@
136
136
  },
137
137
  "scripts": {
138
138
  "build:schema": "bare schema/build.ts",
139
+ "bench:chat-speed": "QVAC_TEST_MODELS=1 QVAC_TEST=1 QVAC_NO_SKILL_BIN_PROBE=1 bare bench/chat-speed/bench.ts",
140
+ "bench:chat-speed:report": "node --experimental-strip-types bench/chat-speed/report.ts",
141
+ "bench:chat-speed:test": "node --experimental-strip-types bench/chat-speed/test/metrics.ts && node --experimental-strip-types bench/chat-speed/test/report.ts",
139
142
  "bench:rag": "node --experimental-strip-types bench/rag/cli.ts",
140
143
  "bench:rag:database": "node --experimental-strip-types bench/rag/database/cli.ts",
141
144
  "bench:rag:indexing": "node --experimental-strip-types bench/rag/indexing/cli.ts",
@@ -161,6 +164,7 @@
161
164
  "mesh-pair-and-migrate": "bare examples/mesh-pair-and-migrate.mjs",
162
165
  "mesh-scoped-catalog": "bare examples/mesh-scoped-catalog.mjs",
163
166
  "mesh-peer": "bare examples/mesh-peer.mjs",
167
+ "device-tree": "bare examples/device-tree.mjs",
164
168
  "mesh-member-admin": "bare examples/mesh-member-admin.mjs",
165
169
  "mesh-lab": "bare examples/mesh-lab.mjs",
166
170
  "chat-read-marker": "bare examples/chat-read-marker.mjs",
@@ -169,9 +173,11 @@
169
173
  "custom-models": "bare examples/custom-models.mjs",
170
174
  "mesh-recover-account": "bare examples/mesh-recover-account.mjs",
171
175
  "mesh-user-names": "bare examples/mesh-user-names.mjs",
172
- "test": "npm run test:bare && npm run bench:rag:test",
173
- "test:bare": "QVAC_NO_SKILL_BIN_PROBE=1 QVAC_TEST=1 brittle-jobs -j 2 --retries 1 --timeout 600000 'test/*.ts' 'test/{api,basic,host,rag}/**/*.ts'",
176
+ "test": "npm run test:bare && npm run bench:rag:test && npm run bench:chat-speed:test",
177
+ "test:bare": "QVAC_NO_SKILL_BIN_PROBE=1 QVAC_TEST=1 brittle-jobs -j ${BRITTLE_JOBS:-2} --timeout ${BRITTLE_TIMEOUT:-180000} 'test/*.ts' 'test/{api,app,basic,host,rag}/**/*.ts'",
174
178
  "test:model": "QVAC_TEST_MODELS=1 npm run test:bare",
179
+ "test:model-lane": "QVAC_NO_SKILL_BIN_PROBE=1 QVAC_TEST=1 brittle-jobs -j 1 --timeout 7200000 'test/model/*.ts'",
180
+ "test:scale": "QVAC_NO_SKILL_BIN_PROBE=1 QVAC_TEST=1 QVAC_SCALE_REPORT=${QVAC_SCALE_REPORT:-scale-report.txt} brittle-jobs -j 1 --timeout ${BRITTLE_TIMEOUT:-600000} --idle-timeout ${BRITTLE_IDLE_TIMEOUT:-300000} 'test/scale/*.ts'",
175
181
  "format": "prettier . --write",
176
182
  "lint": "prettier . --check && lunte && tsc --noEmit",
177
183
  "build:bundle": "node scripts/build-bundle.mjs",
@@ -239,11 +245,11 @@
239
245
  },
240
246
  "dependencies": {
241
247
  "@qvac/error": "^0.2.0",
242
- "@qvac/harness": "1.0.0-rc.8",
248
+ "@qvac/harness": "1.0.0-rc.12",
243
249
  "@qvac/logging": "^0.2.0",
244
- "@qvac/skills": "^0.1.18",
250
+ "@qvac/skills": "^0.1.19",
245
251
  "asenion": "^0.1.0",
246
- "autobee": "^2.11.8",
252
+ "autobee": "^2.12.1",
247
253
  "b4a": "^1.9.0",
248
254
  "bare-abort-controller": "^1.1.2",
249
255
  "bare-buffer": "^3.6.1",
@@ -260,7 +266,7 @@
260
266
  "bare-module": "~7.4.0",
261
267
  "bare-os": "^3.9.1",
262
268
  "bare-path": "^3.0.1",
263
- "bare-pdfium": "^1.5.5",
269
+ "bare-pdfium": "^1.8.0",
264
270
  "bare-pipe": "^4.2.2",
265
271
  "bare-process": "^4.5.1",
266
272
  "bare-rpc": "^1.3.7",
@@ -280,11 +286,11 @@
280
286
  "hrpc": "^4.3.0",
281
287
  "hyperblobs": "^2.12.1",
282
288
  "hyperconf": "^1.0.3",
283
- "hypercore-blob-server": "^1.12.0",
289
+ "hypercore-blob-server": "^1.15.1",
284
290
  "hypercore-crypto": "^3.7.0",
285
291
  "hypercore-id-encoding": "^1.3.0",
286
292
  "hypercore-storage": "^3.4.0",
287
- "hyperdb": "^6.9.0",
293
+ "hyperdb": "^6.11.0",
288
294
  "hyperdispatch": "^1.6.0",
289
295
  "hyperdrive": "^13.3.3",
290
296
  "hyperschema": "1.26.2",
@@ -295,7 +301,7 @@
295
301
  "protomux": "^3.11.0",
296
302
  "protomux-wakeup": "^2.9.0",
297
303
  "rache": "^1.0.0",
298
- "rag-extract": "^0.1.1",
304
+ "rag-extract": "^0.2.2",
299
305
  "ready-guard": "^1.0.0",
300
306
  "ready-resource": "^1.2.0",
301
307
  "rocksdb-native": "^3.17.4",
@@ -309,6 +315,7 @@
309
315
  "zod": "^4.3.6"
310
316
  },
311
317
  "devDependencies": {
318
+ "@qvac/core-previous": "npm:@qvac/core@0.10.3",
312
319
  "@qvac/asr-ggml": "0.4.2",
313
320
  "@qvac/audiogen-ggml": "^0.8.0",
314
321
  "@qvac/diffusion-cpp": "^0.30.0",
@@ -349,15 +356,14 @@
349
356
  },
350
357
  "homepage": "https://github.com/tetherto/qvac-core",
351
358
  "patchedDependencies": {
352
- "hypercore-blob-server@1.15.0": "patches/hypercore-blob-server@1.15.0.patch",
353
359
  "pyodide@314.0.2": "patches/pyodide@314.0.2.patch",
354
360
  "localwatch@1.4.3": "patches/localwatch@1.4.3.patch",
355
361
  "bare-stow@0.1.5": "patches/bare-stow@0.1.5.patch",
356
362
  "blind-peering@2.9.5": "patches/blind-peering@2.9.5.patch",
357
- "hyperdb@6.9.0": "patches/hyperdb@6.9.0.patch",
363
+ "hyperdb@6.11.0": "patches/hyperdb@6.11.0.patch",
358
364
  "corestore@7.12.6": "patches/corestore@7.12.6.patch",
359
- "@qvac/inference@0.22.0": "patches/@qvac%2Finference@0.22.0.patch",
360
- "hyperschema@1.26.2": "patches/hyperschema@1.26.2.patch"
365
+ "hyperschema@1.26.2": "patches/hyperschema@1.26.2.patch",
366
+ "hyperbee2@2.21.2": "patches/hyperbee2@2.21.2.patch"
361
367
  },
362
368
  "overrides": {
363
369
  "bare-sidecar": "0.5.7",
@@ -368,9 +374,9 @@
368
374
  "bare-http1": "4.6.1",
369
375
  "lodash": "4.18.1",
370
376
  "hyperschema": "1.26.2",
371
- "hyperdb": "^6.9.0",
372
- "hypercore": "^11.39.0",
373
- "hyperbee2": "^2.18.0",
377
+ "hyperdb": "^6.11.0",
378
+ "hypercore": "^11.39.5",
379
+ "hyperbee2": "^2.21.2",
374
380
  "tar": "^7.5.22",
375
381
  "bare-tls": "^3.1.13"
376
382
  },
@@ -127,6 +127,9 @@ export default stowEntry((ipc) => {
127
127
  eager
128
128
  }),
129
129
  onHarness: (harness, { engine }) => startCredentialPusher(harness, engine, logger),
130
+ // the sweep drops what this mesh does not reference, so a shared dir loses other instances' pages
131
+ imageCacheDir: `${storage.root}/image-cache`,
132
+ inferenceCallsDir: `${storage.root}/inspector`,
130
133
  runReplayDir: `${storage.root}/run-replay`,
131
134
  logger,
132
135
  fakeModels
@@ -1,13 +0,0 @@
1
- import type { AbortSignal } from 'bare-abort-controller';
2
- import type { Files } from '../index.ts';
3
- import type { FileProcessing } from './index.ts';
4
- export interface SettleOptions {
5
- readonly timeoutMs?: number;
6
- readonly signal?: AbortSignal;
7
- }
8
- export interface SettleFilesOptions extends SettleOptions {
9
- readonly ids: string[];
10
- readonly processing: FileProcessing;
11
- readonly chatIds: () => Promise<string[]>;
12
- }
13
- export declare function settleFiles(files: Files, options: SettleFilesOptions): Promise<void>;
@@ -1,86 +0,0 @@
1
- import { AbortedError } from '@qvac/harness/race-abort';
2
- export function settleFiles(files, options) {
3
- const { ids, processing, signal, timeoutMs = 5_000 } = options;
4
- if (signal?.aborted) {
5
- return Promise.reject(new AbortedError());
6
- }
7
- if (!ids.length || timeoutMs <= 0 || files.closed) {
8
- return Promise.resolve();
9
- }
10
- const deadline = Date.now() + timeoutMs;
11
- const wanted = new Set(ids);
12
- return new Promise((resolve, reject) => {
13
- let done = false;
14
- let checking = false;
15
- let dirty = false;
16
- const timer = setTimeout(() => finish(), timeoutMs);
17
- const finish = (error) => {
18
- if (done)
19
- return;
20
- done = true;
21
- clearTimeout(timer);
22
- files.unwatch(check);
23
- files.off('close', onClose);
24
- signal?.removeEventListener('abort', onAbort);
25
- if (error) {
26
- reject(error);
27
- }
28
- else {
29
- resolve();
30
- }
31
- };
32
- const onClose = () => finish();
33
- const onAbort = () => finish(new AbortedError());
34
- const chats = options.chatIds();
35
- const check = () => {
36
- dirty = true;
37
- if (checking || done) {
38
- return;
39
- }
40
- checking = true;
41
- void (async () => {
42
- while (dirty && !done) {
43
- dirty = false;
44
- const snapshots = await Promise.all((await chats).map((chatId) => files.status(chatId)));
45
- if (done) {
46
- return;
47
- }
48
- if (!processing.active) {
49
- return finish();
50
- }
51
- const waiting = snapshots
52
- .flatMap((snapshot) => snapshot.files)
53
- .some((file) => {
54
- if (!wanted.has(file.fileId) || file.readyForChat)
55
- return false;
56
- const rag = file.processors.find((entry) => entry.processorId === 'rag');
57
- if (!rag || rag.state === 'not-applicable') {
58
- return false;
59
- }
60
- if (rag.state === 'failed' && (!rag.retryAt || rag.retryAt > deadline)) {
61
- return false;
62
- }
63
- return (processing.pending(file.fileId) ||
64
- rag.state === 'running' ||
65
- (rag.retryAt !== undefined && rag.retryAt <= deadline));
66
- });
67
- if (!waiting) {
68
- finish();
69
- }
70
- }
71
- })()
72
- .catch(finish)
73
- .finally(() => {
74
- checking = false;
75
- if (dirty && !done) {
76
- check();
77
- }
78
- });
79
- };
80
- files.watch(check);
81
- files.on('close', onClose);
82
- signal?.addEventListener('abort', onAbort, { once: true });
83
- processing.prioritize(ids);
84
- check();
85
- });
86
- }
@@ -1,2 +0,0 @@
1
- import type { Mesh } from '../mesh.ts';
2
- export declare function reindexDevices(mesh: Mesh): Promise<boolean>;
@@ -1,7 +0,0 @@
1
- import { liveDevicesIndexed } from '../contract/activity.js';
2
- export async function reindexDevices(mesh) {
3
- if (!mesh.writable || (await liveDevicesIndexed(mesh.view)))
4
- return false;
5
- await mesh.dispatch('reindex-devices', {});
6
- return true;
7
- }