@despia-native/kernel 0.0.0-coming-soon.0 → 0.3.0
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/LICENSE +202 -0
- package/NOTICE +1414 -0
- package/README.md +16 -1
- package/dist/.dsx-build-stamp.json +7 -0
- package/dist/api-cohort.d.ts +27 -0
- package/dist/api-cohort.d.ts.map +1 -0
- package/dist/api-cohort.js +94 -0
- package/dist/api-cohort.js.map +1 -0
- package/dist/api.d.ts +454 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.js +2442 -0
- package/dist/api.js.map +1 -0
- package/dist/app-consts.d.ts +10 -0
- package/dist/app-consts.d.ts.map +1 -0
- package/dist/app-consts.js +39 -0
- package/dist/app-consts.js.map +1 -0
- package/dist/app-update.d.ts +12 -0
- package/dist/app-update.d.ts.map +1 -0
- package/dist/app-update.js +32 -0
- package/dist/app-update.js.map +1 -0
- package/dist/aria.d.ts +152 -0
- package/dist/aria.d.ts.map +1 -0
- package/dist/aria.js +524 -0
- package/dist/aria.js.map +1 -0
- package/dist/audio-core.d.ts +260 -0
- package/dist/audio-core.d.ts.map +1 -0
- package/dist/audio-core.js +1440 -0
- package/dist/audio-core.js.map +1 -0
- package/dist/audio-edit.d.ts +100 -0
- package/dist/audio-edit.d.ts.map +1 -0
- package/dist/audio-edit.js +489 -0
- package/dist/audio-edit.js.map +1 -0
- package/dist/audio-mix.d.ts +84 -0
- package/dist/audio-mix.d.ts.map +1 -0
- package/dist/audio-mix.js +393 -0
- package/dist/audio-mix.js.map +1 -0
- package/dist/auth-proof.d.ts +145 -0
- package/dist/auth-proof.d.ts.map +1 -0
- package/dist/auth-proof.js +644 -0
- package/dist/auth-proof.js.map +1 -0
- package/dist/availability-explain.d.ts +3 -0
- package/dist/availability-explain.d.ts.map +1 -0
- package/dist/availability-explain.js +322 -0
- package/dist/availability-explain.js.map +1 -0
- package/dist/availability.d.ts +246 -0
- package/dist/availability.d.ts.map +1 -0
- package/dist/availability.js +615 -0
- package/dist/availability.js.map +1 -0
- package/dist/background.d.ts +116 -0
- package/dist/background.d.ts.map +1 -0
- package/dist/background.js +235 -0
- package/dist/background.js.map +1 -0
- package/dist/boot-tables-flag.d.ts +2 -0
- package/dist/boot-tables-flag.d.ts.map +1 -0
- package/dist/boot-tables-flag.js +16 -0
- package/dist/boot-tables-flag.js.map +1 -0
- package/dist/boot-tables.d.ts +40 -0
- package/dist/boot-tables.d.ts.map +1 -0
- package/dist/boot-tables.js +102 -0
- package/dist/boot-tables.js.map +1 -0
- package/dist/border-edges.d.ts +5 -0
- package/dist/border-edges.d.ts.map +1 -0
- package/dist/border-edges.js +47 -0
- package/dist/border-edges.js.map +1 -0
- package/dist/bus.d.ts +1203 -0
- package/dist/bus.d.ts.map +1 -0
- package/dist/bus.js +2647 -0
- package/dist/bus.js.map +1 -0
- package/dist/calendar-core.d.ts +143 -0
- package/dist/calendar-core.d.ts.map +1 -0
- package/dist/calendar-core.js +372 -0
- package/dist/calendar-core.js.map +1 -0
- package/dist/call-value.d.ts +16 -0
- package/dist/call-value.d.ts.map +1 -0
- package/dist/call-value.js +54 -0
- package/dist/call-value.js.map +1 -0
- package/dist/camera-core.d.ts +222 -0
- package/dist/camera-core.d.ts.map +1 -0
- package/dist/camera-core.js +980 -0
- package/dist/camera-core.js.map +1 -0
- package/dist/canvas-core.d.ts +404 -0
- package/dist/canvas-core.d.ts.map +1 -0
- package/dist/canvas-core.js +2186 -0
- package/dist/canvas-core.js.map +1 -0
- package/dist/capture-core.d.ts +74 -0
- package/dist/capture-core.d.ts.map +1 -0
- package/dist/capture-core.js +158 -0
- package/dist/capture-core.js.map +1 -0
- package/dist/compile/codegen.d.ts +146 -0
- package/dist/compile/codegen.d.ts.map +1 -0
- package/dist/compile/codegen.js +1949 -0
- package/dist/compile/codegen.js.map +1 -0
- package/dist/compile/jstier.d.ts +44 -0
- package/dist/compile/jstier.d.ts.map +1 -0
- package/dist/compile/jstier.js +181 -0
- package/dist/compile/jstier.js.map +1 -0
- package/dist/compile/tier-door.d.ts +41 -0
- package/dist/compile/tier-door.d.ts.map +1 -0
- package/dist/compile/tier-door.js +167 -0
- package/dist/compile/tier-door.js.map +1 -0
- package/dist/compile/tier-realm.d.ts +49 -0
- package/dist/compile/tier-realm.d.ts.map +1 -0
- package/dist/compile/tier-realm.js +368 -0
- package/dist/compile/tier-realm.js.map +1 -0
- package/dist/compile/tier.d.ts +23 -0
- package/dist/compile/tier.d.ts.map +1 -0
- package/dist/compile/tier.js +157 -0
- package/dist/compile/tier.js.map +1 -0
- package/dist/compose-core.d.ts +86 -0
- package/dist/compose-core.d.ts.map +1 -0
- package/dist/compose-core.js +112 -0
- package/dist/compose-core.js.map +1 -0
- package/dist/config-validate.d.ts +31 -0
- package/dist/config-validate.d.ts.map +1 -0
- package/dist/config-validate.js +147 -0
- package/dist/config-validate.js.map +1 -0
- package/dist/config-values.d.ts +106 -0
- package/dist/config-values.d.ts.map +1 -0
- package/dist/config-values.js +340 -0
- package/dist/config-values.js.map +1 -0
- package/dist/contacts-core.d.ts +127 -0
- package/dist/contacts-core.d.ts.map +1 -0
- package/dist/contacts-core.js +211 -0
- package/dist/contacts-core.js.map +1 -0
- package/dist/content-transition.d.ts +58 -0
- package/dist/content-transition.d.ts.map +1 -0
- package/dist/content-transition.js +94 -0
- package/dist/content-transition.js.map +1 -0
- package/dist/controls-core.d.ts +227 -0
- package/dist/controls-core.d.ts.map +1 -0
- package/dist/controls-core.js +652 -0
- package/dist/controls-core.js.map +1 -0
- package/dist/cookies.d.ts +78 -0
- package/dist/cookies.d.ts.map +1 -0
- package/dist/cookies.js +265 -0
- package/dist/cookies.js.map +1 -0
- package/dist/corner-shape-core.d.ts +69 -0
- package/dist/corner-shape-core.d.ts.map +1 -0
- package/dist/corner-shape-core.js +261 -0
- package/dist/corner-shape-core.js.map +1 -0
- package/dist/crypto-core.d.ts +57 -0
- package/dist/crypto-core.d.ts.map +1 -0
- package/dist/crypto-core.js +128 -0
- package/dist/crypto-core.js.map +1 -0
- package/dist/dataviz.d.ts +436 -0
- package/dist/dataviz.d.ts.map +1 -0
- package/dist/dataviz.js +956 -0
- package/dist/dataviz.js.map +1 -0
- package/dist/debug.d.ts +293 -0
- package/dist/debug.d.ts.map +1 -0
- package/dist/debug.js +767 -0
- package/dist/debug.js.map +1 -0
- package/dist/device-ownership.d.ts +50 -0
- package/dist/device-ownership.d.ts.map +1 -0
- package/dist/device-ownership.js +105 -0
- package/dist/device-ownership.js.map +1 -0
- package/dist/effects.d.ts +86 -0
- package/dist/effects.d.ts.map +1 -0
- package/dist/effects.js +98 -0
- package/dist/effects.js.map +1 -0
- package/dist/element.d.ts +108 -0
- package/dist/element.d.ts.map +1 -0
- package/dist/element.js +63 -0
- package/dist/element.js.map +1 -0
- package/dist/file-watch.d.ts +16 -0
- package/dist/file-watch.d.ts.map +1 -0
- package/dist/file-watch.js +49 -0
- package/dist/file-watch.js.map +1 -0
- package/dist/filepaths.d.ts +72 -0
- package/dist/filepaths.d.ts.map +1 -0
- package/dist/filepaths.js +271 -0
- package/dist/filepaths.js.map +1 -0
- package/dist/film.d.ts +264 -0
- package/dist/film.d.ts.map +1 -0
- package/dist/film.js +313 -0
- package/dist/film.js.map +1 -0
- package/dist/fonts.d.ts +66 -0
- package/dist/fonts.d.ts.map +1 -0
- package/dist/fonts.js +135 -0
- package/dist/fonts.js.map +1 -0
- package/dist/forms.d.ts +191 -0
- package/dist/forms.d.ts.map +1 -0
- package/dist/forms.js +663 -0
- package/dist/forms.js.map +1 -0
- package/dist/geo.d.ts +289 -0
- package/dist/geo.d.ts.map +1 -0
- package/dist/geo.js +460 -0
- package/dist/geo.js.map +1 -0
- package/dist/handler-announce.d.ts +46 -0
- package/dist/handler-announce.d.ts.map +1 -0
- package/dist/handler-announce.js +96 -0
- package/dist/handler-announce.js.map +1 -0
- package/dist/handoff.d.ts +71 -0
- package/dist/handoff.d.ts.map +1 -0
- package/dist/handoff.js +250 -0
- package/dist/handoff.js.map +1 -0
- package/dist/identity-durability.d.ts +76 -0
- package/dist/identity-durability.d.ts.map +1 -0
- package/dist/identity-durability.js +150 -0
- package/dist/identity-durability.js.map +1 -0
- package/dist/image-core.d.ts +240 -0
- package/dist/image-core.d.ts.map +1 -0
- package/dist/image-core.js +618 -0
- package/dist/image-core.js.map +1 -0
- package/dist/image-schemes.d.ts +10 -0
- package/dist/image-schemes.d.ts.map +1 -0
- package/dist/image-schemes.js +28 -0
- package/dist/image-schemes.js.map +1 -0
- package/dist/index.d.ts +143 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +299 -0
- package/dist/index.js.map +1 -0
- package/dist/ink-core.d.ts +53 -0
- package/dist/ink-core.d.ts.map +1 -0
- package/dist/ink-core.js +119 -0
- package/dist/ink-core.js.map +1 -0
- package/dist/input.d.ts +148 -0
- package/dist/input.d.ts.map +1 -0
- package/dist/input.js +358 -0
- package/dist/input.js.map +1 -0
- package/dist/integrity.d.ts +63 -0
- package/dist/integrity.d.ts.map +1 -0
- package/dist/integrity.js +150 -0
- package/dist/integrity.js.map +1 -0
- package/dist/intents.d.ts +95 -0
- package/dist/intents.d.ts.map +1 -0
- package/dist/intents.js +282 -0
- package/dist/intents.js.map +1 -0
- package/dist/interpolate-core.d.ts +37 -0
- package/dist/interpolate-core.d.ts.map +1 -0
- package/dist/interpolate-core.js +443 -0
- package/dist/interpolate-core.js.map +1 -0
- package/dist/jse/color.d.ts +12 -0
- package/dist/jse/color.d.ts.map +1 -0
- package/dist/jse/color.js +196 -0
- package/dist/jse/color.js.map +1 -0
- package/dist/jse/core.d.ts +54 -0
- package/dist/jse/core.d.ts.map +1 -0
- package/dist/jse/core.js +1519 -0
- package/dist/jse/core.js.map +1 -0
- package/dist/jse/dispatch.d.ts +28 -0
- package/dist/jse/dispatch.d.ts.map +1 -0
- package/dist/jse/dispatch.js +116 -0
- package/dist/jse/dispatch.js.map +1 -0
- package/dist/jse/highlight-grammar.d.ts +15 -0
- package/dist/jse/highlight-grammar.d.ts.map +1 -0
- package/dist/jse/highlight-grammar.js +161 -0
- package/dist/jse/highlight-grammar.js.map +1 -0
- package/dist/jse/highlight-grammars.generated.d.ts +2 -0
- package/dist/jse/highlight-grammars.generated.d.ts.map +1 -0
- package/dist/jse/highlight-grammars.generated.js +4 -0
- package/dist/jse/highlight-grammars.generated.js.map +1 -0
- package/dist/jse/highlight.d.ts +37 -0
- package/dist/jse/highlight.d.ts.map +1 -0
- package/dist/jse/highlight.js +323 -0
- package/dist/jse/highlight.js.map +1 -0
- package/dist/jse/jse.d.ts +674 -0
- package/dist/jse/jse.d.ts.map +1 -0
- package/dist/jse/jse.js +5841 -0
- package/dist/jse/jse.js.map +1 -0
- package/dist/jse/pathmatch.d.ts +10 -0
- package/dist/jse/pathmatch.d.ts.map +1 -0
- package/dist/jse/pathmatch.js +73 -0
- package/dist/jse/pathmatch.js.map +1 -0
- package/dist/jse/regex.d.ts +33 -0
- package/dist/jse/regex.d.ts.map +1 -0
- package/dist/jse/regex.js +375 -0
- package/dist/jse/regex.js.map +1 -0
- package/dist/jse/stdlib.d.ts +8 -0
- package/dist/jse/stdlib.d.ts.map +1 -0
- package/dist/jse/stdlib.js +765 -0
- package/dist/jse/stdlib.js.map +1 -0
- package/dist/jse/tokens.d.ts +102 -0
- package/dist/jse/tokens.d.ts.map +1 -0
- package/dist/jse/tokens.js +982 -0
- package/dist/jse/tokens.js.map +1 -0
- package/dist/jse/values.d.ts +206 -0
- package/dist/jse/values.d.ts.map +1 -0
- package/dist/jse/values.js +846 -0
- package/dist/jse/values.js.map +1 -0
- package/dist/keyboard.d.ts +196 -0
- package/dist/keyboard.d.ts.map +1 -0
- package/dist/keyboard.js +186 -0
- package/dist/keyboard.js.map +1 -0
- package/dist/label-choices.d.ts +3 -0
- package/dist/label-choices.d.ts.map +1 -0
- package/dist/label-choices.js +168 -0
- package/dist/label-choices.js.map +1 -0
- package/dist/language.d.ts +33 -0
- package/dist/language.d.ts.map +1 -0
- package/dist/language.js +50 -0
- package/dist/language.js.map +1 -0
- package/dist/length-units.d.ts +30 -0
- package/dist/length-units.d.ts.map +1 -0
- package/dist/length-units.js +83 -0
- package/dist/length-units.js.map +1 -0
- package/dist/lightsensor.d.ts +48 -0
- package/dist/lightsensor.d.ts.map +1 -0
- package/dist/lightsensor.js +97 -0
- package/dist/lightsensor.js.map +1 -0
- package/dist/link-refresh.d.ts +27 -0
- package/dist/link-refresh.d.ts.map +1 -0
- package/dist/link-refresh.js +166 -0
- package/dist/link-refresh.js.map +1 -0
- package/dist/link.d.ts +57 -0
- package/dist/link.d.ts.map +1 -0
- package/dist/link.js +333 -0
- package/dist/link.js.map +1 -0
- package/dist/linkpreview.d.ts +114 -0
- package/dist/linkpreview.d.ts.map +1 -0
- package/dist/linkpreview.js +439 -0
- package/dist/linkpreview.js.map +1 -0
- package/dist/list-presence.d.ts +32 -0
- package/dist/list-presence.d.ts.map +1 -0
- package/dist/list-presence.js +48 -0
- package/dist/list-presence.js.map +1 -0
- package/dist/live-stream.d.ts +27 -0
- package/dist/live-stream.d.ts.map +1 -0
- package/dist/live-stream.js +274 -0
- package/dist/live-stream.js.map +1 -0
- package/dist/livelogs.d.ts +134 -0
- package/dist/livelogs.d.ts.map +1 -0
- package/dist/livelogs.js +409 -0
- package/dist/livelogs.js.map +1 -0
- package/dist/logs.d.ts +80 -0
- package/dist/logs.d.ts.map +1 -0
- package/dist/logs.js +206 -0
- package/dist/logs.js.map +1 -0
- package/dist/mcp/apps.d.ts +82 -0
- package/dist/mcp/apps.d.ts.map +1 -0
- package/dist/mcp/apps.js +219 -0
- package/dist/mcp/apps.js.map +1 -0
- package/dist/mcp/entities.d.ts +25 -0
- package/dist/mcp/entities.d.ts.map +1 -0
- package/dist/mcp/entities.js +71 -0
- package/dist/mcp/entities.js.map +1 -0
- package/dist/mcp/result.d.ts +73 -0
- package/dist/mcp/result.d.ts.map +1 -0
- package/dist/mcp/result.js +119 -0
- package/dist/mcp/result.js.map +1 -0
- package/dist/mcp/webmcp.d.ts +162 -0
- package/dist/mcp/webmcp.d.ts.map +1 -0
- package/dist/mcp/webmcp.js +214 -0
- package/dist/mcp/webmcp.js.map +1 -0
- package/dist/mcp.d.ts +5 -0
- package/dist/mcp.d.ts.map +1 -0
- package/dist/mcp.js +14 -0
- package/dist/mcp.js.map +1 -0
- package/dist/media-core.d.ts +191 -0
- package/dist/media-core.d.ts.map +1 -0
- package/dist/media-core.js +446 -0
- package/dist/media-core.js.map +1 -0
- package/dist/media-timeline-core.d.ts +94 -0
- package/dist/media-timeline-core.d.ts.map +1 -0
- package/dist/media-timeline-core.js +620 -0
- package/dist/media-timeline-core.js.map +1 -0
- package/dist/message.d.ts +42 -0
- package/dist/message.d.ts.map +1 -0
- package/dist/message.js +582 -0
- package/dist/message.js.map +1 -0
- package/dist/missing-element.d.ts +29 -0
- package/dist/missing-element.d.ts.map +1 -0
- package/dist/missing-element.js +76 -0
- package/dist/missing-element.js.map +1 -0
- package/dist/motion-core.d.ts +160 -0
- package/dist/motion-core.d.ts.map +1 -0
- package/dist/motion-core.js +752 -0
- package/dist/motion-core.js.map +1 -0
- package/dist/motion-pose.d.ts +65 -0
- package/dist/motion-pose.d.ts.map +1 -0
- package/dist/motion-pose.js +143 -0
- package/dist/motion-pose.js.map +1 -0
- package/dist/motion.d.ts +132 -0
- package/dist/motion.d.ts.map +1 -0
- package/dist/motion.js +260 -0
- package/dist/motion.js.map +1 -0
- package/dist/mount-core.d.ts +203 -0
- package/dist/mount-core.d.ts.map +1 -0
- package/dist/mount-core.js +437 -0
- package/dist/mount-core.js.map +1 -0
- package/dist/net-core.d.ts +110 -0
- package/dist/net-core.d.ts.map +1 -0
- package/dist/net-core.js +225 -0
- package/dist/net-core.js.map +1 -0
- package/dist/notify.d.ts +399 -0
- package/dist/notify.d.ts.map +1 -0
- package/dist/notify.js +964 -0
- package/dist/notify.js.map +1 -0
- package/dist/orientation-binding.d.ts +39 -0
- package/dist/orientation-binding.d.ts.map +1 -0
- package/dist/orientation-binding.js +64 -0
- package/dist/orientation-binding.js.map +1 -0
- package/dist/orientation.d.ts +55 -0
- package/dist/orientation.d.ts.map +1 -0
- package/dist/orientation.js +89 -0
- package/dist/orientation.js.map +1 -0
- package/dist/ota.d.ts +52 -0
- package/dist/ota.d.ts.map +1 -0
- package/dist/ota.js +122 -0
- package/dist/ota.js.map +1 -0
- package/dist/passkeys.d.ts +91 -0
- package/dist/passkeys.d.ts.map +1 -0
- package/dist/passkeys.js +307 -0
- package/dist/passkeys.js.map +1 -0
- package/dist/payment.d.ts +85 -0
- package/dist/payment.d.ts.map +1 -0
- package/dist/payment.js +270 -0
- package/dist/payment.js.map +1 -0
- package/dist/pending-presenter.d.ts +31 -0
- package/dist/pending-presenter.d.ts.map +1 -0
- package/dist/pending-presenter.js +119 -0
- package/dist/pending-presenter.js.map +1 -0
- package/dist/permission-core.d.ts +59 -0
- package/dist/permission-core.d.ts.map +1 -0
- package/dist/permission-core.js +102 -0
- package/dist/permission-core.js.map +1 -0
- package/dist/persist.d.ts +169 -0
- package/dist/persist.d.ts.map +1 -0
- package/dist/persist.js +361 -0
- package/dist/persist.js.map +1 -0
- package/dist/phase-plan.d.ts +114 -0
- package/dist/phase-plan.d.ts.map +1 -0
- package/dist/phase-plan.js +837 -0
- package/dist/phase-plan.js.map +1 -0
- package/dist/playback-core.d.ts +64 -0
- package/dist/playback-core.d.ts.map +1 -0
- package/dist/playback-core.js +176 -0
- package/dist/playback-core.js.map +1 -0
- package/dist/player-sources.d.ts +12 -0
- package/dist/player-sources.d.ts.map +1 -0
- package/dist/player-sources.js +44 -0
- package/dist/player-sources.js.map +1 -0
- package/dist/proxy-denylist.d.ts +11 -0
- package/dist/proxy-denylist.d.ts.map +1 -0
- package/dist/proxy-denylist.js +44 -0
- package/dist/proxy-denylist.js.map +1 -0
- package/dist/public-config.d.ts +20 -0
- package/dist/public-config.d.ts.map +1 -0
- package/dist/public-config.js +109 -0
- package/dist/public-config.js.map +1 -0
- package/dist/qoe-core.d.ts +72 -0
- package/dist/qoe-core.d.ts.map +1 -0
- package/dist/qoe-core.js +113 -0
- package/dist/qoe-core.js.map +1 -0
- package/dist/reactive-request.d.ts +80 -0
- package/dist/reactive-request.d.ts.map +1 -0
- package/dist/reactive-request.js +192 -0
- package/dist/reactive-request.js.map +1 -0
- package/dist/read-cache.d.ts +129 -0
- package/dist/read-cache.d.ts.map +1 -0
- package/dist/read-cache.js +566 -0
- package/dist/read-cache.js.map +1 -0
- package/dist/recorder-core.d.ts +57 -0
- package/dist/recorder-core.d.ts.map +1 -0
- package/dist/recorder-core.js +136 -0
- package/dist/recorder-core.js.map +1 -0
- package/dist/ref.d.ts +41 -0
- package/dist/ref.d.ts.map +1 -0
- package/dist/ref.js +98 -0
- package/dist/ref.js.map +1 -0
- package/dist/refusal.d.ts +82 -0
- package/dist/refusal.d.ts.map +1 -0
- package/dist/refusal.js +218 -0
- package/dist/refusal.js.map +1 -0
- package/dist/region-insets.d.ts +61 -0
- package/dist/region-insets.d.ts.map +1 -0
- package/dist/region-insets.js +67 -0
- package/dist/region-insets.js.map +1 -0
- package/dist/rive-core.d.ts +323 -0
- package/dist/rive-core.d.ts.map +1 -0
- package/dist/rive-core.js +677 -0
- package/dist/rive-core.js.map +1 -0
- package/dist/runner.d.ts +595 -0
- package/dist/runner.d.ts.map +1 -0
- package/dist/runner.js +4094 -0
- package/dist/runner.js.map +1 -0
- package/dist/scene/a11y.d.ts +11 -0
- package/dist/scene/a11y.d.ts.map +1 -0
- package/dist/scene/a11y.js +67 -0
- package/dist/scene/a11y.js.map +1 -0
- package/dist/scene/anim.d.ts +149 -0
- package/dist/scene/anim.d.ts.map +1 -0
- package/dist/scene/anim.js +396 -0
- package/dist/scene/anim.js.map +1 -0
- package/dist/scene/bind.d.ts +33 -0
- package/dist/scene/bind.d.ts.map +1 -0
- package/dist/scene/bind.js +66 -0
- package/dist/scene/bind.js.map +1 -0
- package/dist/scene/collide.d.ts +56 -0
- package/dist/scene/collide.d.ts.map +1 -0
- package/dist/scene/collide.js +146 -0
- package/dist/scene/collide.js.map +1 -0
- package/dist/scene/frame.d.ts +22 -0
- package/dist/scene/frame.d.ts.map +1 -0
- package/dist/scene/frame.js +57 -0
- package/dist/scene/frame.js.map +1 -0
- package/dist/scene/gltf.d.ts +79 -0
- package/dist/scene/gltf.d.ts.map +1 -0
- package/dist/scene/gltf.js +409 -0
- package/dist/scene/gltf.js.map +1 -0
- package/dist/scene/ir.d.ts +293 -0
- package/dist/scene/ir.d.ts.map +1 -0
- package/dist/scene/ir.js +692 -0
- package/dist/scene/ir.js.map +1 -0
- package/dist/scene/math.d.ts +50 -0
- package/dist/scene/math.d.ts.map +1 -0
- package/dist/scene/math.js +180 -0
- package/dist/scene/math.js.map +1 -0
- package/dist/scene/orbit.d.ts +19 -0
- package/dist/scene/orbit.d.ts.map +1 -0
- package/dist/scene/orbit.js +60 -0
- package/dist/scene/orbit.js.map +1 -0
- package/dist/scene/physics.d.ts +228 -0
- package/dist/scene/physics.d.ts.map +1 -0
- package/dist/scene/physics.js +1500 -0
- package/dist/scene/physics.js.map +1 -0
- package/dist/scene/registry.d.ts +85 -0
- package/dist/scene/registry.d.ts.map +1 -0
- package/dist/scene/registry.js +75 -0
- package/dist/scene/registry.js.map +1 -0
- package/dist/scene/skin.d.ts +82 -0
- package/dist/scene/skin.d.ts.map +1 -0
- package/dist/scene/skin.js +351 -0
- package/dist/scene/skin.js.map +1 -0
- package/dist/scene/sprite.d.ts +36 -0
- package/dist/scene/sprite.d.ts.map +1 -0
- package/dist/scene/sprite.js +107 -0
- package/dist/scene/sprite.js.map +1 -0
- package/dist/scene/viewer.d.ts +96 -0
- package/dist/scene/viewer.d.ts.map +1 -0
- package/dist/scene/viewer.js +235 -0
- package/dist/scene/viewer.js.map +1 -0
- package/dist/scoped-slots.d.ts +9 -0
- package/dist/scoped-slots.d.ts.map +1 -0
- package/dist/scoped-slots.js +42 -0
- package/dist/scoped-slots.js.map +1 -0
- package/dist/screen.d.ts +109 -0
- package/dist/screen.d.ts.map +1 -0
- package/dist/screen.js +309 -0
- package/dist/screen.js.map +1 -0
- package/dist/scroll.d.ts +525 -0
- package/dist/scroll.d.ts.map +1 -0
- package/dist/scroll.js +1226 -0
- package/dist/scroll.js.map +1 -0
- package/dist/settings-plane.d.ts +58 -0
- package/dist/settings-plane.d.ts.map +1 -0
- package/dist/settings-plane.js +86 -0
- package/dist/settings-plane.js.map +1 -0
- package/dist/share-inbox.d.ts +56 -0
- package/dist/share-inbox.d.ts.map +1 -0
- package/dist/share-inbox.js +114 -0
- package/dist/share-inbox.js.map +1 -0
- package/dist/shared-transition.d.ts +152 -0
- package/dist/shared-transition.d.ts.map +1 -0
- package/dist/shared-transition.js +257 -0
- package/dist/shared-transition.js.map +1 -0
- package/dist/sheet-content-padding.d.ts +24 -0
- package/dist/sheet-content-padding.d.ts.map +1 -0
- package/dist/sheet-content-padding.js +32 -0
- package/dist/sheet-content-padding.js.map +1 -0
- package/dist/shot-devices.d.ts +36 -0
- package/dist/shot-devices.d.ts.map +1 -0
- package/dist/shot-devices.js +90 -0
- package/dist/shot-devices.js.map +1 -0
- package/dist/shot-guards.d.ts +100 -0
- package/dist/shot-guards.d.ts.map +1 -0
- package/dist/shot-guards.js +260 -0
- package/dist/shot-guards.js.map +1 -0
- package/dist/shot-scope.d.ts +140 -0
- package/dist/shot-scope.d.ts.map +1 -0
- package/dist/shot-scope.js +302 -0
- package/dist/shot-scope.js.map +1 -0
- package/dist/slot-partition.d.ts +9 -0
- package/dist/slot-partition.d.ts.map +1 -0
- package/dist/slot-partition.js +38 -0
- package/dist/slot-partition.js.map +1 -0
- package/dist/snackbar.d.ts +165 -0
- package/dist/snackbar.d.ts.map +1 -0
- package/dist/snackbar.js +220 -0
- package/dist/snackbar.js.map +1 -0
- package/dist/socket.d.ts +96 -0
- package/dist/socket.d.ts.map +1 -0
- package/dist/socket.js +370 -0
- package/dist/socket.js.map +1 -0
- package/dist/spotlight.d.ts +77 -0
- package/dist/spotlight.d.ts.map +1 -0
- package/dist/spotlight.js +174 -0
- package/dist/spotlight.js.map +1 -0
- package/dist/state-primitive.d.ts +37 -0
- package/dist/state-primitive.d.ts.map +1 -0
- package/dist/state-primitive.js +91 -0
- package/dist/state-primitive.js.map +1 -0
- package/dist/store-query.d.ts +25 -0
- package/dist/store-query.d.ts.map +1 -0
- package/dist/store-query.js +88 -0
- package/dist/store-query.js.map +1 -0
- package/dist/store-value.d.ts +48 -0
- package/dist/store-value.d.ts.map +1 -0
- package/dist/store-value.js +264 -0
- package/dist/store-value.js.map +1 -0
- package/dist/store-versioning.d.ts +70 -0
- package/dist/store-versioning.d.ts.map +1 -0
- package/dist/store-versioning.js +188 -0
- package/dist/store-versioning.js.map +1 -0
- package/dist/store.d.ts +282 -0
- package/dist/store.d.ts.map +1 -0
- package/dist/store.js +1144 -0
- package/dist/store.js.map +1 -0
- package/dist/strings.d.ts +141 -0
- package/dist/strings.d.ts.map +1 -0
- package/dist/strings.js +581 -0
- package/dist/strings.js.map +1 -0
- package/dist/telemetry.d.ts +95 -0
- package/dist/telemetry.d.ts.map +1 -0
- package/dist/telemetry.js +255 -0
- package/dist/telemetry.js.map +1 -0
- package/dist/transform-core.d.ts +228 -0
- package/dist/transform-core.d.ts.map +1 -0
- package/dist/transform-core.js +921 -0
- package/dist/transform-core.js.map +1 -0
- package/dist/transition-core.d.ts +58 -0
- package/dist/transition-core.d.ts.map +1 -0
- package/dist/transition-core.js +352 -0
- package/dist/transition-core.js.map +1 -0
- package/dist/trim-trailing.d.ts +3 -0
- package/dist/trim-trailing.d.ts.map +1 -0
- package/dist/trim-trailing.js +14 -0
- package/dist/trim-trailing.js.map +1 -0
- package/dist/upload.d.ts +51 -0
- package/dist/upload.d.ts.map +1 -0
- package/dist/upload.js +68 -0
- package/dist/upload.js.map +1 -0
- package/dist/vendor-face.d.ts +44 -0
- package/dist/vendor-face.d.ts.map +1 -0
- package/dist/vendor-face.js +80 -0
- package/dist/vendor-face.js.map +1 -0
- package/dist/vendor-session.d.ts +166 -0
- package/dist/vendor-session.d.ts.map +1 -0
- package/dist/vendor-session.js +423 -0
- package/dist/vendor-session.js.map +1 -0
- package/dist/vendor-surface.d.ts +290 -0
- package/dist/vendor-surface.d.ts.map +1 -0
- package/dist/vendor-surface.js +439 -0
- package/dist/vendor-surface.js.map +1 -0
- package/dist/version-rules.generated.d.ts +17 -0
- package/dist/version-rules.generated.d.ts.map +1 -0
- package/dist/version-rules.generated.js +99 -0
- package/dist/version-rules.generated.js.map +1 -0
- package/dist/view-transition-core.d.ts +99 -0
- package/dist/view-transition-core.d.ts.map +1 -0
- package/dist/view-transition-core.js +127 -0
- package/dist/view-transition-core.js.map +1 -0
- package/dist/view-transition-door.d.ts +26 -0
- package/dist/view-transition-door.d.ts.map +1 -0
- package/dist/view-transition-door.js +88 -0
- package/dist/view-transition-door.js.map +1 -0
- package/dist/window-identity.d.ts +3 -0
- package/dist/window-identity.d.ts.map +1 -0
- package/dist/window-identity.js +27 -0
- package/dist/window-identity.js.map +1 -0
- package/package.json +141 -2
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
//
|
|
2
|
+
// tier-door.ts - THE JS TIER DOOR: the two refusals that stand in front of the executor,
|
|
3
|
+
// and nothing else. The provenance one (/web/15 law 3, corpus
|
|
4
|
+
// OpenSource/Conformance/tier/ota-gate.json) and the ambient fence screen (corpus
|
|
5
|
+
// OpenSource/Conformance/tier/fence.json). Twins: TierScreen.swift on iOS and Tier.kt on
|
|
6
|
+
// Android, which hold the same two in one file for the same reason.
|
|
7
|
+
//
|
|
8
|
+
// WHY THEY LIVE HERE AND NOT IN runner.ts. Both were written into runner.ts on the
|
|
9
|
+
// reasoning that "runner.ts ships in every bundle, and a fence an embed's bundler could
|
|
10
|
+
// drop is not a fence". The first half is true and the second half does not follow. Both
|
|
11
|
+
// refusals are consulted on exactly ONE path: a body the CLASSIFIER called `js`, on its way
|
|
12
|
+
// to the EXECUTOR. Both of those arrive through `installJsTier()` and nothing else, so a
|
|
13
|
+
// bundle with no classifier has no `js` verdict, no escalation, and nothing to refuse.
|
|
14
|
+
// Sitting in runner.ts therefore bought no safety at all and cost every embed the idiom
|
|
15
|
+
// table, the lexer and the refusal prose: EmbedCard paid 846B gzip of that over its own
|
|
16
|
+
// 40960B G10 widget law, for a door it can never open.
|
|
17
|
+
//
|
|
18
|
+
// What replaces the reasoning is stronger than it was. These refusals, the classifier and
|
|
19
|
+
// the executor are installed by ONE call, as one seam, so a bundler cannot keep the tier and
|
|
20
|
+
// drop the door: dropping this module drops the executor with it, and a `js` verdict with no
|
|
21
|
+
// door installed does not escalate (runner.ts refuseJsTier, the fail closed side). The door
|
|
22
|
+
// is undroppable BECAUSE it ships with the thing it guards, rather than by riding in a
|
|
23
|
+
// module that ships everywhere.
|
|
24
|
+
//
|
|
25
|
+
// What did NOT move: `jsTierAdmits` and the `markupDoors` table stay in runner.ts. The table
|
|
26
|
+
// has a live producer in every bundle (dom mount.ts resolves a host's named door through it),
|
|
27
|
+
// and the corpus names runner.ts as the reference for the decision. Only the REFUSALS moved.
|
|
28
|
+
//
|
|
29
|
+
import { refusal, refusalMessage, REFUSAL_JS_TIER_OTA_REFUSED, REFUSAL_JS_TIER_FENCE_ESCAPE, } from "../refusal.js";
|
|
30
|
+
/** The ONE typed refusal a body whose markup arrived over the air answers with, spelled
|
|
31
|
+
* identically on all three lanes. Read from the vocabulary rather than spelled again. */
|
|
32
|
+
export const JS_TIER_OTA_REFUSED = REFUSAL_JS_TIER_OTA_REFUSED;
|
|
33
|
+
/** THE AMBIENT FENCE ESCAPE IDIOMS.
|
|
34
|
+
* Word to idiom name; the idiom name is the stable thing the corpus and the three lanes share.
|
|
35
|
+
*
|
|
36
|
+
* The fence the JS tier runs behind is a `with` proxy that claims every FREE IDENTIFIER, which
|
|
37
|
+
* makes it a correctness fence and not a realm: the value plane is the host realm, so
|
|
38
|
+
* `Object.constructor("return globalThis")()` walked out of it, and eleven siblings walked out
|
|
39
|
+
* beside it. No proxy can close that, because the escape never names a free identifier: it walks
|
|
40
|
+
* the prototype chain of a value the stdlib allowlist legitimately handed through. So the escape
|
|
41
|
+
* is refused in the SOURCE, before the body runs, on all three lanes, with one typed code.
|
|
42
|
+
*
|
|
43
|
+
* Say plainly what it is: a deny list of named idioms, not a realm boundary. A name composed at
|
|
44
|
+
* run time (`x["cons" + "tructor"]`) is not caught by it. That is closed by the PER BODY REALM
|
|
45
|
+
* (compile/tier-realm.ts), and this screen stands in front of the realm as DEFENCE IN DEPTH: it
|
|
46
|
+
* refuses a named escape before the body runs at all, which is cheaper and clearer than letting
|
|
47
|
+
* a body run and arrive nowhere, and it is the only protection left on a host where no realm can
|
|
48
|
+
* be built, where the body is refused outright instead. */
|
|
49
|
+
const JS_TIER_FENCE_IDIOMS = new Map([
|
|
50
|
+
["Function", "function-constructor"],
|
|
51
|
+
["constructor", "constructor-chain"],
|
|
52
|
+
["prototype", "prototype-walk"],
|
|
53
|
+
["__proto__", "prototype-walk"],
|
|
54
|
+
["getPrototypeOf", "prototype-walk"],
|
|
55
|
+
["setPrototypeOf", "prototype-walk"],
|
|
56
|
+
["__lookupGetter__", "prototype-walk"],
|
|
57
|
+
["__defineGetter__", "prototype-walk"],
|
|
58
|
+
["eval", "indirect-eval"],
|
|
59
|
+
["import", "dynamic-import"],
|
|
60
|
+
["with", "with-scope"],
|
|
61
|
+
["Proxy", "proxy-trap"],
|
|
62
|
+
["Reflect", "proxy-trap"],
|
|
63
|
+
["unscopables", "unscopables-fence"],
|
|
64
|
+
["prepareStackTrace", "error-stack"],
|
|
65
|
+
["captureStackTrace", "error-stack"],
|
|
66
|
+
["caller", "caller-walk"],
|
|
67
|
+
["callee", "caller-walk"],
|
|
68
|
+
["globalThis", "host-global"],
|
|
69
|
+
["window", "host-global"],
|
|
70
|
+
["document", "host-global"],
|
|
71
|
+
["require", "host-realm-module"],
|
|
72
|
+
["process", "host-realm-module"],
|
|
73
|
+
["importScripts", "host-realm-module"],
|
|
74
|
+
["WebAssembly", "host-realm-module"],
|
|
75
|
+
]);
|
|
76
|
+
/** The ONE typed refusal the fence answers with, spelled identically on all three lanes. */
|
|
77
|
+
export const JS_TIER_FENCE_ESCAPE = REFUSAL_JS_TIER_FENCE_ESCAPE;
|
|
78
|
+
/** The finding's sentence, composed by the vocabulary from the same detail the envelope
|
|
79
|
+
* carries, so the wording cannot drift from the three lanes or from the corpus. */
|
|
80
|
+
export function jsTierFenceMessage(finding) {
|
|
81
|
+
return refusalMessage(JS_TIER_FENCE_ESCAPE, { kind: "admission", snippet: "", idiom: finding.idiom, word: finding.word });
|
|
82
|
+
}
|
|
83
|
+
/** Screen ONE body already classified `js` for the fence escape idioms. Answers the first
|
|
84
|
+
* finding in source order, or null.
|
|
85
|
+
*
|
|
86
|
+
* THE LEXER, spelled identically in Engine/Swift TierScreen.swift and Engine/Kotlin Tier.kt:
|
|
87
|
+
* line and block comments are skipped, single and double quoted strings are skipped, and
|
|
88
|
+
* BACKTICK TEMPLATES ARE NOT, because an interpolation is source. Refusing the literal prose of
|
|
89
|
+
* a template that happens to say `constructor` is the safe direction for a fence. It does not
|
|
90
|
+
* reuse the JSE tokenizer on purpose: that tokenizer folds a template into one token, so the
|
|
91
|
+
* interpolation would be invisible, and the two native lexers skipped backticks wholesale. */
|
|
92
|
+
export function jsTierFenceScreen(body) {
|
|
93
|
+
const n = body.length;
|
|
94
|
+
let i = 0;
|
|
95
|
+
let lastPunct = "";
|
|
96
|
+
while (i < n) {
|
|
97
|
+
const c = body[i];
|
|
98
|
+
if (c === "/" && body[i + 1] === "/") {
|
|
99
|
+
while (i < n && body[i] !== "\n")
|
|
100
|
+
i += 1;
|
|
101
|
+
continue;
|
|
102
|
+
}
|
|
103
|
+
if (c === "/" && body[i + 1] === "*") {
|
|
104
|
+
i += 2;
|
|
105
|
+
while (i + 1 < n && !(body[i] === "*" && body[i + 1] === "/"))
|
|
106
|
+
i += 1;
|
|
107
|
+
i = Math.min(i + 2, n);
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
if (c === '"' || c === "'") {
|
|
111
|
+
i += 1;
|
|
112
|
+
while (i < n && body[i] !== c) {
|
|
113
|
+
if (body[i] === "\\")
|
|
114
|
+
i += 1;
|
|
115
|
+
i += 1;
|
|
116
|
+
}
|
|
117
|
+
i += 1;
|
|
118
|
+
lastPunct = c;
|
|
119
|
+
continue;
|
|
120
|
+
}
|
|
121
|
+
if (/[A-Za-z_$]/.test(c)) {
|
|
122
|
+
const start = i;
|
|
123
|
+
while (i < n && /[A-Za-z0-9_$]/.test(body[i]))
|
|
124
|
+
i += 1;
|
|
125
|
+
const word = body.slice(start, i);
|
|
126
|
+
const idiom = JS_TIER_FENCE_IDIOMS.get(word);
|
|
127
|
+
if (idiom !== undefined) {
|
|
128
|
+
// member-position `with` is the ARRAY METHOD (`[1,2].with(1,9)`, the classifier's own
|
|
129
|
+
// exception, kept verbatim so the two screens cannot drift).
|
|
130
|
+
if (!(word === "with" && lastPunct === "."))
|
|
131
|
+
return { idiom, word };
|
|
132
|
+
}
|
|
133
|
+
lastPunct = "";
|
|
134
|
+
continue;
|
|
135
|
+
}
|
|
136
|
+
if (!/\s/.test(c))
|
|
137
|
+
lastPunct = c;
|
|
138
|
+
i += 1;
|
|
139
|
+
}
|
|
140
|
+
return null;
|
|
141
|
+
}
|
|
142
|
+
/** The seam face: screen one body and build the whole ambient-error shape, or null when the
|
|
143
|
+
* body names no idiom. The snippet bound (120) is the one every runner refusal uses. */
|
|
144
|
+
export function jsTierFenceRefusal(body) {
|
|
145
|
+
const finding = jsTierFenceScreen(body);
|
|
146
|
+
if (finding === null)
|
|
147
|
+
return null;
|
|
148
|
+
return refusal(JS_TIER_FENCE_ESCAPE, "action.body", { kind: "admission", snippet: body.slice(0, 120), idiom: finding.idiom, word: finding.word });
|
|
149
|
+
}
|
|
150
|
+
/** THE DOOR, both refusals in order: WHERE the markup came from, then WHAT the body names.
|
|
151
|
+
* Either one refuses TOTALLY, so the body neither escalates nor falls back to the JSE
|
|
152
|
+
* interpreter. `admitted` is the runner's `jsTierAdmits` answer for this surface.
|
|
153
|
+
* Answers the refusal to report, or null when the body may reach the executor. */
|
|
154
|
+
export function jsTierRefusal(body, reason, admitted) {
|
|
155
|
+
void reason; // see the note below: the classifier's reason is NOT in the message any more
|
|
156
|
+
if (!admitted) {
|
|
157
|
+
// THE REASON LEFT THE MESSAGE, and that is the byte identity fix rather than a loss. The
|
|
158
|
+
// tier corpus README records that the classifier's reason wording legitimately differs per
|
|
159
|
+
// runtime ("'get' is outside the JSE grammar" here, "'get' accessors are outside the JSE
|
|
160
|
+
// grammar" on the twins), so a message that interpolated it could never be byte identical
|
|
161
|
+
// on three lanes no matter how carefully the rest was written. The reason stays exactly
|
|
162
|
+
// where it always was and is still asserted: in the tier verdict (verdicts.json).
|
|
163
|
+
return refusal(JS_TIER_OTA_REFUSED, "action.body", { kind: "admission", snippet: body.slice(0, 120), idiom: null, word: null });
|
|
164
|
+
}
|
|
165
|
+
return jsTierFenceRefusal(body);
|
|
166
|
+
}
|
|
167
|
+
//# sourceMappingURL=tier-door.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tier-door.js","sourceRoot":"","sources":["../../src/compile/tier-door.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0FAA0F;AAC1F,+DAA+D;AAC/D,mFAAmF;AACnF,0FAA0F;AAC1F,qEAAqE;AACrE,EAAE;AACF,oFAAoF;AACpF,yFAAyF;AACzF,0FAA0F;AAC1F,6FAA6F;AAC7F,0FAA0F;AAC1F,wFAAwF;AACxF,yFAAyF;AACzF,yFAAyF;AACzF,wDAAwD;AACxD,EAAE;AACF,2FAA2F;AAC3F,8FAA8F;AAC9F,8FAA8F;AAC9F,6FAA6F;AAC7F,wFAAwF;AACxF,iCAAiC;AACjC,EAAE;AACF,8FAA8F;AAC9F,+FAA+F;AAC/F,8FAA8F;AAC9F,EAAE;AAEF,OAAO,EACL,OAAO,EAAE,cAAc,EACvB,2BAA2B,EAAE,4BAA4B,GAC1D,M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AAI,CAAC;IAClC,OAAO,OAAO,CAAC,oBAAoB,EAAE,aAAa,EAChD,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;AAClG,CAAC;AAED;;;mFAGmF;AACnF,MAAM,UAAU,aAAa,CAAC,IAAY,EAAE,MAAqB,EAAE,QAAiB;IAClF,KAAK,MAAM,CAAC,CAAG,6EAA6E;IAC5F,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,yFAAyF;QACzF,2FAA2F;QAC3F,yFAAyF;QACzF,0FAA0F;QAC1F,wFAAwF;QACxF,kFAAkF;QAClF,OAAO,OAAO,CAAC,mBAAmB,EAAE,aAAa,EAC/C,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IACjF,CAAC;IACD,OAAO,kBAAkB,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { proxyAdmits } from "../proxy-denylist.ts";
|
|
2
|
+
/** THE CLOSED SET OF NAMES the realm's global object declares, and the whole of it. The
|
|
3
|
+
* corpus (`fence.json` `realm.names`) holds the same list and all three lanes compare it in
|
|
4
|
+
* BOTH directions, so a name added to a lane without a corpus row, or a row without a name,
|
|
5
|
+
* fails. `dsx` is the surface; the rest is pure computation only, nothing that reaches a
|
|
6
|
+
* document, a network or a timer.
|
|
7
|
+
*
|
|
8
|
+
* `console` and `structuredClone` are BUILT IN THE REALM (below) rather than taken from the
|
|
9
|
+
* host: the host's console is a host object one property walk away from the host's Function,
|
|
10
|
+
* which is the exact defect this file exists to end. */
|
|
11
|
+
export declare const JS_TIER_REALM_NAMES: readonly string[];
|
|
12
|
+
/** Does the realm's global object declare this name? THE ONLY ANSWER to "what can this body
|
|
13
|
+
* reach", and it does not care how the name was produced: a literal, a concatenation, a
|
|
14
|
+
* variable, a template and a char code walk all arrive here as the same string. */
|
|
15
|
+
export declare function jsTierRealmDeclares(name: string): boolean;
|
|
16
|
+
/** What the realm is lent for the length of ONE evaluation. Paths and plain data only. */
|
|
17
|
+
export type JsTierRealmBinding = {
|
|
18
|
+
/** the overlay read: pending writes first, then the live scope */
|
|
19
|
+
read(path: string): unknown;
|
|
20
|
+
/** record a write; the host applies the batch when the body settles or the watchdog fires */
|
|
21
|
+
stage(path: string, value: unknown): void;
|
|
22
|
+
callAction(name: string, args: unknown): Promise<unknown>;
|
|
23
|
+
callModule(chain: string, args: unknown): Promise<unknown>;
|
|
24
|
+
emitEvent(name: string, payload: unknown): void;
|
|
25
|
+
log(text: string): void;
|
|
26
|
+
error(code: string, message: string): void;
|
|
27
|
+
};
|
|
28
|
+
export type JsTierRealm = {
|
|
29
|
+
/** which provider built it: "vm" (node), "iframe" (a browser document) */
|
|
30
|
+
provider: string;
|
|
31
|
+
/** own properties of the realm global that the scrub could not delete, empty on a clean
|
|
32
|
+
* scrub. Recorded rather than assumed: a browser Window carries a handful of slots the
|
|
33
|
+
* specification marks unforgeable, and a realm that quietly kept one is not a realm. */
|
|
34
|
+
survivors: readonly string[];
|
|
35
|
+
/** run one body to settle; rejects with the body's own throw */
|
|
36
|
+
run(body: string): Promise<void>;
|
|
37
|
+
dispose(): void;
|
|
38
|
+
};
|
|
39
|
+
/** The host side of the binding, exported for the realm providers and for the tests. */
|
|
40
|
+
export declare function realmToHost(value: unknown): unknown;
|
|
41
|
+
/** Build the realm for ONE evaluation, or null when this host can build none. A null is a
|
|
42
|
+
* REFUSAL upstream (`js_tier_unavailable`, the code the Android seam already answers when no
|
|
43
|
+
* engine binds), never a fall back to running the body in the host realm: the whole point of
|
|
44
|
+
* the row is that a body outside a realm does not run. */
|
|
45
|
+
export declare function createJsTierRealm(binding: JsTierRealmBinding): Promise<JsTierRealm | null>;
|
|
46
|
+
/** The deny list, still consulted, still exported here so the executor and the tests read one
|
|
47
|
+
* spelling of "defence in depth". */
|
|
48
|
+
export { proxyAdmits };
|
|
49
|
+
//# sourceMappingURL=tier-realm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tier-realm.d.ts","sourceRoot":"","sources":["../../src/compile/tier-realm.ts"],"names":[],"mappings":"AA4CA,OAAO,EAAE,WAAW,EAAkB,MAAM,sBAAsB,CAAC;AAEnE;;;;;;;;yDAQyD;AACzD,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAMhD,CAAC;AAIF;;oFAEoF;AACpF,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEzD;AAED,0FAA0F;AAC1F,MAAM,MAAM,kBAAkB,GAAG;IAC/B,kEAAkE;IAClE,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,6FAA6F;IAC7F,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IAC1C,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC1D,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC3D,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IAChD,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5C,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,0EAA0E;IAC1E,QAAQ,EAAE,MAAM,CAAC;IACjB;;6FAEyF;IACzF,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7B,gEAAgE;IAChE,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjC,OAAO,IAAI,IAAI,CAAC;CACjB,CAAC;AAqLF,wFAAwF;AACxF,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAEnD;AA4GD;;;2DAG2D;AAC3D,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAIhG;AAED;sCACsC;AACtC,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
//
|
|
2
|
+
// tier-realm.ts - THE PER BODY REALM for the JS tier (/web/15 law 3, corpus
|
|
3
|
+
// OpenSource/Conformance/tier/fence.json `realm`). Twins: JsTierRealm in
|
|
4
|
+
// Engine/Swift/TierScreen.swift (the name plane) with the scrub inside Tier.swift's JSC
|
|
5
|
+
// bootstrap, and JsTierRealm in Engine/Kotlin core Tier.kt.
|
|
6
|
+
//
|
|
7
|
+
// WHAT THIS REPLACES. The JS tier used to run a body in the HOST realm, behind a `with`
|
|
8
|
+
// proxy that claimed every free identifier, and the door in front of it screened a DENY
|
|
9
|
+
// LIST of named escape idioms. A deny list stops the names it knows. It cannot stop a name
|
|
10
|
+
// the body composes while it runs: `x["cons" + "tructor"]`, a key held in a variable, a
|
|
11
|
+
// computed template. K25 said so in its own corpus note and left the closing of it to this
|
|
12
|
+
// file.
|
|
13
|
+
//
|
|
14
|
+
// THE RULE, one sentence, three lanes: EACH EVALUATED BODY RUNS IN ITS OWN REALM whose
|
|
15
|
+
// global object is a fresh host binding built for that one evaluation, the names reachable
|
|
16
|
+
// in it are only the ones the binding declares (JS_TIER_REALM_NAMES), and no property
|
|
17
|
+
// lookup, however the name is produced, crosses into the host's own objects. The question
|
|
18
|
+
// the deny list answered becomes moot: a composed name resolves inside the body's own realm,
|
|
19
|
+
// against the body's own intrinsics, and there is nothing of the host's on the other side of
|
|
20
|
+
// it to reach.
|
|
21
|
+
//
|
|
22
|
+
// WHY THAT IS ENOUGH WHERE A PROXY WAS NOT. The escape never named a free identifier: it
|
|
23
|
+
// walked the prototype chain of a value the stdlib allowlist legitimately handed through, so
|
|
24
|
+
// `({}).constructor` was the HOST realm's Object and `Object.constructor` was the HOST
|
|
25
|
+
// realm's Function, whose bodies evaluate in the host realm. In a per body realm the same
|
|
26
|
+
// walk answers the REALM's Object and the REALM's Function, and
|
|
27
|
+
// `Function("return globalThis")()` answers the realm's own scrubbed, sealed global. The
|
|
28
|
+
// walk still works, exactly as ordinary JavaScript should; it arrives nowhere.
|
|
29
|
+
//
|
|
30
|
+
// THE HOST BINDING IS DATA IN, DATA OUT (K35's shape, the JSE host binding): the realm is
|
|
31
|
+
// lent a `read` that is handed a path and answers a value, and a `stage` that is handed a
|
|
32
|
+
// path and a value and takes the write. No slot, no container, no host object. Every value
|
|
33
|
+
// that crosses inward is REBUILT out of the realm's own intrinsics and every value that
|
|
34
|
+
// crosses outward is rebuilt out of the host's, because a host array handed straight through
|
|
35
|
+
// would carry the host's Array.prototype, and its constructor, into the body: a realm with a
|
|
36
|
+
// host object in it is not a realm.
|
|
37
|
+
//
|
|
38
|
+
// THE DENY LIST SURVIVES AS DEFENCE IN DEPTH and is not deleted. It stops the named idioms
|
|
39
|
+
// before the body ever runs, which is a cheaper and clearer refusal than letting a body run
|
|
40
|
+
// and arrive nowhere, and it is the only protection on a host where no realm can be built.
|
|
41
|
+
// What changed is the claim: the README and the corpus note no longer say the composed name
|
|
42
|
+
// is unclosed, they say the realm closes it and the deny list stands in front of it.
|
|
43
|
+
//
|
|
44
|
+
var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) {
|
|
45
|
+
if (typeof path === "string" && /^\.\.?\//.test(path)) {
|
|
46
|
+
return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
|
|
47
|
+
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
return path;
|
|
51
|
+
};
|
|
52
|
+
import { proxyAdmits, PROXY_DENYLIST } from "../proxy-denylist.js";
|
|
53
|
+
/** THE CLOSED SET OF NAMES the realm's global object declares, and the whole of it. The
|
|
54
|
+
* corpus (`fence.json` `realm.names`) holds the same list and all three lanes compare it in
|
|
55
|
+
* BOTH directions, so a name added to a lane without a corpus row, or a row without a name,
|
|
56
|
+
* fails. `dsx` is the surface; the rest is pure computation only, nothing that reaches a
|
|
57
|
+
* document, a network or a timer.
|
|
58
|
+
*
|
|
59
|
+
* `console` and `structuredClone` are BUILT IN THE REALM (below) rather than taken from the
|
|
60
|
+
* host: the host's console is a host object one property walk away from the host's Function,
|
|
61
|
+
* which is the exact defect this file exists to end. */
|
|
62
|
+
export const JS_TIER_REALM_NAMES = [
|
|
63
|
+
"Array", "Boolean", "Date", "Error", "Infinity", "JSON", "Map", "Math", "NaN", "Number",
|
|
64
|
+
"Object", "Promise", "RangeError", "RegExp", "Set", "String", "Symbol", "SyntaxError",
|
|
65
|
+
"TypeError", "WeakMap", "WeakSet", "console", "decodeURI", "decodeURIComponent", "dsx",
|
|
66
|
+
"encodeURI", "encodeURIComponent", "isFinite", "isNaN", "parseFloat", "parseInt",
|
|
67
|
+
"structuredClone", "undefined",
|
|
68
|
+
];
|
|
69
|
+
const DECLARED = new Set(JS_TIER_REALM_NAMES);
|
|
70
|
+
/** Does the realm's global object declare this name? THE ONLY ANSWER to "what can this body
|
|
71
|
+
* reach", and it does not care how the name was produced: a literal, a concatenation, a
|
|
72
|
+
* variable, a template and a char code walk all arrive here as the same string. */
|
|
73
|
+
export function jsTierRealmDeclares(name) {
|
|
74
|
+
return DECLARED.has(name);
|
|
75
|
+
}
|
|
76
|
+
/** THE BOOTSTRAP, evaluated INSIDE the realm and nowhere else. It is handed the binding's
|
|
77
|
+
* callbacks as ARGUMENTS, which makes them closure variables of this function: a closure
|
|
78
|
+
* variable is not reachable by any property lookup, so no walk from the body can arrive at
|
|
79
|
+
* one of them and step out through its constructor. Nothing of the host is ever installed as
|
|
80
|
+
* a property of anything the body can name.
|
|
81
|
+
*
|
|
82
|
+
* It is the SAME construction the JSC bootstrap in Engine/Swift/Tier.swift performs, in the
|
|
83
|
+
* same order, for the same reason: one design, three hosts.
|
|
84
|
+
*
|
|
85
|
+
* ORDER MATTERS. The realm's own Function is captured first, then the facade is built, then
|
|
86
|
+
* the global is SCRUBBED down to the declared names and sealed. Capturing Function first is
|
|
87
|
+
* what lets the scrub delete it: the body's own `({}).constructor.constructor` still answers
|
|
88
|
+
* it, and that is fine, because it is the REALM's Function and its bodies evaluate here. */
|
|
89
|
+
const BOOTSTRAP = `(function ($read, $stage, $callAction, $callModule, $emit, $log, $error, $config) {
|
|
90
|
+
"use strict";
|
|
91
|
+
var G = globalThis;
|
|
92
|
+
var MakeFunction = Function;
|
|
93
|
+
var MakeProxy = Proxy;
|
|
94
|
+
var cfg = JSON.parse($config);
|
|
95
|
+
var declared = Object.create(null);
|
|
96
|
+
for (var di = 0; di < cfg.names.length; di++) declared[cfg.names[di]] = true;
|
|
97
|
+
var denied = Object.create(null);
|
|
98
|
+
for (var di2 = 0; di2 < cfg.denied.length; di2++) denied[cfg.denied[di2]] = true;
|
|
99
|
+
|
|
100
|
+
// Rebuild a value the host handed in out of THIS realm's intrinsics. Anything that is not
|
|
101
|
+
// plain data answers undefined: the store's value plane is data, and a host object passed
|
|
102
|
+
// through would carry the host's prototypes, and their constructors, into the body.
|
|
103
|
+
function toRealm(v, depth) {
|
|
104
|
+
if (depth > 32) return undefined;
|
|
105
|
+
if (v === null) return null;
|
|
106
|
+
var t = typeof v;
|
|
107
|
+
if (t === "string" || t === "number" || t === "boolean" || t === "undefined") return v;
|
|
108
|
+
if (t !== "object") return undefined;
|
|
109
|
+
var tag = Object.prototype.toString.call(v);
|
|
110
|
+
if (tag === "[object Array]") {
|
|
111
|
+
var arr = [];
|
|
112
|
+
for (var i = 0; i < v.length; i++) arr[i] = toRealm(v[i], depth + 1);
|
|
113
|
+
return arr;
|
|
114
|
+
}
|
|
115
|
+
if (tag === "[object Date]") return new Date(Number(v));
|
|
116
|
+
if (tag === "[object Object]") {
|
|
117
|
+
var obj = {};
|
|
118
|
+
var keys = Object.keys(v);
|
|
119
|
+
for (var k = 0; k < keys.length; k++) obj[keys[k]] = toRealm(v[keys[k]], depth + 1);
|
|
120
|
+
return obj;
|
|
121
|
+
}
|
|
122
|
+
return undefined;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
function read(path) { return toRealm($read(path), 0); }
|
|
126
|
+
|
|
127
|
+
function dataRoot(root) {
|
|
128
|
+
return new MakeProxy({}, {
|
|
129
|
+
get: function (_t, key) { return typeof key === "string" ? read("dsx." + root + "." + key) : undefined; },
|
|
130
|
+
set: function (_t, key, value) { if (typeof key === "string") $stage("dsx." + root + "." + key, value); return true; },
|
|
131
|
+
has: function () { return true; }
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
function admits(key) { return typeof key === "string" && denied[key] !== true; }
|
|
136
|
+
|
|
137
|
+
function moduleChain(chain) {
|
|
138
|
+
return new MakeProxy(function () {}, {
|
|
139
|
+
get: function (_t, key) {
|
|
140
|
+
if (!admits(key)) return undefined;
|
|
141
|
+
return moduleChain(chain.length === 0 ? key : chain + "." + key);
|
|
142
|
+
},
|
|
143
|
+
apply: function (_t, _this, args) {
|
|
144
|
+
var payload = (args[0] !== null && typeof args[0] === "object") ? args[0] : {};
|
|
145
|
+
return new Promise(function (resolve) {
|
|
146
|
+
$callModule(chain, payload, function (envelope) { resolve(toRealm(envelope, 0)); });
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
var dsx = {
|
|
153
|
+
variable: dataRoot("variable"),
|
|
154
|
+
global: dataRoot("global"),
|
|
155
|
+
cookie: dataRoot("cookie"),
|
|
156
|
+
get this() { return read("dsx.this"); },
|
|
157
|
+
get item() { return read("dsx.item"); },
|
|
158
|
+
get route() { return read("dsx.route"); },
|
|
159
|
+
get query() { return read("dsx.query"); },
|
|
160
|
+
get app() { return read("dsx.app"); },
|
|
161
|
+
get screen() { return read("dsx.screen"); },
|
|
162
|
+
action: new MakeProxy({}, {
|
|
163
|
+
get: function (_t, key) {
|
|
164
|
+
if (!admits(key)) return undefined;
|
|
165
|
+
var action = function (args) {
|
|
166
|
+
return new Promise(function (resolve) {
|
|
167
|
+
$callAction(key, (args === null || args === undefined) ? {} : args,
|
|
168
|
+
function (value) { resolve(toRealm(value, 0)); });
|
|
169
|
+
});
|
|
170
|
+
};
|
|
171
|
+
Object.defineProperty(action, "pending", { get: function () { return read("dsx.action." + key + ".pending") === true; }, set: function () {} });
|
|
172
|
+
return action;
|
|
173
|
+
}
|
|
174
|
+
}),
|
|
175
|
+
module: moduleChain(""),
|
|
176
|
+
event: function (name, payload) { $emit(String(name), payload || {}); },
|
|
177
|
+
send: function (name, payload) { $emit(String(name), payload || {}); },
|
|
178
|
+
broadcast: function (name, payload) { $emit(String(name), payload || {}); },
|
|
179
|
+
log: function () { $log(Array.prototype.map.call(arguments, function (a) { return String(a); }).join(" ")); },
|
|
180
|
+
error: function (code, message) { $error(String(code), message === undefined ? "" : String(message)); }
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
// built HERE, never taken from the host: a host console is one property walk from the
|
|
184
|
+
// host's Function, which is the whole defect this realm exists to close.
|
|
185
|
+
var consoleShim = {
|
|
186
|
+
log: dsx.log, info: dsx.log, warn: dsx.log, error: dsx.log, debug: dsx.log
|
|
187
|
+
};
|
|
188
|
+
function structuredCloneShim(v) { return toRealm(v, 0); }
|
|
189
|
+
|
|
190
|
+
// The free identifier plane. A name the realm's global does not declare is a STORE read,
|
|
191
|
+
// exactly as before; what changed is which realm the values on either side belong to.
|
|
192
|
+
var fence = new MakeProxy({}, {
|
|
193
|
+
has: function () { return true; },
|
|
194
|
+
get: function (_t, key) {
|
|
195
|
+
if (key === Symbol.unscopables) return undefined;
|
|
196
|
+
if (typeof key !== "string") return undefined;
|
|
197
|
+
if (key === "dsx") return dsx;
|
|
198
|
+
if (declared[key] === true) return G[key];
|
|
199
|
+
return read(key);
|
|
200
|
+
},
|
|
201
|
+
set: function (_t, key, value) { if (typeof key === "string") $stage(key, value); return true; }
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
// THE SCRUB. Every own name of the realm global that the binding does not declare is
|
|
205
|
+
// deleted, then the global is sealed. What cannot be deleted is REPORTED, never assumed
|
|
206
|
+
// away.
|
|
207
|
+
G.dsx = dsx;
|
|
208
|
+
G.console = consoleShim;
|
|
209
|
+
G.structuredClone = structuredCloneShim;
|
|
210
|
+
var survivors = [];
|
|
211
|
+
var own = Object.getOwnPropertyNames(G);
|
|
212
|
+
for (var oi = 0; oi < own.length; oi++) {
|
|
213
|
+
var name = own[oi];
|
|
214
|
+
if (declared[name] === true) continue;
|
|
215
|
+
try { delete G[name]; } catch (e) { }
|
|
216
|
+
if (Object.prototype.hasOwnProperty.call(G, name)) survivors.push(name);
|
|
217
|
+
}
|
|
218
|
+
try { Object.seal(G); } catch (e2) { }
|
|
219
|
+
|
|
220
|
+
return {
|
|
221
|
+
survivors: survivors.join(","),
|
|
222
|
+
run: function (body) {
|
|
223
|
+
var runner = MakeFunction("$fence", "with ($fence) { return (async function () {\\n" + body + "\\n})(); }");
|
|
224
|
+
return Promise.resolve().then(function () { return runner(fence); }).then(function () { return null; });
|
|
225
|
+
}
|
|
226
|
+
};
|
|
227
|
+
})`;
|
|
228
|
+
/** Rebuild a value the realm handed out as HOST plain data, for the same reason the realm
|
|
229
|
+
* rebuilds what it is handed: a realm object in the store outlives its realm and carries a
|
|
230
|
+
* dead realm's prototypes into every reader of it. */
|
|
231
|
+
function toHost(v, depth) {
|
|
232
|
+
if (depth > 32)
|
|
233
|
+
return undefined;
|
|
234
|
+
if (v === null)
|
|
235
|
+
return null;
|
|
236
|
+
const t = typeof v;
|
|
237
|
+
if (t === "string" || t === "number" || t === "boolean" || t === "undefined")
|
|
238
|
+
return v;
|
|
239
|
+
if (t !== "object")
|
|
240
|
+
return undefined;
|
|
241
|
+
const tag = Object.prototype.toString.call(v);
|
|
242
|
+
if (tag === "[object Array]") {
|
|
243
|
+
const src = v;
|
|
244
|
+
const out = [];
|
|
245
|
+
for (let i = 0; i < src.length; i += 1)
|
|
246
|
+
out[i] = toHost(src[i], depth + 1);
|
|
247
|
+
return out;
|
|
248
|
+
}
|
|
249
|
+
if (tag === "[object Date]")
|
|
250
|
+
return new Date(Number(v));
|
|
251
|
+
if (tag === "[object Object]") {
|
|
252
|
+
const src = v;
|
|
253
|
+
const out = {};
|
|
254
|
+
for (const k of Object.keys(src))
|
|
255
|
+
out[k] = toHost(src[k], depth + 1);
|
|
256
|
+
return out;
|
|
257
|
+
}
|
|
258
|
+
return undefined;
|
|
259
|
+
}
|
|
260
|
+
/** The host side of the binding, exported for the realm providers and for the tests. */
|
|
261
|
+
export function realmToHost(value) {
|
|
262
|
+
return toHost(value, 0);
|
|
263
|
+
}
|
|
264
|
+
function bootstrapConfig() {
|
|
265
|
+
return JSON.stringify({ names: JS_TIER_REALM_NAMES, denied: [...PROXY_DENYLIST] });
|
|
266
|
+
}
|
|
267
|
+
function wire(factory, binding) {
|
|
268
|
+
return factory((path) => binding.read(path), (path, value) => { binding.stage(path, toHost(value, 0)); }, (name, args, resolve) => {
|
|
269
|
+
void binding.callAction(name, toHost(args, 0)).then((v) => { resolve(v); }, () => { resolve(null); });
|
|
270
|
+
}, (chain, args, resolve) => {
|
|
271
|
+
void binding.callModule(chain, toHost(args, 0)).then((v) => { resolve(v); }, () => { resolve(null); });
|
|
272
|
+
}, (name, payload) => { binding.emitEvent(String(name), toHost(payload, 0)); }, (text) => { binding.log(String(text)); }, (code, message) => { binding.error(String(code), String(message)); }, bootstrapConfig());
|
|
273
|
+
}
|
|
274
|
+
/** THE NODE PROVIDER: a genuine V8 context, whose intrinsics are its own and whose global
|
|
275
|
+
* carries nothing of the embedder (no process, no require, no console) even before the
|
|
276
|
+
* scrub. The specifier is composed so that a browser bundler does not resolve it: a build
|
|
277
|
+
* for the document lane takes the iframe provider below and must not carry a node builtin. */
|
|
278
|
+
async function createVmRealm(binding) {
|
|
279
|
+
const proc = globalThis.process;
|
|
280
|
+
if (proc === undefined || proc.versions === undefined || proc.versions.node === undefined)
|
|
281
|
+
return null;
|
|
282
|
+
const specifier = "node:" + "vm";
|
|
283
|
+
let vm;
|
|
284
|
+
try {
|
|
285
|
+
// android-closure-exempt: a node builtin ("node:" + "vm"), never a repository file a pull request could change under the Android proof.
|
|
286
|
+
vm = (await import(__rewriteRelativeImportExtension(/* @vite-ignore */ specifier)));
|
|
287
|
+
}
|
|
288
|
+
catch {
|
|
289
|
+
return null;
|
|
290
|
+
}
|
|
291
|
+
const context = vm.createContext({}, { name: "dsx-js-tier" });
|
|
292
|
+
const factory = vm.runInContext(BOOTSTRAP, context, { filename: "dsx-js-tier-realm.js" });
|
|
293
|
+
const wired = wire(factory, binding);
|
|
294
|
+
return {
|
|
295
|
+
provider: "vm",
|
|
296
|
+
survivors: wired.survivors.length === 0 ? [] : wired.survivors.split(","),
|
|
297
|
+
run: async (body) => { await wired.run(body); },
|
|
298
|
+
dispose: () => { },
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
/** THE DOCUMENT PROVIDER: a same origin iframe, its bootstrap evaluated while it is still
|
|
302
|
+
* attached, then DETACHED before the body runs. Detaching is what makes it a realm rather
|
|
303
|
+
* than a second window of the host's: a discarded browsing context's `top` and `parent` no
|
|
304
|
+
* longer answer the host's window, and its document and location are inert. The realm's
|
|
305
|
+
* intrinsics survive the detach, which is what the body runs against.
|
|
306
|
+
*
|
|
307
|
+
* The scrub inside the bootstrap deletes every own name the binding does not declare and
|
|
308
|
+
* REPORTS what would not delete, because a Window carries slots the specification marks
|
|
309
|
+
* unforgeable. Every survivor belongs to the detached frame, never to the host document.
|
|
310
|
+
*
|
|
311
|
+
* A PROVIDER THAT CANNOT BUILD ITS REALM ANSWERS NULL AND NEVER THROWS, which is why the
|
|
312
|
+
* whole construction is inside one try: `document` is not proof of a browsing context. A
|
|
313
|
+
* non-browser document (the DOM package's own fake document in a node test, a partial
|
|
314
|
+
* document in a server render) answers an element for `createElement` and nothing usable for
|
|
315
|
+
* `documentElement` or `contentWindow`, and a throw here would escape `createJsTierRealm`,
|
|
316
|
+
* skip the node provider below it, and reach the body's caller as the body's own throw. A
|
|
317
|
+
* null falls through to the next provider, which is exactly what "no realm, no run" needs to
|
|
318
|
+
* mean: refused only when NO provider on this host can build one. */
|
|
319
|
+
function createIframeRealm(binding) {
|
|
320
|
+
const doc = globalThis.document;
|
|
321
|
+
let frame = null;
|
|
322
|
+
let factory;
|
|
323
|
+
try {
|
|
324
|
+
const root = doc === undefined || doc === null ? null : doc.documentElement;
|
|
325
|
+
if (doc === undefined || doc === null || root === undefined || root === null)
|
|
326
|
+
return null;
|
|
327
|
+
frame = doc.createElement("iframe");
|
|
328
|
+
frame.setAttribute("aria-hidden", "true");
|
|
329
|
+
frame.style.display = "none";
|
|
330
|
+
root.appendChild(frame);
|
|
331
|
+
const win = frame.contentWindow;
|
|
332
|
+
if (win === undefined || win === null) {
|
|
333
|
+
frame.remove();
|
|
334
|
+
return null;
|
|
335
|
+
}
|
|
336
|
+
factory = win.eval(BOOTSTRAP);
|
|
337
|
+
frame.remove();
|
|
338
|
+
}
|
|
339
|
+
catch {
|
|
340
|
+
try {
|
|
341
|
+
if (frame !== null)
|
|
342
|
+
frame.remove();
|
|
343
|
+
}
|
|
344
|
+
catch { /* a document that cannot detach */ }
|
|
345
|
+
return null;
|
|
346
|
+
}
|
|
347
|
+
const wired = wire(factory, binding);
|
|
348
|
+
return {
|
|
349
|
+
provider: "iframe",
|
|
350
|
+
survivors: wired.survivors.length === 0 ? [] : wired.survivors.split(","),
|
|
351
|
+
run: async (body) => { await wired.run(body); },
|
|
352
|
+
dispose: () => { },
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
/** Build the realm for ONE evaluation, or null when this host can build none. A null is a
|
|
356
|
+
* REFUSAL upstream (`js_tier_unavailable`, the code the Android seam already answers when no
|
|
357
|
+
* engine binds), never a fall back to running the body in the host realm: the whole point of
|
|
358
|
+
* the row is that a body outside a realm does not run. */
|
|
359
|
+
export async function createJsTierRealm(binding) {
|
|
360
|
+
const framed = createIframeRealm(binding);
|
|
361
|
+
if (framed !== null)
|
|
362
|
+
return framed;
|
|
363
|
+
return await createVmRealm(binding);
|
|
364
|
+
}
|
|
365
|
+
/** The deny list, still consulted, still exported here so the executor and the tests read one
|
|
366
|
+
* spelling of "defence in depth". */
|
|
367
|
+
export { proxyAdmits };
|
|
368
|
+
//# sourceMappingURL=tier-realm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tier-realm.js","sourceRoot":"","sources":["../../src/compile/tier-realm.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,6EAA6E;AAC7E,0EAA0E;AAC1E,yFAAyF;AACzF,6DAA6D;AAC7D,EAAE;AACF,yFAAyF;AACzF,yFAAyF;AACzF,4FAA4F;AAC5F,yFAAyF;AACzF,4FAA4F;AAC5F,SAAS;AACT,EAAE;AACF,wFAAwF;AACxF,4FAA4F;AAC5F,uFAAuF;AACvF,2FAA2F;AAC3F,8FAA8F;AAC9F,8FAA8F;AAC9F,gBAAgB;AAChB,EAAE;AACF,0FAA0F;AAC1F,8FAA8F;AAC9F,wFAAwF;AACxF,2FAA2F;AAC3F,iEAAiE;AACjE,0FAA0F;AAC1F,gFAAgF;AAChF,EAAE;AACF,2FAA2F;AAC3F,2FAA2F;AAC3F,4FAA4F;AAC5F,yF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,IAAI,CAAC,SAAS,CAAiB,CAAC;QAC9C,KAAK,CAAC,MAAM,EAAE,CAAC;IACjB,CAAC;IAAC,MAAM,CAAC;QACP,IAAI,CAAC;YAAC,IAAI,KAAK,KAAK,IAAI;gBAAE,KAAK,CAAC,MAAM,EAAE,CAAC;QAAC,CAAC;QAAC,MAAM,CAAC,CAAC,mCAAmC,CAAC,CAAC;QACzF,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACrC,OAAO;QACL,QAAQ,EAAE,QAAQ;QAClB,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC;QACzE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC/C,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC;KACnB,CAAC;AACJ,CAAC;AAED;;;2DAG2D;AAC3D,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,OAA2B;IACjE,MAAM,MAAM,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAC1C,IAAI,MAAM,KAAK,IAAI;QAAE,OAAO,MAAM,CAAC;IACnC,OAAO,MAAM,aAAa,CAAC,OAAO,CAAC,CAAC;AACtC,CAAC;AAED;sCACsC;AACtC,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type TierVerdict = {
|
|
2
|
+
tier: "jse" | "js";
|
|
3
|
+
/** the screen's finding, when the body escalates — the "why" the report prints */
|
|
4
|
+
reason: string | null;
|
|
5
|
+
};
|
|
6
|
+
/** Classify one action-tier body (an `<action>` body, an `on:*` handler, a hook body).
|
|
7
|
+
* Deterministic and cached — zero per-evaluation cost (/web/15 law 4). */
|
|
8
|
+
export declare function classifyBody(body: string): TierVerdict;
|
|
9
|
+
export type TierReportEntry = {
|
|
10
|
+
location: string;
|
|
11
|
+
reason: string;
|
|
12
|
+
};
|
|
13
|
+
export type TierReport = {
|
|
14
|
+
total: number;
|
|
15
|
+
jse: number;
|
|
16
|
+
js: TierReportEntry[];
|
|
17
|
+
};
|
|
18
|
+
/** The build's tier report ("3 of 41 bodies run on the JS tier", with locations). */
|
|
19
|
+
export declare function tierReport(bodies: Iterable<{
|
|
20
|
+
location: string;
|
|
21
|
+
source: string;
|
|
22
|
+
}>): TierReport;
|
|
23
|
+
//# sourceMappingURL=tier.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tier.d.ts","sourceRoot":"","sources":["../../src/compile/tier.ts"],"names":[],"mappings":"AA6BA,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,KAAK,GAAG,IAAI,CAAC;IACnB,kFAAkF;IAClF,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB,CAAC;AA0BF;2EAC2E;AAC3E,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAmFtD;AAED,MAAM,MAAM,eAAe,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnE,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,EAAE,eAAe,EAAE,CAAC;CACvB,CAAC;AAEF,qFAAqF;AACrF,wBAAgB,UAAU,CAAC,MAAM,EAAE,QAAQ,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG,UAAU,CAS7F"}
|