@mhome/core-protocol 1.66.0 → 1.72.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.
@@ -0,0 +1,54 @@
1
+ # Integration Preview apply
2
+
3
+ This source contract implements standard Integration Preview on a Local Space Hub.
4
+ Native Plugin Preview and long-lived subscription refresh have separate owners.
5
+
6
+ App calls use the ordinary Facade envelope and Space authorization:
7
+
8
+ | Target | Input | Business output | Owner |
9
+ | --- | --- | --- | --- |
10
+ | `/app/integration/preview/apply` | `ApplyPreviewRequest` | `spaceId`, exact `source`, `activated: true` | Selected Local Hub; Space write |
11
+ | `/app/integration/preview/status` | `{}` | `spaceId`, active Preview `sources`, `refreshPending` | Selected Local Hub; Space read |
12
+ | `/app/resource/transfer/prepare` | `sizeBytes`, `sha256` | `reference`, presigned PUT `url`, required `headers` | Cloud; Space write |
13
+
14
+ `ApplyPreviewRequest.material` contains a `PreviewManifest` as UTF-8 JSON.
15
+ `scripts` maps function names to the separately transferred UTF-8 ESM bodies.
16
+ Each resource is `{"kind":"inline","text":"..."}` or
17
+ `{"kind":"object","reference":{...}}`. No client-selected download URL, filesystem
18
+ path, tenant or Hub identifier is accepted. The CLI sends bytes to the explicitly
19
+ selected Space; the desktop and Hub may be on different machines.
20
+
21
+ The manifest has `formatVersion: 1`, `integrationId`, `schemas` (relative filename
22
+ to YAML), `i18n` (language to YAML), and `scripts` (function to ScriptArtifact).
23
+ The Hub derives its content identity from canonical serialization, using sorted
24
+ maps. A Preview has no release version. Its exact script inventory and every size,
25
+ digest and runtime SDK version are checked before activation. Limits: 16 MiB
26
+ manifest, 100 scripts, 4 MiB per script, 1 MiB serialized apply input. Script bodies
27
+ do not share the manifest's 16 MiB budget.
28
+
29
+ Optional `configuration` is a separate JSON object, limited to 64 KiB/1000 keys.
30
+ Omission preserves Hub values; explicit null removes a key. Values are checked
31
+ against the candidate's declarations, and removed declarations are projected out.
32
+ Configuration is absent from source hashes, publication objects, compiler callbacks
33
+ and status responses. It is stored by Space/Integration only on the Hub and committed
34
+ with the source/models. Published configuration sync cannot replace it. Runtime-only
35
+ cloud evaluation can read the exact active Preview configuration through the
36
+ authenticated `/dispatch/integration/preview/env/read` callback (`integrationId`,
37
+ `snapshot` -> `values`); a changed source rejects the read. Cloud JS remains deferred.
38
+
39
+ Temporary transfers reuse the private transport bucket, not a release bucket.
40
+ References contain a random 32-hex `id`, `expiresAt` in Unix milliseconds,
41
+ `sizeBytes` and a SHA-256 digest. They expire after five minutes. Hub resolution uses
42
+ `/bridge/resource/transfer/read` in its authenticated tenant/Space; the cloud derives
43
+ the object key and returns a GET grant. Receivers reject changed references,
44
+ redirects, oversized/truncated bodies, invalid UTF-8 and digest mismatches.
45
+ Objects are transient; no upload-session database or Preview operation journal is added.
46
+
47
+ The ordinary 60-second request deadline covers Hub downloads, Lion preparation,
48
+ activation and request-awaited projection. Child calls inherit remaining time;
49
+ resource HTTP has an additional 30-second cap. Build/capture is a prior local step.
50
+ Preparation failure leaves active source and configuration unchanged. Immutable
51
+ candidate resources may remain unreferenced. Activation commits locally before
52
+ projection; a subsequent failure reports `details.activated: true` and can be retried
53
+ with the same content. Timeout may prevent that response, so query status if needed.
54
+ There is no automatic rollback, exit operation, history selector or published fallback.
@@ -1,13 +1,14 @@
1
- # Node release metadata
1
+ # Node source metadata
2
2
 
3
3
  `POST /node/metadata` with `{}` is available over commissioning HTTPS and the
