@qvac/core 0.9.0 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +112 -1
- package/README.md +4 -4
- package/dist-lib/index.d.ts +0 -1
- package/dist-lib/index.js +0 -1
- package/dist-lib/lib/api/agents.d.ts +7 -1
- package/dist-lib/lib/api/agents.js +2 -2
- package/dist-lib/lib/api/app-config.d.ts +2 -1
- package/dist-lib/lib/api/app-config.js +2 -2
- package/dist-lib/lib/api/attachments.js +3 -2
- package/dist-lib/lib/api/chat-move.d.ts +2 -1
- package/dist-lib/lib/api/chat-move.js +2 -2
- package/dist-lib/lib/api/chat.d.ts +3 -1
- package/dist-lib/lib/api/chat.js +5 -5
- package/dist-lib/lib/api/chunks.d.ts +2 -1
- package/dist-lib/lib/api/chunks.js +3 -3
- package/dist-lib/lib/api/config.d.ts +2 -1
- package/dist-lib/lib/api/config.js +2 -2
- package/dist-lib/lib/api/current-mesh.d.ts +1 -3
- package/dist-lib/lib/api/current-mesh.js +4 -10
- package/dist-lib/lib/api/custom-models.d.ts +7 -1
- package/dist-lib/lib/api/custom-models.js +10 -8
- package/dist-lib/lib/api/device-routes.d.ts +0 -2
- package/dist-lib/lib/api/device-routes.js +4 -5
- package/dist-lib/lib/api/devices.d.ts +3 -1
- package/dist-lib/lib/api/devices.js +9 -8
- package/dist-lib/lib/api/diagnostics.d.ts +2 -1
- package/dist-lib/lib/api/diagnostics.js +2 -2
- package/dist-lib/lib/api/index.d.ts +2 -0
- package/dist-lib/lib/api/index.js +39 -21
- package/dist-lib/lib/api/instrument.d.ts +2 -2
- package/dist-lib/lib/api/instrument.js +10 -11
- package/dist-lib/lib/api/knowledge.d.ts +3 -1
- package/dist-lib/lib/api/knowledge.js +9 -7
- package/dist-lib/lib/api/logs.js +3 -3
- package/dist-lib/lib/api/members.d.ts +6 -1
- package/dist-lib/lib/api/members.js +11 -10
- package/dist-lib/lib/api/mesh.d.ts +2 -2
- package/dist-lib/lib/api/mesh.js +6 -6
- package/dist-lib/lib/api/model-download.d.ts +2 -1
- package/dist-lib/lib/api/model-download.js +2 -2
- package/dist-lib/lib/api/network.d.ts +3 -2
- package/dist-lib/lib/api/network.js +4 -4
- package/dist-lib/lib/api/notifications.d.ts +3 -1
- package/dist-lib/lib/api/notifications.js +5 -4
- package/dist-lib/lib/api/rag.d.ts +0 -1
- package/dist-lib/lib/api/rag.js +3 -4
- package/dist-lib/lib/api/sync.d.ts +2 -1
- package/dist-lib/lib/api/sync.js +2 -2
- package/dist-lib/lib/api/tool-activity.d.ts +2 -1
- package/dist-lib/lib/api/tool-activity.js +4 -3
- package/dist-lib/lib/api/tool-configs.d.ts +2 -1
- package/dist-lib/lib/api/tool-configs.js +4 -3
- package/dist-lib/lib/api/upload-frames.d.ts +0 -1
- package/dist-lib/lib/api/upload-frames.js +0 -1
- package/dist-lib/lib/api/watchable.d.ts +3 -2
- package/dist-lib/lib/api/watchable.js +2 -3
- package/dist-lib/lib/assistant/fake-models.d.ts +2 -4
- package/dist-lib/lib/assistant/harness.js +8 -6
- package/dist-lib/lib/assistant-client.d.ts +2 -0
- package/dist-lib/lib/assistant-client.js +4 -3
- package/dist-lib/lib/assistant-tree.d.ts +3 -3
- package/dist-lib/lib/assistant.d.ts +5 -3
- package/dist-lib/lib/assistant.js +50 -13
- package/dist-lib/lib/client.d.ts +2 -2
- package/dist-lib/lib/core/agent.js +5 -4
- package/dist-lib/lib/core/archived-mesh.d.ts +2 -3
- package/dist-lib/lib/core/archived-mesh.js +3 -3
- package/dist-lib/lib/core/chat-activity.js +5 -3
- package/dist-lib/lib/core/chat-copy.d.ts +0 -1
- package/dist-lib/lib/core/chat-copy.js +2 -2
- package/dist-lib/lib/core/chat-fork.d.ts +0 -6
- package/dist-lib/lib/core/chat-fork.js +11 -17
- package/dist-lib/lib/core/chat-group.js +8 -7
- package/dist-lib/lib/core/chat-move.d.ts +4 -6
- package/dist-lib/lib/core/chat-move.js +14 -15
- package/dist-lib/lib/core/chat-order.d.ts +2 -1
- package/dist-lib/lib/core/chat-order.js +15 -2
- package/dist-lib/lib/core/chat.js +8 -7
- package/dist-lib/lib/core/chunk.js +13 -8
- package/dist-lib/lib/core/collections.d.ts +1 -0
- package/dist-lib/lib/core/collections.js +1 -0
- package/dist-lib/lib/core/contract/compute.d.ts +0 -4
- package/dist-lib/lib/core/contract/compute.js +2 -9
- package/dist-lib/lib/core/contract/types.d.ts +2 -2
- package/dist-lib/lib/core/departures.d.ts +2 -2
- package/dist-lib/lib/core/device-control.d.ts +0 -2
- package/dist-lib/lib/core/device-control.js +5 -6
- package/dist-lib/lib/core/files/attachments.js +5 -4
- package/dist-lib/lib/core/files/index.d.ts +2 -1
- package/dist-lib/lib/core/files/index.js +20 -8
- package/dist-lib/lib/core/files/processing/claims.js +3 -3
- package/dist-lib/lib/core/files/processing/document.d.ts +2 -0
- package/dist-lib/lib/core/files/processing/document.js +3 -0
- package/dist-lib/lib/core/files/processing/index.js +4 -2
- package/dist-lib/lib/core/files/processing/source.d.ts +3 -0
- package/dist-lib/lib/core/files/processing/source.js +5 -3
- package/dist-lib/lib/core/files/processing/state.js +1 -0
- package/dist-lib/lib/core/files/rag/index.d.ts +3 -0
- package/dist-lib/lib/core/files/rag/index.js +3 -1
- package/dist-lib/lib/core/files/rag/load.js +6 -3
- package/dist-lib/lib/core/files/rag/produce.js +3 -3
- package/dist-lib/lib/core/files/rag/retrieval/full-text.js +1 -1
- package/dist-lib/lib/core/files/rag/similarity.d.ts +2 -2
- package/dist-lib/lib/core/files/rag/similarity.js +2 -3
- package/dist-lib/lib/core/files/records/chunks.js +1 -1
- package/dist-lib/lib/core/files/records/knowledge.js +2 -1
- package/dist-lib/lib/core/files/records/purge.js +9 -5
- package/dist-lib/lib/core/files/records/reclaim.js +20 -48
- package/dist-lib/lib/core/files/records/sweep.d.ts +3 -0
- package/dist-lib/lib/core/files/records/sweep.js +9 -3
- package/dist-lib/lib/core/files/store/blob.d.ts +2 -0
- package/dist-lib/lib/core/files/store/blob.js +2 -2
- package/dist-lib/lib/core/files/store/index.d.ts +1 -0
- package/dist-lib/lib/core/files/store/index.js +2 -0
- package/dist-lib/lib/core/files/store/reference.js +4 -2
- package/dist-lib/lib/core/files/upload.d.ts +1 -1
- package/dist-lib/lib/core/files/upload.js +10 -9
- package/dist-lib/lib/core/handoff-channel.d.ts +6 -4
- package/dist-lib/lib/core/handoff-channel.js +8 -9
- package/dist-lib/lib/core/harness-loan.d.ts +0 -2
- package/dist-lib/lib/core/harness-loan.js +3 -4
- package/dist-lib/lib/core/hosted-agents.d.ts +2 -2
- package/dist-lib/lib/core/inference-calls-handoff.d.ts +2 -2
- package/dist-lib/lib/core/inference-calls-handoff.js +6 -5
- package/dist-lib/lib/core/inference-calls-receiver.d.ts +0 -2
- package/dist-lib/lib/core/inference-calls-receiver.js +5 -7
- package/dist-lib/lib/core/local/index.d.ts +4 -1
- package/dist-lib/lib/core/local/index.js +23 -2
- package/dist-lib/lib/core/membership.d.ts +2 -2
- package/dist-lib/lib/core/mesh.d.ts +13 -7
- package/dist-lib/lib/core/mesh.js +55 -47
- package/dist-lib/lib/core/migrations/file-index.js +2 -4
- package/dist-lib/lib/core/next-frame.js +2 -1
- package/dist-lib/lib/core/pdf/rasterize.d.ts +2 -1
- package/dist-lib/lib/core/pdf/rasterize.js +5 -5
- package/dist-lib/lib/core/peer-duplex.d.ts +3 -3
- package/dist-lib/lib/core/peer-duplex.js +4 -4
- package/dist-lib/lib/core/secret-handoff.d.ts +2 -2
- package/dist-lib/lib/core/secret-handoff.js +7 -4
- package/dist-lib/lib/core/send.js +3 -2
- package/dist-lib/lib/core/skill-overlay-handoff.d.ts +2 -2
- package/dist-lib/lib/core/skill-overlay-handoff.js +6 -5
- package/dist-lib/lib/core/skill-overlay-receiver.js +5 -5
- package/dist-lib/lib/core/skill-secrets.d.ts +0 -5
- package/dist-lib/lib/core/skill-secrets.js +5 -9
- package/dist-lib/lib/core/sync/changed.d.ts +20 -0
- package/dist-lib/lib/core/sync/changed.js +7 -0
- package/dist-lib/lib/core/sync/devices.js +1 -1
- package/dist-lib/lib/core/sync/files.d.ts +1 -0
- package/dist-lib/lib/core/sync/files.js +50 -72
- package/dist-lib/lib/core/sync/index.d.ts +1 -2
- package/dist-lib/lib/core/sync/index.js +40 -62
- package/dist-lib/lib/core/sync/view-updates.d.ts +33 -0
- package/dist-lib/lib/core/sync/view-updates.js +133 -0
- package/dist-lib/lib/core/system-info.d.ts +2 -2
- package/dist-lib/lib/core/system-info.js +10 -11
- package/dist-lib/lib/core/tool-configs.js +6 -6
- package/dist-lib/lib/core.d.ts +1 -7
- package/dist-lib/lib/core.js +147 -131
- package/dist-lib/lib/custom-model-pusher.d.ts +2 -4
- package/dist-lib/lib/custom-model-task.d.ts +2 -1
- package/dist-lib/lib/custom-model-task.js +2 -2
- package/dist-lib/lib/downloads-allowed-pusher.d.ts +2 -4
- package/dist-lib/lib/errors.d.ts +603 -0
- package/dist-lib/lib/errors.js +552 -0
- package/dist-lib/lib/log.d.ts +7 -6
- package/dist-lib/lib/log.js +10 -6
- package/dist-lib/lib/logger-type.d.ts +2 -5
- package/dist-lib/lib/model-download-status.d.ts +2 -2
- package/dist-lib/lib/model-download.d.ts +2 -2
- package/dist-lib/lib/model-download.js +3 -2
- package/dist-lib/lib/model-idle-pusher.d.ts +2 -4
- package/dist-lib/lib/model-memory-cap.d.ts +2 -4
- package/dist-lib/lib/oauth/browser-connect.js +3 -2
- package/dist-lib/lib/oauth/flow-core.js +3 -3
- package/dist-lib/lib/oauth/loopback.js +10 -9
- package/dist-lib/lib/oauth/providers.js +4 -2
- package/dist-lib/lib/oauth/register.js +3 -2
- package/dist-lib/lib/oauth/token-exchange-core.js +5 -4
- package/dist-lib/lib/run-notices.d.ts +2 -0
- package/dist-lib/lib/run-notices.js +7 -2
- package/dist-lib/lib/run-transcript.d.ts +2 -2
- package/dist-lib/lib/task.js +2 -1
- package/dist-lib/schema/engine.js +6 -3
- package/dist-lib/schema/field-order.js +1 -3
- package/dist-lib/schema/local.js +11 -0
- package/dist-lib/spec/hrpc/messages.js +20 -9
- package/dist-lib/spec/hyperschema/index.js +20 -9
- package/dist-lib/spec/hyperschema/schema.json +15 -0
- package/dist-lib/spec/hyperschema/types.d.ts +3 -0
- package/dist-lib/spec/local/hyperdb/db.json +16 -1
- package/dist-lib/spec/local/hyperdb/index.js +71 -2
- package/dist-lib/spec/local/hyperdb/messages.js +300 -143
- package/dist-lib/spec/local/hyperschema/index.js +82 -2
- package/dist-lib/spec/local/hyperschema/schema.json +43 -1
- package/dist-lib/spec/local/hyperschema/types.d.ts +12 -1
- package/package.json +10 -3
- package/tui/app.mjs +1 -1
- package/worker/assistant-sidecar.mjs +7 -0
- package/dist-lib/lib/log-levels.d.ts +0 -7
- package/dist-lib/lib/log-levels.js +0 -1
- package/dist-lib/lib/logger.d.ts +0 -5
- package/dist-lib/lib/logger.js +0 -18
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// This file is autogenerated by the hyperschema compiler
|
|
2
|
-
// Schema Version:
|
|
2
|
+
// Schema Version: 11
|
|
3
3
|
/* eslint-disable camelcase */
|
|
4
4
|
/* eslint-disable quotes */
|
|
5
5
|
/* eslint-disable space-before-function-paren */
|
|
6
6
|
|
|
7
7
|
import { c } from 'hyperschema/runtime'
|
|
8
8
|
|
|
9
|
-
const VERSION =
|
|
9
|
+
const VERSION = 11
|
|
10
10
|
|
|
11
11
|
// eslint-disable-next-line no-unused-vars
|
|
12
12
|
let version = VERSION
|
|
@@ -1716,8 +1716,84 @@ const encoding40 = {
|
|
|
1716
1716
|
}
|
|
1717
1717
|
}
|
|
1718
1718
|
|
|
1719
|
-
// @local/
|
|
1719
|
+
// @local/mesh-update-v1
|
|
1720
1720
|
const encoding41 = {
|
|
1721
|
+
preencode(state, m) {
|
|
1722
|
+
c.fixed32.preencode(state, m.meshKey)
|
|
1723
|
+
state.end++ // max flag is 4 so always one byte
|
|
1724
|
+
|
|
1725
|
+
if (version >= 11 && m.fromKey) c.fixed32.preencode(state, m.fromKey)
|
|
1726
|
+
if (version >= 11 && m.fromLength) c.uint.preencode(state, m.fromLength)
|
|
1727
|
+
},
|
|
1728
|
+
encode(state, m) {
|
|
1729
|
+
const flags =
|
|
1730
|
+
((version >= 11 && m.fromKey) ? 1 : 0) |
|
|
1731
|
+
((version >= 11 && m.fromLength) ? 2 : 0) |
|
|
1732
|
+
((version >= 11 && m.incremental) ? 4 : 0)
|
|
1733
|
+
|
|
1734
|
+
c.fixed32.encode(state, m.meshKey)
|
|
1735
|
+
c.uint.encode(state, flags)
|
|
1736
|
+
|
|
1737
|
+
if (version >= 11 && m.fromKey) c.fixed32.encode(state, m.fromKey)
|
|
1738
|
+
if (version >= 11 && m.fromLength) c.uint.encode(state, m.fromLength)
|
|
1739
|
+
},
|
|
1740
|
+
decode(state) {
|
|
1741
|
+
const r0 = c.fixed32.decode(state)
|
|
1742
|
+
const flags = c.uint.decode(state)
|
|
1743
|
+
|
|
1744
|
+
return {
|
|
1745
|
+
version: 0,
|
|
1746
|
+
meshKey: r0,
|
|
1747
|
+
fromKey: (version >= 11 && (flags & 1) !== 0) ? c.fixed32.decode(state) : null,
|
|
1748
|
+
fromLength: (version >= 11 && (flags & 2) !== 0) ? c.uint.decode(state) : 0,
|
|
1749
|
+
incremental: (version >= 11 && (flags & 4) !== 0)
|
|
1750
|
+
}
|
|
1751
|
+
}
|
|
1752
|
+
}
|
|
1753
|
+
|
|
1754
|
+
// @local/mesh-update
|
|
1755
|
+
const encoding42 = {
|
|
1756
|
+
preencode(state, m) {
|
|
1757
|
+
const v = m.version ?? 1
|
|
1758
|
+
c.uint.preencode(state, v)
|
|
1759
|
+
switch (v) {
|
|
1760
|
+
case 0:
|
|
1761
|
+
case 1:
|
|
1762
|
+
encoding41.preencode(state, m)
|
|
1763
|
+
break
|
|
1764
|
+
default:
|
|
1765
|
+
throw new Error('Unsupported version')
|
|
1766
|
+
}
|
|
1767
|
+
},
|
|
1768
|
+
encode(state, m) {
|
|
1769
|
+
const v = m.version ?? 1
|
|
1770
|
+
c.uint.encode(state, v)
|
|
1771
|
+
switch (v) {
|
|
1772
|
+
case 0:
|
|
1773
|
+
case 1:
|
|
1774
|
+
encoding41.encode(state, m)
|
|
1775
|
+
break
|
|
1776
|
+
default:
|
|
1777
|
+
throw new Error('Unsupported version')
|
|
1778
|
+
}
|
|
1779
|
+
},
|
|
1780
|
+
decode(state) {
|
|
1781
|
+
const v = c.uint.decode(state)
|
|
1782
|
+
switch (v) {
|
|
1783
|
+
case 0:
|
|
1784
|
+
case 1: {
|
|
1785
|
+
const decoded = encoding41.decode(state)
|
|
1786
|
+
decoded.version = v
|
|
1787
|
+
return decoded
|
|
1788
|
+
}
|
|
1789
|
+
default:
|
|
1790
|
+
throw new Error('Unsupported version')
|
|
1791
|
+
}
|
|
1792
|
+
}
|
|
1793
|
+
}
|
|
1794
|
+
|
|
1795
|
+
// @local/config-v1/hyperdb#0
|
|
1796
|
+
const encoding43 = {
|
|
1721
1797
|
preencode(state, m) {
|
|
1722
1798
|
state.end++ // max flag is 1 so always one byte
|
|
1723
1799
|
|
|
@@ -1742,14 +1818,14 @@ const encoding41 = {
|
|
|
1742
1818
|
}
|
|
1743
1819
|
|
|
1744
1820
|
// @local/config/hyperdb#0
|
|
1745
|
-
const
|
|
1821
|
+
const encoding44 = {
|
|
1746
1822
|
preencode(state, m) {
|
|
1747
1823
|
const v = m.version ?? 1
|
|
1748
1824
|
c.uint.preencode(state, v)
|
|
1749
1825
|
switch (v) {
|
|
1750
1826
|
case 0:
|
|
1751
1827
|
case 1:
|
|
1752
|
-
|
|
1828
|
+
encoding43.preencode(state, m)
|
|
1753
1829
|
break
|
|
1754
1830
|
default:
|
|
1755
1831
|
throw new Error('Unsupported version')
|
|
@@ -1761,7 +1837,7 @@ const encoding42 = {
|
|
|
1761
1837
|
switch (v) {
|
|
1762
1838
|
case 0:
|
|
1763
1839
|
case 1:
|
|
1764
|
-
|
|
1840
|
+
encoding43.encode(state, m)
|
|
1765
1841
|
break
|
|
1766
1842
|
default:
|
|
1767
1843
|
throw new Error('Unsupported version')
|
|
@@ -1772,7 +1848,7 @@ const encoding42 = {
|
|
|
1772
1848
|
switch (v) {
|
|
1773
1849
|
case 0:
|
|
1774
1850
|
case 1: {
|
|
1775
|
-
const decoded =
|
|
1851
|
+
const decoded = encoding43.decode(state)
|
|
1776
1852
|
decoded.version = v
|
|
1777
1853
|
return decoded
|
|
1778
1854
|
}
|
|
@@ -1783,7 +1859,7 @@ const encoding42 = {
|
|
|
1783
1859
|
}
|
|
1784
1860
|
|
|
1785
1861
|
// @local/mesh-session-v1/hyperdb#1
|
|
1786
|
-
const
|
|
1862
|
+
const encoding45 = {
|
|
1787
1863
|
preencode(state, m) {
|
|
1788
1864
|
state.end++ // max flag is 4 so always one byte
|
|
1789
1865
|
|
|
@@ -1812,14 +1888,14 @@ const encoding43 = {
|
|
|
1812
1888
|
}
|
|
1813
1889
|
|
|
1814
1890
|
// @local/mesh-session/hyperdb#1
|
|
1815
|
-
const
|
|
1891
|
+
const encoding46 = {
|
|
1816
1892
|
preencode(state, m) {
|
|
1817
1893
|
const v = m.version ?? 1
|
|
1818
1894
|
c.uint.preencode(state, v)
|
|
1819
1895
|
switch (v) {
|
|
1820
1896
|
case 0:
|
|
1821
1897
|
case 1:
|
|
1822
|
-
|
|
1898
|
+
encoding45.preencode(state, m)
|
|
1823
1899
|
break
|
|
1824
1900
|
default:
|
|
1825
1901
|
throw new Error('Unsupported version')
|
|
@@ -1831,7 +1907,7 @@ const encoding44 = {
|
|
|
1831
1907
|
switch (v) {
|
|
1832
1908
|
case 0:
|
|
1833
1909
|
case 1:
|
|
1834
|
-
|
|
1910
|
+
encoding45.encode(state, m)
|
|
1835
1911
|
break
|
|
1836
1912
|
default:
|
|
1837
1913
|
throw new Error('Unsupported version')
|
|
@@ -1842,7 +1918,7 @@ const encoding44 = {
|
|
|
1842
1918
|
switch (v) {
|
|
1843
1919
|
case 0:
|
|
1844
1920
|
case 1: {
|
|
1845
|
-
const decoded =
|
|
1921
|
+
const decoded = encoding45.decode(state)
|
|
1846
1922
|
decoded.version = v
|
|
1847
1923
|
return decoded
|
|
1848
1924
|
}
|
|
@@ -1853,7 +1929,7 @@ const encoding44 = {
|
|
|
1853
1929
|
}
|
|
1854
1930
|
|
|
1855
1931
|
// @local/mesh-history-v1/hyperdb#2
|
|
1856
|
-
const
|
|
1932
|
+
const encoding47 = {
|
|
1857
1933
|
preencode(state, m) {
|
|
1858
1934
|
c.buffer.preencode(state, m.seed)
|
|
1859
1935
|
state.end++ // max flag is 2 so always one byte
|
|
@@ -1883,14 +1959,14 @@ const encoding45 = {
|
|
|
1883
1959
|
}
|
|
1884
1960
|
|
|
1885
1961
|
// @local/mesh-history/hyperdb#2
|
|
1886
|
-
const
|
|
1962
|
+
const encoding48 = {
|
|
1887
1963
|
preencode(state, m) {
|
|
1888
1964
|
const v = m.version ?? 1
|
|
1889
1965
|
c.uint.preencode(state, v)
|
|
1890
1966
|
switch (v) {
|
|
1891
1967
|
case 0:
|
|
1892
1968
|
case 1:
|
|
1893
|
-
|
|
1969
|
+
encoding47.preencode(state, m)
|
|
1894
1970
|
break
|
|
1895
1971
|
default:
|
|
1896
1972
|
throw new Error('Unsupported version')
|
|
@@ -1902,7 +1978,7 @@ const encoding46 = {
|
|
|
1902
1978
|
switch (v) {
|
|
1903
1979
|
case 0:
|
|
1904
1980
|
case 1:
|
|
1905
|
-
|
|
1981
|
+
encoding47.encode(state, m)
|
|
1906
1982
|
break
|
|
1907
1983
|
default:
|
|
1908
1984
|
throw new Error('Unsupported version')
|
|
@@ -1913,7 +1989,7 @@ const encoding46 = {
|
|
|
1913
1989
|
switch (v) {
|
|
1914
1990
|
case 0:
|
|
1915
1991
|
case 1: {
|
|
1916
|
-
const decoded =
|
|
1992
|
+
const decoded = encoding47.decode(state)
|
|
1917
1993
|
decoded.version = v
|
|
1918
1994
|
return decoded
|
|
1919
1995
|
}
|
|
@@ -1924,7 +2000,7 @@ const encoding46 = {
|
|
|
1924
2000
|
}
|
|
1925
2001
|
|
|
1926
2002
|
// @local/device-v1/hyperdb#3
|
|
1927
|
-
const
|
|
2003
|
+
const encoding49 = {
|
|
1928
2004
|
preencode(state, m) {
|
|
1929
2005
|
c.string.preencode(state, m.name)
|
|
1930
2006
|
encoding14.preencode(state, m.capabilityProfile)
|
|
@@ -1961,14 +2037,14 @@ const encoding47 = {
|
|
|
1961
2037
|
}
|
|
1962
2038
|
|
|
1963
2039
|
// @local/device/hyperdb#3
|
|
1964
|
-
const
|
|
2040
|
+
const encoding50 = {
|
|
1965
2041
|
preencode(state, m) {
|
|
1966
2042
|
const v = m.version ?? 1
|
|
1967
2043
|
c.uint.preencode(state, v)
|
|
1968
2044
|
switch (v) {
|
|
1969
2045
|
case 0:
|
|
1970
2046
|
case 1:
|
|
1971
|
-
|
|
2047
|
+
encoding49.preencode(state, m)
|
|
1972
2048
|
break
|
|
1973
2049
|
default:
|
|
1974
2050
|
throw new Error('Unsupported version')
|
|
@@ -1980,7 +2056,7 @@ const encoding48 = {
|
|
|
1980
2056
|
switch (v) {
|
|
1981
2057
|
case 0:
|
|
1982
2058
|
case 1:
|
|
1983
|
-
|
|
2059
|
+
encoding49.encode(state, m)
|
|
1984
2060
|
break
|
|
1985
2061
|
default:
|
|
1986
2062
|
throw new Error('Unsupported version')
|
|
@@ -1991,7 +2067,7 @@ const encoding48 = {
|
|
|
1991
2067
|
switch (v) {
|
|
1992
2068
|
case 0:
|
|
1993
2069
|
case 1: {
|
|
1994
|
-
const decoded =
|
|
2070
|
+
const decoded = encoding49.decode(state)
|
|
1995
2071
|
decoded.version = v
|
|
1996
2072
|
return decoded
|
|
1997
2073
|
}
|
|
@@ -2002,12 +2078,12 @@ const encoding48 = {
|
|
|
2002
2078
|
}
|
|
2003
2079
|
|
|
2004
2080
|
// @local/app-config-v1/hyperdb#4.pausedModels
|
|
2005
|
-
const
|
|
2081
|
+
const encoding51_8 = encoding9_8
|
|
2006
2082
|
// @local/app-config-v1/hyperdb#4.releasedModels
|
|
2007
|
-
const
|
|
2083
|
+
const encoding51_9 = encoding9_8
|
|
2008
2084
|
|
|
2009
2085
|
// @local/app-config-v1/hyperdb#4
|
|
2010
|
-
const
|
|
2086
|
+
const encoding51 = {
|
|
2011
2087
|
preencode(state, m) {
|
|
2012
2088
|
const flags =
|
|
2013
2089
|
(m.activeAgentId ? 1 : 0) |
|
|
@@ -2028,8 +2104,8 @@ const encoding49 = {
|
|
|
2028
2104
|
if (m.ctxSize) c.uint.preencode(state, m.ctxSize)
|
|
2029
2105
|
if (m.lastModelName) c.string.preencode(state, m.lastModelName)
|
|
2030
2106
|
if (m.delegation) c.json.preencode(state, m.delegation)
|
|
2031
|
-
if (m.pausedModels)
|
|
2032
|
-
if (version >= 8 && m.releasedModels)
|
|
2107
|
+
if (m.pausedModels) encoding51_8.preencode(state, m.pausedModels)
|
|
2108
|
+
if (version >= 8 && m.releasedModels) encoding51_9.preencode(state, m.releasedModels)
|
|
2033
2109
|
},
|
|
2034
2110
|
encode(state, m) {
|
|
2035
2111
|
const flags =
|
|
@@ -2051,8 +2127,8 @@ const encoding49 = {
|
|
|
2051
2127
|
if (m.ctxSize) c.uint.encode(state, m.ctxSize)
|
|
2052
2128
|
if (m.lastModelName) c.string.encode(state, m.lastModelName)
|
|
2053
2129
|
if (m.delegation) c.json.encode(state, m.delegation)
|
|
2054
|
-
if (m.pausedModels)
|
|
2055
|
-
if (version >= 8 && m.releasedModels)
|
|
2130
|
+
if (m.pausedModels) encoding51_8.encode(state, m.pausedModels)
|
|
2131
|
+
if (version >= 8 && m.releasedModels) encoding51_9.encode(state, m.releasedModels)
|
|
2056
2132
|
},
|
|
2057
2133
|
decode(state) {
|
|
2058
2134
|
const flags = c.uint.decode(state)
|
|
@@ -2067,22 +2143,22 @@ const encoding49 = {
|
|
|
2067
2143
|
lastModelName: (flags & 16) !== 0 ? c.string.decode(state) : null,
|
|
2068
2144
|
onboardingCompleted: (flags & 32) !== 0,
|
|
2069
2145
|
delegation: (flags & 64) !== 0 ? c.json.decode(state) : null,
|
|
2070
|
-
pausedModels: (flags & 128) !== 0 ?
|
|
2071
|
-
releasedModels: (version >= 8 && (flags & 256) !== 0) ?
|
|
2146
|
+
pausedModels: (flags & 128) !== 0 ? encoding51_8.decode(state) : null,
|
|
2147
|
+
releasedModels: (version >= 8 && (flags & 256) !== 0) ? encoding51_9.decode(state) : null,
|
|
2072
2148
|
manualModelDownloads: (version >= 10 && (flags & 512) !== 0)
|
|
2073
2149
|
}
|
|
2074
2150
|
}
|
|
2075
2151
|
}
|
|
2076
2152
|
|
|
2077
2153
|
// @local/app-config/hyperdb#4
|
|
2078
|
-
const
|
|
2154
|
+
const encoding52 = {
|
|
2079
2155
|
preencode(state, m) {
|
|
2080
2156
|
const v = m.version ?? 1
|
|
2081
2157
|
c.uint.preencode(state, v)
|
|
2082
2158
|
switch (v) {
|
|
2083
2159
|
case 0:
|
|
2084
2160
|
case 1:
|
|
2085
|
-
|
|
2161
|
+
encoding51.preencode(state, m)
|
|
2086
2162
|
break
|
|
2087
2163
|
default:
|
|
2088
2164
|
throw new Error('Unsupported version')
|
|
@@ -2094,7 +2170,7 @@ const encoding50 = {
|
|
|
2094
2170
|
switch (v) {
|
|
2095
2171
|
case 0:
|
|
2096
2172
|
case 1:
|
|
2097
|
-
|
|
2173
|
+
encoding51.encode(state, m)
|
|
2098
2174
|
break
|
|
2099
2175
|
default:
|
|
2100
2176
|
throw new Error('Unsupported version')
|
|
@@ -2105,7 +2181,7 @@ const encoding50 = {
|
|
|
2105
2181
|
switch (v) {
|
|
2106
2182
|
case 0:
|
|
2107
2183
|
case 1: {
|
|
2108
|
-
const decoded =
|
|
2184
|
+
const decoded = encoding51.decode(state)
|
|
2109
2185
|
decoded.version = v
|
|
2110
2186
|
return decoded
|
|
2111
2187
|
}
|
|
@@ -2116,7 +2192,7 @@ const encoding50 = {
|
|
|
2116
2192
|
}
|
|
2117
2193
|
|
|
2118
2194
|
// @local/model-download-v1/hyperdb#5
|
|
2119
|
-
const
|
|
2195
|
+
const encoding53 = {
|
|
2120
2196
|
preencode(state, m) {
|
|
2121
2197
|
encoding11.preencode(state, m.phase)
|
|
2122
2198
|
state.end++ // max flag is 16 so always one byte
|
|
@@ -2165,14 +2241,14 @@ const encoding51 = {
|
|
|
2165
2241
|
}
|
|
2166
2242
|
|
|
2167
2243
|
// @local/model-download/hyperdb#5
|
|
2168
|
-
const
|
|
2244
|
+
const encoding54 = {
|
|
2169
2245
|
preencode(state, m) {
|
|
2170
2246
|
const v = m.version ?? 1
|
|
2171
2247
|
c.uint.preencode(state, v)
|
|
2172
2248
|
switch (v) {
|
|
2173
2249
|
case 0:
|
|
2174
2250
|
case 1:
|
|
2175
|
-
|
|
2251
|
+
encoding53.preencode(state, m)
|
|
2176
2252
|
break
|
|
2177
2253
|
default:
|
|
2178
2254
|
throw new Error('Unsupported version')
|
|
@@ -2184,7 +2260,7 @@ const encoding52 = {
|
|
|
2184
2260
|
switch (v) {
|
|
2185
2261
|
case 0:
|
|
2186
2262
|
case 1:
|
|
2187
|
-
|
|
2263
|
+
encoding53.encode(state, m)
|
|
2188
2264
|
break
|
|
2189
2265
|
default:
|
|
2190
2266
|
throw new Error('Unsupported version')
|
|
@@ -2195,7 +2271,7 @@ const encoding52 = {
|
|
|
2195
2271
|
switch (v) {
|
|
2196
2272
|
case 0:
|
|
2197
2273
|
case 1: {
|
|
2198
|
-
const decoded =
|
|
2274
|
+
const decoded = encoding53.decode(state)
|
|
2199
2275
|
decoded.version = v
|
|
2200
2276
|
return decoded
|
|
2201
2277
|
}
|
|
@@ -2206,7 +2282,7 @@ const encoding52 = {
|
|
|
2206
2282
|
}
|
|
2207
2283
|
|
|
2208
2284
|
// @local/custom-model-v1/hyperdb#6
|
|
2209
|
-
const
|
|
2285
|
+
const encoding55 = {
|
|
2210
2286
|
preencode(state, m) {
|
|
2211
2287
|
const flags =
|
|
2212
2288
|
((version >= 2 && m.mmprojSrc) ? 1 : 0) |
|
|
@@ -2276,14 +2352,14 @@ const encoding53 = {
|
|
|
2276
2352
|
}
|
|
2277
2353
|
|
|
2278
2354
|
// @local/custom-model/hyperdb#6
|
|
2279
|
-
const
|
|
2355
|
+
const encoding56 = {
|
|
2280
2356
|
preencode(state, m) {
|
|
2281
2357
|
const v = m.version ?? 1
|
|
2282
2358
|
c.uint.preencode(state, v)
|
|
2283
2359
|
switch (v) {
|
|
2284
2360
|
case 0:
|
|
2285
2361
|
case 1:
|
|
2286
|
-
|
|
2362
|
+
encoding55.preencode(state, m)
|
|
2287
2363
|
break
|
|
2288
2364
|
default:
|
|
2289
2365
|
throw new Error('Unsupported version')
|
|
@@ -2295,7 +2371,7 @@ const encoding54 = {
|
|
|
2295
2371
|
switch (v) {
|
|
2296
2372
|
case 0:
|
|
2297
2373
|
case 1:
|
|
2298
|
-
|
|
2374
|
+
encoding55.encode(state, m)
|
|
2299
2375
|
break
|
|
2300
2376
|
default:
|
|
2301
2377
|
throw new Error('Unsupported version')
|
|
@@ -2306,7 +2382,7 @@ const encoding54 = {
|
|
|
2306
2382
|
switch (v) {
|
|
2307
2383
|
case 0:
|
|
2308
2384
|
case 1: {
|
|
2309
|
-
const decoded =
|
|
2385
|
+
const decoded = encoding55.decode(state)
|
|
2310
2386
|
decoded.version = v
|
|
2311
2387
|
return decoded
|
|
2312
2388
|
}
|
|
@@ -2317,7 +2393,7 @@ const encoding54 = {
|
|
|
2317
2393
|
}
|
|
2318
2394
|
|
|
2319
2395
|
// @local/identity-v1/hyperdb#7
|
|
2320
|
-
const
|
|
2396
|
+
const encoding57 = {
|
|
2321
2397
|
preencode(state, m) {
|
|
2322
2398
|
c.buffer.preencode(state, m.publicKey)
|
|
2323
2399
|
c.buffer.preencode(state, m.proof)
|
|
@@ -2358,14 +2434,14 @@ const encoding55 = {
|
|
|
2358
2434
|
}
|
|
2359
2435
|
|
|
2360
2436
|
// @local/identity/hyperdb#7
|
|
2361
|
-
const
|
|
2437
|
+
const encoding58 = {
|
|
2362
2438
|
preencode(state, m) {
|
|
2363
2439
|
const v = m.version ?? 1
|
|
2364
2440
|
c.uint.preencode(state, v)
|
|
2365
2441
|
switch (v) {
|
|
2366
2442
|
case 0:
|
|
2367
2443
|
case 1:
|
|
2368
|
-
|
|
2444
|
+
encoding57.preencode(state, m)
|
|
2369
2445
|
break
|
|
2370
2446
|
default:
|
|
2371
2447
|
throw new Error('Unsupported version')
|
|
@@ -2377,7 +2453,7 @@ const encoding56 = {
|
|
|
2377
2453
|
switch (v) {
|
|
2378
2454
|
case 0:
|
|
2379
2455
|
case 1:
|
|
2380
|
-
|
|
2456
|
+
encoding57.encode(state, m)
|
|
2381
2457
|
break
|
|
2382
2458
|
default:
|
|
2383
2459
|
throw new Error('Unsupported version')
|
|
@@ -2388,7 +2464,7 @@ const encoding56 = {
|
|
|
2388
2464
|
switch (v) {
|
|
2389
2465
|
case 0:
|
|
2390
2466
|
case 1: {
|
|
2391
|
-
const decoded =
|
|
2467
|
+
const decoded = encoding57.decode(state)
|
|
2392
2468
|
decoded.version = v
|
|
2393
2469
|
return decoded
|
|
2394
2470
|
}
|
|
@@ -2399,7 +2475,7 @@ const encoding56 = {
|
|
|
2399
2475
|
}
|
|
2400
2476
|
|
|
2401
2477
|
// @local/membership-v1/hyperdb#8
|
|
2402
|
-
const
|
|
2478
|
+
const encoding59 = {
|
|
2403
2479
|
preencode(state, m) {
|
|
2404
2480
|
c.fixed32.preencode(state, m.memberId)
|
|
2405
2481
|
c.buffer.preencode(state, m.proof)
|
|
@@ -2426,14 +2502,14 @@ const encoding57 = {
|
|
|
2426
2502
|
}
|
|
2427
2503
|
|
|
2428
2504
|
// @local/membership/hyperdb#8
|
|
2429
|
-
const
|
|
2505
|
+
const encoding60 = {
|
|
2430
2506
|
preencode(state, m) {
|
|
2431
2507
|
const v = m.version ?? 1
|
|
2432
2508
|
c.uint.preencode(state, v)
|
|
2433
2509
|
switch (v) {
|
|
2434
2510
|
case 0:
|
|
2435
2511
|
case 1:
|
|
2436
|
-
|
|
2512
|
+
encoding59.preencode(state, m)
|
|
2437
2513
|
break
|
|
2438
2514
|
default:
|
|
2439
2515
|
throw new Error('Unsupported version')
|
|
@@ -2445,7 +2521,7 @@ const encoding58 = {
|
|
|
2445
2521
|
switch (v) {
|
|
2446
2522
|
case 0:
|
|
2447
2523
|
case 1:
|
|
2448
|
-
|
|
2524
|
+
encoding59.encode(state, m)
|
|
2449
2525
|
break
|
|
2450
2526
|
default:
|
|
2451
2527
|
throw new Error('Unsupported version')
|
|
@@ -2456,7 +2532,7 @@ const encoding58 = {
|
|
|
2456
2532
|
switch (v) {
|
|
2457
2533
|
case 0:
|
|
2458
2534
|
case 1: {
|
|
2459
|
-
const decoded =
|
|
2535
|
+
const decoded = encoding59.decode(state)
|
|
2460
2536
|
decoded.version = v
|
|
2461
2537
|
return decoded
|
|
2462
2538
|
}
|
|
@@ -2467,7 +2543,7 @@ const encoding58 = {
|
|
|
2467
2543
|
}
|
|
2468
2544
|
|
|
2469
2545
|
// @local/chat-notify-v1/hyperdb#9
|
|
2470
|
-
const
|
|
2546
|
+
const encoding61 = {
|
|
2471
2547
|
preencode(state, m) {
|
|
2472
2548
|
c.uint.preencode(state, m.ackedThrough)
|
|
2473
2549
|
},
|
|
@@ -2486,14 +2562,14 @@ const encoding59 = {
|
|
|
2486
2562
|
}
|
|
2487
2563
|
|
|
2488
2564
|
// @local/chat-notify/hyperdb#9
|
|
2489
|
-
const
|
|
2565
|
+
const encoding62 = {
|
|
2490
2566
|
preencode(state, m) {
|
|
2491
2567
|
const v = m.version ?? 1
|
|
2492
2568
|
c.uint.preencode(state, v)
|
|
2493
2569
|
switch (v) {
|
|
2494
2570
|
case 0:
|
|
2495
2571
|
case 1:
|
|
2496
|
-
|
|
2572
|
+
encoding61.preencode(state, m)
|
|
2497
2573
|
break
|
|
2498
2574
|
default:
|
|
2499
2575
|
throw new Error('Unsupported version')
|
|
@@ -2505,7 +2581,7 @@ const encoding60 = {
|
|
|
2505
2581
|
switch (v) {
|
|
2506
2582
|
case 0:
|
|
2507
2583
|
case 1:
|
|
2508
|
-
|
|
2584
|
+
encoding61.encode(state, m)
|
|
2509
2585
|
break
|
|
2510
2586
|
default:
|
|
2511
2587
|
throw new Error('Unsupported version')
|
|
@@ -2516,7 +2592,7 @@ const encoding60 = {
|
|
|
2516
2592
|
switch (v) {
|
|
2517
2593
|
case 0:
|
|
2518
2594
|
case 1: {
|
|
2519
|
-
const decoded =
|
|
2595
|
+
const decoded = encoding61.decode(state)
|
|
2520
2596
|
decoded.version = v
|
|
2521
2597
|
return decoded
|
|
2522
2598
|
}
|
|
@@ -2527,7 +2603,7 @@ const encoding60 = {
|
|
|
2527
2603
|
}
|
|
2528
2604
|
|
|
2529
2605
|
// @local/model-notify-v1/hyperdb#10
|
|
2530
|
-
const
|
|
2606
|
+
const encoding63 = {
|
|
2531
2607
|
preencode(state, m) {
|
|
2532
2608
|
c.string.preencode(state, m.transferId)
|
|
2533
2609
|
state.end++ // max flag is 8 so always one byte
|
|
@@ -2565,14 +2641,14 @@ const encoding61 = {
|
|
|
2565
2641
|
}
|
|
2566
2642
|
|
|
2567
2643
|
// @local/model-notify/hyperdb#10
|
|
2568
|
-
const
|
|
2644
|
+
const encoding64 = {
|
|
2569
2645
|
preencode(state, m) {
|
|
2570
2646
|
const v = m.version ?? 1
|
|
2571
2647
|
c.uint.preencode(state, v)
|
|
2572
2648
|
switch (v) {
|
|
2573
2649
|
case 0:
|
|
2574
2650
|
case 1:
|
|
2575
|
-
|
|
2651
|
+
encoding63.preencode(state, m)
|
|
2576
2652
|
break
|
|
2577
2653
|
default:
|
|
2578
2654
|
throw new Error('Unsupported version')
|
|
@@ -2584,7 +2660,7 @@ const encoding62 = {
|
|
|
2584
2660
|
switch (v) {
|
|
2585
2661
|
case 0:
|
|
2586
2662
|
case 1:
|
|
2587
|
-
|
|
2663
|
+
encoding63.encode(state, m)
|
|
2588
2664
|
break
|
|
2589
2665
|
default:
|
|
2590
2666
|
throw new Error('Unsupported version')
|
|
@@ -2595,7 +2671,7 @@ const encoding62 = {
|
|
|
2595
2671
|
switch (v) {
|
|
2596
2672
|
case 0:
|
|
2597
2673
|
case 1: {
|
|
2598
|
-
const decoded =
|
|
2674
|
+
const decoded = encoding63.decode(state)
|
|
2599
2675
|
decoded.version = v
|
|
2600
2676
|
return decoded
|
|
2601
2677
|
}
|
|
@@ -2606,7 +2682,7 @@ const encoding62 = {
|
|
|
2606
2682
|
}
|
|
2607
2683
|
|
|
2608
2684
|
// @local/mesh-departure-v1/hyperdb#11
|
|
2609
|
-
const
|
|
2685
|
+
const encoding65 = {
|
|
2610
2686
|
preencode(state, m) {
|
|
2611
2687
|
c.buffer.preencode(state, m.seed)
|
|
2612
2688
|
state.end++ // max flag is 2 so always one byte
|
|
@@ -2636,14 +2712,14 @@ const encoding63 = {
|
|
|
2636
2712
|
}
|
|
2637
2713
|
|
|
2638
2714
|
// @local/mesh-departure/hyperdb#11
|
|
2639
|
-
const
|
|
2715
|
+
const encoding66 = {
|
|
2640
2716
|
preencode(state, m) {
|
|
2641
2717
|
const v = m.version ?? 1
|
|
2642
2718
|
c.uint.preencode(state, v)
|
|
2643
2719
|
switch (v) {
|
|
2644
2720
|
case 0:
|
|
2645
2721
|
case 1:
|
|
2646
|
-
|
|
2722
|
+
encoding65.preencode(state, m)
|
|
2647
2723
|
break
|
|
2648
2724
|
default:
|
|
2649
2725
|
throw new Error('Unsupported version')
|
|
@@ -2655,7 +2731,7 @@ const encoding64 = {
|
|
|
2655
2731
|
switch (v) {
|
|
2656
2732
|
case 0:
|
|
2657
2733
|
case 1:
|
|
2658
|
-
|
|
2734
|
+
encoding65.encode(state, m)
|
|
2659
2735
|
break
|
|
2660
2736
|
default:
|
|
2661
2737
|
throw new Error('Unsupported version')
|
|
@@ -2666,7 +2742,7 @@ const encoding64 = {
|
|
|
2666
2742
|
switch (v) {
|
|
2667
2743
|
case 0:
|
|
2668
2744
|
case 1: {
|
|
2669
|
-
const decoded =
|
|
2745
|
+
const decoded = encoding65.decode(state)
|
|
2670
2746
|
decoded.version = v
|
|
2671
2747
|
return decoded
|
|
2672
2748
|
}
|
|
@@ -2677,7 +2753,7 @@ const encoding64 = {
|
|
|
2677
2753
|
}
|
|
2678
2754
|
|
|
2679
2755
|
// @local/active-mesh-v1/hyperdb#12
|
|
2680
|
-
const
|
|
2756
|
+
const encoding67 = {
|
|
2681
2757
|
preencode(state, m) {
|
|
2682
2758
|
state.end++ // max flag is 2 so always one byte
|
|
2683
2759
|
|
|
@@ -2706,14 +2782,14 @@ const encoding65 = {
|
|
|
2706
2782
|
}
|
|
2707
2783
|
|
|
2708
2784
|
// @local/active-mesh/hyperdb#12
|
|
2709
|
-
const
|
|
2785
|
+
const encoding68 = {
|
|
2710
2786
|
preencode(state, m) {
|
|
2711
2787
|
const v = m.version ?? 1
|
|
2712
2788
|
c.uint.preencode(state, v)
|
|
2713
2789
|
switch (v) {
|
|
2714
2790
|
case 0:
|
|
2715
2791
|
case 1:
|
|
2716
|
-
|
|
2792
|
+
encoding67.preencode(state, m)
|
|
2717
2793
|
break
|
|
2718
2794
|
default:
|
|
2719
2795
|
throw new Error('Unsupported version')
|
|
@@ -2725,7 +2801,7 @@ const encoding66 = {
|
|
|
2725
2801
|
switch (v) {
|
|
2726
2802
|
case 0:
|
|
2727
2803
|
case 1:
|
|
2728
|
-
|
|
2804
|
+
encoding67.encode(state, m)
|
|
2729
2805
|
break
|
|
2730
2806
|
default:
|
|
2731
2807
|
throw new Error('Unsupported version')
|
|
@@ -2736,7 +2812,7 @@ const encoding66 = {
|
|
|
2736
2812
|
switch (v) {
|
|
2737
2813
|
case 0:
|
|
2738
2814
|
case 1: {
|
|
2739
|
-
const decoded =
|
|
2815
|
+
const decoded = encoding67.decode(state)
|
|
2740
2816
|
decoded.version = v
|
|
2741
2817
|
return decoded
|
|
2742
2818
|
}
|
|
@@ -2747,7 +2823,7 @@ const encoding66 = {
|
|
|
2747
2823
|
}
|
|
2748
2824
|
|
|
2749
2825
|
// @local/mesh-membership-v1/hyperdb#13
|
|
2750
|
-
const
|
|
2826
|
+
const encoding69 = {
|
|
2751
2827
|
preencode(state, m) {
|
|
2752
2828
|
c.fixed32.preencode(state, m.seed)
|
|
2753
2829
|
state.end++ // max flag is 32 so always one byte
|
|
@@ -2791,14 +2867,14 @@ const encoding67 = {
|
|
|
2791
2867
|
}
|
|
2792
2868
|
|
|
2793
2869
|
// @local/mesh-membership/hyperdb#13
|
|
2794
|
-
const
|
|
2870
|
+
const encoding70 = {
|
|
2795
2871
|
preencode(state, m) {
|
|
2796
2872
|
const v = m.version ?? 1
|
|
2797
2873
|
c.uint.preencode(state, v)
|
|
2798
2874
|
switch (v) {
|
|
2799
2875
|
case 0:
|
|
2800
2876
|
case 1:
|
|
2801
|
-
|
|
2877
|
+
encoding69.preencode(state, m)
|
|
2802
2878
|
break
|
|
2803
2879
|
default:
|
|
2804
2880
|
throw new Error('Unsupported version')
|
|
@@ -2810,7 +2886,7 @@ const encoding68 = {
|
|
|
2810
2886
|
switch (v) {
|
|
2811
2887
|
case 0:
|
|
2812
2888
|
case 1:
|
|
2813
|
-
|
|
2889
|
+
encoding69.encode(state, m)
|
|
2814
2890
|
break
|
|
2815
2891
|
default:
|
|
2816
2892
|
throw new Error('Unsupported version')
|
|
@@ -2821,7 +2897,7 @@ const encoding68 = {
|
|
|
2821
2897
|
switch (v) {
|
|
2822
2898
|
case 0:
|
|
2823
2899
|
case 1: {
|
|
2824
|
-
const decoded =
|
|
2900
|
+
const decoded = encoding69.decode(state)
|
|
2825
2901
|
decoded.version = v
|
|
2826
2902
|
return decoded
|
|
2827
2903
|
}
|
|
@@ -2832,7 +2908,7 @@ const encoding68 = {
|
|
|
2832
2908
|
}
|
|
2833
2909
|
|
|
2834
2910
|
// @local/member-proof-v1/hyperdb#14
|
|
2835
|
-
const
|
|
2911
|
+
const encoding71 = {
|
|
2836
2912
|
preencode(state, m) {
|
|
2837
2913
|
c.fixed32.preencode(state, m.memberId)
|
|
2838
2914
|
c.buffer.preencode(state, m.proof)
|
|
@@ -2859,14 +2935,14 @@ const encoding69 = {
|
|
|
2859
2935
|
}
|
|
2860
2936
|
|
|
2861
2937
|
// @local/member-proof/hyperdb#14
|
|
2862
|
-
const
|
|
2938
|
+
const encoding72 = {
|
|
2863
2939
|
preencode(state, m) {
|
|
2864
2940
|
const v = m.version ?? 1
|
|
2865
2941
|
c.uint.preencode(state, v)
|
|
2866
2942
|
switch (v) {
|
|
2867
2943
|
case 0:
|
|
2868
2944
|
case 1:
|
|
2869
|
-
|
|
2945
|
+
encoding71.preencode(state, m)
|
|
2870
2946
|
break
|
|
2871
2947
|
default:
|
|
2872
2948
|
throw new Error('Unsupported version')
|
|
@@ -2878,7 +2954,7 @@ const encoding70 = {
|
|
|
2878
2954
|
switch (v) {
|
|
2879
2955
|
case 0:
|
|
2880
2956
|
case 1:
|
|
2881
|
-
|
|
2957
|
+
encoding71.encode(state, m)
|
|
2882
2958
|
break
|
|
2883
2959
|
default:
|
|
2884
2960
|
throw new Error('Unsupported version')
|
|
@@ -2889,7 +2965,7 @@ const encoding70 = {
|
|
|
2889
2965
|
switch (v) {
|
|
2890
2966
|
case 0:
|
|
2891
2967
|
case 1: {
|
|
2892
|
-
const decoded =
|
|
2968
|
+
const decoded = encoding71.decode(state)
|
|
2893
2969
|
decoded.version = v
|
|
2894
2970
|
return decoded
|
|
2895
2971
|
}
|
|
@@ -2900,7 +2976,7 @@ const encoding70 = {
|
|
|
2900
2976
|
}
|
|
2901
2977
|
|
|
2902
2978
|
// @local/account-recovery-v1/hyperdb#15
|
|
2903
|
-
const
|
|
2979
|
+
const encoding73 = {
|
|
2904
2980
|
preencode(state, m) {
|
|
2905
2981
|
c.fixed32.preencode(state, m.coreKey)
|
|
2906
2982
|
c.uint.preencode(state, m.publishedAt)
|
|
@@ -2923,14 +2999,14 @@ const encoding71 = {
|
|
|
2923
2999
|
}
|
|
2924
3000
|
|
|
2925
3001
|
// @local/account-recovery/hyperdb#15
|
|
2926
|
-
const
|
|
3002
|
+
const encoding74 = {
|
|
2927
3003
|
preencode(state, m) {
|
|
2928
3004
|
const v = m.version ?? 1
|
|
2929
3005
|
c.uint.preencode(state, v)
|
|
2930
3006
|
switch (v) {
|
|
2931
3007
|
case 0:
|
|
2932
3008
|
case 1:
|
|
2933
|
-
|
|
3009
|
+
encoding73.preencode(state, m)
|
|
2934
3010
|
break
|
|
2935
3011
|
default:
|
|
2936
3012
|
throw new Error('Unsupported version')
|
|
@@ -2942,7 +3018,7 @@ const encoding72 = {
|
|
|
2942
3018
|
switch (v) {
|
|
2943
3019
|
case 0:
|
|
2944
3020
|
case 1:
|
|
2945
|
-
|
|
3021
|
+
encoding73.encode(state, m)
|
|
2946
3022
|
break
|
|
2947
3023
|
default:
|
|
2948
3024
|
throw new Error('Unsupported version')
|
|
@@ -2953,7 +3029,7 @@ const encoding72 = {
|
|
|
2953
3029
|
switch (v) {
|
|
2954
3030
|
case 0:
|
|
2955
3031
|
case 1: {
|
|
2956
|
-
const decoded =
|
|
3032
|
+
const decoded = encoding73.decode(state)
|
|
2957
3033
|
decoded.version = v
|
|
2958
3034
|
return decoded
|
|
2959
3035
|
}
|
|
@@ -2964,7 +3040,7 @@ const encoding72 = {
|
|
|
2964
3040
|
}
|
|
2965
3041
|
|
|
2966
3042
|
// @local/chat-order-v1/hyperdb#16
|
|
2967
|
-
const
|
|
3043
|
+
const encoding75 = {
|
|
2968
3044
|
preencode(state, m) {
|
|
2969
3045
|
c.buffer.preencode(state, m.sortKey)
|
|
2970
3046
|
},
|
|
@@ -2984,14 +3060,14 @@ const encoding73 = {
|
|
|
2984
3060
|
}
|
|
2985
3061
|
|
|
2986
3062
|
// @local/chat-order/hyperdb#16
|
|
2987
|
-
const
|
|
3063
|
+
const encoding76 = {
|
|
2988
3064
|
preencode(state, m) {
|
|
2989
3065
|
const v = m.version ?? 1
|
|
2990
3066
|
c.uint.preencode(state, v)
|
|
2991
3067
|
switch (v) {
|
|
2992
3068
|
case 0:
|
|
2993
3069
|
case 1:
|
|
2994
|
-
|
|
3070
|
+
encoding75.preencode(state, m)
|
|
2995
3071
|
break
|
|
2996
3072
|
default:
|
|
2997
3073
|
throw new Error('Unsupported version')
|
|
@@ -3003,7 +3079,7 @@ const encoding74 = {
|
|
|
3003
3079
|
switch (v) {
|
|
3004
3080
|
case 0:
|
|
3005
3081
|
case 1:
|
|
3006
|
-
|
|
3082
|
+
encoding75.encode(state, m)
|
|
3007
3083
|
break
|
|
3008
3084
|
default:
|
|
3009
3085
|
throw new Error('Unsupported version')
|
|
@@ -3014,7 +3090,7 @@ const encoding74 = {
|
|
|
3014
3090
|
switch (v) {
|
|
3015
3091
|
case 0:
|
|
3016
3092
|
case 1: {
|
|
3017
|
-
const decoded =
|
|
3093
|
+
const decoded = encoding75.decode(state)
|
|
3018
3094
|
decoded.version = v
|
|
3019
3095
|
return decoded
|
|
3020
3096
|
}
|
|
@@ -3025,7 +3101,7 @@ const encoding74 = {
|
|
|
3025
3101
|
}
|
|
3026
3102
|
|
|
3027
3103
|
// @local/file-v1/hyperdb#18
|
|
3028
|
-
const
|
|
3104
|
+
const encoding77 = {
|
|
3029
3105
|
preencode(state, m) {
|
|
3030
3106
|
const flags =
|
|
3031
3107
|
((version >= 6 && m.chatId) ? 1 : 0) |
|
|
@@ -3094,14 +3170,14 @@ const encoding75 = {
|
|
|
3094
3170
|
}
|
|
3095
3171
|
|
|
3096
3172
|
// @local/file/hyperdb#18
|
|
3097
|
-
const
|
|
3173
|
+
const encoding78 = {
|
|
3098
3174
|
preencode(state, m) {
|
|
3099
3175
|
const v = m.version ?? 1
|
|
3100
3176
|
c.uint.preencode(state, v)
|
|
3101
3177
|
switch (v) {
|
|
3102
3178
|
case 0:
|
|
3103
3179
|
case 1:
|
|
3104
|
-
|
|
3180
|
+
encoding77.preencode(state, m)
|
|
3105
3181
|
break
|
|
3106
3182
|
default:
|
|
3107
3183
|
throw new Error('Unsupported version')
|
|
@@ -3113,7 +3189,7 @@ const encoding76 = {
|
|
|
3113
3189
|
switch (v) {
|
|
3114
3190
|
case 0:
|
|
3115
3191
|
case 1:
|
|
3116
|
-
|
|
3192
|
+
encoding77.encode(state, m)
|
|
3117
3193
|
break
|
|
3118
3194
|
default:
|
|
3119
3195
|
throw new Error('Unsupported version')
|
|
@@ -3124,7 +3200,7 @@ const encoding76 = {
|
|
|
3124
3200
|
switch (v) {
|
|
3125
3201
|
case 0:
|
|
3126
3202
|
case 1: {
|
|
3127
|
-
const decoded =
|
|
3203
|
+
const decoded = encoding77.decode(state)
|
|
3128
3204
|
decoded.version = v
|
|
3129
3205
|
return decoded
|
|
3130
3206
|
}
|
|
@@ -3135,7 +3211,7 @@ const encoding76 = {
|
|
|
3135
3211
|
}
|
|
3136
3212
|
|
|
3137
3213
|
// @local/chat-move-v1/hyperdb#22
|
|
3138
|
-
const
|
|
3214
|
+
const encoding79 = {
|
|
3139
3215
|
preencode(state, m) {
|
|
3140
3216
|
c.fixed32.preencode(state, m.targetMeshKey)
|
|
3141
3217
|
c.string.preencode(state, m.targetChatId)
|
|
@@ -3189,14 +3265,14 @@ const encoding77 = {
|
|
|
3189
3265
|
}
|
|
3190
3266
|
|
|
3191
3267
|
// @local/chat-move/hyperdb#22
|
|
3192
|
-
const
|
|
3268
|
+
const encoding80 = {
|
|
3193
3269
|
preencode(state, m) {
|
|
3194
3270
|
const v = m.version ?? 1
|
|
3195
3271
|
c.uint.preencode(state, v)
|
|
3196
3272
|
switch (v) {
|
|
3197
3273
|
case 0:
|
|
3198
3274
|
case 1:
|
|
3199
|
-
|
|
3275
|
+
encoding79.preencode(state, m)
|
|
3200
3276
|
break
|
|
3201
3277
|
default:
|
|
3202
3278
|
throw new Error('Unsupported version')
|
|
@@ -3208,7 +3284,7 @@ const encoding78 = {
|
|
|
3208
3284
|
switch (v) {
|
|
3209
3285
|
case 0:
|
|
3210
3286
|
case 1:
|
|
3211
|
-
|
|
3287
|
+
encoding79.encode(state, m)
|
|
3212
3288
|
break
|
|
3213
3289
|
default:
|
|
3214
3290
|
throw new Error('Unsupported version')
|
|
@@ -3219,7 +3295,80 @@ const encoding78 = {
|
|
|
3219
3295
|
switch (v) {
|
|
3220
3296
|
case 0:
|
|
3221
3297
|
case 1: {
|
|
3222
|
-
const decoded =
|
|
3298
|
+
const decoded = encoding79.decode(state)
|
|
3299
|
+
decoded.version = v
|
|
3300
|
+
return decoded
|
|
3301
|
+
}
|
|
3302
|
+
default:
|
|
3303
|
+
throw new Error('Unsupported version')
|
|
3304
|
+
}
|
|
3305
|
+
}
|
|
3306
|
+
}
|
|
3307
|
+
|
|
3308
|
+
// @local/mesh-update-v1/hyperdb#23
|
|
3309
|
+
const encoding81 = {
|
|
3310
|
+
preencode(state, m) {
|
|
3311
|
+
state.end++ // max flag is 4 so always one byte
|
|
3312
|
+
|
|
3313
|
+
if (version >= 11 && m.fromKey) c.fixed32.preencode(state, m.fromKey)
|
|
3314
|
+
if (version >= 11 && m.fromLength) c.uint.preencode(state, m.fromLength)
|
|
3315
|
+
},
|
|
3316
|
+
encode(state, m) {
|
|
3317
|
+
const flags =
|
|
3318
|
+
((version >= 11 && m.fromKey) ? 1 : 0) |
|
|
3319
|
+
((version >= 11 && m.fromLength) ? 2 : 0) |
|
|
3320
|
+
((version >= 11 && m.incremental) ? 4 : 0)
|
|
3321
|
+
|
|
3322
|
+
c.uint.encode(state, flags)
|
|
3323
|
+
|
|
3324
|
+
if (version >= 11 && m.fromKey) c.fixed32.encode(state, m.fromKey)
|
|
3325
|
+
if (version >= 11 && m.fromLength) c.uint.encode(state, m.fromLength)
|
|
3326
|
+
},
|
|
3327
|
+
decode(state) {
|
|
3328
|
+
const flags = c.uint.decode(state)
|
|
3329
|
+
|
|
3330
|
+
return {
|
|
3331
|
+
version: 0,
|
|
3332
|
+
meshKey: null,
|
|
3333
|
+
fromKey: (version >= 11 && (flags & 1) !== 0) ? c.fixed32.decode(state) : null,
|
|
3334
|
+
fromLength: (version >= 11 && (flags & 2) !== 0) ? c.uint.decode(state) : 0,
|
|
3335
|
+
incremental: (version >= 11 && (flags & 4) !== 0)
|
|
3336
|
+
}
|
|
3337
|
+
}
|
|
3338
|
+
}
|
|
3339
|
+
|
|
3340
|
+
// @local/mesh-update/hyperdb#23
|
|
3341
|
+
const encoding82 = {
|
|
3342
|
+
preencode(state, m) {
|
|
3343
|
+
const v = m.version ?? 1
|
|
3344
|
+
c.uint.preencode(state, v)
|
|
3345
|
+
switch (v) {
|
|
3346
|
+
case 0:
|
|
3347
|
+
case 1:
|
|
3348
|
+
encoding81.preencode(state, m)
|
|
3349
|
+
break
|
|
3350
|
+
default:
|
|
3351
|
+
throw new Error('Unsupported version')
|
|
3352
|
+
}
|
|
3353
|
+
},
|
|
3354
|
+
encode(state, m) {
|
|
3355
|
+
const v = m.version ?? 1
|
|
3356
|
+
c.uint.encode(state, v)
|
|
3357
|
+
switch (v) {
|
|
3358
|
+
case 0:
|
|
3359
|
+
case 1:
|
|
3360
|
+
encoding81.encode(state, m)
|
|
3361
|
+
break
|
|
3362
|
+
default:
|
|
3363
|
+
throw new Error('Unsupported version')
|
|
3364
|
+
}
|
|
3365
|
+
},
|
|
3366
|
+
decode(state) {
|
|
3367
|
+
const v = c.uint.decode(state)
|
|
3368
|
+
switch (v) {
|
|
3369
|
+
case 0:
|
|
3370
|
+
case 1: {
|
|
3371
|
+
const decoded = encoding81.decode(state)
|
|
3223
3372
|
decoded.version = v
|
|
3224
3373
|
return decoded
|
|
3225
3374
|
}
|
|
@@ -3340,82 +3489,90 @@ function getEncoding(name) {
|
|
|
3340
3489
|
return encoding39
|
|
3341
3490
|
case '@local/chat-move':
|
|
3342
3491
|
return encoding40
|
|
3343
|
-
case '@local/
|
|
3492
|
+
case '@local/mesh-update-v1':
|
|
3344
3493
|
return encoding41
|
|
3345
|
-
case '@local/
|
|
3494
|
+
case '@local/mesh-update':
|
|
3346
3495
|
return encoding42
|
|
3347
|
-
case '@local/
|
|
3496
|
+
case '@local/config-v1/hyperdb#0':
|
|
3348
3497
|
return encoding43
|
|
3349
|
-
case '@local/
|
|
3498
|
+
case '@local/config/hyperdb#0':
|
|
3350
3499
|
return encoding44
|
|
3351
|
-
case '@local/mesh-
|
|
3500
|
+
case '@local/mesh-session-v1/hyperdb#1':
|
|
3352
3501
|
return encoding45
|
|
3353
|
-
case '@local/mesh-
|
|
3502
|
+
case '@local/mesh-session/hyperdb#1':
|
|
3354
3503
|
return encoding46
|
|
3355
|
-
case '@local/
|
|
3504
|
+
case '@local/mesh-history-v1/hyperdb#2':
|
|
3356
3505
|
return encoding47
|
|
3357
|
-
case '@local/
|
|
3506
|
+
case '@local/mesh-history/hyperdb#2':
|
|
3358
3507
|
return encoding48
|
|
3359
|
-
case '@local/
|
|
3508
|
+
case '@local/device-v1/hyperdb#3':
|
|
3360
3509
|
return encoding49
|
|
3361
|
-
case '@local/
|
|
3510
|
+
case '@local/device/hyperdb#3':
|
|
3362
3511
|
return encoding50
|
|
3363
|
-
case '@local/
|
|
3512
|
+
case '@local/app-config-v1/hyperdb#4':
|
|
3364
3513
|
return encoding51
|
|
3365
|
-
case '@local/
|
|
3514
|
+
case '@local/app-config/hyperdb#4':
|
|
3366
3515
|
return encoding52
|
|
3367
|
-
case '@local/
|
|
3516
|
+
case '@local/model-download-v1/hyperdb#5':
|
|
3368
3517
|
return encoding53
|
|
3369
|
-
case '@local/
|
|
3518
|
+
case '@local/model-download/hyperdb#5':
|
|
3370
3519
|
return encoding54
|
|
3371
|
-
case '@local/
|
|
3520
|
+
case '@local/custom-model-v1/hyperdb#6':
|
|
3372
3521
|
return encoding55
|
|
3373
|
-
case '@local/
|
|
3522
|
+
case '@local/custom-model/hyperdb#6':
|
|
3374
3523
|
return encoding56
|
|
3375
|
-
case '@local/
|
|
3524
|
+
case '@local/identity-v1/hyperdb#7':
|
|
3376
3525
|
return encoding57
|
|
3377
|
-
case '@local/
|
|
3526
|
+
case '@local/identity/hyperdb#7':
|
|
3378
3527
|
return encoding58
|
|
3379
|
-
case '@local/
|
|
3528
|
+
case '@local/membership-v1/hyperdb#8':
|
|
3380
3529
|
return encoding59
|
|
3381
|
-
case '@local/
|
|
3530
|
+
case '@local/membership/hyperdb#8':
|
|
3382
3531
|
return encoding60
|
|
3383
|
-
case '@local/
|
|
3532
|
+
case '@local/chat-notify-v1/hyperdb#9':
|
|
3384
3533
|
return encoding61
|
|
3385
|
-
case '@local/
|
|
3534
|
+
case '@local/chat-notify/hyperdb#9':
|
|
3386
3535
|
return encoding62
|
|
3387
|
-
case '@local/
|
|
3536
|
+
case '@local/model-notify-v1/hyperdb#10':
|
|
3388
3537
|
return encoding63
|
|
3389
|
-
case '@local/
|
|
3538
|
+
case '@local/model-notify/hyperdb#10':
|
|
3390
3539
|
return encoding64
|
|
3391
|
-
case '@local/
|
|
3540
|
+
case '@local/mesh-departure-v1/hyperdb#11':
|
|
3392
3541
|
return encoding65
|
|
3393
|
-
case '@local/
|
|
3542
|
+
case '@local/mesh-departure/hyperdb#11':
|
|
3394
3543
|
return encoding66
|
|
3395
|
-
case '@local/mesh-
|
|
3544
|
+
case '@local/active-mesh-v1/hyperdb#12':
|
|
3396
3545
|
return encoding67
|
|
3397
|
-
case '@local/mesh
|
|
3546
|
+
case '@local/active-mesh/hyperdb#12':
|
|
3398
3547
|
return encoding68
|
|
3399
|
-
case '@local/
|
|
3548
|
+
case '@local/mesh-membership-v1/hyperdb#13':
|
|
3400
3549
|
return encoding69
|
|
3401
|
-
case '@local/
|
|
3550
|
+
case '@local/mesh-membership/hyperdb#13':
|
|
3402
3551
|
return encoding70
|
|
3403
|
-
case '@local/
|
|
3552
|
+
case '@local/member-proof-v1/hyperdb#14':
|
|
3404
3553
|
return encoding71
|
|
3405
|
-
case '@local/
|
|
3554
|
+
case '@local/member-proof/hyperdb#14':
|
|
3406
3555
|
return encoding72
|
|
3407
|
-
case '@local/
|
|
3556
|
+
case '@local/account-recovery-v1/hyperdb#15':
|
|
3408
3557
|
return encoding73
|
|
3409
|
-
case '@local/
|
|
3558
|
+
case '@local/account-recovery/hyperdb#15':
|
|
3410
3559
|
return encoding74
|
|
3411
|
-
case '@local/
|
|
3560
|
+
case '@local/chat-order-v1/hyperdb#16':
|
|
3412
3561
|
return encoding75
|
|
3413
|
-
case '@local/
|
|
3562
|
+
case '@local/chat-order/hyperdb#16':
|
|
3414
3563
|
return encoding76
|
|
3415
|
-
case '@local/
|
|
3564
|
+
case '@local/file-v1/hyperdb#18':
|
|
3416
3565
|
return encoding77
|
|
3417
|
-
case '@local/
|
|
3566
|
+
case '@local/file/hyperdb#18':
|
|
3418
3567
|
return encoding78
|
|
3568
|
+
case '@local/chat-move-v1/hyperdb#22':
|
|
3569
|
+
return encoding79
|
|
3570
|
+
case '@local/chat-move/hyperdb#22':
|
|
3571
|
+
return encoding80
|
|
3572
|
+
case '@local/mesh-update-v1/hyperdb#23':
|
|
3573
|
+
return encoding81
|
|
3574
|
+
case '@local/mesh-update/hyperdb#23':
|
|
3575
|
+
return encoding82
|
|
3419
3576
|
default:
|
|
3420
3577
|
throw new Error('Encoder not found ' + name)
|
|
3421
3578
|
}
|