@qvac/core 0.6.0 → 0.6.2
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 +112 -2
- package/dist-lib/lib/api/chat.d.ts +1 -1
- package/dist-lib/lib/api/chat.js +2 -1
- package/dist-lib/lib/api/index.d.ts +3 -1
- package/dist-lib/lib/api/index.js +2 -0
- package/dist-lib/lib/api/watchable.d.ts +1 -0
- package/dist-lib/lib/api/watchable.js +1 -1
- package/dist-lib/lib/assistant/harness.d.ts +2 -0
- package/dist-lib/lib/assistant/harness.js +13 -9
- package/dist-lib/lib/assistant-tree.js +4 -0
- package/dist-lib/lib/assistant.d.ts +5 -1
- package/dist-lib/lib/assistant.js +66 -20
- package/dist-lib/lib/client.js +2 -1
- package/dist-lib/lib/collabora/entry.js +13 -19
- package/dist-lib/lib/collabora/worker.js +77 -18
- package/dist-lib/lib/core/chat.d.ts +1 -0
- package/dist-lib/lib/core/chat.js +26 -4
- package/dist-lib/lib/core/collections.d.ts +1 -0
- package/dist-lib/lib/core/collections.js +1 -0
- package/dist-lib/lib/core/contract/chat.d.ts +2 -0
- package/dist-lib/lib/core/contract/chat.js +77 -4
- package/dist-lib/lib/core/contract/chunks.js +5 -0
- package/dist-lib/lib/core/contract/compute.d.ts +1 -1
- package/dist-lib/lib/core/contract/compute.js +2 -1
- package/dist-lib/lib/core/contract/tool-activity.js +5 -0
- package/dist-lib/lib/core/files/index.d.ts +2 -0
- package/dist-lib/lib/core/files/index.js +7 -1
- package/dist-lib/lib/core/files/local-index.d.ts +4 -1
- package/dist-lib/lib/core/files/processing/index.d.ts +3 -0
- package/dist-lib/lib/core/files/processing/index.js +9 -0
- package/dist-lib/lib/core/files/processing/state.d.ts +1 -0
- package/dist-lib/lib/core/files/processing/state.js +5 -0
- package/dist-lib/lib/core/files/rag/index.d.ts +2 -0
- package/dist-lib/lib/core/files/rag/index.js +6 -0
- package/dist-lib/lib/core/files/records/index.d.ts +1 -0
- package/dist-lib/lib/core/files/records/index.js +1 -0
- package/dist-lib/lib/core/files/records/purge.d.ts +4 -0
- package/dist-lib/lib/core/files/records/purge.js +108 -0
- package/dist-lib/lib/core/files/records/reclaim.js +5 -3
- package/dist-lib/lib/core/files/store/blob.d.ts +1 -0
- package/dist-lib/lib/core/files/store/blob.js +29 -0
- package/dist-lib/lib/core/files/store/index.d.ts +1 -0
- package/dist-lib/lib/core/files/store/index.js +6 -1
- package/dist-lib/lib/core/local/files.d.ts +2 -0
- package/dist-lib/lib/core/local/files.js +31 -0
- package/dist-lib/lib/core/sync/index.js +14 -1
- package/dist-lib/lib/core.d.ts +12 -2
- package/dist-lib/lib/core.js +79 -16
- package/dist-lib/lib/credential-pusher.d.ts +8 -3
- package/dist-lib/lib/credential-pusher.js +4 -1
- package/dist-lib/lib/mesh-scoped-engine.js +3 -0
- package/dist-lib/lib/model-download.d.ts +11 -7
- package/dist-lib/lib/model-download.js +22 -21
- package/dist-lib/lib/models-watch.d.ts +6 -0
- package/dist-lib/lib/models-watch.js +45 -0
- package/dist-lib/schema/engine.d.ts +1 -0
- package/dist-lib/schema/engine.js +57 -3
- package/dist-lib/schema/field-order.js +3 -1
- package/dist-lib/schema/qvac.js +12 -1
- package/dist-lib/spec/bind.js +14 -0
- package/dist-lib/spec/calls.js +3 -0
- package/dist-lib/spec/capabilities.d.ts +6 -0
- package/dist-lib/spec/hrpc/hrpc.json +39 -0
- package/dist-lib/spec/hrpc/index.js +41 -4
- package/dist-lib/spec/hrpc/messages.js +788 -583
- package/dist-lib/spec/hyperschema/index.js +788 -583
- package/dist-lib/spec/hyperschema/schema.json +149 -0
- package/dist-lib/spec/hyperschema/types.d.ts +29 -0
- package/dist-lib/spec/mesh/hyperdb/db.json +16 -1
- package/dist-lib/spec/mesh/hyperdb/index.js +71 -2
- package/dist-lib/spec/mesh/hyperdb/messages.js +434 -227
- package/dist-lib/spec/mesh/hyperdispatch/dispatch.json +7 -1
- package/dist-lib/spec/mesh/hyperdispatch/index.js +18 -1
- package/dist-lib/spec/mesh/hyperdispatch/messages.js +134 -5
- package/dist-lib/spec/mesh/hyperschema/index.js +134 -5
- package/dist-lib/spec/mesh/hyperschema/schema.json +70 -1
- package/dist-lib/spec/mesh/hyperschema/types.d.ts +20 -1
- package/package.json +23 -10
- package/tui/app.mjs +3 -2
- package/tui/boot.mjs +1 -3
- package/dist-lib/lib/model-clamp.d.ts +0 -6
- package/dist-lib/lib/model-clamp.js +0 -23
|
@@ -884,6 +884,11 @@
|
|
|
884
884
|
"name": "groupId",
|
|
885
885
|
"type": "string",
|
|
886
886
|
"version": 1
|
|
887
|
+
},
|
|
888
|
+
{
|
|
889
|
+
"name": "readThrough",
|
|
890
|
+
"type": "uint",
|
|
891
|
+
"version": 1
|
|
887
892
|
}
|
|
888
893
|
]
|
|
889
894
|
},
|
|
@@ -4264,6 +4269,50 @@
|
|
|
4264
4269
|
}
|
|
4265
4270
|
]
|
|
4266
4271
|
},
|
|
4272
|
+
{
|
|
4273
|
+
"name": "model-task-type",
|
|
4274
|
+
"namespace": "assistant",
|
|
4275
|
+
"offset": 1,
|
|
4276
|
+
"enum": [
|
|
4277
|
+
{
|
|
4278
|
+
"key": "llm",
|
|
4279
|
+
"version": 1
|
|
4280
|
+
},
|
|
4281
|
+
{
|
|
4282
|
+
"key": "embeddings",
|
|
4283
|
+
"version": 1
|
|
4284
|
+
},
|
|
4285
|
+
{
|
|
4286
|
+
"key": "speech-to-text",
|
|
4287
|
+
"version": 1
|
|
4288
|
+
},
|
|
4289
|
+
{
|
|
4290
|
+
"key": "text-to-speech",
|
|
4291
|
+
"version": 1
|
|
4292
|
+
},
|
|
4293
|
+
{
|
|
4294
|
+
"key": "image-generation",
|
|
4295
|
+
"version": 1
|
|
4296
|
+
},
|
|
4297
|
+
{
|
|
4298
|
+
"key": "audio-generation",
|
|
4299
|
+
"version": 1
|
|
4300
|
+
},
|
|
4301
|
+
{
|
|
4302
|
+
"key": "translation",
|
|
4303
|
+
"version": 1
|
|
4304
|
+
},
|
|
4305
|
+
{
|
|
4306
|
+
"key": "text-recognition",
|
|
4307
|
+
"version": 1
|
|
4308
|
+
},
|
|
4309
|
+
{
|
|
4310
|
+
"key": "other",
|
|
4311
|
+
"version": 1
|
|
4312
|
+
}
|
|
4313
|
+
],
|
|
4314
|
+
"strings": true
|
|
4315
|
+
},
|
|
4267
4316
|
{
|
|
4268
4317
|
"name": "list-models-request",
|
|
4269
4318
|
"namespace": "assistant",
|
|
@@ -4284,6 +4333,16 @@
|
|
|
4284
4333
|
"name": "fullRegistry",
|
|
4285
4334
|
"type": "bool",
|
|
4286
4335
|
"version": 1
|
|
4336
|
+
},
|
|
4337
|
+
{
|
|
4338
|
+
"name": "taskType",
|
|
4339
|
+
"type": "@assistant/model-task-type",
|
|
4340
|
+
"version": 1
|
|
4341
|
+
},
|
|
4342
|
+
{
|
|
4343
|
+
"name": "excludeCustom",
|
|
4344
|
+
"type": "bool",
|
|
4345
|
+
"version": 1
|
|
4287
4346
|
}
|
|
4288
4347
|
]
|
|
4289
4348
|
},
|
|
@@ -4344,6 +4403,16 @@
|
|
|
4344
4403
|
"name": "supportsImages",
|
|
4345
4404
|
"type": "bool",
|
|
4346
4405
|
"version": 1
|
|
4406
|
+
},
|
|
4407
|
+
{
|
|
4408
|
+
"name": "taskType",
|
|
4409
|
+
"type": "@assistant/model-task-type",
|
|
4410
|
+
"version": 1
|
|
4411
|
+
},
|
|
4412
|
+
{
|
|
4413
|
+
"name": "isLoading",
|
|
4414
|
+
"type": "bool",
|
|
4415
|
+
"version": 1
|
|
4347
4416
|
}
|
|
4348
4417
|
]
|
|
4349
4418
|
},
|
|
@@ -8110,6 +8179,86 @@
|
|
|
8110
8179
|
"version": 1
|
|
8111
8180
|
}
|
|
8112
8181
|
]
|
|
8182
|
+
},
|
|
8183
|
+
{
|
|
8184
|
+
"name": "model-use",
|
|
8185
|
+
"namespace": "assistant",
|
|
8186
|
+
"offset": 1,
|
|
8187
|
+
"enum": [
|
|
8188
|
+
{
|
|
8189
|
+
"key": "chat",
|
|
8190
|
+
"version": 1
|
|
8191
|
+
},
|
|
8192
|
+
{
|
|
8193
|
+
"key": "image",
|
|
8194
|
+
"version": 1
|
|
8195
|
+
},
|
|
8196
|
+
{
|
|
8197
|
+
"key": "music",
|
|
8198
|
+
"version": 1
|
|
8199
|
+
}
|
|
8200
|
+
],
|
|
8201
|
+
"strings": true
|
|
8202
|
+
},
|
|
8203
|
+
{
|
|
8204
|
+
"name": "model-users-request",
|
|
8205
|
+
"namespace": "assistant",
|
|
8206
|
+
"compact": false,
|
|
8207
|
+
"flagsPosition": -1,
|
|
8208
|
+
"fields": [
|
|
8209
|
+
{
|
|
8210
|
+
"name": "name",
|
|
8211
|
+
"required": true,
|
|
8212
|
+
"type": "string",
|
|
8213
|
+
"version": 1
|
|
8214
|
+
}
|
|
8215
|
+
]
|
|
8216
|
+
},
|
|
8217
|
+
{
|
|
8218
|
+
"name": "model-user",
|
|
8219
|
+
"namespace": "assistant",
|
|
8220
|
+
"compact": false,
|
|
8221
|
+
"flagsPosition": -1,
|
|
8222
|
+
"fields": [
|
|
8223
|
+
{
|
|
8224
|
+
"name": "agentId",
|
|
8225
|
+
"required": true,
|
|
8226
|
+
"type": "string",
|
|
8227
|
+
"version": 1
|
|
8228
|
+
},
|
|
8229
|
+
{
|
|
8230
|
+
"name": "meshId",
|
|
8231
|
+
"required": true,
|
|
8232
|
+
"type": "string",
|
|
8233
|
+
"version": 1
|
|
8234
|
+
},
|
|
8235
|
+
{
|
|
8236
|
+
"name": "agentName",
|
|
8237
|
+
"required": true,
|
|
8238
|
+
"type": "string",
|
|
8239
|
+
"version": 1
|
|
8240
|
+
},
|
|
8241
|
+
{
|
|
8242
|
+
"name": "via",
|
|
8243
|
+
"required": true,
|
|
8244
|
+
"type": "@assistant/model-use",
|
|
8245
|
+
"version": 1
|
|
8246
|
+
}
|
|
8247
|
+
]
|
|
8248
|
+
},
|
|
8249
|
+
{
|
|
8250
|
+
"name": "model-users",
|
|
8251
|
+
"namespace": "assistant",
|
|
8252
|
+
"compact": false,
|
|
8253
|
+
"flagsPosition": 0,
|
|
8254
|
+
"fields": [
|
|
8255
|
+
{
|
|
8256
|
+
"name": "agents",
|
|
8257
|
+
"array": true,
|
|
8258
|
+
"type": "@assistant/model-user",
|
|
8259
|
+
"version": 1
|
|
8260
|
+
}
|
|
8261
|
+
]
|
|
8113
8262
|
}
|
|
8114
8263
|
]
|
|
8115
8264
|
}
|
|
@@ -171,6 +171,7 @@ export interface AssistantChat {
|
|
|
171
171
|
updatedAt?: number
|
|
172
172
|
lastActivityAt?: number
|
|
173
173
|
groupId?: string | null
|
|
174
|
+
readThrough?: number
|
|
174
175
|
}
|
|
175
176
|
|
|
176
177
|
export interface AssistantChatGroup {
|
|
@@ -882,10 +883,14 @@ export interface AssistantJoinMeshRequest {
|
|
|
882
883
|
invite: string
|
|
883
884
|
}
|
|
884
885
|
|
|
886
|
+
export type AssistantModelTaskType = "llm" | "embeddings" | "speech-to-text" | "text-to-speech" | "image-generation" | "audio-generation" | "translation" | "text-recognition" | "other"
|
|
887
|
+
|
|
885
888
|
export interface AssistantListModelsRequest {
|
|
886
889
|
type?: string | null
|
|
887
890
|
cachedOnly?: boolean
|
|
888
891
|
fullRegistry?: boolean
|
|
892
|
+
taskType?: AssistantModelTaskType | null
|
|
893
|
+
excludeCustom?: boolean
|
|
889
894
|
}
|
|
890
895
|
|
|
891
896
|
export interface AssistantModelInfo {
|
|
@@ -898,6 +903,8 @@ export interface AssistantModelInfo {
|
|
|
898
903
|
expectedSize: number
|
|
899
904
|
actualSize?: number
|
|
900
905
|
supportsImages?: boolean
|
|
906
|
+
taskType?: AssistantModelTaskType | null
|
|
907
|
+
isLoading?: boolean
|
|
901
908
|
}
|
|
902
909
|
|
|
903
910
|
export interface AssistantModelInfoList {
|
|
@@ -1758,6 +1765,23 @@ export interface AssistantUnloadModelResponse {
|
|
|
1758
1765
|
unloaded?: boolean
|
|
1759
1766
|
}
|
|
1760
1767
|
|
|
1768
|
+
export type AssistantModelUse = "chat" | "image" | "music"
|
|
1769
|
+
|
|
1770
|
+
export interface AssistantModelUsersRequest {
|
|
1771
|
+
name: string
|
|
1772
|
+
}
|
|
1773
|
+
|
|
1774
|
+
export interface AssistantModelUser {
|
|
1775
|
+
agentId: string
|
|
1776
|
+
meshId: string
|
|
1777
|
+
agentName: string
|
|
1778
|
+
via: AssistantModelUse
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
export interface AssistantModelUsers {
|
|
1782
|
+
agents?: AssistantModelUser[] | null
|
|
1783
|
+
}
|
|
1784
|
+
|
|
1761
1785
|
export interface SchemaTypes {
|
|
1762
1786
|
"@assistant/empty": AssistantEmpty
|
|
1763
1787
|
"@assistant/ok-response": AssistantOkResponse
|
|
@@ -1904,6 +1928,7 @@ export interface SchemaTypes {
|
|
|
1904
1928
|
"@assistant/sync-status": AssistantSyncStatus
|
|
1905
1929
|
"@assistant/mesh-invite-response": AssistantMeshInviteResponse
|
|
1906
1930
|
"@assistant/join-mesh-request": AssistantJoinMeshRequest
|
|
1931
|
+
"@assistant/model-task-type": AssistantModelTaskType
|
|
1907
1932
|
"@assistant/list-models-request": AssistantListModelsRequest
|
|
1908
1933
|
"@assistant/model-info": AssistantModelInfo
|
|
1909
1934
|
"@assistant/model-info-list": AssistantModelInfoList
|
|
@@ -2045,4 +2070,8 @@ export interface SchemaTypes {
|
|
|
2045
2070
|
"@assistant/load-model-response": AssistantLoadModelResponse
|
|
2046
2071
|
"@assistant/unload-model-request": AssistantUnloadModelRequest
|
|
2047
2072
|
"@assistant/unload-model-response": AssistantUnloadModelResponse
|
|
2073
|
+
"@assistant/model-use": AssistantModelUse
|
|
2074
|
+
"@assistant/model-users-request": AssistantModelUsersRequest
|
|
2075
|
+
"@assistant/model-user": AssistantModelUser
|
|
2076
|
+
"@assistant/model-users": AssistantModelUsers
|
|
2048
2077
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version":
|
|
2
|
+
"version": 8,
|
|
3
3
|
"offset": 0,
|
|
4
4
|
"schema": [
|
|
5
5
|
{
|
|
@@ -892,6 +892,21 @@
|
|
|
892
892
|
"id"
|
|
893
893
|
],
|
|
894
894
|
"trigger": null
|
|
895
|
+
},
|
|
896
|
+
{
|
|
897
|
+
"name": "purged-chats",
|
|
898
|
+
"namespace": "qvac",
|
|
899
|
+
"id": 48,
|
|
900
|
+
"type": 1,
|
|
901
|
+
"version": 8,
|
|
902
|
+
"versionField": null,
|
|
903
|
+
"indexes": [],
|
|
904
|
+
"schema": "@qvac/purged-chat",
|
|
905
|
+
"derived": false,
|
|
906
|
+
"key": [
|
|
907
|
+
"chatId"
|
|
908
|
+
],
|
|
909
|
+
"trigger": null
|
|
895
910
|
}
|
|
896
911
|
]
|
|
897
912
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { IndexEncoder, c, b4a } from 'hyperdb/runtime'
|
|
5
5
|
import { version, getEncoding, setVersion } from './messages.js'
|
|
6
6
|
|
|
7
|
-
const versions = { schema: version, db:
|
|
7
|
+
const versions = { schema: version, db: 8 }
|
|
8
8
|
|
|
9
9
|
import * as helpers0 from '../../../schema/indexes.js'
|
|
10
10
|
|
|
@@ -2871,6 +2871,73 @@ const collection47 = {
|
|
|
2871
2871
|
decodedVersion: 0
|
|
2872
2872
|
}
|
|
2873
2873
|
|
|
2874
|
+
// '@qvac/purged-chats' collection key
|
|
2875
|
+
const collection48_key = new IndexEncoder([
|
|
2876
|
+
IndexEncoder.STRING
|
|
2877
|
+
], { prefix: 48 })
|
|
2878
|
+
|
|
2879
|
+
function collection48_indexify (record) {
|
|
2880
|
+
const a = record.chatId
|
|
2881
|
+
return a === undefined ? [] : [a]
|
|
2882
|
+
}
|
|
2883
|
+
|
|
2884
|
+
// '@qvac/purged-chats' value encoding
|
|
2885
|
+
const collection48_enc = getEncoding('@qvac/purged-chat/hyperdb#48')
|
|
2886
|
+
|
|
2887
|
+
// '@qvac/purged-chats' reconstruction function
|
|
2888
|
+
function collection48_reconstruct (schemaVersion, keyBuf, valueBuf) {
|
|
2889
|
+
const key = collection48_key.decode(keyBuf)
|
|
2890
|
+
setVersion(schemaVersion)
|
|
2891
|
+
const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
|
|
2892
|
+
const type = c.uint.decode(state)
|
|
2893
|
+
if (type !== 0) throw new Error('Unknown collection type: ' + type)
|
|
2894
|
+
collection48.decodedVersion = c.uint.decode(state)
|
|
2895
|
+
const record = collection48_enc.decode(state)
|
|
2896
|
+
record.chatId = key[0]
|
|
2897
|
+
return record
|
|
2898
|
+
}
|
|
2899
|
+
// '@qvac/purged-chats' key reconstruction function
|
|
2900
|
+
function collection48_reconstruct_key (keyBuf) {
|
|
2901
|
+
const key = collection48_key.decode(keyBuf)
|
|
2902
|
+
return {
|
|
2903
|
+
chatId: key[0]
|
|
2904
|
+
}
|
|
2905
|
+
}
|
|
2906
|
+
|
|
2907
|
+
// '@qvac/purged-chats'
|
|
2908
|
+
const collection48 = {
|
|
2909
|
+
name: '@qvac/purged-chats',
|
|
2910
|
+
id: 48,
|
|
2911
|
+
version: 8,
|
|
2912
|
+
encodeKey (record) {
|
|
2913
|
+
const key = [record.chatId]
|
|
2914
|
+
return collection48_key.encode(key)
|
|
2915
|
+
},
|
|
2916
|
+
encodeKeyRange ({ gt, lt, gte, lte } = {}) {
|
|
2917
|
+
return collection48_key.encodeRange({
|
|
2918
|
+
gt: gt ? collection48_indexify(gt) : null,
|
|
2919
|
+
lt: lt ? collection48_indexify(lt) : null,
|
|
2920
|
+
gte: gte ? collection48_indexify(gte) : null,
|
|
2921
|
+
lte: lte ? collection48_indexify(lte) : null
|
|
2922
|
+
})
|
|
2923
|
+
},
|
|
2924
|
+
encodeValue (schemaVersion, collectionVersion, record) {
|
|
2925
|
+
setVersion(schemaVersion)
|
|
2926
|
+
const state = { start: 0, end: 2, buffer: null }
|
|
2927
|
+
collection48_enc.preencode(state, record)
|
|
2928
|
+
state.buffer = b4a.allocUnsafe(state.end)
|
|
2929
|
+
state.buffer[state.start++] = 0
|
|
2930
|
+
state.buffer[state.start++] = collectionVersion
|
|
2931
|
+
collection48_enc.encode(state, record)
|
|
2932
|
+
return state.buffer
|
|
2933
|
+
},
|
|
2934
|
+
trigger: null,
|
|
2935
|
+
reconstruct: collection48_reconstruct,
|
|
2936
|
+
reconstructKey: collection48_reconstruct_key,
|
|
2937
|
+
indexes: [],
|
|
2938
|
+
decodedVersion: 0
|
|
2939
|
+
}
|
|
2940
|
+
|
|
2874
2941
|
const collections = [
|
|
2875
2942
|
collection0,
|
|
2876
2943
|
collection1,
|
|
@@ -2896,7 +2963,8 @@ const collections = [
|
|
|
2896
2963
|
collection44,
|
|
2897
2964
|
collection45,
|
|
2898
2965
|
collection46,
|
|
2899
|
-
collection47
|
|
2966
|
+
collection47,
|
|
2967
|
+
collection48
|
|
2900
2968
|
]
|
|
2901
2969
|
|
|
2902
2970
|
const indexes = [
|
|
@@ -2954,6 +3022,7 @@ function resolveCollection (name) {
|
|
|
2954
3022
|
case '@qvac/invite-sequences': return collection45
|
|
2955
3023
|
case '@qvac/member-removals': return collection46
|
|
2956
3024
|
case '@qvac/mesh-founders': return collection47
|
|
3025
|
+
case '@qvac/purged-chats': return collection48
|
|
2957
3026
|
default: return null
|
|
2958
3027
|
}
|
|
2959
3028
|
}
|