@qvac/core 0.0.0 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +198 -0
- package/NOTICE.md +13 -0
- package/README.md +694 -0
- package/SECURITY.md +6 -0
- package/dist/assistant.bundle +47256 -0
- package/dist/assistant.cjs +18 -0
- package/dist/assistant.d.ts +8 -0
- package/dist/prebuilds-manifest.json +380 -0
- package/dist-lib/client.d.ts +2 -0
- package/dist-lib/client.js +1 -0
- package/dist-lib/index.d.ts +13 -0
- package/dist-lib/index.js +10 -0
- package/dist-lib/lib/agent-icons.d.ts +3 -0
- package/dist-lib/lib/agent-icons.js +1 -0
- package/dist-lib/lib/api/agents.d.ts +5 -0
- package/dist-lib/lib/api/agents.js +38 -0
- package/dist-lib/lib/api/app-config.d.ts +5 -0
- package/dist-lib/lib/api/app-config.js +108 -0
- package/dist-lib/lib/api/approval-rules.d.ts +3 -0
- package/dist-lib/lib/api/approval-rules.js +9 -0
- package/dist-lib/lib/api/attachments.d.ts +8 -0
- package/dist-lib/lib/api/attachments.js +15 -0
- package/dist-lib/lib/api/chat-groups.d.ts +5 -0
- package/dist-lib/lib/api/chat-groups.js +12 -0
- package/dist-lib/lib/api/chat.d.ts +5 -0
- package/dist-lib/lib/api/chat.js +38 -0
- package/dist-lib/lib/api/chunks.d.ts +5 -0
- package/dist-lib/lib/api/chunks.js +61 -0
- package/dist-lib/lib/api/config.d.ts +5 -0
- package/dist-lib/lib/api/config.js +15 -0
- package/dist-lib/lib/api/current-mesh.d.ts +5 -0
- package/dist-lib/lib/api/current-mesh.js +12 -0
- package/dist-lib/lib/api/custom-models.d.ts +5 -0
- package/dist-lib/lib/api/custom-models.js +45 -0
- package/dist-lib/lib/api/devices.d.ts +8 -0
- package/dist-lib/lib/api/devices.js +125 -0
- package/dist-lib/lib/api/diagnostics.d.ts +7 -0
- package/dist-lib/lib/api/diagnostics.js +7 -0
- package/dist-lib/lib/api/effective-ctx-size.d.ts +2 -0
- package/dist-lib/lib/api/effective-ctx-size.js +10 -0
- package/dist-lib/lib/api/execution.d.ts +3 -0
- package/dist-lib/lib/api/execution.js +45 -0
- package/dist-lib/lib/api/files.d.ts +3 -0
- package/dist-lib/lib/api/files.js +48 -0
- package/dist-lib/lib/api/index.d.ts +62 -0
- package/dist-lib/lib/api/index.js +172 -0
- package/dist-lib/lib/api/instrument.d.ts +2 -0
- package/dist-lib/lib/api/instrument.js +86 -0
- package/dist-lib/lib/api/knowledge.d.ts +8 -0
- package/dist-lib/lib/api/knowledge.js +26 -0
- package/dist-lib/lib/api/logs.d.ts +14 -0
- package/dist-lib/lib/api/logs.js +116 -0
- package/dist-lib/lib/api/mesh.d.ts +13 -0
- package/dist-lib/lib/api/mesh.js +25 -0
- package/dist-lib/lib/api/model-download.d.ts +5 -0
- package/dist-lib/lib/api/model-download.js +47 -0
- package/dist-lib/lib/api/network.d.ts +8 -0
- package/dist-lib/lib/api/network.js +6 -0
- package/dist-lib/lib/api/notifications.d.ts +21 -0
- package/dist-lib/lib/api/notifications.js +108 -0
- package/dist-lib/lib/api/rag.d.ts +7 -0
- package/dist-lib/lib/api/rag.js +216 -0
- package/dist-lib/lib/api/sync.d.ts +3 -0
- package/dist-lib/lib/api/sync.js +6 -0
- package/dist-lib/lib/api/tool-activity.d.ts +5 -0
- package/dist-lib/lib/api/tool-activity.js +53 -0
- package/dist-lib/lib/api/tool-configs.d.ts +6 -0
- package/dist-lib/lib/api/tool-configs.js +27 -0
- package/dist-lib/lib/api/watchable.d.ts +12 -0
- package/dist-lib/lib/api/watchable.js +121 -0
- package/dist-lib/lib/assistant-client.d.ts +21 -0
- package/dist-lib/lib/assistant-client.js +52 -0
- package/dist-lib/lib/assistant-tree.d.ts +50 -0
- package/dist-lib/lib/assistant-tree.js +184 -0
- package/dist-lib/lib/assistant.d.ts +425 -0
- package/dist-lib/lib/assistant.js +2706 -0
- package/dist-lib/lib/audio-format.d.ts +4 -0
- package/dist-lib/lib/audio-format.js +4 -0
- package/dist-lib/lib/chat-title.d.ts +5 -0
- package/dist-lib/lib/chat-title.js +58 -0
- package/dist-lib/lib/client.d.ts +25 -0
- package/dist-lib/lib/client.js +53 -0
- package/dist-lib/lib/collabora/convert.d.ts +9 -0
- package/dist-lib/lib/collabora/convert.js +62 -0
- package/dist-lib/lib/collabora/entry.d.ts +1 -0
- package/dist-lib/lib/collabora/entry.js +44 -0
- package/dist-lib/lib/collabora/protocol.d.ts +15 -0
- package/dist-lib/lib/collabora/protocol.js +24 -0
- package/dist-lib/lib/collabora/worker.d.ts +5 -0
- package/dist-lib/lib/collabora/worker.js +111 -0
- package/dist-lib/lib/compaction.d.ts +30 -0
- package/dist-lib/lib/compaction.js +95 -0
- package/dist-lib/lib/constants.d.ts +4 -0
- package/dist-lib/lib/constants.js +4 -0
- package/dist-lib/lib/core/agent.d.ts +15 -0
- package/dist-lib/lib/core/agent.js +149 -0
- package/dist-lib/lib/core/app-build.d.ts +7 -0
- package/dist-lib/lib/core/app-build.js +1 -0
- package/dist-lib/lib/core/approval-rules.d.ts +15 -0
- package/dist-lib/lib/core/approval-rules.js +41 -0
- package/dist-lib/lib/core/async-iterable.d.ts +13 -0
- package/dist-lib/lib/core/async-iterable.js +65 -0
- package/dist-lib/lib/core/attachment-link.d.ts +7 -0
- package/dist-lib/lib/core/attachment-link.js +6 -0
- package/dist-lib/lib/core/audio-attachment.d.ts +1 -0
- package/dist-lib/lib/core/audio-attachment.js +4 -0
- package/dist-lib/lib/core/blind-peers.d.ts +6 -0
- package/dist-lib/lib/core/blind-peers.js +13 -0
- package/dist-lib/lib/core/chat-activity.d.ts +7 -0
- package/dist-lib/lib/core/chat-activity.js +244 -0
- package/dist-lib/lib/core/chat-group.d.ts +14 -0
- package/dist-lib/lib/core/chat-group.js +79 -0
- package/dist-lib/lib/core/chat-search.d.ts +17 -0
- package/dist-lib/lib/core/chat-search.js +199 -0
- package/dist-lib/lib/core/chat.d.ts +37 -0
- package/dist-lib/lib/core/chat.js +196 -0
- package/dist-lib/lib/core/chunk.d.ts +61 -0
- package/dist-lib/lib/core/chunk.js +212 -0
- package/dist-lib/lib/core/contract/activity.d.ts +11 -0
- package/dist-lib/lib/core/contract/activity.js +45 -0
- package/dist-lib/lib/core/contract/agents.d.ts +2 -0
- package/dist-lib/lib/core/contract/agents.js +29 -0
- package/dist-lib/lib/core/contract/approval-rules.d.ts +2 -0
- package/dist-lib/lib/core/contract/approval-rules.js +14 -0
- package/dist-lib/lib/core/contract/attestations.d.ts +2 -0
- package/dist-lib/lib/core/contract/attestations.js +14 -0
- package/dist-lib/lib/core/contract/chat-group.d.ts +2 -0
- package/dist-lib/lib/core/contract/chat-group.js +20 -0
- package/dist-lib/lib/core/contract/chat.d.ts +2 -0
- package/dist-lib/lib/core/contract/chat.js +18 -0
- package/dist-lib/lib/core/contract/chunks.d.ts +2 -0
- package/dist-lib/lib/core/contract/chunks.js +156 -0
- package/dist-lib/lib/core/contract/devices.d.ts +2 -0
- package/dist-lib/lib/core/contract/devices.js +110 -0
- package/dist-lib/lib/core/contract/index.d.ts +2 -0
- package/dist-lib/lib/core/contract/index.js +30 -0
- package/dist-lib/lib/core/contract/indexing.d.ts +4 -0
- package/dist-lib/lib/core/contract/indexing.js +82 -0
- package/dist-lib/lib/core/contract/knowledge.d.ts +2 -0
- package/dist-lib/lib/core/contract/knowledge.js +55 -0
- package/dist-lib/lib/core/contract/members.d.ts +2 -0
- package/dist-lib/lib/core/contract/members.js +96 -0
- package/dist-lib/lib/core/contract/seed-defaults.d.ts +2 -0
- package/dist-lib/lib/core/contract/seed-defaults.js +29 -0
- package/dist-lib/lib/core/contract/tool-activity.d.ts +2 -0
- package/dist-lib/lib/core/contract/tool-activity.js +25 -0
- package/dist-lib/lib/core/contract/tool-configs.d.ts +2 -0
- package/dist-lib/lib/core/contract/tool-configs.js +50 -0
- package/dist-lib/lib/core/contract/types.d.ts +11 -0
- package/dist-lib/lib/core/contract/types.js +1 -0
- package/dist-lib/lib/core/contract/writers.d.ts +2 -0
- package/dist-lib/lib/core/contract/writers.js +112 -0
- package/dist-lib/lib/core/cpu-info-node.d.ts +3 -0
- package/dist-lib/lib/core/cpu-info-node.js +2 -0
- package/dist-lib/lib/core/departures.d.ts +41 -0
- package/dist-lib/lib/core/departures.js +145 -0
- package/dist-lib/lib/core/device-attestation.d.ts +6 -0
- package/dist-lib/lib/core/device-attestation.js +12 -0
- package/dist-lib/lib/core/devices.d.ts +14 -0
- package/dist-lib/lib/core/devices.js +11 -0
- package/dist-lib/lib/core/document-attachment.d.ts +22 -0
- package/dist-lib/lib/core/document-attachment.js +35 -0
- package/dist-lib/lib/core/files/attachments.d.ts +8 -0
- package/dist-lib/lib/core/files/attachments.js +50 -0
- package/dist-lib/lib/core/files/index.d.ts +133 -0
- package/dist-lib/lib/core/files/index.js +585 -0
- package/dist-lib/lib/core/files/knowledge.d.ts +9 -0
- package/dist-lib/lib/core/files/knowledge.js +31 -0
- package/dist-lib/lib/core/files/preview/image.d.ts +4 -0
- package/dist-lib/lib/core/files/preview/image.js +42 -0
- package/dist-lib/lib/core/files/preview/index.d.ts +33 -0
- package/dist-lib/lib/core/files/preview/index.js +161 -0
- package/dist-lib/lib/core/files/processing/claims.d.ts +26 -0
- package/dist-lib/lib/core/files/processing/claims.js +89 -0
- package/dist-lib/lib/core/files/processing/document.d.ts +100 -0
- package/dist-lib/lib/core/files/processing/document.js +101 -0
- package/dist-lib/lib/core/files/processing/index.d.ts +75 -0
- package/dist-lib/lib/core/files/processing/index.js +295 -0
- package/dist-lib/lib/core/files/processing/ownership.d.ts +11 -0
- package/dist-lib/lib/core/files/processing/ownership.js +41 -0
- package/dist-lib/lib/core/files/processing/protocol.d.ts +29 -0
- package/dist-lib/lib/core/files/processing/protocol.js +70 -0
- package/dist-lib/lib/core/files/processing/settle.d.ts +10 -0
- package/dist-lib/lib/core/files/processing/settle.js +75 -0
- package/dist-lib/lib/core/files/processing/source.d.ts +36 -0
- package/dist-lib/lib/core/files/processing/source.js +96 -0
- package/dist-lib/lib/core/files/processing/state.d.ts +64 -0
- package/dist-lib/lib/core/files/processing/state.js +118 -0
- package/dist-lib/lib/core/files/rag/artifact/codec.d.ts +3 -0
- package/dist-lib/lib/core/files/rag/artifact/codec.js +172 -0
- package/dist-lib/lib/core/files/rag/artifact/id.d.ts +10 -0
- package/dist-lib/lib/core/files/rag/artifact/id.js +39 -0
- package/dist-lib/lib/core/files/rag/artifact/types.d.ts +24 -0
- package/dist-lib/lib/core/files/rag/artifact/types.js +41 -0
- package/dist-lib/lib/core/files/rag/build.d.ts +25 -0
- package/dist-lib/lib/core/files/rag/build.js +60 -0
- package/dist-lib/lib/core/files/rag/chunk/chunking.d.ts +12 -0
- package/dist-lib/lib/core/files/rag/chunk/chunking.js +117 -0
- package/dist-lib/lib/core/files/rag/chunk/metadata.d.ts +30 -0
- package/dist-lib/lib/core/files/rag/chunk/metadata.js +89 -0
- package/dist-lib/lib/core/files/rag/chunk/tokenizer.d.ts +7 -0
- package/dist-lib/lib/core/files/rag/chunk/tokenizer.js +18 -0
- package/dist-lib/lib/core/files/rag/document-types.d.ts +11 -0
- package/dist-lib/lib/core/files/rag/document-types.js +94 -0
- package/dist-lib/lib/core/files/rag/extract/csv-text.d.ts +1 -0
- package/dist-lib/lib/core/files/rag/extract/csv-text.js +117 -0
- package/dist-lib/lib/core/files/rag/extract/document-types.d.ts +22 -0
- package/dist-lib/lib/core/files/rag/extract/document-types.js +152 -0
- package/dist-lib/lib/core/files/rag/extract/extract.d.ts +17 -0
- package/dist-lib/lib/core/files/rag/extract/extract.js +81 -0
- package/dist-lib/lib/core/files/rag/extract/html-table-text.d.ts +1 -0
- package/dist-lib/lib/core/files/rag/extract/html-table-text.js +125 -0
- package/dist-lib/lib/core/files/rag/extract/html-text.d.ts +1 -0
- package/dist-lib/lib/core/files/rag/extract/html-text.js +132 -0
- package/dist-lib/lib/core/files/rag/extract/office-collabora.d.ts +2 -0
- package/dist-lib/lib/core/files/rag/extract/office-collabora.js +8 -0
- package/dist-lib/lib/core/files/rag/extract/pdf-platform.d.ts +17 -0
- package/dist-lib/lib/core/files/rag/extract/pdf-platform.js +141 -0
- package/dist-lib/lib/core/files/rag/extract/pdf-text.d.ts +12 -0
- package/dist-lib/lib/core/files/rag/extract/pdf-text.js +43 -0
- package/dist-lib/lib/core/files/rag/extract/rtf-text.d.ts +1 -0
- package/dist-lib/lib/core/files/rag/extract/rtf-text.js +15 -0
- package/dist-lib/lib/core/files/rag/extract/text-decoding.d.ts +1 -0
- package/dist-lib/lib/core/files/rag/extract/text-decoding.js +91 -0
- package/dist-lib/lib/core/files/rag/extract/types.d.ts +36 -0
- package/dist-lib/lib/core/files/rag/extract/types.js +12 -0
- package/dist-lib/lib/core/files/rag/extract/utf.d.ts +2 -0
- package/dist-lib/lib/core/files/rag/extract/utf.js +18 -0
- package/dist-lib/lib/core/files/rag/index.d.ts +54 -0
- package/dist-lib/lib/core/files/rag/index.js +79 -0
- package/dist-lib/lib/core/files/rag/limits.d.ts +2 -0
- package/dist-lib/lib/core/files/rag/limits.js +2 -0
- package/dist-lib/lib/core/files/rag/load.d.ts +28 -0
- package/dist-lib/lib/core/files/rag/load.js +250 -0
- package/dist-lib/lib/core/files/rag/models.d.ts +1 -0
- package/dist-lib/lib/core/files/rag/models.js +1 -0
- package/dist-lib/lib/core/files/rag/policy.d.ts +2 -0
- package/dist-lib/lib/core/files/rag/policy.js +23 -0
- package/dist-lib/lib/core/files/rag/produce.d.ts +21 -0
- package/dist-lib/lib/core/files/rag/produce.js +214 -0
- package/dist-lib/lib/core/files/rag/retrieval/citation-match.d.ts +2 -0
- package/dist-lib/lib/core/files/rag/retrieval/citation-match.js +16 -0
- package/dist-lib/lib/core/files/rag/retrieval/coverage.d.ts +4 -0
- package/dist-lib/lib/core/files/rag/retrieval/coverage.js +48 -0
- package/dist-lib/lib/core/files/rag/retrieval/diversity.d.ts +10 -0
- package/dist-lib/lib/core/files/rag/retrieval/diversity.js +37 -0
- package/dist-lib/lib/core/files/rag/retrieval/floor.d.ts +5 -0
- package/dist-lib/lib/core/files/rag/retrieval/floor.js +21 -0
- package/dist-lib/lib/core/files/rag/retrieval/format.d.ts +6 -0
- package/dist-lib/lib/core/files/rag/retrieval/format.js +21 -0
- package/dist-lib/lib/core/files/rag/retrieval/full-text.d.ts +22 -0
- package/dist-lib/lib/core/files/rag/retrieval/full-text.js +137 -0
- package/dist-lib/lib/core/files/rag/retrieval/knowledge.d.ts +2 -0
- package/dist-lib/lib/core/files/rag/retrieval/knowledge.js +53 -0
- package/dist-lib/lib/core/files/rag/retrieval/notices.d.ts +16 -0
- package/dist-lib/lib/core/files/rag/retrieval/notices.js +27 -0
- package/dist-lib/lib/core/files/rag/retrieval/scoring.d.ts +8 -0
- package/dist-lib/lib/core/files/rag/retrieval/scoring.js +82 -0
- package/dist-lib/lib/core/files/rag/retrieval/search.d.ts +3 -0
- package/dist-lib/lib/core/files/rag/retrieval/search.js +46 -0
- package/dist-lib/lib/core/files/rag/retrieval/selection.d.ts +10 -0
- package/dist-lib/lib/core/files/rag/retrieval/selection.js +63 -0
- package/dist-lib/lib/core/files/rag/retrieval/source-tag-filter.d.ts +6 -0
- package/dist-lib/lib/core/files/rag/retrieval/source-tag-filter.js +79 -0
- package/dist-lib/lib/core/files/rag/retrieval/sources.d.ts +13 -0
- package/dist-lib/lib/core/files/rag/retrieval/sources.js +20 -0
- package/dist-lib/lib/core/files/rag/retrieval/target.d.ts +13 -0
- package/dist-lib/lib/core/files/rag/retrieval/target.js +89 -0
- package/dist-lib/lib/core/files/rag/retrieval/terms.d.ts +8 -0
- package/dist-lib/lib/core/files/rag/retrieval/terms.js +70 -0
- package/dist-lib/lib/core/files/rag/retrieval/types.d.ts +28 -0
- package/dist-lib/lib/core/files/rag/retrieval/types.js +1 -0
- package/dist-lib/lib/core/files/rag/retrieval/web-sources.d.ts +8 -0
- package/dist-lib/lib/core/files/rag/retrieval/web-sources.js +41 -0
- package/dist-lib/lib/core/files/rag/retrieval/whole-document-query.d.ts +1 -0
- package/dist-lib/lib/core/files/rag/retrieval/whole-document-query.js +96 -0
- package/dist-lib/lib/core/files/rag/vector/memory.d.ts +15 -0
- package/dist-lib/lib/core/files/rag/vector/memory.js +135 -0
- package/dist-lib/lib/core/files/rag/vector/types.d.ts +28 -0
- package/dist-lib/lib/core/files/rag/vector/types.js +1 -0
- package/dist-lib/lib/core/files/records/chunks.d.ts +3 -0
- package/dist-lib/lib/core/files/records/chunks.js +12 -0
- package/dist-lib/lib/core/files/records/index.d.ts +10 -0
- package/dist-lib/lib/core/files/records/index.js +8 -0
- package/dist-lib/lib/core/files/records/knowledge.d.ts +22 -0
- package/dist-lib/lib/core/files/records/knowledge.js +105 -0
- package/dist-lib/lib/core/files/records/linkage.d.ts +11 -0
- package/dist-lib/lib/core/files/records/linkage.js +27 -0
- package/dist-lib/lib/core/files/records/output.d.ts +8 -0
- package/dist-lib/lib/core/files/records/output.js +38 -0
- package/dist-lib/lib/core/files/records/reclaim.d.ts +5 -0
- package/dist-lib/lib/core/files/records/reclaim.js +73 -0
- package/dist-lib/lib/core/files/records/routing.d.ts +23 -0
- package/dist-lib/lib/core/files/records/routing.js +62 -0
- package/dist-lib/lib/core/files/records/source.d.ts +16 -0
- package/dist-lib/lib/core/files/records/source.js +70 -0
- package/dist-lib/lib/core/files/records/sweep.d.ts +2 -0
- package/dist-lib/lib/core/files/records/sweep.js +30 -0
- package/dist-lib/lib/core/files/store/blob.d.ts +29 -0
- package/dist-lib/lib/core/files/store/blob.js +98 -0
- package/dist-lib/lib/core/files/store/index.d.ts +36 -0
- package/dist-lib/lib/core/files/store/index.js +89 -0
- package/dist-lib/lib/core/files/store/inline.d.ts +8 -0
- package/dist-lib/lib/core/files/store/inline.js +38 -0
- package/dist-lib/lib/core/files/store/reference.d.ts +27 -0
- package/dist-lib/lib/core/files/store/reference.js +168 -0
- package/dist-lib/lib/core/files/store/server.d.ts +27 -0
- package/dist-lib/lib/core/files/store/server.js +114 -0
- package/dist-lib/lib/core/files/store/sweep.d.ts +2 -0
- package/dist-lib/lib/core/files/store/sweep.js +45 -0
- package/dist-lib/lib/core/files/upload-input.d.ts +27 -0
- package/dist-lib/lib/core/files/upload-input.js +52 -0
- package/dist-lib/lib/core/files/upload.d.ts +32 -0
- package/dist-lib/lib/core/files/upload.js +201 -0
- package/dist-lib/lib/core/fs-drives.d.ts +18 -0
- package/dist-lib/lib/core/fs-drives.js +58 -0
- package/dist-lib/lib/core/gpu-info-node.d.ts +3 -0
- package/dist-lib/lib/core/gpu-info-node.js +2 -0
- package/dist-lib/lib/core/handoff-channel.d.ts +46 -0
- package/dist-lib/lib/core/handoff-channel.js +102 -0
- package/dist-lib/lib/core/health-assistant.d.ts +7 -0
- package/dist-lib/lib/core/health-assistant.js +24 -0
- package/dist-lib/lib/core/helpers/index.d.ts +5 -0
- package/dist-lib/lib/core/helpers/index.js +74 -0
- package/dist-lib/lib/core/hosted-agents.d.ts +36 -0
- package/dist-lib/lib/core/hosted-agents.js +127 -0
- package/dist-lib/lib/core/id.d.ts +1 -0
- package/dist-lib/lib/core/id.js +5 -0
- package/dist-lib/lib/core/identity.d.ts +14 -0
- package/dist-lib/lib/core/identity.js +45 -0
- package/dist-lib/lib/core/image/cache-sweep.d.ts +12 -0
- package/dist-lib/lib/core/image/cache-sweep.js +67 -0
- package/dist-lib/lib/core/image/normalize.d.ts +3 -0
- package/dist-lib/lib/core/image/normalize.js +49 -0
- package/dist-lib/lib/core/image/sniff.d.ts +3 -0
- package/dist-lib/lib/core/image/sniff.js +149 -0
- package/dist-lib/lib/core/invite.d.ts +14 -0
- package/dist-lib/lib/core/invite.js +36 -0
- package/dist-lib/lib/core/local/index.d.ts +71 -0
- package/dist-lib/lib/core/local/index.js +391 -0
- package/dist-lib/lib/core/membership.d.ts +15 -0
- package/dist-lib/lib/core/membership.js +40 -0
- package/dist-lib/lib/core/mesh.d.ts +153 -0
- package/dist-lib/lib/core/mesh.js +509 -0
- package/dist-lib/lib/core/migrations/agent-catalog.d.ts +6 -0
- package/dist-lib/lib/core/migrations/agent-catalog.js +17 -0
- package/dist-lib/lib/core/migrations/index.d.ts +5 -0
- package/dist-lib/lib/core/migrations/index.js +7 -0
- package/dist-lib/lib/core/migrations/membership.d.ts +11 -0
- package/dist-lib/lib/core/migrations/membership.js +26 -0
- package/dist-lib/lib/core/min-version.d.ts +6 -0
- package/dist-lib/lib/core/min-version.js +31 -0
- package/dist-lib/lib/core/next-frame.d.ts +6 -0
- package/dist-lib/lib/core/next-frame.js +27 -0
- package/dist-lib/lib/core/notification.d.ts +6 -0
- package/dist-lib/lib/core/notification.js +162 -0
- package/dist-lib/lib/core/ota-config.d.ts +19 -0
- package/dist-lib/lib/core/ota-config.js +44 -0
- package/dist-lib/lib/core/prompt-history.d.ts +12 -0
- package/dist-lib/lib/core/prompt-history.js +40 -0
- package/dist-lib/lib/core/search-fold.d.ts +1 -0
- package/dist-lib/lib/core/search-fold.js +4 -0
- package/dist-lib/lib/core/secret-handoff.d.ts +17 -0
- package/dist-lib/lib/core/secret-handoff.js +29 -0
- package/dist-lib/lib/core/send.d.ts +18 -0
- package/dist-lib/lib/core/send.js +46 -0
- package/dist-lib/lib/core/skill-overlay-handoff.d.ts +25 -0
- package/dist-lib/lib/core/skill-overlay-handoff.js +50 -0
- package/dist-lib/lib/core/skill-overlay-receiver.d.ts +8 -0
- package/dist-lib/lib/core/skill-overlay-receiver.js +20 -0
- package/dist-lib/lib/core/skill-secrets.d.ts +25 -0
- package/dist-lib/lib/core/skill-secrets.js +79 -0
- package/dist-lib/lib/core/sync/chats.d.ts +3 -0
- package/dist-lib/lib/core/sync/chats.js +5 -0
- package/dist-lib/lib/core/sync/chunks.d.ts +9 -0
- package/dist-lib/lib/core/sync/chunks.js +16 -0
- package/dist-lib/lib/core/sync/devices.d.ts +4 -0
- package/dist-lib/lib/core/sync/devices.js +12 -0
- package/dist-lib/lib/core/sync/files.d.ts +16 -0
- package/dist-lib/lib/core/sync/files.js +109 -0
- package/dist-lib/lib/core/sync/index.d.ts +5 -0
- package/dist-lib/lib/core/sync/index.js +63 -0
- package/dist-lib/lib/core/sync-status.d.ts +17 -0
- package/dist-lib/lib/core/sync-status.js +129 -0
- package/dist-lib/lib/core/system-info.d.ts +24 -0
- package/dist-lib/lib/core/system-info.js +66 -0
- package/dist-lib/lib/core/tool-activity.d.ts +22 -0
- package/dist-lib/lib/core/tool-activity.js +39 -0
- package/dist-lib/lib/core/tool-configs.d.ts +13 -0
- package/dist-lib/lib/core/tool-configs.js +141 -0
- package/dist-lib/lib/core.d.ts +291 -0
- package/dist-lib/lib/core.js +2126 -0
- package/dist-lib/lib/credential-pusher.d.ts +67 -0
- package/dist-lib/lib/credential-pusher.js +290 -0
- package/dist-lib/lib/custom-model-pusher.d.ts +9 -0
- package/dist-lib/lib/custom-model-pusher.js +42 -0
- package/dist-lib/lib/custom-model-source.d.ts +15 -0
- package/dist-lib/lib/custom-model-source.js +46 -0
- package/dist-lib/lib/deadline.d.ts +9 -0
- package/dist-lib/lib/deadline.js +31 -0
- package/dist-lib/lib/diagnostics.d.ts +35 -0
- package/dist-lib/lib/diagnostics.js +14 -0
- package/dist-lib/lib/fetch-node.d.ts +1 -0
- package/dist-lib/lib/fetch-node.js +1 -0
- package/dist-lib/lib/fs-drive-bridge.d.ts +12 -0
- package/dist-lib/lib/fs-drive-bridge.js +186 -0
- package/dist-lib/lib/fs-grant-keys.d.ts +2 -0
- package/dist-lib/lib/fs-grant-keys.js +6 -0
- package/dist-lib/lib/fs-grants.d.ts +10 -0
- package/dist-lib/lib/fs-grants.js +44 -0
- package/dist-lib/lib/image-cache-dir.d.ts +1 -0
- package/dist-lib/lib/image-cache-dir.js +5 -0
- package/dist-lib/lib/integrations/index.d.ts +4 -0
- package/dist-lib/lib/integrations/index.js +3 -0
- package/dist-lib/lib/integrations/mcp-providers.d.ts +12 -0
- package/dist-lib/lib/integrations/mcp-providers.js +22 -0
- package/dist-lib/lib/integrations/oauth-providers.d.ts +14 -0
- package/dist-lib/lib/integrations/oauth-providers.js +116 -0
- package/dist-lib/lib/integrations/setup-routes.d.ts +12 -0
- package/dist-lib/lib/integrations/setup-routes.js +114 -0
- package/dist-lib/lib/knowledge-search.d.ts +7 -0
- package/dist-lib/lib/knowledge-search.js +53 -0
- package/dist-lib/lib/kv-cache-reclaim.d.ts +5 -0
- package/dist-lib/lib/kv-cache-reclaim.js +29 -0
- package/dist-lib/lib/kv-cache.d.ts +18 -0
- package/dist-lib/lib/kv-cache.js +33 -0
- package/dist-lib/lib/legacy-core-domain.d.ts +258 -0
- package/dist-lib/lib/legacy-core-domain.js +1 -0
- package/dist-lib/lib/llm-model-names.d.ts +1 -0
- package/dist-lib/lib/llm-model-names.js +1 -0
- package/dist-lib/lib/log-buffer.d.ts +7 -0
- package/dist-lib/lib/log-buffer.js +16 -0
- package/dist-lib/lib/log-levels.d.ts +7 -0
- package/dist-lib/lib/log-levels.js +1 -0
- package/dist-lib/lib/log.d.ts +60 -0
- package/dist-lib/lib/log.js +149 -0
- package/dist-lib/lib/logger-type.d.ts +13 -0
- package/dist-lib/lib/logger-type.js +1 -0
- package/dist-lib/lib/logger.d.ts +5 -0
- package/dist-lib/lib/logger.js +18 -0
- package/dist-lib/lib/model-catalog-revision.d.ts +9 -0
- package/dist-lib/lib/model-catalog-revision.js +65 -0
- package/dist-lib/lib/model-clamp.d.ts +6 -0
- package/dist-lib/lib/model-clamp.js +20 -0
- package/dist-lib/lib/model-context.d.ts +13 -0
- package/dist-lib/lib/model-context.js +71 -0
- package/dist-lib/lib/model-download-status.d.ts +29 -0
- package/dist-lib/lib/model-download-status.js +56 -0
- package/dist-lib/lib/model-download.d.ts +191 -0
- package/dist-lib/lib/model-download.js +787 -0
- package/dist-lib/lib/oauth/asana.d.ts +35 -0
- package/dist-lib/lib/oauth/asana.js +71 -0
- package/dist-lib/lib/oauth/browser-connect.d.ts +22 -0
- package/dist-lib/lib/oauth/browser-connect.js +83 -0
- package/dist-lib/lib/oauth/client.d.ts +9 -0
- package/dist-lib/lib/oauth/client.js +9 -0
- package/dist-lib/lib/oauth/common.d.ts +38 -0
- package/dist-lib/lib/oauth/common.js +36 -0
- package/dist-lib/lib/oauth/crypto.d.ts +3 -0
- package/dist-lib/lib/oauth/crypto.js +25 -0
- package/dist-lib/lib/oauth/fetch-platform.d.ts +1 -0
- package/dist-lib/lib/oauth/fetch-platform.js +1 -0
- package/dist-lib/lib/oauth/flow-core.d.ts +6 -0
- package/dist-lib/lib/oauth/flow-core.js +37 -0
- package/dist-lib/lib/oauth/flow.d.ts +3 -0
- package/dist-lib/lib/oauth/flow.js +24 -0
- package/dist-lib/lib/oauth/google.d.ts +37 -0
- package/dist-lib/lib/oauth/google.js +77 -0
- package/dist-lib/lib/oauth/host.d.ts +5 -0
- package/dist-lib/lib/oauth/host.js +3 -0
- package/dist-lib/lib/oauth/keys.d.ts +25 -0
- package/dist-lib/lib/oauth/keys.js +93 -0
- package/dist-lib/lib/oauth/loopback.d.ts +3 -0
- package/dist-lib/lib/oauth/loopback.js +119 -0
- package/dist-lib/lib/oauth/loopback.stub.d.ts +3 -0
- package/dist-lib/lib/oauth/loopback.stub.js +6 -0
- package/dist-lib/lib/oauth/notion.d.ts +34 -0
- package/dist-lib/lib/oauth/notion.js +82 -0
- package/dist-lib/lib/oauth/pkce-runtime.d.ts +3 -0
- package/dist-lib/lib/oauth/pkce-runtime.js +5 -0
- package/dist-lib/lib/oauth/pkce.d.ts +8 -0
- package/dist-lib/lib/oauth/pkce.js +6 -0
- package/dist-lib/lib/oauth/providers.d.ts +5 -0
- package/dist-lib/lib/oauth/providers.js +73 -0
- package/dist-lib/lib/oauth/redirect-types.d.ts +19 -0
- package/dist-lib/lib/oauth/redirect-types.js +1 -0
- package/dist-lib/lib/oauth/register.d.ts +3 -0
- package/dist-lib/lib/oauth/register.js +34 -0
- package/dist-lib/lib/oauth/resolve.d.ts +17 -0
- package/dist-lib/lib/oauth/resolve.js +57 -0
- package/dist-lib/lib/oauth/spotify.d.ts +32 -0
- package/dist-lib/lib/oauth/spotify.js +73 -0
- package/dist-lib/lib/oauth/token-exchange-core.d.ts +6 -0
- package/dist-lib/lib/oauth/token-exchange-core.js +97 -0
- package/dist-lib/lib/oauth/token-exchange.d.ts +5 -0
- package/dist-lib/lib/oauth/token-exchange.js +9 -0
- package/dist-lib/lib/oauth/types.d.ts +54 -0
- package/dist-lib/lib/oauth/types.js +1 -0
- package/dist-lib/lib/oauth.client.d.ts +5 -0
- package/dist-lib/lib/oauth.client.js +2 -0
- package/dist-lib/lib/oauth.d.ts +14 -0
- package/dist-lib/lib/oauth.js +12 -0
- package/dist-lib/lib/obsidian-key.d.ts +1 -0
- package/dist-lib/lib/obsidian-key.js +1 -0
- package/dist-lib/lib/race-resource.d.ts +5 -0
- package/dist-lib/lib/race-resource.js +25 -0
- package/dist-lib/lib/reconnecting-watch.d.ts +2 -0
- package/dist-lib/lib/reconnecting-watch.js +78 -0
- package/dist-lib/lib/retry-budget.d.ts +14 -0
- package/dist-lib/lib/retry-budget.js +39 -0
- package/dist-lib/lib/run-notices.d.ts +23 -0
- package/dist-lib/lib/run-notices.js +33 -0
- package/dist-lib/lib/run-transcript.d.ts +35 -0
- package/dist-lib/lib/run-transcript.js +106 -0
- package/dist-lib/lib/skill-readiness.d.ts +2 -0
- package/dist-lib/lib/skill-readiness.js +21 -0
- package/dist-lib/lib/skill-types.d.ts +70 -0
- package/dist-lib/lib/skill-types.js +1 -0
- package/dist-lib/lib/spec-loader.d.ts +14 -0
- package/dist-lib/lib/spec-loader.js +9 -0
- package/dist-lib/lib/suspend-lifecycle.d.ts +17 -0
- package/dist-lib/lib/suspend-lifecycle.js +33 -0
- package/dist-lib/lib/task.d.ts +26 -0
- package/dist-lib/lib/task.js +69 -0
- package/dist-lib/lib/unref.d.ts +3 -0
- package/dist-lib/lib/unref.js +4 -0
- package/dist-lib/lib/wav-duration.d.ts +1 -0
- package/dist-lib/lib/wav-duration.js +53 -0
- package/dist-lib/lib/write-queue.d.ts +22 -0
- package/dist-lib/lib/write-queue.js +39 -0
- package/dist-lib/schema/build.d.ts +1 -0
- package/dist-lib/schema/build.js +120 -0
- package/dist-lib/schema/config.d.ts +4 -0
- package/dist-lib/schema/config.js +7 -0
- package/dist-lib/schema/content.d.ts +20 -0
- package/dist-lib/schema/content.js +122 -0
- package/dist-lib/schema/engine.d.ts +2 -0
- package/dist-lib/schema/engine.js +2013 -0
- package/dist-lib/schema/field-order.d.ts +1 -0
- package/dist-lib/schema/field-order.js +95 -0
- package/dist-lib/schema/local.d.ts +2 -0
- package/dist-lib/schema/local.js +133 -0
- package/dist-lib/schema/qvac.d.ts +22 -0
- package/dist-lib/schema/qvac.js +722 -0
- package/dist-lib/spec/bind.d.ts +2 -0
- package/dist-lib/spec/bind.js +520 -0
- package/dist-lib/spec/calls.d.ts +3 -0
- package/dist-lib/spec/calls.js +129 -0
- package/dist-lib/spec/capabilities.d.ts +263 -0
- package/dist-lib/spec/config/hyperconf/index.d.ts +15 -0
- package/dist-lib/spec/config/hyperconf/index.js +24 -0
- package/dist-lib/spec/config/hyperconf/package.json +3 -0
- package/dist-lib/spec/config/hyperschema/index.js +81 -0
- package/dist-lib/spec/config/hyperschema/schema.json +19 -0
- package/dist-lib/spec/hrpc/hrpc.json +1500 -0
- package/dist-lib/spec/hrpc/index.d.ts +3 -0
- package/dist-lib/spec/hrpc/index.js +1545 -0
- package/dist-lib/spec/hrpc/messages.d.ts +4 -0
- package/dist-lib/spec/hrpc/messages.js +8373 -0
- package/dist-lib/spec/hyperschema/index.d.ts +20 -0
- package/dist-lib/spec/hyperschema/index.js +8373 -0
- package/dist-lib/spec/hyperschema/schema.json +6202 -0
- package/dist-lib/spec/hyperschema/types.d.ts +1545 -0
- package/dist-lib/spec/index.d.ts +36 -0
- package/dist-lib/spec/index.js +6 -0
- package/dist-lib/spec/local/hyperdb/db.json +186 -0
- package/dist-lib/spec/local/hyperdb/index.d.ts +9 -0
- package/dist-lib/spec/local/hyperdb/index.js +855 -0
- package/dist-lib/spec/local/hyperdb/messages.js +2189 -0
- package/dist-lib/spec/local/hyperschema/index.js +1208 -0
- package/dist-lib/spec/local/hyperschema/schema.json +639 -0
- package/dist-lib/spec/local/hyperschema/types.d.ts +159 -0
- package/dist-lib/spec/mesh/hyperdb/db.json +702 -0
- package/dist-lib/spec/mesh/hyperdb/index.d.ts +9 -0
- package/dist-lib/spec/mesh/hyperdb/index.js +2260 -0
- package/dist-lib/spec/mesh/hyperdb/messages.js +7453 -0
- package/dist-lib/spec/mesh/hyperdispatch/dispatch.json +174 -0
- package/dist-lib/spec/mesh/hyperdispatch/index.d.ts +13 -0
- package/dist-lib/spec/mesh/hyperdispatch/index.js +566 -0
- package/dist-lib/spec/mesh/hyperdispatch/messages.js +5713 -0
- package/dist-lib/spec/mesh/hyperschema/index.d.ts +14 -0
- package/dist-lib/spec/mesh/hyperschema/index.js +5713 -0
- package/dist-lib/spec/mesh/hyperschema/schema.json +3142 -0
- package/dist-lib/spec/mesh/hyperschema/types.d.ts +754 -0
- package/ducks.png +0 -0
- package/package.json +332 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import '../logger.ts';
|
|
2
|
+
import type { CapabilityHandlers } from '../../spec/capabilities.d.ts';
|
|
3
|
+
import type { QvacAgent } from '../../spec/mesh/hyperschema/types.d.ts';
|
|
4
|
+
import { type IndexingEmbedder, type VectorIndex } from '../core/files/index.ts';
|
|
5
|
+
import { type CurrentMesh } from './current-mesh.ts';
|
|
6
|
+
export declare const MAX_RAG_SEARCH_LIMIT = 20;
|
|
7
|
+
export declare function createRagApi(current: CurrentMesh, index: () => VectorIndex | null, embedder: () => IndexingEmbedder | null, effectiveCtxSize?: ((agent: QvacAgent | null) => Promise<number>) | null): Pick<CapabilityHandlers, 'ragSearch'>;
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import "../logger.js";
|
|
2
|
+
import { toolsetEnabled } from '@qvac/harness/lib/tools/toolsets.ts';
|
|
3
|
+
import { getAgent } from "../core/agent.js";
|
|
4
|
+
import { getChat } from "../core/chat.js";
|
|
5
|
+
import { isKnowledgeRoutedAttachment, fullTextBudgetChars, fullTextHits, retrieveRagKnowledge, searchRagChunks, referencesPendingFile, referencedDocuments } from "../core/files/index.js";
|
|
6
|
+
import { requireMesh } from "./current-mesh.js";
|
|
7
|
+
export const MAX_RAG_SEARCH_LIMIT = 20;
|
|
8
|
+
const DEFAULT_RAG_SEARCH_LIMIT = 5;
|
|
9
|
+
function clampLimit(limit) {
|
|
10
|
+
if (typeof limit !== 'number' || limit <= 0)
|
|
11
|
+
return DEFAULT_RAG_SEARCH_LIMIT;
|
|
12
|
+
return Math.min(Math.max(1, Math.floor(limit)), MAX_RAG_SEARCH_LIMIT);
|
|
13
|
+
}
|
|
14
|
+
export function createRagApi(current, index, embedder, effectiveCtxSize = null) {
|
|
15
|
+
return {
|
|
16
|
+
ragSearch: async ({ chatId, query, mode, limit, attachmentIds }) => {
|
|
17
|
+
let pendingFiles = [];
|
|
18
|
+
const respond = (overrides) => response({ pendingFiles, ...overrides });
|
|
19
|
+
const mesh = await requireMesh(current);
|
|
20
|
+
const chat = await getChat(mesh, chatId);
|
|
21
|
+
const toolMode = mode === 'tool';
|
|
22
|
+
if (!chat)
|
|
23
|
+
return respond({ enabled: false });
|
|
24
|
+
const agent = await getAgent(mesh, chat.agentId);
|
|
25
|
+
let rows = await mesh.files.listKnowledge(chatId);
|
|
26
|
+
const initialFiles = (await mesh.files.status(chatId)).files;
|
|
27
|
+
pendingFiles = pendingFileNames(initialFiles);
|
|
28
|
+
const scopeIds = new Set(toolMode ? [] : (attachmentIds ?? []));
|
|
29
|
+
let scopeRows = rows.filter((row) => scopeIds.has(row.id));
|
|
30
|
+
if (scopeIds.size > 0 && scopeRows.length === scopeIds.size) {
|
|
31
|
+
const ctxSize = effectiveCtxSize ? await effectiveCtxSize(agent) : 0;
|
|
32
|
+
const fullText = await fullTextHits(mesh, scopeRows, fullTextBudgetChars(ctxSize), {
|
|
33
|
+
head: !agentAllowsRagSearch(agent)
|
|
34
|
+
});
|
|
35
|
+
if (fullText) {
|
|
36
|
+
return respond({
|
|
37
|
+
pendingFiles: pendingFileNames(initialFiles, new Set(scopeRows.map((row) => row.id))),
|
|
38
|
+
searchedCount: fullText.length,
|
|
39
|
+
indexEmpty: false,
|
|
40
|
+
hasKnowledge: true,
|
|
41
|
+
availableFiles: [...new Set(scopeRows.map((row) => row.fileName))],
|
|
42
|
+
hits: fullText
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
if (!toolMode && !agentAllowsRagSearch(agent))
|
|
47
|
+
return respond({ enabled: false });
|
|
48
|
+
if (rows.length === 0)
|
|
49
|
+
return respond({});
|
|
50
|
+
const namedRows = referencedDocuments(query, rows.map((row) => ({ id: row.id, title: row.fileName })));
|
|
51
|
+
const requested = scopeIds.size ? scopeRows : namedRows.length ? namedRows : rows;
|
|
52
|
+
const waiting = requested.filter((row) => !mesh.files.hydratedArtifact(row.id));
|
|
53
|
+
if (waiting.length) {
|
|
54
|
+
try {
|
|
55
|
+
await mesh.files.settle(waiting.map((row) => row.id));
|
|
56
|
+
}
|
|
57
|
+
catch (err) {
|
|
58
|
+
logger.warn('rag', 'indexing settle failed', { err });
|
|
59
|
+
}
|
|
60
|
+
rows = await mesh.files.listKnowledge(chatId);
|
|
61
|
+
scopeRows = rows.filter((row) => scopeIds.has(row.id));
|
|
62
|
+
}
|
|
63
|
+
const hasKnowledge = rows.length > 0;
|
|
64
|
+
const vectorIndex = index();
|
|
65
|
+
const embed = embedder();
|
|
66
|
+
if (!vectorIndex || !embed) {
|
|
67
|
+
return respond({ hasKnowledge, errorMessage: 'knowledge index unavailable on this device' });
|
|
68
|
+
}
|
|
69
|
+
const artifactByRow = new Map(rows.map((row) => [row, mesh.files.hydratedArtifact(row.id)]));
|
|
70
|
+
const hydratedDocuments = [];
|
|
71
|
+
for (const [row, artifactId] of artifactByRow) {
|
|
72
|
+
if (artifactId)
|
|
73
|
+
hydratedDocuments.push({ documentId: artifactId, title: row.fileName });
|
|
74
|
+
}
|
|
75
|
+
const indexEmpty = hydratedDocuments.length === 0;
|
|
76
|
+
const availableFiles = [...new Set(hydratedDocuments.map((document) => document.title))];
|
|
77
|
+
const failedRows = new Set();
|
|
78
|
+
const fileStates = (await mesh.files.status(chatId)).files;
|
|
79
|
+
for (const row of rows) {
|
|
80
|
+
if (artifactByRow.get(row))
|
|
81
|
+
continue;
|
|
82
|
+
if (fileStates.find((file) => file.fileId === row.id)?.state === 'failed') {
|
|
83
|
+
failedRows.add(row);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
pendingFiles = pendingFileNames(fileStates, new Set(rows.filter((row) => artifactByRow.get(row)).map((row) => row.id)));
|
|
87
|
+
const failedFiles = scopeRows.filter((row) => failedRows.has(row)).map((row) => row.fileName);
|
|
88
|
+
const scopeDocumentIds = [];
|
|
89
|
+
let scopePending = false;
|
|
90
|
+
for (const row of scopeRows) {
|
|
91
|
+
const artifactId = artifactByRow.get(row);
|
|
92
|
+
if (artifactId)
|
|
93
|
+
scopeDocumentIds.push(artifactId);
|
|
94
|
+
else if (!failedRows.has(row))
|
|
95
|
+
scopePending = true;
|
|
96
|
+
}
|
|
97
|
+
if (scopePending && scopeDocumentIds.length === 0) {
|
|
98
|
+
return respond({
|
|
99
|
+
pendingReferenced: true,
|
|
100
|
+
indexEmpty,
|
|
101
|
+
hasKnowledge,
|
|
102
|
+
availableFiles,
|
|
103
|
+
failedFiles
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
const pendingReferenced = scopeDocumentIds.length === 0 &&
|
|
107
|
+
referencesPendingFile(query, rows.map((row) => ({
|
|
108
|
+
title: row.fileName,
|
|
109
|
+
pending: !artifactByRow.get(row) && !failedRows.has(row)
|
|
110
|
+
})));
|
|
111
|
+
if (pendingReferenced) {
|
|
112
|
+
return respond({ pendingReferenced, indexEmpty, hasKnowledge, availableFiles, failedFiles });
|
|
113
|
+
}
|
|
114
|
+
const failedReferenced = scopeRows.length === 0 &&
|
|
115
|
+
failedRows.size > 0 &&
|
|
116
|
+
referencesPendingFile(query, rows.map((row) => ({ title: row.fileName, pending: failedRows.has(row) })));
|
|
117
|
+
if (failedReferenced) {
|
|
118
|
+
return respond({
|
|
119
|
+
indexEmpty,
|
|
120
|
+
hasKnowledge,
|
|
121
|
+
availableFiles,
|
|
122
|
+
failedFiles: rows.filter((row) => failedRows.has(row)).map((row) => row.fileName)
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
const allFailed = indexEmpty && rows.length > 0 && rows.every((row) => failedRows.has(row));
|
|
126
|
+
if (allFailed) {
|
|
127
|
+
return respond({
|
|
128
|
+
indexEmpty,
|
|
129
|
+
hasKnowledge,
|
|
130
|
+
availableFiles,
|
|
131
|
+
failedFiles: rows.map((row) => row.fileName)
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
if (toolMode) {
|
|
135
|
+
try {
|
|
136
|
+
const hits = await searchRagChunks({
|
|
137
|
+
query,
|
|
138
|
+
chatId,
|
|
139
|
+
limit: clampLimit(limit),
|
|
140
|
+
liveSourceIds: rows.map((row) => row.id)
|
|
141
|
+
}, { index: vectorIndex, embed: (texts) => embed.embed({ texts }) });
|
|
142
|
+
return respond({
|
|
143
|
+
searchedCount: hits.length,
|
|
144
|
+
indexEmpty,
|
|
145
|
+
hasKnowledge,
|
|
146
|
+
availableFiles,
|
|
147
|
+
hits: hits.map(toWireHit)
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
catch (err) {
|
|
151
|
+
return respond({
|
|
152
|
+
indexEmpty,
|
|
153
|
+
hasKnowledge,
|
|
154
|
+
availableFiles,
|
|
155
|
+
errorMessage: err instanceof Error ? err.message : String(err)
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
try {
|
|
160
|
+
const result = await retrieveRagKnowledge({
|
|
161
|
+
query,
|
|
162
|
+
chatId,
|
|
163
|
+
documents: hydratedDocuments,
|
|
164
|
+
liveSourceIds: rows.map((row) => row.id),
|
|
165
|
+
scopeDocumentIds: scopeDocumentIds.length > 0 ? scopeDocumentIds : undefined
|
|
166
|
+
}, { index: vectorIndex, embed: (texts) => embed.embed({ texts }) });
|
|
167
|
+
return respond({
|
|
168
|
+
searchedCount: result.searchedCount,
|
|
169
|
+
indexEmpty,
|
|
170
|
+
hasKnowledge,
|
|
171
|
+
targetDocumentId: result.targetDocumentId,
|
|
172
|
+
availableFiles,
|
|
173
|
+
failedFiles,
|
|
174
|
+
hits: result.hits.map(toWireHit)
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
catch (err) {
|
|
178
|
+
return respond({
|
|
179
|
+
indexEmpty,
|
|
180
|
+
hasKnowledge,
|
|
181
|
+
availableFiles,
|
|
182
|
+
failedFiles,
|
|
183
|
+
errorMessage: err instanceof Error ? err.message : String(err)
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
function toWireHit(hit) {
|
|
190
|
+
return { id: hit.id, content: hit.content, metadataJson: hit.metadataJson, score: hit.score };
|
|
191
|
+
}
|
|
192
|
+
function pendingFileNames(files, available = new Set()) {
|
|
193
|
+
return files
|
|
194
|
+
.filter((file) => !available.has(file.fileId) &&
|
|
195
|
+
['pending', 'running', 'uploading'].includes(file.state) &&
|
|
196
|
+
(file.state === 'uploading'
|
|
197
|
+
? isKnowledgeRoutedAttachment(file)
|
|
198
|
+
: file.processors.some((processor) => processor.processorId === 'rag' && processor.state !== 'not-applicable')))
|
|
199
|
+
.map((file) => file.fileName);
|
|
200
|
+
}
|
|
201
|
+
function response(overrides) {
|
|
202
|
+
return {
|
|
203
|
+
enabled: true,
|
|
204
|
+
searchedCount: 0,
|
|
205
|
+
indexEmpty: true,
|
|
206
|
+
hasKnowledge: false,
|
|
207
|
+
availableFiles: [],
|
|
208
|
+
hits: [],
|
|
209
|
+
...overrides
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
function agentAllowsRagSearch(agent) {
|
|
213
|
+
if (!agent)
|
|
214
|
+
return false;
|
|
215
|
+
return toolsetEnabled('knowledge', agent.disabledToolsets);
|
|
216
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { CapabilityHandlers } from '../../spec/capabilities.d.ts';
|
|
2
|
+
import { type CurrentMesh } from './current-mesh.ts';
|
|
3
|
+
type ToolActivityCapabilities = Pick<CapabilityHandlers, 'listToolActivity' | 'toolActivityWatch' | 'recordToolActivity'>;
|
|
4
|
+
export declare function createToolActivityApi(current: CurrentMesh, deviceId: Buffer | null): ToolActivityCapabilities;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { listToolActivity, recordToolActivity } from "../core/tool-activity.js";
|
|
2
|
+
import { requireMesh } from "./current-mesh.js";
|
|
3
|
+
import { watchable } from "./watchable.js";
|
|
4
|
+
const DEFAULT_LIMIT = 200;
|
|
5
|
+
const MAX_LIMIT = 1000;
|
|
6
|
+
const DECISIONS = new Set(['auto', 'allowed', 'denied', 'skip-all', 'blocked']);
|
|
7
|
+
function normalizeDecision(decision) {
|
|
8
|
+
return DECISIONS.has(decision) ? decision : 'blocked';
|
|
9
|
+
}
|
|
10
|
+
function toEntry(row) {
|
|
11
|
+
return {
|
|
12
|
+
id: row.id,
|
|
13
|
+
agentId: row.agentId,
|
|
14
|
+
deviceId: row.originDeviceId.toString('hex'),
|
|
15
|
+
chatId: row.chatId ?? undefined,
|
|
16
|
+
runId: row.runId ?? undefined,
|
|
17
|
+
toolName: row.toolName,
|
|
18
|
+
arguments: row.arguments ?? undefined,
|
|
19
|
+
resource: row.resource ?? undefined,
|
|
20
|
+
effect: row.effect ?? undefined,
|
|
21
|
+
decision: row.decision,
|
|
22
|
+
at: row.at,
|
|
23
|
+
seq: row.seq ?? 0
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export function createToolActivityApi(current, deviceId) {
|
|
27
|
+
const query = async ({ agentId, limit, beforeSeq }, mesh) => ({
|
|
28
|
+
activities: (await listToolActivity(mesh, agentId, {
|
|
29
|
+
limit: Math.min(limit || DEFAULT_LIMIT, MAX_LIMIT),
|
|
30
|
+
beforeSeq: beforeSeq || undefined
|
|
31
|
+
})).map(toEntry)
|
|
32
|
+
});
|
|
33
|
+
return {
|
|
34
|
+
listToolActivity: async (request) => query(request, await requireMesh(current)),
|
|
35
|
+
toolActivityWatch: watchable('toolActivityWatch', () => requireMesh(current), query),
|
|
36
|
+
recordToolActivity: async (request) => {
|
|
37
|
+
if (!deviceId)
|
|
38
|
+
throw new Error('cannot record tool activity without a device id');
|
|
39
|
+
return recordToolActivity(await requireMesh(current), {
|
|
40
|
+
agentId: request.agentId,
|
|
41
|
+
originDeviceId: deviceId,
|
|
42
|
+
toolName: request.toolName,
|
|
43
|
+
decision: normalizeDecision(request.decision),
|
|
44
|
+
effect: request.effect ?? undefined,
|
|
45
|
+
arguments: request.arguments ?? undefined,
|
|
46
|
+
resource: request.resource ?? undefined,
|
|
47
|
+
chatId: request.chatId ?? undefined,
|
|
48
|
+
runId: request.runId ?? undefined,
|
|
49
|
+
at: request.at
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CapabilityHandlers } from '../../spec/capabilities.d.ts';
|
|
2
|
+
import { getToolConfigs } from '../core/tool-configs.ts';
|
|
3
|
+
import { type CurrentMesh } from './current-mesh.ts';
|
|
4
|
+
type ToolConfigsCapabilities = Pick<CapabilityHandlers, 'setToolConfigs' | 'deleteToolConfigs' | 'listToolConfigs' | 'toolConfigsWatch'>;
|
|
5
|
+
export declare function createToolConfigsApi(current: CurrentMesh): ToolConfigsCapabilities;
|
|
6
|
+
export { getToolConfigs };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { deleteToolConfigs, getToolConfigs, listToolConfigs, setToolConfigs } from "../core/tool-configs.js";
|
|
2
|
+
import { requireMesh } from "./current-mesh.js";
|
|
3
|
+
import { watchable } from "./watchable.js";
|
|
4
|
+
function isRecord(value) {
|
|
5
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
6
|
+
}
|
|
7
|
+
function ensureSettingsPayload(value) {
|
|
8
|
+
if (!isRecord(value))
|
|
9
|
+
throw new Error('tool configs must be a plain object');
|
|
10
|
+
return value;
|
|
11
|
+
}
|
|
12
|
+
export function createToolConfigsApi(current) {
|
|
13
|
+
const query = async ({ agentId }, mesh) => ({
|
|
14
|
+
configs: await listToolConfigs(mesh, agentId)
|
|
15
|
+
});
|
|
16
|
+
return {
|
|
17
|
+
setToolConfigs: async ({ agentId, toolName, settings }) => setToolConfigs(await requireMesh(current), {
|
|
18
|
+
agentId,
|
|
19
|
+
toolName,
|
|
20
|
+
settings: ensureSettingsPayload(settings)
|
|
21
|
+
}),
|
|
22
|
+
deleteToolConfigs: async ({ agentId, toolName }) => deleteToolConfigs(await requireMesh(current), agentId, toolName),
|
|
23
|
+
listToolConfigs: async (request) => query(request, await requireMesh(current)),
|
|
24
|
+
toolConfigsWatch: watchable('toolConfigsWatch', () => requireMesh(current), query)
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export { getToolConfigs };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Readable } from 'streamx';
|
|
2
|
+
import '../logger.ts';
|
|
3
|
+
interface WatchableStore {
|
|
4
|
+
watch(listener: () => void): void;
|
|
5
|
+
unwatch(listener: () => void): void;
|
|
6
|
+
once?(event: 'close', listener: () => void): unknown;
|
|
7
|
+
off?(event: 'close', listener: () => void): unknown;
|
|
8
|
+
closing?: unknown;
|
|
9
|
+
closed?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare function watchable<TRequest, TResult, TStore extends WatchableStore = WatchableStore>(name: string, storeOf: () => TStore | null | Promise<TStore | null>, query: (request: TRequest, store: TStore) => Promise<TResult>): (request: TRequest) => Readable & AsyncIterable<TResult>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import b4a from 'b4a';
|
|
2
|
+
import { Readable } from 'streamx';
|
|
3
|
+
import "../logger.js";
|
|
4
|
+
const SCOPE = ['api', 'watch'];
|
|
5
|
+
const CHURN_WINDOW_MS = 1000;
|
|
6
|
+
function snapshotEquals(a, b) {
|
|
7
|
+
if (a === b)
|
|
8
|
+
return true;
|
|
9
|
+
if (b4a.isBuffer(a) || b4a.isBuffer(b)) {
|
|
10
|
+
return b4a.isBuffer(a) && b4a.isBuffer(b) && b4a.equals(a, b);
|
|
11
|
+
}
|
|
12
|
+
if (Array.isArray(a) || Array.isArray(b)) {
|
|
13
|
+
if (!Array.isArray(a) || !Array.isArray(b) || a.length !== b.length)
|
|
14
|
+
return false;
|
|
15
|
+
return a.every((item, i) => snapshotEquals(item, b[i]));
|
|
16
|
+
}
|
|
17
|
+
if (!isRecord(a) || !isRecord(b))
|
|
18
|
+
return false;
|
|
19
|
+
const keys = Object.keys(a);
|
|
20
|
+
if (keys.length !== Object.keys(b).length)
|
|
21
|
+
return false;
|
|
22
|
+
return keys.every((key) => snapshotEquals(a[key], b[key]));
|
|
23
|
+
}
|
|
24
|
+
function isRecord(value) {
|
|
25
|
+
return typeof value === 'object' && value !== null;
|
|
26
|
+
}
|
|
27
|
+
export function watchable(name, storeOf, query) {
|
|
28
|
+
return (request) => {
|
|
29
|
+
const resolved = storeOf();
|
|
30
|
+
const pending = resolved instanceof Promise ? resolved.catch(noop) : null;
|
|
31
|
+
let store = resolved instanceof Promise ? null : resolved;
|
|
32
|
+
let dirty = true;
|
|
33
|
+
let ended = false;
|
|
34
|
+
let last = null;
|
|
35
|
+
let wake = null;
|
|
36
|
+
let churn = 0;
|
|
37
|
+
let reportedAt = Date.now();
|
|
38
|
+
const reportChurn = (force) => {
|
|
39
|
+
if (churn === 0)
|
|
40
|
+
return;
|
|
41
|
+
const now = Date.now();
|
|
42
|
+
const elapsed = now - reportedAt;
|
|
43
|
+
if (!force && elapsed < CHURN_WINDOW_MS)
|
|
44
|
+
return;
|
|
45
|
+
logger.debug(SCOPE, `${name} woke with no change`, { woke: churn, ms: elapsed });
|
|
46
|
+
churn = 0;
|
|
47
|
+
reportedAt = now;
|
|
48
|
+
};
|
|
49
|
+
const onChange = () => {
|
|
50
|
+
dirty = true;
|
|
51
|
+
wake?.resolve();
|
|
52
|
+
wake = null;
|
|
53
|
+
};
|
|
54
|
+
const onStoreClose = () => {
|
|
55
|
+
ended = true;
|
|
56
|
+
wake?.resolve();
|
|
57
|
+
wake = null;
|
|
58
|
+
};
|
|
59
|
+
const storeGone = () => store === null || ended || Boolean(store.closed) || Boolean(store.closing);
|
|
60
|
+
const stream = new Readable({
|
|
61
|
+
async open(cb) {
|
|
62
|
+
if (pending)
|
|
63
|
+
store = (await pending) ?? null;
|
|
64
|
+
store?.watch(onChange);
|
|
65
|
+
store?.once?.('close', onStoreClose);
|
|
66
|
+
cb(null);
|
|
67
|
+
},
|
|
68
|
+
async read(cb) {
|
|
69
|
+
try {
|
|
70
|
+
while (!stream.destroying) {
|
|
71
|
+
if (store === null || storeGone()) {
|
|
72
|
+
stream.push(null);
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
if (!dirty) {
|
|
76
|
+
wake = Promise.withResolvers();
|
|
77
|
+
await wake.promise;
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
dirty = false;
|
|
81
|
+
const next = await query(request, store);
|
|
82
|
+
if (storeGone()) {
|
|
83
|
+
stream.push(null);
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
if (snapshotEquals(next, last)) {
|
|
87
|
+
churn++;
|
|
88
|
+
reportChurn(false);
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
91
|
+
reportChurn(true);
|
|
92
|
+
last = next;
|
|
93
|
+
stream.push(next);
|
|
94
|
+
break;
|
|
95
|
+
}
|
|
96
|
+
cb(null);
|
|
97
|
+
}
|
|
98
|
+
catch (err) {
|
|
99
|
+
if (storeGone()) {
|
|
100
|
+
stream.push(null);
|
|
101
|
+
cb(null);
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
cb(err);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
predestroy() {
|
|
109
|
+
onChange();
|
|
110
|
+
},
|
|
111
|
+
destroy(cb) {
|
|
112
|
+
reportChurn(true);
|
|
113
|
+
store?.unwatch(onChange);
|
|
114
|
+
store?.off?.('close', onStoreClose);
|
|
115
|
+
cb(null);
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
return stream;
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
function noop() { }
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Core } from './core.ts';
|
|
2
|
+
import type { DeviceMetadata } from './core/mesh.ts';
|
|
3
|
+
import { Client, type ClientOptions } from './client.ts';
|
|
4
|
+
export interface AssistantClientOptions extends ClientOptions {
|
|
5
|
+
sidecar?: boolean;
|
|
6
|
+
storagePath: string;
|
|
7
|
+
device?: DeviceMetadata;
|
|
8
|
+
meshSeed?: Buffer;
|
|
9
|
+
meshKey?: Buffer;
|
|
10
|
+
bootstrapNodes?: ReadonlyArray<{
|
|
11
|
+
host: string;
|
|
12
|
+
port: number;
|
|
13
|
+
}>;
|
|
14
|
+
entry?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare class AssistantClient extends Client {
|
|
17
|
+
private readonly _inline;
|
|
18
|
+
constructor({ sidecar: spawnSidecar, storagePath, device, meshSeed, meshKey, bootstrapNodes, entry, ...engineOptions }: AssistantClientOptions);
|
|
19
|
+
get core(): Core | null;
|
|
20
|
+
_close(): Promise<void>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Client } from "./client.js";
|
|
2
|
+
import { duplexPair } from '@qvac/harness/transport';
|
|
3
|
+
export class AssistantClient extends Client {
|
|
4
|
+
_inline;
|
|
5
|
+
constructor({ sidecar: spawnSidecar = true, storagePath, device, meshSeed, meshKey, bootstrapNodes, entry, ...engineOptions }) {
|
|
6
|
+
const inline = { core: null };
|
|
7
|
+
if (spawnSidecar && !entry)
|
|
8
|
+
throw new Error('sidecar mode needs a stowed bundle entry');
|
|
9
|
+
const args = [
|
|
10
|
+
storagePath,
|
|
11
|
+
device?.name ?? '',
|
|
12
|
+
device?.capabilityProfile ?? '',
|
|
13
|
+
device?.recommendedModelName ?? '',
|
|
14
|
+
meshSeed?.toString('hex') ?? '',
|
|
15
|
+
meshKey?.toString('hex') ?? '',
|
|
16
|
+
(bootstrapNodes ?? []).map((node) => `${node.host}:${node.port}`).join(',')
|
|
17
|
+
];
|
|
18
|
+
const transport = spawnSidecar
|
|
19
|
+
? async () => {
|
|
20
|
+
const { default: sidecarRunner } = await import('bare-supervisor/runner/sidecar');
|
|
21
|
+
const { ipc, exit } = sidecarRunner(entry, args, engineOptions.logger ?? null);
|
|
22
|
+
const died = exit.then((code) => `sidecar exited (${code}) before ready`);
|
|
23
|
+
const failure = await Promise.race([ipc.ready.then(() => null), died]);
|
|
24
|
+
if (failure)
|
|
25
|
+
throw new Error(failure);
|
|
26
|
+
return ipc;
|
|
27
|
+
}
|
|
28
|
+
: async () => {
|
|
29
|
+
const [serverStream, clientStream] = duplexPair();
|
|
30
|
+
const { Core } = await import("./core.js");
|
|
31
|
+
inline.core = new Core(() => serverStream, {
|
|
32
|
+
logger: engineOptions.logger ?? null,
|
|
33
|
+
storagePath,
|
|
34
|
+
device,
|
|
35
|
+
meshSeed,
|
|
36
|
+
meshKey,
|
|
37
|
+
bootstrapNodes
|
|
38
|
+
});
|
|
39
|
+
await inline.core.ready();
|
|
40
|
+
return clientStream;
|
|
41
|
+
};
|
|
42
|
+
super(transport, engineOptions);
|
|
43
|
+
this._inline = inline;
|
|
44
|
+
}
|
|
45
|
+
get core() {
|
|
46
|
+
return this._inline.core;
|
|
47
|
+
}
|
|
48
|
+
async _close() {
|
|
49
|
+
await super._close();
|
|
50
|
+
await this._inline.core?.close();
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import Supervisor, { type ChildSpec } from 'bare-supervisor';
|
|
2
|
+
import { type Harness } from './assistant.ts';
|
|
3
|
+
import { Client } from './client.ts';
|
|
4
|
+
import type { Core } from './core.ts';
|
|
5
|
+
import type { IndexingEmbedder, RagExtractors } from './core/files/index.ts';
|
|
6
|
+
import type { Logger } from './log.ts';
|
|
7
|
+
export interface HarnessContext {
|
|
8
|
+
engine: Client;
|
|
9
|
+
onDeath: (error?: Error) => void;
|
|
10
|
+
}
|
|
11
|
+
export type HarnessFactory = (ctx: HarnessContext) => Harness | Promise<Harness>;
|
|
12
|
+
export type EmbedderFactory = (harness: Harness) => IndexingEmbedder | null | undefined;
|
|
13
|
+
export type OnHarnessDisposer = (() => void | Promise<void>) & {
|
|
14
|
+
sync?: () => Promise<void>;
|
|
15
|
+
};
|
|
16
|
+
export type OnHarness = (harness: Harness, ctx: {
|
|
17
|
+
engine: Client;
|
|
18
|
+
}) => void | OnHarnessDisposer;
|
|
19
|
+
export interface AssistantTreeOptions {
|
|
20
|
+
core: Core;
|
|
21
|
+
harness: HarnessFactory | ChildSpec<Harness>;
|
|
22
|
+
logger?: Logger | null;
|
|
23
|
+
imageCacheDir?: string;
|
|
24
|
+
imageCacheMaxBytes?: number;
|
|
25
|
+
imageCacheMaxAgeMs?: number;
|
|
26
|
+
embedder?: EmbedderFactory;
|
|
27
|
+
extractors?: RagExtractors;
|
|
28
|
+
onHarness?: OnHarness;
|
|
29
|
+
platform?: string;
|
|
30
|
+
preloadCurrentAgentModel?: boolean;
|
|
31
|
+
}
|
|
32
|
+
export declare function assistantTree(opts: AssistantTreeOptions): Supervisor;
|
|
33
|
+
export interface AssistantChildOptions {
|
|
34
|
+
harness: HarnessFactory | ChildSpec<Harness>;
|
|
35
|
+
core?: string;
|
|
36
|
+
logger?: Logger | null;
|
|
37
|
+
imageCacheDir?: string;
|
|
38
|
+
imageCacheMaxBytes?: number;
|
|
39
|
+
imageCacheMaxAgeMs?: number;
|
|
40
|
+
embedder?: EmbedderFactory;
|
|
41
|
+
extractors?: RagExtractors;
|
|
42
|
+
onHarness?: OnHarness;
|
|
43
|
+
preloadCurrentAgentModel?: boolean;
|
|
44
|
+
restart?: 'always' | 'never';
|
|
45
|
+
maxRestarts?: number;
|
|
46
|
+
window?: number;
|
|
47
|
+
backoff?: number;
|
|
48
|
+
maxBackoff?: number;
|
|
49
|
+
}
|
|
50
|
+
export declare function assistantChild(opts: AssistantChildOptions): ChildSpec<Supervisor>;
|