@qvac/core 1.0.0-rc.8 → 1.0.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/CHANGELOG.md +234 -3
- package/README.md +1 -0
- package/dist-lib/lib/api/attachments.d.ts +1 -1
- package/dist-lib/lib/api/attachments.js +11 -0
- package/dist-lib/lib/api/chunks.d.ts +4 -2
- package/dist-lib/lib/api/chunks.js +6 -3
- package/dist-lib/lib/api/devices.js +6 -18
- package/dist-lib/lib/api/execution.d.ts +6 -2
- package/dist-lib/lib/api/execution.js +29 -3
- package/dist-lib/lib/api/host-run-log.d.ts +7 -1
- package/dist-lib/lib/api/host-run-log.js +3 -1
- package/dist-lib/lib/api/index.d.ts +3 -1
- package/dist-lib/lib/api/index.js +17 -6
- package/dist-lib/lib/api/members.js +13 -29
- package/dist-lib/lib/api/mesh.d.ts +2 -1
- package/dist-lib/lib/api/projects.d.ts +1 -1
- package/dist-lib/lib/api/projects.js +9 -5
- package/dist-lib/lib/api/rag-label.d.ts +4 -0
- package/dist-lib/lib/api/rag-label.js +21 -0
- package/dist-lib/lib/api/rag-lexical.d.ts +22 -0
- package/dist-lib/lib/api/rag-lexical.js +1058 -0
- package/dist-lib/lib/api/rag-manifest.d.ts +13 -0
- package/dist-lib/lib/api/rag-manifest.js +46 -0
- package/dist-lib/lib/api/rag-outline.d.ts +36 -0
- package/dist-lib/lib/api/rag-outline.js +426 -0
- package/dist-lib/lib/api/rag-plugin.d.ts +20 -0
- package/dist-lib/lib/api/rag-plugin.js +70 -0
- package/dist-lib/lib/api/rag-synthesis.d.ts +7 -0
- package/dist-lib/lib/api/rag-synthesis.js +102 -0
- package/dist-lib/lib/api/rag-targets.d.ts +23 -0
- package/dist-lib/lib/api/rag-targets.js +215 -0
- package/dist-lib/lib/api/rag-window.d.ts +5 -0
- package/dist-lib/lib/api/rag-window.js +46 -0
- package/dist-lib/lib/api/rag.d.ts +3 -2
- package/dist-lib/lib/api/rag.js +421 -181
- package/dist-lib/lib/api/served.js +8 -14
- package/dist-lib/lib/api/workspace.d.ts +8 -1
- package/dist-lib/lib/api/workspace.js +27 -13
- package/dist-lib/lib/assistant/harness.d.ts +9 -1
- package/dist-lib/lib/assistant/history.d.ts +11 -2
- package/dist-lib/lib/assistant/history.js +74 -4
- package/dist-lib/lib/assistant/media-round.d.ts +61 -0
- package/dist-lib/lib/assistant/media-round.js +111 -0
- package/dist-lib/lib/assistant/message.d.ts +7 -0
- package/dist-lib/lib/assistant/model-round.d.ts +12 -0
- package/dist-lib/lib/assistant/model-round.js +130 -17
- package/dist-lib/lib/assistant/pdf-pages.d.ts +16 -1
- package/dist-lib/lib/assistant/pdf-pages.js +67 -3
- package/dist-lib/lib/assistant/round-host.d.ts +22 -0
- package/dist-lib/lib/assistant/round-host.js +142 -8
- package/dist-lib/lib/assistant/upload.d.ts +12 -0
- package/dist-lib/lib/assistant/upload.js +36 -0
- package/dist-lib/lib/assistant-client.d.ts +1 -0
- package/dist-lib/lib/assistant-client.js +40 -19
- package/dist-lib/lib/assistant-tree.d.ts +2 -0
- package/dist-lib/lib/assistant-tree.js +41 -1
- package/dist-lib/lib/assistant.d.ts +15 -0
- package/dist-lib/lib/assistant.js +474 -89
- package/dist-lib/lib/client.d.ts +1 -0
- package/dist-lib/lib/client.js +4 -1
- package/dist-lib/lib/compaction.js +2 -2
- package/dist-lib/lib/core/agent.js +12 -45
- package/dist-lib/lib/core/approval-rules.js +1 -8
- package/dist-lib/lib/core/archived-mesh.d.ts +2 -1
- package/dist-lib/lib/core/archived-mesh.js +12 -8
- package/dist-lib/lib/core/chat-copy.d.ts +18 -3
- package/dist-lib/lib/core/chat-copy.js +74 -25
- package/dist-lib/lib/core/chat-fork.js +15 -6
- package/dist-lib/lib/core/chat-group.js +16 -24
- package/dist-lib/lib/core/chat-move.d.ts +9 -0
- package/dist-lib/lib/core/chat-move.js +94 -3
- package/dist-lib/lib/core/chat-order.js +12 -18
- package/dist-lib/lib/core/chat.js +38 -31
- package/dist-lib/lib/core/chunk.d.ts +2 -2
- package/dist-lib/lib/core/chunk.js +18 -25
- package/dist-lib/lib/core/collections.d.ts +2 -0
- package/dist-lib/lib/core/collections.js +2 -0
- package/dist-lib/lib/core/contract/activity.d.ts +4 -0
- package/dist-lib/lib/core/contract/activity.js +34 -4
- package/dist-lib/lib/core/contract/chat-group.d.ts +1 -0
- package/dist-lib/lib/core/contract/chat-group.js +21 -1
- package/dist-lib/lib/core/contract/chat.d.ts +9 -0
- package/dist-lib/lib/core/contract/chat.js +127 -5
- package/dist-lib/lib/core/contract/chunks.d.ts +1 -0
- package/dist-lib/lib/core/contract/chunks.js +37 -6
- package/dist-lib/lib/core/contract/features.d.ts +21 -0
- package/dist-lib/lib/core/contract/features.js +22 -0
- package/dist-lib/lib/core/contract/index.js +2 -0
- package/dist-lib/lib/core/contract/indexing.js +4 -2
- package/dist-lib/lib/core/contract/knowledge.js +5 -4
- package/dist-lib/lib/core/contract/members.js +16 -10
- package/dist-lib/lib/core/contract/mesh-kind.d.ts +1 -0
- package/dist-lib/lib/core/contract/mesh-kind.js +3 -1
- package/dist-lib/lib/core/contract/projects.d.ts +5 -0
- package/dist-lib/lib/core/contract/projects.js +13 -5
- package/dist-lib/lib/core/contract/roles.js +32 -4
- package/dist-lib/lib/core/contract/run-requests.d.ts +1 -0
- package/dist-lib/lib/core/contract/run-requests.js +35 -2
- package/dist-lib/lib/core/contract/seed-defaults.js +2 -2
- package/dist-lib/lib/core/contract/tool-configs.js +3 -2
- package/dist-lib/lib/core/contract/workspace.d.ts +2 -0
- package/dist-lib/lib/core/contract/workspace.js +40 -7
- package/dist-lib/lib/core/contract/writers.js +2 -2
- package/dist-lib/lib/core/departures.d.ts +3 -1
- package/dist-lib/lib/core/departures.js +3 -0
- package/dist-lib/lib/core/devices.js +1 -8
- package/dist-lib/lib/core/files/attachments.d.ts +2 -0
- package/dist-lib/lib/core/files/attachments.js +19 -1
- package/dist-lib/lib/core/files/index.d.ts +20 -4
- package/dist-lib/lib/core/files/index.js +132 -21
- package/dist-lib/lib/core/files/processing/document.d.ts +4 -0
- package/dist-lib/lib/core/files/processing/document.js +7 -0
- package/dist-lib/lib/core/files/processing/index.d.ts +13 -0
- package/dist-lib/lib/core/files/processing/index.js +144 -12
- package/dist-lib/lib/core/files/processing/protocol.js +13 -34
- package/dist-lib/lib/core/files/processing/state.d.ts +2 -0
- package/dist-lib/lib/core/files/rag/build.d.ts +19 -2
- package/dist-lib/lib/core/files/rag/build.js +123 -19
- package/dist-lib/lib/core/files/rag/failure.js +2 -1
- package/dist-lib/lib/core/files/rag/index.d.ts +11 -3
- package/dist-lib/lib/core/files/rag/index.js +13 -1
- package/dist-lib/lib/core/files/rag/load.d.ts +6 -3
- package/dist-lib/lib/core/files/rag/load.js +27 -6
- package/dist-lib/lib/core/files/rag/plugin-index.d.ts +32 -0
- package/dist-lib/lib/core/files/rag/plugin-index.js +127 -0
- package/dist-lib/lib/core/files/rag/produce.d.ts +5 -3
- package/dist-lib/lib/core/files/rag/produce.js +104 -16
- package/dist-lib/lib/core/files/rag/retrieval/full-text.d.ts +3 -1
- package/dist-lib/lib/core/files/rag/retrieval/full-text.js +62 -13
- package/dist-lib/lib/core/files/rag/text-cache.d.ts +28 -0
- package/dist-lib/lib/core/files/rag/text-cache.js +141 -0
- package/dist-lib/lib/core/files/records/knowledge.d.ts +1 -3
- package/dist-lib/lib/core/files/records/knowledge.js +7 -40
- package/dist-lib/lib/core/files/records/reclaim.js +5 -10
- package/dist-lib/lib/core/files/upload.js +68 -41
- package/dist-lib/lib/core/fs-drives.js +14 -26
- package/dist-lib/lib/core/invite.d.ts +1 -0
- package/dist-lib/lib/core/invite.js +4 -2
- package/dist-lib/lib/core/local/files.d.ts +1 -1
- package/dist-lib/lib/core/local/files.js +5 -5
- package/dist-lib/lib/core/local/index.d.ts +13 -6
- package/dist-lib/lib/core/local/index.js +103 -69
- package/dist-lib/lib/core/local/run-logs.d.ts +1 -1
- package/dist-lib/lib/core/local/run-logs.js +5 -5
- package/dist-lib/lib/core/mesh-processor.d.ts +19 -0
- package/dist-lib/lib/core/mesh-processor.js +87 -0
- package/dist-lib/lib/core/mesh.d.ts +48 -5
- package/dist-lib/lib/core/mesh.js +318 -129
- package/dist-lib/lib/core/migrations/agent-catalog.js +2 -8
- package/dist-lib/lib/core/migrations/agent-tools-scope.js +5 -11
- package/dist-lib/lib/core/migrations/workspace-from-0-21/index.d.ts +88 -0
- package/dist-lib/lib/core/migrations/workspace-from-0-21/index.js +731 -0
- package/dist-lib/lib/core/migrations/writer-links.d.ts +2 -0
- package/dist-lib/lib/core/migrations/writer-links.js +32 -0
- package/dist-lib/lib/core/project-keys.d.ts +6 -0
- package/dist-lib/lib/core/project-keys.js +11 -0
- package/dist-lib/lib/core/public-mesh.d.ts +3 -0
- package/dist-lib/lib/core/public-mesh.js +10 -8
- package/dist-lib/lib/core/run-requests.d.ts +3 -0
- package/dist-lib/lib/core/run-requests.js +21 -1
- package/dist-lib/lib/core/skill-availability.d.ts +33 -0
- package/dist-lib/lib/core/skill-availability.js +67 -0
- package/dist-lib/lib/core/sync/background.d.ts +0 -1
- package/dist-lib/lib/core/sync/background.js +2 -1
- package/dist-lib/lib/core/sync/changed.d.ts +4 -2
- package/dist-lib/lib/core/sync/changed.js +1 -1
- package/dist-lib/lib/core/sync/index.js +52 -10
- package/dist-lib/lib/core/sync/view-updates.d.ts +18 -12
- package/dist-lib/lib/core/sync/view-updates.js +82 -91
- package/dist-lib/lib/core/sync-status.js +97 -41
- package/dist-lib/lib/core/tool-activity.js +6 -12
- package/dist-lib/lib/core/tool-configs.js +17 -29
- package/dist-lib/lib/core/upgrade-summary.d.ts +19 -0
- package/dist-lib/lib/core/upgrade-summary.js +67 -0
- package/dist-lib/lib/core/view-read.d.ts +4 -0
- package/dist-lib/lib/core/view-read.js +23 -0
- package/dist-lib/lib/core/workspace-upgrade.d.ts +7 -0
- package/dist-lib/lib/core/workspace-upgrade.js +27 -16
- package/dist-lib/lib/core.d.ts +39 -42
- package/dist-lib/lib/core.js +661 -639
- package/dist-lib/lib/errors.d.ts +20 -0
- package/dist-lib/lib/errors.js +20 -0
- package/dist-lib/lib/llm-model-names.d.ts +1 -1
- package/dist-lib/lib/llm-model-names.js +1 -1
- package/dist-lib/lib/mesh-scoped-engine.js +4 -0
- package/dist-lib/lib/model-context.js +1 -2
- package/dist-lib/lib/probe-rounds.d.ts +7 -2
- package/dist-lib/lib/probe-rounds.js +6 -1
- package/dist-lib/lib/run-transcript.d.ts +4 -1
- package/dist-lib/lib/run-transcript.js +15 -6
- package/dist-lib/schema/engine.js +83 -6
- package/dist-lib/schema/indexes.d.ts +3 -0
- package/dist-lib/schema/indexes.js +5 -0
- package/dist-lib/schema/local.js +11 -2
- package/dist-lib/schema/qvac.js +49 -5
- package/dist-lib/spec/bind.js +34 -0
- package/dist-lib/spec/calls.js +5 -0
- package/dist-lib/spec/capabilities.d.ts +17 -0
- package/dist-lib/spec/hrpc/hrpc.json +65 -0
- package/dist-lib/spec/hrpc/index.js +68 -5
- package/dist-lib/spec/hrpc/messages.js +260 -23
- package/dist-lib/spec/hyperschema/index.js +260 -23
- package/dist-lib/spec/hyperschema/schema.json +181 -0
- package/dist-lib/spec/hyperschema/types.d.ts +48 -0
- package/dist-lib/spec/local/hyperdb/messages.js +270 -224
- package/dist-lib/spec/local/hyperschema/index.js +73 -38
- package/dist-lib/spec/local/hyperschema/schema.json +31 -0
- package/dist-lib/spec/local/hyperschema/types.d.ts +8 -0
- package/dist-lib/spec/mesh/hyperdb/db.json +39 -2
- package/dist-lib/spec/mesh/hyperdb/index.js +120 -3
- package/dist-lib/spec/mesh/hyperdb/messages.js +1328 -838
- package/dist-lib/spec/mesh/hyperdispatch/dispatch.json +30 -0
- package/dist-lib/spec/mesh/hyperdispatch/index.js +86 -1
- package/dist-lib/spec/mesh/hyperdispatch/messages.js +682 -287
- package/dist-lib/spec/mesh/hyperschema/index.js +682 -287
- package/dist-lib/spec/mesh/hyperschema/schema.json +201 -0
- package/dist-lib/spec/mesh/hyperschema/types.d.ts +52 -0
- package/package.json +75 -70
- package/tui/README.md +2 -1
- package/tui/app.mjs +28 -7
- package/tui/boot.mjs +5 -1
- package/tui/lib/attachment-files.mjs +82 -0
- package/tui/lib/reopen-meshes.mjs +15 -0
- package/tui/main.mjs +4 -43
- package/worker/assistant-sidecar.mjs +10 -3
- package/worker/stow-entry.mjs +3 -52
|
@@ -4,6 +4,7 @@ import { UNGROUPED } from './contract/projects.js';
|
|
|
4
4
|
import { isRecord } from '../guards.js';
|
|
5
5
|
export const GROUPS_PENDING = 'groups';
|
|
6
6
|
export const FOLD_PENDING = 'agents';
|
|
7
|
+
export const UPGRADE_RECORDS = 'workspace-upgrade/';
|
|
7
8
|
export function upgradeCheckedKey(meshKey) {
|
|
8
9
|
return `workspace-upgrade/${b4a.toHex(meshKey)}`;
|
|
9
10
|
}
|
|
@@ -11,7 +12,20 @@ export function agentsFoldKey(workspaceKey) {
|
|
|
11
12
|
return `workspace-agents/${b4a.toHex(workspaceKey)}`;
|
|
12
13
|
}
|
|
13
14
|
export function groupRecordKey(workspaceKey, groupId) {
|
|
14
|
-
return
|
|
15
|
+
return `${groupRecordsOf(workspaceKey)}${groupId}`;
|
|
16
|
+
}
|
|
17
|
+
export function groupRecordsOf(workspaceKey) {
|
|
18
|
+
return `workspace-upgrade/${b4a.toHex(workspaceKey)}/`;
|
|
19
|
+
}
|
|
20
|
+
export function historyEditsOf(workspaceKey) {
|
|
21
|
+
return `workspace-edits/${b4a.toHex(workspaceKey)}/`;
|
|
22
|
+
}
|
|
23
|
+
export function editedChats(prefix, keys) {
|
|
24
|
+
const chats = new Set(keys.map((key) => key.slice(prefix.length)));
|
|
25
|
+
return chats.has('') ? null : chats;
|
|
26
|
+
}
|
|
27
|
+
export function touches(bucket, edited) {
|
|
28
|
+
return !edited || [...bucket.chats].some((chatId) => edited.has(chatId));
|
|
15
29
|
}
|
|
16
30
|
export function isGroupRecord(value) {
|
|
17
31
|
return isRecord(value) && (value.key === undefined || typeof value.key === 'string');
|
|
@@ -30,21 +44,18 @@ export async function projectsByGroup(view) {
|
|
|
30
44
|
return rows;
|
|
31
45
|
}
|
|
32
46
|
export async function groupBuckets(view, workspaceName) {
|
|
33
|
-
const live = await liveGroups(view)
|
|
34
|
-
|
|
35
|
-
|
|
47
|
+
const live = (await liveGroups(view)).map(({ id, name }) => ({
|
|
48
|
+
groupId: id,
|
|
49
|
+
name,
|
|
50
|
+
chats: new Set()
|
|
51
|
+
}));
|
|
52
|
+
const buckets = new Map(live.map((bucket) => [bucket.groupId, bucket]));
|
|
53
|
+
const ungrouped = { groupId: UNGROUPED, name: workspaceName, chats: new Set() };
|
|
36
54
|
for (const chat of await view.find(CHATS).toArray()) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
55
|
+
const bucket = buckets.get(chat.groupId ?? '') ?? ungrouped;
|
|
56
|
+
if (!chat.deletedAt) {
|
|
57
|
+
bucket.chats.add(chat.id);
|
|
58
|
+
}
|
|
41
59
|
}
|
|
42
|
-
|
|
43
|
-
groupId: group.id,
|
|
44
|
-
name: group.name,
|
|
45
|
-
chats: chats.get(group.id) ?? new Set()
|
|
46
|
-
}));
|
|
47
|
-
return ungrouped.size > 0
|
|
48
|
-
? [...buckets, { groupId: UNGROUPED, name: workspaceName, chats: ungrouped }]
|
|
49
|
-
: buckets;
|
|
60
|
+
return ungrouped.chats.size > 0 ? [...live, ungrouped] : live;
|
|
50
61
|
}
|
package/dist-lib/lib/core.d.ts
CHANGED
|
@@ -6,21 +6,22 @@ import Wakeup from 'protomux-wakeup';
|
|
|
6
6
|
import ReadyGuard from 'ready-guard';
|
|
7
7
|
import ReadyResource from 'ready-resource';
|
|
8
8
|
import type { Logger } from '../index.ts';
|
|
9
|
-
import type { AssistantArchivedMeshList, AssistantCompactChatResponse, AssistantCopySkillResponse, AssistantDeleteModelRequest, AssistantDeleteModelResponse, AssistantDeleteSkillResponse, AssistantKvCacheDeletionResponse, AssistantListModelsRequest, AssistantLoadModelResponse, AssistantManagedSkillsResponse, AssistantMeshList, AssistantAccount, AssistantModelCatalogRevision, AssistantModelInfoList, AssistantBlindPeering, AssistantOkResponse, AssistantSkillCatalogResponse, AssistantSkillFileResponse, AssistantSpeakRequest, AssistantSpeakResponse, AssistantToolCatalogResponse, AssistantDetectLanguageRequest, AssistantDetectLanguageResponse, AssistantTranscribeRequest, AssistantTranscribeResponse, AssistantUnloadModelResponse, AssistantModelUsers, AssistantCustomModelPreview, AssistantPreviewCustomModelRequest } from '../spec/index.d.ts';
|
|
9
|
+
import type { AssistantArchivedMeshList, AssistantWorkspaceUpgradeSummary, AssistantCompactChatResponse, AssistantCopySkillResponse, AssistantDeleteModelRequest, AssistantDeleteModelResponse, AssistantDeleteSkillResponse, AssistantKvCacheDeletionResponse, AssistantListModelsRequest, AssistantLoadModelResponse, AssistantManagedSkillsResponse, AssistantMeshList, AssistantAccount, AssistantModelCatalogRevision, AssistantModelInfoList, AssistantBlindPeering, AssistantOkResponse, AssistantSkillCatalogResponse, AssistantSkillFileResponse, AssistantSpeakRequest, AssistantSpeakResponse, AssistantToolCatalogResponse, AssistantDetectLanguageRequest, AssistantDetectLanguageResponse, AssistantTranscribeRequest, AssistantTranscribeResponse, AssistantUnloadModelResponse, AssistantModelUsers, AssistantCustomModelPreview, AssistantPreviewCustomModelRequest } from '../spec/index.d.ts';
|
|
10
10
|
import type { InferenceCallSource } from './api/inference-calls.ts';
|
|
11
11
|
import { type SkillOptions } from './api/index.ts';
|
|
12
12
|
import type { ModelMemoryUse } from './model-memory-cap.ts';
|
|
13
13
|
import { type BlindPeeringOpts } from './core/blind-peers.ts';
|
|
14
|
-
import { type IndexingEmbedder, type
|
|
14
|
+
import { type IndexingEmbedder, type KnowledgeExtractors, type VectorIndex } from './core/files/index.ts';
|
|
15
15
|
import { type DriveHost } from './core/fs-drives.ts';
|
|
16
16
|
import { type MeshInvite } from './core/invite.ts';
|
|
17
17
|
import { openLocalStore } from './core/local/index.ts';
|
|
18
18
|
import { type ArchivedMeshContents, type ArchivedMeshMigration } from './core/archived-mesh.ts';
|
|
19
|
+
import type { KnowledgeService } from '@qvac/harness/lib/contract/knowledge.ts';
|
|
19
20
|
import { type SkillSecretRequest } from './core/skill-secrets.ts';
|
|
20
21
|
import { type VaultManagedSkills } from './core/vault-managed-skills.ts';
|
|
21
22
|
import type { AppBuildMetadata } from './core/app-build.ts';
|
|
22
23
|
import { type ConfigCore } from './core/ota-config.ts';
|
|
23
|
-
import { Mesh, type DeviceMetadata, type ProjectIdentity } from './core/mesh.ts';
|
|
24
|
+
import { Mesh, type ErrorSink, type DeviceMetadata, type ProjectIdentity } from './core/mesh.ts';
|
|
24
25
|
import { type Stream, type Transport } from '@qvac/harness/rpc';
|
|
25
26
|
import { type CoreSpec } from './spec-loader.ts';
|
|
26
27
|
import { type LocalQvacState } from '../spec/index.js';
|
|
@@ -44,6 +45,7 @@ export interface CoreOptions {
|
|
|
44
45
|
swarm?: Hyperswarm;
|
|
45
46
|
wakeup?: Wakeup;
|
|
46
47
|
logger?: Logger | null;
|
|
48
|
+
onerror?: ErrorSink;
|
|
47
49
|
spec?: () => Promise<CoreSpec>;
|
|
48
50
|
bootstrapNodes?: ReadonlyArray<BootstrapNode>;
|
|
49
51
|
device?: DeviceMetadata;
|
|
@@ -73,7 +75,7 @@ export interface CoreOptions {
|
|
|
73
75
|
speak?: (request: AssistantSpeakRequest) => Promise<AssistantSpeakResponse>;
|
|
74
76
|
speakStream?: (text: AsyncIterable<string>) => AsyncIterable<AssistantSpeakResponse>;
|
|
75
77
|
embedder?: IndexingEmbedder;
|
|
76
|
-
extractors?:
|
|
78
|
+
extractors?: KnowledgeExtractors;
|
|
77
79
|
skills?: (agentId?: string | null, modelName?: string | null, options?: SkillOptions) => Promise<unknown>;
|
|
78
80
|
skillCatalog?: (agentId?: string | null, modelName?: string | null, options?: {
|
|
79
81
|
readonly refresh?: boolean;
|
|
@@ -100,6 +102,7 @@ export interface MeshTopic {
|
|
|
100
102
|
readonly swarm: Hyperswarm;
|
|
101
103
|
}
|
|
102
104
|
export declare const DEVICE_UNKNOWN = "This device has no device details: pass `device` when creating Core";
|
|
105
|
+
export declare const PEER_STREAM_TIMEOUT_MS = 10000;
|
|
103
106
|
export interface SharedMesh {
|
|
104
107
|
readonly meshId: string;
|
|
105
108
|
readonly notice?: string;
|
|
@@ -108,6 +111,9 @@ export interface MeshInviteOptions {
|
|
|
108
111
|
memberInvite?: boolean;
|
|
109
112
|
meshId?: string;
|
|
110
113
|
}
|
|
114
|
+
export interface EmbedderOptions {
|
|
115
|
+
readonly knowledge?: KnowledgeService | null;
|
|
116
|
+
}
|
|
111
117
|
export interface ModelResidency {
|
|
112
118
|
load(name: string): Promise<AssistantLoadModelResponse>;
|
|
113
119
|
unload(name: string): Promise<AssistantUnloadModelResponse>;
|
|
@@ -154,6 +160,7 @@ export declare class Core extends ReadyResource {
|
|
|
154
160
|
private readonly _transport;
|
|
155
161
|
private readonly _apiLifecycle;
|
|
156
162
|
private readonly _log;
|
|
163
|
+
private readonly _onerror;
|
|
157
164
|
private readonly _spec;
|
|
158
165
|
private readonly _bootstrapNodes;
|
|
159
166
|
private readonly _network;
|
|
@@ -197,12 +204,14 @@ export declare class Core extends ReadyResource {
|
|
|
197
204
|
private _speakStream;
|
|
198
205
|
private _embedder;
|
|
199
206
|
private _ragExtractors;
|
|
207
|
+
private _knowledge;
|
|
200
208
|
private _indexedEmbedder;
|
|
201
209
|
private readonly _indexingLock;
|
|
202
210
|
private readonly _embedBatches;
|
|
203
211
|
private readonly _indexingDevice;
|
|
204
212
|
private readonly _meshTransitionLock;
|
|
205
213
|
private readonly _opening;
|
|
214
|
+
private readonly _openingMeshSessions;
|
|
206
215
|
private readonly _retiring;
|
|
207
216
|
private readonly _tearingDown;
|
|
208
217
|
_debugBeforeMeshOpen?: (meshId: string) => void | Promise<void>;
|
|
@@ -222,6 +231,7 @@ export declare class Core extends ReadyResource {
|
|
|
222
231
|
private _accountId;
|
|
223
232
|
private readonly _offlineBoot;
|
|
224
233
|
readonly onlineBoot: ReadyGuard;
|
|
234
|
+
private _upgradeBoot;
|
|
225
235
|
private _candidateMesh;
|
|
226
236
|
private _cancelCandidateJoin;
|
|
227
237
|
private _joinCancellation;
|
|
@@ -242,9 +252,7 @@ export declare class Core extends ReadyResource {
|
|
|
242
252
|
private readonly _wakeup;
|
|
243
253
|
private readonly _following;
|
|
244
254
|
private readonly _kickedProjects;
|
|
245
|
-
private readonly
|
|
246
|
-
private readonly _groupPasses;
|
|
247
|
-
private readonly _groupPassesDue;
|
|
255
|
+
private readonly _upgrade;
|
|
248
256
|
private readonly _purging;
|
|
249
257
|
private readonly _publicIds;
|
|
250
258
|
private _publicBoots;
|
|
@@ -257,12 +265,13 @@ export declare class Core extends ReadyResource {
|
|
|
257
265
|
private readonly _publicFollow;
|
|
258
266
|
private readonly _publicMerges;
|
|
259
267
|
private readonly _publicDrops;
|
|
260
|
-
private
|
|
261
|
-
private _copyAgain;
|
|
262
|
-
private _accountCopied;
|
|
268
|
+
private readonly _publicSettles;
|
|
263
269
|
private readonly _agentCopies;
|
|
264
270
|
private readonly _sharedAgents;
|
|
265
|
-
private readonly
|
|
271
|
+
private readonly _passFailed;
|
|
272
|
+
private readonly _processor;
|
|
273
|
+
private readonly _roleSettles;
|
|
274
|
+
private readonly _recordingJoins;
|
|
266
275
|
private readonly _projectKeySeals;
|
|
267
276
|
private readonly _hosting;
|
|
268
277
|
private readonly _skillSecrets;
|
|
@@ -299,7 +308,7 @@ export declare class Core extends ReadyResource {
|
|
|
299
308
|
private _systemInfo;
|
|
300
309
|
private _statusError;
|
|
301
310
|
private _upgradeRequired;
|
|
302
|
-
constructor(transport: Transport, { storagePath, skillSecrets, store, swarm, wakeup, logger, spec, bootstrapNodes, device, app, minSupportedVersion, otaConfigCore, blindPeerKeys, blindPeeringOpts, fileGc, autoDownloadModels, meshSeed, meshKey, additionalNodes, listModels, deleteModel, clearKvCache, deleteChatKvCache, compactChat, modelCatalogWatch, retryModelDownload, transcribe, detectLanguage, previewModelSource, speak, speakStream, embedder, extractors, skills, skillCatalog, tools, hostsModelSource, vectorIndex, apiLifecycle, network }: CoreOptions);
|
|
311
|
+
constructor(transport: Transport, { storagePath, skillSecrets, store, swarm, wakeup, logger, onerror, spec, bootstrapNodes, device, app, minSupportedVersion, otaConfigCore, blindPeerKeys, blindPeeringOpts, fileGc, autoDownloadModels, meshSeed, meshKey, additionalNodes, listModels, deleteModel, clearKvCache, deleteChatKvCache, compactChat, modelCatalogWatch, retryModelDownload, transcribe, detectLanguage, previewModelSource, speak, speakStream, embedder, extractors, skills, skillCatalog, tools, hostsModelSource, vectorIndex, apiLifecycle, network }: CoreOptions);
|
|
303
312
|
get devicePublicKey(): Buffer | null;
|
|
304
313
|
private _requireDeviceKeyPair;
|
|
305
314
|
get fsDrives(): DriveHost | null;
|
|
@@ -333,6 +342,8 @@ export declare class Core extends ReadyResource {
|
|
|
333
342
|
private _stopTopicRetry;
|
|
334
343
|
private _joinedTopics;
|
|
335
344
|
_close(): Promise<void>;
|
|
345
|
+
private _refuseClosing;
|
|
346
|
+
private _closeOpeningMeshes;
|
|
336
347
|
private _closeStore;
|
|
337
348
|
private _openSwarm;
|
|
338
349
|
private _resolveBlindPeerKeys;
|
|
@@ -393,6 +404,7 @@ export declare class Core extends ReadyResource {
|
|
|
393
404
|
private _retirePooled;
|
|
394
405
|
private _teardownMesh;
|
|
395
406
|
private _tearDown;
|
|
407
|
+
private _textDir;
|
|
396
408
|
private _stopMeshServices;
|
|
397
409
|
private _stopEntryIndexing;
|
|
398
410
|
private _releaseVectorIndex;
|
|
@@ -411,7 +423,7 @@ export declare class Core extends ReadyResource {
|
|
|
411
423
|
private _isHidden;
|
|
412
424
|
private _retireKickedAccount;
|
|
413
425
|
private _restoreAccount;
|
|
414
|
-
private
|
|
426
|
+
private _keepVoided;
|
|
415
427
|
private _replaceRevokedAccount;
|
|
416
428
|
private _leaveKicked;
|
|
417
429
|
private _departKicked;
|
|
@@ -430,7 +442,7 @@ export declare class Core extends ReadyResource {
|
|
|
430
442
|
private _claimJoin;
|
|
431
443
|
private _joinMeshInvite;
|
|
432
444
|
private _reopenRecordedMesh;
|
|
433
|
-
private
|
|
445
|
+
private _keepsJoin;
|
|
434
446
|
private _runJoinMesh;
|
|
435
447
|
private _joinParkedMesh;
|
|
436
448
|
private _candidateSession;
|
|
@@ -439,28 +451,6 @@ export declare class Core extends ReadyResource {
|
|
|
439
451
|
private _departOldAccount;
|
|
440
452
|
private _departIfPooled;
|
|
441
453
|
private _recordJoinedMesh;
|
|
442
|
-
private _followUpgrade;
|
|
443
|
-
private _followGroups;
|
|
444
|
-
private _passGroups;
|
|
445
|
-
private _groupBuckets;
|
|
446
|
-
private _markFoldDue;
|
|
447
|
-
private _passAgents;
|
|
448
|
-
private _heldProjects;
|
|
449
|
-
private _groupRecord;
|
|
450
|
-
private _scanBuckets;
|
|
451
|
-
private _passGroup;
|
|
452
|
-
private _foundGroupProject;
|
|
453
|
-
private _mergeGroupInto;
|
|
454
|
-
private _winnerOf;
|
|
455
|
-
private _copyGroup;
|
|
456
|
-
private _addWorkspaceMembers;
|
|
457
|
-
private _listNewMembers;
|
|
458
|
-
private _listWorkspaceMembers;
|
|
459
|
-
private _workspaceMembers;
|
|
460
|
-
private _openUpgradable;
|
|
461
|
-
private _markUpgradeChecked;
|
|
462
|
-
private _upgradable;
|
|
463
|
-
private _markJoinedWorkspace;
|
|
464
454
|
private _reopenInRole;
|
|
465
455
|
private _registerMesh;
|
|
466
456
|
private _backfillMeshSeeds;
|
|
@@ -480,6 +470,8 @@ export declare class Core extends ReadyResource {
|
|
|
480
470
|
private _onMeshStalled;
|
|
481
471
|
private _wireMesh;
|
|
482
472
|
private _onMeshesDirty;
|
|
473
|
+
private _reconcile;
|
|
474
|
+
private _settleRole;
|
|
483
475
|
private _listenMesh;
|
|
484
476
|
private _wireForeign;
|
|
485
477
|
private _adoptAccount;
|
|
@@ -491,11 +483,12 @@ export declare class Core extends ReadyResource {
|
|
|
491
483
|
private _isOwnPublic;
|
|
492
484
|
private _sharePublicSeed;
|
|
493
485
|
private _shareProjectSeed;
|
|
494
|
-
private _shareMemberKey;
|
|
495
486
|
private _writeMemberKey;
|
|
487
|
+
private _dueMemberKey;
|
|
496
488
|
private _devicesOf;
|
|
497
489
|
private _hasPublic;
|
|
498
490
|
private _publicOf;
|
|
491
|
+
private _awaitPublic;
|
|
499
492
|
private _followPublicMesh;
|
|
500
493
|
private _publicWorkspaces;
|
|
501
494
|
private _settlePublicMeshes;
|
|
@@ -508,15 +501,13 @@ export declare class Core extends ReadyResource {
|
|
|
508
501
|
private _leftWorkspaces;
|
|
509
502
|
private _dropLeftPublic;
|
|
510
503
|
private _settlePublicMesh;
|
|
504
|
+
private _settleOnePublicMesh;
|
|
511
505
|
private _publicRecord;
|
|
512
506
|
private _savePublicRecord;
|
|
513
507
|
private _takePublicBoot;
|
|
514
508
|
private _openPublicMesh;
|
|
515
509
|
private _mintPublicBirth;
|
|
516
510
|
private _mergeLostMint;
|
|
517
|
-
private _migrateIntoPublic;
|
|
518
|
-
private _recordCopied;
|
|
519
|
-
private _markCopied;
|
|
520
511
|
private _followAgentCopies;
|
|
521
512
|
private _keepAgentCopies;
|
|
522
513
|
private _agentPicks;
|
|
@@ -538,7 +529,8 @@ export declare class Core extends ReadyResource {
|
|
|
538
529
|
private _rotatePublicWriters;
|
|
539
530
|
private _restorePublicWriters;
|
|
540
531
|
private _pooled;
|
|
541
|
-
private
|
|
532
|
+
private _backfillWriterLinks;
|
|
533
|
+
private _upgradeHost;
|
|
542
534
|
private _accountMesh;
|
|
543
535
|
private _meshIdOf;
|
|
544
536
|
private _poolEntry;
|
|
@@ -584,6 +576,10 @@ export declare class Core extends ReadyResource {
|
|
|
584
576
|
listMeshes(): Promise<AssistantMeshList>;
|
|
585
577
|
private _readMeshList;
|
|
586
578
|
listArchivedMeshes(): Promise<AssistantArchivedMeshList>;
|
|
579
|
+
workspaceUpgradeSummary(): Promise<AssistantWorkspaceUpgradeSummary>;
|
|
580
|
+
private _upgradedWorkspace;
|
|
581
|
+
private _privateChatsCopiedInto;
|
|
582
|
+
private _privateChatsCopying;
|
|
587
583
|
archivedMeshContents(meshId: string): Promise<ArchivedMeshContents>;
|
|
588
584
|
migrateArchivedMesh(meshId: string, workspaceId: string): Promise<ArchivedMeshMigration>;
|
|
589
585
|
private _archiveDestination;
|
|
@@ -647,6 +643,7 @@ export declare class Core extends ReadyResource {
|
|
|
647
643
|
private _openFollowedMesh;
|
|
648
644
|
private _followProjects;
|
|
649
645
|
private _passProjects;
|
|
646
|
+
private _dropUnlistedFollows;
|
|
650
647
|
private _mayFollowProjects;
|
|
651
648
|
private _sealProjectKeys;
|
|
652
649
|
private _sealWorkspaceProjectKeys;
|
|
@@ -722,7 +719,7 @@ export declare class Core extends ReadyResource {
|
|
|
722
719
|
private _catalogHooksReady;
|
|
723
720
|
private _openCatalogHooks;
|
|
724
721
|
registerTools(hook: () => Promise<AssistantToolCatalogResponse>): () => void;
|
|
725
|
-
registerEmbedder(embedder: IndexingEmbedder, extractors?:
|
|
722
|
+
registerEmbedder(embedder: IndexingEmbedder, extractors?: KnowledgeExtractors, { knowledge }?: EmbedderOptions): () => Promise<void>;
|
|
726
723
|
private _reconcileIndexing;
|
|
727
724
|
private _startIndexing;
|
|
728
725
|
private _startEntryIndexing;
|