4
4
  existing authenticated Node request transport. It returns `NodeMetadata` under
5
- `schema/node-metadata.v1.schema.json`. It does not start a business runtime.
5
+ `schema/node-metadata.v2.schema.json`. It does not start a business runtime.
6
6
 
7
7
  Delivery describes ownership, independently of `kind` (`core` or `extension`):
8
8
 
9
- - `host`: the SDK asks its local Host for the actual installed release manifest.
10
- The Host returns persisted installation evidence, never the latest catalog.
9
+ - `host`: published services ask their local Host for the actual installed release
10
+ manifest. Preview services read their launch-specific Host proof, described below.
11
+ Published evidence comes from installation state, never the latest catalog.
11
12
  The SDK checks node type, service ID and version against its running process.
12
13
  - `firmware`: a dedicated implementation embeds its publisher-signed definition
13
14
  and version in the binary. Updates replace it with the firmware/application.
@@ -20,8 +21,8 @@ reports its embedded AAR release version. Publishing a new AAR does not update a
20
21
  installed App. This classification describes the update owner, not the hardware
21
22
  category or whether the Plugin is `core` or `extension`.
22
23
 
23
- The response carries exact signed manifest bytes and the detached Minisign
24
- signature. Host manifests use `meow.plugin.manifest[-bundle]`; embedded releases
24
+ A `source.kind=published` response carries `source.releaseManifest` with exact
25
+ signed manifest bytes and the detached Minisign signature. Host manifests use `meow.plugin.manifest[-bundle]`; embedded releases
25
26
  use `meow.node.firmware-manifest[-bundle]`, with `platform`, `pluginId`,
26
27
  `componentId`, `version`, `nodeMetadata.plugin` and `compatibility` at the payload
27
28
  root. Host release components retain their normal package manifest structure.
@@ -42,7 +43,8 @@ requests still require the challenge-proven TLS key.
42
43
  Core persists `NodeBindingMetadata` with each binding for offline management.
43
44
  Every `/node/auth` request includes required `metadata` for the running release.
44
45
  Core authenticates the token and binding first, then verifies the publisher
45
- signature, stable identity, runtime version and private protocol compatibility.
46
+ signature (or explicitly selected Host Preview proof), stable identity, runtime
47
+ version and private protocol compatibility.
46
48
  Only then may it activate the token and return `ok: true`. Release validation
47
49
  failure rejects the connection without revoking the binding or requesting
48
50
  `CLEAR_LOCAL_IDENTITY`. No catalog/network lookup is part of authentication.
@@ -73,3 +75,44 @@ Manifest bytes are bounded to 1 MiB, signatures to 4 KiB. No publisher secret or
73
75
  account credential is included. Existing databases require explicit rebuilding
74
76
  when the baseline binding snapshot column is introduced; startup does not migrate
75
77
  or erase data.
78
+
79
+ ## Native Preview
80
+
81
+ `source.kind=preview` is Host delivery only. It carries exact `manifest` bytes and
82
+ `hostProof`, a compact JWS under the existing Host P-256 key and the dedicated
83
+ `meow-plugin-preview+jwt` purpose. The proof binds Host ID, runtime environment and
84
+ manifest SHA-256. It is provenance, not a Space token; there is no separate lease.
85
+ A publisher verification failure never tries this path.
86
+
87
+ The small manifest contains formatVersion=1, Plugin definition, platform,
88
+ serviceVersion, optional coreProtocol and filesSha256. The complete file inventory
89
+ stays on Host in `preview-files.json`; its hash is covered by the manifest/proof.
90
+ The manifest also carries an explicit `requires` map (possibly empty), keyed by
91
+ `host`/`client` with version requirements. The installing Host parses and checks
92
+ these against installed platform versions before stopping the current service.
93
+ It persists them with installed compatibility for subsequent platform update
94
+ planning. Preview does not silently upgrade Host or Client.
95
+ The inventory contains safe relative paths and each file's size and SHA-256.
96
+ The Host copies and verifies a complete candidate before selection. Proofs never
97
+ include private keys, account credentials or native payload bytes.
98
+
99
+ Initial enable uses the ordinary authenticated Space Manage request with an
100
+ explicit Preview expectation (hostId, hostPublicKey, manifestSha256) obtained from
101
+ that computer's OS-authenticated Host socket. Node-supplied metadata cannot select
102
+ the trusted key. The signed commissioning challenge must match that expectation.
103
+ Bindings record their verified Host public key for both published and Preview
104
+ sources. Reconnect verifies Preview with that saved key, the token's Host identity,
105
+ and current environment; this allows one Host's replacement to reach every
106
+ existing bound Space without issuing new credentials. A failed check leaves the
107
+ binding intact and disconnected.
108
+
109
+ The SDK reads Preview evidence from its actual canonical executable package,
110
+ never from the current mutable Host selection. Missing/corrupt Preview launch
111
+ evidence fails; a running older same-version process cannot claim a newer build.
112
+ Auth acknowledgements must match source kind as well as manifest hash/version.
113
+ Published firmware retains publisher verification and never accepts Preview.
114
+
115
+ This v2 envelope replaces v1; Host, Core, native SDK consumers and firmware must
116
+ consume the matching protocol together. No legacy reader or database conversion
117
+ is provided. Runtime business data and binding identities remain unchanged by a
118
+ normal Preview replacement.
@@ -180,7 +180,9 @@ and removal-only cleanup authority.
180
180
 
