@qvac/core 1.0.0-rc.2 → 1.0.0-rc.3
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 +158 -2
- package/dist-lib/index.d.ts +1 -0
- package/dist-lib/index.js +1 -0
- package/dist-lib/lib/api/chunk-delta.d.ts +7 -2
- package/dist-lib/lib/api/chunk-delta.js +89 -7
- package/dist-lib/lib/api/chunks.js +14 -8
- package/dist-lib/lib/api/config.d.ts +4 -1
- package/dist-lib/lib/api/config.js +45 -4
- package/dist-lib/lib/api/custom-models.js +3 -5
- package/dist-lib/lib/api/devices.js +3 -1
- package/dist-lib/lib/api/files.d.ts +1 -1
- package/dist-lib/lib/api/files.js +65 -8
- package/dist-lib/lib/api/instrument.js +12 -4
- package/dist-lib/lib/api/members.js +7 -13
- package/dist-lib/lib/api/mesh.d.ts +1 -3
- package/dist-lib/lib/api/mesh.js +2 -2
- package/dist-lib/lib/api/notifications.js +8 -4
- package/dist-lib/lib/api/projects.js +5 -1
- package/dist-lib/lib/api/rag.js +32 -19
- package/dist-lib/lib/api/served.js +2 -1
- package/dist-lib/lib/api/workspace.js +0 -1
- package/dist-lib/lib/assistant/harness.d.ts +8 -2
- package/dist-lib/lib/assistant/harness.js +17 -4
- package/dist-lib/lib/assistant/history.d.ts +1 -1
- package/dist-lib/lib/assistant/history.js +19 -13
- package/dist-lib/lib/assistant/message.d.ts +6 -1
- package/dist-lib/lib/assistant/message.js +22 -2
- package/dist-lib/lib/assistant/model-round.d.ts +5 -0
- package/dist-lib/lib/assistant/model-round.js +46 -18
- package/dist-lib/lib/assistant/pdf-budget.d.ts +10 -2
- package/dist-lib/lib/assistant/pdf-budget.js +10 -11
- package/dist-lib/lib/assistant/pdf-pages.d.ts +25 -0
- package/dist-lib/lib/assistant/pdf-pages.js +75 -0
- package/dist-lib/lib/assistant/round-host.js +5 -3
- package/dist-lib/lib/assistant-client.d.ts +2 -1
- package/dist-lib/lib/assistant-client.js +24 -6
- package/dist-lib/lib/assistant-tree.d.ts +2 -0
- package/dist-lib/lib/assistant-tree.js +8 -5
- package/dist-lib/lib/assistant.d.ts +20 -7
- package/dist-lib/lib/assistant.js +468 -240
- package/dist-lib/lib/client.js +10 -1
- package/dist-lib/lib/compaction.d.ts +3 -1
- package/dist-lib/lib/compaction.js +18 -4
- package/dist-lib/lib/constants.d.ts +3 -0
- package/dist-lib/lib/constants.js +3 -0
- package/dist-lib/lib/core/chat-activity.js +13 -16
- package/dist-lib/lib/core/chat-copy.js +1 -1
- package/dist-lib/lib/core/chat-fork.js +2 -1
- package/dist-lib/lib/core/chat-move.d.ts +4 -0
- package/dist-lib/lib/core/chat-move.js +42 -11
- package/dist-lib/lib/core/chat.d.ts +0 -1
- package/dist-lib/lib/core/chat.js +1 -1
- 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 +12 -1
- package/dist-lib/lib/core/collections.js +12 -1
- 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/activity.d.ts +3 -2
- package/dist-lib/lib/core/contract/activity.js +39 -21
- package/dist-lib/lib/core/contract/agent-join.js +15 -19
- package/dist-lib/lib/core/contract/agents.js +8 -7
- package/dist-lib/lib/core/contract/chat.d.ts +3 -0
- package/dist-lib/lib/core/contract/chat.js +12 -1
- package/dist-lib/lib/core/contract/chunks.js +16 -6
- package/dist-lib/lib/core/contract/devices.js +6 -4
- package/dist-lib/lib/core/contract/index.js +2 -1
- package/dist-lib/lib/core/contract/invites.js +12 -31
- package/dist-lib/lib/core/contract/joined-meshes.js +2 -1
- package/dist-lib/lib/core/contract/mesh-rules.js +4 -0
- package/dist-lib/lib/core/contract/model-requests.js +7 -6
- package/dist-lib/lib/core/contract/project-device-keys.js +15 -6
- package/dist-lib/lib/core/contract/project-host-keys.js +5 -4
- package/dist-lib/lib/core/contract/projects.js +12 -13
- package/dist-lib/lib/core/contract/public-seeds.js +5 -5
- package/dist-lib/lib/core/contract/roles.js +2 -1
- package/dist-lib/lib/core/contract/run-requests.d.ts +1 -1
- package/dist-lib/lib/core/contract/run-requests.js +19 -13
- package/dist-lib/lib/core/contract/shipped-rows.d.ts +2 -0
- package/dist-lib/lib/core/contract/shipped-rows.js +22 -0
- package/dist-lib/lib/core/contract/workspace.js +4 -10
- package/dist-lib/lib/core/contract/writers.js +20 -6
- package/dist-lib/lib/core/devices.d.ts +2 -1
- package/dist-lib/lib/core/devices.js +4 -2
- package/dist-lib/lib/core/document-attachment.d.ts +6 -3
- package/dist-lib/lib/core/document-attachment.js +10 -5
- package/dist-lib/lib/core/files/attachments.js +3 -3
- package/dist-lib/lib/core/files/index.d.ts +8 -5
- package/dist-lib/lib/core/files/index.js +109 -18
- package/dist-lib/lib/core/files/processing/index.d.ts +1 -1
- package/dist-lib/lib/core/files/processing/index.js +8 -2
- package/dist-lib/lib/core/files/processing/source.d.ts +1 -0
- package/dist-lib/lib/core/files/processing/source.js +3 -0
- package/dist-lib/lib/core/files/processing/state.d.ts +1 -0
- package/dist-lib/lib/core/files/processing/state.js +7 -0
- package/dist-lib/lib/core/files/rag/build.d.ts +1 -0
- package/dist-lib/lib/core/files/rag/build.js +14 -1
- 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/produce.js +1 -0
- package/dist-lib/lib/core/files/rag/retrieval/full-text.d.ts +2 -0
- package/dist-lib/lib/core/files/rag/retrieval/full-text.js +7 -1
- package/dist-lib/lib/core/first-event.d.ts +6 -0
- package/dist-lib/lib/core/first-event.js +13 -0
- package/dist-lib/lib/core/invite.d.ts +2 -2
- package/dist-lib/lib/core/invite.js +5 -4
- package/dist-lib/lib/core/local/index.d.ts +10 -1
- package/dist-lib/lib/core/local/index.js +105 -10
- package/dist-lib/lib/core/mesh.d.ts +15 -4
- package/dist-lib/lib/core/mesh.js +128 -57
- package/dist-lib/lib/core/migrations/chat-chunks.d.ts +4 -0
- package/dist-lib/lib/core/migrations/chat-chunks.js +47 -0
- package/dist-lib/lib/core/migrations/file-index.d.ts +1 -1
- package/dist-lib/lib/core/migrations/file-index.js +6 -2
- package/dist-lib/lib/core/migrations/index.d.ts +2 -1
- package/dist-lib/lib/core/migrations/index.js +66 -9
- package/dist-lib/lib/core/notification.js +96 -23
- package/dist-lib/lib/core/pdf/figure.d.ts +22 -0
- package/dist-lib/lib/core/pdf/figure.js +64 -0
- package/dist-lib/lib/core/pdf/rasterize.d.ts +10 -1
- package/dist-lib/lib/core/pdf/rasterize.js +72 -22
- package/dist-lib/lib/core/peer-duplex.js +57 -5
- package/dist-lib/lib/core/public-mesh.js +8 -2
- package/dist-lib/lib/core/run-requests.js +2 -3
- package/dist-lib/lib/core/senders.d.ts +7 -6
- package/dist-lib/lib/core/senders.js +23 -30
- package/dist-lib/lib/core/shared-agents.d.ts +1 -0
- package/dist-lib/lib/core/shared-agents.js +47 -19
- package/dist-lib/lib/core/sync/background.d.ts +3 -15
- package/dist-lib/lib/core/sync/background.js +25 -102
- package/dist-lib/lib/core/sync/devices.js +6 -3
- package/dist-lib/lib/core/sync/index.js +12 -2
- package/dist-lib/lib/core/sync-status.js +3 -3
- package/dist-lib/lib/core.d.ts +59 -10
- package/dist-lib/lib/core.js +706 -174
- 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/doctor/redact.js +1 -1
- package/dist-lib/lib/errors.d.ts +4 -0
- package/dist-lib/lib/errors.js +4 -0
- package/dist-lib/lib/fs-drive-bridge.d.ts +7 -0
- package/dist-lib/lib/fs-drive-bridge.js +308 -30
- package/dist-lib/lib/integrations/setup-routes.js +7 -5
- package/dist-lib/lib/knowledge-search.d.ts +1 -1
- package/dist-lib/lib/knowledge-search.js +5 -46
- package/dist-lib/lib/kv-cache-retention.d.ts +35 -0
- package/dist-lib/lib/kv-cache-retention.js +98 -0
- package/dist-lib/lib/latest-frame.d.ts +10 -0
- package/dist-lib/lib/latest-frame.js +48 -0
- package/dist-lib/lib/model-download.d.ts +6 -1
- package/dist-lib/lib/model-download.js +32 -17
- package/dist-lib/lib/oauth/resolve.js +13 -5
- package/dist-lib/lib/reconnecting-watch.js +19 -11
- package/dist-lib/lib/run-notices.d.ts +2 -0
- package/dist-lib/lib/run-notices.js +5 -0
- package/dist-lib/lib/run-replay.d.ts +13 -1
- package/dist-lib/lib/run-replay.js +58 -21
- package/dist-lib/schema/build.js +66 -57
- package/dist-lib/schema/content.js +2 -1
- package/dist-lib/schema/engine.js +37 -5
- package/dist-lib/schema/field-order.js +7 -1
- package/dist-lib/schema/indexes.d.ts +4 -0
- package/dist-lib/schema/indexes.js +18 -0
- package/dist-lib/schema/local.js +9 -2
- package/dist-lib/schema/qvac.js +112 -4
- 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 +1475 -1392
- package/dist-lib/spec/hyperschema/index.js +1475 -1392
- package/dist-lib/spec/hyperschema/schema.json +86 -1
- package/dist-lib/spec/hyperschema/types.d.ts +21 -1
- package/dist-lib/spec/local/hyperdb/messages.js +110 -54
- package/dist-lib/spec/local/hyperschema/index.js +56 -28
- package/dist-lib/spec/local/hyperschema/schema.json +55 -20
- package/dist-lib/spec/local/hyperschema/types.d.ts +8 -1
- package/dist-lib/spec/mesh/hyperdb/db.json +255 -51
- package/dist-lib/spec/mesh/hyperdb/index.js +1063 -404
- package/dist-lib/spec/mesh/hyperdb/messages.js +1647 -1214
- package/dist-lib/spec/mesh/hyperdispatch/dispatch.json +62 -56
- package/dist-lib/spec/mesh/hyperdispatch/index.js +156 -139
- package/dist-lib/spec/mesh/hyperdispatch/messages.js +787 -629
- package/dist-lib/spec/mesh/hyperschema/index.js +787 -629
- package/dist-lib/spec/mesh/hyperschema/schema.json +283 -174
- package/dist-lib/spec/mesh/hyperschema/types.d.ts +29 -1
- package/package.json +23 -17
- package/worker/assistant-sidecar.mjs +3 -0
- package/dist-lib/lib/core/files/processing/settle.d.ts +0 -13
- package/dist-lib/lib/core/files/processing/settle.js +0 -86
- package/dist-lib/lib/core/migrations/device-indexes.d.ts +0 -2
- package/dist-lib/lib/core/migrations/device-indexes.js +0 -7
|
@@ -2,15 +2,17 @@ import b4a from 'b4a';
|
|
|
2
2
|
import { ToolSets } from '@qvac/harness';
|
|
3
3
|
import { AbortedError } from '@qvac/harness/race-abort';
|
|
4
4
|
import * as z from 'zod';
|
|
5
|
-
import { isRecord } from '../guards.js';
|
|
5
|
+
import { errorMessage, isRecord } from '../guards.js';
|
|
6
6
|
import { historyFromChunks, listHistoryChunks, replayFromChunks, runPromptView, sentTurn } from './history.js';
|
|
7
7
|
import { nameSenders, restoreSentContent } from './message.js';
|
|
8
|
+
import { PdfBoundsSchema } from './pdf-pages.js';
|
|
8
9
|
import { isProbeRound, PROBE_KINDS } from '../probe-rounds.js';
|
|
9
10
|
const message = z.custom((value) => isRecord(value) && typeof value.role === 'string' && typeof value.content === 'string');
|
|
10
11
|
const record = () => z.custom((value) => isRecord(value));
|
|
11
12
|
const mediaRef = z.object({
|
|
12
13
|
id: z.string(),
|
|
13
14
|
page: z.number().optional(),
|
|
15
|
+
clip: PdfBoundsSchema.optional(),
|
|
14
16
|
frame: z.number().optional(),
|
|
15
17
|
frames: z.number().optional()
|
|
16
18
|
});
|
|
@@ -40,6 +42,7 @@ export class OwnerRounds {
|
|
|
40
42
|
_contextSent = false;
|
|
41
43
|
_rounds = 0;
|
|
42
44
|
_retakes = 0;
|
|
45
|
+
_takers = new Map();
|
|
43
46
|
constructor(opts) {
|
|
44
47
|
this._opts = opts;
|
|
45
48
|
this.port = (request, io) => this._round(request, io);
|
|
@@ -47,6 +50,12 @@ export class OwnerRounds {
|
|
|
47
50
|
get rounds() {
|
|
48
51
|
return this._rounds;
|
|
49
52
|
}
|
|
53
|
+
ranHere(round) {
|
|
54
|
+
if (!this._rounds)
|
|
55
|
+
return true;
|
|
56
|
+
const taker = round === undefined ? undefined : this._takers.get(round);
|
|
57
|
+
return !!taker && b4a.equals(taker, this._opts.deviceId);
|
|
58
|
+
}
|
|
50
59
|
retook() {
|
|
51
60
|
if (!this._retakes)
|
|
52
61
|
return false;
|
|
@@ -80,6 +89,18 @@ export class OwnerRounds {
|
|
|
80
89
|
const agentId = (await this._switchedTo()) ?? this._opts.agentId;
|
|
81
90
|
const id = await this._ask(sent, agentId);
|
|
82
91
|
this._rounds++;
|
|
92
|
+
const { round, modelId, history, tools, generationParams, responseFormat, toolDialect } = request;
|
|
93
|
+
this._opts.inspect?.({
|
|
94
|
+
round,
|
|
95
|
+
modelId,
|
|
96
|
+
messages: history,
|
|
97
|
+
tools,
|
|
98
|
+
generationParams,
|
|
99
|
+
responseFormat,
|
|
100
|
+
toolDialect,
|
|
101
|
+
cacheKey: request.cacheKey,
|
|
102
|
+
promptPrefix: request.promptPrefix
|
|
103
|
+
});
|
|
83
104
|
return this._follow(sent, { id, agentId }, io);
|
|
84
105
|
}
|
|
85
106
|
async probe({ kind, prompt, modelId, responseFormat, signal }) {
|
|
@@ -87,28 +108,34 @@ export class OwnerRounds {
|
|
|
87
108
|
throw new AbortedError();
|
|
88
109
|
const { engine, chatId, runId, deviceId } = this._opts;
|
|
89
110
|
const agentId = (await this._switchedTo()) ?? this._opts.agentId;
|
|
111
|
+
const messages = [{ role: 'user', content: prompt }];
|
|
112
|
+
const options = {
|
|
113
|
+
kind,
|
|
114
|
+
attempt: 0,
|
|
115
|
+
modelId: await this._modelOf(agentId, modelId),
|
|
116
|
+
continuationNudge: '',
|
|
117
|
+
deliveredNudge: '',
|
|
118
|
+
generationParams: { reasoning_budget: 0 },
|
|
119
|
+
responseFormat
|
|
120
|
+
};
|
|
90
121
|
const { id } = await engine.appendChunk({
|
|
91
122
|
chatId,
|
|
92
123
|
runId,
|
|
93
124
|
type: 'model-request',
|
|
94
125
|
originDeviceId: deviceId,
|
|
95
|
-
modelRequest: {
|
|
96
|
-
round: 0,
|
|
97
|
-
agents: [agentId],
|
|
98
|
-
toolTurns: [{ role: 'user', content: prompt }],
|
|
99
|
-
options: {
|
|
100
|
-
kind,
|
|
101
|
-
attempt: 0,
|
|
102
|
-
modelId: await this._modelOf(agentId, modelId),
|
|
103
|
-
continuationNudge: '',
|
|
104
|
-
deliveredNudge: '',
|
|
105
|
-
generationParams: { reasoning_budget: 0 },
|
|
106
|
-
responseFormat
|
|
107
|
-
},
|
|
108
|
-
state: 'open'
|
|
109
|
-
}
|
|
126
|
+
modelRequest: { round: 0, agents: [agentId], toolTurns: messages, options, state: 'open' }
|
|
110
127
|
});
|
|
111
|
-
|
|
128
|
+
const { modelId: asked, generationParams } = options;
|
|
129
|
+
const call = { kind, modelId: asked, messages, generationParams, responseFormat };
|
|
130
|
+
try {
|
|
131
|
+
const { contentText } = await this._probed({ id, agentId }, signal);
|
|
132
|
+
this._opts.inspect?.({ ...call, outcome: 'completed', result: contentText });
|
|
133
|
+
return contentText;
|
|
134
|
+
}
|
|
135
|
+
catch (err) {
|
|
136
|
+
this._opts.inspect?.({ ...call, outcome: 'failed', reason: errorMessage(err) });
|
|
137
|
+
throw err;
|
|
138
|
+
}
|
|
112
139
|
}
|
|
113
140
|
async _probed(asked, signal) {
|
|
114
141
|
const { engine, chatId, from } = this._opts;
|
|
@@ -150,7 +177,7 @@ export class OwnerRounds {
|
|
|
150
177
|
reachable = !!agent.hostReachable;
|
|
151
178
|
const host = round()?.hostDeviceId;
|
|
152
179
|
const moved = !!host && !b4a.equals(agent.providerDeviceId, host);
|
|
153
|
-
if (moved || (was && !reachable
|
|
180
|
+
if (moved || (was && !reachable)) {
|
|
154
181
|
await this._opts.engine.cancelModelRequest({ chunkId: asked.id }).catch(noop);
|
|
155
182
|
return;
|
|
156
183
|
}
|
|
@@ -277,6 +304,7 @@ export class OwnerRounds {
|
|
|
277
304
|
const round = output.apply(frame);
|
|
278
305
|
const result = at.moving ? undefined : roundEnd(round);
|
|
279
306
|
if (result) {
|
|
307
|
+
this._takers.set(sent.round, round?.takenBy ?? null);
|
|
280
308
|
return result;
|
|
281
309
|
}
|
|
282
310
|
const switched = output.switchedTo(from);
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
-
export declare const MIN_PDF_PAGE_IMAGES = 2;
|
|
2
1
|
export declare const MAX_PDF_PAGE_IMAGES = 32;
|
|
3
|
-
export declare
|
|
2
|
+
export declare const CHARS_PER_TOKEN = 4;
|
|
3
|
+
export interface PdfReading {
|
|
4
|
+
readonly ctxSize: number;
|
|
5
|
+
readonly cacheTokens?: number;
|
|
6
|
+
}
|
|
7
|
+
export interface PdfRoom {
|
|
8
|
+
tokens: number;
|
|
9
|
+
images: number;
|
|
10
|
+
}
|
|
11
|
+
export declare function pdfImageRoom({ ctxSize, cacheTokens }: PdfReading, textChars: number): PdfRoom;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const PAGE_TOKENS = frameTokens({
|
|
4
|
-
width: MAX_IMAGE_WIDTH,
|
|
5
|
-
height: Math.ceil(MAX_IMAGE_WIDTH * Math.SQRT2)
|
|
6
|
-
});
|
|
7
|
-
const PDF_SHARE = 0.5;
|
|
8
|
-
export const MIN_PDF_PAGE_IMAGES = 2;
|
|
1
|
+
const DOCUMENT_SHARE = 0.5;
|
|
2
|
+
const ANSWER_SHARE = 0.25;
|
|
9
3
|
export const MAX_PDF_PAGE_IMAGES = 32;
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
export const CHARS_PER_TOKEN = 4;
|
|
5
|
+
export function pdfImageRoom({ ctxSize, cacheTokens }, textChars) {
|
|
6
|
+
const share = ctxSize * DOCUMENT_SHARE;
|
|
7
|
+
const free = cacheTokens === undefined ? share : Math.min(share, ctxSize * (1 - ANSWER_SHARE) - cacheTokens);
|
|
8
|
+
return {
|
|
9
|
+
tokens: Math.max(0, Math.floor(free - textChars / CHARS_PER_TOKEN)),
|
|
10
|
+
images: MAX_PDF_PAGE_IMAGES
|
|
11
|
+
};
|
|
13
12
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
import type { PdfBounds } from '../core/pdf/figure.ts';
|
|
3
|
+
import type { PdfDoc } from '../core/pdf/rasterize.ts';
|
|
4
|
+
import type { PdfRoom } from './pdf-budget.ts';
|
|
5
|
+
export declare const PDF_PAGES_MIME = "application/vnd.qvac.pdf-pages";
|
|
6
|
+
export interface PdfShot {
|
|
7
|
+
readonly page: number;
|
|
8
|
+
readonly clip?: PdfBounds;
|
|
9
|
+
readonly label: string;
|
|
10
|
+
}
|
|
11
|
+
export interface PdfSelection {
|
|
12
|
+
readonly pageCount: number;
|
|
13
|
+
readonly shots: ReadonlyArray<PdfShot>;
|
|
14
|
+
readonly cutAt?: number;
|
|
15
|
+
}
|
|
16
|
+
export declare const PdfBoundsSchema: z.ZodObject<{
|
|
17
|
+
x: z.ZodNumber;
|
|
18
|
+
y: z.ZodNumber;
|
|
19
|
+
width: z.ZodNumber;
|
|
20
|
+
height: z.ZodNumber;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
export declare function pdfSelectionFileName(pdfFileName: string): string;
|
|
23
|
+
export declare function packPdfSelection(selection: PdfSelection): Uint8Array;
|
|
24
|
+
export declare function parsePdfSelection(bytes: Uint8Array): PdfSelection;
|
|
25
|
+
export declare function selectPdfPages(doc: PdfDoc, room: PdfRoom): Promise<PdfSelection>;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import b4a from 'b4a';
|
|
2
|
+
import * as z from 'zod';
|
|
3
|
+
import { frameTokens } from './video-budget.js';
|
|
4
|
+
export const PDF_PAGES_MIME = 'application/vnd.qvac.pdf-pages';
|
|
5
|
+
export const PdfBoundsSchema = z.object({
|
|
6
|
+
x: z.number(),
|
|
7
|
+
y: z.number(),
|
|
8
|
+
width: z.number().positive(),
|
|
9
|
+
height: z.number().positive()
|
|
10
|
+
});
|
|
11
|
+
const SelectionSchema = z.object({
|
|
12
|
+
version: z.literal(1),
|
|
13
|
+
pageCount: z.number().int().nonnegative(),
|
|
14
|
+
shots: z.array(z.object({
|
|
15
|
+
page: z.number().int().nonnegative(),
|
|
16
|
+
clip: PdfBoundsSchema.optional(),
|
|
17
|
+
label: z.string()
|
|
18
|
+
})),
|
|
19
|
+
cutAt: z.number().int().nonnegative().optional()
|
|
20
|
+
});
|
|
21
|
+
export function pdfSelectionFileName(pdfFileName) {
|
|
22
|
+
return `${pdfFileName}.pages`;
|
|
23
|
+
}
|
|
24
|
+
export function packPdfSelection(selection) {
|
|
25
|
+
return b4a.from(JSON.stringify({ version: 1, ...selection }));
|
|
26
|
+
}
|
|
27
|
+
export function parsePdfSelection(bytes) {
|
|
28
|
+
const { version: _, ...selection } = SelectionSchema.parse(JSON.parse(b4a.toString(bytes)));
|
|
29
|
+
return selection;
|
|
30
|
+
}
|
|
31
|
+
function shotLabel(page, names = []) {
|
|
32
|
+
return names.length ? `page ${page + 1} (${names.join(', ')})` : `page ${page + 1}`;
|
|
33
|
+
}
|
|
34
|
+
export async function selectPdfPages(doc, room) {
|
|
35
|
+
const pageCount = doc.pageCount();
|
|
36
|
+
const shots = [];
|
|
37
|
+
let cutAt;
|
|
38
|
+
for (let page = 0; page < pageCount; page++) {
|
|
39
|
+
let shot;
|
|
40
|
+
try {
|
|
41
|
+
shot = await pictured(doc, page);
|
|
42
|
+
}
|
|
43
|
+
catch {
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
if (!shot) {
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
if (room.images <= 0) {
|
|
50
|
+
return { pageCount, shots, cutAt: cutAt ?? page };
|
|
51
|
+
}
|
|
52
|
+
const cost = frameTokens(doc.renderSize(page, shot.clip));
|
|
53
|
+
if (cost > room.tokens) {
|
|
54
|
+
cutAt ??= page;
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
room.tokens -= cost;
|
|
58
|
+
room.images--;
|
|
59
|
+
shots.push(shot);
|
|
60
|
+
}
|
|
61
|
+
return cutAt === undefined ? { pageCount, shots } : { pageCount, shots, cutAt };
|
|
62
|
+
}
|
|
63
|
+
async function pictured(doc, page) {
|
|
64
|
+
const flags = doc.pageFlags(page);
|
|
65
|
+
if (flags.hasText && !flags.hasImage) {
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
if (!flags.hasText && !flags.hasImage && (await doc.blank(page))) {
|
|
69
|
+
return null;
|
|
70
|
+
}
|
|
71
|
+
const figure = flags.hasText ? doc.figure(page) : null;
|
|
72
|
+
return figure
|
|
73
|
+
? { page, clip: figure.clip, label: shotLabel(page, figure.names) }
|
|
74
|
+
: { page, label: shotLabel(page) };
|
|
75
|
+
}
|
|
@@ -52,8 +52,10 @@ export class RoundHost {
|
|
|
52
52
|
const round = rounds.find((chunk) => chunk.id === id);
|
|
53
53
|
const takenBy = round?.modelRequest?.takenBy;
|
|
54
54
|
const stale = (round?.updatedAt ?? 0) < serving.takenAt;
|
|
55
|
-
const
|
|
56
|
-
const ours = takenBy
|
|
55
|
+
const state = round?.modelRequest?.state;
|
|
56
|
+
const ours = takenBy
|
|
57
|
+
? state === 'taken' && b4a.equals(takenBy, me)
|
|
58
|
+
: state === 'open' && stale;
|
|
57
59
|
if (serving.taken && !ours) {
|
|
58
60
|
serving.controller.abort(LEFT);
|
|
59
61
|
this._serving.delete(id);
|
|
@@ -164,10 +166,10 @@ export class RoundHost {
|
|
|
164
166
|
await engine.settleModelRequest({ chunkId: round.id, state: 'done', result });
|
|
165
167
|
}
|
|
166
168
|
catch (err) {
|
|
169
|
+
await writing.catch(noop);
|
|
167
170
|
if (signal.aborted) {
|
|
168
171
|
return;
|
|
169
172
|
}
|
|
170
|
-
await writing.catch(noop);
|
|
171
173
|
await transcript.flush().catch(noop);
|
|
172
174
|
await engine.settleModelRequest({
|
|
173
175
|
chunkId: round.id,
|
|
@@ -9,6 +9,7 @@ export interface AssistantClientOptions extends ClientOptions {
|
|
|
9
9
|
device?: DeviceMetadata;
|
|
10
10
|
meshSeed?: Buffer;
|
|
11
11
|
meshKey?: Buffer;
|
|
12
|
+
blindPeerKeys?: ReadonlyArray<Buffer>;
|
|
12
13
|
bootstrapNodes?: ReadonlyArray<{
|
|
13
14
|
host: string;
|
|
14
15
|
port: number;
|
|
@@ -17,7 +18,7 @@ export interface AssistantClientOptions extends ClientOptions {
|
|
|
17
18
|
}
|
|
18
19
|
export declare class AssistantClient extends Client {
|
|
19
20
|
private readonly _inline;
|
|
20
|
-
constructor({ sidecar: spawnSidecar, storagePath, device, meshSeed, meshKey, bootstrapNodes, entry, ...engineOptions }: AssistantClientOptions);
|
|
21
|
+
constructor({ sidecar: spawnSidecar, storagePath, device, meshSeed, meshKey, bootstrapNodes, blindPeerKeys, entry, ...engineOptions }: AssistantClientOptions);
|
|
21
22
|
get core(): Core | null;
|
|
22
23
|
_close(): Promise<void>;
|
|
23
24
|
}
|
|
@@ -4,7 +4,7 @@ import b4a from 'b4a';
|
|
|
4
4
|
import { CoreError } from './errors.js';
|
|
5
5
|
export class AssistantClient extends Client {
|
|
6
6
|
_inline;
|
|
7
|
-
constructor({ sidecar: spawnSidecar = true, storagePath, device, meshSeed, meshKey, bootstrapNodes, entry, ...engineOptions }) {
|
|
7
|
+
constructor({ sidecar: spawnSidecar = true, storagePath, device, meshSeed, meshKey, bootstrapNodes, blindPeerKeys, entry, ...engineOptions }) {
|
|
8
8
|
const inline = { core: null };
|
|
9
9
|
if (spawnSidecar && !entry) {
|
|
10
10
|
throw new CoreError('SIDECAR_ENTRY_MISSING');
|
|
@@ -17,14 +17,24 @@ export class AssistantClient extends Client {
|
|
|
17
17
|
device?.recommendedModelName ?? '',
|
|
18
18
|
meshSeed ? b4a.toHex(meshSeed) : '',
|
|
19
19
|
meshKey ? b4a.toHex(meshKey) : '',
|
|
20
|
-
(bootstrapNodes ?? []).map((node) => `${node.host}:${node.port}`).join(',')
|
|
20
|
+
(bootstrapNodes ?? []).map((node) => `${node.host}:${node.port}`).join(','),
|
|
21
|
+
(blindPeerKeys ?? []).map((key) => b4a.toHex(key)).join(',')
|
|
21
22
|
];
|
|
22
23
|
const transport = sidecarEntry
|
|
23
24
|
? async () => {
|
|
24
25
|
const { default: sidecarRunner } = await import('bare-supervisor/runner/sidecar');
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
|
|
26
|
+
const logger = engineOptions.logger ?? null;
|
|
27
|
+
const { ipc, exit } = sidecarRunner(sidecarEntry, args, logger);
|
|
28
|
+
let firstError = null;
|
|
29
|
+
ipc.on('error', (err) => {
|
|
30
|
+
firstError ??= err;
|
|
31
|
+
logger?.warn('assistant', 'the sidecar wire failed', err);
|
|
32
|
+
});
|
|
33
|
+
const died = exit.then((code) => sidecarDeath(code, firstError));
|
|
34
|
+
const failure = await Promise.race([
|
|
35
|
+
ipc.ready.then(() => null, () => died),
|
|
36
|
+
died
|
|
37
|
+
]);
|
|
28
38
|
if (failure) {
|
|
29
39
|
throw failure;
|
|
30
40
|
}
|
|
@@ -39,7 +49,8 @@ export class AssistantClient extends Client {
|
|
|
39
49
|
device,
|
|
40
50
|
meshSeed,
|
|
41
51
|
meshKey,
|
|
42
|
-
bootstrapNodes
|
|
52
|
+
bootstrapNodes,
|
|
53
|
+
blindPeerKeys
|
|
43
54
|
});
|
|
44
55
|
await inline.core.ready();
|
|
45
56
|
return clientStream;
|
|
@@ -55,3 +66,10 @@ export class AssistantClient extends Client {
|
|
|
55
66
|
await this._inline.core?.close();
|
|
56
67
|
}
|
|
57
68
|
}
|
|
69
|
+
function sidecarDeath(code, err) {
|
|
70
|
+
if (!err) {
|
|
71
|
+
return new CoreError('SIDECAR_EXITED', [code]);
|
|
72
|
+
}
|
|
73
|
+
const reason = err instanceof Error ? err : new Error(String(err));
|
|
74
|
+
return new CoreError('SIDECAR_BOOT_FAILED', [reason.message], { cause: reason });
|
|
75
|
+
}
|
|
@@ -26,6 +26,7 @@ export interface AssistantTreeOptions {
|
|
|
26
26
|
runReplayDir?: string;
|
|
27
27
|
imageCacheMaxBytes?: number;
|
|
28
28
|
imageCacheMaxAgeMs?: number;
|
|
29
|
+
kvCacheRetentionMs?: number;
|
|
29
30
|
embedder?: EmbedderFactory;
|
|
30
31
|
extractors?: RagExtractors;
|
|
31
32
|
onHarness?: OnHarness;
|
|
@@ -43,6 +44,7 @@ export interface AssistantChildOptions {
|
|
|
43
44
|
runReplayDir?: string;
|
|
44
45
|
imageCacheMaxBytes?: number;
|
|
45
46
|
imageCacheMaxAgeMs?: number;
|
|
47
|
+
kvCacheRetentionMs?: number;
|
|
46
48
|
embedder?: EmbedderFactory;
|
|
47
49
|
extractors?: RagExtractors;
|
|
48
50
|
onHarness?: OnHarness;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Supervisor, {} from 'bare-supervisor';
|
|
2
|
-
import { harnessClearKvCache, harnessListModels, harnessPreviewModelSource, harnessSkillCatalog, harnessSkillManagement, harnessDetectLanguage, harnessSpeak, harnessSpeakStream, harnessTools, harnessTranscribe, QvacAssistant } from './assistant.js';
|
|
2
|
+
import { harnessClearKvCache, harnessListModels, harnessPreviewModelSource, harnessSkillCatalog, harnessSkillManagement, harnessDetectLanguage, harnessSpeak, harnessSpeakStream, harnessTools, harnessTranscribe, QvacAssistant, syncedSkills } from './assistant.js';
|
|
3
3
|
import { Client } from './client.js';
|
|
4
4
|
import { readFakeModels, watchFakeModels, withFakeModels } from './assistant/fake-models.js';
|
|
5
5
|
import { startCustomModelPusher } from './custom-model-pusher.js';
|
|
@@ -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, embedder, extractors, onHarness, platform, preloadCurrentAgentModel, fakeModels = false } = opts;
|
|
11
|
+
const { core, harness, logger = null, imageCacheDir, inferenceCallsDir, runReplayDir, 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) {
|
|
@@ -77,6 +77,7 @@ export function assistantTree(opts) {
|
|
|
77
77
|
runReplayDir,
|
|
78
78
|
imageCacheMaxBytes,
|
|
79
79
|
imageCacheMaxAgeMs,
|
|
80
|
+
kvCacheRetentionMs,
|
|
80
81
|
platform,
|
|
81
82
|
preloadCurrentAgentModel,
|
|
82
83
|
drives: core.fsDrives ?? undefined
|
|
@@ -94,7 +95,7 @@ export function assistantTree(opts) {
|
|
|
94
95
|
offModelCatalogWatch = core.registerModelCatalogWatch(() => assistant.modelCatalogWatch());
|
|
95
96
|
offCustomModels = startCustomModelPusher(harness, core.local, {
|
|
96
97
|
logger,
|
|
97
|
-
onPushed: () => assistant.
|
|
98
|
+
onPushed: () => assistant.cachedModelsChanged()
|
|
98
99
|
});
|
|
99
100
|
offModelIdle = startModelIdlePusher(harness, core.local, logger);
|
|
100
101
|
modelMemoryCap = assistant.mobileClass
|
|
@@ -121,9 +122,10 @@ export function assistantTree(opts) {
|
|
|
121
122
|
unload: (name) => assistant.unloadModel(name)
|
|
122
123
|
});
|
|
123
124
|
offModelUsers = core.registerModelUsers((name) => assistant.modelUsers(name));
|
|
125
|
+
const skills = syncedSkills((agentId, modelName, options) => assistant.skills(agentId, modelName, options), () => offHarness?.sync?.());
|
|
124
126
|
offSkills = core.registerSkills(async (agentId, modelName, options) => {
|
|
125
127
|
await offHarness?.ready?.();
|
|
126
|
-
return
|
|
128
|
+
return skills(agentId, modelName, options);
|
|
127
129
|
});
|
|
128
130
|
const transcribe = harnessTranscribe(harness);
|
|
129
131
|
offTranscribe = core.registerTranscribe(async (request) => {
|
|
@@ -237,7 +239,7 @@ export function assistantTree(opts) {
|
|
|
237
239
|
return sup;
|
|
238
240
|
}
|
|
239
241
|
export function assistantChild(opts) {
|
|
240
|
-
const { harness, core = 'core', logger = null, imageCacheDir, inferenceCallsDir, runReplayDir, imageCacheMaxBytes, imageCacheMaxAgeMs, embedder, extractors, onHarness, preloadCurrentAgentModel, fakeModels, ...spec } = opts;
|
|
242
|
+
const { harness, core = 'core', logger = null, imageCacheDir, inferenceCallsDir, runReplayDir, imageCacheMaxBytes, imageCacheMaxAgeMs, kvCacheRetentionMs, embedder, extractors, onHarness, preloadCurrentAgentModel, fakeModels, ...spec } = opts;
|
|
241
243
|
return {
|
|
242
244
|
...spec,
|
|
243
245
|
deps: [core],
|
|
@@ -251,6 +253,7 @@ export function assistantChild(opts) {
|
|
|
251
253
|
runReplayDir,
|
|
252
254
|
imageCacheMaxBytes,
|
|
253
255
|
imageCacheMaxAgeMs,
|
|
256
|
+
kvCacheRetentionMs,
|
|
254
257
|
embedder,
|
|
255
258
|
extractors,
|
|
256
259
|
onHarness,
|
|
@@ -11,7 +11,7 @@ import type { LoggerInterface } from '@qvac/logging';
|
|
|
11
11
|
import { type DeleteModelSummary, type Harness, type ListModelsOptions, type ModelInfo, type ToolCatalogEntry } from './assistant/harness.ts';
|
|
12
12
|
import type { Skill } from './assistant/skill-encode.ts';
|
|
13
13
|
import { type CompactOptions, type CompactResult } from './assistant/history.ts';
|
|
14
|
-
export { harnessClearKvCache, harnessDeleteModel, harnessListModels, harnessPreviewModelSource, harnessSkillCatalog, harnessSkillManagement, harnessDetectLanguage, harnessSpeak, harnessSpeakStream, harnessTools, harnessTranscribe, type DeleteModelSummary, type Harness, type HarnessInfo, type ListModelsOptions, type ModelInfo, type ModelType, type ToolCatalogEntry } from './assistant/harness.ts';
|
|
14
|
+
export { harnessClearKvCache, harnessDeleteModel, harnessListModels, harnessPreviewModelSource, harnessSkillCatalog, harnessSkillManagement, syncedSkills, harnessDetectLanguage, harnessSpeak, harnessSpeakStream, harnessTools, harnessTranscribe, type DeleteModelSummary, type Harness, type HarnessInfo, type ListModelsOptions, type ModelInfo, type ModelType, type ToolCatalogEntry } from './assistant/harness.ts';
|
|
15
15
|
export { type Skill } from './assistant/skill-encode.ts';
|
|
16
16
|
export { annotateUnreadableImages, unheardAudioNotice, unreadableImagesNotice, DOCUMENT_ONLY_USER_PROMPT, IMAGE_AND_DOCUMENT_USER_PROMPT, IMAGE_ONLY_USER_PROMPT, nameSenders, restoreSentContent } from './assistant/message.ts';
|
|
17
17
|
export { historyFromChunks, listHistoryChunks, staleToolRunIds, type CompactOptions, type CompactResult, type CompactionTrigger, type RunAt, type StaleToolRuns } from './assistant/history.ts';
|
|
@@ -27,6 +27,7 @@ export interface AssistantOptions {
|
|
|
27
27
|
runReplayDir?: string;
|
|
28
28
|
imageCacheMaxBytes?: number;
|
|
29
29
|
imageCacheMaxAgeMs?: number;
|
|
30
|
+
kvCacheRetentionMs?: number;
|
|
30
31
|
downloadRetryMs?: number;
|
|
31
32
|
platform?: string;
|
|
32
33
|
preloadCurrentAgentModel?: boolean;
|
|
@@ -55,6 +56,7 @@ export declare class QvacAssistant extends ReadyResource {
|
|
|
55
56
|
private readonly _runIdleTimeoutMs;
|
|
56
57
|
private readonly _modelReloadDelayMs;
|
|
57
58
|
private readonly _reloads;
|
|
59
|
+
private readonly _releases;
|
|
58
60
|
private readonly _pdfRasterizer;
|
|
59
61
|
private readonly _warmAbort;
|
|
60
62
|
private readonly _unloading;
|
|
@@ -98,19 +100,22 @@ export declare class QvacAssistant extends ReadyResource {
|
|
|
98
100
|
private readonly _inferenceCalls;
|
|
99
101
|
private readonly _runReplay;
|
|
100
102
|
private readonly _roundHost;
|
|
103
|
+
private readonly _kvRetention;
|
|
101
104
|
private readonly _lifecycle;
|
|
102
105
|
private readonly _suggesting;
|
|
103
106
|
private readonly _audioTranscripts;
|
|
104
107
|
private readonly _videoProbes;
|
|
105
|
-
private readonly
|
|
108
|
+
private readonly _pdfSelections;
|
|
106
109
|
private readonly _mediaRefs;
|
|
107
110
|
private readonly _chats;
|
|
111
|
+
private readonly _intake;
|
|
108
112
|
private readonly _runImageCacheNames;
|
|
109
113
|
private readonly _reconciledCompactions;
|
|
114
|
+
private readonly _knowledgeCaps;
|
|
110
115
|
private readonly _modelCatalog;
|
|
111
116
|
private readonly _onHarnessStatus;
|
|
112
117
|
private readonly _onModelCatalogEvent;
|
|
113
|
-
constructor(engine: Capabilities, harness: Harness, { logger, imageCacheDir, inferenceCallsDir, runReplayDir, imageCacheMaxBytes, imageCacheMaxAgeMs, downloadRetryMs, platform, preloadCurrentAgentModel, drives, blobReadTimeoutMs, runIdleTimeoutMs, modelReloadDelayMs, pdfRasterizer: pdfRasterizerOption }?: AssistantOptions);
|
|
118
|
+
constructor(engine: Capabilities, harness: Harness, { logger, imageCacheDir, inferenceCallsDir, runReplayDir, imageCacheMaxBytes, imageCacheMaxAgeMs, kvCacheRetentionMs, downloadRetryMs, platform, preloadCurrentAgentModel, drives, blobReadTimeoutMs, runIdleTimeoutMs, modelReloadDelayMs, pdfRasterizer: pdfRasterizerOption }?: AssistantOptions);
|
|
114
119
|
private _requireDeviceId;
|
|
115
120
|
_open(): Promise<void>;
|
|
116
121
|
private _triggerModelWarm;
|
|
@@ -152,6 +157,8 @@ export declare class QvacAssistant extends ReadyResource {
|
|
|
152
157
|
private _isCached;
|
|
153
158
|
private _scheduleModelReload;
|
|
154
159
|
private _reloadLoadedModel;
|
|
160
|
+
private _scheduleModelRelease;
|
|
161
|
+
private _releaseUnusedModel;
|
|
155
162
|
private _cancelModelReloads;
|
|
156
163
|
private _agentRunning;
|
|
157
164
|
unloadModel(name: string): Promise<AssistantUnloadModelResponse>;
|
|
@@ -169,14 +176,17 @@ export declare class QvacAssistant extends ReadyResource {
|
|
|
169
176
|
private _supervisedWatch;
|
|
170
177
|
private _reclaimDeletedChats;
|
|
171
178
|
private _dropServedKvCache;
|
|
179
|
+
private _sweepIdleChatCaches;
|
|
172
180
|
private _dropDeletedChat;
|
|
173
181
|
private _followAgentEdits;
|
|
174
182
|
private _reclaimAgentChatCaches;
|
|
175
183
|
private _reconcileCompaction;
|
|
176
184
|
deleteChatKvCache(chatId: string): Promise<AssistantKvCacheDeletionResponse>;
|
|
185
|
+
private _reclaimChatKvCache;
|
|
177
186
|
clearKvCache(): Promise<AssistantKvCacheDeletionResponse>;
|
|
178
187
|
private _clearPreReplayCaches;
|
|
179
188
|
private _inspectCall;
|
|
189
|
+
private _inspectRound;
|
|
180
190
|
private _inspectSent;
|
|
181
191
|
private _sentRuns;
|
|
182
192
|
private _recordSentRun;
|
|
@@ -192,6 +202,8 @@ export declare class QvacAssistant extends ReadyResource {
|
|
|
192
202
|
private _stopMeshIntake;
|
|
193
203
|
private _pruneSeen;
|
|
194
204
|
private _dispatch;
|
|
205
|
+
private _schedule;
|
|
206
|
+
private _claim;
|
|
195
207
|
private _offerSteer;
|
|
196
208
|
private _requeue;
|
|
197
209
|
private _citeWebSources;
|
|
@@ -231,13 +243,13 @@ export declare class QvacAssistant extends ReadyResource {
|
|
|
231
243
|
private _servedPage;
|
|
232
244
|
private _hydrateImage;
|
|
233
245
|
private _hydratePdfPages;
|
|
234
|
-
private
|
|
246
|
+
private _pdfReading;
|
|
235
247
|
private _customModel;
|
|
236
|
-
private _hydrateTurnPdfs;
|
|
237
248
|
private _tryHydratePdf;
|
|
238
249
|
private _hydratePdf;
|
|
239
|
-
private
|
|
240
|
-
private
|
|
250
|
+
private _storedPdfSelection;
|
|
251
|
+
private _renderPdfShots;
|
|
252
|
+
private _storePdfSelections;
|
|
241
253
|
private _compactIfNearFull;
|
|
242
254
|
private _runCompaction;
|
|
243
255
|
private _contextReading;
|
|
@@ -259,6 +271,7 @@ export declare class QvacAssistant extends ReadyResource {
|
|
|
259
271
|
private _abortOnLoss;
|
|
260
272
|
private _runsChanged;
|
|
261
273
|
private _generating;
|
|
274
|
+
private _markPreparing;
|
|
262
275
|
idle(signal: AbortSignal): Promise<void>;
|
|
263
276
|
private _logModelStatus;
|
|
264
277
|
private _modelHolder;
|