@qvac/core 1.0.0-rc.6 → 1.0.0-rc.7

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 (48) hide show
  1. package/dist-lib/lib/api/agents.js +5 -2
  2. package/dist-lib/lib/api/approval-rules.js +8 -5
  3. package/dist-lib/lib/api/chat.d.ts +1 -2
  4. package/dist-lib/lib/api/chat.js +4 -18
  5. package/dist-lib/lib/api/index.d.ts +0 -1
  6. package/dist-lib/lib/api/index.js +1 -2
  7. package/dist-lib/lib/api/mesh.d.ts +1 -1
  8. package/dist-lib/lib/api/mesh.js +1 -1
  9. package/dist-lib/lib/api/sync.js +12 -2
  10. package/dist-lib/lib/assistant.d.ts +0 -1
  11. package/dist-lib/lib/assistant.js +10 -13
  12. package/dist-lib/lib/core/archived-mesh.d.ts +1 -0
  13. package/dist-lib/lib/core/archived-mesh.js +11 -14
  14. package/dist-lib/lib/core/chat-copy.d.ts +0 -1
  15. package/dist-lib/lib/core/chat-copy.js +1 -2
  16. package/dist-lib/lib/core/chat-move.d.ts +3 -1
  17. package/dist-lib/lib/core/chat-move.js +5 -2
  18. package/dist-lib/lib/core/contract/joined-meshes.js +2 -1
  19. package/dist-lib/lib/core/local/index.d.ts +2 -1
  20. package/dist-lib/lib/core/local/index.js +3 -2
  21. package/dist-lib/lib/core/public-mesh.d.ts +6 -8
  22. package/dist-lib/lib/core/public-mesh.js +19 -29
  23. package/dist-lib/lib/core/sync/index.js +1 -1
  24. package/dist-lib/lib/core.d.ts +15 -8
  25. package/dist-lib/lib/core.js +219 -203
  26. package/dist-lib/lib/errors.d.ts +4 -12
  27. package/dist-lib/lib/errors.js +4 -12
  28. package/dist-lib/schema/engine.js +10 -3
  29. package/dist-lib/schema/local.js +4 -2
  30. package/dist-lib/schema/qvac.js +2 -1
  31. package/dist-lib/spec/capabilities.d.ts +2 -2
  32. package/dist-lib/spec/hrpc/hrpc.json +1 -1
  33. package/dist-lib/spec/hrpc/index.js +1 -1
  34. package/dist-lib/spec/hrpc/messages.js +273 -250
  35. package/dist-lib/spec/hyperschema/index.js +273 -250
  36. package/dist-lib/spec/hyperschema/schema.json +27 -6
  37. package/dist-lib/spec/hyperschema/types.d.ts +7 -1
  38. package/dist-lib/spec/local/hyperdb/messages.js +26 -12
  39. package/dist-lib/spec/local/hyperschema/index.js +13 -6
  40. package/dist-lib/spec/local/hyperschema/schema.json +10 -0
  41. package/dist-lib/spec/local/hyperschema/types.d.ts +2 -0
  42. package/dist-lib/spec/mesh/hyperdb/messages.js +30 -6
  43. package/dist-lib/spec/mesh/hyperdispatch/messages.js +15 -3
  44. package/dist-lib/spec/mesh/hyperschema/index.js +15 -3
  45. package/dist-lib/spec/mesh/hyperschema/schema.json +5 -0
  46. package/dist-lib/spec/mesh/hyperschema/types.d.ts +1 -0
  47. package/package.json +1 -1
  48. package/tui/app.mjs +47 -12
@@ -8578,11 +8578,6 @@
8578
8578
  "name": "displayName",
8579
8579
  "type": "string",
8580
8580
  "version": 1
8581
- },
8582
- {
8583
- "name": "ownWorkspace",
8584
- "type": "string",
8585
- "version": 1
8586
8581
  }
8587
8582
  ]
8588
8583
  },
@@ -8858,11 +8853,31 @@
8858
8853
  }
8859
8854
  ]
8860
8855
  },