181
181
  ## Physical backend and reads
182
182
 
183
- `storage.backend.v2` remains separate from the public `storage.v1` capability.
183
+ `storage.backend.v1` remains separate from the public `storage.v1` capability.
184
+ Storage is in development: both protocols evolve in place as v1, with no legacy
185
+ readers, version negotiation or compatibility branches.
184
186
  Describe reports capacity; grant authorizes stat/read/delete; prepare-write reserves
185
187
  space for an immutable Blob before issuing a write grant. A lost reply can have
186
188
  reserved bytes. Receipts are resolved before changing repositories. Issued grants survive temporary Core control disconnection until normal expiry;
@@ -1,27 +1,244 @@
1
1
  [
2
- {"target":"/app/widget/list","payload":{},"operation":"coreRequest","totalMs":60000},
3
- {"target":"/harness/test/session/open","payload":{},"operation":"harnessSessionOpen","totalMs":150000},
4
- {"target":"/app/automation/save","payload":{"input":{"script":{"scripts":{"lighting":"source"}}}},"operation":"scriptSave","totalMs":60000,"lionWaitMs":90000},
5
- {"target":"/app/automation/verify","payload":{"input":{"script":{"scripts":{"lighting":"source"}}}},"operation":"scriptValidation","totalMs":60000,"lionWaitMs":85000},
6
- {"target":"/automation/save","payload":{"script":{"scripts":{"lighting":"source"}}},"operation":"scriptSave","totalMs":60000},
7
- {"target":"/invoke/app/automation/save","payload":{"call":{"input":{"script":{"scripts":{"lighting":"source"}}}}},"operation":"scriptSave","totalMs":60000},
8
- {"target":"/dispatch/agent/app/automation/verify","payload":{"call":{"input":{"script":{"scripts":{"lighting":"source"}}}}},"operation":"scriptValidation","totalMs":60000},
9
- {"target":"/dispatch/app/automation/save","payload":{"call":{"input":{"script":{"scripts":{"lighting":"source"}}}}},"operation":"scriptSave","totalMs":60000},
10
- {"target":"/app/automation/save","payload":{"input":{"script":{"scripts":{}}}},"operation":"coreRequest","totalMs":60000},
11
- {"target":"/app/automation/save","payload":{"script":{"scripts":{"lighting":"source"}}},"operation":"coreRequest","totalMs":60000},
12
- {"target":"/app/automation/save","payload":{"input":{"script":{"scripts":[]}}},"operation":"coreRequest","totalMs":60000},
13
- {"target":"/automation/snapshot/rollback","payload":{},"operation":"scriptSave","totalMs":60000},
14
- {"target":"/app/automation/snapshot/rollback","payload":{},"operation":"scriptSave","totalMs":60000},
15
- {"target":"/automation/copy","payload":{},"operation":"scriptSave","totalMs":60000},
16
- {"target":"/automation/enroll","payload":{},"operation":"scriptSave","totalMs":60000},
17
- {"target":"/automation/overview/save","payload":{},"operation":"scriptSave","totalMs":60000},
18
- {"target":"/bridge/automation/compile","payload":{"script":{"scripts":{"lighting":"source"}}},"operation":"scriptValidation","totalMs":60000},
19
- {"target":"/app/integration/entity/refresh","payload":{},"operation":"entityRefresh","totalMs":85000,"lionWaitMs":90000},
20
- {"target":"/invoke/app/integration/entity/refresh","payload":{},"operation":"entityRefresh","totalMs":85000,"lionWaitMs":90000},
21
- {"target":"/dispatch/app/integration/entity/refresh","payload":{},"operation":"entityRefresh","totalMs":85000,"lionWaitMs":90000},
22
- {"target":"/dispatch/agent/app/integration/entity/refresh","payload":{},"operation":"entityRefresh","totalMs":85000,"lionWaitMs":90000},
23
- {"target":"/bridge/automation/parse","payload":{"script":{"scripts":{"lighting":"source"}}},"operation":"scriptValidation","totalMs":60000,"lionWaitMs":85000},
24
- {"target":"/bridge/automation/format","payload":{"script":{"scripts":{"lighting":"source"}}},"operation":"scriptValidation","totalMs":60000,"lionWaitMs":85000},
25
- {"target":"/dispatch/hub/revoke/start","payload":{},"operation":"hubMigration","totalMs":600000},
26
- {"target":"/bridge/hub/revoke/dataUploaded","payload":{},"operation":"hubMigration","totalMs":600000}
2
+ {
3
+ "target": "/app/widget/list",
4
+ "payload": {},
5
+ "operation": "coreRequest",
6
+ "totalMs": 60000
7
+ },
8
+ {
9
+ "target": "/harness/test/session/open",
10
+ "payload": {},
11
+ "operation": "harnessSessionOpen",
12
+ "totalMs": 150000
13
+ },
14
+ {
15
+ "target": "/app/automation/save",
16
+ "payload": {
17
+ "input": {
18
+ "script": {
19
+ "scripts": {
20
+ "lighting": "source"
21
+ }
22
+ }
23
+ }
24
+ },
25
+ "operation": "scriptSave",
26
+ "totalMs": 60000,
27
+ "lionWaitMs": 90000
28
+ },
29
+ {
30
+ "target": "/app/automation/verify",
31
+ "payload": {
32
+ "input": {
33
+ "script": {
34
+ "scripts": {
35
+ "lighting": "source"
36
+ }
37
+ }
38
+ }
39
+ },
40
+ "operation": "scriptValidation",
41
+ "totalMs": 60000,
42
+ "lionWaitMs": 85000
43
+ },
44
+ {
45
+ "target": "/app/automation/save",
46
+ "payload": {
47
+ "input": {
48
+ "script": {
49
+ "scripts": {
50
+ "lighting": "source"
51
+ }
52
+ }
53
+ }
54
+ },
55
+ "operation": "scriptSave",
56
+ "totalMs": 60000
57
+ },
58
+ {
59
+ "target": "/invoke/app/automation/save",
60
+ "payload": {
61
+ "call": {
62
+ "input": {
63
+ "script": {
64
+ "scripts": {
65
+ "lighting": "source"
66
+ }
67
+ }
68
+ }
69
+ }
70
+ },
71
+ "operation": "scriptSave",
72
+ "totalMs": 60000
73
+ },
74
+ {
75
+ "target": "/dispatch/agent/app/automation/verify",
76
+ "payload": {
77
+ "call": {
78
+ "input": {
79
+ "script": {
80
+ "scripts": {
81
+ "lighting": "source"
82
+ }
83
+ }
84
+ }
85
+ }
86
+ },
87
+ "operation": "scriptValidation",
88
+ "totalMs": 60000
89
+ },
90
+ {
91
+ "target": "/dispatch/app/automation/save",
92
+ "payload": {
93
+ "call": {
94
+ "input": {
95
+ "script": {
96
+ "scripts": {
97
+ "lighting": "source"
98
+ }
99
+ }
100
+ }
101
+ }
102
+ },
103
+ "operation": "scriptSave",
104
+ "totalMs": 60000
105
+ },
106
+ {
107
+ "target": "/app/automation/save",
108
+ "payload": {
109
+ "input": {
110
+ "script": {
111
+ "scripts": {}
112
+ }
113
+ }
114
+ },
115
+ "operation": "coreRequest",
116
+ "totalMs": 60000
117
+ },
118
+ {
119
+ "target": "/app/automation/save",
120
+ "payload": {
121
+ "script": {
122
+ "scripts": {
123
+ "lighting": "source"
124
+ }
125
+ }
126
+ },
127
+ "operation": "coreRequest",
128
+ "totalMs": 60000
129
+ },
130
+ {
131
+ "target": "/app/automation/save",
132
+ "payload": {
133
+ "input": {
134
+ "script": {
135
+ "scripts": []
136
+ }
137
+ }
138
+ },
139
+ "operation": "coreRequest",
140
+ "totalMs": 60000
141
+ },
142
+ {
143
+ "target": "/app/automation/snapshot/rollback",
144
+ "payload": {},
145
+ "operation": "scriptSave",
146
+ "totalMs": 60000
147
+ },
148
+ {
149
+ "target": "/app/presentation/automation/copy",
150
+ "payload": {},
151
+ "operation": "scriptSave",
152
+ "totalMs": 60000
153
+ },
154
+ {
155
+ "target": "/app/presentation/automation/enroll",
156
+ "payload": {},
157
+ "operation": "scriptSave",
158
+ "totalMs": 60000
159
+ },
160
+ {
161
+ "target": "/app/presentation/automation/overview/save",
162
+ "payload": {},
163
+ "operation": "scriptSave",
164
+ "totalMs": 60000
165
+ },
166
+ {
167
+ "target": "/bridge/automation/compile",
168
+ "payload": {
169
+ "script": {
170
+ "scripts": {
171
+ "lighting": "source"
172
+ }
173
+ }
174
+ },
175
+ "operation": "scriptValidation",
176
+ "totalMs": 60000
177
+ },
178
+ {
179
+ "target": "/app/integration/entity/refresh",
180
+ "payload": {},
181
+ "operation": "entityRefresh",
182
+ "totalMs": 85000,
183
+ "lionWaitMs": 90000
184
+ },
185
+ {
186
+ "target": "/invoke/app/integration/entity/refresh",
187
+ "payload": {},
188
+ "operation": "entityRefresh",
189
+ "totalMs": 85000,
190
+ "lionWaitMs": 90000
191
+ },
192
+ {
193
+ "target": "/dispatch/app/integration/entity/refresh",
194
+ "payload": {},
195
+ "operation": "entityRefresh",
196
+ "totalMs": 85000,
197
+ "lionWaitMs": 90000
198
+ },
199
+ {
200
+ "target": "/dispatch/agent/app/integration/entity/refresh",
201
+ "payload": {},
202
+ "operation": "entityRefresh",
203
+ "totalMs": 85000,
204
+ "lionWaitMs": 90000
205
+ },
206
+ {
207
+ "target": "/bridge/automation/parse",
208
+ "payload": {
209
+ "script": {
210
+ "scripts": {
211
+ "lighting": "source"
212
+ }
213
+ }
214
+ },
215
+ "operation": "scriptValidation",
216
+ "totalMs": 60000,
217
+ "lionWaitMs": 85000
218
+ },
219
+ {
220
+ "target": "/bridge/automation/format",
221
+ "payload": {
222
+ "script": {
223
+ "scripts": {
224
+ "lighting": "source"
225
+ }
226
+ }
227
+ },
228
+ "operation": "scriptValidation",
229
+ "totalMs": 60000,
230
+ "lionWaitMs": 85000
231
+ },
232
+ {
233
+ "target": "/dispatch/hub/revoke/start",
234
+ "payload": {},
235
+ "operation": "hubMigration",
236
+ "totalMs": 600000
237
+ },
238
+ {
239
+ "target": "/bridge/hub/revoke/dataUploaded",
240
+ "payload": {},
241
+ "operation": "hubMigration",
242
+ "totalMs": 600000
243
+ }
27
244
  ]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.core.v1",
