@floegence/redevplugin-contracts 0.6.17 → 0.6.18
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/dist/contracts.gen.d.ts +74 -63
- package/dist/contracts.gen.js +76 -63
- package/dist/index.d.ts +38 -33
- package/dist/release-signing.d.ts +5 -3
- package/dist/release-signing.js +9 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -19,9 +19,9 @@ export declare const contractRegistry: {
|
|
|
19
19
|
readonly registry_version: "contract-registry-v2";
|
|
20
20
|
readonly artifacts: readonly [{
|
|
21
21
|
readonly id: "compatibility-manifest-schema";
|
|
22
|
-
readonly path: "spec/plugin/compatibility-manifest-
|
|
23
|
-
readonly version: "compatibility-manifest-
|
|
24
|
-
readonly sha256: "
|
|
22
|
+
readonly path: "spec/plugin/compatibility-manifest-v11.schema.json";
|
|
23
|
+
readonly version: "compatibility-manifest-v11";
|
|
24
|
+
readonly sha256: "cec20e7bc5351641c031ebceec10559cad7c5f91a62f79158ace94df88fe1d0d";
|
|
25
25
|
}, {
|
|
26
26
|
readonly id: "contract-registry-schema";
|
|
27
27
|
readonly path: "spec/plugin/contract-registry-v2.schema.json";
|
|
@@ -29,9 +29,9 @@ export declare const contractRegistry: {
|
|
|
29
29
|
readonly sha256: "d516b3565158ac1b0d5e9f86b91b13ac19321ab3ff54468be41951b68d7085ac";
|
|
30
30
|
}, {
|
|
31
31
|
readonly id: "error-codes-schema";
|
|
32
|
-
readonly path: "spec/plugin/error-codes-
|
|
33
|
-
readonly version: "error-codes-
|
|
34
|
-
readonly sha256: "
|
|
32
|
+
readonly path: "spec/plugin/error-codes-v7.schema.json";
|
|
33
|
+
readonly version: "error-codes-v7";
|
|
34
|
+
readonly sha256: "4e7cac510a6036f90cae8f58ff8c3b785b3a2d3933875f2f69bef1c41de3d26c";
|
|
35
35
|
}, {
|
|
36
36
|
readonly id: "host-capability-compatibility-schema";
|
|
37
37
|
readonly path: "spec/plugin/host-capability-compatibility-v1.schema.json";
|
|
@@ -64,14 +64,14 @@ export declare const contractRegistry: {
|
|
|
64
64
|
readonly sha256: "88cbc1d63afb7e289ca4f8b7c76f702b8d20156f7722c1b71f3ab9138a240a5e";
|
|
65
65
|
}, {
|
|
66
66
|
readonly id: "iframe-bridge-schema";
|
|
67
|
-
readonly path: "spec/plugin/bridge-
|
|
68
|
-
readonly version: "bridge-
|
|
69
|
-
readonly sha256: "
|
|
67
|
+
readonly path: "spec/plugin/bridge-v6.schema.json";
|
|
68
|
+
readonly version: "bridge-v6";
|
|
69
|
+
readonly sha256: "e5d98528a96016950038e25b64ca760479452e06c13ab46e4ff06745a3e8aef4";
|
|
70
70
|
}, {
|
|
71
71
|
readonly id: "manifest-schema";
|
|
72
|
-
readonly path: "spec/plugin/manifest-
|
|
73
|
-
readonly version: "manifest-
|
|
74
|
-
readonly sha256: "
|
|
72
|
+
readonly path: "spec/plugin/manifest-v6.schema.json";
|
|
73
|
+
readonly version: "manifest-v6";
|
|
74
|
+
readonly sha256: "b196a328ca6e0581d3da69b8fbaed36ffb1ba13f8e2e46a34b1761cd644f1e74";
|
|
75
75
|
}, {
|
|
76
76
|
readonly id: "network-grant-schema";
|
|
77
77
|
readonly path: "spec/plugin/network-grant-v2.schema.json";
|
|
@@ -84,9 +84,9 @@ export declare const contractRegistry: {
|
|
|
84
84
|
readonly sha256: "63419ff5b5a8890e14f97ca29aaae175b93daff61d4567c5bdff7f6e6a9e7450";
|
|
85
85
|
}, {
|
|
86
86
|
readonly id: "opaque-surface-transport-schema";
|
|
87
|
-
readonly path: "spec/plugin/opaque-surface-transport-
|
|
88
|
-
readonly version: "opaque-surface-transport-
|
|
89
|
-
readonly sha256: "
|
|
87
|
+
readonly path: "spec/plugin/opaque-surface-transport-v5.schema.json";
|
|
88
|
+
readonly version: "opaque-surface-transport-v5";
|
|
89
|
+
readonly sha256: "c9beca3ed207a8059f63e946fca684b6c8a16a9999fe076684dc086af97cf67a";
|
|
90
90
|
}, {
|
|
91
91
|
readonly id: "owner-scope-inventory-registry";
|
|
92
92
|
readonly path: "spec/plugin/owner-scope-inventories-v1.json";
|
|
@@ -134,9 +134,9 @@ export declare const contractRegistry: {
|
|
|
134
134
|
readonly sha256: "4d9979f5205ec047895b64c995312c588d998bb1c1448f6c9c559f1b7ab0d796";
|
|
135
135
|
}, {
|
|
136
136
|
readonly id: "plugin-platform-openapi";
|
|
137
|
-
readonly path: "spec/openapi/plugin-platform-
|
|
138
|
-
readonly version: "plugin-platform-
|
|
139
|
-
readonly sha256: "
|
|
137
|
+
readonly path: "spec/openapi/plugin-platform-v9.yaml";
|
|
138
|
+
readonly version: "plugin-platform-v9";
|
|
139
|
+
readonly sha256: "b5999503d24828d93f5ddaadc01ca31eaa630434bef5552aed9e6ec56c65c305";
|
|
140
140
|
}, {
|
|
141
141
|
readonly id: "process-containment-schema";
|
|
142
142
|
readonly path: "spec/plugin/process-containment-v1.schema.json";
|
|
@@ -149,9 +149,9 @@ export declare const contractRegistry: {
|
|
|
149
149
|
readonly sha256: "0aced01a8d409953d5075a799ac273cae79e285ac82debe93ac4d8b706571ad1";
|
|
150
150
|
}, {
|
|
151
151
|
readonly id: "release-metadata-schema";
|
|
152
|
-
readonly path: "spec/plugin/release-metadata-
|
|
153
|
-
readonly version: "release-metadata-
|
|
154
|
-
readonly sha256: "
|
|
152
|
+
readonly path: "spec/plugin/release-metadata-v6.schema.json";
|
|
153
|
+
readonly version: "release-metadata-v6";
|
|
154
|
+
readonly sha256: "68700942b0bc21298270e90da940f29bb6a4d832282337587abddba9485b9938";
|
|
155
155
|
}, {
|
|
156
156
|
readonly id: "release-revocation-pointer-schema";
|
|
157
157
|
readonly path: "spec/plugin/release-revocation-pointer-v1.schema.json";
|
|
@@ -232,6 +232,11 @@ export declare const contractRegistry: {
|
|
|
232
232
|
readonly path: "spec/plugin/ipc-v6.schema.json";
|
|
233
233
|
readonly version: "rust-ipc-v6";
|
|
234
234
|
readonly sha256: "9814ca091ac2e4e8435c1ab553e248e9d2e792de93ce9fd27bd030486774837f";
|
|
235
|
+
}, {
|
|
236
|
+
readonly id: "session-scope-maintenance-contract";
|
|
237
|
+
readonly path: "spec/plugin/session-scope-maintenance-v1.json";
|
|
238
|
+
readonly version: "session-scope-maintenance-v1";
|
|
239
|
+
readonly sha256: "fd87b6654c954ee2a2dc67958ba214048b894aa421bb74a85fb02000ec51f37b";
|
|
235
240
|
}, {
|
|
236
241
|
readonly id: "session-scope-schema";
|
|
237
242
|
readonly path: "spec/plugin/session-scope-v1.schema.json";
|
|
@@ -271,45 +276,45 @@ export declare const contractRegistry: {
|
|
|
271
276
|
};
|
|
272
277
|
export declare const packageSet: {
|
|
273
278
|
readonly schema_version: "redevplugin.platform_package_set.v1";
|
|
274
|
-
readonly platform_version: "0.6.
|
|
279
|
+
readonly platform_version: "0.6.18";
|
|
275
280
|
readonly go_module: {
|
|
276
281
|
readonly module: "github.com/floegence/redevplugin";
|
|
277
|
-
readonly version: "v0.6.
|
|
282
|
+
readonly version: "v0.6.18";
|
|
278
283
|
};
|
|
279
284
|
readonly npm_packages: readonly [{
|
|
280
285
|
readonly name: "@floegence/redevplugin-contracts";
|
|
281
|
-
readonly version: "0.6.
|
|
286
|
+
readonly version: "0.6.18";
|
|
282
287
|
}, {
|
|
283
288
|
readonly name: "@floegence/redevplugin-ui";
|
|
284
|
-
readonly version: "0.6.
|
|
289
|
+
readonly version: "0.6.18";
|
|
285
290
|
}];
|
|
286
291
|
readonly rust_crates: readonly [{
|
|
287
292
|
readonly name: "redevplugin-contracts";
|
|
288
|
-
readonly version: "0.6.
|
|
293
|
+
readonly version: "0.6.18";
|
|
289
294
|
readonly role: "contracts";
|
|
290
295
|
}, {
|
|
291
296
|
readonly name: "redevplugin-ipc";
|
|
292
|
-
readonly version: "0.6.
|
|
297
|
+
readonly version: "0.6.18";
|
|
293
298
|
readonly role: "ipc";
|
|
294
299
|
}, {
|
|
295
300
|
readonly name: "redevplugin-wasm-abi";
|
|
296
|
-
readonly version: "0.6.
|
|
301
|
+
readonly version: "0.6.18";
|
|
297
302
|
readonly role: "wasm_abi";
|
|
298
303
|
}, {
|
|
299
304
|
readonly name: "redevplugin-target-classifier";
|
|
300
|
-
readonly version: "0.6.
|
|
305
|
+
readonly version: "0.6.18";
|
|
301
306
|
readonly role: "target_classifier";
|
|
302
307
|
}, {
|
|
303
308
|
readonly name: "redevplugin-worker-sdk";
|
|
304
|
-
readonly version: "0.6.
|
|
309
|
+
readonly version: "0.6.18";
|
|
305
310
|
readonly role: "worker_sdk";
|
|
306
311
|
}, {
|
|
307
312
|
readonly name: "redevplugin-runtime";
|
|
308
|
-
readonly version: "0.6.
|
|
313
|
+
readonly version: "0.6.18";
|
|
309
314
|
readonly role: "runtime";
|
|
310
315
|
}];
|
|
311
316
|
readonly contract_registry_version: "contract-registry-v2";
|
|
312
|
-
readonly contract_set_sha256: "
|
|
317
|
+
readonly contract_set_sha256: "c72f9a233bb2161454a5a5e24dba9bfd35f00fd198711fd8ed3bc6b161089ff3";
|
|
313
318
|
};
|
|
314
|
-
export declare const contractSetSHA256: "
|
|
319
|
+
export declare const contractSetSHA256: "c72f9a233bb2161454a5a5e24dba9bfd35f00fd198711fd8ed3bc6b161089ff3";
|
|
315
320
|
export declare function getContract(id: ContractID): Contract;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export declare const rootDelegationSchemaVersion: "redevplugin.release_root_delegation.v1";
|
|
2
2
|
export declare const packageSignatureSchemaVersion: "redevplugin.package_signature.v1";
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const releaseMetadataSchemaVersionV5: "redevplugin.release_metadata.v5";
|
|
4
|
+
export declare const releaseMetadataSchemaVersionV6: "redevplugin.release_metadata.v6";
|
|
5
|
+
export declare const releaseMetadataSchemaVersion: "redevplugin.release_metadata.v6";
|
|
4
6
|
export declare const sourcePolicySchemaVersion: "redevplugin.release_source_policy.v2";
|
|
5
7
|
export declare const sourcePolicyPointerSchemaVersion: "redevplugin.release_source_policy_pointer.v1";
|
|
6
8
|
export declare const revocationSchemaVersion: "redevplugin.release_revocation.v2";
|
|
@@ -104,7 +106,7 @@ export type PackageReleaseSignatureRef = Readonly<{
|
|
|
104
106
|
export type ReleaseCompatibility = Readonly<{
|
|
105
107
|
min_redevplugin_version: string;
|
|
106
108
|
min_runtime_version: string;
|
|
107
|
-
ui_protocol_version: "plugin-ui-v5";
|
|
109
|
+
ui_protocol_version: "plugin-ui-v5" | "plugin-ui-v6";
|
|
108
110
|
supported_targets?: readonly ("darwin/amd64" | "darwin/arm64" | "linux/amd64" | "linux/arm64")[];
|
|
109
111
|
}>;
|
|
110
112
|
export type HostCapabilityContractRef = Readonly<{
|
|
@@ -143,7 +145,7 @@ export type ReleaseEvidence = Readonly<{
|
|
|
143
145
|
generated_at?: string;
|
|
144
146
|
}>;
|
|
145
147
|
export type ReleaseMetadataV5 = Readonly<{
|
|
146
|
-
schema_version: typeof
|
|
148
|
+
schema_version: typeof releaseMetadataSchemaVersionV5 | typeof releaseMetadataSchemaVersionV6;
|
|
147
149
|
source_id: string;
|
|
148
150
|
release_metadata_ref: string;
|
|
149
151
|
publisher_id: string;
|
package/dist/release-signing.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export const rootDelegationSchemaVersion = "redevplugin.release_root_delegation.v1";
|
|
2
2
|
export const packageSignatureSchemaVersion = "redevplugin.package_signature.v1";
|
|
3
|
-
export const
|
|
3
|
+
export const releaseMetadataSchemaVersionV5 = "redevplugin.release_metadata.v5";
|
|
4
|
+
export const releaseMetadataSchemaVersionV6 = "redevplugin.release_metadata.v6";
|
|
5
|
+
export const releaseMetadataSchemaVersion = releaseMetadataSchemaVersionV6;
|
|
4
6
|
export const sourcePolicySchemaVersion = "redevplugin.release_source_policy.v2";
|
|
5
7
|
export const sourcePolicyPointerSchemaVersion = "redevplugin.release_source_policy_pointer.v1";
|
|
6
8
|
export const revocationSchemaVersion = "redevplugin.release_revocation.v2";
|
|
@@ -326,7 +328,7 @@ function validatePackageSignature(context, value, requireSignature) {
|
|
|
326
328
|
function validateReleaseMetadata(value) {
|
|
327
329
|
assertRecord(value);
|
|
328
330
|
closeReleaseMetadata(value);
|
|
329
|
-
if (value.schema_version
|
|
331
|
+
if (!validReleaseMetadataUIProtocolPair(value.schema_version, value.compatibility.ui_protocol_version) || !matchesPattern(newIDPattern, value.source_id))
|
|
330
332
|
invalidDocument();
|
|
331
333
|
if (!matchesPattern(legacyIDPattern, value.publisher_id) || !matchesPattern(legacyIDPattern, value.plugin_id) || !matchesPattern(semverPattern, value.version) || !validArtifactRef(value.release_metadata_ref))
|
|
332
334
|
invalidDocument();
|
|
@@ -340,7 +342,7 @@ function validateReleaseMetadata(value) {
|
|
|
340
342
|
const packageSignature = value.package_signature;
|
|
341
343
|
if (packageSignature.algorithm !== signatureAlgorithmEd25519 || !matchesPattern(newIDPattern, packageSignature.key_id) || !validArtifactRef(packageSignature.signature_bundle_ref) || !matchesPattern(epochPattern, packageSignature.source_policy_epoch) || !matchesPattern(epochPattern, packageSignature.revocation_epoch))
|
|
342
344
|
invalidDocument();
|
|
343
|
-
if (!matchesPattern(semverPattern, value.compatibility.min_redevplugin_version) || !matchesPattern(semverPattern, value.compatibility.min_runtime_version)
|
|
345
|
+
if (!matchesPattern(semverPattern, value.compatibility.min_redevplugin_version) || !matchesPattern(semverPattern, value.compatibility.min_runtime_version))
|
|
344
346
|
invalidDocument();
|
|
345
347
|
if (value.compatibility.supported_targets !== undefined) {
|
|
346
348
|
if (!Array.isArray(value.compatibility.supported_targets))
|
|
@@ -391,6 +393,10 @@ function validateReleaseMetadata(value) {
|
|
|
391
393
|
invalidDocument();
|
|
392
394
|
}
|
|
393
395
|
}
|
|
396
|
+
function validReleaseMetadataUIProtocolPair(schemaVersion, uiProtocolVersion) {
|
|
397
|
+
return (schemaVersion === releaseMetadataSchemaVersionV5 && uiProtocolVersion === "plugin-ui-v5") ||
|
|
398
|
+
(schemaVersion === releaseMetadataSchemaVersionV6 && uiProtocolVersion === "plugin-ui-v6");
|
|
399
|
+
}
|
|
394
400
|
function validateCapabilityContractRef(value) {
|
|
395
401
|
if (![value.publisher_id, value.contract_id, value.signature_key_id].every((item) => matchesPattern(legacyIDPattern, item)) || !matchesPattern(semverPattern, value.contract_version))
|
|
396
402
|
invalidDocument();
|