@qvac/core 1.0.0-rc.6 → 1.0.0-rc.8
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.
- package/CHANGELOG.md +8 -1
- package/dist-lib/lib/api/agents.js +5 -2
- package/dist-lib/lib/api/approval-rules.js +8 -5
- package/dist-lib/lib/api/chat.d.ts +1 -2
- package/dist-lib/lib/api/chat.js +4 -18
- package/dist-lib/lib/api/device-routes.d.ts +6 -1
- package/dist-lib/lib/api/device-routes.js +20 -1
- package/dist-lib/lib/api/index.d.ts +0 -1
- package/dist-lib/lib/api/index.js +1 -2
- package/dist-lib/lib/api/mesh.d.ts +1 -1
- package/dist-lib/lib/api/mesh.js +1 -1
- package/dist-lib/lib/api/rag.js +2 -5
- package/dist-lib/lib/api/sync.js +12 -2
- package/dist-lib/lib/assistant/model-round.d.ts +7 -1
- package/dist-lib/lib/assistant/model-round.js +33 -11
- package/dist-lib/lib/assistant-tree.js +7 -0
- package/dist-lib/lib/assistant.d.ts +3 -2
- package/dist-lib/lib/assistant.js +20 -19
- package/dist-lib/lib/core/archived-mesh.d.ts +1 -0
- package/dist-lib/lib/core/archived-mesh.js +11 -14
- package/dist-lib/lib/core/chat-copy.d.ts +0 -1
- package/dist-lib/lib/core/chat-copy.js +1 -2
- package/dist-lib/lib/core/chat-move.d.ts +3 -1
- package/dist-lib/lib/core/chat-move.js +5 -2
- package/dist-lib/lib/core/contract/joined-meshes.js +2 -1
- package/dist-lib/lib/core/local/index.d.ts +2 -1
- package/dist-lib/lib/core/local/index.js +3 -2
- package/dist-lib/lib/core/public-mesh.d.ts +6 -8
- package/dist-lib/lib/core/public-mesh.js +19 -29
- package/dist-lib/lib/core/sync/index.js +1 -1
- package/dist-lib/lib/core.d.ts +21 -8
- package/dist-lib/lib/core.js +233 -204
- package/dist-lib/lib/errors.d.ts +8 -12
- package/dist-lib/lib/errors.js +8 -12
- package/dist-lib/lib/model-download.d.ts +6 -1
- package/dist-lib/lib/model-download.js +16 -3
- package/dist-lib/lib/oauth/resolve.js +29 -8
- package/dist-lib/lib/oauth/token-exchange-core.js +11 -0
- package/dist-lib/schema/engine.js +10 -3
- package/dist-lib/schema/local.js +4 -2
- package/dist-lib/schema/qvac.js +2 -1
- package/dist-lib/spec/capabilities.d.ts +2 -2
- package/dist-lib/spec/hrpc/hrpc.json +1 -1
- package/dist-lib/spec/hrpc/index.js +1 -1
- package/dist-lib/spec/hrpc/messages.js +273 -250
- package/dist-lib/spec/hyperschema/index.js +273 -250
- package/dist-lib/spec/hyperschema/schema.json +27 -6
- package/dist-lib/spec/hyperschema/types.d.ts +7 -1
- package/dist-lib/spec/local/hyperdb/messages.js +26 -12
- package/dist-lib/spec/local/hyperschema/index.js +13 -6
- package/dist-lib/spec/local/hyperschema/schema.json +10 -0
- package/dist-lib/spec/local/hyperschema/types.d.ts +2 -0
- package/dist-lib/spec/mesh/hyperdb/messages.js +30 -6
- package/dist-lib/spec/mesh/hyperdispatch/messages.js +15 -3
- package/dist-lib/spec/mesh/hyperschema/index.js +15 -3
- package/dist-lib/spec/mesh/hyperschema/schema.json +5 -0
- package/dist-lib/spec/mesh/hyperschema/types.d.ts +1 -0
- package/package.json +10 -4
- package/tui/README.md +51 -0
- package/tui/app.mjs +88 -17
- package/tui/boot.mjs +23 -6
- package/tui/cli.mjs +93 -0
- package/tui/index.mjs +2 -87
- package/tui/lib/updater.mjs +86 -0
- package/tui/main.mjs +26 -15
- package/dist-lib/lib/core/chat-project.d.ts +0 -2
- package/dist-lib/lib/core/chat-project.js +0 -15
|
@@ -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":
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qvac/core",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.8",
|
|
4
|
+
"upgrade": "pear://56h5xtm7xjjpkbj1ubbuffcjastpxri11n6wr6zy8ikzmyq7ctey",
|
|
4
5
|
"type": "module",
|
|
5
6
|
"description": "Peer-to-peer AI across your devices",
|
|
6
7
|
"engines": {
|
|
@@ -189,7 +190,8 @@
|
|
|
189
190
|
"build:bundle": "node scripts/build-bundle.mjs",
|
|
190
191
|
"prepack": "node scripts/build-lib.mjs",
|
|
191
192
|
"build:lib": "node scripts/build-lib.mjs",
|
|
192
|
-
"provenance": "node scripts/provenance.mjs --out docs/provenance/$npm_package_version.json"
|
|
193
|
+
"provenance": "node scripts/provenance.mjs --out docs/provenance/$npm_package_version.json",
|
|
194
|
+
"make": "node scripts/make.mjs"
|
|
193
195
|
},
|
|
194
196
|
"prettier": "prettier-config-holepunch",
|
|
195
197
|
"imports": {
|
|
@@ -252,9 +254,9 @@
|
|
|
252
254
|
},
|
|
253
255
|
"dependencies": {
|
|
254
256
|
"@qvac/error": "^0.2.0",
|
|
255
|
-
"@qvac/harness": "1.0.0-rc.
|
|
257
|
+
"@qvac/harness": "1.0.0-rc.18",
|
|
256
258
|
"@qvac/logging": "^0.2.0",
|
|
257
|
-
"@qvac/skills": "^0.
|
|
259
|
+
"@qvac/skills": "^0.3.0",
|
|
258
260
|
"asenion": "^0.1.0",
|
|
259
261
|
"autobee": "^2.12.1",
|
|
260
262
|
"b4a": "^1.9.0",
|
|
@@ -286,12 +288,14 @@
|
|
|
286
288
|
"bare-system-logger": "^1.0.3",
|
|
287
289
|
"bare-thread": "~1.2.7",
|
|
288
290
|
"bare-tui": "^0.3.0",
|
|
291
|
+
"bare-tui-updater": "^0.0.1",
|
|
289
292
|
"bare-url": "^2.4.5",
|
|
290
293
|
"bare-worker": "^4.5.0",
|
|
291
294
|
"blind-peer": "^3.10.2",
|
|
292
295
|
"blind-peering": "2.9.5",
|
|
293
296
|
"compact-encoding": "^3.4.0",
|
|
294
297
|
"corestore": "^7.16.1",
|
|
298
|
+
"fs-native-lock": "^1.2.0",
|
|
295
299
|
"hrpc": "^4.3.0",
|
|
296
300
|
"hyperblobs": "^2.12.1",
|
|
297
301
|
"hyperconf": "^1.0.3",
|
|
@@ -307,6 +311,7 @@
|
|
|
307
311
|
"hyperswarm": "^4.17.0",
|
|
308
312
|
"keet-identity-key": "^3.2.0",
|
|
309
313
|
"paparam": "^1.13.0",
|
|
314
|
+
"pear-runtime-updater": "^3.4.0",
|
|
310
315
|
"process-top": "^1.7.1",
|
|
311
316
|
"protomux": "^3.11.0",
|
|
312
317
|
"protomux-wakeup": "^2.9.0",
|
|
@@ -342,6 +347,7 @@
|
|
|
342
347
|
"devDependencies": {
|
|
343
348
|
"@qvac/core-previous": "npm:@qvac/core@0.10.3",
|
|
344
349
|
"@types/node": "^26.4.0",
|
|
350
|
+
"bare-build": "^1.0.4",
|
|
345
351
|
"bare-bundle": "^1.10.0",
|
|
346
352
|
"bare-module-lexer": "^1.6.3",
|
|
347
353
|
"bare-pack": "^2.2.1",
|
package/tui/README.md
CHANGED
|
@@ -40,6 +40,57 @@ not published.
|
|
|
40
40
|
be on PATH (`bare-runtime` puts it in `node_modules/.bin`). `bare-tui` needs
|
|
41
41
|
Bare's native TTY; the TUI will not run under node.
|
|
42
42
|
|
|
43
|
+
## Standalone executable
|
|
44
|
+
|
|
45
|
+
`bun run make` builds `out/make/duck` (`duck.exe` on Windows) for this machine,
|
|
46
|
+
or for `HOST=<platform>-<arch>`: one file with no `bare` or `node_modules` to
|
|
47
|
+
install beside it.
|
|
48
|
+
|
|
49
|
+
`scripts/make.mjs` bundles the TUI launcher, stows the sidecar and harness as
|
|
50
|
+
separate bundles, and embeds their native addons, the skills tree and release
|
|
51
|
+
metadata as assets. On launch, the runtime extracts the spawned children and
|
|
52
|
+
assets to real paths so their addons can load without a separate `bare` or
|
|
53
|
+
`node_modules` install.
|
|
54
|
+
|
|
55
|
+
### Updates
|
|
56
|
+
|
|
57
|
+
The executable updates itself peer to peer with
|
|
58
|
+
[`pear-runtime-updater`](https://github.com/holepunchto/pear-runtime-updater),
|
|
59
|
+
the way [bmus](https://github.com/rafapaezbas/bmus) does. It follows the
|
|
60
|
+
`pear://` link in package.json `upgrade` (`UPGRADE_KEY` overrides it at build
|
|
61
|
+
time), and when that drive carries a newer version for this host it downloads it
|
|
62
|
+
into `.duck-update/` beside the executable, so the swap stays on one volume:
|
|
63
|
+
|
|
64
|
+
- in the TUI a banner reports the download, and `ctrl+u` swaps the new build in
|
|
65
|
+
over the running one, to take effect on the next launch;
|
|
66
|
+
- `--headless` has no one to ask, so it swaps as soon as the build is downloaded,
|
|
67
|
+
prints an `update` line and exits with 75 for its supervisor to restart it on
|
|
68
|
+
the new build.
|
|
69
|
+
|
|
70
|
+
A headless duck is meant to run under a supervisor, such as a systemd user unit
|
|
71
|
+
with `ExecStart=%h/.local/bin/duck --headless` and `Restart=on-failure` (75 is a
|
|
72
|
+
failure, so an update restarts it too). The executable's directory must be one
|
|
73
|
+
duck can write to. Run by hand, it stops after an update.
|
|
74
|
+
|
|
75
|
+
A build is about 1.3GB, and the whole of it downloads for each update. A duck
|
|
76
|
+
already on the newest version also fetches that build into its corestore in the
|
|
77
|
+
background, and the corestore keeps every version it has fetched.
|
|
78
|
+
|
|
79
|
+
With no `upgrade` link there is nothing to follow, and the updater never starts;
|
|
80
|
+
an npm install never starts one either, since the executable it would swap is
|
|
81
|
+
`bare` itself. Its corestore and lock live in the per-user app directory
|
|
82
|
+
(`~/Library/Application Support/duck`, `~/.config/duck`,
|
|
83
|
+
`%APPDATA%\duck`), not under `--storage`: one executable serves every storage
|
|
84
|
+
root, and only the first duck running holds the updater.
|
|
85
|
+
|
|
86
|
+
`.github/workflows/stage-duck.yml` builds every host on its own runner and
|
|
87
|
+
stages them together to the `duck` namespace with
|
|
88
|
+
[pear-ci](https://docs.pears.com/pear/reference/ci-and-release/pear-ci-action/),
|
|
89
|
+
which keeps `ci/snapshot.json` on `main` in step with the drive, so it runs only
|
|
90
|
+
once the workflow and that file are on `main`. A dry run prints the drive's key
|
|
91
|
+
after `starting stage for key`: that `pear://` link is the `upgrade` to commit,
|
|
92
|
+
and `pear seed` on it must be running before a real stage.
|
|
93
|
+
|
|
43
94
|
## Usage
|
|
44
95
|
|
|
45
96
|
```
|