3
- "contractVersion": "1.66.0",
3
+ "contractVersion": "1.72.0",
4
4
  "protocols": {
5
5
  "extensionSources": {
6
6
  "contract": "contract/extension-sources-v1.md",
@@ -30,8 +30,10 @@
30
30
  "interactionFlowSubmissionRetryTarget": "/{nodeType}/interaction-flow/submission/retry",
31
31
  "interactionFlowCloseTarget": "/{nodeType}/interaction-flow/close",
32
32
  "metadataTarget": "/node/metadata",
33
- "metadataSchema": "schema/node-metadata.v1.schema.json",
34
- "metadataContract": "contract/node-metadata-v1.md"
33
+ "metadataSchema": "schema/node-metadata.v2.schema.json",
34
+ "metadataContract": "contract/node-metadata-v2.md",
35
+ "previewApplyLocalPath": "/v1/plugins/preview/apply",
36
+ "previewStatusLocalPath": "/v1/plugins/preview/status"
35
37
  },
36
38
  "audioBridgePlugin": {
37
39
  "version": "v1",
@@ -81,6 +83,14 @@
81
83
  "statusPath": "/v1/permissions",
82
84
  "requestPath": "/internal/permissions/request",
83
85
  "settingsPath": "/internal/permissions/open-settings"
86
+ },
87
+ "extensionPreview": {
88
+ "contract": "contract/extension-preview-v1.md",
89
+ "applyTarget": "/app/integration/preview/apply",
90
+ "statusTarget": "/app/integration/preview/status",
91
+ "transferPrepareTarget": "/app/resource/transfer/prepare",
92
+ "transferReadTarget": "/bridge/resource/transfer/read",
93
+ "runtimeEnvReadTarget": "/dispatch/integration/preview/env/read"
84
94
  }
85
95
  },
