@qvac/core 0.1.4 → 0.2.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 (105) hide show
  1. package/.claude/skills/asana/SKILL.md +86 -0
  2. package/.claude/skills/compaction/SKILL.md +127 -0
  3. package/.claude/skills/device-mesh-debug/SKILL.md +328 -0
  4. package/.claude/skills/gh-stack/SKILL.md +181 -0
  5. package/.claude/skills/gh-stack/references/commands.md +177 -0
  6. package/.claude/skills/gh-stack/references/stack-design.md +97 -0
  7. package/.claude/skills/gh-stack/references/troubleshooting.md +159 -0
  8. package/.claude/skills/js-house-style/SKILL.md +670 -0
  9. package/.claude/skills/pr-create/SKILL.md +180 -0
  10. package/.claude/skills/pr-review/SKILL.md +216 -0
  11. package/CLAUDE.md +45 -0
  12. package/README.md +10 -5
  13. package/dist-lib/lib/api/agents.js +3 -3
  14. package/dist-lib/lib/api/chat-groups.d.ts +1 -1
  15. package/dist-lib/lib/api/chat-groups.js +5 -3
  16. package/dist-lib/lib/api/chat.js +2 -2
  17. package/dist-lib/lib/api/current-mesh.d.ts +3 -2
  18. package/dist-lib/lib/api/current-mesh.js +4 -3
  19. package/dist-lib/lib/api/devices.js +1 -0
  20. package/dist-lib/lib/api/index.js +2 -0
  21. package/dist-lib/lib/api/members.d.ts +3 -0
  22. package/dist-lib/lib/api/members.js +23 -0
  23. package/dist-lib/lib/api/mesh.d.ts +14 -3
  24. package/dist-lib/lib/api/mesh.js +20 -3
  25. package/dist-lib/lib/api/watchable.d.ts +1 -1
  26. package/dist-lib/lib/api/watchable.js +1 -1
  27. package/dist-lib/lib/assistant.js +2 -1
  28. package/dist-lib/lib/core/agent.d.ts +1 -0
  29. package/dist-lib/lib/core/agent.js +29 -1
  30. package/dist-lib/lib/core/chat-group.d.ts +4 -0
  31. package/dist-lib/lib/core/chat-group.js +43 -1
  32. package/dist-lib/lib/core/chat.d.ts +10 -0
  33. package/dist-lib/lib/core/chat.js +75 -9
  34. package/dist-lib/lib/core/contract/index.js +2 -0
  35. package/dist-lib/lib/core/contract/joined-meshes.d.ts +2 -0
  36. package/dist-lib/lib/core/contract/joined-meshes.js +41 -0
  37. package/dist-lib/lib/core/contract/members.js +68 -2
  38. package/dist-lib/lib/core/contract/writers.js +19 -3
  39. package/dist-lib/lib/core/departures.d.ts +3 -1
  40. package/dist-lib/lib/core/departures.js +6 -4
  41. package/dist-lib/lib/core/device-attestation.d.ts +8 -0
  42. package/dist-lib/lib/core/device-attestation.js +25 -0
  43. package/dist-lib/lib/core/device-invites.d.ts +9 -0
  44. package/dist-lib/lib/core/device-invites.js +40 -0
  45. package/dist-lib/lib/core/files/index.d.ts +2 -1
  46. package/dist-lib/lib/core/files/index.js +1 -1
  47. package/dist-lib/lib/core/files/store/index.d.ts +1 -0
  48. package/dist-lib/lib/core/files/store/server.d.ts +5 -4
  49. package/dist-lib/lib/core/files/store/server.js +10 -6
  50. package/dist-lib/lib/core/helpers/index.d.ts +1 -1
  51. package/dist-lib/lib/core/hosted-agents.d.ts +3 -1
  52. package/dist-lib/lib/core/hosted-agents.js +9 -3
  53. package/dist-lib/lib/core/identity.d.ts +10 -0
  54. package/dist-lib/lib/core/identity.js +45 -0
  55. package/dist-lib/lib/core/invite.d.ts +3 -0
  56. package/dist-lib/lib/core/invite.js +8 -2
  57. package/dist-lib/lib/core/local/index.d.ts +22 -7
  58. package/dist-lib/lib/core/local/index.js +202 -66
  59. package/dist-lib/lib/core/membership.d.ts +8 -2
  60. package/dist-lib/lib/core/membership.js +33 -9
  61. package/dist-lib/lib/core/mesh-seed-handoff.d.ts +17 -0
  62. package/dist-lib/lib/core/mesh-seed-handoff.js +34 -0
  63. package/dist-lib/lib/core/mesh.d.ts +13 -1
  64. package/dist-lib/lib/core/mesh.js +61 -8
  65. package/dist-lib/lib/core/migrations/index.d.ts +3 -1
  66. package/dist-lib/lib/core/migrations/index.js +2 -2
  67. package/dist-lib/lib/core/migrations/membership.js +27 -15
  68. package/dist-lib/lib/core/rank.d.ts +14 -0
  69. package/dist-lib/lib/core/rank.js +23 -0
  70. package/dist-lib/lib/core/sync/index.js +6 -0
  71. package/dist-lib/lib/core.d.ts +91 -13
  72. package/dist-lib/lib/core.js +1051 -207
  73. package/dist-lib/schema/build.js +3 -2
  74. package/dist-lib/schema/engine.js +153 -9
  75. package/dist-lib/schema/field-order.js +4 -1
  76. package/dist-lib/schema/local.js +32 -0
  77. package/dist-lib/schema/qvac.js +45 -6
  78. package/dist-lib/spec/bind.js +35 -0
  79. package/dist-lib/spec/calls.js +37 -27
  80. package/dist-lib/spec/capabilities.d.ts +30 -10
  81. package/dist-lib/spec/hrpc/hrpc.json +135 -5
  82. package/dist-lib/spec/hrpc/index.js +130 -9
  83. package/dist-lib/spec/hrpc/messages.js +408 -14
  84. package/dist-lib/spec/hyperschema/index.js +408 -14
  85. package/dist-lib/spec/hyperschema/schema.json +309 -1
  86. package/dist-lib/spec/hyperschema/types.d.ts +90 -1
  87. package/dist-lib/spec/local/hyperdb/db.json +46 -1
  88. package/dist-lib/spec/local/hyperdb/index.js +209 -2
  89. package/dist-lib/spec/local/hyperdb/messages.js +557 -90
  90. package/dist-lib/spec/local/hyperschema/index.js +240 -2
  91. package/dist-lib/spec/local/hyperschema/schema.json +120 -1
  92. package/dist-lib/spec/local/hyperschema/types.d.ts +33 -1
  93. package/dist-lib/spec/mesh/hyperdb/db.json +16 -1
  94. package/dist-lib/spec/mesh/hyperdb/index.js +71 -2
  95. package/dist-lib/spec/mesh/hyperdb/messages.js +571 -192
  96. package/dist-lib/spec/mesh/hyperdispatch/dispatch.json +13 -1
  97. package/dist-lib/spec/mesh/hyperdispatch/index.js +35 -1
  98. package/dist-lib/spec/mesh/hyperdispatch/messages.js +283 -20
  99. package/dist-lib/spec/mesh/hyperschema/index.js +283 -20
  100. package/dist-lib/spec/mesh/hyperschema/schema.json +179 -1
  101. package/dist-lib/spec/mesh/hyperschema/types.d.ts +45 -1
  102. package/package.json +6 -6
  103. package/tui/app.mjs +416 -50
  104. package/tui/boot.mjs +1 -1
  105. package/tui/lib/sidebar.mjs +3 -2
@@ -67,8 +67,9 @@ const builder = HRPCBuilder.from(SCHEMA_DIR, HRPC_DIR);
67
67
  registerEngineApi(builder.namespace('assistant'));
68
68
  HRPCBuilder.toDisk(builder);
69
69
  writeBind(builder, path.join(SPEC_DIR, 'bind.js'));
70
- writeClient(builder, path.join(SPEC_DIR, 'calls.js'));
71
- writeCapabilities(builder, path.join(SPEC_DIR, 'capabilities.d.ts'));
70
+ const callSites = { optionalRequests: new Set(['@assistant/empty', '@assistant/mesh-scope']) };
71
+ writeClient(builder, path.join(SPEC_DIR, 'calls.js'), callSites);
72
+ writeCapabilities(builder, path.join(SPEC_DIR, 'capabilities.d.ts'), callSites);
72
73
  const localSchema = Hyperschema.from(LOCAL_SCHEMA_DIR);
73
74
  registerLocalTypes(localSchema.namespace('local'));
74
75
  Hyperschema.toDisk(localSchema, { esm: true });
@@ -100,7 +100,9 @@ export function registerEngineTypes(ns) {
100
100
  { name: 'imageWidth', type: 'uint' },
101
101
  { name: 'imageHeight', type: 'uint' },
102
102
  { name: 'approvalMode', type: '@assistant/approval-mode' },
103
- { name: 'disabledToolsets', type: 'string', array: true }
103
+ { name: 'disabledToolsets', type: 'string', array: true },
104
+ { name: 'meshId', type: 'string' },
105
+ { name: 'isDefault', type: 'bool' }
104
106
  ]
105
107
  });
106
108
  ns.register({
@@ -128,7 +130,9 @@ export function registerEngineTypes(ns) {
128
130
  { name: 'clearImageSettings', type: 'bool' },
129
131
  { name: 'clearCtxSize', type: 'bool' },
130
132
  { name: 'approvalMode', type: '@assistant/approval-mode' },
131
- { name: 'disabledToolsets', type: 'string', array: true }
133
+ { name: 'disabledToolsets', type: 'string', array: true },
134
+ { name: 'isDefault', type: 'bool' },
135
+ { name: 'clearIsDefault', type: 'bool' }
132
136
  ]
133
137
  });
134
138
  ns.register({
@@ -260,6 +264,21 @@ export function registerEngineTypes(ns) {
260
264
  { name: 'groupId', type: 'string' }
261
265
  ]
262
266
  });
