@qvac/core 0.6.7 → 0.7.1
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 +211 -1
- package/README.md +2 -0
- package/dist-lib/lib/api/app-config.d.ts +3 -1
- package/dist-lib/lib/api/app-config.js +15 -4
- package/dist-lib/lib/api/chat.d.ts +1 -1
- package/dist-lib/lib/api/chat.js +9 -0
- package/dist-lib/lib/api/index.d.ts +2 -1
- package/dist-lib/lib/api/index.js +2 -1
- package/dist-lib/lib/api/network.d.ts +8 -1
- package/dist-lib/lib/api/network.js +6 -0
- package/dist-lib/lib/assistant/fake-models.d.ts +22 -0
- package/dist-lib/lib/assistant/fake-models.js +112 -0
- package/dist-lib/lib/assistant/harness.d.ts +12 -0
- package/dist-lib/lib/assistant/harness.js +26 -0
- package/dist-lib/lib/assistant/history.d.ts +5 -1
- package/dist-lib/lib/assistant/history.js +14 -2
- package/dist-lib/lib/assistant-tree.d.ts +4 -0
- package/dist-lib/lib/assistant-tree.js +45 -7
- package/dist-lib/lib/assistant.d.ts +15 -2
- package/dist-lib/lib/assistant.js +181 -42
- package/dist-lib/lib/constants.d.ts +6 -0
- package/dist-lib/lib/constants.js +6 -0
- package/dist-lib/lib/core/agent.d.ts +2 -0
- package/dist-lib/lib/core/agent.js +16 -5
- package/dist-lib/lib/core/blind-peers.d.ts +4 -0
- package/dist-lib/lib/core/blind-peers.js +1 -0
- package/dist-lib/lib/core/chat-activity.d.ts +1 -1
- package/dist-lib/lib/core/chat-activity.js +3 -0
- package/dist-lib/lib/core/chat-copy.d.ts +4 -0
- package/dist-lib/lib/core/chat-copy.js +1 -1
- package/dist-lib/lib/core/chat-fork.d.ts +21 -0
- package/dist-lib/lib/core/chat-fork.js +245 -0
- package/dist-lib/lib/core/chat-move.js +1 -4
- package/dist-lib/lib/core/chat.d.ts +1 -0
- package/dist-lib/lib/core/chat.js +1 -1
- 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/compute.d.ts +1 -1
- package/dist-lib/lib/core/contract/compute.js +2 -1
- package/dist-lib/lib/core/contract/index.js +6 -1
- package/dist-lib/lib/core/contract/invites.d.ts +1 -11
- package/dist-lib/lib/core/contract/invites.js +3 -3
- package/dist-lib/lib/core/contract/mesh-seeds.d.ts +2 -0
- package/dist-lib/lib/core/contract/mesh-seeds.js +26 -0
- package/dist-lib/lib/core/contract/open-join.d.ts +2 -0
- package/dist-lib/lib/core/contract/open-join.js +57 -0
- package/dist-lib/lib/core/departures.d.ts +8 -1
- package/dist-lib/lib/core/departures.js +59 -2
- package/dist-lib/lib/core/fs-drives.d.ts +8 -1
- package/dist-lib/lib/core/fs-drives.js +47 -15
- package/dist-lib/lib/core/harness-loan.d.ts +4 -20
- package/dist-lib/lib/core/harness-loan.js +7 -184
- package/dist-lib/lib/core/id.d.ts +1 -0
- package/dist-lib/lib/core/id.js +3 -0
- package/dist-lib/lib/core/identity.d.ts +1 -1
- package/dist-lib/lib/core/identity.js +6 -4
- package/dist-lib/lib/core/invite.d.ts +2 -0
- package/dist-lib/lib/core/invite.js +6 -2
- package/dist-lib/lib/core/membership.d.ts +1 -12
- package/dist-lib/lib/core/membership.js +1 -94
- package/dist-lib/lib/core/mesh.d.ts +11 -15
- package/dist-lib/lib/core/mesh.js +52 -88
- package/dist-lib/lib/core/migrations/agent-tools-scope.d.ts +2 -0
- package/dist-lib/lib/core/migrations/agent-tools-scope.js +24 -0
- package/dist-lib/lib/core/migrations/index.js +3 -1
- package/dist-lib/lib/core/peer-duplex.d.ts +32 -0
- package/dist-lib/lib/core/peer-duplex.js +207 -0
- package/dist-lib/lib/core/sync/index.js +2 -16
- package/dist-lib/lib/core.d.ts +47 -50
- package/dist-lib/lib/core.js +524 -878
- package/dist-lib/lib/diagnostics.d.ts +7 -0
- package/dist-lib/lib/diagnostics.js +22 -0
- package/dist-lib/lib/doctor/checks.d.ts +15 -0
- package/dist-lib/lib/doctor/checks.js +272 -0
- package/dist-lib/lib/doctor/redact.d.ts +4 -0
- package/dist-lib/lib/doctor/redact.js +31 -0
- package/dist-lib/lib/doctor/render.d.ts +8 -0
- package/dist-lib/lib/doctor/render.js +83 -0
- package/dist-lib/lib/doctor/tree.d.ts +5 -0
- package/dist-lib/lib/doctor/tree.js +167 -0
- package/dist-lib/lib/downloads-allowed-pusher.d.ts +10 -0
- package/dist-lib/lib/downloads-allowed-pusher.js +37 -0
- package/dist-lib/lib/guards.d.ts +1 -0
- package/dist-lib/lib/guards.js +4 -0
- package/dist-lib/lib/inference-calls.js +1 -5
- package/dist-lib/lib/kv-cache-reclaim.d.ts +2 -1
- package/dist-lib/lib/kv-cache-reclaim.js +24 -0
- package/dist-lib/lib/mesh-scoped-engine.js +4 -0
- package/dist-lib/lib/model-download-status.d.ts +1 -1
- package/dist-lib/lib/model-download.d.ts +9 -10
- package/dist-lib/lib/model-download.js +49 -16
- package/dist-lib/lib/model-memory-cap.d.ts +29 -0
- package/dist-lib/lib/model-memory-cap.js +69 -0
- package/dist-lib/lib/models-watch.d.ts +1 -1
- package/dist-lib/lib/models-watch.js +4 -4
- package/dist-lib/lib/oauth/flow.js +1 -1
- package/dist-lib/lib/oauth/loopback.js +16 -2
- package/dist-lib/lib/oauth/redirect-types.d.ts +1 -0
- package/dist-lib/lib/run-replay.d.ts +26 -0
- package/dist-lib/lib/run-replay.js +107 -0
- package/dist-lib/schema/config.d.ts +1 -1
- package/dist-lib/schema/config.js +1 -1
- package/dist-lib/schema/content.js +9 -1
- package/dist-lib/schema/engine.js +75 -6
- package/dist-lib/schema/field-order.js +1 -1
- package/dist-lib/schema/local.js +3 -2
- package/dist-lib/schema/qvac.js +28 -2
- package/dist-lib/spec/bind.js +17 -0
- package/dist-lib/spec/calls.js +4 -0
- package/dist-lib/spec/capabilities.d.ts +8 -0
- package/dist-lib/spec/config/hyperconf/index.js +1 -1
- package/dist-lib/spec/hrpc/hrpc.json +52 -0
- package/dist-lib/spec/hrpc/index.js +53 -4
- package/dist-lib/spec/hrpc/messages.js +1498 -1278
- package/dist-lib/spec/hyperschema/index.js +1498 -1278
- package/dist-lib/spec/hyperschema/schema.json +182 -0
- package/dist-lib/spec/hyperschema/types.d.ts +49 -3
- package/dist-lib/spec/local/hyperdb/messages.js +22 -10
- package/dist-lib/spec/local/hyperschema/index.js +16 -7
- package/dist-lib/spec/local/hyperschema/schema.json +10 -1
- package/dist-lib/spec/local/hyperschema/types.d.ts +3 -2
- 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 +530 -246
- package/dist-lib/spec/mesh/hyperdispatch/dispatch.json +13 -1
- package/dist-lib/spec/mesh/hyperdispatch/index.js +35 -1
- package/dist-lib/spec/mesh/hyperdispatch/messages.js +223 -10
- package/dist-lib/spec/mesh/hyperschema/index.js +223 -10
- package/dist-lib/spec/mesh/hyperschema/schema.json +128 -1
- package/dist-lib/spec/mesh/hyperschema/types.d.ts +34 -2
- package/package.json +14 -19
- package/tui/README.md +7 -1
- package/tui/app.mjs +366 -78
- package/tui/boot.mjs +1 -0
- package/tui/index.mjs +1 -0
- package/tui/lib/fork-command.mjs +43 -0
- package/tui/lib/render.mjs +25 -1
- package/worker/assistant-sidecar.mjs +5 -2
- package/dist-lib/lib/core/device-invites.d.ts +0 -11
- package/dist-lib/lib/core/device-invites.js +0 -63
- package/dist-lib/lib/core/grant-expiry.d.ts +0 -11
- package/dist-lib/lib/core/grant-expiry.js +0 -66
- package/dist-lib/lib/core/mesh-seed-handoff.d.ts +0 -27
- package/dist-lib/lib/core/mesh-seed-handoff.js +0 -53
- package/dist-lib/lib/oauth/loopback.stub.d.ts +0 -3
- package/dist-lib/lib/oauth/loopback.stub.js +0 -6
|
@@ -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: 10 }
|
|
8
8
|
|
|
9
9
|
import * as helpers0 from '../../../schema/indexes.js'
|
|
10
10
|
|
|
@@ -3005,6 +3005,73 @@ const collection49 = {
|
|
|
3005
3005
|
decodedVersion: 0
|
|
3006
3006
|
}
|
|
3007
3007
|
|
|
3008
|
+
// '@qvac/mesh-seeds' collection key
|
|
3009
|
+
const collection50_key = new IndexEncoder([
|
|
3010
|
+
IndexEncoder.BUFFER
|
|
3011
|
+
], { prefix: 50 })
|
|
3012
|
+
|
|
3013
|
+
function collection50_indexify (record) {
|
|
3014
|
+
const a = record.meshKey
|
|
3015
|
+
return a === undefined ? [] : [a]
|
|
3016
|
+
}
|
|
3017
|
+
|
|
3018
|
+
// '@qvac/mesh-seeds' value encoding
|
|
3019
|
+
const collection50_enc = getEncoding('@qvac/mesh-seed/hyperdb#50')
|
|
3020
|
+
|
|
3021
|
+
// '@qvac/mesh-seeds' reconstruction function
|
|
3022
|
+
function collection50_reconstruct (schemaVersion, keyBuf, valueBuf) {
|
|
3023
|
+
const key = collection50_key.decode(keyBuf)
|
|
3024
|
+
setVersion(schemaVersion)
|
|
3025
|
+
const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
|
|
3026
|
+
const type = c.uint.decode(state)
|
|
3027
|
+
if (type !== 0) throw new Error('Unknown collection type: ' + type)
|
|
3028
|
+
collection50.decodedVersion = c.uint.decode(state)
|
|
3029
|
+
const record = collection50_enc.decode(state)
|
|
3030
|
+
record.meshKey = key[0]
|
|
3031
|
+
return record
|
|
3032
|
+
}
|
|
3033
|
+
// '@qvac/mesh-seeds' key reconstruction function
|
|
3034
|
+
function collection50_reconstruct_key (keyBuf) {
|
|
3035
|
+
const key = collection50_key.decode(keyBuf)
|
|
3036
|
+
return {
|
|
3037
|
+
meshKey: key[0]
|
|
3038
|
+
}
|
|
3039
|
+
}
|
|
3040
|
+
|
|
3041
|
+
// '@qvac/mesh-seeds'
|
|
3042
|
+
const collection50 = {
|
|
3043
|
+
name: '@qvac/mesh-seeds',
|
|
3044
|
+
id: 50,
|
|
3045
|
+
version: 10,
|
|
3046
|
+
encodeKey (record) {
|
|
3047
|
+
const key = [record.meshKey]
|
|
3048
|
+
return collection50_key.encode(key)
|
|
3049
|
+
},
|
|
3050
|
+
encodeKeyRange ({ gt, lt, gte, lte } = {}) {
|
|
3051
|
+
return collection50_key.encodeRange({
|
|
3052
|
+
gt: gt ? collection50_indexify(gt) : null,
|
|
3053
|
+
lt: lt ? collection50_indexify(lt) : null,
|
|
3054
|
+
gte: gte ? collection50_indexify(gte) : null,
|
|
3055
|
+
lte: lte ? collection50_indexify(lte) : null
|
|
3056
|
+
})
|
|
3057
|
+
},
|
|
3058
|
+
encodeValue (schemaVersion, collectionVersion, record) {
|
|
3059
|
+
setVersion(schemaVersion)
|
|
3060
|
+
const state = { start: 0, end: 2, buffer: null }
|
|
3061
|
+
collection50_enc.preencode(state, record)
|
|
3062
|
+
state.buffer = b4a.allocUnsafe(state.end)
|
|
3063
|
+
state.buffer[state.start++] = 0
|
|
3064
|
+
state.buffer[state.start++] = collectionVersion
|
|
3065
|
+
collection50_enc.encode(state, record)
|
|
3066
|
+
return state.buffer
|
|
3067
|
+
},
|
|
3068
|
+
trigger: null,
|
|
3069
|
+
reconstruct: collection50_reconstruct,
|
|
3070
|
+
reconstructKey: collection50_reconstruct_key,
|
|
3071
|
+
indexes: [],
|
|
3072
|
+
decodedVersion: 0
|
|
3073
|
+
}
|
|
3074
|
+
|
|
3008
3075
|
const collections = [
|
|
3009
3076
|
collection0,
|
|
3010
3077
|
collection1,
|
|
@@ -3032,7 +3099,8 @@ const collections = [
|
|
|
3032
3099
|
collection46,
|
|
3033
3100
|
collection47,
|
|
3034
3101
|
collection48,
|
|
3035
|
-
collection49
|
|
3102
|
+
collection49,
|
|
3103
|
+
collection50
|
|
3036
3104
|
]
|
|
3037
3105
|
|
|
3038
3106
|
const indexes = [
|
|
@@ -3092,6 +3160,7 @@ function resolveCollection (name) {
|
|
|
3092
3160
|
case '@qvac/mesh-founders': return collection47
|
|
3093
3161
|
case '@qvac/purged-chats': return collection48
|
|
3094
3162
|
case '@qvac/mesh-names': return collection49
|
|
3163
|
+
case '@qvac/mesh-seeds': return collection50
|
|
3095
3164
|
default: return null
|
|
3096
3165
|
}
|
|
3097
3166
|
}
|