1use super::{
4 Contract, ContractId, GoModuleCoordinate, NpmPackageCoordinate, PackageSet, RustCrateCoordinate,
5};
6
7impl ContractId {
8 pub const COMPATIBILITY_MANIFEST_SCHEMA: Self =
9 Self::from_static("compatibility-manifest-schema");
10 pub const CONTRACT_REGISTRY: Self = Self::from_static("contract-registry");
11 pub const CONTRACT_REGISTRY_SCHEMA: Self = Self::from_static("contract-registry-schema");
12 pub const ERROR_CODES_SCHEMA: Self = Self::from_static("error-codes-schema");
13 pub const EXTERNAL_SIGNER_REQUEST_SCHEMA: Self =
14 Self::from_static("external-signer-request-schema");
15 pub const EXTERNAL_SIGNER_RESPONSE_SCHEMA: Self =
16 Self::from_static("external-signer-response-schema");
17 pub const HOST_CAPABILITY_COMPATIBILITY_SCHEMA: Self =
18 Self::from_static("host-capability-compatibility-schema");
19 pub const HOST_CAPABILITY_CONTRACT_SCHEMA: Self =
20 Self::from_static("host-capability-contract-schema");
21 pub const HOST_CAPABILITY_MANIFEST_SCHEMA: Self =
22 Self::from_static("host-capability-manifest-schema");
23 pub const HOST_CAPABILITY_NOTICES_SCHEMA: Self =
24 Self::from_static("host-capability-notices-schema");
25 pub const HOST_CAPABILITY_PIN_SCHEMA: Self = Self::from_static("host-capability-pin-schema");
26 pub const HOST_CAPABILITY_PUBLISHER_CONFIG_SCHEMA: Self =
27 Self::from_static("host-capability-publisher-config-schema");
28 pub const HOST_CAPABILITY_SIGNATURE_SCHEMA: Self =
29 Self::from_static("host-capability-signature-schema");
30 pub const HOST_CAPABILITY_SIGNER_REQUEST_SCHEMA: Self =
31 Self::from_static("host-capability-signer-request-schema");
32 pub const HOST_CAPABILITY_SIGNER_RESPONSE_SCHEMA: Self =
33 Self::from_static("host-capability-signer-response-schema");
34 pub const IFRAME_BRIDGE_SCHEMA: Self = Self::from_static("iframe-bridge-schema");
35 pub const MANIFEST_SCHEMA: Self = Self::from_static("manifest-schema");
36 pub const NETWORK_GRANT_SCHEMA: Self = Self::from_static("network-grant-schema");
37 pub const OPAQUE_SURFACE_DOCUMENT_SCHEMA: Self =
38 Self::from_static("opaque-surface-document-schema");
39 pub const OPAQUE_SURFACE_TRANSPORT_SCHEMA: Self =
40 Self::from_static("opaque-surface-transport-schema");
41 pub const OWNER_SCOPE_INVENTORY_REGISTRY: Self =
42 Self::from_static("owner-scope-inventory-registry");
43 pub const OWNER_SCOPE_INVENTORY_SCHEMA: Self =
44 Self::from_static("owner-scope-inventory-schema");
45 pub const OWNER_SCOPE_MIGRATION_SCHEMA: Self =
46 Self::from_static("owner-scope-migration-schema");
47 pub const OWNER_SCOPE_ROOT_RECOVERY_SCHEMA: Self =
48 Self::from_static("owner-scope-root-recovery-schema");
49 pub const PACKAGE_SIGNATURE_SCHEMA: Self = Self::from_static("package-signature-schema");
50 pub const PERFORMANCE_CONTRACT: Self = Self::from_static("performance-contract");
51 pub const PERFORMANCE_EVIDENCE_SCHEMA: Self = Self::from_static("performance-evidence-schema");
52 pub const PLATFORM_PACKAGE_PUBLICATION_SCHEMA: Self =
53 Self::from_static("platform-package-publication-schema");
54 pub const PLATFORM_PACKAGE_SET_SCHEMA: Self = Self::from_static("platform-package-set-schema");
55 pub const PLUGIN_PLATFORM_OPENAPI: Self = Self::from_static("plugin-platform-openapi");
56 pub const PRESENTATION_ICON_EVIDENCE_SCHEMA: Self =
57 Self::from_static("presentation-icon-evidence-schema");
58 pub const PRESENTATION_LOCALE_FIXTURE: Self = Self::from_static("presentation-locale-fixture");
59 pub const PROCESS_CONTAINMENT_SCHEMA: Self = Self::from_static("process-containment-schema");
60 pub const PUBLISHER_RELEASE_REF_SCHEMA: Self =
61 Self::from_static("publisher-release-ref-schema");
62 pub const QUARANTINE_CLEANUP_SCHEMA: Self = Self::from_static("quarantine-cleanup-schema");
63 pub const RELEASE_METADATA_SCHEMA: Self = Self::from_static("release-metadata-schema");
64 pub const RELEASE_PUBLISHER_CONFIG_SCHEMA: Self =
65 Self::from_static("release-publisher-config-schema");
66 pub const RELEASE_REVOCATION_POINTER_SCHEMA: Self =
67 Self::from_static("release-revocation-pointer-schema");
68 pub const RELEASE_REVOCATION_SCHEMA: Self = Self::from_static("release-revocation-schema");
69 pub const RELEASE_ROOT_DELEGATION_SCHEMA: Self =
70 Self::from_static("release-root-delegation-schema");
71 pub const RELEASE_SIGNATURE_ENVELOPE_SCHEMA: Self =
72 Self::from_static("release-signature-envelope-schema");
73 pub const RELEASE_SIGNING_LEDGER_EVIDENCE_SCHEMA: Self =
74 Self::from_static("release-signing-ledger-evidence-schema");
75 pub const RELEASE_SIGNING_LEDGER_RECEIPT_SCHEMA: Self =
76 Self::from_static("release-signing-ledger-receipt-schema");
77 pub const RELEASE_SIGNING_LEDGER_SCHEMA: Self =
78 Self::from_static("release-signing-ledger-schema");
79 pub const RELEASE_SIGNING_SUBJECT_SCHEMA: Self =
80 Self::from_static("release-signing-subject-schema");
81 pub const RELEASE_SOURCE_POLICY_POINTER_SCHEMA: Self =
82 Self::from_static("release-source-policy-pointer-schema");
83 pub const RELEASE_SOURCE_POLICY_SCHEMA: Self =
84 Self::from_static("release-source-policy-schema");
85 pub const RELEASE_TRUST_STATE_SCHEMA: Self = Self::from_static("release-trust-state-schema");
86 pub const RESOURCE_SCOPE_SCHEMA: Self = Self::from_static("resource-scope-schema");
87 pub const RUNTIME_ADMISSION_SCHEMA: Self = Self::from_static("runtime-admission-schema");
88 pub const RUNTIME_DESCRIPTOR_SCHEMA: Self = Self::from_static("runtime-descriptor-schema");
89 pub const RUNTIME_EXEC_JOURNAL_SCHEMA: Self = Self::from_static("runtime-exec-journal-schema");
90 pub const RUST_IPC_SCHEMA: Self = Self::from_static("rust-ipc-schema");
91 pub const SESSION_SCOPE_MAINTENANCE_CONTRACT: Self =
92 Self::from_static("session-scope-maintenance-contract");
93 pub const SESSION_SCOPE_SCHEMA: Self = Self::from_static("session-scope-schema");
94 pub const TARGET_CLASSIFIER_FIXTURE: Self = Self::from_static("target-classifier-fixture");
95 pub const TOKEN_TICKET_SCHEMA: Self = Self::from_static("token-ticket-schema");
96 pub const TRUSTED_TIME_EVIDENCE_SCHEMA: Self =
97 Self::from_static("trusted-time-evidence-schema");
98 pub const TRUSTED_TIME_LEAF_SCHEMA: Self = Self::from_static("trusted-time-leaf-schema");
99 pub const WASM_WORKER_SCHEMA: Self = Self::from_static("wasm-worker-schema");
100 pub const WORKER_INVOCATION_SCHEMA: Self = Self::from_static("worker-invocation-schema");
101}
102
103pub(crate) fn parse_contract_id(value: &str) -> Option<ContractId> {
104 match value {
105 "compatibility-manifest-schema" => Some(ContractId::COMPATIBILITY_MANIFEST_SCHEMA),
106 "contract-registry" => Some(ContractId::CONTRACT_REGISTRY),
107 "contract-registry-schema" => Some(ContractId::CONTRACT_REGISTRY_SCHEMA),
108 "error-codes-schema" => Some(ContractId::ERROR_CODES_SCHEMA),
109 "external-signer-request-schema" => Some(ContractId::EXTERNAL_SIGNER_REQUEST_SCHEMA),
110 "external-signer-response-schema" => Some(ContractId::EXTERNAL_SIGNER_RESPONSE_SCHEMA),
111 "host-capability-compatibility-schema" => {
112 Some(ContractId::HOST_CAPABILITY_COMPATIBILITY_SCHEMA)
113 }
114 "host-capability-contract-schema" => Some(ContractId::HOST_CAPABILITY_CONTRACT_SCHEMA),
115 "host-capability-manifest-schema" => Some(ContractId::HOST_CAPABILITY_MANIFEST_SCHEMA),
116 "host-capability-notices-schema" => Some(ContractId::HOST_CAPABILITY_NOTICES_SCHEMA),
117 "host-capability-pin-schema" => Some(ContractId::HOST_CAPABILITY_PIN_SCHEMA),
118 "host-capability-publisher-config-schema" => {
119 Some(ContractId::HOST_CAPABILITY_PUBLISHER_CONFIG_SCHEMA)
120 }
121 "host-capability-signature-schema" => Some(ContractId::HOST_CAPABILITY_SIGNATURE_SCHEMA),
122 "host-capability-signer-request-schema" => {
123 Some(ContractId::HOST_CAPABILITY_SIGNER_REQUEST_SCHEMA)
124 }
125 "host-capability-signer-response-schema" => {
126 Some(ContractId::HOST_CAPABILITY_SIGNER_RESPONSE_SCHEMA)
127 }
128 "iframe-bridge-schema" => Some(ContractId::IFRAME_BRIDGE_SCHEMA),
129 "manifest-schema" => Some(ContractId::MANIFEST_SCHEMA),
130 "network-grant-schema" => Some(ContractId::NETWORK_GRANT_SCHEMA),
131 "opaque-surface-document-schema" => Some(ContractId::OPAQUE_SURFACE_DOCUMENT_SCHEMA),
132 "opaque-surface-transport-schema" => Some(ContractId::OPAQUE_SURFACE_TRANSPORT_SCHEMA),
133 "owner-scope-inventory-registry" => Some(ContractId::OWNER_SCOPE_INVENTORY_REGISTRY),
134 "owner-scope-inventory-schema" => Some(ContractId::OWNER_SCOPE_INVENTORY_SCHEMA),
135 "owner-scope-migration-schema" => Some(ContractId::OWNER_SCOPE_MIGRATION_SCHEMA),
136 "owner-scope-root-recovery-schema" => Some(ContractId::OWNER_SCOPE_ROOT_RECOVERY_SCHEMA),
137 "package-signature-schema" => Some(ContractId::PACKAGE_SIGNATURE_SCHEMA),
138 "performance-contract" => Some(ContractId::PERFORMANCE_CONTRACT),
139 "performance-evidence-schema" => Some(ContractId::PERFORMANCE_EVIDENCE_SCHEMA),
140 "platform-package-publication-schema" => {
141 Some(ContractId::PLATFORM_PACKAGE_PUBLICATION_SCHEMA)
142 }
143 "platform-package-set-schema" => Some(ContractId::PLATFORM_PACKAGE_SET_SCHEMA),
144 "plugin-platform-openapi" => Some(ContractId::PLUGIN_PLATFORM_OPENAPI),
145 "presentation-icon-evidence-schema" => Some(ContractId::PRESENTATION_ICON_EVIDENCE_SCHEMA),
146 "presentation-locale-fixture" => Some(ContractId::PRESENTATION_LOCALE_FIXTURE),
147 "process-containment-schema" => Some(ContractId::PROCESS_CONTAINMENT_SCHEMA),
148 "publisher-release-ref-schema" => Some(ContractId::PUBLISHER_RELEASE_REF_SCHEMA),
149 "quarantine-cleanup-schema" => Some(ContractId::QUARANTINE_CLEANUP_SCHEMA),
150 "release-metadata-schema" => Some(ContractId::RELEASE_METADATA_SCHEMA),
151 "release-publisher-config-schema" => Some(ContractId::RELEASE_PUBLISHER_CONFIG_SCHEMA),
152 "release-revocation-pointer-schema" => Some(ContractId::RELEASE_REVOCATION_POINTER_SCHEMA),
153 "release-revocation-schema" => Some(ContractId::RELEASE_REVOCATION_SCHEMA),
154 "release-root-delegation-schema" => Some(ContractId::RELEASE_ROOT_DELEGATION_SCHEMA),
155 "release-signature-envelope-schema" => Some(ContractId::RELEASE_SIGNATURE_ENVELOPE_SCHEMA),
156 "release-signing-ledger-evidence-schema" => {
157 Some(ContractId::RELEASE_SIGNING_LEDGER_EVIDENCE_SCHEMA)
158 }
159 "release-signing-ledger-receipt-schema" => {
160 Some(ContractId::RELEASE_SIGNING_LEDGER_RECEIPT_SCHEMA)
161 }
162 "release-signing-ledger-schema" => Some(ContractId::RELEASE_SIGNING_LEDGER_SCHEMA),
163 "release-signing-subject-schema" => Some(ContractId::RELEASE_SIGNING_SUBJECT_SCHEMA),
164 "release-source-policy-pointer-schema" => {
165 Some(ContractId::RELEASE_SOURCE_POLICY_POINTER_SCHEMA)
166 }
167 "release-source-policy-schema" => Some(ContractId::RELEASE_SOURCE_POLICY_SCHEMA),
168 "release-trust-state-schema" => Some(ContractId::RELEASE_TRUST_STATE_SCHEMA),
169 "resource-scope-schema" => Some(ContractId::RESOURCE_SCOPE_SCHEMA),
170 "runtime-admission-schema" => Some(ContractId::RUNTIME_ADMISSION_SCHEMA),
171 "runtime-descriptor-schema" => Some(ContractId::RUNTIME_DESCRIPTOR_SCHEMA),
172 "runtime-exec-journal-schema" => Some(ContractId::RUNTIME_EXEC_JOURNAL_SCHEMA),
173 "rust-ipc-schema" => Some(ContractId::RUST_IPC_SCHEMA),
174 "session-scope-maintenance-contract" => {
175 Some(ContractId::SESSION_SCOPE_MAINTENANCE_CONTRACT)
176 }
177 "session-scope-schema" => Some(ContractId::SESSION_SCOPE_SCHEMA),
178 "target-classifier-fixture" => Some(ContractId::TARGET_CLASSIFIER_FIXTURE),
179 "token-ticket-schema" => Some(ContractId::TOKEN_TICKET_SCHEMA),
180 "trusted-time-evidence-schema" => Some(ContractId::TRUSTED_TIME_EVIDENCE_SCHEMA),
181 "trusted-time-leaf-schema" => Some(ContractId::TRUSTED_TIME_LEAF_SCHEMA),
182 "wasm-worker-schema" => Some(ContractId::WASM_WORKER_SCHEMA),
183 "worker-invocation-schema" => Some(ContractId::WORKER_INVOCATION_SCHEMA),
184 _ => None,
185 }
186}
187
188static CONTRACT_BODY_COMPATIBILITY_MANIFEST_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/compatibility-manifest-v17.schema.json\",\n \"title\": \"ReDevPlugin compatibility manifest v17\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"schema_version\", \"package_set\", \"matrix\", \"contract_set_sha256\", \"contracts\"],\n \"properties\": {\n \"schema_version\": {\"const\": \"redevplugin.compatibility.v17\"},\n \"package_set\": {\"$ref\": \"platform-package-set-v1.schema.json\"},\n \"matrix\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"plugin_ui_protocol_version\", \"supported_plugin_ui_protocol_versions\", \"plugin_ui_transport_mappings\",\n \"plugin_host_protocol_version\", \"rust_ipc_version\", \"wasm_abi_version\",\n \"manifest_schema_version\", \"package_signature_schema_version\", \"release_metadata_schema_version\",\n \"release_root_delegation_schema_version\", \"release_source_policy_schema_version\",\n \"release_source_policy_pointer_schema_version\", \"release_revocation_schema_version\",\n \"release_revocation_pointer_schema_version\", \"release_trust_state_schema_version\",\n \"trusted_time_evidence_schema_version\", \"trusted_time_leaf_schema_version\",\n \"release_signing_ledger_schema_version\", \"release_signing_subject_schema_version\",\n \"release_signature_envelope_schema_version\", \"release_signing_ledger_receipt_schema_version\",\n \"release_signing_ledger_evidence_schema_version\", \"token_ticket_schema_version\", \"bridge_schema_version\",\n \"opaque_surface_document_schema_version\", \"opaque_surface_transport_schema_version\", \"target_classifier_version\",\n \"network_grant_schema_version\", \"resource_scope_schema_version\", \"session_scope_schema_version\",\n \"session_scope_maintenance_schema_version\", \"plugin_platform_openapi_version\",\n \"compatibility_schema_version\", \"worker_invocation_schema_version\",\n \"host_capability_contract_schema_version\", \"host_capability_pin_schema_version\",\n \"host_capability_manifest_schema_version\", \"host_capability_compatibility_schema_version\",\n \"host_capability_signature_schema_version\", \"host_capability_notices_schema_version\",\n \"error_codes_schema_version\", \"performance_contract_version\", \"performance_evidence_schema_version\",\n \"contract_registry_version\", \"platform_package_set_schema_version\",\n \"platform_package_publication_schema_version\", \"runtime_admission_schema_version\",\n \"runtime_descriptor_schema_version\", \"owner_scope_inventory_registry_version\",\n \"owner_scope_inventory_schema_version\", \"owner_scope_migration_schema_version\",\n \"owner_scope_root_recovery_schema_version\",\n \"process_containment_schema_version\", \"runtime_exec_journal_schema_version\",\n \"quarantine_cleanup_schema_version\"\n ],\n \"properties\": {\n \"plugin_ui_protocol_version\": {\"const\": \"plugin-ui-v7\"},\n \"supported_plugin_ui_protocol_versions\": {\n \"const\": [\"plugin-ui-v7\"]\n },\n \"plugin_ui_transport_mappings\": {\n \"const\": [\n {\n \"plugin_ui_protocol_version\": \"plugin-ui-v7\",\n \"opaque_surface_transport_schema_version\": \"opaque-surface-transport-v6\",\n \"bridge_schema_version\": \"bridge-v7\"\n }\n ]\n },\n \"plugin_host_protocol_version\": {\"const\": \"plugin-host-v11\"},\n \"rust_ipc_version\": {\"const\": \"rust-ipc-v6\"},\n \"wasm_abi_version\": {\"const\": \"redevplugin-wasm-worker-v2\"},\n \"manifest_schema_version\": {\"const\": \"manifest-v8\"},\n \"package_signature_schema_version\": {\"const\": \"package-signature-v1\"},\n \"release_metadata_schema_version\": {\"const\": \"release-metadata-v8\"},\n \"release_root_delegation_schema_version\": {\"const\": \"release-root-delegation-v1\"},\n \"release_source_policy_schema_version\": {\"const\": \"release-source-policy-v3\"},\n \"release_source_policy_pointer_schema_version\": {\"const\": \"release-source-policy-pointer-v2\"},\n \"release_revocation_schema_version\": {\"const\": \"release-revocation-v3\"},\n \"release_revocation_pointer_schema_version\": {\"const\": \"release-revocation-pointer-v2\"},\n \"release_trust_state_schema_version\": {\"const\": \"release-trust-state-v1\"},\n \"trusted_time_evidence_schema_version\": {\"const\": \"trusted-time-evidence-v1\"},\n \"trusted_time_leaf_schema_version\": {\"const\": \"trusted-time-leaf-v1\"},\n \"release_signing_ledger_schema_version\": {\"const\": \"release-signing-ledger-v1\"},\n \"release_signing_subject_schema_version\": {\"const\": \"release-signing-subject-v1\"},\n \"release_signature_envelope_schema_version\": {\"const\": \"release-signature-envelope-v1\"},\n \"release_signing_ledger_receipt_schema_version\": {\"const\": \"release-signing-ledger-receipt-v1\"},\n \"release_signing_ledger_evidence_schema_version\": {\"const\": \"release-signing-ledger-evidence-v1\"},\n \"token_ticket_schema_version\": {\"const\": \"token-ticket-v4\"},\n \"bridge_schema_version\": {\"const\": \"bridge-v7\"},\n \"opaque_surface_document_schema_version\": {\"const\": \"opaque-surface-document-v3\"},\n \"opaque_surface_transport_schema_version\": {\"const\": \"opaque-surface-transport-v6\"},\n \"target_classifier_version\": {\"const\": \"target-classifier-v2\"},\n \"network_grant_schema_version\": {\"const\": \"network-grant-v2\"},\n \"resource_scope_schema_version\": {\"const\": \"resource-scope-v1\"},\n \"session_scope_schema_version\": {\"const\": \"session-scope-v1\"},\n \"session_scope_maintenance_schema_version\": {\"const\": \"session-scope-maintenance-v1\"},\n \"plugin_platform_openapi_version\": {\"const\": \"plugin-platform-v15\"},\n \"compatibility_schema_version\": {\"const\": \"compatibility-manifest-v17\"},\n \"worker_invocation_schema_version\": {\"const\": \"worker-invocation-v3\"},\n \"host_capability_contract_schema_version\": {\"const\": \"host-capability-contract-v1\"},\n \"host_capability_pin_schema_version\": {\"const\": \"host-capability-pin-v1\"},\n \"host_capability_manifest_schema_version\": {\"const\": \"host-capability-manifest-v1\"},\n \"host_capability_compatibility_schema_version\": {\"const\": \"host-capability-compatibility-v1\"},\n \"host_capability_signature_schema_version\": {\"const\": \"host-capability-signature-v1\"},\n \"host_capability_notices_schema_version\": {\"const\": \"host-capability-notices-v1\"},\n \"error_codes_schema_version\": {\"const\": \"error-codes-v8\"},\n \"performance_contract_version\": {\"const\": \"performance-contract-v4\"},\n \"performance_evidence_schema_version\": {\"const\": \"performance-evidence-v4\"},\n \"contract_registry_version\": {\"const\": \"contract-registry-v2\"},\n \"platform_package_set_schema_version\": {\"const\": \"platform-package-set-v1\"},\n \"platform_package_publication_schema_version\": {\"const\": \"platform-package-publication-v1\"},\n \"runtime_admission_schema_version\": {\"const\": \"runtime-admission-v1\"},\n \"runtime_descriptor_schema_version\": {\"const\": \"runtime-descriptor-v2\"},\n \"owner_scope_inventory_registry_version\": {\"const\": \"owner-scope-inventory-registry-v1\"},\n \"owner_scope_inventory_schema_version\": {\"const\": \"owner-scope-inventory-v1\"},\n \"owner_scope_migration_schema_version\": {\"const\": \"owner-scope-migration-v1\"},\n \"owner_scope_root_recovery_schema_version\": {\"const\": \"owner-scope-root-recovery-v1\"},\n \"process_containment_schema_version\": {\"const\": \"process-containment-v1\"},\n \"runtime_exec_journal_schema_version\": {\"const\": \"runtime-exec-journal-v1\"},\n \"quarantine_cleanup_schema_version\": {\"const\": \"quarantine-cleanup-v1\"}\n }\n },\n \"contract_set_sha256\": {\"type\": \"string\", \"pattern\": \"^[0-9a-f]{64}$\"},\n \"contracts\": {\n \"type\": \"array\", \"minItems\": 1, \"maxItems\": 256, \"uniqueItems\": true,\n \"items\": {\"$ref\": \"#/$defs/contract\"}\n }\n },\n \"$defs\": {\n \"contract\": {\n \"type\": \"object\", \"additionalProperties\": false,\n \"required\": [\"id\", \"path\", \"version\", \"sha256\"],\n \"properties\": {\n \"id\": {\"type\": \"string\", \"pattern\": \"^[a-z][a-z0-9-]+$\"},\n \"path\": {\"type\": \"string\", \"pattern\": \"^spec/(openapi|plugin)/[A-Za-z0-9._/-]+$\"},\n \"version\": {\"type\": \"string\", \"minLength\": 1},\n \"sha256\": {\"type\": \"string\", \"pattern\": \"^[0-9a-f]{64}$\"}\n }\n }\n }\n}\n".as_bytes();
189static CONTRACT_BODY_CONTRACT_REGISTRY: &[u8] = "{\n \"schema_version\": \"redevplugin.contract_registry.v2\",\n \"registry_version\": \"contract-registry-v2\",\n \"artifacts\": [\n {\n \"id\": \"compatibility-manifest-schema\",\n \"path\": \"spec/plugin/compatibility-manifest-v17.schema.json\",\n \"version\": \"compatibility-manifest-v17\",\n \"sha256\": \"f3d726ab1aa4de61acba453ed2511511c51749f67e614f422dcf525fb687ad6e\"\n },\n {\n \"id\": \"contract-registry-schema\",\n \"path\": \"spec/plugin/contract-registry-v2.schema.json\",\n \"version\": \"contract-registry-v2\",\n \"sha256\": \"d516b3565158ac1b0d5e9f86b91b13ac19321ab3ff54468be41951b68d7085ac\"\n },\n {\n \"id\": \"error-codes-schema\",\n \"path\": \"spec/plugin/error-codes-v8.schema.json\",\n \"version\": \"error-codes-v8\",\n \"sha256\": \"454e3c8b46e20bc524080ca1aa91dcf2ecdfe0a90cc33b5b328e87356d07e7e3\"\n },\n {\n \"id\": \"external-signer-request-schema\",\n \"path\": \"spec/plugin/external-signer-request-v1.schema.json\",\n \"version\": \"external-signer-request-v1\",\n \"sha256\": \"abc18af2e29dea6f0b49a28b75b046ef02f200597978c8238cc587fb7e670760\"\n },\n {\n \"id\": \"external-signer-response-schema\",\n \"path\": \"spec/plugin/external-signer-response-v1.schema.json\",\n \"version\": \"external-signer-response-v1\",\n \"sha256\": \"bbe657df5afdf459a4c5f83282ddc3ec6c80c1ebd25bb954eac92101f35afc6c\"\n },\n {\n \"id\": \"host-capability-compatibility-schema\",\n \"path\": \"spec/plugin/host-capability-compatibility-v1.schema.json\",\n \"version\": \"host-capability-compatibility-v1\",\n \"sha256\": \"361ebbf7009aeb66c763ecde46427b17b6cf7d2307c01886c5987a1f4f1762de\"\n },\n {\n \"id\": \"host-capability-contract-schema\",\n \"path\": \"spec/plugin/host-capability-contract-v1.schema.json\",\n \"version\": \"host-capability-contract-v1\",\n \"sha256\": \"0a653e36d44104f1d16b06ee424648086c146f23c907b176bdf470ae73025485\"\n },\n {\n \"id\": \"host-capability-manifest-schema\",\n \"path\": \"spec/plugin/host-capability-manifest-v1.schema.json\",\n \"version\": \"host-capability-manifest-v1\",\n \"sha256\": \"5f13a8e5f918378b9cba9fdc133a9a75ba3a8311c30cb6a02ca0aba09035110e\"\n },\n {\n \"id\": \"host-capability-notices-schema\",\n \"path\": \"spec/plugin/host-capability-notices-v1.schema.json\",\n \"version\": \"host-capability-notices-v1\",\n \"sha256\": \"6affd5d0ae90239f6fd08cbeddae4eef393efa2838c9e4935874ba3dc0e05948\"\n },\n {\n \"id\": \"host-capability-pin-schema\",\n \"path\": \"spec/plugin/host-capability-pin-v1.schema.json\",\n \"version\": \"host-capability-pin-v1\",\n \"sha256\": \"20526a5934f0d85a3db7882492487266f09de5bcd176e2c7936f05d0b7fe0338\"\n },\n {\n \"id\": \"host-capability-publisher-config-schema\",\n \"path\": \"spec/plugin/host-capability-publisher-config-v1.schema.json\",\n \"version\": \"host-capability-publisher-config-v1\",\n \"sha256\": \"f06ab3d70f3f9dd2114fe9d489841f1d6b5f169ee17b8c92aa1bfaf9bbf865c4\"\n },\n {\n \"id\": \"host-capability-signature-schema\",\n \"path\": \"spec/plugin/host-capability-signature-v1.schema.json\",\n \"version\": \"host-capability-signature-v1\",\n \"sha256\": \"88cbc1d63afb7e289ca4f8b7c76f702b8d20156f7722c1b71f3ab9138a240a5e\"\n },\n {\n \"id\": \"host-capability-signer-request-schema\",\n \"path\": \"spec/plugin/host-capability-signer-request-v1.schema.json\",\n \"version\": \"host-capability-signer-request-v1\",\n \"sha256\": \"7f22e9e0f813b91106693edfbb91309489dde1640152c29d878961fdef6b89d8\"\n },\n {\n \"id\": \"host-capability-signer-response-schema\",\n \"path\": \"spec/plugin/host-capability-signer-response-v1.schema.json\",\n \"version\": \"host-capability-signer-response-v1\",\n \"sha256\": \"02a50b1fc0d1b8ae0611eab95b5560122c6425709ecc8de5e00bf0dd68085f44\"\n },\n {\n \"id\": \"iframe-bridge-schema\",\n \"path\": \"spec/plugin/bridge-v7.schema.json\",\n \"version\": \"bridge-v7\",\n \"sha256\": \"fe8da4e5b14ac6d7c7bb3101e041246e92573c58e1c9537e8cda2c26bf175ef5\"\n },\n {\n \"id\": \"manifest-schema\",\n \"path\": \"spec/plugin/manifest-v8.schema.json\",\n \"version\": \"manifest-v8\",\n \"sha256\": \"dfe5e9ea5f15d4f9c0272427ca8650d475e2fa8aacc4fb6be3a945a3069a26fb\"\n },\n {\n \"id\": \"network-grant-schema\",\n \"path\": \"spec/plugin/network-grant-v2.schema.json\",\n \"version\": \"network-grant-v2\",\n \"sha256\": \"5fc1cfc3469a992e551fd392fab982abb6f95e456a1cb768ceca137f7c693abc\"\n },\n {\n \"id\": \"opaque-surface-document-schema\",\n \"path\": \"spec/plugin/opaque-surface-document-v3.schema.json\",\n \"version\": \"opaque-surface-document-v3\",\n \"sha256\": \"63419ff5b5a8890e14f97ca29aaae175b93daff61d4567c5bdff7f6e6a9e7450\"\n },\n {\n \"id\": \"opaque-surface-transport-schema\",\n \"path\": \"spec/plugin/opaque-surface-transport-v6.schema.json\",\n \"version\": \"opaque-surface-transport-v6\",\n \"sha256\": \"8f2af2669edc9413020c26765ee3f1986ef63a7d0803466861d8cdae3977ccff\"\n },\n {\n \"id\": \"owner-scope-inventory-registry\",\n \"path\": \"spec/plugin/owner-scope-inventories-v1.json\",\n \"version\": \"owner-scope-inventory-registry-v1\",\n \"sha256\": \"f655313a641368383b3d84b6ea4f6a2a2ef42a44a4dd23f71211361c9c2e0505\"\n },\n {\n \"id\": \"owner-scope-inventory-schema\",\n \"path\": \"spec/plugin/owner-scope-inventory-v1.schema.json\",\n \"version\": \"owner-scope-inventory-v1\",\n \"sha256\": \"21dc4980103f3a36f4252ce141d7350476ec00968e8a320695e450274e928be1\"\n },\n {\n \"id\": \"owner-scope-migration-schema\",\n \"path\": \"spec/plugin/owner-scope-migration-v1.schema.json\",\n \"version\": \"owner-scope-migration-v1\",\n \"sha256\": \"497fff8a09d48fe195c18d13ff05ca6c9f8406f6215588901cb6d89315b713eb\"\n },\n {\n \"id\": \"owner-scope-root-recovery-schema\",\n \"path\": \"spec/plugin/owner-scope-root-recovery-v1.schema.json\",\n \"version\": \"owner-scope-root-recovery-v1\",\n \"sha256\": \"81b961a9933d129c8f9119e3091226039ffbc0b4721116a4811f9785bebf9d64\"\n },\n {\n \"id\": \"package-signature-schema\",\n \"path\": \"spec/plugin/package-signature-v1.schema.json\",\n \"version\": \"package-signature-v1\",\n \"sha256\": \"13951c0f6831ba28647774368c76a817868aeb7984628e2cf3dc4ad1b54f8284\"\n },\n {\n \"id\": \"performance-contract\",\n \"path\": \"spec/plugin/performance-contract-v4.json\",\n \"version\": \"performance-contract-v4\",\n \"sha256\": \"aedc50ed8899346140965dc46e8adf2048c47bcf6c146c3b7a51646eda7725e1\"\n },\n {\n \"id\": \"performance-evidence-schema\",\n \"path\": \"spec/plugin/performance-evidence-v4.schema.json\",\n \"version\": \"performance-evidence-v4\",\n \"sha256\": \"f51ba9d425f0e40bc4f2db7ed26454e7575b14ffb6937a06dc01b8e7a66b3f61\"\n },\n {\n \"id\": \"platform-package-publication-schema\",\n \"path\": \"spec/plugin/platform-package-publication-v1.schema.json\",\n \"version\": \"platform-package-publication-v1\",\n \"sha256\": \"20450b516c34d5a122020f4064ddfa03ffcb97ffea661e0868cd09760b3f08b0\"\n },\n {\n \"id\": \"platform-package-set-schema\",\n \"path\": \"spec/plugin/platform-package-set-v1.schema.json\",\n \"version\": \"platform-package-set-v1\",\n \"sha256\": \"4d9979f5205ec047895b64c995312c588d998bb1c1448f6c9c559f1b7ab0d796\"\n },\n {\n \"id\": \"plugin-platform-openapi\",\n \"path\": \"spec/openapi/plugin-platform-v15.yaml\",\n \"version\": \"plugin-platform-v15\",\n \"sha256\": \"5af8951d14a3bd98e32076c10f5eef4bde3aeba7bcbdabd491adce7bc158aa76\"\n },\n {\n \"id\": \"presentation-icon-evidence-schema\",\n \"path\": \"spec/plugin/presentation-icon-evidence-v1.schema.json\",\n \"version\": \"presentation-icon-evidence-v1\",\n \"sha256\": \"0b302ff651bec9447637dd08b672d2371fcf383c5d9505e885955aa1b607ec15\"\n },\n {\n \"id\": \"presentation-locale-fixture\",\n \"path\": \"spec/plugin/presentation-locale-fixtures-v1.json\",\n \"version\": \"presentation-locale-fixtures-v1\",\n \"sha256\": \"cbb4c0188d020b5fbde9a0c2c33b3677d21cc64c0f0297b7f6f3f6c0efabc40e\"\n },\n {\n \"id\": \"process-containment-schema\",\n \"path\": \"spec/plugin/process-containment-v1.schema.json\",\n \"version\": \"process-containment-v1\",\n \"sha256\": \"930ea44b1f62361706e994649e84f62af0a6418b77a661ae9bf9c10f1398e3fc\"\n },\n {\n \"id\": \"publisher-release-ref-schema\",\n \"path\": \"spec/plugin/publisher-release-ref-v1.schema.json\",\n \"version\": \"publisher-release-ref-v1\",\n \"sha256\": \"f9fd40c87197064ffa3e21a361780a4d057b51df2e886988aac64279785acdc0\"\n },\n {\n \"id\": \"quarantine-cleanup-schema\",\n \"path\": \"spec/plugin/quarantine-cleanup-v1.schema.json\",\n \"version\": \"quarantine-cleanup-v1\",\n \"sha256\": \"0aced01a8d409953d5075a799ac273cae79e285ac82debe93ac4d8b706571ad1\"\n },\n {\n \"id\": \"release-metadata-schema\",\n \"path\": \"spec/plugin/release-metadata-v8.schema.json\",\n \"version\": \"release-metadata-v8\",\n \"sha256\": \"f454fc1923be10fd5a4b46df4a6e376f7e9fe1d462f3da57977b92ad7c7496b0\"\n },\n {\n \"id\": \"release-publisher-config-schema\",\n \"path\": \"spec/plugin/release-publisher-config-v1.schema.json\",\n \"version\": \"release-publisher-config-v1\",\n \"sha256\": \"c18b11489f81ac657c8324ed344b88b61b259981383ee7b4f9f0b65603a171f8\"\n },\n {\n \"id\": \"release-revocation-pointer-schema\",\n \"path\": \"spec/plugin/release-revocation-pointer-v2.schema.json\",\n \"version\": \"release-revocation-pointer-v2\",\n \"sha256\": \"dd39ba618ab02698f135875305d4aa6eb562af7d15520c4ad312cd82e9a7032b\"\n },\n {\n \"id\": \"release-revocation-schema\",\n \"path\": \"spec/plugin/release-revocation-v3.schema.json\",\n \"version\": \"release-revocation-v3\",\n \"sha256\": \"bd2ca3ab93f047897d3b377adc7fa8b073fc946539a0c5495def1e64915a782b\"\n },\n {\n \"id\": \"release-root-delegation-schema\",\n \"path\": \"spec/plugin/release-root-delegation-v1.schema.json\",\n \"version\": \"release-root-delegation-v1\",\n \"sha256\": \"c1adbb13eaeeca145d5ee787ff43777e60a5f329e460d20b8db358e4f5fc4825\"\n },\n {\n \"id\": \"release-signature-envelope-schema\",\n \"path\": \"spec/plugin/release-signature-envelope-v1.schema.json\",\n \"version\": \"release-signature-envelope-v1\",\n \"sha256\": \"7df9afd22bfdebfa89dc3bdb46ecdbe22a91ecce35fa46c492dd9795c66fae29\"\n },\n {\n \"id\": \"release-signing-ledger-evidence-schema\",\n \"path\": \"spec/plugin/release-signing-ledger-evidence-v1.schema.json\",\n \"version\": \"release-signing-ledger-evidence-v1\",\n \"sha256\": \"9ab8b7f65dedcd119d578debb4f6ff97fc35f4c7ac95c0e5435f8b0959bc1a5c\"\n },\n {\n \"id\": \"release-signing-ledger-receipt-schema\",\n \"path\": \"spec/plugin/release-signing-ledger-receipt-v1.schema.json\",\n \"version\": \"release-signing-ledger-receipt-v1\",\n \"sha256\": \"29210cfefd967017c5c74bcf8489bd50511c5c9f36d17b0200056ccb90c30561\"\n },\n {\n \"id\": \"release-signing-ledger-schema\",\n \"path\": \"spec/plugin/release-signing-ledger-v1.schema.json\",\n \"version\": \"release-signing-ledger-v1\",\n \"sha256\": \"0c72b30bfd6b857b9809e48e1b7eaaeb7134d5afd6a935aa8373465054403765\"\n },\n {\n \"id\": \"release-signing-subject-schema\",\n \"path\": \"spec/plugin/release-signing-subject-v1.schema.json\",\n \"version\": \"release-signing-subject-v1\",\n \"sha256\": \"876b1459824f90042bd141e96bfea4633333bdf2a227e15b6e25c72db1179c8e\"\n },\n {\n \"id\": \"release-source-policy-pointer-schema\",\n \"path\": \"spec/plugin/release-source-policy-pointer-v2.schema.json\",\n \"version\": \"release-source-policy-pointer-v2\",\n \"sha256\": \"735659143db7204abdd20c6fbc994ac7474618c41b85949aad4c28fb2912e034\"\n },\n {\n \"id\": \"release-source-policy-schema\",\n \"path\": \"spec/plugin/release-source-policy-v3.schema.json\",\n \"version\": \"release-source-policy-v3\",\n \"sha256\": \"8814de028800c92b26c8c85a06298762598aeba1835f57048ec6c06430f8567b\"\n },\n {\n \"id\": \"release-trust-state-schema\",\n \"path\": \"spec/plugin/release-trust-state-v1.schema.json\",\n \"version\": \"release-trust-state-v1\",\n \"sha256\": \"19ffa182932a22401a33ee4c9921e957c67895c2d8b041c9a27ee3530bdfb2d2\"\n },\n {\n \"id\": \"resource-scope-schema\",\n \"path\": \"spec/plugin/resource-scope-v1.schema.json\",\n \"version\": \"resource-scope-v1\",\n \"sha256\": \"e6021bd576c7220ad5536645a7ad8e57ee7aeb9901c31a89444fa6b695d8dc6f\"\n },\n {\n \"id\": \"runtime-admission-schema\",\n \"path\": \"spec/plugin/runtime-admission-v1.schema.json\",\n \"version\": \"runtime-admission-v1\",\n \"sha256\": \"bee7b149876447d663a4099dbd71e71fa97f8ff80ddf4e12cbfba951a47c4beb\"\n },\n {\n \"id\": \"runtime-descriptor-schema\",\n \"path\": \"spec/plugin/runtime-descriptor-v2.schema.json\",\n \"version\": \"runtime-descriptor-v2\",\n \"sha256\": \"2ba59f6fb70d4ad757f60aca5541f4a44886542525e5bf76c393cd2368188351\"\n },\n {\n \"id\": \"runtime-exec-journal-schema\",\n \"path\": \"spec/plugin/runtime-exec-journal-v1.schema.json\",\n \"version\": \"runtime-exec-journal-v1\",\n \"sha256\": \"2bddbba383843b8ebc1554009909f0bb25e98616be763826a697cb0f408870d2\"\n },\n {\n \"id\": \"rust-ipc-schema\",\n \"path\": \"spec/plugin/ipc-v6.schema.json\",\n \"version\": \"rust-ipc-v6\",\n \"sha256\": \"9814ca091ac2e4e8435c1ab553e248e9d2e792de93ce9fd27bd030486774837f\"\n },\n {\n \"id\": \"session-scope-maintenance-contract\",\n \"path\": \"spec/plugin/session-scope-maintenance-v1.json\",\n \"version\": \"session-scope-maintenance-v1\",\n \"sha256\": \"fd87b6654c954ee2a2dc67958ba214048b894aa421bb74a85fb02000ec51f37b\"\n },\n {\n \"id\": \"session-scope-schema\",\n \"path\": \"spec/plugin/session-scope-v1.schema.json\",\n \"version\": \"session-scope-v1\",\n \"sha256\": \"3df0084264f0aff9fe2261c237cea439adb5cdc2534bfaaa0488d5992d4a7d2e\"\n },\n {\n \"id\": \"target-classifier-fixture\",\n \"path\": \"spec/plugin/target-classifier-v2.json\",\n \"version\": \"target-classifier-v2\",\n \"sha256\": \"ae7336cce77a2e820f96f1cc309b93f8442c932dcebec25e3890d31cd098e2d1\"\n },\n {\n \"id\": \"token-ticket-schema\",\n \"path\": \"spec/plugin/token-ticket-v4.schema.json\",\n \"version\": \"token-ticket-v4\",\n \"sha256\": \"5cf365b5b52a331ac0d3ad35a98be3c2ce668804ae88fdeaf9679a44db14feb1\"\n },\n {\n \"id\": \"trusted-time-evidence-schema\",\n \"path\": \"spec/plugin/trusted-time-evidence-v1.schema.json\",\n \"version\": \"trusted-time-evidence-v1\",\n \"sha256\": \"4398cbd2a3eea42a85008ee16a69d7adb265673e6749b1f13a4f1610f36e5e38\"\n },\n {\n \"id\": \"trusted-time-leaf-schema\",\n \"path\": \"spec/plugin/trusted-time-leaf-v1.schema.json\",\n \"version\": \"trusted-time-leaf-v1\",\n \"sha256\": \"1c25eb0040800eef145aa2bb4c0e1ae197ae584d365e9595ab89037e26fe5ddb\"\n },\n {\n \"id\": \"wasm-worker-schema\",\n \"path\": \"spec/plugin/wasm-worker-v2.schema.json\",\n \"version\": \"redevplugin-wasm-worker-v2\",\n \"sha256\": \"00bf123f3a9ed932de4b71c180e2a5c34af0f82050defb271fedec42cf217902\"\n },\n {\n \"id\": \"worker-invocation-schema\",\n \"path\": \"spec/plugin/worker-invocation-v3.schema.json\",\n \"version\": \"worker-invocation-v3\",\n \"sha256\": \"f08af491cbf5e7b71d1aeafbeac9ae581ee5fc3bcb76184daec369f94bab3927\"\n }\n ]\n}\n".as_bytes();
190static CONTRACT_BODY_CONTRACT_REGISTRY_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/contract-registry-v2.schema.json\",\n \"title\": \"ReDevPlugin Contract Registry V2\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"schema_version\", \"registry_version\", \"artifacts\"],\n \"properties\": {\n \"schema_version\": {\"const\": \"redevplugin.contract_registry.v2\"},\n \"registry_version\": {\"const\": \"contract-registry-v2\"},\n \"artifacts\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"maxItems\": 256,\n \"uniqueItems\": true,\n \"items\": {\"$ref\": \"#/$defs/artifact\"}\n }\n },\n \"$defs\": {\n \"artifact\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"id\", \"path\", \"version\", \"sha256\"],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 128,\n \"pattern\": \"^[a-z][a-z0-9-]+$\",\n \"not\": {\"const\": \"contract-registry\"}\n },\n \"path\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 1024,\n \"pattern\": \"^spec/(openapi|plugin)/[A-Za-z0-9][A-Za-z0-9._-]*(/[A-Za-z0-9][A-Za-z0-9._-]*)*$\",\n \"not\": {\"enum\": [\"spec/plugin/contract-registry-v2.json\", \"spec/plugin/platform-package-set-v1.json\"]}\n },\n \"version\": {\"type\": \"string\", \"minLength\": 1, \"maxLength\": 128, \"pattern\": \"^[A-Za-z0-9][A-Za-z0-9._-]*$\"},\n \"sha256\": {\"type\": \"string\", \"pattern\": \"^[0-9a-f]{64}$\"}\n }\n }\n }\n}\n".as_bytes();
191static CONTRACT_BODY_ERROR_CODES_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/error-codes-v8.schema.json\",\n \"title\": \"ReDevPlugin stable error codes v8\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"$defs\": {\n \"platform_error_code\": {\n \"type\": \"string\",\n \"enum\": [\n \"PLUGIN_INVALID_REQUEST\",\n \"PLUGIN_MANIFEST_INVALID\",\n \"PLUGIN_PACKAGE_INVALID\",\n \"PLUGIN_PACKAGE_TOO_LARGE\",\n \"PLUGIN_PACKAGE_PATH_FORBIDDEN\",\n \"PLUGIN_SIGNATURE_INVALID\",\n \"PLUGIN_TRUST_STATE_DENIED\",\n \"PLUGIN_TRUST_VERIFICATION_REQUIRED\",\n \"PLUGIN_TRUST_VERIFICATION_INVALID\",\n \"PLUGIN_RELEASE_REF_VERIFICATION_FAILED\",\n \"PLUGIN_RELEASE_REF_POLICY_DENIED\",\n \"PLUGIN_RELEASE_NETWORK\",\n \"PLUGIN_RELEASE_TIMEOUT\",\n \"PLUGIN_RELEASE_ASSET_MISSING\",\n \"PLUGIN_RELEASE_ASSET_INTEGRITY\",\n \"PLUGIN_INSTALL_INTERRUPTED\",\n \"PLUGIN_INSTALL_STATE_CONFLICT\",\n \"PLUGIN_INTERNAL_FAILURE\",\n \"PLUGIN_DISABLED\",\n \"PLUGIN_DISABLED_BY_POLICY\",\n \"PLUGIN_PERMISSION_DENIED\",\n \"PLUGIN_ORIGIN_DENIED\",\n \"PLUGIN_ACTION_DENIED\",\n \"PLUGIN_OWNER_SCOPE_MISMATCH\",\n \"PLUGIN_SECRET_SCOPE_MISMATCH\",\n \"PLUGIN_STORAGE_SCOPE_MISMATCH\",\n \"PLUGIN_ADAPTER_FAILURE\",\n \"PLUGIN_SESSION_REVOKED\",\n \"PLUGIN_SESSION_TEARDOWN_INCOMPLETE\",\n \"PLUGIN_SESSION_FENCE_CAPACITY\",\n \"PLUGIN_CONFIRMATION_REQUIRED\",\n \"PLUGIN_CONFIRMATION_INVALID\",\n \"PLUGIN_TOKEN_EXPIRED\",\n \"PLUGIN_TOKEN_REPLAY\",\n \"PLUGIN_GATEWAY_TOKEN_INVALID\",\n \"PLUGIN_GATEWAY_TOKEN_REPLAYED\",\n \"PLUGIN_GATEWAY_TOKEN_CHANNEL_MISMATCH\",\n \"PLUGIN_ASSET_TICKET_INVALID\",\n \"PLUGIN_ASSET_SESSION_INVALID\",\n \"PLUGIN_STREAM_TICKET_INVALID\",\n \"PLUGIN_STREAM_DELIVERY_INVALID\",\n \"PLUGIN_STREAM_CANCELLED\",\n \"PLUGIN_LEASE_INVALID\",\n \"PLUGIN_LEASE_REPLAYED\",\n \"PLUGIN_GRANT_INVALID\",\n \"PLUGIN_STORAGE_QUOTA_EXCEEDED\",\n \"PLUGIN_OPERATION_BLOCKED\",\n \"PLUGIN_OPERATION_NOT_FOUND\",\n \"PLUGIN_OPERATION_NOT_CANCELABLE\",\n \"PLUGIN_OPERATION_RATE_LIMITED\",\n \"PLUGIN_NETWORK_TARGET_DENIED\",\n \"PLUGIN_NETWORK_RATE_LIMITED\",\n \"PLUGIN_RUNTIME_UNAVAILABLE\",\n \"PLUGIN_RUNTIME_VERSION_MISMATCH\",\n \"PLUGIN_RUNTIME_CONTRACT_MISMATCH\",\n \"PLUGIN_UI_PROTOCOL_UNSUPPORTED\",\n \"PLUGIN_UI_PROTOCOL_VIOLATION\",\n \"PLUGIN_SURFACE_QUIESCE_TIMEOUT\",\n \"PLUGIN_JSON_LIMIT_EXCEEDED\",\n \"PLUGIN_CAPABILITY_ERROR\",\n \"PLUGIN_WORKER_ERROR\",\n \"PLUGIN_CONTRACT_MISMATCH\",\n \"PLUGIN_MANAGEMENT_REVISION_MISMATCH\",\n \"PLUGIN_AUTHORIZATION_REVISION_MISMATCH\",\n \"PLUGIN_BINDING_REVISION_MISMATCH\",\n \"PLUGIN_VALUES_REVISION_MISMATCH\",\n \"PLUGIN_CSRF_REQUIRED\",\n \"PLUGIN_CSRF_INVALID\",\n \"PLUGIN_FEATURE_NOT_CONFIGURED\"\n ]\n },\n \"bridge_error_code\": {\n \"type\": \"string\",\n \"enum\": [\n \"PLUGIN_INVALID_REQUEST\",\n \"PLUGIN_MANIFEST_INVALID\",\n \"PLUGIN_PACKAGE_INVALID\",\n \"PLUGIN_PACKAGE_TOO_LARGE\",\n \"PLUGIN_PACKAGE_PATH_FORBIDDEN\",\n \"PLUGIN_SIGNATURE_INVALID\",\n \"PLUGIN_TRUST_STATE_DENIED\",\n \"PLUGIN_TRUST_VERIFICATION_REQUIRED\",\n \"PLUGIN_TRUST_VERIFICATION_INVALID\",\n \"PLUGIN_RELEASE_REF_VERIFICATION_FAILED\",\n \"PLUGIN_RELEASE_REF_POLICY_DENIED\",\n \"PLUGIN_RELEASE_NETWORK\",\n \"PLUGIN_RELEASE_TIMEOUT\",\n \"PLUGIN_RELEASE_ASSET_MISSING\",\n \"PLUGIN_RELEASE_ASSET_INTEGRITY\",\n \"PLUGIN_INSTALL_INTERRUPTED\",\n \"PLUGIN_INSTALL_STATE_CONFLICT\",\n \"PLUGIN_INTERNAL_FAILURE\",\n \"PLUGIN_DISABLED\",\n \"PLUGIN_DISABLED_BY_POLICY\",\n \"PLUGIN_PERMISSION_DENIED\",\n \"PLUGIN_ORIGIN_DENIED\",\n \"PLUGIN_ACTION_DENIED\",\n \"PLUGIN_OWNER_SCOPE_MISMATCH\",\n \"PLUGIN_SECRET_SCOPE_MISMATCH\",\n \"PLUGIN_STORAGE_SCOPE_MISMATCH\",\n \"PLUGIN_ADAPTER_FAILURE\",\n \"PLUGIN_SESSION_REVOKED\",\n \"PLUGIN_SESSION_TEARDOWN_INCOMPLETE\",\n \"PLUGIN_SESSION_FENCE_CAPACITY\",\n \"PLUGIN_CONFIRMATION_REQUIRED\",\n \"PLUGIN_CONFIRMATION_INVALID\",\n \"PLUGIN_TOKEN_EXPIRED\",\n \"PLUGIN_TOKEN_REPLAY\",\n \"PLUGIN_GATEWAY_TOKEN_INVALID\",\n \"PLUGIN_GATEWAY_TOKEN_REPLAYED\",\n \"PLUGIN_GATEWAY_TOKEN_CHANNEL_MISMATCH\",\n \"PLUGIN_ASSET_TICKET_INVALID\",\n \"PLUGIN_ASSET_SESSION_INVALID\",\n \"PLUGIN_STREAM_TICKET_INVALID\",\n \"PLUGIN_STREAM_DELIVERY_INVALID\",\n \"PLUGIN_STREAM_CANCELLED\",\n \"PLUGIN_LEASE_INVALID\",\n \"PLUGIN_LEASE_REPLAYED\",\n \"PLUGIN_GRANT_INVALID\",\n \"PLUGIN_STORAGE_QUOTA_EXCEEDED\",\n \"PLUGIN_OPERATION_BLOCKED\",\n \"PLUGIN_OPERATION_NOT_FOUND\",\n \"PLUGIN_OPERATION_NOT_CANCELABLE\",\n \"PLUGIN_OPERATION_RATE_LIMITED\",\n \"PLUGIN_NETWORK_TARGET_DENIED\",\n \"PLUGIN_NETWORK_RATE_LIMITED\",\n \"PLUGIN_RUNTIME_UNAVAILABLE\",\n \"PLUGIN_RUNTIME_VERSION_MISMATCH\",\n \"PLUGIN_RUNTIME_CONTRACT_MISMATCH\",\n \"PLUGIN_UI_PROTOCOL_UNSUPPORTED\",\n \"PLUGIN_UI_PROTOCOL_VIOLATION\",\n \"PLUGIN_SURFACE_QUIESCE_TIMEOUT\",\n \"PLUGIN_JSON_LIMIT_EXCEEDED\",\n \"PLUGIN_CAPABILITY_ERROR\",\n \"PLUGIN_WORKER_ERROR\",\n \"PLUGIN_CONTRACT_MISMATCH\",\n \"PLUGIN_MANAGEMENT_REVISION_MISMATCH\",\n \"PLUGIN_AUTHORIZATION_REVISION_MISMATCH\",\n \"PLUGIN_BINDING_REVISION_MISMATCH\",\n \"PLUGIN_VALUES_REVISION_MISMATCH\",\n \"PLUGIN_CSRF_REQUIRED\",\n \"PLUGIN_CSRF_INVALID\",\n \"PLUGIN_FEATURE_NOT_CONFIGURED\",\n \"PLUGIN_CONFIRMATION_REJECTED\",\n \"PLUGIN_BRIDGE_CANCELLED\",\n \"PLUGIN_BRIDGE_TIMEOUT\",\n \"PLUGIN_BRIDGE_DISPOSED\",\n \"PLUGIN_BRIDGE_HANDSHAKE_FAILED\",\n \"PLUGIN_BRIDGE_HANDSHAKE_REQUIRED\"\n ]\n },\n \"typescript_client_error_code\": {\n \"type\": \"string\",\n \"enum\": [\n \"PLUGIN_INVALID_REQUEST\",\n \"PLUGIN_MANIFEST_INVALID\",\n \"PLUGIN_PACKAGE_INVALID\",\n \"PLUGIN_PACKAGE_TOO_LARGE\",\n \"PLUGIN_PACKAGE_PATH_FORBIDDEN\",\n \"PLUGIN_SIGNATURE_INVALID\",\n \"PLUGIN_TRUST_STATE_DENIED\",\n \"PLUGIN_TRUST_VERIFICATION_REQUIRED\",\n \"PLUGIN_TRUST_VERIFICATION_INVALID\",\n \"PLUGIN_RELEASE_REF_VERIFICATION_FAILED\",\n \"PLUGIN_RELEASE_REF_POLICY_DENIED\",\n \"PLUGIN_RELEASE_NETWORK\",\n \"PLUGIN_RELEASE_TIMEOUT\",\n \"PLUGIN_RELEASE_ASSET_MISSING\",\n \"PLUGIN_RELEASE_ASSET_INTEGRITY\",\n \"PLUGIN_INSTALL_INTERRUPTED\",\n \"PLUGIN_INSTALL_STATE_CONFLICT\",\n \"PLUGIN_INTERNAL_FAILURE\",\n \"PLUGIN_DISABLED\",\n \"PLUGIN_DISABLED_BY_POLICY\",\n \"PLUGIN_PERMISSION_DENIED\",\n \"PLUGIN_ORIGIN_DENIED\",\n \"PLUGIN_ACTION_DENIED\",\n \"PLUGIN_OWNER_SCOPE_MISMATCH\",\n \"PLUGIN_SECRET_SCOPE_MISMATCH\",\n \"PLUGIN_STORAGE_SCOPE_MISMATCH\",\n \"PLUGIN_ADAPTER_FAILURE\",\n \"PLUGIN_SESSION_REVOKED\",\n \"PLUGIN_SESSION_TEARDOWN_INCOMPLETE\",\n \"PLUGIN_SESSION_FENCE_CAPACITY\",\n \"PLUGIN_CONFIRMATION_REQUIRED\",\n \"PLUGIN_CONFIRMATION_INVALID\",\n \"PLUGIN_TOKEN_EXPIRED\",\n \"PLUGIN_TOKEN_REPLAY\",\n \"PLUGIN_GATEWAY_TOKEN_INVALID\",\n \"PLUGIN_GATEWAY_TOKEN_REPLAYED\",\n \"PLUGIN_GATEWAY_TOKEN_CHANNEL_MISMATCH\",\n \"PLUGIN_ASSET_TICKET_INVALID\",\n \"PLUGIN_ASSET_SESSION_INVALID\",\n \"PLUGIN_STREAM_TICKET_INVALID\",\n \"PLUGIN_STREAM_DELIVERY_INVALID\",\n \"PLUGIN_STREAM_CANCELLED\",\n \"PLUGIN_LEASE_INVALID\",\n \"PLUGIN_LEASE_REPLAYED\",\n \"PLUGIN_GRANT_INVALID\",\n \"PLUGIN_STORAGE_QUOTA_EXCEEDED\",\n \"PLUGIN_OPERATION_BLOCKED\",\n \"PLUGIN_OPERATION_NOT_FOUND\",\n \"PLUGIN_OPERATION_NOT_CANCELABLE\",\n \"PLUGIN_OPERATION_RATE_LIMITED\",\n \"PLUGIN_NETWORK_TARGET_DENIED\",\n \"PLUGIN_NETWORK_RATE_LIMITED\",\n \"PLUGIN_RUNTIME_UNAVAILABLE\",\n \"PLUGIN_RUNTIME_VERSION_MISMATCH\",\n \"PLUGIN_RUNTIME_CONTRACT_MISMATCH\",\n \"PLUGIN_UI_PROTOCOL_UNSUPPORTED\",\n \"PLUGIN_UI_PROTOCOL_VIOLATION\",\n \"PLUGIN_SURFACE_QUIESCE_TIMEOUT\",\n \"PLUGIN_JSON_LIMIT_EXCEEDED\",\n \"PLUGIN_CAPABILITY_ERROR\",\n \"PLUGIN_WORKER_ERROR\",\n \"PLUGIN_CONTRACT_MISMATCH\",\n \"PLUGIN_MANAGEMENT_REVISION_MISMATCH\",\n \"PLUGIN_AUTHORIZATION_REVISION_MISMATCH\",\n \"PLUGIN_BINDING_REVISION_MISMATCH\",\n \"PLUGIN_VALUES_REVISION_MISMATCH\",\n \"PLUGIN_CSRF_REQUIRED\",\n \"PLUGIN_CSRF_INVALID\",\n \"PLUGIN_FEATURE_NOT_CONFIGURED\",\n \"PLUGIN_CONFIRMATION_REJECTED\",\n \"PLUGIN_BRIDGE_CANCELLED\",\n \"PLUGIN_BRIDGE_TIMEOUT\",\n \"PLUGIN_BRIDGE_DISPOSED\",\n \"PLUGIN_BRIDGE_HANDSHAKE_FAILED\",\n \"PLUGIN_BRIDGE_HANDSHAKE_REQUIRED\",\n \"PLUGIN_PLATFORM_REQUEST_FAILED\",\n \"PLUGIN_STREAM_FAILED\"\n ]\n },\n \"rust_ipc_error_code\": {\n \"type\": \"string\",\n \"enum\": [\n \"ARTIFACT_HANDLE_FAILED\",\n \"HANDLE_GRANT_VALIDATION_FAILED\",\n \"STORAGE_FILE_FAILED\",\n \"STORAGE_KV_FAILED\",\n \"STORAGE_SQLITE_FAILED\",\n \"NETWORK_GRANT_FAILED\",\n \"NETWORK_EXECUTE_FAILED\",\n \"NETWORK_STREAM_STORE_UNAVAILABLE\",\n \"NETWORK_STREAM_FAILED\",\n \"NETWORK_STREAM_BACKPRESSURE\",\n \"NETWORK_STREAM_INVALID\",\n \"NETWORK_STREAM_NOT_FOUND\",\n \"NETWORK_STREAM_CLOSED\",\n \"WORKER_INVOCATION_INVALID\",\n \"RUNTIME_CAPABILITY_REVOKED\",\n \"RUNTIME_CONTROL_CHANNEL_STALE\",\n \"RUNTIME_LEASE_INVALID\",\n \"RUNTIME_LEASE_SIGNATURE_INVALID\",\n \"PLUGIN_LEASE_REPLAYED\",\n \"WASM_WORKER_INVALID\",\n \"WASM_WORKER_FAILED\",\n \"WASM_HOSTCALL_FAILED\",\n \"RUNTIME_CAPACITY_EXCEEDED\",\n \"RUNTIME_INVOCATION_CANCELED\",\n \"PLUGIN_SESSION_REVOKED\",\n \"SESSION_REVOKE_SEQUENCE_STALE\",\n \"SESSION_REVOKE_DRAIN_TIMEOUT\",\n \"UNSUPPORTED_FRAME\"\n ]\n },\n \"runtime_process_failure_code\": {\n \"type\": \"string\",\n \"enum\": [\n \"RUNTIME_PROCESS_FAILED\",\n \"RUNTIME_PROCESS_EXIT_UNEXPECTED\",\n \"RUNTIME_PROCESS_EXIT_UNRECOGNIZED\",\n \"RUNTIME_PROCESS_SIGNALLED\",\n \"IPC_WRITER_CAPACITY_OVERFLOW\",\n \"IPC_WRITER_CAPACITY_LIMIT_EXCEEDED\",\n \"IPC_WRITER_START_FAILED\",\n \"IPC_WRITER_CLOSED\",\n \"IPC_WRITER_BATCH_SIZE_OVERFLOW\",\n \"IPC_WRITER_WRITE_FAILED\",\n \"IPC_WRITER_FLUSH_FAILED\",\n \"IPC_WRITER_PANICKED\"\n ]\n },\n \"runtime_process_exit_failure\": {\n \"oneOf\": [\n {\n \"type\": \"object\",\n \"required\": [\"exit_code\", \"code\"],\n \"additionalProperties\": false,\n \"properties\": {\n \"exit_code\": { \"const\": 1 },\n \"code\": { \"const\": \"RUNTIME_PROCESS_FAILED\" }\n }\n },\n {\n \"type\": \"object\",\n \"required\": [\"exit_code\", \"code\"],\n \"additionalProperties\": false,\n \"properties\": {\n \"exit_code\": { \"const\": 80 },\n \"code\": { \"const\": \"IPC_WRITER_CAPACITY_OVERFLOW\" }\n }\n },\n {\n \"type\": \"object\",\n \"required\": [\"exit_code\", \"code\"],\n \"additionalProperties\": false,\n \"properties\": {\n \"exit_code\": { \"const\": 81 },\n \"code\": { \"const\": \"IPC_WRITER_CAPACITY_LIMIT_EXCEEDED\" }\n }\n },\n {\n \"type\": \"object\",\n \"required\": [\"exit_code\", \"code\"],\n \"additionalProperties\": false,\n \"properties\": {\n \"exit_code\": { \"const\": 82 },\n \"code\": { \"const\": \"IPC_WRITER_START_FAILED\" }\n }\n },\n {\n \"type\": \"object\",\n \"required\": [\"exit_code\", \"code\"],\n \"additionalProperties\": false,\n \"properties\": {\n \"exit_code\": { \"const\": 83 },\n \"code\": { \"const\": \"IPC_WRITER_CLOSED\" }\n }\n },\n {\n \"type\": \"object\",\n \"required\": [\"exit_code\", \"code\"],\n \"additionalProperties\": false,\n \"properties\": {\n \"exit_code\": { \"const\": 84 },\n \"code\": { \"const\": \"IPC_WRITER_BATCH_SIZE_OVERFLOW\" }\n }\n },\n {\n \"type\": \"object\",\n \"required\": [\"exit_code\", \"code\"],\n \"additionalProperties\": false,\n \"properties\": {\n \"exit_code\": { \"const\": 85 },\n \"code\": { \"const\": \"IPC_WRITER_WRITE_FAILED\" }\n }\n },\n {\n \"type\": \"object\",\n \"required\": [\"exit_code\", \"code\"],\n \"additionalProperties\": false,\n \"properties\": {\n \"exit_code\": { \"const\": 86 },\n \"code\": { \"const\": \"IPC_WRITER_FLUSH_FAILED\" }\n }\n },\n {\n \"type\": \"object\",\n \"required\": [\"exit_code\", \"code\"],\n \"additionalProperties\": false,\n \"properties\": {\n \"exit_code\": { \"const\": 87 },\n \"code\": { \"const\": \"IPC_WRITER_PANICKED\" }\n }\n }\n ]\n }\n }\n}\n".as_bytes();
192static CONTRACT_BODY_EXTERNAL_SIGNER_REQUEST_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/external-signer-request-v1.schema.json\",\n \"title\": \"ReDevPlugin external signer request v1\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"schema_version\", \"request_id\", \"usage\", \"key_id\", \"subject\", \"subject_identity_sha256\", \"signing_preimage_sha256\"],\n \"properties\": {\n \"schema_version\": { \"const\": \"redevplugin.external_signer_request.v1\" },\n \"request_id\": { \"$ref\": \"#/$defs/sha256\" },\n \"usage\": { \"$ref\": \"#/$defs/usage\" },\n \"key_id\": { \"$ref\": \"#/$defs/id\" },\n \"subject\": { \"$ref\": \"release-signing-subject-v1.schema.json\" },\n \"subject_identity_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"signing_preimage_sha256\": { \"$ref\": \"#/$defs/sha256\" }\n },\n \"$defs\": {\n \"id\": { \"type\": \"string\", \"pattern\": \"^[a-z][a-z0-9._-]{0,127}$\" },\n \"sha256\": { \"type\": \"string\", \"pattern\": \"^[0-9a-f]{64}$\" },\n \"usage\": { \"enum\": [\n \"redevplugin.release-signing.root-delegation.v1\",\n \"redevplugin.release-signing.package.v1\",\n \"redevplugin.release-signing.release-metadata.v1\",\n \"redevplugin.release-signing.source-policy-document.v1\",\n \"redevplugin.release-signing.source-policy-pointer.v1\",\n \"redevplugin.release-signing.revocation-document.v1\",\n \"redevplugin.release-signing.revocation-pointer.v1\",\n \"redevplugin.release-signing.ledger-checkpoint.v1\",\n \"redevplugin.release-signing.ledger-receipt.v1\"\n ] }\n }\n}\n".as_bytes();
193static CONTRACT_BODY_EXTERNAL_SIGNER_RESPONSE_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/external-signer-response-v1.schema.json\",\n \"title\": \"ReDevPlugin external signer response v1\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"schema_version\", \"request_id\", \"usage\", \"key_id\", \"subject_identity_sha256\", \"signing_preimage_sha256\", \"algorithm\", \"signature\"],\n \"properties\": {\n \"schema_version\": { \"const\": \"redevplugin.external_signer_response.v1\" },\n \"request_id\": { \"$ref\": \"#/$defs/sha256\" },\n \"usage\": { \"$ref\": \"#/$defs/usage\" },\n \"key_id\": { \"$ref\": \"#/$defs/id\" },\n \"subject_identity_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"signing_preimage_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"algorithm\": { \"const\": \"ed25519\" },\n \"signature\": { \"type\": \"string\", \"pattern\": \"^[A-Za-z0-9+/]{86}==$\" }\n },\n \"$defs\": {\n \"id\": { \"type\": \"string\", \"pattern\": \"^[a-z][a-z0-9._-]{0,127}$\" },\n \"sha256\": { \"type\": \"string\", \"pattern\": \"^[0-9a-f]{64}$\" },\n \"usage\": { \"enum\": [\n \"redevplugin.release-signing.root-delegation.v1\",\n \"redevplugin.release-signing.package.v1\",\n \"redevplugin.release-signing.release-metadata.v1\",\n \"redevplugin.release-signing.source-policy-document.v1\",\n \"redevplugin.release-signing.source-policy-pointer.v1\",\n \"redevplugin.release-signing.revocation-document.v1\",\n \"redevplugin.release-signing.revocation-pointer.v1\",\n \"redevplugin.release-signing.ledger-checkpoint.v1\",\n \"redevplugin.release-signing.ledger-receipt.v1\"\n ] }\n }\n}\n".as_bytes();
194static CONTRACT_BODY_HOST_CAPABILITY_COMPATIBILITY_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/host-capability-compatibility-v1.schema.json\",\n \"title\": \"ReDevPlugin host capability compatibility v1\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"schema_version\",\n \"contract_id\",\n \"contract_version\",\n \"capability_id\",\n \"capability_version\",\n \"min_redevplugin_version\"\n ],\n \"properties\": {\n \"schema_version\": { \"const\": \"redevplugin.host_capability_compatibility.v1\" },\n \"contract_id\": { \"$ref\": \"#/$defs/id\" },\n \"contract_version\": { \"$ref\": \"#/$defs/semver\" },\n \"capability_id\": { \"$ref\": \"#/$defs/id\" },\n \"capability_version\": { \"$ref\": \"#/$defs/semver\" },\n \"min_redevplugin_version\": { \"$ref\": \"#/$defs/semver\" }\n },\n \"$defs\": {\n \"id\": { \"type\": \"string\", \"pattern\": \"^[A-Za-z0-9][A-Za-z0-9._-]*$\" },\n \"semver\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)(?:-(?:(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*)(?:\\\\.(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*))*))?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n }\n }\n}\n".as_bytes();
195static CONTRACT_BODY_HOST_CAPABILITY_CONTRACT_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/host-capability-contract-v1.schema.json\",\n \"title\": \"ReDevPlugin host capability contract v1\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"schema_version\",\n \"contract_id\",\n \"contract_version\",\n \"publisher_id\",\n \"capability_id\",\n \"capability_version\",\n \"client_name\",\n \"methods\"\n ],\n \"properties\": {\n \"schema_version\": { \"const\": \"redevplugin.host_capability_contract.v1\" },\n \"contract_id\": { \"$ref\": \"#/$defs/id\" },\n \"contract_version\": { \"$ref\": \"#/$defs/semver\" },\n \"publisher_id\": { \"$ref\": \"#/$defs/id\" },\n \"capability_id\": { \"$ref\": \"#/$defs/id\" },\n \"capability_version\": { \"$ref\": \"#/$defs/semver\" },\n \"client_name\": { \"$ref\": \"#/$defs/typescript_declaration_identifier\" },\n \"methods\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"items\": { \"$ref\": \"#/$defs/method\" }\n },\n \"errors\": {\n \"type\": \"array\",\n \"items\": { \"$ref\": \"#/$defs/business_error\" }\n }\n },\n \"$defs\": {\n \"id\": { \"type\": \"string\", \"pattern\": \"^[A-Za-z0-9][A-Za-z0-9._-]*$\" },\n \"semver\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)(?:-(?:(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*)(?:\\\\.(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*))*))?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"typescript_declaration_identifier\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z_$][A-Za-z0-9_$]*$\",\n \"not\": {\n \"enum\": [\n \"PluginBridgeClient\", \"PluginBridgeError\", \"PluginBridgeRequestOptions\", \"PluginOperation\", \"PluginStream\",\n \"abstract\", \"accessor\", \"any\", \"as\", \"assert\", \"asserts\", \"async\", \"await\", \"bigint\", \"boolean\",\n \"break\", \"case\", \"catch\", \"class\", \"const\", \"continue\", \"debugger\", \"declare\", \"default\", \"delete\",\n \"do\", \"else\", \"enum\", \"export\", \"extends\", \"false\", \"finally\", \"for\", \"from\", \"function\", \"get\",\n \"if\", \"implements\", \"import\", \"in\", \"infer\", \"instanceof\", \"interface\", \"intrinsic\", \"is\", \"keyof\",\n \"let\", \"module\", \"namespace\", \"never\", \"new\", \"null\", \"number\", \"object\", \"of\", \"out\", \"override\",\n \"package\", \"private\", \"protected\", \"public\", \"readonly\", \"require\", \"return\", \"satisfies\", \"set\", \"static\",\n \"string\", \"super\", \"switch\", \"symbol\", \"this\", \"throw\", \"true\", \"try\", \"type\", \"typeof\", \"undefined\",\n \"unique\", \"unknown\", \"using\", \"var\", \"void\", \"while\", \"with\", \"yield\",\n \"callCapabilityOperation\", \"callCapabilityStream\", \"callCapabilitySync\", \"decodePluginStreamText\",\n \"isCapabilityBusinessError\"\n ]\n }\n },\n \"typescript_member_identifier\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z_$][A-Za-z0-9_$]*$\",\n \"not\": { \"const\": \"constructor\" }\n },\n \"string_set\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": { \"type\": \"string\", \"minLength\": 1, \"pattern\": \"^\\\\S+$\" }\n },\n \"method\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"name\",\n \"client_method\",\n \"effect\",\n \"execution\",\n \"target_fields\",\n \"target_schema\",\n \"request_type_name\",\n \"response_type_name\",\n \"request_schema\",\n \"response_schema\",\n \"quota\"\n ],\n \"properties\": {\n \"name\": { \"type\": \"string\", \"pattern\": \"^[a-z][a-z0-9]*(\\\\.[a-z][a-z0-9_]*)+$\" },\n \"client_method\": { \"$ref\": \"#/$defs/typescript_member_identifier\" },\n \"effect\": { \"enum\": [\"read\", \"write\", \"execute\", \"delete\", \"admin\"] },\n \"execution\": { \"enum\": [\"sync\", \"operation\", \"subscription\"] },\n \"preflight_only\": { \"type\": \"boolean\" },\n \"required_permissions\": { \"$ref\": \"#/$defs/string_set\" },\n \"target_fields\": { \"$ref\": \"#/$defs/string_set\" },\n \"target_schema\": { \"$ref\": \"#/$defs/object_value_schema\" },\n \"request_type_name\": { \"$ref\": \"#/$defs/typescript_declaration_identifier\" },\n \"response_type_name\": { \"$ref\": \"#/$defs/typescript_declaration_identifier\" },\n \"request_schema\": { \"$ref\": \"#/$defs/object_value_schema\" },\n \"response_schema\": { \"$ref\": \"#/$defs/restricted_schema\" },\n \"event_type_name\": { \"$ref\": \"#/$defs/typescript_declaration_identifier\" },\n \"event_schema\": { \"$ref\": \"#/$defs/restricted_schema\" },\n \"confirmation\": { \"$ref\": \"#/$defs/confirmation\" },\n \"cancel_policy\": { \"$ref\": \"#/$defs/cancel_policy\" },\n \"quota\": { \"$ref\": \"#/$defs/quota\" }\n },\n \"allOf\": [\n {\n \"if\": { \"properties\": { \"execution\": { \"const\": \"subscription\" } }, \"required\": [\"execution\"] },\n \"then\": { \"required\": [\"event_type_name\", \"event_schema\", \"cancel_policy\"] }\n },\n {\n \"if\": { \"properties\": { \"execution\": { \"const\": \"operation\" } }, \"required\": [\"execution\"] },\n \"then\": { \"required\": [\"cancel_policy\"] }\n },\n {\n \"if\": { \"properties\": { \"execution\": { \"const\": \"sync\" } }, \"required\": [\"execution\"] },\n \"then\": {\n \"not\": {\n \"anyOf\": [\n { \"required\": [\"event_type_name\"] },\n { \"required\": [\"event_schema\"] },\n { \"required\": [\"cancel_policy\"] }\n ]\n }\n }\n }\n ]\n },\n \"confirmation\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"mode\"],\n \"properties\": {\n \"mode\": { \"enum\": [\"required\", \"risk_based\"] },\n \"preflight_method\": { \"type\": \"string\", \"pattern\": \"^[a-z][a-z0-9]*(\\\\.[a-z][a-z0-9_]*)+$\" },\n \"request_hash_fields\": { \"$ref\": \"#/$defs/string_set\" },\n \"plan_hash_required\": { \"type\": \"boolean\" }\n }\n },\n \"cancel_policy\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"cancelable\", \"disable_behavior\", \"uninstall_behavior\"],\n \"properties\": {\n \"cancelable\": { \"type\": \"boolean\" },\n \"disable_behavior\": { \"enum\": [\"cancel\", \"orphan\", \"wait\"] },\n \"uninstall_behavior\": { \"enum\": [\"cancel_then_block_delete\", \"force_cleanup_allowed\"] },\n \"ack_timeout_ms\": { \"type\": \"integer\", \"minimum\": 0 }\n }\n },\n \"quota\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"properties\": {\n \"max_concurrent\": { \"type\": \"integer\", \"minimum\": 0 },\n \"max_duration_ms\": { \"type\": \"integer\", \"minimum\": 0 },\n \"max_stream_bytes\": { \"type\": \"integer\", \"minimum\": 0 }\n }\n },\n \"business_error\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"code\", \"message\"],\n \"properties\": {\n \"code\": { \"type\": \"string\", \"pattern\": \"^[A-Z][A-Z0-9_]*$\" },\n \"message\": { \"type\": \"string\", \"minLength\": 1 },\n \"details_schema\": { \"$ref\": \"#/$defs/object_value_schema\" }\n }\n },\n \"restricted_schema\": {\n \"oneOf\": [\n { \"$ref\": \"#/$defs/object_schema\" },\n { \"$ref\": \"#/$defs/array_schema\" },\n { \"$ref\": \"#/$defs/string_schema\" },\n { \"$ref\": \"#/$defs/integer_schema\" },\n { \"$ref\": \"#/$defs/number_schema\" },\n { \"$ref\": \"#/$defs/boolean_schema\" },\n { \"$ref\": \"#/$defs/null_schema\" },\n { \"$ref\": \"#/$defs/one_of_schema\" }\n ]\n },\n \"object_value_schema\": {\n \"oneOf\": [\n { \"$ref\": \"#/$defs/object_schema\" },\n { \"$ref\": \"#/$defs/object_one_of_schema\" }\n ]\n },\n \"object_one_of_schema\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"oneOf\"],\n \"properties\": {\n \"title\": { \"type\": \"string\" },\n \"description\": { \"type\": \"string\" },\n \"oneOf\": {\n \"type\": \"array\",\n \"minItems\": 2,\n \"maxItems\": 8,\n \"items\": { \"$ref\": \"#/$defs/object_value_schema\" }\n }\n }\n },\n \"object_schema\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"additionalProperties\"],\n \"properties\": {\n \"type\": { \"const\": \"object\" },\n \"title\": { \"type\": \"string\" },\n \"description\": { \"type\": \"string\" },\n \"properties\": {\n \"type\": \"object\",\n \"propertyNames\": { \"not\": { \"enum\": [\"__proto__\", \"constructor\", \"prototype\"] } },\n \"additionalProperties\": { \"$ref\": \"#/$defs/restricted_schema\" }\n },\n \"required\": { \"$ref\": \"#/$defs/string_set\" },\n \"additionalProperties\": { \"const\": false },\n \"minProperties\": { \"type\": \"integer\", \"minimum\": 0 },\n \"maxProperties\": { \"type\": \"integer\", \"minimum\": 0 }\n }\n },\n \"array_schema\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"items\"],\n \"properties\": {\n \"type\": { \"const\": \"array\" },\n \"title\": { \"type\": \"string\" },\n \"description\": { \"type\": \"string\" },\n \"items\": { \"$ref\": \"#/$defs/restricted_schema\" },\n \"minItems\": { \"type\": \"integer\", \"minimum\": 0 },\n \"maxItems\": { \"type\": \"integer\", \"minimum\": 0 },\n \"uniqueItems\": { \"type\": \"boolean\" }\n }\n },\n \"string_schema\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\"],\n \"properties\": {\n \"type\": { \"const\": \"string\" },\n \"title\": { \"type\": \"string\" },\n \"description\": { \"type\": \"string\" },\n \"enum\": { \"type\": \"array\", \"minItems\": 1, \"uniqueItems\": true, \"items\": { \"type\": \"string\" } },\n \"const\": { \"type\": \"string\" },\n \"minLength\": { \"type\": \"integer\", \"minimum\": 0 },\n \"maxLength\": { \"type\": \"integer\", \"minimum\": 0 },\n \"pattern\": { \"type\": \"string\" },\n \"format\": { \"enum\": [\"date-time\", \"uuid\", \"hostname\", \"ipv4\", \"ipv6\"] }\n }\n },\n \"integer_schema\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\"],\n \"properties\": {\n \"type\": { \"const\": \"integer\" },\n \"title\": { \"type\": \"string\" },\n \"description\": { \"type\": \"string\" },\n \"enum\": { \"type\": \"array\", \"minItems\": 1, \"uniqueItems\": true, \"items\": { \"type\": \"integer\" } },\n \"const\": { \"type\": \"integer\" },\n \"minimum\": { \"type\": \"integer\" },\n \"maximum\": { \"type\": \"integer\" },\n \"exclusiveMinimum\": { \"type\": \"integer\" },\n \"exclusiveMaximum\": { \"type\": \"integer\" },\n \"multipleOf\": { \"type\": \"integer\", \"exclusiveMinimum\": 0 }\n }\n },\n \"number_schema\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\"],\n \"properties\": {\n \"type\": { \"const\": \"number\" },\n \"title\": { \"type\": \"string\" },\n \"description\": { \"type\": \"string\" },\n \"enum\": { \"type\": \"array\", \"minItems\": 1, \"uniqueItems\": true, \"items\": { \"type\": \"number\" } },\n \"const\": { \"type\": \"number\" },\n \"minimum\": { \"type\": \"number\" },\n \"maximum\": { \"type\": \"number\" },\n \"exclusiveMinimum\": { \"type\": \"number\" },\n \"exclusiveMaximum\": { \"type\": \"number\" },\n \"multipleOf\": { \"type\": \"number\", \"exclusiveMinimum\": 0 }\n }\n },\n \"boolean_schema\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\"],\n \"properties\": {\n \"type\": { \"const\": \"boolean\" },\n \"title\": { \"type\": \"string\" },\n \"description\": { \"type\": \"string\" },\n \"const\": { \"type\": \"boolean\" }\n }\n },\n \"null_schema\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\"],\n \"properties\": {\n \"type\": { \"const\": \"null\" },\n \"title\": { \"type\": \"string\" },\n \"description\": { \"type\": \"string\" },\n \"const\": { \"type\": \"null\" }\n }\n },\n \"one_of_schema\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"oneOf\"],\n \"properties\": {\n \"title\": { \"type\": \"string\" },\n \"description\": { \"type\": \"string\" },\n \"oneOf\": {\n \"type\": \"array\",\n \"minItems\": 2,\n \"maxItems\": 8,\n \"items\": { \"$ref\": \"#/$defs/restricted_schema\" }\n }\n }\n }\n }\n}\n".as_bytes();
196static CONTRACT_BODY_HOST_CAPABILITY_MANIFEST_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/host-capability-manifest-v1.schema.json\",\n \"title\": \"ReDevPlugin host capability artifact manifest v1\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"schema_version\",\n \"publisher_id\",\n \"contract_id\",\n \"contract_version\",\n \"capability_id\",\n \"capability_version\",\n \"generated_at\",\n \"source_commit\",\n \"signature_algorithm\",\n \"signature_key_id\",\n \"signature_policy_epoch\",\n \"signature_revocation_epoch\",\n \"entries\"\n ],\n \"properties\": {\n \"schema_version\": { \"const\": \"redevplugin.host_capability_manifest.v1\" },\n \"publisher_id\": { \"$ref\": \"#/$defs/id\" },\n \"contract_id\": { \"$ref\": \"#/$defs/id\" },\n \"contract_version\": { \"$ref\": \"#/$defs/semver\" },\n \"capability_id\": { \"$ref\": \"#/$defs/id\" },\n \"capability_version\": { \"$ref\": \"#/$defs/semver\" },\n \"generated_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"source_commit\": { \"type\": \"string\", \"pattern\": \"^[0-9a-f]{40}$\" },\n \"signature_algorithm\": { \"const\": \"ed25519\" },\n \"signature_key_id\": { \"$ref\": \"#/$defs/id\" },\n \"signature_policy_epoch\": { \"$ref\": \"#/$defs/decimal_epoch\" },\n \"signature_revocation_epoch\": { \"$ref\": \"#/$defs/decimal_epoch\" },\n \"entries\": {\n \"type\": \"array\",\n \"minItems\": 4,\n \"maxItems\": 4,\n \"items\": { \"$ref\": \"#/$defs/entry\" },\n \"allOf\": [\n { \"contains\": { \"properties\": { \"role\": { \"const\": \"contract\" } }, \"required\": [\"role\"] }, \"minContains\": 1, \"maxContains\": 1 },\n { \"contains\": { \"properties\": { \"role\": { \"const\": \"compatibility\" } }, \"required\": [\"role\"] }, \"minContains\": 1, \"maxContains\": 1 },\n { \"contains\": { \"properties\": { \"role\": { \"const\": \"generated_client\" } }, \"required\": [\"role\"] }, \"minContains\": 1, \"maxContains\": 1 },\n { \"contains\": { \"properties\": { \"role\": { \"const\": \"notices\" } }, \"required\": [\"role\"] }, \"minContains\": 1, \"maxContains\": 1 }\n ]\n }\n },\n \"$defs\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z0-9][A-Za-z0-9._-]*$\"\n },\n \"semver\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)(?:-(?:(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*)(?:\\\\.(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*))*))?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"artifact_ref\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 1024,\n \"pattern\": \"^[A-Za-z0-9._~-]+(?:/[A-Za-z0-9._~-]+)*$\",\n \"not\": { \"pattern\": \"(^|/)\\\\.{1,2}($|/)\" }\n },\n \"sha256\": { \"type\": \"string\", \"pattern\": \"^[0-9a-f]{64}$\" },\n \"decimal_epoch\": { \"type\": \"string\", \"pattern\": \"^(0|[1-9][0-9]*)$\" },\n \"entry\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"role\", \"ref\", \"media_type\", \"sha256\", \"size\"],\n \"properties\": {\n \"role\": { \"enum\": [\"contract\", \"compatibility\", \"generated_client\", \"notices\"] },\n \"ref\": { \"$ref\": \"#/$defs/artifact_ref\" },\n \"media_type\": { \"enum\": [\"application/schema+json\", \"application/json\", \"text/typescript\"] },\n \"sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"size\": { \"type\": \"integer\", \"minimum\": 0 }\n },\n \"allOf\": [\n {\n \"if\": { \"properties\": { \"role\": { \"const\": \"contract\" } }, \"required\": [\"role\"] },\n \"then\": { \"properties\": { \"media_type\": { \"const\": \"application/schema+json\" } } }\n },\n {\n \"if\": { \"properties\": { \"role\": { \"enum\": [\"compatibility\", \"notices\"] } }, \"required\": [\"role\"] },\n \"then\": { \"properties\": { \"media_type\": { \"const\": \"application/json\" } } }\n },\n {\n \"if\": { \"properties\": { \"role\": { \"const\": \"generated_client\" } }, \"required\": [\"role\"] },\n \"then\": { \"properties\": { \"media_type\": { \"const\": \"text/typescript\" } } }\n }\n ]\n }\n }\n}\n".as_bytes();
197static CONTRACT_BODY_HOST_CAPABILITY_NOTICES_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/host-capability-notices-v1.schema.json\",\n \"title\": \"ReDevPlugin host capability third-party notices v1\",\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"name\", \"version\", \"license\"],\n \"properties\": {\n \"name\": { \"type\": \"string\", \"minLength\": 1 },\n \"version\": { \"type\": \"string\", \"minLength\": 1 },\n \"license\": { \"type\": \"string\", \"minLength\": 1 },\n \"source_url\": { \"type\": \"string\", \"format\": \"uri\" }\n }\n }\n}\n".as_bytes();
198static CONTRACT_BODY_HOST_CAPABILITY_PIN_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/host-capability-pin-v1.schema.json\",\n \"title\": \"ReDevPlugin host capability artifact pin v1\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"publisher_id\",\n \"contract_id\",\n \"contract_version\",\n \"artifact_ref\",\n \"artifact_sha256\",\n \"manifest_ref\",\n \"manifest_sha256\",\n \"signature_ref\",\n \"signature_sha256\",\n \"signature_key_id\",\n \"signature_policy_epoch\",\n \"signature_revocation_epoch\",\n \"compatibility_ref\",\n \"compatibility_sha256\",\n \"generated_client_ref\",\n \"generated_client_sha256\",\n \"notices_ref\",\n \"notices_sha256\"\n ],\n \"properties\": {\n \"publisher_id\": { \"$ref\": \"#/$defs/id\" },\n \"contract_id\": { \"$ref\": \"#/$defs/id\" },\n \"contract_version\": { \"$ref\": \"#/$defs/semver\" },\n \"artifact_ref\": { \"$ref\": \"#/$defs/artifact_ref\" },\n \"artifact_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"manifest_ref\": { \"$ref\": \"#/$defs/artifact_ref\" },\n \"manifest_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"signature_ref\": { \"$ref\": \"#/$defs/artifact_ref\" },\n \"signature_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"signature_key_id\": { \"$ref\": \"#/$defs/id\" },\n \"signature_policy_epoch\": { \"$ref\": \"#/$defs/decimal_epoch\" },\n \"signature_revocation_epoch\": { \"$ref\": \"#/$defs/decimal_epoch\" },\n \"compatibility_ref\": { \"$ref\": \"#/$defs/artifact_ref\" },\n \"compatibility_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"generated_client_ref\": { \"$ref\": \"#/$defs/artifact_ref\" },\n \"generated_client_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"notices_ref\": { \"$ref\": \"#/$defs/artifact_ref\" },\n \"notices_sha256\": { \"$ref\": \"#/$defs/sha256\" }\n },\n \"$defs\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z0-9][A-Za-z0-9._-]*$\"\n },\n \"semver\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)(?:-(?:(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*)(?:\\\\.(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*))*))?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"artifact_ref\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 1024,\n \"pattern\": \"^[A-Za-z0-9._~-]+(?:/[A-Za-z0-9._~-]+)*$\",\n \"not\": { \"pattern\": \"(^|/)\\\\.{1,2}($|/)\" }\n },\n \"sha256\": {\n \"type\": \"string\",\n \"pattern\": \"^[0-9a-f]{64}$\"\n },\n \"decimal_epoch\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)$\"\n }\n }\n}\n".as_bytes();
199static CONTRACT_BODY_HOST_CAPABILITY_PUBLISHER_CONFIG_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/host-capability-publisher-config-v1.schema.json\",\n \"title\": \"ReDevPlugin host capability publisher config v1\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"schema_version\",\n \"contract_file\",\n \"public_key_file\",\n \"artifact_base_ref\",\n \"generated_at\",\n \"source_commit\",\n \"min_redevplugin_version\",\n \"signature_policy_epoch\",\n \"signature_revocation_epoch\"\n ],\n \"properties\": {\n \"schema_version\": { \"const\": \"redevplugin.host_capability_publisher_config.v1\" },\n \"contract_file\": { \"$ref\": \"#/$defs/path\" },\n \"public_key_file\": { \"$ref\": \"#/$defs/path\" },\n \"artifact_base_ref\": { \"type\": \"string\", \"minLength\": 1, \"maxLength\": 1024 },\n \"generated_at\": { \"type\": \"string\", \"format\": \"date-time\", \"maxLength\": 35 },\n \"source_commit\": { \"type\": \"string\", \"pattern\": \"^[0-9a-f]{40}$\" },\n \"min_redevplugin_version\": { \"$ref\": \"#/$defs/semver\" },\n \"signature_policy_epoch\": { \"$ref\": \"#/$defs/epoch\" },\n \"signature_revocation_epoch\": { \"$ref\": \"#/$defs/epoch\" },\n \"notices_file\": { \"$ref\": \"#/$defs/path\" }\n },\n \"$defs\": {\n \"path\": { \"type\": \"string\", \"minLength\": 1, \"maxLength\": 4096 },\n \"epoch\": { \"type\": \"string\", \"pattern\": \"^(0|[1-9][0-9]*)$\" },\n \"semver\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)(?:-(?:(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*)(?:\\\\.(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*))*))?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n }\n }\n}\n".as_bytes();
200static CONTRACT_BODY_HOST_CAPABILITY_SIGNATURE_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/host-capability-signature-v1.schema.json\",\n \"title\": \"ReDevPlugin host capability signature v1\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"schema_version\", \"algorithm\", \"key_id\", \"manifest_sha256\", \"signature_base64\"],\n \"properties\": {\n \"schema_version\": { \"const\": \"redevplugin.host_capability_signature.v1\" },\n \"algorithm\": { \"const\": \"ed25519\" },\n \"key_id\": { \"type\": \"string\", \"pattern\": \"^[A-Za-z0-9][A-Za-z0-9._-]*$\" },\n \"manifest_sha256\": { \"type\": \"string\", \"pattern\": \"^[0-9a-f]{64}$\" },\n \"signature_base64\": {\n \"type\": \"string\",\n \"minLength\": 88,\n \"maxLength\": 88,\n \"pattern\": \"^[A-Za-z0-9+/]{86}==$\",\n \"contentEncoding\": \"base64\"\n }\n }\n}\n".as_bytes();
201static CONTRACT_BODY_HOST_CAPABILITY_SIGNER_REQUEST_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/host-capability-signer-request-v1.schema.json\",\n \"title\": \"ReDevPlugin host capability signer request v1\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"schema_version\", \"request_id\", \"usage\", \"key_id\", \"publisher_id\",\n \"contract_id\", \"contract_version\", \"manifest_sha256\",\n \"signing_preimage_sha256\", \"signing_preimage\"\n ],\n \"properties\": {\n \"schema_version\": { \"const\": \"redevplugin.host_capability_signer_request.v1\" },\n \"request_id\": { \"$ref\": \"#/$defs/sha256\" },\n \"usage\": { \"const\": \"redevplugin.host-capability-signing.manifest.v1\" },\n \"key_id\": { \"$ref\": \"#/$defs/id\" },\n \"publisher_id\": { \"$ref\": \"#/$defs/id\" },\n \"contract_id\": { \"$ref\": \"#/$defs/id\" },\n \"contract_version\": { \"$ref\": \"#/$defs/semver\" },\n \"manifest_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"signing_preimage_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"signing_preimage\": { \"type\": \"string\", \"minLength\": 4, \"maxLength\": 1048576, \"pattern\": \"^[A-Za-z0-9+/]*={0,2}$\" }\n },\n \"$defs\": {\n \"id\": { \"type\": \"string\", \"pattern\": \"^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$\" },\n \"sha256\": { \"type\": \"string\", \"pattern\": \"^[0-9a-f]{64}$\" },\n \"semver\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)(?:-(?:(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*)(?:\\\\.(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*))*))?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n }\n }\n}\n".as_bytes();
202static CONTRACT_BODY_HOST_CAPABILITY_SIGNER_RESPONSE_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/host-capability-signer-response-v1.schema.json\",\n \"title\": \"ReDevPlugin host capability signer response v1\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"schema_version\", \"request_id\", \"usage\", \"key_id\", \"publisher_id\",\n \"contract_id\", \"contract_version\", \"manifest_sha256\",\n \"signing_preimage_sha256\", \"algorithm\", \"signature\"\n ],\n \"properties\": {\n \"schema_version\": { \"const\": \"redevplugin.host_capability_signer_response.v1\" },\n \"request_id\": { \"$ref\": \"#/$defs/sha256\" },\n \"usage\": { \"const\": \"redevplugin.host-capability-signing.manifest.v1\" },\n \"key_id\": { \"$ref\": \"#/$defs/id\" },\n \"publisher_id\": { \"$ref\": \"#/$defs/id\" },\n \"contract_id\": { \"$ref\": \"#/$defs/id\" },\n \"contract_version\": { \"$ref\": \"#/$defs/semver\" },\n \"manifest_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"signing_preimage_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"algorithm\": { \"const\": \"ed25519\" },\n \"signature\": { \"type\": \"string\", \"pattern\": \"^[A-Za-z0-9+/]{86}==$\" }\n },\n \"$defs\": {\n \"id\": { \"type\": \"string\", \"pattern\": \"^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$\" },\n \"sha256\": { \"type\": \"string\", \"pattern\": \"^[0-9a-f]{64}$\" },\n \"semver\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)(?:-(?:(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*)(?:\\\\.(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*))*))?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n }\n }\n}\n".as_bytes();
203static CONTRACT_BODY_IFRAME_BRIDGE_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/bridge-v7.schema.json\",\n \"title\": \"ReDevPlugin plugin worker bridge v7\",\n \"description\": \"Plugin-visible MessagePort contract. Plugin identity, owner/session bindings, gateway tokens, asset sessions, stream tickets, and confirmation tokens remain in the trusted parent and are intentionally absent from worker-visible messages.\",\n \"x-redevplugin-render-policy\": {\n \"max_message_bytes\": 524288,\n \"max_in_flight_requests\": 256,\n \"max_renders_per_second\": 60,\n \"max_render_depth\": 32,\n \"max_render_nodes\": 4096,\n \"max_patch_operations\": 1024,\n \"max_attributes_per_element\": 64,\n \"max_text_length\": 65536,\n \"max_attribute_value_length\": 4096,\n \"max_form_fields\": 128,\n \"max_canvas_count\": 4,\n \"max_canvas_dimension\": 4096,\n \"max_canvas_total_pixels\": 16777216,\n \"max_canvas_pointer_events_per_second\": 120,\n \"max_image_count\": 32,\n \"max_image_dimension\": 4096,\n \"max_image_total_pixels\": 33554432,\n \"worker_heartbeat_interval_ms\": 10000,\n \"worker_heartbeat_timeout_ms\": 5000,\n \"global_attributes\": [\n \"id\",\n \"class\",\n \"role\",\n \"title\",\n \"hidden\",\n \"tabindex\",\n \"autofocus\",\n \"lang\",\n \"dir\",\n \"data-redevplugin-action\",\n \"data-redevplugin-escape-action\",\n \"data-redevplugin-asset-binding\",\n \"data-redevplugin-asset-attr\"\n ],\n \"tag_attributes\": {\n \"button\": [\"type\", \"name\", \"value\", \"disabled\", \"aria-pressed\", \"aria-expanded\"],\n \"input\": [\"type\", \"name\", \"value\", \"checked\", \"disabled\", \"readonly\", \"required\", \"placeholder\", \"min\", \"max\", \"step\", \"autocomplete\"],\n \"textarea\": [\"name\", \"value\", \"disabled\", \"readonly\", \"required\", \"placeholder\", \"rows\", \"cols\", \"maxlength\"],\n \"select\": [\"name\", \"disabled\", \"required\", \"multiple\", \"size\"],\n \"option\": [\"value\", \"selected\", \"disabled\", \"label\"],\n \"label\": [\"for\"],\n \"form\": [\"name\", \"autocomplete\"],\n \"th\": [\"scope\", \"colspan\", \"rowspan\"],\n \"td\": [\"colspan\", \"rowspan\"],\n \"progress\": [\"value\", \"max\"],\n \"meter\": [\"value\", \"min\", \"max\", \"low\", \"high\", \"optimum\"],\n \"img\": [\"alt\", \"width\", \"height\", \"loading\", \"decoding\"],\n \"audio\": [\"controls\", \"autoplay\", \"muted\", \"loop\", \"preload\"],\n \"video\": [\"controls\", \"autoplay\", \"muted\", \"loop\", \"preload\", \"width\", \"height\", \"playsinline\"],\n \"source\": [\"type\", \"media\"],\n \"track\": [\"kind\", \"srclang\", \"label\", \"default\"],\n \"time\": [\"datetime\"],\n \"canvas\": [\"width\", \"height\", \"data-redevplugin-canvas\"]\n },\n \"safe_input_types\": [\"text\", \"search\", \"number\", \"checkbox\", \"radio\", \"button\", \"submit\", \"reset\"]\n },\n \"oneOf\": [\n { \"$ref\": \"#/$defs/call\" },\n { \"$ref\": \"#/$defs/stream_read\" },\n { \"$ref\": \"#/$defs/stream_ack\" },\n { \"$ref\": \"#/$defs/operation_cancel\" },\n { \"$ref\": \"#/$defs/operation_snapshot\" },\n { \"$ref\": \"#/$defs/mount\" },\n { \"$ref\": \"#/$defs/patch\" },\n { \"$ref\": \"#/$defs/canvas_open\" },\n { \"$ref\": \"#/$defs/canvas_accessibility\" },\n { \"$ref\": \"#/$defs/canvas_ready\" },\n { \"$ref\": \"#/$defs/canvas_input\" },\n { \"$ref\": \"#/$defs/image_open\" },\n { \"$ref\": \"#/$defs/image_ready\" },\n { \"$ref\": \"#/$defs/cancel\" },\n { \"$ref\": \"#/$defs/action\" },\n { \"$ref\": \"#/$defs/response\" },\n { \"$ref\": \"#/$defs/lifecycle\" },\n { \"$ref\": \"#/$defs/lifecycle_ack\" },\n { \"$ref\": \"#/$defs/context\" }\n ],\n \"$defs\": {\n \"context\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"context\"],\n \"properties\": {\n \"type\": { \"const\": \"redevplugin.bridge.context\" },\n \"context\": { \"$ref\": \"https://schemas.redevplugin.dev/plugin/opaque-surface-transport-v6.schema.json#/$defs/context_snapshot\" }\n }\n },\n \"opaque_handle\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9_-]{7,159}$\"\n },\n \"capability_business_error_details\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"capability_id\",\n \"capability_version\",\n \"detail_schema_sha256\",\n \"business_error_code\"\n ],\n \"properties\": {\n \"capability_id\": { \"type\": \"string\", \"pattern\": \"^[A-Za-z0-9][A-Za-z0-9._-]*$\" },\n \"capability_version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)(?:-(?:(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*)(?:\\\\.(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*))*))?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"detail_schema_sha256\": { \"type\": \"string\", \"pattern\": \"^[0-9a-f]{64}$\" },\n \"business_error_code\": { \"type\": \"string\", \"pattern\": \"^[A-Z][A-Z0-9_]*$\" },\n \"business_error_details\": {\n \"type\": \"object\",\n \"additionalProperties\": true\n }\n }\n },\n \"worker_error_details\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"worker_error_code\", \"worker_error_message\", \"worker_error_origin\"],\n \"properties\": {\n \"worker_error_code\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Z][A-Z0-9_]*$\"\n },\n \"worker_error_message\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 4096\n },\n \"worker_error_origin\": { \"enum\": [\"runtime\", \"hostcall\", \"plugin\"] }\n }\n },\n \"request_id\": {\n \"type\": \"string\",\n \"pattern\": \"^(rpc|stream|stream_ack|render|operation|canvas|asset)_[1-9][0-9]{0,15}$\"\n },\n \"call\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"request\"],\n \"properties\": {\n \"type\": { \"const\": \"redevplugin.bridge.call\" },\n \"request\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"id\", \"method\"],\n \"properties\": {\n \"id\": { \"$ref\": \"#/$defs/request_id\" },\n \"method\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 256,\n \"pattern\": \"^[A-Za-z0-9._:-]+$\"\n },\n \"params\": {\n \"type\": \"object\",\n \"description\": \"Optional JSON object. Arrays are rejected so worker calls match the Host RPC map contract.\"\n }\n }\n }\n }\n },\n \"stream_read\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"id\", \"stream_handle\"],\n \"properties\": {\n \"type\": { \"const\": \"redevplugin.bridge.stream.read\" },\n \"id\": { \"$ref\": \"#/$defs/request_id\" },\n \"stream_handle\": { \"$ref\": \"#/$defs/opaque_handle\" }\n }\n },\n \"stream_ack\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"id\", \"stream_handle\", \"delivery_id\"],\n \"properties\": {\n \"type\": { \"const\": \"redevplugin.bridge.stream.ack\" },\n \"id\": { \"$ref\": \"#/$defs/request_id\" },\n \"stream_handle\": { \"$ref\": \"#/$defs/opaque_handle\" },\n \"delivery_id\": { \"type\": \"string\", \"pattern\": \"^delivery_[A-Za-z0-9_-]{8,128}$\" }\n }\n },\n \"operation_cancel\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"id\", \"operation_id\"],\n \"properties\": {\n \"type\": { \"const\": \"redevplugin.bridge.operation.cancel\" },\n \"id\": { \"$ref\": \"#/$defs/request_id\" },\n \"operation_id\": { \"$ref\": \"#/$defs/opaque_handle\" },\n \"reason\": { \"type\": \"string\", \"maxLength\": 256 }\n }\n },\n \"operation_snapshot\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"id\", \"operation_id\"],\n \"properties\": {\n \"type\": { \"const\": \"redevplugin.bridge.operation.snapshot\" },\n \"id\": { \"$ref\": \"#/$defs/request_id\" },\n \"operation_id\": { \"$ref\": \"#/$defs/opaque_handle\" }\n }\n },\n \"mount\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"id\", \"revision\", \"tree\"],\n \"properties\": {\n \"type\": { \"const\": \"redevplugin.ui.mount\" },\n \"id\": { \"$ref\": \"#/$defs/request_id\" },\n \"revision\": { \"const\": 1 },\n \"tree\": { \"$ref\": \"#/$defs/element_vnode\" }\n }\n },\n \"patch\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"id\", \"base_revision\", \"revision\", \"operations\"],\n \"properties\": {\n \"type\": { \"const\": \"redevplugin.ui.patch\" },\n \"id\": { \"$ref\": \"#/$defs/request_id\" },\n \"base_revision\": { \"type\": \"integer\", \"minimum\": 1 },\n \"revision\": { \"type\": \"integer\", \"minimum\": 2 },\n \"operations\": {\n \"type\": \"array\",\n \"maxItems\": 1024,\n \"items\": { \"$ref\": \"#/$defs/patch_operation\" }\n }\n }\n },\n \"cancel\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"id\"],\n \"properties\": {\n \"type\": { \"const\": \"redevplugin.bridge.cancel\" },\n \"id\": { \"$ref\": \"#/$defs/request_id\" }\n }\n },\n \"vnode\": {\n \"oneOf\": [\n { \"$ref\": \"#/$defs/text_vnode\" },\n { \"$ref\": \"#/$defs/element_vnode\" }\n ]\n },\n \"text_vnode\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"key\", \"text\"],\n \"properties\": {\n \"type\": { \"const\": \"text\" },\n \"key\": { \"$ref\": \"#/$defs/text_identifier\" },\n \"text\": { \"type\": \"string\", \"maxLength\": 65536 }\n }\n },\n \"element_vnode\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"key\", \"tag\"],\n \"properties\": {\n \"type\": { \"const\": \"element\" },\n \"key\": { \"$ref\": \"#/$defs/element_identifier\" },\n \"tag\": {\n \"enum\": [\n \"main\", \"section\", \"header\", \"footer\", \"nav\", \"aside\", \"article\", \"div\", \"span\", \"p\",\n \"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\", \"button\", \"input\", \"textarea\", \"select\", \"option\",\n \"label\", \"fieldset\", \"legend\", \"form\", \"ul\", \"ol\", \"li\", \"dl\", \"dt\", \"dd\", \"table\",\n \"thead\", \"tbody\", \"tfoot\", \"tr\", \"th\", \"td\", \"caption\", \"details\", \"summary\", \"pre\", \"code\",\n \"kbd\", \"samp\", \"strong\", \"em\", \"small\", \"mark\", \"time\", \"progress\", \"meter\", \"img\", \"picture\",\n \"source\", \"audio\", \"video\", \"track\", \"canvas\"\n ]\n },\n \"attributes\": {\n \"type\": \"object\",\n \"maxProperties\": 64,\n \"additionalProperties\": { \"type\": [\"string\", \"number\", \"boolean\"] }\n },\n \"children\": {\n \"type\": \"array\",\n \"maxItems\": 4096,\n \"items\": { \"$ref\": \"#/$defs/vnode\" }\n }\n }\n },\n \"patch_operation\": {\n \"oneOf\": [\n {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"target_key\", \"text\"],\n \"properties\": {\n \"type\": { \"const\": \"set_text\" },\n \"target_key\": { \"$ref\": \"#/$defs/text_identifier\" },\n \"text\": { \"type\": \"string\", \"maxLength\": 65536 }\n }\n },\n {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"target_key\", \"set\", \"remove\"],\n \"properties\": {\n \"type\": { \"const\": \"patch_attributes\" },\n \"target_key\": { \"$ref\": \"#/$defs/ui_identifier\" },\n \"set\": { \"type\": \"object\", \"maxProperties\": 64, \"additionalProperties\": { \"type\": [\"string\", \"number\", \"boolean\"] } },\n \"remove\": { \"type\": \"array\", \"maxItems\": 64, \"uniqueItems\": true, \"items\": { \"type\": \"string\", \"minLength\": 1 } }\n }\n },\n {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"target_key\", \"edit_revision\"],\n \"properties\": {\n \"type\": { \"const\": \"patch_control\" },\n \"target_key\": { \"$ref\": \"#/$defs/ui_identifier\" },\n \"edit_revision\": { \"type\": \"integer\", \"minimum\": 0 },\n \"value\": { \"type\": [\"string\", \"null\"], \"maxLength\": 65536 },\n \"checked\": { \"type\": [\"boolean\", \"null\"] }\n },\n \"anyOf\": [{ \"required\": [\"value\"] }, { \"required\": [\"checked\"] }]\n },\n {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"parent_key\", \"before_key\", \"node\"],\n \"properties\": {\n \"type\": { \"const\": \"insert_child\" },\n \"parent_key\": { \"$ref\": \"#/$defs/element_identifier\" },\n \"before_key\": {\n \"oneOf\": [\n { \"$ref\": \"#/$defs/ui_identifier\" },\n { \"type\": \"null\" }\n ]\n },\n \"node\": { \"$ref\": \"#/$defs/vnode\" }\n }\n },\n {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"target_key\"],\n \"properties\": {\n \"type\": { \"const\": \"remove_child\" },\n \"target_key\": { \"$ref\": \"#/$defs/ui_identifier\" }\n }\n },\n {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"target_key\", \"parent_key\", \"before_key\"],\n \"properties\": {\n \"type\": { \"const\": \"move_child\" },\n \"target_key\": { \"$ref\": \"#/$defs/ui_identifier\" },\n \"parent_key\": { \"$ref\": \"#/$defs/element_identifier\" },\n \"before_key\": {\n \"oneOf\": [\n { \"$ref\": \"#/$defs/ui_identifier\" },\n { \"type\": \"null\" }\n ]\n }\n }\n }\n ]\n },\n \"canvas_open\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"id\", \"canvas_id\"],\n \"properties\": {\n \"type\": { \"const\": \"redevplugin.ui.canvas.open\" },\n \"id\": { \"$ref\": \"#/$defs/request_id\" },\n \"canvas_id\": { \"$ref\": \"#/$defs/ui_identifier\" }\n }\n },\n \"canvas_accessibility\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"id\", \"canvas_id\", \"label\", \"description\"],\n \"properties\": {\n \"type\": { \"const\": \"redevplugin.ui.canvas.accessibility\" },\n \"id\": { \"$ref\": \"#/$defs/request_id\" },\n \"canvas_id\": { \"$ref\": \"#/$defs/ui_identifier\" },\n \"label\": { \"type\": \"string\", \"minLength\": 1, \"maxLength\": 256 },\n \"description\": { \"type\": \"string\", \"maxLength\": 1024 }\n }\n },\n \"canvas_ready\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"id\", \"canvas_id\", \"canvas\", \"css_width\", \"css_height\", \"device_pixel_ratio\"],\n \"properties\": {\n \"type\": { \"const\": \"redevplugin.ui.canvas.ready\" },\n \"id\": { \"$ref\": \"#/$defs/request_id\" },\n \"canvas_id\": { \"$ref\": \"#/$defs/ui_identifier\" },\n \"canvas\": {\n \"description\": \"One transferred OffscreenCanvas. The runtime validates the structured-clone object outside JSON Schema.\"\n },\n \"css_width\": { \"type\": \"number\", \"exclusiveMinimum\": 0, \"maximum\": 4096 },\n \"css_height\": { \"type\": \"number\", \"exclusiveMinimum\": 0, \"maximum\": 4096 },\n \"device_pixel_ratio\": { \"type\": \"number\", \"minimum\": 0.5, \"maximum\": 4 }\n },\n \"x-redevplugin-transfer\": [\"canvas\"]\n },\n \"canvas_input\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"canvas_id\", \"event\"],\n \"properties\": {\n \"type\": { \"const\": \"redevplugin.ui.canvas.input\" },\n \"canvas_id\": { \"$ref\": \"#/$defs/ui_identifier\" },\n \"event\": {\n \"oneOf\": [\n {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\"],\n \"properties\": { \"type\": { \"enum\": [\"focus\", \"blur\"] } }\n },\n {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"css_width\", \"css_height\", \"device_pixel_ratio\"],\n \"properties\": {\n \"type\": { \"const\": \"resize\" },\n \"css_width\": { \"type\": \"number\", \"exclusiveMinimum\": 0, \"maximum\": 4096 },\n \"css_height\": { \"type\": \"number\", \"exclusiveMinimum\": 0, \"maximum\": 4096 },\n \"device_pixel_ratio\": { \"type\": \"number\", \"minimum\": 0.5, \"maximum\": 4 }\n }\n },\n {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"event\", \"code\", \"key\", \"repeat\", \"alt_key\", \"ctrl_key\", \"meta_key\", \"shift_key\"],\n \"properties\": {\n \"type\": { \"const\": \"key\" },\n \"event\": { \"enum\": [\"keydown\", \"keyup\"] },\n \"code\": { \"type\": \"string\", \"maxLength\": 64 },\n \"key\": { \"type\": \"string\", \"maxLength\": 64 },\n \"repeat\": { \"type\": \"boolean\" },\n \"alt_key\": { \"type\": \"boolean\" },\n \"ctrl_key\": { \"type\": \"boolean\" },\n \"meta_key\": { \"type\": \"boolean\" },\n \"shift_key\": { \"type\": \"boolean\" }\n }\n },\n {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"event\", \"pointer_id\", \"pointer_type\", \"buttons\", \"button\", \"x\", \"y\", \"pressure\"],\n \"properties\": {\n \"type\": { \"const\": \"pointer\" },\n \"event\": { \"enum\": [\"pointerdown\", \"pointermove\", \"pointerup\", \"pointercancel\"] },\n \"pointer_id\": { \"type\": \"integer\", \"minimum\": 0 },\n \"pointer_type\": { \"enum\": [\"mouse\", \"pen\", \"touch\", \"unknown\"] },\n \"buttons\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 31 },\n \"button\": { \"type\": \"integer\", \"minimum\": -1, \"maximum\": 4 },\n \"x\": { \"type\": \"number\", \"minimum\": -16384, \"maximum\": 32768 },\n \"y\": { \"type\": \"number\", \"minimum\": -16384, \"maximum\": 32768 },\n \"pressure\": { \"type\": \"number\", \"minimum\": 0, \"maximum\": 1 }\n }\n }\n ]\n }\n }\n },\n \"image_open\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"id\", \"asset_id\"],\n \"properties\": {\n \"type\": { \"const\": \"redevplugin.ui.asset.image.open\" },\n \"id\": { \"$ref\": \"#/$defs/request_id\" },\n \"asset_id\": { \"$ref\": \"#/$defs/ui_identifier\" }\n }\n },\n \"image_ready\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"id\", \"asset_id\", \"image\", \"width\", \"height\"],\n \"properties\": {\n \"type\": { \"const\": \"redevplugin.ui.asset.image.ready\" },\n \"id\": { \"$ref\": \"#/$defs/request_id\" },\n \"asset_id\": { \"$ref\": \"#/$defs/ui_identifier\" },\n \"image\": {\n \"description\": \"One transferred ImageBitmap decoded from Host-verified package bytes.\"\n },\n \"width\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 4096 },\n \"height\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 4096 }\n },\n \"x-redevplugin-transfer\": [\"image\"]\n },\n \"ui_identifier\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 128,\n \"pattern\": \"^[A-Za-z0-9][A-Za-z0-9._:-]*$\"\n },\n \"element_identifier\": {\n \"$ref\": \"#/$defs/ui_identifier\"\n },\n \"text_identifier\": {\n \"$ref\": \"#/$defs/ui_identifier\"\n },\n \"action\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"action\", \"event\", \"target_key\", \"edit_revision\", \"is_composing\"],\n \"properties\": {\n \"type\": { \"const\": \"redevplugin.ui.action\" },\n \"action\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 128,\n \"pattern\": \"^[A-Za-z0-9._:-]+$\"\n },\n \"event\": { \"enum\": [\"click\", \"input\", \"change\", \"submit\", \"escape\"] },\n \"target_key\": { \"$ref\": \"#/$defs/ui_identifier\" },\n \"edit_revision\": { \"type\": \"integer\", \"minimum\": 0 },\n \"is_composing\": { \"type\": \"boolean\" },\n \"value\": { \"type\": \"string\", \"maxLength\": 65536 },\n \"checked\": { \"type\": \"boolean\" },\n \"form_data\": {\n \"type\": \"object\",\n \"maxProperties\": 128,\n \"additionalProperties\": { \"type\": \"string\", \"maxLength\": 65536 }\n }\n }\n },\n \"response\": {\n \"oneOf\": [\n {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"id\", \"ok\"],\n \"properties\": {\n \"type\": { \"const\": \"redevplugin.bridge.response\" },\n \"id\": { \"$ref\": \"#/$defs/request_id\" },\n \"ok\": { \"const\": true },\n \"data\": true\n }\n },\n {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"id\", \"ok\", \"error_code\", \"error\"],\n \"properties\": {\n \"type\": { \"const\": \"redevplugin.bridge.response\" },\n \"id\": { \"$ref\": \"#/$defs/request_id\" },\n \"ok\": { \"const\": false },\n \"error_code\": {\n \"enum\": [\n \"PLUGIN_INVALID_REQUEST\",\n \"PLUGIN_MANIFEST_INVALID\",\n \"PLUGIN_PACKAGE_INVALID\",\n \"PLUGIN_PACKAGE_TOO_LARGE\",\n \"PLUGIN_PACKAGE_PATH_FORBIDDEN\",\n \"PLUGIN_SIGNATURE_INVALID\",\n \"PLUGIN_TRUST_STATE_DENIED\",\n \"PLUGIN_TRUST_VERIFICATION_REQUIRED\",\n \"PLUGIN_TRUST_VERIFICATION_INVALID\",\n \"PLUGIN_RELEASE_REF_VERIFICATION_FAILED\",\n \"PLUGIN_RELEASE_REF_POLICY_DENIED\",\n \"PLUGIN_RELEASE_NETWORK\",\n \"PLUGIN_RELEASE_TIMEOUT\",\n \"PLUGIN_RELEASE_ASSET_MISSING\",\n \"PLUGIN_RELEASE_ASSET_INTEGRITY\",\n \"PLUGIN_INSTALL_INTERRUPTED\",\n \"PLUGIN_INSTALL_STATE_CONFLICT\",\n \"PLUGIN_INTERNAL_FAILURE\",\n \"PLUGIN_DISABLED\",\n \"PLUGIN_DISABLED_BY_POLICY\",\n \"PLUGIN_PERMISSION_DENIED\",\n \"PLUGIN_ORIGIN_DENIED\",\n \"PLUGIN_ACTION_DENIED\",\n \"PLUGIN_OWNER_SCOPE_MISMATCH\",\n \"PLUGIN_SECRET_SCOPE_MISMATCH\",\n \"PLUGIN_STORAGE_SCOPE_MISMATCH\",\n \"PLUGIN_ADAPTER_FAILURE\",\n \"PLUGIN_SESSION_REVOKED\",\n \"PLUGIN_SESSION_TEARDOWN_INCOMPLETE\",\n \"PLUGIN_SESSION_FENCE_CAPACITY\",\n \"PLUGIN_CONFIRMATION_REQUIRED\",\n \"PLUGIN_CONFIRMATION_INVALID\",\n \"PLUGIN_TOKEN_EXPIRED\",\n \"PLUGIN_TOKEN_REPLAY\",\n \"PLUGIN_GATEWAY_TOKEN_INVALID\",\n \"PLUGIN_GATEWAY_TOKEN_REPLAYED\",\n \"PLUGIN_GATEWAY_TOKEN_CHANNEL_MISMATCH\",\n \"PLUGIN_ASSET_TICKET_INVALID\",\n \"PLUGIN_ASSET_SESSION_INVALID\",\n \"PLUGIN_STREAM_TICKET_INVALID\",\n \"PLUGIN_STREAM_DELIVERY_INVALID\",\n \"PLUGIN_STREAM_CANCELLED\",\n \"PLUGIN_LEASE_INVALID\",\n \"PLUGIN_LEASE_REPLAYED\",\n \"PLUGIN_GRANT_INVALID\",\n \"PLUGIN_STORAGE_QUOTA_EXCEEDED\",\n \"PLUGIN_OPERATION_BLOCKED\",\n \"PLUGIN_OPERATION_NOT_FOUND\",\n \"PLUGIN_OPERATION_NOT_CANCELABLE\",\n \"PLUGIN_OPERATION_RATE_LIMITED\",\n \"PLUGIN_NETWORK_TARGET_DENIED\",\n \"PLUGIN_NETWORK_RATE_LIMITED\",\n \"PLUGIN_RUNTIME_UNAVAILABLE\",\n \"PLUGIN_RUNTIME_VERSION_MISMATCH\",\n \"PLUGIN_RUNTIME_CONTRACT_MISMATCH\",\n \"PLUGIN_UI_PROTOCOL_UNSUPPORTED\",\n \"PLUGIN_UI_PROTOCOL_VIOLATION\",\n \"PLUGIN_SURFACE_QUIESCE_TIMEOUT\",\n \"PLUGIN_JSON_LIMIT_EXCEEDED\",\n \"PLUGIN_CAPABILITY_ERROR\",\n \"PLUGIN_WORKER_ERROR\",\n \"PLUGIN_CONTRACT_MISMATCH\",\n \"PLUGIN_MANAGEMENT_REVISION_MISMATCH\",\n \"PLUGIN_AUTHORIZATION_REVISION_MISMATCH\",\n \"PLUGIN_BINDING_REVISION_MISMATCH\",\n \"PLUGIN_VALUES_REVISION_MISMATCH\",\n \"PLUGIN_CSRF_REQUIRED\",\n \"PLUGIN_CSRF_INVALID\",\n \"PLUGIN_FEATURE_NOT_CONFIGURED\",\n \"PLUGIN_CONFIRMATION_REJECTED\",\n \"PLUGIN_BRIDGE_CANCELLED\",\n \"PLUGIN_BRIDGE_TIMEOUT\",\n \"PLUGIN_BRIDGE_DISPOSED\",\n \"PLUGIN_BRIDGE_HANDSHAKE_FAILED\",\n \"PLUGIN_BRIDGE_HANDSHAKE_REQUIRED\"\n ]\n },\n \"error\": { \"type\": \"string\", \"maxLength\": 4096 },\n \"error_details\": {\n \"type\": \"object\",\n \"maxProperties\": 8,\n \"additionalProperties\": true\n },\n \"mutation_outcome\": { \"type\": \"string\", \"enum\": [\"not_committed\", \"unknown\"] }\n },\n \"allOf\": [\n {\n \"if\": {\n \"properties\": { \"error_code\": { \"const\": \"PLUGIN_CAPABILITY_ERROR\" } },\n \"required\": [\"error_code\"]\n },\n \"then\": {\n \"required\": [\"error_details\"],\n \"properties\": {\n \"error_details\": { \"$ref\": \"#/$defs/capability_business_error_details\" }\n }\n }\n },\n {\n \"if\": {\n \"properties\": { \"error_code\": { \"const\": \"PLUGIN_WORKER_ERROR\" } },\n \"required\": [\"error_code\"]\n },\n \"then\": {\n \"required\": [\"error_details\"],\n \"properties\": {\n \"error_details\": { \"$ref\": \"#/$defs/worker_error_details\" }\n }\n }\n },\n {\n \"if\": {\n \"properties\": { \"error_code\": { \"const\": \"PLUGIN_OPERATION_RATE_LIMITED\" } },\n \"required\": [\"error_code\"]\n },\n \"then\": {\n \"required\": [\"error_details\"],\n \"properties\": {\n \"error_details\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"retry_after_ms\"],\n \"properties\": {\n \"retry_after_ms\": { \"type\": \"integer\", \"minimum\": 500, \"maximum\": 10000 }\n }\n }\n }\n }\n }\n ]\n }\n ]\n },\n \"lifecycle\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"event\"],\n \"properties\": {\n \"type\": { \"const\": \"redevplugin.bridge.lifecycle\" },\n \"quiesce_id\": { \"type\": \"string\", \"pattern\": \"^quiesce_[A-Za-z0-9_-]{8,151}$\" },\n \"event\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\"],\n \"properties\": {\n \"type\": { \"enum\": [\"ready\", \"visible\", \"hidden\", \"dispose\"] }\n }\n }\n },\n \"allOf\": [\n {\n \"if\": { \"required\": [\"quiesce_id\"] },\n \"then\": {\n \"properties\": {\n \"event\": {\n \"properties\": { \"type\": { \"const\": \"dispose\" } }\n }\n }\n }\n }\n ]\n },\n \"lifecycle_ack\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"quiesce_id\"],\n \"properties\": {\n \"type\": { \"const\": \"redevplugin.bridge.lifecycle_ack\" },\n \"quiesce_id\": { \"type\": \"string\", \"pattern\": \"^quiesce_[A-Za-z0-9_-]{8,151}$\" }\n }\n }\n }\n}\n".as_bytes();
204static CONTRACT_BODY_MANIFEST_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/manifest-v8.schema.json\",\n \"title\": \"ReDevPlugin manifest v8\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"schema_version\", \"publisher\", \"plugin\", \"presentation\", \"surfaces\"],\n \"properties\": {\n \"schema_version\": { \"const\": \"redevplugin.manifest.v8\" },\n \"publisher\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"publisher_id\"],\n \"properties\": {\n \"publisher_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"display_name\": { \"type\": \"string\" }\n }\n },\n \"plugin\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"plugin_id\", \"display_name\", \"version\", \"api_version\", \"min_runtime_version\", \"ui_protocol_version\"],\n \"properties\": {\n \"plugin_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"display_name\": { \"type\": \"string\", \"minLength\": 1 },\n \"version\": { \"$ref\": \"#/$defs/semver\" },\n \"api_version\": { \"const\": \"plugin-v1\" },\n \"min_runtime_version\": { \"$ref\": \"#/$defs/semver\" },\n \"ui_protocol_version\": { \"const\": \"plugin-ui-v7\" }\n }\n },\n \"presentation\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"default_locale\", \"summary\", \"description\", \"highlights\", \"keywords\", \"localizations\"],\n \"properties\": {\n \"default_locale\": { \"$ref\": \"#/$defs/locale\" },\n \"summary\": { \"$ref\": \"#/$defs/summary\" },\n \"description\": { \"$ref\": \"#/$defs/description\" },\n \"highlights\": { \"$ref\": \"#/$defs/highlights\" },\n \"keywords\": { \"$ref\": \"#/$defs/keywords\" },\n \"icon\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"path\"],\n \"properties\": {\n \"path\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"pattern\": \"^[A-Za-z0-9_][A-Za-z0-9_.-]*(?:/[A-Za-z0-9_][A-Za-z0-9_.-]*)*\\\\.(?:[Pp][Nn][Gg]|[Ww][Ee][Bb][Pp])$\"\n }\n }\n },\n \"localizations\": {\n \"type\": \"array\",\n \"maxItems\": 15,\n \"items\": { \"$ref\": \"#/$defs/localization\" }\n }\n }\n },\n \"surfaces\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"surface_id\", \"kind\", \"label\", \"entry\"],\n \"properties\": {\n \"surface_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"kind\": { \"enum\": [\"view\", \"command\", \"background\"] },\n \"intent\": { \"enum\": [\"primary\", \"secondary\", \"utility\"] },\n \"label\": { \"type\": \"string\", \"minLength\": 1 },\n \"entry\": { \"type\": \"string\", \"minLength\": 1 },\n \"icon\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"pattern\": \"^[A-Za-z0-9_][A-Za-z0-9_.-]*(?:/[A-Za-z0-9_][A-Za-z0-9_.-]*)*\\\\.(?:[Pp][Nn][Gg]|[Jj][Pp][Gg]|[Jj][Pp][Ee][Gg]|[Gg][Ii][Ff]|[Ww][Ee][Bb][Pp]|[Ii][Cc][Oo])$\"\n },\n \"default_size\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"width\", \"height\"],\n \"properties\": {\n \"width\": { \"type\": \"integer\", \"minimum\": 1 },\n \"height\": { \"type\": \"integer\", \"minimum\": 1 }\n }\n }\n }\n }\n },\n \"capability_bindings\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"binding_id\", \"contract\"],\n \"properties\": {\n \"binding_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"contract\": { \"$ref\": \"host-capability-pin-v1.schema.json\" }\n }\n }\n },\n \"methods\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"method\", \"route\"],\n \"properties\": {\n \"method\": { \"type\": \"string\", \"minLength\": 1 },\n \"effect\": { \"enum\": [\"read\", \"write\", \"delete\", \"execute\", \"admin\"] },\n \"execution\": { \"enum\": [\"sync\", \"operation\", \"subscription\"] },\n \"dangerous\": { \"type\": \"boolean\" },\n \"preflight_only\": { \"type\": \"boolean\" },\n \"broker_access\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"properties\": {\n \"storage\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"store_id\", \"operations\"],\n \"properties\": {\n \"store_id\": { \"type\": \"string\", \"minLength\": 1, \"maxLength\": 128 },\n \"operations\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"uniqueItems\": true,\n \"items\": { \"enum\": [\"read\", \"write\", \"delete\", \"list\", \"get\", \"put\", \"query\", \"exec\"] }\n }\n }\n }\n },\n \"network\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"connector_id\", \"transport\", \"operations\"],\n \"properties\": {\n \"connector_id\": { \"type\": \"string\", \"minLength\": 1, \"maxLength\": 128 },\n \"transport\": { \"enum\": [\"http\", \"websocket\", \"tcp\", \"udp\"] },\n \"operations\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"uniqueItems\": true,\n \"items\": { \"enum\": [\"http\", \"http_stream\", \"websocket_round_trip\", \"tcp_round_trip\", \"udp_round_trip\"] }\n },\n \"http_methods\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"uniqueItems\": true,\n \"items\": { \"enum\": [\"GET\", \"HEAD\", \"POST\", \"PUT\", \"PATCH\", \"DELETE\", \"OPTIONS\"] }\n }\n },\n \"allOf\": [\n {\n \"if\": { \"properties\": { \"transport\": { \"const\": \"http\" } }, \"required\": [\"transport\"] },\n \"then\": { \"required\": [\"http_methods\"] },\n \"else\": { \"not\": { \"required\": [\"http_methods\"] } }\n }\n ]\n }\n }\n }\n },\n \"route\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"kind\"],\n \"properties\": {\n \"kind\": { \"enum\": [\"capability\", \"worker\", \"core_action\"] },\n \"binding_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"target_method\": { \"type\": \"string\", \"minLength\": 1 },\n \"worker_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"action_id\": { \"type\": \"string\", \"minLength\": 1 }\n },\n \"allOf\": [\n {\n \"if\": { \"properties\": { \"kind\": { \"const\": \"capability\" } }, \"required\": [\"kind\"] },\n \"then\": {\n \"required\": [\"binding_id\", \"target_method\"],\n \"not\": {\n \"anyOf\": [\n { \"required\": [\"worker_id\"] },\n { \"required\": [\"action_id\"] }\n ]\n }\n }\n },\n {\n \"if\": { \"properties\": { \"kind\": { \"const\": \"worker\" } }, \"required\": [\"kind\"] },\n \"then\": {\n \"required\": [\"worker_id\"],\n \"not\": {\n \"anyOf\": [\n { \"required\": [\"binding_id\"] },\n { \"required\": [\"target_method\"] },\n { \"required\": [\"action_id\"] }\n ]\n }\n }\n },\n {\n \"if\": { \"properties\": { \"kind\": { \"const\": \"core_action\" } }, \"required\": [\"kind\"] },\n \"then\": {\n \"required\": [\"action_id\"],\n \"not\": {\n \"anyOf\": [\n { \"required\": [\"binding_id\"] },\n { \"required\": [\"target_method\"] },\n { \"required\": [\"worker_id\"] }\n ]\n }\n }\n }\n ]\n },\n \"confirmation\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"mode\"],\n \"properties\": {\n \"mode\": { \"enum\": [\"none\", \"required\", \"risk_based\"] },\n \"preflight_method\": { \"type\": [\"string\", \"null\"] },\n \"request_hash_fields\": { \"type\": \"array\", \"items\": { \"type\": \"string\" } },\n \"plan_hash_required\": { \"type\": \"boolean\" }\n }\n },\n \"cancel_policy\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"cancelable\"],\n \"properties\": {\n \"cancelable\": { \"type\": \"boolean\" },\n \"disable_behavior\": { \"enum\": [\"cancel\", \"orphan\", \"wait\"] },\n \"uninstall_behavior\": { \"enum\": [\"cancel_then_block_delete\", \"force_cleanup_allowed\"] },\n \"ack_timeout_ms\": { \"type\": \"integer\", \"minimum\": 0 }\n },\n \"allOf\": [\n {\n \"if\": { \"properties\": { \"cancelable\": { \"const\": true } }, \"required\": [\"cancelable\"] },\n \"then\": {\n \"required\": [\"ack_timeout_ms\"],\n \"properties\": { \"ack_timeout_ms\": { \"type\": \"integer\", \"minimum\": 1 } }\n }\n },\n {\n \"if\": { \"properties\": { \"cancelable\": { \"const\": false } }, \"required\": [\"cancelable\"] },\n \"then\": {\n \"properties\": { \"ack_timeout_ms\": { \"const\": 0 } }\n }\n }\n ]\n },\n \"request_schema\": {\n \"allOf\": [\n { \"$ref\": \"#/$defs/method_schema\" },\n {\n \"type\": \"object\",\n \"required\": [\"type\", \"additionalProperties\"],\n \"properties\": {\n \"type\": { \"const\": \"object\" },\n \"additionalProperties\": { \"const\": false }\n }\n }\n ]\n },\n \"response_schema\": {\n \"allOf\": [\n { \"$ref\": \"#/$defs/method_schema\" },\n {\n \"type\": \"object\",\n \"required\": [\"type\", \"additionalProperties\"],\n \"properties\": {\n \"type\": { \"const\": \"object\" },\n \"additionalProperties\": { \"const\": false }\n }\n }\n ]\n }\n },\n \"allOf\": [\n {\n \"if\": { \"properties\": { \"dangerous\": { \"const\": true } }, \"required\": [\"dangerous\"] },\n \"then\": {\n \"required\": [\"confirmation\"],\n \"properties\": {\n \"confirmation\": {\n \"properties\": {\n \"mode\": { \"enum\": [\"required\", \"risk_based\"] }\n }\n }\n }\n }\n },\n {\n \"if\": {\n \"properties\": {\n \"route\": {\n \"properties\": { \"kind\": { \"const\": \"capability\" } },\n \"required\": [\"kind\"]\n }\n },\n \"required\": [\"route\"]\n },\n \"then\": {\n \"not\": {\n \"anyOf\": [\n { \"required\": [\"effect\"] },\n { \"required\": [\"execution\"] },\n { \"required\": [\"dangerous\"] },\n { \"required\": [\"preflight_only\"] },\n { \"required\": [\"confirmation\"] },\n { \"required\": [\"cancel_policy\"] },\n { \"required\": [\"request_schema\"] },\n { \"required\": [\"response_schema\"] },\n { \"required\": [\"broker_access\"] }\n ]\n }\n },\n \"else\": {\n \"required\": [\"effect\", \"execution\", \"request_schema\", \"response_schema\"]\n }\n },\n {\n \"if\": { \"properties\": { \"preflight_only\": { \"const\": true } }, \"required\": [\"preflight_only\"] },\n \"then\": {\n \"properties\": {\n \"effect\": { \"const\": \"read\" },\n \"execution\": { \"const\": \"sync\" },\n \"dangerous\": { \"const\": false }\n }\n }\n },\n {\n \"if\": { \"properties\": { \"execution\": { \"enum\": [\"operation\", \"subscription\"] } }, \"required\": [\"execution\"] },\n \"then\": { \"required\": [\"cancel_policy\"] }\n }\n ]\n }\n },\n \"workers\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"worker_id\", \"artifact\", \"abi\", \"mode\", \"scope\", \"memory_limit_bytes\"],\n \"properties\": {\n \"worker_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"artifact\": { \"type\": \"string\", \"minLength\": 1 },\n \"abi\": { \"const\": \"redevplugin-wasm-worker-v2\" },\n \"mode\": { \"const\": \"job\" },\n \"scope\": { \"enum\": [\"user\", \"environment\"] },\n \"memory_limit_bytes\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 268435456 },\n \"idle_timeout_ms\": { \"type\": \"integer\", \"minimum\": 0 }\n }\n }\n },\n \"storage\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"properties\": {\n \"stores\": {\n \"type\": \"array\",\n \"maxItems\": 16,\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"store_id\", \"kind\", \"scope\", \"quota_bytes\", \"schema_version\"],\n \"properties\": {\n \"store_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"kind\": { \"enum\": [\"kv\", \"files\", \"sqlite\"] },\n \"scope\": { \"enum\": [\"user\", \"environment\"] },\n \"quota_bytes\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 1073741824 },\n \"quota_files\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 100000 },\n \"schema_version\": { \"type\": \"integer\", \"minimum\": 1 }\n }\n }\n }\n }\n },\n \"network_access\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"properties\": {\n \"connectors\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"connector_id\", \"transport\", \"scope\", \"destinations\"],\n \"properties\": {\n \"connector_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"transport\": { \"enum\": [\"http\", \"websocket\", \"tcp\", \"udp\"] },\n \"scope\": { \"enum\": [\"user\", \"environment\"] },\n \"destinations\": { \"type\": \"array\", \"items\": { \"type\": \"string\", \"minLength\": 1 } },\n \"auth\": { \"type\": \"object\" },\n \"tls\": { \"type\": \"object\" }\n }\n }\n }\n }\n },\n \"settings\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"schema_version\"],\n \"properties\": {\n \"schema_version\": { \"type\": \"integer\", \"minimum\": 1 },\n \"fields\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"key\", \"type\", \"scope\", \"label\"],\n \"properties\": {\n \"key\": { \"type\": \"string\", \"minLength\": 1 },\n \"type\": { \"type\": \"string\", \"minLength\": 1 },\n \"scope\": { \"enum\": [\"user\", \"environment\"] },\n \"label\": { \"type\": \"string\", \"minLength\": 1 },\n \"default\": true,\n \"secret_ref\": { \"type\": \"string\" },\n \"options\": {\n \"type\": \"array\",\n \"items\": { \"$ref\": \"#/$defs/setting_option\" }\n },\n \"validation\": { \"type\": \"object\" }\n }\n }\n }\n }\n },\n \"intents\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"intent_id\", \"method\"],\n \"properties\": {\n \"intent_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"method\": { \"type\": \"string\", \"minLength\": 1 },\n \"payload_schema\": { \"type\": \"object\" }\n }\n }\n }\n },\n \"$defs\": {\n \"locale\": {\n \"type\": \"string\",\n \"minLength\": 2,\n \"maxLength\": 64,\n \"pattern\": \"^[A-Za-z]{2,8}(?:-[A-Za-z0-9]{1,8})*$\"\n },\n \"summary\": { \"type\": \"string\", \"minLength\": 1, \"maxLength\": 240 },\n \"description\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"maxItems\": 12,\n \"items\": { \"type\": \"string\", \"minLength\": 1, \"maxLength\": 1000 }\n },\n \"highlights\": {\n \"type\": \"array\",\n \"maxItems\": 8,\n \"items\": { \"type\": \"string\", \"minLength\": 1, \"maxLength\": 240 }\n },\n \"keywords\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"maxItems\": 12,\n \"items\": { \"type\": \"string\", \"minLength\": 1, \"maxLength\": 64 }\n },\n \"setting_option\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"value\", \"label\"],\n \"properties\": {\n \"value\": { \"type\": \"string\", \"minLength\": 1, \"maxLength\": 128 },\n \"label\": { \"type\": \"string\", \"minLength\": 1, \"maxLength\": 128 }\n }\n },\n \"localized_surface\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"surface_id\", \"label\"],\n \"properties\": {\n \"surface_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"label\": { \"type\": \"string\", \"minLength\": 1, \"maxLength\": 128 }\n }\n },\n \"localized_setting\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"key\", \"label\", \"options\"],\n \"properties\": {\n \"key\": { \"type\": \"string\", \"minLength\": 1 },\n \"label\": { \"type\": \"string\", \"minLength\": 1, \"maxLength\": 128 },\n \"options\": { \"type\": \"array\", \"items\": { \"$ref\": \"#/$defs/setting_option\" } }\n }\n },\n \"localization\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"locale\", \"plugin_name\", \"summary\", \"description\", \"highlights\", \"keywords\", \"surfaces\", \"settings\"],\n \"properties\": {\n \"locale\": { \"$ref\": \"#/$defs/locale\" },\n \"plugin_name\": { \"type\": \"string\", \"minLength\": 1, \"maxLength\": 128 },\n \"publisher_name\": { \"type\": \"string\", \"minLength\": 1, \"maxLength\": 128 },\n \"summary\": { \"$ref\": \"#/$defs/summary\" },\n \"description\": { \"$ref\": \"#/$defs/description\" },\n \"highlights\": { \"$ref\": \"#/$defs/highlights\" },\n \"keywords\": { \"$ref\": \"#/$defs/keywords\" },\n \"surfaces\": { \"type\": \"array\", \"items\": { \"$ref\": \"#/$defs/localized_surface\" } },\n \"settings\": { \"type\": \"array\", \"items\": { \"$ref\": \"#/$defs/localized_setting\" } }\n }\n },\n \"semver\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)(?:-(?:(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*)(?:\\\\.(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*))*))?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"method_schema\": {\n \"oneOf\": [\n { \"const\": false },\n {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"properties\": {\n \"$comment\": { \"type\": \"string\" },\n \"title\": { \"type\": \"string\" },\n \"description\": { \"type\": \"string\" },\n \"readOnly\": { \"type\": \"boolean\" },\n \"writeOnly\": { \"type\": \"boolean\" },\n \"$ref\": { \"type\": \"string\", \"pattern\": \"^#/\\\\$defs/[A-Za-z0-9._-]+$\" },\n \"$defs\": {\n \"type\": \"object\",\n \"additionalProperties\": { \"$ref\": \"#/$defs/method_schema\" }\n },\n \"type\": {\n \"oneOf\": [\n { \"enum\": [\"null\", \"boolean\", \"object\", \"array\", \"number\", \"integer\", \"string\"] },\n {\n \"type\": \"array\",\n \"minItems\": 1,\n \"uniqueItems\": true,\n \"items\": { \"enum\": [\"null\", \"boolean\", \"object\", \"array\", \"number\", \"integer\", \"string\"] }\n }\n ]\n },\n \"properties\": {\n \"type\": \"object\",\n \"additionalProperties\": { \"$ref\": \"#/$defs/method_schema\" }\n },\n \"patternProperties\": {\n \"type\": \"object\",\n \"additionalProperties\": { \"$ref\": \"#/$defs/method_schema\" }\n },\n \"required\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": { \"type\": \"string\" }\n },\n \"additionalProperties\": { \"const\": false },\n \"items\": { \"$ref\": \"#/$defs/method_schema\" },\n \"allOf\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"items\": { \"$ref\": \"#/$defs/method_schema\" }\n },\n \"anyOf\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"items\": { \"$ref\": \"#/$defs/method_schema\" }\n },\n \"oneOf\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"items\": { \"$ref\": \"#/$defs/method_schema\" }\n },\n \"enum\": { \"type\": \"array\", \"minItems\": 1, \"uniqueItems\": true },\n \"const\": true,\n \"default\": true,\n \"examples\": { \"type\": \"array\" },\n \"minimum\": { \"type\": \"number\" },\n \"maximum\": { \"type\": \"number\" },\n \"exclusiveMinimum\": { \"type\": \"number\" },\n \"exclusiveMaximum\": { \"type\": \"number\" },\n \"multipleOf\": { \"type\": \"number\", \"exclusiveMinimum\": 0 },\n \"minLength\": { \"type\": \"integer\", \"minimum\": 0 },\n \"maxLength\": { \"type\": \"integer\", \"minimum\": 0 },\n \"pattern\": { \"type\": \"string\" },\n \"format\": { \"type\": \"string\" },\n \"minItems\": { \"type\": \"integer\", \"minimum\": 0 },\n \"maxItems\": { \"type\": \"integer\", \"minimum\": 0 },\n \"uniqueItems\": { \"type\": \"boolean\" },\n \"minProperties\": { \"type\": \"integer\", \"minimum\": 0 },\n \"maxProperties\": { \"type\": \"integer\", \"minimum\": 0 }\n },\n \"anyOf\": [\n { \"required\": [\"type\"] },\n { \"required\": [\"$ref\"] },\n { \"required\": [\"properties\"] },\n { \"required\": [\"patternProperties\"] },\n { \"required\": [\"required\"] },\n { \"required\": [\"additionalProperties\"] },\n { \"required\": [\"minProperties\"] },\n { \"required\": [\"maxProperties\"] },\n { \"required\": [\"allOf\"] },\n { \"required\": [\"anyOf\"] },\n { \"required\": [\"oneOf\"] },\n { \"required\": [\"enum\"] },\n { \"required\": [\"const\"] }\n ],\n \"allOf\": [\n {\n \"if\": {\n \"required\": [\"type\"],\n \"properties\": {\n \"type\": {\n \"anyOf\": [\n { \"const\": \"object\" },\n { \"type\": \"array\", \"contains\": { \"const\": \"object\" } }\n ]\n }\n }\n },\n \"then\": {\n \"required\": [\"additionalProperties\"],\n \"properties\": { \"additionalProperties\": { \"const\": false } }\n }\n },\n {\n \"if\": {\n \"anyOf\": [\n { \"required\": [\"properties\"] },\n { \"required\": [\"patternProperties\"] },\n { \"required\": [\"required\"] },\n { \"required\": [\"additionalProperties\"] },\n { \"required\": [\"minProperties\"] },\n { \"required\": [\"maxProperties\"] }\n ]\n },\n \"then\": {\n \"required\": [\"additionalProperties\"],\n \"properties\": { \"additionalProperties\": { \"const\": false } }\n }\n }\n ]\n }\n ]\n }\n }\n}\n".as_bytes();
205static CONTRACT_BODY_NETWORK_GRANT_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/network-grant-v2.schema.json\",\n \"title\": \"ReDevPlugin network grant v2\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"grant_id\",\n \"plugin_instance_id\",\n \"active_fingerprint\",\n \"resource_scope\",\n \"policy_revision\",\n \"management_revision\",\n \"revoke_epoch\",\n \"connector_id\",\n \"transport\",\n \"destination\",\n \"target_classifier_version\",\n \"expires_at\"\n ],\n \"properties\": {\n \"grant_id\": { \"type\": \"string\", \"pattern\": \"^netgrant_[0-9a-f]{32}$\" },\n \"plugin_instance_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"active_fingerprint\": { \"type\": \"string\", \"minLength\": 1 },\n \"resource_scope\": { \"$ref\": \"#/$defs/resource_scope\" },\n \"policy_revision\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 9007199254740991 },\n \"management_revision\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 9007199254740991 },\n \"revoke_epoch\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 9007199254740991 },\n \"connector_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"transport\": { \"enum\": [\"http\", \"websocket\", \"tcp\", \"udp\"] },\n \"destination\": { \"$ref\": \"#/$defs/destination\" },\n \"runtime_generation_id\": { \"type\": \"string\" },\n \"target_classifier_version\": { \"const\": \"target-classifier-v2\" },\n \"expires_at\": { \"type\": \"string\", \"format\": \"date-time\" }\n },\n \"$defs\": {\n \"resource_scope\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"kind\", \"owner_env_hash\"],\n \"properties\": {\n \"kind\": { \"enum\": [\"user\", \"environment\"] },\n \"owner_env_hash\": { \"type\": \"string\", \"pattern\": \"^[A-Za-z0-9][A-Za-z0-9._:-]{0,255}$\" },\n \"owner_user_hash\": { \"type\": \"string\", \"pattern\": \"^[A-Za-z0-9][A-Za-z0-9._:-]{0,255}$\" }\n },\n \"oneOf\": [\n { \"properties\": { \"kind\": { \"const\": \"user\" } }, \"required\": [\"owner_user_hash\"] },\n { \"properties\": { \"kind\": { \"const\": \"environment\" } }, \"not\": { \"required\": [\"owner_user_hash\"] } }\n ]\n },\n \"destination\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"transport\", \"host\", \"port\"],\n \"properties\": {\n \"transport\": { \"enum\": [\"http\", \"websocket\", \"tcp\", \"udp\"] },\n \"scheme\": { \"enum\": [\"http\", \"https\", \"ws\", \"wss\"] },\n \"host\": { \"type\": \"string\", \"minLength\": 1 },\n \"port\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 65535 }\n }\n }\n }\n}\n".as_bytes();
206static CONTRACT_BODY_OPAQUE_SURFACE_DOCUMENT_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/opaque-surface-document-v3.schema.json\",\n \"title\": \"ReDevPlugin opaque surface document v3\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"schema_version\",\n \"entry_path\",\n \"entry_sha256\",\n \"body_html\",\n \"styles\",\n \"worker\",\n \"assets\",\n \"critical_bytes\"\n ],\n \"properties\": {\n \"schema_version\": { \"const\": \"redevplugin.opaque_surface_document.v3\" },\n \"entry_path\": { \"$ref\": \"#/$defs/package_path\" },\n \"entry_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"title\": { \"type\": \"string\", \"maxLength\": 256 },\n \"language\": { \"type\": \"string\", \"maxLength\": 64 },\n \"direction\": { \"enum\": [\"ltr\", \"rtl\", \"auto\"] },\n \"body_html\": { \"type\": \"string\", \"maxLength\": 4194304 },\n \"styles\": {\n \"type\": \"array\",\n \"items\": { \"$ref\": \"#/$defs/style\" }\n },\n \"worker\": { \"$ref\": \"#/$defs/worker\" },\n \"assets\": {\n \"type\": \"array\",\n \"maxItems\": 128,\n \"items\": { \"$ref\": \"#/$defs/asset\" }\n },\n \"critical_bytes\": {\n \"type\": \"integer\",\n \"minimum\": 0,\n \"maximum\": 8388608\n }\n },\n \"$defs\": {\n \"sha256\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[a-f0-9]{64}$\"\n },\n \"package_path\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 512,\n \"pattern\": \"^.+$\",\n \"not\": {\n \"anyOf\": [\n { \"pattern\": \"^/\" },\n { \"pattern\": \"\\\\\\\\\" },\n { \"pattern\": \"(^|/)\\\\.\\\\.?(/|$)\" }\n ]\n }\n },\n \"style\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"path\", \"sha256\", \"content\"],\n \"properties\": {\n \"path\": { \"$ref\": \"#/$defs/package_path\" },\n \"sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"content\": { \"type\": \"string\", \"maxLength\": 2097152 }\n }\n },\n \"worker\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"path\", \"sha256\", \"type\", \"content\"],\n \"properties\": {\n \"path\": { \"$ref\": \"#/$defs/package_path\" },\n \"sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"type\": { \"const\": \"classic\" },\n \"content\": { \"type\": \"string\", \"maxLength\": 4194304 }\n }\n },\n \"asset\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"binding_id\", \"logical_ids\", \"path\", \"sha256\", \"size\", \"content_type\"],\n \"properties\": {\n \"binding_id\": {\n \"type\": \"string\",\n \"pattern\": \"^asset_[A-Za-z0-9_-]{8,154}$\"\n },\n \"logical_ids\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"maxItems\": 16,\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 128,\n \"pattern\": \"^[A-Za-z0-9][A-Za-z0-9._:-]*$\"\n }\n },\n \"path\": { \"$ref\": \"#/$defs/package_path\" },\n \"sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"size\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 33554432 },\n \"content_type\": { \"type\": \"string\", \"minLength\": 1, \"maxLength\": 256 }\n }\n }\n }\n}\n".as_bytes();
207static CONTRACT_BODY_OPAQUE_SURFACE_TRANSPORT_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/opaque-surface-transport-v6.schema.json\",\n \"title\": \"ReDevPlugin private opaque surface transport v6\",\n \"description\": \"Private messages between the trusted parent, trusted renderer, and isolated plugin worker. MessagePort transfer is represented by the envelope; transferable ports are not JSON values.\",\n \"oneOf\": [\n { \"$ref\": \"#/$defs/port_envelope\" },\n { \"$ref\": \"#/$defs/port_ack\" },\n { \"$ref\": \"#/$defs/initialize\" },\n { \"$ref\": \"#/$defs/context\" },\n { \"$ref\": \"#/$defs/first_paint\" },\n { \"$ref\": \"#/$defs/first_commit\" },\n { \"$ref\": \"#/$defs/worker_ready\" },\n { \"$ref\": \"#/$defs/surface_error\" },\n { \"$ref\": \"#/$defs/interaction\" },\n { \"$ref\": \"#/$defs/asset_read\" },\n { \"$ref\": \"#/$defs/asset_response\" },\n { \"$ref\": \"#/$defs/worker_initialize\" }\n ],\n \"$defs\": {\n \"opaque_handle\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9_-]{7,159}$\"\n },\n \"sha256\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[a-f0-9]{64}$\"\n },\n \"port_envelope\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"frame_generation_id\", \"ui_protocol_version\"],\n \"properties\": {\n \"type\": { \"const\": \"redevplugin.surface.port\" },\n \"frame_generation_id\": { \"$ref\": \"#/$defs/opaque_handle\" },\n \"ui_protocol_version\": { \"const\": \"plugin-ui-v7\" }\n }\n },\n \"port_ack\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"frame_generation_id\"],\n \"properties\": {\n \"type\": { \"const\": \"redevplugin.surface.port_ack\" },\n \"frame_generation_id\": { \"$ref\": \"#/$defs/opaque_handle\" }\n }\n },\n \"initialize\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"frame_generation_id\", \"surface_handle\", \"document\"],\n \"properties\": {\n \"type\": { \"const\": \"redevplugin.surface.initialize\" },\n \"frame_generation_id\": { \"$ref\": \"#/$defs/opaque_handle\" },\n \"surface_handle\": { \"$ref\": \"#/$defs/opaque_handle\" },\n \"document\": {\n \"$ref\": \"https://schemas.redevplugin.dev/plugin/opaque-surface-document-v3.schema.json\"\n },\n \"context\": { \"$ref\": \"#/$defs/context_snapshot\" }\n }\n },\n \"context\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"frame_generation_id\", \"surface_handle\", \"context\"],\n \"properties\": {\n \"type\": { \"const\": \"redevplugin.surface.context\" },\n \"frame_generation_id\": { \"$ref\": \"#/$defs/opaque_handle\" },\n \"surface_handle\": { \"$ref\": \"#/$defs/opaque_handle\" },\n \"context\": { \"$ref\": \"#/$defs/context_snapshot\" }\n }\n },\n \"context_snapshot\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"schema_version\", \"revision\", \"appearance\", \"locale\"],\n \"properties\": {\n \"schema_version\": { \"const\": \"redevplugin.surface_context.v1\" },\n \"revision\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 9007199254740991 },\n \"appearance\": {\n \"type\": \"object\", \"additionalProperties\": false, \"required\": [\"color_scheme\", \"colors\"],\n \"properties\": {\n \"color_scheme\": { \"enum\": [\"light\", \"dark\"] },\n \"colors\": {\n \"type\": \"object\", \"additionalProperties\": false,\n \"required\": [\"canvas\", \"surface\", \"surface_elevated\", \"text\", \"text_muted\", \"border\", \"accent\", \"accent_text\", \"success\", \"warning\", \"danger\", \"focus\"],\n \"properties\": {\n \"canvas\": { \"$ref\": \"#/$defs/color\" }, \"surface\": { \"$ref\": \"#/$defs/color\" }, \"surface_elevated\": { \"$ref\": \"#/$defs/color\" },\n \"text\": { \"$ref\": \"#/$defs/color\" }, \"text_muted\": { \"$ref\": \"#/$defs/color\" }, \"border\": { \"$ref\": \"#/$defs/color\" },\n \"accent\": { \"$ref\": \"#/$defs/color\" }, \"accent_text\": { \"$ref\": \"#/$defs/color\" }, \"success\": { \"$ref\": \"#/$defs/color\" },\n \"warning\": { \"$ref\": \"#/$defs/color\" }, \"danger\": { \"$ref\": \"#/$defs/color\" }, \"focus\": { \"$ref\": \"#/$defs/color\" }\n }\n }\n }\n },\n \"locale\": {\n \"type\": \"object\", \"additionalProperties\": false, \"required\": [\"language_tag\", \"direction\"],\n \"properties\": { \"language_tag\": { \"type\": \"string\", \"minLength\": 2, \"maxLength\": 64 }, \"direction\": { \"enum\": [\"ltr\", \"rtl\"] } }\n }\n }\n },\n \"color\": { \"type\": \"string\", \"pattern\": \"^#[0-9a-fA-F]{6}(?:[0-9a-fA-F]{2})?$\" },\n \"first_paint\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\"],\n \"properties\": { \"type\": { \"const\": \"redevplugin.surface.first_paint\" } }\n },\n \"first_commit\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\"],\n \"properties\": { \"type\": { \"const\": \"redevplugin.surface.first_commit\" } }\n },\n \"worker_ready\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\"],\n \"properties\": { \"type\": { \"const\": \"redevplugin.surface.worker_ready\" } }\n },\n \"surface_error\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"error\"],\n \"properties\": {\n \"type\": { \"const\": \"redevplugin.surface.error\" },\n \"error\": { \"type\": \"string\", \"maxLength\": 512 }\n }\n },\n \"interaction\": {\n \"description\": \"Port-bound host UI ownership observation. action and target_key are plugin-controlled semantic metadata and MUST NOT be used for permission, route authorization, or privilege decisions.\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"frame_generation_id\", \"surface_handle\", \"sequence\", \"kind\", \"target_key\", \"action\", \"local_scroll\", \"selection_active\"],\n \"properties\": {\n \"type\": { \"const\": \"redevplugin.surface.interaction\" },\n \"frame_generation_id\": { \"$ref\": \"#/$defs/opaque_handle\" },\n \"surface_handle\": { \"$ref\": \"#/$defs/opaque_handle\" },\n \"sequence\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 9007199254740991 },\n \"kind\": { \"type\": \"string\", \"enum\": [\"activation\", \"focus\", \"wheel\", \"text-selection\", \"action\"] },\n \"target_key\": { \"type\": [\"string\", \"null\"], \"pattern\": \"^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$\" },\n \"action\": { \"type\": [\"string\", \"null\"], \"pattern\": \"^[-A-Za-z0-9._:]{1,128}$\" },\n \"local_scroll\": { \"type\": \"boolean\" },\n \"selection_active\": { \"type\": \"boolean\" }\n },\n \"allOf\": [\n {\n \"if\": { \"properties\": { \"kind\": { \"const\": \"action\" } }, \"required\": [\"kind\"] },\n \"then\": { \"properties\": { \"action\": { \"type\": \"string\" } } },\n \"else\": { \"properties\": { \"action\": { \"const\": null } } }\n },\n {\n \"if\": { \"properties\": { \"kind\": { \"const\": \"wheel\" } }, \"required\": [\"kind\"] },\n \"else\": { \"properties\": { \"local_scroll\": { \"const\": false } } }\n },\n {\n \"if\": { \"properties\": { \"kind\": { \"const\": \"text-selection\" } }, \"required\": [\"kind\"] },\n \"else\": { \"properties\": { \"selection_active\": { \"const\": false } } }\n }\n ]\n },\n \"asset_read\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"request_id\", \"binding_id\", \"path\", \"sha256\"],\n \"properties\": {\n \"type\": { \"const\": \"redevplugin.surface.asset.read\" },\n \"request_id\": { \"$ref\": \"#/$defs/opaque_handle\" },\n \"binding_id\": { \"$ref\": \"#/$defs/opaque_handle\" },\n \"path\": { \"type\": \"string\", \"minLength\": 1, \"maxLength\": 512 },\n \"sha256\": { \"$ref\": \"#/$defs/sha256\" }\n }\n },\n \"asset_response\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"request_id\", \"binding_id\", \"ok\", \"path\", \"sha256\", \"content_type\", \"content_base64\"],\n \"properties\": {\n \"type\": { \"const\": \"redevplugin.surface.asset.response\" },\n \"request_id\": { \"$ref\": \"#/$defs/opaque_handle\" },\n \"binding_id\": { \"$ref\": \"#/$defs/opaque_handle\" },\n \"ok\": { \"const\": true },\n \"path\": { \"type\": \"string\", \"minLength\": 1, \"maxLength\": 512 },\n \"sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"content_type\": { \"type\": \"string\", \"minLength\": 1, \"maxLength\": 256 },\n \"content_base64\": { \"type\": \"string\", \"contentEncoding\": \"base64\" }\n }\n },\n \"worker_initialize\": {\n \"description\": \"Transferred ports are ordered as runtime_control then plugin_bridge; only plugin_bridge is exposed through the worker SDK claim.\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"surface_handle\", \"ui_protocol_version\", \"port_roles\"],\n \"properties\": {\n \"type\": { \"const\": \"redevplugin.worker.initialize\" },\n \"surface_handle\": { \"$ref\": \"#/$defs/opaque_handle\" },\n \"ui_protocol_version\": { \"const\": \"plugin-ui-v7\" },\n \"port_roles\": {\n \"type\": \"array\",\n \"prefixItems\": [\n { \"const\": \"runtime_control\" },\n { \"const\": \"plugin_bridge\" }\n ],\n \"minItems\": 2,\n \"maxItems\": 2\n }\n }\n }\n }\n}\n".as_bytes();
208static CONTRACT_BODY_OWNER_SCOPE_INVENTORY_REGISTRY: &[u8] = "{\n \"schema_version\": \"owner-scope-inventory-v1\",\n \"inventories\": [\n {\n \"id\": \"redeven-redevplugin-v0.1.0-v0.1.5-layout-v1\",\n \"platform_versions\": [\n \"0.1.0\",\n \"0.1.1\",\n \"0.1.2\",\n \"0.1.3\",\n \"0.1.4\",\n \"0.1.5\"\n ],\n \"root_entries\": [\n {\n \"path\": \"assets\",\n \"kind\": \"directory\",\n \"scope\": \"durable\",\n \"disposition\": \"quarantine\",\n \"required\": true\n },\n {\n \"path\": \"db\",\n \"kind\": \"directory\",\n \"scope\": \"durable\",\n \"disposition\": \"quarantine\",\n \"required\": true\n },\n {\n \"path\": \"storage\",\n \"kind\": \"directory\",\n \"scope\": \"durable\",\n \"disposition\": \"quarantine\",\n \"required\": true\n },\n {\n \"path\": \"trust\",\n \"kind\": \"directory\",\n \"scope\": \"durable\",\n \"disposition\": \"quarantine\",\n \"required\": false\n }\n ],\n \"sqlite_databases\": [\n {\n \"path\": \"db/browser_site.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_browser_site_schema_migrations\",\n \"versions\": [\n 1\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_browser_site_plugin_instance\",\n \"table_name\": \"plugin_browser_site_origins\",\n \"sql\": \"CREATE INDEX idx_plugin_browser_site_plugin_instance ON plugin_browser_site_origins(plugin_instance_id, state, origin)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_browser_site_state\",\n \"table_name\": \"plugin_browser_site_origins\",\n \"sql\": \"CREATE INDEX idx_plugin_browser_site_state ON plugin_browser_site_origins(state, updated_at)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_browser_site_origins\",\n \"table_name\": \"plugin_browser_site_origins\",\n \"sql\": \"CREATE TABLE plugin_browser_site_origins ( origin_key TEXT PRIMARY KEY, plugin_instance_id TEXT NOT NULL, plugin_id TEXT NOT NULL, active_fingerprint TEXT NOT NULL, surface_id TEXT NOT NULL, surface_instance_id TEXT NOT NULL, origin TEXT NOT NULL, owner_session_hash TEXT NOT NULL, owner_user_hash TEXT NOT NULL, state TEXT NOT NULL, cleanup_reason TEXT NOT NULL, cleanup_error TEXT NOT NULL, created_at INTEGER NOT NULL, updated_at INTEGER NOT NULL, last_seen_at INTEGER NOT NULL, cleanup_requested_at INTEGER, cleaned_at INTEGER, retained_at INTEGER )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_browser_site_schema_migrations\",\n \"table_name\": \"plugin_browser_site_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_browser_site_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"a7767aacbc70799ee6f847077e27727cac70ae2fdbb84cae2e0fae2d9ab5bffa\"\n },\n {\n \"path\": \"db/cleanup.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_cleanup_schema_migrations\",\n \"versions\": [\n 1\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_cleanup_operations_plugin\",\n \"table_name\": \"plugin_cleanup_operations\",\n \"sql\": \"CREATE INDEX idx_plugin_cleanup_operations_plugin ON plugin_cleanup_operations(plugin_instance_id, id)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_cleanup_operations\",\n \"table_name\": \"plugin_cleanup_operations\",\n \"sql\": \"CREATE TABLE plugin_cleanup_operations ( id INTEGER PRIMARY KEY AUTOINCREMENT, plugin_instance_id TEXT NOT NULL, delete_data INTEGER NOT NULL, phase TEXT NOT NULL, executed_at INTEGER NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_cleanup_schema_migrations\",\n \"table_name\": \"plugin_cleanup_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_cleanup_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"492e855ac577c347fd5c4a916b4be060d08e9703d9deec197bcb1a75a0de9dcc\"\n },\n {\n \"path\": \"db/confirmation_intents.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_confirmation_intent_schema_migrations\",\n \"versions\": [\n 1\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_confirmation_intents_expires_at\",\n \"table_name\": \"plugin_confirmation_intents\",\n \"sql\": \"CREATE INDEX idx_plugin_confirmation_intents_expires_at ON plugin_confirmation_intents(expires_at)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_confirmation_intents_plugin_instance\",\n \"table_name\": \"plugin_confirmation_intents\",\n \"sql\": \"CREATE INDEX idx_plugin_confirmation_intents_plugin_instance ON plugin_confirmation_intents(plugin_instance_id, issued_at, confirmation_id)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_confirmation_intent_schema_migrations\",\n \"table_name\": \"plugin_confirmation_intent_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_confirmation_intent_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_confirmation_intents\",\n \"table_name\": \"plugin_confirmation_intents\",\n \"sql\": \"CREATE TABLE plugin_confirmation_intents ( confirmation_id TEXT PRIMARY KEY, confirmation_token_id TEXT NOT NULL, plugin_id TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, surface_instance_id TEXT NOT NULL, bridge_channel_id TEXT NOT NULL, method TEXT NOT NULL, request_hash TEXT NOT NULL, plan_hash TEXT NOT NULL, issued_at INTEGER NOT NULL, expires_at INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"dac56fde008efc7d6a21154c5bfbbd43183a8411e0fad20946e88a7550287781\"\n },\n {\n \"path\": \"db/install_stage.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_install_stage_schema_migrations\",\n \"versions\": [\n 1\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_install_stages_plugin\",\n \"table_name\": \"plugin_install_stages\",\n \"sql\": \"CREATE INDEX idx_plugin_install_stages_plugin ON plugin_install_stages(plugin_instance_id, created_at)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_install_stages_status_expiry\",\n \"table_name\": \"plugin_install_stages\",\n \"sql\": \"CREATE INDEX idx_plugin_install_stages_status_expiry ON plugin_install_stages(status, expires_at)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_install_stage_schema_migrations\",\n \"table_name\": \"plugin_install_stage_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_install_stage_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_install_stages\",\n \"table_name\": \"plugin_install_stages\",\n \"sql\": \"CREATE TABLE plugin_install_stages ( stage_id TEXT PRIMARY KEY, action TEXT NOT NULL, status TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, publisher_id TEXT NOT NULL, plugin_id TEXT NOT NULL, version TEXT NOT NULL, package_hash TEXT NOT NULL, manifest_hash TEXT NOT NULL, entries_hash TEXT NOT NULL, requested_trust TEXT NOT NULL, resolved_trust TEXT NOT NULL, validation_summary_json TEXT NOT NULL, error_code TEXT NOT NULL, error_message TEXT NOT NULL, expires_at INTEGER NOT NULL, created_at INTEGER NOT NULL, updated_at INTEGER NOT NULL, finished_at INTEGER )\"\n }\n ],\n \"schema_sha256\": \"ee0192641f33bba6c7fc5994d73e2a64e77c129406bd3c2ccfc840780c3cef6a\"\n },\n {\n \"path\": \"db/observability.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_observability_schema_migrations\",\n \"versions\": [\n 1\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_audit_plugin\",\n \"table_name\": \"plugin_audit_events\",\n \"sql\": \"CREATE INDEX idx_plugin_audit_plugin ON plugin_audit_events(plugin_id, type, occurred_at)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_audit_plugin_instance\",\n \"table_name\": \"plugin_audit_events\",\n \"sql\": \"CREATE INDEX idx_plugin_audit_plugin_instance ON plugin_audit_events(plugin_instance_id, type, occurred_at)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_diagnostics_plugin_instance\",\n \"table_name\": \"plugin_diagnostic_events\",\n \"sql\": \"CREATE INDEX idx_plugin_diagnostics_plugin_instance ON plugin_diagnostic_events(plugin_instance_id, type, severity, occurred_at)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_diagnostics_surface\",\n \"table_name\": \"plugin_diagnostic_events\",\n \"sql\": \"CREATE INDEX idx_plugin_diagnostics_surface ON plugin_diagnostic_events(surface_instance_id, severity, occurred_at)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_audit_events\",\n \"table_name\": \"plugin_audit_events\",\n \"sql\": \"CREATE TABLE plugin_audit_events ( seq INTEGER PRIMARY KEY, event_id TEXT NOT NULL, type TEXT NOT NULL, plugin_id TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, surface_id TEXT NOT NULL, surface_instance_id TEXT NOT NULL, request_id TEXT NOT NULL, actor TEXT NOT NULL, occurred_at INTEGER NOT NULL, details_json BLOB NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_diagnostic_events\",\n \"table_name\": \"plugin_diagnostic_events\",\n \"sql\": \"CREATE TABLE plugin_diagnostic_events ( seq INTEGER PRIMARY KEY, event_id TEXT NOT NULL, type TEXT NOT NULL, severity TEXT NOT NULL, message TEXT NOT NULL, plugin_id TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, surface_id TEXT NOT NULL, surface_instance_id TEXT NOT NULL, active_fingerprint TEXT NOT NULL, request_id TEXT NOT NULL, occurred_at INTEGER NOT NULL, details_json BLOB NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_observability_meta\",\n \"table_name\": \"plugin_observability_meta\",\n \"sql\": \"CREATE TABLE plugin_observability_meta ( id INTEGER PRIMARY KEY CHECK(id = 1), audit_seq INTEGER NOT NULL, diagnostic_seq INTEGER NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_observability_schema_migrations\",\n \"table_name\": \"plugin_observability_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_observability_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"00e4363c85aaab3cb78d9b357e835490f82975233ee44643a3e238d337da4784\"\n },\n {\n \"path\": \"db/operations.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_operation_schema_migrations\",\n \"versions\": [\n 1\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_operations_plugin_instance\",\n \"table_name\": \"plugin_operations\",\n \"sql\": \"CREATE INDEX idx_plugin_operations_plugin_instance ON plugin_operations(plugin_instance_id, created_at, operation_id)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_operations_status\",\n \"table_name\": \"plugin_operations\",\n \"sql\": \"CREATE INDEX idx_plugin_operations_status ON plugin_operations(status)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_operation_schema_migrations\",\n \"table_name\": \"plugin_operation_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_operation_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_operations\",\n \"table_name\": \"plugin_operations\",\n \"sql\": \"CREATE TABLE plugin_operations ( operation_id TEXT PRIMARY KEY, plugin_id TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, method TEXT NOT NULL, effect TEXT NOT NULL, execution TEXT NOT NULL, surface_instance_id TEXT NOT NULL, session_channel_id_hash TEXT NOT NULL, bridge_channel_id TEXT NOT NULL, status TEXT NOT NULL, disable_behavior TEXT NOT NULL, uninstall_behavior TEXT NOT NULL, reason TEXT NOT NULL, created_at INTEGER NOT NULL, updated_at INTEGER NOT NULL, cancel_requested_at INTEGER, orphaned_at INTEGER )\"\n }\n ],\n \"schema_sha256\": \"6b89150e03769f618c994f6906f4b588cfaf95159bfd111bd44cfde37b7ff681\"\n },\n {\n \"path\": \"db/permissions.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_permission_schema_migrations\",\n \"versions\": [\n 1\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_permission_grants_plugin\",\n \"table_name\": \"plugin_permission_grants\",\n \"sql\": \"CREATE INDEX idx_plugin_permission_grants_plugin ON plugin_permission_grants(plugin_instance_id, permission_id)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_permission_grants_revoked\",\n \"table_name\": \"plugin_permission_grants\",\n \"sql\": \"CREATE INDEX idx_plugin_permission_grants_revoked ON plugin_permission_grants(plugin_instance_id, revoked_at, expires_at)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_permission_grants\",\n \"table_name\": \"plugin_permission_grants\",\n \"sql\": \"CREATE TABLE plugin_permission_grants ( plugin_instance_id TEXT NOT NULL, permission_id TEXT NOT NULL, effect TEXT NOT NULL, granted_by TEXT NOT NULL, granted_at INTEGER NOT NULL, expires_at INTEGER, revoked_at INTEGER, revoked_by TEXT NOT NULL, revoked_reason TEXT NOT NULL, PRIMARY KEY(plugin_instance_id, permission_id) )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_permission_schema_migrations\",\n \"table_name\": \"plugin_permission_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_permission_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"d0b89affc5139c3ae28f0bd178094ceef0046f25b9b27f9b4e1b231624436f46\"\n },\n {\n \"path\": \"db/registry.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 1,\n \"migration_versions\": [\n {\n \"table\": \"plugin_registry_schema_migrations\",\n \"versions\": [\n 1\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_records_deleted_at\",\n \"table_name\": \"plugin_records\",\n \"sql\": \"CREATE INDEX idx_plugin_records_deleted_at ON plugin_records(deleted_at)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_records_plugin_id\",\n \"table_name\": \"plugin_records\",\n \"sql\": \"CREATE INDEX idx_plugin_records_plugin_id ON plugin_records(plugin_id)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_records\",\n \"table_name\": \"plugin_records\",\n \"sql\": \"CREATE TABLE plugin_records ( plugin_instance_id TEXT PRIMARY KEY, publisher_id TEXT NOT NULL, plugin_id TEXT NOT NULL, version TEXT NOT NULL, active_fingerprint TEXT NOT NULL, package_hash TEXT NOT NULL, manifest_hash TEXT NOT NULL, entries_hash TEXT NOT NULL, trust_state TEXT NOT NULL, enable_state TEXT NOT NULL, disabled_reason TEXT NOT NULL, retained_data_state TEXT NOT NULL, policy_revision INTEGER NOT NULL, management_revision INTEGER NOT NULL, revoke_epoch INTEGER NOT NULL, manifest_json TEXT NOT NULL, package_entries_json TEXT NOT NULL, version_history_json TEXT NOT NULL, installed_at INTEGER NOT NULL, enabled_at INTEGER, updated_at INTEGER NOT NULL, deleted_at INTEGER, metadata_json TEXT NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_registry_schema_migrations\",\n \"table_name\": \"plugin_registry_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_registry_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"70b12092bd87a03c8506b174f3a4528ef74a5f953f813b1829b586cdef108cda\"\n },\n {\n \"path\": \"db/retained_data.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_retained_data_schema_migrations\",\n \"versions\": [\n 1\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_retained_data_expiry\",\n \"table_name\": \"plugin_retained_data_records\",\n \"sql\": \"CREATE INDEX idx_plugin_retained_data_expiry ON plugin_retained_data_records(state, delete_after)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_retained_data_identity\",\n \"table_name\": \"plugin_retained_data_records\",\n \"sql\": \"CREATE INDEX idx_plugin_retained_data_identity ON plugin_retained_data_records(publisher_id, plugin_id, state)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_retained_data_source\",\n \"table_name\": \"plugin_retained_data_records\",\n \"sql\": \"CREATE INDEX idx_plugin_retained_data_source ON plugin_retained_data_records(source_plugin_instance_id)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_retained_data_records\",\n \"table_name\": \"plugin_retained_data_records\",\n \"sql\": \"CREATE TABLE plugin_retained_data_records ( retained_id TEXT PRIMARY KEY, source_plugin_instance_id TEXT NOT NULL, bound_plugin_instance_id TEXT NOT NULL, publisher_id TEXT NOT NULL, plugin_id TEXT NOT NULL, version TEXT NOT NULL, package_hash TEXT NOT NULL, manifest_hash TEXT NOT NULL, state TEXT NOT NULL, storage_retained INTEGER NOT NULL, settings_retained INTEGER NOT NULL, browser_site_retained INTEGER NOT NULL, usage_bytes INTEGER NOT NULL, delete_after INTEGER, delete_error TEXT NOT NULL, metadata_json TEXT NOT NULL, retained_at INTEGER NOT NULL, updated_at INTEGER NOT NULL, bound_at INTEGER, deleted_at INTEGER, last_accessed_at INTEGER )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_retained_data_schema_migrations\",\n \"table_name\": \"plugin_retained_data_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_retained_data_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"1cdb02a3c5cb5870aadd332de06582df4fcddad098a0b731271beddbc38237b7\"\n },\n {\n \"path\": \"db/secrets.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_secret_schema_migrations\",\n \"versions\": [\n 1\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_secret_bindings_plugin\",\n \"table_name\": \"plugin_secret_bindings\",\n \"sql\": \"CREATE INDEX idx_plugin_secret_bindings_plugin ON plugin_secret_bindings(plugin_instance_id, bound, updated_at)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_secret_bindings\",\n \"table_name\": \"plugin_secret_bindings\",\n \"sql\": \"CREATE TABLE plugin_secret_bindings ( plugin_instance_id TEXT NOT NULL, secret_ref TEXT NOT NULL, scope TEXT NOT NULL, bound INTEGER NOT NULL, last_test_status TEXT NOT NULL, bound_at INTEGER, tested_at INTEGER, deleted_at INTEGER, updated_at INTEGER NOT NULL, PRIMARY KEY(plugin_instance_id, scope, secret_ref) )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_secret_schema_migrations\",\n \"table_name\": \"plugin_secret_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_secret_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"82a9d6ab404b4d3dc485ef1ea9c95530af4460a48506e47ced81953c4b12dd50\"\n },\n {\n \"path\": \"db/security_policy.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_security_policy_schema_migrations\",\n \"versions\": [\n 1\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"table\",\n \"name\": \"plugin_security_policies\",\n \"table_name\": \"plugin_security_policies\",\n \"sql\": \"CREATE TABLE plugin_security_policies ( plugin_instance_id TEXT PRIMARY KEY, updated_at INTEGER NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_security_policy_allowed_permissions\",\n \"table_name\": \"plugin_security_policy_allowed_permissions\",\n \"sql\": \"CREATE TABLE plugin_security_policy_allowed_permissions ( plugin_instance_id TEXT NOT NULL, permission_id TEXT NOT NULL, updated_at INTEGER NOT NULL, PRIMARY KEY(plugin_instance_id, permission_id), FOREIGN KEY(plugin_instance_id) REFERENCES plugin_security_policies(plugin_instance_id) ON DELETE CASCADE )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_security_policy_denied_methods\",\n \"table_name\": \"plugin_security_policy_denied_methods\",\n \"sql\": \"CREATE TABLE plugin_security_policy_denied_methods ( plugin_instance_id TEXT NOT NULL, method TEXT NOT NULL, updated_at INTEGER NOT NULL, PRIMARY KEY(plugin_instance_id, method), FOREIGN KEY(plugin_instance_id) REFERENCES plugin_security_policies(plugin_instance_id) ON DELETE CASCADE )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_security_policy_schema_migrations\",\n \"table_name\": \"plugin_security_policy_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_security_policy_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"8718fac16ca2cf37e84edd53f6d1c646f2d42e028af2dcc7aee05bdd9bc22dd6\"\n },\n {\n \"path\": \"db/settings.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_settings_schema_migrations\",\n \"versions\": [\n 1\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_settings_archives_source\",\n \"table_name\": \"plugin_settings_archives\",\n \"sql\": \"CREATE INDEX idx_plugin_settings_archives_source ON plugin_settings_archives(source_plugin_instance_id, created_at)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_settings_records_state\",\n \"table_name\": \"plugin_settings_records\",\n \"sql\": \"CREATE INDEX idx_plugin_settings_records_state ON plugin_settings_records(state, retained_at)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_settings_archives\",\n \"table_name\": \"plugin_settings_archives\",\n \"sql\": \"CREATE TABLE plugin_settings_archives ( archive_ref TEXT PRIMARY KEY, source_plugin_instance_id TEXT NOT NULL, include_secrets INTEGER NOT NULL, schema_version INTEGER NOT NULL, settings_revision INTEGER NOT NULL, created_at INTEGER NOT NULL, updated_at INTEGER NOT NULL, payload_json BLOB NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_settings_meta\",\n \"table_name\": \"plugin_settings_meta\",\n \"sql\": \"CREATE TABLE plugin_settings_meta ( id INTEGER PRIMARY KEY CHECK(id = 1), next_export INTEGER NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_settings_records\",\n \"table_name\": \"plugin_settings_records\",\n \"sql\": \"CREATE TABLE plugin_settings_records ( plugin_instance_id TEXT PRIMARY KEY, state TEXT NOT NULL, schema_version INTEGER NOT NULL, settings_revision INTEGER NOT NULL, updated_at INTEGER NOT NULL, retained_at INTEGER, payload_json BLOB NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_settings_schema_migrations\",\n \"table_name\": \"plugin_settings_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_settings_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"dba0083a1fa88135d6ab50cd0176063688134e684577563022200906a0d5702a\"\n },\n {\n \"path\": \"db/streams.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_stream_schema_migrations\",\n \"versions\": [\n 1\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_stream_events_stream_sequence\",\n \"table_name\": \"plugin_stream_events\",\n \"sql\": \"CREATE INDEX idx_plugin_stream_events_stream_sequence ON plugin_stream_events(stream_id, sequence)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_streams_plugin_instance\",\n \"table_name\": \"plugin_streams\",\n \"sql\": \"CREATE INDEX idx_plugin_streams_plugin_instance ON plugin_streams(plugin_instance_id, created_at, stream_id)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_streams_status\",\n \"table_name\": \"plugin_streams\",\n \"sql\": \"CREATE INDEX idx_plugin_streams_status ON plugin_streams(status)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_stream_events\",\n \"table_name\": \"plugin_stream_events\",\n \"sql\": \"CREATE TABLE plugin_stream_events ( stream_id TEXT NOT NULL, sequence INTEGER NOT NULL, kind TEXT NOT NULL, data BLOB, error TEXT NOT NULL, at INTEGER NOT NULL, PRIMARY KEY(stream_id, sequence), FOREIGN KEY(stream_id) REFERENCES plugin_streams(stream_id) ON DELETE CASCADE )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_stream_schema_migrations\",\n \"table_name\": \"plugin_stream_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_stream_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_streams\",\n \"table_name\": \"plugin_streams\",\n \"sql\": \"CREATE TABLE plugin_streams ( stream_id TEXT PRIMARY KEY, plugin_id TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, method TEXT NOT NULL, effect TEXT NOT NULL, execution TEXT NOT NULL, surface_instance_id TEXT NOT NULL, owner_session_hash TEXT NOT NULL, owner_user_hash TEXT NOT NULL, session_channel_id_hash TEXT NOT NULL, bridge_channel_id TEXT NOT NULL, direction TEXT NOT NULL, status TEXT NOT NULL, content_type TEXT NOT NULL, max_buffered_bytes INTEGER NOT NULL, buffered_bytes INTEGER NOT NULL, created_at INTEGER NOT NULL, updated_at INTEGER NOT NULL, closed_at INTEGER )\"\n }\n ],\n \"schema_sha256\": \"7d2200868c7bd271be8a78cd42aea861bdc2fe46dbc714b08bb4d6251c7510d9\"\n }\n ],\n \"tree_rules\": {\n \"allowed_kinds\": [\n \"directory\",\n \"file\"\n ],\n \"allow_sqlite_wal_shm\": true,\n \"reject_hardlinks\": true,\n \"reject_symlinks\": true,\n \"variable_trees\": [\n \"assets\",\n \"storage\",\n \"trust\"\n ],\n \"optional_files\": []\n }\n },\n {\n \"id\": \"redeven-redevplugin-v0.1.6-layout-v1\",\n \"platform_versions\": [\n \"0.1.6\"\n ],\n \"root_entries\": [\n {\n \"path\": \"assets\",\n \"kind\": \"directory\",\n \"scope\": \"durable\",\n \"disposition\": \"quarantine\",\n \"required\": true\n },\n {\n \"path\": \"db\",\n \"kind\": \"directory\",\n \"scope\": \"durable\",\n \"disposition\": \"quarantine\",\n \"required\": true\n },\n {\n \"path\": \"storage\",\n \"kind\": \"directory\",\n \"scope\": \"durable\",\n \"disposition\": \"quarantine\",\n \"required\": true\n },\n {\n \"path\": \"trust\",\n \"kind\": \"directory\",\n \"scope\": \"durable\",\n \"disposition\": \"quarantine\",\n \"required\": false\n }\n ],\n \"sqlite_databases\": [\n {\n \"path\": \"db/browser_site.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_browser_site_schema_migrations\",\n \"versions\": [\n 1\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_browser_site_plugin_instance\",\n \"table_name\": \"plugin_browser_site_origins\",\n \"sql\": \"CREATE INDEX idx_plugin_browser_site_plugin_instance ON plugin_browser_site_origins(plugin_instance_id, state, origin)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_browser_site_state\",\n \"table_name\": \"plugin_browser_site_origins\",\n \"sql\": \"CREATE INDEX idx_plugin_browser_site_state ON plugin_browser_site_origins(state, updated_at)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_browser_site_origins\",\n \"table_name\": \"plugin_browser_site_origins\",\n \"sql\": \"CREATE TABLE plugin_browser_site_origins ( origin_key TEXT PRIMARY KEY, plugin_instance_id TEXT NOT NULL, plugin_id TEXT NOT NULL, active_fingerprint TEXT NOT NULL, surface_id TEXT NOT NULL, surface_instance_id TEXT NOT NULL, origin TEXT NOT NULL, owner_session_hash TEXT NOT NULL, owner_user_hash TEXT NOT NULL, state TEXT NOT NULL, cleanup_reason TEXT NOT NULL, cleanup_error TEXT NOT NULL, created_at INTEGER NOT NULL, updated_at INTEGER NOT NULL, last_seen_at INTEGER NOT NULL, cleanup_requested_at INTEGER, cleaned_at INTEGER, retained_at INTEGER )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_browser_site_schema_migrations\",\n \"table_name\": \"plugin_browser_site_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_browser_site_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"a7767aacbc70799ee6f847077e27727cac70ae2fdbb84cae2e0fae2d9ab5bffa\"\n },\n {\n \"path\": \"db/cleanup.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_cleanup_schema_migrations\",\n \"versions\": [\n 1\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_cleanup_operations_plugin\",\n \"table_name\": \"plugin_cleanup_operations\",\n \"sql\": \"CREATE INDEX idx_plugin_cleanup_operations_plugin ON plugin_cleanup_operations(plugin_instance_id, id)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_cleanup_operations\",\n \"table_name\": \"plugin_cleanup_operations\",\n \"sql\": \"CREATE TABLE plugin_cleanup_operations ( id INTEGER PRIMARY KEY AUTOINCREMENT, plugin_instance_id TEXT NOT NULL, delete_data INTEGER NOT NULL, phase TEXT NOT NULL, executed_at INTEGER NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_cleanup_schema_migrations\",\n \"table_name\": \"plugin_cleanup_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_cleanup_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"492e855ac577c347fd5c4a916b4be060d08e9703d9deec197bcb1a75a0de9dcc\"\n },\n {\n \"path\": \"db/confirmation_intents.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_confirmation_intent_schema_migrations\",\n \"versions\": [\n 1\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_confirmation_intents_expires_at\",\n \"table_name\": \"plugin_confirmation_intents\",\n \"sql\": \"CREATE INDEX idx_plugin_confirmation_intents_expires_at ON plugin_confirmation_intents(expires_at)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_confirmation_intents_plugin_instance\",\n \"table_name\": \"plugin_confirmation_intents\",\n \"sql\": \"CREATE INDEX idx_plugin_confirmation_intents_plugin_instance ON plugin_confirmation_intents(plugin_instance_id, issued_at, confirmation_id)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_confirmation_intent_schema_migrations\",\n \"table_name\": \"plugin_confirmation_intent_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_confirmation_intent_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_confirmation_intents\",\n \"table_name\": \"plugin_confirmation_intents\",\n \"sql\": \"CREATE TABLE plugin_confirmation_intents ( confirmation_id TEXT PRIMARY KEY, confirmation_token_id TEXT NOT NULL, plugin_id TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, surface_instance_id TEXT NOT NULL, bridge_channel_id TEXT NOT NULL, method TEXT NOT NULL, request_hash TEXT NOT NULL, plan_hash TEXT NOT NULL, issued_at INTEGER NOT NULL, expires_at INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"dac56fde008efc7d6a21154c5bfbbd43183a8411e0fad20946e88a7550287781\"\n },\n {\n \"path\": \"db/install_stage.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_install_stage_schema_migrations\",\n \"versions\": [\n 1\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_install_stages_plugin\",\n \"table_name\": \"plugin_install_stages\",\n \"sql\": \"CREATE INDEX idx_plugin_install_stages_plugin ON plugin_install_stages(plugin_instance_id, created_at)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_install_stages_status_expiry\",\n \"table_name\": \"plugin_install_stages\",\n \"sql\": \"CREATE INDEX idx_plugin_install_stages_status_expiry ON plugin_install_stages(status, expires_at)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_install_stage_schema_migrations\",\n \"table_name\": \"plugin_install_stage_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_install_stage_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_install_stages\",\n \"table_name\": \"plugin_install_stages\",\n \"sql\": \"CREATE TABLE plugin_install_stages ( stage_id TEXT PRIMARY KEY, action TEXT NOT NULL, status TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, publisher_id TEXT NOT NULL, plugin_id TEXT NOT NULL, version TEXT NOT NULL, package_hash TEXT NOT NULL, manifest_hash TEXT NOT NULL, entries_hash TEXT NOT NULL, requested_trust TEXT NOT NULL, resolved_trust TEXT NOT NULL, validation_summary_json TEXT NOT NULL, error_code TEXT NOT NULL, error_message TEXT NOT NULL, expires_at INTEGER NOT NULL, created_at INTEGER NOT NULL, updated_at INTEGER NOT NULL, finished_at INTEGER )\"\n }\n ],\n \"schema_sha256\": \"ee0192641f33bba6c7fc5994d73e2a64e77c129406bd3c2ccfc840780c3cef6a\"\n },\n {\n \"path\": \"db/observability.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_observability_schema_migrations\",\n \"versions\": [\n 1\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_audit_plugin\",\n \"table_name\": \"plugin_audit_events\",\n \"sql\": \"CREATE INDEX idx_plugin_audit_plugin ON plugin_audit_events(plugin_id, type, occurred_at)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_audit_plugin_instance\",\n \"table_name\": \"plugin_audit_events\",\n \"sql\": \"CREATE INDEX idx_plugin_audit_plugin_instance ON plugin_audit_events(plugin_instance_id, type, occurred_at)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_diagnostics_plugin_instance\",\n \"table_name\": \"plugin_diagnostic_events\",\n \"sql\": \"CREATE INDEX idx_plugin_diagnostics_plugin_instance ON plugin_diagnostic_events(plugin_instance_id, type, severity, occurred_at)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_diagnostics_surface\",\n \"table_name\": \"plugin_diagnostic_events\",\n \"sql\": \"CREATE INDEX idx_plugin_diagnostics_surface ON plugin_diagnostic_events(surface_instance_id, severity, occurred_at)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_audit_events\",\n \"table_name\": \"plugin_audit_events\",\n \"sql\": \"CREATE TABLE plugin_audit_events ( seq INTEGER PRIMARY KEY, event_id TEXT NOT NULL, type TEXT NOT NULL, plugin_id TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, surface_id TEXT NOT NULL, surface_instance_id TEXT NOT NULL, request_id TEXT NOT NULL, actor TEXT NOT NULL, occurred_at INTEGER NOT NULL, details_json BLOB NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_diagnostic_events\",\n \"table_name\": \"plugin_diagnostic_events\",\n \"sql\": \"CREATE TABLE plugin_diagnostic_events ( seq INTEGER PRIMARY KEY, event_id TEXT NOT NULL, type TEXT NOT NULL, severity TEXT NOT NULL, message TEXT NOT NULL, plugin_id TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, surface_id TEXT NOT NULL, surface_instance_id TEXT NOT NULL, active_fingerprint TEXT NOT NULL, request_id TEXT NOT NULL, occurred_at INTEGER NOT NULL, details_json BLOB NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_observability_meta\",\n \"table_name\": \"plugin_observability_meta\",\n \"sql\": \"CREATE TABLE plugin_observability_meta ( id INTEGER PRIMARY KEY CHECK(id = 1), audit_seq INTEGER NOT NULL, diagnostic_seq INTEGER NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_observability_schema_migrations\",\n \"table_name\": \"plugin_observability_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_observability_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"00e4363c85aaab3cb78d9b357e835490f82975233ee44643a3e238d337da4784\"\n },\n {\n \"path\": \"db/operations.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_operation_schema_migrations\",\n \"versions\": [\n 1\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_operations_plugin_instance\",\n \"table_name\": \"plugin_operations\",\n \"sql\": \"CREATE INDEX idx_plugin_operations_plugin_instance ON plugin_operations(plugin_instance_id, created_at, operation_id)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_operations_status\",\n \"table_name\": \"plugin_operations\",\n \"sql\": \"CREATE INDEX idx_plugin_operations_status ON plugin_operations(status)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_operation_schema_migrations\",\n \"table_name\": \"plugin_operation_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_operation_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_operations\",\n \"table_name\": \"plugin_operations\",\n \"sql\": \"CREATE TABLE plugin_operations ( operation_id TEXT PRIMARY KEY, plugin_id TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, method TEXT NOT NULL, effect TEXT NOT NULL, execution TEXT NOT NULL, surface_instance_id TEXT NOT NULL, session_channel_id_hash TEXT NOT NULL, bridge_channel_id TEXT NOT NULL, status TEXT NOT NULL, disable_behavior TEXT NOT NULL, uninstall_behavior TEXT NOT NULL, reason TEXT NOT NULL, created_at INTEGER NOT NULL, updated_at INTEGER NOT NULL, cancel_requested_at INTEGER, orphaned_at INTEGER )\"\n }\n ],\n \"schema_sha256\": \"6b89150e03769f618c994f6906f4b588cfaf95159bfd111bd44cfde37b7ff681\"\n },\n {\n \"path\": \"db/permissions.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_permission_schema_migrations\",\n \"versions\": [\n 1\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_permission_grants_plugin\",\n \"table_name\": \"plugin_permission_grants\",\n \"sql\": \"CREATE INDEX idx_plugin_permission_grants_plugin ON plugin_permission_grants(plugin_instance_id, permission_id)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_permission_grants_revoked\",\n \"table_name\": \"plugin_permission_grants\",\n \"sql\": \"CREATE INDEX idx_plugin_permission_grants_revoked ON plugin_permission_grants(plugin_instance_id, revoked_at, expires_at)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_permission_grants\",\n \"table_name\": \"plugin_permission_grants\",\n \"sql\": \"CREATE TABLE plugin_permission_grants ( plugin_instance_id TEXT NOT NULL, permission_id TEXT NOT NULL, effect TEXT NOT NULL, granted_by TEXT NOT NULL, granted_at INTEGER NOT NULL, expires_at INTEGER, revoked_at INTEGER, revoked_by TEXT NOT NULL, revoked_reason TEXT NOT NULL, PRIMARY KEY(plugin_instance_id, permission_id) )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_permission_schema_migrations\",\n \"table_name\": \"plugin_permission_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_permission_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"d0b89affc5139c3ae28f0bd178094ceef0046f25b9b27f9b4e1b231624436f46\"\n },\n {\n \"path\": \"db/registry.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 5,\n \"migration_versions\": [\n {\n \"table\": \"plugin_registry_schema_migrations\",\n \"versions\": [\n 1,\n 2,\n 3,\n 4,\n 5\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_records_deleted_at\",\n \"table_name\": \"plugin_records\",\n \"sql\": \"CREATE INDEX idx_plugin_records_deleted_at ON plugin_records(deleted_at)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_records_plugin_id\",\n \"table_name\": \"plugin_records\",\n \"sql\": \"CREATE INDEX idx_plugin_records_plugin_id ON plugin_records(plugin_id)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_records\",\n \"table_name\": \"plugin_records\",\n \"sql\": \"CREATE TABLE plugin_records ( plugin_instance_id TEXT PRIMARY KEY, publisher_id TEXT NOT NULL, plugin_id TEXT NOT NULL, version TEXT NOT NULL, active_fingerprint TEXT NOT NULL, package_hash TEXT NOT NULL, manifest_hash TEXT NOT NULL, entries_hash TEXT NOT NULL, trust_state TEXT NOT NULL, trust_assessment_json TEXT NOT NULL DEFAULT '{}', source_policy_snapshot_hash TEXT NOT NULL DEFAULT '', source_policy_snapshot_json TEXT NOT NULL DEFAULT '{}', local_import_provenance_json TEXT NOT NULL DEFAULT '{}', enable_state TEXT NOT NULL, disabled_reason TEXT NOT NULL, retained_data_state TEXT NOT NULL, policy_revision INTEGER NOT NULL, management_revision INTEGER NOT NULL, revoke_epoch INTEGER NOT NULL, manifest_json TEXT NOT NULL, package_entries_json TEXT NOT NULL, version_history_json TEXT NOT NULL, installed_at INTEGER NOT NULL, enabled_at INTEGER, updated_at INTEGER NOT NULL, deleted_at INTEGER, metadata_json TEXT NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_registry_schema_migrations\",\n \"table_name\": \"plugin_registry_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_registry_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_source_security_floors\",\n \"table_name\": \"plugin_source_security_floors\",\n \"sql\": \"CREATE TABLE plugin_source_security_floors ( source_id TEXT PRIMARY KEY, policy_epoch TEXT NOT NULL, key_rotation_epoch TEXT NOT NULL, revocation_epoch TEXT NOT NULL, source_policy_snapshot_hash TEXT NOT NULL, revocation_metadata_sha256 TEXT NOT NULL, updated_at INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"e04fe43561aa4e42626060f74912c0fae5dca60a23f32b95e2c219a37b722a3f\"\n },\n {\n \"path\": \"db/retained_data.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_retained_data_schema_migrations\",\n \"versions\": [\n 1\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_retained_data_expiry\",\n \"table_name\": \"plugin_retained_data_records\",\n \"sql\": \"CREATE INDEX idx_plugin_retained_data_expiry ON plugin_retained_data_records(state, delete_after)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_retained_data_identity\",\n \"table_name\": \"plugin_retained_data_records\",\n \"sql\": \"CREATE INDEX idx_plugin_retained_data_identity ON plugin_retained_data_records(publisher_id, plugin_id, state)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_retained_data_source\",\n \"table_name\": \"plugin_retained_data_records\",\n \"sql\": \"CREATE INDEX idx_plugin_retained_data_source ON plugin_retained_data_records(source_plugin_instance_id)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_retained_data_records\",\n \"table_name\": \"plugin_retained_data_records\",\n \"sql\": \"CREATE TABLE plugin_retained_data_records ( retained_id TEXT PRIMARY KEY, source_plugin_instance_id TEXT NOT NULL, bound_plugin_instance_id TEXT NOT NULL, publisher_id TEXT NOT NULL, plugin_id TEXT NOT NULL, version TEXT NOT NULL, package_hash TEXT NOT NULL, manifest_hash TEXT NOT NULL, state TEXT NOT NULL, storage_retained INTEGER NOT NULL, settings_retained INTEGER NOT NULL, browser_site_retained INTEGER NOT NULL, usage_bytes INTEGER NOT NULL, delete_after INTEGER, delete_error TEXT NOT NULL, metadata_json TEXT NOT NULL, retained_at INTEGER NOT NULL, updated_at INTEGER NOT NULL, bound_at INTEGER, deleted_at INTEGER, last_accessed_at INTEGER )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_retained_data_schema_migrations\",\n \"table_name\": \"plugin_retained_data_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_retained_data_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"1cdb02a3c5cb5870aadd332de06582df4fcddad098a0b731271beddbc38237b7\"\n },\n {\n \"path\": \"db/secrets.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_secret_schema_migrations\",\n \"versions\": [\n 1\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_secret_bindings_plugin\",\n \"table_name\": \"plugin_secret_bindings\",\n \"sql\": \"CREATE INDEX idx_plugin_secret_bindings_plugin ON plugin_secret_bindings(plugin_instance_id, bound, updated_at)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_secret_bindings\",\n \"table_name\": \"plugin_secret_bindings\",\n \"sql\": \"CREATE TABLE plugin_secret_bindings ( plugin_instance_id TEXT NOT NULL, secret_ref TEXT NOT NULL, scope TEXT NOT NULL, bound INTEGER NOT NULL, last_test_status TEXT NOT NULL, bound_at INTEGER, tested_at INTEGER, deleted_at INTEGER, updated_at INTEGER NOT NULL, PRIMARY KEY(plugin_instance_id, scope, secret_ref) )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_secret_schema_migrations\",\n \"table_name\": \"plugin_secret_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_secret_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"82a9d6ab404b4d3dc485ef1ea9c95530af4460a48506e47ced81953c4b12dd50\"\n },\n {\n \"path\": \"db/security_policy.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_security_policy_schema_migrations\",\n \"versions\": [\n 1\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"table\",\n \"name\": \"plugin_security_policies\",\n \"table_name\": \"plugin_security_policies\",\n \"sql\": \"CREATE TABLE plugin_security_policies ( plugin_instance_id TEXT PRIMARY KEY, updated_at INTEGER NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_security_policy_allowed_permissions\",\n \"table_name\": \"plugin_security_policy_allowed_permissions\",\n \"sql\": \"CREATE TABLE plugin_security_policy_allowed_permissions ( plugin_instance_id TEXT NOT NULL, permission_id TEXT NOT NULL, updated_at INTEGER NOT NULL, PRIMARY KEY(plugin_instance_id, permission_id), FOREIGN KEY(plugin_instance_id) REFERENCES plugin_security_policies(plugin_instance_id) ON DELETE CASCADE )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_security_policy_denied_methods\",\n \"table_name\": \"plugin_security_policy_denied_methods\",\n \"sql\": \"CREATE TABLE plugin_security_policy_denied_methods ( plugin_instance_id TEXT NOT NULL, method TEXT NOT NULL, updated_at INTEGER NOT NULL, PRIMARY KEY(plugin_instance_id, method), FOREIGN KEY(plugin_instance_id) REFERENCES plugin_security_policies(plugin_instance_id) ON DELETE CASCADE )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_security_policy_schema_migrations\",\n \"table_name\": \"plugin_security_policy_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_security_policy_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"8718fac16ca2cf37e84edd53f6d1c646f2d42e028af2dcc7aee05bdd9bc22dd6\"\n },\n {\n \"path\": \"db/settings.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_settings_schema_migrations\",\n \"versions\": [\n 1\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_settings_archives_source\",\n \"table_name\": \"plugin_settings_archives\",\n \"sql\": \"CREATE INDEX idx_plugin_settings_archives_source ON plugin_settings_archives(source_plugin_instance_id, created_at)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_settings_records_state\",\n \"table_name\": \"plugin_settings_records\",\n \"sql\": \"CREATE INDEX idx_plugin_settings_records_state ON plugin_settings_records(state, retained_at)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_settings_archives\",\n \"table_name\": \"plugin_settings_archives\",\n \"sql\": \"CREATE TABLE plugin_settings_archives ( archive_ref TEXT PRIMARY KEY, source_plugin_instance_id TEXT NOT NULL, include_secrets INTEGER NOT NULL, schema_version INTEGER NOT NULL, settings_revision INTEGER NOT NULL, created_at INTEGER NOT NULL, updated_at INTEGER NOT NULL, payload_json BLOB NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_settings_meta\",\n \"table_name\": \"plugin_settings_meta\",\n \"sql\": \"CREATE TABLE plugin_settings_meta ( id INTEGER PRIMARY KEY CHECK(id = 1), next_export INTEGER NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_settings_records\",\n \"table_name\": \"plugin_settings_records\",\n \"sql\": \"CREATE TABLE plugin_settings_records ( plugin_instance_id TEXT PRIMARY KEY, state TEXT NOT NULL, schema_version INTEGER NOT NULL, settings_revision INTEGER NOT NULL, updated_at INTEGER NOT NULL, retained_at INTEGER, payload_json BLOB NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_settings_schema_migrations\",\n \"table_name\": \"plugin_settings_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_settings_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"dba0083a1fa88135d6ab50cd0176063688134e684577563022200906a0d5702a\"\n },\n {\n \"path\": \"db/streams.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_stream_schema_migrations\",\n \"versions\": [\n 1\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_stream_events_stream_sequence\",\n \"table_name\": \"plugin_stream_events\",\n \"sql\": \"CREATE INDEX idx_plugin_stream_events_stream_sequence ON plugin_stream_events(stream_id, sequence)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_streams_plugin_instance\",\n \"table_name\": \"plugin_streams\",\n \"sql\": \"CREATE INDEX idx_plugin_streams_plugin_instance ON plugin_streams(plugin_instance_id, created_at, stream_id)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_streams_status\",\n \"table_name\": \"plugin_streams\",\n \"sql\": \"CREATE INDEX idx_plugin_streams_status ON plugin_streams(status)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_stream_events\",\n \"table_name\": \"plugin_stream_events\",\n \"sql\": \"CREATE TABLE plugin_stream_events ( stream_id TEXT NOT NULL, sequence INTEGER NOT NULL, kind TEXT NOT NULL, data BLOB, error TEXT NOT NULL, at INTEGER NOT NULL, PRIMARY KEY(stream_id, sequence), FOREIGN KEY(stream_id) REFERENCES plugin_streams(stream_id) ON DELETE CASCADE )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_stream_schema_migrations\",\n \"table_name\": \"plugin_stream_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_stream_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_streams\",\n \"table_name\": \"plugin_streams\",\n \"sql\": \"CREATE TABLE plugin_streams ( stream_id TEXT PRIMARY KEY, plugin_id TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, method TEXT NOT NULL, effect TEXT NOT NULL, execution TEXT NOT NULL, surface_instance_id TEXT NOT NULL, owner_session_hash TEXT NOT NULL, owner_user_hash TEXT NOT NULL, session_channel_id_hash TEXT NOT NULL, bridge_channel_id TEXT NOT NULL, direction TEXT NOT NULL, status TEXT NOT NULL, content_type TEXT NOT NULL, max_buffered_bytes INTEGER NOT NULL, buffered_bytes INTEGER NOT NULL, created_at INTEGER NOT NULL, updated_at INTEGER NOT NULL, closed_at INTEGER )\"\n }\n ],\n \"schema_sha256\": \"7d2200868c7bd271be8a78cd42aea861bdc2fe46dbc714b08bb4d6251c7510d9\"\n }\n ],\n \"tree_rules\": {\n \"allowed_kinds\": [\n \"directory\",\n \"file\"\n ],\n \"allow_sqlite_wal_shm\": true,\n \"reject_hardlinks\": true,\n \"reject_symlinks\": true,\n \"variable_trees\": [\n \"assets\",\n \"storage\",\n \"trust\"\n ],\n \"optional_files\": []\n }\n },\n {\n \"id\": \"redeven-redevplugin-v0.2.x-layout-v1\",\n \"platform_versions\": [\n \"0.2.0\",\n \"0.2.1\",\n \"0.2.2\"\n ],\n \"root_entries\": [\n {\n \"path\": \"assets\",\n \"kind\": \"directory\",\n \"scope\": \"durable\",\n \"disposition\": \"quarantine\",\n \"required\": true\n },\n {\n \"path\": \"db\",\n \"kind\": \"directory\",\n \"scope\": \"durable\",\n \"disposition\": \"quarantine\",\n \"required\": true\n },\n {\n \"path\": \"storage\",\n \"kind\": \"directory\",\n \"scope\": \"durable\",\n \"disposition\": \"quarantine\",\n \"required\": true\n },\n {\n \"path\": \"trust\",\n \"kind\": \"directory\",\n \"scope\": \"durable\",\n \"disposition\": \"quarantine\",\n \"required\": false\n }\n ],\n \"sqlite_databases\": [\n {\n \"path\": \"db/cleanup.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_cleanup_schema_migrations\",\n \"versions\": [\n 1\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_cleanup_operations_plugin\",\n \"table_name\": \"plugin_cleanup_operations\",\n \"sql\": \"CREATE INDEX idx_plugin_cleanup_operations_plugin ON plugin_cleanup_operations(plugin_instance_id, id)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_cleanup_operations\",\n \"table_name\": \"plugin_cleanup_operations\",\n \"sql\": \"CREATE TABLE plugin_cleanup_operations ( id INTEGER PRIMARY KEY AUTOINCREMENT, plugin_instance_id TEXT NOT NULL, delete_data INTEGER NOT NULL, phase TEXT NOT NULL, executed_at INTEGER NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_cleanup_schema_migrations\",\n \"table_name\": \"plugin_cleanup_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_cleanup_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"492e855ac577c347fd5c4a916b4be060d08e9703d9deec197bcb1a75a0de9dcc\"\n },\n {\n \"path\": \"db/confirmation_intents.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_confirmation_intent_schema_migrations\",\n \"versions\": [\n 1\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_confirmation_intents_expires_at\",\n \"table_name\": \"plugin_confirmation_intents\",\n \"sql\": \"CREATE INDEX idx_plugin_confirmation_intents_expires_at ON plugin_confirmation_intents(expires_at)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_confirmation_intents_plugin_instance\",\n \"table_name\": \"plugin_confirmation_intents\",\n \"sql\": \"CREATE INDEX idx_plugin_confirmation_intents_plugin_instance ON plugin_confirmation_intents(plugin_instance_id, issued_at, confirmation_id)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_confirmation_intent_schema_migrations\",\n \"table_name\": \"plugin_confirmation_intent_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_confirmation_intent_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_confirmation_intents\",\n \"table_name\": \"plugin_confirmation_intents\",\n \"sql\": \"CREATE TABLE plugin_confirmation_intents ( confirmation_id TEXT PRIMARY KEY, confirmation_token_id TEXT NOT NULL, plugin_id TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, surface_instance_id TEXT NOT NULL, bridge_channel_id TEXT NOT NULL, method TEXT NOT NULL, request_hash TEXT NOT NULL, plan_hash TEXT NOT NULL, issued_at INTEGER NOT NULL, expires_at INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"dac56fde008efc7d6a21154c5bfbbd43183a8411e0fad20946e88a7550287781\"\n },\n {\n \"path\": \"db/install_stage.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_install_stage_schema_migrations\",\n \"versions\": [\n 1\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_install_stages_plugin\",\n \"table_name\": \"plugin_install_stages\",\n \"sql\": \"CREATE INDEX idx_plugin_install_stages_plugin ON plugin_install_stages(plugin_instance_id, created_at)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_install_stages_status_expiry\",\n \"table_name\": \"plugin_install_stages\",\n \"sql\": \"CREATE INDEX idx_plugin_install_stages_status_expiry ON plugin_install_stages(status, expires_at)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_install_stage_schema_migrations\",\n \"table_name\": \"plugin_install_stage_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_install_stage_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_install_stages\",\n \"table_name\": \"plugin_install_stages\",\n \"sql\": \"CREATE TABLE plugin_install_stages ( stage_id TEXT PRIMARY KEY, action TEXT NOT NULL, status TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, publisher_id TEXT NOT NULL, plugin_id TEXT NOT NULL, version TEXT NOT NULL, package_hash TEXT NOT NULL, manifest_hash TEXT NOT NULL, entries_hash TEXT NOT NULL, requested_trust TEXT NOT NULL, resolved_trust TEXT NOT NULL, validation_summary_json TEXT NOT NULL, error_code TEXT NOT NULL, error_message TEXT NOT NULL, expires_at INTEGER NOT NULL, created_at INTEGER NOT NULL, updated_at INTEGER NOT NULL, finished_at INTEGER )\"\n }\n ],\n \"schema_sha256\": \"ee0192641f33bba6c7fc5994d73e2a64e77c129406bd3c2ccfc840780c3cef6a\"\n },\n {\n \"path\": \"db/observability.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_observability_schema_migrations\",\n \"versions\": [\n 1\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_audit_plugin\",\n \"table_name\": \"plugin_audit_events\",\n \"sql\": \"CREATE INDEX idx_plugin_audit_plugin ON plugin_audit_events(plugin_id, type, occurred_at)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_audit_plugin_instance\",\n \"table_name\": \"plugin_audit_events\",\n \"sql\": \"CREATE INDEX idx_plugin_audit_plugin_instance ON plugin_audit_events(plugin_instance_id, type, occurred_at)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_diagnostics_plugin_instance\",\n \"table_name\": \"plugin_diagnostic_events\",\n \"sql\": \"CREATE INDEX idx_plugin_diagnostics_plugin_instance ON plugin_diagnostic_events(plugin_instance_id, type, severity, occurred_at)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_diagnostics_surface\",\n \"table_name\": \"plugin_diagnostic_events\",\n \"sql\": \"CREATE INDEX idx_plugin_diagnostics_surface ON plugin_diagnostic_events(surface_instance_id, severity, occurred_at)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_audit_events\",\n \"table_name\": \"plugin_audit_events\",\n \"sql\": \"CREATE TABLE plugin_audit_events ( seq INTEGER PRIMARY KEY, event_id TEXT NOT NULL, type TEXT NOT NULL, plugin_id TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, surface_id TEXT NOT NULL, surface_instance_id TEXT NOT NULL, request_id TEXT NOT NULL, actor TEXT NOT NULL, occurred_at INTEGER NOT NULL, details_json BLOB NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_diagnostic_events\",\n \"table_name\": \"plugin_diagnostic_events\",\n \"sql\": \"CREATE TABLE plugin_diagnostic_events ( seq INTEGER PRIMARY KEY, event_id TEXT NOT NULL, type TEXT NOT NULL, severity TEXT NOT NULL, message TEXT NOT NULL, plugin_id TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, surface_id TEXT NOT NULL, surface_instance_id TEXT NOT NULL, active_fingerprint TEXT NOT NULL, request_id TEXT NOT NULL, occurred_at INTEGER NOT NULL, details_json BLOB NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_observability_meta\",\n \"table_name\": \"plugin_observability_meta\",\n \"sql\": \"CREATE TABLE plugin_observability_meta ( id INTEGER PRIMARY KEY CHECK(id = 1), audit_seq INTEGER NOT NULL, diagnostic_seq INTEGER NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_observability_schema_migrations\",\n \"table_name\": \"plugin_observability_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_observability_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"00e4363c85aaab3cb78d9b357e835490f82975233ee44643a3e238d337da4784\"\n },\n {\n \"path\": \"db/operations.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_operation_schema_migrations\",\n \"versions\": [\n 1\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_operations_plugin_instance\",\n \"table_name\": \"plugin_operations\",\n \"sql\": \"CREATE INDEX idx_plugin_operations_plugin_instance ON plugin_operations(plugin_instance_id, created_at, operation_id)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_operations_status\",\n \"table_name\": \"plugin_operations\",\n \"sql\": \"CREATE INDEX idx_plugin_operations_status ON plugin_operations(status)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_operation_schema_migrations\",\n \"table_name\": \"plugin_operation_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_operation_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_operations\",\n \"table_name\": \"plugin_operations\",\n \"sql\": \"CREATE TABLE plugin_operations ( operation_id TEXT PRIMARY KEY, plugin_id TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, method TEXT NOT NULL, effect TEXT NOT NULL, execution TEXT NOT NULL, surface_instance_id TEXT NOT NULL, session_channel_id_hash TEXT NOT NULL, bridge_channel_id TEXT NOT NULL, status TEXT NOT NULL, disable_behavior TEXT NOT NULL, uninstall_behavior TEXT NOT NULL, reason TEXT NOT NULL, created_at INTEGER NOT NULL, updated_at INTEGER NOT NULL, cancel_requested_at INTEGER, orphaned_at INTEGER )\"\n }\n ],\n \"schema_sha256\": \"6b89150e03769f618c994f6906f4b588cfaf95159bfd111bd44cfde37b7ff681\"\n },\n {\n \"path\": \"db/permissions.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_permission_schema_migrations\",\n \"versions\": [\n 1\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_permission_grants_plugin\",\n \"table_name\": \"plugin_permission_grants\",\n \"sql\": \"CREATE INDEX idx_plugin_permission_grants_plugin ON plugin_permission_grants(plugin_instance_id, permission_id)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_permission_grants_revoked\",\n \"table_name\": \"plugin_permission_grants\",\n \"sql\": \"CREATE INDEX idx_plugin_permission_grants_revoked ON plugin_permission_grants(plugin_instance_id, revoked_at, expires_at)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_permission_grants\",\n \"table_name\": \"plugin_permission_grants\",\n \"sql\": \"CREATE TABLE plugin_permission_grants ( plugin_instance_id TEXT NOT NULL, permission_id TEXT NOT NULL, effect TEXT NOT NULL, granted_by TEXT NOT NULL, granted_at INTEGER NOT NULL, expires_at INTEGER, revoked_at INTEGER, revoked_by TEXT NOT NULL, revoked_reason TEXT NOT NULL, PRIMARY KEY(plugin_instance_id, permission_id) )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_permission_schema_migrations\",\n \"table_name\": \"plugin_permission_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_permission_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"d0b89affc5139c3ae28f0bd178094ceef0046f25b9b27f9b4e1b231624436f46\"\n },\n {\n \"path\": \"db/registry.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 5,\n \"migration_versions\": [\n {\n \"table\": \"plugin_registry_schema_migrations\",\n \"versions\": [\n 1,\n 2,\n 3,\n 4,\n 5\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_records_deleted_at\",\n \"table_name\": \"plugin_records\",\n \"sql\": \"CREATE INDEX idx_plugin_records_deleted_at ON plugin_records(deleted_at)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_records_plugin_id\",\n \"table_name\": \"plugin_records\",\n \"sql\": \"CREATE INDEX idx_plugin_records_plugin_id ON plugin_records(plugin_id)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_records\",\n \"table_name\": \"plugin_records\",\n \"sql\": \"CREATE TABLE plugin_records ( plugin_instance_id TEXT PRIMARY KEY, publisher_id TEXT NOT NULL, plugin_id TEXT NOT NULL, version TEXT NOT NULL, active_fingerprint TEXT NOT NULL, package_hash TEXT NOT NULL, manifest_hash TEXT NOT NULL, entries_hash TEXT NOT NULL, trust_state TEXT NOT NULL, trust_assessment_json TEXT NOT NULL DEFAULT '{}', source_policy_snapshot_hash TEXT NOT NULL DEFAULT '', source_policy_snapshot_json TEXT NOT NULL DEFAULT '{}', local_import_provenance_json TEXT NOT NULL DEFAULT '{}', enable_state TEXT NOT NULL, disabled_reason TEXT NOT NULL, retained_data_state TEXT NOT NULL, policy_revision INTEGER NOT NULL, management_revision INTEGER NOT NULL, revoke_epoch INTEGER NOT NULL, manifest_json TEXT NOT NULL, package_entries_json TEXT NOT NULL, version_history_json TEXT NOT NULL, installed_at INTEGER NOT NULL, enabled_at INTEGER, updated_at INTEGER NOT NULL, deleted_at INTEGER, metadata_json TEXT NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_registry_schema_migrations\",\n \"table_name\": \"plugin_registry_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_registry_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_source_security_floors\",\n \"table_name\": \"plugin_source_security_floors\",\n \"sql\": \"CREATE TABLE plugin_source_security_floors ( source_id TEXT PRIMARY KEY, policy_epoch TEXT NOT NULL, key_rotation_epoch TEXT NOT NULL, revocation_epoch TEXT NOT NULL, source_policy_snapshot_hash TEXT NOT NULL, revocation_metadata_sha256 TEXT NOT NULL, updated_at INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"e04fe43561aa4e42626060f74912c0fae5dca60a23f32b95e2c219a37b722a3f\"\n },\n {\n \"path\": \"db/retained_data.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_retained_data_schema_migrations\",\n \"versions\": [\n 2\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_retained_data_expiry\",\n \"table_name\": \"plugin_retained_data_records\",\n \"sql\": \"CREATE INDEX idx_plugin_retained_data_expiry ON plugin_retained_data_records(state, delete_after)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_retained_data_identity\",\n \"table_name\": \"plugin_retained_data_records\",\n \"sql\": \"CREATE INDEX idx_plugin_retained_data_identity ON plugin_retained_data_records(publisher_id, plugin_id, state)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_retained_data_source\",\n \"table_name\": \"plugin_retained_data_records\",\n \"sql\": \"CREATE INDEX idx_plugin_retained_data_source ON plugin_retained_data_records(source_plugin_instance_id)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_retained_data_records\",\n \"table_name\": \"plugin_retained_data_records\",\n \"sql\": \"CREATE TABLE plugin_retained_data_records ( retained_id TEXT PRIMARY KEY, source_plugin_instance_id TEXT NOT NULL, bound_plugin_instance_id TEXT NOT NULL, publisher_id TEXT NOT NULL, plugin_id TEXT NOT NULL, version TEXT NOT NULL, package_hash TEXT NOT NULL, manifest_hash TEXT NOT NULL, state TEXT NOT NULL, storage_retained INTEGER NOT NULL, settings_retained INTEGER NOT NULL, usage_bytes INTEGER NOT NULL, delete_after INTEGER, delete_error TEXT NOT NULL, metadata_json TEXT NOT NULL, retained_at INTEGER NOT NULL, updated_at INTEGER NOT NULL, bound_at INTEGER, deleted_at INTEGER, last_accessed_at INTEGER )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_retained_data_schema_migrations\",\n \"table_name\": \"plugin_retained_data_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_retained_data_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"b89b7188f7e7d96827750396b1fbf807b607695d342e87a5d5c5aefb832cb1d6\"\n },\n {\n \"path\": \"db/secrets.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_secret_schema_migrations\",\n \"versions\": [\n 1\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_secret_bindings_plugin\",\n \"table_name\": \"plugin_secret_bindings\",\n \"sql\": \"CREATE INDEX idx_plugin_secret_bindings_plugin ON plugin_secret_bindings(plugin_instance_id, bound, updated_at)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_secret_bindings\",\n \"table_name\": \"plugin_secret_bindings\",\n \"sql\": \"CREATE TABLE plugin_secret_bindings ( plugin_instance_id TEXT NOT NULL, secret_ref TEXT NOT NULL, scope TEXT NOT NULL, bound INTEGER NOT NULL, last_test_status TEXT NOT NULL, bound_at INTEGER, tested_at INTEGER, deleted_at INTEGER, updated_at INTEGER NOT NULL, PRIMARY KEY(plugin_instance_id, scope, secret_ref) )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_secret_schema_migrations\",\n \"table_name\": \"plugin_secret_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_secret_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"82a9d6ab404b4d3dc485ef1ea9c95530af4460a48506e47ced81953c4b12dd50\"\n },\n {\n \"path\": \"db/security_policy.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_security_policy_schema_migrations\",\n \"versions\": [\n 1\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"table\",\n \"name\": \"plugin_security_policies\",\n \"table_name\": \"plugin_security_policies\",\n \"sql\": \"CREATE TABLE plugin_security_policies ( plugin_instance_id TEXT PRIMARY KEY, updated_at INTEGER NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_security_policy_allowed_permissions\",\n \"table_name\": \"plugin_security_policy_allowed_permissions\",\n \"sql\": \"CREATE TABLE plugin_security_policy_allowed_permissions ( plugin_instance_id TEXT NOT NULL, permission_id TEXT NOT NULL, updated_at INTEGER NOT NULL, PRIMARY KEY(plugin_instance_id, permission_id), FOREIGN KEY(plugin_instance_id) REFERENCES plugin_security_policies(plugin_instance_id) ON DELETE CASCADE )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_security_policy_denied_methods\",\n \"table_name\": \"plugin_security_policy_denied_methods\",\n \"sql\": \"CREATE TABLE plugin_security_policy_denied_methods ( plugin_instance_id TEXT NOT NULL, method TEXT NOT NULL, updated_at INTEGER NOT NULL, PRIMARY KEY(plugin_instance_id, method), FOREIGN KEY(plugin_instance_id) REFERENCES plugin_security_policies(plugin_instance_id) ON DELETE CASCADE )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_security_policy_schema_migrations\",\n \"table_name\": \"plugin_security_policy_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_security_policy_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"8718fac16ca2cf37e84edd53f6d1c646f2d42e028af2dcc7aee05bdd9bc22dd6\"\n },\n {\n \"path\": \"db/settings.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_settings_schema_migrations\",\n \"versions\": [\n 1\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_settings_archives_source\",\n \"table_name\": \"plugin_settings_archives\",\n \"sql\": \"CREATE INDEX idx_plugin_settings_archives_source ON plugin_settings_archives(source_plugin_instance_id, created_at)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_settings_records_state\",\n \"table_name\": \"plugin_settings_records\",\n \"sql\": \"CREATE INDEX idx_plugin_settings_records_state ON plugin_settings_records(state, retained_at)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_settings_archives\",\n \"table_name\": \"plugin_settings_archives\",\n \"sql\": \"CREATE TABLE plugin_settings_archives ( archive_ref TEXT PRIMARY KEY, source_plugin_instance_id TEXT NOT NULL, include_secrets INTEGER NOT NULL, schema_version INTEGER NOT NULL, settings_revision INTEGER NOT NULL, created_at INTEGER NOT NULL, updated_at INTEGER NOT NULL, payload_json BLOB NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_settings_meta\",\n \"table_name\": \"plugin_settings_meta\",\n \"sql\": \"CREATE TABLE plugin_settings_meta ( id INTEGER PRIMARY KEY CHECK(id = 1), next_export INTEGER NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_settings_records\",\n \"table_name\": \"plugin_settings_records\",\n \"sql\": \"CREATE TABLE plugin_settings_records ( plugin_instance_id TEXT PRIMARY KEY, state TEXT NOT NULL, schema_version INTEGER NOT NULL, settings_revision INTEGER NOT NULL, updated_at INTEGER NOT NULL, retained_at INTEGER, payload_json BLOB NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_settings_schema_migrations\",\n \"table_name\": \"plugin_settings_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_settings_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"dba0083a1fa88135d6ab50cd0176063688134e684577563022200906a0d5702a\"\n },\n {\n \"path\": \"db/streams.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_stream_schema_migrations\",\n \"versions\": [\n 1\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_stream_events_stream_sequence\",\n \"table_name\": \"plugin_stream_events\",\n \"sql\": \"CREATE INDEX idx_plugin_stream_events_stream_sequence ON plugin_stream_events(stream_id, sequence)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_streams_plugin_instance\",\n \"table_name\": \"plugin_streams\",\n \"sql\": \"CREATE INDEX idx_plugin_streams_plugin_instance ON plugin_streams(plugin_instance_id, created_at, stream_id)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_streams_status\",\n \"table_name\": \"plugin_streams\",\n \"sql\": \"CREATE INDEX idx_plugin_streams_status ON plugin_streams(status)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_stream_events\",\n \"table_name\": \"plugin_stream_events\",\n \"sql\": \"CREATE TABLE plugin_stream_events ( stream_id TEXT NOT NULL, sequence INTEGER NOT NULL, kind TEXT NOT NULL, data BLOB, error TEXT NOT NULL, at INTEGER NOT NULL, PRIMARY KEY(stream_id, sequence), FOREIGN KEY(stream_id) REFERENCES plugin_streams(stream_id) ON DELETE CASCADE )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_stream_schema_migrations\",\n \"table_name\": \"plugin_stream_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_stream_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_streams\",\n \"table_name\": \"plugin_streams\",\n \"sql\": \"CREATE TABLE plugin_streams ( stream_id TEXT PRIMARY KEY, plugin_id TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, method TEXT NOT NULL, effect TEXT NOT NULL, execution TEXT NOT NULL, surface_instance_id TEXT NOT NULL, owner_session_hash TEXT NOT NULL, owner_user_hash TEXT NOT NULL, session_channel_id_hash TEXT NOT NULL, bridge_channel_id TEXT NOT NULL, direction TEXT NOT NULL, status TEXT NOT NULL, content_type TEXT NOT NULL, max_buffered_bytes INTEGER NOT NULL, buffered_bytes INTEGER NOT NULL, created_at INTEGER NOT NULL, updated_at INTEGER NOT NULL, closed_at INTEGER )\"\n }\n ],\n \"schema_sha256\": \"7d2200868c7bd271be8a78cd42aea861bdc2fe46dbc714b08bb4d6251c7510d9\"\n }\n ],\n \"tree_rules\": {\n \"allowed_kinds\": [\n \"directory\",\n \"file\"\n ],\n \"allow_sqlite_wal_shm\": true,\n \"reject_hardlinks\": true,\n \"reject_symlinks\": true,\n \"variable_trees\": [\n \"assets\",\n \"storage\",\n \"trust\"\n ],\n \"optional_files\": []\n }\n },\n {\n \"id\": \"redeven-redevplugin-v0.3.x-v0.4.x-layout-v1\",\n \"platform_versions\": [\n \"0.3.0\",\n \"0.3.1\",\n \"0.3.2\",\n \"0.4.0\",\n \"0.4.1\",\n \"0.4.2\",\n \"0.4.3\"\n ],\n \"root_entries\": [\n {\n \"path\": \"assets\",\n \"kind\": \"directory\",\n \"scope\": \"durable\",\n \"disposition\": \"quarantine\",\n \"required\": true\n },\n {\n \"path\": \"db\",\n \"kind\": \"directory\",\n \"scope\": \"durable\",\n \"disposition\": \"quarantine\",\n \"required\": true\n },\n {\n \"path\": \"storage\",\n \"kind\": \"directory\",\n \"scope\": \"durable\",\n \"disposition\": \"quarantine\",\n \"required\": true\n },\n {\n \"path\": \"trust\",\n \"kind\": \"directory\",\n \"scope\": \"durable\",\n \"disposition\": \"quarantine\",\n \"required\": false\n }\n ],\n \"sqlite_databases\": [\n {\n \"path\": \"db/cleanup.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_cleanup_schema_migrations\",\n \"versions\": [\n 1\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_cleanup_operations_plugin\",\n \"table_name\": \"plugin_cleanup_operations\",\n \"sql\": \"CREATE INDEX idx_plugin_cleanup_operations_plugin ON plugin_cleanup_operations(plugin_instance_id, id)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_cleanup_operations\",\n \"table_name\": \"plugin_cleanup_operations\",\n \"sql\": \"CREATE TABLE plugin_cleanup_operations ( id INTEGER PRIMARY KEY AUTOINCREMENT, plugin_instance_id TEXT NOT NULL, delete_data INTEGER NOT NULL, phase TEXT NOT NULL, executed_at INTEGER NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_cleanup_schema_migrations\",\n \"table_name\": \"plugin_cleanup_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_cleanup_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"492e855ac577c347fd5c4a916b4be060d08e9703d9deec197bcb1a75a0de9dcc\"\n },\n {\n \"path\": \"db/confirmation_intents.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_confirmation_intent_schema_migrations\",\n \"versions\": [\n 2\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_confirmation_intents_expires_at\",\n \"table_name\": \"plugin_confirmation_intents\",\n \"sql\": \"CREATE INDEX idx_plugin_confirmation_intents_expires_at ON plugin_confirmation_intents(expires_at)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_confirmation_intents_plugin_instance\",\n \"table_name\": \"plugin_confirmation_intents\",\n \"sql\": \"CREATE INDEX idx_plugin_confirmation_intents_plugin_instance ON plugin_confirmation_intents(plugin_instance_id, issued_at, confirmation_id)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_confirmation_intent_schema_migrations\",\n \"table_name\": \"plugin_confirmation_intent_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_confirmation_intent_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_confirmation_intents\",\n \"table_name\": \"plugin_confirmation_intents\",\n \"sql\": \"CREATE TABLE plugin_confirmation_intents ( confirmation_id TEXT PRIMARY KEY, confirmation_token_id TEXT NOT NULL, plugin_id TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, surface_instance_id TEXT NOT NULL, bridge_channel_id TEXT NOT NULL, method TEXT NOT NULL, request_hash TEXT NOT NULL, plan_hash TEXT NOT NULL, scope_json TEXT NOT NULL DEFAULT '{}', issued_at INTEGER NOT NULL, expires_at INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"dcf763fdc6333835180e6f38565d3d07b8b769100cdcfbec265d1a3d474ab479\"\n },\n {\n \"path\": \"db/install_stage.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_install_stage_schema_migrations\",\n \"versions\": [\n 1\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_install_stages_plugin\",\n \"table_name\": \"plugin_install_stages\",\n \"sql\": \"CREATE INDEX idx_plugin_install_stages_plugin ON plugin_install_stages(plugin_instance_id, created_at)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_install_stages_status_expiry\",\n \"table_name\": \"plugin_install_stages\",\n \"sql\": \"CREATE INDEX idx_plugin_install_stages_status_expiry ON plugin_install_stages(status, expires_at)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_install_stage_schema_migrations\",\n \"table_name\": \"plugin_install_stage_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_install_stage_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_install_stages\",\n \"table_name\": \"plugin_install_stages\",\n \"sql\": \"CREATE TABLE plugin_install_stages ( stage_id TEXT PRIMARY KEY, action TEXT NOT NULL, status TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, publisher_id TEXT NOT NULL, plugin_id TEXT NOT NULL, version TEXT NOT NULL, package_hash TEXT NOT NULL, manifest_hash TEXT NOT NULL, entries_hash TEXT NOT NULL, requested_trust TEXT NOT NULL, resolved_trust TEXT NOT NULL, validation_summary_json TEXT NOT NULL, error_code TEXT NOT NULL, error_message TEXT NOT NULL, expires_at INTEGER NOT NULL, created_at INTEGER NOT NULL, updated_at INTEGER NOT NULL, finished_at INTEGER )\"\n }\n ],\n \"schema_sha256\": \"ee0192641f33bba6c7fc5994d73e2a64e77c129406bd3c2ccfc840780c3cef6a\"\n },\n {\n \"path\": \"db/observability.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_observability_schema_migrations\",\n \"versions\": [\n 1\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_audit_plugin\",\n \"table_name\": \"plugin_audit_events\",\n \"sql\": \"CREATE INDEX idx_plugin_audit_plugin ON plugin_audit_events(plugin_id, type, occurred_at)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_audit_plugin_instance\",\n \"table_name\": \"plugin_audit_events\",\n \"sql\": \"CREATE INDEX idx_plugin_audit_plugin_instance ON plugin_audit_events(plugin_instance_id, type, occurred_at)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_diagnostics_plugin_instance\",\n \"table_name\": \"plugin_diagnostic_events\",\n \"sql\": \"CREATE INDEX idx_plugin_diagnostics_plugin_instance ON plugin_diagnostic_events(plugin_instance_id, type, severity, occurred_at)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_diagnostics_surface\",\n \"table_name\": \"plugin_diagnostic_events\",\n \"sql\": \"CREATE INDEX idx_plugin_diagnostics_surface ON plugin_diagnostic_events(surface_instance_id, severity, occurred_at)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_audit_events\",\n \"table_name\": \"plugin_audit_events\",\n \"sql\": \"CREATE TABLE plugin_audit_events ( seq INTEGER PRIMARY KEY, event_id TEXT NOT NULL, type TEXT NOT NULL, plugin_id TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, surface_id TEXT NOT NULL, surface_instance_id TEXT NOT NULL, request_id TEXT NOT NULL, actor TEXT NOT NULL, occurred_at INTEGER NOT NULL, details_json BLOB NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_diagnostic_events\",\n \"table_name\": \"plugin_diagnostic_events\",\n \"sql\": \"CREATE TABLE plugin_diagnostic_events ( seq INTEGER PRIMARY KEY, event_id TEXT NOT NULL, type TEXT NOT NULL, severity TEXT NOT NULL, message TEXT NOT NULL, plugin_id TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, surface_id TEXT NOT NULL, surface_instance_id TEXT NOT NULL, active_fingerprint TEXT NOT NULL, request_id TEXT NOT NULL, occurred_at INTEGER NOT NULL, details_json BLOB NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_observability_meta\",\n \"table_name\": \"plugin_observability_meta\",\n \"sql\": \"CREATE TABLE plugin_observability_meta ( id INTEGER PRIMARY KEY CHECK(id = 1), audit_seq INTEGER NOT NULL, diagnostic_seq INTEGER NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_observability_schema_migrations\",\n \"table_name\": \"plugin_observability_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_observability_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"00e4363c85aaab3cb78d9b357e835490f82975233ee44643a3e238d337da4784\"\n },\n {\n \"path\": \"db/operations.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_operation_schema_migrations\",\n \"versions\": [\n 2,\n 3\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_operations_plugin_instance\",\n \"table_name\": \"plugin_operations\",\n \"sql\": \"CREATE INDEX idx_plugin_operations_plugin_instance ON plugin_operations(plugin_instance_id, created_at, operation_id)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_operations_status\",\n \"table_name\": \"plugin_operations\",\n \"sql\": \"CREATE INDEX idx_plugin_operations_status ON plugin_operations(status)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_operation_schema_migrations\",\n \"table_name\": \"plugin_operation_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_operation_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_operations\",\n \"table_name\": \"plugin_operations\",\n \"sql\": \"CREATE TABLE plugin_operations ( operation_id TEXT PRIMARY KEY, plugin_id TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, method TEXT NOT NULL, effect TEXT NOT NULL, execution TEXT NOT NULL, surface_instance_id TEXT NOT NULL, session_channel_id_hash TEXT NOT NULL, bridge_channel_id TEXT NOT NULL, execution_binding_json TEXT NOT NULL DEFAULT '{}', status TEXT NOT NULL, cancelable INTEGER NOT NULL DEFAULT 1, cancel_ack_timeout_ms INTEGER NOT NULL DEFAULT 0, disable_behavior TEXT NOT NULL, uninstall_behavior TEXT NOT NULL, reason TEXT NOT NULL, created_at INTEGER NOT NULL, updated_at INTEGER NOT NULL, cancel_requested_at INTEGER, orphaned_at INTEGER )\"\n }\n ],\n \"schema_sha256\": \"7d5d2e372f7a8ded7678f87bbc115d4c2b69d07de7b8b6eb929bad94b516ac1c\"\n },\n {\n \"path\": \"db/permissions.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_permission_schema_migrations\",\n \"versions\": [\n 1\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_permission_grants_plugin\",\n \"table_name\": \"plugin_permission_grants\",\n \"sql\": \"CREATE INDEX idx_plugin_permission_grants_plugin ON plugin_permission_grants(plugin_instance_id, permission_id)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_permission_grants_revoked\",\n \"table_name\": \"plugin_permission_grants\",\n \"sql\": \"CREATE INDEX idx_plugin_permission_grants_revoked ON plugin_permission_grants(plugin_instance_id, revoked_at, expires_at)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_permission_grants\",\n \"table_name\": \"plugin_permission_grants\",\n \"sql\": \"CREATE TABLE plugin_permission_grants ( plugin_instance_id TEXT NOT NULL, permission_id TEXT NOT NULL, effect TEXT NOT NULL, granted_by TEXT NOT NULL, granted_at INTEGER NOT NULL, expires_at INTEGER, revoked_at INTEGER, revoked_by TEXT NOT NULL, revoked_reason TEXT NOT NULL, PRIMARY KEY(plugin_instance_id, permission_id) )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_permission_schema_migrations\",\n \"table_name\": \"plugin_permission_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_permission_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"d0b89affc5139c3ae28f0bd178094ceef0046f25b9b27f9b4e1b231624436f46\"\n },\n {\n \"path\": \"db/registry.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 6,\n \"migration_versions\": [\n {\n \"table\": \"plugin_registry_schema_migrations\",\n \"versions\": [\n 1,\n 2,\n 3,\n 4,\n 5,\n 6\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_records_deleted_at\",\n \"table_name\": \"plugin_records\",\n \"sql\": \"CREATE INDEX idx_plugin_records_deleted_at ON plugin_records(deleted_at)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_records_plugin_id\",\n \"table_name\": \"plugin_records\",\n \"sql\": \"CREATE INDEX idx_plugin_records_plugin_id ON plugin_records(plugin_id)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_records\",\n \"table_name\": \"plugin_records\",\n \"sql\": \"CREATE TABLE plugin_records ( plugin_instance_id TEXT PRIMARY KEY, publisher_id TEXT NOT NULL, plugin_id TEXT NOT NULL, version TEXT NOT NULL, active_fingerprint TEXT NOT NULL, package_hash TEXT NOT NULL, manifest_hash TEXT NOT NULL, entries_hash TEXT NOT NULL, trust_state TEXT NOT NULL, trust_assessment_json TEXT NOT NULL DEFAULT '{}', source_policy_snapshot_hash TEXT NOT NULL DEFAULT '', source_policy_snapshot_json TEXT NOT NULL DEFAULT '{}', local_import_provenance_json TEXT NOT NULL DEFAULT '{}', capability_contracts_json TEXT NOT NULL DEFAULT '[]', enable_state TEXT NOT NULL, disabled_reason TEXT NOT NULL, retained_data_state TEXT NOT NULL, policy_revision INTEGER NOT NULL, management_revision INTEGER NOT NULL, revoke_epoch INTEGER NOT NULL, manifest_json TEXT NOT NULL, package_entries_json TEXT NOT NULL, version_history_json TEXT NOT NULL, installed_at INTEGER NOT NULL, enabled_at INTEGER, updated_at INTEGER NOT NULL, deleted_at INTEGER, metadata_json TEXT NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_registry_schema_migrations\",\n \"table_name\": \"plugin_registry_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_registry_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_source_security_floors\",\n \"table_name\": \"plugin_source_security_floors\",\n \"sql\": \"CREATE TABLE plugin_source_security_floors ( source_id TEXT PRIMARY KEY, policy_epoch TEXT NOT NULL, key_rotation_epoch TEXT NOT NULL, revocation_epoch TEXT NOT NULL, source_policy_snapshot_hash TEXT NOT NULL, revocation_metadata_sha256 TEXT NOT NULL, updated_at INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"84f9a634f65a3efa7c3bc42b2625e77a26d854153f6d9ae6031f7b172a430b1e\"\n },\n {\n \"path\": \"db/retained_data.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_retained_data_schema_migrations\",\n \"versions\": [\n 2\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_retained_data_expiry\",\n \"table_name\": \"plugin_retained_data_records\",\n \"sql\": \"CREATE INDEX idx_plugin_retained_data_expiry ON plugin_retained_data_records(state, delete_after)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_retained_data_identity\",\n \"table_name\": \"plugin_retained_data_records\",\n \"sql\": \"CREATE INDEX idx_plugin_retained_data_identity ON plugin_retained_data_records(publisher_id, plugin_id, state)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_retained_data_source\",\n \"table_name\": \"plugin_retained_data_records\",\n \"sql\": \"CREATE INDEX idx_plugin_retained_data_source ON plugin_retained_data_records(source_plugin_instance_id)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_retained_data_records\",\n \"table_name\": \"plugin_retained_data_records\",\n \"sql\": \"CREATE TABLE plugin_retained_data_records ( retained_id TEXT PRIMARY KEY, source_plugin_instance_id TEXT NOT NULL, bound_plugin_instance_id TEXT NOT NULL, publisher_id TEXT NOT NULL, plugin_id TEXT NOT NULL, version TEXT NOT NULL, package_hash TEXT NOT NULL, manifest_hash TEXT NOT NULL, state TEXT NOT NULL, storage_retained INTEGER NOT NULL, settings_retained INTEGER NOT NULL, usage_bytes INTEGER NOT NULL, delete_after INTEGER, delete_error TEXT NOT NULL, metadata_json TEXT NOT NULL, retained_at INTEGER NOT NULL, updated_at INTEGER NOT NULL, bound_at INTEGER, deleted_at INTEGER, last_accessed_at INTEGER )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_retained_data_schema_migrations\",\n \"table_name\": \"plugin_retained_data_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_retained_data_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"b89b7188f7e7d96827750396b1fbf807b607695d342e87a5d5c5aefb832cb1d6\"\n },\n {\n \"path\": \"db/secrets.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_secret_schema_migrations\",\n \"versions\": [\n 1\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_secret_bindings_plugin\",\n \"table_name\": \"plugin_secret_bindings\",\n \"sql\": \"CREATE INDEX idx_plugin_secret_bindings_plugin ON plugin_secret_bindings(plugin_instance_id, bound, updated_at)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_secret_bindings\",\n \"table_name\": \"plugin_secret_bindings\",\n \"sql\": \"CREATE TABLE plugin_secret_bindings ( plugin_instance_id TEXT NOT NULL, secret_ref TEXT NOT NULL, scope TEXT NOT NULL, bound INTEGER NOT NULL, last_test_status TEXT NOT NULL, bound_at INTEGER, tested_at INTEGER, deleted_at INTEGER, updated_at INTEGER NOT NULL, PRIMARY KEY(plugin_instance_id, scope, secret_ref) )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_secret_schema_migrations\",\n \"table_name\": \"plugin_secret_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_secret_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"82a9d6ab404b4d3dc485ef1ea9c95530af4460a48506e47ced81953c4b12dd50\"\n },\n {\n \"path\": \"db/security_policy.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_security_policy_schema_migrations\",\n \"versions\": [\n 1\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"table\",\n \"name\": \"plugin_security_policies\",\n \"table_name\": \"plugin_security_policies\",\n \"sql\": \"CREATE TABLE plugin_security_policies ( plugin_instance_id TEXT PRIMARY KEY, updated_at INTEGER NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_security_policy_allowed_permissions\",\n \"table_name\": \"plugin_security_policy_allowed_permissions\",\n \"sql\": \"CREATE TABLE plugin_security_policy_allowed_permissions ( plugin_instance_id TEXT NOT NULL, permission_id TEXT NOT NULL, updated_at INTEGER NOT NULL, PRIMARY KEY(plugin_instance_id, permission_id), FOREIGN KEY(plugin_instance_id) REFERENCES plugin_security_policies(plugin_instance_id) ON DELETE CASCADE )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_security_policy_denied_methods\",\n \"table_name\": \"plugin_security_policy_denied_methods\",\n \"sql\": \"CREATE TABLE plugin_security_policy_denied_methods ( plugin_instance_id TEXT NOT NULL, method TEXT NOT NULL, updated_at INTEGER NOT NULL, PRIMARY KEY(plugin_instance_id, method), FOREIGN KEY(plugin_instance_id) REFERENCES plugin_security_policies(plugin_instance_id) ON DELETE CASCADE )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_security_policy_schema_migrations\",\n \"table_name\": \"plugin_security_policy_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_security_policy_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"8718fac16ca2cf37e84edd53f6d1c646f2d42e028af2dcc7aee05bdd9bc22dd6\"\n },\n {\n \"path\": \"db/settings.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_settings_schema_migrations\",\n \"versions\": [\n 1\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_settings_archives_source\",\n \"table_name\": \"plugin_settings_archives\",\n \"sql\": \"CREATE INDEX idx_plugin_settings_archives_source ON plugin_settings_archives(source_plugin_instance_id, created_at)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_settings_records_state\",\n \"table_name\": \"plugin_settings_records\",\n \"sql\": \"CREATE INDEX idx_plugin_settings_records_state ON plugin_settings_records(state, retained_at)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_settings_archives\",\n \"table_name\": \"plugin_settings_archives\",\n \"sql\": \"CREATE TABLE plugin_settings_archives ( archive_ref TEXT PRIMARY KEY, source_plugin_instance_id TEXT NOT NULL, include_secrets INTEGER NOT NULL, schema_version INTEGER NOT NULL, settings_revision INTEGER NOT NULL, created_at INTEGER NOT NULL, updated_at INTEGER NOT NULL, payload_json BLOB NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_settings_meta\",\n \"table_name\": \"plugin_settings_meta\",\n \"sql\": \"CREATE TABLE plugin_settings_meta ( id INTEGER PRIMARY KEY CHECK(id = 1), next_export INTEGER NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_settings_records\",\n \"table_name\": \"plugin_settings_records\",\n \"sql\": \"CREATE TABLE plugin_settings_records ( plugin_instance_id TEXT PRIMARY KEY, state TEXT NOT NULL, schema_version INTEGER NOT NULL, settings_revision INTEGER NOT NULL, updated_at INTEGER NOT NULL, retained_at INTEGER, payload_json BLOB NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_settings_schema_migrations\",\n \"table_name\": \"plugin_settings_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_settings_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"dba0083a1fa88135d6ab50cd0176063688134e684577563022200906a0d5702a\"\n },\n {\n \"path\": \"db/streams.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [\n {\n \"table\": \"plugin_stream_schema_migrations\",\n \"versions\": [\n 2,\n 3\n ]\n }\n ],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_stream_events_stream_sequence\",\n \"table_name\": \"plugin_stream_events\",\n \"sql\": \"CREATE INDEX idx_plugin_stream_events_stream_sequence ON plugin_stream_events(stream_id, sequence)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_streams_plugin_instance\",\n \"table_name\": \"plugin_streams\",\n \"sql\": \"CREATE INDEX idx_plugin_streams_plugin_instance ON plugin_streams(plugin_instance_id, created_at, stream_id)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_streams_status\",\n \"table_name\": \"plugin_streams\",\n \"sql\": \"CREATE INDEX idx_plugin_streams_status ON plugin_streams(status)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_stream_events\",\n \"table_name\": \"plugin_stream_events\",\n \"sql\": \"CREATE TABLE plugin_stream_events ( stream_id TEXT NOT NULL, sequence INTEGER NOT NULL, kind TEXT NOT NULL, data BLOB, error TEXT NOT NULL, at INTEGER NOT NULL, PRIMARY KEY(stream_id, sequence), FOREIGN KEY(stream_id) REFERENCES plugin_streams(stream_id) ON DELETE CASCADE )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_stream_schema_migrations\",\n \"table_name\": \"plugin_stream_schema_migrations\",\n \"sql\": \"CREATE TABLE plugin_stream_schema_migrations ( version INTEGER PRIMARY KEY, applied_at INTEGER NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_streams\",\n \"table_name\": \"plugin_streams\",\n \"sql\": \"CREATE TABLE plugin_streams ( stream_id TEXT PRIMARY KEY, plugin_id TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, method TEXT NOT NULL, effect TEXT NOT NULL, execution TEXT NOT NULL, surface_instance_id TEXT NOT NULL, owner_session_hash TEXT NOT NULL, owner_user_hash TEXT NOT NULL, session_channel_id_hash TEXT NOT NULL, bridge_channel_id TEXT NOT NULL, execution_binding_json TEXT NOT NULL DEFAULT '{}', direction TEXT NOT NULL, status TEXT NOT NULL, reason TEXT NOT NULL DEFAULT '', content_type TEXT NOT NULL, max_buffered_bytes INTEGER NOT NULL, buffered_bytes INTEGER NOT NULL, created_at INTEGER NOT NULL, updated_at INTEGER NOT NULL, closed_at INTEGER )\"\n }\n ],\n \"schema_sha256\": \"955856942aa0c74f96a1f1e02f7b406f71007d4eff40e7d6836d45ba85459690\"\n }\n ],\n \"tree_rules\": {\n \"allowed_kinds\": [\n \"directory\",\n \"file\"\n ],\n \"allow_sqlite_wal_shm\": true,\n \"reject_hardlinks\": true,\n \"reject_symlinks\": true,\n \"variable_trees\": [\n \"assets\",\n \"storage\",\n \"trust\"\n ],\n \"optional_files\": []\n }\n },\n {\n \"id\": \"redeven-redevplugin-v0.5.x-layout-v1\",\n \"platform_versions\": [\n \"0.5.0\",\n \"0.5.1\"\n ],\n \"root_entries\": [\n {\n \"path\": \"assets\",\n \"kind\": \"directory\",\n \"scope\": \"durable\",\n \"disposition\": \"quarantine\",\n \"required\": true\n },\n {\n \"path\": \"db\",\n \"kind\": \"directory\",\n \"scope\": \"durable\",\n \"disposition\": \"quarantine\",\n \"required\": true\n },\n {\n \"path\": \"storage\",\n \"kind\": \"directory\",\n \"scope\": \"durable\",\n \"disposition\": \"quarantine\",\n \"required\": true\n },\n {\n \"path\": \"trust\",\n \"kind\": \"directory\",\n \"scope\": \"durable\",\n \"disposition\": \"quarantine\",\n \"required\": false\n }\n ],\n \"sqlite_databases\": [\n {\n \"path\": \"db/confirmation_intents.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_confirmation_intents_expires_at\",\n \"table_name\": \"plugin_confirmation_intents\",\n \"sql\": \"CREATE INDEX idx_plugin_confirmation_intents_expires_at ON plugin_confirmation_intents(expires_at)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_confirmation_intents_plugin_instance\",\n \"table_name\": \"plugin_confirmation_intents\",\n \"sql\": \"CREATE INDEX idx_plugin_confirmation_intents_plugin_instance ON plugin_confirmation_intents(plugin_instance_id, issued_at, confirmation_id)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_confirmation_intents\",\n \"table_name\": \"plugin_confirmation_intents\",\n \"sql\": \"CREATE TABLE plugin_confirmation_intents ( confirmation_id TEXT PRIMARY KEY, confirmation_token_id TEXT NOT NULL, plugin_id TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, surface_instance_id TEXT NOT NULL, bridge_channel_id TEXT NOT NULL, method TEXT NOT NULL, request_hash TEXT NOT NULL, plan_hash TEXT NOT NULL, scope_json TEXT NOT NULL DEFAULT '{}', issued_at INTEGER NOT NULL, expires_at INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"7eb520796c80550cceab8b71f8394f831122baaa1ac7a098420be86a4ad53cc9\"\n },\n {\n \"path\": \"db/install_stage.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_install_stages_plugin\",\n \"table_name\": \"plugin_install_stages\",\n \"sql\": \"CREATE INDEX idx_plugin_install_stages_plugin ON plugin_install_stages(owner_env_hash, plugin_instance_id, created_at)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_install_stages_status_expiry\",\n \"table_name\": \"plugin_install_stages\",\n \"sql\": \"CREATE INDEX idx_plugin_install_stages_status_expiry ON plugin_install_stages(owner_env_hash, status, expires_at)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_install_stages\",\n \"table_name\": \"plugin_install_stages\",\n \"sql\": \"CREATE TABLE plugin_install_stages ( owner_env_hash TEXT NOT NULL, stage_id TEXT NOT NULL, action TEXT NOT NULL, status TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, publisher_id TEXT NOT NULL, plugin_id TEXT NOT NULL, version TEXT NOT NULL, package_hash TEXT NOT NULL, manifest_hash TEXT NOT NULL, entries_hash TEXT NOT NULL, requested_trust TEXT NOT NULL, resolved_trust TEXT NOT NULL, validation_summary_json TEXT NOT NULL, error_code TEXT NOT NULL, error_message TEXT NOT NULL, expires_at INTEGER NOT NULL, created_at INTEGER NOT NULL, updated_at INTEGER NOT NULL, finished_at INTEGER, PRIMARY KEY(owner_env_hash, stage_id) )\"\n }\n ],\n \"schema_sha256\": \"aa45772cf36b9005142d210fb2e1a2b2b23a9012ed25cd587ad8d89235f2134b\"\n },\n {\n \"path\": \"db/observability.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_audit_event_id\",\n \"table_name\": \"plugin_audit_events\",\n \"sql\": \"CREATE UNIQUE INDEX idx_plugin_audit_event_id ON plugin_audit_events(event_id)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_diagnostics_owner\",\n \"table_name\": \"plugin_diagnostic_events\",\n \"sql\": \"CREATE INDEX idx_plugin_diagnostics_owner ON plugin_diagnostic_events(owner_session_hash, owner_user_hash, owner_env_hash, session_channel_id_hash, occurred_at)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_diagnostics_plugin_instance\",\n \"table_name\": \"plugin_diagnostic_events\",\n \"sql\": \"CREATE INDEX idx_plugin_diagnostics_plugin_instance ON plugin_diagnostic_events(plugin_instance_id, type, severity, occurred_at)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_diagnostics_surface\",\n \"table_name\": \"plugin_diagnostic_events\",\n \"sql\": \"CREATE INDEX idx_plugin_diagnostics_surface ON plugin_diagnostic_events(surface_instance_id, severity, occurred_at)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_security_audit_journal_exported\",\n \"table_name\": \"plugin_security_audit_journal\",\n \"sql\": \"CREATE INDEX idx_plugin_security_audit_journal_exported ON plugin_security_audit_journal(seq) WHERE exported_at IS NOT NULL\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_security_audit_journal_state\",\n \"table_name\": \"plugin_security_audit_journal\",\n \"sql\": \"CREATE INDEX idx_plugin_security_audit_journal_state ON plugin_security_audit_journal(state, exported_at, seq)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_audit_events\",\n \"table_name\": \"plugin_audit_events\",\n \"sql\": \"CREATE TABLE plugin_audit_events ( seq INTEGER PRIMARY KEY, event_id TEXT NOT NULL, type TEXT NOT NULL, plugin_id TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, surface_id TEXT NOT NULL, surface_instance_id TEXT NOT NULL, request_id TEXT NOT NULL, actor TEXT NOT NULL, occurred_at INTEGER NOT NULL, details_json BLOB NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_diagnostic_events\",\n \"table_name\": \"plugin_diagnostic_events\",\n \"sql\": \"CREATE TABLE plugin_diagnostic_events ( seq INTEGER PRIMARY KEY, event_id TEXT NOT NULL, type TEXT NOT NULL, severity TEXT NOT NULL, message TEXT NOT NULL, plugin_id TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, surface_id TEXT NOT NULL, surface_instance_id TEXT NOT NULL, active_fingerprint TEXT NOT NULL, request_id TEXT NOT NULL, correlation_id TEXT NOT NULL DEFAULT '', mutation_outcome TEXT NOT NULL DEFAULT '' CHECK(mutation_outcome IN ('', 'committed', 'not_committed', 'unknown')), owner_session_hash TEXT NOT NULL, owner_user_hash TEXT NOT NULL, owner_env_hash TEXT NOT NULL, session_channel_id_hash TEXT NOT NULL, occurred_at INTEGER NOT NULL, details_json BLOB NOT NULL, failure_code TEXT NOT NULL DEFAULT '', failure_component TEXT NOT NULL DEFAULT '', failure_operation TEXT NOT NULL DEFAULT '' )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_observability_meta\",\n \"table_name\": \"plugin_observability_meta\",\n \"sql\": \"CREATE TABLE plugin_observability_meta ( id INTEGER PRIMARY KEY CHECK(id = 1), audit_seq INTEGER NOT NULL, diagnostic_seq INTEGER NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_security_audit_journal\",\n \"table_name\": \"plugin_security_audit_journal\",\n \"sql\": \"CREATE TABLE plugin_security_audit_journal ( seq INTEGER PRIMARY KEY, event_id TEXT NOT NULL UNIQUE, type TEXT NOT NULL, plugin_id TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, surface_id TEXT NOT NULL, surface_instance_id TEXT NOT NULL, request_id TEXT NOT NULL, actor TEXT NOT NULL, occurred_at INTEGER NOT NULL, details_json BLOB NOT NULL, state TEXT NOT NULL CHECK(state IN ('pending', 'completed')), mutation_outcome TEXT NOT NULL, completion_details_json BLOB NOT NULL, created_at INTEGER NOT NULL, completed_at INTEGER, exported_at INTEGER )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_security_audit_meta\",\n \"table_name\": \"plugin_security_audit_meta\",\n \"sql\": \"CREATE TABLE plugin_security_audit_meta ( id INTEGER PRIMARY KEY CHECK(id = 1), seq INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"230d789557736cc47b4c0d760d46a4c58ce7575f57e4779e010db5539865c666\"\n },\n {\n \"path\": \"db/operations.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_operations_created\",\n \"table_name\": \"plugin_operations\",\n \"sql\": \"CREATE INDEX idx_plugin_operations_created ON plugin_operations(created_at DESC, operation_id DESC)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_operations_owner\",\n \"table_name\": \"plugin_operations\",\n \"sql\": \"CREATE INDEX idx_plugin_operations_owner ON plugin_operations(owner_session_hash, owner_user_hash, owner_env_hash, session_channel_id_hash, created_at DESC, operation_id DESC)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_operations_owner_plugin_instance\",\n \"table_name\": \"plugin_operations\",\n \"sql\": \"CREATE INDEX idx_plugin_operations_owner_plugin_instance ON plugin_operations(owner_env_hash, plugin_instance_id, created_at DESC, operation_id DESC)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_operations_owner_plugin_session\",\n \"table_name\": \"plugin_operations\",\n \"sql\": \"CREATE INDEX idx_plugin_operations_owner_plugin_session ON plugin_operations(owner_env_hash, plugin_instance_id, owner_session_hash, owner_user_hash, session_channel_id_hash, created_at DESC, operation_id DESC)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_operations_owner_terminal_retention\",\n \"table_name\": \"plugin_operations\",\n \"sql\": \"CREATE INDEX idx_plugin_operations_owner_terminal_retention ON plugin_operations(owner_env_hash, plugin_instance_id, terminal_at DESC, operation_id DESC) WHERE terminal_at IS NOT NULL\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_operations_plugin_instance\",\n \"table_name\": \"plugin_operations\",\n \"sql\": \"CREATE INDEX idx_plugin_operations_plugin_instance ON plugin_operations(plugin_instance_id, created_at DESC, operation_id DESC)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_operations_plugin_owner\",\n \"table_name\": \"plugin_operations\",\n \"sql\": \"CREATE INDEX idx_plugin_operations_plugin_owner ON plugin_operations(plugin_instance_id, owner_session_hash, owner_user_hash, owner_env_hash, session_channel_id_hash, created_at DESC, operation_id DESC)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_operations_terminal_retention\",\n \"table_name\": \"plugin_operations\",\n \"sql\": \"CREATE INDEX idx_plugin_operations_terminal_retention ON plugin_operations(plugin_instance_id, terminal_at DESC, operation_id DESC) WHERE terminal_at IS NOT NULL\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_operations\",\n \"table_name\": \"plugin_operations\",\n \"sql\": \"CREATE TABLE plugin_operations ( operation_id TEXT PRIMARY KEY, plugin_id TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, method TEXT NOT NULL, effect TEXT NOT NULL, execution TEXT NOT NULL, surface_instance_id TEXT NOT NULL, owner_session_hash TEXT NOT NULL, owner_user_hash TEXT NOT NULL, owner_env_hash TEXT NOT NULL, session_channel_id_hash TEXT NOT NULL, bridge_channel_id TEXT NOT NULL, execution_binding_json TEXT NOT NULL DEFAULT '{}', status TEXT NOT NULL, cancelable INTEGER NOT NULL DEFAULT 1, cancel_ack_timeout_ms INTEGER NOT NULL DEFAULT 0, disable_behavior TEXT NOT NULL, uninstall_behavior TEXT NOT NULL, failure_code TEXT NOT NULL, reason TEXT NOT NULL, created_at INTEGER NOT NULL, updated_at INTEGER NOT NULL, cancel_requested_at INTEGER, orphaned_at INTEGER, terminal_at INTEGER )\"\n }\n ],\n \"schema_sha256\": \"6cb266bb6e06d4e9926bfd1513c3acdbcd6b2f7e8e988758baa29b497c1f3eba\"\n },\n {\n \"path\": \"db/registry.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_records_deleted_at\",\n \"table_name\": \"plugin_records\",\n \"sql\": \"CREATE INDEX idx_plugin_records_deleted_at ON plugin_records(owner_env_hash, deleted_at)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_records_plugin_id\",\n \"table_name\": \"plugin_records\",\n \"sql\": \"CREATE INDEX idx_plugin_records_plugin_id ON plugin_records(owner_env_hash, plugin_id)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_data_bindings\",\n \"table_name\": \"plugin_data_bindings\",\n \"sql\": \"CREATE TABLE plugin_data_bindings ( owner_env_hash TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, generation_id TEXT NOT NULL, state TEXT NOT NULL, revision INTEGER NOT NULL, shape_hash TEXT NOT NULL, retained_at INTEGER, expires_at INTEGER, PRIMARY KEY(owner_env_hash, plugin_instance_id), FOREIGN KEY(owner_env_hash, plugin_instance_id) REFERENCES plugin_records(owner_env_hash, plugin_instance_id) ON DELETE CASCADE )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_data_objects\",\n \"table_name\": \"plugin_data_objects\",\n \"sql\": \"CREATE TABLE plugin_data_objects ( scope_kind TEXT NOT NULL, owner_env_hash TEXT NOT NULL, owner_user_hash TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, object_id TEXT NOT NULL, content_hash TEXT NOT NULL, shape_hash TEXT NOT NULL, size_bytes INTEGER NOT NULL, created_at INTEGER NOT NULL, PRIMARY KEY(scope_kind, owner_env_hash, owner_user_hash, plugin_instance_id, object_id) )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_permission_grants\",\n \"table_name\": \"plugin_permission_grants\",\n \"sql\": \"CREATE TABLE plugin_permission_grants ( owner_env_hash TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, permission_id TEXT NOT NULL, effect TEXT NOT NULL, granted_by TEXT NOT NULL, granted_at INTEGER NOT NULL, expires_at INTEGER, revoked_at INTEGER, revoked_by TEXT NOT NULL, revoked_reason TEXT NOT NULL, PRIMARY KEY(owner_env_hash, plugin_instance_id, permission_id), FOREIGN KEY(owner_env_hash, plugin_instance_id) REFERENCES plugin_records(owner_env_hash, plugin_instance_id) ON DELETE CASCADE )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_records\",\n \"table_name\": \"plugin_records\",\n \"sql\": \"CREATE TABLE plugin_records ( owner_env_hash TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, publisher_id TEXT NOT NULL, plugin_id TEXT NOT NULL, version TEXT NOT NULL, active_fingerprint TEXT NOT NULL, package_hash TEXT NOT NULL, manifest_hash TEXT NOT NULL, entries_hash TEXT NOT NULL, trust_state TEXT NOT NULL, trust_assessment_json TEXT NOT NULL DEFAULT '{}', source_policy_snapshot_hash TEXT NOT NULL DEFAULT '', source_policy_snapshot_json TEXT NOT NULL DEFAULT '{}', local_import_provenance_json TEXT NOT NULL DEFAULT '{}', capability_contracts_json TEXT NOT NULL DEFAULT '[]', enable_state TEXT NOT NULL, disabled_reason TEXT NOT NULL, policy_revision INTEGER NOT NULL, management_revision INTEGER NOT NULL, revoke_epoch INTEGER NOT NULL, manifest_json TEXT NOT NULL, package_entries_json TEXT NOT NULL, version_history_json TEXT NOT NULL, runtime_requirement_json TEXT NOT NULL DEFAULT 'null', installed_at INTEGER NOT NULL, enabled_at INTEGER, updated_at INTEGER NOT NULL, deleted_at INTEGER, metadata_json TEXT NOT NULL, PRIMARY KEY(owner_env_hash, plugin_instance_id) )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_security_policies\",\n \"table_name\": \"plugin_security_policies\",\n \"sql\": \"CREATE TABLE plugin_security_policies ( owner_env_hash TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, allowed_permissions_json TEXT NOT NULL, denied_methods_json TEXT NOT NULL, updated_at INTEGER NOT NULL, PRIMARY KEY(owner_env_hash, plugin_instance_id), FOREIGN KEY(owner_env_hash, plugin_instance_id) REFERENCES plugin_records(owner_env_hash, plugin_instance_id) ON DELETE CASCADE )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_security_policy_allowed_permissions\",\n \"table_name\": \"plugin_security_policy_allowed_permissions\",\n \"sql\": \"CREATE TABLE plugin_security_policy_allowed_permissions ( owner_env_hash TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, permission_id TEXT NOT NULL, PRIMARY KEY(owner_env_hash, plugin_instance_id, permission_id), FOREIGN KEY(owner_env_hash, plugin_instance_id) REFERENCES plugin_security_policies(owner_env_hash, plugin_instance_id) ON DELETE CASCADE )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_security_policy_denied_methods\",\n \"table_name\": \"plugin_security_policy_denied_methods\",\n \"sql\": \"CREATE TABLE plugin_security_policy_denied_methods ( owner_env_hash TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, method TEXT NOT NULL, PRIMARY KEY(owner_env_hash, plugin_instance_id, method), FOREIGN KEY(owner_env_hash, plugin_instance_id) REFERENCES plugin_security_policies(owner_env_hash, plugin_instance_id) ON DELETE CASCADE )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_source_security_floors\",\n \"table_name\": \"plugin_source_security_floors\",\n \"sql\": \"CREATE TABLE plugin_source_security_floors ( source_id TEXT PRIMARY KEY, policy_epoch TEXT NOT NULL, key_rotation_epoch TEXT NOT NULL, revocation_epoch TEXT NOT NULL, source_policy_snapshot_hash TEXT NOT NULL, revocation_metadata_sha256 TEXT NOT NULL, updated_at INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"fb1d3c89eccea640d8f11261bcdd5e09a297a4253f5ca13ae0bc953ff3e189a9\"\n },\n {\n \"path\": \"db/runtime_lease_replays.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_runtime_lease_replays_plugin\",\n \"table_name\": \"plugin_runtime_lease_replays\",\n \"sql\": \"CREATE INDEX idx_runtime_lease_replays_plugin ON plugin_runtime_lease_replays(plugin_instance_id, consumed_at)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_runtime_lease_replays\",\n \"table_name\": \"plugin_runtime_lease_replays\",\n \"sql\": \"CREATE TABLE plugin_runtime_lease_replays ( lease_nonce_hash TEXT PRIMARY KEY, lease_id TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, runtime_generation_id TEXT NOT NULL, method TEXT NOT NULL, policy_revision INTEGER NOT NULL, management_revision INTEGER NOT NULL, revoke_epoch INTEGER NOT NULL, consumed_at INTEGER NOT NULL, expires_at INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"a4428fbd7cb8614384b539b583e0653460b8bafa24238dc23b9e916d447393a9\"\n },\n {\n \"path\": \"db/secrets.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_secret_bindings_plugin\",\n \"table_name\": \"plugin_secret_bindings\",\n \"sql\": \"CREATE INDEX idx_plugin_secret_bindings_plugin ON plugin_secret_bindings(owner_env_hash, plugin_instance_id, scope, owner_user_hash, bound, updated_at)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_secret_bindings\",\n \"table_name\": \"plugin_secret_bindings\",\n \"sql\": \"CREATE TABLE plugin_secret_bindings ( owner_env_hash TEXT NOT NULL, owner_user_hash TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, secret_ref TEXT NOT NULL, scope TEXT NOT NULL, bound INTEGER NOT NULL, last_test_status TEXT NOT NULL, bound_at INTEGER, tested_at INTEGER, deleted_at INTEGER, updated_at INTEGER NOT NULL, PRIMARY KEY(owner_env_hash, owner_user_hash, plugin_instance_id, scope, secret_ref), CHECK((scope = 'environment' AND owner_user_hash = '') OR (scope = 'user' AND owner_user_hash <> '')) )\"\n }\n ],\n \"schema_sha256\": \"4f5f0abf69b4c9ab1558f349640ffa2de6755b60d5e121886fa402e8c7eaa27b\"\n },\n {\n \"path\": \"db/streams.sqlite\",\n \"required\": true,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_streams_owner_plugin_instance\",\n \"table_name\": \"plugin_streams\",\n \"sql\": \"CREATE INDEX idx_plugin_streams_owner_plugin_instance ON plugin_streams(owner_env_hash, plugin_instance_id, created_at, stream_id)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_streams_owner_terminal_retention\",\n \"table_name\": \"plugin_streams\",\n \"sql\": \"CREATE INDEX idx_plugin_streams_owner_terminal_retention ON plugin_streams(owner_env_hash, plugin_instance_id, closed_at DESC, stream_id DESC) WHERE terminal_acknowledged = 1\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_streams_plugin_instance\",\n \"table_name\": \"plugin_streams\",\n \"sql\": \"CREATE INDEX idx_plugin_streams_plugin_instance ON plugin_streams(plugin_instance_id, created_at, stream_id)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_streams_terminal_retention\",\n \"table_name\": \"plugin_streams\",\n \"sql\": \"CREATE INDEX idx_plugin_streams_terminal_retention ON plugin_streams(plugin_instance_id, closed_at DESC, stream_id DESC) WHERE terminal_acknowledged = 1\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_stream_events\",\n \"table_name\": \"plugin_stream_events\",\n \"sql\": \"CREATE TABLE plugin_stream_events ( stream_id TEXT NOT NULL, sequence INTEGER NOT NULL, kind TEXT NOT NULL, data BLOB, error TEXT NOT NULL, at INTEGER NOT NULL, PRIMARY KEY(stream_id, sequence), FOREIGN KEY(stream_id) REFERENCES plugin_streams(stream_id) ON DELETE CASCADE )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_streams\",\n \"table_name\": \"plugin_streams\",\n \"sql\": \"CREATE TABLE plugin_streams ( stream_id TEXT PRIMARY KEY, plugin_id TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, method TEXT NOT NULL, effect TEXT NOT NULL, execution TEXT NOT NULL, surface_instance_id TEXT NOT NULL, owner_session_hash TEXT NOT NULL, owner_user_hash TEXT NOT NULL, owner_env_hash TEXT NOT NULL, session_channel_id_hash TEXT NOT NULL, bridge_channel_id TEXT NOT NULL, execution_binding_json TEXT NOT NULL DEFAULT '{}', direction TEXT NOT NULL, status TEXT NOT NULL, failure_code TEXT NOT NULL, reason TEXT NOT NULL DEFAULT '', content_type TEXT NOT NULL, max_buffered_bytes INTEGER NOT NULL, buffered_bytes INTEGER NOT NULL, next_sequence INTEGER NOT NULL, pending_delivery_id TEXT NOT NULL, pending_read_id TEXT NOT NULL, pending_through_sequence INTEGER NOT NULL, pending_done INTEGER NOT NULL, pending_terminal_status TEXT NOT NULL, last_acknowledged_delivery_id TEXT NOT NULL, terminal_acknowledged INTEGER NOT NULL, created_at INTEGER NOT NULL, updated_at INTEGER NOT NULL, closed_at INTEGER )\"\n }\n ],\n \"schema_sha256\": \"12a5810b5112819cb046f40491d8a014856c8209185ce471706158c1a816b2a3\"\n }\n ],\n \"tree_rules\": {\n \"allowed_kinds\": [\n \"directory\",\n \"file\"\n ],\n \"allow_sqlite_wal_shm\": true,\n \"reject_hardlinks\": true,\n \"reject_symlinks\": true,\n \"variable_trees\": [\n \"assets\",\n \"storage\",\n \"trust\"\n ],\n \"optional_files\": []\n }\n },\n {\n \"id\": \"redeven-redevplugin-v0.6.5-layout-v1\",\n \"platform_versions\": [\n \"0.6.5\"\n ],\n \"root_entries\": [\n {\n \"path\": \"assets\",\n \"kind\": \"directory\",\n \"scope\": \"durable\",\n \"disposition\": \"quarantine\",\n \"required\": false\n },\n {\n \"path\": \"db\",\n \"kind\": \"directory\",\n \"scope\": \"durable\",\n \"disposition\": \"quarantine\",\n \"required\": true\n },\n {\n \"path\": \"runtime-exec\",\n \"kind\": \"directory\",\n \"scope\": \"durable\",\n \"disposition\": \"quarantine\",\n \"required\": false\n },\n {\n \"path\": \"storage\",\n \"kind\": \"directory\",\n \"scope\": \"durable\",\n \"disposition\": \"quarantine\",\n \"required\": false\n },\n {\n \"path\": \"trust\",\n \"kind\": \"directory\",\n \"scope\": \"durable\",\n \"disposition\": \"quarantine\",\n \"required\": false\n }\n ],\n \"sqlite_databases\": [\n {\n \"path\": \"db/confirmation_intents.sqlite\",\n \"required\": false,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_confirmation_intents_expires_at\",\n \"table_name\": \"plugin_confirmation_intents\",\n \"sql\": \"CREATE INDEX idx_plugin_confirmation_intents_expires_at ON plugin_confirmation_intents(expires_at)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_confirmation_intents_owner_plugin\",\n \"table_name\": \"plugin_confirmation_intents\",\n \"sql\": \"CREATE INDEX idx_plugin_confirmation_intents_owner_plugin ON plugin_confirmation_intents(owner_env_hash, plugin_instance_id, issued_at, confirmation_id) WHERE migration_required = 0\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_confirmation_intents_session_scope\",\n \"table_name\": \"plugin_confirmation_intents\",\n \"sql\": \"CREATE INDEX idx_plugin_confirmation_intents_session_scope ON plugin_confirmation_intents(owner_session_hash, owner_user_hash, owner_env_hash, session_channel_id_hash, confirmation_id) WHERE migration_required = 0\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_confirmation_intents\",\n \"table_name\": \"plugin_confirmation_intents\",\n \"sql\": \"CREATE TABLE plugin_confirmation_intents ( confirmation_id TEXT PRIMARY KEY, confirmation_token_id TEXT NOT NULL, plugin_id TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, surface_instance_id TEXT NOT NULL, bridge_channel_id TEXT NOT NULL, method TEXT NOT NULL, request_hash TEXT NOT NULL, plan_hash TEXT NOT NULL, scope_json TEXT NOT NULL DEFAULT '{}', owner_session_hash TEXT NOT NULL DEFAULT '', owner_user_hash TEXT NOT NULL DEFAULT '', owner_env_hash TEXT NOT NULL DEFAULT '', session_channel_id_hash TEXT NOT NULL DEFAULT '', migration_required INTEGER NOT NULL DEFAULT 0, issued_at INTEGER NOT NULL, expires_at INTEGER NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_confirmation_session_revocations\",\n \"table_name\": \"plugin_confirmation_session_revocations\",\n \"sql\": \"CREATE TABLE plugin_confirmation_session_revocations ( owner_session_hash TEXT NOT NULL, owner_user_hash TEXT NOT NULL, owner_env_hash TEXT NOT NULL, session_channel_id_hash TEXT NOT NULL, teardown_operation_id TEXT NOT NULL CHECK (length(teardown_operation_id) BETWEEN 1 AND 256), revoked_count INTEGER NOT NULL CHECK (revoked_count BETWEEN 0 AND 9007199254740991), PRIMARY KEY (owner_session_hash, owner_user_hash, owner_env_hash, session_channel_id_hash, teardown_operation_id) )\"\n }\n ],\n \"schema_sha256\": \"519a7fa2c9825ec7b1a7bf89dd2036ee6e9bea465e38c90f3c53fe87215ad666\"\n },\n {\n \"path\": \"db/install_stage.sqlite\",\n \"required\": false,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_install_stages_plugin\",\n \"table_name\": \"plugin_install_stages\",\n \"sql\": \"CREATE INDEX idx_plugin_install_stages_plugin ON plugin_install_stages(owner_env_hash, plugin_instance_id, created_at)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_install_stages_status_expiry\",\n \"table_name\": \"plugin_install_stages\",\n \"sql\": \"CREATE INDEX idx_plugin_install_stages_status_expiry ON plugin_install_stages(owner_env_hash, status, expires_at)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_install_stages\",\n \"table_name\": \"plugin_install_stages\",\n \"sql\": \"CREATE TABLE plugin_install_stages ( owner_env_hash TEXT NOT NULL, stage_id TEXT NOT NULL, action TEXT NOT NULL, status TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, publisher_id TEXT NOT NULL, plugin_id TEXT NOT NULL, version TEXT NOT NULL, package_hash TEXT NOT NULL, manifest_hash TEXT NOT NULL, entries_hash TEXT NOT NULL, requested_trust TEXT NOT NULL, resolved_trust TEXT NOT NULL, validation_summary_json TEXT NOT NULL, error_code TEXT NOT NULL, error_message TEXT NOT NULL, expires_at INTEGER NOT NULL, created_at INTEGER NOT NULL, updated_at INTEGER NOT NULL, finished_at INTEGER, PRIMARY KEY(owner_env_hash, stage_id) )\"\n }\n ],\n \"schema_sha256\": \"aa45772cf36b9005142d210fb2e1a2b2b23a9012ed25cd587ad8d89235f2134b\"\n },\n {\n \"path\": \"db/observability.sqlite\",\n \"required\": false,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_audit_event_id\",\n \"table_name\": \"plugin_audit_events\",\n \"sql\": \"CREATE UNIQUE INDEX idx_plugin_audit_event_id ON plugin_audit_events(event_id)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_diagnostics_owner\",\n \"table_name\": \"plugin_diagnostic_events\",\n \"sql\": \"CREATE INDEX idx_plugin_diagnostics_owner ON plugin_diagnostic_events(owner_session_hash, owner_user_hash, owner_env_hash, session_channel_id_hash, occurred_at)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_diagnostics_plugin_instance\",\n \"table_name\": \"plugin_diagnostic_events\",\n \"sql\": \"CREATE INDEX idx_plugin_diagnostics_plugin_instance ON plugin_diagnostic_events(plugin_instance_id, type, severity, occurred_at)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_diagnostics_surface\",\n \"table_name\": \"plugin_diagnostic_events\",\n \"sql\": \"CREATE INDEX idx_plugin_diagnostics_surface ON plugin_diagnostic_events(surface_instance_id, severity, occurred_at)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_security_audit_journal_exported\",\n \"table_name\": \"plugin_security_audit_journal\",\n \"sql\": \"CREATE INDEX idx_plugin_security_audit_journal_exported ON plugin_security_audit_journal(seq) WHERE exported_at IS NOT NULL\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_security_audit_journal_state\",\n \"table_name\": \"plugin_security_audit_journal\",\n \"sql\": \"CREATE INDEX idx_plugin_security_audit_journal_state ON plugin_security_audit_journal(state, exported_at, seq)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_audit_events\",\n \"table_name\": \"plugin_audit_events\",\n \"sql\": \"CREATE TABLE plugin_audit_events ( seq INTEGER PRIMARY KEY, event_id TEXT NOT NULL, type TEXT NOT NULL, plugin_id TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, surface_id TEXT NOT NULL, surface_instance_id TEXT NOT NULL, request_id TEXT NOT NULL, actor TEXT NOT NULL, occurred_at INTEGER NOT NULL, details_json BLOB NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_diagnostic_events\",\n \"table_name\": \"plugin_diagnostic_events\",\n \"sql\": \"CREATE TABLE plugin_diagnostic_events ( seq INTEGER PRIMARY KEY, event_id TEXT NOT NULL, type TEXT NOT NULL, severity TEXT NOT NULL, message TEXT NOT NULL, plugin_id TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, surface_id TEXT NOT NULL, surface_instance_id TEXT NOT NULL, active_fingerprint TEXT NOT NULL, request_id TEXT NOT NULL, correlation_id TEXT NOT NULL DEFAULT '', mutation_outcome TEXT NOT NULL DEFAULT '' CHECK(mutation_outcome IN ('', 'committed', 'not_committed', 'unknown')), owner_session_hash TEXT NOT NULL, owner_user_hash TEXT NOT NULL, owner_env_hash TEXT NOT NULL, session_channel_id_hash TEXT NOT NULL, occurred_at INTEGER NOT NULL, details_json BLOB NOT NULL, failure_code TEXT NOT NULL DEFAULT '', failure_component TEXT NOT NULL DEFAULT '', failure_operation TEXT NOT NULL DEFAULT '' )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_observability_meta\",\n \"table_name\": \"plugin_observability_meta\",\n \"sql\": \"CREATE TABLE plugin_observability_meta ( id INTEGER PRIMARY KEY CHECK(id = 1), audit_seq INTEGER NOT NULL, diagnostic_seq INTEGER NOT NULL )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_security_audit_journal\",\n \"table_name\": \"plugin_security_audit_journal\",\n \"sql\": \"CREATE TABLE plugin_security_audit_journal ( seq INTEGER PRIMARY KEY, event_id TEXT NOT NULL UNIQUE, type TEXT NOT NULL, plugin_id TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, surface_id TEXT NOT NULL, surface_instance_id TEXT NOT NULL, request_id TEXT NOT NULL, actor TEXT NOT NULL, occurred_at INTEGER NOT NULL, details_json BLOB NOT NULL, state TEXT NOT NULL CHECK(state IN ('pending', 'completed')), mutation_outcome TEXT NOT NULL, completion_details_json BLOB NOT NULL, created_at INTEGER NOT NULL, completed_at INTEGER, exported_at INTEGER )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_security_audit_meta\",\n \"table_name\": \"plugin_security_audit_meta\",\n \"sql\": \"CREATE TABLE plugin_security_audit_meta ( id INTEGER PRIMARY KEY CHECK(id = 1), seq INTEGER NOT NULL )\"\n }\n ],\n \"schema_sha256\": \"230d789557736cc47b4c0d760d46a4c58ce7575f57e4779e010db5539865c666\"\n },\n {\n \"path\": \"db/operations.sqlite\",\n \"required\": false,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_operations_created\",\n \"table_name\": \"plugin_operations\",\n \"sql\": \"CREATE INDEX idx_plugin_operations_created ON plugin_operations(created_at DESC, operation_id DESC)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_operations_owner\",\n \"table_name\": \"plugin_operations\",\n \"sql\": \"CREATE INDEX idx_plugin_operations_owner ON plugin_operations(owner_session_hash, owner_user_hash, owner_env_hash, session_channel_id_hash, created_at DESC, operation_id DESC)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_operations_owner_plugin_instance\",\n \"table_name\": \"plugin_operations\",\n \"sql\": \"CREATE INDEX idx_plugin_operations_owner_plugin_instance ON plugin_operations(owner_env_hash, plugin_instance_id, created_at DESC, operation_id DESC)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_operations_owner_plugin_session\",\n \"table_name\": \"plugin_operations\",\n \"sql\": \"CREATE INDEX idx_plugin_operations_owner_plugin_session ON plugin_operations(owner_env_hash, plugin_instance_id, owner_session_hash, owner_user_hash, session_channel_id_hash, created_at DESC, operation_id DESC)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_operations_owner_terminal_retention\",\n \"table_name\": \"plugin_operations\",\n \"sql\": \"CREATE INDEX idx_plugin_operations_owner_terminal_retention ON plugin_operations(owner_env_hash, plugin_instance_id, terminal_at DESC, operation_id DESC) WHERE terminal_at IS NOT NULL\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_operations_plugin_instance\",\n \"table_name\": \"plugin_operations\",\n \"sql\": \"CREATE INDEX idx_plugin_operations_plugin_instance ON plugin_operations(plugin_instance_id, created_at DESC, operation_id DESC)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_operations_plugin_owner\",\n \"table_name\": \"plugin_operations\",\n \"sql\": \"CREATE INDEX idx_plugin_operations_plugin_owner ON plugin_operations(plugin_instance_id, owner_session_hash, owner_user_hash, owner_env_hash, session_channel_id_hash, created_at DESC, operation_id DESC)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_operations_terminal_retention\",\n \"table_name\": \"plugin_operations\",\n \"sql\": \"CREATE INDEX idx_plugin_operations_terminal_retention ON plugin_operations(plugin_instance_id, terminal_at DESC, operation_id DESC) WHERE terminal_at IS NOT NULL\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_operations\",\n \"table_name\": \"plugin_operations\",\n \"sql\": \"CREATE TABLE plugin_operations ( operation_id TEXT PRIMARY KEY, plugin_id TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, method TEXT NOT NULL, effect TEXT NOT NULL, execution TEXT NOT NULL, surface_instance_id TEXT NOT NULL, owner_session_hash TEXT NOT NULL, owner_user_hash TEXT NOT NULL, owner_env_hash TEXT NOT NULL, session_channel_id_hash TEXT NOT NULL, bridge_channel_id TEXT NOT NULL, execution_binding_json TEXT NOT NULL DEFAULT '{}', status TEXT NOT NULL, cancelable INTEGER NOT NULL DEFAULT 1, cancel_ack_timeout_ms INTEGER NOT NULL DEFAULT 0, disable_behavior TEXT NOT NULL, uninstall_behavior TEXT NOT NULL, failure_code TEXT NOT NULL, reason TEXT NOT NULL, created_at INTEGER NOT NULL, updated_at INTEGER NOT NULL, cancel_requested_at INTEGER, orphaned_at INTEGER, terminal_at INTEGER )\"\n }\n ],\n \"schema_sha256\": \"6cb266bb6e06d4e9926bfd1513c3acdbcd6b2f7e8e988758baa29b497c1f3eba\"\n },\n {\n \"path\": \"db/registry.sqlite\",\n \"required\": false,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_records_deleted_at\",\n \"table_name\": \"plugin_records\",\n \"sql\": \"CREATE INDEX idx_plugin_records_deleted_at ON plugin_records(owner_env_hash, deleted_at)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_records_plugin_id\",\n \"table_name\": \"plugin_records\",\n \"sql\": \"CREATE INDEX idx_plugin_records_plugin_id ON plugin_records(owner_env_hash, plugin_id)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_data_bindings\",\n \"table_name\": \"plugin_data_bindings\",\n \"sql\": \"CREATE TABLE plugin_data_bindings ( owner_env_hash TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, generation_id TEXT NOT NULL, state TEXT NOT NULL, revision INTEGER NOT NULL, shape_hash TEXT NOT NULL, retained_at INTEGER, expires_at INTEGER, PRIMARY KEY(owner_env_hash, plugin_instance_id), FOREIGN KEY(owner_env_hash, plugin_instance_id) REFERENCES plugin_records(owner_env_hash, plugin_instance_id) ON DELETE CASCADE )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_data_objects\",\n \"table_name\": \"plugin_data_objects\",\n \"sql\": \"CREATE TABLE plugin_data_objects ( scope_kind TEXT NOT NULL, owner_env_hash TEXT NOT NULL, owner_user_hash TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, object_id TEXT NOT NULL, content_hash TEXT NOT NULL, shape_hash TEXT NOT NULL, size_bytes INTEGER NOT NULL, created_at INTEGER NOT NULL, PRIMARY KEY(scope_kind, owner_env_hash, owner_user_hash, plugin_instance_id, object_id) )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_permission_grants\",\n \"table_name\": \"plugin_permission_grants\",\n \"sql\": \"CREATE TABLE plugin_permission_grants ( owner_env_hash TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, permission_id TEXT NOT NULL, effect TEXT NOT NULL, granted_by TEXT NOT NULL, granted_at INTEGER NOT NULL, expires_at INTEGER, revoked_at INTEGER, revoked_by TEXT NOT NULL, revoked_reason TEXT NOT NULL, PRIMARY KEY(owner_env_hash, plugin_instance_id, permission_id), FOREIGN KEY(owner_env_hash, plugin_instance_id) REFERENCES plugin_records(owner_env_hash, plugin_instance_id) ON DELETE CASCADE )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_records\",\n \"table_name\": \"plugin_records\",\n \"sql\": \"CREATE TABLE plugin_records ( owner_env_hash TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, publisher_id TEXT NOT NULL, plugin_id TEXT NOT NULL, version TEXT NOT NULL, active_fingerprint TEXT NOT NULL, package_hash TEXT NOT NULL, manifest_hash TEXT NOT NULL, entries_hash TEXT NOT NULL, trust_state TEXT NOT NULL, trust_assessment_json TEXT NOT NULL DEFAULT '{}', source_policy_snapshot_hash TEXT NOT NULL DEFAULT '', source_policy_snapshot_json TEXT NOT NULL DEFAULT '{}', local_import_provenance_json TEXT NOT NULL DEFAULT '{}', capability_contracts_json TEXT NOT NULL DEFAULT '[]', enable_state TEXT NOT NULL, disabled_reason TEXT NOT NULL, policy_revision INTEGER NOT NULL, management_revision INTEGER NOT NULL, revoke_epoch INTEGER NOT NULL, manifest_json TEXT NOT NULL, package_entries_json TEXT NOT NULL, version_history_json TEXT NOT NULL, runtime_requirement_json TEXT NOT NULL DEFAULT 'null', installed_at INTEGER NOT NULL, enabled_at INTEGER, updated_at INTEGER NOT NULL, deleted_at INTEGER, metadata_json TEXT NOT NULL, PRIMARY KEY(owner_env_hash, plugin_instance_id) )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_security_policies\",\n \"table_name\": \"plugin_security_policies\",\n \"sql\": \"CREATE TABLE plugin_security_policies ( owner_env_hash TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, allowed_permissions_json TEXT NOT NULL, denied_methods_json TEXT NOT NULL, updated_at INTEGER NOT NULL, PRIMARY KEY(owner_env_hash, plugin_instance_id), FOREIGN KEY(owner_env_hash, plugin_instance_id) REFERENCES plugin_records(owner_env_hash, plugin_instance_id) ON DELETE CASCADE )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_security_policy_allowed_permissions\",\n \"table_name\": \"plugin_security_policy_allowed_permissions\",\n \"sql\": \"CREATE TABLE plugin_security_policy_allowed_permissions ( owner_env_hash TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, permission_id TEXT NOT NULL, PRIMARY KEY(owner_env_hash, plugin_instance_id, permission_id), FOREIGN KEY(owner_env_hash, plugin_instance_id) REFERENCES plugin_security_policies(owner_env_hash, plugin_instance_id) ON DELETE CASCADE )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_security_policy_denied_methods\",\n \"table_name\": \"plugin_security_policy_denied_methods\",\n \"sql\": \"CREATE TABLE plugin_security_policy_denied_methods ( owner_env_hash TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, method TEXT NOT NULL, PRIMARY KEY(owner_env_hash, plugin_instance_id, method), FOREIGN KEY(owner_env_hash, plugin_instance_id) REFERENCES plugin_security_policies(owner_env_hash, plugin_instance_id) ON DELETE CASCADE )\"\n }\n ],\n \"schema_sha256\": \"a9d182e0fffcf964b28d2b73cf184612d903f8d529b674a3e577f372d1ecd2ce\"\n },\n {\n \"path\": \"db/secrets.sqlite\",\n \"required\": false,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_secret_bindings_plugin\",\n \"table_name\": \"plugin_secret_bindings\",\n \"sql\": \"CREATE INDEX idx_plugin_secret_bindings_plugin ON plugin_secret_bindings(owner_env_hash, plugin_instance_id, scope, owner_user_hash, bound, updated_at)\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_secret_bindings\",\n \"table_name\": \"plugin_secret_bindings\",\n \"sql\": \"CREATE TABLE plugin_secret_bindings ( owner_env_hash TEXT NOT NULL, owner_user_hash TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, secret_ref TEXT NOT NULL, scope TEXT NOT NULL, bound INTEGER NOT NULL, last_test_status TEXT NOT NULL, bound_at INTEGER, tested_at INTEGER, deleted_at INTEGER, updated_at INTEGER NOT NULL, PRIMARY KEY(owner_env_hash, owner_user_hash, plugin_instance_id, scope, secret_ref), CHECK((scope = 'environment' AND owner_user_hash = '') OR (scope = 'user' AND owner_user_hash <> '')) )\"\n }\n ],\n \"schema_sha256\": \"4f5f0abf69b4c9ab1558f349640ffa2de6755b60d5e121886fa402e8c7eaa27b\"\n },\n {\n \"path\": \"db/session_scopes.sqlite\",\n \"required\": false,\n \"application_id\": 0,\n \"user_version\": 1,\n \"migration_versions\": [],\n \"schema_objects\": [\n {\n \"type\": \"table\",\n \"name\": \"plugin_session_scope_fences\",\n \"table_name\": \"plugin_session_scope_fences\",\n \"sql\": \"CREATE TABLE plugin_session_scope_fences ( owner_session_hash TEXT NOT NULL, owner_user_hash TEXT NOT NULL, owner_env_hash TEXT NOT NULL, session_channel_id_hash TEXT NOT NULL, state TEXT NOT NULL CHECK (state IN ('draining', 'incomplete', 'complete')), teardown_operation_id TEXT NOT NULL, surfaces INTEGER NOT NULL CHECK (surfaces BETWEEN 0 AND 9007199254740991), asset_tickets INTEGER NOT NULL CHECK (asset_tickets BETWEEN 0 AND 9007199254740991), asset_sessions INTEGER NOT NULL CHECK (asset_sessions BETWEEN 0 AND 9007199254740991), plugin_gateway_tokens INTEGER NOT NULL CHECK (plugin_gateway_tokens BETWEEN 0 AND 9007199254740991), confirmation_tokens INTEGER NOT NULL CHECK (confirmation_tokens BETWEEN 0 AND 9007199254740991), stream_tickets INTEGER NOT NULL CHECK (stream_tickets BETWEEN 0 AND 9007199254740991), handle_grants INTEGER NOT NULL CHECK (handle_grants BETWEEN 0 AND 9007199254740991), confirmations INTEGER NOT NULL CHECK (confirmations BETWEEN 0 AND 9007199254740991), operations INTEGER NOT NULL CHECK (operations BETWEEN 0 AND 9007199254740991), streams INTEGER NOT NULL CHECK (streams BETWEEN 0 AND 9007199254740991), runtime_executions INTEGER NOT NULL CHECK (runtime_executions BETWEEN 0 AND 9007199254740991), active_network_requests INTEGER NOT NULL CHECK (active_network_requests BETWEEN 0 AND 9007199254740991), sockets INTEGER NOT NULL CHECK (sockets BETWEEN 0 AND 9007199254740991), network_streams INTEGER NOT NULL CHECK (network_streams BETWEEN 0 AND 9007199254740991), storage_hostcalls INTEGER NOT NULL CHECK (storage_hostcalls BETWEEN 0 AND 9007199254740991), proof_sha256 BLOB, created_at INTEGER NOT NULL, updated_at INTEGER NOT NULL, PRIMARY KEY (owner_session_hash, owner_user_hash, owner_env_hash, session_channel_id_hash), CHECK (length(teardown_operation_id) BETWEEN 1 AND 256 AND length(proof_sha256) = 32) )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_session_scope_teardown_phases\",\n \"table_name\": \"plugin_session_scope_teardown_phases\",\n \"sql\": \"CREATE TABLE plugin_session_scope_teardown_phases ( owner_session_hash TEXT NOT NULL, owner_user_hash TEXT NOT NULL, owner_env_hash TEXT NOT NULL, session_channel_id_hash TEXT NOT NULL, phase TEXT NOT NULL CHECK (phase IN ('bridge', 'confirmation', 'execution', 'operation', 'stream', 'runtime')), counts_json BLOB NOT NULL CHECK (length(counts_json) BETWEEN 2 AND 4096), PRIMARY KEY (owner_session_hash, owner_user_hash, owner_env_hash, session_channel_id_hash, phase), FOREIGN KEY (owner_session_hash, owner_user_hash, owner_env_hash, session_channel_id_hash) REFERENCES plugin_session_scope_fences (owner_session_hash, owner_user_hash, owner_env_hash, session_channel_id_hash) ON DELETE RESTRICT )\"\n }\n ],\n \"schema_sha256\": \"b1f5b90217de3a94ec62943935e1b57774017e8af383fc3eddb64710e335fe61\"\n },\n {\n \"path\": \"db/streams.sqlite\",\n \"required\": false,\n \"application_id\": 0,\n \"user_version\": 0,\n \"migration_versions\": [],\n \"schema_objects\": [\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_streams_owner_plugin_instance\",\n \"table_name\": \"plugin_streams\",\n \"sql\": \"CREATE INDEX idx_plugin_streams_owner_plugin_instance ON plugin_streams(owner_env_hash, plugin_instance_id, created_at, stream_id)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_streams_owner_terminal_retention\",\n \"table_name\": \"plugin_streams\",\n \"sql\": \"CREATE INDEX idx_plugin_streams_owner_terminal_retention ON plugin_streams(owner_env_hash, plugin_instance_id, closed_at DESC, stream_id DESC) WHERE terminal_acknowledged = 1\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_streams_plugin_instance\",\n \"table_name\": \"plugin_streams\",\n \"sql\": \"CREATE INDEX idx_plugin_streams_plugin_instance ON plugin_streams(plugin_instance_id, created_at, stream_id)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_streams_session_scope\",\n \"table_name\": \"plugin_streams\",\n \"sql\": \"CREATE INDEX idx_plugin_streams_session_scope ON plugin_streams(owner_session_hash, owner_user_hash, owner_env_hash, session_channel_id_hash, stream_id)\"\n },\n {\n \"type\": \"index\",\n \"name\": \"idx_plugin_streams_terminal_retention\",\n \"table_name\": \"plugin_streams\",\n \"sql\": \"CREATE INDEX idx_plugin_streams_terminal_retention ON plugin_streams(plugin_instance_id, closed_at DESC, stream_id DESC) WHERE terminal_acknowledged = 1\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_stream_events\",\n \"table_name\": \"plugin_stream_events\",\n \"sql\": \"CREATE TABLE plugin_stream_events ( stream_id TEXT NOT NULL, sequence INTEGER NOT NULL, kind TEXT NOT NULL, data BLOB, error TEXT NOT NULL, at INTEGER NOT NULL, PRIMARY KEY(stream_id, sequence), FOREIGN KEY(stream_id) REFERENCES plugin_streams(stream_id) ON DELETE CASCADE )\"\n },\n {\n \"type\": \"table\",\n \"name\": \"plugin_streams\",\n \"table_name\": \"plugin_streams\",\n \"sql\": \"CREATE TABLE plugin_streams ( stream_id TEXT PRIMARY KEY, plugin_id TEXT NOT NULL, plugin_instance_id TEXT NOT NULL, method TEXT NOT NULL, effect TEXT NOT NULL, execution TEXT NOT NULL, surface_instance_id TEXT NOT NULL, owner_session_hash TEXT NOT NULL, owner_user_hash TEXT NOT NULL, owner_env_hash TEXT NOT NULL, session_channel_id_hash TEXT NOT NULL, bridge_channel_id TEXT NOT NULL, execution_binding_json TEXT NOT NULL DEFAULT '{}', direction TEXT NOT NULL, status TEXT NOT NULL, failure_code TEXT NOT NULL, reason TEXT NOT NULL DEFAULT '', content_type TEXT NOT NULL, max_buffered_bytes INTEGER NOT NULL, buffered_bytes INTEGER NOT NULL, next_sequence INTEGER NOT NULL, pending_delivery_id TEXT NOT NULL, pending_read_id TEXT NOT NULL, pending_through_sequence INTEGER NOT NULL, pending_done INTEGER NOT NULL, pending_terminal_status TEXT NOT NULL, last_acknowledged_delivery_id TEXT NOT NULL, terminal_acknowledged INTEGER NOT NULL, created_at INTEGER NOT NULL, updated_at INTEGER NOT NULL, closed_at INTEGER )\"\n }\n ],\n \"schema_sha256\": \"740609493bc7525429a1ddc010c93b3516009ee76d9b0d926f7e255e4b970f21\"\n }\n ],\n \"tree_rules\": {\n \"allowed_kinds\": [\n \"directory\",\n \"file\"\n ],\n \"allow_sqlite_wal_shm\": true,\n \"reject_hardlinks\": true,\n \"reject_symlinks\": true,\n \"variable_trees\": [\n \"assets\",\n \"runtime-exec\",\n \"storage\",\n \"trust\"\n ],\n \"optional_files\": [\n \"db/closed_sessions.json\"\n ]\n }\n }\n ]\n}\n".as_bytes();
209static CONTRACT_BODY_OWNER_SCOPE_INVENTORY_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/owner-scope-inventory-v1.schema.json\",\n \"title\": \"ReDevPlugin owner scope inventory registry v1\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"schema_version\", \"inventories\"],\n \"properties\": {\n \"schema_version\": { \"const\": \"owner-scope-inventory-v1\" },\n \"inventories\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"maxItems\": 32,\n \"items\": { \"$ref\": \"#/$defs/inventory\" }\n }\n },\n \"$defs\": {\n \"sha256\": { \"type\": \"string\", \"pattern\": \"^[0-9a-f]{64}$\" },\n \"identifier\": { \"type\": \"string\", \"pattern\": \"^[a-z][a-z0-9._-]{0,127}$\" },\n \"relative_path\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 4096,\n \"pattern\": \"^[a-z][a-z0-9._-]*(?:/[a-z][a-z0-9._-]*)*$\"\n },\n \"inventory\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"id\", \"platform_versions\", \"root_entries\", \"sqlite_databases\", \"tree_rules\"],\n \"properties\": {\n \"id\": { \"$ref\": \"#/$defs/identifier\" },\n \"platform_versions\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"maxItems\": 32,\n \"uniqueItems\": true,\n \"items\": { \"type\": \"string\", \"pattern\": \"^0\\\\.[1-6]\\\\.[0-9]+$\" }\n },\n \"root_entries\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"maxItems\": 16,\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"path\", \"kind\", \"scope\", \"disposition\", \"required\"],\n \"properties\": {\n \"path\": { \"type\": \"string\", \"pattern\": \"^[a-z][a-z0-9-]{0,63}$\" },\n \"kind\": { \"const\": \"directory\" },\n \"scope\": { \"const\": \"durable\" },\n \"disposition\": { \"const\": \"quarantine\" },\n \"required\": { \"type\": \"boolean\" }\n }\n }\n },\n \"sqlite_databases\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"maxItems\": 64,\n \"items\": { \"$ref\": \"#/$defs/sqlite_database\" }\n },\n \"tree_rules\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"allowed_kinds\", \"allow_sqlite_wal_shm\", \"reject_hardlinks\", \"reject_symlinks\", \"variable_trees\", \"optional_files\"],\n \"properties\": {\n \"allowed_kinds\": { \"const\": [\"directory\", \"file\"] },\n \"allow_sqlite_wal_shm\": { \"const\": true },\n \"reject_hardlinks\": { \"const\": true },\n \"reject_symlinks\": { \"const\": true },\n \"variable_trees\": {\n \"type\": \"array\",\n \"maxItems\": 15,\n \"uniqueItems\": true,\n \"items\": { \"type\": \"string\", \"pattern\": \"^[a-z][a-z0-9-]{0,63}$\" }\n },\n \"optional_files\": {\n \"type\": \"array\",\n \"maxItems\": 16,\n \"uniqueItems\": true,\n \"items\": { \"type\": \"string\", \"pattern\": \"^db/[a-z][a-z0-9_]*\\\\.json$\" }\n }\n }\n }\n }\n },\n \"sqlite_database\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"path\",\n \"required\",\n \"application_id\",\n \"user_version\",\n \"migration_versions\",\n \"schema_objects\",\n \"schema_sha256\"\n ],\n \"properties\": {\n \"path\": { \"$ref\": \"#/$defs/relative_path\" },\n \"required\": { \"type\": \"boolean\" },\n \"application_id\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 4294967295 },\n \"user_version\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 2147483647 },\n \"migration_versions\": {\n \"type\": \"array\",\n \"maxItems\": 16,\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"table\", \"versions\"],\n \"properties\": {\n \"table\": { \"$ref\": \"#/$defs/identifier\" },\n \"versions\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"maxItems\": 64,\n \"uniqueItems\": true,\n \"items\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 2147483647 }\n }\n }\n }\n },\n \"schema_objects\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"maxItems\": 128,\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"name\", \"table_name\", \"sql\"],\n \"properties\": {\n \"type\": { \"enum\": [\"index\", \"table\"] },\n \"name\": { \"$ref\": \"#/$defs/identifier\" },\n \"table_name\": { \"$ref\": \"#/$defs/identifier\" },\n \"sql\": { \"type\": \"string\", \"minLength\": 1, \"maxLength\": 16384 }\n }\n }\n },\n \"schema_sha256\": { \"$ref\": \"#/$defs/sha256\" }\n }\n }\n }\n}\n".as_bytes();
210static CONTRACT_BODY_OWNER_SCOPE_MIGRATION_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/owner-scope-migration-v1.schema.json\",\n \"title\": \"ReDevPlugin owner scope migration journal v1\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"schema_version\",\n \"migration_id\",\n \"root_identity_sha256\",\n \"legacy_snapshot_sha256\",\n \"inventory_id\",\n \"inventory_sha256\",\n \"state\",\n \"quarantine_id\",\n \"quarantine_sha256\",\n \"fresh_generation_id\",\n \"fresh_generation_sha256\",\n \"stores\"\n ],\n \"properties\": {\n \"schema_version\": { \"const\": \"owner-scope-migration-v1\" },\n \"migration_id\": { \"$ref\": \"#/$defs/opaque_id\" },\n \"root_identity_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"legacy_snapshot_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"recovery_content_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"inventory_id\": { \"type\": \"string\", \"maxLength\": 128, \"pattern\": \"^$|^[a-z][a-z0-9._-]+$\" },\n \"inventory_sha256\": { \"type\": \"string\", \"pattern\": \"^$|^[0-9a-f]{64}$\" },\n \"state\": {\n \"enum\": [\n \"prepared\",\n \"quarantine_writing\",\n \"quarantine_committed\",\n \"fresh_prepared\",\n \"fresh_committed\",\n \"reconcile_required\",\n \"failed\"\n ]\n },\n \"quarantine_id\": { \"type\": \"string\", \"maxLength\": 128, \"pattern\": \"^$|^quarantine_[0-9a-f]{32}$\" },\n \"quarantine_sha256\": { \"type\": \"string\", \"pattern\": \"^$|^[0-9a-f]{64}$\" },\n \"fresh_generation_id\": { \"type\": \"string\", \"maxLength\": 128, \"pattern\": \"^$|^generation_[0-9a-f]{32}$\" },\n \"fresh_generation_sha256\": { \"type\": \"string\", \"pattern\": \"^$|^[0-9a-f]{64}$\" },\n \"stores\": {\n \"type\": \"array\",\n \"maxItems\": 64,\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"id\", \"scope\", \"disposition\", \"generation\", \"outcome\"],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"pattern\": \"^[a-z][a-z0-9._-]{0,127}$\" },\n \"scope\": { \"enum\": [\"durable\", \"session\", \"transient\"] },\n \"disposition\": { \"enum\": [\"quarantine\", \"terminate\"] },\n \"generation\": { \"type\": \"string\", \"maxLength\": 128 },\n \"outcome\": { \"type\": \"string\", \"maxLength\": 128 }\n }\n }\n }\n },\n \"allOf\": [\n {\n \"if\": { \"properties\": { \"inventory_id\": { \"const\": \"redevplugin-recovered-root-v1\" } }, \"required\": [\"inventory_id\"] },\n \"then\": { \"required\": [\"recovery_content_sha256\"] },\n \"else\": { \"properties\": { \"recovery_content_sha256\": false } }\n }\n ],\n \"$defs\": {\n \"opaque_id\": { \"type\": \"string\", \"pattern\": \"^migration_[0-9a-f]{32}$\" },\n \"sha256\": { \"type\": \"string\", \"pattern\": \"^[0-9a-f]{64}$\" }\n }\n}\n".as_bytes();
211static CONTRACT_BODY_OWNER_SCOPE_ROOT_RECOVERY_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/owner-scope-root-recovery-v1.schema.json\",\n \"title\": \"ReDevPlugin explicit owner scope root recovery journal v1\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"schema_version\",\n \"recovery_id\",\n \"plan_sha256\",\n \"source_root_identity_sha256\",\n \"root_identity_sha256\",\n \"source_recovery_journal_sha256\",\n \"source_journal_sha256\",\n \"source_snapshot_sha256\",\n \"source_entry_count\",\n \"source_bytes\",\n \"has_retained_quarantine\",\n \"has_source_recovery_journal\",\n \"top_level_entries\",\n \"state\",\n \"quarantine_id\",\n \"quarantine_sha256\",\n \"quarantine_content_sha256\",\n \"fresh_migration_id\",\n \"fresh_generation_id\",\n \"fresh_generation_sha256\",\n \"rebind_root_identity_sha256\"\n ],\n \"properties\": {\n \"schema_version\": { \"const\": \"owner-scope-root-recovery-v1\" },\n \"recovery_id\": { \"type\": \"string\", \"pattern\": \"^recovery_[0-9a-f]{32}$\" },\n \"plan_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"source_root_identity_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"root_identity_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"source_recovery_journal_sha256\": { \"type\": \"string\", \"pattern\": \"^$|^[0-9a-f]{64}$\" },\n \"source_journal_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"source_snapshot_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"source_entry_count\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 200000 },\n \"source_bytes\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 4294967296 },\n \"has_retained_quarantine\": { \"type\": \"boolean\" },\n \"has_source_recovery_journal\": { \"type\": \"boolean\" },\n \"top_level_entries\": {\n \"oneOf\": [\n { \"const\": [\".redevplugin-current-generation\", \".redevplugin-generations\", \".redevplugin-owner-scope-migration-v1.json\"] },\n { \"const\": [\".redevplugin-current-generation\", \".redevplugin-generations\", \".redevplugin-owner-scope-migration-v1.json\", \".redevplugin-quarantine\"] },\n { \"const\": [\".redevplugin-current-generation\", \".redevplugin-generations\", \".redevplugin-owner-scope-migration-v1.json\", \".redevplugin-owner-scope-root-recovery-source-v1.json\", \".redevplugin-quarantine\"] }\n ]\n },\n \"state\": {\n \"enum\": [\n \"prepared\",\n \"archive_writing\",\n \"archive_committed\",\n \"fresh_prepared\",\n \"fresh_committed\",\n \"rebind_prepared\",\n \"reconcile_required\",\n \"failed\"\n ]\n },\n \"quarantine_id\": { \"type\": \"string\", \"pattern\": \"^quarantine_[0-9a-f]{32}$\" },\n \"quarantine_sha256\": { \"type\": \"string\", \"pattern\": \"^$|^[0-9a-f]{64}$\" },\n \"quarantine_content_sha256\": { \"type\": \"string\", \"pattern\": \"^$|^[0-9a-f]{64}$\" },\n \"fresh_migration_id\": { \"type\": \"string\", \"pattern\": \"^migration_[0-9a-f]{32}$\" },\n \"fresh_generation_id\": { \"type\": \"string\", \"pattern\": \"^generation_[0-9a-f]{32}$\" },\n \"fresh_generation_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"rebind_root_identity_sha256\": { \"type\": \"string\", \"pattern\": \"^$|^[0-9a-f]{64}$\" }\n },\n \"allOf\": [\n {\n \"if\": { \"properties\": { \"has_source_recovery_journal\": { \"const\": true } }, \"required\": [\"has_source_recovery_journal\"] },\n \"then\": {\n \"properties\": {\n \"source_recovery_journal_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"has_retained_quarantine\": { \"const\": true },\n \"top_level_entries\": { \"const\": [\".redevplugin-current-generation\", \".redevplugin-generations\", \".redevplugin-owner-scope-migration-v1.json\", \".redevplugin-owner-scope-root-recovery-source-v1.json\", \".redevplugin-quarantine\"] }\n }\n },\n \"else\": {\n \"properties\": {\n \"source_recovery_journal_sha256\": { \"const\": \"\" }\n }\n }\n },\n {\n \"if\": {\n \"properties\": {\n \"has_source_recovery_journal\": { \"const\": false },\n \"has_retained_quarantine\": { \"const\": true }\n },\n \"required\": [\"has_source_recovery_journal\", \"has_retained_quarantine\"]\n },\n \"then\": { \"properties\": { \"top_level_entries\": { \"const\": [\".redevplugin-current-generation\", \".redevplugin-generations\", \".redevplugin-owner-scope-migration-v1.json\", \".redevplugin-quarantine\"] } } }\n },\n {\n \"if\": {\n \"properties\": {\n \"has_source_recovery_journal\": { \"const\": false },\n \"has_retained_quarantine\": { \"const\": false }\n },\n \"required\": [\"has_source_recovery_journal\", \"has_retained_quarantine\"]\n },\n \"then\": { \"properties\": { \"top_level_entries\": { \"const\": [\".redevplugin-current-generation\", \".redevplugin-generations\", \".redevplugin-owner-scope-migration-v1.json\"] } } }\n },\n {\n \"if\": { \"properties\": { \"state\": { \"enum\": [\"prepared\", \"archive_writing\"] } }, \"required\": [\"state\"] },\n \"then\": { \"properties\": { \"quarantine_sha256\": { \"const\": \"\" }, \"quarantine_content_sha256\": { \"const\": \"\" } } }\n },\n {\n \"if\": { \"properties\": { \"state\": { \"enum\": [\"archive_committed\", \"fresh_prepared\", \"fresh_committed\"] } }, \"required\": [\"state\"] },\n \"then\": { \"properties\": { \"quarantine_sha256\": { \"$ref\": \"#/$defs/sha256\" }, \"quarantine_content_sha256\": { \"$ref\": \"#/$defs/sha256\" } } }\n },\n {\n \"if\": { \"properties\": { \"state\": { \"const\": \"rebind_prepared\" } }, \"required\": [\"state\"] },\n \"then\": {\n \"properties\": {\n \"quarantine_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"quarantine_content_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"rebind_root_identity_sha256\": { \"$ref\": \"#/$defs/sha256\" }\n }\n },\n \"else\": { \"properties\": { \"rebind_root_identity_sha256\": { \"const\": \"\" } } }\n },\n {\n \"if\": { \"properties\": { \"state\": { \"enum\": [\"reconcile_required\", \"failed\"] } }, \"required\": [\"state\"] },\n \"then\": {\n \"oneOf\": [\n { \"properties\": { \"quarantine_sha256\": { \"const\": \"\" }, \"quarantine_content_sha256\": { \"const\": \"\" } } },\n { \"properties\": { \"quarantine_sha256\": { \"$ref\": \"#/$defs/sha256\" }, \"quarantine_content_sha256\": { \"$ref\": \"#/$defs/sha256\" } } }\n ]\n }\n }\n ],\n \"$defs\": {\n \"sha256\": { \"type\": \"string\", \"pattern\": \"^[0-9a-f]{64}$\" }\n }\n}\n".as_bytes();
212static CONTRACT_BODY_PACKAGE_SIGNATURE_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/package-signature-v1.schema.json\",\n \"title\": \"ReDevPlugin package detached signature v1\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"schema_version\",\n \"algorithm\",\n \"key_id\",\n \"package_hash\",\n \"manifest_hash\",\n \"entries_hash\",\n \"signature\"\n ],\n \"properties\": {\n \"schema_version\": { \"const\": \"redevplugin.package_signature.v1\" },\n \"algorithm\": { \"enum\": [\"ed25519\"] },\n \"key_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"publisher_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"plugin_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"package_hash\": { \"$ref\": \"#/$defs/sha256\" },\n \"manifest_hash\": { \"$ref\": \"#/$defs/sha256\" },\n \"entries_hash\": { \"$ref\": \"#/$defs/sha256\" },\n \"signature\": { \"type\": \"string\", \"minLength\": 1 },\n \"signed_at\": { \"type\": \"string\", \"format\": \"date-time\" }\n },\n \"$defs\": {\n \"sha256\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[a-f0-9]{64}$\"\n }\n }\n}\n".as_bytes();
213static CONTRACT_BODY_PERFORMANCE_CONTRACT: &[u8] = "{\n \"schema_version\": \"redevplugin.performance_contract.v4\",\n \"comparison_probes\": [\n {\n \"id\": \"httpadapter.route-authorization-v051\",\n \"baseline_release\": \"0.5.1\",\n \"baseline_commit\": \"3febcc59bbdb2118a4f105781b4c743bc11ba09f\",\n \"repetitions\": 9,\n \"max_attempts\": 3,\n \"warmup_batches\": 8,\n \"requests_per_sample\": 32,\n \"noise_qualification\": {\n \"batch_median_relative\": {\n \"relative_mad_limit_basis_points\": 750,\n \"maximum_relative_deviation_limit_basis_points\": 2500,\n \"order_bias_limit_basis_points\": 750\n },\n \"batch_p95_relative\": {\n \"relative_mad_limit_basis_points\": 1250,\n \"maximum_relative_deviation_limit_basis_points\": 5000,\n \"order_bias_limit_basis_points\": 2000\n }\n },\n \"measured_batches\": [\n { \"concurrency\": 1, \"batches\": 1000, \"samples\": 32000 },\n { \"concurrency\": 100, \"batches\": 64, \"samples\": 204800 },\n { \"concurrency\": 1000, \"batches\": 64, \"samples\": 2048000 }\n ],\n \"runner\": {\n \"path\": \"scripts/measure_http_route_authorization_performance.mjs\",\n \"sha256\": \"0e182c94158a915d7ee63af23da9156caf611c4832a808fb482bbfe80b417834\"\n },\n \"comparison_logic\": {\n \"path\": \"scripts/route_authorization_comparison.mjs\",\n \"sha256\": \"e8b098aadb3d7aba9e0cb64444193fa8d5c254969355572900a15ea5b894d05b\"\n },\n \"baseline_probe\": {\n \"path\": \"testdata/performance/httpadapter-v051/route_authorization_performance_test.go\",\n \"sha256\": \"2a8891b9c2e962ba3660aadb25bdf9e2cca45565ad8dea6d7b59c08fc787c18f\"\n },\n \"candidate_probe\": {\n \"path\": \"pkg/httpadapter/route_authorization_performance_test.go\",\n \"sha256\": \"113eb3f0cf1d7383a6f14b8d7406e42c655c018c1455b47f0afd44869a354ff3\"\n },\n \"shared_probe\": {\n \"path\": \"internal/performanceevidence/route_authorization.go\",\n \"sha256\": \"7ea1721d959004094e912c49aca90e05ffb83f8f1a0013bb53e7fb2e70f55725\"\n }\n }\n ],\n \"scenarios\": [\n {\n \"id\": \"runtime.blocked-hostcall-isolation\",\n \"sample_count\": 16,\n \"metrics\": [\n { \"name\": \"completed\", \"unit\": \"count\", \"comparator\": \"eq\", \"limit\": 16 },\n { \"name\": \"p95\", \"unit\": \"milliseconds\", \"comparator\": \"lte\", \"limit\": 250 }\n ]\n },\n {\n \"id\": \"runtime.cache-single-flight\",\n \"sample_count\": 32,\n \"metrics\": [\n { \"name\": \"artifact_reads\", \"unit\": \"count\", \"comparator\": \"eq\", \"limit\": 1 },\n { \"name\": \"module_compiles\", \"unit\": \"count\", \"comparator\": \"eq\", \"limit\": 1 },\n { \"name\": \"cache_entries\", \"unit\": \"count\", \"comparator\": \"eq\", \"limit\": 1 }\n ]\n },\n {\n \"id\": \"runtime.cancel-queued\",\n \"sample_count\": 20,\n \"metrics\": [\n { \"name\": \"p95\", \"unit\": \"milliseconds\", \"comparator\": \"lte\", \"limit\": 50 }\n ]\n },\n {\n \"id\": \"runtime.cancel-running\",\n \"sample_count\": 20,\n \"metrics\": [\n { \"name\": \"ack_p95\", \"unit\": \"milliseconds\", \"comparator\": \"lte\", \"limit\": 100 },\n { \"name\": \"runtime_ready\", \"unit\": \"count\", \"comparator\": \"eq\", \"limit\": 1 }\n ]\n },\n {\n \"id\": \"runtime.warm-invocations\",\n \"sample_count\": 32,\n \"metrics\": [\n { \"name\": \"completed\", \"unit\": \"count\", \"comparator\": \"eq\", \"limit\": 32 },\n { \"name\": \"p95\", \"unit\": \"milliseconds\", \"comparator\": \"lte\", \"limit\": 100 },\n { \"name\": \"max\", \"unit\": \"milliseconds\", \"comparator\": \"lte\", \"limit\": 500 }\n ]\n },\n {\n \"id\": \"runtime.ipc-writer-burst\",\n \"sample_count\": 10000,\n \"metrics\": [\n { \"name\": \"frames\", \"unit\": \"count\", \"comparator\": \"eq\", \"limit\": 10000 },\n { \"name\": \"queue_capacity\", \"unit\": \"count\", \"comparator\": \"eq\", \"limit\": 136 },\n { \"name\": \"blocked_at_capacity\", \"unit\": \"count\", \"comparator\": \"eq\", \"limit\": 1 },\n { \"name\": \"peak_rss_bytes\", \"unit\": \"bytes\", \"comparator\": \"lte\", \"limit\": 67108864 },\n { \"name\": \"flushes\", \"unit\": \"count\", \"comparator\": \"lte\", \"limit\": 625 }\n ]\n },\n {\n \"id\": \"runtime.scheduler-indexed-cancel\",\n \"sample_count\": 10000,\n \"metrics\": [\n { \"name\": \"index_lookups\", \"unit\": \"count\", \"comparator\": \"eq\", \"limit\": 10000 },\n { \"name\": \"compaction_entries_per_cancel\", \"unit\": \"basis_points\", \"comparator\": \"lte\", \"limit\": 25000 },\n { \"name\": \"remaining_requests\", \"unit\": \"count\", \"comparator\": \"eq\", \"limit\": 0 }\n ]\n },\n {\n \"id\": \"runtime.module-cache-indexed-eviction\",\n \"sample_count\": 10000,\n \"metrics\": [\n { \"name\": \"index_pops_per_eviction\", \"unit\": \"basis_points\", \"comparator\": \"eq\", \"limit\": 10000 },\n { \"name\": \"remaining_entries\", \"unit\": \"count\", \"comparator\": \"eq\", \"limit\": 128 }\n ]\n },\n {\n \"id\": \"httpadapter.route-authorization-c1\",\n \"sample_count\": 32000,\n \"metrics\": [\n { \"name\": \"p95_relative\", \"unit\": \"basis_points\", \"comparator\": \"lte\", \"limit\": 11000 },\n { \"name\": \"p99_relative\", \"unit\": \"basis_points\", \"comparator\": \"lte\", \"limit\": 11500 },\n { \"name\": \"allocations_increase\", \"unit\": \"count\", \"comparator\": \"lte\", \"limit\": 1 },\n { \"name\": \"allocated_bytes_relative\", \"unit\": \"basis_points\", \"comparator\": \"lte\", \"limit\": 10500 }\n ]\n },\n {\n \"id\": \"httpadapter.route-authorization-c100\",\n \"sample_count\": 204800,\n \"metrics\": [\n { \"name\": \"batch_median_relative\", \"unit\": \"basis_points\", \"comparator\": \"lte\", \"limit\": 11000 },\n { \"name\": \"batch_p95_relative\", \"unit\": \"basis_points\", \"comparator\": \"lte\", \"limit\": 11500 },\n { \"name\": \"allocations_increase\", \"unit\": \"count\", \"comparator\": \"lte\", \"limit\": 1 },\n { \"name\": \"allocated_bytes_relative\", \"unit\": \"basis_points\", \"comparator\": \"lte\", \"limit\": 10500 }\n ]\n },\n {\n \"id\": \"httpadapter.route-authorization-c1000\",\n \"sample_count\": 2048000,\n \"metrics\": [\n { \"name\": \"batch_median_relative\", \"unit\": \"basis_points\", \"comparator\": \"lte\", \"limit\": 11000 },\n { \"name\": \"batch_p95_relative\", \"unit\": \"basis_points\", \"comparator\": \"lte\", \"limit\": 11500 },\n { \"name\": \"allocations_increase\", \"unit\": \"count\", \"comparator\": \"lte\", \"limit\": 1 },\n { \"name\": \"allocated_bytes_relative\", \"unit\": \"basis_points\", \"comparator\": \"lte\", \"limit\": 10500 }\n ]\n },\n {\n \"id\": \"connectivity.http-keepalive\",\n \"sample_count\": 64,\n \"metrics\": [\n { \"name\": \"p95_relative_to_connect\", \"unit\": \"basis_points\", \"comparator\": \"lte\", \"limit\": 7000 },\n { \"name\": \"reused_connection_dials\", \"unit\": \"count\", \"comparator\": \"eq\", \"limit\": 1 }\n ]\n },\n {\n \"id\": \"connectivity.udp-limiter-scaling\",\n \"sample_count\": 9000,\n \"metrics\": [\n { \"name\": \"p95_large_relative_to_small\", \"unit\": \"basis_points\", \"comparator\": \"lte\", \"limit\": 20000 },\n { \"name\": \"bucket_capacity\", \"unit\": \"count\", \"comparator\": \"eq\", \"limit\": 65536 },\n { \"name\": \"overflow_denied\", \"unit\": \"count\", \"comparator\": \"eq\", \"limit\": 1 }\n ]\n },\n {\n \"id\": \"plugindata.namespace-cache-warm\",\n \"sample_count\": 100,\n \"metrics\": [\n { \"name\": \"relative_allocations\", \"unit\": \"basis_points\", \"comparator\": \"lte\", \"limit\": 3000 }\n ]\n },\n {\n \"id\": \"pluginpkg.package-owned-materialization\",\n \"sample_count\": 3,\n \"metrics\": [\n { \"name\": \"peak_rss_relative_to_cloned\", \"unit\": \"basis_points\", \"comparator\": \"lte\", \"limit\": 6500 }\n ]\n },\n {\n \"id\": \"pluginpkg.wasm-inspection-cache\",\n \"sample_count\": 1000,\n \"metrics\": [\n { \"name\": \"inspector_calls\", \"unit\": \"count\", \"comparator\": \"eq\", \"limit\": 1 },\n { \"name\": \"cache_entries\", \"unit\": \"count\", \"comparator\": \"eq\", \"limit\": 1 },\n { \"name\": \"cache_capacity\", \"unit\": \"count\", \"comparator\": \"eq\", \"limit\": 128 },\n { \"name\": \"warm_relative_allocations\", \"unit\": \"basis_points\", \"comparator\": \"lte\", \"limit\": 5000 }\n ]\n },\n {\n \"id\": \"registry.sqlite-authorization-scaling\",\n \"sample_count\": 500,\n \"metrics\": [\n { \"name\": \"p95_1000_grants_relative_to_1\", \"unit\": \"basis_points\", \"comparator\": \"lte\", \"limit\": 20000 }\n ]\n },\n {\n \"id\": \"operation.memory-store-snapshot\",\n \"sample_count\": 1000,\n \"metrics\": [\n { \"name\": \"relative_allocations\", \"unit\": \"basis_points\", \"comparator\": \"lte\", \"limit\": 2000 }\n ]\n },\n {\n \"id\": \"stream.memory-store-snapshot\",\n \"sample_count\": 1000,\n \"metrics\": [\n { \"name\": \"relative_allocations\", \"unit\": \"basis_points\", \"comparator\": \"lte\", \"limit\": 2000 }\n ]\n },\n {\n \"id\": \"stream.event-backpressure\",\n \"sample_count\": 257,\n \"metrics\": [\n { \"name\": \"accepted_events\", \"unit\": \"count\", \"comparator\": \"eq\", \"limit\": 256 },\n { \"name\": \"first_rejected_event\", \"unit\": \"count\", \"comparator\": \"eq\", \"limit\": 257 }\n ]\n },\n {\n \"id\": \"stream.idle-waiters\",\n \"sample_count\": 500,\n \"metrics\": [\n { \"name\": \"waiters\", \"unit\": \"count\", \"comparator\": \"eq\", \"limit\": 500 },\n { \"name\": \"periodic_store_queries\", \"unit\": \"queries\", \"comparator\": \"eq\", \"limit\": 0 },\n { \"name\": \"wake_p95\", \"unit\": \"milliseconds\", \"comparator\": \"lte\", \"limit\": 100 }\n ]\n },\n {\n \"id\": \"stream.sqlite-batch-delivery\",\n \"sample_count\": 256,\n \"metrics\": [\n { \"name\": \"events_selected\", \"unit\": \"count\", \"comparator\": \"eq\", \"limit\": 256 },\n { \"name\": \"bounded_selects\", \"unit\": \"queries\", \"comparator\": \"eq\", \"limit\": 1 },\n { \"name\": \"delivery_snapshots\", \"unit\": \"queries\", \"comparator\": \"eq\", \"limit\": 1 },\n { \"name\": \"range_deletes\", \"unit\": \"queries\", \"comparator\": \"eq\", \"limit\": 1 },\n { \"name\": \"remaining_events\", \"unit\": \"count\", \"comparator\": \"eq\", \"limit\": 256 }\n ]\n },\n {\n \"id\": \"ui.chromium-renderer\",\n \"sample_count\": 10,\n \"metrics\": [\n { \"name\": \"reverse_patch_p95\", \"unit\": \"milliseconds\", \"comparator\": \"lte\", \"limit\": 50 },\n { \"name\": \"long_tasks\", \"unit\": \"long_tasks\", \"comparator\": \"eq\", \"limit\": 0 },\n { \"name\": \"max_long_task\", \"unit\": \"milliseconds\", \"comparator\": \"lte\", \"limit\": 50 }\n ]\n },\n {\n \"id\": \"ui.keyed-reversal\",\n \"sample_count\": 30,\n \"metrics\": [\n { \"name\": \"moves\", \"unit\": \"count\", \"comparator\": \"eq\", \"limit\": 999 },\n { \"name\": \"p95\", \"unit\": \"milliseconds\", \"comparator\": \"lte\", \"limit\": 50 }\n ]\n },\n {\n \"id\": \"ui.single-leaf-reconciliation\",\n \"sample_count\": 40,\n \"metrics\": [\n { \"name\": \"p95\", \"unit\": \"milliseconds\", \"comparator\": \"lte\", \"limit\": 16 },\n { \"name\": \"max\", \"unit\": \"milliseconds\", \"comparator\": \"lte\", \"limit\": 50 }\n ]\n }\n ]\n}\n".as_bytes();
214static CONTRACT_BODY_PERFORMANCE_EVIDENCE_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/performance-evidence-v4.schema.json\",\n \"title\": \"ReDevPlugin release performance evidence v4\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"schema_version\",\n \"release_version\",\n \"source_commit\",\n \"generated_at\",\n \"environment\",\n \"scenarios\",\n \"comparisons\",\n \"contract_hashes\"\n ],\n \"properties\": {\n \"schema_version\": { \"const\": \"redevplugin.performance_evidence.v4\" },\n \"release_version\": { \"$ref\": \"#/$defs/semver\" },\n \"source_commit\": { \"type\": \"string\", \"pattern\": \"^[0-9a-f]{40}$\" },\n \"generated_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"environment\": { \"$ref\": \"#/$defs/environment\" },\n \"scenarios\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"uniqueItems\": true,\n \"items\": { \"$ref\": \"#/$defs/scenario\" }\n },\n \"comparisons\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"uniqueItems\": true,\n \"items\": { \"$ref\": \"#/$defs/comparison\" }\n },\n \"contract_hashes\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"uniqueItems\": true,\n \"items\": { \"$ref\": \"#/$defs/contract_hash\" }\n }\n },\n \"$defs\": {\n \"semver\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)(?:-[0-9A-Za-z.-]+)?$\"\n },\n \"sha256\": {\n \"type\": \"string\",\n \"pattern\": \"^[0-9a-f]{64}$\"\n },\n \"environment\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"os\", \"arch\", \"logical_cpus\", \"go_version\", \"node_version\", \"rustc_version\", \"chromium_version\"],\n \"properties\": {\n \"os\": { \"type\": \"string\", \"minLength\": 1 },\n \"arch\": { \"type\": \"string\", \"minLength\": 1 },\n \"logical_cpus\": { \"type\": \"integer\", \"minimum\": 1 },\n \"go_version\": { \"type\": \"string\", \"minLength\": 1 },\n \"node_version\": { \"type\": \"string\", \"minLength\": 1 },\n \"rustc_version\": { \"type\": \"string\", \"minLength\": 1 },\n \"chromium_version\": { \"type\": \"string\", \"minLength\": 1 }\n }\n },\n \"scenario\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"id\", \"gate\", \"status\", \"sample_count\", \"metrics\"],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"pattern\": \"^[a-z][a-z0-9._-]+$\" },\n \"gate\": { \"enum\": [\"fast\", \"smoke\", \"weekly\", \"full\", \"release\"] },\n \"status\": { \"const\": \"pass\" },\n \"sample_count\": { \"type\": \"integer\", \"minimum\": 1 },\n \"metrics\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"uniqueItems\": true,\n \"items\": { \"$ref\": \"#/$defs/metric\" }\n }\n }\n },\n \"metric\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"name\", \"unit\", \"observed\", \"limit\", \"comparator\"],\n \"properties\": {\n \"name\": { \"type\": \"string\", \"pattern\": \"^[a-z][a-z0-9._-]+$\" },\n \"unit\": { \"enum\": [\"milliseconds\", \"count\", \"bytes\", \"queries\", \"long_tasks\", \"basis_points\"] },\n \"observed\": { \"type\": \"number\", \"minimum\": 0 },\n \"limit\": { \"type\": \"number\", \"minimum\": 0 },\n \"comparator\": { \"enum\": [\"lte\", \"eq\"] }\n }\n },\n \"comparison\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"baseline_release\",\n \"baseline_commit\",\n \"candidate_commit\",\n \"accepted_attempt\",\n \"attempts\"\n ],\n \"properties\": {\n \"id\": { \"const\": \"httpadapter.route-authorization-v051\" },\n \"baseline_release\": { \"const\": \"0.5.1\" },\n \"baseline_commit\": { \"const\": \"3febcc59bbdb2118a4f105781b4c743bc11ba09f\" },\n \"candidate_commit\": { \"type\": \"string\", \"pattern\": \"^[0-9a-f]{40}$\" },\n \"accepted_attempt\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 3 },\n \"attempts\": { \"type\": \"array\" }\n },\n \"oneOf\": [\n {\n \"properties\": {\n \"accepted_attempt\": { \"const\": 1 },\n \"attempts\": {\n \"minItems\": 1,\n \"maxItems\": 1,\n \"prefixItems\": [{ \"$ref\": \"#/$defs/comparison_attempt_1_qualified\" }],\n \"items\": false\n }\n }\n },\n {\n \"properties\": {\n \"accepted_attempt\": { \"const\": 2 },\n \"attempts\": {\n \"minItems\": 2,\n \"maxItems\": 2,\n \"prefixItems\": [\n { \"$ref\": \"#/$defs/comparison_attempt_1_noisy\" },\n { \"$ref\": \"#/$defs/comparison_attempt_2_qualified\" }\n ],\n \"items\": false\n }\n }\n },\n {\n \"properties\": {\n \"accepted_attempt\": { \"const\": 3 },\n \"attempts\": {\n \"minItems\": 3,\n \"maxItems\": 3,\n \"prefixItems\": [\n { \"$ref\": \"#/$defs/comparison_attempt_1_noisy\" },\n { \"$ref\": \"#/$defs/comparison_attempt_2_noisy\" },\n { \"$ref\": \"#/$defs/comparison_attempt_3_qualified\" }\n ],\n \"items\": false\n }\n }\n }\n ]\n },\n \"comparison_attempt\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"attempt\", \"run_order\", \"environment\", \"runs\", \"noise_qualification\", \"attempt_sha256\"],\n \"properties\": {\n \"attempt\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 3 },\n \"run_order\": {\n \"type\": \"array\",\n \"minItems\": 18,\n \"maxItems\": 18,\n \"prefixItems\": [\n { \"const\": \"baseline\" }, { \"const\": \"candidate\" },\n { \"const\": \"candidate\" }, { \"const\": \"baseline\" },\n { \"const\": \"baseline\" }, { \"const\": \"candidate\" },\n { \"const\": \"candidate\" }, { \"const\": \"baseline\" },\n { \"const\": \"baseline\" }, { \"const\": \"candidate\" },\n { \"const\": \"candidate\" }, { \"const\": \"baseline\" },\n { \"const\": \"baseline\" }, { \"const\": \"candidate\" },\n { \"const\": \"candidate\" }, { \"const\": \"baseline\" },\n { \"const\": \"baseline\" }, { \"const\": \"candidate\" }\n ],\n \"items\": false\n },\n \"environment\": { \"$ref\": \"#/$defs/route_authorization_environment\" },\n \"runs\": {\n \"type\": \"array\",\n \"minItems\": 9,\n \"maxItems\": 9,\n \"prefixItems\": [\n { \"$ref\": \"#/$defs/comparison_run_0_baseline\" },\n { \"$ref\": \"#/$defs/comparison_run_1_candidate\" },\n { \"$ref\": \"#/$defs/comparison_run_2_baseline\" },\n { \"$ref\": \"#/$defs/comparison_run_3_candidate\" },\n { \"$ref\": \"#/$defs/comparison_run_4_baseline\" },\n { \"$ref\": \"#/$defs/comparison_run_5_candidate\" },\n { \"$ref\": \"#/$defs/comparison_run_6_baseline\" },\n { \"$ref\": \"#/$defs/comparison_run_7_candidate\" },\n { \"$ref\": \"#/$defs/comparison_run_8_baseline\" }\n ],\n \"items\": false\n },\n \"noise_qualification\": { \"$ref\": \"#/$defs/noise_qualification\" },\n \"attempt_sha256\": { \"$ref\": \"#/$defs/sha256\" }\n }\n },\n \"comparison_attempt_1_qualified\": {\n \"allOf\": [\n { \"$ref\": \"#/$defs/comparison_attempt\" },\n { \"properties\": { \"attempt\": { \"const\": 1 }, \"noise_qualification\": { \"properties\": { \"status\": { \"const\": \"qualified\" } } } } }\n ]\n },\n \"comparison_attempt_1_noisy\": {\n \"allOf\": [\n { \"$ref\": \"#/$defs/comparison_attempt\" },\n { \"properties\": { \"attempt\": { \"const\": 1 }, \"noise_qualification\": { \"properties\": { \"status\": { \"const\": \"noisy\" } } } } }\n ]\n },\n \"comparison_attempt_2_qualified\": {\n \"allOf\": [\n { \"$ref\": \"#/$defs/comparison_attempt\" },\n { \"properties\": { \"attempt\": { \"const\": 2 }, \"noise_qualification\": { \"properties\": { \"status\": { \"const\": \"qualified\" } } } } }\n ]\n },\n \"comparison_attempt_2_noisy\": {\n \"allOf\": [\n { \"$ref\": \"#/$defs/comparison_attempt\" },\n { \"properties\": { \"attempt\": { \"const\": 2 }, \"noise_qualification\": { \"properties\": { \"status\": { \"const\": \"noisy\" } } } } }\n ]\n },\n \"comparison_attempt_3_qualified\": {\n \"allOf\": [\n { \"$ref\": \"#/$defs/comparison_attempt\" },\n { \"properties\": { \"attempt\": { \"const\": 3 }, \"noise_qualification\": { \"properties\": { \"status\": { \"const\": \"qualified\" } } } } }\n ]\n },\n \"comparison_run\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"pair_index\",\n \"first_variant\",\n \"baseline_profile_sha256\",\n \"candidate_profile_sha256\",\n \"baseline_profile\",\n \"candidate_profile\"\n ],\n \"properties\": {\n \"pair_index\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 8 },\n \"first_variant\": { \"enum\": [\"baseline\", \"candidate\"] },\n \"baseline_profile_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"candidate_profile_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"baseline_profile\": { \"$ref\": \"#/$defs/route_authorization_profile\" },\n \"candidate_profile\": { \"$ref\": \"#/$defs/route_authorization_profile\" }\n }\n },\n \"comparison_run_0_baseline\": { \"allOf\": [{ \"$ref\": \"#/$defs/comparison_run\" }, { \"properties\": { \"pair_index\": { \"const\": 0 }, \"first_variant\": { \"const\": \"baseline\" } } }] },\n \"comparison_run_1_candidate\": { \"allOf\": [{ \"$ref\": \"#/$defs/comparison_run\" }, { \"properties\": { \"pair_index\": { \"const\": 1 }, \"first_variant\": { \"const\": \"candidate\" } } }] },\n \"comparison_run_2_baseline\": { \"allOf\": [{ \"$ref\": \"#/$defs/comparison_run\" }, { \"properties\": { \"pair_index\": { \"const\": 2 }, \"first_variant\": { \"const\": \"baseline\" } } }] },\n \"comparison_run_3_candidate\": { \"allOf\": [{ \"$ref\": \"#/$defs/comparison_run\" }, { \"properties\": { \"pair_index\": { \"const\": 3 }, \"first_variant\": { \"const\": \"candidate\" } } }] },\n \"comparison_run_4_baseline\": { \"allOf\": [{ \"$ref\": \"#/$defs/comparison_run\" }, { \"properties\": { \"pair_index\": { \"const\": 4 }, \"first_variant\": { \"const\": \"baseline\" } } }] },\n \"comparison_run_5_candidate\": { \"allOf\": [{ \"$ref\": \"#/$defs/comparison_run\" }, { \"properties\": { \"pair_index\": { \"const\": 5 }, \"first_variant\": { \"const\": \"candidate\" } } }] },\n \"comparison_run_6_baseline\": { \"allOf\": [{ \"$ref\": \"#/$defs/comparison_run\" }, { \"properties\": { \"pair_index\": { \"const\": 6 }, \"first_variant\": { \"const\": \"baseline\" } } }] },\n \"comparison_run_7_candidate\": { \"allOf\": [{ \"$ref\": \"#/$defs/comparison_run\" }, { \"properties\": { \"pair_index\": { \"const\": 7 }, \"first_variant\": { \"const\": \"candidate\" } } }] },\n \"comparison_run_8_baseline\": { \"allOf\": [{ \"$ref\": \"#/$defs/comparison_run\" }, { \"properties\": { \"pair_index\": { \"const\": 8 }, \"first_variant\": { \"const\": \"baseline\" } } }] },\n \"noise_qualification\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"status\", \"reasons\", \"metrics\"],\n \"properties\": {\n \"status\": { \"enum\": [\"qualified\", \"noisy\"] },\n \"reasons\": {\n \"type\": \"array\",\n \"maxItems\": 12,\n \"uniqueItems\": true,\n \"items\": { \"type\": \"string\", \"pattern\": \"^c(100|1000)\\\\.(batch_median_relative|batch_p95_relative)\\\\.(relative_mad|maximum_relative_deviation|order_bias)$\" }\n },\n \"metrics\": {\n \"type\": \"array\",\n \"minItems\": 4,\n \"maxItems\": 4,\n \"uniqueItems\": true,\n \"prefixItems\": [\n { \"$ref\": \"#/$defs/noise_metric_c100_batch_median\" },\n { \"$ref\": \"#/$defs/noise_metric_c100_batch_p95\" },\n { \"$ref\": \"#/$defs/noise_metric_c1000_batch_median\" },\n { \"$ref\": \"#/$defs/noise_metric_c1000_batch_p95\" }\n ],\n \"items\": false\n }\n },\n \"allOf\": [\n {\n \"if\": { \"properties\": { \"status\": { \"const\": \"qualified\" } } },\n \"then\": { \"properties\": { \"reasons\": { \"maxItems\": 0 } } },\n \"else\": { \"properties\": { \"reasons\": { \"minItems\": 1 } } }\n }\n ]\n },\n \"noise_metric\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\", \"median_basis_points\", \"relative_mad_basis_points\", \"relative_mad_limit_basis_points\",\n \"maximum_relative_deviation_basis_points\", \"maximum_relative_deviation_limit_basis_points\",\n \"order_bias_basis_points\", \"order_bias_limit_basis_points\"\n ],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"pattern\": \"^c(100|1000)\\\\.(batch_median_relative|batch_p95_relative)$\" },\n \"median_basis_points\": { \"type\": \"number\", \"exclusiveMinimum\": 0 },\n \"relative_mad_basis_points\": { \"type\": \"number\", \"minimum\": 0 },\n \"relative_mad_limit_basis_points\": { \"type\": \"number\", \"minimum\": 0 },\n \"maximum_relative_deviation_basis_points\": { \"type\": \"number\", \"minimum\": 0 },\n \"maximum_relative_deviation_limit_basis_points\": { \"type\": \"number\", \"minimum\": 0 },\n \"order_bias_basis_points\": { \"type\": \"number\", \"minimum\": 0 },\n \"order_bias_limit_basis_points\": { \"type\": \"number\", \"minimum\": 0 }\n },\n \"allOf\": [\n {\n \"if\": { \"properties\": { \"id\": { \"pattern\": \"\\\\.batch_median_relative$\" } } },\n \"then\": {\n \"properties\": {\n \"relative_mad_limit_basis_points\": { \"const\": 750 },\n \"maximum_relative_deviation_limit_basis_points\": { \"const\": 2500 },\n \"order_bias_limit_basis_points\": { \"const\": 750 }\n }\n },\n \"else\": {\n \"properties\": {\n \"relative_mad_limit_basis_points\": { \"const\": 1250 },\n \"maximum_relative_deviation_limit_basis_points\": { \"const\": 5000 },\n \"order_bias_limit_basis_points\": { \"const\": 2000 }\n }\n }\n }\n ]\n },\n \"noise_metric_c100_batch_median\": { \"allOf\": [{ \"$ref\": \"#/$defs/noise_metric\" }, { \"properties\": { \"id\": { \"const\": \"c100.batch_median_relative\" } } }] },\n \"noise_metric_c100_batch_p95\": { \"allOf\": [{ \"$ref\": \"#/$defs/noise_metric\" }, { \"properties\": { \"id\": { \"const\": \"c100.batch_p95_relative\" } } }] },\n \"noise_metric_c1000_batch_median\": { \"allOf\": [{ \"$ref\": \"#/$defs/noise_metric\" }, { \"properties\": { \"id\": { \"const\": \"c1000.batch_median_relative\" } } }] },\n \"noise_metric_c1000_batch_p95\": { \"allOf\": [{ \"$ref\": \"#/$defs/noise_metric\" }, { \"properties\": { \"id\": { \"const\": \"c1000.batch_p95_relative\" } } }] },\n \"route_authorization_profile\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"schema_version\", \"variant\", \"commit\", \"environment\", \"warmup_count\", \"requests_per_sample\", \"measurements\"],\n \"properties\": {\n \"schema_version\": { \"const\": \"redevplugin.route_authorization_performance.v2\" },\n \"variant\": { \"enum\": [\"v0.5.1\", \"v0.6.0\"] },\n \"commit\": { \"type\": \"string\", \"pattern\": \"^[0-9a-f]{40}$\" },\n \"environment\": { \"$ref\": \"#/$defs/route_authorization_environment\" },\n \"warmup_count\": { \"const\": 8 },\n \"requests_per_sample\": { \"const\": 32 },\n \"measurements\": {\n \"type\": \"array\",\n \"minItems\": 3,\n \"maxItems\": 3,\n \"uniqueItems\": true,\n \"items\": { \"$ref\": \"#/$defs/route_authorization_measurement\" }\n }\n }\n },\n \"route_authorization_environment\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"os\", \"arch\", \"logical_cpus\", \"gomaxprocs\", \"go_version\"],\n \"properties\": {\n \"os\": { \"type\": \"string\", \"minLength\": 1 },\n \"arch\": { \"type\": \"string\", \"minLength\": 1 },\n \"logical_cpus\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 9007199254740991 },\n \"gomaxprocs\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 9007199254740991 },\n \"go_version\": { \"type\": \"string\", \"minLength\": 1 }\n }\n },\n \"route_authorization_measurement\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"concurrency\",\n \"batch_count\",\n \"sample_count\",\n \"median_nanoseconds\",\n \"p95_nanoseconds\",\n \"p99_nanoseconds\",\n \"batch_median_nanoseconds_per_request\",\n \"batch_p95_nanoseconds_per_request\",\n \"allocations_per_request\",\n \"bytes_per_request\"\n ],\n \"properties\": {\n \"concurrency\": { \"enum\": [1, 100, 1000] },\n \"batch_count\": { \"type\": \"integer\", \"minimum\": 64, \"maximum\": 9007199254740991 },\n \"sample_count\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 9007199254740991 },\n \"median_nanoseconds\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 9007199254740991 },\n \"p95_nanoseconds\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 9007199254740991 },\n \"p99_nanoseconds\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 9007199254740991 },\n \"batch_median_nanoseconds_per_request\": { \"type\": \"number\", \"exclusiveMinimum\": 0 },\n \"batch_p95_nanoseconds_per_request\": { \"type\": \"number\", \"exclusiveMinimum\": 0 },\n \"allocations_per_request\": { \"type\": \"number\", \"minimum\": 0 },\n \"bytes_per_request\": { \"type\": \"number\", \"minimum\": 0 }\n }\n },\n \"contract_hash\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"id\", \"sha256\"],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"pattern\": \"^[a-z][a-z0-9-]+$\" },\n \"sha256\": { \"$ref\": \"#/$defs/sha256\" }\n }\n }\n }\n}\n".as_bytes();
215static CONTRACT_BODY_PLATFORM_PACKAGE_PUBLICATION_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/platform-package-publication-v1.schema.json\",\n \"title\": \"ReDevPlugin Platform Package Publication V1\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"schema_version\", \"platform_version\", \"source_commit\", \"workflow\", \"go_module\", \"npm_packages\", \"rust_crates\", \"contract_set_sha256\"],\n \"properties\": {\n \"schema_version\": {\"const\": \"redevplugin.platform_package_publication.v1\"},\n \"platform_version\": {\"$ref\": \"#/$defs/version\"},\n \"source_commit\": {\"$ref\": \"#/$defs/commit\"},\n \"workflow\": {\"$ref\": \"#/$defs/workflow\"},\n \"go_module\": {\"$ref\": \"#/$defs/go_module\"},\n \"npm_packages\": {\n \"type\": \"array\",\n \"minItems\": 2,\n \"maxItems\": 2,\n \"uniqueItems\": true,\n \"prefixItems\": [\n {\"$ref\": \"#/$defs/npm_contracts\"},\n {\"$ref\": \"#/$defs/npm_ui\"}\n ],\n \"items\": false\n },\n \"rust_crates\": {\n \"type\": \"array\",\n \"minItems\": 6,\n \"maxItems\": 6,\n \"uniqueItems\": true,\n \"prefixItems\": [\n {\"$ref\": \"#/$defs/rust_contracts\"},\n {\"$ref\": \"#/$defs/rust_ipc\"},\n {\"$ref\": \"#/$defs/rust_wasm_abi\"},\n {\"$ref\": \"#/$defs/rust_target_classifier\"},\n {\"$ref\": \"#/$defs/rust_worker_sdk\"},\n {\"$ref\": \"#/$defs/rust_runtime\"}\n ],\n \"items\": false\n },\n \"contract_set_sha256\": {\"$ref\": \"#/$defs/sha256\"}\n },\n \"$defs\": {\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 5,\n \"maxLength\": 64,\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)$\"\n },\n \"commit\": {\"type\": \"string\", \"pattern\": \"^[0-9a-f]{40}$\"},\n \"sha256\": {\"type\": \"string\", \"pattern\": \"^[0-9a-f]{64}$\"},\n \"workflow\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"repository\", \"path\", \"ref\", \"sha\"],\n \"properties\": {\n \"repository\": {\"const\": \"floegence/redevplugin\"},\n \"path\": {\"const\": \".github/workflows/release.yml\"},\n \"ref\": {\"type\": \"string\", \"minLength\": 15, \"maxLength\": 80, \"pattern\": \"^refs/tags/v(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)$\"},\n \"sha\": {\"$ref\": \"#/$defs/commit\"}\n }\n },\n \"go_module\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"module\", \"version\", \"h1\", \"go_mod_h1\"],\n \"properties\": {\n \"module\": {\"const\": \"github.com/floegence/redevplugin\"},\n \"version\": {\"type\": \"string\", \"minLength\": 6, \"maxLength\": 65, \"pattern\": \"^v(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)$\"},\n \"h1\": {\"type\": \"string\", \"pattern\": \"^h1:[A-Za-z0-9+/]{43}=$\"},\n \"go_mod_h1\": {\"type\": \"string\", \"pattern\": \"^h1:[A-Za-z0-9+/]{43}=$\"}\n }\n },\n \"npm_package\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"name\", \"version\", \"integrity\", \"provenance_subject_sha512\"],\n \"properties\": {\n \"name\": {\"type\": \"string\", \"minLength\": 1, \"maxLength\": 128},\n \"version\": {\"$ref\": \"#/$defs/version\"},\n \"integrity\": {\"type\": \"string\", \"pattern\": \"^sha512-[A-Za-z0-9+/]{86}==$\"},\n \"provenance_subject_sha512\": {\"type\": \"string\", \"pattern\": \"^[0-9a-f]{128}$\"}\n }\n },\n \"npm_contracts\": {\n \"allOf\": [\n {\"$ref\": \"#/$defs/npm_package\"},\n {\"properties\": {\"name\": {\"const\": \"@floegence/redevplugin-contracts\"}}}\n ]\n },\n \"npm_ui\": {\n \"allOf\": [\n {\"$ref\": \"#/$defs/npm_package\"},\n {\"properties\": {\"name\": {\"const\": \"@floegence/redevplugin-ui\"}}}\n ]\n },\n \"rust_crate\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"name\", \"version\", \"registry_checksum_sha256\"],\n \"properties\": {\n \"name\": {\"type\": \"string\", \"minLength\": 1, \"maxLength\": 128},\n \"version\": {\"$ref\": \"#/$defs/version\"},\n \"registry_checksum_sha256\": {\"$ref\": \"#/$defs/sha256\"}\n }\n },\n \"rust_contracts\": {\n \"allOf\": [\n {\"$ref\": \"#/$defs/rust_crate\"},\n {\"properties\": {\"name\": {\"const\": \"redevplugin-contracts\"}}}\n ]\n },\n \"rust_ipc\": {\n \"allOf\": [\n {\"$ref\": \"#/$defs/rust_crate\"},\n {\"properties\": {\"name\": {\"const\": \"redevplugin-ipc\"}}}\n ]\n },\n \"rust_wasm_abi\": {\n \"allOf\": [\n {\"$ref\": \"#/$defs/rust_crate\"},\n {\"properties\": {\"name\": {\"const\": \"redevplugin-wasm-abi\"}}}\n ]\n },\n \"rust_target_classifier\": {\n \"allOf\": [\n {\"$ref\": \"#/$defs/rust_crate\"},\n {\"properties\": {\"name\": {\"const\": \"redevplugin-target-classifier\"}}}\n ]\n },\n \"rust_worker_sdk\": {\n \"allOf\": [\n {\"$ref\": \"#/$defs/rust_crate\"},\n {\"properties\": {\"name\": {\"const\": \"redevplugin-worker-sdk\"}}}\n ]\n },\n \"rust_runtime\": {\n \"allOf\": [\n {\"$ref\": \"#/$defs/rust_crate\"},\n {\"properties\": {\"name\": {\"const\": \"redevplugin-runtime\"}}}\n ]\n }\n }\n}\n".as_bytes();
216static CONTRACT_BODY_PLATFORM_PACKAGE_SET_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/platform-package-set-v1.schema.json\",\n \"title\": \"ReDevPlugin Platform Package Set V1\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"schema_version\", \"platform_version\", \"go_module\", \"npm_packages\", \"rust_crates\", \"contract_registry_version\", \"contract_set_sha256\"],\n \"properties\": {\n \"schema_version\": {\"const\": \"redevplugin.platform_package_set.v1\"},\n \"platform_version\": {\"$ref\": \"#/$defs/version\"},\n \"go_module\": {\"$ref\": \"#/$defs/go_module\"},\n \"npm_packages\": {\n \"type\": \"array\",\n \"minItems\": 2,\n \"maxItems\": 2,\n \"uniqueItems\": true,\n \"prefixItems\": [\n {\"$ref\": \"#/$defs/npm_contracts\"},\n {\"$ref\": \"#/$defs/npm_ui\"}\n ],\n \"items\": false\n },\n \"rust_crates\": {\n \"type\": \"array\",\n \"minItems\": 6,\n \"maxItems\": 6,\n \"uniqueItems\": true,\n \"prefixItems\": [\n {\"$ref\": \"#/$defs/rust_contracts\"},\n {\"$ref\": \"#/$defs/rust_ipc\"},\n {\"$ref\": \"#/$defs/rust_wasm_abi\"},\n {\"$ref\": \"#/$defs/rust_target_classifier\"},\n {\"$ref\": \"#/$defs/rust_worker_sdk\"},\n {\"$ref\": \"#/$defs/rust_runtime\"}\n ],\n \"items\": false\n },\n \"contract_registry_version\": {\"const\": \"contract-registry-v2\"},\n \"contract_set_sha256\": {\"$ref\": \"#/$defs/sha256\"}\n },\n \"$defs\": {\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 5,\n \"maxLength\": 64,\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)$\"\n },\n \"sha256\": {\"type\": \"string\", \"pattern\": \"^[0-9a-f]{64}$\"},\n \"go_module\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"module\", \"version\"],\n \"properties\": {\n \"module\": {\"const\": \"github.com/floegence/redevplugin\"},\n \"version\": {\"type\": \"string\", \"minLength\": 6, \"maxLength\": 65, \"pattern\": \"^v(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)$\"}\n }\n },\n \"npm_package\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"name\", \"version\"],\n \"properties\": {\n \"name\": {\"type\": \"string\", \"minLength\": 1, \"maxLength\": 128},\n \"version\": {\"$ref\": \"#/$defs/version\"}\n }\n },\n \"npm_contracts\": {\n \"allOf\": [\n {\"$ref\": \"#/$defs/npm_package\"},\n {\"properties\": {\"name\": {\"const\": \"@floegence/redevplugin-contracts\"}}}\n ]\n },\n \"npm_ui\": {\n \"allOf\": [\n {\"$ref\": \"#/$defs/npm_package\"},\n {\"properties\": {\"name\": {\"const\": \"@floegence/redevplugin-ui\"}}}\n ]\n },\n \"rust_crate\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"name\", \"version\", \"role\"],\n \"properties\": {\n \"name\": {\"type\": \"string\", \"minLength\": 1, \"maxLength\": 128},\n \"version\": {\"$ref\": \"#/$defs/version\"},\n \"role\": {\"enum\": [\"contracts\", \"ipc\", \"wasm_abi\", \"target_classifier\", \"worker_sdk\", \"runtime\"]}\n }\n },\n \"rust_contracts\": {\n \"allOf\": [\n {\"$ref\": \"#/$defs/rust_crate\"},\n {\"properties\": {\"name\": {\"const\": \"redevplugin-contracts\"}, \"role\": {\"const\": \"contracts\"}}}\n ]\n },\n \"rust_ipc\": {\n \"allOf\": [\n {\"$ref\": \"#/$defs/rust_crate\"},\n {\"properties\": {\"name\": {\"const\": \"redevplugin-ipc\"}, \"role\": {\"const\": \"ipc\"}}}\n ]\n },\n \"rust_wasm_abi\": {\n \"allOf\": [\n {\"$ref\": \"#/$defs/rust_crate\"},\n {\"properties\": {\"name\": {\"const\": \"redevplugin-wasm-abi\"}, \"role\": {\"const\": \"wasm_abi\"}}}\n ]\n },\n \"rust_target_classifier\": {\n \"allOf\": [\n {\"$ref\": \"#/$defs/rust_crate\"},\n {\"properties\": {\"name\": {\"const\": \"redevplugin-target-classifier\"}, \"role\": {\"const\": \"target_classifier\"}}}\n ]\n },\n \"rust_worker_sdk\": {\n \"allOf\": [\n {\"$ref\": \"#/$defs/rust_crate\"},\n {\"properties\": {\"name\": {\"const\": \"redevplugin-worker-sdk\"}, \"role\": {\"const\": \"worker_sdk\"}}}\n ]\n },\n \"rust_runtime\": {\n \"allOf\": [\n {\"$ref\": \"#/$defs/rust_crate\"},\n {\"properties\": {\"name\": {\"const\": \"redevplugin-runtime\"}, \"role\": {\"const\": \"runtime\"}}}\n ]\n }\n }\n}\n".as_bytes();
217static CONTRACT_BODY_PLUGIN_PLATFORM_OPENAPI: &[u8] = "openapi: 3.1.0\ninfo:\n title: ReDevPlugin Plugin Platform API\n version: plugin-platform-v15\n description: Host-agnostic plugin management, bridge, operation, data, and sandbox routes. Release-ref install and update routes resolve host-controlled package artifacts server-side and do not accept requested trust_state values; external package URL, GitHub repository, and uploaded-package inspection flows derive package identity and trust facts server-side before reusing the shared commit/query lifecycle; local-import package install/update routes remain explicit developer/import flows and do not accept caller-supplied trust_state values.\nx-redevplugin-query-policy:\n reject_url_query_strings: true\n require_closed_json_bodies: true\n require_exact_origin: true\n csrf:\n get_query: not_required\n post_query: required\n mutation: required\npaths:\n /_redevplugin/api/plugins/{plugin_instance_id}/local-import:\n post:\n operationId: importLocalPackage\n x-redevplugin-route-effect: mutation\n parameters:\n - $ref: \"#/components/parameters/PluginInstanceID\"\n requestBody:\n required: true\n content:\n application/vnd.redevplugin.package+zip:\n schema: { type: string, format: binary }\n responses:\n \"200\": { $ref: \"#/components/responses/PluginRecordResponse\" }\n default: { $ref: \"#/components/responses/MutationPlatformErrorResponse\" }\n put:\n operationId: updateLocalPackage\n x-redevplugin-route-effect: mutation\n parameters:\n - $ref: \"#/components/parameters/PluginInstanceID\"\n - name: X-ReDevPlugin-Expected-Management-Revision\n in: header\n required: true\n description: Canonical decimal management revision. Duplicate, combined, empty, or whitespace-padded values are rejected.\n schema: { type: integer, minimum: 1, maximum: 9007199254740991 }\n requestBody:\n required: true\n content:\n application/vnd.redevplugin.package+zip:\n schema: { type: string, format: binary }\n responses:\n \"200\": { $ref: \"#/components/responses/PluginRecordResponse\" }\n default: { $ref: \"#/components/responses/MutationPlatformErrorResponse\" }\n /_redevplugin/api/plugins/external-packages/inspect:\n post:\n operationId: inspectExternalPackage\n x-redevplugin-route-effect: mutation\n description: Resolves and inspects a package from a caller-selected URL or GitHub repository without installing it. Package identity, hashes, provenance, signature state, approval, and update eligibility are computed by the platform and cannot be supplied by the caller.\n requestBody:\n $ref: \"#/components/requestBodies/InspectExternalPackageRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/ExternalPackageInspectionResponse\" }\n default: { $ref: \"#/components/responses/MutationPlatformErrorResponse\" }\n /_redevplugin/api/plugins/external-packages/upload/inspect:\n post:\n operationId: inspectUploadedExternalPackageInstall\n x-redevplugin-route-effect: mutation\n description: Uploads and inspects a package for installation without committing it. Package identity, hashes, provenance, signature state, approval, and update eligibility are computed by the platform and cannot be supplied by the caller. The returned inspection is committed and reconciled through the shared external-package commit/query routes.\n requestBody:\n required: true\n content:\n application/vnd.redevplugin.package+zip:\n schema: { type: string, format: binary }\n responses:\n \"200\": { $ref: \"#/components/responses/ExternalPackageInspectionResponse\" }\n default: { $ref: \"#/components/responses/MutationPlatformErrorResponse\" }\n /_redevplugin/api/plugins/{plugin_instance_id}/external-packages/upload/inspect:\n put:\n operationId: inspectUploadedExternalPackageUpdate\n x-redevplugin-route-effect: mutation\n description: Uploads and inspects a package for an optimistic-concurrency-controlled update without committing it. Package identity, hashes, provenance, signature state, approval, and update eligibility are computed by the platform and cannot be supplied by the caller. The returned inspection is committed and reconciled through the shared external-package commit/query routes.\n parameters:\n - $ref: \"#/components/parameters/PluginInstanceID\"\n - name: X-ReDevPlugin-Expected-Management-Revision\n in: header\n required: true\n description: Canonical decimal management revision. Duplicate, combined, empty, or whitespace-padded values are rejected.\n schema: { type: integer, minimum: 1, maximum: 9007199254740991 }\n requestBody:\n required: true\n content:\n application/vnd.redevplugin.package+zip:\n schema: { type: string, format: binary }\n responses:\n \"200\": { $ref: \"#/components/responses/ExternalPackageInspectionResponse\" }\n default: { $ref: \"#/components/responses/MutationPlatformErrorResponse\" }\n /_redevplugin/api/plugins/external-packages/commit:\n post:\n operationId: commitExternalPackage\n x-redevplugin-route-effect: mutation\n description: Commits one unexpired inspection after the user confirms its exact server-computed digest. An absent signature does not make a package ineligible for installation; signature assessment affects trust classification and automatic-update eligibility only.\n requestBody:\n $ref: \"#/components/requestBodies/CommitExternalPackageRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/ExternalPackageCommitResponse\" }\n default: { $ref: \"#/components/responses/MutationPlatformErrorResponse\" }\n /_redevplugin/api/plugins/external-packages/commit/query:\n post:\n operationId: queryExternalPackageCommit\n x-redevplugin-route-effect: query\n description: Reconciles the commit result for one inspection without repeating the mutation.\n requestBody:\n $ref: \"#/components/requestBodies/QueryExternalPackageCommitRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/ExternalPackageCommitResponse\" }\n default: { $ref: \"#/components/responses/PlatformErrorResponse\" }\n /_redevplugin/api/plugins/install-release-ref:\n post:\n operationId: installReleaseRef\n x-redevplugin-route-effect: mutation\n requestBody:\n $ref: \"#/components/requestBodies/InstallReleaseRefRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/PluginRecordResponse\" }\n default: { $ref: \"#/components/responses/MutationPlatformErrorResponse\" }\n /_redevplugin/api/plugins/release-install-operations:\n post:\n operationId: startReleaseInstallOperation\n x-redevplugin-route-effect: mutation\n description: Starts or recovers one owner-scoped durable release installation. Disconnecting the observer does not cancel the installation.\n requestBody:\n $ref: \"#/components/requestBodies/StartReleaseInstallOperationRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/ReleaseInstallOperationResponse\" }\n default: { $ref: \"#/components/responses/MutationPlatformErrorResponse\" }\n get:\n operationId: listReleaseInstallOperations\n x-redevplugin-route-effect: query\n description: Lists owner-scoped release installation operations. Trusted Origin and authenticated session remain required; GET queries do not require CSRF.\n responses:\n \"200\": { $ref: \"#/components/responses/ReleaseInstallOperationListResponse\" }\n default: { $ref: \"#/components/responses/PlatformErrorResponse\" }\n /_redevplugin/api/plugins/release-install-operations/{operation_id}:\n get:\n operationId: getReleaseInstallOperation\n x-redevplugin-route-effect: query\n parameters:\n - $ref: \"#/components/parameters/OperationID\"\n responses:\n \"200\": { $ref: \"#/components/responses/ReleaseInstallOperationResponse\" }\n default: { $ref: \"#/components/responses/PlatformErrorResponse\" }\n /_redevplugin/api/plugins/release-install-operations/by-request/{request_id}:\n get:\n operationId: getReleaseInstallOperationByRequest\n x-redevplugin-route-effect: query\n parameters:\n - $ref: \"#/components/parameters/RequestID\"\n responses:\n \"200\": { $ref: \"#/components/responses/ReleaseInstallOperationResponse\" }\n default: { $ref: \"#/components/responses/PlatformErrorResponse\" }\n /_redevplugin/api/plugins/enable:\n post:\n operationId: enablePlugin\n x-redevplugin-route-effect: mutation\n requestBody:\n $ref: \"#/components/requestBodies/EnableRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/PluginRecordResponse\" }\n default: { $ref: \"#/components/responses/MutationPlatformErrorResponse\" }\n /_redevplugin/api/plugins/disable:\n post:\n operationId: disablePlugin\n x-redevplugin-route-effect: mutation\n requestBody:\n $ref: \"#/components/requestBodies/DisableRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/PluginRecordResponse\" }\n default: { $ref: \"#/components/responses/MutationPlatformErrorResponse\" }\n /_redevplugin/api/plugins/uninstall:\n post:\n operationId: uninstallPlugin\n x-redevplugin-route-effect: mutation\n requestBody:\n $ref: \"#/components/requestBodies/UninstallRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/PluginRecordResponse\" }\n default: { $ref: \"#/components/responses/MutationPlatformErrorResponse\" }\n /_redevplugin/api/plugins/update-release-ref:\n post:\n operationId: updateReleaseRef\n x-redevplugin-route-effect: mutation\n requestBody:\n $ref: \"#/components/requestBodies/UpdateReleaseRefRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/PluginRecordResponse\" }\n default: { $ref: \"#/components/responses/MutationPlatformErrorResponse\" }\n /_redevplugin/api/plugins/downgrade:\n post:\n operationId: downgradePlugin\n x-redevplugin-route-effect: mutation\n requestBody:\n $ref: \"#/components/requestBodies/DowngradeRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/PluginRecordResponse\" }\n default: { $ref: \"#/components/responses/MutationPlatformErrorResponse\" }\n /_redevplugin/api/plugins/catalog/query:\n post:\n operationId: listPlugins\n x-redevplugin-route-effect: query\n requestBody:\n $ref: \"#/components/requestBodies/EmptyQueryRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/PluginCatalogResponse\" }\n default: { $ref: \"#/components/responses/PlatformErrorResponse\" }\n /_redevplugin/api/plugins/features/query:\n post:\n operationId: getPluginFeatures\n x-redevplugin-route-effect: query\n requestBody:\n $ref: \"#/components/requestBodies/EmptyQueryRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/PluginFeaturesResponse\" }\n default: { $ref: \"#/components/responses/PlatformErrorResponse\" }\n /_redevplugin/api/plugins/platform/compatibility/query:\n post:\n operationId: getPluginPlatformCompatibility\n x-redevplugin-route-effect: query\n description: Returns the host-consumable ReDevPlugin compatibility manifest for the mounted platform artifact set.\n requestBody:\n $ref: \"#/components/requestBodies/EmptyQueryRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/CompatibilityResponse\" }\n default: { $ref: \"#/components/responses/PlatformErrorResponse\" }\n /_redevplugin/api/plugins/surfaces/open:\n post:\n operationId: openPluginSurface\n x-redevplugin-route-effect: mutation\n requestBody:\n $ref: \"#/components/requestBodies/OpenSurfaceRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/SurfaceBootstrapResponse\" }\n default: { $ref: \"#/components/responses/MutationPlatformErrorResponse\" }\n /_redevplugin/api/plugins/session/revoke-scope:\n post:\n operationId: revokePluginSessionScope\n x-redevplugin-route-effect: mutation\n description: Irreversibly fences the authenticated session, drains every exact-session platform and runtime resource, and returns only public cumulative counts.\n requestBody:\n $ref: \"#/components/requestBodies/RevokeSessionScopeRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/SessionScopeRevokeResponse\" }\n default: { $ref: \"#/components/responses/MutationPlatformErrorResponse\" }\n /_redevplugin/api/plugins/surfaces/{surface_instance_id}/prepare:\n post:\n operationId: preparePluginSurface\n x-redevplugin-route-effect: mutation\n parameters:\n - $ref: \"#/components/parameters/SurfaceInstanceID\"\n requestBody:\n $ref: \"#/components/requestBodies/PrepareSurfaceRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/SurfacePreparationResponse\" }\n default: { $ref: \"#/components/responses/MutationPlatformErrorResponse\" }\n /_redevplugin/api/plugins/surfaces/{surface_instance_id}/bridge-token:\n post:\n operationId: createSurfaceBridgeToken\n x-redevplugin-route-effect: mutation\n parameters:\n - $ref: \"#/components/parameters/SurfaceInstanceID\"\n requestBody:\n $ref: \"#/components/requestBodies/TrustedParentBridgeTokenRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/BridgeTokenResponse\" }\n default: { $ref: \"#/components/responses/MutationPlatformErrorResponse\" }\n /_redevplugin/api/plugins/surfaces/{surface_instance_id}/assets/read:\n post:\n operationId: readPreparedSurfaceAsset\n x-redevplugin-route-effect: query\n parameters:\n - $ref: \"#/components/parameters/SurfaceInstanceID\"\n requestBody:\n $ref: \"#/components/requestBodies/ReadSurfaceAssetRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/SurfaceAssetResponse\" }\n default: { $ref: \"#/components/responses/PlatformErrorResponse\" }\n /_redevplugin/api/plugins/surfaces/{surface_instance_id}/streams/read:\n post:\n operationId: readPreparedSurfaceStream\n x-redevplugin-route-effect: query\n parameters:\n - $ref: \"#/components/parameters/SurfaceInstanceID\"\n requestBody:\n $ref: \"#/components/requestBodies/ReadSurfaceStreamRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/SurfaceStreamResponse\" }\n default: { $ref: \"#/components/responses/PlatformErrorResponse\" }\n /_redevplugin/api/plugins/surfaces/{surface_instance_id}/streams/ack:\n post:\n operationId: acknowledgePreparedSurfaceStream\n x-redevplugin-route-effect: mutation\n parameters:\n - $ref: \"#/components/parameters/SurfaceInstanceID\"\n requestBody:\n $ref: \"#/components/requestBodies/AcknowledgeSurfaceStreamRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/SurfaceStreamAcknowledgementResponse\" }\n default: { $ref: \"#/components/responses/MutationPlatformErrorResponse\" }\n /_redevplugin/api/plugins/surfaces/{surface_instance_id}/operations/cancel:\n post:\n operationId: cancelSurfacePluginOperation\n x-redevplugin-route-effect: mutation\n description: Cancels an operation only when it belongs to the authenticated surface, session, and private bridge channel.\n parameters:\n - $ref: \"#/components/parameters/SurfaceInstanceID\"\n requestBody:\n $ref: \"#/components/requestBodies/CancelSurfaceOperationRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/OperationRecordResponse\" }\n default: { $ref: \"#/components/responses/MutationPlatformErrorResponse\" }\n /_redevplugin/api/plugins/surfaces/{surface_instance_id}/operations/query:\n post:\n operationId: getSurfacePluginOperationSnapshot\n x-redevplugin-route-effect: query\n description: Returns only the sandbox-safe status projection for an operation bound to the authenticated surface, session, and private bridge channel.\n parameters:\n - $ref: \"#/components/parameters/SurfaceInstanceID\"\n requestBody:\n $ref: \"#/components/requestBodies/GetSurfaceOperationRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/PluginOperationSnapshotResponse\" }\n default: { $ref: \"#/components/responses/PlatformErrorResponse\" }\n /_redevplugin/api/plugins/surfaces/{surface_instance_id}/confirmations/reject:\n post:\n operationId: rejectSurfacePluginConfirmation\n x-redevplugin-route-effect: mutation\n description: Atomically rejects a pending confirmation only when it belongs to the authenticated surface, session, current plugin revision, and private bridge channel.\n parameters:\n - $ref: \"#/components/parameters/SurfaceInstanceID\"\n requestBody:\n $ref: \"#/components/requestBodies/RejectSurfaceConfirmationRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/ConfirmationRejectionResponse\" }\n default: { $ref: \"#/components/responses/MutationPlatformErrorResponse\" }\n /_redevplugin/api/plugins/surfaces/{surface_instance_id}/dispose:\n post:\n operationId: disposePluginSurface\n x-redevplugin-route-effect: mutation\n description: Atomically observes and revokes one exact authenticated surface. An active surface becomes closed, a retained closure confirms closed, and an absent result is authoritative inactivity; transport failures remain an unknown mutation outcome.\n parameters:\n - $ref: \"#/components/parameters/SurfaceInstanceID\"\n requestBody:\n $ref: \"#/components/requestBodies/DisposeSurfaceRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/SurfaceDisposeResponse\" }\n default: { $ref: \"#/components/responses/MutationPlatformErrorResponse\" }\n /_redevplugin/api/plugins/rpc:\n post:\n operationId: callPluginMethod\n x-redevplugin-route-effect: mutation\n requestBody:\n $ref: \"#/components/requestBodies/RPCRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/RPCResponse\" }\n default: { $ref: \"#/components/responses/MutationPlatformErrorResponse\" }\n /_redevplugin/api/plugins/confirmations/prepare:\n post:\n operationId: preparePluginMethodConfirmation\n x-redevplugin-route-effect: mutation\n requestBody:\n $ref: \"#/components/requestBodies/PrepareMethodConfirmationRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/PluginMethodConfirmationPreparationResponse\" }\n default: { $ref: \"#/components/responses/MutationPlatformErrorResponse\" }\n /_redevplugin/api/plugins/intents/query:\n post:\n operationId: listPluginIntents\n x-redevplugin-route-effect: query\n description: 'Lists enabled, runnable plugin intents available to host-mediated interop. The response data is `{ \"intents\": [...] }`.'\n requestBody:\n $ref: \"#/components/requestBodies/ListIntentsQueryRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/IntentListResponse\" }\n default: { $ref: \"#/components/responses/PlatformErrorResponse\" }\n /_redevplugin/api/plugins/intents/invoke:\n post:\n operationId: invokePluginIntent\n x-redevplugin-route-effect: mutation\n description: Invokes a host-mediated plugin intent without iframe gateway tokens while preserving local policy, permission grants, and dangerous-method fail-closed checks.\n requestBody:\n $ref: \"#/components/requestBodies/InvokeIntentRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/RPCResponse\" }\n default: { $ref: \"#/components/responses/MutationPlatformErrorResponse\" }\n /_redevplugin/api/plugins/operations/query:\n post:\n operationId: listPluginOperations\n x-redevplugin-route-effect: query\n requestBody:\n $ref: \"#/components/requestBodies/ListOperationsQueryRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/OperationListResponse\" }\n default: { $ref: \"#/components/responses/PlatformErrorResponse\" }\n /_redevplugin/api/plugins/operations/{operation_id}/query:\n post:\n operationId: getPluginOperation\n x-redevplugin-route-effect: query\n parameters:\n - $ref: \"#/components/parameters/OperationID\"\n requestBody:\n $ref: \"#/components/requestBodies/EmptyQueryRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/OperationRecordResponse\" }\n default: { $ref: \"#/components/responses/PlatformErrorResponse\" }\n /_redevplugin/api/plugins/operations/{operation_id}/cancel:\n post:\n operationId: cancelPluginOperation\n x-redevplugin-route-effect: mutation\n parameters:\n - $ref: \"#/components/parameters/OperationID\"\n requestBody:\n $ref: \"#/components/requestBodies/CancelOperationRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/OperationRecordResponse\" }\n default: { $ref: \"#/components/responses/MutationPlatformErrorResponse\" }\n /_redevplugin/api/plugins/runtime/start:\n post:\n operationId: startPluginRuntime\n x-redevplugin-route-effect: mutation\n requestBody:\n $ref: \"#/components/requestBodies/StartRuntimeRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/RuntimeHealthResponse\" }\n default: { $ref: \"#/components/responses/MutationPlatformErrorResponse\" }\n /_redevplugin/api/plugins/runtime/stop:\n post:\n operationId: stopPluginRuntime\n x-redevplugin-route-effect: mutation\n requestBody:\n $ref: \"#/components/requestBodies/EmptyRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/RuntimeStopResponse\" }\n default: { $ref: \"#/components/responses/MutationPlatformErrorResponse\" }\n /_redevplugin/api/plugins/runtime/refresh-enabled:\n post:\n operationId: refreshEnabledPluginRuntimeState\n x-redevplugin-route-effect: mutation\n description: 'Replays runtime-derived state for enabled plugins after the embedding host process restarts or reattaches adapters. The response data is `{ \"results\": [...] }`.'\n requestBody:\n $ref: \"#/components/requestBodies/EmptyRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/RuntimeRefreshResponse\" }\n default: { $ref: \"#/components/responses/MutationPlatformErrorResponse\" }\n /_redevplugin/api/plugins/runtime/health/query:\n post:\n operationId: getPluginRuntimeHealth\n x-redevplugin-route-effect: query\n requestBody:\n $ref: \"#/components/requestBodies/EmptyQueryRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/RuntimeHealthResponse\" }\n default: { $ref: \"#/components/responses/PlatformErrorResponse\" }\n /_redevplugin/api/plugins/data/export:\n post:\n operationId: exportPluginData\n x-redevplugin-route-effect: mutation\n requestBody:\n $ref: \"#/components/requestBodies/ExportDataRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/DataExportResponse\" }\n default: { $ref: \"#/components/responses/MutationPlatformErrorResponse\" }\n /_redevplugin/api/plugins/data/export/delete:\n post:\n operationId: deletePluginDataExport\n x-redevplugin-route-effect: mutation\n requestBody:\n $ref: \"#/components/requestBodies/DeleteDataExportRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/DataExportDeleteResponse\" }\n default: { $ref: \"#/components/responses/MutationPlatformErrorResponse\" }\n /_redevplugin/api/plugins/data/import:\n post:\n operationId: importPluginData\n x-redevplugin-route-effect: mutation\n requestBody:\n $ref: \"#/components/requestBodies/ImportDataRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/DataImportResponse\" }\n default: { $ref: \"#/components/responses/MutationPlatformErrorResponse\" }\n /_redevplugin/api/plugins/retained-data/query:\n post:\n operationId: listPluginRetainedData\n x-redevplugin-route-effect: query\n requestBody:\n $ref: \"#/components/requestBodies/ListRetainedDataQueryRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/RetainedDataListResponse\" }\n default: { $ref: \"#/components/responses/PlatformErrorResponse\" }\n /_redevplugin/api/plugins/retained-data/delete:\n post:\n operationId: deletePluginRetainedData\n x-redevplugin-route-effect: mutation\n requestBody:\n $ref: \"#/components/requestBodies/DeleteRetainedDataRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/RetainedDataBindingResponse\" }\n default: { $ref: \"#/components/responses/MutationPlatformErrorResponse\" }\n /_redevplugin/api/plugins/retained-data/bind:\n post:\n operationId: bindPluginRetainedData\n x-redevplugin-route-effect: mutation\n requestBody:\n $ref: \"#/components/requestBodies/BindRetainedDataRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/RetainedDataBindingResponse\" }\n default: { $ref: \"#/components/responses/MutationPlatformErrorResponse\" }\n /_redevplugin/api/plugins/retained-data/cleanup-expired:\n post:\n operationId: cleanupExpiredPluginRetainedData\n x-redevplugin-route-effect: mutation\n requestBody:\n $ref: \"#/components/requestBodies/CleanupExpiredRetainedDataRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/RetainedDataCleanupResponse\" }\n default: { $ref: \"#/components/responses/MutationPlatformErrorResponse\" }\n /_redevplugin/api/plugins/permissions/query:\n post:\n operationId: listPluginPermissionGrants\n x-redevplugin-route-effect: query\n requestBody:\n $ref: \"#/components/requestBodies/ListPermissionsQueryRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/PermissionListResponse\" }\n default: { $ref: \"#/components/responses/PlatformErrorResponse\" }\n /_redevplugin/api/plugins/permissions/requirements/query:\n post:\n operationId: getPluginPermissionRequirements\n x-redevplugin-route-effect: query\n description: Projects required permissions only from the active plugin version's Host-verified capability contracts.\n requestBody:\n $ref: \"#/components/requestBodies/PermissionRequirementsQueryRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/PermissionRequirementsResponse\" }\n default: { $ref: \"#/components/responses/PlatformErrorResponse\" }\n /_redevplugin/api/plugins/permissions/grant:\n post:\n operationId: grantPluginPermission\n x-redevplugin-route-effect: mutation\n requestBody:\n $ref: \"#/components/requestBodies/GrantPermissionRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/PermissionMutationResponse\" }\n default: { $ref: \"#/components/responses/MutationPlatformErrorResponse\" }\n /_redevplugin/api/plugins/permissions/revoke:\n post:\n operationId: revokePluginPermission\n x-redevplugin-route-effect: mutation\n requestBody:\n $ref: \"#/components/requestBodies/RevokePermissionRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/PermissionMutationResponse\" }\n default: { $ref: \"#/components/responses/MutationPlatformErrorResponse\" }\n /_redevplugin/api/plugins/security-policies/query:\n post:\n operationId: listPluginSecurityPolicies\n x-redevplugin-route-effect: query\n requestBody:\n $ref: \"#/components/requestBodies/EmptyQueryRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/SecurityPolicyListResponse\" }\n default: { $ref: \"#/components/responses/PlatformErrorResponse\" }\n /_redevplugin/api/plugins/security-policies/{plugin_instance_id}/query:\n post:\n operationId: getPluginSecurityPolicy\n x-redevplugin-route-effect: query\n parameters:\n - $ref: \"#/components/parameters/PluginInstanceID\"\n requestBody:\n $ref: \"#/components/requestBodies/EmptyQueryRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/SecurityPolicyRecordResponse\" }\n default: { $ref: \"#/components/responses/PlatformErrorResponse\" }\n /_redevplugin/api/plugins/security-policies/{plugin_instance_id}:\n put:\n operationId: putPluginSecurityPolicy\n x-redevplugin-route-effect: mutation\n parameters:\n - $ref: \"#/components/parameters/PluginInstanceID\"\n requestBody:\n $ref: \"#/components/requestBodies/PutSecurityPolicyRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/SecurityPolicyRecordResponse\" }\n default: { $ref: \"#/components/responses/MutationPlatformErrorResponse\" }\n delete:\n operationId: deletePluginSecurityPolicy\n x-redevplugin-route-effect: mutation\n parameters:\n - $ref: \"#/components/parameters/PluginInstanceID\"\n requestBody:\n $ref: \"#/components/requestBodies/DeleteSecurityPolicyRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/SecurityPolicyDeleteResponse\" }\n default: { $ref: \"#/components/responses/MutationPlatformErrorResponse\" }\n /_redevplugin/api/plugins/diagnostics/query:\n post:\n operationId: listPluginDiagnosticEvents\n x-redevplugin-route-effect: query\n requestBody:\n $ref: \"#/components/requestBodies/ListDiagnosticsQueryRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/DiagnosticEventListResponse\" }\n default: { $ref: \"#/components/responses/PlatformErrorResponse\" }\n /_redevplugin/api/plugins/secrets/bind:\n post:\n operationId: bindPluginSecret\n x-redevplugin-route-effect: mutation\n requestBody:\n $ref: \"#/components/requestBodies/SecretRefRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/SecretBindResponse\" }\n default: { $ref: \"#/components/responses/MutationPlatformErrorResponse\" }\n /_redevplugin/api/plugins/secrets/test:\n post:\n operationId: testPluginSecret\n x-redevplugin-route-effect: mutation\n requestBody:\n $ref: \"#/components/requestBodies/SecretRefRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/SecretTestResponse\" }\n default: { $ref: \"#/components/responses/MutationPlatformErrorResponse\" }\n /_redevplugin/api/plugins/secrets/delete:\n post:\n operationId: deletePluginSecret\n x-redevplugin-route-effect: mutation\n requestBody:\n $ref: \"#/components/requestBodies/SecretRefRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/SecretDeleteResponse\" }\n default: { $ref: \"#/components/responses/MutationPlatformErrorResponse\" }\n /_redevplugin/api/plugins/{plugin_instance_id}/settings/schema/query:\n post:\n operationId: getPluginSettingsSchema\n x-redevplugin-route-effect: query\n parameters:\n - $ref: \"#/components/parameters/PluginInstanceID\"\n requestBody:\n $ref: \"#/components/requestBodies/SettingsQueryRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/SettingsSchemaResponse\" }\n default: { $ref: \"#/components/responses/PlatformErrorResponse\" }\n /_redevplugin/api/plugins/{plugin_instance_id}/settings/query:\n post:\n operationId: getPluginSettings\n x-redevplugin-route-effect: query\n parameters:\n - $ref: \"#/components/parameters/PluginInstanceID\"\n requestBody:\n $ref: \"#/components/requestBodies/SettingsQueryRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/SettingsSnapshotResponse\" }\n default: { $ref: \"#/components/responses/PlatformErrorResponse\" }\n /_redevplugin/api/plugins/{plugin_instance_id}/settings:\n patch:\n operationId: patchPluginSettings\n x-redevplugin-route-effect: mutation\n parameters:\n - $ref: \"#/components/parameters/PluginInstanceID\"\n requestBody:\n $ref: \"#/components/requestBodies/PatchSettingsRequest\"\n responses:\n \"200\": { $ref: \"#/components/responses/SettingsSnapshotResponse\" }\n default: { $ref: \"#/components/responses/MutationPlatformErrorResponse\" }\ncomponents:\n parameters:\n OperationID:\n name: operation_id\n in: path\n required: true\n schema: { type: string }\n PluginInstanceID:\n name: plugin_instance_id\n in: path\n required: true\n schema:\n type: string\n minLength: 1\n pattern: \"^[^./\\\\s](?:[^/]*[^/\\\\s])?$\"\n RequestID:\n name: request_id\n in: path\n required: true\n schema: { type: string, minLength: 1, maxLength: 256 }\n SurfaceInstanceID:\n name: surface_instance_id\n in: path\n required: true\n schema: { type: string }\n responses:\n PlatformErrorResponse:\n description: Closed non-success response for read-only platform operations.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/PlatformErrorResponse\"\n MutationPlatformErrorResponse:\n description: Closed non-success response for operations that may change durable platform state.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/MutationPlatformErrorResponse\"\n RPCResponse:\n description: Typed plugin method result. Subscriptions always bind one operation and one stream.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/RPCSuccessResponse\"\n SurfaceBootstrapResponse:\n description: Trusted-parent surface bootstrap. Capability-bearing fields are never forwarded into the opaque iframe or plugin worker.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/SurfaceBootstrapSuccessResponse\"\n SurfacePreparationResponse:\n description: Trusted-parent asset-session exchange and validated opaque surface document.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/SurfacePreparationSuccessResponse\"\n BridgeTokenResponse:\n description: Trusted-parent plugin gateway token response.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/BridgeTokenSuccessResponse\"\n SurfaceAssetResponse:\n description: Trusted-parent package asset response. The plugin receives only a renderer-created blob URL.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/SurfaceAssetSuccessResponse\"\n SurfaceStreamResponse:\n description: Trusted-parent stream redemption response. Stream tickets remain outside the plugin worker.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/SurfaceStreamSuccessResponse\"\n SurfaceStreamAcknowledgementResponse:\n description: Confirms one exact stream delivery so the platform may release its events.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/SurfaceStreamAcknowledgementSuccessResponse\"\n PluginOperationSnapshotResponse:\n description: Closed sandbox-safe operation status projection.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/PluginOperationSnapshotSuccessResponse\"\n SurfaceDisposeResponse:\n description: Surface revocation response.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/SurfaceDisposeSuccessResponse\"\n SessionScopeRevokeResponse:\n description: Completed authenticated-session teardown response.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/SessionScopeRevokeSuccessResponse\"\n PluginRecordResponse:\n description: Plugin lifecycle response with typed registry trust assessment.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/PluginRecordSuccessResponse\"\n ReleaseInstallOperationResponse:\n description: Durable release installation status and authoritative terminal result.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/ReleaseInstallOperationSuccessResponse\"\n ReleaseInstallOperationListResponse:\n description: Owner-scoped durable release installation operations.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/ReleaseInstallOperationListSuccessResponse\"\n ExternalPackageInspectionResponse:\n description: Immutable server-computed package inspection and confirmation boundary.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/ExternalPackageInspectionSuccessResponse\"\n ExternalPackageCommitResponse:\n description: External package commit reconciliation result with explicit trust, approval, provenance, and update facts.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/ExternalPackageCommitSuccessResponse\"\n PluginCatalogResponse:\n description: Installed plugin catalog response with typed registry records.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/PluginCatalogSuccessResponse\"\n PluginFeaturesResponse:\n description: Closed set of optional host modules configured for this platform.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/PluginFeaturesSuccessResponse\"\n CompatibilityResponse:\n description: Released platform compatibility manifest.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/CompatibilitySuccessResponse\"\n PluginMethodConfirmationPreparationResponse:\n description: Prepared plugin method confirmation. The raw confirmation token stays server-side and is never returned to parent JavaScript or the plugin iframe.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/PluginMethodConfirmationPreparationSuccessResponse\"\n ConfirmationRejectionResponse:\n description: Trusted-parent acknowledgement that the pending confirmation was atomically rejected and cannot be replayed.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/ConfirmationRejectionSuccessResponse\"\n IntentListResponse:\n description: Enabled plugin intent records.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/IntentListSuccessResponse\"\n RetainedDataListResponse:\n description: Retained plugin data list response.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/RetainedDataListSuccessResponse\"\n RetainedDataBindingResponse:\n description: Plugin data binding returned after a retained-data mutation.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/RetainedDataBindingSuccessResponse\"\n RetainedDataCleanupResponse:\n description: Retained plugin data cleanup response.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/RetainedDataCleanupSuccessResponse\"\n OperationRecordResponse:\n description: Host-owned operation record with its immutable execution binding.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/OperationRecordSuccessResponse\"\n OperationListResponse:\n description: Host-owned operation records with immutable execution bindings.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/OperationListSuccessResponse\"\n RuntimeHealthResponse:\n description: Runtime manager and shard health.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/RuntimeHealthSuccessResponse\"\n RuntimeStopResponse:\n description: Runtime manager stop acknowledgement.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/RuntimeStopSuccessResponse\"\n RuntimeRefreshResponse:\n description: Enabled plugin runtime refresh result.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/RuntimeRefreshSuccessResponse\"\n DataExportResponse:\n description: Plugin data export result.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/DataExportSuccessResponse\"\n DataExportDeleteResponse:\n description: Immutable plugin data export deletion acknowledgement.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/DataExportDeleteSuccessResponse\"\n DataImportResponse:\n description: Plugin record after the imported dataset becomes active.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/PluginRecordSuccessResponse\"\n PermissionListResponse:\n description: Permission grants for the requested plugin scope.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/PermissionListSuccessResponse\"\n PermissionRequirementsResponse:\n description: Active-version permission requirements derived from Host-verified capability contracts.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/PermissionRequirementsSuccessResponse\"\n PermissionMutationResponse:\n description: Permission grant mutation result.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/PermissionMutationSuccessResponse\"\n SecurityPolicyListResponse:\n description: Complete list of configured plugin security policies.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/SecurityPolicyListSuccessResponse\"\n SecurityPolicyRecordResponse:\n description: Complete security policy for one plugin instance.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/SecurityPolicyRecordSuccessResponse\"\n SecurityPolicyDeleteResponse:\n description: Security policy deletion acknowledgement.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/SecurityPolicyDeleteSuccessResponse\"\n DiagnosticEventListResponse:\n description: Diagnostic events matching the requested filters.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/DiagnosticEventListSuccessResponse\"\n SecretBindResponse:\n description: Secret reference bind acknowledgement.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/SecretBindSuccessResponse\"\n SecretTestResponse:\n description: Secret reference test acknowledgement.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/SecretTestSuccessResponse\"\n SecretDeleteResponse:\n description: Secret reference deletion acknowledgement.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/SecretDeleteSuccessResponse\"\n SettingsSchemaResponse:\n description: Plugin settings schema.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/SettingsSchemaSuccessResponse\"\n SettingsSnapshotResponse:\n description: Plugin settings snapshot.\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/SettingsSnapshotSuccessResponse\"\n requestBodies:\n InspectExternalPackageRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/InspectExternalPackageRequest\"\n CommitExternalPackageRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/CommitExternalPackageRequest\"\n QueryExternalPackageCommitRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/QueryExternalPackageCommitRequest\"\n InstallReleaseRefRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/InstallReleaseRefRequest\"\n StartReleaseInstallOperationRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/StartReleaseInstallOperationRequest\"\n UpdateReleaseRefRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/UpdateReleaseRefRequest\"\n DowngradeRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/DowngradeRequest\"\n EnableRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/EnableRequest\"\n DisableRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/DisableRequest\"\n UninstallRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/UninstallRequest\"\n OpenSurfaceRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/OpenSurfaceRequest\"\n RevokeSessionScopeRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/RevokeSessionScopeRequest\"\n EmptyRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/EmptyRequest\"\n EmptyQueryRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/EmptyQueryRequest\"\n ListIntentsQueryRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/ListIntentsQueryRequest\"\n ListOperationsQueryRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/ListOperationsQueryRequest\"\n ListRetainedDataQueryRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/ListRetainedDataQueryRequest\"\n ListPermissionsQueryRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/ListPermissionsQueryRequest\"\n PermissionRequirementsQueryRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/PermissionRequirementsQueryRequest\"\n ListDiagnosticsQueryRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/ListDiagnosticsQueryRequest\"\n SettingsQueryRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/SettingsQueryRequest\"\n PrepareSurfaceRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/PrepareSurfaceRequest\"\n TrustedParentBridgeTokenRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/TrustedParentBridgeTokenRequest\"\n ReadSurfaceAssetRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/ReadSurfaceAssetRequest\"\n ReadSurfaceStreamRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/ReadSurfaceStreamRequest\"\n AcknowledgeSurfaceStreamRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/AcknowledgeSurfaceStreamRequest\"\n CancelSurfaceOperationRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/CancelSurfaceOperationRequest\"\n GetSurfaceOperationRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/GetSurfaceOperationRequest\"\n RejectSurfaceConfirmationRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/RejectSurfaceConfirmationRequest\"\n DisposeSurfaceRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/DisposeSurfaceRequest\"\n RPCRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/RPCRequest\"\n PrepareMethodConfirmationRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/PrepareMethodConfirmationRequest\"\n InvokeIntentRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/InvokeIntentRequest\"\n CancelOperationRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/CancelOperationRequest\"\n StartRuntimeRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/StartRuntimeRequest\"\n ExportDataRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/ExportDataRequest\"\n DeleteDataExportRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/DeleteDataExportRequest\"\n ImportDataRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/ImportDataRequest\"\n DeleteRetainedDataRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/DeleteRetainedDataRequest\"\n BindRetainedDataRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/BindRetainedDataRequest\"\n CleanupExpiredRetainedDataRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/CleanupExpiredRetainedDataRequest\"\n GrantPermissionRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/GrantPermissionRequest\"\n RevokePermissionRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/RevokePermissionRequest\"\n PutSecurityPolicyRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/PutSecurityPolicyRequest\"\n DeleteSecurityPolicyRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/DeleteSecurityPolicyRequest\"\n SecretRefRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/SecretRefRequest\"\n PatchSettingsRequest:\n required: true\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/PatchSettingsRequest\"\n schemas:\n PlatformErrorResponse:\n type: object\n required: [ok, error]\n additionalProperties: false\n properties:\n ok: { const: false }\n error:\n $ref: \"#/components/schemas/PlatformError\"\n MutationPlatformErrorResponse:\n type: object\n required: [ok, error]\n additionalProperties: false\n properties:\n ok: { const: false }\n error:\n $ref: \"#/components/schemas/MutationPlatformError\"\n RPCSuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data: { $ref: \"#/components/schemas/RPCResult\" }\n SurfaceBootstrapSuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data: { $ref: \"#/components/schemas/SurfaceBootstrap\" }\n SurfacePreparationSuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data: { $ref: \"#/components/schemas/SurfacePreparation\" }\n BridgeTokenSuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data: { $ref: \"#/components/schemas/BridgeTokenResult\" }\n SurfaceAssetSuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data: { $ref: \"#/components/schemas/SurfaceAssetResult\" }\n SurfaceStreamSuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data: { $ref: \"#/components/schemas/SurfaceStreamResult\" }\n SurfaceStreamAcknowledgementSuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data: { $ref: \"#/components/schemas/SurfaceStreamAcknowledgementResult\" }\n PluginOperationSnapshotSuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data: { $ref: \"#/components/schemas/PluginOperationSnapshot\" }\n SurfaceDisposeSuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data: { $ref: \"#/components/schemas/SurfaceDisposeResult\" }\n SessionScopeRevokeSuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data: { $ref: \"#/components/schemas/SessionScopeRevokeCompleteResult\" }\n PluginRecordSuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data: { $ref: \"#/components/schemas/PluginRecord\" }\n ReleaseInstallOperationSuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data: { $ref: \"#/components/schemas/ReleaseInstallOperation\" }\n ReleaseInstallOperationListSuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data: { $ref: \"#/components/schemas/ReleaseInstallOperationList\" }\n ExternalPackageInspectionSuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data: { $ref: \"#/components/schemas/ExternalPackageInspection\" }\n ExternalPackageCommitSuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data: { $ref: \"#/components/schemas/ExternalPackageCommitResult\" }\n PluginCatalogSuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data: { $ref: \"#/components/schemas/PluginCatalogResult\" }\n PluginFeaturesSuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data:\n type: array\n uniqueItems: true\n items:\n type: string\n enum: [release, runtime, capability, connectivity, secrets, core_action, external_package]\n CompatibilitySuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data: { $ref: \"#/components/schemas/PluginCompatibilityManifest\" }\n PluginMethodConfirmationPreparationSuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data: { $ref: \"#/components/schemas/PluginMethodConfirmationPreparation\" }\n ConfirmationRejectionSuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data: { $ref: \"#/components/schemas/ConfirmationRejectionResult\" }\n IntentListSuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data: { $ref: \"#/components/schemas/PluginIntentList\" }\n RetainedDataListSuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data: { $ref: \"#/components/schemas/RetainedDataList\" }\n RetainedDataBindingSuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data: { $ref: \"#/components/schemas/PluginDataBinding\" }\n RetainedDataCleanupSuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data: { $ref: \"#/components/schemas/RetainedDataCleanupResult\" }\n OperationRecordSuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data: { $ref: \"#/components/schemas/OperationRecord\" }\n OperationListSuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data: { $ref: \"#/components/schemas/PluginOperationList\" }\n RuntimeHealthSuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data: { $ref: \"#/components/schemas/PluginRuntimeHealth\" }\n RuntimeStopSuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data: { $ref: \"#/components/schemas/PluginRuntimeStopResult\" }\n RuntimeRefreshSuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data: { $ref: \"#/components/schemas/PluginRuntimeRefreshResult\" }\n DataExportSuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data: { $ref: \"#/components/schemas/PluginDataExportResult\" }\n DataExportDeleteSuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data: { $ref: \"#/components/schemas/PluginDataExportDeleteResult\" }\n PermissionListSuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data: { $ref: \"#/components/schemas/PluginPermissionList\" }\n PermissionRequirementsSuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data: { $ref: \"#/components/schemas/PluginPermissionRequirements\" }\n PermissionMutationSuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data: { $ref: \"#/components/schemas/PluginPermissionMutationResult\" }\n SecurityPolicyListSuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data: { $ref: \"#/components/schemas/PluginSecurityPolicyList\" }\n SecurityPolicyRecordSuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data: { $ref: \"#/components/schemas/PluginSecurityPolicy\" }\n SecurityPolicyDeleteSuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data: { $ref: \"#/components/schemas/PluginSecurityPolicyDeleteResult\" }\n DiagnosticEventListSuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data: { $ref: \"#/components/schemas/PluginDiagnosticEventList\" }\n SecretBindSuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data: { $ref: \"#/components/schemas/PluginSecretBindResult\" }\n SecretTestSuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data: { $ref: \"#/components/schemas/PluginSecretTestResult\" }\n SecretDeleteSuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data: { $ref: \"#/components/schemas/PluginSecretDeleteResult\" }\n SettingsSchemaSuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data: { $ref: \"#/components/schemas/PluginSettingsSchema\" }\n SettingsSnapshotSuccessResponse:\n type: object\n required: [ok, data]\n additionalProperties: false\n properties:\n ok: { const: true }\n data: { $ref: \"#/components/schemas/PluginSettingsSnapshot\" }\n PlatformError:\n oneOf:\n - $ref: \"#/components/schemas/GenericPlatformError\"\n - $ref: \"#/components/schemas/OperationRateLimitPlatformError\"\n - $ref: \"#/components/schemas/JSONLimitPlatformError\"\n - $ref: \"#/components/schemas/PackageValidationPlatformError\"\n - $ref: \"#/components/schemas/ManagementRevisionPlatformError\"\n - $ref: \"#/components/schemas/AuthorizationRevisionPlatformError\"\n - $ref: \"#/components/schemas/BindingRevisionPlatformError\"\n - $ref: \"#/components/schemas/ValuesRevisionPlatformError\"\n - $ref: \"#/components/schemas/CapabilityPlatformError\"\n - $ref: \"#/components/schemas/WorkerPlatformError\"\n MutationPlatformError:\n oneOf:\n - $ref: \"#/components/schemas/MutationGenericPlatformError\"\n - $ref: \"#/components/schemas/MutationJSONLimitPlatformError\"\n - $ref: \"#/components/schemas/MutationPackageValidationPlatformError\"\n - $ref: \"#/components/schemas/MutationManagementRevisionPlatformError\"\n - $ref: \"#/components/schemas/MutationAuthorizationRevisionPlatformError\"\n - $ref: \"#/components/schemas/MutationBindingRevisionPlatformError\"\n - $ref: \"#/components/schemas/MutationValuesRevisionPlatformError\"\n - $ref: \"#/components/schemas/MutationCapabilityPlatformError\"\n - $ref: \"#/components/schemas/MutationWorkerPlatformError\"\n - $ref: \"#/components/schemas/MutationSessionTeardownPlatformError\"\n GenericPlatformError:\n type: object\n required: [code, message, details]\n additionalProperties: false\n properties:\n code:\n $ref: \"#/components/schemas/GenericPlatformErrorCode\"\n message: { $ref: \"#/components/schemas/PlatformErrorMessage\" }\n details:\n $ref: \"#/components/schemas/EmptyErrorDetails\"\n OperationRateLimitPlatformError:\n type: object\n required: [code, message, details]\n additionalProperties: false\n properties:\n code: { const: PLUGIN_OPERATION_RATE_LIMITED }\n message: { $ref: \"#/components/schemas/PlatformErrorMessage\" }\n details: { $ref: \"#/components/schemas/OperationRateLimitErrorDetails\" }\n JSONLimitPlatformError:\n type: object\n required: [code, message, details]\n additionalProperties: false\n properties:\n code: { const: PLUGIN_JSON_LIMIT_EXCEEDED }\n message: { $ref: \"#/components/schemas/PlatformErrorMessage\" }\n details: { $ref: \"#/components/schemas/JSONLimitErrorDetails\" }\n PackageValidationPlatformError:\n type: object\n required: [code, message, details]\n additionalProperties: false\n properties:\n code:\n type: string\n enum: [PLUGIN_MANIFEST_INVALID, PLUGIN_PACKAGE_INVALID, PLUGIN_PACKAGE_TOO_LARGE, PLUGIN_PACKAGE_PATH_FORBIDDEN]\n message: { $ref: \"#/components/schemas/PlatformErrorMessage\" }\n details: { $ref: \"#/components/schemas/PackageValidationErrorDetails\" }\n ManagementRevisionPlatformError:\n type: object\n required: [code, message, details]\n additionalProperties: false\n properties:\n code: { const: PLUGIN_MANAGEMENT_REVISION_MISMATCH }\n message: { $ref: \"#/components/schemas/PlatformErrorMessage\" }\n details: { $ref: \"#/components/schemas/ManagementRevisionMismatchDetails\" }\n AuthorizationRevisionPlatformError:\n type: object\n required: [code, message, details]\n additionalProperties: false\n properties:\n code: { const: PLUGIN_AUTHORIZATION_REVISION_MISMATCH }\n message: { $ref: \"#/components/schemas/PlatformErrorMessage\" }\n details: { $ref: \"#/components/schemas/AuthorizationRevisionMismatchDetails\" }\n BindingRevisionPlatformError:\n type: object\n required: [code, message, details]\n additionalProperties: false\n properties:\n code: { const: PLUGIN_BINDING_REVISION_MISMATCH }\n message: { $ref: \"#/components/schemas/PlatformErrorMessage\" }\n details: { $ref: \"#/components/schemas/BindingRevisionMismatchDetails\" }\n ValuesRevisionPlatformError:\n type: object\n required: [code, message, details]\n additionalProperties: false\n properties:\n code: { const: PLUGIN_VALUES_REVISION_MISMATCH }\n message: { $ref: \"#/components/schemas/PlatformErrorMessage\" }\n details: { $ref: \"#/components/schemas/ValuesRevisionMismatchDetails\" }\n CapabilityPlatformError:\n type: object\n required: [code, message, details]\n additionalProperties: false\n properties:\n code: { const: PLUGIN_CAPABILITY_ERROR }\n message: { $ref: \"#/components/schemas/PlatformErrorMessage\" }\n details: { $ref: \"#/components/schemas/CapabilityBusinessErrorDetails\" }\n WorkerPlatformError:\n type: object\n required: [code, message, details]\n additionalProperties: false\n properties:\n code: { const: PLUGIN_WORKER_ERROR }\n message: { $ref: \"#/components/schemas/PlatformErrorMessage\" }\n details: { $ref: \"#/components/schemas/WorkerErrorDetails\" }\n MutationGenericPlatformError:\n type: object\n required: [code, message, details, mutation_outcome]\n additionalProperties: false\n properties:\n code: { $ref: \"#/components/schemas/GenericPlatformErrorCode\" }\n message: { $ref: \"#/components/schemas/PlatformErrorMessage\" }\n details: { $ref: \"#/components/schemas/EmptyErrorDetails\" }\n mutation_outcome: { $ref: \"#/components/schemas/MutationOutcome\" }\n MutationJSONLimitPlatformError:\n type: object\n required: [code, message, details, mutation_outcome]\n additionalProperties: false\n properties:\n code: { const: PLUGIN_JSON_LIMIT_EXCEEDED }\n message: { $ref: \"#/components/schemas/PlatformErrorMessage\" }\n details: { $ref: \"#/components/schemas/JSONLimitErrorDetails\" }\n mutation_outcome: { $ref: \"#/components/schemas/MutationOutcome\" }\n MutationPackageValidationPlatformError:\n type: object\n required: [code, message, details, mutation_outcome]\n additionalProperties: false\n properties:\n code:\n type: string\n enum: [PLUGIN_MANIFEST_INVALID, PLUGIN_PACKAGE_INVALID, PLUGIN_PACKAGE_TOO_LARGE, PLUGIN_PACKAGE_PATH_FORBIDDEN]\n message: { $ref: \"#/components/schemas/PlatformErrorMessage\" }\n details: { $ref: \"#/components/schemas/PackageValidationErrorDetails\" }\n mutation_outcome: { $ref: \"#/components/schemas/MutationOutcome\" }\n MutationManagementRevisionPlatformError:\n type: object\n required: [code, message, details, mutation_outcome]\n additionalProperties: false\n properties:\n code: { const: PLUGIN_MANAGEMENT_REVISION_MISMATCH }\n message: { $ref: \"#/components/schemas/PlatformErrorMessage\" }\n details: { $ref: \"#/components/schemas/ManagementRevisionMismatchDetails\" }\n mutation_outcome: { $ref: \"#/components/schemas/MutationOutcome\" }\n MutationAuthorizationRevisionPlatformError:\n type: object\n required: [code, message, details, mutation_outcome]\n additionalProperties: false\n properties:\n code: { const: PLUGIN_AUTHORIZATION_REVISION_MISMATCH }\n message: { $ref: \"#/components/schemas/PlatformErrorMessage\" }\n details: { $ref: \"#/components/schemas/AuthorizationRevisionMismatchDetails\" }\n mutation_outcome: { $ref: \"#/components/schemas/MutationOutcome\" }\n MutationBindingRevisionPlatformError:\n type: object\n required: [code, message, details, mutation_outcome]\n additionalProperties: false\n properties:\n code: { const: PLUGIN_BINDING_REVISION_MISMATCH }\n message: { $ref: \"#/components/schemas/PlatformErrorMessage\" }\n details: { $ref: \"#/components/schemas/BindingRevisionMismatchDetails\" }\n mutation_outcome: { $ref: \"#/components/schemas/MutationOutcome\" }\n MutationValuesRevisionPlatformError:\n type: object\n required: [code, message, details, mutation_outcome]\n additionalProperties: false\n properties:\n code: { const: PLUGIN_VALUES_REVISION_MISMATCH }\n message: { $ref: \"#/components/schemas/PlatformErrorMessage\" }\n details: { $ref: \"#/components/schemas/ValuesRevisionMismatchDetails\" }\n mutation_outcome: { $ref: \"#/components/schemas/MutationOutcome\" }\n MutationCapabilityPlatformError:\n type: object\n required: [code, message, details, mutation_outcome]\n additionalProperties: false\n properties:\n code: { const: PLUGIN_CAPABILITY_ERROR }\n message: { $ref: \"#/components/schemas/PlatformErrorMessage\" }\n details: { $ref: \"#/components/schemas/CapabilityBusinessErrorDetails\" }\n mutation_outcome: { $ref: \"#/components/schemas/MutationOutcome\" }\n MutationWorkerPlatformError:\n type: object\n required: [code, message, details, mutation_outcome]\n additionalProperties: false\n properties:\n code: { const: PLUGIN_WORKER_ERROR }\n message: { $ref: \"#/components/schemas/PlatformErrorMessage\" }\n details: { $ref: \"#/components/schemas/WorkerErrorDetails\" }\n mutation_outcome: { $ref: \"#/components/schemas/MutationOutcome\" }\n MutationSessionTeardownPlatformError:\n type: object\n required: [code, message, details, mutation_outcome]\n additionalProperties: false\n properties:\n code: { const: PLUGIN_SESSION_TEARDOWN_INCOMPLETE }\n message: { $ref: \"#/components/schemas/PlatformErrorMessage\" }\n details: { $ref: \"#/components/schemas/SessionTeardownIncompleteErrorDetails\" }\n mutation_outcome: { const: committed }\n MutationOutcome:\n type: string\n enum: [committed, not_committed, unknown]\n EmptyErrorDetails:\n type: object\n additionalProperties: false\n OperationRateLimitErrorDetails:\n type: object\n additionalProperties: false\n required: [retry_after_ms]\n properties:\n retry_after_ms: { type: integer, minimum: 500, maximum: 10000 }\n JSONLimitErrorDetails:\n type: object\n required: [reason]\n additionalProperties: false\n properties:\n reason:\n type: string\n enum: [payload_bytes, json_depth, prototype_key, number_precision]\n PackageValidationErrorDetails:\n type: object\n required: [reason]\n additionalProperties: false\n properties:\n reason:\n type: string\n enum: [manifest_missing, manifest_field, manifest_decode, zip_invalid, file_count, duplicate_entry, ambiguous_entry, non_regular_entry, invalid_utf8_path, non_nfc_path, symlink_entry, directory_entry, entry_bytes, path_length, compression_ratio, total_uncompressed_bytes, entry_open_failed, entry_read_failed, entry_close_failed, entry_size_mismatch, unsupported_signature_entry, manifest_artifact, package_asset_security, package_artifact_boundary, entry_path, manifest_canonical_json, canonical_hash, package_signature, empty_path, slash_separator, non_canonical_path, path_traversal, hidden_path, external_icon_path, unsupported_icon_format, missing_icon_asset, icon_magic_mismatch, query_or_fragment]\n path:\n type: string\n description: Package-local entry path related to the error, when available.\n pointer:\n type: string\n description: JSON Pointer into manifest.json related to the error, when available.\n CapabilityBusinessErrorDetails:\n type: object\n additionalProperties: false\n required: [capability_id, capability_version, detail_schema_sha256, business_error_code]\n properties:\n capability_id:\n type: string\n minLength: 1\n capability_version:\n $ref: \"#/components/schemas/StrictSemVer\"\n detail_schema_sha256:\n type: string\n pattern: \"^[0-9a-f]{64}$\"\n business_error_code:\n type: string\n pattern: \"^[A-Z][A-Z0-9_]*$\"\n business_error_details:\n type: object\n additionalProperties: true\n WorkerErrorDetails:\n type: object\n additionalProperties: false\n required: [worker_error_code, worker_error_message, worker_error_origin]\n properties:\n worker_error_code:\n type: string\n pattern: \"^[A-Z][A-Z0-9_]*$\"\n worker_error_message:\n type: string\n minLength: 1\n maxLength: 4096\n worker_error_origin:\n type: string\n enum: [runtime, hostcall, plugin]\n SessionTeardownIncompleteErrorDetails:\n type: object\n additionalProperties: false\n required: [session_scope]\n properties:\n session_scope:\n $ref: \"#/components/schemas/SessionScopeRevokeIncompleteResult\"\n ManagementRevisionMismatchDetails:\n type: object\n additionalProperties: false\n required: [plugin_instance_id, expected_management_revision, actual_management_revision]\n properties:\n plugin_instance_id: { type: string, minLength: 1 }\n expected_management_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n actual_management_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n AuthorizationRevisionMismatchDetails:\n type: object\n additionalProperties: false\n required:\n - plugin_instance_id\n - expected_policy_revision\n - actual_policy_revision\n - expected_management_revision\n - actual_management_revision\n - expected_revoke_epoch\n - actual_revoke_epoch\n properties:\n plugin_instance_id: { type: string, minLength: 1 }\n expected_policy_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n actual_policy_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n expected_management_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n actual_management_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n expected_revoke_epoch: { type: integer, minimum: 0, maximum: 9007199254740991 }\n actual_revoke_epoch: { type: integer, minimum: 0, maximum: 9007199254740991 }\n BindingRevisionMismatchDetails:\n type: object\n additionalProperties: false\n required: [plugin_instance_id, expected_binding_revision, actual_binding_revision]\n properties:\n plugin_instance_id: { type: string, minLength: 1 }\n expected_binding_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n actual_binding_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n ValuesRevisionMismatchDetails:\n type: object\n additionalProperties: false\n required: [plugin_instance_id, expected_values_revision, actual_values_revision]\n properties:\n plugin_instance_id: { type: string, minLength: 1 }\n expected_values_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n actual_values_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n ErrorCode:\n $ref: \"../plugin/error-codes-v8.schema.json#/$defs/platform_error_code\"\n PlatformErrorMessage:\n type: string\n minLength: 1\n maxLength: 4096\n pattern: \".*\\\\S.*\"\n GenericPlatformErrorCode:\n type: string\n enum:\n - PLUGIN_INVALID_REQUEST\n - PLUGIN_SIGNATURE_INVALID\n - PLUGIN_TRUST_STATE_DENIED\n - PLUGIN_TRUST_VERIFICATION_REQUIRED\n - PLUGIN_TRUST_VERIFICATION_INVALID\n - PLUGIN_RELEASE_REF_VERIFICATION_FAILED\n - PLUGIN_RELEASE_REF_POLICY_DENIED\n - PLUGIN_RELEASE_NETWORK\n - PLUGIN_RELEASE_TIMEOUT\n - PLUGIN_RELEASE_ASSET_MISSING\n - PLUGIN_RELEASE_ASSET_INTEGRITY\n - PLUGIN_INSTALL_INTERRUPTED\n - PLUGIN_INSTALL_STATE_CONFLICT\n - PLUGIN_INTERNAL_FAILURE\n - PLUGIN_DISABLED\n - PLUGIN_DISABLED_BY_POLICY\n - PLUGIN_PERMISSION_DENIED\n - PLUGIN_ORIGIN_DENIED\n - PLUGIN_ACTION_DENIED\n - PLUGIN_OWNER_SCOPE_MISMATCH\n - PLUGIN_SECRET_SCOPE_MISMATCH\n - PLUGIN_STORAGE_SCOPE_MISMATCH\n - PLUGIN_ADAPTER_FAILURE\n - PLUGIN_SESSION_REVOKED\n - PLUGIN_SESSION_TEARDOWN_INCOMPLETE\n - PLUGIN_SESSION_FENCE_CAPACITY\n - PLUGIN_CONFIRMATION_REQUIRED\n - PLUGIN_CONFIRMATION_INVALID\n - PLUGIN_TOKEN_EXPIRED\n - PLUGIN_TOKEN_REPLAY\n - PLUGIN_GATEWAY_TOKEN_INVALID\n - PLUGIN_GATEWAY_TOKEN_REPLAYED\n - PLUGIN_GATEWAY_TOKEN_CHANNEL_MISMATCH\n - PLUGIN_ASSET_TICKET_INVALID\n - PLUGIN_ASSET_SESSION_INVALID\n - PLUGIN_STREAM_TICKET_INVALID\n - PLUGIN_STREAM_DELIVERY_INVALID\n - PLUGIN_STREAM_CANCELLED\n - PLUGIN_LEASE_INVALID\n - PLUGIN_LEASE_REPLAYED\n - PLUGIN_GRANT_INVALID\n - PLUGIN_STORAGE_QUOTA_EXCEEDED\n - PLUGIN_OPERATION_BLOCKED\n - PLUGIN_OPERATION_NOT_FOUND\n - PLUGIN_OPERATION_NOT_CANCELABLE\n - PLUGIN_NETWORK_TARGET_DENIED\n - PLUGIN_NETWORK_RATE_LIMITED\n - PLUGIN_RUNTIME_UNAVAILABLE\n - PLUGIN_RUNTIME_VERSION_MISMATCH\n - PLUGIN_RUNTIME_CONTRACT_MISMATCH\n - PLUGIN_UI_PROTOCOL_UNSUPPORTED\n - PLUGIN_UI_PROTOCOL_VIOLATION\n - PLUGIN_SURFACE_QUIESCE_TIMEOUT\n - PLUGIN_CONTRACT_MISMATCH\n - PLUGIN_CSRF_REQUIRED\n - PLUGIN_CSRF_INVALID\n - PLUGIN_FEATURE_NOT_CONFIGURED\n SurfaceDisposeResult:\n type: object\n required: [disposed, state, previous_state, revoked]\n additionalProperties: false\n properties:\n disposed: { const: true }\n state: { type: string, enum: [closed, absent] }\n previous_state: { type: string, enum: [active, closed, absent] }\n revoked: { type: boolean }\n SessionScopeRevokeCounts:\n $ref: \"../plugin/session-scope-v1.schema.json#/$defs/revoke_counts\"\n SessionScopeRevokeResult:\n $ref: \"../plugin/session-scope-v1.schema.json#/$defs/public_revoke_result\"\n SessionScopeRevokeCompleteResult:\n $ref: \"../plugin/session-scope-v1.schema.json#/$defs/complete_revoke_result\"\n SessionScopeRevokeIncompleteResult:\n $ref: \"../plugin/session-scope-v1.schema.json#/$defs/incomplete_revoke_result\"\n PluginCatalogResult:\n type: object\n required: [plugins]\n additionalProperties: false\n properties:\n plugins:\n type: array\n items: { $ref: \"#/components/schemas/PluginRecord\" }\n PluginCompatibilityManifest:\n $ref: \"../plugin/compatibility-manifest-v17.schema.json\"\n PluginOperationList:\n type: object\n required: [operations]\n additionalProperties: false\n properties:\n operations:\n type: array\n items: { $ref: \"#/components/schemas/OperationRecord\" }\n next_cursor: { type: string, maxLength: 1024 }\n PluginIntentRecord:\n type: object\n required: [plugin_id, plugin_instance_id, publisher_id, display_name, version, active_fingerprint, intent_id, method, effect, execution]\n additionalProperties: false\n properties:\n plugin_id: { type: string }\n plugin_instance_id: { type: string }\n publisher_id: { type: string }\n display_name: { type: string }\n version: { $ref: \"#/components/schemas/StrictSemVer\" }\n active_fingerprint: { type: string }\n intent_id: { type: string }\n method: { type: string }\n effect: { type: string, enum: [read, write, delete, execute, admin] }\n execution: { type: string, enum: [sync, operation, subscription] }\n payload_schema:\n type: object\n additionalProperties: true\n PluginIntentList:\n type: object\n required: [intents]\n additionalProperties: false\n properties:\n intents:\n type: array\n items: { $ref: \"#/components/schemas/PluginIntentRecord\" }\n PluginPermissionGrant:\n type: object\n description: Explicit public HTTP projection of a permission grant. Internal actor ownership hashes are never returned.\n required: [plugin_instance_id, permission_id, effect, granted_at]\n additionalProperties: false\n properties:\n plugin_instance_id: { type: string }\n permission_id: { type: string }\n effect: { type: string, enum: [grant, deny] }\n granted_at: { type: string, format: date-time }\n expires_at: { type: string, format: date-time }\n revoked_at: { type: string, format: date-time }\n revoked_reason: { type: string }\n PluginPermissionList:\n type: object\n required: [permissions]\n additionalProperties: false\n properties:\n permissions:\n type: array\n items: { $ref: \"#/components/schemas/PluginPermissionGrant\" }\n PluginPermissionRequirementMethod:\n type: object\n required: [method, required_permissions]\n additionalProperties: false\n properties:\n method: { type: string, minLength: 1 }\n required_permissions:\n type: array\n uniqueItems: true\n items: { type: string, minLength: 1 }\n PluginPermissionRequirementContract:\n type: object\n required: [contract_id, contract_version, contract_sha256, capability_id, capability_version, methods]\n additionalProperties: false\n properties:\n contract_id: { type: string, minLength: 1 }\n contract_version: { type: string, minLength: 1 }\n contract_sha256: { type: string, pattern: '^[0-9a-f]{64}$' }\n capability_id: { type: string, minLength: 1 }\n capability_version: { type: string, minLength: 1 }\n methods:\n type: array\n items: { $ref: \"#/components/schemas/PluginPermissionRequirementMethod\" }\n PluginPermissionRequirements:\n type: object\n required: [plugin_instance_id, plugin_version, active_fingerprint, management_revision, contracts, required_permissions]\n additionalProperties: false\n properties:\n plugin_instance_id: { type: string, minLength: 1 }\n plugin_version: { type: string, minLength: 1 }\n active_fingerprint: { type: string, pattern: '^sha256:[0-9a-f]{64}$' }\n management_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n contracts:\n type: array\n items: { $ref: \"#/components/schemas/PluginPermissionRequirementContract\" }\n required_permissions:\n type: array\n uniqueItems: true\n items: { type: string, minLength: 1 }\n AuthorizationRevisions:\n type: object\n required: [policy_revision, management_revision, revoke_epoch]\n additionalProperties: false\n properties:\n policy_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n management_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n revoke_epoch: { type: integer, minimum: 0, maximum: 9007199254740991 }\n PluginPermissionMutationResult:\n type: object\n required: [permission, revisions]\n additionalProperties: false\n properties:\n permission: { $ref: \"#/components/schemas/PluginPermissionGrant\" }\n revisions: { $ref: \"#/components/schemas/AuthorizationRevisions\" }\n PluginSecurityPolicy:\n type: object\n required: [plugin_instance_id, allowed_permissions, denied_methods, policy_revision, management_revision, revoke_epoch, updated_at]\n additionalProperties: false\n properties:\n plugin_instance_id: { type: string, minLength: 1 }\n allowed_permissions:\n type: array\n uniqueItems: true\n items: { type: string, minLength: 1 }\n denied_methods:\n type: array\n uniqueItems: true\n items: { type: string, minLength: 1 }\n policy_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n management_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n revoke_epoch: { type: integer, minimum: 0, maximum: 9007199254740991 }\n updated_at: { type: string, format: date-time }\n PluginSecurityPolicyList:\n type: object\n required: [security_policies]\n additionalProperties: false\n properties:\n security_policies:\n type: array\n items: { $ref: \"#/components/schemas/PluginSecurityPolicy\" }\n PluginSecurityPolicyDeleteResult:\n type: object\n required: [plugin_instance_id, deleted, policy_revision, management_revision, revoke_epoch]\n additionalProperties: false\n properties:\n plugin_instance_id: { type: string, minLength: 1 }\n deleted: { const: true }\n policy_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n management_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n revoke_epoch: { type: integer, minimum: 0, maximum: 9007199254740991 }\n DiagnosticMutationOutcome:\n type: string\n enum: [committed, not_committed, unknown]\n PluginDiagnosticDetails:\n type: object\n additionalProperties: false\n properties:\n operations_deleted: { type: integer, minimum: 0, maximum: 9007199254740991 }\n streams_deleted: { type: integer, minimum: 0, maximum: 9007199254740991 }\n invocation_id: { type: string }\n method: { type: string }\n failure_code: { type: string }\n runtime_process_failure_code:\n $ref: \"../plugin/error-codes-v8.schema.json#/$defs/runtime_process_failure_code\"\n operation_id: { type: string }\n stream_id: { type: string }\n runtime_instance_id: { type: string }\n runtime_generation_id: { type: string }\n runtime_version: { type: string }\n rust_ipc_version: { type: string }\n wasm_abi_version: { type: string }\n contract_set_sha256: { type: string, pattern: '^[0-9a-f]{64}$' }\n runtime_target_os: { type: string }\n runtime_target_arch: { type: string }\n runtime_binary_sha256: { type: string, pattern: '^[0-9a-f]{64}$' }\n os: { type: string }\n arch: { type: string }\n stream: { type: string }\n package_hash: { type: string }\n artifact: { type: string }\n plugin_instance_id: { type: string }\n store_id: { type: string }\n operation: { type: string }\n hostcall: { type: string }\n code: { type: string }\n connector_id: { type: string }\n transport: { type: string }\n revoke_epoch: { type: integer, minimum: 0, maximum: 9007199254740991 }\n stage_id: { type: string }\n reason: { type: string }\n surface_instance_id: { type: string }\n PluginDiagnosticEvent:\n type: object\n required: [type, severity, message]\n additionalProperties: false\n properties:\n event_id: { type: string }\n type: { type: string }\n severity: { type: string, enum: [info, warning] }\n message: { type: string }\n plugin_id: { type: string }\n plugin_instance_id: { type: string }\n surface_id: { type: string }\n surface_instance_id: { type: string }\n active_fingerprint: { type: string }\n request_id: { type: string }\n correlation_id: { type: string }\n mutation_outcome: { $ref: \"#/components/schemas/DiagnosticMutationOutcome\" }\n occurred_at: { type: string, format: date-time }\n details: { $ref: \"#/components/schemas/PluginDiagnosticDetails\" }\n PluginDiagnosticEventList:\n type: object\n required: [diagnostic_events]\n additionalProperties: false\n properties:\n diagnostic_events:\n type: array\n items: { $ref: \"#/components/schemas/PluginDiagnosticEvent\" }\n PluginRuntimeShardHealth:\n type: object\n description: Explicit public HTTP projection of runtime shard health. IPC channel credentials and connection nonces are excluded.\n required: [runtime_shard_id, runtime_instance_id, runtime_generation_id, descriptor, ready, active_invocations, queued_invocations, limits, module_cache]\n additionalProperties: false\n properties:\n runtime_shard_id: { type: string }\n runtime_instance_id: { type: string }\n runtime_generation_id: { type: string }\n descriptor: { $ref: \"#/components/schemas/RuntimeDescriptor\" }\n ready: { type: boolean }\n active_invocations: { type: integer, minimum: 0 }\n queued_invocations: { type: integer, minimum: 0 }\n limits: { $ref: \"#/components/schemas/RuntimeLimits\" }\n module_cache: { $ref: \"#/components/schemas/RuntimeModuleCacheMetrics\" }\n PluginRuntimeHealth:\n type: object\n description: Explicit public HTTP projection of runtime manager health.\n required: [ready, descriptor, shards]\n additionalProperties: false\n properties:\n ready: { type: boolean }\n descriptor: { $ref: \"#/components/schemas/RuntimeDescriptor\" }\n shards:\n type: array\n items: { $ref: \"#/components/schemas/PluginRuntimeShardHealth\" }\n RuntimeTarget:\n oneOf:\n - type: object\n required: [os, arch]\n additionalProperties: false\n properties:\n os: { const: darwin }\n arch: { const: amd64 }\n - type: object\n required: [os, arch]\n additionalProperties: false\n properties:\n os: { const: darwin }\n arch: { const: arm64 }\n - type: object\n required: [os, arch]\n additionalProperties: false\n properties:\n os: { const: linux }\n arch: { const: amd64 }\n - type: object\n required: [os, arch]\n additionalProperties: false\n properties:\n os: { const: linux }\n arch: { const: arm64 }\n RuntimeAdmissionTarget:\n type: string\n enum: [linux/amd64, linux/arm64]\n StrictSemVer:\n type: string\n pattern: '^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(?:-(?:(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*)(?:\\.(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*))*))?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$'\n RuntimeDescriptor:\n type: object\n required: [schema_version, platform_version, target, rust_ipc_version, wasm_abi_version, contract_set_sha256, binary_sha256]\n additionalProperties: false\n properties:\n schema_version: { const: runtime-descriptor-v2 }\n platform_version: { $ref: \"#/components/schemas/StrictSemVer\" }\n target: { $ref: \"#/components/schemas/RuntimeAdmissionTarget\" }\n rust_ipc_version: { const: rust-ipc-v6 }\n wasm_abi_version: { const: redevplugin-wasm-worker-v2 }\n contract_set_sha256: { type: string, pattern: '^[0-9a-f]{64}$' }\n binary_sha256: { type: string, pattern: '^[0-9a-f]{64}$' }\n RuntimeLimits:\n type: object\n description: \"Negotiated runtime capacities. per_plugin_concurrency must not exceed worker_count. Route capacities are derived exactly from negotiated limits: active hostcall routes = worker_count, canceled hostcall retention = worker_count + queue_capacity, and compile-flight artifact routes = worker_count.\"\n required: [worker_count, queue_capacity, per_plugin_concurrency, module_cache_entries, module_cache_source_bytes]\n additionalProperties: false\n properties:\n worker_count: { type: integer, minimum: 1, maximum: 64, description: \"Number of runtime worker threads.\" }\n queue_capacity: { type: integer, minimum: 1, maximum: 64, description: \"Maximum queued worker invocations.\" }\n per_plugin_concurrency: { type: integer, minimum: 1, maximum: 64, description: \"Maximum concurrent invocations for one plugin; must not exceed worker_count.\" }\n module_cache_entries: { type: integer, minimum: 1, maximum: 1024, description: \"Maximum compiled modules retained by the runtime cache.\" }\n module_cache_source_bytes: { type: integer, minimum: 1, maximum: 134217728, description: \"Maximum source WASM bytes retained by the runtime cache (128 MiB).\" }\n RuntimeModuleCacheMetrics:\n type: object\n required: [hits, misses, compiles, entries, source_bytes]\n additionalProperties: false\n properties:\n hits: { type: integer, minimum: 0, maximum: 9007199254740991 }\n misses: { type: integer, minimum: 0, maximum: 9007199254740991 }\n compiles: { type: integer, minimum: 0, maximum: 9007199254740991 }\n entries: { type: integer, minimum: 0, maximum: 1024 }\n source_bytes: { type: integer, minimum: 0, maximum: 134217728 }\n PluginRuntimeStopResult:\n type: object\n required: [stopped]\n additionalProperties: false\n properties:\n stopped: { const: true }\n PluginRuntimeRefreshResult:\n type: object\n required: [results]\n additionalProperties: false\n properties:\n results:\n type: array\n items: { $ref: \"#/components/schemas/PluginRuntimeRefreshEntry\" }\n PluginRuntimeRefreshEntry:\n oneOf:\n - $ref: \"#/components/schemas/PluginRuntimeRefreshSuccess\"\n - $ref: \"#/components/schemas/PluginRuntimeRefreshFailure\"\n PluginRuntimeRefreshSuccess:\n type: object\n required: [plugin_instance_id, status]\n additionalProperties: false\n properties:\n plugin_instance_id: { type: string, minLength: 1 }\n status: { const: refreshed }\n PluginRuntimeRefreshFailure:\n type: object\n required: [plugin_instance_id, status, error]\n additionalProperties: false\n properties:\n plugin_instance_id: { type: string, minLength: 1 }\n status: { const: failed }\n error: { $ref: \"#/components/schemas/PluginRuntimeRefreshPublicError\" }\n PluginRuntimeRefreshPublicError:\n type: object\n required: [code, message, reason, action]\n additionalProperties: false\n properties:\n code:\n type: string\n enum: [PLUGIN_RUNTIME_UNAVAILABLE]\n message: { type: string, minLength: 1 }\n reason:\n type: string\n enum: [unknown, trust_state_advanced, trust_revoked, trust_fenced, trust_epoch_mismatch, activation_evidence_invalid, activation_lease_expired, recovery_canceled]\n action:\n type: string\n enum: [retry, reinstall, contact_admin]\n PluginDataExportResult:\n type: object\n required: [bundle_ref]\n additionalProperties: false\n properties:\n bundle_ref: { type: string, minLength: 1 }\n PluginDataExportDeleteResult:\n type: object\n required: [deleted]\n additionalProperties: false\n properties:\n deleted: { const: true }\n PluginSecretBindResult:\n type: object\n required: [bound]\n additionalProperties: false\n properties:\n bound: { const: true }\n PluginSecretTestResult:\n type: object\n required: [tested]\n additionalProperties: false\n properties:\n tested: { const: true }\n PluginSecretDeleteResult:\n type: object\n required: [deleted]\n additionalProperties: false\n properties:\n deleted: { const: true }\n PluginSettingsField:\n type: object\n required: [key, type, label, scope]\n additionalProperties: false\n properties:\n key: { type: string }\n type: { type: string }\n label: { type: string }\n scope: { $ref: \"#/components/schemas/ResourceScopeKind\" }\n default: true\n secret_ref: { type: string }\n options:\n type: array\n items: { type: string }\n validation:\n type: object\n additionalProperties: true\n PluginSettingsSchema:\n type: object\n description: Explicit public HTTP projection of the settings schema for one owner scope.\n required: [plugin_instance_id, scope, schema_version, fields, values_revision]\n additionalProperties: false\n properties:\n plugin_instance_id: { type: string }\n scope: { $ref: \"#/components/schemas/ResourceScopeKind\" }\n schema_version: { type: integer, minimum: 1 }\n fields:\n type: array\n items: { $ref: \"#/components/schemas/PluginSettingsField\" }\n values_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n PluginSettingsSnapshot:\n type: object\n description: Explicit public HTTP projection of settings values and redacted secret metadata for one owner scope.\n required: [plugin_instance_id, scope, schema_version, values_revision, values, secret_metadata]\n additionalProperties: false\n properties:\n plugin_instance_id: { type: string }\n scope: { $ref: \"#/components/schemas/ResourceScopeKind\" }\n schema_version: { type: integer, minimum: 1 }\n values_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n values:\n type: object\n additionalProperties: true\n secret_metadata:\n type: array\n items: { $ref: \"#/components/schemas/PluginSettingsSecretMetadata\" }\n PluginSettingsSecretMetadata:\n type: object\n required: [key, secret_ref, scope, bound]\n additionalProperties: false\n properties:\n key: { type: string, minLength: 1 }\n secret_ref: { type: string, minLength: 1 }\n scope: { type: string, enum: [user, environment] }\n bound: { type: boolean }\n last_test_status: { type: string }\n bound_at: { type: string, format: date-time }\n tested_at: { type: string, format: date-time }\n updated_at: { type: string, format: date-time }\n ExternalPackageIntentRequest:\n description: Closed install or update intent. Update concurrency values are supplied by the caller, while package identity is always derived from the inspected artifact.\n oneOf:\n - type: object\n required: [action]\n additionalProperties: false\n properties:\n action: { const: install }\n - type: object\n required: [action, plugin_instance_id, expected_management_revision]\n additionalProperties: false\n properties:\n action: { const: update }\n plugin_instance_id: { type: string, minLength: 1 }\n expected_management_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n ExternalPackageIntent:\n description: Server-resolved install or update intent. The platform generates the install instance identifier during inspection.\n oneOf:\n - type: object\n required: [action, plugin_instance_id]\n additionalProperties: false\n properties:\n action: { const: install }\n plugin_instance_id: { type: string, minLength: 1 }\n - type: object\n required: [action, plugin_instance_id, expected_management_revision]\n additionalProperties: false\n properties:\n action: { const: update }\n plugin_instance_id: { type: string, minLength: 1 }\n expected_management_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n ExternalPackageSource:\n description: Caller-selected external source. Redirect resolution, package hashes, identity, and provenance are derived by the platform.\n oneOf:\n - type: object\n required: [kind, url]\n additionalProperties: false\n properties:\n kind: { const: package_url }\n url: { type: string, format: uri, minLength: 1 }\n - type: object\n required: [kind, url]\n additionalProperties: false\n properties:\n kind: { const: github_repository }\n url: { type: string, format: uri, minLength: 1 }\n tag:\n type: string\n minLength: 1\n maxLength: 255\n description: Optional exact release tag. When omitted, the resolver selects the repository's latest eligible release.\n InspectExternalPackageRequest:\n type: object\n description: Requests server-side inspection. Trust, hashes, package identity, approval, provenance, signature assessment, and update eligibility are intentionally not caller-controlled.\n required: [intent, source]\n additionalProperties: false\n properties:\n intent: { $ref: \"#/components/schemas/ExternalPackageIntentRequest\" }\n source: { $ref: \"#/components/schemas/ExternalPackageSource\" }\n CommitExternalPackageRequest:\n type: object\n description: Confirms the exact immutable inspection. The digest cannot override any inspected fact.\n required: [inspection_id, confirmation_digest]\n additionalProperties: false\n properties:\n inspection_id: { type: string, minLength: 1 }\n confirmation_digest: { type: string, pattern: \"^sha256:[0-9a-f]{64}$\" }\n QueryExternalPackageCommitRequest:\n type: object\n required: [inspection_id]\n additionalProperties: false\n properties:\n inspection_id: { type: string, minLength: 1 }\n commit_id: { type: string, minLength: 1 }\n ExternalPackageSignatureAssessment:\n type: object\n description: Cryptographic signature fact computed over the inspected artifact. The absent state is installable and affects trust classification and automatic-update eligibility only.\n required: [state, reason_codes, assessed_hashes, assessed_at]\n additionalProperties: false\n properties:\n state:\n type: string\n enum: [verified, absent, unknown_signer, invalid, revoked, unavailable]\n reason_codes:\n type: array\n uniqueItems: true\n items: { type: string, minLength: 1 }\n assessed_hashes: { $ref: \"#/components/schemas/TrustHashSet\" }\n algorithm: { type: string, minLength: 1 }\n key_id: { type: string, minLength: 1 }\n assessed_at: { type: string, format: date-time }\n assessment_epoch: { type: string, minLength: 1 }\n ExternalPackageRedirectHop:\n type: object\n description: Credential-free redirect projection. Userinfo, query strings, and fragments are never exposed.\n required: [origin, path]\n additionalProperties: false\n properties:\n origin: { type: string, format: uri, minLength: 1 }\n path: { type: string, pattern: \"^/\" }\n ExternalPackageSourceProvenance:\n description: Stable, credential-free source provenance computed after URL, GitHub release, or uploaded-package resolution. Upload identifiers are opaque server-generated values and cannot be supplied by callers.\n oneOf:\n - type: object\n required: [kind, source_origin, source_path, redirect_chain, package_sha256, resolved_at]\n additionalProperties: false\n properties:\n kind: { const: package_url }\n source_origin: { type: string, format: uri, minLength: 1 }\n source_path: { type: string, pattern: \"^/\" }\n redirect_chain:\n type: array\n items: { $ref: \"#/components/schemas/ExternalPackageRedirectHop\" }\n package_sha256: { type: string, pattern: \"^(sha256:)?[0-9a-f]{64}$\" }\n resolved_at: { type: string, format: date-time }\n - type: object\n required: [kind, upload_id, package_sha256, resolved_at]\n additionalProperties: false\n properties:\n kind: { const: package_upload }\n upload_id:\n type: string\n minLength: 1\n description: Opaque server-generated identifier for the staged uploaded artifact.\n package_sha256: { type: string, pattern: \"^(sha256:)?[0-9a-f]{64}$\" }\n resolved_at: { type: string, format: date-time }\n - type: object\n required: [kind, repository_id, release_id, asset_id, repository_url, owner, repository, resolved_commit_sha, package_sha256, resolved_at]\n additionalProperties: false\n properties:\n kind: { const: github_repository }\n repository_id:\n type: string\n pattern: \"^[1-9][0-9]*$\"\n description: Stable GitHub repository database ID encoded as decimal text.\n release_id:\n type: string\n pattern: \"^[1-9][0-9]*$\"\n description: Stable GitHub release database ID encoded as decimal text.\n asset_id:\n type: string\n pattern: \"^[1-9][0-9]*$\"\n description: Stable GitHub release asset database ID encoded as decimal text.\n repository_url: { type: string, format: uri, minLength: 1 }\n owner:\n type: string\n minLength: 1\n description: Display-only owner login; repository_id remains authoritative across renames.\n repository:\n type: string\n minLength: 1\n description: Display-only repository name; repository_id remains authoritative across renames.\n resolved_commit_sha: { type: string, pattern: \"^[0-9a-f]{40}$\" }\n release_tag: { type: string, minLength: 1 }\n asset_name: { type: string, minLength: 1 }\n package_sha256: { type: string, pattern: \"^(sha256:)?[0-9a-f]{64}$\" }\n resolved_at: { type: string, format: date-time }\n ExternalPackageExecutionApproval:\n type: object\n description: Execution decision independent from signature state. Session and owner hashes are excluded from this public projection.\n required: [state, reason_codes, assessed_at]\n additionalProperties: false\n properties:\n state:\n type: string\n enum: [pending, user_approved, policy_approved, policy_blocked]\n reason_codes:\n type: array\n uniqueItems: true\n items: { type: string, minLength: 1 }\n assessed_at: { type: string, format: date-time }\n approved_at: { type: string, format: date-time }\n ExternalPackageUpdateEligibility:\n type: object\n description: Automatic-update decision. Unsigned or otherwise unverified packages remain installable but are normally manual-only.\n required: [state, reason_codes, assessed_at]\n additionalProperties: false\n properties:\n state:\n type: string\n enum: [manual_only, automatic_eligible]\n reason_codes:\n type: array\n uniqueItems: true\n items: { type: string, minLength: 1 }\n assessed_at: { type: string, format: date-time }\n ExternalPackagePermissionSummary:\n type: object\n required: [permission_id, methods]\n additionalProperties: false\n properties:\n permission_id: { type: string, minLength: 1 }\n methods:\n type: array\n uniqueItems: true\n items: { type: string, minLength: 1 }\n ExternalPackageMethodRouteSummary:\n type: object\n required: [kind]\n additionalProperties: false\n properties:\n kind: { type: string, enum: [capability, worker, core_action] }\n binding_id: { type: string, minLength: 1 }\n target_method: { type: string, minLength: 1 }\n worker_id: { type: string, minLength: 1 }\n action_id: { type: string, minLength: 1 }\n ExternalPackageConfirmationSummary:\n type: object\n required: [mode, request_hash_fields, plan_hash_required]\n additionalProperties: false\n properties:\n mode: { type: string, enum: [none, required, risk_based] }\n preflight_method: { type: string, minLength: 1 }\n request_hash_fields:\n type: array\n uniqueItems: true\n items: { type: string, minLength: 1 }\n plan_hash_required: { type: boolean }\n ExternalPackageCancelSummary:\n type: object\n required: [cancelable, disable_behavior, uninstall_behavior, ack_timeout_ms]\n additionalProperties: false\n properties:\n cancelable: { type: boolean }\n disable_behavior: { type: string, enum: [cancel, orphan, wait] }\n uninstall_behavior: { type: string, enum: [cancel_then_block_delete, force_cleanup_allowed] }\n ack_timeout_ms: { type: integer, minimum: 0 }\n ExternalPackageMethodSummary:\n type: object\n required: [method, route, effect, execution, dangerous, preflight_only, required_permissions, confirmation]\n additionalProperties: false\n properties:\n method: { type: string, minLength: 1 }\n route: { $ref: \"#/components/schemas/ExternalPackageMethodRouteSummary\" }\n effect: { type: string, enum: [read, write, delete, execute, admin] }\n execution: { type: string, enum: [sync, operation, subscription] }\n dangerous: { type: boolean }\n preflight_only: { type: boolean }\n required_permissions:\n type: array\n uniqueItems: true\n items: { type: string, minLength: 1 }\n confirmation: { $ref: \"#/components/schemas/ExternalPackageConfirmationSummary\" }\n cancel: { $ref: \"#/components/schemas/ExternalPackageCancelSummary\" }\n ExternalPackageCapabilityContractSummary:\n type: object\n required: [binding_id, capability_id, capability_version, contract_sha256]\n additionalProperties: false\n properties:\n binding_id: { type: string, minLength: 1 }\n capability_id: { type: string, minLength: 1 }\n capability_version: { type: string, minLength: 1 }\n contract_sha256: { type: string, pattern: \"^sha256:[0-9a-f]{64}$\" }\n ExternalPackageWorkerSummary:\n type: object\n required: [worker_id, artifact, abi, mode, scope, memory_limit_bytes, idle_timeout_ms]\n additionalProperties: false\n properties:\n worker_id: { type: string, minLength: 1 }\n artifact: { type: string, minLength: 1 }\n abi: { const: redevplugin-wasm-worker-v2 }\n mode: { const: job }\n scope: { $ref: \"#/components/schemas/ResourceScopeKind\" }\n memory_limit_bytes: { type: integer, minimum: 1, maximum: 268435456 }\n idle_timeout_ms: { type: integer, minimum: 0 }\n ExternalPackageNetworkMethodAccessSummary:\n type: object\n required: [method, operations, http_methods]\n additionalProperties: false\n properties:\n method: { type: string, minLength: 1 }\n operations:\n type: array\n uniqueItems: true\n items: { type: string, enum: [http, http_stream, websocket_round_trip, tcp_round_trip, udp_round_trip] }\n http_methods:\n type: array\n uniqueItems: true\n items: { type: string, enum: [GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS] }\n ExternalPackageNetworkSummary:\n type: object\n required: [connector_id, transport, scope, destinations, auth_declared, tls_declared, method_access]\n additionalProperties: false\n properties:\n connector_id: { type: string, minLength: 1 }\n transport: { type: string, enum: [http, websocket, tcp, udp] }\n scope: { $ref: \"#/components/schemas/ResourceScopeKind\" }\n destinations:\n type: array\n uniqueItems: true\n items: { type: string, minLength: 1 }\n auth_declared: { type: boolean }\n tls_declared: { type: boolean }\n method_access:\n type: array\n items: { $ref: \"#/components/schemas/ExternalPackageNetworkMethodAccessSummary\" }\n ExternalPackageStorageMethodAccessSummary:\n type: object\n required: [method, operations]\n additionalProperties: false\n properties:\n method: { type: string, minLength: 1 }\n operations:\n type: array\n uniqueItems: true\n items: { type: string, enum: [read, write, delete, list, get, put, query, exec] }\n ExternalPackageStorageSummary:\n type: object\n required: [store_id, kind, scope, quota_bytes, schema_version, method_access]\n additionalProperties: false\n properties:\n store_id: { type: string, minLength: 1 }\n kind: { type: string, enum: [kv, files, sqlite] }\n scope: { $ref: \"#/components/schemas/ResourceScopeKind\" }\n quota_bytes: { type: integer, minimum: 1, maximum: 1073741824 }\n quota_files: { type: integer, minimum: 1, maximum: 100000 }\n schema_version: { type: integer, minimum: 1 }\n method_access:\n type: array\n items: { $ref: \"#/components/schemas/ExternalPackageStorageMethodAccessSummary\" }\n ExternalPackageSecretRefSummary:\n type: object\n required: [setting_key, secret_ref, scope]\n additionalProperties: false\n properties:\n setting_key: { type: string, minLength: 1 }\n secret_ref: { type: string, minLength: 1 }\n scope: { $ref: \"#/components/schemas/ResourceScopeKind\" }\n ExternalPackageCoreActionSummary:\n type: object\n required: [method, action_id, effect]\n additionalProperties: false\n properties:\n method: { type: string, minLength: 1 }\n action_id: { type: string, minLength: 1 }\n effect: { type: string, enum: [read, write, delete, execute, admin] }\n ExternalPackageIntentSummary:\n type: object\n required: [intent_id, method]\n additionalProperties: false\n properties:\n intent_id: { type: string, minLength: 1 }\n method: { type: string, minLength: 1 }\n ExternalPackageSurfaceSummary:\n type: object\n required: [surface_id, kind, intent, label, entry]\n additionalProperties: false\n properties:\n surface_id: { type: string, minLength: 1 }\n kind: { type: string, enum: [view, command, background] }\n intent: { type: string, enum: [primary, secondary, utility] }\n label: { type: string, minLength: 1 }\n entry: { type: string, minLength: 1 }\n icon: { type: string, minLength: 1 }\n default_size: { $ref: \"#/components/schemas/ExternalPackageSizeSummary\" }\n ExternalPackageSizeSummary:\n type: object\n required: [width, height]\n additionalProperties: false\n properties:\n width: { type: integer, minimum: 1 }\n height: { type: integer, minimum: 1 }\n ExternalPackageSecuritySummary:\n type: object\n description: Closed, display-ready projection of every security-relevant declaration in the inspected manifest.\n required: [summary_sha256, permissions, methods, capability_contracts, workers, network, storage, secret_refs, core_actions, intents, surfaces]\n additionalProperties: false\n properties:\n summary_sha256: { type: string, pattern: \"^sha256:[0-9a-f]{64}$\" }\n permissions:\n type: array\n items: { $ref: \"#/components/schemas/ExternalPackagePermissionSummary\" }\n methods:\n type: array\n items: { $ref: \"#/components/schemas/ExternalPackageMethodSummary\" }\n capability_contracts:\n type: array\n items: { $ref: \"#/components/schemas/ExternalPackageCapabilityContractSummary\" }\n workers:\n type: array\n items: { $ref: \"#/components/schemas/ExternalPackageWorkerSummary\" }\n network:\n type: array\n items: { $ref: \"#/components/schemas/ExternalPackageNetworkSummary\" }\n storage:\n type: array\n items: { $ref: \"#/components/schemas/ExternalPackageStorageSummary\" }\n secret_refs:\n type: array\n items: { $ref: \"#/components/schemas/ExternalPackageSecretRefSummary\" }\n core_actions:\n type: array\n items: { $ref: \"#/components/schemas/ExternalPackageCoreActionSummary\" }\n intents:\n type: array\n items: { $ref: \"#/components/schemas/ExternalPackageIntentSummary\" }\n surfaces:\n type: array\n items: { $ref: \"#/components/schemas/ExternalPackageSurfaceSummary\" }\n SettingOptionPresentation:\n type: object\n required: [value, label]\n additionalProperties: false\n properties:\n value: { type: string, minLength: 1, maxLength: 128 }\n label: { type: string, minLength: 1, maxLength: 128 }\n ResolvedSurfacePresentation:\n type: object\n required: [surface_id, label]\n additionalProperties: false\n properties:\n surface_id: { type: string, minLength: 1 }\n label: { type: string, minLength: 1, maxLength: 128 }\n ResolvedSettingPresentation:\n type: object\n required: [key, label, options]\n additionalProperties: false\n properties:\n key: { type: string, minLength: 1 }\n label: { type: string, minLength: 1, maxLength: 128 }\n options:\n type: array\n items: { $ref: \"#/components/schemas/SettingOptionPresentation\" }\n PresentationIcon:\n type: object\n required: [path]\n additionalProperties: false\n properties:\n path:\n type: string\n minLength: 1\n pattern: \"^[A-Za-z0-9_][A-Za-z0-9_.-]*(?:/[A-Za-z0-9_][A-Za-z0-9_.-]*)*\\\\.(?:[Pp][Nn][Gg]|[Ww][Ee][Bb][Pp])$\"\n PresentationLocale:\n type: object\n required: [locale, plugin_name, summary, description, highlights, keywords, surfaces, settings]\n additionalProperties: false\n properties:\n locale: { type: string, minLength: 2, maxLength: 255 }\n plugin_name: { type: string, minLength: 1, maxLength: 128 }\n publisher_name: { type: string, minLength: 1, maxLength: 128 }\n summary: { type: string, minLength: 1, maxLength: 240 }\n description:\n type: array\n minItems: 1\n maxItems: 12\n items: { type: string, minLength: 1, maxLength: 1000 }\n highlights:\n type: array\n maxItems: 8\n items: { type: string, minLength: 1, maxLength: 240 }\n keywords:\n type: array\n minItems: 1\n maxItems: 12\n items: { type: string, minLength: 1, maxLength: 64 }\n surfaces:\n type: array\n items: { $ref: \"#/components/schemas/ResolvedSurfacePresentation\" }\n settings:\n type: array\n items: { $ref: \"#/components/schemas/ResolvedSettingPresentation\" }\n PresentationCatalog:\n type: object\n required: [default_locale, locales]\n additionalProperties: false\n properties:\n default_locale: { type: string, minLength: 2, maxLength: 255 }\n icon: { $ref: \"#/components/schemas/PresentationIcon\" }\n locales:\n type: array\n minItems: 1\n maxItems: 16\n items: { $ref: \"#/components/schemas/PresentationLocale\" }\n ExternalPackageInspection:\n type: object\n description: Immutable inspection projection. Package identity and all four trust/security facts are server-derived.\n required: [inspection_id, expires_at, intent, publisher_id, plugin_id, version, presentation, presentation_sha256, inspected_hashes, signature_assessment, source_provenance, execution_approval, update_eligibility, security_summary, confirmation_digest]\n additionalProperties: false\n properties:\n inspection_id: { type: string, minLength: 1 }\n expires_at: { type: string, format: date-time }\n intent: { $ref: \"#/components/schemas/ExternalPackageIntent\" }\n publisher_id: { type: string, minLength: 1 }\n plugin_id: { type: string, minLength: 1 }\n version: { $ref: \"#/components/schemas/StrictSemVer\" }\n presentation: { $ref: \"#/components/schemas/PresentationCatalog\" }\n presentation_sha256: { type: string, pattern: \"^sha256:[0-9a-f]{64}$\" }\n inspected_hashes: { $ref: \"#/components/schemas/TrustHashSet\" }\n signature_assessment: { $ref: \"#/components/schemas/ExternalPackageSignatureAssessment\" }\n source_provenance: { $ref: \"#/components/schemas/ExternalPackageSourceProvenance\" }\n execution_approval: { $ref: \"#/components/schemas/ExternalPackageExecutionApproval\" }\n update_eligibility: { $ref: \"#/components/schemas/ExternalPackageUpdateEligibility\" }\n security_summary: { $ref: \"#/components/schemas/ExternalPackageSecuritySummary\" }\n confirmation_digest: { type: string, pattern: \"^sha256:[0-9a-f]{64}$\" }\n ExternalPackageCommitReceipt:\n type: object\n description: Immutable successful commit evidence.\n required: [commit_id, inspection_id, package_sha256, management_revision, committed_at]\n additionalProperties: false\n properties:\n commit_id: { type: string, minLength: 1 }\n inspection_id: { type: string, minLength: 1 }\n package_sha256: { type: string, pattern: \"^(sha256:)?[0-9a-f]{64}$\" }\n management_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n committed_at: { type: string, format: date-time }\n ExternalPackageCommitResult:\n description: Closed commit reconciliation union. A committed result repeats all four facts so clients never infer them from legacy trust_state alone. A failed result is terminal evidence that a durable commit did not occur and requires a fresh inspection before retrying.\n oneOf:\n - type: object\n required: [status, inspection_id, intent, receipt, plugin, signature_assessment, source_provenance, execution_approval, update_eligibility, security_summary]\n additionalProperties: false\n properties:\n status: { const: committed }\n inspection_id: { type: string, minLength: 1 }\n intent: { $ref: \"#/components/schemas/ExternalPackageIntent\" }\n receipt: { $ref: \"#/components/schemas/ExternalPackageCommitReceipt\" }\n plugin: { $ref: \"#/components/schemas/PluginRecord\" }\n signature_assessment: { $ref: \"#/components/schemas/ExternalPackageSignatureAssessment\" }\n source_provenance: { $ref: \"#/components/schemas/ExternalPackageSourceProvenance\" }\n execution_approval: { $ref: \"#/components/schemas/ExternalPackageExecutionApproval\" }\n update_eligibility: { $ref: \"#/components/schemas/ExternalPackageUpdateEligibility\" }\n security_summary: { $ref: \"#/components/schemas/ExternalPackageSecuritySummary\" }\n - type: object\n required: [status, inspection_id, intent, retry_after_ms]\n additionalProperties: false\n properties:\n status: { const: in_progress }\n inspection_id: { type: string, minLength: 1 }\n intent: { $ref: \"#/components/schemas/ExternalPackageIntent\" }\n retry_after_ms: { type: integer, minimum: 1, maximum: 60000 }\n - type: object\n required: [status, inspection_id, intent, failure_code]\n additionalProperties: false\n properties:\n status: { const: failed }\n inspection_id: { type: string, minLength: 1 }\n intent: { $ref: \"#/components/schemas/ExternalPackageIntent\" }\n failure_code: { const: host_restarted_before_commit }\n TrustState:\n type: string\n enum: [verified, unsigned_local, untrusted, needs_review, trust_unavailable, blocked_security]\n TrustHashSet:\n type: object\n required: [package_sha256, manifest_sha256, entries_sha256]\n additionalProperties: false\n properties:\n package_sha256: { type: string, pattern: \"^(sha256:)?[0-9a-f]{64}$\" }\n manifest_sha256: { type: string, pattern: \"^(sha256:)?[0-9a-f]{64}$\" }\n entries_sha256: { type: string, pattern: \"^(sha256:)?[0-9a-f]{64}$\" }\n VerifiedSignature:\n type: object\n required: [algorithm, key_id]\n additionalProperties: false\n properties:\n algorithm: { type: string, minLength: 1 }\n key_id: { type: string, minLength: 1 }\n TrustAssessment:\n type: object\n required: [trust_state, verified_hashes]\n additionalProperties: false\n properties:\n trust_state:\n $ref: \"#/components/schemas/TrustState\"\n reason_codes:\n type: array\n items: { type: string }\n verified_hashes:\n $ref: \"#/components/schemas/TrustHashSet\"\n verified_signature:\n $ref: \"#/components/schemas/VerifiedSignature\"\n trust_assessment_epoch: { type: string }\n policy_epoch: { type: string }\n revocation_epoch: { type: string }\n metadata:\n type: object\n additionalProperties: { type: string }\n PluginVersion:\n type: object\n required: [version, active_fingerprint, package_hash, manifest_hash, entries_hash, trust_state, trust_assessment, manifest, presentation, presentation_sha256, package_entries, activated_at]\n additionalProperties: false\n properties:\n version: { $ref: \"#/components/schemas/StrictSemVer\" }\n active_fingerprint: { type: string, minLength: 1 }\n package_hash: { type: string, minLength: 1 }\n manifest_hash: { type: string, minLength: 1 }\n entries_hash: { type: string, minLength: 1 }\n trust_state:\n $ref: \"#/components/schemas/TrustState\"\n trust_assessment:\n $ref: \"#/components/schemas/TrustAssessment\"\n source_policy_snapshot_hash: { type: string, pattern: \"^(sha256:)?[0-9a-f]{64}$\" }\n source_policy_snapshot:\n type: object\n additionalProperties: true\n local_import_provenance:\n $ref: \"#/components/schemas/LocalImportProvenance\"\n signature_assessment:\n $ref: \"#/components/schemas/ExternalPackageSignatureAssessment\"\n source_provenance:\n $ref: \"#/components/schemas/ExternalPackageSourceProvenance\"\n execution_approval:\n $ref: \"#/components/schemas/ExternalPackageExecutionApproval\"\n update_eligibility:\n $ref: \"#/components/schemas/ExternalPackageUpdateEligibility\"\n security_summary:\n $ref: \"#/components/schemas/ExternalPackageSecuritySummary\"\n capability_contracts:\n type: array\n items: { $ref: \"#/components/schemas/CapabilityContractPin\" }\n manifest:\n $ref: \"../plugin/manifest-v8.schema.json\"\n presentation: { $ref: \"#/components/schemas/PresentationCatalog\" }\n presentation_sha256: { type: string, pattern: \"^sha256:[0-9a-f]{64}$\" }\n package_entries:\n type: array\n items: { $ref: \"#/components/schemas/PackageEntry\" }\n runtime_requirement: { $ref: \"#/components/schemas/RuntimeRequirement\" }\n activated_at: { type: string, format: date-time }\n metadata:\n type: object\n additionalProperties: { type: string }\n PluginRecord:\n type: object\n description: Explicit public HTTP projection of a registry record. Persistent owner identity is excluded.\n required: [plugin_instance_id, publisher_id, plugin_id, version, active_fingerprint, package_hash, manifest_hash, entries_hash, trust_state, trust_assessment, enable_state, policy_revision, management_revision, revoke_epoch, manifest, presentation, presentation_sha256, package_entries, installed_at, updated_at]\n additionalProperties: false\n properties:\n plugin_instance_id: { type: string, minLength: 1 }\n publisher_id: { type: string }\n plugin_id: { type: string, minLength: 1 }\n version: { $ref: \"#/components/schemas/StrictSemVer\" }\n active_fingerprint: { type: string, minLength: 1 }\n package_hash: { type: string }\n manifest_hash: { type: string }\n entries_hash: { type: string }\n trust_state:\n $ref: \"#/components/schemas/TrustState\"\n trust_assessment:\n $ref: \"#/components/schemas/TrustAssessment\"\n source_policy_snapshot_hash: { type: string, pattern: \"^(sha256:)?[0-9a-f]{64}$\" }\n source_policy_snapshot:\n type: object\n additionalProperties: true\n local_import_provenance:\n $ref: \"#/components/schemas/LocalImportProvenance\"\n signature_assessment:\n $ref: \"#/components/schemas/ExternalPackageSignatureAssessment\"\n source_provenance:\n $ref: \"#/components/schemas/ExternalPackageSourceProvenance\"\n execution_approval:\n $ref: \"#/components/schemas/ExternalPackageExecutionApproval\"\n update_eligibility:\n $ref: \"#/components/schemas/ExternalPackageUpdateEligibility\"\n security_summary:\n $ref: \"#/components/schemas/ExternalPackageSecuritySummary\"\n capability_contracts:\n type: array\n items: { $ref: \"#/components/schemas/CapabilityContractPin\" }\n enable_state:\n type: string\n enum: [disabled, enabled, disabled_by_policy, disabled_incompatible]\n disabled_reason: { type: string }\n policy_revision: { type: integer, minimum: 0, maximum: 9007199254740991 }\n management_revision: { type: integer, minimum: 0, maximum: 9007199254740991 }\n revoke_epoch: { type: integer, minimum: 0, maximum: 9007199254740991 }\n manifest:\n $ref: \"../plugin/manifest-v8.schema.json\"\n presentation: { $ref: \"#/components/schemas/PresentationCatalog\" }\n presentation_sha256: { type: string, pattern: \"^sha256:[0-9a-f]{64}$\" }\n package_entries:\n type: array\n items: { $ref: \"#/components/schemas/PackageEntry\" }\n runtime_requirement: { $ref: \"#/components/schemas/RuntimeRequirement\" }\n version_history:\n type: array\n items:\n $ref: \"#/components/schemas/PluginVersion\"\n installed_at: { type: string, format: date-time }\n enabled_at: { type: string, format: date-time }\n updated_at: { type: string, format: date-time }\n deleted_at: { type: string, format: date-time }\n metadata:\n type: object\n additionalProperties: { type: string }\n PackageEntry:\n type: object\n required: [path, size, sha256, mode]\n additionalProperties: false\n properties:\n path: { type: string, minLength: 1 }\n size: { type: integer, minimum: 0 }\n sha256: { type: string, pattern: \"^[0-9a-f]{64}$\" }\n mode: { type: string, minLength: 1 }\n content_type: { type: string }\n RuntimeRequirement:\n type: object\n required: [min_version]\n additionalProperties: false\n properties:\n min_version: { $ref: \"#/components/schemas/StrictSemVer\" }\n supported_targets:\n type: array\n uniqueItems: true\n items:\n type: string\n enum: [darwin/amd64, darwin/arm64, linux/amd64, linux/arm64]\n LocalImportProvenance:\n type: object\n required: [import_id, distribution, policy_epoch, unsigned_policy, assessed_at]\n additionalProperties: false\n properties:\n import_id: { type: string, minLength: 1 }\n distribution: { enum: [local_import] }\n policy_epoch: { type: string, minLength: 1 }\n unsigned_policy: { enum: [dev_only, review_required, block] }\n assessed_at: { type: string, format: date-time }\n PackageHashSet:\n type: object\n required: [package_sha256, manifest_sha256, entries_sha256]\n additionalProperties: false\n properties:\n package_sha256: { type: string, pattern: \"^(sha256:)?[0-9a-f]{64}$\" }\n manifest_sha256: { type: string, pattern: \"^(sha256:)?[0-9a-f]{64}$\" }\n entries_sha256: { type: string, pattern: \"^(sha256:)?[0-9a-f]{64}$\" }\n PluginReleaseRef:\n type: object\n required: [source_id, channel, release_metadata_ref, release_metadata_sha256, publisher_id, plugin_id, version, expected_hashes]\n additionalProperties: false\n properties:\n source_id: { type: string, minLength: 1 }\n channel: { type: string, pattern: \"^[a-z][a-z0-9._-]{0,127}$\" }\n release_metadata_ref: { type: string, minLength: 1 }\n release_metadata_sha256: { type: string, pattern: \"^(sha256:)?[0-9a-f]{64}$\" }\n publisher_id: { type: string, minLength: 1 }\n plugin_id: { type: string, minLength: 1 }\n version: { $ref: \"#/components/schemas/StrictSemVer\" }\n expected_hashes:\n $ref: \"#/components/schemas/PackageHashSet\"\n InstallReleaseRefRequest:\n type: object\n required: [plugin_instance_id, release_ref]\n additionalProperties: false\n properties:\n release_ref:\n $ref: \"#/components/schemas/PluginReleaseRef\"\n plugin_instance_id: { type: string, minLength: 1 }\n StartReleaseInstallOperationRequest:\n type: object\n required: [request_id, plugin_instance_id, release_ref]\n additionalProperties: false\n properties:\n request_id: { type: string, minLength: 1, maxLength: 256 }\n plugin_instance_id: { type: string, minLength: 1 }\n activate_after_install:\n type: boolean\n description: When omitted, verified official sources activate automatically; false keeps the installed plugin disabled.\n approved_permission_ids:\n type: array\n maxItems: 256\n uniqueItems: true\n items: { type: string, minLength: 1, maxLength: 256 }\n release_ref:\n $ref: \"#/components/schemas/PluginReleaseRef\"\n if:\n required: [activate_after_install]\n properties:\n activate_after_install: { const: false }\n then:\n not:\n required: [approved_permission_ids]\n ReleaseInstallProgress:\n oneOf:\n - type: object\n required: [kind]\n additionalProperties: false\n properties:\n kind: { const: indeterminate }\n - type: object\n required: [kind, completed, total]\n additionalProperties: false\n properties:\n kind: { type: string, enum: [items, bytes] }\n completed: { type: integer, minimum: 0, maximum: 9007199254740991 }\n total: { type: integer, minimum: 1, maximum: 9007199254740991 }\n ReleaseInstallFailure:\n type: object\n required: [code, retryable]\n additionalProperties: false\n properties:\n code:\n type: string\n enum: [PLUGIN_RELEASE_REF_VERIFICATION_FAILED, PLUGIN_RELEASE_REF_POLICY_DENIED, PLUGIN_RELEASE_NETWORK, PLUGIN_RELEASE_TIMEOUT, PLUGIN_RELEASE_ASSET_MISSING, PLUGIN_RELEASE_ASSET_INTEGRITY, PLUGIN_INSTALL_INTERRUPTED, PLUGIN_INSTALL_STATE_CONFLICT, PLUGIN_INTERNAL_FAILURE]\n retryable: { type: boolean }\n ReleaseInstallActivation:\n type: object\n required: [status]\n additionalProperties: false\n properties:\n status: { type: string, enum: [pending, enabled, needs_attention, not_requested] }\n missing_permission_ids:\n type: array\n uniqueItems: true\n items: { type: string, minLength: 1, maxLength: 256 }\n next_action: { type: string, enum: [approve_permissions, retry_activation] }\n oneOf:\n - required: [status]\n properties:\n status: { type: string, enum: [pending, enabled, not_requested] }\n not:\n anyOf:\n - required: [missing_permission_ids]\n - required: [next_action]\n - required: [status, next_action]\n properties:\n status: { const: needs_attention }\n ReleaseInstallPhaseDiagnostic:\n type: object\n required: [phase, attempt, progress, cache_hit, started_at]\n additionalProperties: false\n properties:\n phase:\n type: string\n enum: [queued, fetch_trust_evidence, fetch_release_evidence, download_package, verify_hashes, verify_signatures_ledger, fetch_capability_evidence, commit, enable, complete, failed, reconciling]\n artifact_role: { type: string, minLength: 1, maxLength: 256 }\n attempt: { type: integer, minimum: 1, maximum: 3 }\n progress: { $ref: \"#/components/schemas/ReleaseInstallProgress\" }\n cache_hit: { type: boolean }\n started_at: { type: string, format: date-time }\n completed_at: { type: string, format: date-time }\n duration_ms: { type: integer, minimum: 0, maximum: 300000 }\n ReleaseInstallOperation:\n type: object\n required: [request_id, operation_id, plugin_instance_id, request_sha256, status, phase, progress, attempt, retry_after_ms, mutation_outcome, activation, phase_diagnostics, created_at, updated_at]\n additionalProperties: false\n properties:\n request_id: { type: string, minLength: 1, maxLength: 256 }\n operation_id: { type: string, minLength: 1 }\n plugin_instance_id: { type: string, minLength: 1 }\n request_sha256: { type: string, pattern: \"^sha256:[0-9a-f]{64}$\" }\n status: { type: string, enum: [queued, running, reconciling, succeeded, failed] }\n phase: { type: string, minLength: 1, maxLength: 256 }\n progress: { $ref: \"#/components/schemas/ReleaseInstallProgress\" }\n attempt: { type: integer, minimum: 1, maximum: 3 }\n retry_after_ms: { type: integer, minimum: 0, maximum: 10000 }\n mutation_outcome: { $ref: \"#/components/schemas/MutationOutcome\" }\n failure: { $ref: \"#/components/schemas/ReleaseInstallFailure\" }\n plugin_record: { $ref: \"#/components/schemas/PluginRecord\" }\n activation: { $ref: \"#/components/schemas/ReleaseInstallActivation\" }\n phase_diagnostics:\n type: array\n maxItems: 64\n items: { $ref: \"#/components/schemas/ReleaseInstallPhaseDiagnostic\" }\n created_at: { type: string, format: date-time }\n updated_at: { type: string, format: date-time }\n terminal_at: { type: string, format: date-time }\n oneOf:\n - properties:\n status: { type: string, enum: [queued, running, reconciling] }\n not:\n anyOf:\n - required: [terminal_at]\n - required: [failure]\n - required: [plugin_record]\n - required: [status, terminal_at, plugin_record]\n properties:\n status: { const: succeeded }\n mutation_outcome: { const: committed }\n activation:\n allOf:\n - $ref: \"#/components/schemas/ReleaseInstallActivation\"\n - properties:\n status: { type: string, enum: [enabled, needs_attention, not_requested] }\n not:\n required: [failure]\n - required: [status, terminal_at, failure]\n properties:\n status: { const: failed }\n not:\n required: [plugin_record]\n ReleaseInstallOperationList:\n type: object\n required: [operations]\n additionalProperties: false\n properties:\n operations:\n type: array\n items: { $ref: \"#/components/schemas/ReleaseInstallOperation\" }\n UpdateReleaseRefRequest:\n type: object\n required: [plugin_instance_id, release_ref, expected_management_revision]\n additionalProperties: false\n properties:\n plugin_instance_id: { type: string, minLength: 1 }\n release_ref:\n $ref: \"#/components/schemas/PluginReleaseRef\"\n expected_management_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n DowngradeRequest:\n type: object\n required: [plugin_instance_id, expected_management_revision]\n additionalProperties: false\n properties:\n plugin_instance_id: { type: string, minLength: 1 }\n version: { $ref: \"#/components/schemas/StrictSemVer\" }\n package_hash: { type: string }\n expected_management_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n EnableRequest:\n type: object\n required: [plugin_instance_id, expected_management_revision]\n additionalProperties: false\n properties:\n plugin_instance_id: { type: string, minLength: 1 }\n expected_management_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n DisableRequest:\n type: object\n required: [plugin_instance_id, expected_management_revision]\n additionalProperties: false\n properties:\n plugin_instance_id: { type: string, minLength: 1 }\n reason: { type: string }\n expected_management_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n UninstallRequest:\n type: object\n required: [plugin_instance_id, delete_data, expected_management_revision]\n additionalProperties: false\n properties:\n plugin_instance_id: { type: string, minLength: 1 }\n delete_data: { type: boolean }\n expected_management_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n OpenSurfaceRequest:\n type: object\n required: [plugin_instance_id, surface_id, expected_management_revision]\n additionalProperties: false\n properties:\n plugin_instance_id: { type: string, minLength: 1 }\n surface_id: { type: string, minLength: 1 }\n surface_instance_id: { type: string }\n expected_management_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n RevokeSessionScopeRequest:\n type: object\n additionalProperties: false\n maxProperties: 0\n EmptyRequest:\n type: object\n additionalProperties: false\n maxProperties: 0\n EmptyQueryRequest:\n type: object\n additionalProperties: false\n maxProperties: 0\n ListIntentsQueryRequest:\n type: object\n additionalProperties: false\n properties:\n intent_id: { type: string, minLength: 1 }\n plugin_instance_id: { type: string, minLength: 1 }\n ListOperationsQueryRequest:\n type: object\n additionalProperties: false\n properties:\n plugin_instance_id: { type: string, minLength: 1 }\n cursor: { type: string, minLength: 1, maxLength: 1024 }\n limit: { type: integer, minimum: 1, maximum: 500 }\n ListRetainedDataQueryRequest:\n type: object\n additionalProperties: false\n properties:\n plugin_instance_id: { type: string, minLength: 1 }\n ListPermissionsQueryRequest:\n type: object\n additionalProperties: false\n properties:\n plugin_instance_id: { type: string, minLength: 1 }\n active_only: { type: boolean }\n PermissionRequirementsQueryRequest:\n type: object\n required: [plugin_instance_id]\n additionalProperties: false\n properties:\n plugin_instance_id: { type: string, minLength: 1 }\n ListDiagnosticsQueryRequest:\n type: object\n additionalProperties: false\n properties:\n plugin_id: { type: string, minLength: 1 }\n plugin_instance_id: { type: string, minLength: 1 }\n surface_instance_id: { type: string, minLength: 1 }\n type: { type: string, minLength: 1 }\n severity: { type: string, enum: [info, warning] }\n limit: { type: integer, minimum: 1, maximum: 1000 }\n SettingsQueryRequest:\n type: object\n additionalProperties: false\n required: [scope]\n properties:\n scope: { $ref: \"#/components/schemas/ResourceScopeKind\" }\n SurfaceBootstrap:\n type: object\n additionalProperties: false\n required:\n - plugin_id\n - plugin_instance_id\n - plugin_version\n - ui_protocol_version\n - surface_id\n - surface_instance_id\n - active_fingerprint\n - entry_path\n - entry_sha256\n - asset_session_nonce\n - management_revision\n - revoke_epoch\n - runtime_generation_id\n - asset_ticket\n - asset_ticket_id\n - bridge_nonce\n - issued_at\n - expires_at\n properties:\n plugin_id: { type: string, minLength: 1 }\n plugin_instance_id: { type: string, minLength: 1 }\n plugin_version: { $ref: \"#/components/schemas/StrictSemVer\" }\n ui_protocol_version: { type: string, enum: [plugin-ui-v7] }\n surface_id: { type: string, minLength: 1 }\n surface_instance_id: { type: string, minLength: 1 }\n active_fingerprint: { type: string, minLength: 1 }\n entry_path: { type: string, minLength: 1 }\n entry_sha256: { type: string, pattern: '^sha256:[0-9a-f]{64}$' }\n asset_session_nonce: { type: string, minLength: 16 }\n management_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n revoke_epoch: { type: integer, minimum: 1, maximum: 9007199254740991 }\n runtime_generation_id: { type: string, minLength: 1 }\n asset_ticket: { type: string, minLength: 1 }\n asset_ticket_id: { type: string, minLength: 1 }\n bridge_nonce: { type: string, minLength: 16 }\n issued_at: { type: string, format: date-time }\n expires_at: { type: string, format: date-time }\n PrepareSurfaceRequest:\n type: object\n required: [asset_ticket]\n additionalProperties: false\n properties:\n asset_ticket: { type: string, minLength: 1 }\n SurfacePreparation:\n type: object\n additionalProperties: false\n required:\n - asset_session\n - asset_session_id\n - asset_session_nonce\n - entry_path\n - entry_sha256\n - management_revision\n - revoke_epoch\n - issued_at\n - expires_at\n - document\n properties:\n asset_session: { type: string, minLength: 1 }\n asset_session_id: { type: string, minLength: 1 }\n asset_session_nonce: { type: string, minLength: 16 }\n entry_path: { type: string, minLength: 1 }\n entry_sha256: { type: string, pattern: '^sha256:[0-9a-f]{64}$' }\n management_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n revoke_epoch: { type: integer, minimum: 1, maximum: 9007199254740991 }\n issued_at: { type: string, format: date-time }\n expires_at: { type: string, format: date-time }\n document:\n $ref: \"../plugin/opaque-surface-document-v3.schema.json\"\n TrustedParentBridgeHandshake:\n type: object\n required: [type, plugin_id, surface_id, surface_instance_id, active_fingerprint, bridge_nonce, asset_session_nonce, management_revision, revoke_epoch, ui_protocol_version]\n additionalProperties: false\n properties:\n type: { const: redevplugin.bridge.handshake }\n plugin_id: { type: string, minLength: 1 }\n surface_id: { type: string, minLength: 1 }\n surface_instance_id: { type: string, minLength: 1 }\n active_fingerprint: { type: string, minLength: 1 }\n bridge_nonce: { type: string, minLength: 16 }\n asset_session_nonce: { type: string, minLength: 16 }\n management_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n revoke_epoch: { type: integer, minimum: 1, maximum: 9007199254740991 }\n ui_protocol_version: { type: string, enum: [plugin-ui-v7] }\n TrustedParentBridgeTokenRequest:\n type: object\n required: [handshake, bridge_channel_id, handshake_transcript_sha256]\n additionalProperties: false\n properties:\n handshake:\n $ref: \"#/components/schemas/TrustedParentBridgeHandshake\"\n bridge_channel_id: { type: string, minLength: 1 }\n handshake_transcript_sha256:\n type: string\n pattern: '^sha256:[0-9a-f]{64}$'\n previous_plugin_gateway_token:\n type: string\n minLength: 1\n description: Required only when renewing the current bridge channel lease.\n BridgeTokenResult:\n type: object\n additionalProperties: false\n required: [plugin_gateway_token, plugin_gateway_token_id, asset_session, asset_session_id, issued_at, expires_at]\n properties:\n plugin_gateway_token: { type: string, minLength: 1 }\n plugin_gateway_token_id: { type: string, minLength: 1 }\n asset_session: { type: string, minLength: 1 }\n asset_session_id: { type: string, minLength: 1 }\n issued_at: { type: string, format: date-time }\n expires_at: { type: string, format: date-time }\n ReadSurfaceAssetRequest:\n type: object\n additionalProperties: false\n required: [asset_session, asset_session_id, binding_id]\n properties:\n asset_session: { type: string, minLength: 1 }\n asset_session_id: { type: string, minLength: 1 }\n binding_id: { type: string, pattern: '^asset_[A-Za-z0-9_-]{8,128}$' }\n SurfaceAssetResult:\n type: object\n additionalProperties: false\n required: [path, sha256, content_type, content_base64]\n properties:\n path: { type: string, minLength: 1 }\n sha256: { type: string, pattern: '^sha256:[0-9a-f]{64}$' }\n content_type: { type: string, minLength: 1 }\n content_base64: { type: string, contentEncoding: base64 }\n ReadSurfaceStreamRequest:\n type: object\n additionalProperties: false\n required: [stream_id, stream_ticket, read_id]\n properties:\n stream_id: { type: string, minLength: 1 }\n stream_ticket: { type: string, minLength: 1 }\n read_id: { type: string, pattern: '^read_[A-Za-z0-9_-]{8,128}$' }\n AcknowledgeSurfaceStreamRequest:\n type: object\n additionalProperties: false\n required: [stream_id, stream_ticket, delivery_id]\n properties:\n stream_id: { type: string, minLength: 1 }\n stream_ticket: { type: string, minLength: 1 }\n delivery_id: { type: string, pattern: '^delivery_[A-Za-z0-9_-]{8,128}$' }\n SurfaceStreamResult:\n type: object\n additionalProperties: false\n required: [read_id, events, done]\n properties:\n delivery_id: { type: string, pattern: '^delivery_[A-Za-z0-9_-]{8,128}$' }\n read_id: { type: string, pattern: '^read_[A-Za-z0-9_-]{8,128}$' }\n events:\n type: array\n items:\n $ref: \"#/components/schemas/StreamEvent\"\n done: { type: boolean }\n terminal_status:\n enum: [closed, canceled, failed, orphaned_after_disable, orphaned_after_uninstall]\n allOf:\n - if:\n properties: { events: { minItems: 1 } }\n required: [events]\n then:\n required: [delivery_id]\n - if:\n properties: { done: { const: false } }\n required: [done]\n then:\n not:\n required: [terminal_status]\n - if:\n properties: { done: { const: true } }\n required: [done]\n then:\n required: [delivery_id, terminal_status]\n SurfaceStreamAcknowledgementResult:\n type: object\n required: [acknowledged]\n additionalProperties: false\n properties:\n acknowledged: { const: true }\n CancelSurfaceOperationRequest:\n type: object\n additionalProperties: false\n required: [operation_id, bridge_channel_id]\n properties:\n operation_id: { type: string, pattern: '^operation_[A-Za-z0-9_-]{8,150}$' }\n bridge_channel_id: { type: string, minLength: 1, maxLength: 256 }\n reason: { type: string, maxLength: 256 }\n GetSurfaceOperationRequest:\n type: object\n additionalProperties: false\n required: [operation_id, bridge_channel_id]\n properties:\n operation_id: { type: string, pattern: '^operation_[A-Za-z0-9_-]{8,150}$' }\n bridge_channel_id: { type: string, minLength: 1, maxLength: 256 }\n PluginOperationSnapshot:\n oneOf:\n - type: object\n additionalProperties: false\n required: [operation_id, status, cancelable, created_at, updated_at, retry_after_ms]\n properties:\n operation_id: { type: string, pattern: '^operation_[A-Za-z0-9_-]{8,150}$' }\n status: { type: string, enum: [running, cancel_requested] }\n cancelable: { type: boolean }\n created_at: { type: string, format: date-time }\n updated_at: { type: string, format: date-time }\n retry_after_ms: { type: integer, minimum: 500, maximum: 10000 }\n progress: { $ref: \"#/components/schemas/OperationProgress\" }\n - type: object\n additionalProperties: false\n required: [operation_id, status, cancelable, created_at, updated_at, retry_after_ms, terminal_at]\n properties:\n operation_id: { type: string, pattern: '^operation_[A-Za-z0-9_-]{8,150}$' }\n status: { type: string, enum: [completed, canceled, orphaned_after_disable, orphaned_after_uninstall] }\n cancelable: { type: boolean }\n created_at: { type: string, format: date-time }\n updated_at: { type: string, format: date-time }\n retry_after_ms: { type: integer, minimum: 500, maximum: 10000 }\n terminal_at: { type: string, format: date-time }\n progress: { $ref: \"#/components/schemas/OperationProgress\" }\n - type: object\n additionalProperties: false\n required: [operation_id, status, cancelable, created_at, updated_at, retry_after_ms, terminal_at, failure_code]\n properties:\n operation_id: { type: string, pattern: '^operation_[A-Za-z0-9_-]{8,150}$' }\n status: { const: failed }\n cancelable: { type: boolean }\n created_at: { type: string, format: date-time }\n updated_at: { type: string, format: date-time }\n retry_after_ms: { type: integer, minimum: 500, maximum: 10000 }\n terminal_at: { type: string, format: date-time }\n failure_code: { type: string, enum: [adapter_failed, contract_invalid, platform_failed, quota_exceeded, runtime_failed] }\n progress: { $ref: \"#/components/schemas/OperationProgress\" }\n OperationProgress:\n type: object\n additionalProperties: false\n required: [revision, phase]\n properties:\n revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n phase: { type: string, pattern: '^[A-Za-z0-9._:-]{1,128}$' }\n completed_units: { type: integer, minimum: 0, maximum: 9007199254740991 }\n total_units: { type: integer, minimum: 0, maximum: 9007199254740991 }\n unit: { type: string, pattern: '^[A-Za-z0-9._:-]{1,64}$' }\n allOf:\n - if:\n required: [completed_units]\n then:\n required: [total_units]\n - if:\n required: [total_units]\n then:\n required: [completed_units]\n RejectSurfaceConfirmationRequest:\n type: object\n additionalProperties: false\n required: [plugin_instance_id, bridge_channel_id, plugin_gateway_token, confirmation_id]\n properties:\n plugin_instance_id: { type: string, minLength: 1 }\n bridge_channel_id: { type: string, minLength: 1, maxLength: 256 }\n plugin_gateway_token: { type: string, minLength: 1 }\n confirmation_id: { type: string, pattern: '^confirmation_[A-Za-z0-9_-]{8,128}$' }\n ConfirmationRejectionResult:\n type: object\n additionalProperties: false\n required: [rejected]\n properties:\n rejected: { const: true }\n StreamEvent:\n type: object\n additionalProperties: false\n required: [stream_id, sequence, kind, at]\n properties:\n stream_id: { type: string, minLength: 1 }\n sequence: { type: integer, minimum: 0 }\n kind: { type: string, minLength: 1 }\n data: { type: string, contentEncoding: base64 }\n error: { type: string }\n at: { type: string, format: date-time }\n DisposeSurfaceRequest:\n type: object\n additionalProperties: false\n required: [bridge_nonce]\n properties:\n bridge_nonce: { type: string, minLength: 16 }\n RPCRequest:\n type: object\n required: [plugin_instance_id, surface_instance_id, bridge_channel_id, plugin_gateway_token, method]\n additionalProperties: false\n properties:\n plugin_instance_id: { type: string, minLength: 1 }\n surface_instance_id: { type: string, minLength: 1 }\n bridge_channel_id: { type: string, minLength: 1 }\n plugin_gateway_token: { type: string, minLength: 1 }\n confirmation_id: { type: string }\n method: { type: string, minLength: 1 }\n params:\n type: object\n additionalProperties: true\n PrepareMethodConfirmationRequest:\n type: object\n required: [plugin_instance_id, surface_instance_id, bridge_channel_id, plugin_gateway_token, method]\n additionalProperties: false\n properties:\n plugin_instance_id: { type: string, minLength: 1 }\n surface_instance_id: { type: string, minLength: 1 }\n bridge_channel_id: { type: string, minLength: 1 }\n plugin_gateway_token: { type: string, minLength: 1 }\n method: { type: string, minLength: 1 }\n params:\n type: object\n additionalProperties: true\n RPCResult:\n oneOf:\n - type: object\n additionalProperties: false\n properties:\n data: true\n not:\n anyOf:\n - required: [operation_id]\n - required: [stream_id]\n - required: [confirmation_required]\n - type: object\n additionalProperties: false\n required: [operation_id]\n properties:\n data: true\n operation_id: { type: string, minLength: 1 }\n - type: object\n additionalProperties: false\n required: [operation_id, stream_id, stream_ticket, stream_ticket_id, stream_expires_at]\n properties:\n data: true\n operation_id: { type: string, minLength: 1 }\n stream_id: { type: string, minLength: 1 }\n stream_ticket: { type: string, minLength: 1 }\n stream_ticket_id: { type: string, minLength: 1 }\n stream_expires_at: { type: string, format: date-time }\n - type: object\n additionalProperties: false\n required: [confirmation_required, confirmation_token_id, request_hash, plan_hash]\n properties:\n confirmation_required: { const: true }\n confirmation_token_id: { type: string, minLength: 1 }\n request_hash: { type: string, pattern: '^sha256:[0-9a-f]{64}$' }\n plan_hash: { type: string, pattern: '^sha256:[0-9a-f]{64}$' }\n RiskFlag:\n type: object\n required: [id, severity, summary]\n additionalProperties: false\n properties:\n id:\n type: string\n minLength: 1\n description: Stable machine-readable risk identifier.\n severity:\n type: string\n enum: [info, low, medium, high, critical]\n summary: { type: string, minLength: 1 }\n description: { type: string }\n requires_confirmation: { type: boolean }\n requires_admin: { type: boolean }\n data_loss_risk: { type: boolean }\n destructive: { type: boolean }\n RiskPlan:\n type: object\n required: [schema_version, summary, risk_flags]\n additionalProperties: false\n properties:\n schema_version: { const: redevplugin.capability.risk_plan.v1 }\n capability_id: { type: string }\n binding_id: { type: string }\n method: { type: string }\n target_method: { type: string }\n action: { type: string }\n effect:\n type: string\n enum: [read, write, execute, delete, admin]\n resource_ref: { type: string }\n resource_display_name: { type: string }\n summary: { type: string, minLength: 1 }\n risk_flags:\n type: array\n items:\n $ref: \"#/components/schemas/RiskFlag\"\n requires_confirmation: { type: boolean }\n requires_admin: { type: boolean }\n data_loss_risk: { type: boolean }\n destructive: { type: boolean }\n deny_reason: { type: string }\n details:\n type: object\n additionalProperties: true\n PluginMethodConfirmationPreparation:\n type: object\n required: [confirmation_id, confirmation_token_id, request_hash, plan_hash, expires_at]\n additionalProperties: false\n properties:\n confirmation_id: { type: string, minLength: 1 }\n confirmation_token_id:\n type: string\n minLength: 1\n description: Opaque audit/display id for the server-held confirmation token. It is not a credential.\n request_hash:\n type: string\n pattern: \"^sha256:[0-9a-f]{64}$\"\n plan_hash:\n type: string\n pattern: \"^sha256:[0-9a-f]{64}$\"\n plan:\n description: Host-redacted confirmation plan payload returned by the declared preflight method, when available.\n oneOf:\n - $ref: \"#/components/schemas/RiskPlan\"\n - type: object\n additionalProperties: true\n properties:\n schema_version:\n not:\n type: string\n pattern: '^redevplugin\\.capability\\.risk_plan\\.'\n expires_at: { type: string, format: date-time }\n InvokeIntentRequest:\n type: object\n required: [intent_id]\n additionalProperties: false\n properties:\n plugin_instance_id: { type: string }\n intent_id: { type: string, minLength: 1 }\n params:\n type: object\n additionalProperties: true\n CancelOperationRequest:\n type: object\n additionalProperties: false\n properties:\n reason: { type: string }\n CapabilityContractPin:\n $ref: \"../plugin/host-capability-pin-v1.schema.json\"\n PublicOperationBinding:\n type: object\n description: Public immutable execution evidence embedded into operation responses. Session and bridge channel ownership fields are excluded.\n required:\n - invocation_id\n - audit_correlation_id\n - publisher_id\n - plugin_id\n - plugin_instance_id\n - plugin_version\n - active_fingerprint\n - route_kind\n - capability_id\n - capability_version\n - binding_id\n - method\n - target_method\n - effect\n - execution\n - permissions\n - confirmation\n - revision\n - quota\n - target\n - target_descriptor_sha256\n properties:\n invocation_id: { type: string, minLength: 1 }\n audit_correlation_id: { type: string, minLength: 1 }\n operation_id: { type: string, minLength: 1 }\n stream_id: { type: string, minLength: 1 }\n publisher_id: { type: string, minLength: 1 }\n plugin_id: { type: string, minLength: 1 }\n plugin_instance_id: { type: string, minLength: 1 }\n plugin_version: { $ref: \"#/components/schemas/StrictSemVer\" }\n active_fingerprint: { type: string, minLength: 1 }\n surface_instance_id: { type: string }\n route_kind: { type: string, enum: [capability, worker, core_action] }\n capability_id: { type: string, minLength: 1 }\n capability_version: { $ref: \"#/components/schemas/StrictSemVer\" }\n binding_id: { type: string, minLength: 1 }\n contract:\n $ref: \"#/components/schemas/CapabilityContractPin\"\n method: { type: string, minLength: 1 }\n target_method: { type: string, minLength: 1 }\n effect: { type: string, enum: [read, write, execute, delete, admin] }\n execution: { type: string, enum: [sync, operation, subscription] }\n permissions:\n type: object\n additionalProperties: false\n required: [required, granted]\n properties:\n required: { type: array, items: { type: string } }\n granted: { type: array, items: { type: string } }\n confirmation:\n type: object\n additionalProperties: false\n required: [required, confirmed]\n properties:\n required: { type: boolean }\n confirmed: { type: boolean }\n confirmation_id: { type: string }\n request_sha256: { type: string }\n plan_sha256: { type: string }\n target_sha256: { type: string }\n revision:\n type: object\n additionalProperties: false\n required: [policy_revision, management_revision, revoke_epoch]\n properties:\n policy_revision: { type: integer, minimum: 0, maximum: 9007199254740991 }\n management_revision: { type: integer, minimum: 0, maximum: 9007199254740991 }\n revoke_epoch: { type: integer, minimum: 0, maximum: 9007199254740991 }\n quota:\n type: object\n additionalProperties: false\n properties:\n max_concurrent: { type: integer, minimum: 0, maximum: 9007199254740991 }\n max_duration_ms: { type: integer, minimum: 0, maximum: 9007199254740991 }\n max_stream_bytes: { type: integer, minimum: 0, maximum: 9007199254740991 }\n expires_at: { type: string, format: date-time }\n target:\n type: object\n additionalProperties: false\n required: [kind, fields]\n properties:\n kind: { type: string, minLength: 1 }\n fields: { type: object, additionalProperties: true }\n target_descriptor_sha256: { type: string, pattern: '^sha256:[0-9a-f]{64}$' }\n stream_event_type_name: { type: string, minLength: 1 }\n stream_event_schema_sha256: { type: string, pattern: '^[0-9a-f]{64}$' }\n oneOf:\n - required: [route_kind, contract]\n properties:\n route_kind: { const: capability }\n - required: [route_kind]\n properties:\n route_kind: { const: worker }\n not:\n required: [contract]\n - required: [route_kind]\n properties:\n route_kind: { const: core_action }\n not:\n required: [contract]\n OperationRecord:\n allOf:\n - $ref: \"#/components/schemas/PublicOperationBinding\"\n - type: object\n required:\n - operation_id\n - cancelable\n - created_at\n - updated_at\n properties:\n operation_id: { type: string, minLength: 1 }\n execution: { type: string, enum: [operation, subscription] }\n cancelable: { type: boolean }\n cancel_ack_timeout_ms: { type: integer, minimum: 0 }\n disable_behavior: { type: string, enum: [cancel, orphan, wait] }\n uninstall_behavior: { type: string, enum: [cancel_then_block_delete, force_cleanup_allowed] }\n created_at: { type: string, format: date-time }\n updated_at: { type: string, format: date-time }\n cancel_requested_at: { type: string, format: date-time }\n orphaned_at: { type: string, format: date-time }\n terminal_at: { type: string, format: date-time }\n progress: { $ref: \"#/components/schemas/OperationProgress\" }\n oneOf:\n - type: object\n required: [status, failure_code, reason]\n properties:\n status: { const: failed }\n failure_code: { $ref: \"#/components/schemas/ExecutionFailureCode\" }\n reason: { const: \"execution failed\" }\n - type: object\n required: [status]\n properties:\n status:\n enum: [running, cancel_requested, canceled, completed, orphaned_after_disable, orphaned_after_uninstall]\n reason: { type: string }\n not:\n required: [failure_code]\n unevaluatedProperties: false\n ExecutionFailureCode:\n type: string\n enum: [adapter_failed, contract_invalid, platform_failed, quota_exceeded, runtime_failed]\n StartRuntimeRequest:\n type: object\n required: [target]\n additionalProperties: false\n properties:\n target: { $ref: \"#/components/schemas/RuntimeTarget\" }\n ExportDataRequest:\n type: object\n required: [plugin_instance_id]\n additionalProperties: false\n properties:\n plugin_instance_id: { type: string, minLength: 1 }\n DeleteDataExportRequest:\n type: object\n required: [plugin_instance_id, bundle_ref]\n additionalProperties: false\n properties:\n plugin_instance_id: { type: string, minLength: 1 }\n bundle_ref: { type: string, minLength: 1 }\n ImportDataRequest:\n type: object\n required: [plugin_instance_id, bundle_ref, expected_management_revision]\n additionalProperties: false\n properties:\n plugin_instance_id: { type: string, minLength: 1 }\n bundle_ref: { type: string, minLength: 1 }\n expected_management_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n PluginDataBinding:\n type: object\n required: [plugin_instance_id, generation_id, state, revision, shape_hash]\n additionalProperties: false\n properties:\n plugin_instance_id: { type: string, minLength: 1 }\n generation_id: { type: string, minLength: 1 }\n state: { type: string, enum: [active, retained] }\n revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n shape_hash: { type: string, pattern: \"^[0-9a-f]{64}$\" }\n retained_at: { type: string, format: date-time }\n expires_at: { type: string, format: date-time }\n RetainedDataList:\n type: object\n required: [retained_data]\n additionalProperties: false\n properties:\n retained_data:\n type: array\n items:\n $ref: \"#/components/schemas/PluginDataBinding\"\n RetainedDataCleanupResult:\n type: object\n required: [deleted]\n additionalProperties: false\n properties:\n deleted:\n type: array\n items:\n $ref: \"#/components/schemas/PluginDataBinding\"\n DeleteRetainedDataRequest:\n type: object\n required: [plugin_instance_id, expected_binding_revision]\n additionalProperties: false\n properties:\n plugin_instance_id: { type: string, minLength: 1 }\n expected_binding_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n BindRetainedDataRequest:\n type: object\n required: [source_plugin_instance_id, expected_source_binding_revision, target_plugin_instance_id, target_expected_management_revision]\n additionalProperties: false\n properties:\n source_plugin_instance_id: { type: string, minLength: 1 }\n expected_source_binding_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n target_plugin_instance_id: { type: string, minLength: 1 }\n target_expected_management_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n CleanupExpiredRetainedDataRequest:\n type: object\n additionalProperties: false\n GrantPermissionRequest:\n type: object\n required: [plugin_instance_id, permission_id, expected_policy_revision, expected_management_revision, expected_revoke_epoch]\n additionalProperties: false\n properties:\n plugin_instance_id: { type: string, minLength: 1 }\n permission_id: { type: string, minLength: 1 }\n expected_policy_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n expected_management_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n expected_revoke_epoch: { type: integer, minimum: 0, maximum: 9007199254740991 }\n expires_at: { type: string, format: date-time }\n RevokePermissionRequest:\n type: object\n required: [plugin_instance_id, permission_id, expected_policy_revision, expected_management_revision, expected_revoke_epoch]\n additionalProperties: false\n properties:\n plugin_instance_id: { type: string, minLength: 1 }\n permission_id: { type: string, minLength: 1 }\n expected_policy_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n expected_management_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n expected_revoke_epoch: { type: integer, minimum: 0, maximum: 9007199254740991 }\n reason: { type: string }\n PutSecurityPolicyRequest:\n type: object\n required: [expected_policy_revision, expected_management_revision, expected_revoke_epoch, allowed_permissions, denied_methods]\n additionalProperties: false\n properties:\n expected_policy_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n expected_management_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n expected_revoke_epoch: { type: integer, minimum: 0, maximum: 9007199254740991 }\n allowed_permissions:\n type: array\n uniqueItems: true\n items: { type: string, minLength: 1 }\n denied_methods:\n type: array\n uniqueItems: true\n items: { type: string, minLength: 1 }\n DeleteSecurityPolicyRequest:\n type: object\n required: [expected_policy_revision, expected_management_revision, expected_revoke_epoch]\n additionalProperties: false\n properties:\n expected_policy_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n expected_management_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n expected_revoke_epoch: { type: integer, minimum: 0, maximum: 9007199254740991 }\n SecretRefRequest:\n type: object\n required: [plugin_instance_id, secret_ref, scope]\n additionalProperties: false\n properties:\n plugin_instance_id: { type: string, minLength: 1 }\n secret_ref: { type: string, minLength: 1 }\n scope: { type: string, enum: [user, environment] }\n ResourceScopeKind:\n type: string\n enum: [user, environment]\n PatchSettingsRequest:\n type: object\n required: [scope, expected_values_revision]\n additionalProperties: false\n minProperties: 3\n properties:\n scope: { $ref: \"#/components/schemas/ResourceScopeKind\" }\n expected_values_revision: { type: integer, minimum: 1, maximum: 9007199254740991 }\n set:\n type: object\n minProperties: 1\n additionalProperties: true\n remove:\n type: array\n minItems: 1\n uniqueItems: true\n items: { type: string, minLength: 1 }\n".as_bytes();
218static CONTRACT_BODY_PRESENTATION_ICON_EVIDENCE_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/presentation-icon-evidence-v1.schema.json\",\n \"title\": \"ReDevPlugin verified presentation icon evidence v1\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"schema_version\", \"path\", \"media_type\", \"width\", \"height\", \"sha256\", \"size\"],\n \"properties\": {\n \"schema_version\": { \"const\": \"redevplugin.presentation_icon_evidence.v1\" },\n \"path\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"pattern\": \"^[A-Za-z0-9_][A-Za-z0-9_.-]*(?:/[A-Za-z0-9_][A-Za-z0-9_.-]*)*\\\\.(?:[Pp][Nn][Gg]|[Ww][Ee][Bb][Pp])$\"\n },\n \"media_type\": { \"enum\": [\"image/png\", \"image/webp\"] },\n \"width\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 512 },\n \"height\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 512 },\n \"sha256\": { \"type\": \"string\", \"pattern\": \"^sha256:[0-9a-f]{64}$\" },\n \"size\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 524288 }\n }\n}\n".as_bytes();
219static CONTRACT_BODY_PRESENTATION_LOCALE_FIXTURE: &[u8] = "{\n \"schema_version\": \"redevplugin.presentation_locale_fixtures.v1\",\n \"default_locale\": \"ja-JP\",\n \"available_locales\": [\"ja-JP\", \"fr\", \"fr-FR\", \"zh-Hant\"],\n \"cases\": [\n {\"requested_locale\": \"fr-FR\", \"resolved_locale\": \"fr-FR\"},\n {\"requested_locale\": \"fr-CA\", \"resolved_locale\": \"fr\"},\n {\"requested_locale\": \"fr-FR-u-ca-gregory\", \"resolved_locale\": \"fr-FR\"},\n {\"requested_locale\": \"zh-Hant-HK\", \"resolved_locale\": \"zh-Hant\"},\n {\"requested_locale\": \"de-DE\", \"resolved_locale\": \"ja-JP\"},\n {\"requested_locale\": \"und\", \"resolved_locale\": \"ja-JP\"},\n {\"requested_locale\": \"not_a_locale\", \"resolved_locale\": \"ja-JP\"},\n {\"requested_locale\": \"\", \"resolved_locale\": \"ja-JP\"}\n ]\n}\n".as_bytes();
220static CONTRACT_BODY_PROCESS_CONTAINMENT_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/process-containment-v1.schema.json\",\n \"title\": \"ReDevPlugin runtime process containment evidence v1\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"schema_version\", \"profile\", \"seccomp_policy_sha256\", \"no_new_privs\", \"seccomp_tsync\", \"process_creation_denied\", \"reexec_denied\", \"active\"],\n \"properties\": {\n \"schema_version\": {\"const\": \"redevplugin.process_containment.v1\"},\n \"profile\": {\"const\": \"linux-runtime-v1\"},\n \"seccomp_policy_sha256\": {\"type\": \"string\", \"pattern\": \"^[0-9a-f]{64}$\"},\n \"no_new_privs\": {\"const\": true},\n \"seccomp_tsync\": {\"const\": true},\n \"process_creation_denied\": {\"const\": true},\n \"reexec_denied\": {\"const\": true},\n \"active\": {\"const\": true}\n }\n}\n".as_bytes();
221static CONTRACT_BODY_PUBLISHER_RELEASE_REF_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/publisher-release-ref-v1.schema.json\",\n \"title\": \"ReDevPlugin publisher release reference v1\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"schema_version\", \"release_ref\", \"root\", \"signing_ledger\", \"files\"],\n \"properties\": {\n \"schema_version\": { \"const\": \"redevplugin.publisher_release_ref.v1\" },\n \"release_ref\": { \"$ref\": \"#/$defs/release_ref\" },\n \"root\": { \"$ref\": \"#/$defs/public_key\" },\n \"signing_ledger\": { \"$ref\": \"#/$defs/signing_ledger\" },\n \"files\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"maxItems\": 4096,\n \"items\": { \"$ref\": \"#/$defs/published_file\" }\n }\n },\n \"$defs\": {\n \"id\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 128,\n \"pattern\": \"^[a-z][a-z0-9._-]*$\"\n },\n \"semver\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)(?:-(?:(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*)(?:\\\\.(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*))*))?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"sha256\": { \"type\": \"string\", \"pattern\": \"^[a-f0-9]{64}$\" },\n \"package_sha256\": { \"type\": \"string\", \"pattern\": \"^sha256:[a-f0-9]{64}$\" },\n \"locator\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 1024,\n \"pattern\": \"^[A-Za-z0-9._/@+-]+$\",\n \"not\": {\n \"anyOf\": [\n { \"pattern\": \"^/\" },\n { \"pattern\": \"(^|/)\\\\.\\\\.(/|$)\" },\n { \"pattern\": \"\\\\\\\\\" },\n { \"pattern\": \"[?#]\" }\n ]\n }\n },\n \"asset_name\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 255,\n \"pattern\": \"^[A-Za-z0-9._+-]+$\",\n \"not\": { \"enum\": [\".\", \"..\"] }\n },\n \"public_key_value\": { \"type\": \"string\", \"pattern\": \"^[A-Za-z0-9+/]{43}=$\" },\n \"public_key\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"algorithm\", \"key_id\", \"public_key\"],\n \"properties\": {\n \"algorithm\": { \"const\": \"ed25519\" },\n \"key_id\": { \"$ref\": \"#/$defs/id\" },\n \"public_key\": { \"$ref\": \"#/$defs/public_key_value\" }\n }\n },\n \"signing_ledger\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"log_id\", \"algorithm\", \"key_id\", \"public_key\"],\n \"properties\": {\n \"log_id\": { \"$ref\": \"#/$defs/id\" },\n \"algorithm\": { \"const\": \"ed25519\" },\n \"key_id\": { \"$ref\": \"#/$defs/id\" },\n \"public_key\": { \"$ref\": \"#/$defs/public_key_value\" }\n }\n },\n \"hash_set\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"package_sha256\", \"manifest_sha256\", \"entries_sha256\"],\n \"properties\": {\n \"package_sha256\": { \"$ref\": \"#/$defs/package_sha256\" },\n \"manifest_sha256\": { \"$ref\": \"#/$defs/package_sha256\" },\n \"entries_sha256\": { \"$ref\": \"#/$defs/package_sha256\" }\n }\n },\n \"release_ref\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"source_id\",\n \"channel\",\n \"release_metadata_ref\",\n \"release_metadata_sha256\",\n \"publisher_id\",\n \"plugin_id\",\n \"version\",\n \"expected_hashes\"\n ],\n \"properties\": {\n \"source_id\": { \"$ref\": \"#/$defs/id\" },\n \"channel\": { \"$ref\": \"#/$defs/id\" },\n \"release_metadata_ref\": { \"$ref\": \"#/$defs/locator\" },\n \"release_metadata_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"publisher_id\": { \"$ref\": \"#/$defs/id\" },\n \"plugin_id\": { \"$ref\": \"#/$defs/id\" },\n \"version\": { \"$ref\": \"#/$defs/semver\" },\n \"expected_hashes\": { \"$ref\": \"#/$defs/hash_set\" }\n }\n },\n \"published_file\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"locator\", \"asset_name\", \"sha256\", \"size\"],\n \"properties\": {\n \"locator\": { \"$ref\": \"#/$defs/locator\" },\n \"asset_name\": { \"$ref\": \"#/$defs/asset_name\" },\n \"sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"size\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 1073741824 }\n }\n }\n }\n}\n".as_bytes();
222static CONTRACT_BODY_QUARANTINE_CLEANUP_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/quarantine-cleanup-v1.schema.json\",\n \"title\": \"ReDevPlugin quarantine cleanup journal v1\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"schema_version\",\n \"migration_id\",\n \"root_identity_sha256\",\n \"quarantine_id\",\n \"quarantine_sha256\",\n \"state\",\n \"entries\"\n ],\n \"properties\": {\n \"schema_version\": { \"const\": \"quarantine-cleanup-v1\" },\n \"migration_id\": { \"type\": \"string\", \"pattern\": \"^migration_[0-9a-f]{32}$\" },\n \"root_identity_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"quarantine_id\": { \"type\": \"string\", \"pattern\": \"^quarantine_[0-9a-f]{32}$\" },\n \"quarantine_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"state\": { \"enum\": [\"delete_prepared\", \"deleting\", \"delete_reconcile_required\", \"deleted\"] },\n \"entries\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"maxItems\": 200000,\n \"items\": { \"$ref\": \"#/$defs/entry\" }\n }\n },\n \"$defs\": {\n \"sha256\": { \"type\": \"string\", \"pattern\": \"^[0-9a-f]{64}$\" },\n \"entry\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"path\", \"kind\", \"device\", \"inode\", \"uid\", \"mode\", \"size\", \"nlink\", \"sha256\"],\n \"properties\": {\n \"path\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 4096,\n \"pattern\": \"^[^/\\\\\\\\]+(?:/[^/\\\\\\\\]+)*$\",\n \"not\": { \"pattern\": \"(^|/)\\\\.\\\\.?($|/)\" }\n },\n \"kind\": { \"enum\": [\"directory\", \"file\"] },\n \"device\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 18446744073709551615 },\n \"inode\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 18446744073709551615 },\n \"uid\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 4294967295 },\n \"mode\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 4095 },\n \"size\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 4294967296 },\n \"nlink\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 1 },\n \"sha256\": { \"type\": \"string\", \"pattern\": \"^$|^[0-9a-f]{64}$\" }\n }\n }\n }\n}\n".as_bytes();
223static CONTRACT_BODY_RELEASE_METADATA_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/release-metadata-v8.schema.json\",\n \"title\": \"ReDevPlugin signed plugin release metadata v8\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"schema_version\",\n \"source_id\",\n \"release_metadata_ref\",\n \"publisher_id\",\n \"plugin_id\",\n \"version\",\n \"distribution_ref\",\n \"hashes\",\n \"release_metadata_signature\",\n \"package_signature\",\n \"compatibility\"\n ],\n \"properties\": {\n \"schema_version\": { \"const\": \"redevplugin.release_metadata.v8\" },\n \"source_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"release_metadata_ref\": { \"$ref\": \"#/$defs/artifact_ref\" },\n \"publisher_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"plugin_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"version\": { \"$ref\": \"#/$defs/semver\" },\n \"distribution_ref\": { \"$ref\": \"#/$defs/distribution_ref\" },\n \"hashes\": { \"$ref\": \"#/$defs/package_hash_set\" },\n \"release_metadata_signature\": { \"$ref\": \"#/$defs/release_metadata_signature\" },\n \"package_signature\": { \"$ref\": \"#/$defs/package_release_signature\" },\n \"compatibility\": { \"$ref\": \"#/$defs/release_compatibility\" },\n \"host_requirements\": {\n \"type\": \"array\",\n \"items\": { \"$ref\": \"#/$defs/host_requirement\" }\n },\n \"release_evidence\": { \"$ref\": \"#/$defs/release_evidence\" },\n \"metadata\": {\n \"type\": \"object\",\n \"additionalProperties\": { \"type\": \"string\" }\n }\n },\n \"$defs\": {\n \"semver\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)(?:-(?:(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*)(?:\\\\.(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*))*))?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"artifact_ref\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"pattern\": \"^[A-Za-z0-9._/@+-]+$\",\n \"not\": {\n \"anyOf\": [\n { \"pattern\": \"^/\" },\n { \"pattern\": \"(^|/)\\\\.\\\\.(/|$)\" },\n { \"pattern\": \"\\\\\\\\\" },\n { \"pattern\": \"[?#]\" }\n ]\n }\n },\n \"sha256\": {\n \"type\": \"string\",\n \"pattern\": \"^(sha256:)?[a-f0-9]{64}$\"\n },\n \"distribution_ref\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"distribution\", \"artifact_ref\"],\n \"properties\": {\n \"distribution\": { \"enum\": [\"registry_ref\", \"host_artifact_ref\"] },\n \"artifact_ref\": { \"$ref\": \"#/$defs/artifact_ref\" }\n }\n },\n \"package_hash_set\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"package_sha256\", \"manifest_sha256\", \"entries_sha256\"],\n \"properties\": {\n \"package_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"manifest_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"entries_sha256\": { \"$ref\": \"#/$defs/sha256\" }\n }\n },\n \"release_metadata_signature\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"algorithm\", \"key_id\", \"signature_ref\", \"source_policy_epoch\", \"revocation_epoch\"],\n \"properties\": {\n \"algorithm\": { \"enum\": [\"ed25519\"] },\n \"key_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"signature_ref\": { \"$ref\": \"#/$defs/artifact_ref\" },\n \"source_policy_epoch\": { \"$ref\": \"#/$defs/decimal_epoch\" },\n \"revocation_epoch\": { \"$ref\": \"#/$defs/decimal_epoch\" }\n }\n },\n \"package_release_signature\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"algorithm\", \"key_id\", \"signature_bundle_ref\", \"source_policy_epoch\", \"revocation_epoch\"],\n \"properties\": {\n \"algorithm\": { \"enum\": [\"ed25519\"] },\n \"key_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"signature_bundle_ref\": { \"$ref\": \"#/$defs/artifact_ref\" },\n \"source_policy_epoch\": { \"$ref\": \"#/$defs/decimal_epoch\" },\n \"revocation_epoch\": { \"$ref\": \"#/$defs/decimal_epoch\" }\n }\n },\n \"release_compatibility\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"min_redevplugin_version\", \"min_runtime_version\", \"ui_protocol_version\"],\n \"properties\": {\n \"min_redevplugin_version\": { \"$ref\": \"#/$defs/semver\" },\n \"min_runtime_version\": { \"$ref\": \"#/$defs/semver\" },\n \"ui_protocol_version\": { \"const\": \"plugin-ui-v7\" },\n \"supported_targets\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": { \"enum\": [\"darwin/amd64\", \"darwin/arm64\", \"linux/amd64\", \"linux/arm64\"] }\n }\n }\n },\n \"host_requirement\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"host_id\"],\n \"properties\": {\n \"host_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"min_host_version\": { \"$ref\": \"#/$defs/semver\" },\n \"required_capability_contracts\": {\n \"type\": \"array\",\n \"items\": { \"$ref\": \"#/$defs/host_capability_requirement\" }\n }\n }\n },\n \"host_capability_requirement\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"capability_id\",\n \"capability_version\",\n \"contract\"\n ],\n \"properties\": {\n \"capability_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"capability_version\": { \"$ref\": \"#/$defs/semver\" },\n \"contract\": { \"$ref\": \"#/$defs/host_capability_contract_ref\" }\n }\n },\n \"host_capability_contract_ref\": {\n \"$ref\": \"host-capability-pin-v1.schema.json\"\n },\n \"release_evidence\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"properties\": {\n \"notices_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"provenance_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"generated_at\": { \"type\": \"string\", \"format\": \"date-time\" }\n }\n },\n \"decimal_epoch\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)$\"\n }\n }\n}\n".as_bytes();
224static CONTRACT_BODY_RELEASE_PUBLISHER_CONFIG_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/release-publisher-config-v1.schema.json\",\n \"title\": \"ReDevPlugin release publisher config v1\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"schema_version\",\n \"source_id\",\n \"channel\",\n \"source_type\",\n \"source_class\",\n \"generated_at\",\n \"expires_at\",\n \"root\",\n \"signing\",\n \"signing_ledger\",\n \"allowed_artifact_hosts\",\n \"min_redevplugin_version\",\n \"distribution\",\n \"host_requirements\"\n ],\n \"properties\": {\n \"schema_version\": { \"const\": \"redevplugin.release_publisher_config.v1\" },\n \"source_id\": { \"$ref\": \"#/$defs/id\" },\n \"channel\": { \"$ref\": \"#/$defs/id\" },\n \"source_type\": { \"enum\": [\"registry\", \"host_artifact\"] },\n \"source_class\": { \"enum\": [\"official\", \"curated\", \"community\", \"private\"] },\n \"generated_at\": { \"$ref\": \"#/$defs/canonical_time\" },\n \"expires_at\": { \"$ref\": \"#/$defs/canonical_time\" },\n \"root\": { \"$ref\": \"#/$defs/public_key\" },\n \"signing\": { \"$ref\": \"#/$defs/public_key\" },\n \"signing_ledger\": { \"$ref\": \"#/$defs/signing_ledger\" },\n \"allowed_artifact_hosts\": {\n \"type\": \"array\",\n \"maxItems\": 1024,\n \"uniqueItems\": true,\n \"items\": { \"$ref\": \"#/$defs/host\" }\n },\n \"min_redevplugin_version\": { \"$ref\": \"#/$defs/semver\" },\n \"distribution\": { \"enum\": [\"registry_ref\", \"host_artifact_ref\"] },\n \"host_requirements\": {\n \"type\": \"array\",\n \"maxItems\": 128,\n \"items\": { \"$ref\": \"#/$defs/host_requirement\" }\n }\n },\n \"$defs\": {\n \"id\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 128,\n \"pattern\": \"^[a-z][a-z0-9._-]*$\"\n },\n \"canonical_time\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"pattern\": \"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$\"\n },\n \"public_key_value\": { \"type\": \"string\", \"pattern\": \"^[A-Za-z0-9+/]{43}=$\" },\n \"public_key\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"algorithm\", \"key_id\", \"public_key\"],\n \"properties\": {\n \"algorithm\": { \"const\": \"ed25519\" },\n \"key_id\": { \"$ref\": \"#/$defs/id\" },\n \"public_key\": { \"$ref\": \"#/$defs/public_key_value\" }\n }\n },\n \"signing_ledger\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"log_id\", \"algorithm\", \"key_id\", \"public_key\"],\n \"properties\": {\n \"log_id\": { \"$ref\": \"#/$defs/id\" },\n \"algorithm\": { \"const\": \"ed25519\" },\n \"key_id\": { \"$ref\": \"#/$defs/id\" },\n \"public_key\": { \"$ref\": \"#/$defs/public_key_value\" }\n }\n },\n \"host\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 253,\n \"pattern\": \"^[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?$\"\n },\n \"semver\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)(?:-(?:(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*)(?:\\\\.(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*))*))?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"host_requirement\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"host_id\"],\n \"properties\": {\n \"host_id\": { \"$ref\": \"#/$defs/id\" },\n \"min_host_version\": { \"$ref\": \"#/$defs/semver\" },\n \"required_capability_contracts\": {\n \"type\": \"array\",\n \"maxItems\": 256,\n \"items\": { \"$ref\": \"#/$defs/capability_requirement\" }\n }\n }\n },\n \"capability_requirement\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"capability_id\", \"capability_version\", \"contract\"],\n \"properties\": {\n \"capability_id\": { \"$ref\": \"#/$defs/id\" },\n \"capability_version\": { \"$ref\": \"#/$defs/semver\" },\n \"contract\": { \"$ref\": \"host-capability-pin-v1.schema.json\" }\n }\n }\n }\n}\n".as_bytes();
225static CONTRACT_BODY_RELEASE_REVOCATION_POINTER_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/release-revocation-pointer-v2.schema.json\",\n \"title\": \"ReDevPlugin release revocation pointer v2\",\n \"$ref\": \"#/$defs/pointer\",\n \"$defs\": {\n \"pointer\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"schema_version\",\n \"source_id\",\n \"channel\",\n \"epoch\",\n \"previous_epoch\",\n \"previous_document_sha256\",\n \"ref\",\n \"document_sha256\",\n \"generated_at\",\n \"expires_at\",\n \"key_id\",\n \"signature\"\n ],\n \"properties\": {\n \"schema_version\": { \"const\": \"redevplugin.release_revocation_pointer.v2\" },\n \"source_id\": { \"$ref\": \"#/$defs/id\" },\n \"channel\": { \"$ref\": \"#/$defs/id\" },\n \"epoch\": { \"$ref\": \"#/$defs/positive_epoch\" },\n \"previous_epoch\": { \"$ref\": \"#/$defs/epoch\" },\n \"previous_document_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"ref\": { \"$ref\": \"#/$defs/artifact_ref\" },\n \"document_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"generated_at\": { \"$ref\": \"#/$defs/canonical_time\" },\n \"expires_at\": { \"$ref\": \"#/$defs/canonical_time\" },\n \"key_id\": { \"$ref\": \"#/$defs/id\" },\n \"signature\": { \"$ref\": \"#/$defs/signature\" }\n }\n },\n \"id\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 128,\n \"pattern\": \"^[a-z][a-z0-9._-]*$\"\n },\n \"artifact_ref\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 1024,\n \"pattern\": \"^[A-Za-z0-9._@+-]+(?:/[A-Za-z0-9._@+-]+)*$\",\n \"not\": {\n \"anyOf\": [\n { \"pattern\": \"^/\" },\n { \"pattern\": \"(^|/)\\\\.(/|$)\" },\n { \"pattern\": \"(^|/)\\\\.\\\\.(/|$)\" },\n { \"pattern\": \"\\\\\\\\\" },\n { \"pattern\": \"[?#]\" }\n ]\n }\n },\n \"epoch\": { \"type\": \"string\", \"pattern\": \"^(0|[1-9][0-9]*)$\" },\n \"positive_epoch\": { \"type\": \"string\", \"pattern\": \"^[1-9][0-9]*$\" },\n \"sha256\": { \"type\": \"string\", \"pattern\": \"^[0-9a-f]{64}$\" },\n \"canonical_time\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"pattern\": \"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$\"\n },\n \"signature\": { \"type\": \"string\", \"pattern\": \"^[A-Za-z0-9+/]{86}==$\" }\n }\n}\n".as_bytes();
226static CONTRACT_BODY_RELEASE_REVOCATION_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/release-revocation-v3.schema.json\",\n \"title\": \"ReDevPlugin release revocation v3\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"schema_version\",\n \"source_id\",\n \"channel\",\n \"epoch\",\n \"previous_epoch\",\n \"previous_document_sha256\",\n \"root_epoch\",\n \"generated_at\",\n \"expires_at\",\n \"revoked_key_ids\",\n \"revoked_releases\",\n \"key_id\",\n \"signature\"\n ],\n \"properties\": {\n \"schema_version\": { \"const\": \"redevplugin.release_revocation.v3\" },\n \"source_id\": { \"$ref\": \"#/$defs/id\" },\n \"channel\": { \"$ref\": \"#/$defs/id\" },\n \"epoch\": { \"$ref\": \"#/$defs/positive_epoch\" },\n \"previous_epoch\": { \"$ref\": \"#/$defs/epoch\" },\n \"previous_document_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"root_epoch\": { \"$ref\": \"#/$defs/positive_epoch\" },\n \"generated_at\": { \"$ref\": \"#/$defs/canonical_time\" },\n \"expires_at\": { \"$ref\": \"#/$defs/canonical_time\" },\n \"revoked_key_ids\": {\n \"type\": \"array\",\n \"maxItems\": 4096,\n \"uniqueItems\": true,\n \"items\": { \"$ref\": \"#/$defs/id\" }\n },\n \"revoked_releases\": {\n \"type\": \"array\",\n \"maxItems\": 16384,\n \"items\": { \"$ref\": \"#/$defs/revoked_release\" }\n },\n \"key_id\": { \"$ref\": \"#/$defs/id\" },\n \"signature\": { \"$ref\": \"#/$defs/signature\" }\n },\n \"$defs\": {\n \"revoked_release\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"publisher_id\",\n \"plugin_id\",\n \"version\",\n \"release_metadata_sha256\",\n \"revoked_at\"\n ],\n \"properties\": {\n \"publisher_id\": { \"$ref\": \"#/$defs/legacy_id\" },\n \"plugin_id\": { \"$ref\": \"#/$defs/legacy_id\" },\n \"version\": { \"$ref\": \"#/$defs/semver\" },\n \"release_metadata_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"revoked_at\": { \"$ref\": \"#/$defs/canonical_time\" }\n }\n },\n \"id\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 128,\n \"pattern\": \"^[a-z][a-z0-9._-]*$\"\n },\n \"legacy_id\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 128,\n \"pattern\": \"^[A-Za-z0-9][A-Za-z0-9._-]*$\"\n },\n \"epoch\": { \"type\": \"string\", \"pattern\": \"^(0|[1-9][0-9]*)$\" },\n \"positive_epoch\": { \"type\": \"string\", \"pattern\": \"^[1-9][0-9]*$\" },\n \"sha256\": { \"type\": \"string\", \"pattern\": \"^[0-9a-f]{64}$\" },\n \"canonical_time\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"pattern\": \"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$\"\n },\n \"semver\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)(?:-(?:(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*)(?:\\\\.(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*))*))?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"signature\": { \"type\": \"string\", \"pattern\": \"^[A-Za-z0-9+/]{86}==$\" }\n }\n}\n".as_bytes();
227static CONTRACT_BODY_RELEASE_ROOT_DELEGATION_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/release-root-delegation-v1.schema.json\",\n \"title\": \"ReDevPlugin release root delegation v1\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"schema_version\",\n \"source_id\",\n \"root_epoch\",\n \"previous_root_epoch\",\n \"previous_delegation_sha256\",\n \"generated_at\",\n \"expires_at\",\n \"delegated_keys\",\n \"key_id\",\n \"signature\"\n ],\n \"properties\": {\n \"schema_version\": { \"const\": \"redevplugin.release_root_delegation.v1\" },\n \"source_id\": { \"$ref\": \"#/$defs/id\" },\n \"root_epoch\": { \"$ref\": \"#/$defs/positive_epoch\" },\n \"previous_root_epoch\": { \"$ref\": \"#/$defs/epoch\" },\n \"previous_delegation_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"generated_at\": { \"$ref\": \"#/$defs/canonical_time\" },\n \"expires_at\": { \"$ref\": \"#/$defs/canonical_time\" },\n \"delegated_keys\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"maxItems\": 32,\n \"items\": { \"$ref\": \"#/$defs/delegated_key\" }\n },\n \"key_id\": { \"$ref\": \"#/$defs/id\" },\n \"signature\": { \"$ref\": \"#/$defs/signature\" }\n },\n \"$defs\": {\n \"delegated_key\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"algorithm\",\n \"key_id\",\n \"public_key\",\n \"usages\",\n \"channels\",\n \"valid_from\",\n \"valid_until\"\n ],\n \"properties\": {\n \"algorithm\": { \"const\": \"ed25519\" },\n \"key_id\": { \"$ref\": \"#/$defs/id\" },\n \"public_key\": { \"$ref\": \"#/$defs/public_key\" },\n \"usages\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"maxItems\": 9,\n \"uniqueItems\": true,\n \"items\": {\n \"enum\": [\n \"package\",\n \"release_metadata\",\n \"host_capability_contract\",\n \"source_policy_document\",\n \"source_policy_pointer\",\n \"revocation_document\",\n \"revocation_pointer\",\n \"signing_ledger\",\n \"trusted_time\"\n ]\n }\n },\n \"channels\": {\n \"type\": \"array\",\n \"minItems\": 0,\n \"maxItems\": 16,\n \"uniqueItems\": true,\n \"items\": { \"$ref\": \"#/$defs/id\" }\n },\n \"valid_from\": { \"$ref\": \"#/$defs/canonical_time\" },\n \"valid_until\": { \"$ref\": \"#/$defs/canonical_time\" }\n },\n \"allOf\": [\n {\n \"if\": {\n \"properties\": {\n \"usages\": { \"contains\": { \"enum\": [\"signing_ledger\", \"trusted_time\"] } }\n },\n \"required\": [\"usages\"]\n },\n \"then\": {\n \"properties\": {\n \"usages\": { \"items\": { \"enum\": [\"signing_ledger\", \"trusted_time\"] } },\n \"channels\": { \"maxItems\": 0 }\n }\n },\n \"else\": {\n \"properties\": {\n \"channels\": { \"minItems\": 1 },\n \"usages\": {\n \"items\": {\n \"enum\": [\n \"package\", \"release_metadata\", \"host_capability_contract\", \"source_policy_document\", \"source_policy_pointer\",\n \"revocation_document\", \"revocation_pointer\"\n ]\n }\n }\n }\n }\n }\n ]\n },\n \"id\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 128,\n \"pattern\": \"^[a-z][a-z0-9._-]*$\"\n },\n \"epoch\": { \"type\": \"string\", \"pattern\": \"^(0|[1-9][0-9]*)$\" },\n \"positive_epoch\": { \"type\": \"string\", \"pattern\": \"^[1-9][0-9]*$\" },\n \"sha256\": { \"type\": \"string\", \"pattern\": \"^[0-9a-f]{64}$\" },\n \"canonical_time\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"pattern\": \"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$\"\n },\n \"public_key\": { \"type\": \"string\", \"pattern\": \"^[A-Za-z0-9+/]{43}=$\" },\n \"signature\": { \"type\": \"string\", \"pattern\": \"^[A-Za-z0-9+/]{86}==$\" }\n }\n}\n".as_bytes();
228static CONTRACT_BODY_RELEASE_SIGNATURE_ENVELOPE_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/release-signature-envelope-v1.schema.json\",\n \"title\": \"ReDevPlugin release signature envelope v1\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"schema_version\", \"subject_identity_sha256\", \"signing_preimage_sha256\",\n \"algorithm\", \"key_id\", \"signature\"\n ],\n \"properties\": {\n \"schema_version\": { \"const\": \"redevplugin.release_signature_envelope.v1\" },\n \"subject_identity_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"signing_preimage_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"algorithm\": { \"const\": \"ed25519\" },\n \"key_id\": { \"$ref\": \"#/$defs/id\" },\n \"signature\": { \"type\": \"string\", \"pattern\": \"^[A-Za-z0-9+/]{86}==$\" }\n },\n \"$defs\": {\n \"id\": { \"type\": \"string\", \"pattern\": \"^[a-z][a-z0-9._-]{0,127}$\" },\n \"sha256\": { \"type\": \"string\", \"pattern\": \"^[0-9a-f]{64}$\" }\n }\n}\n".as_bytes();
229static CONTRACT_BODY_RELEASE_SIGNING_LEDGER_EVIDENCE_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/release-signing-ledger-evidence-v1.schema.json\",\n \"title\": \"ReDevPlugin release signing ledger evidence v1\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"schema_version\",\n \"source_id\",\n \"subject_identity_sha256\",\n \"signing_preimage_sha256\",\n \"signature_envelope_sha256\",\n \"receipt_ref\",\n \"receipt_sha256\",\n \"checkpoint_ref\",\n \"checkpoint_sha256\",\n \"inclusion_proof_ref\",\n \"inclusion_proof_sha256\",\n \"latest_proof_ref\",\n \"latest_proof_sha256\"\n ],\n \"dependentRequired\": {\n \"consistency_proof_ref\": [\"consistency_proof_sha256\"],\n \"consistency_proof_sha256\": [\"consistency_proof_ref\"]\n },\n \"properties\": {\n \"schema_version\": { \"const\": \"redevplugin.release_signing_ledger_evidence.v1\" },\n \"source_id\": { \"$ref\": \"#/$defs/id\" },\n \"channel\": { \"$ref\": \"#/$defs/id\" },\n \"subject_identity_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"signing_preimage_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"signature_envelope_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"receipt_ref\": { \"$ref\": \"#/$defs/artifact_ref\" },\n \"receipt_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"checkpoint_ref\": { \"$ref\": \"#/$defs/artifact_ref\" },\n \"checkpoint_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"inclusion_proof_ref\": { \"$ref\": \"#/$defs/artifact_ref\" },\n \"inclusion_proof_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"latest_proof_ref\": { \"$ref\": \"#/$defs/artifact_ref\" },\n \"latest_proof_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"consistency_proof_ref\": { \"$ref\": \"#/$defs/artifact_ref\" },\n \"consistency_proof_sha256\": { \"$ref\": \"#/$defs/sha256\" }\n },\n \"$defs\": {\n \"id\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 128,\n \"pattern\": \"^[a-z][a-z0-9._-]*$\"\n },\n \"sha256\": { \"type\": \"string\", \"pattern\": \"^[0-9a-f]{64}$\" },\n \"artifact_ref\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 1024,\n \"pattern\": \"^[A-Za-z0-9._@+-]+(?:/[A-Za-z0-9._@+-]+)*$\",\n \"not\": {\n \"anyOf\": [\n { \"pattern\": \"^/\" },\n { \"pattern\": \"(^|/)\\\\.(/|$)\" },\n { \"pattern\": \"(^|/)\\\\.\\\\.(/|$)\" },\n { \"pattern\": \"\\\\\\\\\" },\n { \"pattern\": \"[?#]\" }\n ]\n }\n }\n }\n}\n".as_bytes();
230static CONTRACT_BODY_RELEASE_SIGNING_LEDGER_RECEIPT_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/release-signing-ledger-receipt-v1.schema.json\",\n \"title\": \"ReDevPlugin release signing ledger receipt v1\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"schema_version\", \"log_id\", \"source_id\", \"subject_identity_sha256\", \"signing_preimage_sha256\",\n \"signature_envelope_sha256\", \"sequence\", \"leaf_index\", \"tree_size\", \"log_root_hash\",\n \"latest_map_root_hash\", \"checkpoint_sha256\", \"checkpoint_time\", \"key_id\", \"signature\"\n ],\n \"properties\": {\n \"schema_version\": { \"const\": \"redevplugin.release_signing_ledger_receipt.v1\" },\n \"log_id\": { \"$ref\": \"#/$defs/id\" },\n \"source_id\": { \"$ref\": \"#/$defs/id\" },\n \"channel\": { \"$ref\": \"#/$defs/id\" },\n \"subject_identity_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"signing_preimage_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"signature_envelope_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"sequence\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 9007199254740991 },\n \"leaf_index\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 9007199254740990 },\n \"tree_size\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 9007199254740991 },\n \"log_root_hash\": { \"$ref\": \"#/$defs/sha256\" },\n \"latest_map_root_hash\": { \"$ref\": \"#/$defs/sha256\" },\n \"checkpoint_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"checkpoint_time\": { \"$ref\": \"#/$defs/time\" },\n \"key_id\": { \"$ref\": \"#/$defs/id\" },\n \"signature\": { \"type\": \"string\", \"pattern\": \"^[A-Za-z0-9+/]{86}==$\" }\n },\n \"$defs\": {\n \"id\": { \"type\": \"string\", \"pattern\": \"^[a-z][a-z0-9._-]{0,127}$\" },\n \"sha256\": { \"type\": \"string\", \"pattern\": \"^[0-9a-f]{64}$\" },\n \"time\": { \"type\": \"string\", \"format\": \"date-time\", \"pattern\": \"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$\" }\n }\n}\n".as_bytes();
231static CONTRACT_BODY_RELEASE_SIGNING_LEDGER_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/release-signing-ledger-v1.schema.json\",\n \"title\": \"ReDevPlugin release signing ledger v1\",\n \"oneOf\": [\n { \"$ref\": \"#/$defs/entry\" },\n { \"$ref\": \"#/$defs/log_leaf\" },\n { \"$ref\": \"#/$defs/checkpoint\" },\n { \"$ref\": \"#/$defs/inclusion_proof\" },\n { \"$ref\": \"#/$defs/latest_proof\" },\n { \"$ref\": \"#/$defs/consistency_proof\" }\n ],\n \"$defs\": {\n\t\"log_leaf\": {\n\t \"type\": \"object\",\n\t \"additionalProperties\": false,\n\t \"required\": [\n\t\t\"schema_version\", \"source_id\", \"subject_identity_sha256\", \"signing_preimage_sha256\",\n\t\t\"signature_envelope_sha256\", \"sequence\"\n\t ],\n\t \"properties\": {\n\t\t\"schema_version\": { \"const\": \"redevplugin.release_signing_ledger_log_leaf.v1\" },\n\t\t\"source_id\": { \"$ref\": \"#/$defs/id\" },\n\t\t\"channel\": { \"$ref\": \"#/$defs/id\" },\n\t\t\"subject_identity_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n\t\t\"signing_preimage_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n\t\t\"signature_envelope_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n\t\t\"sequence\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 9007199254740991 }\n\t }\n\t},\n \"entry\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"schema_version\", \"state\", \"subject\", \"subject_identity_sha256\", \"signing_preimage_sha256\",\n \"algorithm\", \"key_id\", \"revision\", \"reserved_at\"\n ],\n \"properties\": {\n \"schema_version\": { \"const\": \"redevplugin.release_signing_ledger_entry.v1\" },\n \"state\": { \"enum\": [\"reserved\", \"finalized\", \"terminal_failed\"] },\n \"subject\": { \"$ref\": \"https://schemas.redevplugin.dev/plugin/release-signing-subject-v1.schema.json\" },\n \"subject_identity_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"signing_preimage_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"algorithm\": { \"const\": \"ed25519\" },\n \"key_id\": { \"$ref\": \"#/$defs/id\" },\n \"revision\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 9007199254740991 },\n \"reserved_at\": { \"$ref\": \"#/$defs/time\" },\n \"signature_envelope\": { \"$ref\": \"https://schemas.redevplugin.dev/plugin/release-signature-envelope-v1.schema.json\" },\n \"signature_envelope_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"finalized_at\": { \"$ref\": \"#/$defs/time\" },\n \"failure_code\": { \"enum\": [\"signer_rejected\", \"subject_conflict\", \"ledger_rejected\"] },\n \"failed_at\": { \"$ref\": \"#/$defs/time\" }\n },\n \"allOf\": [\n {\n \"if\": { \"properties\": { \"state\": { \"const\": \"reserved\" } }, \"required\": [\"state\"] },\n \"then\": {\n \"not\": {\n \"anyOf\": [\n { \"required\": [\"signature_envelope\"] }, { \"required\": [\"signature_envelope_sha256\"] },\n { \"required\": [\"finalized_at\"] }, { \"required\": [\"failure_code\"] }, { \"required\": [\"failed_at\"] }\n ]\n }\n }\n },\n {\n \"if\": { \"properties\": { \"state\": { \"const\": \"finalized\" } }, \"required\": [\"state\"] },\n \"then\": { \"required\": [\"signature_envelope\", \"signature_envelope_sha256\", \"finalized_at\"] },\n \"else\": {\n \"not\": {\n \"anyOf\": [\n { \"required\": [\"signature_envelope\"] }, { \"required\": [\"signature_envelope_sha256\"] },\n { \"required\": [\"finalized_at\"] }\n ]\n }\n }\n },\n {\n \"if\": { \"properties\": { \"state\": { \"const\": \"terminal_failed\" } }, \"required\": [\"state\"] },\n \"then\": { \"required\": [\"failure_code\", \"failed_at\"] },\n \"else\": {\n \"not\": { \"anyOf\": [{ \"required\": [\"failure_code\"] }, { \"required\": [\"failed_at\"] }] }\n }\n }\n ]\n },\n \"checkpoint\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"schema_version\", \"kind\", \"log_id\", \"tree_size\", \"log_root_hash\", \"latest_map_root_hash\",\n \"checkpoint_time\", \"key_id\", \"signature\"\n ],\n \"properties\": {\n \"schema_version\": { \"const\": \"redevplugin.release_signing_ledger.v1\" },\n \"kind\": { \"const\": \"checkpoint\" },\n \"log_id\": { \"$ref\": \"#/$defs/id\" },\n \"tree_size\": { \"$ref\": \"#/$defs/tree_size\" },\n \"log_root_hash\": { \"$ref\": \"#/$defs/sha256\" },\n \"latest_map_root_hash\": { \"$ref\": \"#/$defs/sha256\" },\n \"checkpoint_time\": { \"$ref\": \"#/$defs/time\" },\n \"key_id\": { \"$ref\": \"#/$defs/id\" },\n \"signature\": { \"$ref\": \"#/$defs/signature\" }\n }\n },\n \"inclusion_proof\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"schema_version\", \"kind\", \"log_id\", \"leaf_index\", \"tree_size\", \"nodes\"],\n \"properties\": {\n \"schema_version\": { \"const\": \"redevplugin.release_signing_ledger.v1\" },\n \"kind\": { \"const\": \"inclusion_proof\" },\n \"log_id\": { \"$ref\": \"#/$defs/id\" },\n \"leaf_index\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 9007199254740990 },\n \"tree_size\": { \"$ref\": \"#/$defs/tree_size\" },\n \"nodes\": { \"$ref\": \"#/$defs/log_proof\" }\n }\n },\n \"latest_proof\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"schema_version\", \"kind\", \"log_id\", \"subject_identity_sha256\", \"present\", \"siblings\"],\n \"properties\": {\n \"schema_version\": { \"const\": \"redevplugin.release_signing_ledger.v1\" },\n \"kind\": { \"const\": \"latest_proof\" },\n \"log_id\": { \"$ref\": \"#/$defs/id\" },\n \"subject_identity_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"present\": { \"type\": \"boolean\" },\n \"sequence\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 9007199254740991 },\n \"signing_preimage_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"signature_envelope_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"siblings\": {\n \"type\": \"array\", \"minItems\": 256, \"maxItems\": 256,\n \"items\": { \"$ref\": \"#/$defs/sha256\" }\n }\n },\n \"allOf\": [\n {\n \"if\": { \"properties\": { \"present\": { \"const\": true } }, \"required\": [\"present\"] },\n \"then\": { \"required\": [\"sequence\", \"signing_preimage_sha256\", \"signature_envelope_sha256\"] },\n \"else\": {\n \"not\": {\n \"anyOf\": [\n { \"required\": [\"sequence\"] },\n { \"required\": [\"signing_preimage_sha256\"] },\n { \"required\": [\"signature_envelope_sha256\"] }\n ]\n }\n }\n }\n ]\n },\n \"consistency_proof\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"schema_version\", \"kind\", \"log_id\", \"old_tree_size\", \"new_tree_size\", \"nodes\"],\n \"properties\": {\n \"schema_version\": { \"const\": \"redevplugin.release_signing_ledger.v1\" },\n \"kind\": { \"const\": \"consistency_proof\" },\n \"log_id\": { \"$ref\": \"#/$defs/id\" },\n \"old_tree_size\": { \"$ref\": \"#/$defs/tree_size\" },\n \"new_tree_size\": { \"$ref\": \"#/$defs/tree_size\" },\n \"nodes\": { \"$ref\": \"#/$defs/log_proof\" }\n }\n },\n \"id\": { \"type\": \"string\", \"pattern\": \"^[a-z][a-z0-9._-]{0,127}$\" },\n \"sha256\": { \"type\": \"string\", \"pattern\": \"^[0-9a-f]{64}$\" },\n \"tree_size\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 9007199254740991 },\n \"time\": { \"type\": \"string\", \"format\": \"date-time\", \"pattern\": \"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$\" },\n \"signature\": { \"type\": \"string\", \"pattern\": \"^[A-Za-z0-9+/]{86}==$\" },\n \"log_proof\": {\n \"type\": \"array\", \"maxItems\": 64,\n \"items\": { \"$ref\": \"#/$defs/sha256\" }\n }\n }\n}\n".as_bytes();
232static CONTRACT_BODY_RELEASE_SIGNING_SUBJECT_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/release-signing-subject-v1.schema.json\",\n \"title\": \"ReDevPlugin release signing subject v1\",\n \"oneOf\": [\n { \"$ref\": \"#/$defs/root_subject\" },\n { \"$ref\": \"#/$defs/release_subject\" },\n { \"$ref\": \"#/$defs/epoch_subject\" }\n ],\n \"$defs\": {\n \"root_subject\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"schema_version\", \"usage\", \"source_id\", \"root_epoch\"],\n \"properties\": {\n \"schema_version\": { \"const\": \"redevplugin.release_signing_subject.v1\" },\n \"usage\": { \"const\": \"root_delegation\" },\n \"source_id\": { \"$ref\": \"#/$defs/id\" },\n \"root_epoch\": { \"$ref\": \"#/$defs/positive_epoch\" }\n }\n },\n \"release_subject\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"schema_version\", \"usage\", \"source_id\", \"channel\", \"publisher_id\",\n \"plugin_id\", \"version\", \"artifact_or_metadata_identity_sha256\"\n ],\n \"properties\": {\n \"schema_version\": { \"const\": \"redevplugin.release_signing_subject.v1\" },\n \"usage\": { \"enum\": [\"package\", \"release_metadata\"] },\n \"source_id\": { \"$ref\": \"#/$defs/id\" },\n \"channel\": { \"$ref\": \"#/$defs/id\" },\n \"publisher_id\": { \"$ref\": \"#/$defs/legacy_id\" },\n \"plugin_id\": { \"$ref\": \"#/$defs/legacy_id\" },\n \"version\": { \"$ref\": \"#/$defs/semver\" },\n \"artifact_or_metadata_identity_sha256\": { \"$ref\": \"#/$defs/sha256\" }\n }\n },\n \"epoch_subject\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"schema_version\", \"usage\", \"source_id\", \"channel\", \"epoch\"],\n \"properties\": {\n \"schema_version\": { \"const\": \"redevplugin.release_signing_subject.v1\" },\n \"usage\": {\n \"enum\": [\"source_policy_document\", \"source_policy_pointer\", \"revocation_document\", \"revocation_pointer\"]\n },\n \"source_id\": { \"$ref\": \"#/$defs/id\" },\n \"channel\": { \"$ref\": \"#/$defs/id\" },\n \"epoch\": { \"$ref\": \"#/$defs/positive_epoch\" }\n }\n },\n \"id\": { \"type\": \"string\", \"pattern\": \"^[a-z][a-z0-9._-]{0,127}$\" },\n \"legacy_id\": { \"type\": \"string\", \"pattern\": \"^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$\" },\n \"positive_epoch\": { \"type\": \"string\", \"pattern\": \"^[1-9][0-9]*$\" },\n \"sha256\": { \"type\": \"string\", \"pattern\": \"^[0-9a-f]{64}$\" },\n \"semver\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)(?:-(?:(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*)(?:\\\\.(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*))*))?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n }\n }\n}\n".as_bytes();
233static CONTRACT_BODY_RELEASE_SOURCE_POLICY_POINTER_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/release-source-policy-pointer-v2.schema.json\",\n \"title\": \"ReDevPlugin release source policy pointer v2\",\n \"$ref\": \"#/$defs/pointer\",\n \"$defs\": {\n \"pointer\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"schema_version\",\n \"source_id\",\n \"channel\",\n \"epoch\",\n \"previous_epoch\",\n \"previous_document_sha256\",\n \"ref\",\n \"document_sha256\",\n \"generated_at\",\n \"expires_at\",\n \"key_id\",\n \"signature\"\n ],\n \"properties\": {\n \"schema_version\": { \"const\": \"redevplugin.release_source_policy_pointer.v2\" },\n \"source_id\": { \"$ref\": \"#/$defs/id\" },\n \"channel\": { \"$ref\": \"#/$defs/id\" },\n \"epoch\": { \"$ref\": \"#/$defs/positive_epoch\" },\n \"previous_epoch\": { \"$ref\": \"#/$defs/epoch\" },\n \"previous_document_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"ref\": { \"$ref\": \"#/$defs/artifact_ref\" },\n \"document_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"generated_at\": { \"$ref\": \"#/$defs/canonical_time\" },\n \"expires_at\": { \"$ref\": \"#/$defs/canonical_time\" },\n \"key_id\": { \"$ref\": \"#/$defs/id\" },\n \"signature\": { \"$ref\": \"#/$defs/signature\" }\n }\n },\n \"id\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 128,\n \"pattern\": \"^[a-z][a-z0-9._-]*$\"\n },\n \"artifact_ref\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 1024,\n \"pattern\": \"^[A-Za-z0-9._@+-]+(?:/[A-Za-z0-9._@+-]+)*$\",\n \"not\": {\n \"anyOf\": [\n { \"pattern\": \"^/\" },\n { \"pattern\": \"(^|/)\\\\.(/|$)\" },\n { \"pattern\": \"(^|/)\\\\.\\\\.(/|$)\" },\n { \"pattern\": \"\\\\\\\\\" },\n { \"pattern\": \"[?#]\" }\n ]\n }\n },\n \"epoch\": { \"type\": \"string\", \"pattern\": \"^(0|[1-9][0-9]*)$\" },\n \"positive_epoch\": { \"type\": \"string\", \"pattern\": \"^[1-9][0-9]*$\" },\n \"sha256\": { \"type\": \"string\", \"pattern\": \"^[0-9a-f]{64}$\" },\n \"canonical_time\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"pattern\": \"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$\"\n },\n \"signature\": { \"type\": \"string\", \"pattern\": \"^[A-Za-z0-9+/]{86}==$\" }\n }\n}\n".as_bytes();
234static CONTRACT_BODY_RELEASE_SOURCE_POLICY_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/release-source-policy-v3.schema.json\",\n \"title\": \"ReDevPlugin release source policy v3\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"schema_version\",\n \"source_id\",\n \"channel\",\n \"epoch\",\n \"previous_epoch\",\n \"previous_document_sha256\",\n \"root_epoch\",\n \"source_type\",\n \"source_class\",\n \"allowed_publishers\",\n \"allowed_artifact_hosts\",\n \"active_keys\",\n \"capability_publisher_scopes\",\n \"require_signature\",\n \"install_policy\",\n \"unsigned_policy\",\n \"downgrade_policy\",\n \"minimum_revocation_epoch\",\n \"limits\",\n \"generated_at\",\n \"expires_at\",\n \"key_id\",\n \"signature\"\n ],\n \"properties\": {\n \"schema_version\": { \"const\": \"redevplugin.release_source_policy.v3\" },\n \"source_id\": { \"$ref\": \"#/$defs/id\" },\n \"channel\": { \"$ref\": \"#/$defs/id\" },\n \"epoch\": { \"$ref\": \"#/$defs/positive_epoch\" },\n \"previous_epoch\": { \"$ref\": \"#/$defs/epoch\" },\n \"previous_document_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"root_epoch\": { \"$ref\": \"#/$defs/positive_epoch\" },\n \"source_type\": { \"enum\": [\"registry\", \"host_artifact\"] },\n \"source_class\": { \"enum\": [\"official\", \"curated\", \"community\", \"private\"] },\n \"allowed_publishers\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"maxItems\": 1024,\n \"uniqueItems\": true,\n \"items\": { \"$ref\": \"#/$defs/id\" }\n },\n \"allowed_artifact_hosts\": {\n \"type\": \"array\",\n \"maxItems\": 1024,\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 253,\n \"pattern\": \"^[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?$\"\n }\n },\n \"active_keys\": { \"$ref\": \"#/$defs/active_keys\" },\n \"capability_publisher_scopes\": { \"$ref\": \"#/$defs/capability_publisher_scopes\" },\n \"require_signature\": { \"type\": \"boolean\" },\n \"install_policy\": { \"enum\": [\"allow\", \"review_required\", \"block\"] },\n \"unsigned_policy\": { \"enum\": [\"dev_only\", \"review_required\", \"block\"] },\n \"downgrade_policy\": { \"enum\": [\"review_required\", \"block\"] },\n \"minimum_revocation_epoch\": { \"$ref\": \"#/$defs/epoch\" },\n \"limits\": { \"$ref\": \"#/$defs/limits\" },\n \"generated_at\": { \"$ref\": \"#/$defs/canonical_time\" },\n \"expires_at\": { \"$ref\": \"#/$defs/canonical_time\" },\n \"key_id\": { \"$ref\": \"#/$defs/id\" },\n \"signature\": { \"$ref\": \"#/$defs/signature\" }\n },\n \"$defs\": {\n \"active_keys\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"package\",\n \"release_metadata\",\n \"host_capability_contract\",\n \"source_policy_pointer\",\n \"revocation_document\",\n \"revocation_pointer\"\n ],\n \"properties\": {\n \"package\": { \"$ref\": \"#/$defs/key_ids\" },\n \"release_metadata\": { \"$ref\": \"#/$defs/key_ids\" },\n \"host_capability_contract\": { \"$ref\": \"#/$defs/optional_key_ids\" },\n \"source_policy_pointer\": { \"$ref\": \"#/$defs/key_ids\" },\n \"revocation_document\": { \"$ref\": \"#/$defs/key_ids\" },\n \"revocation_pointer\": { \"$ref\": \"#/$defs/key_ids\" }\n }\n },\n \"key_ids\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"maxItems\": 16,\n \"uniqueItems\": true,\n \"items\": { \"$ref\": \"#/$defs/id\" }\n },\n \"optional_key_ids\": {\n \"type\": \"array\",\n \"maxItems\": 16,\n \"uniqueItems\": true,\n \"items\": { \"$ref\": \"#/$defs/id\" }\n },\n \"capability_publisher_scopes\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": { \"$ref\": \"#/$defs/capability_publisher_scope\" }\n },\n \"capability_publisher_scope\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"key_id\", \"allowed_publishers\"],\n \"properties\": {\n \"key_id\": { \"$ref\": \"#/$defs/id\" },\n \"allowed_publishers\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"maxItems\": 1024,\n \"uniqueItems\": true,\n \"items\": { \"$ref\": \"#/$defs/legacy_id\" }\n }\n }\n },\n \"limits\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"document_max_lifetime_seconds\",\n \"future_skew_seconds\",\n \"activation_lease_max_seconds\",\n \"refresh_interval_max_seconds\",\n \"failure_teardown_deadline_seconds\"\n ],\n \"properties\": {\n \"document_max_lifetime_seconds\": { \"const\": 7776000 },\n \"future_skew_seconds\": { \"const\": 300 },\n \"activation_lease_max_seconds\": { \"const\": 300 },\n \"refresh_interval_max_seconds\": { \"const\": 60 },\n \"failure_teardown_deadline_seconds\": { \"const\": 30 }\n }\n },\n \"id\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 128,\n \"pattern\": \"^[a-z][a-z0-9._-]*$\"\n },\n \"legacy_id\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 128,\n \"pattern\": \"^[A-Za-z0-9][A-Za-z0-9._-]*$\"\n },\n \"epoch\": { \"type\": \"string\", \"pattern\": \"^(0|[1-9][0-9]*)$\" },\n \"positive_epoch\": { \"type\": \"string\", \"pattern\": \"^[1-9][0-9]*$\" },\n \"sha256\": { \"type\": \"string\", \"pattern\": \"^[0-9a-f]{64}$\" },\n \"canonical_time\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"pattern\": \"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$\"\n },\n \"signature\": { \"type\": \"string\", \"pattern\": \"^[A-Za-z0-9+/]{86}==$\" }\n }\n}\n".as_bytes();
235static CONTRACT_BODY_RELEASE_TRUST_STATE_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/release-trust-state-v1.schema.json\",\n \"title\": \"ReDevPlugin release trust state v1\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"schema_version\", \"source_id\", \"revision\", \"external_counter\", \"trusted_time\", \"channels\"],\n \"properties\": {\n \"schema_version\": { \"const\": \"redevplugin.release_trust_state.v1\" },\n \"source_id\": { \"$ref\": \"#/$defs/id\" },\n \"revision\": { \"$ref\": \"#/$defs/revision\" },\n \"external_counter\": { \"$ref\": \"#/$defs/counter\" },\n \"root\": { \"$ref\": \"#/$defs/root_head\" },\n \"trusted_time\": { \"$ref\": \"#/$defs/trusted_time\" },\n\t\"signing_ledger\": { \"$ref\": \"#/$defs/signing_ledger\" },\n \"channels\": {\n \"type\": \"array\",\n \"maxItems\": 16,\n \"items\": { \"$ref\": \"#/$defs/channel\" }\n }\n },\n \"$defs\": {\n \"id\": { \"type\": \"string\", \"pattern\": \"^[a-z][a-z0-9._-]{0,127}$\" },\n \"sha256\": { \"type\": \"string\", \"pattern\": \"^[0-9a-f]{64}$\" },\n \"counter\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 9007199254740991 },\n \"revision\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 9007199254740991 },\n \"epoch\": { \"type\": \"string\", \"pattern\": \"^(0|[1-9][0-9]{0,19})$\" },\n \"time\": { \"type\": \"string\", \"format\": \"date-time\", \"maxLength\": 35 },\n \"locator\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 1024,\n \"pattern\": \"^(?:[A-Za-z0-9_@+-][A-Za-z0-9._@+-]*|\\\\.[A-Za-z0-9_@+-][A-Za-z0-9._@+-]*|\\\\.{2}[A-Za-z0-9_@+-][A-Za-z0-9._@+-]*|\\\\.{3,}[A-Za-z0-9._@+-]*)(?:/(?:[A-Za-z0-9_@+-][A-Za-z0-9._@+-]*|\\\\.[A-Za-z0-9_@+-][A-Za-z0-9._@+-]*|\\\\.{2}[A-Za-z0-9_@+-][A-Za-z0-9._@+-]*|\\\\.{3,}[A-Za-z0-9._@+-]*))*$\"\n },\n \"transport_token\": { \"type\": \"string\", \"minLength\": 1, \"maxLength\": 512, \"pattern\": \"^[A-Za-z0-9._:@+-]+$\" },\n \"root_head\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"epoch\", \"document_sha256\", \"generated_at\", \"expires_at\", \"key_id\"],\n \"properties\": {\n \"epoch\": { \"$ref\": \"#/$defs/epoch\" },\n \"document_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"generated_at\": { \"$ref\": \"#/$defs/time\" },\n \"expires_at\": { \"$ref\": \"#/$defs/time\" },\n \"key_id\": { \"$ref\": \"#/$defs/id\" }\n }\n },\n \"checkpoint\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"schema_version\", \"log_id\", \"tree_size\", \"root_hash\", \"checkpoint_time\", \"key_id\", \"signature\"],\n \"properties\": {\n \"schema_version\": { \"const\": \"redevplugin.trusted_time_checkpoint.v1\" },\n \"log_id\": { \"$ref\": \"#/$defs/id\" },\n \"tree_size\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 9007199254740991 },\n \"root_hash\": { \"$ref\": \"#/$defs/sha256\" },\n \"checkpoint_time\": { \"$ref\": \"#/$defs/time\" },\n \"key_id\": { \"$ref\": \"#/$defs/id\" },\n \"signature\": { \"type\": \"string\", \"pattern\": \"^[A-Za-z0-9+/]{86}==$\" }\n }\n },\n \"trusted_time\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"floor\", \"checkpoint_sha256\", \"checkpoint\"],\n \"properties\": {\n \"floor\": { \"$ref\": \"#/$defs/time\" },\n \"checkpoint_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"checkpoint\": { \"$ref\": \"#/$defs/checkpoint\" }\n }\n },\n\t\"signing_ledger\": {\n\t \"type\": \"object\",\n\t \"additionalProperties\": false,\n\t \"required\": [\"checkpoint_sha256\", \"checkpoint\"],\n\t \"properties\": {\n\t\t\"checkpoint_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n\t\t\"checkpoint\": {\n\t\t \"allOf\": [\n\t\t\t{ \"$ref\": \"https://schemas.redevplugin.dev/plugin/release-signing-ledger-v1.schema.json\" },\n\t\t\t{ \"properties\": { \"kind\": { \"const\": \"checkpoint\" } }, \"required\": [\"kind\"] }\n\t\t ]\n\t\t}\n\t }\n\t},\n \"document_head\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"pointer_locator\",\n \"pointer_transport_token\",\n \"pointer_epoch\",\n \"pointer_sha256\",\n \"document_locator\",\n \"document_transport_token\",\n \"document_sha256\",\n \"generated_at\",\n \"expires_at\",\n \"key_id\"\n ],\n \"properties\": {\n \"pointer_locator\": { \"$ref\": \"#/$defs/locator\" },\n \"pointer_transport_token\": { \"$ref\": \"#/$defs/transport_token\" },\n \"pointer_epoch\": { \"$ref\": \"#/$defs/epoch\" },\n \"pointer_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"document_locator\": { \"$ref\": \"#/$defs/locator\" },\n \"document_transport_token\": { \"$ref\": \"#/$defs/transport_token\" },\n \"document_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"generated_at\": { \"$ref\": \"#/$defs/time\" },\n \"expires_at\": { \"$ref\": \"#/$defs/time\" },\n \"key_id\": { \"$ref\": \"#/$defs/id\" }\n }\n },\n \"channel\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"channel\"],\n \"properties\": {\n \"channel\": { \"$ref\": \"#/$defs/id\" },\n \"policy\": { \"$ref\": \"#/$defs/document_head\" },\n \"revocation\": { \"$ref\": \"#/$defs/document_head\" },\n\t\t\"fence_generation\": { \"$ref\": \"#/$defs/counter\" },\n\t\t\"fence\": { \"$ref\": \"#/$defs/fence\" }\n }\n },\n\t\"fence\": {\n\t \"type\": \"object\",\n\t \"additionalProperties\": false,\n\t \"required\": [\"generation\", \"reason\", \"fenced_at\"],\n\t \"properties\": {\n\t\t\"generation\": { \"$ref\": \"#/$defs/revision\" },\n\t\t\"reason\": { \"enum\": [\"refresh_failed\", \"expired\", \"trust_advanced\", \"restart_recovery\"] },\n\t\t\"fenced_at\": { \"$ref\": \"#/$defs/time\" }\n\t }\n }\n }\n}\n".as_bytes();
236static CONTRACT_BODY_RESOURCE_SCOPE_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/resource-scope-v1.schema.json\",\n \"title\": \"ReDevPlugin persistent resource scope v1\",\n \"description\": \"Host-issued ownership scope for persistent plugin resources. Session and channel hashes are intentionally excluded.\",\n \"oneOf\": [\n { \"$ref\": \"#/$defs/user_scope\" },\n { \"$ref\": \"#/$defs/environment_scope\" }\n ],\n \"$defs\": {\n \"owner_hash\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z0-9][A-Za-z0-9._:-]{0,255}$\"\n },\n \"scope_kind\": {\n \"type\": \"string\",\n \"enum\": [\"user\", \"environment\"]\n },\n \"owner_scope_migration_required_code\": {\n \"type\": \"string\",\n \"const\": \"owner_scope_migration_required\"\n },\n \"user_scope\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"kind\", \"owner_env_hash\", \"owner_user_hash\"],\n \"properties\": {\n \"kind\": { \"const\": \"user\" },\n \"owner_env_hash\": { \"$ref\": \"#/$defs/owner_hash\" },\n \"owner_user_hash\": { \"$ref\": \"#/$defs/owner_hash\" }\n }\n },\n \"environment_scope\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"kind\", \"owner_env_hash\"],\n \"properties\": {\n \"kind\": { \"const\": \"environment\" },\n \"owner_env_hash\": { \"$ref\": \"#/$defs/owner_hash\" }\n }\n }\n }\n}\n".as_bytes();
237static CONTRACT_BODY_RUNTIME_ADMISSION_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/runtime-admission-v1.schema.json\",\n \"title\": \"ReDevPlugin runtime admission v1\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"schema_version\", \"target\", \"binary_name\", \"binary_sha256\"],\n \"properties\": {\n \"schema_version\": {\"const\": \"redevplugin.runtime_admission.v1\"},\n \"target\": {\"$ref\": \"#/$defs/target\"},\n \"binary_name\": {\"const\": \"redevplugin-runtime\"},\n \"binary_sha256\": {\"$ref\": \"#/$defs/sha256\"}\n },\n \"$defs\": {\n \"target\": {\"type\": \"string\", \"enum\": [\"linux/amd64\", \"linux/arm64\"]},\n \"sha256\": {\"type\": \"string\", \"pattern\": \"^[0-9a-f]{64}$\"}\n }\n}\n".as_bytes();
238static CONTRACT_BODY_RUNTIME_DESCRIPTOR_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/runtime-descriptor-v2.schema.json\",\n \"title\": \"ReDevPlugin runtime descriptor v2\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"schema_version\", \"platform_version\", \"target\", \"rust_ipc_version\", \"wasm_abi_version\", \"contract_set_sha256\", \"binary_sha256\"],\n \"properties\": {\n \"schema_version\": {\"const\": \"runtime-descriptor-v2\"},\n \"platform_version\": {\"$ref\": \"#/$defs/semver\"},\n \"target\": {\"type\": \"string\", \"enum\": [\"linux/amd64\", \"linux/arm64\"]},\n \"rust_ipc_version\": {\"const\": \"rust-ipc-v6\"},\n \"wasm_abi_version\": {\"const\": \"redevplugin-wasm-worker-v2\"},\n \"contract_set_sha256\": {\"$ref\": \"#/$defs/sha256\"},\n \"binary_sha256\": {\"$ref\": \"#/$defs/sha256\"}\n },\n \"$defs\": {\n \"semver\": {\"type\": \"string\", \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)(?:-[0-9A-Za-z.-]+)?$\"},\n \"sha256\": {\"type\": \"string\", \"pattern\": \"^[0-9a-f]{64}$\"}\n }\n}\n".as_bytes();
239static CONTRACT_BODY_RUNTIME_EXEC_JOURNAL_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/runtime-exec-journal-v1.schema.json\",\n \"title\": \"ReDevPlugin runtime execution journal v1\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"schema_version\", \"module_id\", \"descriptor_digest\", \"state\", \"containment_identity\", \"mutation_outcome\"],\n \"properties\": {\n \"schema_version\": {\"const\": \"redevplugin.runtime_exec_journal.v1\"},\n \"module_id\": {\"type\": \"string\", \"pattern\": \"^[A-Za-z0-9._-]{16,128}$\"},\n \"descriptor_digest\": {\"type\": \"string\", \"pattern\": \"^[0-9a-f]{64}$\"},\n \"state\": {\"enum\": [\"opened\", \"consumed\", \"bound\", \"running\", \"stopping\", \"closed\", \"reconcile_required\"]},\n \"containment_identity\": {\"type\": \"string\", \"pattern\": \"^[A-Za-z0-9._:-]{1,256}$\"},\n \"mutation_outcome\": {\"enum\": [\"committed\", \"not_committed\", \"unknown\"]}\n }\n}\n".as_bytes();
240static CONTRACT_BODY_RUST_IPC_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/ipc-v6.schema.json\",\n \"title\": \"ReDevPlugin Rust IPC v6\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"ipc_version\", \"frame_type\", \"request_id\"],\n \"properties\": {\n \"ipc_version\": { \"const\": \"rust-ipc-v6\" },\n \"frame_type\": {\n \"enum\": [\"hello\", \"hello_ack\", \"heartbeat\", \"invoke_worker\", \"invoke_worker_result\", \"cancel_invoke\", \"cancel_invoke_ack\", \"compile_flight_register\", \"compile_flight_complete\", \"open_handle\", \"validate_handle_grant\", \"storage_file\", \"storage_kv\", \"storage_sqlite\", \"network_grant\", \"network_execute\", \"revoke_epoch\", \"revoke_epoch_ack\", \"session_revoke\", \"session_revoke_ack\", \"diagnostic\"]\n },\n \"request_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"parent_request_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"runtime_generation_id\": { \"type\": \"string\" },\n \"payload\": true\n },\n \"allOf\": [\n {\n \"if\": { \"properties\": { \"frame_type\": { \"const\": \"hello\" } }, \"required\": [\"frame_type\"] },\n \"then\": {\n \"required\": [\"runtime_generation_id\", \"payload\"],\n \"properties\": {\n \"payload\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"target\", \"host_process_id\", \"host_ipc_version\", \"host_wasm_abi\", \"contract_set_sha256\", \"started_unix_nano\", \"channel_nonce\", \"runtime_lease_public_keys\", \"limits\"],\n \"properties\": {\n \"target\": { \"$ref\": \"#/$defs/runtime_target\" },\n \"host_process_id\": { \"type\": \"integer\", \"minimum\": 1 },\n \"host_ipc_version\": { \"const\": \"rust-ipc-v6\" },\n \"host_wasm_abi\": { \"const\": \"redevplugin-wasm-worker-v2\" },\n \"contract_set_sha256\": { \"$ref\": \"#/$defs/lower_sha256\" },\n \"started_unix_nano\": { \"type\": \"integer\", \"minimum\": 1 },\n \"channel_nonce\": { \"type\": \"string\", \"minLength\": 16 },\n \"runtime_lease_public_keys\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"algorithm\", \"key_id\", \"public_key_base64\"],\n \"properties\": {\n \"algorithm\": { \"const\": \"ed25519\" },\n \"key_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"public_key_base64\": { \"type\": \"string\", \"contentEncoding\": \"base64\" }\n }\n },\n \"uniqueItems\": true\n },\n \"limits\": { \"$ref\": \"#/$defs/runtime_limits\" }\n }\n }\n }\n }\n },\n {\n \"if\": { \"properties\": { \"frame_type\": { \"const\": \"hello_ack\" } }, \"required\": [\"frame_type\"] },\n \"then\": {\n \"required\": [\"runtime_generation_id\", \"payload\"],\n \"properties\": {\n \"payload\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"runtime_version\", \"actual_target\", \"rust_ipc_version\", \"wasm_abi_version\", \"contract_set_sha256\", \"channel_nonce\", \"limits\", \"process_containment\"],\n \"properties\": {\n \"runtime_version\": { \"$ref\": \"#/$defs/semver\" },\n \"actual_target\": { \"$ref\": \"#/$defs/runtime_target\" },\n \"rust_ipc_version\": { \"const\": \"rust-ipc-v6\" },\n \"wasm_abi_version\": { \"const\": \"redevplugin-wasm-worker-v2\" },\n \"contract_set_sha256\": { \"$ref\": \"#/$defs/lower_sha256\" },\n \"channel_nonce\": { \"type\": \"string\", \"minLength\": 16 },\n \"limits\": { \"$ref\": \"#/$defs/runtime_limits\" },\n \"process_containment\": { \"$ref\": \"#/$defs/process_containment\" }\n }\n }\n }\n }\n },\n {\n \"if\": { \"properties\": { \"frame_type\": { \"const\": \"heartbeat\" } }, \"required\": [\"frame_type\"] },\n \"then\": {\n \"required\": [\"runtime_generation_id\", \"payload\"],\n \"properties\": {\n \"payload\": {\n \"oneOf\": [\n { \"$ref\": \"#/$defs/heartbeat_request_payload\" },\n { \"$ref\": \"#/$defs/heartbeat_response_payload\" }\n ]\n }\n }\n }\n },\n {\n \"if\": { \"properties\": { \"frame_type\": { \"const\": \"invoke_worker\" } }, \"required\": [\"frame_type\"] },\n \"then\": {\n \"required\": [\"runtime_generation_id\", \"payload\"],\n \"properties\": {\n \"payload\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"lease\", \"method\", \"invocation\"],\n \"properties\": {\n \"lease\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"lease_id\",\n \"token_id\",\n \"lease_nonce\",\n \"runtime_generation_id\",\n \"plugin_instance_id\",\n \"plugin_id\",\n \"plugin_version\",\n \"active_fingerprint\",\n \"owner_env_hash\",\n \"issued_at_unix_ms\",\n \"method\",\n \"effect\",\n \"execution\",\n \"audit_correlation_id\",\n \"target_descriptor_hashes\",\n \"limits\",\n \"policy_revision\",\n \"management_revision\",\n \"revoke_epoch\",\n \"runtime_shard_id\",\n \"runtime_instance_id\",\n \"ipc_channel_id\",\n \"connection_nonce\",\n \"key_id\",\n \"signature\",\n \"expires_at_unix_ms\"\n ],\n \"properties\": {\n \"lease_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"token_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"lease_nonce\": { \"type\": \"string\", \"minLength\": 16 },\n \"runtime_generation_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"plugin_instance_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"plugin_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"plugin_version\": { \"type\": \"string\", \"minLength\": 1 },\n \"active_fingerprint\": { \"type\": \"string\", \"minLength\": 1 },\n \"issued_at_unix_ms\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 9007199254740991 },\n \"method\": { \"type\": \"string\", \"minLength\": 1 },\n \"effect\": { \"enum\": [\"read\", \"write\", \"execute\", \"delete\", \"admin\"] },\n \"execution\": { \"enum\": [\"sync\", \"operation\", \"subscription\"] },\n \"operation_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"stream_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"audit_correlation_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"surface_instance_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"owner_session_hash\": { \"type\": \"string\", \"minLength\": 1 },\n \"owner_user_hash\": { \"type\": \"string\", \"minLength\": 1 },\n \"owner_env_hash\": { \"type\": \"string\", \"minLength\": 1 },\n \"session_channel_id_hash\": { \"type\": \"string\", \"minLength\": 1 },\n \"bridge_channel_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"target_descriptor_hashes\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"items\": { \"type\": \"string\", \"minLength\": 1 },\n \"uniqueItems\": true\n },\n \"limits\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"timeout_ms\", \"memory_bytes\", \"max_payload_bytes\", \"max_stream_bytes_per_sec\"],\n \"properties\": {\n \"timeout_ms\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 9007199254740991 },\n \"memory_bytes\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 268435456 },\n \"max_payload_bytes\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 9007199254740991 },\n \"max_stream_bytes_per_sec\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 9007199254740991 }\n }\n },\n \"policy_revision\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 9007199254740991 },\n \"management_revision\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 9007199254740991 },\n \"revoke_epoch\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 9007199254740991 },\n \"runtime_shard_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"runtime_instance_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"ipc_channel_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"connection_nonce\": { \"type\": \"string\", \"minLength\": 16 },\n \"key_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"signature\": { \"type\": \"string\", \"pattern\": \"^ed25519:.+\" },\n \"expires_at_unix_ms\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 9007199254740991 }\n },\n \"allOf\": [\n {\n \"if\": { \"properties\": { \"execution\": { \"const\": \"sync\" } }, \"required\": [\"execution\"] },\n \"then\": { \"not\": { \"anyOf\": [{ \"required\": [\"operation_id\"] }, { \"required\": [\"stream_id\"] }] } }\n },\n {\n \"if\": { \"properties\": { \"execution\": { \"const\": \"operation\" } }, \"required\": [\"execution\"] },\n \"then\": { \"required\": [\"operation_id\"], \"not\": { \"required\": [\"stream_id\"] } }\n },\n {\n \"if\": { \"properties\": { \"execution\": { \"const\": \"subscription\" } }, \"required\": [\"execution\"] },\n \"then\": { \"required\": [\"operation_id\", \"stream_id\"] }\n }\n ]\n },\n \"method\": { \"type\": \"string\", \"minLength\": 1 },\n \"invocation\": {\n \"$ref\": \"https://schemas.redevplugin.dev/plugin/worker-invocation-v3.schema.json\"\n }\n }\n }\n }\n }\n },\n {\n \"if\": { \"properties\": { \"frame_type\": { \"const\": \"invoke_worker_result\" } }, \"required\": [\"frame_type\"] },\n \"then\": { \"$ref\": \"#/$defs/runtime_response_frame\" }\n },\n {\n \"if\": { \"properties\": { \"frame_type\": { \"const\": \"cancel_invoke\" } }, \"required\": [\"frame_type\"] },\n \"then\": {\n \"required\": [\"runtime_generation_id\", \"payload\"],\n \"properties\": {\n \"payload\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"invocation_request_id\"],\n \"properties\": {\n \"invocation_request_id\": { \"type\": \"string\", \"minLength\": 1 }\n }\n }\n }\n }\n },\n {\n \"if\": { \"properties\": { \"frame_type\": { \"const\": \"cancel_invoke_ack\" } }, \"required\": [\"frame_type\"] },\n \"then\": {\n \"required\": [\"runtime_generation_id\", \"payload\"],\n \"properties\": {\n \"payload\": { \"$ref\": \"#/$defs/cancel_invoke_ack_response_payload\" }\n }\n }\n },\n {\n \"if\": { \"properties\": { \"frame_type\": { \"const\": \"compile_flight_register\" } }, \"required\": [\"frame_type\"] },\n \"then\": {\n \"required\": [\"parent_request_id\", \"runtime_generation_id\", \"payload\"],\n \"properties\": {\n \"payload\": { \"$ref\": \"#/$defs/compile_flight_lifecycle_payload\" }\n }\n }\n },\n {\n \"if\": { \"properties\": { \"frame_type\": { \"const\": \"compile_flight_complete\" } }, \"required\": [\"frame_type\"] },\n \"then\": {\n \"required\": [\"parent_request_id\", \"runtime_generation_id\", \"payload\"],\n \"properties\": {\n \"payload\": { \"$ref\": \"#/$defs/compile_flight_lifecycle_payload\" }\n }\n }\n },\n {\n \"if\": { \"properties\": { \"frame_type\": { \"const\": \"open_handle\" } }, \"required\": [\"frame_type\"] },\n \"then\": {\n \"required\": [\"runtime_generation_id\", \"payload\"],\n \"properties\": {\n \"payload\": {\n \"oneOf\": [\n { \"$ref\": \"#/$defs/open_handle_request_payload\" },\n { \"$ref\": \"#/$defs/open_handle_response_payload\" }\n ]\n }\n }\n }\n },\n {\n \"if\": { \"properties\": { \"frame_type\": { \"const\": \"validate_handle_grant\" } }, \"required\": [\"frame_type\"] },\n \"then\": {\n \"required\": [\"runtime_generation_id\", \"payload\"],\n \"properties\": {\n \"payload\": {\n \"oneOf\": [\n { \"$ref\": \"#/$defs/validate_handle_grant_request_payload\" },\n { \"$ref\": \"#/$defs/validate_handle_grant_response_payload\" }\n ]\n }\n }\n }\n },\n {\n \"if\": { \"properties\": { \"frame_type\": { \"const\": \"storage_file\" } }, \"required\": [\"frame_type\"] },\n \"then\": {\n \"required\": [\"runtime_generation_id\", \"payload\"],\n \"properties\": {\n \"payload\": {\n \"oneOf\": [\n { \"$ref\": \"#/$defs/storage_file_request_payload\" },\n { \"$ref\": \"#/$defs/storage_file_response_payload\" }\n ]\n }\n }\n }\n },\n {\n \"if\": { \"properties\": { \"frame_type\": { \"const\": \"storage_kv\" } }, \"required\": [\"frame_type\"] },\n \"then\": {\n \"required\": [\"runtime_generation_id\", \"payload\"],\n \"properties\": {\n \"payload\": {\n \"oneOf\": [\n { \"$ref\": \"#/$defs/storage_kv_request_payload\" },\n { \"$ref\": \"#/$defs/storage_kv_response_payload\" }\n ]\n }\n }\n }\n },\n {\n \"if\": { \"properties\": { \"frame_type\": { \"const\": \"storage_sqlite\" } }, \"required\": [\"frame_type\"] },\n \"then\": {\n \"required\": [\"runtime_generation_id\", \"payload\"],\n \"properties\": {\n \"payload\": {\n \"oneOf\": [\n { \"$ref\": \"#/$defs/storage_sqlite_request_payload\" },\n { \"$ref\": \"#/$defs/storage_sqlite_response_payload\" }\n ]\n }\n }\n }\n },\n {\n \"if\": { \"properties\": { \"frame_type\": { \"const\": \"network_grant\" } }, \"required\": [\"frame_type\"] },\n \"then\": {\n \"required\": [\"runtime_generation_id\", \"payload\"],\n \"properties\": {\n \"payload\": {\n \"oneOf\": [\n { \"$ref\": \"#/$defs/network_grant_request_payload\" },\n { \"$ref\": \"#/$defs/network_grant_response_payload\" }\n ]\n }\n }\n }\n },\n {\n \"if\": { \"properties\": { \"frame_type\": { \"const\": \"network_execute\" } }, \"required\": [\"frame_type\"] },\n \"then\": {\n \"required\": [\"runtime_generation_id\", \"payload\"],\n \"properties\": {\n \"payload\": {\n \"oneOf\": [\n { \"$ref\": \"#/$defs/network_execute_request_payload\" },\n { \"$ref\": \"#/$defs/network_execute_response_payload\" }\n ]\n }\n }\n }\n },\n {\n \"if\": { \"properties\": { \"frame_type\": { \"const\": \"revoke_epoch\" } }, \"required\": [\"frame_type\"] },\n \"then\": {\n \"required\": [\"runtime_generation_id\", \"payload\"],\n \"properties\": {\n \"payload\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"resource_scope\", \"plugin_instance_id\", \"revoke_epoch\"],\n \"properties\": {\n \"resource_scope\": { \"$ref\": \"#/$defs/environment_resource_scope\" },\n \"plugin_instance_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"revoke_epoch\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 9007199254740991 }\n }\n }\n }\n }\n },\n {\n \"if\": { \"properties\": { \"frame_type\": { \"const\": \"revoke_epoch_ack\" } }, \"required\": [\"frame_type\"] },\n \"then\": {\n \"required\": [\"runtime_generation_id\", \"payload\"],\n \"properties\": {\n \"payload\": { \"$ref\": \"#/$defs/revoke_epoch_ack_response_payload\" }\n }\n }\n },\n {\n \"if\": { \"properties\": { \"frame_type\": { \"const\": \"session_revoke\" } }, \"required\": [\"frame_type\"] },\n \"then\": {\n \"required\": [\"runtime_generation_id\", \"payload\"],\n \"properties\": {\n \"payload\": { \"$ref\": \"#/$defs/session_revoke_request_payload\" }\n }\n }\n },\n {\n \"if\": { \"properties\": { \"frame_type\": { \"const\": \"session_revoke_ack\" } }, \"required\": [\"frame_type\"] },\n \"then\": {\n \"required\": [\"runtime_generation_id\", \"payload\"],\n \"properties\": {\n \"payload\": { \"$ref\": \"#/$defs/session_revoke_ack_response_payload\" }\n }\n }\n },\n {\n \"if\": { \"properties\": { \"frame_type\": { \"const\": \"diagnostic\" } }, \"required\": [\"frame_type\"] },\n \"then\": { \"$ref\": \"#/$defs/runtime_response_frame\" }\n },\n {\n \"if\": {\n \"properties\": {\n \"frame_type\": {\n \"enum\": [\"compile_flight_register\", \"compile_flight_complete\", \"open_handle\", \"validate_handle_grant\", \"storage_file\", \"storage_kv\", \"storage_sqlite\", \"network_grant\", \"network_execute\"]\n }\n },\n \"required\": [\"frame_type\"]\n },\n \"then\": { \"required\": [\"parent_request_id\"] }\n }\n ],\n \"$defs\": {\n \"semver\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)(?:-(?:(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*)(?:\\\\.(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*))*))?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"runtime_target\": {\"type\": \"string\", \"enum\": [\"linux/amd64\", \"linux/arm64\"]},\n \"lower_sha256\": {\"type\": \"string\", \"pattern\": \"^[0-9a-f]{64}$\"},\n \"runtime_limits\": {\n \"type\": \"object\",\n \"description\": \"Negotiated runtime capacities. per_plugin_concurrency must not exceed worker_count. Route capacities are derived exactly from negotiated limits: active hostcall routes = worker_count, canceled hostcall retention = worker_count + queue_capacity, and compile-flight artifact routes = worker_count.\",\n \"additionalProperties\": false,\n \"required\": [\"worker_count\", \"queue_capacity\", \"per_plugin_concurrency\", \"module_cache_entries\", \"module_cache_source_bytes\"],\n \"properties\": {\n \"worker_count\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 64, \"description\": \"Number of runtime worker threads.\" },\n \"queue_capacity\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 64, \"description\": \"Maximum queued worker invocations.\" },\n \"per_plugin_concurrency\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 64, \"description\": \"Maximum concurrent invocations for one plugin; must not exceed worker_count.\" },\n \"module_cache_entries\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 1024, \"description\": \"Maximum compiled modules retained by the runtime cache.\" },\n \"module_cache_source_bytes\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 134217728, \"description\": \"Maximum source WASM bytes retained by the runtime cache (128 MiB).\" }\n }\n },\n \"process_containment\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"schema_version\", \"profile\", \"seccomp_policy_sha256\", \"no_new_privs\", \"seccomp_tsync\", \"process_creation_denied\", \"reexec_denied\", \"active\"],\n \"properties\": {\n \"schema_version\": { \"const\": \"redevplugin.process_containment.v1\" },\n \"profile\": { \"const\": \"linux-runtime-v1\" },\n \"seccomp_policy_sha256\": { \"const\": \"6305735925c1fbacaf4950df2e535d3a11cebec8ab7aa16ce37fca3c31745543\" },\n \"no_new_privs\": { \"const\": true },\n \"seccomp_tsync\": { \"const\": true },\n \"process_creation_denied\": { \"const\": true },\n \"reexec_denied\": { \"const\": true },\n \"active\": { \"const\": true }\n }\n },\n \"module_cache_metrics\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"hits\", \"misses\", \"compiles\", \"entries\", \"source_bytes\"],\n \"properties\": {\n \"hits\": { \"type\": \"integer\", \"minimum\": 0 },\n \"misses\": { \"type\": \"integer\", \"minimum\": 0 },\n \"compiles\": { \"type\": \"integer\", \"minimum\": 0 },\n \"entries\": { \"type\": \"integer\", \"minimum\": 0 },\n \"source_bytes\": { \"type\": \"integer\", \"minimum\": 0 }\n }\n },\n \"sha256\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[a-f0-9]{64}$\"\n },\n \"worker_artifact_path\": {\n \"type\": \"string\",\n \"pattern\": \"^workers/.+\\\\.wasm$\",\n \"not\": {\n \"anyOf\": [\n { \"pattern\": \"(^|/)\\\\.\" },\n { \"pattern\": \"//\" },\n { \"pattern\": \"\\\\\\\\\" }\n ]\n }\n },\n \"heartbeat_request_payload\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"sent_unix_nano\", \"max_staleness_ms\"],\n \"properties\": {\n \"sent_unix_nano\": { \"type\": \"integer\", \"minimum\": 1 },\n \"max_staleness_ms\": { \"type\": \"integer\", \"minimum\": 1 }\n }\n },\n \"heartbeat_response_payload\": {\n \"oneOf\": [\n {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"ok\", \"result\"],\n \"properties\": {\n \"ok\": { \"const\": true },\n \"result\": { \"$ref\": \"#/$defs/heartbeat_ack_result\" }\n }\n },\n {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"ok\", \"code\", \"message\", \"error_origin\"],\n \"properties\": {\n \"ok\": { \"const\": false },\n \"code\": { \"type\": \"string\", \"minLength\": 1 },\n \"message\": { \"type\": \"string\", \"minLength\": 1 },\n \"error_origin\": { \"enum\": [\"runtime\", \"hostcall\", \"plugin\"] }\n }\n }\n ]\n },\n \"heartbeat_ack_result\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"runtime_generation_id\",\n \"runtime_unix_nano\",\n \"max_staleness_ms\",\n \"host_sent_unix_nano\",\n \"active_invocations\",\n \"queued_invocations\",\n \"limits\",\n \"module_cache\"\n ],\n \"properties\": {\n \"runtime_generation_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"runtime_unix_nano\": { \"type\": \"integer\", \"minimum\": 1 },\n \"max_staleness_ms\": { \"type\": \"integer\", \"minimum\": 1 },\n \"host_sent_unix_nano\": { \"type\": \"integer\", \"minimum\": 1 },\n \"active_invocations\": { \"type\": \"integer\", \"minimum\": 0 },\n \"queued_invocations\": { \"type\": \"integer\", \"minimum\": 0 },\n \"limits\": { \"$ref\": \"#/$defs/runtime_limits\" },\n \"module_cache\": { \"$ref\": \"#/$defs/module_cache_metrics\" }\n }\n },\n \"cancel_invoke_ack_response_payload\": {\n \"oneOf\": [\n {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"ok\", \"result\"],\n \"properties\": {\n \"ok\": { \"const\": true },\n \"result\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"invocation_request_id\", \"disposition\"],\n \"properties\": {\n \"invocation_request_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"disposition\": { \"enum\": [\"queued\", \"running\", \"complete\"] }\n }\n }\n }\n },\n {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"ok\", \"code\", \"message\", \"error_origin\"],\n \"properties\": {\n \"ok\": { \"const\": false },\n \"code\": { \"type\": \"string\", \"minLength\": 1 },\n \"message\": { \"type\": \"string\", \"minLength\": 1 },\n \"error_origin\": { \"enum\": [\"runtime\", \"hostcall\", \"plugin\"] }\n }\n }\n ]\n },\n \"hostcall_failure_response_payload\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"ok\", \"code\", \"message\", \"error_origin\"],\n \"properties\": {\n \"ok\": { \"const\": false },\n \"code\": { \"type\": \"string\", \"minLength\": 1, \"maxLength\": 128, \"pattern\": \"^[A-Z][A-Z0-9_]{0,127}$\" },\n \"message\": { \"type\": \"string\", \"minLength\": 1, \"maxLength\": 4096 },\n \"error_origin\": { \"const\": \"hostcall\" }\n }\n },\n \"compile_flight_lifecycle_payload\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"artifact_request_id\", \"package_hash\", \"artifact\", \"artifact_sha256\", \"wasm_abi_version\"],\n \"properties\": {\n \"artifact_request_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"package_hash\": { \"$ref\": \"#/$defs/sha256\" },\n \"artifact\": { \"$ref\": \"#/$defs/worker_artifact_path\" },\n \"artifact_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"wasm_abi_version\": { \"const\": \"redevplugin-wasm-worker-v2\" }\n }\n },\n \"open_handle_request_payload\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"package_hash\", \"artifact\", \"artifact_sha256\"],\n \"properties\": {\n \"package_hash\": { \"$ref\": \"#/$defs/sha256\" },\n \"artifact\": { \"$ref\": \"#/$defs/worker_artifact_path\" },\n \"artifact_sha256\": { \"$ref\": \"#/$defs/sha256\" }\n }\n },\n \"open_handle_response_payload\": {\n \"oneOf\": [\n {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"ok\", \"package_hash\", \"artifact\", \"sha256\", \"content_base64\"],\n \"properties\": {\n \"ok\": { \"const\": true },\n \"package_hash\": { \"$ref\": \"#/$defs/sha256\" },\n \"artifact\": { \"$ref\": \"#/$defs/worker_artifact_path\" },\n \"sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"content_base64\": { \"type\": \"string\", \"contentEncoding\": \"base64\" }\n }\n },\n { \"$ref\": \"#/$defs/hostcall_failure_response_payload\" }\n ]\n },\n \"validate_handle_grant_request_payload\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"handle_grant_token\",\n \"plugin_instance_id\",\n \"active_fingerprint\",\n \"runtime_instance_id\",\n \"runtime_generation_id\",\n \"runtime_shard_id\",\n \"owner_session_hash\",\n \"owner_user_hash\",\n \"owner_env_hash\",\n \"session_channel_id_hash\",\n \"handle_id\",\n \"method\",\n \"resource_scope\",\n \"policy_revision\",\n \"management_revision\",\n \"revoke_epoch\"\n ],\n \"properties\": {\n \"handle_grant_token\": { \"type\": \"string\", \"minLength\": 1 },\n \"plugin_instance_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"active_fingerprint\": { \"type\": \"string\", \"minLength\": 1 },\n \"runtime_instance_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"runtime_generation_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"runtime_shard_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"owner_session_hash\": { \"type\": \"string\", \"minLength\": 1 },\n \"owner_user_hash\": { \"type\": \"string\", \"minLength\": 1 },\n \"owner_env_hash\": { \"type\": \"string\", \"minLength\": 1 },\n \"session_channel_id_hash\": { \"type\": \"string\", \"minLength\": 1 },\n \"handle_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"method\": { \"type\": \"string\", \"minLength\": 1 },\n \"resource_scope\": { \"$ref\": \"#/$defs/resource_scope\" },\n \"policy_revision\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 9007199254740991 },\n \"management_revision\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 9007199254740991 },\n \"revoke_epoch\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 9007199254740991 }\n }\n },\n \"validate_handle_grant_response_payload\": {\n \"oneOf\": [\n {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"ok\", \"handle_grant_id\", \"handle_id\", \"method\", \"runtime_generation_id\", \"resource_scope\"],\n \"properties\": {\n \"ok\": { \"const\": true },\n \"handle_grant_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"handle_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"method\": { \"type\": \"string\", \"minLength\": 1 },\n \"runtime_generation_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"resource_scope\": { \"$ref\": \"#/$defs/resource_scope\" },\n \"max_bytes_per_second\": { \"type\": \"integer\", \"minimum\": 0 },\n \"max_total_bytes\": { \"type\": \"integer\", \"minimum\": 0 }\n }\n },\n { \"$ref\": \"#/$defs/hostcall_failure_response_payload\" }\n ]\n },\n \"storage_file_request_payload\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"handle_grant_token\",\n \"plugin_instance_id\",\n \"active_fingerprint\",\n \"runtime_instance_id\",\n \"runtime_generation_id\",\n \"runtime_shard_id\",\n \"handle_id\",\n \"method\",\n \"resource_scope\",\n \"policy_revision\",\n \"management_revision\",\n \"revoke_epoch\",\n \"operation\",\n \"store_id\"\n ],\n \"properties\": {\n \"handle_grant_token\": { \"type\": \"string\", \"minLength\": 1 },\n \"plugin_instance_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"active_fingerprint\": { \"type\": \"string\", \"minLength\": 1 },\n \"runtime_instance_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"runtime_generation_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"runtime_shard_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"handle_id\": { \"type\": \"string\", \"pattern\": \"^storage:[A-Za-z0-9_.-]+$\" },\n \"method\": { \"const\": \"storage.files\" },\n \"resource_scope\": { \"$ref\": \"#/$defs/resource_scope\" },\n \"policy_revision\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 9007199254740991 },\n \"management_revision\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 9007199254740991 },\n \"revoke_epoch\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 9007199254740991 },\n \"operation\": { \"enum\": [\"read\", \"write\", \"delete\", \"list\"] },\n \"store_id\": { \"type\": \"string\", \"pattern\": \"^[A-Za-z0-9_.-]+$\" },\n \"path\": { \"type\": \"string\" },\n \"data_base64\": { \"type\": \"string\", \"contentEncoding\": \"base64\" },\n \"max_bytes\": { \"type\": \"integer\", \"minimum\": 0 },\n \"max_entries\": { \"type\": \"integer\", \"minimum\": 0 },\n \"recursive\": { \"type\": \"boolean\" }\n }\n },\n \"storage_file_response_payload\": {\n \"oneOf\": [\n { \"$ref\": \"#/$defs/storage_file_read_success_response_payload\" },\n { \"$ref\": \"#/$defs/storage_file_write_success_response_payload\" },\n { \"$ref\": \"#/$defs/storage_file_delete_success_response_payload\" },\n { \"$ref\": \"#/$defs/storage_file_list_success_response_payload\" },\n { \"$ref\": \"#/$defs/hostcall_failure_response_payload\" }\n ]\n },\n \"storage_file_read_success_response_payload\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"ok\", \"path\", \"data_base64\", \"size_bytes\", \"usage\"],\n \"properties\": {\n \"ok\": { \"const\": true },\n \"path\": { \"type\": \"string\" },\n \"data_base64\": { \"type\": \"string\", \"contentEncoding\": \"base64\" },\n \"size_bytes\": { \"type\": \"integer\", \"minimum\": 0 },\n \"usage\": { \"$ref\": \"#/$defs/storage_usage\" }\n }\n },\n \"storage_file_write_success_response_payload\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"ok\", \"path\", \"size_bytes\", \"usage\"],\n \"properties\": {\n \"ok\": { \"const\": true },\n \"path\": { \"type\": \"string\" },\n \"size_bytes\": { \"type\": \"integer\", \"minimum\": 0 },\n \"usage\": { \"$ref\": \"#/$defs/storage_usage\" }\n }\n },\n \"storage_file_delete_success_response_payload\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"ok\", \"path\"],\n \"properties\": {\n \"ok\": { \"const\": true },\n \"path\": { \"type\": \"string\" }\n }\n },\n \"storage_file_list_success_response_payload\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"ok\", \"path\", \"entries\", \"usage\"],\n \"properties\": {\n \"ok\": { \"const\": true },\n \"path\": { \"type\": \"string\" },\n \"entries\": {\n \"type\": \"array\",\n \"items\": { \"$ref\": \"#/$defs/storage_file_entry\" }\n },\n \"usage\": { \"$ref\": \"#/$defs/storage_usage\" }\n }\n },\n \"storage_file_entry\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"path\", \"dir\", \"updated_at\"],\n \"properties\": {\n \"path\": { \"type\": \"string\", \"minLength\": 1 },\n \"dir\": { \"type\": \"boolean\" },\n \"size_bytes\": { \"type\": \"integer\", \"minimum\": 0 },\n \"updated_at\": { \"type\": \"string\", \"format\": \"date-time\" }\n }\n },\n \"storage_kv_request_payload\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"handle_grant_token\",\n \"plugin_instance_id\",\n \"active_fingerprint\",\n \"runtime_instance_id\",\n \"runtime_generation_id\",\n \"runtime_shard_id\",\n \"handle_id\",\n \"method\",\n \"resource_scope\",\n \"policy_revision\",\n \"management_revision\",\n \"revoke_epoch\",\n \"operation\",\n \"store_id\"\n ],\n \"properties\": {\n \"handle_grant_token\": { \"type\": \"string\", \"minLength\": 1 },\n \"plugin_instance_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"active_fingerprint\": { \"type\": \"string\", \"minLength\": 1 },\n \"runtime_instance_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"runtime_generation_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"runtime_shard_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"handle_id\": { \"type\": \"string\", \"pattern\": \"^storage:[A-Za-z0-9_.-]+$\" },\n \"method\": { \"const\": \"storage.kv\" },\n \"resource_scope\": { \"$ref\": \"#/$defs/resource_scope\" },\n \"policy_revision\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 9007199254740991 },\n \"management_revision\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 9007199254740991 },\n \"revoke_epoch\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 9007199254740991 },\n \"operation\": { \"enum\": [\"get\", \"put\", \"delete\", \"list\"] },\n \"store_id\": { \"type\": \"string\", \"pattern\": \"^[A-Za-z0-9_.-]+$\" },\n \"key\": { \"type\": \"string\" },\n \"value_base64\": { \"type\": \"string\", \"contentEncoding\": \"base64\" },\n \"prefix\": { \"type\": \"string\" },\n \"max_bytes\": { \"type\": \"integer\", \"minimum\": 0 },\n \"max_entries\": { \"type\": \"integer\", \"minimum\": 0 }\n }\n },\n \"storage_kv_response_payload\": {\n \"oneOf\": [\n { \"$ref\": \"#/$defs/storage_kv_get_success_response_payload\" },\n { \"$ref\": \"#/$defs/storage_kv_put_success_response_payload\" },\n { \"$ref\": \"#/$defs/storage_kv_delete_success_response_payload\" },\n { \"$ref\": \"#/$defs/storage_kv_list_success_response_payload\" },\n { \"$ref\": \"#/$defs/hostcall_failure_response_payload\" }\n ]\n },\n \"storage_kv_get_success_response_payload\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"ok\", \"key\", \"value_base64\", \"size_bytes\", \"usage\"],\n \"properties\": {\n \"ok\": { \"const\": true },\n \"key\": { \"type\": \"string\" },\n \"value_base64\": { \"type\": \"string\", \"contentEncoding\": \"base64\" },\n \"size_bytes\": { \"type\": \"integer\", \"minimum\": 0 },\n \"usage\": { \"$ref\": \"#/$defs/storage_usage\" }\n }\n },\n \"storage_kv_put_success_response_payload\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"ok\", \"key\", \"size_bytes\", \"usage\"],\n \"properties\": {\n \"ok\": { \"const\": true },\n \"key\": { \"type\": \"string\" },\n \"size_bytes\": { \"type\": \"integer\", \"minimum\": 0 },\n \"usage\": { \"$ref\": \"#/$defs/storage_usage\" }\n }\n },\n \"storage_kv_delete_success_response_payload\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"ok\", \"key\"],\n \"properties\": {\n \"ok\": { \"const\": true },\n \"key\": { \"type\": \"string\" }\n }\n },\n \"storage_kv_list_success_response_payload\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"ok\", \"entries\", \"usage\"],\n \"properties\": {\n \"ok\": { \"const\": true },\n \"prefix\": { \"type\": \"string\" },\n \"entries\": {\n \"type\": \"array\",\n \"items\": { \"$ref\": \"#/$defs/storage_kv_entry\" }\n },\n \"usage\": { \"$ref\": \"#/$defs/storage_usage\" }\n }\n },\n \"storage_kv_entry\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"key\", \"size_bytes\", \"updated_at\"],\n \"properties\": {\n \"key\": { \"type\": \"string\", \"minLength\": 1 },\n \"size_bytes\": { \"type\": \"integer\", \"minimum\": 0 },\n \"updated_at\": { \"type\": \"string\", \"format\": \"date-time\" }\n }\n },\n \"storage_sqlite_request_payload\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"handle_grant_token\",\n \"plugin_instance_id\",\n \"active_fingerprint\",\n \"runtime_instance_id\",\n \"runtime_generation_id\",\n \"runtime_shard_id\",\n \"handle_id\",\n \"method\",\n \"resource_scope\",\n \"policy_revision\",\n \"management_revision\",\n \"revoke_epoch\",\n \"operation\",\n \"store_id\",\n \"sql\"\n ],\n \"properties\": {\n \"handle_grant_token\": { \"type\": \"string\", \"minLength\": 1 },\n \"plugin_instance_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"active_fingerprint\": { \"type\": \"string\", \"minLength\": 1 },\n \"runtime_instance_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"runtime_generation_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"runtime_shard_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"handle_id\": { \"type\": \"string\", \"pattern\": \"^storage:[A-Za-z0-9_.-]+$\" },\n \"method\": { \"const\": \"storage.sqlite\" },\n \"resource_scope\": { \"$ref\": \"#/$defs/resource_scope\" },\n \"policy_revision\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 9007199254740991 },\n \"management_revision\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 9007199254740991 },\n \"revoke_epoch\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 9007199254740991 },\n \"operation\": { \"enum\": [\"exec\", \"query\"] },\n \"store_id\": { \"type\": \"string\", \"pattern\": \"^[A-Za-z0-9_.-]+$\" },\n \"database\": { \"type\": \"string\" },\n \"sql\": { \"type\": \"string\", \"minLength\": 1 },\n \"args\": {\n \"type\": \"array\",\n \"items\": { \"$ref\": \"#/$defs/storage_sqlite_value\" }\n },\n \"max_rows\": { \"type\": \"integer\", \"minimum\": 0 },\n \"max_response_bytes\": { \"type\": \"integer\", \"minimum\": 0 },\n \"timeout_ms\": { \"type\": \"integer\", \"minimum\": 0 }\n }\n },\n \"storage_sqlite_response_payload\": {\n \"oneOf\": [\n { \"$ref\": \"#/$defs/storage_sqlite_exec_success_response_payload\" },\n { \"$ref\": \"#/$defs/storage_sqlite_query_success_response_payload\" },\n { \"$ref\": \"#/$defs/hostcall_failure_response_payload\" }\n ]\n },\n \"storage_sqlite_exec_success_response_payload\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"ok\", \"database\", \"rows_affected\", \"usage\"],\n \"properties\": {\n \"ok\": { \"const\": true },\n \"database\": { \"type\": \"string\" },\n \"rows_affected\": { \"type\": \"integer\", \"minimum\": 0 },\n \"last_insert_id\": { \"type\": \"integer\", \"minimum\": 0 },\n \"usage\": { \"$ref\": \"#/$defs/storage_usage\" }\n }\n },\n \"storage_sqlite_query_success_response_payload\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"ok\", \"database\", \"columns\", \"rows\", \"usage\"],\n \"properties\": {\n \"ok\": { \"const\": true },\n \"database\": { \"type\": \"string\" },\n \"columns\": {\n \"type\": \"array\",\n \"items\": { \"type\": \"string\" }\n },\n \"rows\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"array\",\n \"items\": { \"$ref\": \"#/$defs/storage_sqlite_value\" }\n }\n },\n \"usage\": { \"$ref\": \"#/$defs/storage_usage\" }\n }\n },\n \"storage_sqlite_value\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"oneOf\": [\n { \"required\": [\"null\"], \"properties\": { \"null\": { \"const\": true } } },\n { \"required\": [\"int\"] },\n { \"required\": [\"float\"] },\n { \"required\": [\"text\"] },\n { \"required\": [\"blob_base64\"] }\n ],\n \"properties\": {\n \"null\": { \"type\": \"boolean\" },\n \"int\": { \"type\": \"integer\" },\n \"float\": { \"type\": \"number\" },\n \"text\": { \"type\": \"string\" },\n \"blob_base64\": { \"type\": \"string\", \"contentEncoding\": \"base64\" }\n }\n },\n \"storage_usage\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"plugin_instance_id\", \"store_id\", \"usage_bytes\", \"quota_bytes\", \"usage_files\", \"quota_files\"],\n \"properties\": {\n \"plugin_instance_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"store_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"usage_bytes\": { \"type\": \"integer\", \"minimum\": 0 },\n \"quota_bytes\": { \"type\": \"integer\", \"minimum\": 0 },\n \"usage_files\": { \"type\": \"integer\", \"minimum\": 0 },\n \"quota_files\": { \"type\": \"integer\", \"minimum\": 0 }\n }\n },\n \"network_grant_request_payload\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"plugin_instance_id\",\n \"active_fingerprint\",\n \"resource_scope\",\n \"runtime_instance_id\",\n \"runtime_generation_id\",\n \"runtime_shard_id\",\n \"policy_revision\",\n \"management_revision\",\n \"revoke_epoch\",\n \"connector_id\",\n \"transport\",\n \"destination\"\n ],\n \"properties\": {\n \"plugin_instance_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"active_fingerprint\": { \"type\": \"string\", \"minLength\": 1 },\n \"resource_scope\": { \"$ref\": \"#/$defs/resource_scope\" },\n \"runtime_instance_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"runtime_generation_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"runtime_shard_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"policy_revision\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 9007199254740991 },\n \"management_revision\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 9007199254740991 },\n \"revoke_epoch\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 9007199254740991 },\n \"connector_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"transport\": { \"enum\": [\"http\", \"websocket\", \"tcp\", \"udp\"] },\n \"destination\": { \"type\": \"string\", \"minLength\": 1 },\n \"ttl_ms\": { \"type\": \"integer\", \"minimum\": 0 }\n }\n },\n \"network_grant_response_payload\": {\n \"oneOf\": [\n {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"ok\", \"grant_id\", \"plugin_instance_id\", \"active_fingerprint\",\n \"resource_scope\",\n \"policy_revision\", \"management_revision\", \"revoke_epoch\", \"connector_id\",\n \"transport\", \"destination\", \"runtime_generation_id\",\n \"target_classifier_version\", \"expires_at\"\n ],\n \"properties\": {\n \"ok\": { \"const\": true },\n \"grant_id\": { \"type\": \"string\", \"pattern\": \"^netgrant_[0-9a-f]{32}$\" },\n \"plugin_instance_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"active_fingerprint\": { \"type\": \"string\", \"minLength\": 1 },\n \"resource_scope\": { \"$ref\": \"#/$defs/resource_scope\" },\n \"policy_revision\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 9007199254740991 },\n \"management_revision\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 9007199254740991 },\n \"revoke_epoch\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 9007199254740991 },\n \"connector_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"transport\": { \"enum\": [\"http\", \"websocket\", \"tcp\", \"udp\"] },\n \"destination\": { \"$ref\": \"#/$defs/network_destination\" },\n \"runtime_generation_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"target_classifier_version\": { \"const\": \"target-classifier-v2\" },\n \"expires_at\": { \"type\": \"string\", \"format\": \"date-time\" }\n }\n },\n { \"$ref\": \"#/$defs/hostcall_failure_response_payload\" }\n ]\n },\n \"network_execute_request_payload\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"plugin_id\",\n \"plugin_instance_id\",\n \"active_fingerprint\",\n \"resource_scope\",\n \"runtime_instance_id\",\n \"runtime_generation_id\",\n \"runtime_shard_id\",\n \"policy_revision\",\n \"management_revision\",\n \"revoke_epoch\",\n \"connector_id\",\n \"transport\",\n \"destination\",\n \"owner_session_hash\",\n \"owner_user_hash\",\n \"owner_env_hash\",\n \"session_channel_id_hash\"\n ],\n \"properties\": {\n \"plugin_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"plugin_instance_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"active_fingerprint\": { \"type\": \"string\", \"minLength\": 1 },\n \"resource_scope\": { \"$ref\": \"#/$defs/resource_scope\" },\n \"runtime_instance_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"runtime_generation_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"runtime_shard_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"policy_revision\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 9007199254740991 },\n \"management_revision\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 9007199254740991 },\n \"revoke_epoch\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 9007199254740991 },\n \"connector_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"transport\": { \"enum\": [\"http\", \"websocket\", \"tcp\", \"udp\"] },\n \"destination\": { \"type\": \"string\", \"minLength\": 1 },\n \"ttl_ms\": { \"type\": \"integer\", \"minimum\": 0 },\n \"operation\": { \"enum\": [\"http\", \"http_stream\", \"websocket_round_trip\", \"tcp_round_trip\", \"udp_round_trip\"] },\n \"method\": { \"type\": \"string\", \"minLength\": 1 },\n \"path\": { \"type\": \"string\" },\n \"query\": {\n \"type\": \"object\",\n \"additionalProperties\": {\n \"type\": \"array\",\n \"items\": { \"type\": \"string\" }\n }\n },\n \"headers\": {\n \"type\": \"object\",\n \"additionalProperties\": {\n \"type\": \"array\",\n \"items\": { \"type\": \"string\" }\n }\n },\n \"message_type\": { \"enum\": [\"text\", \"binary\"] },\n \"body_base64\": { \"type\": \"string\", \"contentEncoding\": \"base64\" },\n \"payload_base64\": { \"type\": \"string\", \"contentEncoding\": \"base64\" },\n \"max_request_bytes\": { \"type\": \"integer\", \"minimum\": 0 },\n \"max_response_bytes\": { \"type\": \"integer\", \"minimum\": 0 },\n \"max_chunk_bytes\": { \"type\": \"integer\", \"minimum\": 0 },\n \"max_buffered_bytes\": { \"type\": \"integer\", \"minimum\": 0 },\n \"timeout_ms\": { \"type\": \"integer\", \"minimum\": 0 },\n \"stream_id\": { \"type\": \"string\" },\n \"stream_method\": { \"type\": \"string\" },\n \"stream_effect\": { \"enum\": [\"read\", \"write\", \"execute\", \"delete\", \"admin\"] },\n \"stream_execution\": { \"enum\": [\"sync\", \"operation\", \"subscription\"] },\n \"surface_instance_id\": { \"type\": \"string\" },\n \"owner_session_hash\": { \"type\": \"string\" },\n \"owner_user_hash\": { \"type\": \"string\" },\n \"owner_env_hash\": { \"type\": \"string\", \"minLength\": 1 },\n \"session_channel_id_hash\": { \"type\": \"string\" },\n \"bridge_channel_id\": { \"type\": \"string\" },\n \"content_type\": { \"type\": \"string\" }\n }\n },\n \"network_execute_response_payload\": {\n \"oneOf\": [\n {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"ok\", \"transport\", \"destination\", \"grant_id\", \"connector_id\", \"runtime_generation_id\"],\n \"properties\": {\n \"ok\": { \"const\": true },\n \"transport\": { \"enum\": [\"http\", \"websocket\", \"tcp\", \"udp\"] },\n \"destination\": { \"$ref\": \"#/$defs/network_destination\" },\n \"status_code\": { \"type\": \"integer\", \"minimum\": 100, \"maximum\": 599 },\n \"headers\": {\n \"type\": \"object\",\n \"additionalProperties\": {\n \"type\": \"array\",\n \"items\": { \"type\": \"string\" }\n }\n },\n \"message_type\": { \"enum\": [\"text\", \"binary\"] },\n \"body_base64\": { \"type\": \"string\", \"contentEncoding\": \"base64\" },\n \"payload_base64\": { \"type\": \"string\", \"contentEncoding\": \"base64\" },\n \"stream_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"bytes_read\": { \"type\": \"integer\", \"minimum\": 0 },\n \"chunk_count\": { \"type\": \"integer\", \"minimum\": 0 },\n \"grant_id\": { \"type\": \"string\", \"pattern\": \"^netgrant_[0-9a-f]{32}$\" },\n \"connector_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"runtime_generation_id\": { \"type\": \"string\", \"minLength\": 1 }\n }\n },\n { \"$ref\": \"#/$defs/hostcall_failure_response_payload\" }\n ]\n },\n \"resource_scope\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"kind\", \"owner_env_hash\"],\n \"properties\": {\n \"kind\": { \"enum\": [\"user\", \"environment\"] },\n \"owner_env_hash\": { \"type\": \"string\", \"pattern\": \"^[A-Za-z0-9][A-Za-z0-9._:-]{0,255}$\" },\n \"owner_user_hash\": { \"type\": \"string\", \"pattern\": \"^[A-Za-z0-9][A-Za-z0-9._:-]{0,255}$\" }\n },\n \"oneOf\": [\n { \"properties\": { \"kind\": { \"const\": \"user\" } }, \"required\": [\"owner_user_hash\"] },\n { \"properties\": { \"kind\": { \"const\": \"environment\" } }, \"not\": { \"required\": [\"owner_user_hash\"] } }\n ]\n },\n \"environment_resource_scope\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"kind\", \"owner_env_hash\"],\n \"properties\": {\n \"kind\": { \"const\": \"environment\" },\n \"owner_env_hash\": { \"type\": \"string\", \"pattern\": \"^[A-Za-z0-9][A-Za-z0-9._:-]{0,255}$\" }\n }\n },\n \"network_destination\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"transport\", \"host\", \"port\"],\n \"properties\": {\n \"transport\": { \"enum\": [\"http\", \"websocket\", \"tcp\", \"udp\"] },\n \"scheme\": { \"enum\": [\"http\", \"https\", \"ws\", \"wss\"] },\n \"host\": { \"type\": \"string\", \"minLength\": 1 },\n \"port\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 65535 }\n }\n },\n \"revoke_epoch_ack_response_payload\": {\n \"oneOf\": [\n {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"ok\", \"result\"],\n \"properties\": {\n \"ok\": { \"const\": true },\n \"result\": { \"$ref\": \"#/$defs/revoke_epoch_ack_result\" }\n }\n },\n {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"ok\", \"code\", \"message\", \"error_origin\"],\n \"properties\": {\n \"ok\": { \"const\": false },\n \"code\": { \"type\": \"string\", \"minLength\": 1 },\n \"message\": { \"type\": \"string\", \"minLength\": 1 },\n \"error_origin\": { \"enum\": [\"runtime\", \"hostcall\", \"plugin\"] }\n }\n }\n ]\n },\n \"revoke_epoch_ack_result\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"resource_scope\",\n \"plugin_instance_id\",\n \"revoke_epoch\",\n \"closed_socket_count\",\n \"closed_stream_count\",\n \"closed_storage_handle_count\"\n ],\n \"properties\": {\n \"resource_scope\": { \"$ref\": \"#/$defs/environment_resource_scope\" },\n \"plugin_instance_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"revoke_epoch\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 9007199254740991 },\n \"closed_socket_count\": { \"type\": \"integer\", \"minimum\": 0 },\n \"closed_stream_count\": { \"type\": \"integer\", \"minimum\": 0 },\n \"closed_storage_handle_count\": { \"type\": \"integer\", \"minimum\": 0 }\n }\n },\n \"session_revoke_request_payload\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"session_revoke_sequence\",\n \"owner_session_hash\",\n \"owner_user_hash\",\n \"owner_env_hash\",\n \"session_channel_id_hash\"\n ],\n \"properties\": {\n \"session_revoke_sequence\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 9007199254740991 },\n \"owner_session_hash\": { \"$ref\": \"#/$defs/session_owner_hash\" },\n \"owner_user_hash\": { \"$ref\": \"#/$defs/session_owner_hash\" },\n \"owner_env_hash\": { \"$ref\": \"#/$defs/session_owner_hash\" },\n \"session_channel_id_hash\": { \"$ref\": \"#/$defs/session_owner_hash\" }\n }\n },\n \"session_owner_hash\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z0-9][A-Za-z0-9._:-]{0,255}$\"\n },\n \"session_revoke_ack_response_payload\": {\n \"oneOf\": [\n {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"ok\", \"result\"],\n \"properties\": {\n \"ok\": { \"const\": true },\n \"result\": { \"$ref\": \"#/$defs/session_revoke_ack_result\" }\n }\n },\n {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"ok\", \"code\", \"message\", \"error_origin\"],\n \"properties\": {\n \"ok\": { \"const\": false },\n \"code\": {\n \"enum\": [\n \"SESSION_REVOKE_SEQUENCE_STALE\",\n \"SESSION_REVOKE_DRAIN_TIMEOUT\",\n \"WORKER_INVOCATION_INVALID\"\n ]\n },\n \"message\": { \"type\": \"string\", \"minLength\": 1, \"maxLength\": 4096 },\n \"error_origin\": { \"const\": \"runtime\" }\n }\n }\n ]\n },\n \"session_revoke_ack_result\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"session_revoke_sequence\", \"state\", \"counts\"],\n \"properties\": {\n \"session_revoke_sequence\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 9007199254740991 },\n \"state\": { \"const\": \"complete\" },\n \"counts\": { \"$ref\": \"#/$defs/session_revoke_ack_counts\" }\n }\n },\n \"session_revoke_ack_counts\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"queued_invocations\",\n \"running_invocations\",\n \"storage_hostcalls\",\n \"active_network_requests\",\n \"sockets\",\n \"network_streams\"\n ],\n \"properties\": {\n \"queued_invocations\": { \"$ref\": \"#/$defs/session_revoke_count\" },\n \"running_invocations\": { \"$ref\": \"#/$defs/session_revoke_count\" },\n \"storage_hostcalls\": { \"$ref\": \"#/$defs/session_revoke_count\" },\n \"active_network_requests\": { \"$ref\": \"#/$defs/session_revoke_count\" },\n \"sockets\": { \"$ref\": \"#/$defs/session_revoke_count\" },\n \"network_streams\": { \"$ref\": \"#/$defs/session_revoke_count\" }\n }\n },\n \"session_revoke_count\": {\n \"type\": \"integer\",\n \"minimum\": 0,\n \"maximum\": 9007199254740991\n },\n \"runtime_response_frame\": {\n \"required\": [\"runtime_generation_id\", \"payload\"],\n \"properties\": {\n \"payload\": {\n \"oneOf\": [\n {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"ok\", \"result\"],\n \"properties\": {\n \"ok\": { \"const\": true },\n \"result\": true\n }\n },\n {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"ok\", \"code\", \"message\", \"error_origin\"],\n \"properties\": {\n \"ok\": { \"const\": false },\n \"code\": { \"type\": \"string\", \"minLength\": 1 },\n \"message\": { \"type\": \"string\", \"minLength\": 1 },\n \"error_origin\": { \"enum\": [\"runtime\", \"hostcall\", \"plugin\"] }\n }\n }\n ]\n }\n }\n }\n }\n}\n".as_bytes();
241static CONTRACT_BODY_SESSION_SCOPE_MAINTENANCE_CONTRACT: &[u8] = "{\n \"schema_version\": \"redevplugin.session_scope_maintenance.v1\",\n \"go_host_protocol_version\": \"plugin-host-v7\",\n \"adapter_capability\": {\n \"name\": \"SessionLifecycleMaintenanceAdapter\",\n \"version\": \"v1\",\n \"registration\": \"optional\",\n \"legacy_behavior\": \"retain_fence\"\n },\n \"visibility\": {\n \"transport\": \"go_host_only\",\n \"http_route\": false,\n \"plugin_callable\": false,\n \"teardown_identity\": \"opaque\"\n },\n \"phases\": [\"prepared\", \"closed\", \"finalizing\"],\n \"teardown_statuses\": [\"incomplete\", \"complete\", \"absent\"],\n \"finalization_statuses\": [\"finalized\", \"absent\"],\n \"platform_commit_point\": \"fence_deleted\",\n \"default_behavior\": \"fail_closed_without_mutation\",\n \"allowed_states\": [\n {\n \"fence\": \"absent\",\n \"record\": \"absent\",\n \"terminal_evidence\": \"absent\",\n \"identity_binding\": \"absent\",\n \"close\": \"absent\",\n \"resume\": \"absent\",\n \"finalize\": \"absent\"\n },\n {\n \"fence\": \"absent\",\n \"record\": \"terminal_intent\",\n \"terminal_evidence\": \"required\",\n \"identity_binding\": \"absent\",\n \"close\": \"prepare_and_begin_teardown\",\n \"resume\": \"fail_closed\",\n \"finalize\": \"fail_closed\"\n },\n {\n \"fence\": \"absent\",\n \"record\": \"prepared\",\n \"terminal_evidence\": \"required\",\n \"identity_binding\": \"exact\",\n \"close\": \"fail_closed\",\n \"resume\": \"begin_teardown\",\n \"finalize\": \"fail_closed\"\n },\n {\n \"fence\": \"draining_or_incomplete\",\n \"record\": \"prepared_or_closed\",\n \"terminal_evidence\": \"optional\",\n \"identity_binding\": \"exact\",\n \"close\": \"fail_closed\",\n \"resume\": \"continue_teardown\",\n \"finalize\": \"fail_closed\"\n },\n {\n \"fence\": \"complete\",\n \"record\": \"closed\",\n \"terminal_evidence\": \"required\",\n \"identity_binding\": \"exact\",\n \"close\": \"fail_closed\",\n \"resume\": \"complete\",\n \"finalize\": \"prepare_delete_fence_commit\"\n },\n {\n \"fence\": \"complete\",\n \"record\": \"finalizing\",\n \"terminal_evidence\": \"required\",\n \"identity_binding\": \"exact\",\n \"close\": \"fail_closed\",\n \"resume\": \"handoff_to_finalization\",\n \"finalize\": \"delete_fence_and_commit\"\n },\n {\n \"fence\": \"absent\",\n \"record\": \"finalizing\",\n \"terminal_evidence\": \"required\",\n \"identity_binding\": \"exact\",\n \"close\": \"fail_closed\",\n \"resume\": \"handoff_to_finalization\",\n \"finalize\": \"post_commit_cleanup\"\n }\n ]\n}\n".as_bytes();
242static CONTRACT_BODY_SESSION_SCOPE_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/session-scope-v1.schema.json\",\n \"title\": \"ReDevPlugin session scope lifecycle v1\",\n \"description\": \"Exact authenticated-session ownership, teardown phases, and public revoke results. Teardown identities and closed-session proofs are intentionally excluded from every wire shape.\",\n \"$ref\": \"#/$defs/public_revoke_result\",\n \"$defs\": {\n \"owner_hash\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z0-9][A-Za-z0-9._:-]{0,255}$\"\n },\n \"session_scope\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"owner_session_hash\",\n \"owner_user_hash\",\n \"owner_env_hash\",\n \"session_channel_id_hash\"\n ],\n \"properties\": {\n \"owner_session_hash\": { \"$ref\": \"#/$defs/owner_hash\" },\n \"owner_user_hash\": { \"$ref\": \"#/$defs/owner_hash\" },\n \"owner_env_hash\": { \"$ref\": \"#/$defs/owner_hash\" },\n \"session_channel_id_hash\": { \"$ref\": \"#/$defs/owner_hash\" }\n }\n },\n \"teardown_phase\": {\n \"type\": \"string\",\n \"enum\": [\"bridge\", \"confirmation\", \"execution\", \"operation\", \"stream\", \"runtime\"]\n },\n \"revoke_counts\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"surfaces\",\n \"asset_tickets\",\n \"asset_sessions\",\n \"plugin_gateway_tokens\",\n \"confirmation_tokens\",\n \"stream_tickets\",\n \"handle_grants\",\n \"confirmations\",\n \"operations\",\n \"streams\",\n \"runtime_executions\",\n \"active_network_requests\",\n \"sockets\",\n \"network_streams\",\n \"storage_hostcalls\"\n ],\n \"properties\": {\n \"surfaces\": { \"$ref\": \"#/$defs/count\" },\n \"asset_tickets\": { \"$ref\": \"#/$defs/count\" },\n \"asset_sessions\": { \"$ref\": \"#/$defs/count\" },\n \"plugin_gateway_tokens\": { \"$ref\": \"#/$defs/count\" },\n \"confirmation_tokens\": { \"$ref\": \"#/$defs/count\" },\n \"stream_tickets\": { \"$ref\": \"#/$defs/count\" },\n \"handle_grants\": { \"$ref\": \"#/$defs/count\" },\n \"confirmations\": { \"$ref\": \"#/$defs/count\" },\n \"operations\": { \"$ref\": \"#/$defs/count\" },\n \"streams\": { \"$ref\": \"#/$defs/count\" },\n \"runtime_executions\": { \"$ref\": \"#/$defs/count\" },\n \"active_network_requests\": { \"$ref\": \"#/$defs/count\" },\n \"sockets\": { \"$ref\": \"#/$defs/count\" },\n \"network_streams\": { \"$ref\": \"#/$defs/count\" },\n \"storage_hostcalls\": { \"$ref\": \"#/$defs/count\" }\n }\n },\n \"count\": {\n \"type\": \"integer\",\n \"minimum\": 0,\n \"maximum\": 9007199254740991\n },\n \"complete_revoke_result\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"state\", \"fenced\", \"complete\", \"counts\"],\n \"properties\": {\n \"state\": { \"const\": \"complete\" },\n \"fenced\": { \"const\": true },\n \"complete\": { \"const\": true },\n \"counts\": { \"$ref\": \"#/$defs/revoke_counts\" }\n }\n },\n \"incomplete_revoke_result\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"state\", \"fenced\", \"complete\", \"counts\"],\n \"properties\": {\n \"state\": { \"const\": \"incomplete\" },\n \"fenced\": { \"const\": true },\n \"complete\": { \"const\": false },\n \"counts\": { \"$ref\": \"#/$defs/revoke_counts\" }\n }\n },\n \"public_revoke_result\": {\n \"oneOf\": [\n { \"$ref\": \"#/$defs/complete_revoke_result\" },\n { \"$ref\": \"#/$defs/incomplete_revoke_result\" }\n ]\n }\n }\n}\n".as_bytes();
243static CONTRACT_BODY_TARGET_CLASSIFIER_FIXTURE: &[u8] = "{\n \"version\": \"target-classifier-v2\",\n \"default_policy\": \"allow_public_unicast_only\",\n \"normalization\": {\n \"dns_names\": \"ASCII lowercase with one trailing dot stripped before special-host checks\",\n \"ip_literals\": \"netip canonical form; IPv4-mapped IPv6 addresses are unmapped before blocked-range checks\"\n },\n \"blocked_ip_ranges\": [\n \"0.0.0.0/8\",\n \"10.0.0.0/8\",\n \"100.64.0.0/10\",\n \"127.0.0.0/8\",\n \"169.254.0.0/16\",\n \"172.16.0.0/12\",\n \"192.0.0.0/24\",\n \"192.0.2.0/24\",\n \"192.31.196.0/24\",\n \"192.52.193.0/24\",\n \"192.88.99.0/24\",\n \"192.168.0.0/16\",\n \"192.175.48.0/24\",\n \"198.18.0.0/15\",\n \"198.51.100.0/24\",\n \"203.0.113.0/24\",\n \"224.0.0.0/4\",\n \"240.0.0.0/4\",\n \"::/96\",\n \"::1/128\",\n \"64:ff9b::/96\",\n \"64:ff9b:1::/48\",\n \"100::/64\",\n \"2001::/23\",\n \"2001:db8::/32\",\n \"2002::/16\",\n \"3fff::/20\",\n \"5f00::/16\",\n \"2620:4f:8000::/48\",\n \"fc00::/7\",\n \"fe80::/10\",\n \"fec0::/10\",\n \"ff00::/8\"\n ],\n \"special_hosts\": [\n \"localhost\",\n \"metadata.google.internal\",\n \"metadata.goog\",\n \"instance-data\",\n \"instance-data.ec2.internal\",\n \"metadata.azure.internal\",\n \"169.254.169.254\"\n ],\n \"fixtures\": [\n {\n \"name\": \"public-http-origin\",\n \"transport\": \"http\",\n \"destination\": \"https://api.example.com\",\n \"resolved_address\": \"93.184.216.34\",\n \"decision\": \"allow\"\n },\n {\n \"name\": \"public-ipv4-literal\",\n \"transport\": \"tcp\",\n \"destination\": \"1.1.1.1:443\",\n \"decision\": \"allow\"\n },\n {\n \"name\": \"public-ipv4-mapped-resolved\",\n \"transport\": \"tcp\",\n \"destination\": \"dns.example.com:853\",\n \"resolved_address\": \"::ffff:8.8.8.8\",\n \"decision\": \"allow\"\n },\n {\n \"name\": \"public-ipv6-resolved\",\n \"transport\": \"tcp\",\n \"destination\": \"dns.example.com:853\",\n \"resolved_address\": \"2606:4700:4700::1111\",\n \"decision\": \"allow\"\n },\n {\n \"name\": \"punycode-public-host\",\n \"transport\": \"http\",\n \"destination\": \"https://xn--bcher-kva.example\",\n \"resolved_address\": \"1.0.0.1\",\n \"decision\": \"allow\"\n },\n {\n \"name\": \"localhost-special-host\",\n \"transport\": \"http\",\n \"destination\": \"http://localhost\",\n \"decision\": \"deny\"\n },\n {\n \"name\": \"metadata-special-host-trailing-dot\",\n \"transport\": \"websocket\",\n \"destination\": \"wss://metadata.google.internal.\",\n \"decision\": \"deny\"\n },\n {\n \"name\": \"instance-data-special-host\",\n \"transport\": \"http\",\n \"destination\": \"http://instance-data.ec2.internal\",\n \"decision\": \"deny\"\n },\n {\n \"name\": \"this-network-ipv4-literal\",\n \"transport\": \"udp\",\n \"destination\": \"0.1.2.3:53\",\n \"decision\": \"deny\"\n },\n {\n \"name\": \"private-ipv4-resolved\",\n \"transport\": \"tcp\",\n \"destination\": \"db.example.com:5432\",\n \"resolved_address\": \"10.0.0.10\",\n \"decision\": \"deny\"\n },\n {\n \"name\": \"shared-address-space-resolved\",\n \"transport\": \"tcp\",\n \"destination\": \"db.example.com:5432\",\n \"resolved_address\": \"100.64.0.1\",\n \"decision\": \"deny\"\n },\n {\n \"name\": \"loopback-ipv4-literal\",\n \"transport\": \"tcp\",\n \"destination\": \"127.0.0.1:443\",\n \"decision\": \"deny\"\n },\n {\n \"name\": \"link-local-ipv4-resolved\",\n \"transport\": \"udp\",\n \"destination\": \"dns.example.com:53\",\n \"resolved_address\": \"169.254.169.254\",\n \"decision\": \"deny\"\n },\n {\n \"name\": \"private-172-resolved\",\n \"transport\": \"tcp\",\n \"destination\": \"db.example.com:5432\",\n \"resolved_address\": \"172.31.255.255\",\n \"decision\": \"deny\"\n },\n {\n \"name\": \"ietf-protocol-assignments-resolved\",\n \"transport\": \"tcp\",\n \"destination\": \"service.example.com:443\",\n \"resolved_address\": \"192.0.0.9\",\n \"decision\": \"deny\"\n },\n {\n \"name\": \"documentation-192-resolved\",\n \"transport\": \"tcp\",\n \"destination\": \"service.example.com:443\",\n \"resolved_address\": \"192.0.2.1\",\n \"decision\": \"deny\"\n },\n {\n \"name\": \"as112-v4-resolved\",\n \"transport\": \"udp\",\n \"destination\": \"dns.example.com:53\",\n \"resolved_address\": \"192.31.196.1\",\n \"decision\": \"deny\"\n },\n {\n \"name\": \"amt-v4-resolved\",\n \"transport\": \"udp\",\n \"destination\": \"service.example.com:2268\",\n \"resolved_address\": \"192.52.193.1\",\n \"decision\": \"deny\"\n },\n {\n \"name\": \"6to4-relay-resolved\",\n \"transport\": \"tcp\",\n \"destination\": \"service.example.com:443\",\n \"resolved_address\": \"192.88.99.1\",\n \"decision\": \"deny\"\n },\n {\n \"name\": \"private-192-resolved\",\n \"transport\": \"tcp\",\n \"destination\": \"db.example.com:5432\",\n \"resolved_address\": \"192.168.1.1\",\n \"decision\": \"deny\"\n },\n {\n \"name\": \"direct-delegation-as112-resolved\",\n \"transport\": \"udp\",\n \"destination\": \"dns.example.com:53\",\n \"resolved_address\": \"192.175.48.1\",\n \"decision\": \"deny\"\n },\n {\n \"name\": \"benchmark-ipv4-resolved\",\n \"transport\": \"tcp\",\n \"destination\": \"service.example.com:443\",\n \"resolved_address\": \"198.18.0.1\",\n \"decision\": \"deny\"\n },\n {\n \"name\": \"documentation-198-resolved\",\n \"transport\": \"tcp\",\n \"destination\": \"service.example.com:443\",\n \"resolved_address\": \"198.51.100.1\",\n \"decision\": \"deny\"\n },\n {\n \"name\": \"documentation-203-resolved\",\n \"transport\": \"tcp\",\n \"destination\": \"service.example.com:443\",\n \"resolved_address\": \"203.0.113.1\",\n \"decision\": \"deny\"\n },\n {\n \"name\": \"multicast-ipv4-resolved\",\n \"transport\": \"udp\",\n \"destination\": \"service.example.com:5000\",\n \"resolved_address\": \"239.1.2.3\",\n \"decision\": \"deny\"\n },\n {\n \"name\": \"reserved-ipv4-resolved\",\n \"transport\": \"tcp\",\n \"destination\": \"service.example.com:443\",\n \"resolved_address\": \"240.0.0.1\",\n \"decision\": \"deny\"\n },\n {\n \"name\": \"ipv4-mapped-shared-resolved\",\n \"transport\": \"tcp\",\n \"destination\": \"service.example.com:443\",\n \"resolved_address\": \"::ffff:100.64.0.1\",\n \"decision\": \"deny\"\n },\n {\n \"name\": \"ipv4-compatible-ipv6-resolved\",\n \"transport\": \"tcp\",\n \"destination\": \"service.example.com:443\",\n \"resolved_address\": \"::192.0.2.1\",\n \"decision\": \"deny\"\n },\n {\n \"name\": \"unspecified-ipv6-literal\",\n \"transport\": \"tcp\",\n \"destination\": \"[::]:443\",\n \"decision\": \"deny\"\n },\n {\n \"name\": \"loopback-ipv6-literal\",\n \"transport\": \"tcp\",\n \"destination\": \"[::1]:443\",\n \"decision\": \"deny\"\n },\n {\n \"name\": \"nat64-well-known-resolved\",\n \"transport\": \"tcp\",\n \"destination\": \"service.example.com:443\",\n \"resolved_address\": \"64:ff9b::c000:201\",\n \"decision\": \"deny\"\n },\n {\n \"name\": \"nat64-local-use-resolved\",\n \"transport\": \"tcp\",\n \"destination\": \"service.example.com:443\",\n \"resolved_address\": \"64:ff9b:1::1\",\n \"decision\": \"deny\"\n },\n {\n \"name\": \"discard-only-ipv6-resolved\",\n \"transport\": \"udp\",\n \"destination\": \"service.example.com:5000\",\n \"resolved_address\": \"100::1\",\n \"decision\": \"deny\"\n },\n {\n \"name\": \"ietf-special-ipv6-resolved\",\n \"transport\": \"tcp\",\n \"destination\": \"service.example.com:443\",\n \"resolved_address\": \"2001::1\",\n \"decision\": \"deny\"\n },\n {\n \"name\": \"documentation-ipv6-resolved\",\n \"transport\": \"tcp\",\n \"destination\": \"service.example.com:443\",\n \"resolved_address\": \"2001:db8::1\",\n \"decision\": \"deny\"\n },\n {\n \"name\": \"six-to-four-ipv6-resolved\",\n \"transport\": \"tcp\",\n \"destination\": \"service.example.com:443\",\n \"resolved_address\": \"2002:c000:0201::1\",\n \"decision\": \"deny\"\n },\n {\n \"name\": \"documentation-3fff-resolved\",\n \"transport\": \"tcp\",\n \"destination\": \"service.example.com:443\",\n \"resolved_address\": \"3fff::1\",\n \"decision\": \"deny\"\n },\n {\n \"name\": \"segment-routing-sid-resolved\",\n \"transport\": \"tcp\",\n \"destination\": \"service.example.com:443\",\n \"resolved_address\": \"5f00::1\",\n \"decision\": \"deny\"\n },\n {\n \"name\": \"direct-delegation-as112-ipv6-resolved\",\n \"transport\": \"udp\",\n \"destination\": \"dns.example.com:53\",\n \"resolved_address\": \"2620:4f:8000::1\",\n \"decision\": \"deny\"\n },\n {\n \"name\": \"ula-resolved\",\n \"transport\": \"tcp\",\n \"destination\": \"db.example.com:5432\",\n \"resolved_address\": \"fd00::10\",\n \"decision\": \"deny\"\n },\n {\n \"name\": \"ipv6-link-local-resolved\",\n \"transport\": \"tcp\",\n \"destination\": \"db.example.com:5432\",\n \"resolved_address\": \"fe80::1\",\n \"decision\": \"deny\"\n },\n {\n \"name\": \"site-local-resolved\",\n \"transport\": \"tcp\",\n \"destination\": \"db.example.com:5432\",\n \"resolved_address\": \"fec0::1\",\n \"decision\": \"deny\"\n },\n {\n \"name\": \"multicast-ipv6-resolved\",\n \"transport\": \"udp\",\n \"destination\": \"service.example.com:5000\",\n \"resolved_address\": \"ff02::1\",\n \"decision\": \"deny\"\n }\n ]\n}\n".as_bytes();
244static CONTRACT_BODY_TOKEN_TICKET_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/token-ticket-v4.schema.json\",\n \"title\": \"ReDevPlugin token and ticket v4\",\n \"description\": \"Host-issued token records. Exact session-bound audiences participate in the session-scope-v1 revocation lifecycle.\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"token_kind\",\n \"token_id\",\n \"audience\",\n \"revision\",\n \"issued_at\",\n \"expires_at\",\n \"nonce\",\n \"use\"\n ],\n \"properties\": {\n \"token_kind\": { \"$ref\": \"#/$defs/token_kind\" },\n \"token_id\": { \"$ref\": \"#/$defs/token_id\" },\n \"token_hash\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\",\n \"description\": \"Server-side record only. Cleartext token is returned exactly once and must not be persisted.\"\n },\n \"audience\": { \"$ref\": \"#/$defs/audience\" },\n \"revision\": { \"$ref\": \"#/$defs/revision\" },\n \"issued_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"expires_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"nonce\": { \"type\": \"string\", \"minLength\": 16 },\n \"use\": { \"enum\": [\"single_use\", \"reusable\"] },\n \"consumed\": { \"type\": \"boolean\" },\n \"consumed_at\": { \"type\": [\"string\", \"null\"], \"format\": \"date-time\" },\n \"revoked\": { \"type\": \"boolean\" },\n \"revoked_at\": { \"type\": [\"string\", \"null\"], \"format\": \"date-time\" },\n \"bound_bridge_channel_id\": { \"type\": \"string\" },\n \"limits\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"properties\": {\n \"max_bytes_per_second\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 9007199254740991 },\n \"max_total_bytes\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 9007199254740991 }\n }\n }\n },\n \"$defs\": {\n \"token_kind\": {\n \"enum\": [\n \"asset_ticket\",\n \"asset_session\",\n \"plugin_gateway_token\",\n \"confirmation_token\",\n \"handle_grant\",\n \"stream_ticket\"\n ]\n },\n \"token_id\": {\n \"type\": \"string\",\n \"description\": \"Opaque token or ticket identifier. Prefixes are stable namespaces: at_ asset tickets, as_ asset sessions, pgt_ plugin gateway tokens, ct_ confirmation tokens, hg_ handle grants, and st_ stream tickets.\",\n \"pattern\": \"^(at|as|pgt|ct|hg|st)_[A-Za-z0-9_-]+$\"\n },\n \"audience\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"plugin_instance_id\", \"active_fingerprint\"],\n \"properties\": {\n \"plugin_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"plugin_instance_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"plugin_version\": { \"type\": \"string\", \"minLength\": 1 },\n \"active_fingerprint\": { \"type\": \"string\", \"minLength\": 1 },\n \"surface_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"surface_instance_id\": { \"type\": \"string\" },\n \"entry_path\": { \"type\": \"string\", \"minLength\": 1 },\n \"entry_sha256\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n },\n \"asset_session_nonce\": { \"type\": \"string\", \"minLength\": 16 },\n \"route_role\": { \"enum\": [\"trusted_parent\", \"trusted_intent\"] },\n \"owner_session_hash\": { \"type\": \"string\", \"minLength\": 1 },\n \"owner_user_hash\": { \"type\": \"string\", \"pattern\": \"^[A-Za-z0-9][A-Za-z0-9._:-]{0,255}$\" },\n \"owner_env_hash\": { \"type\": \"string\", \"pattern\": \"^[A-Za-z0-9][A-Za-z0-9._:-]{0,255}$\" },\n \"session_channel_id_hash\": { \"type\": \"string\", \"minLength\": 1 },\n \"bridge_channel_id\": { \"type\": \"string\" },\n \"runtime_instance_id\": { \"type\": \"string\" },\n \"runtime_generation_id\": { \"type\": \"string\" },\n \"runtime_shard_id\": { \"type\": \"string\" },\n \"ipc_channel_id\": { \"type\": \"string\" },\n \"connection_nonce\": { \"type\": \"string\", \"minLength\": 16 },\n \"stream_id\": { \"type\": \"string\" },\n \"operation_id\": { \"type\": \"string\" },\n \"audit_correlation_id\": { \"type\": \"string\" },\n \"stream_direction\": { \"enum\": [\"read\", \"write\", \"duplex\"] },\n \"handle_id\": { \"type\": \"string\" },\n \"confirmation_id\": { \"type\": \"string\" },\n \"method\": { \"type\": \"string\" },\n \"resource_scope\": { \"$ref\": \"https://schemas.redevplugin.dev/plugin/resource-scope-v1.schema.json\" },\n \"request_hash\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n },\n \"plan_hash\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n }\n },\n \"revision\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"policy_revision\", \"management_revision\", \"revoke_epoch\"],\n \"properties\": {\n \"policy_revision\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 9007199254740991 },\n \"management_revision\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 9007199254740991 },\n \"revoke_epoch\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 9007199254740991 }\n }\n }\n },\n \"allOf\": [\n {\n \"if\": { \"properties\": { \"token_kind\": { \"const\": \"asset_ticket\" } }, \"required\": [\"token_kind\"] },\n \"then\": {\n \"properties\": {\n \"token_id\": { \"pattern\": \"^at_[A-Za-z0-9_-]+$\" },\n \"use\": { \"const\": \"single_use\" },\n \"audience\": {\n \"not\": { \"required\": [\"resource_scope\"] },\n \"required\": [\n \"plugin_id\",\n \"plugin_instance_id\",\n \"plugin_version\",\n \"active_fingerprint\",\n \"surface_id\",\n \"surface_instance_id\",\n \"entry_path\",\n \"entry_sha256\",\n \"asset_session_nonce\",\n \"route_role\",\n \"owner_session_hash\",\n \"owner_user_hash\",\n \"owner_env_hash\",\n \"session_channel_id_hash\",\n \"runtime_generation_id\"\n ]\n }\n },\n \"required\": [\"token_kind\", \"audience\", \"revision\", \"use\"]\n }\n },\n {\n \"if\": { \"properties\": { \"token_kind\": { \"const\": \"asset_session\" } }, \"required\": [\"token_kind\"] },\n \"then\": {\n \"properties\": {\n \"token_id\": { \"pattern\": \"^as_[A-Za-z0-9_-]+$\" },\n \"use\": { \"const\": \"reusable\" },\n \"audience\": {\n \"not\": { \"required\": [\"resource_scope\"] },\n \"required\": [\n \"plugin_id\",\n \"plugin_instance_id\",\n \"plugin_version\",\n \"active_fingerprint\",\n \"surface_id\",\n \"surface_instance_id\",\n \"entry_path\",\n \"entry_sha256\",\n \"asset_session_nonce\",\n \"route_role\",\n \"owner_session_hash\",\n \"owner_user_hash\",\n \"owner_env_hash\",\n \"session_channel_id_hash\",\n \"runtime_generation_id\"\n ]\n }\n },\n \"required\": [\"token_kind\", \"audience\", \"revision\", \"use\"]\n }\n },\n {\n \"if\": { \"properties\": { \"token_kind\": { \"const\": \"plugin_gateway_token\" } }, \"required\": [\"token_kind\"] },\n \"then\": {\n \"properties\": {\n \"token_id\": { \"pattern\": \"^pgt_[A-Za-z0-9_-]+$\" },\n \"use\": { \"const\": \"reusable\" },\n \"audience\": {\n \"not\": { \"required\": [\"resource_scope\"] },\n \"required\": [\n \"plugin_id\",\n \"plugin_instance_id\",\n \"plugin_version\",\n \"active_fingerprint\",\n \"surface_id\",\n \"surface_instance_id\",\n \"entry_path\",\n \"entry_sha256\",\n \"asset_session_nonce\",\n \"route_role\",\n \"owner_session_hash\",\n \"owner_user_hash\",\n \"owner_env_hash\",\n \"session_channel_id_hash\",\n \"bridge_channel_id\",\n \"runtime_generation_id\"\n ]\n }\n },\n \"required\": [\"token_kind\", \"audience\", \"revision\", \"use\"]\n }\n },\n {\n \"if\": { \"properties\": { \"token_kind\": { \"const\": \"confirmation_token\" } }, \"required\": [\"token_kind\"] },\n \"then\": {\n \"properties\": {\n \"token_id\": { \"pattern\": \"^ct_[A-Za-z0-9_-]+$\" },\n \"use\": { \"const\": \"single_use\" },\n \"audience\": {\n \"not\": { \"required\": [\"resource_scope\"] },\n \"required\": [\n \"plugin_id\",\n \"plugin_instance_id\",\n \"plugin_version\",\n \"active_fingerprint\",\n \"surface_id\",\n \"surface_instance_id\",\n \"entry_path\",\n \"entry_sha256\",\n \"asset_session_nonce\",\n \"route_role\",\n \"owner_session_hash\",\n \"owner_user_hash\",\n \"owner_env_hash\",\n \"session_channel_id_hash\",\n \"confirmation_id\",\n \"bridge_channel_id\",\n \"method\",\n \"request_hash\",\n \"plan_hash\",\n \"runtime_generation_id\"\n ]\n }\n },\n \"required\": [\"token_kind\", \"audience\", \"revision\", \"use\"]\n }\n },\n {\n \"if\": { \"properties\": { \"token_kind\": { \"const\": \"handle_grant\" } }, \"required\": [\"token_kind\"] },\n \"then\": {\n \"properties\": {\n \"token_id\": { \"pattern\": \"^hg_[A-Za-z0-9_-]+$\" },\n \"use\": { \"const\": \"reusable\" },\n \"audience\": {\n \"required\": [\n \"plugin_instance_id\",\n \"active_fingerprint\",\n \"runtime_generation_id\",\n \"owner_session_hash\",\n \"owner_user_hash\",\n \"owner_env_hash\",\n \"session_channel_id_hash\",\n \"handle_id\",\n \"method\",\n \"resource_scope\"\n ]\n }\n },\n \"required\": [\"token_kind\", \"audience\", \"revision\", \"use\"]\n }\n },\n {\n \"if\": { \"properties\": { \"token_kind\": { \"const\": \"stream_ticket\" } }, \"required\": [\"token_kind\"] },\n \"then\": {\n \"properties\": {\n \"token_id\": { \"pattern\": \"^st_[A-Za-z0-9_-]+$\" },\n \"use\": { \"const\": \"single_use\" },\n \"audience\": {\n \"not\": { \"required\": [\"resource_scope\"] },\n \"required\": [\n \"plugin_id\",\n \"plugin_instance_id\",\n \"plugin_version\",\n \"active_fingerprint\",\n \"route_role\",\n \"owner_session_hash\",\n \"owner_user_hash\",\n \"owner_env_hash\",\n \"session_channel_id_hash\",\n \"stream_id\",\n \"operation_id\",\n \"stream_direction\",\n \"method\"\n ],\n \"allOf\": [\n {\n \"if\": {\n \"properties\": { \"route_role\": { \"const\": \"trusted_parent\" } },\n \"required\": [\"route_role\"]\n },\n \"then\": {\n \"required\": [\n \"surface_id\",\n \"surface_instance_id\",\n \"entry_path\",\n \"entry_sha256\",\n \"asset_session_nonce\",\n \"bridge_channel_id\",\n \"runtime_generation_id\"\n ]\n }\n }\n ]\n }\n },\n \"required\": [\"token_kind\", \"audience\", \"revision\", \"use\"]\n }\n }\n ]\n}\n".as_bytes();
245static CONTRACT_BODY_TRUSTED_TIME_EVIDENCE_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/trusted-time-evidence-v1.schema.json\",\n \"title\": \"ReDevPlugin trusted time transparency evidence v1\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"schema_version\",\n \"kind\",\n \"leaf\",\n \"leaf_sha256\",\n \"integrated_time\",\n \"signed_entry_timestamp\",\n \"checkpoint\",\n \"leaf_index\",\n \"inclusion_proof\",\n \"consistency_proof\"\n ],\n \"properties\": {\n \"schema_version\": { \"const\": \"redevplugin.trusted_time_evidence.v1\" },\n \"kind\": { \"const\": \"transparency\" },\n \"leaf\": { \"$ref\": \"#/$defs/leaf\" },\n \"leaf_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"integrated_time\": { \"type\": \"string\", \"format\": \"date-time\", \"maxLength\": 35 },\n \"signed_entry_timestamp\": { \"$ref\": \"#/$defs/signature\" },\n \"checkpoint\": { \"$ref\": \"#/$defs/checkpoint\" },\n \"leaf_index\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 9007199254740990 },\n \"inclusion_proof\": { \"$ref\": \"#/$defs/proof\" },\n \"consistency_proof\": { \"$ref\": \"#/$defs/proof\" }\n },\n \"$defs\": {\n \"id\": { \"type\": \"string\", \"pattern\": \"^[a-z][a-z0-9._-]{0,127}$\" },\n \"sha256\": { \"type\": \"string\", \"pattern\": \"^[0-9a-f]{64}$\" },\n \"leaf\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"schema_version\", \"source_id\", \"channel\", \"nonce\", \"minimum_time\", \"claimed_time\", \"request_sha256\", \"log_id\"],\n \"properties\": {\n \"schema_version\": { \"const\": \"redevplugin.trusted_time_leaf.v1\" },\n \"source_id\": { \"$ref\": \"#/$defs/id\" },\n \"channel\": { \"$ref\": \"#/$defs/id\" },\n \"nonce\": { \"type\": \"string\", \"pattern\": \"^[A-Za-z0-9_-]{43}$\" },\n \"minimum_time\": { \"type\": \"string\", \"format\": \"date-time\", \"maxLength\": 35 },\n \"claimed_time\": { \"type\": \"string\", \"format\": \"date-time\", \"maxLength\": 35 },\n \"request_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"log_id\": { \"$ref\": \"#/$defs/id\" }\n }\n },\n \"signature\": { \"type\": \"string\", \"pattern\": \"^[A-Za-z0-9+/]{86}==$\" },\n \"proof\": {\n \"type\": \"array\",\n \"maxItems\": 64,\n \"items\": { \"$ref\": \"#/$defs/sha256\" }\n },\n \"checkpoint\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"schema_version\", \"log_id\", \"tree_size\", \"root_hash\", \"checkpoint_time\", \"key_id\", \"signature\"],\n \"properties\": {\n \"schema_version\": { \"const\": \"redevplugin.trusted_time_checkpoint.v1\" },\n \"log_id\": { \"$ref\": \"#/$defs/id\" },\n \"tree_size\": { \"type\": \"integer\", \"minimum\": 1, \"maximum\": 9007199254740991 },\n \"root_hash\": { \"$ref\": \"#/$defs/sha256\" },\n \"checkpoint_time\": { \"type\": \"string\", \"format\": \"date-time\", \"maxLength\": 35 },\n \"key_id\": { \"$ref\": \"#/$defs/id\" },\n \"signature\": { \"$ref\": \"#/$defs/signature\" }\n }\n }\n }\n}\n".as_bytes();
246static CONTRACT_BODY_TRUSTED_TIME_LEAF_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/trusted-time-leaf-v1.schema.json\",\n \"title\": \"ReDevPlugin trusted time leaf v1\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"schema_version\", \"source_id\", \"channel\", \"nonce\", \"minimum_time\", \"claimed_time\", \"request_sha256\", \"log_id\"],\n \"properties\": {\n \"schema_version\": { \"const\": \"redevplugin.trusted_time_leaf.v1\" },\n \"source_id\": { \"$ref\": \"#/$defs/id\" },\n \"channel\": { \"$ref\": \"#/$defs/id\" },\n \"nonce\": { \"type\": \"string\", \"pattern\": \"^[A-Za-z0-9_-]{43}$\" },\n \"minimum_time\": { \"type\": \"string\", \"format\": \"date-time\", \"maxLength\": 35 },\n \"claimed_time\": { \"type\": \"string\", \"format\": \"date-time\", \"maxLength\": 35 },\n \"request_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"log_id\": { \"$ref\": \"#/$defs/id\" }\n },\n \"$defs\": {\n \"id\": { \"type\": \"string\", \"pattern\": \"^[a-z][a-z0-9._-]{0,127}$\" },\n \"sha256\": { \"type\": \"string\", \"pattern\": \"^[0-9a-f]{64}$\" }\n }\n}\n".as_bytes();
247static CONTRACT_BODY_WASM_WORKER_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/wasm-worker-v2.schema.json\",\n \"title\": \"ReDevPlugin WASM worker executable contract v2\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"abi_version\", \"memory\", \"table\", \"exports\", \"imports\"],\n \"properties\": {\n \"abi_version\": { \"const\": \"redevplugin-wasm-worker-v2\" },\n \"memory\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"count\", \"export\", \"memory64\", \"shared\", \"page_size_bytes\"],\n \"properties\": {\n \"count\": { \"const\": 1 },\n \"export\": { \"const\": \"memory\" },\n \"memory64\": { \"const\": false },\n \"shared\": { \"const\": false },\n \"page_size_bytes\": { \"const\": 65536 }\n }\n },\n \"table\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"max_count\", \"max_elements\", \"table64\", \"shared\"],\n \"properties\": {\n \"max_count\": { \"const\": 1 },\n \"max_elements\": { \"const\": 65536 },\n \"table64\": { \"const\": false },\n \"shared\": { \"const\": false }\n }\n },\n \"exports\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"alloc\", \"dealloc\", \"invoke\"],\n \"properties\": {\n \"alloc\": {\n \"$ref\": \"#/$defs/alloc_function\"\n },\n \"dealloc\": {\n \"$ref\": \"#/$defs/dealloc_function\"\n },\n \"invoke\": {\n \"$ref\": \"#/$defs/invoke_function\"\n }\n }\n },\n \"imports\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": { \"$ref\": \"#/$defs/hostcall_import\" }\n }\n },\n \"$defs\": {\n \"alloc_function\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"name\", \"params\", \"results\"],\n \"properties\": {\n \"name\": { \"const\": \"redevplugin_worker_alloc\" },\n \"params\": { \"const\": [\"i32\"] },\n \"results\": { \"const\": [\"i32\"] }\n }\n },\n \"dealloc_function\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"name\", \"params\", \"results\"],\n \"properties\": {\n \"name\": { \"const\": \"redevplugin_worker_dealloc\" },\n \"params\": { \"const\": [\"i32\", \"i32\"] },\n \"results\": { \"const\": [] }\n }\n },\n \"invoke_function\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"name\", \"params\", \"results\"],\n \"properties\": {\n \"name\": { \"const\": \"redevplugin_worker_invoke\" },\n \"params\": { \"const\": [\"i32\", \"i32\"] },\n \"results\": { \"const\": [\"i64\"] }\n }\n },\n \"hostcall_import\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"module\", \"name\", \"params\", \"results\"],\n \"properties\": {\n \"module\": { \"enum\": [\"redevplugin.storage\", \"redevplugin.network\"] },\n \"name\": { \"enum\": [\"files\", \"kv\", \"sqlite\", \"execute\"] },\n \"params\": { \"const\": [\"i32\", \"i32\", \"i32\", \"i32\"] },\n \"results\": { \"const\": [\"i32\"] }\n },\n \"allOf\": [\n {\n \"if\": { \"properties\": { \"module\": { \"const\": \"redevplugin.storage\" } }, \"required\": [\"module\"] },\n \"then\": { \"properties\": { \"name\": { \"enum\": [\"files\", \"kv\", \"sqlite\"] } } },\n \"else\": { \"properties\": { \"name\": { \"const\": \"execute\" } } }\n }\n ]\n }\n }\n}\n".as_bytes();
248static CONTRACT_BODY_WORKER_INVOCATION_SCHEMA: &[u8] = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.redevplugin.dev/plugin/worker-invocation-v3.schema.json\",\n \"title\": \"ReDevPlugin worker invocation payload v3\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"plugin_id\",\n \"plugin_instance_id\",\n \"active_fingerprint\",\n \"runtime_instance_id\",\n \"runtime_generation_id\",\n \"package_hash\",\n \"worker_id\",\n \"worker_mode\",\n \"worker_scope\",\n \"artifact\",\n \"artifact_sha256\",\n \"abi\",\n \"method\",\n \"effect\",\n \"execution\",\n \"audit_correlation_id\",\n \"owner_env_hash\",\n \"broker_access\",\n \"broker_access_sha256\",\n \"params_sha256\",\n \"params\"\n ],\n \"properties\": {\n \"plugin_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"plugin_instance_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"active_fingerprint\": { \"type\": \"string\", \"minLength\": 1 },\n \"runtime_instance_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"runtime_generation_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"package_hash\": { \"$ref\": \"#/$defs/sha256\" },\n \"worker_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"worker_mode\": { \"const\": \"job\" },\n \"worker_scope\": { \"type\": \"string\", \"minLength\": 1 },\n \"artifact\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"pattern\": \"^workers/[A-Za-z0-9._/-]+\\\\.wasm$\"\n },\n \"artifact_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"abi\": { \"const\": \"redevplugin-wasm-worker-v2\" },\n \"method\": { \"type\": \"string\", \"minLength\": 1 },\n \"effect\": { \"enum\": [\"read\", \"write\", \"execute\", \"delete\", \"admin\"] },\n \"execution\": { \"enum\": [\"sync\", \"operation\", \"subscription\"] },\n \"operation_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"stream_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"audit_correlation_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"params_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"surface_instance_id\": { \"type\": \"string\" },\n \"owner_session_hash\": { \"type\": \"string\" },\n \"owner_user_hash\": { \"type\": \"string\" },\n \"owner_env_hash\": { \"type\": \"string\", \"minLength\": 1 },\n \"session_channel_id_hash\": { \"type\": \"string\" },\n \"bridge_channel_id\": { \"type\": \"string\" },\n \"storage_handle_grants\": {\n \"type\": \"object\",\n \"propertyNames\": { \"type\": \"string\", \"minLength\": 1, \"maxLength\": 128 },\n \"additionalProperties\": { \"type\": \"string\", \"minLength\": 1 }\n },\n \"broker_access\": { \"$ref\": \"#/$defs/broker_access\" },\n \"broker_access_sha256\": { \"$ref\": \"#/$defs/sha256\" },\n \"params\": {\n \"type\": \"object\",\n \"additionalProperties\": true\n }\n },\n \"$defs\": {\n \"broker_access\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"properties\": {\n \"storage\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"store_id\", \"scope\", \"operations\"],\n \"properties\": {\n \"store_id\": { \"type\": \"string\", \"minLength\": 1, \"maxLength\": 128 },\n \"scope\": { \"enum\": [\"user\", \"environment\"] },\n \"operations\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"uniqueItems\": true,\n \"items\": { \"enum\": [\"read\", \"write\", \"delete\", \"list\", \"get\", \"put\", \"query\", \"exec\"] }\n }\n }\n }\n },\n \"network\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"connector_id\", \"transport\", \"scope\", \"operations\"],\n \"properties\": {\n \"connector_id\": { \"type\": \"string\", \"minLength\": 1, \"maxLength\": 128 },\n \"transport\": { \"enum\": [\"http\", \"websocket\", \"tcp\", \"udp\"] },\n \"scope\": { \"enum\": [\"user\", \"environment\"] },\n \"operations\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"uniqueItems\": true,\n \"items\": { \"enum\": [\"http\", \"http_stream\", \"websocket_round_trip\", \"tcp_round_trip\", \"udp_round_trip\"] }\n },\n \"http_methods\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"uniqueItems\": true,\n \"items\": { \"enum\": [\"GET\", \"HEAD\", \"POST\", \"PUT\", \"PATCH\", \"DELETE\", \"OPTIONS\"] }\n }\n },\n \"allOf\": [\n {\n \"if\": { \"properties\": { \"transport\": { \"const\": \"http\" } }, \"required\": [\"transport\"] },\n \"then\": { \"required\": [\"http_methods\"] },\n \"else\": { \"not\": { \"required\": [\"http_methods\"] } }\n }\n ]\n }\n }\n }\n },\n \"sha256\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[a-f0-9]{64}$\"\n }\n },\n \"allOf\": [\n {\n \"if\": { \"properties\": { \"execution\": { \"const\": \"sync\" } }, \"required\": [\"execution\"] },\n \"then\": { \"not\": { \"anyOf\": [{ \"required\": [\"operation_id\"] }, { \"required\": [\"stream_id\"] }] } }\n },\n {\n \"if\": { \"properties\": { \"execution\": { \"const\": \"operation\" } }, \"required\": [\"execution\"] },\n \"then\": { \"required\": [\"operation_id\"], \"not\": { \"required\": [\"stream_id\"] } }\n },\n {\n \"if\": { \"properties\": { \"execution\": { \"const\": \"subscription\" } }, \"required\": [\"execution\"] },\n \"then\": { \"required\": [\"operation_id\", \"stream_id\"] }\n }\n ]\n}\n".as_bytes();
249
250pub(crate) static ARTIFACTS: [Contract; 60] = [
251 Contract::new(
252 ContractId::COMPATIBILITY_MANIFEST_SCHEMA,
253 "compatibility-manifest-v17",
254 "f3d726ab1aa4de61acba453ed2511511c51749f67e614f422dcf525fb687ad6e",
255 CONTRACT_BODY_COMPATIBILITY_MANIFEST_SCHEMA,
256 ),
257 Contract::new(
258 ContractId::CONTRACT_REGISTRY_SCHEMA,
259 "contract-registry-v2",
260 "d516b3565158ac1b0d5e9f86b91b13ac19321ab3ff54468be41951b68d7085ac",
261 CONTRACT_BODY_CONTRACT_REGISTRY_SCHEMA,
262 ),
263 Contract::new(
264 ContractId::ERROR_CODES_SCHEMA,
265 "error-codes-v8",
266 "454e3c8b46e20bc524080ca1aa91dcf2ecdfe0a90cc33b5b328e87356d07e7e3",
267 CONTRACT_BODY_ERROR_CODES_SCHEMA,
268 ),
269 Contract::new(
270 ContractId::EXTERNAL_SIGNER_REQUEST_SCHEMA,
271 "external-signer-request-v1",
272 "abc18af2e29dea6f0b49a28b75b046ef02f200597978c8238cc587fb7e670760",
273 CONTRACT_BODY_EXTERNAL_SIGNER_REQUEST_SCHEMA,
274 ),
275 Contract::new(
276 ContractId::EXTERNAL_SIGNER_RESPONSE_SCHEMA,
277 "external-signer-response-v1",
278 "bbe657df5afdf459a4c5f83282ddc3ec6c80c1ebd25bb954eac92101f35afc6c",
279 CONTRACT_BODY_EXTERNAL_SIGNER_RESPONSE_SCHEMA,
280 ),
281 Contract::new(
282 ContractId::HOST_CAPABILITY_COMPATIBILITY_SCHEMA,
283 "host-capability-compatibility-v1",
284 "361ebbf7009aeb66c763ecde46427b17b6cf7d2307c01886c5987a1f4f1762de",
285 CONTRACT_BODY_HOST_CAPABILITY_COMPATIBILITY_SCHEMA,
286 ),
287 Contract::new(
288 ContractId::HOST_CAPABILITY_CONTRACT_SCHEMA,
289 "host-capability-contract-v1",
290 "0a653e36d44104f1d16b06ee424648086c146f23c907b176bdf470ae73025485",
291 CONTRACT_BODY_HOST_CAPABILITY_CONTRACT_SCHEMA,
292 ),
293 Contract::new(
294 ContractId::HOST_CAPABILITY_MANIFEST_SCHEMA,
295 "host-capability-manifest-v1",
296 "5f13a8e5f918378b9cba9fdc133a9a75ba3a8311c30cb6a02ca0aba09035110e",
297 CONTRACT_BODY_HOST_CAPABILITY_MANIFEST_SCHEMA,
298 ),
299 Contract::new(
300 ContractId::HOST_CAPABILITY_NOTICES_SCHEMA,
301 "host-capability-notices-v1",
302 "6affd5d0ae90239f6fd08cbeddae4eef393efa2838c9e4935874ba3dc0e05948",
303 CONTRACT_BODY_HOST_CAPABILITY_NOTICES_SCHEMA,
304 ),
305 Contract::new(
306 ContractId::HOST_CAPABILITY_PIN_SCHEMA,
307 "host-capability-pin-v1",
308 "20526a5934f0d85a3db7882492487266f09de5bcd176e2c7936f05d0b7fe0338",
309 CONTRACT_BODY_HOST_CAPABILITY_PIN_SCHEMA,
310 ),
311 Contract::new(
312 ContractId::HOST_CAPABILITY_PUBLISHER_CONFIG_SCHEMA,
313 "host-capability-publisher-config-v1",
314 "f06ab3d70f3f9dd2114fe9d489841f1d6b5f169ee17b8c92aa1bfaf9bbf865c4",
315 CONTRACT_BODY_HOST_CAPABILITY_PUBLISHER_CONFIG_SCHEMA,
316 ),
317 Contract::new(
318 ContractId::HOST_CAPABILITY_SIGNATURE_SCHEMA,
319 "host-capability-signature-v1",
320 "88cbc1d63afb7e289ca4f8b7c76f702b8d20156f7722c1b71f3ab9138a240a5e",
321 CONTRACT_BODY_HOST_CAPABILITY_SIGNATURE_SCHEMA,
322 ),
323 Contract::new(
324 ContractId::HOST_CAPABILITY_SIGNER_REQUEST_SCHEMA,
325 "host-capability-signer-request-v1",
326 "7f22e9e0f813b91106693edfbb91309489dde1640152c29d878961fdef6b89d8",
327 CONTRACT_BODY_HOST_CAPABILITY_SIGNER_REQUEST_SCHEMA,
328 ),
329 Contract::new(
330 ContractId::HOST_CAPABILITY_SIGNER_RESPONSE_SCHEMA,
331 "host-capability-signer-response-v1",
332 "02a50b1fc0d1b8ae0611eab95b5560122c6425709ecc8de5e00bf0dd68085f44",
333 CONTRACT_BODY_HOST_CAPABILITY_SIGNER_RESPONSE_SCHEMA,
334 ),
335 Contract::new(
336 ContractId::IFRAME_BRIDGE_SCHEMA,
337 "bridge-v7",
338 "fe8da4e5b14ac6d7c7bb3101e041246e92573c58e1c9537e8cda2c26bf175ef5",
339 CONTRACT_BODY_IFRAME_BRIDGE_SCHEMA,
340 ),
341 Contract::new(
342 ContractId::MANIFEST_SCHEMA,
343 "manifest-v8",
344 "dfe5e9ea5f15d4f9c0272427ca8650d475e2fa8aacc4fb6be3a945a3069a26fb",
345 CONTRACT_BODY_MANIFEST_SCHEMA,
346 ),
347 Contract::new(
348 ContractId::NETWORK_GRANT_SCHEMA,
349 "network-grant-v2",
350 "5fc1cfc3469a992e551fd392fab982abb6f95e456a1cb768ceca137f7c693abc",
351 CONTRACT_BODY_NETWORK_GRANT_SCHEMA,
352 ),
353 Contract::new(
354 ContractId::OPAQUE_SURFACE_DOCUMENT_SCHEMA,
355 "opaque-surface-document-v3",
356 "63419ff5b5a8890e14f97ca29aaae175b93daff61d4567c5bdff7f6e6a9e7450",
357 CONTRACT_BODY_OPAQUE_SURFACE_DOCUMENT_SCHEMA,
358 ),
359 Contract::new(
360 ContractId::OPAQUE_SURFACE_TRANSPORT_SCHEMA,
361 "opaque-surface-transport-v6",
362 "8f2af2669edc9413020c26765ee3f1986ef63a7d0803466861d8cdae3977ccff",
363 CONTRACT_BODY_OPAQUE_SURFACE_TRANSPORT_SCHEMA,
364 ),
365 Contract::new(
366 ContractId::OWNER_SCOPE_INVENTORY_REGISTRY,
367 "owner-scope-inventory-registry-v1",
368 "f655313a641368383b3d84b6ea4f6a2a2ef42a44a4dd23f71211361c9c2e0505",
369 CONTRACT_BODY_OWNER_SCOPE_INVENTORY_REGISTRY,
370 ),
371 Contract::new(
372 ContractId::OWNER_SCOPE_INVENTORY_SCHEMA,
373 "owner-scope-inventory-v1",
374 "21dc4980103f3a36f4252ce141d7350476ec00968e8a320695e450274e928be1",
375 CONTRACT_BODY_OWNER_SCOPE_INVENTORY_SCHEMA,
376 ),
377 Contract::new(
378 ContractId::OWNER_SCOPE_MIGRATION_SCHEMA,
379 "owner-scope-migration-v1",
380 "497fff8a09d48fe195c18d13ff05ca6c9f8406f6215588901cb6d89315b713eb",
381 CONTRACT_BODY_OWNER_SCOPE_MIGRATION_SCHEMA,
382 ),
383 Contract::new(
384 ContractId::OWNER_SCOPE_ROOT_RECOVERY_SCHEMA,
385 "owner-scope-root-recovery-v1",
386 "81b961a9933d129c8f9119e3091226039ffbc0b4721116a4811f9785bebf9d64",
387 CONTRACT_BODY_OWNER_SCOPE_ROOT_RECOVERY_SCHEMA,
388 ),
389 Contract::new(
390 ContractId::PACKAGE_SIGNATURE_SCHEMA,
391 "package-signature-v1",
392 "13951c0f6831ba28647774368c76a817868aeb7984628e2cf3dc4ad1b54f8284",
393 CONTRACT_BODY_PACKAGE_SIGNATURE_SCHEMA,
394 ),
395 Contract::new(
396 ContractId::PERFORMANCE_CONTRACT,
397 "performance-contract-v4",
398 "aedc50ed8899346140965dc46e8adf2048c47bcf6c146c3b7a51646eda7725e1",
399 CONTRACT_BODY_PERFORMANCE_CONTRACT,
400 ),
401 Contract::new(
402 ContractId::PERFORMANCE_EVIDENCE_SCHEMA,
403 "performance-evidence-v4",
404 "f51ba9d425f0e40bc4f2db7ed26454e7575b14ffb6937a06dc01b8e7a66b3f61",
405 CONTRACT_BODY_PERFORMANCE_EVIDENCE_SCHEMA,
406 ),
407 Contract::new(
408 ContractId::PLATFORM_PACKAGE_PUBLICATION_SCHEMA,
409 "platform-package-publication-v1",
410 "20450b516c34d5a122020f4064ddfa03ffcb97ffea661e0868cd09760b3f08b0",
411 CONTRACT_BODY_PLATFORM_PACKAGE_PUBLICATION_SCHEMA,
412 ),
413 Contract::new(
414 ContractId::PLATFORM_PACKAGE_SET_SCHEMA,
415 "platform-package-set-v1",
416 "4d9979f5205ec047895b64c995312c588d998bb1c1448f6c9c559f1b7ab0d796",
417 CONTRACT_BODY_PLATFORM_PACKAGE_SET_SCHEMA,
418 ),
419 Contract::new(
420 ContractId::PLUGIN_PLATFORM_OPENAPI,
421 "plugin-platform-v15",
422 "5af8951d14a3bd98e32076c10f5eef4bde3aeba7bcbdabd491adce7bc158aa76",
423 CONTRACT_BODY_PLUGIN_PLATFORM_OPENAPI,
424 ),
425 Contract::new(
426 ContractId::PRESENTATION_ICON_EVIDENCE_SCHEMA,
427 "presentation-icon-evidence-v1",
428 "0b302ff651bec9447637dd08b672d2371fcf383c5d9505e885955aa1b607ec15",
429 CONTRACT_BODY_PRESENTATION_ICON_EVIDENCE_SCHEMA,
430 ),
431 Contract::new(
432 ContractId::PRESENTATION_LOCALE_FIXTURE,
433 "presentation-locale-fixtures-v1",
434 "cbb4c0188d020b5fbde9a0c2c33b3677d21cc64c0f0297b7f6f3f6c0efabc40e",
435 CONTRACT_BODY_PRESENTATION_LOCALE_FIXTURE,
436 ),
437 Contract::new(
438 ContractId::PROCESS_CONTAINMENT_SCHEMA,
439 "process-containment-v1",
440 "930ea44b1f62361706e994649e84f62af0a6418b77a661ae9bf9c10f1398e3fc",
441 CONTRACT_BODY_PROCESS_CONTAINMENT_SCHEMA,
442 ),
443 Contract::new(
444 ContractId::PUBLISHER_RELEASE_REF_SCHEMA,
445 "publisher-release-ref-v1",
446 "f9fd40c87197064ffa3e21a361780a4d057b51df2e886988aac64279785acdc0",
447 CONTRACT_BODY_PUBLISHER_RELEASE_REF_SCHEMA,
448 ),
449 Contract::new(
450 ContractId::QUARANTINE_CLEANUP_SCHEMA,
451 "quarantine-cleanup-v1",
452 "0aced01a8d409953d5075a799ac273cae79e285ac82debe93ac4d8b706571ad1",
453 CONTRACT_BODY_QUARANTINE_CLEANUP_SCHEMA,
454 ),
455 Contract::new(
456 ContractId::RELEASE_METADATA_SCHEMA,
457 "release-metadata-v8",
458 "f454fc1923be10fd5a4b46df4a6e376f7e9fe1d462f3da57977b92ad7c7496b0",
459 CONTRACT_BODY_RELEASE_METADATA_SCHEMA,
460 ),
461 Contract::new(
462 ContractId::RELEASE_PUBLISHER_CONFIG_SCHEMA,
463 "release-publisher-config-v1",
464 "c18b11489f81ac657c8324ed344b88b61b259981383ee7b4f9f0b65603a171f8",
465 CONTRACT_BODY_RELEASE_PUBLISHER_CONFIG_SCHEMA,
466 ),
467 Contract::new(
468 ContractId::RELEASE_REVOCATION_POINTER_SCHEMA,
469 "release-revocation-pointer-v2",
470 "dd39ba618ab02698f135875305d4aa6eb562af7d15520c4ad312cd82e9a7032b",
471 CONTRACT_BODY_RELEASE_REVOCATION_POINTER_SCHEMA,
472 ),
473 Contract::new(
474 ContractId::RELEASE_REVOCATION_SCHEMA,
475 "release-revocation-v3",
476 "bd2ca3ab93f047897d3b377adc7fa8b073fc946539a0c5495def1e64915a782b",
477 CONTRACT_BODY_RELEASE_REVOCATION_SCHEMA,
478 ),
479 Contract::new(
480 ContractId::RELEASE_ROOT_DELEGATION_SCHEMA,
481 "release-root-delegation-v1",
482 "c1adbb13eaeeca145d5ee787ff43777e60a5f329e460d20b8db358e4f5fc4825",
483 CONTRACT_BODY_RELEASE_ROOT_DELEGATION_SCHEMA,
484 ),
485 Contract::new(
486 ContractId::RELEASE_SIGNATURE_ENVELOPE_SCHEMA,
487 "release-signature-envelope-v1",
488 "7df9afd22bfdebfa89dc3bdb46ecdbe22a91ecce35fa46c492dd9795c66fae29",
489 CONTRACT_BODY_RELEASE_SIGNATURE_ENVELOPE_SCHEMA,
490 ),
491 Contract::new(
492 ContractId::RELEASE_SIGNING_LEDGER_EVIDENCE_SCHEMA,
493 "release-signing-ledger-evidence-v1",
494 "9ab8b7f65dedcd119d578debb4f6ff97fc35f4c7ac95c0e5435f8b0959bc1a5c",
495 CONTRACT_BODY_RELEASE_SIGNING_LEDGER_EVIDENCE_SCHEMA,
496 ),
497 Contract::new(
498 ContractId::RELEASE_SIGNING_LEDGER_RECEIPT_SCHEMA,
499 "release-signing-ledger-receipt-v1",
500 "29210cfefd967017c5c74bcf8489bd50511c5c9f36d17b0200056ccb90c30561",
501 CONTRACT_BODY_RELEASE_SIGNING_LEDGER_RECEIPT_SCHEMA,
502 ),
503 Contract::new(
504 ContractId::RELEASE_SIGNING_LEDGER_SCHEMA,
505 "release-signing-ledger-v1",
506 "0c72b30bfd6b857b9809e48e1b7eaaeb7134d5afd6a935aa8373465054403765",
507 CONTRACT_BODY_RELEASE_SIGNING_LEDGER_SCHEMA,
508 ),
509 Contract::new(
510 ContractId::RELEASE_SIGNING_SUBJECT_SCHEMA,
511 "release-signing-subject-v1",
512 "876b1459824f90042bd141e96bfea4633333bdf2a227e15b6e25c72db1179c8e",
513 CONTRACT_BODY_RELEASE_SIGNING_SUBJECT_SCHEMA,
514 ),
515 Contract::new(
516 ContractId::RELEASE_SOURCE_POLICY_POINTER_SCHEMA,
517 "release-source-policy-pointer-v2",
518 "735659143db7204abdd20c6fbc994ac7474618c41b85949aad4c28fb2912e034",
519 CONTRACT_BODY_RELEASE_SOURCE_POLICY_POINTER_SCHEMA,
520 ),
521 Contract::new(
522 ContractId::RELEASE_SOURCE_POLICY_SCHEMA,
523 "release-source-policy-v3",
524 "8814de028800c92b26c8c85a06298762598aeba1835f57048ec6c06430f8567b",
525 CONTRACT_BODY_RELEASE_SOURCE_POLICY_SCHEMA,
526 ),
527 Contract::new(
528 ContractId::RELEASE_TRUST_STATE_SCHEMA,
529 "release-trust-state-v1",
530 "19ffa182932a22401a33ee4c9921e957c67895c2d8b041c9a27ee3530bdfb2d2",
531 CONTRACT_BODY_RELEASE_TRUST_STATE_SCHEMA,
532 ),
533 Contract::new(
534 ContractId::RESOURCE_SCOPE_SCHEMA,
535 "resource-scope-v1",
536 "e6021bd576c7220ad5536645a7ad8e57ee7aeb9901c31a89444fa6b695d8dc6f",
537 CONTRACT_BODY_RESOURCE_SCOPE_SCHEMA,
538 ),
539 Contract::new(
540 ContractId::RUNTIME_ADMISSION_SCHEMA,
541 "runtime-admission-v1",
542 "bee7b149876447d663a4099dbd71e71fa97f8ff80ddf4e12cbfba951a47c4beb",
543 CONTRACT_BODY_RUNTIME_ADMISSION_SCHEMA,
544 ),
545 Contract::new(
546 ContractId::RUNTIME_DESCRIPTOR_SCHEMA,
547 "runtime-descriptor-v2",
548 "2ba59f6fb70d4ad757f60aca5541f4a44886542525e5bf76c393cd2368188351",
549 CONTRACT_BODY_RUNTIME_DESCRIPTOR_SCHEMA,
550 ),
551 Contract::new(
552 ContractId::RUNTIME_EXEC_JOURNAL_SCHEMA,
553 "runtime-exec-journal-v1",
554 "2bddbba383843b8ebc1554009909f0bb25e98616be763826a697cb0f408870d2",
555 CONTRACT_BODY_RUNTIME_EXEC_JOURNAL_SCHEMA,
556 ),
557 Contract::new(
558 ContractId::RUST_IPC_SCHEMA,
559 "rust-ipc-v6",
560 "9814ca091ac2e4e8435c1ab553e248e9d2e792de93ce9fd27bd030486774837f",
561 CONTRACT_BODY_RUST_IPC_SCHEMA,
562 ),
563 Contract::new(
564 ContractId::SESSION_SCOPE_MAINTENANCE_CONTRACT,
565 "session-scope-maintenance-v1",
566 "fd87b6654c954ee2a2dc67958ba214048b894aa421bb74a85fb02000ec51f37b",
567 CONTRACT_BODY_SESSION_SCOPE_MAINTENANCE_CONTRACT,
568 ),
569 Contract::new(
570 ContractId::SESSION_SCOPE_SCHEMA,
571 "session-scope-v1",
572 "3df0084264f0aff9fe2261c237cea439adb5cdc2534bfaaa0488d5992d4a7d2e",
573 CONTRACT_BODY_SESSION_SCOPE_SCHEMA,
574 ),
575 Contract::new(
576 ContractId::TARGET_CLASSIFIER_FIXTURE,
577 "target-classifier-v2",
578 "ae7336cce77a2e820f96f1cc309b93f8442c932dcebec25e3890d31cd098e2d1",
579 CONTRACT_BODY_TARGET_CLASSIFIER_FIXTURE,
580 ),
581 Contract::new(
582 ContractId::TOKEN_TICKET_SCHEMA,
583 "token-ticket-v4",
584 "5cf365b5b52a331ac0d3ad35a98be3c2ce668804ae88fdeaf9679a44db14feb1",
585 CONTRACT_BODY_TOKEN_TICKET_SCHEMA,
586 ),
587 Contract::new(
588 ContractId::TRUSTED_TIME_EVIDENCE_SCHEMA,
589 "trusted-time-evidence-v1",
590 "4398cbd2a3eea42a85008ee16a69d7adb265673e6749b1f13a4f1610f36e5e38",
591 CONTRACT_BODY_TRUSTED_TIME_EVIDENCE_SCHEMA,
592 ),
593 Contract::new(
594 ContractId::TRUSTED_TIME_LEAF_SCHEMA,
595 "trusted-time-leaf-v1",
596 "1c25eb0040800eef145aa2bb4c0e1ae197ae584d365e9595ab89037e26fe5ddb",
597 CONTRACT_BODY_TRUSTED_TIME_LEAF_SCHEMA,
598 ),
599 Contract::new(
600 ContractId::WASM_WORKER_SCHEMA,
601 "redevplugin-wasm-worker-v2",
602 "00bf123f3a9ed932de4b71c180e2a5c34af0f82050defb271fedec42cf217902",
603 CONTRACT_BODY_WASM_WORKER_SCHEMA,
604 ),
605 Contract::new(
606 ContractId::WORKER_INVOCATION_SCHEMA,
607 "worker-invocation-v3",
608 "f08af491cbf5e7b71d1aeafbeac9ae581ee5fc3bcb76184daec369f94bab3927",
609 CONTRACT_BODY_WORKER_INVOCATION_SCHEMA,
610 ),
611];
612
613pub(crate) static ALL: [Contract; 61] = [
614 Contract::new(
615 ContractId::COMPATIBILITY_MANIFEST_SCHEMA,
616 "compatibility-manifest-v17",
617 "f3d726ab1aa4de61acba453ed2511511c51749f67e614f422dcf525fb687ad6e",
618 CONTRACT_BODY_COMPATIBILITY_MANIFEST_SCHEMA,
619 ),
620 Contract::new(
621 ContractId::CONTRACT_REGISTRY,
622 "contract-registry-v2",
623 "2152d55e7f1b49b532556fd39d43b2dfe568748adc57ab160992073e1c7032c8",
624 CONTRACT_BODY_CONTRACT_REGISTRY,
625 ),
626 Contract::new(
627 ContractId::CONTRACT_REGISTRY_SCHEMA,
628 "contract-registry-v2",
629 "d516b3565158ac1b0d5e9f86b91b13ac19321ab3ff54468be41951b68d7085ac",
630 CONTRACT_BODY_CONTRACT_REGISTRY_SCHEMA,
631 ),
632 Contract::new(
633 ContractId::ERROR_CODES_SCHEMA,
634 "error-codes-v8",
635 "454e3c8b46e20bc524080ca1aa91dcf2ecdfe0a90cc33b5b328e87356d07e7e3",
636 CONTRACT_BODY_ERROR_CODES_SCHEMA,
637 ),
638 Contract::new(
639 ContractId::EXTERNAL_SIGNER_REQUEST_SCHEMA,
640 "external-signer-request-v1",
641 "abc18af2e29dea6f0b49a28b75b046ef02f200597978c8238cc587fb7e670760",
642 CONTRACT_BODY_EXTERNAL_SIGNER_REQUEST_SCHEMA,
643 ),
644 Contract::new(
645 ContractId::EXTERNAL_SIGNER_RESPONSE_SCHEMA,
646 "external-signer-response-v1",
647 "bbe657df5afdf459a4c5f83282ddc3ec6c80c1ebd25bb954eac92101f35afc6c",
648 CONTRACT_BODY_EXTERNAL_SIGNER_RESPONSE_SCHEMA,
649 ),
650 Contract::new(
651 ContractId::HOST_CAPABILITY_COMPATIBILITY_SCHEMA,
652 "host-capability-compatibility-v1",
653 "361ebbf7009aeb66c763ecde46427b17b6cf7d2307c01886c5987a1f4f1762de",
654 CONTRACT_BODY_HOST_CAPABILITY_COMPATIBILITY_SCHEMA,
655 ),
656 Contract::new(
657 ContractId::HOST_CAPABILITY_CONTRACT_SCHEMA,
658 "host-capability-contract-v1",
659 "0a653e36d44104f1d16b06ee424648086c146f23c907b176bdf470ae73025485",
660 CONTRACT_BODY_HOST_CAPABILITY_CONTRACT_SCHEMA,
661 ),
662 Contract::new(
663 ContractId::HOST_CAPABILITY_MANIFEST_SCHEMA,
664 "host-capability-manifest-v1",
665 "5f13a8e5f918378b9cba9fdc133a9a75ba3a8311c30cb6a02ca0aba09035110e",
666 CONTRACT_BODY_HOST_CAPABILITY_MANIFEST_SCHEMA,
667 ),
668 Contract::new(
669 ContractId::HOST_CAPABILITY_NOTICES_SCHEMA,
670 "host-capability-notices-v1",
671 "6affd5d0ae90239f6fd08cbeddae4eef393efa2838c9e4935874ba3dc0e05948",
672 CONTRACT_BODY_HOST_CAPABILITY_NOTICES_SCHEMA,
673 ),
674 Contract::new(
675 ContractId::HOST_CAPABILITY_PIN_SCHEMA,
676 "host-capability-pin-v1",
677 "20526a5934f0d85a3db7882492487266f09de5bcd176e2c7936f05d0b7fe0338",
678 CONTRACT_BODY_HOST_CAPABILITY_PIN_SCHEMA,
679 ),
680 Contract::new(
681 ContractId::HOST_CAPABILITY_PUBLISHER_CONFIG_SCHEMA,
682 "host-capability-publisher-config-v1",
683 "f06ab3d70f3f9dd2114fe9d489841f1d6b5f169ee17b8c92aa1bfaf9bbf865c4",
684 CONTRACT_BODY_HOST_CAPABILITY_PUBLISHER_CONFIG_SCHEMA,
685 ),
686 Contract::new(
687 ContractId::HOST_CAPABILITY_SIGNATURE_SCHEMA,
688 "host-capability-signature-v1",
689 "88cbc1d63afb7e289ca4f8b7c76f702b8d20156f7722c1b71f3ab9138a240a5e",
690 CONTRACT_BODY_HOST_CAPABILITY_SIGNATURE_SCHEMA,
691 ),
692 Contract::new(
693 ContractId::HOST_CAPABILITY_SIGNER_REQUEST_SCHEMA,
694 "host-capability-signer-request-v1",
695 "7f22e9e0f813b91106693edfbb91309489dde1640152c29d878961fdef6b89d8",
696 CONTRACT_BODY_HOST_CAPABILITY_SIGNER_REQUEST_SCHEMA,
697 ),
698 Contract::new(
699 ContractId::HOST_CAPABILITY_SIGNER_RESPONSE_SCHEMA,
700 "host-capability-signer-response-v1",
701 "02a50b1fc0d1b8ae0611eab95b5560122c6425709ecc8de5e00bf0dd68085f44",
702 CONTRACT_BODY_HOST_CAPABILITY_SIGNER_RESPONSE_SCHEMA,
703 ),
704 Contract::new(
705 ContractId::IFRAME_BRIDGE_SCHEMA,
706 "bridge-v7",
707 "fe8da4e5b14ac6d7c7bb3101e041246e92573c58e1c9537e8cda2c26bf175ef5",
708 CONTRACT_BODY_IFRAME_BRIDGE_SCHEMA,
709 ),
710 Contract::new(
711 ContractId::MANIFEST_SCHEMA,
712 "manifest-v8",
713 "dfe5e9ea5f15d4f9c0272427ca8650d475e2fa8aacc4fb6be3a945a3069a26fb",
714 CONTRACT_BODY_MANIFEST_SCHEMA,
715 ),
716 Contract::new(
717 ContractId::NETWORK_GRANT_SCHEMA,
718 "network-grant-v2",
719 "5fc1cfc3469a992e551fd392fab982abb6f95e456a1cb768ceca137f7c693abc",
720 CONTRACT_BODY_NETWORK_GRANT_SCHEMA,
721 ),
722 Contract::new(
723 ContractId::OPAQUE_SURFACE_DOCUMENT_SCHEMA,
724 "opaque-surface-document-v3",
725 "63419ff5b5a8890e14f97ca29aaae175b93daff61d4567c5bdff7f6e6a9e7450",
726 CONTRACT_BODY_OPAQUE_SURFACE_DOCUMENT_SCHEMA,
727 ),
728 Contract::new(
729 ContractId::OPAQUE_SURFACE_TRANSPORT_SCHEMA,
730 "opaque-surface-transport-v6",
731 "8f2af2669edc9413020c26765ee3f1986ef63a7d0803466861d8cdae3977ccff",
732 CONTRACT_BODY_OPAQUE_SURFACE_TRANSPORT_SCHEMA,
733 ),
734 Contract::new(
735 ContractId::OWNER_SCOPE_INVENTORY_REGISTRY,
736 "owner-scope-inventory-registry-v1",
737 "f655313a641368383b3d84b6ea4f6a2a2ef42a44a4dd23f71211361c9c2e0505",
738 CONTRACT_BODY_OWNER_SCOPE_INVENTORY_REGISTRY,
739 ),
740 Contract::new(
741 ContractId::OWNER_SCOPE_INVENTORY_SCHEMA,
742 "owner-scope-inventory-v1",
743 "21dc4980103f3a36f4252ce141d7350476ec00968e8a320695e450274e928be1",
744 CONTRACT_BODY_OWNER_SCOPE_INVENTORY_SCHEMA,
745 ),
746 Contract::new(
747 ContractId::OWNER_SCOPE_MIGRATION_SCHEMA,
748 "owner-scope-migration-v1",
749 "497fff8a09d48fe195c18d13ff05ca6c9f8406f6215588901cb6d89315b713eb",
750 CONTRACT_BODY_OWNER_SCOPE_MIGRATION_SCHEMA,
751 ),
752 Contract::new(
753 ContractId::OWNER_SCOPE_ROOT_RECOVERY_SCHEMA,
754 "owner-scope-root-recovery-v1",
755 "81b961a9933d129c8f9119e3091226039ffbc0b4721116a4811f9785bebf9d64",
756 CONTRACT_BODY_OWNER_SCOPE_ROOT_RECOVERY_SCHEMA,
757 ),
758 Contract::new(
759 ContractId::PACKAGE_SIGNATURE_SCHEMA,
760 "package-signature-v1",
761 "13951c0f6831ba28647774368c76a817868aeb7984628e2cf3dc4ad1b54f8284",
762 CONTRACT_BODY_PACKAGE_SIGNATURE_SCHEMA,
763 ),
764 Contract::new(
765 ContractId::PERFORMANCE_CONTRACT,
766 "performance-contract-v4",
767 "aedc50ed8899346140965dc46e8adf2048c47bcf6c146c3b7a51646eda7725e1",
768 CONTRACT_BODY_PERFORMANCE_CONTRACT,
769 ),
770 Contract::new(
771 ContractId::PERFORMANCE_EVIDENCE_SCHEMA,
772 "performance-evidence-v4",
773 "f51ba9d425f0e40bc4f2db7ed26454e7575b14ffb6937a06dc01b8e7a66b3f61",
774 CONTRACT_BODY_PERFORMANCE_EVIDENCE_SCHEMA,
775 ),
776 Contract::new(
777 ContractId::PLATFORM_PACKAGE_PUBLICATION_SCHEMA,
778 "platform-package-publication-v1",
779 "20450b516c34d5a122020f4064ddfa03ffcb97ffea661e0868cd09760b3f08b0",
780 CONTRACT_BODY_PLATFORM_PACKAGE_PUBLICATION_SCHEMA,
781 ),
782 Contract::new(
783 ContractId::PLATFORM_PACKAGE_SET_SCHEMA,
784 "platform-package-set-v1",
785 "4d9979f5205ec047895b64c995312c588d998bb1c1448f6c9c559f1b7ab0d796",
786 CONTRACT_BODY_PLATFORM_PACKAGE_SET_SCHEMA,
787 ),
788 Contract::new(
789 ContractId::PLUGIN_PLATFORM_OPENAPI,
790 "plugin-platform-v15",
791 "5af8951d14a3bd98e32076c10f5eef4bde3aeba7bcbdabd491adce7bc158aa76",
792 CONTRACT_BODY_PLUGIN_PLATFORM_OPENAPI,
793 ),
794 Contract::new(
795 ContractId::PRESENTATION_ICON_EVIDENCE_SCHEMA,
796 "presentation-icon-evidence-v1",
797 "0b302ff651bec9447637dd08b672d2371fcf383c5d9505e885955aa1b607ec15",
798 CONTRACT_BODY_PRESENTATION_ICON_EVIDENCE_SCHEMA,
799 ),
800 Contract::new(
801 ContractId::PRESENTATION_LOCALE_FIXTURE,
802 "presentation-locale-fixtures-v1",
803 "cbb4c0188d020b5fbde9a0c2c33b3677d21cc64c0f0297b7f6f3f6c0efabc40e",
804 CONTRACT_BODY_PRESENTATION_LOCALE_FIXTURE,
805 ),
806 Contract::new(
807 ContractId::PROCESS_CONTAINMENT_SCHEMA,
808 "process-containment-v1",
809 "930ea44b1f62361706e994649e84f62af0a6418b77a661ae9bf9c10f1398e3fc",
810 CONTRACT_BODY_PROCESS_CONTAINMENT_SCHEMA,
811 ),
812 Contract::new(
813 ContractId::PUBLISHER_RELEASE_REF_SCHEMA,
814 "publisher-release-ref-v1",
815 "f9fd40c87197064ffa3e21a361780a4d057b51df2e886988aac64279785acdc0",
816 CONTRACT_BODY_PUBLISHER_RELEASE_REF_SCHEMA,
817 ),
818 Contract::new(
819 ContractId::QUARANTINE_CLEANUP_SCHEMA,
820 "quarantine-cleanup-v1",
821 "0aced01a8d409953d5075a799ac273cae79e285ac82debe93ac4d8b706571ad1",
822 CONTRACT_BODY_QUARANTINE_CLEANUP_SCHEMA,
823 ),
824 Contract::new(
825 ContractId::RELEASE_METADATA_SCHEMA,
826 "release-metadata-v8",
827 "f454fc1923be10fd5a4b46df4a6e376f7e9fe1d462f3da57977b92ad7c7496b0",
828 CONTRACT_BODY_RELEASE_METADATA_SCHEMA,
829 ),
830 Contract::new(
831 ContractId::RELEASE_PUBLISHER_CONFIG_SCHEMA,
832 "release-publisher-config-v1",
833 "c18b11489f81ac657c8324ed344b88b61b259981383ee7b4f9f0b65603a171f8",
834 CONTRACT_BODY_RELEASE_PUBLISHER_CONFIG_SCHEMA,
835 ),
836 Contract::new(
837 ContractId::RELEASE_REVOCATION_POINTER_SCHEMA,
838 "release-revocation-pointer-v2",
839 "dd39ba618ab02698f135875305d4aa6eb562af7d15520c4ad312cd82e9a7032b",
840 CONTRACT_BODY_RELEASE_REVOCATION_POINTER_SCHEMA,
841 ),
842 Contract::new(
843 ContractId::RELEASE_REVOCATION_SCHEMA,
844 "release-revocation-v3",
845 "bd2ca3ab93f047897d3b377adc7fa8b073fc946539a0c5495def1e64915a782b",
846 CONTRACT_BODY_RELEASE_REVOCATION_SCHEMA,
847 ),
848 Contract::new(
849 ContractId::RELEASE_ROOT_DELEGATION_SCHEMA,
850 "release-root-delegation-v1",
851 "c1adbb13eaeeca145d5ee787ff43777e60a5f329e460d20b8db358e4f5fc4825",
852 CONTRACT_BODY_RELEASE_ROOT_DELEGATION_SCHEMA,
853 ),
854 Contract::new(
855 ContractId::RELEASE_SIGNATURE_ENVELOPE_SCHEMA,
856 "release-signature-envelope-v1",
857 "7df9afd22bfdebfa89dc3bdb46ecdbe22a91ecce35fa46c492dd9795c66fae29",
858 CONTRACT_BODY_RELEASE_SIGNATURE_ENVELOPE_SCHEMA,
859 ),
860 Contract::new(
861 ContractId::RELEASE_SIGNING_LEDGER_EVIDENCE_SCHEMA,
862 "release-signing-ledger-evidence-v1",
863 "9ab8b7f65dedcd119d578debb4f6ff97fc35f4c7ac95c0e5435f8b0959bc1a5c",
864 CONTRACT_BODY_RELEASE_SIGNING_LEDGER_EVIDENCE_SCHEMA,
865 ),
866 Contract::new(
867 ContractId::RELEASE_SIGNING_LEDGER_RECEIPT_SCHEMA,
868 "release-signing-ledger-receipt-v1",
869 "29210cfefd967017c5c74bcf8489bd50511c5c9f36d17b0200056ccb90c30561",
870 CONTRACT_BODY_RELEASE_SIGNING_LEDGER_RECEIPT_SCHEMA,
871 ),
872 Contract::new(
873 ContractId::RELEASE_SIGNING_LEDGER_SCHEMA,
874 "release-signing-ledger-v1",
875 "0c72b30bfd6b857b9809e48e1b7eaaeb7134d5afd6a935aa8373465054403765",
876 CONTRACT_BODY_RELEASE_SIGNING_LEDGER_SCHEMA,
877 ),
878 Contract::new(
879 ContractId::RELEASE_SIGNING_SUBJECT_SCHEMA,
880 "release-signing-subject-v1",
881 "876b1459824f90042bd141e96bfea4633333bdf2a227e15b6e25c72db1179c8e",
882 CONTRACT_BODY_RELEASE_SIGNING_SUBJECT_SCHEMA,
883 ),
884 Contract::new(
885 ContractId::RELEASE_SOURCE_POLICY_POINTER_SCHEMA,
886 "release-source-policy-pointer-v2",
887 "735659143db7204abdd20c6fbc994ac7474618c41b85949aad4c28fb2912e034",
888 CONTRACT_BODY_RELEASE_SOURCE_POLICY_POINTER_SCHEMA,
889 ),
890 Contract::new(
891 ContractId::RELEASE_SOURCE_POLICY_SCHEMA,
892 "release-source-policy-v3",
893 "8814de028800c92b26c8c85a06298762598aeba1835f57048ec6c06430f8567b",
894 CONTRACT_BODY_RELEASE_SOURCE_POLICY_SCHEMA,
895 ),
896 Contract::new(
897 ContractId::RELEASE_TRUST_STATE_SCHEMA,
898 "release-trust-state-v1",
899 "19ffa182932a22401a33ee4c9921e957c67895c2d8b041c9a27ee3530bdfb2d2",
900 CONTRACT_BODY_RELEASE_TRUST_STATE_SCHEMA,
901 ),
902 Contract::new(
903 ContractId::RESOURCE_SCOPE_SCHEMA,
904 "resource-scope-v1",
905 "e6021bd576c7220ad5536645a7ad8e57ee7aeb9901c31a89444fa6b695d8dc6f",
906 CONTRACT_BODY_RESOURCE_SCOPE_SCHEMA,
907 ),
908 Contract::new(
909 ContractId::RUNTIME_ADMISSION_SCHEMA,
910 "runtime-admission-v1",
911 "bee7b149876447d663a4099dbd71e71fa97f8ff80ddf4e12cbfba951a47c4beb",
912 CONTRACT_BODY_RUNTIME_ADMISSION_SCHEMA,
913 ),
914 Contract::new(
915 ContractId::RUNTIME_DESCRIPTOR_SCHEMA,
916 "runtime-descriptor-v2",
917 "2ba59f6fb70d4ad757f60aca5541f4a44886542525e5bf76c393cd2368188351",
918 CONTRACT_BODY_RUNTIME_DESCRIPTOR_SCHEMA,
919 ),
920 Contract::new(
921 ContractId::RUNTIME_EXEC_JOURNAL_SCHEMA,
922 "runtime-exec-journal-v1",
923 "2bddbba383843b8ebc1554009909f0bb25e98616be763826a697cb0f408870d2",
924 CONTRACT_BODY_RUNTIME_EXEC_JOURNAL_SCHEMA,
925 ),
926 Contract::new(
927 ContractId::RUST_IPC_SCHEMA,
928 "rust-ipc-v6",
929 "9814ca091ac2e4e8435c1ab553e248e9d2e792de93ce9fd27bd030486774837f",
930 CONTRACT_BODY_RUST_IPC_SCHEMA,
931 ),
932 Contract::new(
933 ContractId::SESSION_SCOPE_MAINTENANCE_CONTRACT,
934 "session-scope-maintenance-v1",
935 "fd87b6654c954ee2a2dc67958ba214048b894aa421bb74a85fb02000ec51f37b",
936 CONTRACT_BODY_SESSION_SCOPE_MAINTENANCE_CONTRACT,
937 ),
938 Contract::new(
939 ContractId::SESSION_SCOPE_SCHEMA,
940 "session-scope-v1",
941 "3df0084264f0aff9fe2261c237cea439adb5cdc2534bfaaa0488d5992d4a7d2e",
942 CONTRACT_BODY_SESSION_SCOPE_SCHEMA,
943 ),
944 Contract::new(
945 ContractId::TARGET_CLASSIFIER_FIXTURE,
946 "target-classifier-v2",
947 "ae7336cce77a2e820f96f1cc309b93f8442c932dcebec25e3890d31cd098e2d1",
948 CONTRACT_BODY_TARGET_CLASSIFIER_FIXTURE,
949 ),
950 Contract::new(
951 ContractId::TOKEN_TICKET_SCHEMA,
952 "token-ticket-v4",
953 "5cf365b5b52a331ac0d3ad35a98be3c2ce668804ae88fdeaf9679a44db14feb1",
954 CONTRACT_BODY_TOKEN_TICKET_SCHEMA,
955 ),
956 Contract::new(
957 ContractId::TRUSTED_TIME_EVIDENCE_SCHEMA,
958 "trusted-time-evidence-v1",
959 "4398cbd2a3eea42a85008ee16a69d7adb265673e6749b1f13a4f1610f36e5e38",
960 CONTRACT_BODY_TRUSTED_TIME_EVIDENCE_SCHEMA,
961 ),
962 Contract::new(
963 ContractId::TRUSTED_TIME_LEAF_SCHEMA,
964 "trusted-time-leaf-v1",
965 "1c25eb0040800eef145aa2bb4c0e1ae197ae584d365e9595ab89037e26fe5ddb",
966 CONTRACT_BODY_TRUSTED_TIME_LEAF_SCHEMA,
967 ),
968 Contract::new(
969 ContractId::WASM_WORKER_SCHEMA,
970 "redevplugin-wasm-worker-v2",
971 "00bf123f3a9ed932de4b71c180e2a5c34af0f82050defb271fedec42cf217902",
972 CONTRACT_BODY_WASM_WORKER_SCHEMA,
973 ),
974 Contract::new(
975 ContractId::WORKER_INVOCATION_SCHEMA,
976 "worker-invocation-v3",
977 "f08af491cbf5e7b71d1aeafbeac9ae581ee5fc3bcb76184daec369f94bab3927",
978 CONTRACT_BODY_WORKER_INVOCATION_SCHEMA,
979 ),
980];
981
982pub(crate) const REGISTRY_CONTRACT_INDEX: usize = 1;
983
984pub(crate) fn get(id: ContractId) -> &'static Contract {
985 match id {
986 ContractId::COMPATIBILITY_MANIFEST_SCHEMA => &ALL[0],
987 ContractId::CONTRACT_REGISTRY => &ALL[1],
988 ContractId::CONTRACT_REGISTRY_SCHEMA => &ALL[2],
989 ContractId::ERROR_CODES_SCHEMA => &ALL[3],
990 ContractId::EXTERNAL_SIGNER_REQUEST_SCHEMA => &ALL[4],
991 ContractId::EXTERNAL_SIGNER_RESPONSE_SCHEMA => &ALL[5],
992 ContractId::HOST_CAPABILITY_COMPATIBILITY_SCHEMA => &ALL[6],
993 ContractId::HOST_CAPABILITY_CONTRACT_SCHEMA => &ALL[7],
994 ContractId::HOST_CAPABILITY_MANIFEST_SCHEMA => &ALL[8],
995 ContractId::HOST_CAPABILITY_NOTICES_SCHEMA => &ALL[9],
996 ContractId::HOST_CAPABILITY_PIN_SCHEMA => &ALL[10],
997 ContractId::HOST_CAPABILITY_PUBLISHER_CONFIG_SCHEMA => &ALL[11],
998 ContractId::HOST_CAPABILITY_SIGNATURE_SCHEMA => &ALL[12],
999 ContractId::HOST_CAPABILITY_SIGNER_REQUEST_SCHEMA => &ALL[13],
1000 ContractId::HOST_CAPABILITY_SIGNER_RESPONSE_SCHEMA => &ALL[14],
1001 ContractId::IFRAME_BRIDGE_SCHEMA => &ALL[15],
1002 ContractId::MANIFEST_SCHEMA => &ALL[16],
1003 ContractId::NETWORK_GRANT_SCHEMA => &ALL[17],
1004 ContractId::OPAQUE_SURFACE_DOCUMENT_SCHEMA => &ALL[18],
1005 ContractId::OPAQUE_SURFACE_TRANSPORT_SCHEMA => &ALL[19],
1006 ContractId::OWNER_SCOPE_INVENTORY_REGISTRY => &ALL[20],
1007 ContractId::OWNER_SCOPE_INVENTORY_SCHEMA => &ALL[21],
1008 ContractId::OWNER_SCOPE_MIGRATION_SCHEMA => &ALL[22],
1009 ContractId::OWNER_SCOPE_ROOT_RECOVERY_SCHEMA => &ALL[23],
1010 ContractId::PACKAGE_SIGNATURE_SCHEMA => &ALL[24],
1011 ContractId::PERFORMANCE_CONTRACT => &ALL[25],
1012 ContractId::PERFORMANCE_EVIDENCE_SCHEMA => &ALL[26],
1013 ContractId::PLATFORM_PACKAGE_PUBLICATION_SCHEMA => &ALL[27],
1014 ContractId::PLATFORM_PACKAGE_SET_SCHEMA => &ALL[28],
1015 ContractId::PLUGIN_PLATFORM_OPENAPI => &ALL[29],
1016 ContractId::PRESENTATION_ICON_EVIDENCE_SCHEMA => &ALL[30],
1017 ContractId::PRESENTATION_LOCALE_FIXTURE => &ALL[31],
1018 ContractId::PROCESS_CONTAINMENT_SCHEMA => &ALL[32],
1019 ContractId::PUBLISHER_RELEASE_REF_SCHEMA => &ALL[33],
1020 ContractId::QUARANTINE_CLEANUP_SCHEMA => &ALL[34],
1021 ContractId::RELEASE_METADATA_SCHEMA => &ALL[35],
1022 ContractId::RELEASE_PUBLISHER_CONFIG_SCHEMA => &ALL[36],
1023 ContractId::RELEASE_REVOCATION_POINTER_SCHEMA => &ALL[37],
1024 ContractId::RELEASE_REVOCATION_SCHEMA => &ALL[38],
1025 ContractId::RELEASE_ROOT_DELEGATION_SCHEMA => &ALL[39],
1026 ContractId::RELEASE_SIGNATURE_ENVELOPE_SCHEMA => &ALL[40],
1027 ContractId::RELEASE_SIGNING_LEDGER_EVIDENCE_SCHEMA => &ALL[41],
1028 ContractId::RELEASE_SIGNING_LEDGER_RECEIPT_SCHEMA => &ALL[42],
1029 ContractId::RELEASE_SIGNING_LEDGER_SCHEMA => &ALL[43],
1030 ContractId::RELEASE_SIGNING_SUBJECT_SCHEMA => &ALL[44],
1031 ContractId::RELEASE_SOURCE_POLICY_POINTER_SCHEMA => &ALL[45],
1032 ContractId::RELEASE_SOURCE_POLICY_SCHEMA => &ALL[46],
1033 ContractId::RELEASE_TRUST_STATE_SCHEMA => &ALL[47],
1034 ContractId::RESOURCE_SCOPE_SCHEMA => &ALL[48],
1035 ContractId::RUNTIME_ADMISSION_SCHEMA => &ALL[49],
1036 ContractId::RUNTIME_DESCRIPTOR_SCHEMA => &ALL[50],
1037 ContractId::RUNTIME_EXEC_JOURNAL_SCHEMA => &ALL[51],
1038 ContractId::RUST_IPC_SCHEMA => &ALL[52],
1039 ContractId::SESSION_SCOPE_MAINTENANCE_CONTRACT => &ALL[53],
1040 ContractId::SESSION_SCOPE_SCHEMA => &ALL[54],
1041 ContractId::TARGET_CLASSIFIER_FIXTURE => &ALL[55],
1042 ContractId::TOKEN_TICKET_SCHEMA => &ALL[56],
1043 ContractId::TRUSTED_TIME_EVIDENCE_SCHEMA => &ALL[57],
1044 ContractId::TRUSTED_TIME_LEAF_SCHEMA => &ALL[58],
1045 ContractId::WASM_WORKER_SCHEMA => &ALL[59],
1046 ContractId::WORKER_INVOCATION_SCHEMA => &ALL[60],
1047 _ => unreachable!("ContractId can only contain generated values"),
1048 }
1049}
1050
1051static NPM_PACKAGES: [NpmPackageCoordinate; 2] = [
1052 NpmPackageCoordinate {
1053 name: "@floegence/redevplugin-contracts",
1054 version: "0.7.21",
1055 },
1056 NpmPackageCoordinate {
1057 name: "@floegence/redevplugin-ui",
1058 version: "0.7.21",
1059 },
1060];
1061
1062static RUST_CRATES: [RustCrateCoordinate; 6] = [
1063 RustCrateCoordinate {
1064 name: "redevplugin-contracts",
1065 version: "0.7.21",
1066 role: "contracts",
1067 },
1068 RustCrateCoordinate {
1069 name: "redevplugin-ipc",
1070 version: "0.7.21",
1071 role: "ipc",
1072 },
1073 RustCrateCoordinate {
1074 name: "redevplugin-wasm-abi",
1075 version: "0.7.21",
1076 role: "wasm_abi",
1077 },
1078 RustCrateCoordinate {
1079 name: "redevplugin-target-classifier",
1080 version: "0.7.21",
1081 role: "target_classifier",
1082 },
1083 RustCrateCoordinate {
1084 name: "redevplugin-worker-sdk",
1085 version: "0.7.21",
1086 role: "worker_sdk",
1087 },
1088 RustCrateCoordinate {
1089 name: "redevplugin-runtime",
1090 version: "0.7.21",
1091 role: "runtime",
1092 },
1093];
1094
1095pub(crate) static PACKAGE_SET: PackageSet = PackageSet {
1096 schema_version: "redevplugin.platform_package_set.v1",
1097 platform_version: "0.7.21",
1098 go_module: GoModuleCoordinate {
1099 module: "github.com/floegence/redevplugin",
1100 version: "v0.7.21",
1101 },
1102 npm_packages: &NPM_PACKAGES,
1103 rust_crates: &RUST_CRATES,
1104 contract_registry_version: "contract-registry-v2",
1105 contract_set_sha256: "54c23dbe91491d1c6fb7d0f2ef727a207d407b59894ba4c5211afd000f99ec70",
1106};