@inf-monkeys-tech/monkeys 1.1.18 → 1.1.20

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.
@@ -19476,7 +19476,19 @@ var compilePageRuntimeBundleInternal = (input, legacy) => {
19476
19476
  release.dependencySnapshot,
19477
19477
  pageDependencies(page, compilerRevisionRef)
19478
19478
  );
19479
- assertDependencyScopes(release.dependencySnapshot, scope);
19479
+ const verifiedSharedPageReferences = (input.verifiedSharedPageReferences ?? []).map((value, index) => {
19480
+ const reference = RevisionRefSchema.parse(value);
19481
+ const target = (input.targetRegistry ?? []).find(
19482
+ (candidate) => page.entryTransitions.some((entry) => sameStableRef(entry.targetRef, candidate.stableTargetRef)) && [candidate.targetRevisionRef, candidate.releaseRevisionRef].some((ref2) => ref2 && sameRevisionRef(ref2, reference))
19483
+ );
19484
+ if (release.target.surface !== "studio" || reference.visibility !== "tenant" || reference.ownerRepo !== "monkeys-server" || !["page", "page-release"].includes(reference.kind) || reference.tenantScope?.tenantRef.id !== "0" || reference.tenantScope?.teamRef?.id !== "0" || !target || target.surface !== "studio" || target.targetRevisionRef.kind !== "page" || !target.releaseRevisionRef || target.releaseRevisionRef.kind !== "page-release" || scopeKey(target.targetRevisionRef.tenantScope) !== scopeKey(reference.tenantScope) || scopeKey(target.releaseRevisionRef.tenantScope) !== scopeKey(reference.tenantScope)) throw new DeclarativeControlCompilationError(
19485
+ "CROSS_TENANT_REFERENCE",
19486
+ `verifiedSharedPageReferences[${index}]`,
19487
+ "Shared Studio Page references must pin an authenticated catalog target and its Release in the shared scope."
19488
+ );
19489
+ return revisionRefKey(reference);
19490
+ });
19491
+ assertDependencyScopes(release.dependencySnapshot, scope, new Set(verifiedSharedPageReferences));
19480
19492
  const queryRegistrations = (input.domainQueryRegistry ?? []).map(
19481
19493
  (registration, index) => {
19482
19494
  const definitionRevisionRef = RevisionRefSchema.parse(
@@ -25205,7 +25217,7 @@ var assertCompatibleCapabilityUpgrade = (previous, next) => {
25205
25217
  const manifestContract = (entry) => ({
25206
25218
  kind: entry.manifest.kind,
25207
25219
  runtime: { ...entry.manifest.runtime, providerBindings: entry.manifest.runtime.providerBindings.map((binding) => ({ ...binding, providerRef: { ...binding.providerRef, version: void 0 } })) },
25208
- placement: entry.manifest.placement,
25220
+ placement: entry.manifest.placement && { ...entry.manifest.placement, slots: void 0 },
25209
25221
  accessibility: entry.manifest.accessibility
25210
25222
  });
25211
25223
  if (canonicalContentHash(manifestContract(previous)) !== canonicalContentHash(manifestContract(next))) {
@@ -25213,6 +25225,14 @@ var assertCompatibleCapabilityUpgrade = (previous, next) => {
25213
25225
  }
25214
25226
  const oldRegistration = previous.declarativeRegistration;
25215
25227
  const newRegistration = next.declarativeRegistration;
25228
+ for (const [oldSlots, newSlots] of [
25229
+ [previous.manifest.placement?.slots ?? [], next.manifest.placement?.slots ?? []],
25230
+ [oldRegistration.allowedSlots, newRegistration.allowedSlots]
25231
+ ]) {
25232
+ if (oldSlots.some((slot) => !newSlots.includes(slot))) {
25233
+ throw new TypeError("Published runtime slots cannot be removed.");
25234
+ }
25235
+ }
25216
25236
  const schema2 = (entry, reference) => {
25217
25237
  const document = entry.schemaDocuments.find((candidate) => sameSchemaContract(candidate.schemaRevisionRef, reference));
25218
25238
  if (!document || canonicalContentHash(document.document) !== reference.contentHash) throw new TypeError("Runtime contract schema integrity failed.");
@@ -25257,7 +25277,7 @@ var assertCompatibleCapabilityUpgrade = (previous, next) => {
25257
25277
  if (canonicalContentHash(oldRegistration.actionRequirements) !== canonicalContentHash(existingActions)) {
25258
25278
  throw new TypeError("Published output action and permission requirements changed.");
25259
25279
  }
25260
- for (const key of ["allowedSideEffects", "allowedSlots", "supportedSurfaces", "allowedParentCapabilityRefs", "allowedChildCapabilityRefs"]) {
25280
+ for (const key of ["allowedSideEffects", "supportedSurfaces", "allowedParentCapabilityRefs", "allowedChildCapabilityRefs"]) {
25261
25281
  if (canonicalContentHash(oldRegistration[key]) !== canonicalContentHash(newRegistration[key])) throw new TypeError(`Runtime contract ${key} changed.`);
25262
25282
  }
25263
25283
  };