Open
Conversation
d1d413a to
d552af5
Compare
52c4c23 to
15c4fb7
Compare
boneskull
approved these changes
Mar 17, 2026
15c4fb7 to
2bf3ff7
Compare
df278cb to
e96c043
Compare
e96c043 to
9aa3e01
Compare
9aa3e01 to
65e835e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to master, this PR will be updated.
Releases
ses@2.0.0
Major Changes
#3153
e619205Thanks @erights! - # Plug NaN Side-channelThe JavaScript language can leak the bit encoding of a NaN via shared TypedArray views of an common ArrayBuffer. Although the JavaScript language has only one NaN value, the underlying IEEE 754 double-precision floating-point representation has many different bit patterns that represent NaN. This can be exploited as a side-channel to leak information. This actually happens on some platforms such as v8.
@ChALkeR explains at Normative: Allow NaN values to be *optionally* canonicalized tc39/ecma262#758 (comment) that the behavior of this side-channel on v8. At https://junk.rray.org/poc/nani.html he demonstrates it, and it indeed even worse than I expected.
To plug this side-channel, we make two coordinated changes.
Float*Arrayconstructors as universal globals. This prevents them from being implicitly endowed to created compartments, because they are not harmless. However, we still keep them on the start compartment (the original global), consider them intrinsics, and still repair and harden them onlockdown(). Thus, they can be explicitly endowed to child compartments at the price of enabling code in that compartment to read the side-channel.lockdown(), we repair theDataView.prototype.setFloat*methods so that they only write canonical NaNs into the underlying ArrayBuffer.The
@endo.marshalpackage'sencodePassableencodings need to obtain the bit representation of floating point values. It had usedFloat64Arrayfor that. However, sometimes the@endo/marshalpackage is evaluated in a created compartment that would now lack that constructor. (This reevaluation typically occurs when bundling bundles in that package.) So instead,encodePassablenow uses theDataViewmethods which are now safe.Minor Changes
#3129
a675d8eThanks @erights! -overrideTaming: 'moderate'includesoverrideTaming: 'min'.Previously
overrideTaming: 'min'correctly enabledIterator.prototype.constructorto be overridden by assignment, but due to an oversight,overrideTaming: 'moderate'did not. Now it does.To make such mistakes less likely, this PR also adopts a style where all records within larger enablements triple-dot the corresponding record from a smaller enablement, if present.
@endo/bundle-source@4.3.0
Minor Changes
#3180
7f7ae8eThanks @turadg! -BundleCache.load()is now generic on theformatoption:Promise<BundleSourceResult<'endoZipBase64'>>Promise<BundleSourceResult<format>>ModuleFormat→Promise<BundleSourceResult<ModuleFormat>>Previously
load()returnedPromise<unknown>, requiring callers to assert the bundle shape.Patch Changes
154102b,d1d9625,b4820dc,acbacba,cdb6eae,6ada52b,1cd1246]:@endo/common@1.4.0
Minor Changes
98c89b7Thanks @turadg! - AddobjectExtendEachhelper for merging a sequence of objects into an accumulator, with precise TypeScript inference of the resulting intersection type.Patch Changes
f65b000,d1d9625]:@endo/compartment-mapper@2.1.0
Minor Changes
#3132
b4820dcThanks @boneskull! - Expose_redundantPreloadHookoption incaptureFromMap(), which will be called for each item in the_preloadarray that was already indirectly loaded via the entryCompartment.Fixes a bug in the type of
_preloadoption, which now allows for mixed arrays.Fixes a bug in the preloader, which was not exhaustively checking if a non-entry module was already loaded via the entry
Compartment.Patch Changes
#3111
154102bThanks @boneskull! - Fix type ofPackageDataHook.packageDatawhich now correctly allows$root$as a key.#3173
acbacbaThanks @boneskull! - Fixes potential issue wherein a canonical name may be computed incorrectly. Includes performance improvements.#3157
cdb6eaeThanks @boneskull! - Dramatically improve performance of canonical name (shortest path) computation inmapNodeModules().#3127
6ada52bThanks @turadg! - Remove stale runtime dependencies from package manifests.#3115
1cd1246Thanks @boneskull! - Remove unused "error"ModuleSourceHookModuleSourcetype.Updated dependencies [
e619205,6ada52b,a675d8e]:@endo/eventual-send@1.5.0
Minor Changes
#3172
f65b000Thanks @turadg! - ImproveE()type inference and publicly export method-projection helpers.RemoteFunctions,PickCallable, andECallableOrMethodsnow short-circuit onany, preventingE(anyValue)from collapsing to an unusable type.EMethods,EGetters, and related helpers are now part of the public type surface, so downstream packages can name the projected shapesE()produces.Compile-time type changes only; no runtime behavior changes.
Patch Changes
@endo/exo@1.7.0
Minor Changes
#3172
88bc2b9Thanks @turadg! - Improve TypeScript inference for patterns, exo, and pass-style. These are compile-time type changes only; no runtime behavior changes.CopyArray<T>is nowreadonly T[]so readonly tuples (e.g.readonly ['ibc']) satisfyPassable. Backward-compatible becauseT[]still extendsreadonly T[].M.remotable()defaults toany(matchingM.promise()), so unparameterized remotables are assignable to concrete remotable typedefs. The parameterized formM.remotable<typeof SomeInterfaceGuard>()still yields precise inference.TFRemotablereturnsany(notPayload) for non-InterfaceGuardarguments.TFOrhandles array-of-patterns and falls back throughTFAnd;M.undefined()maps tovoid.TFOptionalTupleemits truly optional elements;M.promise()maps toPromiseLike.TFSplitRecordhandles the empty-rest case correctly.TFRestArgsunwraps array patterns.TypeFromArgGuarddiscriminates bytoStringTag, not structural shape.MatcherOfpayload is preserved throughInterfaceGuard.CastedPattern<T>for unchecked type assertions in pattern position.defineExoClass,defineExoClassKit, andmakeExono longer intersect facet constraints with& Methods. The previous constraint collapsed specific facet keys into thestring | number | symbolindex signature, makingFilteredKeysreturnneverand erasing facet method inference (Pick<X, never> = {}).Guarded<M, G>is now structurally compatible acrossG, and the kitFconstraint is widened.defineExoClassKitpreserves facet inference when no guard is supplied.TypeScript consumers that were working around the previous inference gaps with casts may be able to remove those casts. Downstream code that depended on the narrower
CopyArray<T> = T[]or the previousM.remotable()default may need minor adjustments.#3133
9111b4eThanks @turadg! - feat: infer TypeScript types from pattern guardsTypeFromPattern<P>— infer static types from any pattern matcherTypeFromMethodGuard<G>— infer function signatures fromM.call()/M.callWhen()guardsTypeFromInterfaceGuard<G>— infer method records from interface guard definitionsM.remotable<typeof Guard>()— facet-isolated return types in exo kitsM.infer<typeof pattern>— namespace shorthand analogous toz.infermatchesandmustMatchnow narrow the specimen type via type predicatesmakeExo,defineExoClass, anddefineExoClassKitenforce method signatures against guards at compile timeThese are compile-time type changes only; there are no runtime behavioral changes.
Existing TypeScript consumers may see new type errors where method signatures diverge from their guards.
Patch Changes
8195a5a,98c89b7,f65b000,88bc2b9,9111b4e,df84eea,6ada52b]:@endo/pass-style@1.8.0
Minor Changes
#3172
88bc2b9Thanks @turadg! - Improve TypeScript inference for patterns, exo, and pass-style. These are compile-time type changes only; no runtime behavior changes.CopyArray<T>is nowreadonly T[]so readonly tuples (e.g.readonly ['ibc']) satisfyPassable. Backward-compatible becauseT[]still extendsreadonly T[].M.remotable()defaults toany(matchingM.promise()), so unparameterized remotables are assignable to concrete remotable typedefs. The parameterized formM.remotable<typeof SomeInterfaceGuard>()still yields precise inference.TFRemotablereturnsany(notPayload) for non-InterfaceGuardarguments.TFOrhandles array-of-patterns and falls back throughTFAnd;M.undefined()maps tovoid.TFOptionalTupleemits truly optional elements;M.promise()maps toPromiseLike.TFSplitRecordhandles the empty-rest case correctly.TFRestArgsunwraps array patterns.TypeFromArgGuarddiscriminates bytoStringTag, not structural shape.MatcherOfpayload is preserved throughInterfaceGuard.CastedPattern<T>for unchecked type assertions in pattern position.defineExoClass,defineExoClassKit, andmakeExono longer intersect facet constraints with& Methods. The previous constraint collapsed specific facet keys into thestring | number | symbolindex signature, makingFilteredKeysreturnneverand erasing facet method inference (Pick<X, never> = {}).Guarded<M, G>is now structurally compatible acrossG, and the kitFconstraint is widened.defineExoClassKitpreserves facet inference when no guard is supplied.TypeScript consumers that were working around the previous inference gaps with casts may be able to remove those casts. Downstream code that depended on the narrower
CopyArray<T> = T[]or the previousM.remotable()default may need minor adjustments.Patch Changes
#3127
6ada52bThanks @turadg! - Remove stale runtime dependencies from package manifests.Updated dependencies [
98c89b7,f65b000,d1d9625]:@endo/patterns@1.9.0
Minor Changes
#3067
8195a5aThanks @gibson042! - - UpdatescontainerHasSplitto consider copyArray elements in forward order,better aligning with intuition.
#3172
88bc2b9Thanks @turadg! - Improve TypeScript inference for patterns, exo, and pass-style. These are compile-time type changes only; no runtime behavior changes.CopyArray<T>is nowreadonly T[]so readonly tuples (e.g.readonly ['ibc']) satisfyPassable. Backward-compatible becauseT[]still extendsreadonly T[].M.remotable()defaults toany(matchingM.promise()), so unparameterized remotables are assignable to concrete remotable typedefs. The parameterized formM.remotable<typeof SomeInterfaceGuard>()still yields precise inference.TFRemotablereturnsany(notPayload) for non-InterfaceGuardarguments.TFOrhandles array-of-patterns and falls back throughTFAnd;M.undefined()maps tovoid.TFOptionalTupleemits truly optional elements;M.promise()maps toPromiseLike.TFSplitRecordhandles the empty-rest case correctly.TFRestArgsunwraps array patterns.TypeFromArgGuarddiscriminates bytoStringTag, not structural shape.MatcherOfpayload is preserved throughInterfaceGuard.CastedPattern<T>for unchecked type assertions in pattern position.defineExoClass,defineExoClassKit, andmakeExono longer intersect facet constraints with& Methods. The previous constraint collapsed specific facet keys into thestring | number | symbolindex signature, makingFilteredKeysreturnneverand erasing facet method inference (Pick<X, never> = {}).Guarded<M, G>is now structurally compatible acrossG, and the kitFconstraint is widened.defineExoClassKitpreserves facet inference when no guard is supplied.TypeScript consumers that were working around the previous inference gaps with casts may be able to remove those casts. Downstream code that depended on the narrower
CopyArray<T> = T[]or the previousM.remotable()default may need minor adjustments.#3133
9111b4eThanks @turadg! - feat: infer TypeScript types from pattern guardsTypeFromPattern<P>— infer static types from any pattern matcherTypeFromMethodGuard<G>— infer function signatures fromM.call()/M.callWhen()guardsTypeFromInterfaceGuard<G>— infer method records from interface guard definitionsM.remotable<typeof Guard>()— facet-isolated return types in exo kitsM.infer<typeof pattern>— namespace shorthand analogous toz.infermatchesandmustMatchnow narrow the specimen type via type predicatesmakeExo,defineExoClass, anddefineExoClassKitenforce method signatures against guards at compile timeThese are compile-time type changes only; there are no runtime behavioral changes.
Existing TypeScript consumers may see new type errors where method signatures diverge from their guards.
#3133
df84eeaThanks @turadg! - Add optionallabelparameter toM.promise(), aligning its signaturewith
M.remotable(label?). When a label is provided, runtime errormessages include it for diagnostics (e.g., "Must be a promise Foo, not
remotable").
Patch Changes
#3127
6ada52bThanks @turadg! - Remove stale runtime dependencies from package manifests.Updated dependencies [
98c89b7,f65b000,88bc2b9,e619205,6ada52b]:@endo/errors@1.3.1
Patch Changes
e619205,a675d8e]:@endo/import-bundle@1.6.1
Patch Changes
154102b,b4820dc,acbacba,e619205,cdb6eae,6ada52b,1cd1246,a675d8e]:@endo/lockdown@1.0.19
Patch Changes
e619205,a675d8e]:@endo/lp32@1.2.1
Patch Changes
#3127
6ada52bThanks @turadg! - Remove stale runtime dependencies from package manifests.Updated dependencies []:
@endo/marshal@1.9.1
Patch Changes
#3153
e619205Thanks @erights! - # Plug NaN Side-channelThe JavaScript language can leak the bit encoding of a NaN via shared TypedArray views of an common ArrayBuffer. Although the JavaScript language has only one NaN value, the underlying IEEE 754 double-precision floating-point representation has many different bit patterns that represent NaN. This can be exploited as a side-channel to leak information. This actually happens on some platforms such as v8.
@ChALkeR explains at Normative: Allow NaN values to be *optionally* canonicalized tc39/ecma262#758 (comment) that the behavior of this side-channel on v8. At https://junk.rray.org/poc/nani.html he demonstrates it, and it indeed even worse than I expected.
To plug this side-channel, we make two coordinated changes.
Float*Arrayconstructors as universal globals. This prevents them from being implicitly endowed to created compartments, because they are not harmless. However, we still keep them on the start compartment (the original global), consider them intrinsics, and still repair and harden them onlockdown(). Thus, they can be explicitly endowed to child compartments at the price of enabling code in that compartment to read the side-channel.lockdown(), we repair theDataView.prototype.setFloat*methods so that they only write canonical NaNs into the underlying ArrayBuffer.The
@endo.marshalpackage'sencodePassableencodings need to obtain the bit representation of floating point values. It had usedFloat64Arrayfor that. However, sometimes the@endo/marshalpackage is evaluated in a created compartment that would now lack that constructor. (This reevaluation typically occurs when bundling bundles in that package.) So instead,encodePassablenow uses theDataViewmethods which are now safe.#3127
6ada52bThanks @turadg! - Remove stale runtime dependencies from package manifests.Updated dependencies [
98c89b7,f65b000,88bc2b9,6ada52b]:@endo/memoize@1.2.1
Patch Changes
#3107
05cdb5fThanks @erights! -@endo/memoizeno longer depends onses, just@endo/hardenUpdated dependencies []:
@endo/module-source@1.4.1
Patch Changes
#3127
6ada52bThanks @turadg! - Remove stale runtime dependencies from package manifests.Updated dependencies [
e619205,a675d8e]:@endo/netstring@1.1.1
Patch Changes
#3127
6ada52bThanks @turadg! - Remove stale runtime dependencies from package manifests.Updated dependencies [
d1d9625]:@endo/promise-kit@1.2.1
Patch Changes
#3108
d1d9625Thanks @erights! -@endo/promise-kitno longer depends onses, just@endo/hardenUpdated dependencies []:
@endo/ses-ava@1.4.1
Patch Changes
e619205,a675d8e]:@endo/stream@1.3.1
Patch Changes
f65b000,d1d9625,e619205,a675d8e]:@endo/stream-node@1.2.1
Patch Changes
#3127
6ada52bThanks @turadg! - Remove stale runtime dependencies from package manifests.Updated dependencies []:
@endo/ocapn@0.3.0
Minor Changes
6405b36Thanks @turadg! - Parameterize CapTP slot types and improve TypeScript 6 conformance across the OCapN client surface. Compile-time type changes only; no runtime behavior changes.Patch Changes
f65b000,d1d9625,88bc2b9,e619205,6ada52b]:@endo/daemon@2.5.3
Patch Changes
8195a5a,154102b,f65b000,d1d9625,b4820dc,88bc2b9,9111b4e,acbacba,e619205,df84eea,cdb6eae,6ada52b,1cd1246,a675d8e]:@endo/stream-types-test@1.0.19
Patch Changes
e619205,a675d8e]:@endo/test262-runner@0.1.50
Patch Changes
154102b,b4820dc,acbacba,e619205,cdb6eae,6ada52b,1cd1246,a675d8e]: