@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
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": 5,
2
+ "version": 6,
3
3
  "schema": [
4
4
  {
5
5
  "name": "chunk-type",
@@ -1333,6 +1333,16 @@
1333
1333
  "name": "groupId",
1334
1334
  "type": "string",
1335
1335
  "version": 5
1336
+ },
1337
+ {
1338
+ "name": "rank",
1339
+ "type": "float64",
1340
+ "version": 6
1341
+ },
1342
+ {
1343
+ "name": "rankedAt",
1344
+ "type": "uint",
1345
+ "version": 6
1336
1346
  }
1337
1347
  ]
1338
1348
  },
@@ -1473,6 +1483,16 @@
1473
1483
  "name": "attestedAt",
1474
1484
  "type": "uint",
1475
1485
  "version": 4
1486
+ },
1487
+ {
1488
+ "name": "claimedMemberId",
1489
+ "type": "fixed32",
1490
+ "version": 6
1491
+ },
1492
+ {
1493
+ "name": "inviteToken",
1494
+ "type": "fixed32",
1495
+ "version": 6
1476
1496
  }
1477
1497
  ]
1478
1498
  },
@@ -1503,6 +1523,11 @@
1503
1523
  "name": "device",
1504
1524
  "type": "@qvac/device",
1505
1525
  "version": 1
1526
+ },
1527
+ {
1528
+ "name": "deviceSignature",
1529
+ "type": "buffer",
1530
+ "version": 6
1506
1531
  }
1507
1532
  ]
1508
1533
  },
@@ -1573,6 +1598,21 @@
1573
1598
  "name": "deviceId",
1574
1599
  "type": "fixed32",
1575
1600
  "version": 1
1601
+ },
1602
+ {
1603
+ "name": "claimedMemberId",
1604
+ "type": "fixed32",
1605
+ "version": 6
1606
+ },
1607
+ {
1608
+ "name": "inviteToken",
1609
+ "type": "fixed32",
1610
+ "version": 6
1611
+ },
1612
+ {
1613
+ "name": "deviceSignature",
1614
+ "type": "buffer",
1615
+ "version": 6
1576
1616
  }
1577
1617
  ]
1578
1618
  },
@@ -1941,6 +1981,21 @@
1941
1981
  "array": true,
1942
1982
  "type": "fixed32",
1943
1983
  "version": 1
1984
+ },
1985
+ {
1986
+ "name": "memberInvite",
1987
+ "type": "bool",
1988
+ "version": 6
1989
+ },
1990
+ {
1991
+ "name": "memberId",
1992
+ "type": "fixed32",
1993
+ "version": 6
1994
+ },
1995
+ {
1996
+ "name": "inviteNonce",
1997
+ "type": "fixed32",
1998
+ "version": 6
1944
1999
  }
1945
2000
  ]
1946
2001
  },
@@ -3099,6 +3154,11 @@
3099
3154
  "name": "deletedAt",
3100
3155
  "type": "uint",
3101
3156
  "version": 5
3157
+ },
3158
+ {
3159
+ "name": "rank",
3160
+ "type": "float64",
3161
+ "version": 6
3102
3162
  }
3103
3163
  ]
3104
3164
  },
@@ -3137,6 +3197,124 @@
3137
3197
  "version": 1
3138
3198
  }
3139
3199
  ]
3200
+ },
3201
+ {
3202
+ "name": "join-member-operation-v1",
3203
+ "namespace": "qvac",
3204
+ "compact": false,
3205
+ "flagsPosition": -1,
3206
+ "fields": [
3207
+ {
3208
+ "name": "member",
3209
+ "required": true,
3210
+ "type": "@qvac/member",
3211
+ "version": 6
3212
+ },
3213
+ {
3214
+ "name": "proof",
3215
+ "required": true,
3216
+ "type": "buffer",
3217
+ "version": 6
3218
+ }
3219
+ ]
3220
+ },
3221
+ {
3222
+ "name": "join-member-operation",
3223
+ "namespace": "qvac",
3224
+ "versions": [
3225
+ {
3226
+ "type": "@qvac/join-member-operation-v1",
3227
+ "map": null,
3228
+ "version": 1
3229
+ }
3230
+ ]
3231
+ },
3232
+ {
3233
+ "name": "joined-mesh-v1",
3234
+ "namespace": "qvac",
3235
+ "compact": false,
3236
+ "flagsPosition": 3,
3237
+ "fields": [
3238
+ {
3239
+ "name": "meshKey",
3240
+ "required": true,
3241
+ "type": "fixed32",
3242
+ "version": 6
3243
+ },
3244
+ {
3245
+ "name": "memberId",
3246
+ "required": true,
3247
+ "type": "fixed32",
3248
+ "version": 6
3249
+ },
3250
+ {
3251
+ "name": "joinedAt",
3252
+ "required": true,
3253
+ "type": "uint",
3254
+ "version": 6
3255
+ },
3256
+ {
3257
+ "name": "leftAt",
3258
+ "type": "uint",
3259
+ "version": 6
3260
+ },
3261
+ {
3262
+ "name": "label",
3263
+ "type": "string",
3264
+ "version": 6
3265
+ },
3266
+ {
3267
+ "name": "labeledAt",
3268
+ "type": "uint",
3269
+ "version": 6
3270
+ },
3271
+ {
3272
+ "name": "shared",
3273
+ "type": "bool",
3274
+ "version": 6
3275
+ },
3276
+ {
3277
+ "name": "sharedAt",
3278
+ "type": "uint",
3279
+ "version": 6
3280
+ }
3281
+ ]
3282
+ },
3283
+ {
3284
+ "name": "joined-mesh",
3285
+ "namespace": "qvac",
3286
+ "versions": [
3287
+ {
3288
+ "type": "@qvac/joined-mesh-v1",
3289
+ "map": null,
3290
+ "version": 1
3291
+ }
3292
+ ]
3293
+ },
3294
+ {
3295
+ "name": "put-joined-mesh-operation-v1",
3296
+ "namespace": "qvac",
3297
+ "compact": false,
3298
+ "flagsPosition": -1,
3299
+ "fields": [
3300
+ {
3301
+ "name": "room",
3302
+ "required": true,
3303
+ "type": "@qvac/joined-mesh",
3304
+ "version": 6
3305
+ }
3306
+ ]
3307
+ },
3308
+ {
3309
+ "name": "put-joined-mesh-operation",
3310
+ "namespace": "qvac",
3311
+ "versions": [
3312
+ {
3313
+ "type": "@qvac/put-joined-mesh-operation-v1",
3314
+ "map": null,
3315
+ "version": 1
3316
+ }
3317
+ ]
3140
3318
  }
3141
3319
  ]
3142
3320
  }
@@ -1,5 +1,5 @@
1
1
  // This file is autogenerated by hyperschema-ts
2
- // Schema version: 5
2
+ // Schema version: 6
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"
@@ -244,6 +244,8 @@ export interface QvacChatV1 {
244
244
  webSearchEnabled?: boolean
245
245
  updatedAt?: number
246
246
  groupId?: string | null
247
+ rank?: number
248
+ rankedAt?: number
247
249
  }
248
250
 
249
251
  export type QvacChat = (QvacChatV1 & { version?: number })
@@ -271,6 +273,8 @@ export interface QvacDeviceV1 {
271
273
  memberId?: Buffer | null
272
274
  memberProof?: Buffer | null
273
275
  attestedAt?: number
276
+ claimedMemberId?: Buffer | null
277
+ inviteToken?: Buffer | null
274
278
  }
275
279
 
276
280
  export type QvacDevice = (QvacDeviceV1 & { version?: number })
@@ -278,6 +282,7 @@ export type QvacDevice = (QvacDeviceV1 & { version?: number })
278
282
  export interface QvacWriterV1 {
279
283
  writerKey: Buffer
280
284
  device?: QvacDevice | null
285
+ deviceSignature?: Buffer | null
281
286
  }
282
287
 
283
288
  export type QvacWriter = (QvacWriterV1 & { version?: number })
@@ -294,6 +299,9 @@ export interface QvacWriterClaimV1 {
294
299
  signature: Buffer
295
300
  device?: QvacDevice | null
296
301
  deviceId?: Buffer | null
302
+ claimedMemberId?: Buffer | null
303
+ inviteToken?: Buffer | null
304
+ deviceSignature?: Buffer | null
297
305
  }
298
306
 
299
307
  export type QvacWriterClaim = (QvacWriterClaimV1 & { version?: number })
@@ -374,6 +382,9 @@ export interface QvacMeshInviteV1 {
374
382
  fastForward?: QvacAutobeeHead | null
375
383
  additionalNodes?: { host: string; family?: number; port: number }[] | null
376
384
  blindPeers?: Buffer[] | null
385
+ memberInvite?: boolean
386
+ memberId?: Buffer | null
387
+ inviteNonce?: Buffer | null
377
388
  }
378
389
 
379
390
  export type QvacMeshInvite = (QvacMeshInviteV1 & { version?: number })
@@ -609,6 +620,7 @@ export interface QvacChatGroupV1 {
609
620
  createdAt: number
610
621
  updatedAt: number
611
622
  deletedAt?: number
623
+ rank?: number
612
624
  }
