@inf-monkeys-tech/monkeys 1.1.13 → 1.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/esm/index.mjs +15 -3
- package/lib/esm/index.mjs.map +1 -1
- package/lib/esm/runtime/index.mjs +15 -3
- package/lib/esm/runtime/index.mjs.map +1 -1
- package/lib/runtime/declarative-runtime-contract.d.ts.map +1 -1
- package/lib/runtime/declarative-runtime-contract.js +17 -4
- package/lib/runtime/declarative-runtime-contract.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -60,6 +60,6 @@ The current `OntologyBindingSchema`, `PageRuntimeBundleSchema`, and `compilePage
|
|
|
60
60
|
|
|
61
61
|
`assertViewProviderContract` checks provider/capability identity and ownership, then checks the declared contract. Unversioned nodes require exact revisions. `assertDeclarativeCapabilityContract` can prove an unversioned snapshot equivalent by reconstructing and comparing its complete immutable manifest/provider hashes; IDs alone are insufficient. `projectRuntimeContracts` additionally uses governed historical entries to enrich a rebuildable Page or Workbench projection. It preserves definitions, release references and dependency snapshots, and recalculates only the projection content hash.
|
|
62
62
|
|
|
63
|
-
`assertCompatibleCapabilityUpgrade` guards catalog activation and package publication. Compatible inputs accept every historical value; outputs must remain valid for historical consumers. Optional input properties, enum widening and documentation annotations are supported; unknown Schema changes fail closed. Provider identity, lifecycle, effects, placement and access requirements remain protected. Breaking changes require a separate capability/provider identity with the existing implementation retained. Behavioral regression tests remain necessary alongside Schema checks.
|
|
63
|
+
`assertCompatibleCapabilityUpgrade` guards catalog activation and package publication. Compatible inputs accept every historical value; outputs must remain valid for historical consumers. Optional input properties, optional ports, enum widening and documentation annotations are supported; unknown Schema changes fail closed. Provider identity, lifecycle, effects, placement and access requirements remain protected. Breaking changes require a separate capability/provider identity with the existing implementation retained. Behavioral regression tests remain necessary alongside Schema checks.
|
|
64
64
|
|
|
65
65
|
`sameSchemaContract` compares stable identity, tenant scope, Schema version and content hash, allowing a different metadata revision for identical Schema content. Raw query results, permissions, command validation and immutable snapshot verification must continue to use their owning validators.
|
package/lib/esm/index.mjs
CHANGED
|
@@ -26147,7 +26147,6 @@ var assertCompatibleCapabilityUpgrade = (previous, next) => {
|
|
|
26147
26147
|
}
|
|
26148
26148
|
const manifestContract = (entry) => ({
|
|
26149
26149
|
kind: entry.manifest.kind,
|
|
26150
|
-
ports: entry.manifest.ports,
|
|
26151
26150
|
runtime: { ...entry.manifest.runtime, providerBindings: entry.manifest.runtime.providerBindings.map((binding) => ({ ...binding, providerRef: { ...binding.providerRef, version: void 0 } })) },
|
|
26152
26151
|
placement: entry.manifest.placement,
|
|
26153
26152
|
accessibility: entry.manifest.accessibility
|
|
@@ -26174,7 +26173,15 @@ var assertCompatibleCapabilityUpgrade = (previous, next) => {
|
|
|
26174
26173
|
for (const direction of ["inputPorts", "outputPorts"]) {
|
|
26175
26174
|
const oldPorts = oldRegistration[direction];
|
|
26176
26175
|
const newPorts = newRegistration[direction];
|
|
26177
|
-
|
|
26176
|
+
const oldManifestPorts = previous.manifest.ports?.[direction === "inputPorts" ? "inputs" : "outputs"] ?? [];
|
|
26177
|
+
const newManifestPorts = next.manifest.ports?.[direction === "inputPorts" ? "inputs" : "outputs"] ?? [];
|
|
26178
|
+
for (const port of oldManifestPorts) {
|
|
26179
|
+
const replacement = newManifestPorts.find((candidate) => candidate.name === port.name);
|
|
26180
|
+
if (!replacement || canonicalContentHash(port) !== canonicalContentHash(replacement)) throw new TypeError("Published runtime port semantics changed.");
|
|
26181
|
+
}
|
|
26182
|
+
if (newManifestPorts.some((port) => port.required && !oldManifestPorts.some((previousPort) => previousPort.name === port.name)) || newPorts.some((port) => port.required && !oldPorts.some((previousPort) => previousPort.name === port.name))) {
|
|
26183
|
+
throw new TypeError("New runtime ports must be optional for published declarations.");
|
|
26184
|
+
}
|
|
26178
26185
|
for (const port of oldPorts) {
|
|
26179
26186
|
const replacement = newPorts.find((candidate) => candidate.name === port.name);
|
|
26180
26187
|
if (!replacement || port.required !== replacement.required || port.multiple !== replacement.multiple) throw new TypeError("Public runtime port cardinality changed.");
|
|
@@ -26188,7 +26195,12 @@ var assertCompatibleCapabilityUpgrade = (previous, next) => {
|
|
|
26188
26195
|
if (canonicalContentHash(requirements(oldRegistration)) !== canonicalContentHash(requirements(newRegistration))) {
|
|
26189
26196
|
throw new TypeError("Runtime Ontology access requirements changed.");
|
|
26190
26197
|
}
|
|
26191
|
-
|
|
26198
|
+
const existingOutputs = new Set(oldRegistration.outputPorts.map((port) => port.name));
|
|
26199
|
+
const existingActions = newRegistration.actionRequirements.filter((requirement) => existingOutputs.has(requirement.outputPort));
|
|
26200
|
+
if (canonicalContentHash(oldRegistration.actionRequirements) !== canonicalContentHash(existingActions)) {
|
|
26201
|
+
throw new TypeError("Published output action and permission requirements changed.");
|
|
26202
|
+
}
|
|
26203
|
+
for (const key of ["allowedSideEffects", "allowedSlots", "supportedSurfaces", "allowedParentCapabilityRefs", "allowedChildCapabilityRefs"]) {
|
|
26192
26204
|
if (canonicalContentHash(oldRegistration[key]) !== canonicalContentHash(newRegistration[key])) throw new TypeError(`Runtime contract ${key} changed.`);
|
|
26193
26205
|
}
|
|
26194
26206
|
};
|