@qvac/core 0.2.1 → 0.2.2
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/.claude/skills/compaction/SKILL.md +9 -4
- package/.claude/skills/pr-create/SKILL.md +24 -3
- package/.claude/skills/pr-review/SKILL.md +248 -40
- package/CLAUDE.md +1 -3
- package/README.md +3 -1
- package/dist-lib/client.js +1 -1
- package/dist-lib/index.js +8 -8
- package/dist-lib/lib/api/agents.d.ts +1 -1
- package/dist-lib/lib/api/agents.js +10 -9
- package/dist-lib/lib/api/app-config.js +1 -1
- package/dist-lib/lib/api/approval-rules.js +9 -5
- package/dist-lib/lib/api/attachments.js +25 -3
- package/dist-lib/lib/api/chat-groups.d.ts +1 -1
- package/dist-lib/lib/api/chat-groups.js +5 -4
- package/dist-lib/lib/api/chat.js +8 -8
- package/dist-lib/lib/api/chunks.js +11 -11
- package/dist-lib/lib/api/config.js +1 -1
- package/dist-lib/lib/api/custom-models.js +2 -2
- package/dist-lib/lib/api/devices.d.ts +1 -1
- package/dist-lib/lib/api/devices.js +9 -9
- package/dist-lib/lib/api/diagnostics.js +1 -1
- package/dist-lib/lib/api/effective-ctx-size.js +1 -1
- package/dist-lib/lib/api/execution.js +4 -4
- package/dist-lib/lib/api/files.js +2 -2
- package/dist-lib/lib/api/index.d.ts +1 -0
- package/dist-lib/lib/api/index.js +33 -33
- package/dist-lib/lib/api/instrument.js +1 -1
- package/dist-lib/lib/api/knowledge.js +4 -4
- package/dist-lib/lib/api/logs.js +1 -1
- package/dist-lib/lib/api/members.d.ts +4 -1
- package/dist-lib/lib/api/members.js +88 -18
- package/dist-lib/lib/api/mesh.d.ts +13 -3
- package/dist-lib/lib/api/mesh.js +25 -2
- package/dist-lib/lib/api/model-download.js +1 -1
- package/dist-lib/lib/api/network.js +1 -1
- package/dist-lib/lib/api/notifications.js +3 -3
- package/dist-lib/lib/api/rag.js +7 -7
- package/dist-lib/lib/api/sync.js +1 -1
- package/dist-lib/lib/api/tool-activity.js +4 -4
- package/dist-lib/lib/api/tool-configs.js +5 -5
- package/dist-lib/lib/api/watchable.js +1 -1
- package/dist-lib/lib/assistant/fetch-body.d.ts +5 -0
- package/dist-lib/lib/assistant/fetch-body.js +36 -0
- package/dist-lib/lib/assistant/harness.d.ts +225 -0
- package/dist-lib/lib/assistant/harness.js +154 -0
- package/dist-lib/lib/assistant/history.d.ts +32 -0
- package/dist-lib/lib/assistant/history.js +232 -0
- package/dist-lib/lib/assistant/message.d.ts +45 -0
- package/dist-lib/lib/assistant/message.js +47 -0
- package/dist-lib/lib/assistant/skill-encode.d.ts +21 -0
- package/dist-lib/lib/assistant/skill-encode.js +71 -0
- package/dist-lib/lib/assistant-client.js +2 -2
- package/dist-lib/lib/assistant-tree.js +10 -4
- package/dist-lib/lib/assistant.d.ts +25 -285
- package/dist-lib/lib/assistant.js +250 -637
- package/dist-lib/lib/audio-format.js +2 -2
- package/dist-lib/lib/client.js +2 -2
- package/dist-lib/lib/collabora/convert.js +1 -1
- package/dist-lib/lib/collabora/entry.js +1 -1
- package/dist-lib/lib/collabora/worker.js +1 -1
- package/dist-lib/lib/compaction.d.ts +1 -2
- package/dist-lib/lib/compaction.js +8 -6
- package/dist-lib/lib/constants.js +1 -1
- package/dist-lib/lib/core/account-recovery.d.ts +19 -0
- package/dist-lib/lib/core/account-recovery.js +50 -0
- package/dist-lib/lib/core/agent.js +8 -4
- package/dist-lib/lib/core/app-build.d.ts +1 -1
- package/dist-lib/lib/core/approval-rules.d.ts +1 -0
- package/dist-lib/lib/core/approval-rules.js +3 -1
- package/dist-lib/lib/core/archived-mesh.d.ts +25 -0
- package/dist-lib/lib/core/archived-mesh.js +162 -0
- package/dist-lib/lib/core/chat-activity.js +1 -1
- package/dist-lib/lib/core/chat-group.d.ts +1 -0
- package/dist-lib/lib/core/chat-group.js +24 -4
- package/dist-lib/lib/core/chat-search.js +2 -2
- package/dist-lib/lib/core/chat.js +5 -5
- package/dist-lib/lib/core/chunk.d.ts +1 -1
- package/dist-lib/lib/core/chunk.js +4 -4
- package/dist-lib/lib/core/contract/agents.js +1 -1
- package/dist-lib/lib/core/contract/approval-rules.js +6 -4
- package/dist-lib/lib/core/contract/attestations.js +1 -1
- package/dist-lib/lib/core/contract/chat-group.js +1 -1
- package/dist-lib/lib/core/contract/chat.js +1 -1
- package/dist-lib/lib/core/contract/chunks.js +2 -2
- package/dist-lib/lib/core/contract/compute.d.ts +11 -0
- package/dist-lib/lib/core/contract/compute.js +45 -0
- package/dist-lib/lib/core/contract/devices.js +16 -3
- package/dist-lib/lib/core/contract/index.d.ts +3 -1
- package/dist-lib/lib/core/contract/index.js +19 -16
- package/dist-lib/lib/core/contract/indexing.js +2 -2
- package/dist-lib/lib/core/contract/joined-meshes.js +1 -1
- package/dist-lib/lib/core/contract/knowledge.js +2 -2
- package/dist-lib/lib/core/contract/members.js +2 -2
- package/dist-lib/lib/core/contract/seal.d.ts +2 -0
- package/dist-lib/lib/core/contract/seal.js +8 -0
- package/dist-lib/lib/core/contract/seed-defaults.js +1 -1
- package/dist-lib/lib/core/contract/tool-activity.js +1 -1
- package/dist-lib/lib/core/contract/tool-configs.js +3 -3
- package/dist-lib/lib/core/contract/writers.js +66 -42
- package/dist-lib/lib/core/departures.js +1 -1
- package/dist-lib/lib/core/device-invites.js +1 -1
- package/dist-lib/lib/core/document-attachment.js +2 -2
- package/dist-lib/lib/core/files/attachments.js +3 -3
- package/dist-lib/lib/core/files/index.d.ts +2 -2
- package/dist-lib/lib/core/files/index.js +19 -19
- package/dist-lib/lib/core/files/knowledge.js +3 -3
- package/dist-lib/lib/core/files/preview/image.js +1 -1
- package/dist-lib/lib/core/files/preview/index.js +6 -6
- package/dist-lib/lib/core/files/processing/claims.js +1 -1
- package/dist-lib/lib/core/files/processing/document.js +5 -5
- package/dist-lib/lib/core/files/processing/index.js +8 -8
- package/dist-lib/lib/core/files/processing/ownership.js +1 -1
- package/dist-lib/lib/core/files/processing/protocol.js +3 -3
- package/dist-lib/lib/core/files/processing/source.js +1 -1
- package/dist-lib/lib/core/files/rag/artifact/codec.js +1 -1
- package/dist-lib/lib/core/files/rag/artifact/id.js +1 -1
- package/dist-lib/lib/core/files/rag/artifact/types.d.ts +4 -4
- package/dist-lib/lib/core/files/rag/build.js +2 -2
- package/dist-lib/lib/core/files/rag/chunk/chunking.js +2 -2
- package/dist-lib/lib/core/files/rag/document-types.d.ts +3 -3
- package/dist-lib/lib/core/files/rag/extract/document-types.d.ts +9 -9
- package/dist-lib/lib/core/files/rag/extract/extract.js +7 -7
- package/dist-lib/lib/core/files/rag/extract/html-text.js +1 -1
- package/dist-lib/lib/core/files/rag/extract/office-collabora.js +2 -2
- package/dist-lib/lib/core/files/rag/extract/pdf-platform.js +1 -1
- package/dist-lib/lib/core/files/rag/extract/pdf-text.js +1 -1
- package/dist-lib/lib/core/files/rag/extract/text-decoding.js +1 -1
- package/dist-lib/lib/core/files/rag/extract/types.d.ts +2 -2
- package/dist-lib/lib/core/files/rag/index.js +22 -22
- package/dist-lib/lib/core/files/rag/load.js +5 -5
- package/dist-lib/lib/core/files/rag/policy.js +2 -2
- package/dist-lib/lib/core/files/rag/produce.js +5 -5
- package/dist-lib/lib/core/files/rag/retrieval/coverage.js +2 -2
- package/dist-lib/lib/core/files/rag/retrieval/diversity.js +1 -1
- package/dist-lib/lib/core/files/rag/retrieval/floor.js +2 -2
- package/dist-lib/lib/core/files/rag/retrieval/format.js +1 -1
- package/dist-lib/lib/core/files/rag/retrieval/full-text.js +18 -11
- package/dist-lib/lib/core/files/rag/retrieval/knowledge.js +5 -5
- package/dist-lib/lib/core/files/rag/retrieval/scoring.js +2 -2
- package/dist-lib/lib/core/files/rag/retrieval/search.js +4 -4
- package/dist-lib/lib/core/files/rag/retrieval/selection.js +2 -2
- package/dist-lib/lib/core/files/rag/retrieval/sources.js +2 -2
- package/dist-lib/lib/core/files/rag/retrieval/terms.js +1 -1
- package/dist-lib/lib/core/files/rag/retrieval/web-sources.js +1 -1
- package/dist-lib/lib/core/files/records/chunks.js +1 -1
- package/dist-lib/lib/core/files/records/index.js +8 -8
- package/dist-lib/lib/core/files/records/knowledge.js +2 -2
- package/dist-lib/lib/core/files/records/output.js +1 -1
- package/dist-lib/lib/core/files/records/reclaim.js +5 -5
- package/dist-lib/lib/core/files/records/routing.js +7 -7
- package/dist-lib/lib/core/files/store/blob.js +2 -2
- package/dist-lib/lib/core/files/store/index.js +7 -7
- package/dist-lib/lib/core/files/store/reference.js +2 -2
- package/dist-lib/lib/core/files/store/server.js +1 -1
- package/dist-lib/lib/core/files/store/sweep.js +1 -1
- package/dist-lib/lib/core/files/upload-input.js +2 -2
- package/dist-lib/lib/core/files/upload.d.ts +1 -1
- package/dist-lib/lib/core/files/upload.js +6 -6
- package/dist-lib/lib/core/harness-loan.d.ts +29 -0
- package/dist-lib/lib/core/harness-loan.js +187 -0
- package/dist-lib/lib/core/helpers/index.d.ts +2 -1
- package/dist-lib/lib/core/helpers/index.js +4 -4
- package/dist-lib/lib/core/hosted-agents.js +2 -2
- package/dist-lib/lib/core/identity.d.ts +2 -0
- package/dist-lib/lib/core/identity.js +4 -2
- 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/index.d.ts +12 -3
- package/dist-lib/lib/core/local/index.js +75 -16
- package/dist-lib/lib/core/membership.d.ts +3 -0
- package/dist-lib/lib/core/membership.js +15 -1
- package/dist-lib/lib/core/mesh-seed-handoff.js +1 -1
- package/dist-lib/lib/core/mesh.d.ts +9 -3
- package/dist-lib/lib/core/mesh.js +41 -26
- package/dist-lib/lib/core/migrations/agent-catalog.js +1 -1
- package/dist-lib/lib/core/migrations/index.js +5 -3
- package/dist-lib/lib/core/migrations/membership.js +2 -2
- package/dist-lib/lib/core/migrations/seal.d.ts +3 -0
- package/dist-lib/lib/core/migrations/seal.js +30 -0
- package/dist-lib/lib/core/next-frame.js +1 -1
- package/dist-lib/lib/core/notification.js +1 -1
- package/dist-lib/lib/core/ota-config.js +1 -1
- package/dist-lib/lib/core/secret-handoff.js +1 -1
- package/dist-lib/lib/core/send.js +3 -3
- package/dist-lib/lib/core/skill-overlay-handoff.js +1 -1
- package/dist-lib/lib/core/skill-overlay-receiver.js +2 -2
- package/dist-lib/lib/core/skill-secrets.js +3 -3
- package/dist-lib/lib/core/sync/devices.js +1 -1
- package/dist-lib/lib/core/sync/index.js +8 -5
- package/dist-lib/lib/core/sync-status.js +1 -1
- package/dist-lib/lib/core/system-info.js +1 -1
- package/dist-lib/lib/core/tool-activity.js +2 -2
- package/dist-lib/lib/core/tool-configs.js +2 -2
- package/dist-lib/lib/core.d.ts +41 -3
- package/dist-lib/lib/core.js +525 -90
- package/dist-lib/lib/credential-pusher.js +4 -4
- package/dist-lib/lib/deadline.js +1 -1
- package/dist-lib/lib/fs-drive-bridge.js +4 -2
- package/dist-lib/lib/integrations/index.js +3 -3
- package/dist-lib/lib/integrations/oauth-providers.js +1 -1
- package/dist-lib/lib/integrations/setup-routes.d.ts +5 -5
- package/dist-lib/lib/integrations/setup-routes.js +3 -3
- package/dist-lib/lib/knowledge-search.js +1 -1
- package/dist-lib/lib/log.js +3 -3
- package/dist-lib/lib/mesh-scoped-engine.d.ts +3 -0
- package/dist-lib/lib/mesh-scoped-engine.js +96 -0
- package/dist-lib/lib/model-context.d.ts +2 -2
- package/dist-lib/lib/model-context.js +1 -1
- package/dist-lib/lib/model-download.js +6 -6
- package/dist-lib/lib/oauth/asana.js +3 -3
- package/dist-lib/lib/oauth/browser-connect.js +1 -1
- package/dist-lib/lib/oauth/client.js +2 -2
- package/dist-lib/lib/oauth/common.d.ts +1 -1
- package/dist-lib/lib/oauth/common.js +1 -1
- package/dist-lib/lib/oauth/flow-core.js +3 -3
- package/dist-lib/lib/oauth/flow.js +2 -2
- package/dist-lib/lib/oauth/google.js +4 -4
- package/dist-lib/lib/oauth/host.js +3 -3
- package/dist-lib/lib/oauth/loopback.js +1 -1
- package/dist-lib/lib/oauth/notion.js +3 -3
- package/dist-lib/lib/oauth/providers.js +1 -1
- package/dist-lib/lib/oauth/resolve.js +1 -1
- package/dist-lib/lib/oauth/spotify.js +3 -3
- package/dist-lib/lib/oauth/token-exchange.js +1 -1
- package/dist-lib/lib/oauth.client.js +2 -2
- package/dist-lib/lib/oauth.js +12 -12
- package/dist-lib/lib/run-notices.d.ts +7 -7
- package/dist-lib/lib/run-transcript.js +1 -1
- package/dist-lib/schema/build.js +12 -6
- package/dist-lib/schema/content.d.ts +11 -11
- package/dist-lib/schema/engine.js +193 -30
- package/dist-lib/schema/field-order.js +2 -2
- package/dist-lib/schema/local.js +18 -4
- package/dist-lib/schema/qvac.js +15 -6
- package/dist-lib/spec/bind.js +41 -0
- package/dist-lib/spec/calls.js +12 -0
- package/dist-lib/spec/capabilities.d.ts +36 -12
- package/dist-lib/spec/hrpc/hrpc.json +161 -5
- package/dist-lib/spec/hrpc/index.js +154 -9
- package/dist-lib/spec/hrpc/messages.js +549 -129
- package/dist-lib/spec/hyperschema/index.js +549 -129
- package/dist-lib/spec/hyperschema/schema.json +370 -40
- package/dist-lib/spec/hyperschema/types.d.ts +85 -1
- package/dist-lib/spec/local/hyperdb/db.json +15 -0
- package/dist-lib/spec/local/hyperdb/index.js +70 -1
- package/dist-lib/spec/local/hyperdb/messages.js +300 -117
- package/dist-lib/spec/local/hyperschema/index.js +97 -4
- package/dist-lib/spec/local/hyperschema/schema.json +58 -1
- package/dist-lib/spec/local/hyperschema/types.d.ts +14 -0
- package/dist-lib/spec/mesh/hyperdb/messages.js +393 -288
- package/dist-lib/spec/mesh/hyperdispatch/dispatch.json +6 -0
- package/dist-lib/spec/mesh/hyperdispatch/index.js +18 -1
- package/dist-lib/spec/mesh/hyperdispatch/messages.js +176 -85
- package/dist-lib/spec/mesh/hyperschema/index.js +176 -85
- package/dist-lib/spec/mesh/hyperschema/schema.json +71 -21
- package/dist-lib/spec/mesh/hyperschema/types.d.ts +14 -1
- package/package.json +15 -9
- package/tui/README.md +7 -0
- package/tui/app.mjs +311 -14
- package/tui/lib/busy-words.mjs +57 -5
- package/tui/lib/export.mjs +1 -0
- package/tui/lib/render.mjs +9 -2
- package/tui/main.mjs +5 -2
|
@@ -1,290 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type {
|
|
3
|
-
import type { ManagedSkill, SkillFileContent } from '@qvac/harness/lib/tools/skills/overlay-crud.ts';
|
|
4
|
-
import type { SkillManagementHooks } from './core.ts';
|
|
5
|
-
import type { DriveOpFn, GrantedDrive } from '@qvac/harness/lib/tools/fs/remote.ts';
|
|
1
|
+
import type { ModelCategory } from '@qvac/harness';
|
|
2
|
+
import type { Duplex } from 'streamx';
|
|
6
3
|
import ReadyResource from 'ready-resource';
|
|
7
|
-
import type {
|
|
4
|
+
import type { AssistantKvCacheDeletionResponse, AssistantModelCatalogRevision } from '../spec/hyperschema/types.d.ts';
|
|
8
5
|
import type { Capabilities } from './api/index.ts';
|
|
9
|
-
import { type DocumentAttachment } from './core/document-attachment.ts';
|
|
10
6
|
import type { DriveHost } from './core/fs-drives.ts';
|
|
11
|
-
import { type DiagnosticsSlice
|
|
7
|
+
import { type DiagnosticsSlice } from './diagnostics.ts';
|
|
12
8
|
import type { Logger } from './log.ts';
|
|
13
|
-
import { type
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
images?: AttachmentRef[];
|
|
21
|
-
audioAttachments?: AttachmentRef[];
|
|
22
|
-
documents?: DocumentAttachment[];
|
|
23
|
-
}
|
|
24
|
-
export declare const IMAGE_ONLY_USER_PROMPT = "The user sent one or more images without any accompanying text. Describe what the images show and respond to anything notable in them.";
|
|
25
|
-
export declare const DOCUMENT_ONLY_USER_PROMPT = "The user sent one or more documents without any accompanying text. Summarize the attached documents.";
|
|
26
|
-
export declare const IMAGE_AND_DOCUMENT_USER_PROMPT = "The user sent one or more images together with one or more documents, and no accompanying text. Describe what the images show and summarize the attached documents.";
|
|
27
|
-
export declare function unreadableImagesNotice(fileNames: readonly string[]): string;
|
|
28
|
-
export declare function annotateUnreadableImages(unreadable: ReadonlyMap<ChatMessage, string[]>): void;
|
|
29
|
-
export declare function unheardAudioNotice(label: string, reason: string, opts?: {
|
|
30
|
-
retryable?: boolean;
|
|
31
|
-
}): string;
|
|
32
|
-
interface AttachmentRef {
|
|
33
|
-
id: string;
|
|
34
|
-
fileName: string;
|
|
35
|
-
mimeType: string;
|
|
36
|
-
blobId: string;
|
|
37
|
-
url?: string | null;
|
|
38
|
-
}
|
|
39
|
-
interface AttachInput {
|
|
40
|
-
fileName: string;
|
|
41
|
-
mimeType: string;
|
|
42
|
-
bytes: Uint8Array;
|
|
43
|
-
raw?: boolean;
|
|
44
|
-
}
|
|
45
|
-
interface AttachmentMeta {
|
|
46
|
-
id: string;
|
|
47
|
-
fileName: string;
|
|
48
|
-
mimeType: string;
|
|
49
|
-
byteLength: number;
|
|
50
|
-
}
|
|
51
|
-
interface FetchedAttachment extends AttachmentMeta {
|
|
52
|
-
bytes: Uint8Array;
|
|
53
|
-
}
|
|
54
|
-
interface HarnessEvent {
|
|
55
|
-
type: string;
|
|
56
|
-
text?: string;
|
|
57
|
-
message?: string;
|
|
58
|
-
[key: string]: unknown;
|
|
59
|
-
}
|
|
60
|
-
export interface HarnessInfo {
|
|
61
|
-
toolNames: string[];
|
|
62
|
-
skills: string[];
|
|
63
|
-
supportsImages: boolean;
|
|
64
|
-
}
|
|
65
|
-
export type ModelType = string;
|
|
66
|
-
export interface ModelInfo {
|
|
67
|
-
name: string;
|
|
68
|
-
type: ModelType;
|
|
69
|
-
registryPath: string;
|
|
70
|
-
registrySource: string;
|
|
71
|
-
isCached: boolean;
|
|
72
|
-
isLoaded: boolean;
|
|
73
|
-
supportsImages?: boolean;
|
|
74
|
-
expectedSize: number;
|
|
75
|
-
actualSize?: number;
|
|
76
|
-
}
|
|
77
|
-
export interface ListModelsOptions {
|
|
78
|
-
type?: ModelType;
|
|
79
|
-
cachedOnly?: boolean;
|
|
80
|
-
fullRegistry?: boolean;
|
|
81
|
-
}
|
|
82
|
-
export interface DeleteModelSummary {
|
|
83
|
-
name: string;
|
|
84
|
-
removed: number;
|
|
85
|
-
freedBytes: number;
|
|
86
|
-
}
|
|
87
|
-
export interface ToolCatalogEntry {
|
|
88
|
-
name: string;
|
|
89
|
-
description: string;
|
|
90
|
-
skillGated: boolean;
|
|
91
|
-
scopeRequired: boolean;
|
|
92
|
-
toolset?: string | null;
|
|
93
|
-
rootsRequired?: boolean;
|
|
94
|
-
writeRootsRequired?: boolean;
|
|
95
|
-
promptChars?: number;
|
|
96
|
-
}
|
|
97
|
-
export interface Harness {
|
|
98
|
-
completion(context: {
|
|
99
|
-
model: string;
|
|
100
|
-
agent: AssistantAgent;
|
|
101
|
-
messages: ChatMessage[];
|
|
102
|
-
cacheKey?: string;
|
|
103
|
-
thinkingDefault?: string;
|
|
104
|
-
toolConfigs?: Record<string, Record<string, unknown>>;
|
|
105
|
-
grantedDirs?: string[];
|
|
106
|
-
grantedDrives?: GrantedDrive[];
|
|
107
|
-
driveOp?: DriveOpFn;
|
|
108
|
-
grantedWriteDirs?: string[];
|
|
109
|
-
generationParams?: {
|
|
110
|
-
temp?: number;
|
|
111
|
-
top_p?: number;
|
|
112
|
-
top_k?: number;
|
|
113
|
-
presence_penalty?: number;
|
|
114
|
-
repeat_penalty?: number;
|
|
115
|
-
frequency_penalty?: number;
|
|
116
|
-
reasoning_budget: 0 | -1;
|
|
117
|
-
};
|
|
118
|
-
responseFormat?: {
|
|
119
|
-
type: 'text';
|
|
120
|
-
} | {
|
|
121
|
-
type: 'json_object';
|
|
122
|
-
} | {
|
|
123
|
-
type: 'json_schema';
|
|
124
|
-
json_schema: {
|
|
125
|
-
name: string;
|
|
126
|
-
description?: string;
|
|
127
|
-
schema: Record<string, unknown>;
|
|
128
|
-
strict?: boolean;
|
|
129
|
-
};
|
|
130
|
-
};
|
|
131
|
-
approve?: (call: ApprovalCall) => Promise<boolean>;
|
|
132
|
-
attach?: (input: AttachInput) => Promise<AssistantChunkContentAttachment>;
|
|
133
|
-
fetchAttachment?: (query: {
|
|
134
|
-
attachmentId?: string;
|
|
135
|
-
signal?: AbortSignal;
|
|
136
|
-
meta?: boolean;
|
|
137
|
-
}) => Promise<FetchedAttachment | AttachmentMeta | null>;
|
|
138
|
-
ragSearch?: (input: {
|
|
139
|
-
query: string;
|
|
140
|
-
limit?: number;
|
|
141
|
-
}) => Promise<{
|
|
142
|
-
enabled: boolean;
|
|
143
|
-
indexEmpty: boolean;
|
|
144
|
-
hasKnowledge: boolean;
|
|
145
|
-
pendingReferenced?: boolean;
|
|
146
|
-
errorMessage?: string | null;
|
|
147
|
-
hits: ReadonlyArray<{
|
|
148
|
-
content: string;
|
|
149
|
-
metadataJson?: string | null;
|
|
150
|
-
score: number;
|
|
151
|
-
}>;
|
|
152
|
-
}>;
|
|
153
|
-
progress?: (update: {
|
|
154
|
-
percentage: number;
|
|
155
|
-
} | null) => void;
|
|
156
|
-
signal?: AbortSignal;
|
|
157
|
-
}): AsyncIterable<HarnessEvent>;
|
|
158
|
-
describe?(): Promise<HarnessInfo | null> | HarnessInfo;
|
|
159
|
-
embed?(context: {
|
|
160
|
-
model: string;
|
|
161
|
-
texts: string[];
|
|
162
|
-
signal?: AbortSignal;
|
|
163
|
-
}): Promise<number[][]>;
|
|
164
|
-
list?(options?: ListModelsOptions): Promise<ReadonlyArray<ModelInfo>>;
|
|
165
|
-
warmModel?(context: {
|
|
166
|
-
model: string;
|
|
167
|
-
agent?: AssistantAgent;
|
|
168
|
-
signal?: AbortSignal;
|
|
169
|
-
}): Promise<void>;
|
|
170
|
-
deleteModel?(name: string): Promise<DeleteModelSummary>;
|
|
171
|
-
clearKvCache?(): Promise<AssistantKvCacheDeletionResponse>;
|
|
172
|
-
deleteKvCache?(kvCacheKey: string): Promise<AssistantKvCacheDeletionResponse>;
|
|
173
|
-
infraModels?(profile: string): Promise<ReadonlyArray<{
|
|
174
|
-
name: string;
|
|
175
|
-
addon: string;
|
|
176
|
-
}>>;
|
|
177
|
-
capability?(): Promise<{
|
|
178
|
-
capabilityProfile: AssistantCapabilityProfile;
|
|
179
|
-
recommendedModelName: string;
|
|
180
|
-
memoryBudget?: MemoryBudget;
|
|
181
|
-
}>;
|
|
182
|
-
download?(args: DownloadArgs): DownloadEventStream;
|
|
183
|
-
transcribe?(context: {
|
|
184
|
-
model: string;
|
|
185
|
-
audio: Buffer;
|
|
186
|
-
signal?: AbortSignal;
|
|
187
|
-
}): Promise<string>;
|
|
188
|
-
speak?(context: {
|
|
189
|
-
model: string;
|
|
190
|
-
text: string;
|
|
191
|
-
signal?: AbortSignal;
|
|
192
|
-
}): Promise<{
|
|
193
|
-
audio: Buffer;
|
|
194
|
-
sampleRate: number;
|
|
195
|
-
}>;
|
|
196
|
-
speakStream?(context: {
|
|
197
|
-
model: string;
|
|
198
|
-
text: AsyncIterable<string>;
|
|
199
|
-
signal?: AbortSignal;
|
|
200
|
-
}): AsyncIterable<{
|
|
201
|
-
audio: Buffer;
|
|
202
|
-
sampleRate: number;
|
|
203
|
-
}>;
|
|
204
|
-
setCredentials?(entries: ReadonlyArray<{
|
|
205
|
-
key: string;
|
|
206
|
-
token?: string | null;
|
|
207
|
-
expiresAt?: number | null;
|
|
208
|
-
agentId?: string | null;
|
|
209
|
-
}>): void | Promise<void>;
|
|
210
|
-
setCustomModels?(entries: ReadonlyArray<{
|
|
211
|
-
name: string;
|
|
212
|
-
src: string;
|
|
213
|
-
projectionSrc?: string;
|
|
214
|
-
}>): void | Promise<void>;
|
|
215
|
-
on?(event: 'model' | 'status', listener: (...args: never[]) => void): unknown;
|
|
216
|
-
off?(event: 'model' | 'status', listener: (...args: never[]) => void): unknown;
|
|
217
|
-
presuspend?(): Promise<void> | void;
|
|
218
|
-
suspend?(): Promise<void> | void;
|
|
219
|
-
wakeup?(): Promise<void> | void;
|
|
220
|
-
resume?(): Promise<void> | void;
|
|
221
|
-
skills?(agentId?: string | null, modelName?: string | null, options?: {
|
|
222
|
-
readonly refresh?: boolean;
|
|
223
|
-
readonly skipCredentialProbe?: boolean;
|
|
224
|
-
}): Promise<ReadonlyArray<Skill>>;
|
|
225
|
-
tools?(): Promise<ReadonlyArray<ToolCatalogEntry>>;
|
|
226
|
-
listManagedSkills?(): Promise<ReadonlyArray<ManagedSkill>>;
|
|
227
|
-
readSkillFile?(name: string): Promise<SkillFileContent | null>;
|
|
228
|
-
writeSkillFile?(name: string, content: string): Promise<{
|
|
229
|
-
ok: boolean;
|
|
230
|
-
}>;
|
|
231
|
-
copyBaseForEdit?(name: string): Promise<{
|
|
232
|
-
copied: boolean;
|
|
233
|
-
}>;
|
|
234
|
-
deleteOverlaySkill?(name: string): Promise<{
|
|
235
|
-
removed: boolean;
|
|
236
|
-
}>;
|
|
237
|
-
diagnostics?(): HarnessDiagnostics;
|
|
238
|
-
fetchDiagnostics?(): Promise<HarnessDiagnostics | null>;
|
|
239
|
-
toolNames?: string[];
|
|
240
|
-
skillNames?: string[];
|
|
241
|
-
supportsImages?: boolean;
|
|
242
|
-
supportsImagesFor?(model: string): boolean;
|
|
243
|
-
}
|
|
244
|
-
export declare function harnessListModels(harness: Pick<Harness, 'list'>): (options: AssistantListModelsRequest) => Promise<AssistantModelInfoList>;
|
|
245
|
-
export declare function harnessDeleteModel(harness: Pick<Harness, 'deleteModel'>): (options: AssistantDeleteModelRequest) => Promise<AssistantDeleteModelResponse>;
|
|
246
|
-
export declare function harnessClearKvCache(harness: Pick<Harness, 'clearKvCache'>): () => Promise<AssistantKvCacheDeletionResponse>;
|
|
247
|
-
export declare function harnessTranscribe(harness: Pick<Harness, 'transcribe'>): (request: AssistantTranscribeRequest) => Promise<AssistantTranscribeResponse>;
|
|
248
|
-
export declare function harnessSpeak(harness: Pick<Harness, 'speak'>): (request: AssistantSpeakRequest) => Promise<AssistantSpeakResponse>;
|
|
249
|
-
export declare function harnessSkillCatalog(harness: Pick<Harness, 'skills'>, syncCredentials?: () => Promise<void> | undefined): (agentId?: string | null, modelName?: string | null, options?: {
|
|
250
|
-
readonly refresh?: boolean;
|
|
251
|
-
readonly skipCredentialProbe?: boolean;
|
|
252
|
-
}) => Promise<AssistantSkillCatalogResponse>;
|
|
253
|
-
export declare function harnessSkillManagement(harness: Pick<Harness, 'listManagedSkills' | 'readSkillFile' | 'writeSkillFile' | 'copyBaseForEdit' | 'deleteOverlaySkill'>): SkillManagementHooks;
|
|
254
|
-
export declare function harnessTools(harness: Pick<Harness, 'tools'>): () => Promise<AssistantToolCatalogResponse>;
|
|
255
|
-
export declare function harnessSpeakStream(harness: Pick<Harness, 'speakStream'>): (text: AsyncIterable<string>) => AsyncIterable<AssistantSpeakResponse>;
|
|
256
|
-
export interface Skill {
|
|
257
|
-
name: string;
|
|
258
|
-
description: string;
|
|
259
|
-
status: string;
|
|
260
|
-
tools: string[];
|
|
261
|
-
credentials: string[];
|
|
262
|
-
allowList: string[];
|
|
263
|
-
platform: string[];
|
|
264
|
-
requires?: SkillRequires;
|
|
265
|
-
install?: InstallStep[];
|
|
266
|
-
setup?: SkillSetup;
|
|
267
|
-
stub?: boolean;
|
|
268
|
-
minCapabilityProfile?: string;
|
|
269
|
-
emoji?: string;
|
|
270
|
-
}
|
|
271
|
-
export interface StaleToolRuns {
|
|
272
|
-
runIds: Set<string>;
|
|
273
|
-
questionChunkIds: Set<string>;
|
|
274
|
-
}
|
|
275
|
-
export declare function listHistoryChunks(engine: Pick<Capabilities, 'listChunks'>, chatId: string): Promise<AssistantChunk[]>;
|
|
276
|
-
export interface CompactOptions {
|
|
277
|
-
readonly signal?: AbortSignal;
|
|
278
|
-
readonly onFold?: () => Promise<void> | void;
|
|
279
|
-
}
|
|
280
|
-
export type CompactionTrigger = 'before-run' | 'turn-filled-window' | 'overflow';
|
|
281
|
-
export interface CompactResult {
|
|
282
|
-
readonly compacted: boolean;
|
|
283
|
-
readonly foldedTurns?: number;
|
|
284
|
-
readonly reason?: string;
|
|
285
|
-
}
|
|
286
|
-
export declare function historyFromChunks(chunks: ReadonlyArray<AssistantChunk>, stale?: Partial<StaleToolRuns>): ChatMessage[];
|
|
287
|
-
export declare function staleToolRunIds(historyChunks: ReadonlyArray<AssistantChunk>, approvalChunks: ReadonlyArray<AssistantChunk>, currentRunId: string): StaleToolRuns;
|
|
9
|
+
import { type DeleteModelSummary, type Harness, type ListModelsOptions, type ModelInfo, type ToolCatalogEntry } from './assistant/harness.ts';
|
|
10
|
+
import type { Skill } from './assistant/skill-encode.ts';
|
|
11
|
+
import { type CompactOptions, type CompactResult } from './assistant/history.ts';
|
|
12
|
+
export { harnessClearKvCache, harnessDeleteModel, harnessListModels, harnessSkillCatalog, harnessSkillManagement, harnessSpeak, harnessSpeakStream, harnessTools, harnessTranscribe, type DeleteModelSummary, type Harness, type HarnessInfo, type ListModelsOptions, type ModelInfo, type ModelType, type ToolCatalogEntry } from './assistant/harness.ts';
|
|
13
|
+
export { type Skill } from './assistant/skill-encode.ts';
|
|
14
|
+
export { annotateUnreadableImages, unheardAudioNotice, unreadableImagesNotice, DOCUMENT_ONLY_USER_PROMPT, IMAGE_AND_DOCUMENT_USER_PROMPT, IMAGE_ONLY_USER_PROMPT } from './assistant/message.ts';
|
|
15
|
+
export { historyFromChunks, listHistoryChunks, staleToolRunIds, type CompactOptions, type CompactResult, type CompactionTrigger, type StaleToolRuns } from './assistant/history.ts';
|
|
288
16
|
export interface AssistantOptions {
|
|
289
17
|
logger?: Logger | null;
|
|
290
18
|
imageCacheDir?: string;
|
|
@@ -294,11 +22,14 @@ export interface AssistantOptions {
|
|
|
294
22
|
platform?: string;
|
|
295
23
|
preloadCurrentAgentModel?: boolean;
|
|
296
24
|
drives?: DriveHost;
|
|
25
|
+
borrowHarness?: (deviceId: string) => Duplex;
|
|
297
26
|
blobReadTimeoutMs?: number;
|
|
298
27
|
}
|
|
299
28
|
export declare class QvacAssistant extends ReadyResource {
|
|
300
29
|
private readonly _engine;
|
|
301
30
|
private readonly _harness;
|
|
31
|
+
private readonly _borrowHarness;
|
|
32
|
+
private readonly _borrowed;
|
|
302
33
|
private readonly _log;
|
|
303
34
|
private readonly _imageCacheDir;
|
|
304
35
|
private readonly _imageCacheMaxBytes?;
|
|
@@ -328,12 +59,15 @@ export declare class QvacAssistant extends ReadyResource {
|
|
|
328
59
|
private _harnessDeath;
|
|
329
60
|
private _refreshingDiagnostics;
|
|
330
61
|
private _requests;
|
|
62
|
+
private _meshList;
|
|
331
63
|
private _retry;
|
|
332
64
|
private _retryMs;
|
|
333
65
|
private _chatList;
|
|
334
66
|
private _agentList;
|
|
335
67
|
private readonly _chatListWatch;
|
|
336
68
|
private readonly _agentWatch;
|
|
69
|
+
private readonly _meshListWatch;
|
|
70
|
+
private readonly _runConsumers;
|
|
337
71
|
private readonly _runs;
|
|
338
72
|
private readonly _seen;
|
|
339
73
|
private readonly _lifecycle;
|
|
@@ -344,7 +78,7 @@ export declare class QvacAssistant extends ReadyResource {
|
|
|
344
78
|
private readonly _modelCatalog;
|
|
345
79
|
private readonly _onHarnessStatus;
|
|
346
80
|
private readonly _onModelCatalogEvent;
|
|
347
|
-
constructor(engine: Capabilities, harness: Harness, { logger, imageCacheDir, imageCacheMaxBytes, imageCacheMaxAgeMs, downloadRetryMs, platform, preloadCurrentAgentModel, drives, blobReadTimeoutMs }?: AssistantOptions);
|
|
81
|
+
constructor(engine: Capabilities, harness: Harness, { logger, imageCacheDir, imageCacheMaxBytes, imageCacheMaxAgeMs, downloadRetryMs, platform, preloadCurrentAgentModel, drives, borrowHarness, blobReadTimeoutMs }?: AssistantOptions);
|
|
348
82
|
_open(): Promise<void>;
|
|
349
83
|
private _triggerModelWarm;
|
|
350
84
|
private _warmCurrentAgentModel;
|
|
@@ -389,6 +123,13 @@ export declare class QvacAssistant extends ReadyResource {
|
|
|
389
123
|
private _deleteChatKvCache;
|
|
390
124
|
private _rearmConsume;
|
|
391
125
|
private _consume;
|
|
126
|
+
private _watchMeshList;
|
|
127
|
+
private _syncRunConsumers;
|
|
128
|
+
private _meshRunConsumer;
|
|
129
|
+
private _stopMeshIntake;
|
|
130
|
+
private _pruneSeen;
|
|
131
|
+
private _lenderFor;
|
|
132
|
+
private _harnessFor;
|
|
392
133
|
private _dispatch;
|
|
393
134
|
private _citeWebSources;
|
|
394
135
|
private _searchKnowledge;
|
|
@@ -422,4 +163,3 @@ export declare class QvacAssistant extends ReadyResource {
|
|
|
422
163
|
private _modelHolder;
|
|
423
164
|
private _watchModelProgress;
|
|
424
165
|
}
|
|
425
|
-
export {};
|