@qvac/core 0.11.0 → 0.11.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 +148 -1
- package/README.md +19 -16
- package/dist-lib/index.d.ts +1 -0
- package/dist-lib/index.js +1 -0
- package/dist-lib/lib/api/chunk-delta.d.ts +6 -2
- package/dist-lib/lib/api/chunk-delta.js +69 -7
- package/dist-lib/lib/api/chunks.js +10 -4
- package/dist-lib/lib/api/config.d.ts +4 -1
- package/dist-lib/lib/api/config.js +23 -4
- package/dist-lib/lib/api/devices.js +3 -1
- package/dist-lib/lib/api/rag.js +11 -7
- package/dist-lib/lib/assistant/harness.d.ts +3 -1
- package/dist-lib/lib/assistant/harness.js +10 -0
- package/dist-lib/lib/assistant/history.d.ts +1 -0
- package/dist-lib/lib/assistant/history.js +9 -3
- package/dist-lib/lib/assistant/message.js +2 -2
- package/dist-lib/lib/assistant-tree.d.ts +2 -0
- package/dist-lib/lib/assistant-tree.js +5 -3
- package/dist-lib/lib/assistant.d.ts +6 -1
- package/dist-lib/lib/assistant.js +77 -24
- package/dist-lib/lib/client.js +10 -1
- package/dist-lib/lib/compaction.d.ts +2 -1
- package/dist-lib/lib/compaction.js +14 -4
- package/dist-lib/lib/constants.d.ts +3 -0
- package/dist-lib/lib/constants.js +3 -0
- package/dist-lib/lib/core/archived-mesh.js +1 -0
- package/dist-lib/lib/core/chat-activity.js +12 -15
- package/dist-lib/lib/core/chunk.d.ts +14 -3
- package/dist-lib/lib/core/chunk.js +112 -22
- package/dist-lib/lib/core/collections.d.ts +1 -0
- package/dist-lib/lib/core/collections.js +1 -0
- package/dist-lib/lib/core/config-value.d.ts +6 -0
- package/dist-lib/lib/core/config-value.js +14 -0
- package/dist-lib/lib/core/contract/chat.d.ts +1 -0
- package/dist-lib/lib/core/contract/chat.js +8 -1
- package/dist-lib/lib/core/contract/chunks.js +20 -6
- 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/devices.js +3 -2
- package/dist-lib/lib/core/departures.js +1 -0
- package/dist-lib/lib/core/devices.d.ts +2 -1
- package/dist-lib/lib/core/devices.js +4 -2
- package/dist-lib/lib/core/files/attachments.js +3 -3
- package/dist-lib/lib/core/files/index.d.ts +1 -1
- package/dist-lib/lib/core/files/index.js +3 -2
- package/dist-lib/lib/core/files/processing/index.d.ts +1 -0
- package/dist-lib/lib/core/files/processing/index.js +8 -0
- package/dist-lib/lib/core/files/processing/settle.d.ts +1 -0
- package/dist-lib/lib/core/files/processing/settle.js +20 -13
- package/dist-lib/lib/core/files/rag/index.d.ts +1 -1
- package/dist-lib/lib/core/files/rag/index.js +1 -1
- package/dist-lib/lib/core/files/rag/retrieval/full-text.d.ts +1 -0
- package/dist-lib/lib/core/files/rag/retrieval/full-text.js +4 -1
- package/dist-lib/lib/core/hosted-agents.d.ts +3 -0
- package/dist-lib/lib/core/hosted-agents.js +19 -0
- package/dist-lib/lib/core/inference-calls-receiver.js +2 -2
- package/dist-lib/lib/core/known-sender.d.ts +3 -0
- package/dist-lib/lib/core/known-sender.js +26 -0
- package/dist-lib/lib/core/local/index.d.ts +2 -0
- package/dist-lib/lib/core/local/index.js +17 -10
- package/dist-lib/lib/core/mesh.d.ts +5 -1
- package/dist-lib/lib/core/mesh.js +6 -6
- package/dist-lib/lib/core/migrations/chat-chunks.d.ts +4 -0
- package/dist-lib/lib/core/migrations/chat-chunks.js +43 -0
- package/dist-lib/lib/core/notification.js +16 -13
- package/dist-lib/lib/core/skill-overlay-receiver.js +2 -2
- package/dist-lib/lib/core/skill-secrets.js +2 -2
- package/dist-lib/lib/core.d.ts +17 -1
- package/dist-lib/lib/core.js +55 -5
- package/dist-lib/lib/credential-pusher.d.ts +11 -7
- package/dist-lib/lib/credential-pusher.js +40 -8
- package/dist-lib/lib/device-tree.d.ts +18 -0
- package/dist-lib/lib/device-tree.js +32 -0
- package/dist-lib/lib/integrations/setup-routes.js +7 -5
- package/dist-lib/lib/kv-cache-retention.d.ts +34 -0
- package/dist-lib/lib/kv-cache-retention.js +98 -0
- package/dist-lib/schema/content.js +2 -1
- package/dist-lib/schema/engine.js +20 -3
- package/dist-lib/schema/field-order.js +8 -1
- package/dist-lib/schema/local.js +7 -3
- package/dist-lib/schema/qvac.js +23 -4
- package/dist-lib/spec/hrpc/messages.js +1240 -1194
- package/dist-lib/spec/hyperschema/index.js +1240 -1194
- package/dist-lib/spec/hyperschema/schema.json +49 -1
- package/dist-lib/spec/hyperschema/types.d.ts +12 -1
- package/dist-lib/spec/local/hyperdb/messages.js +70 -20
- package/dist-lib/spec/local/hyperschema/index.js +36 -11
- package/dist-lib/spec/local/hyperschema/schema.json +21 -1
- package/dist-lib/spec/local/hyperschema/types.d.ts +5 -1
- package/dist-lib/spec/mesh/hyperdb/db.json +17 -1
- package/dist-lib/spec/mesh/hyperdb/index.js +83 -2
- package/dist-lib/spec/mesh/hyperdb/messages.js +602 -264
- 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 +137 -14
- package/dist-lib/spec/mesh/hyperschema/index.js +137 -14
- package/dist-lib/spec/mesh/hyperschema/schema.json +79 -1
- package/dist-lib/spec/mesh/hyperschema/types.d.ts +21 -1
- package/package.json +13 -9
- package/tui/app.mjs +743 -266
- package/tui/boot.mjs +2 -2
- package/tui/lib/connect-sheet.mjs +350 -0
- package/tui/lib/setup.mjs +59 -25
- package/tui/lib/skill-connect.mjs +145 -0
|
@@ -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: 11 }
|
|
8
8
|
|
|
9
9
|
import * as helpers0 from '../../../schema/indexes.js'
|
|
10
10
|
|
|
@@ -3072,6 +3072,85 @@ const collection50 = {
|
|
|
3072
3072
|
decodedVersion: 0
|
|
3073
3073
|
}
|
|
3074
3074
|
|
|
3075
|
+
// '@qvac/chat-chunks' collection key
|
|
3076
|
+
const collection51_key = new IndexEncoder([
|
|
3077
|
+
IndexEncoder.STRING,
|
|
3078
|
+
IndexEncoder.UINT
|
|
3079
|
+
], { prefix: 51 })
|
|
3080
|
+
|
|
3081
|
+
function collection51_indexify (record) {
|
|
3082
|
+
const arr = []
|
|
3083
|
+
|
|
3084
|
+
const a0 = record.chatId
|
|
3085
|
+
if (a0 === undefined) return arr
|
|
3086
|
+
arr.push(a0)
|
|
3087
|
+
|
|
3088
|
+
const a1 = record.seq
|
|
3089
|
+
if (a1 === undefined) return arr
|
|
3090
|
+
arr.push(a1)
|
|
3091
|
+
|
|
3092
|
+
return arr
|
|
3093
|
+
}
|
|
3094
|
+
|
|
3095
|
+
// '@qvac/chat-chunks' value encoding
|
|
3096
|
+
const collection51_enc = getEncoding('@qvac/chunk/hyperdb#51')
|
|
3097
|
+
|
|
3098
|
+
// '@qvac/chat-chunks' reconstruction function
|
|
3099
|
+
function collection51_reconstruct (schemaVersion, keyBuf, valueBuf) {
|
|
3100
|
+
const key = collection51_key.decode(keyBuf)
|
|
3101
|
+
setVersion(schemaVersion)
|
|
3102
|
+
const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
|
|
3103
|
+
const type = c.uint.decode(state)
|
|
3104
|
+
if (type !== 0) throw new Error('Unknown collection type: ' + type)
|
|
3105
|
+
collection51.decodedVersion = c.uint.decode(state)
|
|
3106
|
+
const record = collection51_enc.decode(state)
|
|
3107
|
+
record.chatId = key[0]
|
|
3108
|
+
record.seq = key[1]
|
|
3109
|
+
return record
|
|
3110
|
+
}
|
|
3111
|
+
// '@qvac/chat-chunks' key reconstruction function
|
|
3112
|
+
function collection51_reconstruct_key (keyBuf) {
|
|
3113
|
+
const key = collection51_key.decode(keyBuf)
|
|
3114
|
+
return {
|
|
3115
|
+
chatId: key[0],
|
|
3116
|
+
seq: key[1]
|
|
3117
|
+
}
|
|
3118
|
+
}
|
|
3119
|
+
|
|
3120
|
+
// '@qvac/chat-chunks'
|
|
3121
|
+
const collection51 = {
|
|
3122
|
+
name: '@qvac/chat-chunks',
|
|
3123
|
+
id: 51,
|
|
3124
|
+
version: 11,
|
|
3125
|
+
encodeKey (record) {
|
|
3126
|
+
const key = [record.chatId, record.seq]
|
|
3127
|
+
return collection51_key.encode(key)
|
|
3128
|
+
},
|
|
3129
|
+
encodeKeyRange ({ gt, lt, gte, lte } = {}) {
|
|
3130
|
+
return collection51_key.encodeRange({
|
|
3131
|
+
gt: gt ? collection51_indexify(gt) : null,
|
|
3132
|
+
lt: lt ? collection51_indexify(lt) : null,
|
|
3133
|
+
gte: gte ? collection51_indexify(gte) : null,
|
|
3134
|
+
lte: lte ? collection51_indexify(lte) : null
|
|
3135
|
+
})
|
|
3136
|
+
},
|
|
3137
|
+
encodeValue (schemaVersion, collectionVersion, record) {
|
|
3138
|
+
setVersion(schemaVersion)
|
|
3139
|
+
const state = { start: 0, end: 2, buffer: null }
|
|
3140
|
+
collection51_enc.preencode(state, record)
|
|
3141
|
+
state.buffer = b4a.allocUnsafe(state.end)
|
|
3142
|
+
state.buffer[state.start++] = 0
|
|
3143
|
+
state.buffer[state.start++] = collectionVersion
|
|
3144
|
+
collection51_enc.encode(state, record)
|
|
3145
|
+
return state.buffer
|
|
3146
|
+
},
|
|
3147
|
+
trigger: null,
|
|
3148
|
+
reconstruct: collection51_reconstruct,
|
|
3149
|
+
reconstructKey: collection51_reconstruct_key,
|
|
3150
|
+
indexes: [],
|
|
3151
|
+
decodedVersion: 0
|
|
3152
|
+
}
|
|
3153
|
+
|
|
3075
3154
|
const collections = [
|
|
3076
3155
|
collection0,
|
|
3077
3156
|
collection1,
|
|
@@ -3100,7 +3179,8 @@ const collections = [
|
|
|
3100
3179
|
collection47,
|
|
3101
3180
|
collection48,
|
|
3102
3181
|
collection49,
|
|
3103
|
-
collection50
|
|
3182
|
+
collection50,
|
|
3183
|
+
collection51
|
|
3104
3184
|
]
|
|
3105
3185
|
|
|
3106
3186
|
const indexes = [
|
|
@@ -3161,6 +3241,7 @@ function resolveCollection (name) {
|
|
|
3161
3241
|
case '@qvac/purged-chats': return collection48
|
|
3162
3242
|
case '@qvac/mesh-names': return collection49
|
|
3163
3243
|
case '@qvac/mesh-seeds': return collection50
|
|
3244
|
+
case '@qvac/chat-chunks': return collection51
|
|
3164
3245
|
default: return null
|
|
3165
3246
|
}
|
|
3166
3247
|
}
|