@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,855 @@
|
|
|
1
|
+
// This file is autogenerated by the hyperdb compiler
|
|
2
|
+
/* eslint-disable camelcase */
|
|
3
|
+
|
|
4
|
+
import { IndexEncoder, c, b4a } from 'hyperdb/runtime'
|
|
5
|
+
import { version, getEncoding, setVersion } from './messages.js'
|
|
6
|
+
|
|
7
|
+
const versions = { schema: version, db: 4 }
|
|
8
|
+
|
|
9
|
+
// '@local/config' collection key
|
|
10
|
+
const collection0_key = new IndexEncoder([
|
|
11
|
+
IndexEncoder.STRING
|
|
12
|
+
], { prefix: 0 })
|
|
13
|
+
|
|
14
|
+
function collection0_indexify (record) {
|
|
15
|
+
const a = record.key
|
|
16
|
+
return a === undefined ? [] : [a]
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// '@local/config' value encoding
|
|
20
|
+
const collection0_enc = getEncoding('@local/config/hyperdb#0')
|
|
21
|
+
|
|
22
|
+
// '@local/config' reconstruction function
|
|
23
|
+
function collection0_reconstruct (schemaVersion, keyBuf, valueBuf) {
|
|
24
|
+
const key = collection0_key.decode(keyBuf)
|
|
25
|
+
setVersion(schemaVersion)
|
|
26
|
+
const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
|
|
27
|
+
const type = c.uint.decode(state)
|
|
28
|
+
if (type !== 0) throw new Error('Unknown collection type: ' + type)
|
|
29
|
+
collection0.decodedVersion = c.uint.decode(state)
|
|
30
|
+
const record = collection0_enc.decode(state)
|
|
31
|
+
record.key = key[0]
|
|
32
|
+
return record
|
|
33
|
+
}
|
|
34
|
+
// '@local/config' key reconstruction function
|
|
35
|
+
function collection0_reconstruct_key (keyBuf) {
|
|
36
|
+
const key = collection0_key.decode(keyBuf)
|
|
37
|
+
return {
|
|
38
|
+
key: key[0]
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// '@local/config'
|
|
43
|
+
const collection0 = {
|
|
44
|
+
name: '@local/config',
|
|
45
|
+
id: 0,
|
|
46
|
+
version: 1,
|
|
47
|
+
encodeKey (record) {
|
|
48
|
+
const key = [record.key]
|
|
49
|
+
return collection0_key.encode(key)
|
|
50
|
+
},
|
|
51
|
+
encodeKeyRange ({ gt, lt, gte, lte } = {}) {
|
|
52
|
+
return collection0_key.encodeRange({
|
|
53
|
+
gt: gt ? collection0_indexify(gt) : null,
|
|
54
|
+
lt: lt ? collection0_indexify(lt) : null,
|
|
55
|
+
gte: gte ? collection0_indexify(gte) : null,
|
|
56
|
+
lte: lte ? collection0_indexify(lte) : null
|
|
57
|
+
})
|
|
58
|
+
},
|
|
59
|
+
encodeValue (schemaVersion, collectionVersion, record) {
|
|
60
|
+
setVersion(schemaVersion)
|
|
61
|
+
const state = { start: 0, end: 2, buffer: null }
|
|
62
|
+
collection0_enc.preencode(state, record)
|
|
63
|
+
state.buffer = b4a.allocUnsafe(state.end)
|
|
64
|
+
state.buffer[state.start++] = 0
|
|
65
|
+
state.buffer[state.start++] = collectionVersion
|
|
66
|
+
collection0_enc.encode(state, record)
|
|
67
|
+
return state.buffer
|
|
68
|
+
},
|
|
69
|
+
trigger: null,
|
|
70
|
+
reconstruct: collection0_reconstruct,
|
|
71
|
+
reconstructKey: collection0_reconstruct_key,
|
|
72
|
+
indexes: [],
|
|
73
|
+
decodedVersion: 0
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// '@local/mesh-session' collection key
|
|
77
|
+
const collection1_key = new IndexEncoder([
|
|
78
|
+
IndexEncoder.BUFFER
|
|
79
|
+
], { prefix: 1 })
|
|
80
|
+
|
|
81
|
+
function collection1_indexify (record) {
|
|
82
|
+
const a = record.deviceId
|
|
83
|
+
return a === undefined ? [] : [a]
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// '@local/mesh-session' value encoding
|
|
87
|
+
const collection1_enc = getEncoding('@local/mesh-session/hyperdb#1')
|
|
88
|
+
|
|
89
|
+
// '@local/mesh-session' reconstruction function
|
|
90
|
+
function collection1_reconstruct (schemaVersion, keyBuf, valueBuf) {
|
|
91
|
+
const key = collection1_key.decode(keyBuf)
|
|
92
|
+
setVersion(schemaVersion)
|
|
93
|
+
const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
|
|
94
|
+
const type = c.uint.decode(state)
|
|
95
|
+
if (type !== 0) throw new Error('Unknown collection type: ' + type)
|
|
96
|
+
collection1.decodedVersion = c.uint.decode(state)
|
|
97
|
+
const record = collection1_enc.decode(state)
|
|
98
|
+
record.deviceId = key[0]
|
|
99
|
+
return record
|
|
100
|
+
}
|
|
101
|
+
// '@local/mesh-session' key reconstruction function
|
|
102
|
+
function collection1_reconstruct_key (keyBuf) {
|
|
103
|
+
const key = collection1_key.decode(keyBuf)
|
|
104
|
+
return {
|
|
105
|
+
deviceId: key[0]
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// '@local/mesh-session'
|
|
110
|
+
const collection1 = {
|
|
111
|
+
name: '@local/mesh-session',
|
|
112
|
+
id: 1,
|
|
113
|
+
version: 1,
|
|
114
|
+
encodeKey (record) {
|
|
115
|
+
const key = [record.deviceId]
|
|
116
|
+
return collection1_key.encode(key)
|
|
117
|
+
},
|
|
118
|
+
encodeKeyRange ({ gt, lt, gte, lte } = {}) {
|
|
119
|
+
return collection1_key.encodeRange({
|
|
120
|
+
gt: gt ? collection1_indexify(gt) : null,
|
|
121
|
+
lt: lt ? collection1_indexify(lt) : null,
|
|
122
|
+
gte: gte ? collection1_indexify(gte) : null,
|
|
123
|
+
lte: lte ? collection1_indexify(lte) : null
|
|
124
|
+
})
|
|
125
|
+
},
|
|
126
|
+
encodeValue (schemaVersion, collectionVersion, record) {
|
|
127
|
+
setVersion(schemaVersion)
|
|
128
|
+
const state = { start: 0, end: 2, buffer: null }
|
|
129
|
+
collection1_enc.preencode(state, record)
|
|
130
|
+
state.buffer = b4a.allocUnsafe(state.end)
|
|
131
|
+
state.buffer[state.start++] = 0
|
|
132
|
+
state.buffer[state.start++] = collectionVersion
|
|
133
|
+
collection1_enc.encode(state, record)
|
|
134
|
+
return state.buffer
|
|
135
|
+
},
|
|
136
|
+
trigger: null,
|
|
137
|
+
reconstruct: collection1_reconstruct,
|
|
138
|
+
reconstructKey: collection1_reconstruct_key,
|
|
139
|
+
indexes: [],
|
|
140
|
+
decodedVersion: 0
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// '@local/mesh-history' collection key
|
|
144
|
+
const collection2_key = new IndexEncoder([
|
|
145
|
+
IndexEncoder.BUFFER
|
|
146
|
+
], { prefix: 2 })
|
|
147
|
+
|
|
148
|
+
function collection2_indexify (record) {
|
|
149
|
+
const a = record.key
|
|
150
|
+
return a === undefined ? [] : [a]
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// '@local/mesh-history' value encoding
|
|
154
|
+
const collection2_enc = getEncoding('@local/mesh-history/hyperdb#2')
|
|
155
|
+
|
|
156
|
+
// '@local/mesh-history' reconstruction function
|
|
157
|
+
function collection2_reconstruct (schemaVersion, keyBuf, valueBuf) {
|
|
158
|
+
const key = collection2_key.decode(keyBuf)
|
|
159
|
+
setVersion(schemaVersion)
|
|
160
|
+
const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
|
|
161
|
+
const type = c.uint.decode(state)
|
|
162
|
+
if (type !== 0) throw new Error('Unknown collection type: ' + type)
|
|
163
|
+
collection2.decodedVersion = c.uint.decode(state)
|
|
164
|
+
const record = collection2_enc.decode(state)
|
|
165
|
+
record.key = key[0]
|
|
166
|
+
return record
|
|
167
|
+
}
|
|
168
|
+
// '@local/mesh-history' key reconstruction function
|
|
169
|
+
function collection2_reconstruct_key (keyBuf) {
|
|
170
|
+
const key = collection2_key.decode(keyBuf)
|
|
171
|
+
return {
|
|
172
|
+
key: key[0]
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// '@local/mesh-history'
|
|
177
|
+
const collection2 = {
|
|
178
|
+
name: '@local/mesh-history',
|
|
179
|
+
id: 2,
|
|
180
|
+
version: 1,
|
|
181
|
+
encodeKey (record) {
|
|
182
|
+
const key = [record.key]
|
|
183
|
+
return collection2_key.encode(key)
|
|
184
|
+
},
|
|
185
|
+
encodeKeyRange ({ gt, lt, gte, lte } = {}) {
|
|
186
|
+
return collection2_key.encodeRange({
|
|
187
|
+
gt: gt ? collection2_indexify(gt) : null,
|
|
188
|
+
lt: lt ? collection2_indexify(lt) : null,
|
|
189
|
+
gte: gte ? collection2_indexify(gte) : null,
|
|
190
|
+
lte: lte ? collection2_indexify(lte) : null
|
|
191
|
+
})
|
|
192
|
+
},
|
|
193
|
+
encodeValue (schemaVersion, collectionVersion, record) {
|
|
194
|
+
setVersion(schemaVersion)
|
|
195
|
+
const state = { start: 0, end: 2, buffer: null }
|
|
196
|
+
collection2_enc.preencode(state, record)
|
|
197
|
+
state.buffer = b4a.allocUnsafe(state.end)
|
|
198
|
+
state.buffer[state.start++] = 0
|
|
199
|
+
state.buffer[state.start++] = collectionVersion
|
|
200
|
+
collection2_enc.encode(state, record)
|
|
201
|
+
return state.buffer
|
|
202
|
+
},
|
|
203
|
+
trigger: null,
|
|
204
|
+
reconstruct: collection2_reconstruct,
|
|
205
|
+
reconstructKey: collection2_reconstruct_key,
|
|
206
|
+
indexes: [],
|
|
207
|
+
decodedVersion: 0
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
// '@local/device' collection key
|
|
211
|
+
const collection3_key = new IndexEncoder([
|
|
212
|
+
IndexEncoder.BUFFER
|
|
213
|
+
], { prefix: 3 })
|
|
214
|
+
|
|
215
|
+
function collection3_indexify (record) {
|
|
216
|
+
const a = record.publicKey
|
|
217
|
+
return a === undefined ? [] : [a]
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
// '@local/device' value encoding
|
|
221
|
+
const collection3_enc = getEncoding('@local/device/hyperdb#3')
|
|
222
|
+
|
|
223
|
+
// '@local/device' reconstruction function
|
|
224
|
+
function collection3_reconstruct (schemaVersion, keyBuf, valueBuf) {
|
|
225
|
+
const key = collection3_key.decode(keyBuf)
|
|
226
|
+
setVersion(schemaVersion)
|
|
227
|
+
const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
|
|
228
|
+
const type = c.uint.decode(state)
|
|
229
|
+
if (type !== 0) throw new Error('Unknown collection type: ' + type)
|
|
230
|
+
collection3.decodedVersion = c.uint.decode(state)
|
|
231
|
+
const record = collection3_enc.decode(state)
|
|
232
|
+
record.publicKey = key[0]
|
|
233
|
+
return record
|
|
234
|
+
}
|
|
235
|
+
// '@local/device' key reconstruction function
|
|
236
|
+
function collection3_reconstruct_key (keyBuf) {
|
|
237
|
+
const key = collection3_key.decode(keyBuf)
|
|
238
|
+
return {
|
|
239
|
+
publicKey: key[0]
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
// '@local/device'
|
|
244
|
+
const collection3 = {
|
|
245
|
+
name: '@local/device',
|
|
246
|
+
id: 3,
|
|
247
|
+
version: 1,
|
|
248
|
+
encodeKey (record) {
|
|
249
|
+
const key = [record.publicKey]
|
|
250
|
+
return collection3_key.encode(key)
|
|
251
|
+
},
|
|
252
|
+
encodeKeyRange ({ gt, lt, gte, lte } = {}) {
|
|
253
|
+
return collection3_key.encodeRange({
|
|
254
|
+
gt: gt ? collection3_indexify(gt) : null,
|
|
255
|
+
lt: lt ? collection3_indexify(lt) : null,
|
|
256
|
+
gte: gte ? collection3_indexify(gte) : null,
|
|
257
|
+
lte: lte ? collection3_indexify(lte) : null
|
|
258
|
+
})
|
|
259
|
+
},
|
|
260
|
+
encodeValue (schemaVersion, collectionVersion, record) {
|
|
261
|
+
setVersion(schemaVersion)
|
|
262
|
+
const state = { start: 0, end: 2, buffer: null }
|
|
263
|
+
collection3_enc.preencode(state, record)
|
|
264
|
+
state.buffer = b4a.allocUnsafe(state.end)
|
|
265
|
+
state.buffer[state.start++] = 0
|
|
266
|
+
state.buffer[state.start++] = collectionVersion
|
|
267
|
+
collection3_enc.encode(state, record)
|
|
268
|
+
return state.buffer
|
|
269
|
+
},
|
|
270
|
+
trigger: null,
|
|
271
|
+
reconstruct: collection3_reconstruct,
|
|
272
|
+
reconstructKey: collection3_reconstruct_key,
|
|
273
|
+
indexes: [],
|
|
274
|
+
decodedVersion: 0
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
// '@local/app-config' collection key
|
|
278
|
+
const collection4_key = new IndexEncoder([
|
|
279
|
+
IndexEncoder.STRING
|
|
280
|
+
], { prefix: 4 })
|
|
281
|
+
|
|
282
|
+
function collection4_indexify (record) {
|
|
283
|
+
const a = record.id
|
|
284
|
+
return a === undefined ? [] : [a]
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
// '@local/app-config' value encoding
|
|
288
|
+
const collection4_enc = getEncoding('@local/app-config/hyperdb#4')
|
|
289
|
+
|
|
290
|
+
// '@local/app-config' reconstruction function
|
|
291
|
+
function collection4_reconstruct (schemaVersion, keyBuf, valueBuf) {
|
|
292
|
+
const key = collection4_key.decode(keyBuf)
|
|
293
|
+
setVersion(schemaVersion)
|
|
294
|
+
const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
|
|
295
|
+
const type = c.uint.decode(state)
|
|
296
|
+
if (type !== 0) throw new Error('Unknown collection type: ' + type)
|
|
297
|
+
collection4.decodedVersion = c.uint.decode(state)
|
|
298
|
+
const record = collection4_enc.decode(state)
|
|
299
|
+
record.id = key[0]
|
|
300
|
+
return record
|
|
301
|
+
}
|
|
302
|
+
// '@local/app-config' key reconstruction function
|
|
303
|
+
function collection4_reconstruct_key (keyBuf) {
|
|
304
|
+
const key = collection4_key.decode(keyBuf)
|
|
305
|
+
return {
|
|
306
|
+
id: key[0]
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
// '@local/app-config'
|
|
311
|
+
const collection4 = {
|
|
312
|
+
name: '@local/app-config',
|
|
313
|
+
id: 4,
|
|
314
|
+
version: 1,
|
|
315
|
+
encodeKey (record) {
|
|
316
|
+
const key = [record.id]
|
|
317
|
+
return collection4_key.encode(key)
|
|
318
|
+
},
|
|
319
|
+
encodeKeyRange ({ gt, lt, gte, lte } = {}) {
|
|
320
|
+
return collection4_key.encodeRange({
|
|
321
|
+
gt: gt ? collection4_indexify(gt) : null,
|
|
322
|
+
lt: lt ? collection4_indexify(lt) : null,
|
|
323
|
+
gte: gte ? collection4_indexify(gte) : null,
|
|
324
|
+
lte: lte ? collection4_indexify(lte) : null
|
|
325
|
+
})
|
|
326
|
+
},
|
|
327
|
+
encodeValue (schemaVersion, collectionVersion, record) {
|
|
328
|
+
setVersion(schemaVersion)
|
|
329
|
+
const state = { start: 0, end: 2, buffer: null }
|
|
330
|
+
collection4_enc.preencode(state, record)
|
|
331
|
+
state.buffer = b4a.allocUnsafe(state.end)
|
|
332
|
+
state.buffer[state.start++] = 0
|
|
333
|
+
state.buffer[state.start++] = collectionVersion
|
|
334
|
+
collection4_enc.encode(state, record)
|
|
335
|
+
return state.buffer
|
|
336
|
+
},
|
|
337
|
+
trigger: null,
|
|
338
|
+
reconstruct: collection4_reconstruct,
|
|
339
|
+
reconstructKey: collection4_reconstruct_key,
|
|
340
|
+
indexes: [],
|
|
341
|
+
decodedVersion: 0
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
// '@local/model-download' collection key
|
|
345
|
+
const collection5_key = new IndexEncoder([
|
|
346
|
+
IndexEncoder.STRING
|
|
347
|
+
], { prefix: 5 })
|
|
348
|
+
|
|
349
|
+
function collection5_indexify (record) {
|
|
350
|
+
const a = record.name
|
|
351
|
+
return a === undefined ? [] : [a]
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
// '@local/model-download' value encoding
|
|
355
|
+
const collection5_enc = getEncoding('@local/model-download/hyperdb#5')
|
|
356
|
+
|
|
357
|
+
// '@local/model-download' reconstruction function
|
|
358
|
+
function collection5_reconstruct (schemaVersion, keyBuf, valueBuf) {
|
|
359
|
+
const key = collection5_key.decode(keyBuf)
|
|
360
|
+
setVersion(schemaVersion)
|
|
361
|
+
const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
|
|
362
|
+
const type = c.uint.decode(state)
|
|
363
|
+
if (type !== 0) throw new Error('Unknown collection type: ' + type)
|
|
364
|
+
collection5.decodedVersion = c.uint.decode(state)
|
|
365
|
+
const record = collection5_enc.decode(state)
|
|
366
|
+
record.name = key[0]
|
|
367
|
+
return record
|
|
368
|
+
}
|
|
369
|
+
// '@local/model-download' key reconstruction function
|
|
370
|
+
function collection5_reconstruct_key (keyBuf) {
|
|
371
|
+
const key = collection5_key.decode(keyBuf)
|
|
372
|
+
return {
|
|
373
|
+
name: key[0]
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
// '@local/model-download'
|
|
378
|
+
const collection5 = {
|
|
379
|
+
name: '@local/model-download',
|
|
380
|
+
id: 5,
|
|
381
|
+
version: 1,
|
|
382
|
+
encodeKey (record) {
|
|
383
|
+
const key = [record.name]
|
|
384
|
+
return collection5_key.encode(key)
|
|
385
|
+
},
|
|
386
|
+
encodeKeyRange ({ gt, lt, gte, lte } = {}) {
|
|
387
|
+
return collection5_key.encodeRange({
|
|
388
|
+
gt: gt ? collection5_indexify(gt) : null,
|
|
389
|
+
lt: lt ? collection5_indexify(lt) : null,
|
|
390
|
+
gte: gte ? collection5_indexify(gte) : null,
|
|
391
|
+
lte: lte ? collection5_indexify(lte) : null
|
|
392
|
+
})
|
|
393
|
+
},
|
|
394
|
+
encodeValue (schemaVersion, collectionVersion, record) {
|
|
395
|
+
setVersion(schemaVersion)
|
|
396
|
+
const state = { start: 0, end: 2, buffer: null }
|
|
397
|
+
collection5_enc.preencode(state, record)
|
|
398
|
+
state.buffer = b4a.allocUnsafe(state.end)
|
|
399
|
+
state.buffer[state.start++] = 0
|
|
400
|
+
state.buffer[state.start++] = collectionVersion
|
|
401
|
+
collection5_enc.encode(state, record)
|
|
402
|
+
return state.buffer
|
|
403
|
+
},
|
|
404
|
+
trigger: null,
|
|
405
|
+
reconstruct: collection5_reconstruct,
|
|
406
|
+
reconstructKey: collection5_reconstruct_key,
|
|
407
|
+
indexes: [],
|
|
408
|
+
decodedVersion: 0
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
// '@local/custom-model' collection key
|
|
412
|
+
const collection6_key = new IndexEncoder([
|
|
413
|
+
IndexEncoder.STRING
|
|
414
|
+
], { prefix: 6 })
|
|
415
|
+
|
|
416
|
+
function collection6_indexify (record) {
|
|
417
|
+
const a = record.name
|
|
418
|
+
return a === undefined ? [] : [a]
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
// '@local/custom-model' value encoding
|
|
422
|
+
const collection6_enc = getEncoding('@local/custom-model/hyperdb#6')
|
|
423
|
+
|
|
424
|
+
// '@local/custom-model' reconstruction function
|
|
425
|
+
function collection6_reconstruct (schemaVersion, keyBuf, valueBuf) {
|
|
426
|
+
const key = collection6_key.decode(keyBuf)
|
|
427
|
+
setVersion(schemaVersion)
|
|
428
|
+
const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
|
|
429
|
+
const type = c.uint.decode(state)
|
|
430
|
+
if (type !== 0) throw new Error('Unknown collection type: ' + type)
|
|
431
|
+
collection6.decodedVersion = c.uint.decode(state)
|
|
432
|
+
const record = collection6_enc.decode(state)
|
|
433
|
+
record.name = key[0]
|
|
434
|
+
return record
|
|
435
|
+
}
|
|
436
|
+
// '@local/custom-model' key reconstruction function
|
|
437
|
+
function collection6_reconstruct_key (keyBuf) {
|
|
438
|
+
const key = collection6_key.decode(keyBuf)
|
|
439
|
+
return {
|
|
440
|
+
name: key[0]
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
// '@local/custom-model'
|
|
445
|
+
const collection6 = {
|
|
446
|
+
name: '@local/custom-model',
|
|
447
|
+
id: 6,
|
|
448
|
+
version: 2,
|
|
449
|
+
encodeKey (record) {
|
|
450
|
+
const key = [record.name]
|
|
451
|
+
return collection6_key.encode(key)
|
|
452
|
+
},
|
|
453
|
+
encodeKeyRange ({ gt, lt, gte, lte } = {}) {
|
|
454
|
+
return collection6_key.encodeRange({
|
|
455
|
+
gt: gt ? collection6_indexify(gt) : null,
|
|
456
|
+
lt: lt ? collection6_indexify(lt) : null,
|
|
457
|
+
gte: gte ? collection6_indexify(gte) : null,
|
|
458
|
+
lte: lte ? collection6_indexify(lte) : null
|
|
459
|
+
})
|
|
460
|
+
},
|
|
461
|
+
encodeValue (schemaVersion, collectionVersion, record) {
|
|
462
|
+
setVersion(schemaVersion)
|
|
463
|
+
const state = { start: 0, end: 2, buffer: null }
|
|
464
|
+
collection6_enc.preencode(state, record)
|
|
465
|
+
state.buffer = b4a.allocUnsafe(state.end)
|
|
466
|
+
state.buffer[state.start++] = 0
|
|
467
|
+
state.buffer[state.start++] = collectionVersion
|
|
468
|
+
collection6_enc.encode(state, record)
|
|
469
|
+
return state.buffer
|
|
470
|
+
},
|
|
471
|
+
trigger: null,
|
|
472
|
+
reconstruct: collection6_reconstruct,
|
|
473
|
+
reconstructKey: collection6_reconstruct_key,
|
|
474
|
+
indexes: [],
|
|
475
|
+
decodedVersion: 0
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
// '@local/identity' collection key
|
|
479
|
+
const collection7_key = new IndexEncoder([
|
|
480
|
+
IndexEncoder.STRING
|
|
481
|
+
], { prefix: 7 })
|
|
482
|
+
|
|
483
|
+
function collection7_indexify (record) {
|
|
484
|
+
const a = record.id
|
|
485
|
+
return a === undefined ? [] : [a]
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
// '@local/identity' value encoding
|
|
489
|
+
const collection7_enc = getEncoding('@local/identity/hyperdb#7')
|
|
490
|
+
|
|
491
|
+
// '@local/identity' reconstruction function
|
|
492
|
+
function collection7_reconstruct (schemaVersion, keyBuf, valueBuf) {
|
|
493
|
+
const key = collection7_key.decode(keyBuf)
|
|
494
|
+
setVersion(schemaVersion)
|
|
495
|
+
const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
|
|
496
|
+
const type = c.uint.decode(state)
|
|
497
|
+
if (type !== 0) throw new Error('Unknown collection type: ' + type)
|
|
498
|
+
collection7.decodedVersion = c.uint.decode(state)
|
|
499
|
+
const record = collection7_enc.decode(state)
|
|
500
|
+
record.id = key[0]
|
|
501
|
+
return record
|
|
502
|
+
}
|
|
503
|
+
// '@local/identity' key reconstruction function
|
|
504
|
+
function collection7_reconstruct_key (keyBuf) {
|
|
505
|
+
const key = collection7_key.decode(keyBuf)
|
|
506
|
+
return {
|
|
507
|
+
id: key[0]
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
// '@local/identity'
|
|
512
|
+
const collection7 = {
|
|
513
|
+
name: '@local/identity',
|
|
514
|
+
id: 7,
|
|
515
|
+
version: 3,
|
|
516
|
+
encodeKey (record) {
|
|
517
|
+
const key = [record.id]
|
|
518
|
+
return collection7_key.encode(key)
|
|
519
|
+
},
|
|
520
|
+
encodeKeyRange ({ gt, lt, gte, lte } = {}) {
|
|
521
|
+
return collection7_key.encodeRange({
|
|
522
|
+
gt: gt ? collection7_indexify(gt) : null,
|
|
523
|
+
lt: lt ? collection7_indexify(lt) : null,
|
|
524
|
+
gte: gte ? collection7_indexify(gte) : null,
|
|
525
|
+
lte: lte ? collection7_indexify(lte) : null
|
|
526
|
+
})
|
|
527
|
+
},
|
|
528
|
+
encodeValue (schemaVersion, collectionVersion, record) {
|
|
529
|
+
setVersion(schemaVersion)
|
|
530
|
+
const state = { start: 0, end: 2, buffer: null }
|
|
531
|
+
collection7_enc.preencode(state, record)
|
|
532
|
+
state.buffer = b4a.allocUnsafe(state.end)
|
|
533
|
+
state.buffer[state.start++] = 0
|
|
534
|
+
state.buffer[state.start++] = collectionVersion
|
|
535
|
+
collection7_enc.encode(state, record)
|
|
536
|
+
return state.buffer
|
|
537
|
+
},
|
|
538
|
+
trigger: null,
|
|
539
|
+
reconstruct: collection7_reconstruct,
|
|
540
|
+
reconstructKey: collection7_reconstruct_key,
|
|
541
|
+
indexes: [],
|
|
542
|
+
decodedVersion: 0
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
// '@local/membership' collection key
|
|
546
|
+
const collection8_key = new IndexEncoder([
|
|
547
|
+
IndexEncoder.STRING
|
|
548
|
+
], { prefix: 8 })
|
|
549
|
+
|
|
550
|
+
function collection8_indexify (record) {
|
|
551
|
+
const a = record.id
|
|
552
|
+
return a === undefined ? [] : [a]
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
// '@local/membership' value encoding
|
|
556
|
+
const collection8_enc = getEncoding('@local/membership/hyperdb#8')
|
|
557
|
+
|
|
558
|
+
// '@local/membership' reconstruction function
|
|
559
|
+
function collection8_reconstruct (schemaVersion, keyBuf, valueBuf) {
|
|
560
|
+
const key = collection8_key.decode(keyBuf)
|
|
561
|
+
setVersion(schemaVersion)
|
|
562
|
+
const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
|
|
563
|
+
const type = c.uint.decode(state)
|
|
564
|
+
if (type !== 0) throw new Error('Unknown collection type: ' + type)
|
|
565
|
+
collection8.decodedVersion = c.uint.decode(state)
|
|
566
|
+
const record = collection8_enc.decode(state)
|
|
567
|
+
record.id = key[0]
|
|
568
|
+
return record
|
|
569
|
+
}
|
|
570
|
+
// '@local/membership' key reconstruction function
|
|
571
|
+
function collection8_reconstruct_key (keyBuf) {
|
|
572
|
+
const key = collection8_key.decode(keyBuf)
|
|
573
|
+
return {
|
|
574
|
+
id: key[0]
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
// '@local/membership'
|
|
579
|
+
const collection8 = {
|
|
580
|
+
name: '@local/membership',
|
|
581
|
+
id: 8,
|
|
582
|
+
version: 3,
|
|
583
|
+
encodeKey (record) {
|
|
584
|
+
const key = [record.id]
|
|
585
|
+
return collection8_key.encode(key)
|
|
586
|
+
},
|
|
587
|
+
encodeKeyRange ({ gt, lt, gte, lte } = {}) {
|
|
588
|
+
return collection8_key.encodeRange({
|
|
589
|
+
gt: gt ? collection8_indexify(gt) : null,
|
|
590
|
+
lt: lt ? collection8_indexify(lt) : null,
|
|
591
|
+
gte: gte ? collection8_indexify(gte) : null,
|
|
592
|
+
lte: lte ? collection8_indexify(lte) : null
|
|
593
|
+
})
|
|
594
|
+
},
|
|
595
|
+
encodeValue (schemaVersion, collectionVersion, record) {
|
|
596
|
+
setVersion(schemaVersion)
|
|
597
|
+
const state = { start: 0, end: 2, buffer: null }
|
|
598
|
+
collection8_enc.preencode(state, record)
|
|
599
|
+
state.buffer = b4a.allocUnsafe(state.end)
|
|
600
|
+
state.buffer[state.start++] = 0
|
|
601
|
+
state.buffer[state.start++] = collectionVersion
|
|
602
|
+
collection8_enc.encode(state, record)
|
|
603
|
+
return state.buffer
|
|
604
|
+
},
|
|
605
|
+
trigger: null,
|
|
606
|
+
reconstruct: collection8_reconstruct,
|
|
607
|
+
reconstructKey: collection8_reconstruct_key,
|
|
608
|
+
indexes: [],
|
|
609
|
+
decodedVersion: 0
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
// '@local/chat-notify' collection key
|
|
613
|
+
const collection9_key = new IndexEncoder([
|
|
614
|
+
IndexEncoder.STRING
|
|
615
|
+
], { prefix: 9 })
|
|
616
|
+
|
|
617
|
+
function collection9_indexify (record) {
|
|
618
|
+
const a = record.chatId
|
|
619
|
+
return a === undefined ? [] : [a]
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
// '@local/chat-notify' value encoding
|
|
623
|
+
const collection9_enc = getEncoding('@local/chat-notify/hyperdb#9')
|
|
624
|
+
|
|
625
|
+
// '@local/chat-notify' reconstruction function
|
|
626
|
+
function collection9_reconstruct (schemaVersion, keyBuf, valueBuf) {
|
|
627
|
+
const key = collection9_key.decode(keyBuf)
|
|
628
|
+
setVersion(schemaVersion)
|
|
629
|
+
const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
|
|
630
|
+
const type = c.uint.decode(state)
|
|
631
|
+
if (type !== 0) throw new Error('Unknown collection type: ' + type)
|
|
632
|
+
collection9.decodedVersion = c.uint.decode(state)
|
|
633
|
+
const record = collection9_enc.decode(state)
|
|
634
|
+
record.chatId = key[0]
|
|
635
|
+
return record
|
|
636
|
+
}
|
|
637
|
+
// '@local/chat-notify' key reconstruction function
|
|
638
|
+
function collection9_reconstruct_key (keyBuf) {
|
|
639
|
+
const key = collection9_key.decode(keyBuf)
|
|
640
|
+
return {
|
|
641
|
+
chatId: key[0]
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
// '@local/chat-notify'
|
|
646
|
+
const collection9 = {
|
|
647
|
+
name: '@local/chat-notify',
|
|
648
|
+
id: 9,
|
|
649
|
+
version: 4,
|
|
650
|
+
encodeKey (record) {
|
|
651
|
+
const key = [record.chatId]
|
|
652
|
+
return collection9_key.encode(key)
|
|
653
|
+
},
|
|
654
|
+
encodeKeyRange ({ gt, lt, gte, lte } = {}) {
|
|
655
|
+
return collection9_key.encodeRange({
|
|
656
|
+
gt: gt ? collection9_indexify(gt) : null,
|
|
657
|
+
lt: lt ? collection9_indexify(lt) : null,
|
|
658
|
+
gte: gte ? collection9_indexify(gte) : null,
|
|
659
|
+
lte: lte ? collection9_indexify(lte) : null
|
|
660
|
+
})
|
|
661
|
+
},
|
|
662
|
+
encodeValue (schemaVersion, collectionVersion, record) {
|
|
663
|
+
setVersion(schemaVersion)
|
|
664
|
+
const state = { start: 0, end: 2, buffer: null }
|
|
665
|
+
collection9_enc.preencode(state, record)
|
|
666
|
+
state.buffer = b4a.allocUnsafe(state.end)
|
|
667
|
+
state.buffer[state.start++] = 0
|
|
668
|
+
state.buffer[state.start++] = collectionVersion
|
|
669
|
+
collection9_enc.encode(state, record)
|
|
670
|
+
return state.buffer
|
|
671
|
+
},
|
|
672
|
+
trigger: null,
|
|
673
|
+
reconstruct: collection9_reconstruct,
|
|
674
|
+
reconstructKey: collection9_reconstruct_key,
|
|
675
|
+
indexes: [],
|
|
676
|
+
decodedVersion: 0
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
// '@local/model-notify' collection key
|
|
680
|
+
const collection10_key = new IndexEncoder([
|
|
681
|
+
IndexEncoder.STRING
|
|
682
|
+
], { prefix: 10 })
|
|
683
|
+
|
|
684
|
+
function collection10_indexify (record) {
|
|
685
|
+
const a = record.name
|
|
686
|
+
return a === undefined ? [] : [a]
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
// '@local/model-notify' value encoding
|
|
690
|
+
const collection10_enc = getEncoding('@local/model-notify/hyperdb#10')
|
|
691
|
+
|
|
692
|
+
// '@local/model-notify' reconstruction function
|
|
693
|
+
function collection10_reconstruct (schemaVersion, keyBuf, valueBuf) {
|
|
694
|
+
const key = collection10_key.decode(keyBuf)
|
|
695
|
+
setVersion(schemaVersion)
|
|
696
|
+
const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
|
|
697
|
+
const type = c.uint.decode(state)
|
|
698
|
+
if (type !== 0) throw new Error('Unknown collection type: ' + type)
|
|
699
|
+
collection10.decodedVersion = c.uint.decode(state)
|
|
700
|
+
const record = collection10_enc.decode(state)
|
|
701
|
+
record.name = key[0]
|
|
702
|
+
return record
|
|
703
|
+
}
|
|
704
|
+
// '@local/model-notify' key reconstruction function
|
|
705
|
+
function collection10_reconstruct_key (keyBuf) {
|
|
706
|
+
const key = collection10_key.decode(keyBuf)
|
|
707
|
+
return {
|
|
708
|
+
name: key[0]
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
// '@local/model-notify'
|
|
713
|
+
const collection10 = {
|
|
714
|
+
name: '@local/model-notify',
|
|
715
|
+
id: 10,
|
|
716
|
+
version: 4,
|
|
717
|
+
encodeKey (record) {
|
|
718
|
+
const key = [record.name]
|
|
719
|
+
return collection10_key.encode(key)
|
|
720
|
+
},
|
|
721
|
+
encodeKeyRange ({ gt, lt, gte, lte } = {}) {
|
|
722
|
+
return collection10_key.encodeRange({
|
|
723
|
+
gt: gt ? collection10_indexify(gt) : null,
|
|
724
|
+
lt: lt ? collection10_indexify(lt) : null,
|
|
725
|
+
gte: gte ? collection10_indexify(gte) : null,
|
|
726
|
+
lte: lte ? collection10_indexify(lte) : null
|
|
727
|
+
})
|
|
728
|
+
},
|
|
729
|
+
encodeValue (schemaVersion, collectionVersion, record) {
|
|
730
|
+
setVersion(schemaVersion)
|
|
731
|
+
const state = { start: 0, end: 2, buffer: null }
|
|
732
|
+
collection10_enc.preencode(state, record)
|
|
733
|
+
state.buffer = b4a.allocUnsafe(state.end)
|
|
734
|
+
state.buffer[state.start++] = 0
|
|
735
|
+
state.buffer[state.start++] = collectionVersion
|
|
736
|
+
collection10_enc.encode(state, record)
|
|
737
|
+
return state.buffer
|
|
738
|
+
},
|
|
739
|
+
trigger: null,
|
|
740
|
+
reconstruct: collection10_reconstruct,
|
|
741
|
+
reconstructKey: collection10_reconstruct_key,
|
|
742
|
+
indexes: [],
|
|
743
|
+
decodedVersion: 0
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
// '@local/mesh-departure' collection key
|
|
747
|
+
const collection11_key = new IndexEncoder([
|
|
748
|
+
IndexEncoder.BUFFER
|
|
749
|
+
], { prefix: 11 })
|
|
750
|
+
|
|
751
|
+
function collection11_indexify (record) {
|
|
752
|
+
const a = record.key
|
|
753
|
+
return a === undefined ? [] : [a]
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
// '@local/mesh-departure' value encoding
|
|
757
|
+
const collection11_enc = getEncoding('@local/mesh-departure/hyperdb#11')
|
|
758
|
+
|
|
759
|
+
// '@local/mesh-departure' reconstruction function
|
|
760
|
+
function collection11_reconstruct (schemaVersion, keyBuf, valueBuf) {
|
|
761
|
+
const key = collection11_key.decode(keyBuf)
|
|
762
|
+
setVersion(schemaVersion)
|
|
763
|
+
const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
|
|
764
|
+
const type = c.uint.decode(state)
|
|
765
|
+
if (type !== 0) throw new Error('Unknown collection type: ' + type)
|
|
766
|
+
collection11.decodedVersion = c.uint.decode(state)
|
|
767
|
+
const record = collection11_enc.decode(state)
|
|
768
|
+
record.key = key[0]
|
|
769
|
+
return record
|
|
770
|
+
}
|
|
771
|
+
// '@local/mesh-departure' key reconstruction function
|
|
772
|
+
function collection11_reconstruct_key (keyBuf) {
|
|
773
|
+
const key = collection11_key.decode(keyBuf)
|
|
774
|
+
return {
|
|
775
|
+
key: key[0]
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
// '@local/mesh-departure'
|
|
780
|
+
const collection11 = {
|
|
781
|
+
name: '@local/mesh-departure',
|
|
782
|
+
id: 11,
|
|
783
|
+
version: 4,
|
|
784
|
+
encodeKey (record) {
|
|
785
|
+
const key = [record.key]
|
|
786
|
+
return collection11_key.encode(key)
|
|
787
|
+
},
|
|
788
|
+
encodeKeyRange ({ gt, lt, gte, lte } = {}) {
|
|
789
|
+
return collection11_key.encodeRange({
|
|
790
|
+
gt: gt ? collection11_indexify(gt) : null,
|
|
791
|
+
lt: lt ? collection11_indexify(lt) : null,
|
|
792
|
+
gte: gte ? collection11_indexify(gte) : null,
|
|
793
|
+
lte: lte ? collection11_indexify(lte) : null
|
|
794
|
+
})
|
|
795
|
+
},
|
|
796
|
+
encodeValue (schemaVersion, collectionVersion, record) {
|
|
797
|
+
setVersion(schemaVersion)
|
|
798
|
+
const state = { start: 0, end: 2, buffer: null }
|
|
799
|
+
collection11_enc.preencode(state, record)
|
|
800
|
+
state.buffer = b4a.allocUnsafe(state.end)
|
|
801
|
+
state.buffer[state.start++] = 0
|
|
802
|
+
state.buffer[state.start++] = collectionVersion
|
|
803
|
+
collection11_enc.encode(state, record)
|
|
804
|
+
return state.buffer
|
|
805
|
+
},
|
|
806
|
+
trigger: null,
|
|
807
|
+
reconstruct: collection11_reconstruct,
|
|
808
|
+
reconstructKey: collection11_reconstruct_key,
|
|
809
|
+
indexes: [],
|
|
810
|
+
decodedVersion: 0
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
const collections = [
|
|
814
|
+
collection0,
|
|
815
|
+
collection1,
|
|
816
|
+
collection2,
|
|
817
|
+
collection3,
|
|
818
|
+
collection4,
|
|
819
|
+
collection5,
|
|
820
|
+
collection6,
|
|
821
|
+
collection7,
|
|
822
|
+
collection8,
|
|
823
|
+
collection9,
|
|
824
|
+
collection10,
|
|
825
|
+
collection11
|
|
826
|
+
]
|
|
827
|
+
|
|
828
|
+
const indexes = [
|
|
829
|
+
]
|
|
830
|
+
|
|
831
|
+
export default { versions, collections, indexes, resolveCollection, resolveIndex }
|
|
832
|
+
|
|
833
|
+
function resolveCollection (name) {
|
|
834
|
+
switch (name) {
|
|
835
|
+
case '@local/config': return collection0
|
|
836
|
+
case '@local/mesh-session': return collection1
|
|
837
|
+
case '@local/mesh-history': return collection2
|
|
838
|
+
case '@local/device': return collection3
|
|
839
|
+
case '@local/app-config': return collection4
|
|
840
|
+
case '@local/model-download': return collection5
|
|
841
|
+
case '@local/custom-model': return collection6
|
|
842
|
+
case '@local/identity': return collection7
|
|
843
|
+
case '@local/membership': return collection8
|
|
844
|
+
case '@local/chat-notify': return collection9
|
|
845
|
+
case '@local/model-notify': return collection10
|
|
846
|
+
case '@local/mesh-departure': return collection11
|
|
847
|
+
default: return null
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
function resolveIndex (name) {
|
|
852
|
+
switch (name) {
|
|
853
|
+
default: return null
|
|
854
|
+
}
|
|
855
|
+
}
|