@qvac/core 1.0.0-rc.8 → 1.0.1
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 +243 -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
package/CHANGELOG.md
CHANGED
|
@@ -13,8 +13,189 @@ release.
|
|
|
13
13
|
|
|
14
14
|
## [Unreleased]
|
|
15
15
|
|
|
16
|
+
## [1.0.1] - 2026-11-17
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- Needs `@qvac/harness` ^1.0.0, up from 1.0.0-rc.23. A host's harness and Core's now resolve to one
|
|
21
|
+
copy, and the TUI and duck sidecar run the stable harness. Its `qvac-office` dependency is exempt
|
|
22
|
+
from the 7-day release age. (#925)
|
|
23
|
+
|
|
24
|
+
## [1.0.0] - 2026-11-17
|
|
25
|
+
|
|
26
|
+
Since 1.0.0-rc.13. Upgrading from 0.11.4, read 1.0.0-rc.11 to rc.13 as well: this is the first
|
|
27
|
+
production release with the `>=0.22.0` version floor, which an operator publishes on each lane only
|
|
28
|
+
once the app release carrying this core is live there.
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
|
|
32
|
+
- A question about a chat's attachments answers from their text with no embedding call, before
|
|
33
|
+
they are indexed and after a restart; the text is kept on this device. On Qwen3.5-9B a 13-item
|
|
34
|
+
term sheet over a 114k-token agreement went from 4/12 facts in 21–32 s to 12/12 in about 13 s
|
|
35
|
+
to first token ([rag](docs/api/rag.md)). (#866)
|
|
36
|
+
- Excerpts are picked per asked item, definitions and clause headings first, and the model is
|
|
37
|
+
told which listed items no excerpt sets out ([rag](docs/api/rag.md)). (#866)
|
|
38
|
+
- A file a turn waits on no longer queues behind two files still embedding, and embedding a chat
|
|
39
|
+
file yields to a running model. (#866)
|
|
40
|
+
- An office attachment up to about 8k tokens can reach the model whole, as a PDF does. (#866)
|
|
41
|
+
- When a turn's attachments are answered from excerpts, their PDFs show a vision model only the
|
|
42
|
+
pages those excerpts come from, still cropped to figures and within the same room; a PDF with
|
|
43
|
+
no cited page gets no pictures. Twelve files (9 PDFs) went from 32 page images, about 24k
|
|
44
|
+
tokens and 145-177 s to the first token, to the cited pages only
|
|
45
|
+
([decision](docs/decisions/2026-10-28-a-pdf-shows-its-figures-in-half-the-window.md)). (#866)
|
|
46
|
+
- A whole read is capped at about 8k tokens (32k chars), summaries included; a longer document goes
|
|
47
|
+
through excerpts or the even sample ([rag](docs/api/rag.md)). (#866)
|
|
48
|
+
- One file still extracting, failed or without text no longer sends a search to the vectors: the
|
|
49
|
+
other files' text answers and the model is told which file is unread ([rag](docs/api/rag.md)).
|
|
50
|
+
(#866)
|
|
51
|
+
- A file's text is extracted and kept before it waits for an embed slot, so the files behind two
|
|
52
|
+
embedding ones are no longer unread for minutes; a turn waits at most 30 s for its attachments'
|
|
53
|
+
text ([rag](docs/api/rag.md)). (#866)
|
|
54
|
+
- A follow-up reads the text of all the chat's files while it stays under 4M chars (was 8 files),
|
|
55
|
+
or only the file it names, instead of embedding the question; the text cache keeps 16 files.
|
|
56
|
+
(#866)
|
|
57
|
+
- `/attach <dir>` in the TUI attaches the directory's visible document files, reading and uploading
|
|
58
|
+
one at a time with a ✓ or ✗ line each; a link is followed to a regular file, and the
|
|
59
|
+
unsupported entries are named in one `skipped N unsupported: …` line. (#866)
|
|
60
|
+
- A request for a document derived from the whole source ("Generate a term sheet from this
|
|
61
|
+
agreement") quotes the parties, the defined terms and the sections instead of the request's
|
|
62
|
+
words, and sends the document's outline (`outline`) before the excerpts
|
|
63
|
+
([rag](docs/api/rag.md)). (#866)
|
|
64
|
+
- A question about all of a chat's files lists each with its size, first heading and whether it
|
|
65
|
+
could be read, then the excerpts (`outline`). The listing replaces a lone readable file's
|
|
66
|
+
outline, reaches the model when no file has text, is capped at 600 tokens (`… and N more
|
|
67
|
+
files`), and is built for any size of corpus, one file's text read at a time. (#866)
|
|
68
|
+
- A later summary of one chat document quotes its kept text by structure (outline, parties,
|
|
69
|
+
sections) before the plugin's even sample. (#866)
|
|
70
|
+
- `previousQuery` is read from the chat's stored user messages, so a fold no longer drops the
|
|
71
|
+
question a follow-up borrows its subject from. (#866)
|
|
72
|
+
- A turn that sent a document whole and overflowed the window is retried once with excerpts
|
|
73
|
+
(an injection search with `excerptsOnly` never reads whole); later overflows halve them as before. (#866)
|
|
74
|
+
- A file the chat holds only on a peer is told to the model as "Not available on this device",
|
|
75
|
+
apart from files still indexing. (#866)
|
|
76
|
+
- A summary over several files answers a file whose embedding failed from its kept text; it is
|
|
77
|
+
listed as readable, not unreadable. (#866)
|
|
78
|
+
- The office text cache beside `TextCache` is gone; the kept text covers it. (#866)
|
|
79
|
+
- A follow-up with fewer than 2 words of its own is searched with the user's turn before it
|
|
80
|
+
(`previousQuery`) unless it names a file. (#866)
|
|
81
|
+
|
|
82
|
+
### Fixed
|
|
83
|
+
|
|
84
|
+
- `account` and `accountWatch` no longer report writable under the mesh a device invite moves
|
|
85
|
+
the account onto before it is adopted, so a write routed there no longer fails as still joining
|
|
86
|
+
([mesh](docs/api/mesh.md)). (#910)
|
|
87
|
+
- On the knowledge plugin path the model is told the listed items no excerpt sets out
|
|
88
|
+
(`uncoveredItems`); `uncoveredItems` is absent rather than empty when nothing is uncovered. (#866)
|
|
89
|
+
- `forkChat` no longer refuses when another device stored a PDF page choice or video digest this
|
|
90
|
+
device never fetched: the fork leaves it behind and its next run builds it again. See
|
|
91
|
+
[chat](docs/api/chat.md#forkchat). (#858)
|
|
92
|
+
- A join from an invite this build minted is appended only once the joiner has applied what the
|
|
93
|
+
inviter had, so no peer applies it ahead of, say, another admin's workspace upgrade and gives
|
|
94
|
+
the joiner a stale role. An invite without those heads, from an older build, joins as before.
|
|
95
|
+
See [mesh](docs/api/mesh.md#joinmesh). (#901)
|
|
96
|
+
- A mesh the account or an invite called a workspace, though its own kind is shared or a project,
|
|
97
|
+
reopens as a project once its kind reaches the device, instead of staying a workspace whose
|
|
98
|
+
writes apply dropped. See [mesh](docs/api/mesh.md). (#900)
|
|
99
|
+
- A device no longer writes its member key, again and again, into a mesh it holds as a workspace
|
|
100
|
+
whose kind is not one, which pinned the cpu and grew the oplog. See
|
|
101
|
+
[members](docs/api/members.md). (#873)
|
|
102
|
+
- A mesh's membership, member key, upgrade, shared agent and project seal writes run in one
|
|
103
|
+
coalesced pass per mesh, so a write that lands no longer sets its writer off again. (#888)
|
|
104
|
+
- After a restart, a call into one workspace's private chats opens that workspace first, instead
|
|
105
|
+
of waiting several seconds behind every other workspace's open. See
|
|
106
|
+
[workspace](docs/api/workspace.md). (#898)
|
|
107
|
+
- `duck --headless` reopens the meshes it had joined after a restart, so it answers runs sent to
|
|
108
|
+
its agents there again. (#891)
|
|
109
|
+
|
|
110
|
+
## [1.0.0-rc.13] - 2026-11-13
|
|
111
|
+
|
|
112
|
+
Since 1.0.0-rc.12.
|
|
113
|
+
|
|
114
|
+
### Changed
|
|
115
|
+
|
|
116
|
+
- Uses `autobee` ^2.13.6. (#868)
|
|
117
|
+
- Needs `@qvac/harness` 1.0.0-rc.23 and `@qvac/skills` ^0.5.0, up from 1.0.0-rc.22 and ^0.4.0. The
|
|
118
|
+
harness's charts plugin needs `qvac-charts`, now a dependency of Core. (#870)
|
|
119
|
+
|
|
120
|
+
### Fixed
|
|
121
|
+
|
|
122
|
+
- Keeps members' writes across workspace upgrades, chat moves and edits, and kick or removal paths. (#833)
|
|
123
|
+
- Projects made by the 0.20 workspace upgrade list every member the upgrade counted from their
|
|
124
|
+
first row, with the seed sealed to those members in the same batch, so they can open the project
|
|
125
|
+
even if the device that made it stops right after. See [projects](docs/api/projects.md). (#852)
|
|
126
|
+
|
|
127
|
+
## [1.0.0-rc.12] - 2026-11-13
|
|
128
|
+
|
|
129
|
+
Since 1.0.0-rc.11.
|
|
130
|
+
|
|
16
131
|
### Added
|
|
17
132
|
|
|
133
|
+
- `listKnowledgeBase` and `knowledgeBaseWatch`: an entry carries `progress`, the chunks embedded
|
|
134
|
+
so far and the total, while this device holds the file's indexing claim and is embedding it. It
|
|
135
|
+
is device-local, so other members see only `status`. See
|
|
136
|
+
[knowledge](docs/api/knowledge.md#listknowledgebase). (#808)
|
|
137
|
+
- `duck` runs up to four agent replies on one loaded model at once. The sidecar's own default is
|
|
138
|
+
unchanged. (#861)
|
|
139
|
+
|
|
140
|
+
### Changed
|
|
141
|
+
|
|
142
|
+
- Needs `@qvac/harness` 1.0.0-rc.22 and `@qvac/skills` ^0.4.0, up from 1.0.0-rc.20 and ^0.3.0.
|
|
143
|
+
The skills' diagrams skill calls the harness's `draw_diagram`. (#817)
|
|
144
|
+
- A write that a mesh's close drops now refuses with `MESH_CLOSED_BEFORE_WRITE` (100133) and leaves
|
|
145
|
+
nothing in the log, where it used to resolve as if it had landed. Send it again once the mesh is
|
|
146
|
+
open. See [mesh](docs/api/mesh.md). (#838)
|
|
147
|
+
- hypercore 11.40.4, hyperbee2 2.22.0, compact-encoding 3.7.0 and protomux 3.13.1.
|
|
148
|
+
compact-encoding's `float32` and `float64` now throw a `TypeError` on a non-number instead of
|
|
149
|
+
writing NaN. (#857)
|
|
150
|
+
|
|
151
|
+
### Fixed
|
|
152
|
+
|
|
153
|
+
- A project's knowledge files that another device indexed no longer stay "Not available here"
|
|
154
|
+
behind a file this device is rebuilding locally while one of its runs lasts. (#860)
|
|
155
|
+
- A run a tool answered, such as a diagram from `draw_diagram`, is replayed on later turns with
|
|
156
|
+
that call before its reply, so a follow-up edits the diagram rather than rewriting it by hand.
|
|
157
|
+
(#817)
|
|
158
|
+
- A PDF page of fewer than 12 words, such as a chapter divider or a contents page, is no longer a
|
|
159
|
+
chunk of its own that matched almost any short prompt: its text opens the next page and cites
|
|
160
|
+
it. A PDF indexed before this keeps its chunks. (#841)
|
|
161
|
+
- A 0.21 device that fast-forwarded onto its sibling's 1.0 account and halted boots on 1.0 with no
|
|
162
|
+
peer again, where `ready()` used to hang. (#838)
|
|
163
|
+
- A logout, a leave or a shutdown no longer waits on a mesh's drain, which hung a logout beside a
|
|
164
|
+
mesh still joining. (#838)
|
|
165
|
+
- A `joinMesh` refused with `MESH_VIEW_UNAVAILABLE` leaves nothing behind, so the same invite joins
|
|
166
|
+
once the row reads; the next `joinMesh` of it used to never return. (#838)
|
|
167
|
+
|
|
168
|
+
## [1.0.0-rc.11] - 2026-11-12
|
|
169
|
+
|
|
170
|
+
Everything since 0.11.4, across the 1.0.0 prereleases up to this one.
|
|
171
|
+
|
|
172
|
+
### Added
|
|
173
|
+
|
|
174
|
+
- `continueRunHere({ meshId, chunkId })`: the device a run was sent from takes back a run another
|
|
175
|
+
of your devices holds, and picks it up from its last round. Refused with `RUN_REQUEST_OFFLINE`
|
|
176
|
+
while this device is offline. `examples/run-continue-here.mjs` shows it; see
|
|
177
|
+
[chunks](docs/api/chunks.md#continuerunhere).
|
|
178
|
+
|
|
179
|
+
- `workspaceUpgradeSummary` says what the upgrade from 0.20 converted on this device, so the app
|
|
180
|
+
can tell the person once: each workspace the mesh list shows that this device minted a project
|
|
181
|
+
for or merged chats into, whether one of its groups is still pending, whether it had chat-groups
|
|
182
|
+
at all, the project its ungrouped chats went to, and the workspace this device copied the 0.20
|
|
183
|
+
private chats into, with `privateChatsPending` until that copy finishes. See
|
|
184
|
+
[workspace](docs/api/workspace.md#workspaceupgradesummary).
|
|
185
|
+
|
|
186
|
+
```js
|
|
187
|
+
const { workspaces, privateChatsWorkspaceId } = await engine.workspaceUpgradeSummary()
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
- Image and music generation for a remote agent runs on the chat's model host. The tools stay on
|
|
191
|
+
the device driving the run and ask the host with a probe round; the host waits for its model,
|
|
192
|
+
generates, and names the output by blob (`putBlob`); the driver's attachment names that blob. An
|
|
193
|
+
edit's sources go by the chat's attachment ids and the host fits them. A host that will never hold
|
|
194
|
+
the model settles `model-missing` and the driver uses its own. An agent this device serves
|
|
195
|
+
generates in process, with its step progress. Needs harness 1.0.0-rc.20, and this Core on both
|
|
196
|
+
devices: a host on an earlier 1.0 prerelease never takes the round, so the tool waits until the run
|
|
197
|
+
is stopped or the host leaves. (#755)
|
|
198
|
+
|
|
18
199
|
- A vision model sees an image a tool attaches during a run, such as a PNG `http_request` downloads
|
|
19
200
|
from Google Drive. The assistant gives the harness the image from its own image cache, as it does
|
|
20
201
|
a user's image, and the harness shows it on the turn that closes the tool round. Later runs show
|
|
@@ -78,8 +259,27 @@ release.
|
|
|
78
259
|
optional dependencies of the package, so an install brings them, and `bare-thread` is pinned to
|
|
79
260
|
`~1.2.7` in `dependencies`, since 1.4 fails to load the stowed harness worker.
|
|
80
261
|
|
|
262
|
+
- `chatSkillAvailability` and `chatSkillAvailabilityWatch`: on a phone, which of a chat's skills
|
|
263
|
+
cannot run right now, `{ name, available, reason: 'platform' }`. (#733)
|
|
264
|
+
- `CoreOptions.onerror(err, { meshId })` receives every error caught on the autobee path. Without
|
|
265
|
+
one, Core logs it under the `errors` scope. (#785)
|
|
266
|
+
|
|
81
267
|
### Changed
|
|
82
268
|
|
|
269
|
+
- **Breaking for a host:** `engines.bare` is `>=1.35.0`. Core runs on Bare 1.36 with the current
|
|
270
|
+
Holepunch packages, and `bare-worker` 4.5.3 and `bare-sidecar` 0.5.15 need Bare 1.35 to start a
|
|
271
|
+
worker or a sidecar. Core depends on `@qvac/harness` 1.0.0-rc.19, whose Python plugin has the
|
|
272
|
+
same floor.
|
|
273
|
+
([decision](docs/decisions/2026-09-25-workers-run-on-bare-worker-and-bare-is-pinned.md))
|
|
274
|
+
|
|
275
|
+
- `uploadAttachment` and `uploadKnowledge` hold at most 16 MiB a stream is yet to read. A client
|
|
276
|
+
that keeps writing after `write` returns `false` past that is cut off with `STREAM_OVERFLOW`,
|
|
277
|
+
which ends its whole connection to Core. Wait for the stream to drain between frames, as the
|
|
278
|
+
example in [attachments](docs/api/attachments.md) does.
|
|
279
|
+
|
|
280
|
+
- A peer that sends nothing for 10 s is dropped, so a frozen device leaves `peerDeviceIds` in
|
|
281
|
+
seconds rather than staying listed. See [mesh](docs/api/mesh.md).
|
|
282
|
+
|
|
83
283
|
- A streaming reply lands in its chat about once a second instead of every 250 ms: `RunTranscript`
|
|
84
284
|
flushes buffered text on a 1 s tick (and still at 8,192 chars, on a type or round change and at the
|
|
85
285
|
end). A client watching the chat gets a quarter of the frames, so it should pace its own text
|
|
@@ -95,8 +295,9 @@ release.
|
|
|
95
295
|
and when `kvCache.retentionDays` changes, so a cache can outlive its retention by up to 12 hours
|
|
96
296
|
on a host that stays up. ([config.md](docs/api/config.md#kv-cache-retention))
|
|
97
297
|
|
|
98
|
-
- Core depends on `@qvac/harness` 1.0.0-rc.
|
|
99
|
-
the published harness with its named entries.
|
|
298
|
+
- Core depends on `@qvac/harness` 1.0.0-rc.20 from npm instead of a git commit, so a consumer installs
|
|
299
|
+
the published harness with its named entries. Qwen3.6-27B left the harness catalog in rc.20, so it
|
|
300
|
+
leaves Core's context table too: an agent saved on it sizes its window as an uncurated model.
|
|
100
301
|
|
|
101
302
|
- Wipe a store written by 1.0.0-rc.0 to rc.2 before running this build. The collection, route and
|
|
102
303
|
field ids those prereleases gave the 1.0 additions moved up by one to keep 0.11.1's in place, so
|
|
@@ -124,6 +325,11 @@ release.
|
|
|
124
325
|
update prompt with the code `MESH_RULES_FROM_A_NEWER_BUILD`, instead of being
|
|
125
326
|
applied.
|
|
126
327
|
|
|
328
|
+
- `harnessKnowledge` defaults to `true` in `worker/assistant-sidecar.mjs`: desktop and `duck` index
|
|
329
|
+
knowledge with the harness plugin, fed core's stored vectors on first start. Pass `false` to keep
|
|
330
|
+
core's index. (#806)
|
|
331
|
+
- Identical chunk text in a knowledge file is embedded once. (#804)
|
|
332
|
+
|
|
127
333
|
### Removed
|
|
128
334
|
|
|
129
335
|
- `duck`'s `/agent borrow` and `/mesh new compute`, now that Core 1.0 retires
|
|
@@ -131,6 +337,22 @@ release.
|
|
|
131
337
|
|
|
132
338
|
### Fixed
|
|
133
339
|
|
|
340
|
+
- A mesh still opening when Core closes is closed with it, and its open refuses with
|
|
341
|
+
`CORE_CLOSING`. It used to outlive the store it read.
|
|
342
|
+
|
|
343
|
+
- A generated file over 16 MiB uploads: the assistant waits for the upload stream to drain
|
|
344
|
+
instead of writing the whole file at once.
|
|
345
|
+
|
|
346
|
+
- An app that depends on Core installs the speech addon its harness asks for. `@qvac/asr-ggml` was
|
|
347
|
+
pinned to 0.4.2, outside the `^0.11.1` the harness's Speech plugin declares. It now follows the
|
|
348
|
+
harness range, and a test checks every optional peer of a plugin the harness entry loads against
|
|
349
|
+
Core's dependencies.
|
|
350
|
+
- `AssistantClient.close()` lets the sidecar close its Core before it returns. It used to
|
|
351
|
+
destroy the sidecar's pipe at once, which killed the child a few milliseconds into its close,
|
|
352
|
+
so every reopen recovered its meshes as after a crash. `close()` now asks the sidecar to stop,
|
|
353
|
+
waits for it to exit, and so takes a few seconds while Core's swarm closes.
|
|
354
|
+
- A video attachment with neither a video nor an audio stream is no longer sent to transcription
|
|
355
|
+
as a voice memo; the run's model is told it could not be read on this device.
|
|
134
356
|
- A reply served by another device no longer repeats parts of itself. The run owner skips the text
|
|
135
357
|
the host already wrote when its harness streams it back, but matched that text chunk by chunk,
|
|
136
358
|
and the harness wire joins chunks that arrive together, so a delta frame carrying two of the
|
|
@@ -159,6 +381,19 @@ release.
|
|
|
159
381
|
into a project already did, instead of leaving a request for the assistant to take. An approval
|
|
160
382
|
that run was holding is denied in the copy in both places, so none stays pending on a failed run.
|
|
161
383
|
|
|
384
|
+
- Mesh sync and close no longer wedge: a failed fast-forward warmup rejects, a failed sync pass is
|
|
385
|
+
delivered again, a close with unserved blocks finishes and flushes queued ops, a joined mesh
|
|
386
|
+
announces its own writer to every new peer, a workspace's name is kept on the device and answered
|
|
387
|
+
offline, and reads answer from what the device holds instead of waiting on a timeout or reporting
|
|
388
|
+
a caught read error as missing data. (#779, #791, #795, #796, #798, #800, #801, #802, #805, #814)
|
|
389
|
+
- The view walk reads 16 nodes at a time instead of 1024. (#782)
|
|
390
|
+
- A served round loads at its agent's window, survives another mesh's rounds changing, and stops
|
|
391
|
+
when its mesh closes or is left. (#783, #790, #793)
|
|
392
|
+
- A chat rename made while its title is generated is kept. (#780)
|
|
393
|
+
- Copying tool activity keeps the seq placeholder. (#810)
|
|
394
|
+
- `duck`'s launcher no longer bundles a second copy of the harness's model addons, which on
|
|
395
|
+
linux-x64 ran its build out of room. (#832)
|
|
396
|
+
|
|
162
397
|
## [0.11.4] - 2026-10-30
|
|
163
398
|
|
|
164
399
|
### Changed
|
|
@@ -2262,7 +2497,12 @@ Published under the `release-0.1` dist-tag.
|
|
|
2262
2497
|
await assistant.ready()
|
|
2263
2498
|
```
|
|
2264
2499
|
|
|
2265
|
-
[Unreleased]: https://github.com/tetherto/qvac-core/compare/
|
|
2500
|
+
[Unreleased]: https://github.com/tetherto/qvac-core/compare/v1.0.1...HEAD
|
|
2501
|
+
[1.0.1]: https://github.com/tetherto/qvac-core/compare/v1.0.0...v1.0.1
|
|
2502
|
+
[1.0.0]: https://github.com/tetherto/qvac-core/compare/v1.0.0-rc.13...v1.0.0
|
|
2503
|
+
[1.0.0-rc.13]: https://github.com/tetherto/qvac-core/compare/v1.0.0-rc.12...v1.0.0-rc.13
|
|
2504
|
+
[1.0.0-rc.12]: https://github.com/tetherto/qvac-core/compare/v1.0.0-rc.11...v1.0.0-rc.12
|
|
2505
|
+
[1.0.0-rc.11]: https://github.com/tetherto/qvac-core/compare/v0.11.4...v1.0.0-rc.11
|
|
2266
2506
|
[0.11.4]: https://github.com/tetherto/qvac-core/compare/v0.11.3...v0.11.4
|
|
2267
2507
|
[0.11.3]: https://github.com/tetherto/qvac-core/compare/v0.11.2...v0.11.3
|
|
2268
2508
|
[0.11.2]: https://github.com/tetherto/qvac-core/compare/v0.11.1...v0.11.2
|
package/README.md
CHANGED
|
@@ -682,6 +682,7 @@ in a tool result means the token expired — connect Notion again.
|
|
|
682
682
|
|
|
683
683
|
```sh
|
|
684
684
|
npm test # node + bare suites
|
|
685
|
+
npm run test:e2e # devices on lossy Mininet links, Linux only (test/e2e/README.md)
|
|
685
686
|
npm run build:schema # regenerate spec/ from schema/ (bare)
|
|
686
687
|
bun run duck # run the TUI (no build step)
|
|
687
688
|
```
|
|
@@ -6,4 +6,4 @@ export interface CreateAttachmentsApiOptions {
|
|
|
6
6
|
readonly deviceId?: Buffer | null;
|
|
7
7
|
readonly inactivityMs?: number;
|
|
8
8
|
}
|
|
9
|
-
export declare function createAttachmentsApi(pool: MeshPool, options?: CreateAttachmentsApiOptions): Pick<CapabilityHandlers, 'uploadAttachment' | 'downloadAttachment' | 'deleteAttachment'>;
|
|
9
|
+
export declare function createAttachmentsApi(pool: MeshPool, options?: CreateAttachmentsApiOptions): Pick<CapabilityHandlers, 'uploadAttachment' | 'downloadAttachment' | 'deleteAttachment' | 'putBlob'>;
|
|
@@ -20,6 +20,17 @@ export function createAttachmentsApi(pool, options = {}) {
|
|
|
20
20
|
.attachments(options)
|
|
21
21
|
.downloadAttachment(request);
|
|
22
22
|
},
|
|
23
|
+
async *putBlob(frames) {
|
|
24
|
+
const upload = await openUpload(frames);
|
|
25
|
+
if (!upload) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
if (!upload.first.meshId) {
|
|
29
|
+
throw new CoreError('UPLOAD_MESH_MISSING');
|
|
30
|
+
}
|
|
31
|
+
const mesh = await requireMesh(pool, upload.first.meshId);
|
|
32
|
+
yield* mesh.files.attachments(options).putBlob(upload.rest);
|
|
33
|
+
},
|
|
23
34
|
async deleteAttachment(request) {
|
|
24
35
|
return (await requireMesh(pool, request.meshId)).files
|
|
25
36
|
.attachments(options)
|
|
@@ -4,8 +4,9 @@ import type { Mesh } from '../core/mesh.ts';
|
|
|
4
4
|
import { type SenderLookup } from '../core/senders.ts';
|
|
5
5
|
import { type MeshPool } from './current-mesh.ts';
|
|
6
6
|
import type { WatchableOptions } from './watchable.ts';
|
|
7
|
+
import type { NetworkSource } from './network.ts';
|
|
7
8
|
import type { CapabilityHandlers } from '../../spec/capabilities.d.ts';
|
|
8
|
-
type ChunkCapabilities = Pick<CapabilityHandlers, 'appendChunk' | 'updateChunk' | 'resolveApproval' | 'listChunks' | 'listAttachmentsByKind' | 'chunksWatch' | 'chunksDeltaWatch' | 'runRequestsWatch' | 'takeModelRequest' | 'settleModelRequest' | 'cancelModelRequest' | 'reopenModelRequest' | 'modelRequestsWatch' | 'takeRunRequest'>;
|
|
9
|
+
type ChunkCapabilities = Pick<CapabilityHandlers, 'appendChunk' | 'updateChunk' | 'resolveApproval' | 'listChunks' | 'listAttachmentsByKind' | 'chunksWatch' | 'chunksDeltaWatch' | 'runRequestsWatch' | 'takeModelRequest' | 'settleModelRequest' | 'cancelModelRequest' | 'reopenModelRequest' | 'modelRequestsWatch' | 'takeRunRequest' | 'continueRunHere'>;
|
|
9
10
|
export interface ChunkSenders {
|
|
10
11
|
readonly lookup: SenderLookup;
|
|
11
12
|
readonly changes: WatchableOptions['changes'];
|
|
@@ -15,6 +16,7 @@ export interface ChunksApiOptions {
|
|
|
15
16
|
readonly account?: (() => Mesh | null) | null;
|
|
16
17
|
readonly agents?: AgentPicks | null;
|
|
17
18
|
readonly senders?: ChunkSenders | null;
|
|
19
|
+
readonly network?: Pick<NetworkSource, 'snapshot'> | null;
|
|
18
20
|
}
|
|
19
|
-
export declare function createChunksApi(pool: MeshPool, deviceId: Buffer | null, { log, account, agents, senders }: ChunksApiOptions): ChunkCapabilities;
|
|
21
|
+
export declare function createChunksApi(pool: MeshPool, deviceId: Buffer | null, { log, account, agents, senders, network }: ChunksApiOptions): ChunkCapabilities;
|
|
20
22
|
export {};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { answersRound, appendChunk, listAttachmentsByKind, listChunks, listRunRequests, othersApproval, readChunk, recordLinks, requireChatIn, requireOwnRun, requireProjectMember, resolveApproval, updateChunk } from '../core/chunk.js';
|
|
2
2
|
import { cancelModelRequest, listModelRequests, reopenModelRequest, settleModelRequest, takeModelRequest } from '../core/model-requests.js';
|
|
3
|
-
import { takeRunRequest } from '../core/run-requests.js';
|
|
3
|
+
import { continueRunHere, takeRunRequest } from '../core/run-requests.js';
|
|
4
4
|
import { accountPicks } from '../core/shared-agents.js';
|
|
5
5
|
import { chunkDeltaStream, chunkDeltas } from './chunk-delta.js';
|
|
6
6
|
import { ourSenderName, withSenders } from '../core/senders.js';
|
|
7
7
|
import { meshWatchable, requireMesh } from './current-mesh.js';
|
|
8
8
|
import { bounds } from './range.js';
|
|
9
9
|
import { CoreError } from '../errors.js';
|
|
10
|
-
export function createChunksApi(pool, deviceId, { log, account = null, agents = null, senders = null }) {
|
|
10
|
+
export function createChunksApi(pool, deviceId, { log, account = null, agents = null, senders = null, network = null }) {
|
|
11
11
|
const transcript = async ({ meshId, ...input }, mesh) => {
|
|
12
12
|
mesh.focusChat(input.chatId);
|
|
13
13
|
const [chunks, named] = await Promise.all([
|
|
@@ -91,7 +91,10 @@ export function createChunksApi(pool, deviceId, { log, account = null, agents =
|
|
|
91
91
|
return { ok: true };
|
|
92
92
|
},
|
|
93
93
|
modelRequestsWatch: meshWatchable(pool, async (_request, mesh) => ({ chunks: (await listModelRequests(mesh)).map(readChunk) }), { name: 'modelRequestsWatch', log }),
|
|
94
|
-
takeRunRequest: async ({ meshId, chunkId }) => readChunk(await takeRunRequest(await requireMesh(pool, meshId), chunkId))
|
|
94
|
+
takeRunRequest: async ({ meshId, chunkId }) => readChunk(await takeRunRequest(await requireMesh(pool, meshId), chunkId)),
|
|
95
|
+
continueRunHere: async ({ meshId, chunkId }) => readChunk(await continueRunHere(await requireMesh(pool, meshId), chunkId, {
|
|
96
|
+
offline: network?.snapshot().state === 'offline'
|
|
97
|
+
}))
|
|
95
98
|
};
|
|
96
99
|
}
|
|
97
100
|
function chunkSelection({ chatId, type, types, ...rest }) {
|
|
@@ -31,27 +31,15 @@ function toEngineDevice(device, overrides = {}) {
|
|
|
31
31
|
}
|
|
32
32
|
export function createDevicesApi(pool, { deviceId, log, removeWriter, renameLocal, saveProfileLocal, readLocalProfile, isAccount }) {
|
|
33
33
|
const mustGetDevice = async (mesh, id) => {
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
if (!device) {
|
|
38
|
-
throw new CoreError('DEVICE_NOT_FOUND', [b4a.toHex(id)]);
|
|
39
|
-
}
|
|
40
|
-
return device;
|
|
41
|
-
}
|
|
42
|
-
finally {
|
|
43
|
-
await snap.close();
|
|
34
|
+
const device = await mesh.view.get(DEVICES, { id });
|
|
35
|
+
if (!device) {
|
|
36
|
+
throw new CoreError('DEVICE_NOT_FOUND', [b4a.toHex(id)]);
|
|
44
37
|
}
|
|
38
|
+
return device;
|
|
45
39
|
};
|
|
46
40
|
const list = async (mesh) => {
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
const devices = await snap.find(DEVICES).toArray();
|
|
50
|
-
return { devices: devices.map((device) => toEngineDevice(device)) };
|
|
51
|
-
}
|
|
52
|
-
finally {
|
|
53
|
-
await snap.close();
|
|
54
|
-
}
|
|
41
|
+
const devices = await mesh.view.find(DEVICES).toArray();
|
|
42
|
+
return { devices: devices.map((device) => toEngineDevice(device)) };
|
|
55
43
|
};
|
|
56
44
|
return {
|
|
57
45
|
listDevices: async (request) => list(await requireMesh(pool, request.meshId)),
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { type AgentPicks } from '../core/shared-agents.ts';
|
|
2
2
|
import type { Mesh } from '../core/mesh.ts';
|
|
3
3
|
import { type SenderLookup } from '../core/senders.ts';
|
|
4
|
+
import { type CatalogSkill } from '../core/skill-availability.ts';
|
|
4
5
|
import { type MeshPool } from './current-mesh.ts';
|
|
5
6
|
import type { MeshStatusSource } from './mesh.ts';
|
|
6
7
|
import type { CapabilityHandlers } from '../../spec/capabilities.d.ts';
|
|
8
|
+
import type { LoggerInterface } from '@qvac/logging';
|
|
7
9
|
export interface ExecutionApiOptions {
|
|
8
10
|
readonly account?: () => Mesh | null;
|
|
9
11
|
readonly agents?: AgentPicks | null;
|
|
10
12
|
readonly senders?: SenderLookup | null;
|
|
11
|
-
readonly peers?: Pick<MeshStatusSource, 'snapshot'> | null;
|
|
13
|
+
readonly peers?: Pick<MeshStatusSource, 'snapshot' | 'watch' | 'unwatch'> | null;
|
|
12
14
|
readonly platform?: (() => string | null) | null;
|
|
15
|
+
readonly skillCatalog?: (() => Promise<ReadonlyArray<CatalogSkill>>) | null;
|
|
16
|
+
readonly log?: LoggerInterface | null;
|
|
13
17
|
}
|
|
14
|
-
export declare function createExecutionApi(pool: MeshPool, deviceId: Buffer, { account, agents, senders, peers, platform }?: ExecutionApiOptions): Pick<CapabilityHandlers, 'sendMessage' | 'runAgent' | 'stopRun'>;
|
|
18
|
+
export declare function createExecutionApi(pool: MeshPool, deviceId: Buffer, { account, agents, senders, peers, platform, skillCatalog, log }?: ExecutionApiOptions): Pick<CapabilityHandlers, 'sendMessage' | 'runAgent' | 'stopRun' | 'chatSkillAvailability' | 'chatSkillAvailabilityWatch'>;
|
|
@@ -5,7 +5,8 @@ import { getChat, mustGetActiveChat } from '../core/chat.js';
|
|
|
5
5
|
import { parentRequestId, sendMessage } from '../core/send.js';
|
|
6
6
|
import { accountPicks } from '../core/shared-agents.js';
|
|
7
7
|
import { ourSenderName } from '../core/senders.js';
|
|
8
|
-
import {
|
|
8
|
+
import { chatSkillAvailability } from '../core/skill-availability.js';
|
|
9
|
+
import { meshWatchable, requireMesh } from './current-mesh.js';
|
|
9
10
|
import { isMobilePlatform } from '@qvac/harness/lib/models/model-catalog.ts';
|
|
10
11
|
const TERMINAL_STATES = new Set(['completed', 'failed', 'canceled']);
|
|
11
12
|
async function askableMesh(pool, meshId) {
|
|
@@ -13,13 +14,36 @@ async function askableMesh(pool, meshId) {
|
|
|
13
14
|
await requireProjectMember(mesh, meshId);
|
|
14
15
|
return mesh;
|
|
15
16
|
}
|
|
16
|
-
export function createExecutionApi(pool, deviceId, { account = () => null, agents = null, senders = null, peers = null, platform = null } = {}) {
|
|
17
|
+
export function createExecutionApi(pool, deviceId, { account = () => null, agents = null, senders = null, peers = null, platform = null, skillCatalog = null, log = null } = {}) {
|
|
17
18
|
const picks = agents ?? accountPicks(account);
|
|
18
19
|
const askable = async (meshId, agentId, refusal) => {
|
|
19
20
|
const mesh = await askableMesh(pool, meshId);
|
|
20
21
|
await picks.pick(mesh, agentId, refusal);
|
|
21
22
|
return mesh;
|
|
22
23
|
};
|
|
24
|
+
const availability = async (mesh, chatId) => ({
|
|
25
|
+
skills: await chatSkillAvailability(mesh, chatId, {
|
|
26
|
+
deviceId,
|
|
27
|
+
platform: platform?.() ?? null,
|
|
28
|
+
peers: peers?.snapshot().peerDeviceIds ?? [],
|
|
29
|
+
catalog: skillCatalog,
|
|
30
|
+
account: account()
|
|
31
|
+
})
|
|
32
|
+
});
|
|
33
|
+
const watched = new Map();
|
|
34
|
+
const availabilityChanges = {
|
|
35
|
+
watch(listener) {
|
|
36
|
+
const held = account();
|
|
37
|
+
watched.set(listener, held);
|
|
38
|
+
peers?.watch(listener);
|
|
39
|
+
held?.watch(listener);
|
|
40
|
+
},
|
|
41
|
+
unwatch(listener) {
|
|
42
|
+
peers?.unwatch(listener);
|
|
43
|
+
watched.get(listener)?.unwatch(listener);
|
|
44
|
+
watched.delete(listener);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
23
47
|
const chatAgent = async (meshId, chatId) => (await mustGetActiveChat(await askableMesh(pool, meshId), chatId)).agentId;
|
|
24
48
|
return {
|
|
25
49
|
sendMessage: async (input) => {
|
|
@@ -77,6 +101,8 @@ export function createExecutionApi(pool, deviceId, { account = () => null, agent
|
|
|
77
101
|
originDeviceId: deviceId
|
|
78
102
|
});
|
|
79
103
|
return { ok: true };
|
|
80
|
-
}
|
|
104
|
+
},
|
|
105
|
+
chatSkillAvailability: async ({ meshId, chatId }) => availability(await requireMesh(pool, meshId), chatId),
|
|
106
|
+
chatSkillAvailabilityWatch: meshWatchable(pool, (request, mesh) => availability(mesh, request.chatId), { name: 'chatSkillAvailabilityWatch', log, changes: availabilityChanges })
|
|
81
107
|
};
|
|
82
108
|
}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
+
import type { LoggerInterface } from '@qvac/logging';
|
|
1
2
|
import type { CapabilityHandlers } from '../../spec/capabilities.d.ts';
|
|
2
3
|
import { type LocalRunLogs } from '../core/local/run-logs.ts';
|
|
3
4
|
import { type MeshPool } from './current-mesh.ts';
|
|
4
|
-
|
|
5
|
+
interface HostRunLogDeps {
|
|
6
|
+
readonly deviceId: Buffer | null;
|
|
7
|
+
readonly log: LoggerInterface | null;
|
|
8
|
+
}
|
|
9
|
+
export declare function createHostRunLogApi(pool: MeshPool, runLogs: LocalRunLogs, { deviceId, log }: HostRunLogDeps): Pick<CapabilityHandlers, 'hostRunLogBegin' | 'hostRunLogAppend' | 'hostRunLogRelease'>;
|
|
10
|
+
export {};
|
|
@@ -3,7 +3,7 @@ import { isRunLogStep } from '../core/local/run-logs.js';
|
|
|
3
3
|
import { CoreError } from '../errors.js';
|
|
4
4
|
import { heldMesh, requireMesh } from './current-mesh.js';
|
|
5
5
|
const SETTLED_STATES = new Set(['completed', 'failed', 'canceled']);
|
|
6
|
-
export function createHostRunLogApi(pool, runLogs, deviceId) {
|
|
6
|
+
export function createHostRunLogApi(pool, runLogs, { deviceId, log }) {
|
|
7
7
|
return {
|
|
8
8
|
hostRunLogBegin: async ({ meshId, runId }) => {
|
|
9
9
|
const mesh = await requireMesh(pool, meshId);
|
|
@@ -20,8 +20,10 @@ export function createHostRunLogApi(pool, runLogs, deviceId) {
|
|
|
20
20
|
if (!isRunLogStep(step)) {
|
|
21
21
|
throw new CoreError('RUN_LOG_STEP_INVALID', [runId]);
|
|
22
22
|
}
|
|
23
|
+
const started = Date.now();
|
|
23
24
|
const mesh = await requireMesh(pool, meshId);
|
|
24
25
|
await runLogs.append({ meshKey: mesh.key, runId, generation, step });
|
|
26
|
+
log?.debug('runs', 'host run log appended', { runId, ms: Date.now() - started });
|
|
25
27
|
return { ok: true };
|
|
26
28
|
},
|
|
27
29
|
hostRunLogRelease: async ({ meshId, runId, generation }) => {
|
|
@@ -16,7 +16,7 @@ import { type MeshStatusSource } from './mesh.ts';
|
|
|
16
16
|
import { type NameOf, type ProjectOf } from './projects.ts';
|
|
17
17
|
import { type BlindPeeringSource, type NetworkSource } from './network.ts';
|
|
18
18
|
import { type CustomModelPreviewSource } from './custom-models.ts';
|
|
19
|
-
import type { IndexingEmbedder, VectorIndex } from '../core/files/index.ts';
|
|
19
|
+
import type { IndexingEmbedder, KnowledgeExtractors, VectorIndex } from '../core/files/index.ts';
|
|
20
20
|
interface ApiDeps {
|
|
21
21
|
state?: Awaited<ReturnType<typeof openLocalStore>> | null;
|
|
22
22
|
mesh?: MeshPool | null;
|
|
@@ -72,6 +72,7 @@ interface ApiDeps {
|
|
|
72
72
|
} | null;
|
|
73
73
|
ragIndex?: ((meshId: string) => VectorIndex | null) | null;
|
|
74
74
|
ragEmbed?: ((meshId: string) => IndexingEmbedder | null) | null;
|
|
75
|
+
ragExtractors?: (() => KnowledgeExtractors | undefined) | null;
|
|
75
76
|
platform?: (() => string | null) | null;
|
|
76
77
|
deletedProject?: ((projectId: string) => Promise<boolean>) | null;
|
|
77
78
|
projectOf?: ProjectOf | null;
|
|
@@ -92,6 +93,7 @@ interface ApiDeps {
|
|
|
92
93
|
skills?: ((agentId?: string | null, modelName?: string | null, options?: SkillOptions) => Promise<unknown>) | null;
|
|
93
94
|
skillCatalog?: ((agentId?: string | null, modelName?: string | null, options?: {
|
|
94
95
|
readonly refresh?: boolean;
|
|
96
|
+
readonly skipCredentialProbe?: boolean;
|
|
95
97
|
}) => Promise<AssistantSkillCatalogResponse>) | null;
|
|
96
98
|
tools?: (() => Promise<AssistantToolCatalogResponse>) | null;
|
|
97
99
|
listManagedSkills?: ((agentId?: string | null) => Promise<AssistantManagedSkillsResponse>) | null;
|
|
@@ -16,6 +16,7 @@ import { createDevicesApi } from './devices.js';
|
|
|
16
16
|
import { createDiagnosticsApi } from './diagnostics.js';
|
|
17
17
|
import { createInferenceCallsApi } from './inference-calls.js';
|
|
18
18
|
import { createExecutionApi } from './execution.js';
|
|
19
|
+
import { rememberCatalog } from '../core/skill-availability.js';
|
|
19
20
|
import { createHostRunLogApi } from './host-run-log.js';
|
|
20
21
|
import { createKnowledgeApi } from './knowledge.js';
|
|
21
22
|
import { isMobilePlatform } from '@qvac/harness/lib/models/model-catalog.ts';
|
|
@@ -43,6 +44,7 @@ export function createApi(deps = {}) {
|
|
|
43
44
|
const { retryModelDownload, lifecycle, deleteChatKvCache, compactChat, pushSkillSecret, speakStream, skills, skillCatalog, listManagedSkills, readSkillFile, writeSkillFile, copySkillForEdit, deleteOverlaySkill } = deps;
|
|
44
45
|
const state = deps.state ?? null;
|
|
45
46
|
const log = deps.log ?? null;
|
|
47
|
+
const catalog = skillCatalog ? rememberCatalog(skillCatalog) : null;
|
|
46
48
|
const members = mesh && deps.meshStatus ? createMembersApi(mesh, deps.meshStatus, { state, log }) : null;
|
|
47
49
|
const folders = state && deps.storageRoot ? new AgentFolders(state, { storageRoot: deps.storageRoot }) : null;
|
|
48
50
|
const handlers = {
|
|
@@ -90,7 +92,8 @@ export function createApi(deps = {}) {
|
|
|
90
92
|
log,
|
|
91
93
|
account: deps.accountMesh,
|
|
92
94
|
agents: deps.agentPicks ?? null,
|
|
93
|
-
senders: deps.senders
|
|
95
|
+
senders: deps.senders,
|
|
96
|
+
network: deps.network
|
|
94
97
|
})
|
|
95
98
|
: null),
|
|
96
99
|
...(mesh && deps.deviceId && deps.deviceHost
|
|
@@ -116,6 +119,7 @@ export function createApi(deps = {}) {
|
|
|
116
119
|
? createRagApi(routed(mesh, 'add-knowledge'), {
|
|
117
120
|
index: deps.ragIndex ?? (() => null),
|
|
118
121
|
embedder: deps.ragEmbed ?? (() => null),
|
|
122
|
+
extractors: deps.ragExtractors ?? (() => undefined),
|
|
119
123
|
effectiveCtxSize: state
|
|
120
124
|
? async (agent) => effectiveCtxSize(agent, {
|
|
121
125
|
appCtxSize: (await state.getAppConfigRow())?.ctxSize ?? 0,
|
|
@@ -131,11 +135,16 @@ export function createApi(deps = {}) {
|
|
|
131
135
|
agents: deps.agentPicks ?? null,
|
|
132
136
|
senders: deps.senders?.lookup,
|
|
133
137
|
peers: deps.meshStatus ?? null,
|
|
134
|
-
platform: deps.platform ?? null
|
|
138
|
+
platform: deps.platform ?? null,
|
|
139
|
+
skillCatalog: catalog?.last ?? null,
|
|
140
|
+
log
|
|
135
141
|
})
|
|
136
142
|
: null),
|
|
137
143
|
...(mesh && state
|
|
138
|
-
? createHostRunLogApi(routed(mesh, 'append-chunk'), state.runLogs,
|
|
144
|
+
? createHostRunLogApi(routed(mesh, 'append-chunk'), state.runLogs, {
|
|
145
|
+
deviceId: deps.deviceId ?? null,
|
|
146
|
+
log
|
|
147
|
+
})
|
|
139
148
|
: null),
|
|
140
149
|
...(mesh ? createSyncApi(mesh, log) : null),
|
|
141
150
|
...(mesh ? createToolConfigsApi(routed(mesh, 'put-tool-configs'), log) : null),
|
|
@@ -152,7 +161,9 @@ export function createApi(deps = {}) {
|
|
|
152
161
|
...(deps.meshStatus && members
|
|
153
162
|
? createMeshApi(deps.meshStatus, members.updateMember, log)
|
|
154
163
|
: null),
|
|
155
|
-
...(mesh && deps.meshStatus
|
|
164
|
+
...(mesh && deps.meshStatus
|
|
165
|
+
? createWorkspaceApi(mesh, deps.meshStatus, { nameOf: deps.nameOf ?? (() => null), log })
|
|
166
|
+
: null),
|
|
156
167
|
...(mesh && deps.meshStatus
|
|
157
168
|
? createProjectsApi(mesh, deps.meshStatus, {
|
|
158
169
|
account: deps.accountMesh ?? (() => null),
|
|
@@ -231,8 +242,8 @@ export function createApi(deps = {}) {
|
|
|
231
242
|
})
|
|
232
243
|
})
|
|
233
244
|
: undefined,
|
|
234
|
-
skillCatalog:
|
|
235
|
-
? async (req) =>
|
|
245
|
+
skillCatalog: catalog
|
|
246
|
+
? async (req) => catalog.read(req?.agentId, req?.modelName, { refresh: req?.refresh === true })
|
|
236
247
|
: undefined,
|
|
237
248
|
listManagedSkills: listManagedSkills
|
|
238
249
|
? async (req) => listManagedSkills(req?.agentId)
|