8856
+ {
8857
+ "name": "migrate-archived-mesh-request",
8858
+ "namespace": "assistant",
8859
+ "compact": false,
8860
+ "flagsPosition": -1,
8861
+ "fields": [
8862
+ {
8863
+ "name": "meshId",
8864
+ "required": true,
8865
+ "type": "string",
8866
+ "version": 1
8867
+ },
8868
+ {
8869
+ "name": "workspaceId",
8870
+ "required": true,
8871
+ "type": "string",
8872
+ "version": 1
8873
+ }
8874
+ ]
8875
+ },
8861
8876
  {
8862
8877
  "name": "archived-mesh-migration",
8863
8878
  "namespace": "assistant",
8864
8879
  "compact": false,
8865
- "flagsPosition": 1,
8880
+ "flagsPosition": 2,
8866
8881
  "fields": [
8867
8882
  {
8868
8883
  "name": "meshId",
@@ -8870,6 +8885,12 @@
8870
8885
  "type": "string",
8871
8886
  "version": 1
8872
8887
  },
8888
+ {
8889
+ "name": "workspaceId",
8890
+ "required": true,
8891
+ "type": "string",
8892
+ "version": 1
8893
+ },
8873
8894
  {
8874
8895
  "name": "migrated",
8875
8896
  "required": false,
@@ -1803,7 +1803,6 @@ export interface AssistantAccount {
1803
1803
  meshId?: string | null
1804
1804
  writable?: boolean
1805
1805
  displayName?: string | null
1806
- ownWorkspace?: string | null
1807
1806
  }
1808
1807
 
1809
1808
  export interface AssistantMeshTarget {
@@ -1875,8 +1874,14 @@ export interface AssistantArchivedMeshContents {
1875
1874
  knowledge: number
1876
1875
  }
1877
1876
 
1877
+ export interface AssistantMigrateArchivedMeshRequest {
1878
+ meshId: string
1879
+ workspaceId: string
1880
+ }
1881
+
1878
1882
  export interface AssistantArchivedMeshMigration {
1879
1883
  meshId: string
1884
+ workspaceId: string
1880
1885
  migrated?: boolean
1881
1886
  migratedAt: number
1882
1887
  chats: number
@@ -2534,6 +2539,7 @@ export interface SchemaTypes {
2534
2539
  "@assistant/update-member-request": AssistantUpdateMemberRequest
2535
2540
  "@assistant/remove-member-request": AssistantRemoveMemberRequest
2536
2541
  "@assistant/archived-mesh-contents": AssistantArchivedMeshContents
2542
+ "@assistant/migrate-archived-mesh-request": AssistantMigrateArchivedMeshRequest
2537
2543
  "@assistant/archived-mesh-migration": AssistantArchivedMeshMigration
2538
2544
  "@assistant/archived-mesh": AssistantArchivedMesh
2539
2545
  "@assistant/archived-mesh-list": AssistantArchivedMeshList
@@ -1230,7 +1230,8 @@ const encoding29 = {
1230
1230
  ((version >= 13 && m.workspaceKey) ? 512 : 0) |
1231
1231
  ((version >= 13 && m.joinedAt) ? 1024 : 0) |
1232
1232
  ((version >= 13 && m.kicked) ? 2048 : 0) |
1233
- ((version >= 13 && m.retiredUnder) ? 4096 : 0)
1233
+ ((version >= 13 && m.retiredUnder) ? 4096 : 0) |
1234
+ ((version >= 13 && m.initial) ? 8192 : 0)
1234
1235
 
1235
1236
  c.fixed32.preencode(state, m.key)
1236
1237
  c.fixed32.preencode(state, m.seed)
@@ -1260,7 +1261,8 @@ const encoding29 = {
1260
1261
  ((version >= 13 && m.workspaceKey) ? 512 : 0) |
1261
1262
  ((version >= 13 && m.joinedAt) ? 1024 : 0) |
1262
1263
  ((version >= 13 && m.kicked) ? 2048 : 0) |
1263
- ((version >= 13 && m.retiredUnder) ? 4096 : 0)
1264
+ ((version >= 13 && m.retiredUnder) ? 4096 : 0) |
1265
+ ((version >= 13 && m.initial) ? 8192 : 0)
1264
1266
 
1265
1267
  c.fixed32.encode(state, m.key)
1266
1268
  c.fixed32.encode(state, m.seed)
@@ -1297,7 +1299,8 @@ const encoding29 = {
1297
1299
  workspaceKey: (version >= 13 && (flags & 512) !== 0) ? c.fixed32.decode(state) : null,
1298
1300
  joinedAt: (version >= 13 && (flags & 1024) !== 0) ? c.uint.decode(state) : 0,
1299
1301
  kicked: (version >= 13 && (flags & 2048) !== 0),
1300
- retiredUnder: (version >= 13 && (flags & 4096) !== 0) ? c.fixed32.decode(state) : null
1302
+ retiredUnder: (version >= 13 && (flags & 4096) !== 0) ? c.fixed32.decode(state) : null,
1303
+ initial: (version >= 13 && (flags & 8192) !== 0)
1301
1304
  }
1302
1305
  }
1303
1306
  }
@@ -1676,18 +1679,20 @@ const encoding39 = {
1676
1679
  c.string.preencode(state, m.targetChatId)
1677
1680
  c.string.preencode(state, m.agentId)
1678
1681
  c.uint.preencode(state, m.carried)
1679
- state.end++ // max flag is 4 so always one byte
1682
+ state.end++ // max flag is 8 so always one byte
1680
1683
 
1681
1684
  if (version >= 9 && m.restartRunId) c.string.preencode(state, m.restartRunId)
1682
1685
  c.uint.preencode(state, m.startedAt)
1683
1686
  if (version >= 9 && m.completedAt) c.uint.preencode(state, m.completedAt)
1684
1687
  if (version >= 9 && m.failure) c.string.preencode(state, m.failure)
1688
+ if (version >= 13 && m.targetMeshId) c.string.preencode(state, m.targetMeshId)
1685
1689
  },
1686
1690
  encode(state, m) {
1687
1691
  const flags =
1688
1692
  ((version >= 9 && m.restartRunId) ? 1 : 0) |
1689
1693
  ((version >= 9 && m.completedAt) ? 2 : 0) |
1690
- ((version >= 9 && m.failure) ? 4 : 0)
1694
+ ((version >= 9 && m.failure) ? 4 : 0) |
1695
+ ((version >= 13 && m.targetMeshId) ? 8 : 0)
1691
1696
 
1692
1697
  c.fixed32.encode(state, m.meshKey)
1693
1698
  c.string.encode(state, m.chatId)
@@ -1701,6 +1706,7 @@ const encoding39 = {
1701
1706
  c.uint.encode(state, m.startedAt)
1702
1707
  if (version >= 9 && m.completedAt) c.uint.encode(state, m.completedAt)
1703
1708
  if (version >= 9 && m.failure) c.string.encode(state, m.failure)
1709
+ if (version >= 13 && m.targetMeshId) c.string.encode(state, m.targetMeshId)
1704
1710
  },
1705
1711
  decode(state) {
1706
1712
  const r0 = c.fixed32.decode(state)
@@ -1722,7 +1728,8 @@ const encoding39 = {
1722
1728
  restartRunId: (version >= 9 && (flags & 1) !== 0) ? c.string.decode(state) : null,
1723
1729
  startedAt: c.uint.decode(state),
1724
1730
  completedAt: (version >= 9 && (flags & 2) !== 0) ? c.uint.decode(state) : 0,
1725
- failure: (version >= 9 && (flags & 4) !== 0) ? c.string.decode(state) : null
1731
+ failure: (version >= 9 && (flags & 4) !== 0) ? c.string.decode(state) : null,
1732
+ targetMeshId: (version >= 13 && (flags & 8) !== 0) ? c.string.decode(state) : null
1726
1733
  }
1727
1734
  }
1728
1735
  }
@@ -3196,7 +3203,8 @@ const encoding77 = {
3196
3203
  ((version >= 13 && m.workspaceKey) ? 512 : 0) |
3197
3204
  ((version >= 13 && m.joinedAt) ? 1024 : 0) |
3198
3205
  ((version >= 13 && m.kicked) ? 2048 : 0) |
3199
- ((version >= 13 && m.retiredUnder) ? 4096 : 0)
3206
+ ((version >= 13 && m.retiredUnder) ? 4096 : 0) |
3207
+ ((version >= 13 && m.initial) ? 8192 : 0)
3200
3208
 
3201
3209
  c.fixed32.preencode(state, m.seed)
3202
3210
  c.uint.preencode(state, flags)
@@ -3225,7 +3233,8 @@ const encoding77 = {
3225
3233
  ((version >= 13 && m.workspaceKey) ? 512 : 0) |
3226
3234
  ((version >= 13 && m.joinedAt) ? 1024 : 0) |
3227
3235
  ((version >= 13 && m.kicked) ? 2048 : 0) |
3228
- ((version >= 13 && m.retiredUnder) ? 4096 : 0)
3236
+ ((version >= 13 && m.retiredUnder) ? 4096 : 0) |
3237
+ ((version >= 13 && m.initial) ? 8192 : 0)
3229
3238
 
3230
3239
  c.fixed32.encode(state, m.seed)
3231
3240
  c.uint.encode(state, flags)
@@ -3260,7 +3269,8 @@ const encoding77 = {
3260
3269
  workspaceKey: (version >= 13 && (flags & 512) !== 0) ? c.fixed32.decode(state) : null,
3261
3270
  joinedAt: (version >= 13 && (flags & 1024) !== 0) ? c.uint.decode(state) : 0,
3262
3271
  kicked: (version >= 13 && (flags & 2048) !== 0),
3263
- retiredUnder: (version >= 13 && (flags & 4096) !== 0) ? c.fixed32.decode(state) : null
3272
+ retiredUnder: (version >= 13 && (flags & 4096) !== 0) ? c.fixed32.decode(state) : null,
3273
+ initial: (version >= 13 && (flags & 8192) !== 0)
3264
3274
  }
3265
3275
  }
3266
3276
  }
@@ -3616,18 +3626,20 @@ const encoding87 = {
3616
3626
  c.string.preencode(state, m.targetChatId)
3617
3627
  c.string.preencode(state, m.agentId)
3618
3628
  c.uint.preencode(state, m.carried)
3619
- state.end++ // max flag is 4 so always one byte
3629
+ state.end++ // max flag is 8 so always one byte
3620
3630
 
3621
3631
  if (version >= 9 && m.restartRunId) c.string.preencode(state, m.restartRunId)
3622
3632
  c.uint.preencode(state, m.startedAt)
3623
3633
  if (version >= 9 && m.completedAt) c.uint.preencode(state, m.completedAt)
3624
3634
  if (version >= 9 && m.failure) c.string.preencode(state, m.failure)
3635
+ if (version >= 13 && m.targetMeshId) c.string.preencode(state, m.targetMeshId)
3625
3636
  },
3626
3637
  encode(state, m) {
3627
3638
  const flags =
3628
3639
  ((version >= 9 && m.restartRunId) ? 1 : 0) |
3629
3640
  ((version >= 9 && m.completedAt) ? 2 : 0) |
3630
- ((version >= 9 && m.failure) ? 4 : 0)
3641
+ ((version >= 9 && m.failure) ? 4 : 0) |
3642
+ ((version >= 13 && m.targetMeshId) ? 8 : 0)
3631
3643
 
3632
3644
  c.fixed32.encode(state, m.targetMeshKey)
3633
3645
  c.string.encode(state, m.targetChatId)
@@ -3639,6 +3651,7 @@ const encoding87 = {
3639
3651
  c.uint.encode(state, m.startedAt)
3640
3652
  if (version >= 9 && m.completedAt) c.uint.encode(state, m.completedAt)
3641
3653
  if (version >= 9 && m.failure) c.string.encode(state, m.failure)
3654
+ if (version >= 13 && m.targetMeshId) c.string.encode(state, m.targetMeshId)
3642
3655
  },
3643
3656
  decode(state) {
3644
3657
  const r2 = c.fixed32.decode(state)
@@ -3658,7 +3671,8 @@ const encoding87 = {
3658
3671
  restartRunId: (version >= 9 && (flags & 1) !== 0) ? c.string.decode(state) : null,
3659
3672
  startedAt: c.uint.decode(state),
3660
3673
  completedAt: (version >= 9 && (flags & 2) !== 0) ? c.uint.decode(state) : 0,
3661
- failure: (version >= 9 && (flags & 4) !== 0) ? c.string.decode(state) : null
3674
+ failure: (version >= 9 && (flags & 4) !== 0) ? c.string.decode(state) : null,
3675
+ targetMeshId: (version >= 13 && (flags & 8) !== 0) ? c.string.decode(state) : null
3662
3676
  }
3663
3677
  }
3664
3678
  }
@@ -1230,7 +1230,8 @@ const encoding29 = {
1230
1230
  ((version >= 13 && m.workspaceKey) ? 512 : 0) |
1231
1231
  ((version >= 13 && m.joinedAt) ? 1024 : 0) |
1232
1232
  ((version >= 13 && m.kicked) ? 2048 : 0) |
1233
- ((version >= 13 && m.retiredUnder) ? 4096 : 0)
1233
+ ((version >= 13 && m.retiredUnder) ? 4096 : 0) |
1234
+ ((version >= 13 && m.initial) ? 8192 : 0)
1234
1235
 
1235
1236
  c.fixed32.preencode(state, m.key)
1236
1237
  c.fixed32.preencode(state, m.seed)
@@ -1260,7 +1261,8 @@ const encoding29 = {
1260
1261
  ((version >= 13 && m.workspaceKey) ? 512 : 0) |
1261
1262
  ((version >= 13 && m.joinedAt) ? 1024 : 0) |
1262
1263
  ((version >= 13 && m.kicked) ? 2048 : 0) |
1263
- ((version >= 13 && m.retiredUnder) ? 4096 : 0)
1264
+ ((version >= 13 && m.retiredUnder) ? 4096 : 0) |
1265
+ ((version >= 13 && m.initial) ? 8192 : 0)
1264
1266
 
1265
1267
  c.fixed32.encode(state, m.key)
1266
1268
  c.fixed32.encode(state, m.seed)
@@ -1297,7 +1299,8 @@ const encoding29 = {
1297
1299
  workspaceKey: (version >= 13 && (flags & 512) !== 0) ? c.fixed32.decode(state) : null,
1298
1300
  joinedAt: (version >= 13 && (flags & 1024) !== 0) ? c.uint.decode(state) : 0,
1299
1301
  kicked: (version >= 13 && (flags & 2048) !== 0),
1300
- retiredUnder: (version >= 13 && (flags & 4096) !== 0) ? c.fixed32.decode(state) : null
1302
+ retiredUnder: (version >= 13 && (flags & 4096) !== 0) ? c.fixed32.decode(state) : null,
1303
+ initial: (version >= 13 && (flags & 8192) !== 0)
1301
1304
  }
1302
1305
  }
1303
1306
  }
@@ -1676,18 +1679,20 @@ const encoding39 = {
1676
1679
  c.string.preencode(state, m.targetChatId)
1677
1680
  c.string.preencode(state, m.agentId)
1678
1681
  c.uint.preencode(state, m.carried)
1679
- state.end++ // max flag is 4 so always one byte
1682
+ state.end++ // max flag is 8 so always one byte
1680
1683
 
1681
1684
  if (version >= 9 && m.restartRunId) c.string.preencode(state, m.restartRunId)
1682
1685
  c.uint.preencode(state, m.startedAt)
1683
1686
  if (version >= 9 && m.completedAt) c.uint.preencode(state, m.completedAt)
1684
1687
  if (version >= 9 && m.failure) c.string.preencode(state, m.failure)
1688
+ if (version >= 13 && m.targetMeshId) c.string.preencode(state, m.targetMeshId)
1685
1689
  },
1686
1690
  encode(state, m) {
1687
1691
  const flags =
1688
1692
  ((version >= 9 && m.restartRunId) ? 1 : 0) |
1689
1693
  ((version >= 9 && m.completedAt) ? 2 : 0) |
1690
- ((version >= 9 && m.failure) ? 4 : 0)
1694
+ ((version >= 9 && m.failure) ? 4 : 0) |
1695
+ ((version >= 13 && m.targetMeshId) ? 8 : 0)
1691
1696
 
1692
1697
  c.fixed32.encode(state, m.meshKey)
1693
1698
  c.string.encode(state, m.chatId)
@@ -1701,6 +1706,7 @@ const encoding39 = {
1701
1706
  c.uint.encode(state, m.startedAt)
1702
1707
  if (version >= 9 && m.completedAt) c.uint.encode(state, m.completedAt)
1703
1708
  if (version >= 9 && m.failure) c.string.encode(state, m.failure)
1709
+ if (version >= 13 && m.targetMeshId) c.string.encode(state, m.targetMeshId)
1704
1710
  },
1705
1711
  decode(state) {
1706
1712
  const r0 = c.fixed32.decode(state)
@@ -1722,7 +1728,8 @@ const encoding39 = {
1722
1728
  restartRunId: (version >= 9 && (flags & 1) !== 0) ? c.string.decode(state) : null,
1723
1729
  startedAt: c.uint.decode(state),
1724
1730
  completedAt: (version >= 9 && (flags & 2) !== 0) ? c.uint.decode(state) : 0,
1725
- failure: (version >= 9 && (flags & 4) !== 0) ? c.string.decode(state) : null
1731
+ failure: (version >= 9 && (flags & 4) !== 0) ? c.string.decode(state) : null,
1732
+ targetMeshId: (version >= 13 && (flags & 8) !== 0) ? c.string.decode(state) : null
1726
1733
  }
1727
1734
  }
1728
1735
  }
@@ -825,6 +825,11 @@
825
825
  "name": "retiredUnder",
826
826
  "type": "fixed32",
827
827
  "version": 13
828
+ },
829
+ {
830
+ "name": "initial",
831
+ "type": "bool",
832
+ "version": 13
828
833
  }
829
834
  ]
830
835
  },
@@ -1114,6 +1119,11 @@
1114
1119
  "name": "failure",
1115
1120
  "type": "string",
1116
1121
  "version": 9
1122
+ },
1123
+ {
1124
+ "name": "targetMeshId",
1125
+ "type": "string",
1126
+ "version": 13
1117
1127
  }
1118
1128
  ]
1119
1129
  },
