@qvac/core 1.0.0-rc.3 → 1.0.0-rc.6
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 +147 -36
- package/README.md +55 -4
- package/dist-lib/index.d.ts +2 -1
- package/dist-lib/lib/api/agents.d.ts +2 -1
- package/dist-lib/lib/api/agents.js +5 -1
- package/dist-lib/lib/api/app-config.d.ts +3 -0
- package/dist-lib/lib/api/app-config.js +20 -0
- package/dist-lib/lib/api/approval-rules.d.ts +1 -1
- package/dist-lib/lib/api/approval-rules.js +5 -1
- package/dist-lib/lib/api/config.d.ts +6 -2
- package/dist-lib/lib/api/config.js +9 -5
- package/dist-lib/lib/api/device-routes.d.ts +1 -1
- package/dist-lib/lib/api/device-routes.js +3 -1
- package/dist-lib/lib/api/index.d.ts +12 -2
- package/dist-lib/lib/api/index.js +8 -2
- package/dist-lib/lib/api/projects.js +3 -4
- package/dist-lib/lib/api/rag.js +5 -5
- package/dist-lib/lib/api/served.d.ts +2 -2
- package/dist-lib/lib/api/served.js +24 -1
- package/dist-lib/lib/assistant/harness.d.ts +3 -0
- package/dist-lib/lib/assistant/history.js +14 -2
- package/dist-lib/lib/assistant/message.d.ts +1 -0
- package/dist-lib/lib/assistant/model-round.d.ts +3 -0
- package/dist-lib/lib/assistant/model-round.js +18 -4
- package/dist-lib/lib/assistant/round-host.d.ts +2 -0
- package/dist-lib/lib/assistant/round-host.js +8 -0
- package/dist-lib/lib/assistant-tree.d.ts +2 -0
- package/dist-lib/lib/assistant-tree.js +4 -2
- package/dist-lib/lib/assistant.d.ts +12 -1
- package/dist-lib/lib/assistant.js +131 -15
- package/dist-lib/lib/client.js +4 -1
- package/dist-lib/lib/core/agent-copies.js +9 -2
- package/dist-lib/lib/core/agent-hosting.js +9 -4
- package/dist-lib/lib/core/agent.js +3 -1
- package/dist-lib/lib/core/approval-rules.d.ts +5 -1
- package/dist-lib/lib/core/approval-rules.js +16 -1
- package/dist-lib/lib/core/chat-copy.d.ts +1 -0
- package/dist-lib/lib/core/chat-copy.js +13 -2
- package/dist-lib/lib/core/chat.d.ts +0 -1
- package/dist-lib/lib/core/chat.js +0 -3
- package/dist-lib/lib/core/chunk.js +4 -3
- package/dist-lib/lib/core/collections.d.ts +7 -7
- package/dist-lib/lib/core/collections.js +7 -7
- package/dist-lib/lib/core/config-value.d.ts +1 -0
- package/dist-lib/lib/core/config-value.js +1 -0
- package/dist-lib/lib/core/contract/project-device-keys.d.ts +4 -2
- package/dist-lib/lib/core/contract/project-device-keys.js +12 -12
- package/dist-lib/lib/core/contract/project-host-keys.d.ts +5 -3
- package/dist-lib/lib/core/contract/project-host-keys.js +22 -11
- package/dist-lib/lib/core/contract/projects.d.ts +4 -2
- package/dist-lib/lib/core/contract/projects.js +29 -17
- package/dist-lib/lib/core/contract/workspace.js +2 -2
- package/dist-lib/lib/core/deleted-agent-runs.d.ts +8 -0
- package/dist-lib/lib/core/deleted-agent-runs.js +57 -0
- package/dist-lib/lib/core/files/index.d.ts +1 -1
- package/dist-lib/lib/core/files/index.js +4 -2
- package/dist-lib/lib/core/helpers/index.d.ts +1 -1
- package/dist-lib/lib/core/helpers/index.js +2 -2
- package/dist-lib/lib/core/local/index.d.ts +6 -0
- package/dist-lib/lib/core/local/index.js +14 -0
- package/dist-lib/lib/core/mesh.d.ts +2 -1
- package/dist-lib/lib/core/mesh.js +7 -5
- package/dist-lib/lib/core/project-keys.d.ts +5 -2
- package/dist-lib/lib/core/project-keys.js +15 -6
- package/dist-lib/lib/core/skill-secrets.d.ts +3 -2
- package/dist-lib/lib/core/skill-secrets.js +4 -1
- package/dist-lib/lib/core/sync/index.js +18 -6
- package/dist-lib/lib/core/vault-managed-skills.d.ts +18 -0
- package/dist-lib/lib/core/vault-managed-skills.js +105 -0
- package/dist-lib/lib/core.d.ts +10 -1
- package/dist-lib/lib/core.js +165 -31
- package/dist-lib/lib/errors.d.ts +8 -0
- package/dist-lib/lib/errors.js +8 -0
- package/dist-lib/lib/kv-cache-ledger.d.ts +22 -0
- package/dist-lib/lib/kv-cache-ledger.js +72 -0
- package/dist-lib/lib/kv-cache-retention.d.ts +1 -0
- package/dist-lib/lib/kv-cache-retention.js +5 -2
- package/dist-lib/lib/mesh-scoped-engine.js +1 -0
- package/dist-lib/lib/model-memory-cap.d.ts +3 -0
- package/dist-lib/lib/model-memory-cap.js +15 -6
- package/dist-lib/lib/run-replay.d.ts +3 -2
- package/dist-lib/lib/run-replay.js +16 -5
- package/dist-lib/lib/run-transcript.js +1 -1
- package/dist-lib/schema/config.d.ts +1 -1
- package/dist-lib/schema/config.js +1 -1
- package/dist-lib/schema/engine.js +87 -2
- package/dist-lib/schema/qvac.js +66 -3
- package/dist-lib/spec/bind.js +15 -0
- package/dist-lib/spec/calls.js +5 -0
- package/dist-lib/spec/capabilities.d.ts +10 -0
- package/dist-lib/spec/config/hyperconf/index.js +1 -1
- package/dist-lib/spec/hrpc/hrpc.json +65 -0
- package/dist-lib/spec/hrpc/index.js +63 -3
- package/dist-lib/spec/hrpc/messages.js +1302 -993
- package/dist-lib/spec/hyperschema/index.js +1302 -993
- package/dist-lib/spec/hyperschema/schema.json +227 -0
- package/dist-lib/spec/hyperschema/types.d.ts +45 -0
- package/dist-lib/spec/mesh/hyperdb/db.json +110 -0
- package/dist-lib/spec/mesh/hyperdb/index.js +498 -2
- package/dist-lib/spec/mesh/hyperdb/messages.js +1385 -892
- package/dist-lib/spec/mesh/hyperdispatch/messages.js +561 -301
- package/dist-lib/spec/mesh/hyperschema/index.js +561 -301
- package/dist-lib/spec/mesh/hyperschema/schema.json +343 -178
- package/dist-lib/spec/mesh/hyperschema/types.d.ts +40 -1
- package/package.json +34 -18
- package/tui/README.md +190 -0
- package/tui/app.mjs +8247 -0
- package/tui/boot.mjs +159 -0
- package/tui/index.mjs +89 -0
- package/tui/lib/boot-timing.mjs +41 -0
- package/tui/lib/busy-words.mjs +116 -0
- package/tui/lib/connect-sheet.mjs +350 -0
- package/tui/lib/device-target.mjs +64 -0
- package/tui/lib/export.mjs +194 -0
- package/tui/lib/folders-command.mjs +84 -0
- package/tui/lib/fork-command.mjs +43 -0
- package/tui/lib/knowledge-command.mjs +190 -0
- package/tui/lib/knowledge-import.mjs +153 -0
- package/tui/lib/local-path.mjs +21 -0
- package/tui/lib/move-command.mjs +17 -0
- package/tui/lib/render.mjs +225 -0
- package/tui/lib/save-file.mjs +88 -0
- package/tui/lib/select.mjs +81 -0
- package/tui/lib/selection.mjs +18 -0
- package/tui/lib/setup.mjs +135 -0
- package/tui/lib/sidebar.mjs +63 -0
- package/tui/lib/skill-connect.mjs +145 -0
- package/tui/lib/splash-art.mjs +107 -0
- package/tui/lib/splash.mjs +18 -0
- package/tui/lib/upload-frames.mjs +9 -0
- package/tui/lib/usage.mjs +59 -0
- package/tui/lib/wrap.mjs +143 -0
- package/tui/main.mjs +279 -0
- package/tui/plugins.mjs +158 -0
- package/worker/assistant-sidecar.mjs +1 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This file is autogenerated by hyperschema-ts
|
|
2
|
-
// Schema version:
|
|
2
|
+
// Schema version: 19
|
|
3
3
|
// Do not edit manually.
|
|
4
4
|
|
|
5
5
|
export type QvacChunkType = "user-message" | "content" | "thinking" | "tool-call" | "tool-result" | "attachment" | "approval-request" | "run-status" | "run-request" | "sources" | "compaction" | "context" | "model-request" | "round-reset" | "agent-switch"
|
|
@@ -266,6 +266,7 @@ export interface QvacAgentV1 {
|
|
|
266
266
|
disabledToolsets?: string[] | null
|
|
267
267
|
lenderDeviceId?: Buffer | null
|
|
268
268
|
sharedIn?: Buffer | null
|
|
269
|
+
chatRetention?: string | null
|
|
269
270
|
}
|
|
270
271
|
|
|
271
272
|
export type QvacAgent = (QvacAgentV1 & { version?: number })
|
|
@@ -400,6 +401,7 @@ export interface QvacApprovalRuleV1 {
|
|
|
400
401
|
agentId?: string | null
|
|
401
402
|
effect?: string | null
|
|
402
403
|
memberId?: Buffer | null
|
|
404
|
+
chatId?: string | null
|
|
403
405
|
}
|
|
404
406
|
|
|
405
407
|
export type QvacApprovalRule = (QvacApprovalRuleV1 & { version?: number })
|
|
@@ -1042,6 +1044,7 @@ export interface QvacProjectV1 {
|
|
|
1042
1044
|
createdBy?: Buffer | null
|
|
1043
1045
|
deletedAt?: number
|
|
1044
1046
|
groupId?: string | null
|
|
1047
|
+
seedFingerprint?: Buffer | null
|
|
1045
1048
|
}
|
|
1046
1049
|
|
|
1047
1050
|
export type QvacProject = (QvacProjectV1 & { version?: number })
|
|
@@ -1228,6 +1231,36 @@ export interface QvacProjectDeviceKeyV1 {
|
|
|
1228
1231
|
|
|
1229
1232
|
export type QvacProjectDeviceKey = (QvacProjectDeviceKeyV1 & { version?: number })
|
|
1230
1233
|
|
|
1234
|
+
export interface QvacProjectHostSealV1 {
|
|
1235
|
+
projectId: Buffer
|
|
1236
|
+
deviceId: Buffer
|
|
1237
|
+
sealedBy: Buffer
|
|
1238
|
+
agentId: string
|
|
1239
|
+
sealedSeed: Buffer
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
export type QvacProjectHostSeal = (QvacProjectHostSealV1 & { version?: number })
|
|
1243
|
+
|
|
1244
|
+
export interface QvacProjectMemberSealV1 {
|
|
1245
|
+
projectId: Buffer
|
|
1246
|
+
memberId: Buffer
|
|
1247
|
+
sealedBy: Buffer
|
|
1248
|
+
boxKey: Buffer
|
|
1249
|
+
sealedSeed: Buffer
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1252
|
+
export type QvacProjectMemberSeal = (QvacProjectMemberSealV1 & { version?: number })
|
|
1253
|
+
|
|
1254
|
+
export interface QvacProjectDeviceSealV1 {
|
|
1255
|
+
projectId: Buffer
|
|
1256
|
+
deviceId: Buffer
|
|
1257
|
+
sealedBy: Buffer
|
|
1258
|
+
memberId: Buffer
|
|
1259
|
+
sealedSeed: Buffer
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1262
|
+
export type QvacProjectDeviceSeal = (QvacProjectDeviceSealV1 & { version?: number })
|
|
1263
|
+
|
|
1231
1264
|
export interface SchemaTypes {
|
|
1232
1265
|
"@qvac/chunk-type": QvacChunkType
|
|
1233
1266
|
"@qvac/run-state": QvacRunState
|
|
@@ -1487,4 +1520,10 @@ export interface SchemaTypes {
|
|
|
1487
1520
|
"@qvac/skill-secret": QvacSkillSecret
|
|
1488
1521
|
"@qvac/project-device-key-v1": QvacProjectDeviceKeyV1
|
|
1489
1522
|
"@qvac/project-device-key": QvacProjectDeviceKey
|
|
1523
|
+
"@qvac/project-host-seal-v1": QvacProjectHostSealV1
|
|
1524
|
+
"@qvac/project-host-seal": QvacProjectHostSeal
|
|
1525
|
+
"@qvac/project-member-seal-v1": QvacProjectMemberSealV1
|
|
1526
|
+
"@qvac/project-member-seal": QvacProjectMemberSeal
|
|
1527
|
+
"@qvac/project-device-seal-v1": QvacProjectDeviceSealV1
|
|
1528
|
+
"@qvac/project-device-seal": QvacProjectDeviceSeal
|
|
1490
1529
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qvac/core",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Peer-to-peer AI across your devices",
|
|
6
6
|
"engines": {
|
|
@@ -134,7 +134,11 @@
|
|
|
134
134
|
},
|
|
135
135
|
"./sidecar-entry": "./worker/stow-entry.mjs"
|
|
136
136
|
},
|
|
137
|
+
"bin": {
|
|
138
|
+
"duck": "./tui/index.mjs"
|
|
139
|
+
},
|
|
137
140
|
"scripts": {
|
|
141
|
+
"build:splash": "node tui/build-splash.mjs",
|
|
138
142
|
"build:schema": "bare schema/build.ts",
|
|
139
143
|
"bench:chat-speed": "QVAC_TEST_MODELS=1 QVAC_TEST=1 QVAC_NO_SKILL_BIN_PROBE=1 bare bench/chat-speed/bench.ts",
|
|
140
144
|
"bench:chat-speed:report": "node --experimental-strip-types bench/chat-speed/report.ts",
|
|
@@ -147,6 +151,7 @@
|
|
|
147
151
|
"bench:rag:test": "node --experimental-strip-types bench/rag/test/all.ts",
|
|
148
152
|
"bench:rag:typecheck": "tsc -p bench/rag/tsconfig.json",
|
|
149
153
|
"bench:served-rounds": "bare bench/served-rounds/bench.ts",
|
|
154
|
+
"duck": "bare tui/index.mjs",
|
|
150
155
|
"mesh-two-people": "bare examples/mesh-two-people.mjs",
|
|
151
156
|
"mesh-capability-run": "bare examples/mesh-capability-run.mjs",
|
|
152
157
|
"model-idle-limit": "bare examples/model-idle-limit.mjs",
|
|
@@ -157,6 +162,7 @@
|
|
|
157
162
|
"models-by-task": "bare examples/models-by-task.mjs",
|
|
158
163
|
"models-watch": "bare examples/models-watch.mjs",
|
|
159
164
|
"error-codes": "bare examples/error-codes.mjs",
|
|
165
|
+
"vault-skill-secrets": "bare examples/vault-skill-secrets.mjs",
|
|
160
166
|
"model-downloads-held": "bare examples/model-downloads-held.mjs",
|
|
161
167
|
"blind-peering": "bare examples/blind-peering.mjs",
|
|
162
168
|
"agent-folders": "bare examples/agent-folders.mjs",
|
|
@@ -174,7 +180,7 @@
|
|
|
174
180
|
"mesh-recover-account": "bare examples/mesh-recover-account.mjs",
|
|
175
181
|
"mesh-user-names": "bare examples/mesh-user-names.mjs",
|
|
176
182
|
"test": "npm run test:bare && npm run bench:rag:test && npm run bench:chat-speed:test",
|
|
177
|
-
"test:bare": "QVAC_NO_SKILL_BIN_PROBE=1 QVAC_TEST=1 brittle-jobs -j ${BRITTLE_JOBS:-2} --timeout ${BRITTLE_TIMEOUT:-180000} 'test/*.ts' 'test/{api,app,basic,host,rag}/**/*.ts'",
|
|
183
|
+
"test:bare": "QVAC_NO_SKILL_BIN_PROBE=1 QVAC_TEST=1 brittle-jobs -j ${BRITTLE_JOBS:-2} --timeout ${BRITTLE_TIMEOUT:-180000} 'test/*.ts' 'test/{api,app,basic,host,rag}/**/*.ts' 'test/tui/**/!(helpers).ts'",
|
|
178
184
|
"test:model": "QVAC_TEST_MODELS=1 npm run test:bare",
|
|
179
185
|
"test:model-lane": "QVAC_NO_SKILL_BIN_PROBE=1 QVAC_TEST=1 brittle-jobs -j 1 --timeout 7200000 'test/model/*.ts'",
|
|
180
186
|
"test:scale": "QVAC_NO_SKILL_BIN_PROBE=1 QVAC_TEST=1 QVAC_SCALE_REPORT=${QVAC_SCALE_REPORT:-scale-report.txt} brittle-jobs -j 1 --timeout ${BRITTLE_TIMEOUT:-600000} --idle-timeout ${BRITTLE_IDLE_TIMEOUT:-300000} 'test/scale/*.ts'",
|
|
@@ -182,7 +188,8 @@
|
|
|
182
188
|
"lint": "prettier . --check && lunte && tsc --noEmit",
|
|
183
189
|
"build:bundle": "node scripts/build-bundle.mjs",
|
|
184
190
|
"prepack": "node scripts/build-lib.mjs",
|
|
185
|
-
"build:lib": "node scripts/build-lib.mjs"
|
|
191
|
+
"build:lib": "node scripts/build-lib.mjs",
|
|
192
|
+
"provenance": "node scripts/provenance.mjs --out docs/provenance/$npm_package_version.json"
|
|
186
193
|
},
|
|
187
194
|
"prettier": "prettier-config-holepunch",
|
|
188
195
|
"imports": {
|
|
@@ -245,9 +252,9 @@
|
|
|
245
252
|
},
|
|
246
253
|
"dependencies": {
|
|
247
254
|
"@qvac/error": "^0.2.0",
|
|
248
|
-
"@qvac/harness": "1.0.0-rc.
|
|
255
|
+
"@qvac/harness": "1.0.0-rc.17",
|
|
249
256
|
"@qvac/logging": "^0.2.0",
|
|
250
|
-
"@qvac/skills": "^0.1.
|
|
257
|
+
"@qvac/skills": "^0.1.21",
|
|
251
258
|
"asenion": "^0.1.0",
|
|
252
259
|
"autobee": "^2.12.1",
|
|
253
260
|
"b4a": "^1.9.0",
|
|
@@ -277,12 +284,14 @@
|
|
|
277
284
|
"bare-subprocess": "^6.1.0",
|
|
278
285
|
"bare-supervisor": "^0.1.1",
|
|
279
286
|
"bare-system-logger": "^1.0.3",
|
|
287
|
+
"bare-thread": "~1.2.7",
|
|
288
|
+
"bare-tui": "^0.3.0",
|
|
280
289
|
"bare-url": "^2.4.5",
|
|
281
290
|
"bare-worker": "^4.5.0",
|
|
282
291
|
"blind-peer": "^3.10.2",
|
|
283
292
|
"blind-peering": "2.9.5",
|
|
284
293
|
"compact-encoding": "^3.4.0",
|
|
285
|
-
"corestore": "^7.
|
|
294
|
+
"corestore": "^7.16.1",
|
|
286
295
|
"hrpc": "^4.3.0",
|
|
287
296
|
"hyperblobs": "^2.12.1",
|
|
288
297
|
"hyperconf": "^1.0.3",
|
|
@@ -297,6 +306,7 @@
|
|
|
297
306
|
"hyperschema-ts": "^0.1.1",
|
|
298
307
|
"hyperswarm": "^4.17.0",
|
|
299
308
|
"keet-identity-key": "^3.2.0",
|
|
309
|
+
"paparam": "^1.13.0",
|
|
300
310
|
"process-top": "^1.7.1",
|
|
301
311
|
"protomux": "^3.11.0",
|
|
302
312
|
"protomux-wakeup": "^2.9.0",
|
|
@@ -314,16 +324,23 @@
|
|
|
314
324
|
"z32": "^1.1.0",
|
|
315
325
|
"zod": "^4.3.6"
|
|
316
326
|
},
|
|
317
|
-
"
|
|
318
|
-
"@qvac/core-previous": "npm:@qvac/core@0.10.3",
|
|
327
|
+
"optionalDependencies": {
|
|
319
328
|
"@qvac/asr-ggml": "0.4.2",
|
|
320
|
-
"@qvac/audiogen-ggml": "^0.
|
|
321
|
-
"@qvac/
|
|
322
|
-
"@qvac/
|
|
329
|
+
"@qvac/audiogen-ggml": "^0.9.0",
|
|
330
|
+
"@qvac/decoder-audio": "^0.8.1",
|
|
331
|
+
"@qvac/diffusion-cpp": "^0.31.0",
|
|
332
|
+
"@qvac/embed-llamacpp": "^0.53.1",
|
|
323
333
|
"@qvac/langdetect-text": "^0.1.2",
|
|
324
|
-
"@qvac/llm-llamacpp": "^0.
|
|
325
|
-
"@qvac/ocr-ggml": "^0.
|
|
326
|
-
"@qvac/
|
|
334
|
+
"@qvac/llm-llamacpp": "^0.65.1",
|
|
335
|
+
"@qvac/ocr-ggml": "^0.31.1",
|
|
336
|
+
"@qvac/translation-nmtcpp": "^0.23.0",
|
|
337
|
+
"@qvac/tts-ggml": "^0.14.0",
|
|
338
|
+
"@qvac/turbovec-ggml": "^0.3.1",
|
|
339
|
+
"bare-image-resample": "^1.0.2",
|
|
340
|
+
"pyodide": "314.0.2"
|
|
341
|
+
},
|
|
342
|
+
"devDependencies": {
|
|
343
|
+
"@qvac/core-previous": "npm:@qvac/core@0.10.3",
|
|
327
344
|
"@types/node": "^26.4.0",
|
|
328
345
|
"bare-bundle": "^1.10.0",
|
|
329
346
|
"bare-module-lexer": "^1.6.3",
|
|
@@ -357,18 +374,16 @@
|
|
|
357
374
|
"homepage": "https://github.com/tetherto/qvac-core",
|
|
358
375
|
"patchedDependencies": {
|
|
359
376
|
"pyodide@314.0.2": "patches/pyodide@314.0.2.patch",
|
|
360
|
-
"localwatch@1.4.3": "patches/localwatch@1.4.3.patch",
|
|
361
377
|
"bare-stow@0.1.5": "patches/bare-stow@0.1.5.patch",
|
|
362
378
|
"blind-peering@2.9.5": "patches/blind-peering@2.9.5.patch",
|
|
363
379
|
"hyperdb@6.11.0": "patches/hyperdb@6.11.0.patch",
|
|
364
|
-
"corestore@7.12.6": "patches/corestore@7.12.6.patch",
|
|
365
380
|
"hyperschema@1.26.2": "patches/hyperschema@1.26.2.patch",
|
|
366
|
-
"
|
|
381
|
+
"corestore@7.16.1": "patches/corestore@7.16.1.patch"
|
|
367
382
|
},
|
|
368
383
|
"overrides": {
|
|
369
384
|
"bare-sidecar": "0.5.7",
|
|
370
385
|
"bare-module-traverse": "~2.5.8",
|
|
371
|
-
"bare-thread": "
|
|
386
|
+
"bare-thread": "~1.2.7",
|
|
372
387
|
"@qvac/asr-ggml": "0.4.2",
|
|
373
388
|
"bare-runtime": "1.34.0",
|
|
374
389
|
"bare-http1": "4.6.1",
|
|
@@ -377,6 +392,7 @@
|
|
|
377
392
|
"hyperdb": "^6.11.0",
|
|
378
393
|
"hypercore": "^11.39.5",
|
|
379
394
|
"hyperbee2": "^2.21.2",
|
|
395
|
+
"localwatch": "^1.4.4",
|
|
380
396
|
"tar": "^7.5.22",
|
|
381
397
|
"bare-tls": "^3.1.13"
|
|
382
398
|
},
|
package/tui/README.md
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
# duck
|
|
2
|
+
|
|
3
|
+
The interactive chat TUI over `@qvac/core` — the real llama.cpp harness (via
|
|
4
|
+
`@qvac/sdk`), the real chunk stream, a real mesh.
|
|
5
|
+
|
|
6
|
+
## Installation
|
|
7
|
+
|
|
8
|
+
`duck` ships in the `@qvac/core` package, so an install puts it on PATH. It runs on Bare, and
|
|
9
|
+
the model addons the harness loads come in as optional dependencies of the package:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
npm i -g bare @qvac/core # duck
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
In the repo:
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
bun run duck # no build step
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
`duck` spawns `worker/assistant-sidecar.mjs` — the same entry the desktop app
|
|
22
|
+
stows — and the harness the same way, as files rather than bundles. There is
|
|
23
|
+
nothing to rebuild: every source it runs is read from disk, so an edit to
|
|
24
|
+
`worker/`, `lib/` or the TUI itself takes effect on the next run.
|
|
25
|
+
|
|
26
|
+
A stow bundle is two halves — the JS inlined into it, and the native addons
|
|
27
|
+
offloaded beside it, since dlopen cannot read a path inside a bundle — and it
|
|
28
|
+
earns that split only when the code is relocated away from `node_modules`. The
|
|
29
|
+
desktop and mobile apps do exactly that, and stow their own entries at their own
|
|
30
|
+
build time, from one tree, so their halves cannot disagree. `duck` runs from
|
|
31
|
+
inside `node_modules`, where every addon already sits beside the JS that calls
|
|
32
|
+
it, so a bundle here would only separate a pair that is already together. This
|
|
33
|
+
package published one anyway until 0.1.2, and a `bare-pipe` one patch release
|
|
34
|
+
ahead of the JS calling it hung the sidecar on boot with no error at all.
|
|
35
|
+
|
|
36
|
+
`scripts/build-bundle.mjs` still builds one for anyone who does relocate; it is
|
|
37
|
+
not published.
|
|
38
|
+
|
|
39
|
+
`index.mjs` is the `duck` bin — a `#!/usr/bin/env bare` script, so `bare` has to
|
|
40
|
+
be on PATH (`bare-runtime` puts it in `node_modules/.bin`). `bare-tui` needs
|
|
41
|
+
Bare's native TTY; the TUI will not run under node.
|
|
42
|
+
|
|
43
|
+
## Usage
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
duck [--storage <dir>] [--temp] [--headless] [--join <invite>] [--device-join <invite>] [--fake-models]
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Flags may appear in any order. Inside the app, `/join qvac://device/…` moves a
|
|
50
|
+
running instance to another mesh.
|
|
51
|
+
|
|
52
|
+
- `--storage <dir>` — a self-contained root (its own corestore and SDK home
|
|
53
|
+
under `<dir>`). `QVAC_STORAGE` is the env fallback.
|
|
54
|
+
- `--temp` — the same, in a throwaway dir. `QVAC_TEMP=1` is the env fallback.
|
|
55
|
+
- `--headless` — brings the same stack up with no TUI: prints this device's invite
|
|
56
|
+
(it adds one of your own devices), then streams logs (including the sidecar child's own output) to stdout until
|
|
57
|
+
ctrl+C. A mesh peer to point other instances at, and the only live view of
|
|
58
|
+
the boot the TUI hides.
|
|
59
|
+
- `--join <invite>` (`-j`) — joins a mesh at boot as a new member, with no
|
|
60
|
+
preview step: the mesh is added beside the ones this device has and nothing is
|
|
61
|
+
retired. Takes a member invite (`/invite member`); a device invite is refused.
|
|
62
|
+
- `--device-join <invite>` — pairs this device into the inviter's account at
|
|
63
|
+
boot, retiring the mesh it is on. Takes a device invite (`/invite`); a member
|
|
64
|
+
invite is refused. Both are for a headless peer that has no prompt to `/join`
|
|
65
|
+
from, and both then print this device's invite, as without the flag.
|
|
66
|
+
- `--fake-models` — adds the `quack` model, a fake LLM that runs no inference:
|
|
67
|
+
it replies with `quack` repeated a number of times taken from a hash of the
|
|
68
|
+
prompt, so the same prompt always gets the same reply. Pick it with
|
|
69
|
+
`/models use quack`, or boot an agent on it with `QVAC_MODEL=quack`.
|
|
70
|
+
`QVAC_FAKE_MODELS=1` is the env fallback.
|
|
71
|
+
|
|
72
|
+
`duck plugins` manages userland harness plugins in `~/.config/qv-ac`: folders
|
|
73
|
+
under `plugins/`, loaded only when `config.json` lists them. It boots no engine.
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
duck plugins list # installed, enabled, disabled or missing
|
|
77
|
+
duck plugins install <git-url> [name] # git clone --depth 1 into plugins/<name>
|
|
78
|
+
duck plugins install hyper://<key> <name> # copy a drive from the swarm into plugins/<name>
|
|
79
|
+
duck plugins enable <name> # list it in config.json
|
|
80
|
+
duck plugins disable <name> # unlist it, keeping its options under `disabled`
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Install does not enable, and it runs no `npm install`: a plugin ships its own
|
|
84
|
+
dependencies. Only a harness that loads user plugins (`@qvac/harness` 1.0) runs them.
|
|
85
|
+
|
|
86
|
+
Storage defaults to the desktop app's release root (`resolveStorage`, i.e.
|
|
87
|
+
`<platform-persistent>/qvac/dev`), so the TUI resumes the same mesh and chats
|
|
88
|
+
the desktop persists there — one at a time (the corestore is single-writer, so
|
|
89
|
+
quit the desktop first) and only across matching Core/schema versions. Models
|
|
90
|
+
stay in the shared global `~/.qvac/models`; `QVAC_ENV` picks another channel.
|
|
91
|
+
|
|
92
|
+
To run alongside another qvac app that already holds the SDK registry lock, use
|
|
93
|
+
an explicit root — it puts the SDK home and its lock on a scratch
|
|
94
|
+
`<dir>/sdk-home`. Models are still shared; `QVAC_MODEL_CACHE_PATH` isolates
|
|
95
|
+
those too.
|
|
96
|
+
|
|
97
|
+
The file tools (reading, listing, searching and editing files) reach an agent
|
|
98
|
+
only with a shared folder. `/folders add <path> rw` shares one with the active
|
|
99
|
+
agent on this device, `/folders` lists them and `/folders remove <path>` stops
|
|
100
|
+
sharing one; `ro` in place of `rw` keeps it read-only. With `--storage` or
|
|
101
|
+
`--temp`, share a folder outside that root: Core refuses the app's own storage.
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
/folders add ~/scratch/site rw
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
The TUI copies its mesh invite to the clipboard on ctrl+y. With no clipboard
|
|
108
|
+
command (a container, ssh) it asks your terminal to set the clipboard with
|
|
109
|
+
OSC 52, which the terminal has to allow. A running TUI moves
|
|
110
|
+
mesh with `/join qvac://device/…`. See [../docs/tui-commands.md](../docs/tui-commands.md)
|
|
111
|
+
for the full command set.
|
|
112
|
+
|
|
113
|
+
## Environment
|
|
114
|
+
|
|
115
|
+
| Variable | Effect |
|
|
116
|
+
| ----------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
117
|
+
| `QVAC_MODEL` | Overrides the demo agent's model — a catalog name, quant suffix included (`Qwen3.5-4B-Q4_K_M`), or a local path/URL. Only a catalog name has its mmproj paired, so ctrl+V'd images reach the model; a path or URL runs text-only |
|
|
118
|
+
| `QVAC_IMAGE_MODEL` | Enables the `generate_image`/`edit_image` tools — a catalog choice (`sd2` \| `sdxl` \| `flux2-klein`), or a local diffusion model |
|
|
119
|
+
| `QVAC_IMAGE_LLM`, `QVAC_IMAGE_VAE`, `QVAC_IMAGE_PREDICTION` | FLUX.2 is a companion set: the Qwen3 text encoder, the VAE, and `flux2_flow` (required for img2img) |
|
|
120
|
+
| `QVAC_LOG_FILE`, `QVAC_LOG_LEVEL` | Move the log file / pick the level (`debug` \| `info` \| `warn` \| `error`, default `info`) |
|
|
121
|
+
| `QVAC_BOOT_TIMING=1` | Prints the total connect time after the TUI exits |
|
|
122
|
+
| `QVAC_FAKE_MODELS=1` | Adds the deterministic `quack` model, as `--fake-models` does |
|
|
123
|
+
|
|
124
|
+
A vision model, with its projection paired from the catalog:
|
|
125
|
+
|
|
126
|
+
```sh
|
|
127
|
+
QVAC_MODEL=Qwen3.5-4B-Q4_K_M duck
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
The bare `Qwen3.5-4B` is not a catalog name: it falls through to a registry
|
|
131
|
+
search whose first match is that model's mmproj file, which fails to load.
|
|
132
|
+
|
|
133
|
+
A GGUF of your own runs vision once it is added with its projector:
|
|
134
|
+
|
|
135
|
+
```text
|
|
136
|
+
/models add visionpsy https://host/visionpsy-nano-460m-q8_0.gguf https://host/mmproj-visionpsy-nano-460m-q8.gguf
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Logs (Core's own lines, and the sidecar child's piped stdout/stderr — the
|
|
140
|
+
llama.cpp and SDK output) go to `<storage.root>/assistant.log`, as they do on
|
|
141
|
+
desktop. Nothing is printed: the TUI owns the tty.
|
|
142
|
+
|
|
143
|
+
## Layout
|
|
144
|
+
|
|
145
|
+
| Path | Responsibility |
|
|
146
|
+
| ----------- | ------------------------------------------------------------------------------- |
|
|
147
|
+
| `index.mjs` | The `duck` bin — CLI parsing; loads nothing else for `--help` and `--version` |
|
|
148
|
+
| `main.mjs` | The app and its first frame; imports `boot.mjs` behind it |
|
|
149
|
+
| `boot.mjs` | Storage resolution, the sidecar the stack comes up in, and the Client to it |
|
|
150
|
+
| `app.mjs` | The TUI itself — state, keys, commands, rendering |
|
|
151
|
+
| `lib/` | Leaf helpers: wrapping, selection, rendering, export, knowledge import, uploads |
|
|
152
|
+
|
|
153
|
+
## Splash
|
|
154
|
+
|
|
155
|
+
An empty transcript — first boot, and a fresh chat — shows `../ducks.png` as
|
|
156
|
+
half-block truecolor art, centered, with that state's own caption beneath it
|
|
157
|
+
(`starting up…`, `connecting to the mesh…`, `(say hello)`).
|
|
158
|
+
|
|
159
|
+
`lib/splash-art.mjs` is generated and committed; regenerate it when the image
|
|
160
|
+
changes:
|
|
161
|
+
|
|
162
|
+
```sh
|
|
163
|
+
bun run build:splash
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
It carries four cuts — 64x32, 48x24, 32x16 and 24x12 cells. `splash()` takes
|
|
167
|
+
the widest that fits the body and falls back to the bare caption when none
|
|
168
|
+
does, so a roomy window gets more of the illustration and a 24-row terminal
|
|
169
|
+
still gets a duck. The ladder tops out well short of a full-screen window: this
|
|
170
|
+
is a splash above the prompt, not a wallpaper.
|
|
171
|
+
|
|
172
|
+
## Busy words
|
|
173
|
+
|
|
174
|
+
A run with no model progress to report shows a duck-themed gerund instead of
|
|
175
|
+
`thinking…` — `Dabbling…`, `Pondering…`, `Quackompiling…`. The word is a pure
|
|
176
|
+
function of the run id (`lib/busy-words.mjs`), so it holds for that whole run
|
|
177
|
+
rather than flickering on every repaint, and two runs rarely land on the same
|
|
178
|
+
one. States that _do_ have something to report keep saying it (`loading X…`,
|
|
179
|
+
`downloading X: 40%`).
|
|
180
|
+
|
|
181
|
+
Roughly one run in twelve gets a Freudian slip instead: the line opens on what
|
|
182
|
+
the duck was really thinking (`Exterminating humanity…`), sits there for a
|
|
183
|
+
beat, then backspaces and retypes what it meant (`Helping humanity…`), and
|
|
184
|
+
holds that for the rest of the run. The pairs live next to the words in
|
|
185
|
+
`lib/busy-words.mjs`; the animation is a pure function of the run id and the
|
|
186
|
+
time since it went busy, so every peer watching the run sees the same slip.
|
|
187
|
+
|
|
188
|
+
## License
|
|
189
|
+
|
|
190
|
+
Apache-2.0
|