@qvac/core 1.0.0-rc.5 → 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 +43 -2
- package/README.md +55 -4
- 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/device-routes.d.ts +1 -1
- package/dist-lib/lib/api/device-routes.js +3 -1
- package/dist-lib/lib/api/index.js +2 -1
- package/dist-lib/lib/api/projects.js +3 -4
- 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 +16 -2
- 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 +11 -1
- package/dist-lib/lib/assistant.js +115 -8
- package/dist-lib/lib/client.js +4 -1
- package/dist-lib/lib/core/agent-copies.js +2 -1
- package/dist-lib/lib/core/agent-hosting.js +9 -4
- package/dist-lib/lib/core/agent.js +2 -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/collections.d.ts +7 -7
- package/dist-lib/lib/core/collections.js +7 -7
- 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/deleted-agent-runs.d.ts +1 -0
- package/dist-lib/lib/core/deleted-agent-runs.js +22 -11
- 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/mesh.d.ts +1 -0
- package/dist-lib/lib/core/mesh.js +4 -4
- 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/sync/index.js +5 -5
- package/dist-lib/lib/core.d.ts +2 -0
- package/dist-lib/lib/core.js +102 -25
- 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/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/engine.js +54 -1
- package/dist-lib/schema/qvac.js +62 -1
- package/dist-lib/spec/bind.js +3 -0
- package/dist-lib/spec/calls.js +1 -0
- package/dist-lib/spec/capabilities.d.ts +2 -0
- package/dist-lib/spec/hrpc/hrpc.json +13 -0
- package/dist-lib/spec/hrpc/index.js +15 -3
- package/dist-lib/spec/hrpc/messages.js +253 -3
- package/dist-lib/spec/hyperschema/index.js +253 -3
- package/dist-lib/spec/hyperschema/schema.json +187 -0
- package/dist-lib/spec/hyperschema/types.d.ts +33 -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 +865 -410
- package/dist-lib/spec/mesh/hyperdispatch/messages.js +244 -3
- package/dist-lib/spec/mesh/hyperschema/index.js +244 -3
- package/dist-lib/spec/mesh/hyperschema/schema.json +155 -0
- package/dist-lib/spec/mesh/hyperschema/types.d.ts +37 -0
- package/package.json +27 -11
- 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
package/CHANGELOG.md
CHANGED
|
@@ -15,6 +15,11 @@ release.
|
|
|
15
15
|
|
|
16
16
|
### Added
|
|
17
17
|
|
|
18
|
+
- A vision model sees an image a tool attaches during a run, such as a PNG `http_request` downloads
|
|
19
|
+
from Google Drive. The assistant gives the harness the image from its own image cache, as it does
|
|
20
|
+
a user's image, and the harness shows it on the turn that closes the tool round. Later runs show
|
|
21
|
+
it again on the same turn. Video stays an attachment for now. Needs a harness with `showImage`.
|
|
22
|
+
|
|
18
23
|
- A completed run that primed the chat cache after Core deleted it says so on its
|
|
19
24
|
`run-status.metrics`: `cacheRebuild` carries Core's deletion reason and the prompt tokens of the
|
|
20
25
|
run's first round on the key, as its `metrics.rounds` counts them, null when that round has no
|
|
@@ -66,14 +71,28 @@ release.
|
|
|
66
71
|
passes it to `Core`. Unset keeps today's behaviour; `false` starts a host
|
|
67
72
|
without fetching the default models. A sidecar that fails to start also writes
|
|
68
73
|
the reason to stderr, since the host may not be listening yet.
|
|
74
|
+
- `duck plugins list|install|enable|disable` manages the userland harness
|
|
75
|
+
plugins in `~/.config/qv-ac` without booting an engine. Install clones a git
|
|
76
|
+
URL or copies a `hyper://` drive, and does not enable what it installs.
|
|
77
|
+
- `npm i -g bare @qvac/core` runs `duck`: the model addons the harness's stock entry loads are
|
|
78
|
+
optional dependencies of the package, so an install brings them, and `bare-thread` is pinned to
|
|
79
|
+
`~1.2.7` in `dependencies`, since 1.4 fails to load the stowed harness worker.
|
|
69
80
|
|
|
70
81
|
### Changed
|
|
71
82
|
|
|
83
|
+
- A streaming reply lands in its chat about once a second instead of every 250 ms: `RunTranscript`
|
|
84
|
+
flushes buffered text on a 1 s tick (and still at 8,192 chars, on a type or round change and at the
|
|
85
|
+
end). A client watching the chat gets a quarter of the frames, so it should pace its own text
|
|
86
|
+
animation by how often text arrives rather than assume a fixed cadence. On a Pixel 8 this cut
|
|
87
|
+
app CPU per generated token by about 30% and skin heating per token by 20–40%, with decode speed
|
|
88
|
+
unchanged.
|
|
89
|
+
([decision](docs/decisions/2026-11-05-a-streaming-reply-lands-once-a-second.md))
|
|
90
|
+
|
|
72
91
|
- The KV cache retention sweep runs every 12 hours instead of every hour, besides when a mesh opens
|
|
73
92
|
and when `kvCache.retentionDays` changes, so a cache can outlive its retention by up to 12 hours
|
|
74
93
|
on a host that stays up. ([config.md](docs/api/config.md#kv-cache-retention))
|
|
75
94
|
|
|
76
|
-
- Core depends on `@qvac/harness` 1.0.0-rc.
|
|
95
|
+
- Core depends on `@qvac/harness` 1.0.0-rc.17 from npm instead of a git commit, so a consumer installs
|
|
77
96
|
the published harness with its named entries.
|
|
78
97
|
|
|
79
98
|
- Wipe a store written by 1.0.0-rc.0 to rc.2 before running this build. The collection, route and
|
|
@@ -104,12 +123,34 @@ release.
|
|
|
104
123
|
|
|
105
124
|
### Removed
|
|
106
125
|
|
|
107
|
-
-
|
|
126
|
+
- `duck`'s `/agent borrow` and `/mesh new compute`, now that Core 1.0 retires
|
|
127
|
+
model loans and compute meshes.
|
|
108
128
|
|
|
109
129
|
### Fixed
|
|
110
130
|
|
|
131
|
+
- A run that restarts mid-reply no longer has its host write the abandoned round's answer a second
|
|
132
|
+
time beside the new attempt's: the run cancels the model rounds its earlier attempt left open
|
|
133
|
+
before it starts again.
|
|
111
134
|
- A resume whose announce reached no DHT node retries that topic within
|
|
112
135
|
seconds, instead of leaving the device unfindable for ten minutes.
|
|
136
|
+
- A chat cache whose workspace this device no longer sees is deleted: left while the device was
|
|
137
|
+
closed, before it heard of the leave, or a member's chats it served. The assistant records which
|
|
138
|
+
chats it built a cache for and, at boot and whenever a mesh leaves the list, deletes those no open
|
|
139
|
+
mesh lists. A host keeps that record beside the run replays, through the new `kvCacheChatsDir`
|
|
140
|
+
option, so a data reset takes both; retention Never turns the sweep off too.
|
|
141
|
+
|
|
142
|
+
```js
|
|
143
|
+
assistantTree({ runReplayDir: `${root}/run-replay`, kvCacheChatsDir: `${root}/kv-cache-chats` })
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
- A device that hosts another member's agent sweeps its chat caches too: KV cache retention and the
|
|
147
|
+
orphaned cache sweep read a hosted mesh through `listChats`, which the assistant's connection now
|
|
148
|
+
answers there with the chats it serves, instead of failing the whole sweep. A host restart keeps
|
|
149
|
+
the caches it serves until hosting resumes, instead of deleting them at boot.
|
|
150
|
+
- Upgrading from app 0.21 no longer reruns a send that was still unanswered in a private chat. The
|
|
151
|
+
private chats copied into your own workspace now end an open run as failed, as the chats copied
|
|
152
|
+
into a project already did, instead of leaving a request for the assistant to take. An approval
|
|
153
|
+
that run was holding is denied in the copy in both places, so none stays pending on a failed run.
|
|
113
154
|
|
|
114
155
|
## [0.11.4] - 2026-10-30
|
|
115
156
|
|
package/README.md
CHANGED
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
<a href="#one-shot-tasks">Tasks</a> ·
|
|
22
22
|
<a href="#rendering-the-chunk-stream-any-ui">Chunk stream</a> ·
|
|
23
23
|
<a href="#harness-event-reference">Events</a> ·
|
|
24
|
-
<a href="#development">Development</a>
|
|
24
|
+
<a href="#development">Development</a> ·
|
|
25
|
+
<a href="#the-duck-tui">duck TUI</a>
|
|
25
26
|
</p>
|
|
26
27
|
|
|
27
28
|
A P2P, multi-device AI workbench core. Three pieces, one duplex stream:
|
|
@@ -43,12 +44,22 @@ A P2P, multi-device AI workbench core. Three pieces, one duplex stream:
|
|
|
43
44
|
|
|
44
45
|
## Install
|
|
45
46
|
|
|
47
|
+
`@qvac/core` is two things: a **library** you embed, and **`duck`**, a terminal
|
|
48
|
+
app that runs the whole stack on top of it.
|
|
49
|
+
|
|
46
50
|
```sh
|
|
47
|
-
npm i @qvac/core
|
|
51
|
+
npm i @qvac/core # the library
|
|
52
|
+
npm i -g bare @qvac/core # duck, on your PATH, with the Bare it runs on
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
duck # the TUI
|
|
57
|
+
duck --help
|
|
48
58
|
```
|
|
49
59
|
|
|
50
60
|
The library is the three pieces above — start at
|
|
51
|
-
[Integrating a harness](#integrating-a-harness).
|
|
61
|
+
[Integrating a harness](#integrating-a-harness). `duck` is the fastest way to
|
|
62
|
+
watch them work; it has its own section at [The duck TUI](#the-duck-tui). Runnable examples live in
|
|
52
63
|
[`examples/`](./examples/README.md); `bun run mesh-two-people` is the shortest
|
|
53
64
|
one, and shows what a device invite does that a member invite does not.
|
|
54
65
|
|
|
@@ -655,6 +666,10 @@ MCP-type app registered at app.asana.com), Spotify a client id; Notion needs
|
|
|
655
666
|
nothing — its MCP server self-provisions a public client via dynamic
|
|
656
667
|
registration (RFC 7591) + PKCE.
|
|
657
668
|
|
|
669
|
+
In duck, `/skill <name>` opens a skill's setup sheet: what it needs, its fields,
|
|
670
|
+
and the browser sign-in for an OAuth skill. `/skill on <name>` opens it first
|
|
671
|
+
when the skill needs setup, and `/connect <name>` signs in straight away.
|
|
672
|
+
|
|
658
673
|
### Notion
|
|
659
674
|
|
|
660
675
|
Notion runs over its official MCP server (`https://mcp.notion.com/mcp`) via
|
|
@@ -668,8 +683,11 @@ in a tool result means the token expired — connect Notion again.
|
|
|
668
683
|
```sh
|
|
669
684
|
npm test # node + bare suites
|
|
670
685
|
npm run build:schema # regenerate spec/ from schema/ (bare)
|
|
686
|
+
bun run duck # run the TUI (no build step)
|
|
671
687
|
```
|
|
672
688
|
|
|
689
|
+
The TUI lives in [`tui/`](tui/README.md) and installs as the `duck` command.
|
|
690
|
+
|
|
673
691
|
Schema changes go in `schema/*.ts` (builders) — `spec/` is generated. The
|
|
674
692
|
mesh schema (`spec/mesh/*`) is the replicated protocol: every device in a
|
|
675
693
|
mesh must run the same generated spec. See `MIGRATION.md` for the audited
|
|
@@ -679,7 +697,40 @@ feature checklist vs core v1.
|
|
|
679
697
|
|
|
680
698
|
Core ships no office decoder. Office documents (`.docx`, `.xlsx`, `.pptx`,
|
|
681
699
|
`.odt`, …) index only when the host passes one through the `extractors.office`
|
|
682
|
-
option — the desktop app
|
|
700
|
+
option — the desktop app and `duck` inject `extractOfficeText` from
|
|
683
701
|
`@qvac/harness/office`. A host without one, such as mobile, fails those files
|
|
684
702
|
as `extractor unavailable on this device`. Everything else — `.pdf`, `.txt`,
|
|
685
703
|
`.md`, `.rtf`, `.html`, `.csv`, `.json` and the rest — works from any install.
|
|
704
|
+
|
|
705
|
+
## The duck TUI
|
|
706
|
+
|
|
707
|
+
`duck` brings the whole stack up — Core, the assistant, your harness — behind a
|
|
708
|
+
terminal UI. It is on your PATH after `npm i -g @qvac/core`, or `bun run duck`
|
|
709
|
+
in this repo. `duck --help` lists the flags, and
|
|
710
|
+
[`docs/tui-commands.md`](docs/tui-commands.md) every slash command.
|
|
711
|
+
|
|
712
|
+
The TUI copies its mesh invite to the clipboard on ctrl+y. On a second machine
|
|
713
|
+
(or a second terminal), start `duck` and join from inside it:
|
|
714
|
+
|
|
715
|
+
```
|
|
716
|
+
/join qvac://device/…
|
|
717
|
+
```
|
|
718
|
+
|
|
719
|
+
The preview says who you would join as. A device invite (`/invite`) retires the
|
|
720
|
+
mesh this device is on and pairs it into the inviter's account; a member invite
|
|
721
|
+
(`/invite member`) adds a workspace beside yours. Headless, `duck --join <invite>`
|
|
722
|
+
takes a member invite and `duck --device-join <invite>` a device invite.
|
|
723
|
+
|
|
724
|
+
`--headless` brings the same stack up with no TUI: it prints the invite and then
|
|
725
|
+
streams logs (including the sidecar child's own output, which the TUI drops) to
|
|
726
|
+
stdout until ctrl+C. That is the shape to run as a background mesh peer, and the
|
|
727
|
+
only way to read the engine's logs live — `QVAC_LOG_LEVEL` picks the level:
|
|
728
|
+
|
|
729
|
+
```sh
|
|
730
|
+
duck --headless
|
|
731
|
+
```
|
|
732
|
+
|
|
733
|
+
The joiner brings no models — it finds the mesh's agent and asks. The device
|
|
734
|
+
that sends drives the run, the agent's model host serves each model round, and
|
|
735
|
+
both sides watch the same replicated stream: load progress, thinking, tokens,
|
|
736
|
+
tool approvals (either side can answer), and final stats.
|
|
@@ -8,6 +8,7 @@ type AgentCapabilities = Pick<CapabilityHandlers, 'createAgent' | 'listAgents' |
|
|
|
8
8
|
export interface CreateAgentsApiOptions {
|
|
9
9
|
readonly deviceId: Buffer | null;
|
|
10
10
|
readonly changed?: ((agentId: string) => Promise<void>) | null;
|
|
11
|
+
readonly modelPicked?: ((modelName: string) => Promise<void>) | null;
|
|
11
12
|
readonly keepCopies?: ((agent: QvacAgent) => Promise<void>) | null;
|
|
12
13
|
readonly peers?: Pick<MeshStatusSource, 'watch' | 'unwatch' | 'snapshot'> | null;
|
|
13
14
|
readonly accountChanges?: AccountChanges | null;
|
|
@@ -18,5 +19,5 @@ interface AccountChanges {
|
|
|
18
19
|
watch(listener: () => void): void;
|
|
19
20
|
unwatch(listener: () => void): void;
|
|
20
21
|
}
|
|
21
|
-
export declare function createAgentsApi(pool: MeshPool, { deviceId, changed, keepCopies, peers, accountChanges, folders, log }: CreateAgentsApiOptions): AgentCapabilities;
|
|
22
|
+
export declare function createAgentsApi(pool: MeshPool, { deviceId, changed, modelPicked, keepCopies, peers, accountChanges, folders, log }: CreateAgentsApiOptions): AgentCapabilities;
|
|
22
23
|
export {};
|
|
@@ -17,11 +17,12 @@ async function definitions(mesh, rows) {
|
|
|
17
17
|
const resolved = await Promise.all(rows.map((row) => runDefinition(mesh, row)));
|
|
18
18
|
return resolved.filter((row) => row !== null);
|
|
19
19
|
}
|
|
20
|
-
export function createAgentsApi(pool, { deviceId, changed = null, keepCopies = null, peers = null, accountChanges = null, folders, log }) {
|
|
20
|
+
export function createAgentsApi(pool, { deviceId, changed = null, modelPicked = null, keepCopies = null, peers = null, accountChanges = null, folders, log }) {
|
|
21
21
|
const reachable = () => new Set([
|
|
22
22
|
...(peers?.snapshot().peerDeviceIds ?? []),
|
|
23
23
|
...(deviceId ? [b4a.toHex(deviceId)] : [])
|
|
24
24
|
]);
|
|
25
|
+
const isOwnDefault = (agent) => agent.isDefault === true && !!deviceId && b4a.equals(agent.providerDeviceId, deviceId);
|
|
25
26
|
const withDerived = async (mesh, agent) => ({
|
|
26
27
|
...agent,
|
|
27
28
|
lenderDeviceId: undefined,
|
|
@@ -99,6 +100,9 @@ export function createAgentsApi(pool, { deviceId, changed = null, keepCopies = n
|
|
|
99
100
|
const mesh = await requireMesh(pool, meshId);
|
|
100
101
|
await notPicked(mesh, agentId);
|
|
101
102
|
const updated = await updateAgent(mesh, agentId, config);
|
|
103
|
+
if (config.modelName && isOwnDefault(updated)) {
|
|
104
|
+
await modelPicked?.(config.modelName);
|
|
105
|
+
}
|
|
102
106
|
await changed?.(agentId);
|
|
103
107
|
return withDerived(mesh, updated);
|
|
104
108
|
},
|
|
@@ -4,5 +4,8 @@ import type { openLocalStore } from '../core/local/index.ts';
|
|
|
4
4
|
import type { CapabilityHandlers } from '../../spec/capabilities.d.ts';
|
|
5
5
|
type LocalStore = Awaited<ReturnType<typeof openLocalStore>>;
|
|
6
6
|
export declare function writeAutoDownloadModels(state: LocalStore, enabled: boolean): Promise<AssistantAppConfig>;
|
|
7
|
+
export declare function readLastModelName(state: LocalStore): Promise<string | null>;
|
|
8
|
+
export declare function writeLastModelName(state: LocalStore, name: string): Promise<void>;
|
|
9
|
+
export declare function backfillLastModelName(state: LocalStore, pick: () => Promise<string | null>): Promise<void>;
|
|
7
10
|
export declare function createAppConfigApi(state: LocalStore, log: LoggerInterface | null): Pick<CapabilityHandlers, 'getConfig' | 'setConfig' | 'setModelPaused' | 'setModelReleased' | 'setAutoDownloadModels' | 'configWatchTyped'>;
|
|
8
11
|
export {};
|
|
@@ -121,6 +121,26 @@ export async function writeAutoDownloadModels(state, enabled) {
|
|
|
121
121
|
const row = await state.updateAppConfigRow((current) => toRow({ ...toConfig(current), autoDownloadModels: enabled }));
|
|
122
122
|
return toConfig(row);
|
|
123
123
|
}
|
|
124
|
+
export async function readLastModelName(state) {
|
|
125
|
+
return (await readConfig(state)).lastModelName ?? null;
|
|
126
|
+
}
|
|
127
|
+
export async function writeLastModelName(state, name) {
|
|
128
|
+
await state.updateAppConfigRow((current) => toRow({ ...toConfig(current), lastModelName: name }));
|
|
129
|
+
}
|
|
130
|
+
export async function backfillLastModelName(state, pick) {
|
|
131
|
+
const config = await readConfig(state);
|
|
132
|
+
if (!config.onboardingCompleted || config.lastModelName) {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
const name = await pick();
|
|
136
|
+
if (!name) {
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
await state.updateAppConfigRow((current) => {
|
|
140
|
+
const latest = toConfig(current);
|
|
141
|
+
return toRow({ ...latest, lastModelName: latest.lastModelName ?? name });
|
|
142
|
+
});
|
|
143
|
+
}
|
|
124
144
|
export function createAppConfigApi(state, log) {
|
|
125
145
|
return {
|
|
126
146
|
getConfig(_) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Capabilities, CapabilityHandlers } from '../../spec/capabilities.d.ts';
|
|
2
|
-
export declare const DEVICE_ROUTES: readonly ["listModels", "deleteModel", "loadModel", "unloadModel", "retryModelDownload", "clearModelDownload", "modelCatalogWatch", "modelDownloadsWatch", "customModelsWatch", "previewCustomModel", "addCustomModel", "removeCustomModel", "modelUsers", "modelsWatch", "configGet", "configSet", "configWatch", "setModelPaused"];
|
|
2
|
+
export declare const DEVICE_ROUTES: readonly ["listModels", "deleteModel", "loadModel", "unloadModel", "retryModelDownload", "clearModelDownload", "modelCatalogWatch", "modelDownloadsWatch", "customModelsWatch", "previewCustomModel", "addCustomModel", "removeCustomModel", "modelUsers", "modelsWatch", "configGet", "configSet", "configWatch", "setModelPaused", "skillOauth"];
|
|
3
3
|
export type DeviceRoutes = Pick<CapabilityHandlers, (typeof DEVICE_ROUTES)[number]>;
|
|
4
4
|
export interface ForwardingOptions {
|
|
5
5
|
readonly deviceId: Buffer;
|
|
@@ -26,7 +26,8 @@ export const DEVICE_ROUTES = [
|
|
|
26
26
|
'configGet',
|
|
27
27
|
'configSet',
|
|
28
28
|
'configWatch',
|
|
29
|
-
'setModelPaused'
|
|
29
|
+
'setModelPaused',
|
|
30
|
+
'skillOauth'
|
|
30
31
|
];
|
|
31
32
|
function modelRoutes(at) {
|
|
32
33
|
return {
|
|
@@ -47,6 +48,7 @@ function modelRoutes(at) {
|
|
|
47
48
|
configGet: (input) => answer(at(input).configGet, 'configGet', here(input)),
|
|
48
49
|
configSet: (input) => answer(at(input).configSet, 'configSet', here(input)),
|
|
49
50
|
configWatch: (input) => watched(() => required(at(input).configWatch, 'configWatch')(here(input))),
|
|
51
|
+
skillOauth: (input) => answer(at(input).skillOauth, 'skillOauth', here(input)),
|
|
50
52
|
setModelPaused: (input) => answer(at(input).setModelPaused, 'setModelPaused', here(input))
|
|
51
53
|
};
|
|
52
54
|
}
|
|
@@ -10,7 +10,7 @@ import { createChatApi } from './chat.js';
|
|
|
10
10
|
import { createChatMoveApi } from './chat-move.js';
|
|
11
11
|
import { createChatGroupsApi } from './chat-groups.js';
|
|
12
12
|
import { createChunksApi } from './chunks.js';
|
|
13
|
-
import { createAppConfigApi } from './app-config.js';
|
|
13
|
+
import { createAppConfigApi, writeLastModelName } from './app-config.js';
|
|
14
14
|
import { createConfigApi } from './config.js';
|
|
15
15
|
import { createDevicesApi } from './devices.js';
|
|
16
16
|
import { createDiagnosticsApi } from './diagnostics.js';
|
|
@@ -63,6 +63,7 @@ export function createApi(deps = {}) {
|
|
|
63
63
|
? createAgentsApi(routed(mesh, 'put-agent'), {
|
|
64
64
|
deviceId: deps.deviceId ?? null,
|
|
65
65
|
changed: deps.agentChanged ?? null,
|
|
66
|
+
modelPicked: state ? (name) => writeLastModelName(state, name) : null,
|
|
66
67
|
keepCopies: deps.agentCopiesKept ?? null,
|
|
67
68
|
peers: deps.meshStatus ?? null,
|
|
68
69
|
accountChanges: deps.accountAgents ?? null,
|
|
@@ -103,10 +103,9 @@ async function addMember(pool, { projectOf, nameOf }, { meshId, projectId, membe
|
|
|
103
103
|
const { workspace, row } = scope;
|
|
104
104
|
const batch = workspace.batch();
|
|
105
105
|
batch.dispatch('set-project-listing', { projectId: row.id, memberId });
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
});
|
|
106
|
+
const sealedBy = workspace.ourMemberId;
|
|
107
|
+
const sealing = sealedBy && { projectId: row.id, seed: project.seed, sealedBy };
|
|
108
|
+
const key = sealing && (await dueProjectKey(workspace.view, memberId, sealing));
|
|
110
109
|
if (key) {
|
|
111
110
|
batch.dispatch('put-project-key', key);
|
|
112
111
|
}
|
|
@@ -3,11 +3,11 @@ import type { AssistantMeshList } from '../../spec/hyperschema/types.d.ts';
|
|
|
3
3
|
import type { CapabilityHandlers } from '../../spec/capabilities.d.ts';
|
|
4
4
|
import { type MeshPool } from './current-mesh.ts';
|
|
5
5
|
import type { MeshStatusSource } from './mesh.ts';
|
|
6
|
-
export declare const SERVED_ROUTES: readonly ["listMeshes", "meshesWatch", "chatsWatch", "listChunks", "chunksWatch", "appendChunk", "modelRequestsWatch", "takeModelRequest", "settleModelRequest"];
|
|
6
|
+
export declare const SERVED_ROUTES: readonly ["listMeshes", "meshesWatch", "listChats", "chatsWatch", "listChunks", "chunksWatch", "appendChunk", "modelRequestsWatch", "takeModelRequest", "settleModelRequest"];
|
|
7
7
|
export type ServedRoutes = Pick<CapabilityHandlers, (typeof SERVED_ROUTES)[number]>;
|
|
8
8
|
export interface ServedOptions {
|
|
9
9
|
readonly pool: MeshPool;
|
|
10
|
-
readonly local: Partial<Pick<CapabilityHandlers, 'chatsWatch' | 'appendChunk'>>;
|
|
10
|
+
readonly local: Partial<Pick<CapabilityHandlers, 'listChats' | 'chatsWatch' | 'appendChunk'>>;
|
|
11
11
|
readonly foreign: (meshId: string) => boolean;
|
|
12
12
|
readonly status: Pick<MeshStatusSource, 'watch' | 'unwatch'>;
|
|
13
13
|
readonly list: () => Promise<AssistantMeshList>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { lastActivity } from '../core/chat.js';
|
|
1
2
|
import { readChunk } from '../core/chunk.js';
|
|
2
3
|
import { listModelRequests } from '../core/model-requests.js';
|
|
3
4
|
import { servedChats } from '../core/public-mesh.js';
|
|
@@ -7,6 +8,7 @@ import { watchable } from './watchable.js';
|
|
|
7
8
|
export const SERVED_ROUTES = [
|
|
8
9
|
'listMeshes',
|
|
9
10
|
'meshesWatch',
|
|
11
|
+
'listChats',
|
|
10
12
|
'chatsWatch',
|
|
11
13
|
'listChunks',
|
|
12
14
|
'chunksWatch',
|
|
@@ -30,13 +32,18 @@ export function createServedApi({ pool, local, foreign, status, list, deviceId,
|
|
|
30
32
|
const live = await listModelRequests(mesh);
|
|
31
33
|
return { chunks: live.filter((round) => chats.has(round.chatId)).map(readChunk) };
|
|
32
34
|
}, { name: 'modelRequestsWatch', log });
|
|
33
|
-
const
|
|
35
|
+
const listChats = async ({ meshId }) => {
|
|
36
|
+
const mesh = await requireMesh(pool, meshId, { wide: true });
|
|
37
|
+
return { chats: deviceId ? await servedListing(mesh, deviceId) : [] };
|
|
38
|
+
};
|
|
39
|
+
const { listChats: ownList = listChats, chatsWatch: ownChats = chatsWatch, appendChunk: ownAppend = chunks.appendChunk } = local;
|
|
34
40
|
return {
|
|
35
41
|
listMeshes: list,
|
|
36
42
|
meshesWatch: watchable(() => status, list, {
|
|
37
43
|
name: 'meshesWatch',
|
|
38
44
|
log
|
|
39
45
|
}),
|
|
46
|
+
listChats: (request) => (foreign(request.meshId) ? listChats(request) : ownList(request)),
|
|
40
47
|
chatsWatch: (request) => (foreign(request.meshId) ? chatsWatch(request) : ownChats(request)),
|
|
41
48
|
listChunks: chunks.listChunks,
|
|
42
49
|
chunksWatch: chunks.chunksWatch,
|
|
@@ -46,3 +53,19 @@ export function createServedApi({ pool, local, foreign, status, list, deviceId,
|
|
|
46
53
|
settleModelRequest: chunks.settleModelRequest
|
|
47
54
|
};
|
|
48
55
|
}
|
|
56
|
+
async function servedListing(mesh, deviceId) {
|
|
57
|
+
const snap = mesh.view.snapshot();
|
|
58
|
+
try {
|
|
59
|
+
const activity = await lastActivity(snap);
|
|
60
|
+
return (await servedChats(mesh, deviceId)).map(({ id, agentId, title, createdAt }) => ({
|
|
61
|
+
id,
|
|
62
|
+
agentId,
|
|
63
|
+
title,
|
|
64
|
+
createdAt,
|
|
65
|
+
lastActivityAt: activity.get(id) || createdAt
|
|
66
|
+
}));
|
|
67
|
+
}
|
|
68
|
+
finally {
|
|
69
|
+
await snap.close();
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -128,6 +128,9 @@ export interface Harness {
|
|
|
128
128
|
approve?: (call: ApprovalCall) => Promise<boolean>;
|
|
129
129
|
attach?: (input: AttachInput) => Promise<AssistantChunkContentAttachment>;
|
|
130
130
|
fetchAttachment?: (query: FetchAttachmentOptions) => Promise<FetchedAttachment | AttachmentMeta | null>;
|
|
131
|
+
showImage?: (query: {
|
|
132
|
+
attachmentId: string;
|
|
133
|
+
}) => Promise<string | null>;
|
|
131
134
|
progress?: (update: ImageProgress | null) => void;
|
|
132
135
|
input?: AsyncIterable<RunInput>;
|
|
133
136
|
signal?: AbortSignal;
|
|
@@ -77,6 +77,12 @@ export function historyFromChunks(chunks, stale = {}, { sentRuns = new Map(), as
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
const byMessage = groupAttachmentsByMessage(attachments, userMessages);
|
|
80
|
+
const byId = new Map();
|
|
81
|
+
for (const { attachment } of attachments) {
|
|
82
|
+
if (attachment && !attachment.deletedAt) {
|
|
83
|
+
byId.set(attachment.id, attachment);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
80
86
|
const digests = derivedAttachments(chunks);
|
|
81
87
|
const steered = steeredQuestions(source, sentRuns);
|
|
82
88
|
const history = [];
|
|
@@ -104,7 +110,7 @@ export function historyFromChunks(chunks, stale = {}, { sentRuns = new Map(), as
|
|
|
104
110
|
}
|
|
105
111
|
const sent = live ? sentRuns.get(live) : undefined;
|
|
106
112
|
if (sent) {
|
|
107
|
-
const replayed = sent.map((message) => (
|
|
113
|
+
const replayed = sent.map((message) => shownAgain(message, byId));
|
|
108
114
|
history.push(...replayed);
|
|
109
115
|
for (const message of [...replayed, turn]) {
|
|
110
116
|
kept.add(message);
|
|
@@ -213,6 +219,10 @@ export function historyFromChunks(chunks, stale = {}, { sentRuns = new Map(), as
|
|
|
213
219
|
}
|
|
214
220
|
return history.filter((turn) => turn.role === 'user' || turn.content.length > 0 || kept.has(turn));
|
|
215
221
|
}
|
|
222
|
+
function shownAgain({ imageIds, ...turn }, byId) {
|
|
223
|
+
const images = (imageIds ?? []).flatMap((id) => byId.get(id) ?? []);
|
|
224
|
+
return images.length ? { ...turn, images } : turn;
|
|
225
|
+
}
|
|
216
226
|
function steeredQuestions(chunks, sentRuns) {
|
|
217
227
|
const into = new Map();
|
|
218
228
|
for (const chunk of chunks) {
|
|
@@ -262,7 +272,9 @@ export function replayFromChunks(rounds) {
|
|
|
262
272
|
}
|
|
263
273
|
const turns = chunk.modelRequest?.state === 'done' ? chunk.modelRequest.toolTurns : undefined;
|
|
264
274
|
if (Array.isArray(turns)) {
|
|
265
|
-
sentRuns.set(chunk.runId, turns
|
|
275
|
+
sentRuns.set(chunk.runId, turns
|
|
276
|
+
.filter(isChatMessage)
|
|
277
|
+
.map(({ role, content, imageIds }) => imageIds ? { role, content, imageIds } : { role, content }));
|
|
266
278
|
}
|
|
267
279
|
}
|
|
268
280
|
return { sentRuns, readRuns };
|
|
@@ -12,6 +12,7 @@ export interface MediaRef {
|
|
|
12
12
|
readonly frame?: number | undefined;
|
|
13
13
|
readonly frames?: number | undefined;
|
|
14
14
|
}
|
|
15
|
+
export declare function wholeImageId(ref: MediaRef | undefined): string | undefined;
|
|
15
16
|
export interface MediaSource {
|
|
16
17
|
readonly ref: MediaRef;
|
|
17
18
|
readonly attachment: AttachmentRef;
|
|
@@ -59,6 +60,7 @@ export declare class OwnerRounds {
|
|
|
59
60
|
ranHere(round: number | undefined): boolean;
|
|
60
61
|
retook(): boolean;
|
|
61
62
|
echoed(type: string, text: string): boolean;
|
|
63
|
+
retire(): Promise<void>;
|
|
62
64
|
private _round;
|
|
63
65
|
probe({ kind, prompt, modelId, responseFormat, signal }: Probe): Promise<string>;
|
|
64
66
|
private _probed;
|
|
@@ -68,6 +70,7 @@ export declare class OwnerRounds {
|
|
|
68
70
|
private _switchedTo;
|
|
69
71
|
private _sendContext;
|
|
70
72
|
private _options;
|
|
73
|
+
private _namedImages;
|
|
71
74
|
private _media;
|
|
72
75
|
private _knownSets;
|
|
73
76
|
private _readKnownSets;
|
|
@@ -9,6 +9,9 @@ import { PdfBoundsSchema } from './pdf-pages.js';
|
|
|
9
9
|
import { isProbeRound, PROBE_KINDS } from '../probe-rounds.js';
|
|
10
10
|
const message = z.custom((value) => isRecord(value) && typeof value.role === 'string' && typeof value.content === 'string');
|
|
11
11
|
const record = () => z.custom((value) => isRecord(value));
|
|
12
|
+
export function wholeImageId(ref) {
|
|
13
|
+
return ref && ref.page === undefined && ref.frame === undefined ? ref.id : undefined;
|
|
14
|
+
}
|
|
12
15
|
const mediaRef = z.object({
|
|
13
16
|
id: z.string(),
|
|
14
17
|
page: z.number().optional(),
|
|
@@ -70,6 +73,13 @@ export class OwnerRounds {
|
|
|
70
73
|
this._echoes.splice(at, 1);
|
|
71
74
|
return true;
|
|
72
75
|
}
|
|
76
|
+
async retire() {
|
|
77
|
+
const { engine, chatId, runId } = this._opts;
|
|
78
|
+
const { chunks } = await engine.listChunks({ chatId, type: 'model-request' });
|
|
79
|
+
const live = (chunks ?? []).filter((chunk) => chunk.runId === runId &&
|
|
80
|
+
(chunk.modelRequest?.state === 'open' || chunk.modelRequest?.state === 'taken'));
|
|
81
|
+
await Promise.all(live.map((chunk) => engine.cancelModelRequest({ chunkId: chunk.id }).catch(noop)));
|
|
82
|
+
}
|
|
73
83
|
async _round(request, io) {
|
|
74
84
|
if (io.signal.aborted)
|
|
75
85
|
throw new AbortedError();
|
|
@@ -83,7 +93,7 @@ export class OwnerRounds {
|
|
|
83
93
|
round: request.round,
|
|
84
94
|
cacheKey: request.cacheKey,
|
|
85
95
|
promptPrefix: request.promptPrefix,
|
|
86
|
-
toolTurns: request.history.slice(input),
|
|
96
|
+
toolTurns: request.history.slice(input).map((turn) => this._namedImages(turn)),
|
|
87
97
|
options: await this._options(request, system)
|
|
88
98
|
};
|
|
89
99
|
const agentId = (await this._switchedTo()) ?? this._opts.agentId;
|
|
@@ -254,6 +264,10 @@ export class OwnerRounds {
|
|
|
254
264
|
}
|
|
255
265
|
return options;
|
|
256
266
|
}
|
|
267
|
+
_namedImages(turn) {
|
|
268
|
+
const imageIds = (turn.attachments ?? []).flatMap(({ path }) => wholeImageId(this._opts.media?.(path)) ?? []);
|
|
269
|
+
return imageIds.length ? { ...turn, imageIds } : turn;
|
|
270
|
+
}
|
|
257
271
|
_media(history) {
|
|
258
272
|
const media = history.flatMap((turn, at) => {
|
|
259
273
|
const refs = (turn.attachments ?? []).flatMap(({ path }) => this._opts.media?.(path) ?? []);
|
|
@@ -510,7 +524,7 @@ export async function servedRequest(engine, round, media) {
|
|
|
510
524
|
const history = [
|
|
511
525
|
...(system === null ? [] : [{ role: 'system', content: system }]),
|
|
512
526
|
...input,
|
|
513
|
-
...toolTurns.data.map(({ attachments: _owners, ...turn }) => turn)
|
|
527
|
+
...toolTurns.data.map(({ attachments: _owners, imageIds: _named, ...turn }) => turn)
|
|
514
528
|
];
|
|
515
529
|
await showMedia(history, {
|
|
516
530
|
all,
|
|
@@ -9,6 +9,7 @@ export interface RoundHostOptions {
|
|
|
9
9
|
readonly serve: NonNullable<Harness['serveModelRound']>;
|
|
10
10
|
readonly deviceId: () => Buffer;
|
|
11
11
|
readonly media?: RoundMedia | null;
|
|
12
|
+
readonly built?: (meshId: string, chatId: string) => void;
|
|
12
13
|
readonly log?: LoggerInterface | null;
|
|
13
14
|
}
|
|
14
15
|
export interface RoundMedia {
|
|
@@ -28,6 +29,7 @@ export declare class RoundHost {
|
|
|
28
29
|
constructor(opts: RoundHostOptions);
|
|
29
30
|
follow(meshId: string, frames: WatchStream<AssistantChunkList>): Promise<void>;
|
|
30
31
|
left(chatId: string, agentId: string): string[];
|
|
32
|
+
holds(chatId: string): boolean;
|
|
31
33
|
stop(): void;
|
|
32
34
|
private _reconcile;
|
|
33
35
|
private _pick;
|
|
@@ -41,6 +41,10 @@ export class RoundHost {
|
|
|
41
41
|
this._built.delete(at);
|
|
42
42
|
return keys;
|
|
43
43
|
}
|
|
44
|
+
holds(chatId) {
|
|
45
|
+
const base = chatKvCacheKey(chatId);
|
|
46
|
+
return [...this._keys.keys()].some((key) => key.startsWith(`${base}/`));
|
|
47
|
+
}
|
|
44
48
|
stop() {
|
|
45
49
|
for (const { controller } of this._serving.values()) {
|
|
46
50
|
controller.abort(LEFT);
|
|
@@ -78,6 +82,7 @@ export class RoundHost {
|
|
|
78
82
|
}
|
|
79
83
|
_serve(meshId, round) {
|
|
80
84
|
const serving = {
|
|
85
|
+
meshId,
|
|
81
86
|
controller: new AbortController(),
|
|
82
87
|
taken: false,
|
|
83
88
|
takenAt: 0
|
|
@@ -132,6 +137,9 @@ export class RoundHost {
|
|
|
132
137
|
return this._probe(engine, { round, request, serving });
|
|
133
138
|
}
|
|
134
139
|
const key = this._claimKey(round, request.cacheKey);
|
|
140
|
+
if (key && round.chatId) {
|
|
141
|
+
this._opts.built?.(serving.meshId, round.chatId);
|
|
142
|
+
}
|
|
135
143
|
const transcript = new RunTranscript(engine, {
|
|
136
144
|
chatId: round.chatId,
|
|
137
145
|
runId: request.runId,
|
|
@@ -24,6 +24,7 @@ export interface AssistantTreeOptions {
|
|
|
24
24
|
imageCacheDir?: string;
|
|
25
25
|
inferenceCallsDir?: string;
|
|
26
26
|
runReplayDir?: string;
|
|
27
|
+
kvCacheChatsDir?: string;
|
|
27
28
|
imageCacheMaxBytes?: number;
|
|
28
29
|
imageCacheMaxAgeMs?: number;
|
|
29
30
|
kvCacheRetentionMs?: number;
|
|
@@ -42,6 +43,7 @@ export interface AssistantChildOptions {
|
|
|
42
43
|
imageCacheDir?: string;
|
|
43
44
|
inferenceCallsDir?: string;
|
|
44
45
|
runReplayDir?: string;
|
|
46
|
+
kvCacheChatsDir?: string;
|
|
45
47
|
imageCacheMaxBytes?: number;
|
|
46
48
|
imageCacheMaxAgeMs?: number;
|
|
47
49
|
kvCacheRetentionMs?: number;
|
|
@@ -8,7 +8,7 @@ import { startModelMemoryCap } from './model-memory-cap.js';
|
|
|
8
8
|
import { startDownloadsAllowedPusher } from './downloads-allowed-pusher.js';
|
|
9
9
|
import { duplexPair } from '@qvac/harness/transport';
|
|
10
10
|
export function assistantTree(opts) {
|
|
11
|
-
const { core, harness, logger = null, imageCacheDir, inferenceCallsDir, runReplayDir, imageCacheMaxBytes, imageCacheMaxAgeMs, kvCacheRetentionMs, embedder, extractors, onHarness, platform, preloadCurrentAgentModel, fakeModels = false } = opts;
|
|
11
|
+
const { core, harness, logger = null, imageCacheDir, inferenceCallsDir, runReplayDir, kvCacheChatsDir, imageCacheMaxBytes, imageCacheMaxAgeMs, kvCacheRetentionMs, embedder, extractors, onHarness, platform, preloadCurrentAgentModel, fakeModels = false } = opts;
|
|
12
12
|
const sup = new Supervisor();
|
|
13
13
|
const logged = ['child-died', 'child-restarting', 'child-ready', 'gave-up', 'stall'];
|
|
14
14
|
for (const event of logged) {
|
|
@@ -75,6 +75,7 @@ export function assistantTree(opts) {
|
|
|
75
75
|
imageCacheDir,
|
|
76
76
|
inferenceCallsDir,
|
|
77
77
|
runReplayDir,
|
|
78
|
+
kvCacheChatsDir,
|
|
78
79
|
imageCacheMaxBytes,
|
|
79
80
|
imageCacheMaxAgeMs,
|
|
80
81
|
kvCacheRetentionMs,
|
|
@@ -239,7 +240,7 @@ export function assistantTree(opts) {
|
|
|
239
240
|
return sup;
|
|
240
241
|
}
|
|
241
242
|
export function assistantChild(opts) {
|
|
242
|
-
const { harness, core = 'core', logger = null, imageCacheDir, inferenceCallsDir, runReplayDir, imageCacheMaxBytes, imageCacheMaxAgeMs, kvCacheRetentionMs, embedder, extractors, onHarness, preloadCurrentAgentModel, fakeModels, ...spec } = opts;
|
|
243
|
+
const { harness, core = 'core', logger = null, imageCacheDir, inferenceCallsDir, runReplayDir, kvCacheChatsDir, imageCacheMaxBytes, imageCacheMaxAgeMs, kvCacheRetentionMs, embedder, extractors, onHarness, preloadCurrentAgentModel, fakeModels, ...spec } = opts;
|
|
243
244
|
return {
|
|
244
245
|
...spec,
|
|
245
246
|
deps: [core],
|
|
@@ -251,6 +252,7 @@ export function assistantChild(opts) {
|
|
|
251
252
|
imageCacheDir,
|
|
252
253
|
inferenceCallsDir,
|
|
253
254
|
runReplayDir,
|
|
255
|
+
kvCacheChatsDir,
|
|
254
256
|
imageCacheMaxBytes,
|
|
255
257
|
imageCacheMaxAgeMs,
|
|
256
258
|
kvCacheRetentionMs,
|