@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
package/package.json
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qvac/core",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Peer-to-peer AI across your devices",
|
|
6
|
+
"engines": {
|
|
7
|
+
"bare": ">=1.34.0"
|
|
8
|
+
},
|
|
6
9
|
"exports": {
|
|
7
10
|
".": {
|
|
8
11
|
"types": "./dist-lib/index.d.ts",
|
|
@@ -153,11 +156,15 @@
|
|
|
153
156
|
"mesh-capability-run": "bare examples/mesh-capability-run.mjs",
|
|
154
157
|
"model-idle-limit": "bare examples/model-idle-limit.mjs",
|
|
155
158
|
"model-load-unload": "bare examples/model-load-unload.mjs",
|
|
159
|
+
"model-users": "bare examples/model-users.mjs",
|
|
160
|
+
"models-by-task": "bare examples/models-by-task.mjs",
|
|
161
|
+
"models-watch": "bare examples/models-watch.mjs",
|
|
156
162
|
"mesh-pair-and-migrate": "bare examples/mesh-pair-and-migrate.mjs",
|
|
157
163
|
"mesh-scoped-catalog": "bare examples/mesh-scoped-catalog.mjs",
|
|
158
164
|
"mesh-peer": "bare examples/mesh-peer.mjs",
|
|
159
165
|
"mesh-member-admin": "bare examples/mesh-member-admin.mjs",
|
|
160
166
|
"mesh-lab": "bare examples/mesh-lab.mjs",
|
|
167
|
+
"chat-read-marker": "bare examples/chat-read-marker.mjs",
|
|
161
168
|
"custom-models": "bare examples/custom-models.mjs",
|
|
162
169
|
"mesh-recover-account": "bare examples/mesh-recover-account.mjs",
|
|
163
170
|
"mesh-user-names": "bare examples/mesh-user-names.mjs",
|
|
@@ -216,6 +223,11 @@
|
|
|
216
223
|
"bare": "bare-fetch",
|
|
217
224
|
"default": "./dist-lib/lib/fetch-node.js"
|
|
218
225
|
},
|
|
226
|
+
"#collabora-worker-entry": "./dist-lib/lib/collabora/entry.js",
|
|
227
|
+
"worker_threads": {
|
|
228
|
+
"bare": "bare-worker",
|
|
229
|
+
"default": "worker_threads"
|
|
230
|
+
},
|
|
219
231
|
"#oauth-loopback": {
|
|
220
232
|
"bare": "./dist-lib/lib/oauth/loopback.stub.js",
|
|
221
233
|
"default": "./dist-lib/lib/oauth/loopback.js"
|
|
@@ -230,14 +242,13 @@
|
|
|
230
242
|
}
|
|
231
243
|
},
|
|
232
244
|
"dependencies": {
|
|
233
|
-
"@qvac/harness": "^0.
|
|
234
|
-
"@qvac/skills": "^0.1.
|
|
245
|
+
"@qvac/harness": "^0.7.0",
|
|
246
|
+
"@qvac/skills": "^0.1.11",
|
|
235
247
|
"asenion": "^0.1.0",
|
|
236
248
|
"autobee": "^2.11.8",
|
|
237
249
|
"b4a": "^1.9.0",
|
|
238
250
|
"bare-abort-controller": "^1.1.2",
|
|
239
251
|
"bare-buffer": "^3.6.1",
|
|
240
|
-
"bare-channel": "^5.2.4",
|
|
241
252
|
"bare-cpu-info": "^0.1.0",
|
|
242
253
|
"bare-crypto": "^1.15.3",
|
|
243
254
|
"bare-events": "^2.9.1",
|
|
@@ -249,7 +260,7 @@
|
|
|
249
260
|
"bare-media": "^2.10.0",
|
|
250
261
|
"bare-os": "^3.9.1",
|
|
251
262
|
"bare-path": "^3.0.1",
|
|
252
|
-
"bare-pdfium": "^1.5.
|
|
263
|
+
"bare-pdfium": "^1.5.4",
|
|
253
264
|
"bare-pipe": "^4.2.2",
|
|
254
265
|
"bare-process": "^4.5.1",
|
|
255
266
|
"bare-rpc": "^1.3.7",
|
|
@@ -262,6 +273,7 @@
|
|
|
262
273
|
"bare-system-logger": "^1.0.3",
|
|
263
274
|
"bare-tui": "^0.3.0",
|
|
264
275
|
"bare-url": "^2.4.5",
|
|
276
|
+
"bare-worker": "^4.5.0",
|
|
265
277
|
"blind-peer": "^3.10.2",
|
|
266
278
|
"blind-peering": "^2.7.0",
|
|
267
279
|
"compact-encoding": "^3.4.0",
|
|
@@ -302,8 +314,8 @@
|
|
|
302
314
|
"bare-bundle": "^1.10.0",
|
|
303
315
|
"bare-module-lexer": "^1.6.3",
|
|
304
316
|
"bare-pack": "^2.2.1",
|
|
305
|
-
"bare-runtime": "1.
|
|
306
|
-
"bare-sidecar": "
|
|
317
|
+
"bare-runtime": "1.34.0",
|
|
318
|
+
"bare-sidecar": "0.5.7",
|
|
307
319
|
"brittle": "^4.0.2",
|
|
308
320
|
"brittle-jobs": "0.2.1",
|
|
309
321
|
"holepunch-types": "^0.2.2",
|
|
@@ -330,7 +342,6 @@
|
|
|
330
342
|
},
|
|
331
343
|
"homepage": "https://github.com/tetherto/qvac-core",
|
|
332
344
|
"patchedDependencies": {
|
|
333
|
-
"bare-sidecar@0.5.4": "patches/bare-sidecar@0.5.4.patch",
|
|
334
345
|
"hypercore-blob-server@1.15.0": "patches/hypercore-blob-server@1.15.0.patch",
|
|
335
346
|
"pyodide@314.0.2": "patches/pyodide@314.0.2.patch",
|
|
336
347
|
"localwatch@1.4.3": "patches/localwatch@1.4.3.patch",
|
|
@@ -339,9 +350,11 @@
|
|
|
339
350
|
"hyperdb@6.9.0": "patches/hyperdb@6.9.0.patch"
|
|
340
351
|
},
|
|
341
352
|
"overrides": {
|
|
353
|
+
"bare-sidecar": "0.5.7",
|
|
354
|
+
"bare-module-traverse": "~2.5.8",
|
|
355
|
+
"bare-thread": "^1.2.7",
|
|
342
356
|
"@qvac/asr-ggml": "0.4.2",
|
|
343
|
-
"bare-runtime": "1.
|
|
344
|
-
"bare-module": "6.4.0",
|
|
357
|
+
"bare-runtime": "1.34.0",
|
|
345
358
|
"bare-http1": "4.6.1",
|
|
346
359
|
"lodash": "4.18.1",
|
|
347
360
|
"hyperschema": "1.26.2",
|
package/tui/app.mjs
CHANGED
|
@@ -538,8 +538,9 @@ async function deleteModel(engine, name) {
|
|
|
538
538
|
return `${row.name} stopped — no longer fetched until something needs it`
|
|
539
539
|
}
|
|
540
540
|
|
|
541
|
-
|
|
542
|
-
const
|
|
541
|
+
// the delete already happened, so a failed lookup must not hide its result
|
|
542
|
+
const { agents } = await engine.modelUsers({ name: row.name }).catch(() => ({ agents: [] }))
|
|
543
|
+
const users = [...new Set((agents ?? []).map((agent) => agent.agentName))]
|
|
543
544
|
const lines = [`deleted ${row.name} — freed ${mb(freedBytes)}`]
|
|
544
545
|
if (users.length) {
|
|
545
546
|
lines.push(`used by ${users.join(', ')} — downloads again on their next run`)
|
package/tui/boot.mjs
CHANGED
|
@@ -9,10 +9,8 @@ import { Logger, toLoggerOptions } from '../dist-lib/lib/log.js'
|
|
|
9
9
|
import { configureSdkStorage } from '@qvac/harness/sdk-storage'
|
|
10
10
|
import { MODEL_CACHE_PATH_ENV, releaseChannel, resolveStorage } from '@qvac/harness/storage'
|
|
11
11
|
import sidecarRunner from 'bare-supervisor/runner/sidecar'
|
|
12
|
+
import { skillsDir } from '@qvac/skills'
|
|
12
13
|
|
|
13
|
-
const skillsDir = path.dirname(
|
|
14
|
-
path.dirname(new URL(import.meta.resolve('@qvac/skills/skills/weather/SKILL.md')).pathname)
|
|
15
|
-
)
|
|
16
14
|
const harnessEntry = new URL(import.meta.resolve('@qvac/harness/worker/stow-entry.mjs')).pathname
|
|
17
15
|
const sidecarEntry = fileURLToPath(new URL('../worker/stow-entry.mjs', import.meta.url))
|
|
18
16
|
if (!fs.existsSync(sidecarEntry)) {
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export interface HostCapability {
|
|
2
|
-
readonly capabilityProfile: string;
|
|
3
|
-
readonly recommendedModelName: string;
|
|
4
|
-
}
|
|
5
|
-
export declare function isMobilePlatform(platform: string): boolean;
|
|
6
|
-
export declare function runnableModelName(requested: string, host: HostCapability | null, mobileClass: boolean): string;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { isCapabilityProfile, meetsMinCapabilityProfile, modelNameToCapabilityProfile } from '@qvac/harness/lib/models/model-catalog.ts';
|
|
2
|
-
export function isMobilePlatform(platform) {
|
|
3
|
-
return platform === 'android' || platform === 'ios';
|
|
4
|
-
}
|
|
5
|
-
export function runnableModelName(requested, host, mobileClass) {
|
|
6
|
-
if (!host || !mobileClass)
|
|
7
|
-
return requested;
|
|
8
|
-
if (!isCapabilityProfile(host.capabilityProfile))
|
|
9
|
-
return requested;
|
|
10
|
-
const profile = host.capabilityProfile;
|
|
11
|
-
const required = modelNameToCapabilityProfile(requested);
|
|
12
|
-
if (!required) {
|
|
13
|
-
return requested;
|
|
14
|
-
}
|
|
15
|
-
if (meetsMinCapabilityProfile(profile, required)) {
|
|
16
|
-
return requested;
|
|
17
|
-
}
|
|
18
|
-
const fallback = modelNameToCapabilityProfile(host.recommendedModelName);
|
|
19
|
-
if (!fallback || !meetsMinCapabilityProfile(required, fallback)) {
|
|
20
|
-
return requested;
|
|
21
|
-
}
|
|
22
|
-
return host.recommendedModelName;
|
|
23
|
-
}
|