@qvac/core 1.0.0-rc.2 → 1.0.0-rc.5
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 +238 -12
- package/dist-lib/index.d.ts +3 -1
- package/dist-lib/index.js +1 -0
- package/dist-lib/lib/api/approval-rules.d.ts +1 -1
- package/dist-lib/lib/api/approval-rules.js +5 -1
- 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 +10 -3
- package/dist-lib/lib/api/config.js +51 -6
- 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/index.d.ts +12 -2
- package/dist-lib/lib/api/index.js +6 -1
- 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 +47 -19
- 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 +21 -7
- package/dist-lib/lib/assistant.js +481 -244
- 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/agent-copies.js +7 -1
- package/dist-lib/lib/core/agent.js +1 -0
- package/dist-lib/lib/core/approval-rules.d.ts +5 -1
- package/dist-lib/lib/core/approval-rules.js +16 -1
- 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 +116 -25
- 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 +7 -0
- package/dist-lib/lib/core/config-value.js +15 -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 +6 -12
- package/dist-lib/lib/core/contract/writers.js +20 -6
- package/dist-lib/lib/core/deleted-agent-runs.d.ts +7 -0
- package/dist-lib/lib/core/deleted-agent-runs.js +46 -0
- 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 +111 -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 +16 -1
- package/dist-lib/lib/core/local/index.js +119 -10
- package/dist-lib/lib/core/mesh.d.ts +14 -3
- package/dist-lib/lib/core/mesh.js +127 -54
- 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/skill-secrets.d.ts +3 -2
- package/dist-lib/lib/core/skill-secrets.js +4 -1
- 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 +25 -3
- package/dist-lib/lib/core/sync-status.js +3 -3
- package/dist-lib/lib/core/vault-managed-skills.d.ts +18 -0
- package/dist-lib/lib/core/vault-managed-skills.js +105 -0
- package/dist-lib/lib/core.d.ts +66 -10
- package/dist-lib/lib/core.js +768 -179
- 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 +12 -0
- package/dist-lib/lib/errors.js +12 -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/mesh-scoped-engine.js +1 -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/config.d.ts +1 -1
- package/dist-lib/schema/config.js +1 -1
- package/dist-lib/schema/content.js +2 -1
- package/dist-lib/schema/engine.js +70 -6
- 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 +116 -6
- package/dist-lib/spec/bind.js +15 -0
- package/dist-lib/spec/calls.js +5 -0
- package/dist-lib/spec/capabilities.d.ts +10 -0
- package/dist-lib/spec/config/hyperconf/index.js +1 -1
- package/dist-lib/spec/hrpc/hrpc.json +65 -0
- package/dist-lib/spec/hrpc/index.js +63 -3
- package/dist-lib/spec/hrpc/messages.js +1537 -1395
- package/dist-lib/spec/hyperschema/index.js +1537 -1395
- package/dist-lib/spec/hyperschema/schema.json +126 -1
- package/dist-lib/spec/hyperschema/types.d.ts +33 -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 +1673 -1202
- 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 +809 -632
- package/dist-lib/spec/mesh/hyperschema/index.js +809 -632
- package/dist-lib/spec/mesh/hyperschema/schema.json +293 -174
- package/dist-lib/spec/mesh/hyperschema/types.d.ts +31 -1
- package/package.json +32 -26
- 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
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { CoreError } from '../errors.js';
|
|
2
|
+
import { isRecord } from '../guards.js';
|
|
3
|
+
import { QUARANTINE_PREFIX } from './config-value.js';
|
|
4
|
+
import { SKILL_SECRET_PREFIX } from './contract/skill-secrets.js';
|
|
5
|
+
export { QUARANTINE_PREFIX };
|
|
6
|
+
function cleared(value) {
|
|
7
|
+
return value === null || value === undefined || value === '';
|
|
8
|
+
}
|
|
9
|
+
function accepted(policy, { key, value }) {
|
|
10
|
+
if (cleared(value))
|
|
11
|
+
return true;
|
|
12
|
+
const field = policy.classify(key);
|
|
13
|
+
if (field === 'access-token' || field === 'setting') {
|
|
14
|
+
return typeof value === 'string';
|
|
15
|
+
}
|
|
16
|
+
if (field !== 'oauth-expiry' || typeof value !== 'string') {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
try {
|
|
20
|
+
const state = JSON.parse(value);
|
|
21
|
+
return (isRecord(state) &&
|
|
22
|
+
Object.keys(state).every((key) => key === 'expiresAt') &&
|
|
23
|
+
(state.expiresAt === undefined ||
|
|
24
|
+
(typeof state.expiresAt === 'number' && Number.isFinite(state.expiresAt))));
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function reconnected(policy, entry) {
|
|
31
|
+
return !cleared(entry.value) && accepted(policy, entry);
|
|
32
|
+
}
|
|
33
|
+
export function validateVaultManagedSkill(policy, entry) {
|
|
34
|
+
if (policy && entry.key.startsWith(SKILL_SECRET_PREFIX) && !accepted(policy, entry)) {
|
|
35
|
+
throw new CoreError('SKILL_SECRET_NOT_VAULT_SAFE');
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
async function migrate(policy, entries, { safeEntries, log }) {
|
|
39
|
+
try {
|
|
40
|
+
return new Set((await policy.migrateLegacy?.(entries, { safeEntries })) ?? []);
|
|
41
|
+
}
|
|
42
|
+
catch (err) {
|
|
43
|
+
log?.warn('lifecycle', 'the vault took no skill values', err);
|
|
44
|
+
return new Set();
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
export async function quarantinedSkillKeys(local) {
|
|
48
|
+
const entries = await local.listPrefix(QUARANTINE_PREFIX + SKILL_SECRET_PREFIX);
|
|
49
|
+
return entries.map(({ key }) => key.slice(QUARANTINE_PREFIX.length));
|
|
50
|
+
}
|
|
51
|
+
export async function discardQuarantinedSkills(local, keys) {
|
|
52
|
+
const skills = keys.filter((key) => key.startsWith(SKILL_SECRET_PREFIX));
|
|
53
|
+
if (skills.length) {
|
|
54
|
+
await local.deleteAll(skills.map((key) => QUARANTINE_PREFIX + key));
|
|
55
|
+
}
|
|
56
|
+
return quarantinedSkillKeys(local);
|
|
57
|
+
}
|
|
58
|
+
export async function releaseQuarantinedSkills(local, entries) {
|
|
59
|
+
const set = entries.filter(({ key, value }) => key.startsWith(SKILL_SECRET_PREFIX) && !cleared(value));
|
|
60
|
+
if (set.length) {
|
|
61
|
+
await local.deleteAll(set.map(({ key }) => QUARANTINE_PREFIX + key));
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
export async function prepareVaultManagedSkills(policy, local, log = null) {
|
|
65
|
+
if (!policy)
|
|
66
|
+
return [];
|
|
67
|
+
const live = await local.listPrefix(SKILL_SECRET_PREFIX);
|
|
68
|
+
const held = new Set(live.filter((entry) => reconnected(policy, entry)).map(({ key }) => key));
|
|
69
|
+
const legacy = live.filter((entry) => !accepted(policy, entry));
|
|
70
|
+
const unsafe = new Set(legacy.map(({ key }) => key));
|
|
71
|
+
const waiting = [];
|
|
72
|
+
const stale = [];
|
|
73
|
+
for (const { key, value } of await local.listPrefix(QUARANTINE_PREFIX + SKILL_SECRET_PREFIX)) {
|
|
74
|
+
const original = key.slice(QUARANTINE_PREFIX.length);
|
|
75
|
+
if (held.has(original) || unsafe.has(original)) {
|
|
76
|
+
stale.push(original);
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
waiting.push({ key: original, value });
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
const pending = [...legacy, ...waiting];
|
|
83
|
+
const migrated = pending.length
|
|
84
|
+
? await migrate(policy, pending, {
|
|
85
|
+
safeEntries: live.filter((entry) => accepted(policy, entry)),
|
|
86
|
+
log
|
|
87
|
+
})
|
|
88
|
+
: new Set();
|
|
89
|
+
return local.change(async (get) => {
|
|
90
|
+
const current = await Promise.all(pending.map(async ({ key }) => ({ key, value: await get(key) })));
|
|
91
|
+
const replaced = new Set(current.filter((entry) => reconnected(policy, entry)).map(({ key }) => key));
|
|
92
|
+
const kept = pending.filter(({ key }) => !migrated.has(key) && !replaced.has(key));
|
|
93
|
+
const quarantined = new Set(kept.map(({ key }) => key));
|
|
94
|
+
return {
|
|
95
|
+
result: [...quarantined],
|
|
96
|
+
set: kept.map(({ key, value }) => ({ key: QUARANTINE_PREFIX + key, value })),
|
|
97
|
+
delete: [
|
|
98
|
+
...legacy.filter(({ key }) => !replaced.has(key)).map(({ key }) => key),
|
|
99
|
+
...[...stale, ...waiting.map(({ key }) => key)]
|
|
100
|
+
.filter((key) => !quarantined.has(key))
|
|
101
|
+
.map((key) => QUARANTINE_PREFIX + key)
|
|
102
|
+
]
|
|
103
|
+
};
|
|
104
|
+
});
|
|
105
|
+
}
|
package/dist-lib/lib/core.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ 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
19
|
import { type SkillSecretRequest } from './core/skill-secrets.ts';
|
|
20
|
+
import { type VaultManagedSkills } from './core/vault-managed-skills.ts';
|
|
20
21
|
import type { AppBuildMetadata } from './core/app-build.ts';
|
|
21
22
|
import { type ConfigCore } from './core/ota-config.ts';
|
|
22
23
|
import { Mesh, type DeviceMetadata, type ProjectIdentity } from './core/mesh.ts';
|
|
@@ -34,6 +35,7 @@ export interface FileGcOptions {
|
|
|
34
35
|
}
|
|
35
36
|
export interface CoreOptions {
|
|
36
37
|
storagePath: string;
|
|
38
|
+
skillSecrets?: VaultManagedSkills;
|
|
37
39
|
store?: Corestore;
|
|
38
40
|
swarm?: Hyperswarm;
|
|
39
41
|
wakeup?: Wakeup;
|
|
@@ -79,8 +81,19 @@ export interface CoreOptions {
|
|
|
79
81
|
readonly suspend: () => Promise<void>;
|
|
80
82
|
readonly resume: () => Promise<void>;
|
|
81
83
|
};
|
|
82
|
-
|
|
83
|
-
|
|
84
|
+
network?: NetworkGate;
|
|
85
|
+
}
|
|
86
|
+
export interface NetworkConnection {
|
|
87
|
+
destroy(): void;
|
|
88
|
+
}
|
|
89
|
+
export interface NetworkGate {
|
|
90
|
+
readonly onConnection?: (conn: NetworkConnection) => void;
|
|
91
|
+
readonly onMeshTopic?: (topic: MeshTopic) => void;
|
|
92
|
+
}
|
|
93
|
+
export interface MeshTopic {
|
|
94
|
+
readonly meshId: string;
|
|
95
|
+
readonly topic: Buffer;
|
|
96
|
+
readonly swarm: Hyperswarm;
|
|
84
97
|
}
|
|
85
98
|
export declare const DEVICE_UNKNOWN = "This device has no device details: pass `device` when creating Core";
|
|
86
99
|
export interface SharedMesh {
|
|
@@ -104,7 +117,6 @@ export interface SkillManagementHooks {
|
|
|
104
117
|
}
|
|
105
118
|
export interface CreateMeshOptions {
|
|
106
119
|
readonly shared?: boolean;
|
|
107
|
-
readonly compute?: boolean;
|
|
108
120
|
}
|
|
109
121
|
interface MeshInvitePreview {
|
|
110
122
|
readonly memberInvite: boolean;
|
|
@@ -140,6 +152,7 @@ export declare class Core extends ReadyResource {
|
|
|
140
152
|
private readonly _log;
|
|
141
153
|
private readonly _spec;
|
|
142
154
|
private readonly _bootstrapNodes;
|
|
155
|
+
private readonly _network;
|
|
143
156
|
private readonly _device;
|
|
144
157
|
private readonly _app;
|
|
145
158
|
private _minSupportedVersion;
|
|
@@ -155,7 +168,6 @@ export declare class Core extends ReadyResource {
|
|
|
155
168
|
private readonly _blindPeerKeys;
|
|
156
169
|
private readonly _blindPeeringOpts;
|
|
157
170
|
private readonly _fileGc;
|
|
158
|
-
private readonly _syncPacing;
|
|
159
171
|
private readonly _autoDownloadModels;
|
|
160
172
|
private _fileGcTimer;
|
|
161
173
|
private _fileGcRun;
|
|
@@ -187,6 +199,7 @@ export declare class Core extends ReadyResource {
|
|
|
187
199
|
private readonly _meshTransitionLock;
|
|
188
200
|
private readonly _opening;
|
|
189
201
|
private readonly _retiring;
|
|
202
|
+
private readonly _tearingDown;
|
|
190
203
|
_debugBeforeMeshOpen?: (meshId: string) => void | Promise<void>;
|
|
191
204
|
_debugOnMeshOpened?: (mesh: Mesh, meshId: string) => void;
|
|
192
205
|
private _skills;
|
|
@@ -229,6 +242,7 @@ export declare class Core extends ReadyResource {
|
|
|
229
242
|
private readonly _groupPassesDue;
|
|
230
243
|
private readonly _purging;
|
|
231
244
|
private readonly _publicIds;
|
|
245
|
+
private _publicBoots;
|
|
232
246
|
private readonly _meshNames;
|
|
233
247
|
private _ownWorkspaceId;
|
|
234
248
|
private readonly _publicWriters;
|
|
@@ -245,6 +259,8 @@ export declare class Core extends ReadyResource {
|
|
|
245
259
|
private readonly _projectKeySeals;
|
|
246
260
|
private readonly _hosting;
|
|
247
261
|
private readonly _skillSecrets;
|
|
262
|
+
private readonly _vaultManagedSkills;
|
|
263
|
+
private _quarantine;
|
|
248
264
|
private readonly _hostMeshes;
|
|
249
265
|
private readonly _hostJoins;
|
|
250
266
|
private readonly _agentListeners;
|
|
@@ -255,8 +271,12 @@ export declare class Core extends ReadyResource {
|
|
|
255
271
|
private _minting;
|
|
256
272
|
private _backfill;
|
|
257
273
|
private _leaving;
|
|
258
|
-
private
|
|
259
|
-
private
|
|
274
|
+
private readonly _kickedMeshes;
|
|
275
|
+
private readonly _kickCloses;
|
|
276
|
+
private readonly _retiredMeshes;
|
|
277
|
+
private _retiredAccount;
|
|
278
|
+
private _kickNotice;
|
|
279
|
+
private _leaveChecks;
|
|
260
280
|
private readonly _peers;
|
|
261
281
|
private _peerArrivedSuspended;
|
|
262
282
|
private readonly _statusListeners;
|
|
@@ -271,7 +291,7 @@ export declare class Core extends ReadyResource {
|
|
|
271
291
|
private _systemInfo;
|
|
272
292
|
private _statusError;
|
|
273
293
|
private _upgradeRequired;
|
|
274
|
-
constructor(transport: Transport, { storagePath, 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,
|
|
294
|
+
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);
|
|
275
295
|
get devicePublicKey(): Buffer | null;
|
|
276
296
|
private _requireDeviceKeyPair;
|
|
277
297
|
get fsDrives(): DriveHost | null;
|
|
@@ -283,7 +303,6 @@ export declare class Core extends ReadyResource {
|
|
|
283
303
|
_open(): Promise<void>;
|
|
284
304
|
private _runBootOffline;
|
|
285
305
|
private _openBootMesh;
|
|
286
|
-
private _retireComputeMeshes;
|
|
287
306
|
private _runBootOnline;
|
|
288
307
|
private _reopenMesh;
|
|
289
308
|
get otaConfigCore(): ConfigCore | null;
|
|
@@ -334,6 +353,7 @@ export declare class Core extends ReadyResource {
|
|
|
334
353
|
private _closeBlindPeering;
|
|
335
354
|
private _closeRecovery;
|
|
336
355
|
private _joinBirthMember;
|
|
356
|
+
private _ownBirthMember;
|
|
337
357
|
private _knownBirthMember;
|
|
338
358
|
private _recoveryBirthMember;
|
|
339
359
|
private _holdIdentityPhrase;
|
|
@@ -363,13 +383,30 @@ export declare class Core extends ReadyResource {
|
|
|
363
383
|
private _retirePooledMesh;
|
|
364
384
|
private _retirePooled;
|
|
365
385
|
private _teardownMesh;
|
|
386
|
+
private _tearDown;
|
|
366
387
|
private _stopMeshServices;
|
|
367
388
|
private _stopEntryIndexing;
|
|
368
389
|
private _releaseVectorIndex;
|
|
369
390
|
private _withdrawFromMesh;
|
|
391
|
+
private _reviewKick;
|
|
370
392
|
private _onKicked;
|
|
393
|
+
private _kickOutlivesTransition;
|
|
394
|
+
private _onKickVoided;
|
|
395
|
+
private _readKick;
|
|
396
|
+
private _removedAsMember;
|
|
397
|
+
private _followKick;
|
|
398
|
+
private _markJoinedKicked;
|
|
399
|
+
private _closeKicked;
|
|
400
|
+
private _projectRowsOf;
|
|
401
|
+
private _isHidden;
|
|
402
|
+
private _retireKickedAccount;
|
|
403
|
+
private _restoreAccount;
|
|
404
|
+
private _dropOwnMint;
|
|
371
405
|
private _replaceRevokedAccount;
|
|
406
|
+
private _leaveKicked;
|
|
372
407
|
private _departKicked;
|
|
408
|
+
private _noteKickedProject;
|
|
409
|
+
private _departProjectsOf;
|
|
373
410
|
private _departRevokedMesh;
|
|
374
411
|
private _archiveMembership;
|
|
375
412
|
private _requestFreshMesh;
|
|
@@ -432,6 +469,7 @@ export declare class Core extends ReadyResource {
|
|
|
432
469
|
private _onMeshDead;
|
|
433
470
|
private _onMeshStalled;
|
|
434
471
|
private _wireMesh;
|
|
472
|
+
private _onMeshesDirty;
|
|
435
473
|
private _listenMesh;
|
|
436
474
|
private _wireForeign;
|
|
437
475
|
private _adoptAccount;
|
|
@@ -463,6 +501,7 @@ export declare class Core extends ReadyResource {
|
|
|
463
501
|
private _settlePublicMesh;
|
|
464
502
|
private _publicRecord;
|
|
465
503
|
private _savePublicRecord;
|
|
504
|
+
private _takePublicBoot;
|
|
466
505
|
private _openPublicMesh;
|
|
467
506
|
private _mintPublicBirth;
|
|
468
507
|
private _mergeLostMint;
|
|
@@ -484,6 +523,9 @@ export declare class Core extends ReadyResource {
|
|
|
484
523
|
private _retirePublicMeshes;
|
|
485
524
|
private _retirePublicMesh;
|
|
486
525
|
private _leavePublicMesh;
|
|
526
|
+
private _dropKickedCopy;
|
|
527
|
+
private _rotatePublicWriters;
|
|
528
|
+
private _restorePublicWriters;
|
|
487
529
|
private _pooled;
|
|
488
530
|
private _isOurMemberDevice;
|
|
489
531
|
private _accountMesh;
|
|
@@ -494,6 +536,7 @@ export declare class Core extends ReadyResource {
|
|
|
494
536
|
private _fileIndexFor;
|
|
495
537
|
private _indexMeshFiles;
|
|
496
538
|
private _syncMeshInBackground;
|
|
539
|
+
private _backfillChatChunks;
|
|
497
540
|
private _servedFile;
|
|
498
541
|
clearOldFiles({ olderThanMs, includeOwn }: ClearOldFilesOptions): Promise<number>;
|
|
499
542
|
private _startFileGc;
|
|
@@ -510,7 +553,11 @@ export declare class Core extends ReadyResource {
|
|
|
510
553
|
private _recordDeparture;
|
|
511
554
|
private _departureHasAudience;
|
|
512
555
|
private _announceDeparture;
|
|
513
|
-
leaveMesh(meshId: string
|
|
556
|
+
leaveMesh(meshId: string, { workspace }?: {
|
|
557
|
+
workspace?: boolean | undefined;
|
|
558
|
+
}): Promise<void>;
|
|
559
|
+
private _checkLeave;
|
|
560
|
+
private _leaveChecked;
|
|
514
561
|
leaveWorkspace(meshId: string): Promise<void>;
|
|
515
562
|
private _leavingMember;
|
|
516
563
|
private _leaveAsMember;
|
|
@@ -536,7 +583,7 @@ export declare class Core extends ReadyResource {
|
|
|
536
583
|
setMeshName(meshId: string, name: string): Promise<void>;
|
|
537
584
|
createWorkspace({ name, icon }?: CreateWorkspaceOptions): Promise<string>;
|
|
538
585
|
private _defaultWorkspaceName;
|
|
539
|
-
createMesh({ shared
|
|
586
|
+
createMesh({ shared }?: CreateMeshOptions): Promise<string>;
|
|
540
587
|
createProject(workspaceId: string, { name }: ProjectIdentity): Promise<string>;
|
|
541
588
|
private _mintProject;
|
|
542
589
|
private _listProject;
|
|
@@ -569,19 +616,26 @@ export declare class Core extends ReadyResource {
|
|
|
569
616
|
waitForWritable(): Promise<void>;
|
|
570
617
|
private _assertMeshIsHere;
|
|
571
618
|
getMeshInvite(opts?: MeshInviteOptions): Promise<MeshInvite | null>;
|
|
619
|
+
private _publicHeads;
|
|
572
620
|
private _delegatePairing;
|
|
573
621
|
private _shortestAnchorProof;
|
|
574
622
|
previewMeshInvite(invite: string): MeshInvitePreview;
|
|
575
623
|
private _closeSwarm;
|
|
576
624
|
pushSkillSecret(request: SkillSecretRequest): Promise<void>;
|
|
625
|
+
private _offerQuarantined;
|
|
626
|
+
private _discardQuarantined;
|
|
627
|
+
private _releaseQuarantined;
|
|
577
628
|
private _followSkillSecrets;
|
|
578
629
|
private _followJoinedMeshes;
|
|
630
|
+
private _followJoinedMeshesPass;
|
|
579
631
|
private _followMeshRows;
|
|
580
632
|
private _trackFollow;
|
|
581
633
|
private _retireLeftMesh;
|
|
582
634
|
private _archiveLeftMeshRow;
|
|
583
635
|
private _openFollowedMesh;
|
|
584
636
|
private _followProjects;
|
|
637
|
+
private _passProjects;
|
|
638
|
+
private _mayFollowProjects;
|
|
585
639
|
private _sealProjectKeys;
|
|
586
640
|
private _sealWorkspaceProjectKeys;
|
|
587
641
|
private _sealListedMembers;
|
|
@@ -667,9 +721,11 @@ export declare class Core extends ReadyResource {
|
|
|
667
721
|
private _diagnosticsSource;
|
|
668
722
|
private _memberDiagnostics;
|
|
669
723
|
private _meshDiagnostics;
|
|
724
|
+
private _meshProgress;
|
|
670
725
|
private _diagnostics;
|
|
671
726
|
private _statusSnapshot;
|
|
672
727
|
acknowledgeKicked(): void;
|
|
728
|
+
private _accountKicked;
|
|
673
729
|
private _statusState;
|
|
674
730
|
private _accountWritable;
|
|
675
731
|
private _chatSenders;
|