@inf-monkeys-tech/monkeys 1.1.18 → 1.1.19

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.
@@ -25205,7 +25205,7 @@ var assertCompatibleCapabilityUpgrade = (previous, next) => {
25205
25205
  const manifestContract = (entry) => ({
25206
25206
  kind: entry.manifest.kind,
25207
25207
  runtime: { ...entry.manifest.runtime, providerBindings: entry.manifest.runtime.providerBindings.map((binding) => ({ ...binding, providerRef: { ...binding.providerRef, version: void 0 } })) },
25208
- placement: entry.manifest.placement,
25208
+ placement: entry.manifest.placement && { ...entry.manifest.placement, slots: void 0 },
25209
25209
  accessibility: entry.manifest.accessibility
25210
25210
  });
25211
25211
  if (canonicalContentHash(manifestContract(previous)) !== canonicalContentHash(manifestContract(next))) {
@@ -25213,6 +25213,14 @@ var assertCompatibleCapabilityUpgrade = (previous, next) => {
25213
25213
  }
25214
25214
  const oldRegistration = previous.declarativeRegistration;
25215
25215
  const newRegistration = next.declarativeRegistration;
25216
+ for (const [oldSlots, newSlots] of [
25217
+ [previous.manifest.placement?.slots ?? [], next.manifest.placement?.slots ?? []],
25218
+ [oldRegistration.allowedSlots, newRegistration.allowedSlots]
25219
+ ]) {
25220
+ if (oldSlots.some((slot) => !newSlots.includes(slot))) {
25221
+ throw new TypeError("Published runtime slots cannot be removed.");
25222
+ }
25223
+ }
25216
25224
  const schema2 = (entry, reference) => {
25217
25225
  const document = entry.schemaDocuments.find((candidate) => sameSchemaContract(candidate.schemaRevisionRef, reference));
25218
25226
  if (!document || canonicalContentHash(document.document) !== reference.contentHash) throw new TypeError("Runtime contract schema integrity failed.");
@@ -25257,7 +25265,7 @@ var assertCompatibleCapabilityUpgrade = (previous, next) => {
25257
25265
  if (canonicalContentHash(oldRegistration.actionRequirements) !== canonicalContentHash(existingActions)) {
25258
25266
  throw new TypeError("Published output action and permission requirements changed.");
25259
25267
  }
25260
- for (const key of ["allowedSideEffects", "allowedSlots", "supportedSurfaces", "allowedParentCapabilityRefs", "allowedChildCapabilityRefs"]) {
25268
+ for (const key of ["allowedSideEffects", "supportedSurfaces", "allowedParentCapabilityRefs", "allowedChildCapabilityRefs"]) {
25261
25269
  if (canonicalContentHash(oldRegistration[key]) !== canonicalContentHash(newRegistration[key])) throw new TypeError(`Runtime contract ${key} changed.`);
25262
25270
  }
25263
25271
  };