@qvac/core 0.6.1 → 0.6.2

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 (47) hide show
  1. package/CHANGELOG.md +94 -1
  2. package/dist-lib/lib/api/chat.d.ts +1 -1
  3. package/dist-lib/lib/api/chat.js +2 -1
  4. package/dist-lib/lib/api/index.d.ts +3 -1
  5. package/dist-lib/lib/api/index.js +2 -0
  6. package/dist-lib/lib/api/watchable.d.ts +1 -0
  7. package/dist-lib/lib/api/watchable.js +1 -1
  8. package/dist-lib/lib/assistant/harness.d.ts +2 -0
  9. package/dist-lib/lib/assistant/harness.js +13 -9
  10. package/dist-lib/lib/assistant-tree.js +4 -0
  11. package/dist-lib/lib/assistant.d.ts +4 -1
  12. package/dist-lib/lib/assistant.js +44 -8
  13. package/dist-lib/lib/client.js +2 -1
  14. package/dist-lib/lib/collabora/entry.js +13 -19
  15. package/dist-lib/lib/collabora/worker.js +77 -18
  16. package/dist-lib/lib/core/chat.d.ts +1 -0
  17. package/dist-lib/lib/core/chat.js +17 -0
  18. package/dist-lib/lib/core/contract/chat.js +10 -3
  19. package/dist-lib/lib/core.d.ts +12 -2
  20. package/dist-lib/lib/core.js +57 -14
  21. package/dist-lib/lib/mesh-scoped-engine.js +3 -0
  22. package/dist-lib/lib/model-download.d.ts +11 -7
  23. package/dist-lib/lib/model-download.js +22 -21
  24. package/dist-lib/lib/models-watch.d.ts +6 -0
  25. package/dist-lib/lib/models-watch.js +45 -0
  26. package/dist-lib/schema/engine.d.ts +1 -0
  27. package/dist-lib/schema/engine.js +57 -3
  28. package/dist-lib/schema/field-order.js +3 -1
  29. package/dist-lib/schema/qvac.js +2 -1
  30. package/dist-lib/spec/bind.js +14 -0
  31. package/dist-lib/spec/calls.js +3 -0
  32. package/dist-lib/spec/capabilities.d.ts +6 -0
  33. package/dist-lib/spec/hrpc/hrpc.json +39 -0
  34. package/dist-lib/spec/hrpc/index.js +41 -4
  35. package/dist-lib/spec/hrpc/messages.js +788 -583
  36. package/dist-lib/spec/hyperschema/index.js +788 -583
  37. package/dist-lib/spec/hyperschema/schema.json +149 -0
  38. package/dist-lib/spec/hyperschema/types.d.ts +29 -0
  39. package/dist-lib/spec/mesh/hyperdb/messages.js +36 -8
  40. package/dist-lib/spec/mesh/hyperdispatch/messages.js +19 -5
  41. package/dist-lib/spec/mesh/hyperschema/index.js +19 -5
  42. package/dist-lib/spec/mesh/hyperschema/schema.json +6 -1
  43. package/dist-lib/spec/mesh/hyperschema/types.d.ts +2 -1
  44. package/package.json +22 -9
  45. package/tui/app.mjs +3 -2
  46. package/dist-lib/lib/model-clamp.d.ts +0 -6
  47. package/dist-lib/lib/model-clamp.js +0 -23
@@ -884,6 +884,11 @@
884
884
  "name": "groupId",
885
885
  "type": "string",
886
886
  "version": 1
887
+ },
888
+ {
889
+ "name": "readThrough",
890
+ "type": "uint",
891
+ "version": 1
887
892
  }
888
893
  ]
889
894
  },
@@ -4264,6 +4269,50 @@
4264
4269
  }
4265
4270
  ]
4266
4271
  },
4272
+ {
4273
+ "name": "model-task-type",
4274
+ "namespace": "assistant",
4275
+ "offset": 1,
4276
+ "enum": [
4277
+ {
4278
+ "key": "llm",
4279
+ "version": 1
4280
+ },
4281
+ {
4282
+ "key": "embeddings",
4283
+ "version": 1
4284
+ },
4285
+ {
4286
+ "key": "speech-to-text",
4287
+ "version": 1
4288
+ },
4289
+ {
4290
+ "key": "text-to-speech",
4291
+ "version": 1
4292
+ },
4293
+ {
4294
+ "key": "image-generation",
4295
+ "version": 1
4296
+ },
4297
+ {
4298
+ "key": "audio-generation",
4299
+ "version": 1
4300
+ },
4301
+ {
4302
+ "key": "translation",
4303
+ "version": 1
4304
+ },
4305
+ {
4306
+ "key": "text-recognition",
4307
+ "version": 1
4308
+ },
4309
+ {
4310
+ "key": "other",
4311
+ "version": 1
4312
+ }
4313
+ ],
4314
+ "strings": true
4315
+ },
4267
4316
  {
4268
4317
  "name": "list-models-request",
4269
4318
  "namespace": "assistant",
@@ -4284,6 +4333,16 @@
4284
4333
  "name": "fullRegistry",
4285
4334
  "type": "bool",
4286
4335
  "version": 1
4336
+ },
4337
+ {
4338
+ "name": "taskType",
4339
+ "type": "@assistant/model-task-type",
4340
+ "version": 1
4341
+ },
4342
+ {
4343
+ "name": "excludeCustom",
4344
+ "type": "bool",
4345
+ "version": 1
4287
4346
  }
4288
4347
  ]
4289
4348
  },
@@ -4344,6 +4403,16 @@
4344
4403
  "name": "supportsImages",
4345
4404
  "type": "bool",
4346
4405
  "version": 1
4406
+ },
4407
+ {
4408
+ "name": "taskType",
4409
+ "type": "@assistant/model-task-type",
4410
+ "version": 1
4411
+ },
4412
+ {
4413
+ "name": "isLoading",
4414
+ "type": "bool",
4415
+ "version": 1
4347
4416
  }
4348
4417
  ]
4349
4418
  },
@@ -8110,6 +8179,86 @@
8110
8179
  "version": 1
8111
8180
  }
8112
8181
  ]
8182
+ },
8183
+ {
8184
+ "name": "model-use",
8185
+ "namespace": "assistant",
8186
+ "offset": 1,
8187
+ "enum": [
8188
+ {
8189
+ "key": "chat",
8190
+ "version": 1
8191
+ },
8192
+ {
8193
+ "key": "image",
8194
+ "version": 1
8195
+ },
8196
+ {
8197
+ "key": "music",
8198
+ "version": 1
8199
+ }
8200
+ ],
8201
+ "strings": true
8202
+ },
8203
+ {
8204
+ "name": "model-users-request",
8205
+ "namespace": "assistant",
8206
+ "compact": false,
8207
+ "flagsPosition": -1,
8208
+ "fields": [
8209
+ {
8210
+ "name": "name",
8211
+ "required": true,
8212
+ "type": "string",
8213
+ "version": 1
8214
+ }
8215
+ ]
8216
+ },
8217
+ {
8218
+ "name": "model-user",
8219
+ "namespace": "assistant",
8220
+ "compact": false,
8221
+ "flagsPosition": -1,
8222
+ "fields": [
8223
+ {
8224
+ "name": "agentId",
8225
+ "required": true,
8226
+ "type": "string",
8227
+ "version": 1
8228
+ },
8229
+ {
8230
+ "name": "meshId",
8231
+ "required": true,
8232
+ "type": "string",
8233
+ "version": 1
8234
+ },
8235
+ {
8236
+ "name": "agentName",
8237
+ "required": true,
8238
+ "type": "string",
8239
+ "version": 1
8240
+ },
8241
+ {
8242
+ "name": "via",
8243
+ "required": true,
8244
+ "type": "@assistant/model-use",
8245
+ "version": 1
8246
+ }
8247
+ ]
8248
+ },
8249
+ {
8250
+ "name": "model-users",
8251
+ "namespace": "assistant",
8252
+ "compact": false,
8253
+ "flagsPosition": 0,
8254
+ "fields": [
8255
+ {
8256
+ "name": "agents",
8257
+ "array": true,
8258
+ "type": "@assistant/model-user",
8259
+ "version": 1
8260
+ }
8261
+ ]
8113
8262
  }
8114
8263
  ]
8115
8264
  }
@@ -171,6 +171,7 @@ export interface AssistantChat {
171
171
  updatedAt?: number
172
172
  lastActivityAt?: number
173
173
  groupId?: string | null
174
+ readThrough?: number
174
175
  }
175
176
 
176
177
  export interface AssistantChatGroup {
@@ -882,10 +883,14 @@ export interface AssistantJoinMeshRequest {
882
883
  invite: string
883
884
  }
884
885
 
886
+ export type AssistantModelTaskType = "llm" | "embeddings" | "speech-to-text" | "text-to-speech" | "image-generation" | "audio-generation" | "translation" | "text-recognition" | "other"
887
+
885
888
  export interface AssistantListModelsRequest {
886
889
  type?: string | null
887
890
  cachedOnly?: boolean
888
891
  fullRegistry?: boolean
892
+ taskType?: AssistantModelTaskType | null
893
+ excludeCustom?: boolean
889
894
  }
890
895
 
891
896
  export interface AssistantModelInfo {
@@ -898,6 +903,8 @@ export interface AssistantModelInfo {
898
903
  expectedSize: number
899
904
  actualSize?: number
900
905
  supportsImages?: boolean
906
+ taskType?: AssistantModelTaskType | null
907
+ isLoading?: boolean
901
908
  }
902
909
 
903
910
  export interface AssistantModelInfoList {
@@ -1758,6 +1765,23 @@ export interface AssistantUnloadModelResponse {
1758
1765
  unloaded?: boolean
1759
1766
  }
1760
1767
 
1768
+ export type AssistantModelUse = "chat" | "image" | "music"
1769
+
1770
+ export interface AssistantModelUsersRequest {
1771
+ name: string
1772
+ }
1773
+
1774
+ export interface AssistantModelUser {
1775
+ agentId: string
1776
+ meshId: string
1777
+ agentName: string
1778
+ via: AssistantModelUse
1779
+ }
1780
+
1781
+ export interface AssistantModelUsers {
1782
+ agents?: AssistantModelUser[] | null
1783
+ }
1784
+
1761
1785
  export interface SchemaTypes {
1762
1786
  "@assistant/empty": AssistantEmpty
1763
1787
  "@assistant/ok-response": AssistantOkResponse
@@ -1904,6 +1928,7 @@ export interface SchemaTypes {
1904
1928
  "@assistant/sync-status": AssistantSyncStatus
1905
1929
  "@assistant/mesh-invite-response": AssistantMeshInviteResponse
1906
1930
  "@assistant/join-mesh-request": AssistantJoinMeshRequest
1931
+ "@assistant/model-task-type": AssistantModelTaskType
1907
1932
  "@assistant/list-models-request": AssistantListModelsRequest
1908
1933
  "@assistant/model-info": AssistantModelInfo
1909
1934
  "@assistant/model-info-list": AssistantModelInfoList
@@ -2045,4 +2070,8 @@ export interface SchemaTypes {
2045
2070
  "@assistant/load-model-response": AssistantLoadModelResponse
2046
2071
  "@assistant/unload-model-request": AssistantUnloadModelRequest
2047
2072
  "@assistant/unload-model-response": AssistantUnloadModelResponse
2073
+ "@assistant/model-use": AssistantModelUse
2074
+ "@assistant/model-users-request": AssistantModelUsersRequest
2075
+ "@assistant/model-user": AssistantModelUser
2076
+ "@assistant/model-users": AssistantModelUsers
2048
2077
  }
@@ -1,12 +1,12 @@
1
1
  // This file is autogenerated by the hyperschema compiler
2
- // Schema Version: 11
2
+ // Schema Version: 12
3
3
  /* eslint-disable camelcase */
4
4
  /* eslint-disable quotes */
5
5
  /* eslint-disable space-before-function-paren */
6
6
 
7
7
  import { c } from 'hyperschema/runtime'
8
8
 
9
- const VERSION = 11
9
+ const VERSION = 12
10
10
 
11
11
  // eslint-disable-next-line no-unused-vars
12
12
  let version = VERSION
@@ -2088,17 +2088,28 @@ const encoding44 = {
2088
2088
  // @qvac/chat-v1
2089
2089
  const encoding45 = {
2090
2090
  preencode(state, m) {
2091
+ const flags =
2092
+ (m.deletedAt ? 1 : 0) |
2093
+ (m.ragEnabled ? 2 : 0) |
2094
+ (m.webSearchEnabled ? 4 : 0) |
2095
+ (m.updatedAt ? 8 : 0) |
2096
+ ((version >= 5 && m.groupId) ? 16 : 0) |
2097
+ ((version >= 6 && m.rank) ? 32 : 0) |
2098
+ ((version >= 6 && m.rankedAt) ? 64 : 0) |
2099
+ ((version >= 12 && m.readThrough) ? 128 : 0)
2100
+
2091
2101
  c.string.preencode(state, m.id)
2092
2102
  c.string.preencode(state, m.agentId)
2093
2103
  c.string.preencode(state, m.title)
2094
2104
  c.uint.preencode(state, m.createdAt)
2095
- state.end++ // max flag is 64 so always one byte
2105
+ c.uint.preencode(state, flags)
2096
2106
 
2097
2107
  if (m.deletedAt) c.uint.preencode(state, m.deletedAt)
2098
2108
  if (m.updatedAt) c.uint.preencode(state, m.updatedAt)
2099
2109
  if (version >= 5 && m.groupId) c.string.preencode(state, m.groupId)
2100
2110
  if (version >= 6 && m.rank) c.float64.preencode(state, m.rank)
2101
2111
  if (version >= 6 && m.rankedAt) c.uint.preencode(state, m.rankedAt)
2112
+ if (version >= 12 && m.readThrough) c.uint.preencode(state, m.readThrough)
2102
2113
  },
2103
2114
  encode(state, m) {
2104
2115
  const flags =
@@ -2108,7 +2119,8 @@ const encoding45 = {
2108
2119
  (m.updatedAt ? 8 : 0) |
2109
2120
  ((version >= 5 && m.groupId) ? 16 : 0) |
2110
2121
  ((version >= 6 && m.rank) ? 32 : 0) |
2111
- ((version >= 6 && m.rankedAt) ? 64 : 0)
2122
+ ((version >= 6 && m.rankedAt) ? 64 : 0) |
2123
+ ((version >= 12 && m.readThrough) ? 128 : 0)
2112
2124
 
2113
2125
  c.string.encode(state, m.id)
2114
2126
  c.string.encode(state, m.agentId)
@@ -2121,6 +2133,7 @@ const encoding45 = {
2121
2133
  if (version >= 5 && m.groupId) c.string.encode(state, m.groupId)
2122
2134
  if (version >= 6 && m.rank) c.float64.encode(state, m.rank)
2123
2135
  if (version >= 6 && m.rankedAt) c.uint.encode(state, m.rankedAt)
2136
+ if (version >= 12 && m.readThrough) c.uint.encode(state, m.readThrough)
2124
2137
  },
2125
2138
  decode(state) {
2126
2139
  const r0 = c.string.decode(state)
@@ -2141,7 +2154,8 @@ const encoding45 = {
2141
2154
  updatedAt: (flags & 8) !== 0 ? c.uint.decode(state) : 0,
2142
2155
  groupId: (version >= 5 && (flags & 16) !== 0) ? c.string.decode(state) : null,
2143
2156
  rank: (version >= 6 && (flags & 32) !== 0) ? c.float64.decode(state) : 0,
2144
- rankedAt: (version >= 6 && (flags & 64) !== 0) ? c.uint.decode(state) : 0
2157
+ rankedAt: (version >= 6 && (flags & 64) !== 0) ? c.uint.decode(state) : 0,
2158
+ readThrough: (version >= 12 && (flags & 128) !== 0) ? c.uint.decode(state) : 0
2145
2159
  }
2146
2160
  }
2147
2161
  }
@@ -7296,16 +7310,27 @@ const encoding177 = {
7296
7310
  // @qvac/chat-v1/hyperdb#4
7297
7311
  const encoding178 = {
7298
7312
  preencode(state, m) {
7313
+ const flags =
7314
+ (m.deletedAt ? 1 : 0) |
7315
+ (m.ragEnabled ? 2 : 0) |
7316
+ (m.webSearchEnabled ? 4 : 0) |
7317
+ (m.updatedAt ? 8 : 0) |
7318
+ ((version >= 5 && m.groupId) ? 16 : 0) |
7319
+ ((version >= 6 && m.rank) ? 32 : 0) |
7320
+ ((version >= 6 && m.rankedAt) ? 64 : 0) |
7321
+ ((version >= 12 && m.readThrough) ? 128 : 0)
7322
+
7299
7323
  c.string.preencode(state, m.agentId)
7300
7324
  c.string.preencode(state, m.title)
7301
7325
  c.uint.preencode(state, m.createdAt)
7302
- state.end++ // max flag is 64 so always one byte
7326
+ c.uint.preencode(state, flags)
7303
7327
 
7304
7328
  if (m.deletedAt) c.uint.preencode(state, m.deletedAt)
7305
7329
  if (m.updatedAt) c.uint.preencode(state, m.updatedAt)
7306
7330
  if (version >= 5 && m.groupId) c.string.preencode(state, m.groupId)
7307
7331
  if (version >= 6 && m.rank) c.float64.preencode(state, m.rank)
7308
7332
  if (version >= 6 && m.rankedAt) c.uint.preencode(state, m.rankedAt)
7333
+ if (version >= 12 && m.readThrough) c.uint.preencode(state, m.readThrough)
7309
7334
  },
7310
7335
  encode(state, m) {
7311
7336
  const flags =
@@ -7315,7 +7340,8 @@ const encoding178 = {
7315
7340
  (m.updatedAt ? 8 : 0) |
7316
7341
  ((version >= 5 && m.groupId) ? 16 : 0) |
7317
7342
  ((version >= 6 && m.rank) ? 32 : 0) |
7318
- ((version >= 6 && m.rankedAt) ? 64 : 0)
7343
+ ((version >= 6 && m.rankedAt) ? 64 : 0) |
7344
+ ((version >= 12 && m.readThrough) ? 128 : 0)
7319
7345
 
7320
7346
  c.string.encode(state, m.agentId)
7321
7347
  c.string.encode(state, m.title)
@@ -7327,6 +7353,7 @@ const encoding178 = {
7327
7353
  if (version >= 5 && m.groupId) c.string.encode(state, m.groupId)
7328
7354
  if (version >= 6 && m.rank) c.float64.encode(state, m.rank)
7329
7355
  if (version >= 6 && m.rankedAt) c.uint.encode(state, m.rankedAt)
7356
+ if (version >= 12 && m.readThrough) c.uint.encode(state, m.readThrough)
7330
7357
  },
7331
7358
  decode(state) {
7332
7359
  const r1 = c.string.decode(state)
@@ -7346,7 +7373,8 @@ const encoding178 = {
7346
7373
  updatedAt: (flags & 8) !== 0 ? c.uint.decode(state) : 0,
7347
7374
  groupId: (version >= 5 && (flags & 16) !== 0) ? c.string.decode(state) : null,
7348
7375
  rank: (version >= 6 && (flags & 32) !== 0) ? c.float64.decode(state) : 0,
7349
- rankedAt: (version >= 6 && (flags & 64) !== 0) ? c.uint.decode(state) : 0
7376
+ rankedAt: (version >= 6 && (flags & 64) !== 0) ? c.uint.decode(state) : 0,
7377
+ readThrough: (version >= 12 && (flags & 128) !== 0) ? c.uint.decode(state) : 0
7350
7378
  }
7351
7379
  }
7352
7380
  }
@@ -1,12 +1,12 @@
1
1
  // This file is autogenerated by the hyperschema compiler
2
- // Schema Version: 11
2
+ // Schema Version: 12
3
3
  /* eslint-disable camelcase */
4
4
  /* eslint-disable quotes */
5
5
  /* eslint-disable space-before-function-paren */
6
6
 
7
7
  import { c } from 'hyperschema/runtime'
8
8
 
9
- const VERSION = 11
9
+ const VERSION = 12
10
10
 
11
11
  // eslint-disable-next-line no-unused-vars
12
12
  let version = VERSION
@@ -2088,17 +2088,28 @@ const encoding44 = {
2088
2088
  // @qvac/chat-v1
2089
2089
  const encoding45 = {
2090
2090
  preencode(state, m) {
2091
+ const flags =
2092
+ (m.deletedAt ? 1 : 0) |
2093
+ (m.ragEnabled ? 2 : 0) |
2094
+ (m.webSearchEnabled ? 4 : 0) |
2095
+ (m.updatedAt ? 8 : 0) |
2096
+ ((version >= 5 && m.groupId) ? 16 : 0) |
2097
+ ((version >= 6 && m.rank) ? 32 : 0) |
2098
+ ((version >= 6 && m.rankedAt) ? 64 : 0) |
2099
+ ((version >= 12 && m.readThrough) ? 128 : 0)
2100
+
2091
2101
  c.string.preencode(state, m.id)
2092
2102
  c.string.preencode(state, m.agentId)
2093
2103
  c.string.preencode(state, m.title)
2094
2104
  c.uint.preencode(state, m.createdAt)
2095
- state.end++ // max flag is 64 so always one byte
2105
+ c.uint.preencode(state, flags)
2096
2106
 
2097
2107
  if (m.deletedAt) c.uint.preencode(state, m.deletedAt)
2098
2108
  if (m.updatedAt) c.uint.preencode(state, m.updatedAt)
2099
2109
  if (version >= 5 && m.groupId) c.string.preencode(state, m.groupId)
2100
2110
  if (version >= 6 && m.rank) c.float64.preencode(state, m.rank)
2101
2111
  if (version >= 6 && m.rankedAt) c.uint.preencode(state, m.rankedAt)
2112
+ if (version >= 12 && m.readThrough) c.uint.preencode(state, m.readThrough)
2102
2113
  },
2103
2114
  encode(state, m) {
2104
2115
  const flags =
@@ -2108,7 +2119,8 @@ const encoding45 = {
2108
2119
  (m.updatedAt ? 8 : 0) |
2109
2120
  ((version >= 5 && m.groupId) ? 16 : 0) |
2110
2121
  ((version >= 6 && m.rank) ? 32 : 0) |
2111
- ((version >= 6 && m.rankedAt) ? 64 : 0)
2122
+ ((version >= 6 && m.rankedAt) ? 64 : 0) |
2123
+ ((version >= 12 && m.readThrough) ? 128 : 0)
2112
2124
 
2113
2125
  c.string.encode(state, m.id)
2114
2126
  c.string.encode(state, m.agentId)
@@ -2121,6 +2133,7 @@ const encoding45 = {
2121
2133
  if (version >= 5 && m.groupId) c.string.encode(state, m.groupId)
2122
2134
  if (version >= 6 && m.rank) c.float64.encode(state, m.rank)
2123
2135
  if (version >= 6 && m.rankedAt) c.uint.encode(state, m.rankedAt)
2136
+ if (version >= 12 && m.readThrough) c.uint.encode(state, m.readThrough)
2124
2137
  },
2125
2138
  decode(state) {
2126
2139
  const r0 = c.string.decode(state)
@@ -2141,7 +2154,8 @@ const encoding45 = {
2141
2154
  updatedAt: (flags & 8) !== 0 ? c.uint.decode(state) : 0,
2142
2155
  groupId: (version >= 5 && (flags & 16) !== 0) ? c.string.decode(state) : null,
2143
2156
  rank: (version >= 6 && (flags & 32) !== 0) ? c.float64.decode(state) : 0,
2144
- rankedAt: (version >= 6 && (flags & 64) !== 0) ? c.uint.decode(state) : 0
2157
+ rankedAt: (version >= 6 && (flags & 64) !== 0) ? c.uint.decode(state) : 0,
2158
+ readThrough: (version >= 12 && (flags & 128) !== 0) ? c.uint.decode(state) : 0
2145
2159
  }
2146
2160
  }
2147
2161
  }
@@ -1,12 +1,12 @@
1
1
  // This file is autogenerated by the hyperschema compiler
2
- // Schema Version: 11
2
+ // Schema Version: 12
3
3
  /* eslint-disable camelcase */
4
4
  /* eslint-disable quotes */
5
5
  /* eslint-disable space-before-function-paren */
6
6
 
7
7
  import { c } from 'hyperschema/runtime'
8
8
 
9
- const VERSION = 11
9
+ const VERSION = 12
10
10
 
11
11
  // eslint-disable-next-line no-unused-vars
12
12
  let version = VERSION
@@ -2088,17 +2088,28 @@ const encoding44 = {
2088
2088
  // @qvac/chat-v1
2089
2089
  const encoding45 = {
2090
2090
  preencode(state, m) {
2091
+ const flags =
2092
+ (m.deletedAt ? 1 : 0) |
2093
+ (m.ragEnabled ? 2 : 0) |
2094
+ (m.webSearchEnabled ? 4 : 0) |
2095
+ (m.updatedAt ? 8 : 0) |
2096
+ ((version >= 5 && m.groupId) ? 16 : 0) |
2097
+ ((version >= 6 && m.rank) ? 32 : 0) |
2098
+ ((version >= 6 && m.rankedAt) ? 64 : 0) |
2099
+ ((version >= 12 && m.readThrough) ? 128 : 0)
2100
+
2091
2101
  c.string.preencode(state, m.id)
2092
2102
  c.string.preencode(state, m.agentId)
2093
2103
  c.string.preencode(state, m.title)
2094
2104
  c.uint.preencode(state, m.createdAt)
2095
- state.end++ // max flag is 64 so always one byte
2105
+ c.uint.preencode(state, flags)
2096
2106
 
2097
2107
  if (m.deletedAt) c.uint.preencode(state, m.deletedAt)
2098
2108
  if (m.updatedAt) c.uint.preencode(state, m.updatedAt)
2099
2109
  if (version >= 5 && m.groupId) c.string.preencode(state, m.groupId)
2100
2110
  if (version >= 6 && m.rank) c.float64.preencode(state, m.rank)
2101
2111
  if (version >= 6 && m.rankedAt) c.uint.preencode(state, m.rankedAt)
2112
+ if (version >= 12 && m.readThrough) c.uint.preencode(state, m.readThrough)
2102
2113
  },
2103
2114
  encode(state, m) {
2104
2115
  const flags =
@@ -2108,7 +2119,8 @@ const encoding45 = {
2108
2119
  (m.updatedAt ? 8 : 0) |
2109
2120
  ((version >= 5 && m.groupId) ? 16 : 0) |
2110
2121
  ((version >= 6 && m.rank) ? 32 : 0) |
2111
- ((version >= 6 && m.rankedAt) ? 64 : 0)
2122
+ ((version >= 6 && m.rankedAt) ? 64 : 0) |
2123
+ ((version >= 12 && m.readThrough) ? 128 : 0)
2112
2124
 
2113
2125
  c.string.encode(state, m.id)
2114
2126
  c.string.encode(state, m.agentId)
@@ -2121,6 +2133,7 @@ const encoding45 = {
2121
2133
  if (version >= 5 && m.groupId) c.string.encode(state, m.groupId)
2122
2134
  if (version >= 6 && m.rank) c.float64.encode(state, m.rank)
2123
2135
  if (version >= 6 && m.rankedAt) c.uint.encode(state, m.rankedAt)
2136
+ if (version >= 12 && m.readThrough) c.uint.encode(state, m.readThrough)
2124
2137
  },
2125
2138
  decode(state) {
2126
2139
  const r0 = c.string.decode(state)
@@ -2141,7 +2154,8 @@ const encoding45 = {
2141
2154
  updatedAt: (flags & 8) !== 0 ? c.uint.decode(state) : 0,
2142
2155
  groupId: (version >= 5 && (flags & 16) !== 0) ? c.string.decode(state) : null,
2143
2156
  rank: (version >= 6 && (flags & 32) !== 0) ? c.float64.decode(state) : 0,
2144
- rankedAt: (version >= 6 && (flags & 64) !== 0) ? c.uint.decode(state) : 0
2157
+ rankedAt: (version >= 6 && (flags & 64) !== 0) ? c.uint.decode(state) : 0,
2158
+ readThrough: (version >= 12 && (flags & 128) !== 0) ? c.uint.decode(state) : 0
2145
2159
  }
2146
2160
  }
2147
2161
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": 11,
2
+ "version": 12,
3
3
  "schema": [
4
4
  {
5
5
  "name": "chunk-type",
@@ -1404,6 +1404,11 @@
1404
1404
  "name": "rankedAt",
1405
1405
  "type": "uint",
1406
1406
  "version": 6
1407
+ },
1408
+ {
1409
+ "name": "readThrough",
1410
+ "type": "uint",
1411
+ "version": 12
1407
1412
  }
1408
1413
  ]
1409
1414
  },
@@ -1,5 +1,5 @@
1
1
  // This file is autogenerated by hyperschema-ts
2
- // Schema version: 11
2
+ // Schema version: 12
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"
@@ -255,6 +255,7 @@ export interface QvacChatV1 {
255
255
  groupId?: string | null
256
256
  rank?: number
257
257
  rankedAt?: number
258
+ readThrough?: number
258
259
  }
259
260
 
260
261
  export type QvacChat = (QvacChatV1 & { version?: number })
package/package.json CHANGED
@@ -1,8 +1,11 @@
1
1
  {
2
2
  "name": "@qvac/core",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "type": "module",
5
5
  "description": "Peer-to-peer AI across your devices",
6
+ "engines": {
7
+ "bare": ">=1.34.0"
8
+ },
6
9
  "exports": {
7
10
  ".": {
8
11
  "types": "./dist-lib/index.d.ts",
@@ -153,11 +156,15 @@
153
156
  "mesh-capability-run": "bare examples/mesh-capability-run.mjs",
154
157
  "model-idle-limit": "bare examples/model-idle-limit.mjs",
155
158
  "model-load-unload": "bare examples/model-load-unload.mjs",
159
+ "model-users": "bare examples/model-users.mjs",
160
+ "models-by-task": "bare examples/models-by-task.mjs",
161
+ "models-watch": "bare examples/models-watch.mjs",
156
162
  "mesh-pair-and-migrate": "bare examples/mesh-pair-and-migrate.mjs",
157
163
  "mesh-scoped-catalog": "bare examples/mesh-scoped-catalog.mjs",
158
164
  "mesh-peer": "bare examples/mesh-peer.mjs",
159
165
  "mesh-member-admin": "bare examples/mesh-member-admin.mjs",
160
166
  "mesh-lab": "bare examples/mesh-lab.mjs",
167
+ "chat-read-marker": "bare examples/chat-read-marker.mjs",
161
168
  "custom-models": "bare examples/custom-models.mjs",
162
169
  "mesh-recover-account": "bare examples/mesh-recover-account.mjs",
163
170
  "mesh-user-names": "bare examples/mesh-user-names.mjs",
@@ -216,6 +223,11 @@
216
223
  "bare": "bare-fetch",
217
224
  "default": "./dist-lib/lib/fetch-node.js"
218
225
  },
226
+ "#collabora-worker-entry": "./dist-lib/lib/collabora/entry.js",
227
+ "worker_threads": {
228
+ "bare": "bare-worker",
229
+ "default": "worker_threads"
230
+ },
219
231
  "#oauth-loopback": {
220
232
  "bare": "./dist-lib/lib/oauth/loopback.stub.js",
221
233
  "default": "./dist-lib/lib/oauth/loopback.js"
@@ -230,14 +242,13 @@
230
242
  }
231
243
  },
232
244
  "dependencies": {
233
- "@qvac/harness": "^0.6.0",
245
+ "@qvac/harness": "^0.7.0",
234
246
  "@qvac/skills": "^0.1.11",
235
247
  "asenion": "^0.1.0",
236
248
  "autobee": "^2.11.8",
237
249
  "b4a": "^1.9.0",
238
250
  "bare-abort-controller": "^1.1.2",
239
251
  "bare-buffer": "^3.6.1",
240
- "bare-channel": "^5.2.4",
241
252
  "bare-cpu-info": "^0.1.0",
242
253
  "bare-crypto": "^1.15.3",
243
254
  "bare-events": "^2.9.1",
@@ -249,7 +260,7 @@
249
260
  "bare-media": "^2.10.0",
250
261
  "bare-os": "^3.9.1",
251
262
  "bare-path": "^3.0.1",
252
- "bare-pdfium": "^1.5.3",
263
+ "bare-pdfium": "^1.5.4",
253
264
  "bare-pipe": "^4.2.2",
254
265
  "bare-process": "^4.5.1",
255
266
  "bare-rpc": "^1.3.7",
@@ -262,6 +273,7 @@
262
273
  "bare-system-logger": "^1.0.3",
263
274
  "bare-tui": "^0.3.0",
264
275
  "bare-url": "^2.4.5",
276
+ "bare-worker": "^4.5.0",
265
277
  "blind-peer": "^3.10.2",
266
278
  "blind-peering": "^2.7.0",
267
279
  "compact-encoding": "^3.4.0",
@@ -302,8 +314,8 @@
302
314
  "bare-bundle": "^1.10.0",
303
315
  "bare-module-lexer": "^1.6.3",
304
316
  "bare-pack": "^2.2.1",
305
- "bare-runtime": "1.31.0",
306
- "bare-sidecar": "^0.5.2",
317
+ "bare-runtime": "1.34.0",
318
+ "bare-sidecar": "0.5.7",
307
319
  "brittle": "^4.0.2",
308
320
  "brittle-jobs": "0.2.1",
309
321
  "holepunch-types": "^0.2.2",
@@ -330,7 +342,6 @@
330
342
  },
331
343
  "homepage": "https://github.com/tetherto/qvac-core",
332
344
  "patchedDependencies": {
333
- "bare-sidecar@0.5.4": "patches/bare-sidecar@0.5.4.patch",
334
345
  "hypercore-blob-server@1.15.0": "patches/hypercore-blob-server@1.15.0.patch",
335
346
  "pyodide@314.0.2": "patches/pyodide@314.0.2.patch",
336
347
  "localwatch@1.4.3": "patches/localwatch@1.4.3.patch",
@@ -339,9 +350,11 @@
339
350
  "hyperdb@6.9.0": "patches/hyperdb@6.9.0.patch"
340
351
  },
341
352
  "overrides": {
353
+ "bare-sidecar": "0.5.7",
354
+ "bare-module-traverse": "~2.5.8",
355
+ "bare-thread": "^1.2.7",
342
356
  "@qvac/asr-ggml": "0.4.2",
343
- "bare-runtime": "1.31.0",
344
- "bare-module": "6.4.0",
357
+ "bare-runtime": "1.34.0",
345
358
  "bare-http1": "4.6.1",
346
359
  "lodash": "4.18.1",
347
360
  "hyperschema": "1.26.2",
package/tui/app.mjs CHANGED
@@ -538,8 +538,9 @@ async function deleteModel(engine, name) {
538
538
  return `${row.name} stopped — no longer fetched until something needs it`
539
539
  }
540
540
 
541
- const { agents } = await engine.listAgents({})
542
- const users = (agents ?? []).filter((a) => a.modelName === row.name).map((a) => a.name)
541
+ // the delete already happened, so a failed lookup must not hide its result
542
+ const { agents } = await engine.modelUsers({ name: row.name }).catch(() => ({ agents: [] }))
543
+ const users = [...new Set((agents ?? []).map((agent) => agent.agentName))]
543
544
  const lines = [`deleted ${row.name} — freed ${mb(freedBytes)}`]
544
545
  if (users.length) {
545
546
  lines.push(`used by ${users.join(', ')} — downloads again on their next run`)
@@ -1,6 +0,0 @@
1
- export interface HostCapability {
2
- readonly capabilityProfile: string;
3
- readonly recommendedModelName: string;
4
- }
5
- export declare function isMobilePlatform(platform: string): boolean;
6
- export declare function runnableModelName(requested: string, host: HostCapability | null, mobileClass: boolean): string;