@qvac/core 1.0.0-rc.7 → 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 +241 -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/device-routes.d.ts +6 -1
- package/dist-lib/lib/api/device-routes.js +20 -1
- 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 -184
- 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 +19 -1
- package/dist-lib/lib/assistant/model-round.js +163 -28
- 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 +48 -1
- package/dist-lib/lib/assistant.d.ts +18 -1
- package/dist-lib/lib/assistant.js +484 -95
- 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 +45 -42
- package/dist-lib/lib/core.js +675 -640
- package/dist-lib/lib/errors.d.ts +24 -0
- package/dist-lib/lib/errors.js +24 -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/model-download.d.ts +6 -1
- package/dist-lib/lib/model-download.js +16 -3
- package/dist-lib/lib/oauth/resolve.js +29 -8
- package/dist-lib/lib/oauth/token-exchange-core.js +11 -0
- 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 +82 -71
- package/tui/README.md +52 -0
- package/tui/app.mjs +69 -12
- package/tui/boot.mjs +27 -6
- package/tui/cli.mjs +93 -0
- package/tui/index.mjs +2 -87
- package/tui/lib/attachment-files.mjs +82 -0
- package/tui/lib/reopen-meshes.mjs +15 -0
- package/tui/lib/updater.mjs +86 -0
- package/tui/main.mjs +29 -57
- package/worker/assistant-sidecar.mjs +10 -3
- package/worker/stow-entry.mjs +3 -52
- package/dist-lib/lib/core/chat-project.d.ts +0 -2
- package/dist-lib/lib/core/chat-project.js +0 -15
|
@@ -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,24 +6,29 @@ 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';
|
|
28
|
+
export interface SiblingDownloads {
|
|
29
|
+
asked(name: string): Promise<void>;
|
|
30
|
+
resumed(name: string): void;
|
|
31
|
+
}
|
|
27
32
|
export interface ClearOldFilesOptions {
|
|
28
33
|
readonly olderThanMs: number;
|
|
29
34
|
readonly includeOwn?: boolean;
|
|
@@ -40,6 +45,7 @@ export interface CoreOptions {
|
|
|
40
45
|
swarm?: Hyperswarm;
|
|
41
46
|
wakeup?: Wakeup;
|
|
42
47
|
logger?: Logger | null;
|
|
48
|
+
onerror?: ErrorSink;
|
|
43
49
|
spec?: () => Promise<CoreSpec>;
|
|
44
50
|
bootstrapNodes?: ReadonlyArray<BootstrapNode>;
|
|
45
51
|
device?: DeviceMetadata;
|
|
@@ -69,7 +75,7 @@ export interface CoreOptions {
|
|
|
69
75
|
speak?: (request: AssistantSpeakRequest) => Promise<AssistantSpeakResponse>;
|
|
70
76
|
speakStream?: (text: AsyncIterable<string>) => AsyncIterable<AssistantSpeakResponse>;
|
|
71
77
|
embedder?: IndexingEmbedder;
|
|
72
|
-
extractors?:
|
|
78
|
+
extractors?: KnowledgeExtractors;
|
|
73
79
|
skills?: (agentId?: string | null, modelName?: string | null, options?: SkillOptions) => Promise<unknown>;
|
|
74
80
|
skillCatalog?: (agentId?: string | null, modelName?: string | null, options?: {
|
|
75
81
|
readonly refresh?: boolean;
|
|
@@ -96,6 +102,7 @@ export interface MeshTopic {
|
|
|
96
102
|
readonly swarm: Hyperswarm;
|
|
97
103
|
}
|
|
98
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;
|
|
99
106
|
export interface SharedMesh {
|
|
100
107
|
readonly meshId: string;
|
|
101
108
|
readonly notice?: string;
|
|
@@ -104,6 +111,9 @@ export interface MeshInviteOptions {
|
|
|
104
111
|
memberInvite?: boolean;
|
|
105
112
|
meshId?: string;
|
|
106
113
|
}
|
|
114
|
+
export interface EmbedderOptions {
|
|
115
|
+
readonly knowledge?: KnowledgeService | null;
|
|
116
|
+
}
|
|
107
117
|
export interface ModelResidency {
|
|
108
118
|
load(name: string): Promise<AssistantLoadModelResponse>;
|
|
109
119
|
unload(name: string): Promise<AssistantUnloadModelResponse>;
|
|
@@ -150,6 +160,7 @@ export declare class Core extends ReadyResource {
|
|
|
150
160
|
private readonly _transport;
|
|
151
161
|
private readonly _apiLifecycle;
|
|
152
162
|
private readonly _log;
|
|
163
|
+
private readonly _onerror;
|
|
153
164
|
private readonly _spec;
|
|
154
165
|
private readonly _bootstrapNodes;
|
|
155
166
|
private readonly _network;
|
|
@@ -185,6 +196,7 @@ export declare class Core extends ReadyResource {
|
|
|
185
196
|
private _modelCatalogWatch;
|
|
186
197
|
private _modelCatalogWatchSource;
|
|
187
198
|
private _retryModelDownload;
|
|
199
|
+
private _siblingDownloads;
|
|
188
200
|
private _transcribe;
|
|
189
201
|
private _detectLanguage;
|
|
190
202
|
private _previewModelSource;
|
|
@@ -192,12 +204,14 @@ export declare class Core extends ReadyResource {
|
|
|
192
204
|
private _speakStream;
|
|
193
205
|
private _embedder;
|
|
194
206
|
private _ragExtractors;
|
|
207
|
+
private _knowledge;
|
|
195
208
|
private _indexedEmbedder;
|
|
196
209
|
private readonly _indexingLock;
|
|
197
210
|
private readonly _embedBatches;
|
|
198
211
|
private readonly _indexingDevice;
|
|
199
212
|
private readonly _meshTransitionLock;
|
|
200
213
|
private readonly _opening;
|
|
214
|
+
private readonly _openingMeshSessions;
|
|
201
215
|
private readonly _retiring;
|
|
202
216
|
private readonly _tearingDown;
|
|
203
217
|
_debugBeforeMeshOpen?: (meshId: string) => void | Promise<void>;
|
|
@@ -217,6 +231,7 @@ export declare class Core extends ReadyResource {
|
|
|
217
231
|
private _accountId;
|
|
218
232
|
private readonly _offlineBoot;
|
|
219
233
|
readonly onlineBoot: ReadyGuard;
|
|
234
|
+
private _upgradeBoot;
|
|
220
235
|
private _candidateMesh;
|
|
221
236
|
private _cancelCandidateJoin;
|
|
222
237
|
private _joinCancellation;
|
|
@@ -237,9 +252,7 @@ export declare class Core extends ReadyResource {
|
|
|
237
252
|
private readonly _wakeup;
|
|
238
253
|
private readonly _following;
|
|
239
254
|
private readonly _kickedProjects;
|
|
240
|
-
private readonly
|
|
241
|
-
private readonly _groupPasses;
|
|
242
|
-
private readonly _groupPassesDue;
|
|
255
|
+
private readonly _upgrade;
|
|
243
256
|
private readonly _purging;
|
|
244
257
|
private readonly _publicIds;
|
|
245
258
|
private _publicBoots;
|
|
@@ -252,12 +265,13 @@ export declare class Core extends ReadyResource {
|
|
|
252
265
|
private readonly _publicFollow;
|
|
253
266
|
private readonly _publicMerges;
|
|
254
267
|
private readonly _publicDrops;
|
|
255
|
-
private
|
|
256
|
-
private _copyAgain;
|
|
257
|
-
private _accountCopied;
|
|
268
|
+
private readonly _publicSettles;
|
|
258
269
|
private readonly _agentCopies;
|
|
259
270
|
private readonly _sharedAgents;
|
|
260
|
-
private readonly
|
|
271
|
+
private readonly _passFailed;
|
|
272
|
+
private readonly _processor;
|
|
273
|
+
private readonly _roleSettles;
|
|
274
|
+
private readonly _recordingJoins;
|
|
261
275
|
private readonly _projectKeySeals;
|
|
262
276
|
private readonly _hosting;
|
|
263
277
|
private readonly _skillSecrets;
|
|
@@ -294,7 +308,7 @@ export declare class Core extends ReadyResource {
|
|
|
294
308
|
private _systemInfo;
|
|
295
309
|
private _statusError;
|
|
296
310
|
private _upgradeRequired;
|
|
297
|
-
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);
|
|
298
312
|
get devicePublicKey(): Buffer | null;
|
|
299
313
|
private _requireDeviceKeyPair;
|
|
300
314
|
get fsDrives(): DriveHost | null;
|
|
@@ -328,6 +342,8 @@ export declare class Core extends ReadyResource {
|
|
|
328
342
|
private _stopTopicRetry;
|
|
329
343
|
private _joinedTopics;
|
|
330
344
|
_close(): Promise<void>;
|
|
345
|
+
private _refuseClosing;
|
|
346
|
+
private _closeOpeningMeshes;
|
|
331
347
|
private _closeStore;
|
|
332
348
|
private _openSwarm;
|
|
333
349
|
private _resolveBlindPeerKeys;
|
|
@@ -388,6 +404,7 @@ export declare class Core extends ReadyResource {
|
|
|
388
404
|
private _retirePooled;
|
|
389
405
|
private _teardownMesh;
|
|
390
406
|
private _tearDown;
|
|
407
|
+
private _textDir;
|
|
391
408
|
private _stopMeshServices;
|
|
392
409
|
private _stopEntryIndexing;
|
|
393
410
|
private _releaseVectorIndex;
|
|
@@ -406,7 +423,7 @@ export declare class Core extends ReadyResource {
|
|
|
406
423
|
private _isHidden;
|
|
407
424
|
private _retireKickedAccount;
|
|
408
425
|
private _restoreAccount;
|
|
409
|
-
private
|
|
426
|
+
private _keepVoided;
|
|
410
427
|
private _replaceRevokedAccount;
|
|
411
428
|
private _leaveKicked;
|
|
412
429
|
private _departKicked;
|
|
@@ -425,7 +442,7 @@ export declare class Core extends ReadyResource {
|
|
|
425
442
|
private _claimJoin;
|
|
426
443
|
private _joinMeshInvite;
|
|
427
444
|
private _reopenRecordedMesh;
|
|
428
|
-
private
|
|
445
|
+
private _keepsJoin;
|
|
429
446
|
private _runJoinMesh;
|
|
430
447
|
private _joinParkedMesh;
|
|
431
448
|
private _candidateSession;
|
|
@@ -434,28 +451,6 @@ export declare class Core extends ReadyResource {
|
|
|
434
451
|
private _departOldAccount;
|
|
435
452
|
private _departIfPooled;
|
|
436
453
|
private _recordJoinedMesh;
|
|
437
|
-
private _followUpgrade;
|
|
438
|
-
private _followGroups;
|
|
439
|
-
private _passGroups;
|
|
440
|
-
private _groupBuckets;
|
|
441
|
-
private _markFoldDue;
|
|
442
|
-
private _passAgents;
|
|
443
|
-
private _heldProjects;
|
|
444
|
-
private _groupRecord;
|
|
445
|
-
private _scanBuckets;
|
|
446
|
-
private _passGroup;
|
|
447
|
-
private _foundGroupProject;
|
|
448
|
-
private _mergeGroupInto;
|
|
449
|
-
private _winnerOf;
|
|
450
|
-
private _copyGroup;
|
|
451
|
-
private _addWorkspaceMembers;
|
|
452
|
-
private _listNewMembers;
|
|
453
|
-
private _listWorkspaceMembers;
|
|
454
|
-
private _workspaceMembers;
|
|
455
|
-
private _openUpgradable;
|
|
456
|
-
private _markUpgradeChecked;
|
|
457
|
-
private _upgradable;
|
|
458
|
-
private _markJoinedWorkspace;
|
|
459
454
|
private _reopenInRole;
|
|
460
455
|
private _registerMesh;
|
|
461
456
|
private _backfillMeshSeeds;
|
|
@@ -475,6 +470,8 @@ export declare class Core extends ReadyResource {
|
|
|
475
470
|
private _onMeshStalled;
|
|
476
471
|
private _wireMesh;
|
|
477
472
|
private _onMeshesDirty;
|
|
473
|
+
private _reconcile;
|
|
474
|
+
private _settleRole;
|
|
478
475
|
private _listenMesh;
|
|
479
476
|
private _wireForeign;
|
|
480
477
|
private _adoptAccount;
|
|
@@ -486,11 +483,12 @@ export declare class Core extends ReadyResource {
|
|
|
486
483
|
private _isOwnPublic;
|
|
487
484
|
private _sharePublicSeed;
|
|
488
485
|
private _shareProjectSeed;
|
|
489
|
-
private _shareMemberKey;
|
|
490
486
|
private _writeMemberKey;
|
|
487
|
+
private _dueMemberKey;
|
|
491
488
|
private _devicesOf;
|
|
492
489
|
private _hasPublic;
|
|
493
490
|
private _publicOf;
|
|
491
|
+
private _awaitPublic;
|
|
494
492
|
private _followPublicMesh;
|
|
495
493
|
private _publicWorkspaces;
|
|
496
494
|
private _settlePublicMeshes;
|
|
@@ -503,15 +501,13 @@ export declare class Core extends ReadyResource {
|
|
|
503
501
|
private _leftWorkspaces;
|
|
504
502
|
private _dropLeftPublic;
|
|
505
503
|
private _settlePublicMesh;
|
|
504
|
+
private _settleOnePublicMesh;
|
|
506
505
|
private _publicRecord;
|
|
507
506
|
private _savePublicRecord;
|
|
508
507
|
private _takePublicBoot;
|
|
509
508
|
private _openPublicMesh;
|
|
510
509
|
private _mintPublicBirth;
|
|
511
510
|
private _mergeLostMint;
|
|
512
|
-
private _migrateIntoPublic;
|
|
513
|
-
private _recordCopied;
|
|
514
|
-
private _markCopied;
|
|
515
511
|
private _followAgentCopies;
|
|
516
512
|
private _keepAgentCopies;
|
|
517
513
|
private _agentPicks;
|
|
@@ -533,7 +529,8 @@ export declare class Core extends ReadyResource {
|
|
|
533
529
|
private _rotatePublicWriters;
|
|
534
530
|
private _restorePublicWriters;
|
|
535
531
|
private _pooled;
|
|
536
|
-
private
|
|
532
|
+
private _backfillWriterLinks;
|
|
533
|
+
private _upgradeHost;
|
|
537
534
|
private _accountMesh;
|
|
538
535
|
private _meshIdOf;
|
|
539
536
|
private _poolEntry;
|
|
@@ -579,6 +576,10 @@ export declare class Core extends ReadyResource {
|
|
|
579
576
|
listMeshes(): Promise<AssistantMeshList>;
|
|
580
577
|
private _readMeshList;
|
|
581
578
|
listArchivedMeshes(): Promise<AssistantArchivedMeshList>;
|
|
579
|
+
workspaceUpgradeSummary(): Promise<AssistantWorkspaceUpgradeSummary>;
|
|
580
|
+
private _upgradedWorkspace;
|
|
581
|
+
private _privateChatsCopiedInto;
|
|
582
|
+
private _privateChatsCopying;
|
|
582
583
|
archivedMeshContents(meshId: string): Promise<ArchivedMeshContents>;
|
|
583
584
|
migrateArchivedMesh(meshId: string, workspaceId: string): Promise<ArchivedMeshMigration>;
|
|
584
585
|
private _archiveDestination;
|
|
@@ -642,6 +643,7 @@ export declare class Core extends ReadyResource {
|
|
|
642
643
|
private _openFollowedMesh;
|
|
643
644
|
private _followProjects;
|
|
644
645
|
private _passProjects;
|
|
646
|
+
private _dropUnlistedFollows;
|
|
645
647
|
private _mayFollowProjects;
|
|
646
648
|
private _sealProjectKeys;
|
|
647
649
|
private _sealWorkspaceProjectKeys;
|
|
@@ -708,6 +710,7 @@ export declare class Core extends ReadyResource {
|
|
|
708
710
|
private _readModels;
|
|
709
711
|
private _openModelCatalogWatchSource;
|
|
710
712
|
private _resetModelCatalogWatchSource;
|
|
713
|
+
registerSiblingDownloads(hooks: SiblingDownloads): () => void;
|
|
711
714
|
registerRetryModelDownload(hook: (name: string) => Promise<void>): () => void;
|
|
712
715
|
registerSkills(hook: (agentId?: string | null, modelName?: string | null, options?: SkillOptions) => Promise<unknown>): () => void;
|
|
713
716
|
registerSkillCatalog(hook: (agentId?: string | null, modelName?: string | null, options?: SkillCatalogOptions) => Promise<AssistantSkillCatalogResponse>): () => void;
|
|
@@ -716,7 +719,7 @@ export declare class Core extends ReadyResource {
|
|
|
716
719
|
private _catalogHooksReady;
|
|
717
720
|
private _openCatalogHooks;
|
|
718
721
|
registerTools(hook: () => Promise<AssistantToolCatalogResponse>): () => void;
|
|
719
|
-
registerEmbedder(embedder: IndexingEmbedder, extractors?:
|
|
722
|
+
registerEmbedder(embedder: IndexingEmbedder, extractors?: KnowledgeExtractors, { knowledge }?: EmbedderOptions): () => Promise<void>;
|
|
720
723
|
private _reconcileIndexing;
|
|
721
724
|
private _startIndexing;
|
|
722
725
|
private _startEntryIndexing;
|