244 Commits
Author SHA1 Message Date
ldm0 c779e72373 docs(fetch): correct default timeout 2026-08-22 15:41:16 +08:00
ldm0 0c3a4068bf docs(playground): explain the ChatGPT login bridge 2026-08-22 15:22:06 +08:00
ldm0 37ddcd6952 feat(playground): persist ChatGPT login through Moli 2026-08-22 15:22:06 +08:00
ldm0 194698bd6a fix(playground): harden ChatGPT password form detection 2026-08-22 15:22:06 +08:00
ldm0 8441f9a7d8 feat(cli): split response waits into literal and regex modes 2026-08-22 03:20:24 +08:00
ldm0 ca4f01f6a2 refactor(fetch): drop unused wait criteria equality 2026-08-22 03:20:24 +08:00
ldm0 e7a8a709ef refactor(cli): encapsulate response body regex 2026-08-22 03:20:24 +08:00
ldm0 cba58e3aba refactor(fetch): name response body regex explicitly 2026-08-22 03:20:24 +08:00
ldm0 420cbdcf5d test(cli): cover response body regex end to end 2026-08-22 03:20:24 +08:00
ldm0 3212b02cac fix(renderer): bind WebStorage to receiver window 2026-08-22 03:15:32 +08:00
ldm0 97f72b88d6 test(protocol): select binding event by execution context 2026-08-22 02:08:32 +08:00
ldm0 b70555cb4a fix(renderer): keep child modulepreload from delaying load 2026-08-22 02:08:32 +08:00
ldm0 d0fdcf8fff fix(renderer): classify modulepreload admission by relation 2026-08-22 02:08:32 +08:00
ldm0 8d82acf953 fix(renderer): keep modulepreload from delaying load
Use a synchronous prepare/commit/apply boundary for connected stylesheet lifecycle authority, so DocumentRuntime no longer acquires it through raw ContextHost pointers. Keep modulepreload network fetches identity-only and publish terminal link events without a Document load-delay lease.
2026-08-22 02:08:32 +08:00
ldm0 494ed8356a feat(cli): add dcl wait alias 2026-08-21 22:14:32 +08:00
ldm0 6aa0f4818f fix(cli): trim ambiguous short flags 2026-08-21 22:14:32 +08:00
ldm0 baadb4f734 fix(cli): stop inferring subcommands from flags 2026-08-21 22:14:32 +08:00
ldm0 3b555523ab test(ci): run complete protocol smoke suites by default 2026-08-21 22:14:01 +08:00
ldm0 2fe9e2ad9a fix(devtools): preserve nested Main response order 2026-08-21 20:10:15 +08:00
BibekPathak cf78d14909 fix(cli): error on invalid --wait-response-body regex 2026-08-21 19:38:13 +08:00
ldm0 9454318cdd refactor(service-worker): bind work to exact run owners 2026-08-21 18:22:47 +08:00
ldm0 e5383caebf refactor(navigation): allocate opaque history identities 2026-08-21 18:22:47 +08:00
ldm0 ca91a5ed5d refactor: make transient identity allocation checked 2026-08-21 18:22:47 +08:00
ldm0 d5e41805f6 refactor(renderer): bind document task capabilities atomically 2026-08-21 18:22:47 +08:00
ldm0 69037ba0ae refactor(renderer): construct runtimes with document owners 2026-08-21 18:22:47 +08:00
Athul Nambiar 0370ade6c3 feat(cli): add short flags for common options
Every option except `--header` was long-form only, so ordinary invocations
carried a lot of typing and boolean flags could not be grouped.

Assign short flags to the options that appear most often, leaving the rest
long-form. `CommonArgs` is flattened into both subcommands, so each letter
has to be unique across the fetch union and the serve union rather than
within one struct:

  fetch   -d dump, -w wait-until, -s wait-selector, -t timeout,
          -n noscript, -H header (unchanged)
  serve   -p port, -t timeout
  common  -l layout, -r resource, -i image, -f font, -a audio, -v video,
          -m media, -T text-track, -c cookie-file, -P profile-dir,
          -A user-agent, -L log-level

The whole optional-resource family gets a letter so it clusters, which is
the shape the request asked for: `moli serve --layout --resource` is now
`moli serve -lr`, and `-ifavmT` selects every optional family.

`-P` rather than `-p` for `--profile-dir` keeps `-p` for the serve port.
`-A` for `--user-agent` follows curl. `-T` and `-L` are uppercase only
because `-t` and `-l` are taken. `--host` keeps no short so `-H` is not
overloaded, since it already means `--header` under fetch.

Two call sites match flags by literal string and needed the short
spellings as well, or they would have silently ignored them:

- `normalize_dump_flag`, so a bare `-d` still defaults to `html`;
- `FETCH_INFER_FLAGS` and `SERVE_INFER_FLAGS`, so `moli -d markdown URL`
  still infers the fetch subcommand. Each short is mirrored beside the
  long flag it aliases, so both spellings infer identically.

Guard the letters with `Cli::command().debug_assert()`, which is clap's
own duplicate-short check and runs over each subcommand's full union.

Fixes #121
2026-08-21 17:04:02 +08:00
allen b084022955 docs: add star history chart to the READMEs
Embeds the light/dark SVGs published by lexmount/moli-metrics, which
regenerates them hourly from the stargazer timeline and commits only when
the count actually changed. Added to all six language READMEs, using the
same <picture> theme-switching pattern as the existing benchmark charts.
2026-08-21 15:08:31 +08:00
ldm0 cb907cd5ac test(cdp): report smoke progress 2026-08-21 11:23:44 +08:00
ldm0 3ad7dfda80 refactor(renderer): make lifecycle document ids opaque 2026-08-21 11:23:44 +08:00
ldm0 9925bb12f3 refactor(renderer): identify document runtime incarnations exactly 2026-08-21 11:23:44 +08:00
ldm0 b6f798dfa9 refactor(renderer): bind document write loads to exact owners 2026-08-21 11:23:44 +08:00
ldm0 527b408ead refactor(renderer): guard module evaluation by document owner 2026-08-21 11:23:44 +08:00
ldm0 66fd45517c refactor(renderer): snapshot script execution by document owner 2026-08-21 11:23:44 +08:00
ldm0 80bb2e6509 refactor(renderer): coalesce continuations by document owner 2026-08-21 11:23:44 +08:00
ldm0 1a33394011 refactor(renderer): target module reactions by document owner 2026-08-21 11:23:44 +08:00
ldm0 9e04a203d7 refactor(renderer): bind prepared scripts to exact document owners 2026-08-21 11:23:44 +08:00
ldm0 27b86343f8 refactor(renderer): authorize document tasks by exact owner 2026-08-21 11:23:44 +08:00
ldm0 530e9ae592 refactor(renderer): bind host scripts at document admission 2026-08-21 11:23:44 +08:00
ldm0 8164cfd94d refactor(navigation): allocate opaque document history ids 2026-08-21 11:23:44 +08:00
ldm0 cde08f79e3 refactor(renderer): bind service worker callbacks to window owners 2026-08-21 11:23:44 +08:00
ldm0 213634ba62 refactor(renderer): key DOM wrappers by exact handles 2026-08-21 11:23:44 +08:00
ldm0 b97719d675 refactor(protocol): harden transient identity allocation 2026-08-21 11:23:44 +08:00
ldm0 e6994b21b9 refactor(renderer): signal dialog openings directly 2026-08-21 11:23:44 +08:00
ldm0 4f75442c7f refactor(renderer): bind page storage work to exact task ids 2026-08-21 11:23:44 +08:00
ldm0 ff26e9cfb7 simplify indexeddb storage bucket integration 2026-08-21 11:23:44 +08:00
ldm0 cca374e0bf bind service worker callbacks to exact run identity 2026-08-21 11:23:44 +08:00
ldm0 40b1d0ce02 bind classic DOM references to exact page residence 2026-08-21 11:23:44 +08:00
ldm0 7733dcd843 Anchor scrollable overflow at the padding box 2026-08-21 03:42:28 +08:00
ldm0 2ae43dcc63 fix(docs): slimmer webfetch skill 2026-08-21 03:42:02 +08:00
Athul Nambiar 777ae9af36 fix(cli): enforce --obey-robots against robots.txt
`--obey-robots` parsed into `FetchConfig` and stopped there. Its only
consumer was the network trace, which reported the flag's own value back
out; no robots.txt was ever fetched or honored. The webfetch skill
meanwhile told agents to enable it for crawl workloads, so a crawl could
report that it obeyed robots.txt while ignoring it.

Add `moli-robots`, a dependency-light RFC 9309 parser and matcher:

- group parsing, including merged repeat groups and `User-agent` runs;
- user-agent selection by specificity with `*` as the fallback group;
- `Allow`/`Disallow` with `*` and `$`, longest match winning and `Allow`
  taking ties;
- percent-encoding normalization so a pattern and a request target
  compare in one space;
- the RFC 9309 section 2.3.1 response rules, where 4xx publishes no rules
  and 5xx or a transport failure disallows the origin.

Wire it into `moli fetch`. The check runs before the browser starts, so a
refused URL costs one robots.txt request and the target is never
contacted.

Scope is the top-level navigation. Subresource and protocol-server
navigations run through NavigationEngine, whose redirect, service-worker,
and CDP paths need a design decision of their own; `moli serve
--obey-robots` now warns that it is not enforced instead of appearing to
work.

Fixes #79
2026-08-21 02:34:26 +08:00