@qvac/core 0.3.4 → 0.4.0
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/README.md +19 -17
- package/dist-lib/lib/api/agents.d.ts +3 -3
- package/dist-lib/lib/api/agents.js +31 -20
- package/dist-lib/lib/api/approval-rules.d.ts +2 -2
- package/dist-lib/lib/api/approval-rules.js +2 -2
- package/dist-lib/lib/api/attachments.d.ts +2 -2
- package/dist-lib/lib/api/attachments.js +14 -25
- package/dist-lib/lib/api/chat-groups.d.ts +2 -2
- package/dist-lib/lib/api/chat-groups.js +9 -9
- package/dist-lib/lib/api/chat.d.ts +4 -2
- package/dist-lib/lib/api/chat.js +18 -18
- package/dist-lib/lib/api/chunks.d.ts +2 -2
- package/dist-lib/lib/api/chunks.js +27 -36
- package/dist-lib/lib/api/current-mesh.d.ts +7 -15
- package/dist-lib/lib/api/current-mesh.js +7 -22
- package/dist-lib/lib/api/devices.d.ts +4 -3
- package/dist-lib/lib/api/devices.js +18 -18
- package/dist-lib/lib/api/execution.d.ts +2 -2
- package/dist-lib/lib/api/execution.js +6 -6
- package/dist-lib/lib/api/files.d.ts +2 -2
- package/dist-lib/lib/api/files.js +4 -4
- package/dist-lib/lib/api/index.d.ts +12 -11
- package/dist-lib/lib/api/index.js +15 -13
- package/dist-lib/lib/api/inference-calls.d.ts +1 -1
- package/dist-lib/lib/api/inference-calls.js +2 -2
- package/dist-lib/lib/api/knowledge.d.ts +2 -2
- package/dist-lib/lib/api/knowledge.js +22 -11
- package/dist-lib/lib/api/local-files.d.ts +3 -0
- package/dist-lib/lib/api/local-files.js +23 -0
- package/dist-lib/lib/api/members.d.ts +6 -2
- package/dist-lib/lib/api/members.js +24 -17
- package/dist-lib/lib/api/mesh.d.ts +4 -5
- package/dist-lib/lib/api/mesh.js +7 -9
- package/dist-lib/lib/api/notifications.d.ts +2 -13
- package/dist-lib/lib/api/notifications.js +20 -52
- package/dist-lib/lib/api/rag.d.ts +2 -2
- package/dist-lib/lib/api/rag.js +4 -4
- package/dist-lib/lib/api/range.d.ts +11 -0
- package/dist-lib/lib/api/range.js +10 -0
- package/dist-lib/lib/api/sync.d.ts +2 -2
- package/dist-lib/lib/api/sync.js +3 -3
- package/dist-lib/lib/api/tool-activity.d.ts +2 -2
- package/dist-lib/lib/api/tool-activity.js +11 -10
- package/dist-lib/lib/api/tool-configs.d.ts +2 -2
- package/dist-lib/lib/api/tool-configs.js +6 -7
- package/dist-lib/lib/api/upload-frames.d.ts +9 -0
- package/dist-lib/lib/api/upload-frames.js +17 -0
- package/dist-lib/lib/api/watchable.d.ts +1 -6
- package/dist-lib/lib/api/watchable.js +4 -13
- package/dist-lib/lib/assistant/history.d.ts +3 -3
- package/dist-lib/lib/assistant-client.js +3 -2
- package/dist-lib/lib/assistant-tree.js +1 -1
- package/dist-lib/lib/assistant.d.ts +16 -14
- package/dist-lib/lib/assistant.js +166 -137
- package/dist-lib/lib/collabora/convert.js +1 -1
- package/dist-lib/lib/core/agent.d.ts +5 -7
- package/dist-lib/lib/core/agent.js +26 -6
- package/dist-lib/lib/core/archived-mesh.js +1 -0
- package/dist-lib/lib/core/chat-order.d.ts +20 -0
- package/dist-lib/lib/core/chat-order.js +96 -0
- package/dist-lib/lib/core/chat.d.ts +0 -5
- package/dist-lib/lib/core/chat.js +1 -3
- package/dist-lib/lib/core/chunk.d.ts +7 -14
- package/dist-lib/lib/core/chunk.js +17 -35
- package/dist-lib/lib/core/contract/agents.js +8 -0
- package/dist-lib/lib/core/contract/compute.d.ts +1 -1
- package/dist-lib/lib/core/contract/compute.js +1 -0
- package/dist-lib/lib/core/contract/joined-meshes.js +4 -3
- package/dist-lib/lib/core/contract/members.js +4 -3
- package/dist-lib/lib/core/contract/writers.js +5 -4
- package/dist-lib/lib/core/departures.js +5 -4
- package/dist-lib/lib/core/device-invites.js +2 -1
- package/dist-lib/lib/core/files/attachments.d.ts +8 -1
- package/dist-lib/lib/core/files/index.d.ts +4 -4
- package/dist-lib/lib/core/files/index.js +18 -8
- package/dist-lib/lib/core/files/local-index.d.ts +16 -0
- package/dist-lib/lib/core/files/local-index.js +38 -0
- package/dist-lib/lib/core/files/processing/document.js +2 -1
- package/dist-lib/lib/core/files/processing/ownership.js +6 -3
- package/dist-lib/lib/core/files/records/chunks.js +1 -0
- package/dist-lib/lib/core/files/records/reclaim.js +1 -0
- package/dist-lib/lib/core/files/records/routing.js +2 -1
- package/dist-lib/lib/core/files/store/blob.d.ts +1 -1
- package/dist-lib/lib/core/files/store/blob.js +6 -3
- package/dist-lib/lib/core/files/store/index.d.ts +1 -1
- package/dist-lib/lib/core/files/store/reference.js +4 -3
- package/dist-lib/lib/core/files/store/server.d.ts +8 -4
- package/dist-lib/lib/core/files/store/server.js +16 -12
- package/dist-lib/lib/core/files/store/sweep.js +2 -1
- package/dist-lib/lib/core/files/upload.d.ts +1 -1
- package/dist-lib/lib/core/hosted-agents.js +1 -1
- package/dist-lib/lib/core/image/cache-sweep.d.ts +1 -0
- package/dist-lib/lib/core/image/cache-sweep.js +7 -3
- package/dist-lib/lib/core/local/files.d.ts +24 -0
- package/dist-lib/lib/core/local/files.js +154 -0
- package/dist-lib/lib/core/local/index.d.ts +21 -5
- package/dist-lib/lib/core/local/index.js +75 -45
- package/dist-lib/lib/core/membership.d.ts +4 -1
- package/dist-lib/lib/core/membership.js +17 -2
- package/dist-lib/lib/core/mesh.d.ts +5 -0
- package/dist-lib/lib/core/mesh.js +11 -5
- package/dist-lib/lib/core/migrations/agent-indexes.d.ts +2 -0
- package/dist-lib/lib/core/migrations/agent-indexes.js +30 -0
- package/dist-lib/lib/core/migrations/file-index.d.ts +2 -0
- package/dist-lib/lib/core/migrations/file-index.js +27 -0
- package/dist-lib/lib/core/migrations/index.js +3 -1
- package/dist-lib/lib/core/notification.js +5 -5
- package/dist-lib/lib/core/range.d.ts +18 -0
- package/dist-lib/lib/core/range.js +17 -0
- package/dist-lib/lib/core/sync/index.js +39 -32
- package/dist-lib/lib/core/sync-status.js +3 -2
- package/dist-lib/lib/core/tool-activity.d.ts +2 -5
- package/dist-lib/lib/core/tool-activity.js +4 -7
- package/dist-lib/lib/core.d.ts +48 -29
- package/dist-lib/lib/core.js +465 -359
- package/dist-lib/lib/knowledge-search.d.ts +2 -2
- package/dist-lib/lib/kv-cache.js +1 -1
- package/dist-lib/lib/log.js +2 -3
- package/dist-lib/lib/mesh-scoped-engine.d.ts +8 -1
- package/dist-lib/lib/mesh-scoped-engine.js +62 -15
- package/dist-lib/lib/model-download.d.ts +14 -5
- package/dist-lib/lib/model-download.js +25 -17
- package/dist-lib/lib/run-transcript.d.ts +2 -2
- package/dist-lib/lib/run-transcript.js +3 -2
- package/dist-lib/lib/task.d.ts +1 -0
- package/dist-lib/lib/task.js +3 -2
- package/dist-lib/schema/build.js +4 -10
- package/dist-lib/schema/engine.js +261 -91
- package/dist-lib/schema/helpers.d.ts +4 -0
- package/dist-lib/schema/helpers.js +20 -0
- package/dist-lib/schema/local.d.ts +1 -1
- package/dist-lib/schema/local.js +70 -2
- package/dist-lib/schema/qvac.js +30 -0
- package/dist-lib/spec/bind.js +20 -3
- package/dist-lib/spec/calls.js +19 -15
- package/dist-lib/spec/capabilities.d.ts +42 -34
- package/dist-lib/spec/hrpc/hrpc.json +82 -30
- package/dist-lib/spec/hrpc/index.js +106 -57
- package/dist-lib/spec/hrpc/messages.js +5420 -5019
- package/dist-lib/spec/hyperschema/index.js +5424 -5023
- package/dist-lib/spec/hyperschema/schema.json +3202 -2666
- package/dist-lib/spec/hyperschema/types.d.ts +455 -319
- package/dist-lib/spec/local/hyperdb/db.json +119 -1
- package/dist-lib/spec/local/hyperdb/index.js +414 -2
- package/dist-lib/spec/local/hyperdb/messages.js +505 -124
- package/dist-lib/spec/local/hyperschema/index.js +203 -5
- package/dist-lib/spec/local/hyperschema/schema.json +136 -1
- package/dist-lib/spec/local/hyperschema/types.d.ts +32 -1
- package/dist-lib/spec/mesh/hyperdb/db.json +55 -3
- package/dist-lib/spec/mesh/hyperdb/index.js +119 -3
- package/dist-lib/spec/mesh/hyperdb/messages.js +244 -172
- package/dist-lib/spec/mesh/hyperdispatch/dispatch.json +7 -1
- package/dist-lib/spec/mesh/hyperdispatch/index.js +18 -1
- package/dist-lib/spec/mesh/hyperdispatch/messages.js +74 -2
- package/dist-lib/spec/mesh/hyperschema/index.js +74 -2
- package/dist-lib/spec/mesh/hyperschema/schema.json +27 -1
- package/dist-lib/spec/mesh/hyperschema/types.d.ts +9 -1
- package/package.json +6 -6
- package/tui/app.mjs +376 -151
- package/tui/boot.mjs +2 -1
- package/tui/lib/busy-words.mjs +2 -1
- package/tui/lib/knowledge-command.mjs +11 -10
- package/tui/lib/knowledge-import.mjs +7 -5
- package/tui/lib/render.mjs +4 -3
- package/tui/lib/usage.mjs +2 -1
- package/tui/main.mjs +2 -1
|
@@ -10,6 +10,7 @@ export async function syncChanges(mesh, view, from) {
|
|
|
10
10
|
let membershipMoved = false;
|
|
11
11
|
let agentsDirty = false;
|
|
12
12
|
let roomsChanged = false;
|
|
13
|
+
const orderDirty = new Set();
|
|
13
14
|
const snap = view.db.snapshot();
|
|
14
15
|
const files = new FileChanges(snap, from);
|
|
15
16
|
try {
|
|
@@ -17,38 +18,38 @@ export async function syncChanges(mesh, view, from) {
|
|
|
17
18
|
if (mesh.closing)
|
|
18
19
|
return;
|
|
19
20
|
await files.add(change);
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
21
|
+
if (changed(change, '@qvac/devices')) {
|
|
22
|
+
membershipMoved = true;
|
|
23
|
+
if (!change.value.revoked && !change.value.memberId)
|
|
24
|
+
unattestedDevice = true;
|
|
25
|
+
syncOwnMember(mesh, change.value);
|
|
26
|
+
syncDeviceRevocation(mesh, change.value);
|
|
27
|
+
}
|
|
28
|
+
else if (change.collection === '@qvac/members') {
|
|
29
|
+
membershipMoved = true;
|
|
30
|
+
}
|
|
31
|
+
else if (change.collection === '@qvac/agents') {
|
|
32
|
+
agentsDirty = true;
|
|
33
|
+
}
|
|
34
|
+
else if (changed(change, '@qvac/chats')) {
|
|
35
|
+
orderDirty.add(change.value.id);
|
|
36
|
+
syncChatTombstone(mesh, change.value);
|
|
37
|
+
}
|
|
38
|
+
else if (changed(change, '@qvac/chunk-counters')) {
|
|
39
|
+
orderDirty.add(change.value.chatId);
|
|
40
|
+
}
|
|
41
|
+
else if (changed(change, '@qvac/chunks')) {
|
|
42
|
+
syncNotificationChunk(mesh, change.value);
|
|
43
|
+
await mesh.files.syncAttachment(change.value);
|
|
44
|
+
}
|
|
45
|
+
else if (changed(change, '@qvac/knowledge')) {
|
|
46
|
+
await mesh.files.syncKnowledge(change.value);
|
|
47
|
+
}
|
|
48
|
+
else if (changed(change, '@qvac/knowledge-artifacts')) {
|
|
49
|
+
await mesh.files.syncArtifact(change.value);
|
|
50
|
+
}
|
|
51
|
+
else if (change.collection === '@qvac/joined-meshes') {
|
|
52
|
+
roomsChanged = true;
|
|
52
53
|
}
|
|
53
54
|
}
|
|
54
55
|
indexingDirty = await files.ids();
|
|
@@ -67,6 +68,12 @@ export async function syncChanges(mesh, view, from) {
|
|
|
67
68
|
}
|
|
68
69
|
if (agentsDirty)
|
|
69
70
|
mesh.emit('agents-dirty');
|
|
71
|
+
if (orderDirty.size && mesh.syncChatOrder) {
|
|
72
|
+
await mesh.syncChatOrder(orderDirty);
|
|
73
|
+
}
|
|
70
74
|
if (roomsChanged)
|
|
71
75
|
mesh.emit('rooms-dirty');
|
|
72
76
|
}
|
|
77
|
+
function changed(change, collection) {
|
|
78
|
+
return change.collection === collection;
|
|
79
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { unref } from '../unref.js';
|
|
2
|
+
import b4a from 'b4a';
|
|
2
3
|
const DEVICES = '@qvac/devices';
|
|
3
4
|
const MIN_SYNCING_MS = 1000;
|
|
4
5
|
export function createSyncActivity(mesh) {
|
|
@@ -109,7 +110,7 @@ function statusState(writerCount, syncing) {
|
|
|
109
110
|
function openWriterSessions(mesh) {
|
|
110
111
|
const sessions = new Map();
|
|
111
112
|
for (const writer of mesh.autobee.activeWriters) {
|
|
112
|
-
sessions.set(writer.core.key
|
|
113
|
+
sessions.set(b4a.toHex(writer.core.key), writer);
|
|
113
114
|
}
|
|
114
115
|
return sessions;
|
|
115
116
|
}
|
|
@@ -119,7 +120,7 @@ async function writerDeviceMap(mesh) {
|
|
|
119
120
|
try {
|
|
120
121
|
for await (const device of snap.find(DEVICES)) {
|
|
121
122
|
if (device.writerKey && !device.revoked)
|
|
122
|
-
map.set(device.writerKey
|
|
123
|
+
map.set(b4a.toHex(device.writerKey), device);
|
|
123
124
|
}
|
|
124
125
|
}
|
|
125
126
|
finally {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { QvacResourceDescriptor, QvacToolActivity, QvacToolDecision } from '../../spec/mesh/hyperschema/types.d.ts';
|
|
2
2
|
import type { Mesh } from './mesh.ts';
|
|
3
|
+
import { type Bounds } from './range.ts';
|
|
3
4
|
export interface ToolActivityInput {
|
|
4
5
|
readonly agentId: string;
|
|
5
6
|
readonly originDeviceId: Buffer;
|
|
@@ -15,8 +16,4 @@ export interface ToolActivityInput {
|
|
|
15
16
|
export declare function recordToolActivity(store: Mesh, input: ToolActivityInput): Promise<{
|
|
16
17
|
id: string;
|
|
17
18
|
}>;
|
|
18
|
-
export
|
|
19
|
-
readonly limit?: number;
|
|
20
|
-
readonly beforeSeq?: number;
|
|
21
|
-
}
|
|
22
|
-
export declare function listToolActivity(store: Mesh, agentId: string, { limit, beforeSeq }?: ListToolActivityOptions): Promise<QvacToolActivity[]>;
|
|
19
|
+
export declare function listToolActivity(store: Mesh, agentId: string, bounds?: Bounds): Promise<QvacToolActivity[]>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { capToolActivityArguments } from '../../schema/qvac.js';
|
|
2
2
|
import { randomId } from './id.js';
|
|
3
|
+
import { keyRange } from './range.js';
|
|
3
4
|
const TOOL_ACTIVITY_BY_AGENT = '@qvac/tool-activity-by-agent';
|
|
4
5
|
export async function recordToolActivity(store, input) {
|
|
5
6
|
const activity = {
|
|
@@ -19,17 +20,13 @@ export async function recordToolActivity(store, input) {
|
|
|
19
20
|
await store.dispatch('append-tool-activity', { activity });
|
|
20
21
|
return { id: activity.id };
|
|
21
22
|
}
|
|
22
|
-
export async function listToolActivity(store, agentId,
|
|
23
|
-
if (beforeSeq !== undefined && beforeSeq <= 0)
|
|
24
|
-
return [];
|
|
23
|
+
export async function listToolActivity(store, agentId, bounds = {}) {
|
|
25
24
|
const snap = store.view.snapshot();
|
|
26
25
|
try {
|
|
27
26
|
return await snap
|
|
28
27
|
.find(TOOL_ACTIVITY_BY_AGENT, {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
reverse: true,
|
|
32
|
-
limit: limit || undefined
|
|
28
|
+
...keyRange({ agentId }, 'seq', bounds),
|
|
29
|
+
reverse: true
|
|
33
30
|
})
|
|
34
31
|
.toArray();
|
|
35
32
|
}
|
package/dist-lib/lib/core.d.ts
CHANGED
|
@@ -4,8 +4,9 @@ import type { BootstrapNode } from 'hyperswarm';
|
|
|
4
4
|
import ReadyGuard from 'ready-guard';
|
|
5
5
|
import ReadyResource from 'ready-resource';
|
|
6
6
|
import type { Logger } from '../index.ts';
|
|
7
|
-
import type { AssistantArchivedMeshList, AssistantCompactChatResponse, AssistantCopySkillResponse, AssistantDeleteModelRequest, AssistantDeleteModelResponse, AssistantDeleteSkillResponse, AssistantKvCacheDeletionResponse, AssistantListModelsRequest, AssistantManagedSkillsResponse, AssistantMeshList, AssistantModelCatalogRevision, AssistantModelInfoList, AssistantOkResponse, AssistantSkillCatalogResponse, AssistantSkillFileResponse, AssistantSpeakRequest, AssistantSpeakResponse, AssistantToolCatalogResponse, AssistantTranscribeRequest, AssistantTranscribeResponse } from '../spec/index.d.ts';
|
|
7
|
+
import type { AssistantArchivedMeshList, AssistantCompactChatResponse, AssistantCopySkillResponse, AssistantDeleteModelRequest, AssistantDeleteModelResponse, AssistantDeleteSkillResponse, AssistantKvCacheDeletionResponse, AssistantListModelsRequest, AssistantManagedSkillsResponse, AssistantMeshList, AssistantAccount, AssistantModelCatalogRevision, AssistantModelInfoList, AssistantOkResponse, AssistantSkillCatalogResponse, AssistantSkillFileResponse, AssistantSpeakRequest, AssistantSpeakResponse, AssistantToolCatalogResponse, AssistantTranscribeRequest, AssistantTranscribeResponse } from '../spec/index.d.ts';
|
|
8
8
|
import type { InferenceCallSource } from './api/inference-calls.ts';
|
|
9
|
+
import { type SkillOptions } from './api/index.ts';
|
|
9
10
|
import { type BlindPeeringOpts } from './core/blind-peers.ts';
|
|
10
11
|
import { type IndexingEmbedder, type RagExtractors, type VectorIndex } from './core/files/index.ts';
|
|
11
12
|
import { type DriveHost } from './core/fs-drives.ts';
|
|
@@ -19,6 +20,15 @@ import { Mesh, type DeviceMetadata } from './core/mesh.ts';
|
|
|
19
20
|
import { type Stream, type Transport } from '@qvac/harness/rpc';
|
|
20
21
|
import { type CoreSpec } from './spec-loader.ts';
|
|
21
22
|
import { type LocalQvacState } from '../spec/index.js';
|
|
23
|
+
export interface ClearOldFilesOptions {
|
|
24
|
+
readonly olderThanMs: number;
|
|
25
|
+
readonly includeOwn?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface FileGcOptions {
|
|
28
|
+
readonly maxAgeMs: number;
|
|
29
|
+
readonly intervalMs?: number;
|
|
30
|
+
readonly includeOwn?: boolean;
|
|
31
|
+
}
|
|
22
32
|
export interface CoreOptions {
|
|
23
33
|
storagePath: string;
|
|
24
34
|
logger?: Logger | null;
|
|
@@ -33,6 +43,7 @@ export interface CoreOptions {
|
|
|
33
43
|
};
|
|
34
44
|
blindPeerKeys?: ReadonlyArray<Buffer>;
|
|
35
45
|
blindPeeringOpts?: BlindPeeringOpts;
|
|
46
|
+
fileGc?: FileGcOptions | null;
|
|
36
47
|
meshSeed?: Buffer;
|
|
37
48
|
meshKey?: Buffer;
|
|
38
49
|
additionalNodes?: ReadonlyArray<{
|
|
@@ -51,9 +62,7 @@ export interface CoreOptions {
|
|
|
51
62
|
speakStream?: (text: AsyncIterable<string>) => AsyncIterable<AssistantSpeakResponse>;
|
|
52
63
|
embedder?: IndexingEmbedder;
|
|
53
64
|
extractors?: RagExtractors;
|
|
54
|
-
skills?: (agentId?: string | null, modelName?: string | null, options?:
|
|
55
|
-
readonly refresh?: boolean;
|
|
56
|
-
}) => Promise<unknown>;
|
|
65
|
+
skills?: (agentId?: string | null, modelName?: string | null, options?: SkillOptions) => Promise<unknown>;
|
|
57
66
|
skillCatalog?: (agentId?: string | null, modelName?: string | null, options?: {
|
|
58
67
|
readonly refresh?: boolean;
|
|
59
68
|
}) => Promise<AssistantSkillCatalogResponse>;
|
|
@@ -109,6 +118,9 @@ export declare class Core extends ReadyResource {
|
|
|
109
118
|
private _localDevice;
|
|
110
119
|
private readonly _blindPeerKeys;
|
|
111
120
|
private readonly _blindPeeringOpts;
|
|
121
|
+
private readonly _fileGc;
|
|
122
|
+
private _fileGcTimer;
|
|
123
|
+
private _fileGcRun;
|
|
112
124
|
private readonly _meshSeed;
|
|
113
125
|
private readonly _meshKey;
|
|
114
126
|
private readonly _additionalNodes;
|
|
@@ -129,6 +141,7 @@ export declare class Core extends ReadyResource {
|
|
|
129
141
|
private readonly _indexingLock;
|
|
130
142
|
private readonly _meshTransitionLock;
|
|
131
143
|
private readonly _opening;
|
|
144
|
+
private readonly _retiring;
|
|
132
145
|
private _skills;
|
|
133
146
|
private _skillCatalog;
|
|
134
147
|
private _skillManagement;
|
|
@@ -141,8 +154,7 @@ export declare class Core extends ReadyResource {
|
|
|
141
154
|
private readonly _closeListeners;
|
|
142
155
|
private _closeSignaled;
|
|
143
156
|
private readonly _meshes;
|
|
144
|
-
private
|
|
145
|
-
private _activeMeshKey;
|
|
157
|
+
private _accountId;
|
|
146
158
|
private readonly _offlineBoot;
|
|
147
159
|
readonly onlineBoot: ReadyGuard;
|
|
148
160
|
private _candidateMesh;
|
|
@@ -173,12 +185,13 @@ export declare class Core extends ReadyResource {
|
|
|
173
185
|
private _kickedPending;
|
|
174
186
|
private readonly _peers;
|
|
175
187
|
private readonly _statusListeners;
|
|
188
|
+
private _listing;
|
|
176
189
|
private readonly _diagnosticsProviders;
|
|
177
190
|
private _inferenceCalls;
|
|
178
191
|
private _systemInfo;
|
|
179
192
|
private _statusError;
|
|
180
193
|
private _upgradeRequired;
|
|
181
|
-
constructor(transport: Transport, { storagePath, logger, spec, bootstrapNodes, device, app, minSupportedVersion, otaConfigCore, blindPeerKeys, blindPeeringOpts, meshSeed, meshKey, additionalNodes, listModels, deleteModel, clearKvCache, deleteChatKvCache, compactChat, modelCatalogWatch, retryModelDownload, transcribe, speak, speakStream, embedder, extractors, skills, skillCatalog, tools, hostsModelSource, vectorIndex, apiLifecycle }: CoreOptions);
|
|
194
|
+
constructor(transport: Transport, { storagePath, logger, spec, bootstrapNodes, device, app, minSupportedVersion, otaConfigCore, blindPeerKeys, blindPeeringOpts, fileGc, meshSeed, meshKey, additionalNodes, listModels, deleteModel, clearKvCache, deleteChatKvCache, compactChat, modelCatalogWatch, retryModelDownload, transcribe, speak, speakStream, embedder, extractors, skills, skillCatalog, tools, hostsModelSource, vectorIndex, apiLifecycle }: CoreOptions);
|
|
182
195
|
get devicePublicKey(): Buffer | null;
|
|
183
196
|
get fsDrives(): DriveHost | null;
|
|
184
197
|
get suspended(): boolean;
|
|
@@ -189,7 +202,6 @@ export declare class Core extends ReadyResource {
|
|
|
189
202
|
_open(): Promise<void>;
|
|
190
203
|
private _runBootOffline;
|
|
191
204
|
private _openBootMesh;
|
|
192
|
-
private _openAccountBeside;
|
|
193
205
|
private _runBootOnline;
|
|
194
206
|
private _reopenMesh;
|
|
195
207
|
get otaConfigCore(): {
|
|
@@ -240,6 +252,8 @@ export declare class Core extends ReadyResource {
|
|
|
240
252
|
private _advertiseAppVersion;
|
|
241
253
|
private _settleMembership;
|
|
242
254
|
private _renameFoundedMember;
|
|
255
|
+
private _adoptName;
|
|
256
|
+
private _followAccountName;
|
|
243
257
|
private _claimOwnMembership;
|
|
244
258
|
private _knownMember;
|
|
245
259
|
private _migrationContext;
|
|
@@ -247,12 +261,13 @@ export declare class Core extends ReadyResource {
|
|
|
247
261
|
private _ensureNotRevoked;
|
|
248
262
|
private _retireMesh;
|
|
249
263
|
private _retirePooledMesh;
|
|
264
|
+
private _retirePooled;
|
|
250
265
|
private _stopMeshServices;
|
|
251
266
|
private _stopEntryIndexing;
|
|
252
267
|
private _releaseVectorIndex;
|
|
253
268
|
private _withdrawFromMesh;
|
|
254
269
|
private _onKicked;
|
|
255
|
-
private
|
|
270
|
+
private _replaceRevokedAccount;
|
|
256
271
|
private _departRevokedMesh;
|
|
257
272
|
private _archiveMembership;
|
|
258
273
|
private _requestFreshMesh;
|
|
@@ -264,6 +279,8 @@ export declare class Core extends ReadyResource {
|
|
|
264
279
|
private _joinMesh;
|
|
265
280
|
private _runJoinMesh;
|
|
266
281
|
private _joinParkedMesh;
|
|
282
|
+
private _joinCandidate;
|
|
283
|
+
private _landJoinedMesh;
|
|
267
284
|
private _departOldAccount;
|
|
268
285
|
private _departIfPooled;
|
|
269
286
|
private _seedMemberDefaults;
|
|
@@ -271,24 +288,28 @@ export declare class Core extends ReadyResource {
|
|
|
271
288
|
private _recordJoinedRoom;
|
|
272
289
|
private _registerRoom;
|
|
273
290
|
private _releaseJoinedRoom;
|
|
274
|
-
private
|
|
291
|
+
private _writableAccount;
|
|
275
292
|
private _openCandidateMesh;
|
|
276
293
|
private _waitForCandidateWritable;
|
|
277
294
|
private _onMeshWritable;
|
|
278
295
|
private _onMeshDead;
|
|
279
296
|
private _onMeshStalled;
|
|
280
297
|
private _wireMesh;
|
|
281
|
-
private
|
|
282
|
-
private
|
|
283
|
-
private
|
|
284
|
-
private
|
|
298
|
+
private _adoptAccount;
|
|
299
|
+
private _pooled;
|
|
300
|
+
private _accountMesh;
|
|
301
|
+
private _meshIdOf;
|
|
285
302
|
private _poolEntry;
|
|
286
|
-
private _meshFor;
|
|
287
|
-
private _activeEntry;
|
|
288
303
|
private _meshForBlobCore;
|
|
304
|
+
private _fileIndexFor;
|
|
305
|
+
private _indexMeshFiles;
|
|
306
|
+
private _servedFile;
|
|
307
|
+
clearOldFiles({ olderThanMs, includeOwn }: ClearOldFilesOptions): Promise<number>;
|
|
308
|
+
private _startFileGc;
|
|
309
|
+
private _stopFileGc;
|
|
289
310
|
private _linkAttachment;
|
|
290
311
|
private _isPooled;
|
|
291
|
-
private
|
|
312
|
+
private _isAccount;
|
|
292
313
|
private _unpoolMesh;
|
|
293
314
|
private _unwireMesh;
|
|
294
315
|
private _awaitMesh;
|
|
@@ -297,11 +318,11 @@ export declare class Core extends ReadyResource {
|
|
|
297
318
|
private _discardCandidateMesh;
|
|
298
319
|
private _departureHasAudience;
|
|
299
320
|
private _announceDeparture;
|
|
300
|
-
leaveMesh(): Promise<void>;
|
|
301
|
-
private
|
|
302
|
-
private
|
|
303
|
-
private _writableFallback;
|
|
321
|
+
leaveMesh(meshId: string): Promise<void>;
|
|
322
|
+
private _isStoredAccount;
|
|
323
|
+
private _storedAccountKey;
|
|
304
324
|
listMeshes(): Promise<AssistantMeshList>;
|
|
325
|
+
private _readMeshList;
|
|
305
326
|
listArchivedMeshes(): Promise<AssistantArchivedMeshList>;
|
|
306
327
|
archivedMeshContents(meshId: string): Promise<ArchivedMeshContents>;
|
|
307
328
|
migrateArchivedMesh(meshId: string): Promise<ArchivedMeshMigration>;
|
|
@@ -321,18 +342,17 @@ export declare class Core extends ReadyResource {
|
|
|
321
342
|
private _mintRoom;
|
|
322
343
|
private _discardRoom;
|
|
323
344
|
openMesh(meshId: string): Promise<void>;
|
|
324
|
-
selectMesh(meshId: string): Promise<void>;
|
|
325
345
|
closeMesh(meshId: string): Promise<void>;
|
|
326
346
|
private _openPooledMesh;
|
|
327
347
|
private _openRecordedMesh;
|
|
328
348
|
private _meshEntry;
|
|
329
349
|
private _meshEntryState;
|
|
330
350
|
private _meshKeyOf;
|
|
331
|
-
removeDeviceWriter(writerKey: Buffer, deviceId: Buffer): Promise<void>;
|
|
351
|
+
removeDeviceWriter(writerKey: Buffer, deviceId: Buffer, mesh?: Mesh): Promise<void>;
|
|
332
352
|
renameLocalDevice(name: string): Promise<void>;
|
|
353
|
+
account(): Promise<AssistantAccount>;
|
|
333
354
|
displayName(): Promise<string | null>;
|
|
334
355
|
private _accountMemberName;
|
|
335
|
-
setDisplayName(name: string): Promise<void>;
|
|
336
356
|
saveDeviceProfileLocal(capabilityProfile: DeviceMetadata['capabilityProfile'], recommendedModelName: string, platform?: string): Promise<void>;
|
|
337
357
|
waitForWritable(): Promise<void>;
|
|
338
358
|
private _assertRoomIsHere;
|
|
@@ -359,6 +379,7 @@ export declare class Core extends ReadyResource {
|
|
|
359
379
|
private _listInferenceCalls;
|
|
360
380
|
private _toInferenceEntry;
|
|
361
381
|
private _serveInferenceCalls;
|
|
382
|
+
private _meshHoldingChat;
|
|
362
383
|
private _serveSkillOverlayOp;
|
|
363
384
|
private _runLocalSkillOverlayOp;
|
|
364
385
|
private _setupFields;
|
|
@@ -366,7 +387,7 @@ export declare class Core extends ReadyResource {
|
|
|
366
387
|
private _onConnection;
|
|
367
388
|
private _trackPeerConnection;
|
|
368
389
|
private _onPeerChange;
|
|
369
|
-
private
|
|
390
|
+
private _meshPool;
|
|
370
391
|
private _meshStatusSource;
|
|
371
392
|
private _networkStatusSource;
|
|
372
393
|
private _networkSnapshot;
|
|
@@ -379,15 +400,13 @@ export declare class Core extends ReadyResource {
|
|
|
379
400
|
registerDeleteModel(hook: (options: AssistantDeleteModelRequest) => Promise<AssistantDeleteModelResponse>): () => void;
|
|
380
401
|
registerClearKvCache(hook: () => Promise<AssistantKvCacheDeletionResponse>): () => void;
|
|
381
402
|
registerDeleteChatKvCache(hook: (chatId: string) => Promise<AssistantKvCacheDeletionResponse>): () => void;
|
|
382
|
-
registerCompactChat(hook: (chatId: string) => Promise<AssistantCompactChatResponse>): () => void;
|
|
403
|
+
registerCompactChat(hook: (chatId: string, meshId: string) => Promise<AssistantCompactChatResponse>): () => void;
|
|
383
404
|
registerModelCatalogWatch(hook: () => AsyncIterable<AssistantModelCatalogRevision>): () => void;
|
|
384
405
|
private _watchModelCatalog;
|
|
385
406
|
private _openModelCatalogWatchSource;
|
|
386
407
|
private _resetModelCatalogWatchSource;
|
|
387
408
|
registerRetryModelDownload(hook: (name: string) => Promise<void>): () => void;
|
|
388
|
-
registerSkills(hook: (agentId?: string | null, modelName?: string | null, options?:
|
|
389
|
-
readonly refresh?: boolean;
|
|
390
|
-
}) => Promise<unknown>): () => void;
|
|
409
|
+
registerSkills(hook: (agentId?: string | null, modelName?: string | null, options?: SkillOptions) => Promise<unknown>): () => void;
|
|
391
410
|
registerSkillCatalog(hook: (agentId?: string | null, modelName?: string | null, options?: {
|
|
392
411
|
readonly refresh?: boolean;
|
|
393
412
|
readonly skipCredentialProbe?: boolean;
|