@johnhenry/mallory-cli 0.0.0-stage → 0.1.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/README.md +60 -2
- package/bin/mallory.mjs +51 -0
- package/package.json +51 -4
- package/src/a2a/client.js +511 -0
- package/src/a2a/demo-agent.js +396 -0
- package/src/a2a/hub.js +578 -0
- package/src/a2a/settings.js +88 -0
- package/src/a2a/task.js +358 -0
- package/src/acp/client.js +573 -0
- package/src/acp/demo-agent.js +332 -0
- package/src/acp/hub.js +632 -0
- package/src/acp/settings.js +78 -0
- package/src/actions/map.js +524 -0
- package/src/agent/cloud.js +77 -0
- package/src/agent/compact.js +84 -0
- package/src/agent/constants.js +39 -0
- package/src/agent/diff.js +101 -0
- package/src/agent/fork.js +159 -0
- package/src/agent/grounding.js +73 -0
- package/src/agent/guards.js +129 -0
- package/src/agent/local-transport.js +152 -0
- package/src/agent/loop.js +479 -0
- package/src/agent/park-store.js +77 -0
- package/src/agent/park.js +76 -0
- package/src/agent/ports.js +28 -0
- package/src/agent/providers.js +591 -0
- package/src/agent/restart.js +51 -0
- package/src/agent/router.js +380 -0
- package/src/agent/run.js +861 -0
- package/src/agent/tools.js +247 -0
- package/src/agent-library/engine.js +43 -0
- package/src/ai/bridge.js +155 -0
- package/src/ai/policy.js +131 -0
- package/src/aimatey/vendor.js +18 -0
- package/src/audio/container-duration.js +35 -0
- package/src/audio/instruments.js +776 -0
- package/src/audio/lanes.js +230 -0
- package/src/audio/patch.js +1410 -0
- package/src/audio/plan.js +276 -0
- package/src/audio/rack.js +1006 -0
- package/src/audio/sample-trim.js +293 -0
- package/src/audio/soundfont.js +243 -0
- package/src/audio/take-store.js +87 -0
- package/src/audio/takes.js +129 -0
- package/src/audio/wav.js +170 -0
- package/src/audio/zzfx.js +333 -0
- package/src/autonomy/bundle.js +207 -0
- package/src/autonomy/confine.js +61 -0
- package/src/autonomy/enforce.js +155 -0
- package/src/autonomy/file-kv.js +88 -0
- package/src/autonomy/ledger.js +203 -0
- package/src/autonomy/pins.js +50 -0
- package/src/autonomy/psl/index.js +32 -0
- package/src/autonomy/psl/suffixes.json +1 -0
- package/src/autonomy/record.js +28 -0
- package/src/autonomy/routines.js +107 -0
- package/src/autonomy/server.js +175 -0
- package/src/autonomy/signer-node.js +167 -0
- package/src/autonomy/store.js +43 -0
- package/src/autonomy/unattended.js +13 -0
- package/src/bytes/bytes.js +378 -0
- package/src/calc/syntax.js +125 -0
- package/src/calc/tex.js +28 -0
- package/src/calendar/vendor.js +2 -0
- package/src/clipboard.js +130 -0
- package/src/clsh/clsh.js +3417 -0
- package/src/codec/capnp.js +1804 -0
- package/src/codec/core.js +2043 -0
- package/src/codec/vendor/avro.js +136 -0
- package/src/codec/vendor/cbor.js +25 -0
- package/src/codec/vendor/flatbuffers.js +206 -0
- package/src/codec/vendor/msgpack.js +9 -0
- package/src/codec/vendor/protobuf.js +53 -0
- package/src/delegation/caps.js +60 -0
- package/src/delegation/config.js +32 -0
- package/src/device/model.js +246 -0
- package/src/device/recording.js +198 -0
- package/src/device/stream-model.js +151 -0
- package/src/documents/documents.js +1224 -0
- package/src/effects/catalog.js +63 -0
- package/src/effects/extras.js +133 -0
- package/src/effects/parse.js +339 -0
- package/src/embed/protocol.js +131 -0
- package/src/env/env.js +159 -0
- package/src/exact/vendor.js +45 -0
- package/src/example-meta.js +164 -0
- package/src/examples.js +94 -0
- package/src/export/canvas-image.js +217 -0
- package/src/export/expr-latex-lazy.js +8 -0
- package/src/export/formats.js +322 -0
- package/src/export/latex.js +183 -0
- package/src/export/pane.js +184 -0
- package/src/export/value.js +452 -0
- package/src/export/zip.js +214 -0
- package/src/ext/access.js +58 -0
- package/src/ext/btasks.js +225 -0
- package/src/ext/client.js +209 -0
- package/src/ext/tools.js +69 -0
- package/src/ext/view.js +105 -0
- package/src/ext/webmcp-tabs.js +299 -0
- package/src/files/archive.js +232 -0
- package/src/files/files.js +317 -0
- package/src/formats/json.js +24 -0
- package/src/formats/jupyter.js +188 -0
- package/src/formats/markdown.js +254 -0
- package/src/formats/n8n.js +276 -0
- package/src/formats/node-red.js +363 -0
- package/src/formats/registry.js +177 -0
- package/src/formats/rivet.js +259 -0
- package/src/formats/shared.js +98 -0
- package/src/formats/structure.js +182 -0
- package/src/formats/yaml.js +127 -0
- package/src/frame/frame.js +962 -0
- package/src/frame/vendor.js +1484 -0
- package/src/gate/audit.js +116 -0
- package/src/gate/gate.js +365 -0
- package/src/gate/policy.js +295 -0
- package/src/gate/scripted.js +110 -0
- package/src/gate/seams.js +32 -0
- package/src/gate/store.js +66 -0
- package/src/geometry/model.js +533 -0
- package/src/grant-key.js +149 -0
- package/src/graph/model.js +381 -0
- package/src/headless/a2a-push.js +123 -0
- package/src/headless/channels/config.js +142 -0
- package/src/headless/channels/connectors.js +283 -0
- package/src/headless/channels/index.js +257 -0
- package/src/headless/channels/mail.js +197 -0
- package/src/headless/channels/mailnet.js +223 -0
- package/src/headless/channels/platforms.js +194 -0
- package/src/headless/channels/replay.js +49 -0
- package/src/headless/cli.js +1397 -0
- package/src/headless/companion-client.js +182 -0
- package/src/headless/cost-cli.js +177 -0
- package/src/headless/deprecations-cli.js +102 -0
- package/src/headless/examples.js +48 -0
- package/src/headless/ffmpeg-exec.js +217 -0
- package/src/headless/gateways/config.js +213 -0
- package/src/headless/gateways/homeassistant.js +159 -0
- package/src/headless/gateways/index.js +121 -0
- package/src/headless/gateways/matter.js +150 -0
- package/src/headless/gateways/mqtt-client.js +177 -0
- package/src/headless/gateways/mqtt.js +70 -0
- package/src/headless/gateways/netway.js +226 -0
- package/src/headless/gateways/serverpod-worker.mjs +16 -0
- package/src/headless/gateways/serverpod.js +71 -0
- package/src/headless/gateways/util.js +27 -0
- package/src/headless/grant-cli.js +208 -0
- package/src/headless/guard.js +125 -0
- package/src/headless/guards.js +124 -0
- package/src/headless/machine-cli.js +853 -0
- package/src/headless/mcp-endpoint.js +287 -0
- package/src/headless/mcp-roots.js +38 -0
- package/src/headless/model-endpoint.js +88 -0
- package/src/headless/net.js +151 -0
- package/src/headless/node.js +263 -0
- package/src/headless/npm-tarball.js +29 -0
- package/src/headless/operator-page.js +112 -0
- package/src/headless/operator.js +242 -0
- package/src/headless/people.js +34 -0
- package/src/headless/pkg-cli.js +1103 -0
- package/src/headless/pkg-serve.js +138 -0
- package/src/headless/process-worker.js +88 -0
- package/src/headless/runner-remote.js +477 -0
- package/src/headless/sandbox-child.mjs +21 -0
- package/src/headless/scheduled.js +557 -0
- package/src/headless/serve-stream.js +97 -0
- package/src/headless/serve.js +2238 -0
- package/src/headless/short-links.js +158 -0
- package/src/headless/static-dirs.js +207 -0
- package/src/headless/trust-file.js +51 -0
- package/src/headless/watch.js +291 -0
- package/src/headless/ws-connect.js +65 -0
- package/src/headless/ws-connections.js +44 -0
- package/src/headless/ws-echo.js +150 -0
- package/src/headless/ws-proxy.js +354 -0
- package/src/headless/ws-ticket.js +48 -0
- package/src/hooks/config.js +50 -0
- package/src/hooks/engine.js +189 -0
- package/src/input/log.js +613 -0
- package/src/input/player.js +217 -0
- package/src/input/replay.js +209 -0
- package/src/jth/vendor.js +28 -0
- package/src/ledger/tx.js +94 -0
- package/src/machine/apply.js +193 -0
- package/src/machine/diff.js +168 -0
- package/src/machine/drive.js +296 -0
- package/src/machine/engine.js +478 -0
- package/src/machine/files-tool.js +76 -0
- package/src/machine/lint.js +139 -0
- package/src/machine/llmtm-trace.js +117 -0
- package/src/machine/llmtm.js +475 -0
- package/src/machine/otel.js +80 -0
- package/src/machine/pane-provider.js +51 -0
- package/src/machine/propose.js +159 -0
- package/src/machine/random.js +52 -0
- package/src/machine/risk.js +107 -0
- package/src/machine/session.js +1017 -0
- package/src/machine/shell-tool.js +45 -0
- package/src/machine/tape.js +349 -0
- package/src/machine/templates.js +104 -0
- package/src/machine/trace.js +664 -0
- package/src/machine/view.js +73 -0
- package/src/machine/vm-tool.js +47 -0
- package/src/machine/watchdog.js +46 -0
- package/src/mcp/app-args.js +51 -0
- package/src/mcp/app-run.js +56 -0
- package/src/mcp/apps.js +468 -0
- package/src/mcp/cache.js +232 -0
- package/src/mcp/client.js +507 -0
- package/src/mcp/demo-app.js +183 -0
- package/src/mcp/demo-server.js +602 -0
- package/src/mcp/elicitation.js +116 -0
- package/src/mcp/hub.js +1326 -0
- package/src/mcp/roots.js +139 -0
- package/src/mcp/sampling.js +105 -0
- package/src/mcp/settings.js +125 -0
- package/src/mcp/tape.js +292 -0
- package/src/mcp/uri-template.js +156 -0
- package/src/mcp/wsh-client.js +164 -0
- package/src/media/animated-codec.js +7 -0
- package/src/media/animated.js +623 -0
- package/src/media/compare-agent.js +70 -0
- package/src/media/compare-job.js +63 -0
- package/src/media/compare-page.js +296 -0
- package/src/media/compare-worker.js +14 -0
- package/src/media/compare.js +600 -0
- package/src/media/contract.js +62 -0
- package/src/media/decode-frame.js +57 -0
- package/src/media/decode-pool.js +188 -0
- package/src/media/ffmpeg-edit.js +344 -0
- package/src/media/ffmpeg-wasm-client.js +121 -0
- package/src/media/ffmpeg-wasm-session.js +79 -0
- package/src/media/ffmpeg-wasm.js +139 -0
- package/src/media/ffmpeg-worker.js +23 -0
- package/src/media/ffmpeg.js +903 -0
- package/src/media/helpers.js +419 -0
- package/src/media/keep.js +108 -0
- package/src/media/metadata-worker.js +16 -0
- package/src/media/metadata.js +2518 -0
- package/src/media/mime.js +102 -0
- package/src/media/page-decode.js +74 -0
- package/src/media/persist.js +114 -0
- package/src/media/png.js +226 -0
- package/src/media/sample-input.js +67 -0
- package/src/media/store.js +86 -0
- package/src/media/wav.js +109 -0
- package/src/midi/mappings.js +250 -0
- package/src/midi/message.js +125 -0
- package/src/model/action-hub.js +143 -0
- package/src/model/adapters.js +284 -0
- package/src/model/agent-runs.js +12 -0
- package/src/model/arrange.js +308 -0
- package/src/model/automation-clock.js +494 -0
- package/src/model/automation.js +653 -0
- package/src/model/batches.js +78 -0
- package/src/model/binary-view.js +195 -0
- package/src/model/breakpoints.js +392 -0
- package/src/model/calc-settings.js +65 -0
- package/src/model/calendar.js +254 -0
- package/src/model/canvas-id.js +5 -0
- package/src/model/canvas.js +5048 -0
- package/src/model/channel-names.js +29 -0
- package/src/model/channels.js +692 -0
- package/src/model/chart-clock.js +631 -0
- package/src/model/chart-code.js +69 -0
- package/src/model/codecs.js +60 -0
- package/src/model/companion-access.js +271 -0
- package/src/model/companion-pane.js +50 -0
- package/src/model/composite.js +324 -0
- package/src/model/context.js +380 -0
- package/src/model/controls.js +231 -0
- package/src/model/converter-presets.js +368 -0
- package/src/model/cost.js +580 -0
- package/src/model/curve-transform.js +122 -0
- package/src/model/cycles.js +176 -0
- package/src/model/debug-log.js +168 -0
- package/src/model/decision-clock.js +100 -0
- package/src/model/decisions.js +265 -0
- package/src/model/desk.js +87 -0
- package/src/model/device-hub.js +400 -0
- package/src/model/diff.js +445 -0
- package/src/model/emit-events.js +179 -0
- package/src/model/errors.js +238 -0
- package/src/model/event-presets.js +297 -0
- package/src/model/events.js +1303 -0
- package/src/model/explicit-setters.js +139 -0
- package/src/model/field-mapping.js +623 -0
- package/src/model/files-pane.js +263 -0
- package/src/model/flow-idle.js +89 -0
- package/src/model/foreach.js +549 -0
- package/src/model/frame-loop.js +71 -0
- package/src/model/frame-pressure.js +180 -0
- package/src/model/function-scaffold.js +1000 -0
- package/src/model/geometry-settings.js +54 -0
- package/src/model/goals.js +176 -0
- package/src/model/graph-settings.js +76 -0
- package/src/model/grid-widget.js +175 -0
- package/src/model/groups.js +332 -0
- package/src/model/hash.js +21 -0
- package/src/model/history.js +259 -0
- package/src/model/http-copy.js +88 -0
- package/src/model/http-send-companion.js +110 -0
- package/src/model/http-send.js +163 -0
- package/src/model/http-tap.js +521 -0
- package/src/model/http-tools.js +1138 -0
- package/src/model/import-lock.js +78 -0
- package/src/model/imports.js +258 -0
- package/src/model/infer-outputs.js +822 -0
- package/src/model/ink-connect.js +150 -0
- package/src/model/ink-diff.js +75 -0
- package/src/model/ink-gone.js +71 -0
- package/src/model/ink-route.js +120 -0
- package/src/model/ink-svg.js +206 -0
- package/src/model/ink.js +739 -0
- package/src/model/input-log-hub.js +456 -0
- package/src/model/input-split.js +69 -0
- package/src/model/json-schema-host.js +9 -0
- package/src/model/json-schema.js +368 -0
- package/src/model/jth.js +78 -0
- package/src/model/latex-expr.js +528 -0
- package/src/model/layout-history.js +120 -0
- package/src/model/lazy-map.js +88 -0
- package/src/model/ledger-pane.js +101 -0
- package/src/model/legacy-viaframe.js +90 -0
- package/src/model/lessons.js +448 -0
- package/src/model/links.js +981 -0
- package/src/model/live.js +411 -0
- package/src/model/math-widget.js +53 -0
- package/src/model/memory-settings.js +33 -0
- package/src/model/midi-controls.js +350 -0
- package/src/model/nl-time.js +408 -0
- package/src/model/notebook.js +137 -0
- package/src/model/pane-view-store.js +15 -0
- package/src/model/partial.js +115 -0
- package/src/model/pause-clock.js +53 -0
- package/src/model/peer-pane.js +32 -0
- package/src/model/persist-state.js +290 -0
- package/src/model/person-only.js +122 -0
- package/src/model/pin.js +209 -0
- package/src/model/plot-3d.js +213 -0
- package/src/model/plot-series.js +157 -0
- package/src/model/plot-settings.js +531 -0
- package/src/model/ports.js +312 -0
- package/src/model/presentation.js +222 -0
- package/src/model/preset-apply.js +316 -0
- package/src/model/preset-banks.js +335 -0
- package/src/model/preset-morph.js +263 -0
- package/src/model/preset-ops.js +205 -0
- package/src/model/preset-player.js +283 -0
- package/src/model/preset-states.js +172 -0
- package/src/model/profile-settings.js +109 -0
- package/src/model/promote.js +103 -0
- package/src/model/protected.js +10 -0
- package/src/model/proxy-log.js +230 -0
- package/src/model/proxy.js +367 -0
- package/src/model/quantity-widget.js +61 -0
- package/src/model/queue-book.js +359 -0
- package/src/model/quick-add.js +224 -0
- package/src/model/rate-limit.js +313 -0
- package/src/model/rate.js +95 -0
- package/src/model/recovery.js +216 -0
- package/src/model/rename-follow.js +113 -0
- package/src/model/repeater.js +1126 -0
- package/src/model/retention.js +664 -0
- package/src/model/route-edit.js +132 -0
- package/src/model/router.js +155 -0
- package/src/model/runaway.js +232 -0
- package/src/model/runlog.js +1033 -0
- package/src/model/runners/a2a.js +2 -0
- package/src/model/runners/acp.js +2 -0
- package/src/model/runners/actions.js +4 -0
- package/src/model/runners/agent.js +4 -0
- package/src/model/runners/audio.js +21 -0
- package/src/model/runners/automation.js +2 -0
- package/src/model/runners/calc.js +23 -0
- package/src/model/runners/catch.js +10 -0
- package/src/model/runners/codec.js +24 -0
- package/src/model/runners/companion-run.js +2 -0
- package/src/model/runners/device.js +7 -0
- package/src/model/runners/dom.js +13 -0
- package/src/model/runners/effects.js +2 -0
- package/src/model/runners/embed.js +11 -0
- package/src/model/runners/eval.js +2 -0
- package/src/model/runners/files.js +19 -0
- package/src/model/runners/geometry.js +23 -0
- package/src/model/runners/goals.js +18 -0
- package/src/model/runners/graph.js +23 -0
- package/src/model/runners/html.js +2 -0
- package/src/model/runners/http-proxy.js +185 -0
- package/src/model/runners/http-send.js +61 -0
- package/src/model/runners/http-static.js +83 -0
- package/src/model/runners/http-tap.js +26 -0
- package/src/model/runners/http.js +40 -0
- package/src/model/runners/import.js +2 -0
- package/src/model/runners/index.js +74 -0
- package/src/model/runners/input.js +14 -0
- package/src/model/runners/inputlog.js +7 -0
- package/src/model/runners/ledger.js +15 -0
- package/src/model/runners/machine.js +4 -0
- package/src/model/runners/mcp.js +2 -0
- package/src/model/runners/mcpapp.js +2 -0
- package/src/model/runners/media.js +18 -0
- package/src/model/runners/memory.js +28 -0
- package/src/model/runners/mesh-inspect.js +13 -0
- package/src/model/runners/peer.js +14 -0
- package/src/model/runners/plot.js +22 -0
- package/src/model/runners/render.js +14 -0
- package/src/model/runners/respond.js +2 -0
- package/src/model/runners/sample-soundfont.js +85 -0
- package/src/model/runners/sample.js +159 -0
- package/src/model/runners/scene.js +8 -0
- package/src/model/runners/score.js +24 -0
- package/src/model/runners/secret.js +10 -0
- package/src/model/runners/select.js +2 -0
- package/src/model/runners/shared.js +4 -0
- package/src/model/runners/shares.js +15 -0
- package/src/model/runners/shell.js +7 -0
- package/src/model/runners/skill.js +26 -0
- package/src/model/runners/state.js +2 -0
- package/src/model/runners/statechart.js +4 -0
- package/src/model/runners/subgraph.js +9 -0
- package/src/model/runners/tabs.js +25 -0
- package/src/model/runners/terminal.js +5 -0
- package/src/model/runners/text.js +4 -0
- package/src/model/runners/timer.js +7 -0
- package/src/model/runners/traffic.js +65 -0
- package/src/model/runners/trigger.js +2 -0
- package/src/model/runners/verdict.js +29 -0
- package/src/model/runners/vm.js +7 -0
- package/src/model/runners/wait.js +4 -0
- package/src/model/runners/ws-client.js +57 -0
- package/src/model/safe-regex.js +719 -0
- package/src/model/sample-settings.js +43 -0
- package/src/model/sample-source.js +47 -0
- package/src/model/saved-mapping.js +153 -0
- package/src/model/score-controllers.js +87 -0
- package/src/model/score-edit.js +399 -0
- package/src/model/score-instruments.js +300 -0
- package/src/model/score-library.js +407 -0
- package/src/model/score-markup.js +235 -0
- package/src/model/score-mix.js +248 -0
- package/src/model/score-patterns.js +276 -0
- package/src/model/score-selection.js +34 -0
- package/src/model/score-time.js +139 -0
- package/src/model/score-transforms.js +336 -0
- package/src/model/score-transport.js +192 -0
- package/src/model/selection.js +351 -0
- package/src/model/serial-controls.js +328 -0
- package/src/model/shares-pane.js +17 -0
- package/src/model/shell-pane.js +106 -0
- package/src/model/signature.js +1122 -0
- package/src/model/size-hints.js +106 -0
- package/src/model/size-ratio.js +12 -0
- package/src/model/skill-settings.js +23 -0
- package/src/model/snapping.js +466 -0
- package/src/model/split.js +375 -0
- package/src/model/spring-player.js +222 -0
- package/src/model/statecharts.js +1369 -0
- package/src/model/states-preset.js +208 -0
- package/src/model/static-route.js +100 -0
- package/src/model/step-words.js +45 -0
- package/src/model/subgraph.js +1042 -0
- package/src/model/switch.js +98 -0
- package/src/model/tabs-store.js +10 -0
- package/src/model/tensor-view.js +146 -0
- package/src/model/timer-clock.js +361 -0
- package/src/model/timers.js +422 -0
- package/src/model/timing.js +212 -0
- package/src/model/traffic-agent.js +111 -0
- package/src/model/traffic-store.js +20 -0
- package/src/model/traffic.js +665 -0
- package/src/model/transport.js +364 -0
- package/src/model/turns.js +86 -0
- package/src/model/types.js +425 -0
- package/src/model/value-path.js +138 -0
- package/src/model/versions.js +535 -0
- package/src/model/view-outputs.js +144 -0
- package/src/model/viewport-bookmarks.js +194 -0
- package/src/model/virtual-clock.js +85 -0
- package/src/model/vm-pane.js +258 -0
- package/src/model/wait-clock.js +715 -0
- package/src/model/wait-persist.js +248 -0
- package/src/model/waits.js +431 -0
- package/src/model/watch.js +80 -0
- package/src/model/webhook.js +496 -0
- package/src/model/when.js +48 -0
- package/src/model/widget-values.js +392 -0
- package/src/model/window-commands.js +278 -0
- package/src/model/windows.js +348 -0
- package/src/model/wire-inspect.js +343 -0
- package/src/model/wire-ops.js +324 -0
- package/src/model/wire-pipeline.js +378 -0
- package/src/model/wire-route.js +637 -0
- package/src/model/workspaces.js +122 -0
- package/src/model/ws-client.js +155 -0
- package/src/model/ws-demo.js +31 -0
- package/src/model/ws-frames.js +141 -0
- package/src/model/ws-hub.js +219 -0
- package/src/model/ws-served.js +13 -0
- package/src/model/xstate.js +374 -0
- package/src/narrative/narrative.js +1557 -0
- package/src/network/auth.js +224 -0
- package/src/network/csp-frame.js +197 -0
- package/src/network/declarative-shadow.js +27 -0
- package/src/network/frame-net-shim.js +962 -0
- package/src/network/hosts.js +157 -0
- package/src/network/policy.js +520 -0
- package/src/network/rtc-shim.js +418 -0
- package/src/network/secret-gate.js +78 -0
- package/src/network/secrets.js +261 -0
- package/src/network/sockets.js +287 -0
- package/src/network/store.js +186 -0
- package/src/network/streams.js +99 -0
- package/src/packages/asset-values.js +50 -0
- package/src/packages/assets.js +99 -0
- package/src/packages/deprecation.js +203 -0
- package/src/packages/fetch.js +152 -0
- package/src/packages/function-canvas.js +73 -0
- package/src/packages/module.js +120 -0
- package/src/packages/package.js +474 -0
- package/src/packages/published.js +27 -0
- package/src/packages/requires.js +83 -0
- package/src/packages/signing.js +145 -0
- package/src/packages/trust.js +107 -0
- package/src/panes/a2a.js +51 -0
- package/src/panes/acp.js +60 -0
- package/src/panes/actions.js +54 -0
- package/src/panes/agent.js +83 -0
- package/src/panes/audio.js +103 -0
- package/src/panes/automation.js +112 -0
- package/src/panes/calc.js +67 -0
- package/src/panes/catch.js +52 -0
- package/src/panes/codec.js +59 -0
- package/src/panes/colors.js +12 -0
- package/src/panes/companion.js +54 -0
- package/src/panes/decision.js +65 -0
- package/src/panes/device.js +56 -0
- package/src/panes/dom.js +37 -0
- package/src/panes/effects.js +118 -0
- package/src/panes/embed.js +30 -0
- package/src/panes/eval.js +186 -0
- package/src/panes/fields.js +299 -0
- package/src/panes/files.js +45 -0
- package/src/panes/gate.js +70 -0
- package/src/panes/geometry.js +64 -0
- package/src/panes/goals.js +75 -0
- package/src/panes/graph.js +66 -0
- package/src/panes/html.js +54 -0
- package/src/panes/http.js +82 -0
- package/src/panes/import.js +38 -0
- package/src/panes/input.js +124 -0
- package/src/panes/inputlog.js +66 -0
- package/src/panes/ledger.js +56 -0
- package/src/panes/machine.js +138 -0
- package/src/panes/mcp.js +85 -0
- package/src/panes/mcpapp.js +64 -0
- package/src/panes/media.js +38 -0
- package/src/panes/memory.js +46 -0
- package/src/panes/mesh-inspect.js +49 -0
- package/src/panes/note.js +38 -0
- package/src/panes/peer.js +44 -0
- package/src/panes/plot.js +196 -0
- package/src/panes/registry.js +475 -0
- package/src/panes/render.js +87 -0
- package/src/panes/respond.js +44 -0
- package/src/panes/router.js +84 -0
- package/src/panes/sample.js +75 -0
- package/src/panes/scene.js +55 -0
- package/src/panes/score.js +87 -0
- package/src/panes/secret.js +38 -0
- package/src/panes/select.js +67 -0
- package/src/panes/shader.js +166 -0
- package/src/panes/shared.js +33 -0
- package/src/panes/shares.js +43 -0
- package/src/panes/shell.js +47 -0
- package/src/panes/skill.js +44 -0
- package/src/panes/state.js +91 -0
- package/src/panes/statechart.js +63 -0
- package/src/panes/story.js +33 -0
- package/src/panes/subgraph.js +94 -0
- package/src/panes/tabs.js +52 -0
- package/src/panes/terminal.js +57 -0
- package/src/panes/text.js +36 -0
- package/src/panes/timer.js +55 -0
- package/src/panes/traffic.js +59 -0
- package/src/panes/verdict.js +62 -0
- package/src/panes/vm.js +46 -0
- package/src/panes/wait.js +61 -0
- package/src/panes/watch.js +57 -0
- package/src/panes/webhook.js +67 -0
- package/src/panes/ws-client.js +67 -0
- package/src/persist.js +281 -0
- package/src/plot/tex.js +19 -0
- package/src/plot/vendor.js +59 -0
- package/src/plot/view-vendor.js +5 -0
- package/src/privacy/levels.js +108 -0
- package/src/protocol/devtools.js +116 -0
- package/src/protocol/inspector.js +368 -0
- package/src/render/time.js +381 -0
- package/src/rooms/mesh-metrics.js +162 -0
- package/src/run/companion.js +355 -0
- package/src/run/describe.js +114 -0
- package/src/run/local-model.js +150 -0
- package/src/run/monitor.js +208 -0
- package/src/run/publish.js +360 -0
- package/src/run/respond-outcome.js +12 -0
- package/src/run/run.js +820 -0
- package/src/run/runner-pairing.js +243 -0
- package/src/run/values.js +122 -0
- package/src/runtime/compile.js +122 -0
- package/src/runtime/console-tag.js +64 -0
- package/src/runtime/frame-signals.js +126 -0
- package/src/runtime/iteration-push.js +19 -0
- package/src/runtime/keys.js +474 -0
- package/src/runtime/midi-input.js +170 -0
- package/src/runtime/person-waits.js +140 -0
- package/src/runtime/resource-timing.js +56 -0
- package/src/runtime/runtime.js +2150 -0
- package/src/runtime/sandbox-modules.js +163 -0
- package/src/runtime/spring.js +246 -0
- package/src/runtime/strict.js +215 -0
- package/src/runtime/transfer.js +75 -0
- package/src/runtime/tween.js +158 -0
- package/src/runtime/wasm-fuel.js +596 -0
- package/src/runtime/worker/00-prelude.js +88 -0
- package/src/runtime/worker/10-helpers.js +295 -0
- package/src/runtime/worker/20-io.js +645 -0
- package/src/runtime/worker/30-previews.js +210 -0
- package/src/runtime/worker/40-profile-lineage.js +278 -0
- package/src/runtime/worker/50-own-worker.js +233 -0
- package/src/runtime/worker/60-timers.js +172 -0
- package/src/runtime/worker/70-state-keyed.js +193 -0
- package/src/runtime/worker/80-each-compile-generators.js +619 -0
- package/src/runtime/worker/90-events-operators.js +655 -0
- package/src/runtime/worker/95-agents-batches.js +1820 -0
- package/src/runtime/worker/96-plot.js +47 -0
- package/src/runtime/worker/97-calc.js +28 -0
- package/src/runtime/worker/98-geometry.js +24 -0
- package/src/runtime/worker/99-graph.js +30 -0
- package/src/runtime/worker/99-shell.js +30 -0
- package/src/safety/config.js +57 -0
- package/src/safety/engine.js +324 -0
- package/src/scene/pixi-scene.js +806 -0
- package/src/scene/scene-assets.js +241 -0
- package/src/scene/scene-edit.js +319 -0
- package/src/secret/settings.js +41 -0
- package/src/security/multipart.js +257 -0
- package/src/security/redact.js +261 -0
- package/src/serial/broker.js +473 -0
- package/src/serial/config.js +185 -0
- package/src/serial/framers.js +389 -0
- package/src/serial/packets.js +64 -0
- package/src/shader/audio-texture.js +87 -0
- package/src/shader/channels.js +496 -0
- package/src/shader/common.js +90 -0
- package/src/shader/model.js +867 -0
- package/src/shader/passes.js +150 -0
- package/src/shader/shadertoy.js +198 -0
- package/src/shell/hub.js +287 -0
- package/src/sim/checkpoints.js +850 -0
- package/src/sim/compile.js +37 -0
- package/src/sim/fixed.js +377 -0
- package/src/sim/headless.js +205 -0
- package/src/sim/physics.js +399 -0
- package/src/smf-helper/vendor.js +2 -0
- package/src/sources/config.js +435 -0
- package/src/storage.js +153 -0
- package/src/table/table-geo.js +2344 -0
- package/src/table/table-lineage.js +808 -0
- package/src/table/table-quality.js +355 -0
- package/src/table/table-schema.js +392 -0
- package/src/table/table-sql.js +1650 -0
- package/src/table/table-stats.js +480 -0
- package/src/table/table.js +2102 -0
- package/src/tensor/tensor.js +1153 -0
- package/src/terminal/hub.js +715 -0
- package/src/terminal/screen.js +516 -0
- package/src/tests/capture.js +88 -0
- package/src/tests/compare.js +480 -0
- package/src/tests/dataset.js +170 -0
- package/src/tests/evaluate.js +286 -0
- package/src/tests/from-runs.js +99 -0
- package/src/tests/judge.js +134 -0
- package/src/tests/matchers.js +263 -0
- package/src/tests/matrix-spec.js +87 -0
- package/src/tests/matrix.js +397 -0
- package/src/tests/metrics.js +369 -0
- package/src/tests/no-value.js +42 -0
- package/src/tests/pane-check.js +45 -0
- package/src/tests/report.js +124 -0
- package/src/tests/reporters.js +140 -0
- package/src/tests/run.js +155 -0
- package/src/tilemap/tilemap.js +1122 -0
- package/src/units/units.js +3 -0
- package/src/util/bytes-text.js +21 -0
- package/src/util/num.js +10 -0
- package/src/util/regexp.js +2 -0
- package/src/util/text.js +38 -0
- package/src/verdict/engine.js +154 -0
- package/src/vm/guest-wsh.js +108 -0
- package/src/vm/hub.js +457 -0
- package/src/vm/image-files.js +4 -0
- package/src/vm/image.js +33 -0
- package/src/vm/image.lock.json +13 -0
- package/src/vm/link.js +266 -0
- package/src/vm/mount.js +212 -0
- package/src/vm/net.js +85 -0
- package/src/vm/pipe-ws.js +187 -0
- package/src/vm/v86-loader.js +11 -0
- package/src/webmcp/args.js +212 -0
- package/src/webmcp/hidden.js +218 -0
- package/src/webmcp/text.js +250 -0
- package/src/webmcp/tools/bookmark-tools.js +106 -0
- package/src/webmcp/tools/breakpoint-tools.js +48 -0
- package/src/webmcp/tools/canvases.js +208 -0
- package/src/webmcp/tools/context-tools.js +84 -0
- package/src/webmcp/tools/core.js +170 -0
- package/src/webmcp/tools/devices.js +41 -0
- package/src/webmcp/tools/edit.js +357 -0
- package/src/webmcp/tools/event-tools.js +145 -0
- package/src/webmcp/tools/image-tools.js +173 -0
- package/src/webmcp/tools/ink-tools.js +247 -0
- package/src/webmcp/tools/input-log-tools.js +163 -0
- package/src/webmcp/tools/live.js +166 -0
- package/src/webmcp/tools/machine-tools.js +74 -0
- package/src/webmcp/tools/media.js +161 -0
- package/src/webmcp/tools/midi-tools.js +32 -0
- package/src/webmcp/tools/preset-tools.js +184 -0
- package/src/webmcp/tools/quick-add-tools.js +95 -0
- package/src/webmcp/tools/reshape.js +152 -0
- package/src/webmcp/tools/run-tools.js +309 -0
- package/src/webmcp/tools/runs.js +101 -0
- package/src/webmcp/tools/scaffold-tools.js +161 -0
- package/src/webmcp/tools/serial-tools.js +36 -0
- package/src/webmcp/tools/shared.js +338 -0
- package/src/webmcp/tools/subgraphs.js +360 -0
- package/src/webmcp/tools/tests.js +170 -0
- package/src/webmcp/tools/traffic-tools.js +70 -0
- package/src/webmcp/tools/transport-tools.js +65 -0
- package/src/webmcp/tools/version-tools.js +126 -0
- package/src/webmcp/tools/versions.js +11 -0
- package/src/webmcp/tools/wire-tools.js +90 -0
- package/src/webmcp/tools/workspace-tools.js +93 -0
- package/src/webmcp/tools.js +1323 -0
- package/src/wsh/connect.js +347 -0
- package/src/wsh/demo-host.js +361 -0
- package/src/wsh/e2e.js +27 -0
- package/src/wsh/keys.js +154 -0
- package/src/wsh/known-hosts.js +39 -0
- package/src/wsh/private-key.js +95 -0
- package/src/wsh/reverse.js +34 -0
- package/src/wsh/settings.js +118 -0
- package/src/wsh/transfer.js +62 -0
- package/src/wsh/vendor.js +5 -0
- package/src/x402/challenge.js +171 -0
- package/src/x402/demo-server.js +127 -0
- package/src/x402/pay.js +125 -0
- package/src/x402/retry.js +95 -0
- package/src/x402/store.js +76 -0
|
@@ -0,0 +1,418 @@
|
|
|
1
|
+
// WebRTC in a frame (#998). `connect-src` does not govern ICE servers or data channels, so a frame with `new RTCPeerConnection({ iceServers: [{ urls:
|
|
2
|
+
// "turn:attacker" }] })` could send data to a host no rule decided. No CSP directive stops it in the bundled Chromium (the `webrtc` directive is ignored),
|
|
3
|
+
// so a frame's bootstrap makes the constructors unavailable, before canvas code runs, and non-configurable so canvas code cannot put one back.
|
|
4
|
+
//
|
|
5
|
+
// What it covers: the frame itself; every child document the frame can make with a srcdoc (the property, setAttribute, setAttributeNS, attribute nodes,
|
|
6
|
+
// Attr.value, and every parser: innerHTML, outerHTML, insertAdjacentHTML, createContextualFragment, DOMParser, templates, document.write, shadow roots), by
|
|
7
|
+
// putting this same script first in the srcdoc (the setters do it at once; a MutationObserver does it in the microtask after an iframe or frame is
|
|
8
|
+
// connected, before its document loads); javascript: sources, rewritten to about:blank. The frame CSP covers the rest: data:, blob: and https: children
|
|
9
|
+
// (`frame-src`, which lists only hosts the canvas allows), <object> and <embed> (`object-src 'none'`). An about:blank child cannot be scripted by the
|
|
10
|
+
// frame (the sandbox makes it cross-origin), a popup is unavailable (no allow-popups), and a worker has no RTCPeerConnection.
|
|
11
|
+
//
|
|
12
|
+
// What it does not: a page from a host the person allowed (the host's own document), and any road we have not found. There is no browser switch for this:
|
|
13
|
+
// the `webrtc` CSP directive is ignored by the bundled Chromium 156 (measured) and Permissions-Policy has no WebRTC feature. Measured with a STUN stub per
|
|
14
|
+
// path (e2e/webrtc-frame.spec.mjs). Rooms and other WebRTC that a PERSON turns on run in the page, not in a frame, and are untouched.
|
|
15
|
+
//
|
|
16
|
+
// The shim is a function whose own source is the text a frame runs (`RTC_SHIM`) and the text it prepends to every child document it can see being made.
|
|
17
|
+
// Hooks and the constructors are non-configurable, so canvas code cannot undo them. See docs/design/traffic.md, "The doors that stay shut".
|
|
18
|
+
export const RTC_NAMES = Object.freeze(["RTCPeerConnection", "webkitRTCPeerConnection", "RTCDataChannel", "RTCIceTransport"]);
|
|
19
|
+
|
|
20
|
+
/* eslint-disable */
|
|
21
|
+
function malloryRtcShim(NAMES, NET) {
|
|
22
|
+
// NET: a function to run in this document as well, and to pass on to every child it makes (a frame's own network: src/network/frame-net-shim.js), or nothing.
|
|
23
|
+
"use strict";
|
|
24
|
+
const g = globalThis;
|
|
25
|
+
// Every built-in this shim relies on is captured here, at the start, as a function that takes `this` as its first argument (`uncurry`), because canvas
|
|
26
|
+
// code runs in this realm after the shim and can replace any prototype method, getter, iterator or `instanceof` behaviour. Nothing below looks one up
|
|
27
|
+
// by name again: no method call on a string, array, map, node, list or record; no for...of, spread, destructuring, regular expression or `instanceof`.
|
|
28
|
+
const call = Function.prototype.call;
|
|
29
|
+
const uncurry = call.bind.bind(call);
|
|
30
|
+
const defineProperty = Object.defineProperty;
|
|
31
|
+
const getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
32
|
+
const toStr = String;
|
|
33
|
+
const ITER = Symbol.iterator;
|
|
34
|
+
const TypeError_ = TypeError;
|
|
35
|
+
const slice = uncurry(String.prototype.slice);
|
|
36
|
+
const indexOf = uncurry(String.prototype.indexOf);
|
|
37
|
+
const lastIndexOf = uncurry(String.prototype.lastIndexOf);
|
|
38
|
+
const lower = uncurry(String.prototype.toLowerCase);
|
|
39
|
+
const charCode = uncurry(String.prototype.charCodeAt);
|
|
40
|
+
const def = (target, key, descriptor) => {
|
|
41
|
+
try {
|
|
42
|
+
descriptor.configurable = false;
|
|
43
|
+
defineProperty(target, key, descriptor);
|
|
44
|
+
} catch {}
|
|
45
|
+
};
|
|
46
|
+
for (let i = 0; i < NAMES.length; i++) def(g, NAMES[i], { __proto__: null, value: undefined, writable: false });
|
|
47
|
+
if (NET) NET();
|
|
48
|
+
if (typeof document === "undefined" || typeof HTMLIFrameElement === "undefined") return;
|
|
49
|
+
// Once per window: a frame is evaluated into again on every run, and a hardened child runs the same text.
|
|
50
|
+
if (g.__malloryRtcShim === true) return;
|
|
51
|
+
def(g, "__malloryRtcShim", { __proto__: null, value: true, writable: false });
|
|
52
|
+
const doc = document;
|
|
53
|
+
const method = (C, key) => uncurry(C.prototype[key]);
|
|
54
|
+
const getter = (C, key) => {
|
|
55
|
+
const d = C && C.prototype && getOwnPropertyDescriptor(C.prototype, key);
|
|
56
|
+
return d && d.get ? uncurry(d.get) : (o) => o[key];
|
|
57
|
+
};
|
|
58
|
+
// A list with an iterator of its own, for the places a WebIDL sequence is read through Symbol.iterator (Blob parts, an observer's attributeFilter): an ordinary array
|
|
59
|
+
// would be read through Array.prototype[Symbol.iterator] and %ArrayIteratorPrototype%.next, which canvas code can replace.
|
|
60
|
+
// Built with defineProperty, never by assigning an index or the iterator: an assignment on an array consults Array.prototype for an accessor on that
|
|
61
|
+
// key, which canvas code can define to swallow the write and leave the list empty (an observer then watches nothing).
|
|
62
|
+
const iterableOf = (items) => {
|
|
63
|
+
const it = [];
|
|
64
|
+
for (let i = 0; i < items.length; i++) defineProperty(it, i, { __proto__: null, value: items[i], writable: true, enumerable: true, configurable: true });
|
|
65
|
+
defineProperty(it, ITER, { __proto__: null, writable: true, configurable: true, value: () => {
|
|
66
|
+
let i = 0;
|
|
67
|
+
return { __proto__: null, next: () => (i < items.length ? { __proto__: null, done: false, value: items[i++] } : { __proto__: null, done: true, value: undefined }) };
|
|
68
|
+
} });
|
|
69
|
+
return it;
|
|
70
|
+
};
|
|
71
|
+
const REVERSED = "edomtoorwodahs"; // (written backwards and turned round when it runs: this script is itself written into documents, and a bundler would join pieces)
|
|
72
|
+
let TOKEN = "";
|
|
73
|
+
for (let i = REVERSED.length - 1; i >= 0; i--) TOKEN += slice(REVERSED, i, i + 1);
|
|
74
|
+
// A closed shadow root a parser makes cannot be found from script, so a child's own markup never asks a parser for one: the attribute name's last letter is
|
|
75
|
+
// replaced, wherever and however it is cased (src/network/declarative-shadow.js is the same rule for the pages mallory serves).
|
|
76
|
+
const defuse = (text) => {
|
|
77
|
+
const last = TOKEN.length - 1;
|
|
78
|
+
let out = null;
|
|
79
|
+
let from = 0;
|
|
80
|
+
for (let i = 0; i + TOKEN.length <= text.length; i++) {
|
|
81
|
+
let k = 0;
|
|
82
|
+
while (k < TOKEN.length) {
|
|
83
|
+
const c = charCode(text, i + k);
|
|
84
|
+
const t = charCode(TOKEN, k);
|
|
85
|
+
if (c !== t && c !== t - 32) break;
|
|
86
|
+
k++;
|
|
87
|
+
}
|
|
88
|
+
if (k === TOKEN.length) {
|
|
89
|
+
out = (out === null ? "" : out) + slice(text, from, i + last) + "_";
|
|
90
|
+
from = i + TOKEN.length;
|
|
91
|
+
i += last;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return out === null ? text : out + slice(text, from);
|
|
95
|
+
};
|
|
96
|
+
const MARK = "/*mallory-rtc*/";
|
|
97
|
+
const TAG = "<script>" + MARK + "(" + malloryRtcShim.toString().replace(/<\/script/gi, "<\\/script") + ")(" + JSON.stringify(NAMES) + (NET ? "," + NET.toString().replace(/<\/script/gi, "<\\/script") : "") + ");<" + "/script>";
|
|
98
|
+
const TAGLEN = TAG.length;
|
|
99
|
+
// Where a child's first script goes: right after a leading doctype (so the child keeps its mode), skipping whitespace and comments before it; at the start
|
|
100
|
+
// when there is none. By the tokenizer's own rules, with no regular expression.
|
|
101
|
+
const isSpace = (c) => c === 9 || c === 10 || c === 12 || c === 13 || c === 32;
|
|
102
|
+
const startOf = (text) => {
|
|
103
|
+
const n = text.length;
|
|
104
|
+
let i = 0;
|
|
105
|
+
for (;;) {
|
|
106
|
+
while (i < n && isSpace(charCode(text, i))) i++;
|
|
107
|
+
if (charCode(text, i) === 60 && charCode(text, i + 1) === 33 && charCode(text, i + 2) === 45 && charCode(text, i + 3) === 45) {
|
|
108
|
+
const j = i + 4;
|
|
109
|
+
if (charCode(text, j) === 62) { i = j + 1; continue; } // <!-->
|
|
110
|
+
if (charCode(text, j) === 45 && charCode(text, j + 1) === 62) { i = j + 2; continue; } // <!--->
|
|
111
|
+
let k = j;
|
|
112
|
+
for (;;) {
|
|
113
|
+
k = indexOf(text, "--", k);
|
|
114
|
+
if (k < 0) return 0; // never closed: the rest is a comment
|
|
115
|
+
if (charCode(text, k + 2) === 62) { i = k + 3; break; }
|
|
116
|
+
if (charCode(text, k + 2) === 33 && charCode(text, k + 3) === 62) { i = k + 4; break; }
|
|
117
|
+
k++;
|
|
118
|
+
}
|
|
119
|
+
continue;
|
|
120
|
+
}
|
|
121
|
+
// A bogus comment (`<?xml ...?>`, `<![CDATA[...]]>`, `<!x>`, `</ x>`) runs to the next `>` and is a comment to the tokenizer; `</>` is dropped.
|
|
122
|
+
if (charCode(text, i) === 60) {
|
|
123
|
+
const c1 = charCode(text, i + 1);
|
|
124
|
+
const c2 = charCode(text, i + 2);
|
|
125
|
+
if (c1 === 47 && c2 === 62) { i += 3; continue; }
|
|
126
|
+
const alpha = (c2 >= 65 && c2 <= 90) || (c2 >= 97 && c2 <= 122);
|
|
127
|
+
if (c1 === 63 || (c1 === 33 && lower(slice(text, i + 2, i + 9)) !== "doctype") || (c1 === 47 && !alpha)) {
|
|
128
|
+
const end = indexOf(text, ">", i);
|
|
129
|
+
if (end < 0) return 0; // never closed: the rest is a comment
|
|
130
|
+
i = end + 1;
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
break;
|
|
135
|
+
}
|
|
136
|
+
if (charCode(text, i) === 60 && charCode(text, i + 1) === 33 && lower(slice(text, i + 2, i + 9)) === "doctype") {
|
|
137
|
+
const end = indexOf(text, ">", i);
|
|
138
|
+
return end < 0 ? 0 : end + 1;
|
|
139
|
+
}
|
|
140
|
+
return 0;
|
|
141
|
+
};
|
|
142
|
+
// Hardened means the exact shim script comes first (after a doctype): a document that merely mentions the marker is not.
|
|
143
|
+
const done = (text, at) => slice(text, at, at + TAGLEN) === TAG;
|
|
144
|
+
const harden = (value) => {
|
|
145
|
+
const text = defuse(toStr(value)); // once: the native setter gets this string, never the object again
|
|
146
|
+
const at = startOf(text);
|
|
147
|
+
return done(text, at) ? text : slice(text, 0, at) + TAG + slice(text, at);
|
|
148
|
+
};
|
|
149
|
+
// With a network function (a frame whose children get the frame's own network), every child iframe is sandboxed without `allow-same-origin`, so it is on an
|
|
150
|
+
// origin of its own and can't reach this window (`parent.fetch`, the frame's connection): it asks for its network over a port, where what it sends is marked
|
|
151
|
+
// as a child's. A child with no sandbox attribute would inherit this frame's flags (scripts, an opaque origin); it is given exactly those. A child's own
|
|
152
|
+
// flags are kept otherwise. Done before any navigation the frame can start (the setters above and below, the parsers' backstop).
|
|
153
|
+
const SAME_ORIGIN = "allow-same-origin";
|
|
154
|
+
const dropSameOrigin = (text) => {
|
|
155
|
+
let out = "";
|
|
156
|
+
let i = 0;
|
|
157
|
+
const n = text.length;
|
|
158
|
+
while (i < n) {
|
|
159
|
+
while (i < n && isSpace(charCode(text, i))) i++;
|
|
160
|
+
let j = i;
|
|
161
|
+
while (j < n && !isSpace(charCode(text, j))) j++;
|
|
162
|
+
if (j > i) {
|
|
163
|
+
const token = slice(text, i, j);
|
|
164
|
+
if (lower(token) !== SAME_ORIGIN) out = out === "" ? token : out + " " + token;
|
|
165
|
+
}
|
|
166
|
+
i = j;
|
|
167
|
+
}
|
|
168
|
+
return out;
|
|
169
|
+
};
|
|
170
|
+
const forceSandbox = (el) => {
|
|
171
|
+
const current = getAttribute(el, "sandbox");
|
|
172
|
+
if (current === null) setAttribute(el, "sandbox", "allow-scripts");
|
|
173
|
+
else {
|
|
174
|
+
const fixed = dropSameOrigin(current);
|
|
175
|
+
if (fixed !== current) setAttribute(el, "sandbox", fixed);
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
const proto = HTMLIFrameElement.prototype;
|
|
179
|
+
const native = getOwnPropertyDescriptor(proto, "srcdoc");
|
|
180
|
+
const srcdocGet = uncurry(native.get);
|
|
181
|
+
const srcdocSet = uncurry(native.set);
|
|
182
|
+
const localName = getter(Element, "localName");
|
|
183
|
+
// Brand checks by calling a native accessor (it throws for anything else): `instanceof` consults Symbol.hasInstance, which canvas code can define.
|
|
184
|
+
const brand = (get, name) => (el) => {
|
|
185
|
+
try {
|
|
186
|
+
get(el);
|
|
187
|
+
return localName(el) === name;
|
|
188
|
+
} catch {
|
|
189
|
+
return false;
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
const isFrame = brand(srcdocGet, "iframe");
|
|
193
|
+
const frameSrc = typeof HTMLFrameElement !== "undefined" ? getOwnPropertyDescriptor(HTMLFrameElement.prototype, "src") : null;
|
|
194
|
+
const isOldFrame = frameSrc && frameSrc.get ? brand(uncurry(frameSrc.get), "frame") : () => false; // (a <frame> has no srcdoc, but it has a src)
|
|
195
|
+
const isAnyFrame = (el) => isFrame(el) || isOldFrame(el);
|
|
196
|
+
def(proto, "srcdoc", {
|
|
197
|
+
__proto__: null,
|
|
198
|
+
enumerable: native.enumerable,
|
|
199
|
+
get() {
|
|
200
|
+
const text = srcdocGet(this);
|
|
201
|
+
const at = startOf(text);
|
|
202
|
+
return done(text, at) ? slice(text, 0, at) + slice(text, at + TAGLEN) : text;
|
|
203
|
+
},
|
|
204
|
+
set(v) {
|
|
205
|
+
if (NET) forceSandbox(this);
|
|
206
|
+
srcdocSet(this, harden(v));
|
|
207
|
+
},
|
|
208
|
+
});
|
|
209
|
+
// A URL the way the parser reads it: ASCII tab and newlines removed anywhere, leading and trailing control characters and spaces removed. `javascript:` and
|
|
210
|
+
// `blob:` are recognised after that, so `java<TAB>script:` and ` blob:` are not missed.
|
|
211
|
+
const clean = (text, limit) => {
|
|
212
|
+
let out = "";
|
|
213
|
+
let begun = false;
|
|
214
|
+
let last = 0;
|
|
215
|
+
for (let i = 0; i < text.length && out.length < limit; i++) {
|
|
216
|
+
const c = charCode(text, i);
|
|
217
|
+
if (c === 9 || c === 10 || c === 13) continue;
|
|
218
|
+
if (!begun && c <= 32) continue;
|
|
219
|
+
begun = true;
|
|
220
|
+
out += slice(text, i, i + 1);
|
|
221
|
+
if (c > 32) last = out.length;
|
|
222
|
+
}
|
|
223
|
+
return slice(out, 0, last);
|
|
224
|
+
};
|
|
225
|
+
const startsWithScheme = (url, scheme) => lower(slice(url, 0, scheme.length)) === scheme;
|
|
226
|
+
// A blob: document the frame's own script makes (new Blob([html], { type: "text/html" }) and createObjectURL) is shown with the shim first; a script-capable
|
|
227
|
+
// non-HTML type (svg, xml) is not shown in a frame at all. Blob URLs this window did not make (a site's own files, made before the page ran, already
|
|
228
|
+
// carry the shim in their bytes) are left alone.
|
|
229
|
+
const MapC = Map;
|
|
230
|
+
const mapGet = method(Map, "get");
|
|
231
|
+
const mapSet = method(Map, "set");
|
|
232
|
+
const mapHas = method(Map, "has");
|
|
233
|
+
const BlobC = typeof Blob !== "undefined" ? Blob : null;
|
|
234
|
+
const blobType = BlobC ? getter(Blob, "type") : null;
|
|
235
|
+
const isBlob = (o) => {
|
|
236
|
+
try {
|
|
237
|
+
blobType(o);
|
|
238
|
+
return typeof o === "object";
|
|
239
|
+
} catch {
|
|
240
|
+
return false;
|
|
241
|
+
}
|
|
242
|
+
};
|
|
243
|
+
const made = new MapC();
|
|
244
|
+
const shown = new MapC();
|
|
245
|
+
const createObjectURL = URL.createObjectURL; // a static operation: no `this` needed
|
|
246
|
+
def(URL, "createObjectURL", { __proto__: null, writable: false, value: function createObjectURL_(object) {
|
|
247
|
+
const url = createObjectURL(object);
|
|
248
|
+
if (isBlob(object)) mapSet(made, url, object);
|
|
249
|
+
return url;
|
|
250
|
+
} });
|
|
251
|
+
// A blob: URL is shown only if this window made it from an HTML blob (then the shim goes first); any other blob: URL (a worker's, another document's, one
|
|
252
|
+
// made before the shim ran, an svg or xml or non-html type) is about:blank. The scheme is matched case-insensitively and the key is rebuilt in the
|
|
253
|
+
// canonical lower case, because the table is keyed by what createObjectURL returned.
|
|
254
|
+
const source = (value) => {
|
|
255
|
+
const raw = toStr(value);
|
|
256
|
+
const head = clean(raw, 12);
|
|
257
|
+
if (startsWithScheme(head, "javascript:")) return "about:blank";
|
|
258
|
+
if (!startsWithScheme(head, "blob:")) return raw;
|
|
259
|
+
const text = clean(raw, raw.length + 1);
|
|
260
|
+
const hash = indexOf(text, "#");
|
|
261
|
+
const whole = "blob:" + slice(text, 5);
|
|
262
|
+
const key = hash < 0 ? whole : slice(whole, 0, hash); // a fragment does not change which blob it is
|
|
263
|
+
if (!mapHas(made, key)) return "about:blank";
|
|
264
|
+
const blob = mapGet(made, key);
|
|
265
|
+
const type = lower(toStr(blobType(blob)));
|
|
266
|
+
if (indexOf(type, "html") < 0 || indexOf(type, "svg") >= 0 || indexOf(type, "xml") >= 0) return "about:blank";
|
|
267
|
+
if (!mapHas(shown, key)) mapSet(shown, key, createObjectURL(new BlobC(iterableOf([TAG, blob]), { __proto__: null, type })));
|
|
268
|
+
return mapGet(shown, key);
|
|
269
|
+
};
|
|
270
|
+
const setAttribute = method(Element, "setAttribute");
|
|
271
|
+
def(Element.prototype, "setAttribute", { __proto__: null, writable: false, value: function setAttribute_(name, value) {
|
|
272
|
+
if (isAnyFrame(this)) {
|
|
273
|
+
name = toStr(name); // once: a name whose toString changes between calls must not decide one thing here and another in the native
|
|
274
|
+
const key = lower(name);
|
|
275
|
+
if (key === "srcdoc" && isFrame(this)) (NET && forceSandbox(this), (value = harden(value)));
|
|
276
|
+
else if (key === "src") (NET && isFrame(this) && forceSandbox(this), (value = source(value)));
|
|
277
|
+
else if (key === "sandbox" && NET && isFrame(this)) value = dropSameOrigin(toStr(value));
|
|
278
|
+
}
|
|
279
|
+
return setAttribute(this, name, value);
|
|
280
|
+
} });
|
|
281
|
+
const setAttributeNS = method(Element, "setAttributeNS");
|
|
282
|
+
def(Element.prototype, "setAttributeNS", { __proto__: null, writable: false, value: function setAttributeNS_(ns, name, value) {
|
|
283
|
+
if (isAnyFrame(this)) {
|
|
284
|
+
name = toStr(name);
|
|
285
|
+
const key = lower(slice(name, lastIndexOf(name, ":") + 1));
|
|
286
|
+
if (key === "srcdoc" && isFrame(this)) (NET && forceSandbox(this), (value = harden(value)));
|
|
287
|
+
else if (key === "src") (NET && isFrame(this) && forceSandbox(this), (value = source(value)));
|
|
288
|
+
else if (key === "sandbox" && NET && isFrame(this)) value = dropSameOrigin(toStr(value));
|
|
289
|
+
}
|
|
290
|
+
return setAttributeNS(this, ns, name, value);
|
|
291
|
+
} });
|
|
292
|
+
for (let i = 0; i < 2; i++) {
|
|
293
|
+
const P = i === 0 ? proto : typeof HTMLFrameElement !== "undefined" ? HTMLFrameElement.prototype : null;
|
|
294
|
+
const srcNative = P && getOwnPropertyDescriptor(P, "src");
|
|
295
|
+
if (srcNative && srcNative.set) {
|
|
296
|
+
const set = uncurry(srcNative.set);
|
|
297
|
+
def(P, "src", { __proto__: null, enumerable: srcNative.enumerable, get: srcNative.get, set(v) { if (NET && i === 0) forceSandbox(this); set(this, source(v)); } });
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
// The backstop: an iframe that arrives by any other road (innerHTML, insertAdjacentHTML, document.write, a node from DOMParser or a template, an
|
|
301
|
+
// attribute node, Attr.value, a declarative shadow root the page's own markup made) is fixed in the microtask after it is connected, before its document is
|
|
302
|
+
// loaded.
|
|
303
|
+
const getAttribute = method(Element, "getAttribute");
|
|
304
|
+
const fix = (el) => {
|
|
305
|
+
if (!isAnyFrame(el)) return;
|
|
306
|
+
if (NET && isFrame(el)) forceSandbox(el);
|
|
307
|
+
const text = isFrame(el) ? getAttribute(el, "srcdoc") : null;
|
|
308
|
+
if (text !== null && !done(text, startOf(text))) srcdocSet(el, harden(text));
|
|
309
|
+
const src = getAttribute(el, "src");
|
|
310
|
+
if (src !== null) {
|
|
311
|
+
const fixed = source(src);
|
|
312
|
+
if (fixed !== src) setAttribute(el, "src", fixed);
|
|
313
|
+
}
|
|
314
|
+
};
|
|
315
|
+
const nodeType = getter(Node, "nodeType");
|
|
316
|
+
const shadowOf = getter(Element, "shadowRoot");
|
|
317
|
+
const listLength = getter(NodeList, "length");
|
|
318
|
+
const listItem = method(NodeList, "item");
|
|
319
|
+
const queryAll = { __proto__: null, 1: method(Element, "querySelectorAll"), 9: method(Document, "querySelectorAll"), 11: method(DocumentFragment, "querySelectorAll") };
|
|
320
|
+
const recordType = getter(MutationRecord, "type");
|
|
321
|
+
const recordTarget = getter(MutationRecord, "target");
|
|
322
|
+
const recordAdded = getter(MutationRecord, "addedNodes");
|
|
323
|
+
const WatchedSet = WeakSet;
|
|
324
|
+
const setHas = method(WeakSet, "has");
|
|
325
|
+
const setAdd = method(WeakSet, "add");
|
|
326
|
+
const watched = new WatchedSet();
|
|
327
|
+
const observe = method(MutationObserver, "observe");
|
|
328
|
+
// Every iframe under a node, and every shadow root found under it (open ones, however they were made: attachShadow, a declarative shadow root the page's own
|
|
329
|
+
// markup made, a clone) is watched in turn. A closed root made by a parser cannot be found from script; the roads that make one are closed instead (below).
|
|
330
|
+
const visit = (el) => {
|
|
331
|
+
fix(el);
|
|
332
|
+
const root = shadowOf(el);
|
|
333
|
+
if (root) watchRoot(root);
|
|
334
|
+
};
|
|
335
|
+
const scan = (node) => {
|
|
336
|
+
const type = nodeType(node);
|
|
337
|
+
if (type !== 1 && type !== 9 && type !== 11) return;
|
|
338
|
+
if (type === 1) visit(node);
|
|
339
|
+
const all = queryAll[type](node, "*");
|
|
340
|
+
for (let i = 0, n = listLength(all); i < n; i++) visit(listItem(all, i));
|
|
341
|
+
};
|
|
342
|
+
const observer = new MutationObserver((records) => {
|
|
343
|
+
for (let i = 0; i < records.length; i++) {
|
|
344
|
+
const r = records[i];
|
|
345
|
+
if (recordType(r) === "attributes") fix(recordTarget(r));
|
|
346
|
+
else {
|
|
347
|
+
const added = recordAdded(r);
|
|
348
|
+
for (let j = 0, n = listLength(added); j < n; j++) scan(listItem(added, j));
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
});
|
|
352
|
+
const OPTIONS = () => ({ __proto__: null, childList: true, subtree: true, attributes: true, attributeFilter: iterableOf(["srcdoc", "src", "sandbox"]) });
|
|
353
|
+
function watchRoot(root) {
|
|
354
|
+
if (setHas(watched, root)) return;
|
|
355
|
+
setAdd(watched, root);
|
|
356
|
+
observe(observer, root, OPTIONS());
|
|
357
|
+
scan(root);
|
|
358
|
+
}
|
|
359
|
+
watchRoot(doc);
|
|
360
|
+
const attachShadow = method(Element, "attachShadow");
|
|
361
|
+
def(Element.prototype, "attachShadow", { __proto__: null, writable: false, value: function attachShadow_(init) {
|
|
362
|
+
// A clonable root would give a clone a root nobody told us about (a closed one could not be found), so it is never clonable.
|
|
363
|
+
const root = attachShadow(this, { __proto__: null, mode: init.mode, delegatesFocus: init.delegatesFocus, slotAssignment: init.slotAssignment, serializable: init.serializable, clonable: false });
|
|
364
|
+
watchRoot(root);
|
|
365
|
+
return root;
|
|
366
|
+
} });
|
|
367
|
+
// Declarative shadow DOM is made by a parser, and the page cannot find a closed root it made. So a child's own markup never asks for one (`defuse`, above),
|
|
368
|
+
// and the script roads that turn it on (setHTMLUnsafe on an element or a shadow root, Document.parseHTMLUnsafe) parse as innerHTML and DOMParser do, which
|
|
369
|
+
// never make one: a declarative template stays a plain template. Document.write cannot be given another parser, so a write that would complete the
|
|
370
|
+
// attribute name of a declarative shadow root (even split across writes) is refused.
|
|
371
|
+
const innerHTMLSet = uncurry(getOwnPropertyDescriptor(Element.prototype, "innerHTML").set);
|
|
372
|
+
if (typeof Element.prototype.setHTMLUnsafe === "function") def(Element.prototype, "setHTMLUnsafe", { __proto__: null, writable: false, value: function setHTMLUnsafe(html) { innerHTMLSet(this, html); } });
|
|
373
|
+
if (typeof ShadowRoot !== "undefined" && typeof ShadowRoot.prototype.setHTMLUnsafe === "function") {
|
|
374
|
+
const shadowInnerHTML = getOwnPropertyDescriptor(ShadowRoot.prototype, "innerHTML");
|
|
375
|
+
if (shadowInnerHTML && shadowInnerHTML.set) {
|
|
376
|
+
const set = uncurry(shadowInnerHTML.set);
|
|
377
|
+
def(ShadowRoot.prototype, "setHTMLUnsafe", { __proto__: null, writable: false, value: function setHTMLUnsafe(html) { set(this, html); } });
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
if (typeof Document.parseHTMLUnsafe === "function") {
|
|
381
|
+
const Parser = DOMParser;
|
|
382
|
+
const parse = method(DOMParser, "parseFromString");
|
|
383
|
+
def(Document, "parseHTMLUnsafe", { __proto__: null, writable: false, value: function parseHTMLUnsafe(html) { return parse(new Parser(), html, "text/html"); } });
|
|
384
|
+
}
|
|
385
|
+
const tails = new WeakMap();
|
|
386
|
+
const tailGet = method(WeakMap, "get");
|
|
387
|
+
const tailSet = method(WeakMap, "set");
|
|
388
|
+
const guardWrite = (nativeWrite) => {
|
|
389
|
+
const write = uncurry(nativeWrite);
|
|
390
|
+
return function write_(a) {
|
|
391
|
+
let text = "";
|
|
392
|
+
for (let i = 0; i < arguments.length; i++) text += toStr(arguments[i]);
|
|
393
|
+
const before = tailGet(tails, this);
|
|
394
|
+
const all = (before === undefined ? "" : before) + text;
|
|
395
|
+
const from = all.length - (TOKEN.length - 1);
|
|
396
|
+
tailSet(tails, this, from > 0 ? slice(all, from) : all);
|
|
397
|
+
if (indexOf(lower(all), TOKEN) >= 0) throw new TypeError_("declarative shadow DOM is not available in a frame");
|
|
398
|
+
return write(this, text);
|
|
399
|
+
};
|
|
400
|
+
};
|
|
401
|
+
def(Document.prototype, "write", { __proto__: null, writable: false, value: guardWrite(Document.prototype.write) });
|
|
402
|
+
def(Document.prototype, "writeln", { __proto__: null, writable: false, value: guardWrite(Document.prototype.writeln) });
|
|
403
|
+
}
|
|
404
|
+
/* eslint-enable */
|
|
405
|
+
|
|
406
|
+
export const RTC_SHIM = `(${malloryRtcShim.toString()})(${JSON.stringify(RTC_NAMES)});\n`;
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* The same shim for a frame whose children also get a network of their own (src/network/frame-net-shim.js): `net` is the text of a function expression that runs
|
|
410
|
+
* in this document and is handed on to every child document along with the shim. `RTC_SHIM` (no `net`) is what a folder site's pages carry.
|
|
411
|
+
*/
|
|
412
|
+
export function rtcShimWith(net) {
|
|
413
|
+
if (/<\/script/i.test(net) || !/^function\s*\(/.test(net)) throw new TypeError("rtcShimWith: a function expression with no closing script tag in it");
|
|
414
|
+
return `(${malloryRtcShim.toString()})(${JSON.stringify(RTC_NAMES)},${net});\n`;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
/** The shim as a script element, for the head of an html page a site serves (src/files/pack.js, src/files/sandbox-origin.js). */
|
|
418
|
+
export const RTC_SHIM_ELEMENT = `<script>${RTC_SHIM}</script>`;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
// The seam between the API-key store (store.js) and the key vault (src/vault/). The store imports only this file, so
|
|
2
|
+
// the vault's code stays out of everything that reaches the store (the WebMCP tools and the sandbox sources among
|
|
3
|
+
// them: test/vault-isolation.test.mjs). The app installs the gate once at start (src/vault/install.js).
|
|
4
|
+
//
|
|
5
|
+
// A gate is `{ active(): boolean, locked(): boolean, read(): Secret[], write(list): void }`. While it is active (a vault exists, or the
|
|
6
|
+
// browser hasn't said yet) the store reads and writes ONLY through it, and `read`/`write` throw a "vault-locked"
|
|
7
|
+
// error when the vault is locked: there is no fall back to the plaintext entry. With no gate, or an inactive one
|
|
8
|
+
// (no vault was ever set up), the store keeps its old localStorage behaviour.
|
|
9
|
+
//
|
|
10
|
+
// The same gate carries the variables (src/env/store.js) as `readEnv(): { global, canvas }` and `writeEnv(value)`, under
|
|
11
|
+
// the same rules (#830): a gate without them leaves variables in localStorage.
|
|
12
|
+
//
|
|
13
|
+
// And the OAuth connections (src/oauth/, wave A-4) as `readOAuth(): { connections }` and `writeOAuth(value)`: refresh tokens,
|
|
14
|
+
// client secrets and where each login goes. Unlike the variables there is NO localStorage fallback: with no vault set up,
|
|
15
|
+
// OAuth is refused (tokens live only in the vault), and a locked vault refuses like it does for keys.
|
|
16
|
+
|
|
17
|
+
let installed = null;
|
|
18
|
+
const listeners = new Set();
|
|
19
|
+
|
|
20
|
+
export const VAULT_LOCKED = "vault-locked";
|
|
21
|
+
|
|
22
|
+
/** Is `error` the key vault refusing because it is locked? */
|
|
23
|
+
export const isVaultLocked = (error) => error?.code === VAULT_LOCKED;
|
|
24
|
+
|
|
25
|
+
/** Install the gate (the app, once). Returns a function that removes it (tests). */
|
|
26
|
+
export function installSecretGate(gate) {
|
|
27
|
+
installed = gate;
|
|
28
|
+
for (const fn of [...listeners]) fn();
|
|
29
|
+
return () => {
|
|
30
|
+
if (installed === gate) installed = null;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** The gate, when one is installed and active, else null. */
|
|
35
|
+
export const activeSecretGate = () => (installed?.active() ? installed : null);
|
|
36
|
+
|
|
37
|
+
/** The gate when it also carries the variables (see above), else null. */
|
|
38
|
+
export const activeEnvGate = () => {
|
|
39
|
+
const g = activeSecretGate();
|
|
40
|
+
return g?.readEnv && g.writeEnv ? g : null;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/** The gate when it also carries the OAuth connections, else null (OAuth is then refused: it has no plaintext home). */
|
|
44
|
+
export const activeOAuthGate = () => {
|
|
45
|
+
const g = activeSecretGate();
|
|
46
|
+
return g?.readOAuth && g.writeOAuth ? g : null;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
// The one hook that keeps an OAuth login's access token fresh. The app installs it at start (src/oauth/install.js); the
|
|
50
|
+
// MCP hub calls `refreshSecret(name)` before it connects with a key of that name, and again (forced) after a 401. It
|
|
51
|
+
// resolves true when it replaced the stored token, and never returns a token: the hub learns only "fresh or not".
|
|
52
|
+
let refresher = null;
|
|
53
|
+
export function installSecretRefresher(fn) {
|
|
54
|
+
refresher = fn;
|
|
55
|
+
return () => {
|
|
56
|
+
if (refresher === fn) refresher = null;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
export async function refreshSecret(name, options = {}) {
|
|
60
|
+
return refresher ? Boolean(await refresher(String(name ?? ""), options)) : false;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/** Is a vault installed and set up (or not yet known)? The settings notice reads this. */
|
|
64
|
+
export const secretsAreVaulted = () => Boolean(activeSecretGate());
|
|
65
|
+
|
|
66
|
+
/** Is the key vault set up (or unknown) and not unlocked? Keys are refused then; the UI says why instead of "none". */
|
|
67
|
+
export const secretsLocked = () => Boolean(activeSecretGate()?.locked?.());
|
|
68
|
+
|
|
69
|
+
/** `fn` runs when the gate changes (installed; the vault locked, unlocked or saved). */
|
|
70
|
+
export function onSecretGateChange(fn) {
|
|
71
|
+
listeners.add(fn);
|
|
72
|
+
return () => listeners.delete(fn);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/** Tell the store's listeners that the gate changed (the vault calls this through the gate it installed). */
|
|
76
|
+
export function notifySecretGate() {
|
|
77
|
+
for (const fn of [...listeners]) fn();
|
|
78
|
+
}
|