@qvac/core 0.10.3 → 0.11.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 (72) hide show
  1. package/CHANGELOG.md +71 -1
  2. package/dist-lib/lib/assistant/history.d.ts +2 -1
  3. package/dist-lib/lib/assistant/history.js +32 -5
  4. package/dist-lib/lib/assistant/message.d.ts +20 -0
  5. package/dist-lib/lib/assistant/message.js +36 -0
  6. package/dist-lib/lib/assistant/pdf-budget.d.ts +3 -0
  7. package/dist-lib/lib/assistant/pdf-budget.js +13 -0
  8. package/dist-lib/lib/assistant/video-budget.d.ts +13 -0
  9. package/dist-lib/lib/assistant/video-budget.js +29 -0
  10. package/dist-lib/lib/assistant-tree.d.ts +1 -0
  11. package/dist-lib/lib/assistant-tree.js +9 -2
  12. package/dist-lib/lib/assistant.d.ts +26 -3
  13. package/dist-lib/lib/assistant.js +471 -47
  14. package/dist-lib/lib/core/chat-fork.js +1 -0
  15. package/dist-lib/lib/core/chat-search.js +1 -1
  16. package/dist-lib/lib/core/chunk.d.ts +2 -2
  17. package/dist-lib/lib/core/chunk.js +5 -1
  18. package/dist-lib/lib/core/departures.js +6 -0
  19. package/dist-lib/lib/core/document-attachment.d.ts +7 -0
  20. package/dist-lib/lib/core/document-attachment.js +9 -0
  21. package/dist-lib/lib/core/files/index.js +4 -4
  22. package/dist-lib/lib/core/files/records/chunks.js +21 -0
  23. package/dist-lib/lib/core/files/records/purge.js +4 -3
  24. package/dist-lib/lib/core/files/records/source.js +3 -5
  25. package/dist-lib/lib/core/files/upload.js +3 -2
  26. package/dist-lib/lib/core/identity.d.ts +2 -0
  27. package/dist-lib/lib/core/identity.js +19 -0
  28. package/dist-lib/lib/core/pdf/rasterize.d.ts +0 -1
  29. package/dist-lib/lib/core/pdf/rasterize.js +0 -1
  30. package/dist-lib/lib/core/video/attachment.d.ts +1 -0
  31. package/dist-lib/lib/core/video/attachment.js +7 -0
  32. package/dist-lib/lib/core/video/digest.d.ts +16 -0
  33. package/dist-lib/lib/core/video/digest.js +57 -0
  34. package/dist-lib/lib/core/video/frames.d.ts +32 -0
  35. package/dist-lib/lib/core/video/frames.js +224 -0
  36. package/dist-lib/lib/core.d.ts +1 -0
  37. package/dist-lib/lib/core.js +44 -7
  38. package/dist-lib/lib/credential-pusher.d.ts +6 -0
  39. package/dist-lib/lib/credential-pusher.js +76 -59
  40. package/dist-lib/lib/errors.d.ts +8 -0
  41. package/dist-lib/lib/errors.js +8 -0
  42. package/dist-lib/lib/oauth/flow-core.js +2 -0
  43. package/dist-lib/lib/oauth/loopback.d.ts +1 -0
  44. package/dist-lib/lib/oauth/loopback.js +31 -1
  45. package/dist-lib/lib/oauth/register.js +33 -18
  46. package/dist-lib/lib/oauth/request.d.ts +10 -0
  47. package/dist-lib/lib/oauth/request.js +22 -0
  48. package/dist-lib/lib/oauth/token-exchange-core.js +29 -32
  49. package/dist-lib/lib/oauth/types.d.ts +3 -0
  50. package/dist-lib/lib/oauth.d.ts +2 -1
  51. package/dist-lib/lib/oauth.js +1 -0
  52. package/dist-lib/lib/run-notices.d.ts +1 -0
  53. package/dist-lib/lib/run-notices.js +2 -1
  54. package/dist-lib/lib/run-replay.d.ts +8 -2
  55. package/dist-lib/lib/run-replay.js +29 -11
  56. package/dist-lib/lib/task.js +1 -1
  57. package/dist-lib/schema/engine.js +4 -2
  58. package/dist-lib/schema/indexes.js +2 -2
  59. package/dist-lib/schema/qvac.js +4 -2
  60. package/dist-lib/spec/hrpc/messages.js +16 -6
  61. package/dist-lib/spec/hyperschema/index.js +16 -6
  62. package/dist-lib/spec/hyperschema/schema.json +10 -0
  63. package/dist-lib/spec/hyperschema/types.d.ts +2 -0
  64. package/dist-lib/spec/mesh/hyperdb/messages.js +26 -11
  65. package/dist-lib/spec/mesh/hyperdispatch/messages.js +18 -8
  66. package/dist-lib/spec/mesh/hyperschema/index.js +18 -8
  67. package/dist-lib/spec/mesh/hyperschema/schema.json +11 -1
  68. package/dist-lib/spec/mesh/hyperschema/types.d.ts +3 -1
  69. package/package.json +7 -4
  70. package/tui/app.mjs +34 -1
  71. package/tui/lib/render.mjs +5 -0
  72. package/tui/main.mjs +8 -0
@@ -1,12 +1,12 @@
1
1
  // This file is autogenerated by the hyperschema compiler
2
- // Schema Version: 15
2
+ // Schema Version: 16
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 = 15
9
+ const VERSION = 16
10
10
 
11
11
  // eslint-disable-next-line no-unused-vars
12
12
  let version = VERSION
@@ -1046,7 +1046,8 @@ const encoding27 = {
1046
1046
  ((version >= 8 && m.senderMemberId) ? 262144 : 0) |
1047
1047
  ((version >= 10 && m.capability) ? 524288 : 0) |
1048
1048
  ((version >= 10 && m.capabilityArgs) ? 1048576 : 0) |
1049
- ((version >= 10 && m.enhance) ? 2097152 : 0)
1049
+ ((version >= 10 && m.enhance) ? 2097152 : 0) |
1050
+ ((version >= 16 && m.sourceId) ? 4194304 : 0)
1050
1051
 
1051
1052
  c.string.preencode(state, m.id)
1052
1053
  c.string.preencode(state, m.chatId)
@@ -1078,6 +1079,7 @@ const encoding27 = {
1078
1079
  if (version >= 10 && m.capability) c.string.preencode(state, m.capability)
1079
1080
  if (version >= 10 && m.capabilityArgs) c.json.preencode(state, m.capabilityArgs)
1080
1081
  if (version >= 10 && m.enhance) encoding141.preencode(state, m.enhance)
1082
+ if (version >= 16 && m.sourceId) c.string.preencode(state, m.sourceId)
1081
1083
  },
1082
1084
  encode(state, m) {
1083
1085
  const flags =
@@ -1102,7 +1104,8 @@ const encoding27 = {
1102
1104
  ((version >= 8 && m.senderMemberId) ? 262144 : 0) |
1103
1105
  ((version >= 10 && m.capability) ? 524288 : 0) |
1104
1106
  ((version >= 10 && m.capabilityArgs) ? 1048576 : 0) |
1105
- ((version >= 10 && m.enhance) ? 2097152 : 0)
1107
+ ((version >= 10 && m.enhance) ? 2097152 : 0) |
1108
+ ((version >= 16 && m.sourceId) ? 4194304 : 0)
1106
1109
 
1107
1110
  c.string.encode(state, m.id)
1108
1111
  c.string.encode(state, m.chatId)
@@ -1134,6 +1137,7 @@ const encoding27 = {
1134
1137
  if (version >= 10 && m.capability) c.string.encode(state, m.capability)
1135
1138
  if (version >= 10 && m.capabilityArgs) c.json.encode(state, m.capabilityArgs)
1136
1139
  if (version >= 10 && m.enhance) encoding141.encode(state, m.enhance)
1140
+ if (version >= 16 && m.sourceId) c.string.encode(state, m.sourceId)
1137
1141
  },
1138
1142
  decode(state) {
1139
1143
  const r0 = c.string.decode(state)
@@ -1169,7 +1173,8 @@ const encoding27 = {
1169
1173
  senderMemberId: (version >= 8 && (flags & 262144) !== 0) ? c.fixed32.decode(state) : null,
1170
1174
  capability: (version >= 10 && (flags & 524288) !== 0) ? c.string.decode(state) : null,
1171
1175
  capabilityArgs: (version >= 10 && (flags & 1048576) !== 0) ? c.json.decode(state) : null,
1172
- enhance: (version >= 10 && (flags & 2097152) !== 0) ? encoding141.decode(state) : null
1176
+ enhance: (version >= 10 && (flags & 2097152) !== 0) ? encoding141.decode(state) : null,
1177
+ sourceId: (version >= 16 && (flags & 4194304) !== 0) ? c.string.decode(state) : null
1173
1178
  }
1174
1179
  }
1175
1180
  }
@@ -1312,7 +1317,8 @@ const encoding31 = {
1312
1317
  ((version >= 8 && m.senderMemberId) ? 131072 : 0) |
1313
1318
  ((version >= 10 && m.capability) ? 262144 : 0) |
1314
1319
  ((version >= 10 && m.capabilityArgs) ? 524288 : 0) |
1315
- ((version >= 10 && m.enhance) ? 1048576 : 0)
1320
+ ((version >= 10 && m.enhance) ? 1048576 : 0) |
1321
+ ((version >= 16 && m.sourceId) ? 2097152 : 0)
1316
1322
 
1317
1323
  c.string.preencode(state, m.id)
1318
1324
  c.string.preencode(state, m.chatId)
@@ -1342,6 +1348,7 @@ const encoding31 = {
1342
1348
  if (version >= 10 && m.capability) c.string.preencode(state, m.capability)
1343
1349
  if (version >= 10 && m.capabilityArgs) c.json.preencode(state, m.capabilityArgs)
1344
1350
  if (version >= 10 && m.enhance) encoding141.preencode(state, m.enhance)
1351
+ if (version >= 16 && m.sourceId) c.string.preencode(state, m.sourceId)
1345
1352
  },
1346
1353
  encode(state, m) {
1347
1354
  const flags =
@@ -1365,7 +1372,8 @@ const encoding31 = {
1365
1372
  ((version >= 8 && m.senderMemberId) ? 131072 : 0) |
1366
1373
  ((version >= 10 && m.capability) ? 262144 : 0) |
1367
1374
  ((version >= 10 && m.capabilityArgs) ? 524288 : 0) |
1368
- ((version >= 10 && m.enhance) ? 1048576 : 0)
1375
+ ((version >= 10 && m.enhance) ? 1048576 : 0) |
1376
+ ((version >= 16 && m.sourceId) ? 2097152 : 0)
1369
1377
 
1370
1378
  c.string.encode(state, m.id)
1371
1379
  c.string.encode(state, m.chatId)
@@ -1395,6 +1403,7 @@ const encoding31 = {
1395
1403
  if (version >= 10 && m.capability) c.string.encode(state, m.capability)
1396
1404
  if (version >= 10 && m.capabilityArgs) c.json.encode(state, m.capabilityArgs)
1397
1405
  if (version >= 10 && m.enhance) encoding141.encode(state, m.enhance)
1406
+ if (version >= 16 && m.sourceId) c.string.encode(state, m.sourceId)
1398
1407
  },
1399
1408
  decode(state) {
1400
1409
  const r0 = c.string.decode(state)
@@ -1428,7 +1437,8 @@ const encoding31 = {
1428
1437
  senderMemberId: (version >= 8 && (flags & 131072) !== 0) ? c.fixed32.decode(state) : null,
1429
1438
  capability: (version >= 10 && (flags & 262144) !== 0) ? c.string.decode(state) : null,
1430
1439
  capabilityArgs: (version >= 10 && (flags & 524288) !== 0) ? c.json.decode(state) : null,
1431
- enhance: (version >= 10 && (flags & 1048576) !== 0) ? encoding141.decode(state) : null
1440
+ enhance: (version >= 10 && (flags & 1048576) !== 0) ? encoding141.decode(state) : null,
1441
+ sourceId: (version >= 16 && (flags & 2097152) !== 0) ? c.string.decode(state) : null
1432
1442
  }
1433
1443
  }
1434
1444
  }
@@ -7124,7 +7134,8 @@ const encoding179 = {
7124
7134
  ((version >= 8 && m.senderMemberId) ? 262144 : 0) |
7125
7135
  ((version >= 10 && m.capability) ? 524288 : 0) |
7126
7136
  ((version >= 10 && m.capabilityArgs) ? 1048576 : 0) |
7127
- ((version >= 10 && m.enhance) ? 2097152 : 0)
7137
+ ((version >= 10 && m.enhance) ? 2097152 : 0) |
7138
+ ((version >= 16 && m.sourceId) ? 4194304 : 0)
7128
7139
 
7129
7140
  c.string.preencode(state, m.chatId)
7130
7141
  c.uint.preencode(state, flags)
@@ -7155,6 +7166,7 @@ const encoding179 = {
7155
7166
  if (version >= 10 && m.capability) c.string.preencode(state, m.capability)
7156
7167
  if (version >= 10 && m.capabilityArgs) c.json.preencode(state, m.capabilityArgs)
7157
7168
  if (version >= 10 && m.enhance) encoding141.preencode(state, m.enhance)
7169
+ if (version >= 16 && m.sourceId) c.string.preencode(state, m.sourceId)
7158
7170
  },
7159
7171
  encode(state, m) {
7160
7172
  const flags =
@@ -7179,7 +7191,8 @@ const encoding179 = {
7179
7191
  ((version >= 8 && m.senderMemberId) ? 262144 : 0) |
7180
7192
  ((version >= 10 && m.capability) ? 524288 : 0) |
7181
7193
  ((version >= 10 && m.capabilityArgs) ? 1048576 : 0) |
7182
- ((version >= 10 && m.enhance) ? 2097152 : 0)
7194
+ ((version >= 10 && m.enhance) ? 2097152 : 0) |
7195
+ ((version >= 16 && m.sourceId) ? 4194304 : 0)
7183
7196
 
7184
7197
  c.string.encode(state, m.chatId)
7185
7198
  c.uint.encode(state, flags)
@@ -7210,6 +7223,7 @@ const encoding179 = {
7210
7223
  if (version >= 10 && m.capability) c.string.encode(state, m.capability)
7211
7224
  if (version >= 10 && m.capabilityArgs) c.json.encode(state, m.capabilityArgs)
7212
7225
  if (version >= 10 && m.enhance) encoding141.encode(state, m.enhance)
7226
+ if (version >= 16 && m.sourceId) c.string.encode(state, m.sourceId)
7213
7227
  },
7214
7228
  decode(state) {
7215
7229
  const r1 = c.string.decode(state)
@@ -7244,7 +7258,8 @@ const encoding179 = {
7244
7258
  senderMemberId: (version >= 8 && (flags & 262144) !== 0) ? c.fixed32.decode(state) : null,
7245
7259
  capability: (version >= 10 && (flags & 524288) !== 0) ? c.string.decode(state) : null,
7246
7260
  capabilityArgs: (version >= 10 && (flags & 1048576) !== 0) ? c.json.decode(state) : null,
7247
- enhance: (version >= 10 && (flags & 2097152) !== 0) ? encoding141.decode(state) : null
7261
+ enhance: (version >= 10 && (flags & 2097152) !== 0) ? encoding141.decode(state) : null,
7262
+ sourceId: (version >= 16 && (flags & 4194304) !== 0) ? c.string.decode(state) : null
7248
7263
  }
7249
7264
  }
7250
7265
  }
@@ -1,12 +1,12 @@
1
1
  // This file is autogenerated by the hyperschema compiler
2
- // Schema Version: 15
2
+ // Schema Version: 16
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 = 15
9
+ const VERSION = 16
10
10
 
11
11
  // eslint-disable-next-line no-unused-vars
12
12
  let version = VERSION
@@ -1046,7 +1046,8 @@ const encoding27 = {
1046
1046
  ((version >= 8 && m.senderMemberId) ? 262144 : 0) |
1047
1047
  ((version >= 10 && m.capability) ? 524288 : 0) |
1048
1048
  ((version >= 10 && m.capabilityArgs) ? 1048576 : 0) |
1049
- ((version >= 10 && m.enhance) ? 2097152 : 0)
1049
+ ((version >= 10 && m.enhance) ? 2097152 : 0) |
1050
+ ((version >= 16 && m.sourceId) ? 4194304 : 0)
1050
1051
 
1051
1052
  c.string.preencode(state, m.id)
1052
1053
  c.string.preencode(state, m.chatId)
@@ -1078,6 +1079,7 @@ const encoding27 = {
1078
1079
  if (version >= 10 && m.capability) c.string.preencode(state, m.capability)
1079
1080
  if (version >= 10 && m.capabilityArgs) c.json.preencode(state, m.capabilityArgs)
1080
1081
  if (version >= 10 && m.enhance) encoding141.preencode(state, m.enhance)
1082
+ if (version >= 16 && m.sourceId) c.string.preencode(state, m.sourceId)
1081
1083
  },
1082
1084
  encode(state, m) {
1083
1085
  const flags =
@@ -1102,7 +1104,8 @@ const encoding27 = {
1102
1104
  ((version >= 8 && m.senderMemberId) ? 262144 : 0) |
1103
1105
  ((version >= 10 && m.capability) ? 524288 : 0) |
1104
1106
  ((version >= 10 && m.capabilityArgs) ? 1048576 : 0) |
1105
- ((version >= 10 && m.enhance) ? 2097152 : 0)
1107
+ ((version >= 10 && m.enhance) ? 2097152 : 0) |
1108
+ ((version >= 16 && m.sourceId) ? 4194304 : 0)
1106
1109
 
1107
1110
  c.string.encode(state, m.id)
1108
1111
  c.string.encode(state, m.chatId)
@@ -1134,6 +1137,7 @@ const encoding27 = {
1134
1137
  if (version >= 10 && m.capability) c.string.encode(state, m.capability)
1135
1138
  if (version >= 10 && m.capabilityArgs) c.json.encode(state, m.capabilityArgs)
1136
1139
  if (version >= 10 && m.enhance) encoding141.encode(state, m.enhance)
1140
+ if (version >= 16 && m.sourceId) c.string.encode(state, m.sourceId)
1137
1141
  },
1138
1142
  decode(state) {
1139
1143
  const r0 = c.string.decode(state)
@@ -1169,7 +1173,8 @@ const encoding27 = {
1169
1173
  senderMemberId: (version >= 8 && (flags & 262144) !== 0) ? c.fixed32.decode(state) : null,
1170
1174
  capability: (version >= 10 && (flags & 524288) !== 0) ? c.string.decode(state) : null,
1171
1175
  capabilityArgs: (version >= 10 && (flags & 1048576) !== 0) ? c.json.decode(state) : null,
1172
- enhance: (version >= 10 && (flags & 2097152) !== 0) ? encoding141.decode(state) : null
1176
+ enhance: (version >= 10 && (flags & 2097152) !== 0) ? encoding141.decode(state) : null,
1177
+ sourceId: (version >= 16 && (flags & 4194304) !== 0) ? c.string.decode(state) : null
1173
1178
  }
1174
1179
  }
1175
1180
  }
@@ -1312,7 +1317,8 @@ const encoding31 = {
1312
1317
  ((version >= 8 && m.senderMemberId) ? 131072 : 0) |
1313
1318
  ((version >= 10 && m.capability) ? 262144 : 0) |
1314
1319
  ((version >= 10 && m.capabilityArgs) ? 524288 : 0) |
1315
- ((version >= 10 && m.enhance) ? 1048576 : 0)
1320
+ ((version >= 10 && m.enhance) ? 1048576 : 0) |
1321
+ ((version >= 16 && m.sourceId) ? 2097152 : 0)
1316
1322
 
1317
1323
  c.string.preencode(state, m.id)
1318
1324
  c.string.preencode(state, m.chatId)
@@ -1342,6 +1348,7 @@ const encoding31 = {
1342
1348
  if (version >= 10 && m.capability) c.string.preencode(state, m.capability)
1343
1349
  if (version >= 10 && m.capabilityArgs) c.json.preencode(state, m.capabilityArgs)
1344
1350
  if (version >= 10 && m.enhance) encoding141.preencode(state, m.enhance)
1351
+ if (version >= 16 && m.sourceId) c.string.preencode(state, m.sourceId)
1345
1352
  },
1346
1353
  encode(state, m) {
1347
1354
  const flags =
@@ -1365,7 +1372,8 @@ const encoding31 = {
1365
1372
  ((version >= 8 && m.senderMemberId) ? 131072 : 0) |
1366
1373
  ((version >= 10 && m.capability) ? 262144 : 0) |
1367
1374
  ((version >= 10 && m.capabilityArgs) ? 524288 : 0) |
1368
- ((version >= 10 && m.enhance) ? 1048576 : 0)
1375
+ ((version >= 10 && m.enhance) ? 1048576 : 0) |
1376
+ ((version >= 16 && m.sourceId) ? 2097152 : 0)
1369
1377
 
1370
1378
  c.string.encode(state, m.id)
1371
1379
  c.string.encode(state, m.chatId)
@@ -1395,6 +1403,7 @@ const encoding31 = {
1395
1403
  if (version >= 10 && m.capability) c.string.encode(state, m.capability)
1396
1404
  if (version >= 10 && m.capabilityArgs) c.json.encode(state, m.capabilityArgs)
1397
1405
  if (version >= 10 && m.enhance) encoding141.encode(state, m.enhance)
1406
+ if (version >= 16 && m.sourceId) c.string.encode(state, m.sourceId)
1398
1407
  },
1399
1408
  decode(state) {
1400
1409
  const r0 = c.string.decode(state)
@@ -1428,7 +1437,8 @@ const encoding31 = {
1428
1437
  senderMemberId: (version >= 8 && (flags & 131072) !== 0) ? c.fixed32.decode(state) : null,
1429
1438
  capability: (version >= 10 && (flags & 262144) !== 0) ? c.string.decode(state) : null,
1430
1439
  capabilityArgs: (version >= 10 && (flags & 524288) !== 0) ? c.json.decode(state) : null,
1431
- enhance: (version >= 10 && (flags & 1048576) !== 0) ? encoding141.decode(state) : null
1440
+ enhance: (version >= 10 && (flags & 1048576) !== 0) ? encoding141.decode(state) : null,
1441
+ sourceId: (version >= 16 && (flags & 2097152) !== 0) ? c.string.decode(state) : null
1432
1442
  }
1433
1443
  }
1434
1444
  }
@@ -1,12 +1,12 @@
1
1
  // This file is autogenerated by the hyperschema compiler
2
- // Schema Version: 15
2
+ // Schema Version: 16
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 = 15
9
+ const VERSION = 16
10
10
 
11
11
  // eslint-disable-next-line no-unused-vars
12
12
  let version = VERSION
@@ -1046,7 +1046,8 @@ const encoding27 = {
1046
1046
  ((version >= 8 && m.senderMemberId) ? 262144 : 0) |
1047
1047
  ((version >= 10 && m.capability) ? 524288 : 0) |
1048
1048
  ((version >= 10 && m.capabilityArgs) ? 1048576 : 0) |
1049
- ((version >= 10 && m.enhance) ? 2097152 : 0)
1049
+ ((version >= 10 && m.enhance) ? 2097152 : 0) |
1050
+ ((version >= 16 && m.sourceId) ? 4194304 : 0)
1050
1051
 
1051
1052
  c.string.preencode(state, m.id)
1052
1053
  c.string.preencode(state, m.chatId)
@@ -1078,6 +1079,7 @@ const encoding27 = {
1078
1079
  if (version >= 10 && m.capability) c.string.preencode(state, m.capability)
1079
1080
  if (version >= 10 && m.capabilityArgs) c.json.preencode(state, m.capabilityArgs)
1080
1081
  if (version >= 10 && m.enhance) encoding141.preencode(state, m.enhance)
1082
+ if (version >= 16 && m.sourceId) c.string.preencode(state, m.sourceId)
1081
1083
  },
1082
1084
  encode(state, m) {
1083
1085
  const flags =
@@ -1102,7 +1104,8 @@ const encoding27 = {
1102
1104
  ((version >= 8 && m.senderMemberId) ? 262144 : 0) |
1103
1105
  ((version >= 10 && m.capability) ? 524288 : 0) |
1104
1106
  ((version >= 10 && m.capabilityArgs) ? 1048576 : 0) |
1105
- ((version >= 10 && m.enhance) ? 2097152 : 0)
1107
+ ((version >= 10 && m.enhance) ? 2097152 : 0) |
1108
+ ((version >= 16 && m.sourceId) ? 4194304 : 0)
1106
1109
 
1107
1110
  c.string.encode(state, m.id)
1108
1111
  c.string.encode(state, m.chatId)
@@ -1134,6 +1137,7 @@ const encoding27 = {
1134
1137
  if (version >= 10 && m.capability) c.string.encode(state, m.capability)
1135
1138
  if (version >= 10 && m.capabilityArgs) c.json.encode(state, m.capabilityArgs)
1136
1139
  if (version >= 10 && m.enhance) encoding141.encode(state, m.enhance)
1140
+ if (version >= 16 && m.sourceId) c.string.encode(state, m.sourceId)
1137
1141
  },
1138
1142
  decode(state) {
1139
1143
  const r0 = c.string.decode(state)
@@ -1169,7 +1173,8 @@ const encoding27 = {
1169
1173
  senderMemberId: (version >= 8 && (flags & 262144) !== 0) ? c.fixed32.decode(state) : null,
1170
1174
  capability: (version >= 10 && (flags & 524288) !== 0) ? c.string.decode(state) : null,
1171
1175
  capabilityArgs: (version >= 10 && (flags & 1048576) !== 0) ? c.json.decode(state) : null,
1172
- enhance: (version >= 10 && (flags & 2097152) !== 0) ? encoding141.decode(state) : null
1176
+ enhance: (version >= 10 && (flags & 2097152) !== 0) ? encoding141.decode(state) : null,
1177
+ sourceId: (version >= 16 && (flags & 4194304) !== 0) ? c.string.decode(state) : null
1173
1178
  }
1174
1179
  }
1175
1180
  }
@@ -1312,7 +1317,8 @@ const encoding31 = {
1312
1317
  ((version >= 8 && m.senderMemberId) ? 131072 : 0) |
1313
1318
  ((version >= 10 && m.capability) ? 262144 : 0) |
1314
1319
  ((version >= 10 && m.capabilityArgs) ? 524288 : 0) |
1315
- ((version >= 10 && m.enhance) ? 1048576 : 0)
1320
+ ((version >= 10 && m.enhance) ? 1048576 : 0) |
1321
+ ((version >= 16 && m.sourceId) ? 2097152 : 0)
1316
1322
 
1317
1323
  c.string.preencode(state, m.id)
1318
1324
  c.string.preencode(state, m.chatId)
@@ -1342,6 +1348,7 @@ const encoding31 = {
1342
1348
  if (version >= 10 && m.capability) c.string.preencode(state, m.capability)
1343
1349
  if (version >= 10 && m.capabilityArgs) c.json.preencode(state, m.capabilityArgs)
1344
1350
  if (version >= 10 && m.enhance) encoding141.preencode(state, m.enhance)
1351
+ if (version >= 16 && m.sourceId) c.string.preencode(state, m.sourceId)
1345
1352
  },
1346
1353
  encode(state, m) {
1347
1354
  const flags =
@@ -1365,7 +1372,8 @@ const encoding31 = {
1365
1372
  ((version >= 8 && m.senderMemberId) ? 131072 : 0) |
1366
1373
  ((version >= 10 && m.capability) ? 262144 : 0) |
1367
1374
  ((version >= 10 && m.capabilityArgs) ? 524288 : 0) |
1368
- ((version >= 10 && m.enhance) ? 1048576 : 0)
1375
+ ((version >= 10 && m.enhance) ? 1048576 : 0) |
1376
+ ((version >= 16 && m.sourceId) ? 2097152 : 0)
1369
1377
 
1370
1378
  c.string.encode(state, m.id)
1371
1379
  c.string.encode(state, m.chatId)
@@ -1395,6 +1403,7 @@ const encoding31 = {
1395
1403
  if (version >= 10 && m.capability) c.string.encode(state, m.capability)
1396
1404
  if (version >= 10 && m.capabilityArgs) c.json.encode(state, m.capabilityArgs)
1397
1405
  if (version >= 10 && m.enhance) encoding141.encode(state, m.enhance)
1406
+ if (version >= 16 && m.sourceId) c.string.encode(state, m.sourceId)
1398
1407
  },
1399
1408
  decode(state) {
1400
1409
  const r0 = c.string.decode(state)
@@ -1428,7 +1437,8 @@ const encoding31 = {
1428
1437
  senderMemberId: (version >= 8 && (flags & 131072) !== 0) ? c.fixed32.decode(state) : null,
1429
1438
  capability: (version >= 10 && (flags & 262144) !== 0) ? c.string.decode(state) : null,
1430
1439
  capabilityArgs: (version >= 10 && (flags & 524288) !== 0) ? c.json.decode(state) : null,
1431
- enhance: (version >= 10 && (flags & 1048576) !== 0) ? encoding141.decode(state) : null
1440
+ enhance: (version >= 10 && (flags & 1048576) !== 0) ? encoding141.decode(state) : null,
1441
+ sourceId: (version >= 16 && (flags & 2097152) !== 0) ? c.string.decode(state) : null
1432
1442
  }
1433
1443
  }
1434
1444
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": 15,
2
+ "version": 16,
3
3
  "schema": [
4
4
  {
5
5
  "name": "chunk-type",
@@ -743,6 +743,11 @@
743
743
  "name": "enhance",
744
744
  "type": "@qvac/enhance-mode",
745
745
  "version": 10
746
+ },
747
+ {
748
+ "name": "sourceId",
749
+ "type": "string",
750
+ "version": 16
746
751
  }
747
752
  ]
748
753
  },
@@ -935,6 +940,11 @@
935
940
  "name": "enhance",
936
941
  "type": "@qvac/enhance-mode",
937
942
  "version": 10
943
+ },
944
+ {
945
+ "name": "sourceId",
946
+ "type": "string",
947
+ "version": 16
938
948
  }
939
949
  ]
940
950
  },
@@ -1,5 +1,5 @@
1
1
  // This file is autogenerated by hyperschema-ts
2
- // Schema version: 15
2
+ // Schema version: 16
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"
@@ -140,6 +140,7 @@ export interface QvacChunkV1 {
140
140
  capability?: string | null
141
141
  capabilityArgs?: unknown | null
142
142
  enhance?: QvacEnhanceMode | null
143
+ sourceId?: string | null
143
144
  }
144
145
 
145
146
  export type QvacChunk = (QvacChunkV1 & { version?: number })
@@ -179,6 +180,7 @@ export interface QvacAppendChunkOperationV1 {
179
180
  capability?: string | null
180
181
  capabilityArgs?: unknown | null
181
182
  enhance?: QvacEnhanceMode | null
183
+ sourceId?: string | null
182
184
  }
183
185
 
184
186
  export type QvacAppendChunkOperation = (QvacAppendChunkOperationV1 & { version?: number })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qvac/core",
3
- "version": "0.10.3",
3
+ "version": "0.11.0",
4
4
  "type": "module",
5
5
  "description": "Peer-to-peer AI across your devices",
6
6
  "engines": {
@@ -241,9 +241,9 @@
241
241
  },
242
242
  "dependencies": {
243
243
  "@qvac/error": "^0.2.0",
244
- "@qvac/harness": "^0.8.11",
244
+ "@qvac/harness": "^0.8.13",
245
245
  "@qvac/logging": "^0.2.0",
246
- "@qvac/skills": "^0.1.16",
246
+ "@qvac/skills": "^0.1.18",
247
247
  "asenion": "^0.1.0",
248
248
  "autobee": "^2.11.8",
249
249
  "b4a": "^1.9.0",
@@ -253,11 +253,13 @@
253
253
  "bare-crypto": "^1.15.3",
254
254
  "bare-events": "^2.9.1",
255
255
  "bare-fetch": "^3.0.1",
256
+ "bare-ffmpeg": "^1.5.0",
256
257
  "bare-file-logger": "^1.2.1",
257
258
  "bare-fs": "^4.7.2",
258
259
  "bare-gpu-info": "^0.1.0",
259
260
  "bare-http1": "4.6.1",
260
261
  "bare-media": "^2.10.0",
262
+ "bare-module": "~7.4.0",
261
263
  "bare-os": "^3.9.1",
262
264
  "bare-path": "^3.0.1",
263
265
  "bare-pdfium": "^1.5.5",
@@ -362,7 +364,8 @@
362
364
  "hyperdb": "^6.9.0",
363
365
  "hypercore": "^11.37.0",
364
366
  "hyperbee2": "^2.18.0",
365
- "tar": "^7.5.22"
367
+ "tar": "^7.5.22",
368
+ "bare-tls": "^3.1.13"
366
369
  },
367
370
  "publishConfig": {
368
371
  "access": "public"
package/tui/app.mjs CHANGED
@@ -2206,6 +2206,21 @@ export class ChatApp {
2206
2206
  }
2207
2207
  }
2208
2208
 
2209
+ _reopenMeshes(meshes) {
2210
+ if (!this.engine.openMesh) return null
2211
+
2212
+ return meshes
2213
+ .filter((mesh) => !mesh.open)
2214
+ .map((mesh) => async () => {
2215
+ try {
2216
+ await this.engine.openMesh({ meshId: mesh.meshId })
2217
+ return null
2218
+ } catch (error) {
2219
+ return { type: 'mesh.reopen-failed', meshId: mesh.meshId, error }
2220
+ }
2221
+ })
2222
+ }
2223
+
2209
2224
  // the window's mesh can go without the window doing anything: a kick retires the account
2210
2225
  _watchNextMeshes() {
2211
2226
  if (!this.engine.meshesWatch) return null
@@ -6481,9 +6496,27 @@ export class ChatApp {
6481
6496
  const ids = new Set(msg.meshes.map((mesh) => mesh.meshId))
6482
6497
  // a mesh transition in flight moves the window itself
6483
6498
  const lost = !this._booting && this._meshIds?.has(this.meshId) && !ids.has(this.meshId)
6499
+ // only the startup frame: a later closed mesh was closed on purpose
6500
+ const first = this._meshIds === null
6484
6501
  this._meshIds = ids
6485
6502
 
6486
- return [this, batch(this._watchNextMeshes(), lost ? this._lostMesh(this.meshId) : null)]
6503
+ return [
6504
+ this,
6505
+ batch(
6506
+ this._watchNextMeshes(),
6507
+ lost ? this._lostMesh(this.meshId) : null,
6508
+ first ? this._reopenMeshes(msg.meshes) : null
6509
+ )
6510
+ ]
6511
+ }
6512
+
6513
+ if (msg.type === 'mesh.reopen-failed') {
6514
+ this.status = fg.err.render(
6515
+ `could not reopen mesh ${msg.meshId.slice(0, 8)}: ${msg.error.message}`
6516
+ )
6517
+ this._render()
6518
+
6519
+ return [this, null]
6487
6520
  }
6488
6521
 
6489
6522
  if (msg.type === 'meshes.done') {
@@ -36,6 +36,11 @@ export function turnsFromChunks(chunks) {
36
36
  const turns = []
37
37
  const byRun = new Map()
38
38
  for (const chunk of chunks) {
39
+ // a video's sampled frames belong to the video, not to the reply that stored them
40
+ if (chunk.sourceId) {
41
+ continue
42
+ }
43
+
39
44
  // purely presentational: lets a renderer label the human side per device
40
45
  if (chunk.type === 'user-message') {
41
46
  turns.push({
package/tui/main.mjs CHANGED
@@ -138,6 +138,14 @@ const MIME_TYPES = new Map([
138
138
  ['.heic', 'image/heic'],
139
139
  ['.heif', 'image/heif'],
140
140
  ['.pdf', 'application/pdf'],
141
+ ['.mov', 'video/quicktime'],
142
+ ['.mp4', 'video/mp4'],
143
+ ['.m4v', 'video/x-m4v'],
144
+ ['.webm', 'video/webm'],
145
+ ['.mkv', 'video/x-matroska'],
146
+ ['.m4a', 'audio/mp4'],
147
+ ['.mp3', 'audio/mpeg'],
148
+ ['.wav', 'audio/wav'],
141
149
  ['.txt', 'text/plain'],
142
150
  ['.md', 'text/markdown'],
143
151
  ['.json', 'application/json']