86
96
  "hostManagement": {
@@ -22,9 +22,9 @@
22
22
  },
23
23
  "selectors": {
24
24
  "forwardPrefixes": ["/invoke", "/dispatch/agent", "/dispatch"],
25
- "storedScriptSave": ["/automation/snapshot/rollback", "/app/automation/snapshot/rollback", "/automation/overview/save", "/automation/copy", "/automation/enroll"],
26
- "sourceScriptSave": ["/automation/save", "/app/automation/save"],
27
- "sourceScriptValidation": ["/app/automation/verify", "/bridge/automation/parse", "/bridge/automation/format", "/bridge/automation/verify", "/automation/format", "/bridge/automation/compile", "/bridge/agent/automation/compile"],
25
+ "storedScriptSave": ["/app/automation/snapshot/rollback", "/app/presentation/automation/overview/save", "/app/presentation/automation/copy", "/app/presentation/automation/enroll"],
26
+ "sourceScriptSave": ["/app/automation/save"],
27
+ "sourceScriptValidation": ["/app/automation/verify", "/bridge/automation/parse", "/bridge/automation/format", "/bridge/automation/verify", "/bridge/automation/compile", "/bridge/agent/automation/compile"],
28
28
  "ordinaryOverrides": { "/hub/revoke/start": "hubMigration", "/bridge/hub/revoke/dataUploaded": "hubMigration", "/app/integration/entity/refresh": "entityRefresh", "/harness/test/session/open": "harnessSessionOpen" }
29
29
  }