613
625
 
614
626
  export type QvacChatGroup = (QvacChatGroupV1 & { version?: number })
@@ -619,6 +631,32 @@ export interface QvacPutChatGroupOperationV1 {
619
631
 
620
632
  export type QvacPutChatGroupOperation = (QvacPutChatGroupOperationV1 & { version?: number })
621
633
 
634
+ export interface QvacJoinMemberOperationV1 {
635
+ member: QvacMember
636
+ proof: Buffer
637
+ }
638
+
639
+ export type QvacJoinMemberOperation = (QvacJoinMemberOperationV1 & { version?: number })
640
+
641
+ export interface QvacJoinedMeshV1 {
642
+ meshKey: Buffer
643
+ memberId: Buffer
644
+ joinedAt: number
645
+ leftAt?: number
646
+ label?: string | null
647
+ labeledAt?: number
648
+ shared?: boolean
649
+ sharedAt?: number
650
+ }
651
+
652
+ export type QvacJoinedMesh = (QvacJoinedMeshV1 & { version?: number })
653
+
654
+ export interface QvacPutJoinedMeshOperationV1 {
655
+ room: QvacJoinedMesh
656
+ }
657
+
658
+ export type QvacPutJoinedMeshOperation = (QvacPutJoinedMeshOperationV1 & { version?: number })
659
+
622
660
  export interface SchemaTypes {
623
661
  "@qvac/chunk-type": QvacChunkType
624
662
  "@qvac/run-state": QvacRunState
@@ -751,4 +789,10 @@ export interface SchemaTypes {
751
789
  "@qvac/chat-group": QvacChatGroup
752
790
  "@qvac/put-chat-group-operation-v1": QvacPutChatGroupOperationV1
753
791
  "@qvac/put-chat-group-operation": QvacPutChatGroupOperation
792
+ "@qvac/join-member-operation-v1": QvacJoinMemberOperationV1
793
+ "@qvac/join-member-operation": QvacJoinMemberOperation
794
+ "@qvac/joined-mesh-v1": QvacJoinedMeshV1
795
+ "@qvac/joined-mesh": QvacJoinedMesh
796
+ "@qvac/put-joined-mesh-operation-v1": QvacPutJoinedMeshOperationV1
797
+ "@qvac/put-joined-mesh-operation": QvacPutJoinedMeshOperation
754
798
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qvac/core",
3
- "version": "0.1.4",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "description": "Peer-to-peer AI across your devices",
6
6
  "exports": {
@@ -146,8 +146,8 @@
146
146
  "mesh-peer": "bare examples/mesh-peer.mjs",
147
147
  "mesh-lab": "bare examples/mesh-lab.mjs",
148
148
  "test": "npm run test:node && npm run test:bare && npm run test:addons",
149
- "test:node": "QVAC_NO_SKILL_BIN_PROBE=1 brittle-node test/all.ts | prettytap",
150
- "test:bare": "QVAC_NO_SKILL_BIN_PROBE=1 bare test/all.ts | prettytap",
149
+ "test:node": "QVAC_NO_SKILL_BIN_PROBE=1 prettytap -- brittle-node test/all.ts",
150
+ "test:bare": "QVAC_NO_SKILL_BIN_PROBE=1 prettytap -- bare test/all.ts",
151
151
  "test:model": "QVAC_TEST_MODELS=1 npm run test:bare",
152
152
  "format": "prettier . --write",
153
153
  "lint": "prettier . --check && lunte && tsc --noEmit",
@@ -216,7 +216,7 @@
216
216
  }
217
217
  },
218
218
  "dependencies": {
219
- "@qvac/harness": "^0.2.4",
219
+ "@qvac/harness": "^0.2.6",
220
220
  "@qvac/skills": "^0.1.3",
221
221
  "asenion": "^0.1.0",
222
222
  "autobee": "2.6.0",
@@ -291,13 +291,13 @@
291
291
  "bare-runtime": "^1.30.0",
292
292
  "bare-sidecar": "^0.5.2",
293
293
  "brittle": "^4.0.2",
294
- "holepunch-types": "^0.2.1",
294
+ "holepunch-types": "^0.2.2",
295
295
  "hyperdht": "^6.32.0",
296
296
  "hyperschema-regen": "^3.0.1",
297
297
  "lunte": "^1.8.3",
298
298
  "prettier": "^3.6.2",
299
299
  "prettier-config-holepunch": "^2.0.0",
300
- "prettytap": "^0.1.3",
300
+ "prettytap": "^0.2.0",
301
301
  "terser": "^5.51.2",
302
302
  "test-tmp": "^1.4.0",
303
303
  "typescript": "^5.9.3",