@@ -163,6 +163,7 @@ export interface LocalMeshMembershipV1 {
163
163
  joinedAt?: number
164
164
  kicked?: boolean
165
165
  retiredUnder?: Buffer | null
166
+ initial?: boolean
166
167
  }
167
168
 
168
169
  export type LocalMeshMembership = (LocalMeshMembershipV1 & { version?: number })
@@ -221,6 +222,7 @@ export interface LocalChatMoveV1 {
221
222
  startedAt: number
222
223
  completedAt?: number
223
224
  failure?: string | null
225
+ targetMeshId?: string | null
224
226
  }
225
227
 
226
228
  export type LocalChatMove = (LocalChatMoveV1 & { version?: number })
@@ -5789,10 +5789,20 @@ const encoding134 = {
5789
5789
  // @qvac/joined-mesh-v1
5790
5790
  const encoding135 = {
5791
5791
  preencode(state, m) {
5792
+ const flags =
5793
+ ((version >= 7 && m.leftAt) ? 1 : 0) |
5794
+ ((version >= 7 && m.label) ? 2 : 0) |
5795
+ ((version >= 7 && m.labeledAt) ? 4 : 0) |
5796
+ ((version >= 7 && m.shared) ? 8 : 0) |
5797
+ ((version >= 7 && m.sharedAt) ? 16 : 0) |
5798
+ ((version >= 19 && m.workspace) ? 32 : 0) |
5799
+ ((version >= 19 && m.kicked) ? 64 : 0) |
5800
+ ((version >= 19 && m.initial) ? 128 : 0)
5801
+
5792
5802
  c.fixed32.preencode(state, m.meshKey)
5793
5803
  c.fixed32.preencode(state, m.memberId)
5794
5804
  c.uint.preencode(state, m.joinedAt)
5795
- state.end++ // max flag is 64 so always one byte
5805
+ c.uint.preencode(state, flags)
5796
5806
 
5797
5807
  if (version >= 7 && m.leftAt) c.uint.preencode(state, m.leftAt)
5798
5808
  if (version >= 7 && m.label) c.string.preencode(state, m.label)
@@ -5807,7 +5817,8 @@ const encoding135 = {
5807
5817
  ((version >= 7 && m.shared) ? 8 : 0) |
5808
5818
  ((version >= 7 && m.sharedAt) ? 16 : 0) |
5809
5819
  ((version >= 19 && m.workspace) ? 32 : 0) |
5810
- ((version >= 19 && m.kicked) ? 64 : 0)
5820
+ ((version >= 19 && m.kicked) ? 64 : 0) |
5821
+ ((version >= 19 && m.initial) ? 128 : 0)
5811
5822
 
5812
5823
  c.fixed32.encode(state, m.meshKey)
5813
5824
  c.fixed32.encode(state, m.memberId)
@@ -5836,7 +5847,8 @@ const encoding135 = {
5836
5847
  shared: (version >= 7 && (flags & 8) !== 0),
5837
5848
  sharedAt: (version >= 7 && (flags & 16) !== 0) ? c.uint.decode(state) : 0,
5838
5849
  workspace: (version >= 19 && (flags & 32) !== 0),
5839
- kicked: (version >= 19 && (flags & 64) !== 0)
5850
+ kicked: (version >= 19 && (flags & 64) !== 0),
5851
+ initial: (version >= 19 && (flags & 128) !== 0)
5840
5852
  }
5841
5853
  }
5842
5854
  }
@@ -12283,9 +12295,19 @@ const encoding299 = {
12283
12295
  // @qvac/joined-mesh-v1/hyperdb#37
12284
12296
  const encoding300 = {
12285
12297
  preencode(state, m) {
12298
+ const flags =
12299
+ ((version >= 7 && m.leftAt) ? 1 : 0) |
12300
+ ((version >= 7 && m.label) ? 2 : 0) |
12301
+ ((version >= 7 && m.labeledAt) ? 4 : 0) |
12302
+ ((version >= 7 && m.shared) ? 8 : 0) |
12303
+ ((version >= 7 && m.sharedAt) ? 16 : 0) |
12304
+ ((version >= 19 && m.workspace) ? 32 : 0) |
12305
+ ((version >= 19 && m.kicked) ? 64 : 0) |
12306
+ ((version >= 19 && m.initial) ? 128 : 0)
12307
+
12286
12308
  c.fixed32.preencode(state, m.memberId)
12287
12309
  c.uint.preencode(state, m.joinedAt)
12288
- state.end++ // max flag is 64 so always one byte
12310
+ c.uint.preencode(state, flags)
12289
12311
 
12290
12312
  if (version >= 7 && m.leftAt) c.uint.preencode(state, m.leftAt)
12291
12313
  if (version >= 7 && m.label) c.string.preencode(state, m.label)
@@ -12300,7 +12322,8 @@ const encoding300 = {
12300
12322
  ((version >= 7 && m.shared) ? 8 : 0) |
12301
12323
  ((version >= 7 && m.sharedAt) ? 16 : 0) |
12302
12324
  ((version >= 19 && m.workspace) ? 32 : 0) |
12303
- ((version >= 19 && m.kicked) ? 64 : 0)
12325
+ ((version >= 19 && m.kicked) ? 64 : 0) |
12326
+ ((version >= 19 && m.initial) ? 128 : 0)
12304
12327
 
12305
12328
  c.fixed32.encode(state, m.memberId)
12306
12329
  c.uint.encode(state, m.joinedAt)
@@ -12327,7 +12350,8 @@ const encoding300 = {
12327
12350
  shared: (version >= 7 && (flags & 8) !== 0),
12328
12351
  sharedAt: (version >= 7 && (flags & 16) !== 0) ? c.uint.decode(state) : 0,
12329
12352
  workspace: (version >= 19 && (flags & 32) !== 0),
12330
- kicked: (version >= 19 && (flags & 64) !== 0)
12353
+ kicked: (version >= 19 && (flags & 64) !== 0),
12354
+ initial: (version >= 19 && (flags & 128) !== 0)
12331
12355
  }
12332
12356
  }
12333
12357
  }
@@ -5789,10 +5789,20 @@ const encoding134 = {
5789
5789
  // @qvac/joined-mesh-v1
5790
5790
  const encoding135 = {
5791
5791
  preencode(state, m) {
5792
+ const flags =
5793
+ ((version >= 7 && m.leftAt) ? 1 : 0) |
5794
+ ((version >= 7 && m.label) ? 2 : 0) |
5795
+ ((version >= 7 && m.labeledAt) ? 4 : 0) |
5796
+ ((version >= 7 && m.shared) ? 8 : 0) |
5797
+ ((version >= 7 && m.sharedAt) ? 16 : 0) |
5798
+ ((version >= 19 && m.workspace) ? 32 : 0) |
5799
+ ((version >= 19 && m.kicked) ? 64 : 0) |
5800
+ ((version >= 19 && m.initial) ? 128 : 0)
5801
+
5792
5802
  c.fixed32.preencode(state, m.meshKey)
5793
5803
  c.fixed32.preencode(state, m.memberId)
5794
5804
  c.uint.preencode(state, m.joinedAt)
5795
- state.end++ // max flag is 64 so always one byte
5805
+ c.uint.preencode(state, flags)
5796
5806
 
5797
5807
  if (version >= 7 && m.leftAt) c.uint.preencode(state, m.leftAt)
5798
5808
  if (version >= 7 && m.label) c.string.preencode(state, m.label)
@@ -5807,7 +5817,8 @@ const encoding135 = {
5807
5817
  ((version >= 7 && m.shared) ? 8 : 0) |
5808
5818
  ((version >= 7 && m.sharedAt) ? 16 : 0) |
5809
5819
  ((version >= 19 && m.workspace) ? 32 : 0) |
5810
- ((version >= 19 && m.kicked) ? 64 : 0)
5820
+ ((version >= 19 && m.kicked) ? 64 : 0) |
5821
+ ((version >= 19 && m.initial) ? 128 : 0)
5811
5822
 
5812
5823
  c.fixed32.encode(state, m.meshKey)
5813
5824
  c.fixed32.encode(state, m.memberId)
@@ -5836,7 +5847,8 @@ const encoding135 = {
5836
5847
  shared: (version >= 7 && (flags & 8) !== 0),
5837
5848
  sharedAt: (version >= 7 && (flags & 16) !== 0) ? c.uint.decode(state) : 0,
5838
5849
  workspace: (version >= 19 && (flags & 32) !== 0),
5839
- kicked: (version >= 19 && (flags & 64) !== 0)
5850
+ kicked: (version >= 19 && (flags & 64) !== 0),
5851
+ initial: (version >= 19 && (flags & 128) !== 0)
5840
5852
  }
5841
5853
  }
5842
5854
  }
@@ -5789,10 +5789,20 @@ const encoding134 = {
5789
5789
  // @qvac/joined-mesh-v1
5790
5790
  const encoding135 = {
5791
5791
  preencode(state, m) {
5792
+ const flags =
5793
+ ((version >= 7 && m.leftAt) ? 1 : 0) |
5794
+ ((version >= 7 && m.label) ? 2 : 0) |
5795
+ ((version >= 7 && m.labeledAt) ? 4 : 0) |
5796
+ ((version >= 7 && m.shared) ? 8 : 0) |
5797
+ ((version >= 7 && m.sharedAt) ? 16 : 0) |
5798
+ ((version >= 19 && m.workspace) ? 32 : 0) |
5799
+ ((version >= 19 && m.kicked) ? 64 : 0) |
5800
+ ((version >= 19 && m.initial) ? 128 : 0)
5801
+
5792
5802
  c.fixed32.preencode(state, m.meshKey)
5793
5803
  c.fixed32.preencode(state, m.memberId)
5794
5804
  c.uint.preencode(state, m.joinedAt)
5795
- state.end++ // max flag is 64 so always one byte
5805
+ c.uint.preencode(state, flags)
5796
5806
 
5797
5807
  if (version >= 7 && m.leftAt) c.uint.preencode(state, m.leftAt)
5798
5808
  if (version >= 7 && m.label) c.string.preencode(state, m.label)
@@ -5807,7 +5817,8 @@ const encoding135 = {
5807
5817
  ((version >= 7 && m.shared) ? 8 : 0) |
5808
5818
  ((version >= 7 && m.sharedAt) ? 16 : 0) |
5809
5819
  ((version >= 19 && m.workspace) ? 32 : 0) |
5810
- ((version >= 19 && m.kicked) ? 64 : 0)
5820
+ ((version >= 19 && m.kicked) ? 64 : 0) |
5821
+ ((version >= 19 && m.initial) ? 128 : 0)
5811
5822
 
5812
5823
  c.fixed32.encode(state, m.meshKey)
5813
5824
  c.fixed32.encode(state, m.memberId)
@@ -5836,7 +5847,8 @@ const encoding135 = {
5836
5847
  shared: (version >= 7 && (flags & 8) !== 0),
5837
5848
  sharedAt: (version >= 7 && (flags & 16) !== 0) ? c.uint.decode(state) : 0,
5838
5849
  workspace: (version >= 19 && (flags & 32) !== 0),
5839
- kicked: (version >= 19 && (flags & 64) !== 0)
5850
+ kicked: (version >= 19 && (flags & 64) !== 0),
5851
+ initial: (version >= 19 && (flags & 128) !== 0)
5840
5852
  }
5841
5853
  }
5842
5854
  }
@@ -3691,6 +3691,11 @@
3691
3691
  "name": "kicked",
3692
3692
  "type": "bool",
3693
3693
  "version": 19
3694
+ },
3695
+ {
3696
+ "name": "initial",
3697
+ "type": "bool",
3698
+ "version": 19
3694
3699
  }
3695
3700
  ]
3696
3701
  },
@@ -710,6 +710,7 @@ export interface QvacJoinedMeshV1 {
710
710
  sharedAt?: number
711
711
  workspace?: boolean
712
712
  kicked?: boolean
713
+ initial?: boolean
713
714
  }
714
715
 
715
716
  export type QvacJoinedMesh = (QvacJoinedMeshV1 & { version?: number })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qvac/core",
3
- "version": "1.0.0-rc.6",
3
+ "version": "1.0.0-rc.7",
4
4
  "type": "module",
5
5
  "description": "Peer-to-peer AI across your devices",
6
6
  "engines": {