30
30
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mhome/core-protocol",
3
- "version": "1.66.0",
3
+ "version": "1.72.0",
4
4
  "description": "Build-time protocol artifacts for mhome.core",
5
5
  "license": "MIT",
6
6
  "repository": {
package/protocol.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "protocol": "mhome.core",
3
- "contractVersion": "1.66.0",
3
+ "contractVersion": "1.72.0",
4
4
  "manifest": "manifest/core.v1.json",
5
5
  "schemas": {
6
6
  "storage": "schema/storage.v1.schema.json",
@@ -0,0 +1,129 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "additionalProperties": false,
5
+ "required": [
6
+ "schemaVersion",
7
+ "delivery",
8
+ "nodeType",
9
+ "serviceId",
10
+ "serviceVersion",
11
+ "source"
12
+ ],
13
+ "properties": {
14
+ "schemaVersion": {
15
+ "const": "meow.node.metadata.v2"
16
+ },
17
+ "delivery": {
18
+ "enum": [
19
+ "host",
20
+ "firmware"
21
+ ]
22
+ },
23
+ "nodeType": {
24
+ "type": "string",
25
+ "minLength": 1
26
+ },
27
+ "serviceId": {
28
+ "type": "string",
29
+ "minLength": 1
30
+ },
31
+ "serviceVersion": {
32
+ "type": "string",
33
+ "minLength": 1
34
+ },
35
+ "source": {
36
+ "oneOf": [
37
+ {
38
+ "type": "object",
39
+ "additionalProperties": false,
40
+ "required": [
41
+ "kind",
42
+ "releaseManifest"
43
+ ],
44
+ "properties": {
45
+ "kind": {
46
+ "const": "published"
47
+ },
48
+ "releaseManifest": {
49
+ "type": "object",
50
+ "additionalProperties": false,
51
+ "required": [
52
+ "schemaVersion",
53
+ "kind",
54
+ "manifest",
55
+ "signature"
56
+ ],
57
+ "properties": {
58
+ "schemaVersion": {
59
+ "const": 1
60
+ },
61
+ "kind": {
62
+ "enum": [
63
+ "meow.plugin.manifest-bundle",
64
+ "meow.node.firmware-manifest-bundle"
65
+ ]
66
+ },
67
+ "manifest": {
68
+ "type": "string",
69
+ "minLength": 1
70
+ },
71
+ "signature": {
72
+ "type": "string",
73
+ "minLength": 1
74
+ }
75
+ }
76
+ }
77
+ }
78
+ },
79
+ {
80
+ "type": "object",
81
+ "additionalProperties": false,
82
+ "required": [
83
+ "kind",
84
+ "manifest",
85
+ "hostProof"
86
+ ],
87
+ "properties": {
88
+ "kind": {
89
+ "const": "preview"
90
+ },
91
+ "manifest": {
92
+ "type": "string",
93
+ "minLength": 1,
94
+ "maxLength": 1048576
95
+ },
96
+ "hostProof": {
97
+ "type": "string",
98
+ "minLength": 1,
99
+ "maxLength": 16384
100
+ }
101
+ }
102
+ }
103
+ ]
104
+ }
105
+ },
106
+ "allOf": [
107
+ {
108
+ "if": {
109
+ "properties": {
110
+ "delivery": {
111
+ "const": "firmware"
112
+ }
113
+ }
114
+ },
115
+ "then": {
116
+ "properties": {
117
+ "source": {
118
+ "properties": {
119
+ "kind": {
120
+ "const": "published"
121
+ }
122
+ },
123
+ "type": "object"
124
+ }
125
+ }
126
+ }
127
+ }
128
+ ]
129
+ }
@@ -1,65 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "type": "object",
4
- "additionalProperties": false,
5
- "required": [
6
- "schemaVersion",
7
- "delivery",
8
- "nodeType",
9
- "serviceId",
10
- "serviceVersion",
11
- "releaseManifest"
12
- ],
13
- "properties": {
14
- "schemaVersion": {
15
- "const": "meow.node.metadata.v1"
16
- },
17
- "delivery": {
18
- "enum": [
19
- "host",
20
- "firmware"
21
- ]
22
- },
23
- "nodeType": {
24
- "type": "string",
25
- "minLength": 1
26
- },
27
- "serviceId": {
28
- "type": "string",
29
- "minLength": 1
30
- },
31
- "serviceVersion": {
32
- "type": "string",
33
- "minLength": 1
34
- },
35
- "releaseManifest": {
36
- "type": "object",
37
- "additionalProperties": false,
38
- "required": [
39
- "schemaVersion",
40
- "kind",
41
- "manifest",
42
- "signature"
43
- ],
44
- "properties": {
45
- "schemaVersion": {
46
- "const": 1
47
- },
48
- "kind": {
49
- "enum": [
50
- "meow.plugin.manifest-bundle",
51
- "meow.node.firmware-manifest-bundle"
52
- ]
53
- },
54
- "manifest": {
55
- "type": "string",
56
- "minLength": 1
57
- },
58
- "signature": {
59
- "type": "string",
60
- "minLength": 1
61
- }
62
- }
63
- }
64
- }
65
- }