webloom-framework 0.4.0 → 0.4.1

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.
@@ -485,11 +485,17 @@ function validateTransferListWithStats(value, transfer, options = {}) {
485
485
  maxEdges: limits.maxDtoEdges,
486
486
  maxBudgetBytes: limits.maxMessageBudgetBytes
487
487
  },
488
+ // MessagePort presence is checked below so a missing declaration is
489
+ // reported as a transfer-contract error, while the walker still validates
490
+ // the complete DTO graph and preserves the actual port identity set.
491
+ allowUnlistedMessagePorts: true,
488
492
  transferables: new Set(result),
489
493
  phase: options.phase ?? "validate"
490
494
  });
491
495
  const reachable = new Set(stats.reachableTransferables);
492
496
  if (result.some((item) => !reachable.has(item))) throw new WebLoomError("transfer_invalid", "Capability transfer resource is not reachable from its payload", options.phase ?? "validate");
497
+ const declared = new Set(result);
498
+ if (stats.messagePorts.some((port) => !declared.has(port))) throw new WebLoomError("transfer_invalid", "Capability payload contains a MessagePort missing from its transfer declaration", options.phase ?? "validate");
493
499
  return { transfer: Object.freeze(result), stats };
494
500
  }
495
501
  function validateTransferList(value, transfer, options = {}) {
@@ -4014,5 +4020,5 @@ function hostForWindowApp(app) {
4014
4020
  }
4015
4021
 
4016
4022
  export { DEFAULT_RUNTIME_LIMITS, LIFECYCLE_ERROR_TEXT, LifecycleScopeRevokedError, PermissionDeniedError, PermissionLeaseRevokedError, RESOURCE_OWNER, RESOURCE_REGISTRY, RUNTIME_CALL_TYPE, RUNTIME_CANCEL_TYPE, RUNTIME_CREDIT_TYPE, RUNTIME_ERROR_MESSAGE_TYPE, RUNTIME_ERROR_TYPE, RUNTIME_NEXT_TYPE, RUNTIME_PROTOCOL_VERSION, RUNTIME_RESULT_TYPE, RUNTIME_SNAPSHOT_TYPE, RuntimeInitializationError, RuntimeUnavailableError, SCOPED_TASK_SCHEDULER_CAPABILITY, StartupCapabilityError, StartupPluginError, UpgradeGateRejectedError, WebLoomError, assertCapability, assertReceivedPortSet, buildPluginGraph, capabilityDescriptor, capabilityKey, cloneFrozenAttributes, createCapabilityRegistry, createInMemoryPluginConfigStore, createLifecycleScope, createMessageBus, createPermissionLease, createPluginHost, createReceivePortLedger, createResourceRegistry, createResourceScope, createResourceStore, createRuntimeBudget, createRuntimeMessageCodec, createRuntimeUnitImplementationRegistry, createScopedTaskScheduler, createWindowApp, createWindowAppFromHost, defineCapability, dependenciesOfManifest, hostForWindowApp, invokeCapabilityHandler, isCapability, isCapabilityDescriptor, isRuntimeSnapshot, lifecycleErrorText, materializePluginDefinitions, normalizeRuntimeLimits, providesOfManifest, registerOwnedResource, reverseDependentsOf, selectRuntimeUnit, validateDto, validatePluginGraph, validateRawDto, validateTransferList, validateTransferListWithStats };
4017
- //# sourceMappingURL=chunk-JHJZIO2H.js.map
4018
- //# sourceMappingURL=chunk-JHJZIO2H.js.map
4023
+ //# sourceMappingURL=chunk-HJKPKWI7.js.map
4024
+ //# sourceMappingURL=chunk-HJKPKWI7.js.map