267
+ ns.register({
268
+ name: 'move-chat-request',
269
+ fields: [
270
+ { name: 'id', type: 'string', required: true },
271
+ { name: 'groupId', type: 'string' },
272
+ { name: 'afterId', type: 'string' }
273
+ ]
274
+ });
275
+ ns.register({
276
+ name: 'move-chat-group-request',
277
+ fields: [
278
+ { name: 'id', type: 'string', required: true },
279
+ { name: 'afterId', type: 'string' }
280
+ ]
281
+ });
263
282
  ns.register({
264
283
  name: 'tool-report-entry',
265
284
  fields: [
@@ -290,13 +309,33 @@ export function registerEngineTypes(ns) {
290
309
  { name: 'appChannel', type: '@assistant/app-channel' },
291
310
  { name: 'platform', type: 'string' },
292
311
  { name: 'readySkillNames', type: 'string', array: true },
293
- { name: 'toolCatalog', type: '@assistant/tool-report-entry', array: true }
312
+ { name: 'toolCatalog', type: '@assistant/tool-report-entry', array: true },
313
+ { name: 'memberId', type: 'fixed32' }
294
314
  ]
295
315
  });
296
316
  ns.register({
297
317
  name: 'device-list',
298
318
  fields: [{ name: 'devices', type: '@assistant/device', array: true }]
299
319
  });
320
+ ns.register({
321
+ name: 'member',
322
+ fields: [
323
+ { name: 'id', type: 'fixed32', required: true },
324
+ { name: 'name', type: 'string', required: true },
325
+ { name: 'joinedAt', type: 'uint', required: true }
326
+ ]
327
+ });
328
+ ns.register({
329
+ name: 'member-list',
330
+ fields: [{ name: 'members', type: '@assistant/member', array: true }]
331
+ });
332
+ ns.register({
333
+ name: 'mesh-invite-request',
334
+ fields: [
335
+ { name: 'member', type: 'bool' },
336
+ { name: 'meshId', type: 'string' }
337
+ ]
338
+ });
300
339
  ns.register({
301
340
  name: 'save-device-capabilities-request',
302
341
  fields: [
@@ -717,7 +756,11 @@ export function registerEngineTypes(ns) {
717
756
  });
718
757
  ns.register({
719
758
  name: 'mesh-invite-response',
720
- fields: [{ name: 'invite', type: 'string' }]
759
+ fields: [
760
+ { name: 'invite', type: 'string' },
761
+ { name: 'meshId', type: 'string' },
762
+ { name: 'notice', type: 'string' }
763
+ ]
721
764
  });
722
765
  ns.register({
723
766
  name: 'join-mesh-request',
@@ -1433,6 +1476,57 @@ export function registerEngineTypes(ns) {
1433
1476
  { name: 'processorId', type: 'string', required: true }
1434
1477
  ]
1435
1478
  });
1479
+ ns.register({
1480
+ name: 'mesh-entry',
1481
+ fields: [
1482
+ { name: 'meshId', type: 'string', required: true },
1483
+ { name: 'state', type: '@assistant/mesh-status-state', required: true },
1484
+ { name: 'writable', type: 'bool', required: true },
1485
+ { name: 'open', type: 'bool', required: true },
1486
+ { name: 'active', type: 'bool', required: true },
1487
+ { name: 'home', type: 'bool', required: true },
1488
+ { name: 'label', type: 'string' },
1489
+ { name: 'members', type: 'uint' }
1490
+ ]
1491
+ });
1492
+ ns.register({
1493
+ name: 'mesh-label-request',
1494
+ fields: [
1495
+ { name: 'meshId', type: 'string', required: true },
1496
+ { name: 'label', type: 'string' }
1497
+ ]
1498
+ });
1499
+ ns.register({
1500
+ name: 'mesh-list',
1501
+ fields: [{ name: 'meshes', type: '@assistant/mesh-entry', array: true }]
1502
+ });
1503
+ ns.register({
1504
+ name: 'mesh-target',
1505
+ fields: [{ name: 'meshId', type: 'string', required: true }]
1506
+ });
1507
+ ns.register({
1508
+ name: 'mesh-scope',
1509
+ fields: [{ name: 'meshId', type: 'string' }]
1510
+ });
1511
+ ns.register({
1512
+ name: 'mesh-seed-request',
1513
+ fields: [{ name: 'meshKey', type: 'fixed32', required: true }]
1514
+ });
1515
+ ns.register({
1516
+ name: 'mesh-seed-handoff',
1517
+ fields: [
1518
+ { name: 'id', type: 'uint', required: true },
1519
+ { name: 'request', type: '@assistant/mesh-seed-request', required: true }
1520
+ ]
1521
+ });
1522
+ ns.register({
1523
+ name: 'mesh-seed-handoff-ack',
1524
+ fields: [
1525
+ { name: 'id', type: 'uint', required: true },
1526
+ { name: 'error', type: 'string' },
1527
+ { name: 'seed', type: 'fixed32' }
1528
+ ]
1529
+ });
1436
1530
  }
1437
1531
  export function registerEngineApi(api) {
1438
1532
  api.register({
@@ -1457,7 +1551,7 @@ export function registerEngineApi(api) {
1457
1551
  });
1458
1552
  api.register({
1459
1553
  name: 'list-agents',
1460
- request: { name: '@assistant/empty', stream: false },
1554
+ request: { name: '@assistant/mesh-scope', stream: false },
1461
1555
  response: { name: '@assistant/agent-list', stream: false }
1462
1556
  });
1463
1557
  api.register({
@@ -1477,7 +1571,7 @@ export function registerEngineApi(api) {
1477
1571
  });
1478
1572
  api.register({
1479
1573
  name: 'agents-watch',
1480
- request: { name: '@assistant/empty', stream: false },
1574
+ request: { name: '@assistant/mesh-scope', stream: false },
1481
1575
  response: { name: '@assistant/agent-list', stream: true }
1482
1576
  });
1483
1577
  api.register({
@@ -1487,7 +1581,7 @@ export function registerEngineApi(api) {
1487
1581
  });
1488
1582
  api.register({
1489
1583
  name: 'list-chats',
1490
- request: { name: '@assistant/empty', stream: false },
1584
+ request: { name: '@assistant/mesh-scope', stream: false },
1491
1585
  response: { name: '@assistant/chat-list', stream: false }
1492
1586
  });
1493
1587
  api.register({
@@ -1517,7 +1611,7 @@ export function registerEngineApi(api) {
1517
1611
  });
1518
1612
  api.register({
1519
1613
  name: 'chats-watch',
1520
- request: { name: '@assistant/empty', stream: false },
1614
+ request: { name: '@assistant/mesh-scope', stream: false },
1521
1615
  response: { name: '@assistant/chat-list', stream: true }
1522
1616
  });
1523
1617
  api.register({
@@ -1747,7 +1841,7 @@ export function registerEngineApi(api) {
1747
1841
  });
1748
1842
  api.register({
1749
1843
  name: 'mesh-invite',
1750
- request: { name: '@assistant/empty', stream: false },
1844
+ request: { name: '@assistant/mesh-invite-request', stream: false },
1751
1845
  response: { name: '@assistant/mesh-invite-response', stream: false }
1752
1846
  });
1753
1847
  api.register({
@@ -2010,4 +2104,54 @@ export function registerEngineApi(api) {
2010
2104
  request: { name: '@assistant/file-retry-request', stream: false },
2011
2105
  response: { name: '@assistant/ok-response', stream: false }
2012
2106
  });
2107
+ api.register({
2108
+ name: 'move-chat',
2109
+ request: { name: '@assistant/move-chat-request', stream: false },
2110
+ response: { name: '@assistant/chat', stream: false }
2111
+ });
2112
+ api.register({
2113
+ name: 'move-chat-group',
2114
+ request: { name: '@assistant/move-chat-group-request', stream: false },
2115
+ response: { name: '@assistant/chat-group', stream: false }
2116
+ });
2117
+ api.register({
2118
+ name: 'list-members',
2119
+ request: { name: '@assistant/empty', stream: false },
2120
+ response: { name: '@assistant/member-list', stream: false }
2121
+ });
2122
+ api.register({
2123
+ name: 'list-meshes',
2124
+ request: { name: '@assistant/empty', stream: false },
2125
+ response: { name: '@assistant/mesh-list', stream: false }
2126
+ });
2127
+ api.register({
2128
+ name: 'meshes-watch',
2129
+ request: { name: '@assistant/empty', stream: false },
2130
+ response: { name: '@assistant/mesh-list', stream: true }
2131
+ });
2132
+ api.register({
2133
+ name: 'open-mesh',
2134
+ request: { name: '@assistant/mesh-target', stream: false },
2135
+ response: { name: '@assistant/ok-response', stream: false }
2136
+ });
2137
+ api.register({
2138
+ name: 'select-mesh',
2139
+ request: { name: '@assistant/mesh-target', stream: false },
2140
+ response: { name: '@assistant/ok-response', stream: false }
2141
+ });
2142
+ api.register({
2143
+ name: 'close-mesh',
2144
+ request: { name: '@assistant/mesh-target', stream: false },
2145
+ response: { name: '@assistant/ok-response', stream: false }
2146
+ });
2147
+ api.register({
2148
+ name: 'set-mesh-label',
2149
+ request: { name: '@assistant/mesh-label-request', stream: false },
2150
+ response: { name: '@assistant/ok-response', stream: false }
2151
+ });
2152
+ api.register({
2153
+ name: 'create-room',
2154
+ request: { name: '@assistant/empty', stream: false },
2155
+ response: { name: '@assistant/mesh-target', stream: false }
2156
+ });
2013
2157
  }
@@ -1,6 +1,9 @@
1
1
  import fs from 'bare-fs';
2
2
  import { spawnSync } from 'bare-subprocess';
3
- const EXEMPT = {};
3
+ const EXEMPT = {
4
+ '@qvac/seed-defaults-operation-v1.chat': 'seedableChat allowlists the seed chat and leaves rank and rankedAt off it',
5
+ '@qvac/writer-claim-v1.device': 'claimableDevice allowlists the claim and leaves claimedMemberId and inviteToken off it'
6
+ };
4
7
  export function assertFieldOrder(root, schemaFile, tags) {
5
8
  const current = index(JSON.parse(fs.readFileSync(schemaFile, 'utf8')).schema);
6
9
  const seen = new Set();
@@ -95,6 +95,23 @@ export function registerLocalTypes(ns) {
95
95
  { name: 'creator', type: 'bool' },
96
96
  { name: 'writerSeed', type: 'string' }
97
97
  ]);
98
+ versioned('active-mesh', [
99
+ { name: 'deviceId', type: 'fixed32', required: true },
100
+ { name: 'activeMeshKey', type: 'fixed32' },
101
+ { name: 'homeMeshKey', type: 'fixed32' }
102
+ ]);
103
+ versioned('mesh-membership', [
104
+ { name: 'key', type: 'fixed32', required: true },
105
+ { name: 'seed', type: 'fixed32', required: true },
106
+ { name: 'writerSeed', type: 'string' },
107
+ { name: 'leftAt', type: 'uint' }
108
+ ]);
109
+ versioned('member-proof', [
110
+ { name: 'meshKey', type: 'fixed32', required: true },
111
+ { name: 'memberId', type: 'fixed32', required: true },
112
+ { name: 'proof', type: 'buffer', required: true },
113
+ { name: 'attestedAt', type: 'uint', required: true }
114
+ ]);
98
115
  ns.register({ name: 'capability-profile', enum: CAPABILITY_PROFILES, strings: true });
99
116
  }
100
117
  export function registerLocalCollections(dbns) {
@@ -130,4 +147,19 @@ export function registerLocalCollections(dbns) {
130
147
  schema: '@local/mesh-departure',
131
148
  key: ['key']
132
149
  });
150
+ dbns.collections.register({
151
+ name: 'active-mesh',
152
+ schema: '@local/active-mesh',
153
+ key: ['deviceId']
154
+ });
155
+ dbns.collections.register({
156
+ name: 'mesh-membership',
157
+ schema: '@local/mesh-membership',
158
+ key: ['key']
159
+ });
160
+ dbns.collections.register({
161
+ name: 'member-proof',
162
+ schema: '@local/member-proof',
163
+ key: ['meshKey']
164
+ });
133
165
  }
@@ -169,7 +169,9 @@ export function registerQvacTypes(ns) {
169
169
  { name: 'ragEnabled', type: 'bool' },
170
170
  { name: 'webSearchEnabled', type: 'bool' },
171
171
  { name: 'updatedAt', type: 'uint' },
172
- { name: 'groupId', type: 'string' }
172
+ { name: 'groupId', type: 'string' },
173
+ { name: 'rank', type: 'float64' },
174
+ { name: 'rankedAt', type: 'uint' }
173
175
  ]);
174
176
  ns.register({
175
177
  name: 'tool-report-entry',
@@ -205,11 +207,14 @@ export function registerQvacTypes(ns) {
205
207
  { name: 'toolCatalog', type: '@qvac/tool-report-entry', array: true },
206
208
  { name: 'memberId', type: 'fixed32' },
207
209
  { name: 'memberProof', type: 'buffer' },
208
- { name: 'attestedAt', type: 'uint' }
210
+ { name: 'attestedAt', type: 'uint' },
211
+ { name: 'claimedMemberId', type: 'fixed32' },
212
+ { name: 'inviteToken', type: 'fixed32' }
209
213
  ]);
210
214
  versioned('writer', [
211
215
  { name: 'writerKey', type: 'buffer', required: true },
212
- { name: 'device', type: '@qvac/device' }
216
+ { name: 'device', type: '@qvac/device' },
217
+ { name: 'deviceSignature', type: 'buffer' }
213
218
  ]);
214
219
  versioned('remove-writer-operation', [
215
220
  { name: 'writerKey', type: 'buffer', required: true },
@@ -219,7 +224,10 @@ export function registerQvacTypes(ns) {
219
224
  versioned('writer-claim', [
220
225
  { name: 'signature', type: 'buffer', required: true },
221
226
  { name: 'device', type: '@qvac/device' },
222
- { name: 'deviceId', type: 'fixed32' }
227
+ { name: 'deviceId', type: 'fixed32' },
228
+ { name: 'claimedMemberId', type: 'fixed32' },
229
+ { name: 'inviteToken', type: 'fixed32' },
230
+ { name: 'deviceSignature', type: 'buffer' }
223
231
  ]);
224
232
  versioned('register-device-operation', [{ name: 'device', type: '@qvac/device', required: true }]);
225
233
  versioned('update-device-operation', [{ name: 'device', type: '@qvac/device', required: true }]);
@@ -263,7 +271,10 @@ export function registerQvacTypes(ns) {
263
271
  { name: 'seed', type: 'fixed32', required: true },
264
272
  { name: 'fastForward', type: '@qvac/autobee-head' },
265
273
  { name: 'additionalNodes', type: 'ipv4Address', array: true },
266
- { name: 'blindPeers', type: 'fixed32', array: true }
274
+ { name: 'blindPeers', type: 'fixed32', array: true },
275
+ { name: 'memberInvite', type: 'bool' },
276
+ { name: 'memberId', type: 'fixed32' },
277
+ { name: 'inviteNonce', type: 'fixed32' }
267
278
  ]);
268
279
  versioned('seed-defaults-operation', [
269
280
  { name: 'agent', type: '@qvac/agent', required: true },
@@ -396,6 +407,10 @@ export function registerQvacTypes(ns) {
396
407
  { name: 'proof', type: 'buffer', required: true }
397
408
  ]);
398
409
  versioned('update-member-operation', [{ name: 'member', type: '@qvac/member', required: true }]);
410
+ versioned('join-member-operation', [
411
+ { name: 'member', type: '@qvac/member', required: true },
412
+ { name: 'proof', type: 'buffer', required: true }
413
+ ]);
399
414
  versioned('attest-member-device-operation', [
400
415
  { name: 'deviceId', type: 'fixed32', required: true },
401
416
  { name: 'memberId', type: 'fixed32', required: true },
@@ -407,11 +422,25 @@ export function registerQvacTypes(ns) {
407
422
  { name: 'name', type: 'string', required: true },
408
423
  { name: 'createdAt', type: 'uint', required: true },
409
424
  { name: 'updatedAt', type: 'uint', required: true },
410
- { name: 'deletedAt', type: 'uint' }
425
+ { name: 'deletedAt', type: 'uint' },
426
+ { name: 'rank', type: 'float64' }
411
427
  ]);
412
428
  versioned('put-chat-group-operation', [
413
429
  { name: 'group', type: '@qvac/chat-group', required: true }
414
430
  ]);
431
+ versioned('joined-mesh', [
432
+ { name: 'meshKey', type: 'fixed32', required: true },
433
+ { name: 'memberId', type: 'fixed32', required: true },
434
+ { name: 'joinedAt', type: 'uint', required: true },
435
+ { name: 'leftAt', type: 'uint' },
436
+ { name: 'label', type: 'string' },
437
+ { name: 'labeledAt', type: 'uint' },
438
+ { name: 'shared', type: 'bool' },
439
+ { name: 'sharedAt', type: 'uint' }
440
+ ]);
441
+ versioned('put-joined-mesh-operation', [
442
+ { name: 'room', type: '@qvac/joined-mesh', required: true }
443
+ ]);
415
444
  }
416
445
  export function registerQvacCollections(dbns, helpersPath) {
417
446
  dbns.require(helpersPath);
@@ -671,6 +700,11 @@ export function registerQvacCollections(dbns, helpersPath) {
671
700
  map: 'liveWritersByMostRecentMap'
672
701
  }
673
702
  });
703
+ dbns.collections.register({
704
+ name: 'joined-meshes',
705
+ schema: '@qvac/joined-mesh',
706
+ key: ['meshKey']
707
+ });
674
708
  }
675
709
  export function registerQvacDispatch(ds) {
676
710
  ds.register({ name: 'append-chunk', requestType: '@qvac/append-chunk-operation' });
@@ -719,4 +753,9 @@ export function registerQvacDispatch(ds) {
719
753
  requestType: '@qvac/put-agent-operation'
720
754
  });
721
755
  ds.register({ name: 'put-chat-group', requestType: '@qvac/put-chat-group-operation' });
756
+ ds.register({ name: 'join-member', requestType: '@qvac/join-member-operation' });
757
+ ds.register({
758
+ name: 'put-joined-mesh',
759
+ requestType: '@qvac/put-joined-mesh-operation'
760
+ });
722
761
  }
@@ -517,4 +517,39 @@ export function bindApi(rpc, api) {
517
517
  if (api.fileRetry) {
518
518
  rpc.onFileRetry((req) => api.fileRetry(req));
519
519
  }
520
+ if (api.moveChat) {
521
+ rpc.onMoveChat((req) => api.moveChat(req));
522
+ }
523
+ if (api.moveChatGroup) {
524
+ rpc.onMoveChatGroup((req) => api.moveChatGroup(req));
525
+ }
526
+ if (api.listMembers) {
527
+ rpc.onListMembers((req) => api.listMembers(req));
528
+ }
529
+ if (api.listMeshes) {
530
+ rpc.onListMeshes((req) => api.listMeshes(req));
531
+ }
532
+ if (api.meshesWatch) {
533
+ rpc.onMeshesWatch((out) => {
534
+ const src = Readable.from(api.meshesWatch(out.data));
535
+ src.on("error", (err) => out.writeStream?.destroy(err));
536
+ pipeline(src, out, noop);
537
+ out.writeStream?.on("close", () => src.destroy());
538
+ });
539
+ }
540
+ if (api.openMesh) {
541
+ rpc.onOpenMesh((req) => api.openMesh(req));
542
+ }
543
+ if (api.selectMesh) {
544
+ rpc.onSelectMesh((req) => api.selectMesh(req));
545
+ }
546
+ if (api.closeMesh) {
547
+ rpc.onCloseMesh((req) => api.closeMesh(req));
548
+ }
549
+ if (api.setMeshLabel) {
550
+ rpc.onSetMeshLabel((req) => api.setMeshLabel(req));
551
+ }
552
+ if (api.createRoom) {
553
+ rpc.onCreateRoom((req) => api.createRoom(req));
554
+ }
520
555
  }
@@ -14,33 +14,33 @@ export function engineClient(rpc) {
14
14
  configSet: (input) => rpc.configSet(input),
15
15
  configWatch: (input) => armed(rpc.configWatch(input)),
16
16
  createAgent: (input) => rpc.createAgent(input),
17
- listAgents: (input) => rpc.listAgents(input),
17
+ listAgents: (input) => rpc.listAgents(input ?? {}),
18
18
  getAgent: (input) => rpc.getAgent(input),
19
19
  updateAgent: (input) => rpc.updateAgent(input),
20
20
  deleteAgent: (input) => rpc.deleteAgent(input),
21
- agentsWatch: (input) => armed(rpc.agentsWatch(input)),
21
+ agentsWatch: (input) => armed(rpc.agentsWatch(input ?? {})),
22
22
  createChat: (input) => rpc.createChat(input),
23
- listChats: (input) => rpc.listChats(input),
23
+ listChats: (input) => rpc.listChats(input ?? {}),
24
24
  getChat: (input) => rpc.getChat(input),
25
25
  renameChat: (input) => rpc.renameChat(input),
26
26
  setChatRagEnabled: (input) => rpc.setChatRagEnabled(input),
27
27
  setChatWebSearchEnabled: (input) => rpc.setChatWebSearchEnabled(input),
28
28
  deleteChat: (input) => rpc.deleteChat(input),
29
- chatsWatch: (input) => armed(rpc.chatsWatch(input)),
29
+ chatsWatch: (input) => armed(rpc.chatsWatch(input ?? {})),
30
30
  createChatGroup: (input) => rpc.createChatGroup(input),
31
- listChatGroups: (input) => rpc.listChatGroups(input),
31
+ listChatGroups: (input) => rpc.listChatGroups(input ?? {}),
32
32
  renameChatGroup: (input) => rpc.renameChatGroup(input),
33
33
  deleteChatGroup: (input) => rpc.deleteChatGroup(input),
34
34
  setChatGroup: (input) => rpc.setChatGroup(input),
35
35
  listChatActivity: (input) => rpc.listChatActivity(input),
36
36
  chatActivityWatch: (input) => armed(rpc.chatActivityWatch(input)),
37
- listDevices: (input) => rpc.listDevices(input),
38
- devicesWatch: (input) => armed(rpc.devicesWatch(input)),
37
+ listDevices: (input) => rpc.listDevices(input ?? {}),
38
+ devicesWatch: (input) => armed(rpc.devicesWatch(input ?? {})),
39
39
  saveDeviceCapabilities: (input) => rpc.saveDeviceCapabilities(input),
40
- modelDownloadsWatch: (input) => armed(rpc.modelDownloadsWatch(input)),
40
+ modelDownloadsWatch: (input) => armed(rpc.modelDownloadsWatch(input ?? {})),
41
41
  setModelDownloadStatus: (input) => rpc.setModelDownloadStatus(input),
42
42
  clearModelDownload: (input) => rpc.clearModelDownload(input),
43
- customModelsWatch: (input) => armed(rpc.customModelsWatch(input)),
43
+ customModelsWatch: (input) => armed(rpc.customModelsWatch(input ?? {})),
44
44
  addCustomModel: (input) => rpc.addCustomModel(input),
45
45
  removeCustomModel: (input) => rpc.removeCustomModel(input),
46
46
  removeDevice: (input) => rpc.removeDevice(input),
@@ -62,43 +62,43 @@ export function engineClient(rpc) {
62
62
  runAgent: (input) => rpc.runAgent(input),
63
63
  sendMessage: (input) => rpc.sendMessage(input),
64
64
  stopRun: (input) => rpc.stopRun(input),
65
- meshStatusWatch: (input) => armed(rpc.meshStatusWatch(input)),
66
- networkWatch: (input) => armed(rpc.networkWatch(input)),
67
- deviceInfo: (input) => rpc.deviceInfo(input),
65
+ meshStatusWatch: (input) => armed(rpc.meshStatusWatch(input ?? {})),
66
+ networkWatch: (input) => armed(rpc.networkWatch(input ?? {})),
67
+ deviceInfo: (input) => rpc.deviceInfo(input ?? {}),
68
68
  storeIdentityPhrase: (input) => rpc.storeIdentityPhrase(input),
69
- leaveMesh: (input) => rpc.leaveMesh(input),
70
- acknowledgeKicked: (input) => rpc.acknowledgeKicked(input),
69
+ leaveMesh: (input) => rpc.leaveMesh(input ?? {}),
70
+ acknowledgeKicked: (input) => rpc.acknowledgeKicked(input ?? {}),
71
71
  joinMesh: (input) => rpc.joinMesh(input),
72
- cancelMeshJoin: (input) => rpc.cancelMeshJoin(input),
73
- suspend: (input) => rpc.suspend(input),
74
- resume: (input) => rpc.resume(input),
72
+ cancelMeshJoin: (input) => rpc.cancelMeshJoin(input ?? {}),
73
+ suspend: (input) => rpc.suspend(input ?? {}),
74
+ resume: (input) => rpc.resume(input ?? {}),
75
75
  meshInvite: (input) => rpc.meshInvite(input),
76
- listApprovalRules: (input) => rpc.listApprovalRules(input),
77
- diagnostics: (input) => rpc.diagnostics(input),
78
- diagnosticsWatch: (input) => armed(rpc.diagnosticsWatch(input)),
79
- runRequestsWatch: (input) => armed(rpc.runRequestsWatch(input)),
76
+ listApprovalRules: (input) => rpc.listApprovalRules(input ?? {}),
77
+ diagnostics: (input) => rpc.diagnostics(input ?? {}),
78
+ diagnosticsWatch: (input) => armed(rpc.diagnosticsWatch(input ?? {})),
79
+ runRequestsWatch: (input) => armed(rpc.runRequestsWatch(input ?? {})),
80
80
  listModels: (input) => rpc.listModels(input),
81
81
  deleteModel: (input) => rpc.deleteModel(input),
82
- modelCatalogWatch: (input) => armed(rpc.modelCatalogWatch(input)),
82
+ modelCatalogWatch: (input) => armed(rpc.modelCatalogWatch(input ?? {})),
83
83
  skills: (input) => rpc.skills(input),
84
84
  downloadKnowledge: (input) => armed(rpc.downloadKnowledge(input)),
85
- getConfig: (input) => rpc.getConfig(input),
85
+ getConfig: (input) => rpc.getConfig(input ?? {}),
86
86
  setConfig: (input) => rpc.setConfig(input),
87
87
  setModelPaused: (input) => rpc.setModelPaused(input),
88
88
  retryModelDownload: (input) => rpc.retryModelDownload(input),
89
- configWatchTyped: (input) => armed(rpc.configWatchTyped(input)),
89
+ configWatchTyped: (input) => armed(rpc.configWatchTyped(input ?? {})),
90
90
  logsWatch: (input) => armed(rpc.logsWatch(input)),
91
91
  writeLog: (input) => rpc.writeLog(input),
92
92
  listIndexing: (input) => rpc.listIndexing(input),
93
93
  transcribe: (input) => rpc.transcribe(input),
94
94
  speak: (input) => rpc.speak(input),
95
95
  skillCatalog: (input) => rpc.skillCatalog(input),
96
- tools: (input) => rpc.tools(input),
96
+ tools: (input) => rpc.tools(input ?? {}),
97
97
  speakStream: () => armed(rpc.speakStream()),
98
98
  indexingProgressWatch: (input) => armed(rpc.indexingProgressWatch(input)),
99
99
  indexingWatch: (input) => armed(rpc.indexingWatch(input)),
100
100
  transcodeImage: (input) => rpc.transcodeImage(input),
101
- syncStatusWatch: (input) => armed(rpc.syncStatusWatch(input)),
101
+ syncStatusWatch: (input) => armed(rpc.syncStatusWatch(input ?? {})),
102
102
  setToolConfigs: (input) => rpc.setToolConfigs(input),
103
103
  deleteToolConfigs: (input) => rpc.deleteToolConfigs(input),
104
104
  listToolConfigs: (input) => rpc.listToolConfigs(input),
@@ -108,7 +108,7 @@ export function engineClient(rpc) {
108
108
  listToolActivity: (input) => rpc.listToolActivity(input),
109
109
  toolActivityWatch: (input) => armed(rpc.toolActivityWatch(input)),
110
110
  recordToolActivity: (input) => rpc.recordToolActivity(input),
111
- clearKvCache: (input) => rpc.clearKvCache(input),
111
+ clearKvCache: (input) => rpc.clearKvCache(input ?? {}),
112
112
  listManagedSkills: (input) => rpc.listManagedSkills(input),
113
113
  readSkillFile: (input) => rpc.readSkillFile(input),
114
114
  writeSkillFile: (input) => rpc.writeSkillFile(input),
@@ -125,5 +125,15 @@ export function engineClient(rpc) {
125
125
  fileRead: (input) => armed(rpc.fileRead(input)),
126
126
  filePreview: (input) => rpc.filePreview(input),
127
127
  fileRetry: (input) => rpc.fileRetry(input),
128
+ moveChat: (input) => rpc.moveChat(input),
129
+ moveChatGroup: (input) => rpc.moveChatGroup(input),
130
+ listMembers: (input) => rpc.listMembers(input ?? {}),
131
+ listMeshes: (input) => rpc.listMeshes(input ?? {}),
132
+ meshesWatch: (input) => armed(rpc.meshesWatch(input ?? {})),
133
+ openMesh: (input) => rpc.openMesh(input),
134
+ selectMesh: (input) => rpc.selectMesh(input),
135
+ closeMesh: (input) => rpc.closeMesh(input),
136
+ setMeshLabel: (input) => rpc.setMeshLabel(input),
137
+ createRoom: (input) => rpc.createRoom(input ?? {}),
128
138
  };
129
139
  }