diff --git a/.github/skills/docs-screenshots/SKILL.md b/.github/skills/docs-screenshots/SKILL.md new file mode 100644 index 0000000..f6eeb74 --- /dev/null +++ b/.github/skills/docs-screenshots/SKILL.md @@ -0,0 +1,160 @@ +--- +name: docs-screenshots +description: "How to make the screenshots of the user guide (docs/images/) again with the script in scripts/docs-screenshots/, check them, update the page texts that describe them, and present the result to the user for review. Use when a change alters how the extension looks in VS Code (its views, buttons, command titles, the Target Memory view or the launch configurations editor), when a docs page needs a new or different picture, or when asked to update, regenerate or retake the documentation screenshots or images." +--- + +# Screenshots of the user guide + +The pictures in `docs/images/` are screenshots of VS Code with this extension. +A script makes them, never a person, so that they can be made again when the +UI changes. The files are in `scripts/docs-screenshots/`: + +- `run.sh` – the entry point, `npm run docs:screenshots`. It builds the + extension, downloads the latest stable VS Code, and runs the capture in a + sandbox. +- `capture.mjs` – drives VS Code with `playwright-core` and takes the + pictures, one block of code per picture. It prints what each picture shows + as text. +- `agent.mjs` – a stand-in TCF agent with a made-up target, so no Simics is + needed. +- `workspace/` – the example workspace that VS Code opens. +- `vscode.mjs` – starts VS Code, and has the settings it runs with. + +Nothing in a picture may come from a real target or from the machine that +makes it. This is what the sandbox is for: it shows the workspace as +`/home/user/server`, hides `/home` and `/tmp`, and has no network. Never run +`capture.mjs` in another way, and never edit a picture by hand. + +## Requirements + +Linux with `bwrap`, `xvfb-run`, `pngquant`, `curl` and `tar`, and `npm ci` +done. The script needs network access to look up and download VS Code for +x86_64. To use another VS Code, for example on another kind of machine or +without network access, set `VSCODE_BIN` to the `code` executable of an +unpacked one. If something is missing, tell the user. Do not work around the +sandbox. + +## Steps + +1. Run `npm run docs:screenshots`. It takes a minute or two, and longer when + it first downloads a VS Code version (about 1 GB unpacked) into + `.tmp/docs-screenshots/`. +2. If it fails, see [When the capture fails](#when-the-capture-fails), fix + the cause and run it again. +3. Read the list at the end of the output. Each picture is `unchanged`, + `changed` or `new`. Unchanged pictures are left exactly as committed: the + same view differs in a few pixels between runs, so at most 10 clearly + different pixels count as unchanged. On a machine with other fonts, all + pictures change. That is fine, but say so in the review. +4. Read `.tmp/docs-screenshots/capture.log`: + - `unknown commands:` should say `none`. If not, see below. + - Every `badge N ... covers:` line says `nothing`. + - The text under `--- ` and `=== ` is what the picture + shows. Check that it is what the page says. +5. Look at every changed and new picture, next to the committed one in + `.tmp/docs-screenshots/before/`. Check that: + - it shows what the page describes, and no text that matters is cut off, + - each numbered mark is on the right element and covers nothing, + - it shows only example data, such as `/home/user/server`, + `localhost:1534` and `simics-lab.example.com`: no title bar, no real + path, user name or host name. +6. Update the text of the pages, see the table below. The pages name buttons + "from the left": the order is on the `title buttons:` lines of the log. +7. Run `npm run docs:build`. +8. Present the result for review, see the next section. + +| Picture | Page | Text that describes it | +| --------------------------- | --------------------------------------------- | ---------------------------------------------- | +| `overview.png` | `docs/getting-started.md` | The numbered list below it | +| `call-stack.png` | `docs/debugging/call-stack.md` | The two text trees of the example above it | +| `breakpoints.png` | `docs/debugging/breakpoints.md` | The sentence that names the two marked buttons | +| `target-memory.png` | `docs/debugging/target-memory.md` | The numbered list below it | +| `snapshots.png` | `docs/debugging/snapshots.md` | The buttons, from the left | +| `consoles.png` | `docs/debugging/simics-console.md` | The buttons | +| `context-picker.png` | `docs/configuration/contexts.md` | The list of what the picker offers | +| `launch-configurations.png` | `docs/configuration/launch-configurations.md` | The numbered list below it | +| `symbol-files.png` | `docs/configuration/symbol-files.md` | The buttons, from the left | +| `path-maps.png` | `docs/configuration/path-mapping.md` | The buttons, from the left | + +## Present the result for review + +Do this every time, also when the pictures look right to you. A person sees +things in a picture that a check of its text does not find. Do not commit +before the user has answered. + +Write the user a message with: + +1. One line for each changed and new picture: a link to the file, and what + differs from the committed picture, in words. Then the pictures that did + not change. +2. The VS Code version of the pictures, from the first line of the log. +3. What you changed in the text of the pages, and why. +4. What you changed in `scripts/docs-screenshots/`, and why. +5. What you could not check, and what looks odd to you, also if you are not + sure that it is wrong. +6. How to look at the pictures: the Source Control view shows each changed + picture before and after, and `npm run docs:develop` shows them in the + pages. + +Then ask the user to approve the pictures or to say what to change. After a +change, run the script again and present again. Commit when the user has +approved, see the `git-commit-message` skill. + +## When the capture fails + +The log has a `FAILED:` line and, under `=== at failure`, what the window +showed. `.tmp/docs-screenshots/out/failure.png` is the window at that moment, +and `out/raw/` has the pictures taken until then. `docs/images/` is not +touched by a run that fails. + +- `command "..." not found` – a command title changed in `package.json`. Use + the new title in `capture.mjs`. +- A timeout that names a selector – a label, a view or a control changed. + `capture.mjs` finds elements by their labels and by CSS classes of VS Code + and of the webviews in `src/webview/`. Update the selector. +- `badge N covers ...` – a numbered mark would hide something. The lines + before it list what each other place covers. Pick a free one in the + `callouts([...])` call of that picture. +- `callout N is outside the picture` – the marked element moved out of the + area that the picture shows. +- `unknown commands: Service.command` (not a failure) – the extension sent a + TCF command that the stand-in agent does not know, and got "not supported". + If a picture needs its data, add a handler to `handlers` in `agent.mjs`. The + `tcf` skill has the reply formats. +- `agent errors:` – a handler in `agent.mjs` threw. Fix it. + +## Changing what the pictures show + +- **Another picture.** Add a block to `capture.mjs` that brings VS Code into + the state to show and ends with `shot("", )`, and use it in the + page as `![what it shows](../images/.png)`. The pictures have two + pixels per point. A picture that is narrower than the page needs + `{width=N}` after it, with half its pixel width, or it is shown twice as + large as the others. Add the picture to the table above. +- **Numbered marks.** `callouts([[number, element, place], ...], area)` draws + them. Explain each number in a list below the picture. +- **The example target.** Its contexts, call stacks, variables, memory and + snapshots are in `agent.mjs`, the source file and `launch.json` in + `workspace/`. Keep all of it made up, and in step with the examples in the + text of the pages. +- **A picture that is no longer needed.** Remove its block, its file and its + use in the page. The list at the end of a run names files in `docs/images/` + that the run did not make. + +Things to know when you change `capture.mjs`: + +- Screenshots do not show what happens on hover. To show the buttons of a + view or of a row, give the list the keyboard focus, as the view pictures do. + `park()` moves the pointer to the title bar, where it hovers nothing. +- The title bar, the top 30 points of the window, says "Extension Development + Host". Keep it out of every picture. +- A picture must look the same in every run. Wait for things to settle + (`scrollbarsFaded()`), and put VS Code into a state that does not depend on + timing. Settings that help with that go into `SETTINGS` in `vscode.mjs`. + Use `npm run docs:screenshots -- --check-repeatability` to capture twice and + compare the two sets of pictures directly, including new pictures. Both + sets must contain the same pictures at the same dimensions, with at most + 10 clearly different pixels per picture. The first set and its log are in + `.tmp/docs-screenshots/first-capture/` and `.tmp/docs-screenshots/first-capture.log`; + the second set and its log are in `out/` and `capture.log` under the same + scratch directory. Only a passing run updates `docs/images/`. diff --git a/.github/workflows/docs-pr.yml b/.github/workflows/docs-pr.yml new file mode 100644 index 0000000..52af7ec --- /dev/null +++ b/.github/workflows/docs-pr.yml @@ -0,0 +1,22 @@ +name: Documentation checks + +on: + pull_request: + paths: ["docs/**"] + +permissions: + contents: read + +jobs: + build: + runs-on: intel-ubuntu-latest + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + with: + node-version: "24" + package-manager-cache: false + - run: npm ci + - run: npm run docs:build diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..486f58e --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,51 @@ +name: Documentation + +on: + push: + branches: ["main"] + workflow_dispatch: + +permissions: + contents: read + +# Let a deployment in progress finish, a later run waits for it. +concurrency: + group: pages + cancel-in-progress: false + +jobs: + build: + runs-on: intel-ubuntu-latest + permissions: + contents: read + pages: read + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + with: + node-version: "24" + package-manager-cache: false + - id: pages + uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0 + - run: npm ci + - run: npm run docs:build + env: + DOCS_BASE: ${{ steps.pages.outputs.base_path }} + - uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 + with: + path: docs/.vitepress/dist + + deploy: + needs: build + runs-on: intel-ubuntu-latest + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - id: deployment + uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1 diff --git a/.gitignore b/.gitignore index 959af08..1507117 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,6 @@ node_modules/ out/ build/ *.vsix +.tmp/ +docs/.vitepress/cache/ +docs/.vitepress/dist/ diff --git a/.prettierignore b/.prettierignore index b22e2fd..1e1fb94 100644 --- a/.prettierignore +++ b/.prettierignore @@ -2,5 +2,8 @@ node_modules/ out/ build/ *.vsix +.tmp/ +docs/.vitepress/cache/ +docs/.vitepress/dist/ package-lock.json *.md diff --git a/AGENTS.md b/AGENTS.md index a9fbb63..75a5b5a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,8 +1,9 @@ # Agent guide Notes for AI coding agents (and developers) working on this repository. The -[README](README.md) is the user guide and is shown on the extension's -Marketplace page; keep implementation details here instead. +user guide is the documentation site in `docs/`. The [README](README.md) is +an overview that links to it, and is shown on the extension's Marketplace +page. Keep implementation details here instead. ## Commands @@ -17,6 +18,9 @@ npm run test:fuzz # run the fuzzing tests npm run package # build simics-target-debug-.vsix npm run watch # rebuild on changes npm run compile:production # minified bundle without source maps +npm run docs:develop # serve the documentation site with hot reload +npm run docs:build # build the site, fails on dead links between pages +npm run docs:screenshots # make the pictures in docs/images/ again npx prettier --write ``` @@ -24,6 +28,13 @@ npx prettier --write - Format every TypeScript file you create or change with Prettier, see [.github/instructions/typescript.instructions.md](.github/instructions/typescript.instructions.md). +- The user guide is a VitePress site with one Markdown page per feature in + `docs/`, and the sidebar in `docs/.vitepress/config.mts`. When a change is + visible to users, update its page. Describe how to use the feature there, + not how it works inside. +- The pictures in `docs/images/` are screenshots made by a script. When a + change alters what one of them shows, make them again and have the user + review them, see the `docs-screenshots` skill in `.github/skills/`. - Unit tests use `node:test` and need no TCF agent. `npm test` only bundles and runs `src/test/**/*.test.ts`; the root `test/` folder is neither run nor type checked. Add tests in `src/test/`. diff --git a/README.md b/README.md index a9420ae..f7ef65f 100644 --- a/README.md +++ b/README.md @@ -17,151 +17,36 @@ Debug software running in Simics, or on any other The extension uses only standard TCF services, so Simics-specific features (the Simics CLI and snapshots) are simply unavailable on other agents. -## Installation +## Documentation -Build the `.vsix` by running -```sh -npm ci -npm run package -``` -Then in VS Code run -**Extensions: Install from VSIX...** and select the generated file. - -## Getting started - -1. Start a TCF agent in Simics. It listens on port 1534 by default: - - ``` - simics> new-tcf-agent - ``` - -2. In VS Code, start debugging and select **Simics Target Debug**. Without a - `launch.json` this attaches to `localhost:1534`. To configure it, add: - - ```json - { - "type": "simics-target-debug", - "request": "attach", - "name": "Attach to TCF agent", - "host": "localhost", - "port": 1534 - } - ``` - -**Simics Target Debug: Edit Launch Configurations** edits these -configurations in a form instead of JSON. +The user guide is at . +Start with [Getting started][getting-started], which shows how to install +the extension, start a TCF agent in Simics and attach to it. ## Features -- **Call stack** – processors, and with OS awareness processes and threads, - shown as a tree. Expand a thread to see its stack. Right-click a frame for - **Copy Address**. -- **Stepping** – step over, into and out by source line, or by instruction - in the Disassembly view. Line stepping needs symbol files. -- **Breakpoints** – line, function, data, instruction and logpoints, with - conditions and hit counts. Function breakpoints can be limited to some - cores, see below. -- **Variables and watches** – locals, registers, hovers and expressions in - the Debug Console, evaluated by the agent in the selected frame. -- **Disassembly** – right-click a frame and select **Open Disassembly View**. -- **Target Memory** – a hex editor for target memory: **Simics Target Debug: - Open Target Memory**, or **Open in Target Memory** on a variable. Supports - editing, search (Ctrl+F) and go to address (Ctrl+G). -- **Simics CLI** – the Simics command line opens in a terminal after - attaching. The **Consoles** view in Run and Debug reconnects it. -- **Snapshots** – take, restore and delete Simics snapshots from the - **Snapshots** view in Run and Debug. - -### Function breakpoints for some cores - -Run **Simics Target Debug: Add Function Breakpoint in Context...** (also in -the Breakpoints toolbar and a frame's context menu) and choose the cores. -You can also type the scope directly in a function breakpoint: - -- `start_kernel @ board.cpu[0], board.cpu[1]` – the listed context IDs -- `start_kernel @? **/HasState=true` – a TCF context query - -## Configuration - -### Launch configuration - -| Attribute | Default | Description | -| ---------------- | ----------- | ------------------------------------------------- | -| `host` | `localhost` | Host of the TCF agent | -| `port` | `1534` | TCP port of the TCF agent | -| `connectTimeout` | `10000` | Milliseconds to wait for the agent to answer | -| `symbolFiles` | `[]` | Symbol files to load, see [below](#symbol-files) | -| `pathMap` | `[]` | Source path rules, see [below](#path-mapping) | - -### Settings - -Options shared by all sessions are VS Code settings. **Simics Target Debug: -Open Settings** shows them. - -| Setting (`simics-target-debug.` ...) | Default | Description | -| ------------------------------------ | ------- | ------------------------------------------------- | -| `console.open` | `true` | Open the Simics CLI after attaching | -| `console.historySessions` | `3` | Earlier sessions shown in the Simics CLI | -| `console.editingKeys` | `true` | Send editing keys such as Ctrl+P to Simics | -| `callStack.hierarchy` | `true` | Group threads in the Call Stack view | -| `callStack.compact` | `true` | A group that is the only child shares its parent's row | -| `disassembly.functionHeaders` | `true` | Show function names in the Disassembly view | -| `tcfTrace.enabled` | `false` | Log TCF messages to Output › Simics Target Debug | -| `tcfTrace.silence` | (list) | `service/type/name` rules for messages not to log | - -Call stack, disassembly and trace settings apply to new sessions. - -### Symbol files - -Load symbol files when attaching, in addition to `add-symbol-file` in Simics: - -```json -"symbolFiles": [ - { "path": "${workspaceFolder}/build/firmware.elf" }, - { "path": "build/app.elf", "contexts": ["board.mb.cpu0.core[0][0]"] }, - { "path": "build/driver.elf", "contextQuery": "**/HasState=true", "address": "0x40000000" }, - { "path": "build/module.elf", "address": "0xff000", "absolute": true } -] -``` - -| Property | Description | -| -------------- | --------------------------------------------------------------------------- | -| `path` | ELF file as seen by the agent, relative to the workspace folder | -| `contexts` | Context IDs or names the symbols apply to (default: all) | -| `contextQuery` | A TCF context query instead of `contexts` | -| `address` | Offset added to all addresses, like `add-symbol-file -relative` | -| `absolute` | If `true`, `address` is where the first loadable segment is loaded | - -The **Symbol Files** view in Run and Debug adds, edits, reloads and removes -files during a session, and its save button writes them back to -`launch.json`. Files loaded elsewhere, for example in Simics, are listed -under **Added Elsewhere**. - -### Path mapping - -If the sources are not at the path in the debug information, map the -compiled path prefix to the local one: - -```json -"pathMap": [ - { "source": "/build/firmware", "destination": "${workspaceFolder}/firmware" }, - { "source": "/build/src", "destination": "${workspaceFolder}/cpu0", "contexts": ["cpu0"] } -] -``` - -Rules apply to all contexts unless `contexts` or `contextQuery` is set. When -a source file is not found, VS Code offers to locate it and creates a rule -for you. The **Path Maps** view in Run and Debug edits, reorders and saves -the rules. - -## Limitations - -- No exception breakpoints. -- Breakpoints set by other TCF clients or the Simics CLI are not shown. -- Variables and registers are read-only. -- `char *` and `char[]` are not shown as strings. -- No "Restart Frame". -- Only TCP transport. +- **[Call stack][call-stack]** – processors, and with OS awareness processes + and threads, shown as a tree. +- **[Stepping][stepping]** – step over, into and out by source line, or by + instruction in the Disassembly view. +- **[Breakpoints][breakpoints]** – line, function, data, instruction and + logpoints, with conditions and hit counts. Function breakpoints can be + limited to some cores. +- **[Variables and expressions][variables]** – locals, registers, hovers and + expressions in the Debug Console, evaluated by the agent in the selected + frame. +- **[Disassembly][disassembly]** – the instructions of a stack frame's code, + with instruction breakpoints. +- **[Target Memory][target-memory]** – a hex editor for target memory, with + search and go to address. +- **[Simics console][simics-console]** – the Simics command line in a + terminal. +- **[Snapshots][snapshots]** – take, restore and delete Simics snapshots. + +A debug session is set up with a [launch configuration][launch], which can +load [symbol files][symbol-files] and [map source paths][path-mapping]. +Options shared by all sessions are [settings][settings]. See also the +[limitations][limitations]. ## Development @@ -200,3 +85,36 @@ To develop in VS Code, open the repository, select **Run Extension** in the Run and Debug view and press F5. This starts `npm run watch` and opens an Extension Development Host with the extension loaded. **Run Extension (Clean)** does the same with all other extensions disabled. + +### Documentation + +The user guide is a [VitePress](https://vitepress.dev/) site, built from the +Markdown files in `docs/`. + +```sh +npm run docs:develop # serve the site, pages reload when edited +npm run docs:build # build the site into docs/.vitepress/dist/ +npm run docs:screenshots # make the pictures in docs/images/ again +``` + +The pictures are screenshots made by a script. When the UI changes, make +them again as +[.github/skills/docs-screenshots/SKILL.md](.github/skills/docs-screenshots/SKILL.md) +describes. + + + +[getting-started]: https://intel.github.io/simics-vs-code-tcf-debug/getting-started.html +[call-stack]: https://intel.github.io/simics-vs-code-tcf-debug/debugging/call-stack.html +[stepping]: https://intel.github.io/simics-vs-code-tcf-debug/debugging/stepping.html +[breakpoints]: https://intel.github.io/simics-vs-code-tcf-debug/debugging/breakpoints.html +[variables]: https://intel.github.io/simics-vs-code-tcf-debug/debugging/variables.html +[disassembly]: https://intel.github.io/simics-vs-code-tcf-debug/debugging/disassembly.html +[target-memory]: https://intel.github.io/simics-vs-code-tcf-debug/debugging/target-memory.html +[simics-console]: https://intel.github.io/simics-vs-code-tcf-debug/debugging/simics-console.html +[snapshots]: https://intel.github.io/simics-vs-code-tcf-debug/debugging/snapshots.html +[launch]: https://intel.github.io/simics-vs-code-tcf-debug/configuration/launch-configurations.html +[symbol-files]: https://intel.github.io/simics-vs-code-tcf-debug/configuration/symbol-files.html +[path-mapping]: https://intel.github.io/simics-vs-code-tcf-debug/configuration/path-mapping.html +[settings]: https://intel.github.io/simics-vs-code-tcf-debug/configuration/settings.html +[limitations]: https://intel.github.io/simics-vs-code-tcf-debug/reference/limitations.html diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts new file mode 100644 index 0000000..d1589a0 --- /dev/null +++ b/docs/.vitepress/config.mts @@ -0,0 +1,56 @@ +import { defineConfig } from "vitepress"; + +// The Pages workflow sets DOCS_BASE: the site is served from // there. +const basePath = process.env.DOCS_BASE ?? ""; + +export default defineConfig({ + base: basePath.endsWith("/") ? basePath : `${basePath}/`, + lang: "en-US", + title: "Simics Target Debug", + description: "Debug targets in VS Code through a TCF agent, such as the Simics TCF agent.", + themeConfig: { + search: { provider: "local" }, + nav: [ + { text: "Getting started", link: "/getting-started" }, + { text: "Debugging", link: "/debugging/call-stack" }, + { text: "Configuration", link: "/configuration/launch-configurations" }, + ], + sidebar: [ + { + text: "Introduction", + items: [{ text: "Getting started", link: "/getting-started" }], + }, + { + text: "Debugging", + items: [ + { text: "Call stack", link: "/debugging/call-stack" }, + { text: "Variables and expressions", link: "/debugging/variables" }, + { text: "Stepping", link: "/debugging/stepping" }, + { text: "Breakpoints", link: "/debugging/breakpoints" }, + { text: "Disassembly", link: "/debugging/disassembly" }, + { text: "Target Memory", link: "/debugging/target-memory" }, + { text: "Simics console", link: "/debugging/simics-console" }, + { text: "Snapshots", link: "/debugging/snapshots" }, + ], + }, + { + text: "Configuration", + items: [ + { text: "Launch configurations", link: "/configuration/launch-configurations" }, + { text: "Symbol files", link: "/configuration/symbol-files" }, + { text: "Path mapping", link: "/configuration/path-mapping" }, + { text: "Selecting contexts", link: "/configuration/contexts" }, + { text: "Settings", link: "/configuration/settings" }, + ], + }, + { + text: "Reference", + items: [ + { text: "TCF services", link: "/reference/tcf-services" }, + { text: "Limitations", link: "/reference/limitations" }, + ], + }, + ], + socialLinks: [{ icon: "github", link: "https://github.com/intel/simics-vs-code-tcf-debug" }], + }, +}); diff --git a/docs/configuration/contexts.md b/docs/configuration/contexts.md new file mode 100644 index 0000000..dbce1d9 --- /dev/null +++ b/docs/configuration/contexts.md @@ -0,0 +1,77 @@ +# Selecting contexts + +A context is a part of the target that the agent debugs, such as a processor +core or, with OS awareness, a process or a thread. +[Symbol files](/configuration/symbol-files), +[path map rules](/configuration/path-mapping) and +[function breakpoints](/debugging/breakpoints#limit-a-function-breakpoint-to-selected-contexts) +apply to all contexts unless you select some of them. All three select +contexts in the same way. + +## Ways to select contexts + +- **All contexts** is the default. +- **Listed contexts** are given by their context IDs. Symbol files also take + context names. +- A **context query** is a TCF context query. The agent finds the contexts + that match it. + +In `launch.json`, symbol files and path map rules have the attributes +`contexts` and `contextQuery` for this: + +```json +{ "path": "build/app.elf", "contexts": ["board.mb.cpu0.core[0][0]"] }, +{ "path": "build/driver.elf", "contextQuery": "**/HasState=true" } +``` + +Use one of them, not both. An entry with both is ignored, with an error in +the Debug Console. The older `context`, a single context, still works but is +deprecated; use `contexts` instead. + +A function breakpoint has its contexts in its name, see +[Breakpoints](/debugging/breakpoints#limit-a-function-breakpoint-to-selected-contexts). + +## Context queries + +A context query is evaluated by the agent. Some examples: + +| Query | Selects | +| -------------------------- | --------------------------------------------------------------------------- | +| `**/HasState=true` | All contexts that can run and be stopped, for example all processors. | +| `/server/**/HasState=true` | Such contexts below the top-level context named `server`. | +| `ID=cpu0` | The context with the ID `cpu0`. | +| `ID=cpu0,HasState=true` | The context with the ID `cpu0`, if it can run and be stopped. | + +The syntax is described with the Context Query service in the +[TCF documentation](https://download.eclipse.org/tools/tcf/tcf-docs/). + +## The context picker + +While debugging, the commands that need contexts open the same picker. This +is the picker for a new function breakpoint: + +![The first step of the context picker](../images/context-picker.png){width=602} + +It first offers: + +- The current selection, when you edit something that has contexts or a + query. +- **All contexts**. +- The context that is selected in the Call Stack view. +- **Pick Contexts...**, which shows a checklist of the contexts of the + session that can run, such as its processor cores. +- **Context Query...**, which asks for a query. + +The checklist and the query have a Back button to the first step. + +In the checklist: + +- Accepting with nothing checked selects all contexts. +- Checked contexts that are not in the current session stay listed, so they + are not dropped by accident. +- For symbol files and path map rules, you can type a context that is not + listed and check it: an ID or a name for symbol files, an ID for path map + rules. + +The [launch configurations editor](/configuration/launch-configurations#symbol-files-and-path-map-tables) +has a **Contexts** column with the same choices. diff --git a/docs/configuration/launch-configurations.md b/docs/configuration/launch-configurations.md new file mode 100644 index 0000000..eb69f14 --- /dev/null +++ b/docs/configuration/launch-configurations.md @@ -0,0 +1,95 @@ +# Launch configurations + +A debug session is started from a `simics-target-debug` configuration in +`.vscode/launch.json`: + +```json +{ + "type": "simics-target-debug", + "request": "attach", + "name": "Attach to TCF agent", + "host": "localhost", + "port": 1534 +} +``` + +Without a `launch.json`, selecting the "Simics Target Debug" debugger +attaches to `localhost:1534`. + +## Attributes + +| Attribute | Default | Description | +| ---------------- | ----------- | --------------------------------------------------------------------------------------- | +| `host` | `localhost` | Host name or IP address of the TCF agent. | +| `port` | `1534` | TCP port of the TCF agent. | +| `connectTimeout` | `10000` | Milliseconds to wait for the connection and the agent's `Locator.Hello`. | +| `symbolFiles` | `[]` | Symbol files to load when attaching, see [Symbol files](/configuration/symbol-files). | +| `pathMap` | `[]` | Source path mapping rules, see [Path mapping](/configuration/path-mapping). | + +Options that are the same for all debug sessions are not attributes of the +configuration. They are [settings](/configuration/settings). + +## Launch configurations editor + +**Simics Target Debug: Edit Launch Configurations** in the Command Palette +opens the `simics-target-debug` configurations of `.vscode/launch.json` in a +form, like the Settings editor: the configuration names on the left, the +attributes of the selected one on the right. With several workspace folders +it asks which folder to use, and it creates `launch.json` if there is none. + +The buttons in the editor title switch between the form and the text of +`launch.json`, and **Open With...** on `launch.json` offers the form too. + +![The launch configurations editor with four parts marked](../images/launch-configurations.png) + +1. The `simics-target-debug` configurations of `launch.json`, with the + buttons **+** and **Delete All** above them. +2. **Start Debugging**, **Duplicate** and **Delete** for the selected + configuration. +3. The **Contexts** column of a table, see + [Symbol files and path map tables](#symbol-files-and-path-map-tables). +4. **Open launch.json as Text** and **Open Settings** in the editor title. + +### Manage configurations + +- The **+** button above the list adds a configuration, and **Delete All** + deletes all `simics-target-debug` configurations, after asking. Other + configurations in `launch.json` are kept. +- Each configuration has the buttons **Start Debugging**, **Duplicate** and + **Delete**. New names are made unique. +- **Start Debugging** is disabled while a session to the same agent (host and + port) runs, and while the name or a required value is empty. + +### Edit attributes + +- Each change is written to `launch.json` and saved at once. Only the changed + value is rewritten, so comments, formatting and other debug types are kept. +- Text boxes write their value when they lose focus or Enter is pressed. + **Reset** removes an attribute, so its default is used. +- Changes made in the text editor show up in the form at once. While + `launch.json` has syntax errors the form is read-only. +- Of VS Code's own options only `internalConsoleOptions` (when to open the + Debug Console) is shown, under **Advanced** at the end, with + `connectTimeout`. Others, like `preLaunchTask`, are listed under **Other + Attributes** when set, and can be edited in the text. +- The options that apply to all configurations are + [settings](/configuration/settings). **Open Settings** in the editor title + and the link at the end of the form open them. + +### Symbol files and path map tables + +`symbolFiles` and `pathMap` are edited in tables, with a row for each symbol +file or rule. + +- The path of a symbol file and the destination of a path map rule have + buttons to browse for it. A destination that does not exist on this host is + marked. +- The **Contexts** column chooses what the row applies to: all contexts, a + list of contexts separated by commas, or a context query, see + [Selecting contexts](/configuration/contexts). +- **Pick Contexts...** next to it opens the + [context picker](/configuration/contexts#the-context-picker) with the + contexts of the target. It needs a running debug session to the agent of + the configuration. + +Attributes in the `launch` section of a `.code-workspace` file are not shown. diff --git a/docs/configuration/path-mapping.md b/docs/configuration/path-mapping.md new file mode 100644 index 0000000..b242b56 --- /dev/null +++ b/docs/configuration/path-mapping.md @@ -0,0 +1,121 @@ +# Path mapping + +When the sources are not at the path compiled into the debug information, for +example when the target software was built on another machine or in a +container, add `pathMap` rules that map a compiled path prefix (`source`) to +the path prefix on this host (`destination`): + +```json +{ + "type": "simics-target-debug", + "request": "attach", + "name": "Attach to TCF agent", + "port": 1534, + "pathMap": [ + { "source": "/build/firmware", "destination": "${workspaceFolder}/firmware" }, + { "source": "C:\\work\\libs", "destination": "/home/me/libs" } + ] +} +``` + +## How the rules are used + +- On attach the rules are sent to the agent. The agent then matches + breakpoints set on host paths against the compiled paths. +- Source paths reported by the agent (call stack, moved breakpoints) are + mapped to host paths by VS Code. The configured rules are tried in order, + followed by rules the agent has from elsewhere (for example added with the + Simics command `add-pathmap-entry`). The first mapped file that exists on + the host is used. Mapped frames show the compiled path in the Call Stack + tooltip. + +A prefix only matches at a path separator, so `/build/src` maps +`/build/src/a.c` but not `/build/src2/a.c`. Both `/` and `\` are accepted in +compiled paths. Invalid rules are reported in the Debug Console and ignored. + +## Rules for selected contexts + +Rules apply to **all contexts by default**. To scope a rule, set either +`contexts` to a list of exact context IDs or `contextQuery` to a TCF query, +see [Selecting contexts](/configuration/contexts): + +```json +"pathMap": [ + { + "source": "/build/src", + "destination": "${workspaceFolder}/cpu0", + "contexts": ["cpu0"] + }, + { + "source": "/build/src", + "destination": "${workspaceFolder}/workers", + "contextQuery": "/server/**/HasState=true" + } +] +``` + +`"contexts": ["cpu0"]` and `"contextQuery": "ID=cpu0"` are equivalent. Set +only one of them per rule; to select an ID together with additional criteria, +use a query such as `ID=cpu0,HasState=true`. + +Source lookups are context-specific, so identical compiled paths in different +contexts can resolve to different host files. General queries are evaluated +by the agent's `ContextQuery` service; exact `ID=...` filters work without +it. + +## Locate a source file + +When a call stack frame's source file is not found on this host, VS Code +shows a placeholder for it instead of offering to create the file, and asks +whether to locate the file. You can also run **Simics Target Debug: Locate +Source File...** from the Command Palette. + +Pick the file on this host, and a path map rule is made from the part of the +two paths that differs, for example `/build` → `/home/me` for `/build/fw/a.c` +and `/home/me/fw/a.c`. Before the new rule is applied, choose its contexts +with the [context picker](/configuration/contexts#the-context-picker). The +context of the frame is offered first. + +The rule is used at once for the rest of the session, including breakpoints, +and can be saved to the configuration's `pathMap` in `launch.json`. + +## The Path Maps view + +During a debug session, **Path Maps** in Run and Debug lists the session's +rules in matching order, with the compiled prefix on the left and the host +destination and contexts beside it. + +![The Path Maps view](../images/path-maps.png){width=298} + +The buttons in the title of the view are, from the left, **Add Path Map +Rule...**, **Save Path Map to Debug Configuration** and **Refresh Path +Map**. The buttons on a rule are **Edit Path Map Rule...** and **Remove Path +Map Rule**. They show when the pointer is over the rule, or when it is +selected. + +- Use **+** to add a rule. +- Click a rule to edit its paths and contexts, or use its trash button to + remove it. The contexts are chosen with the + [context picker](/configuration/contexts#the-context-picker). +- The context menu has **Move Rule Up** and **Move Rule Down** to change the + priority. + +Changes apply immediately and refresh the call stack. Rules created by +**Locate Source File...** appear here too. + +Rules that the agent has but this session did not add, for example from +`add-pathmap-entry` in Simics or from another client, are listed read-only +under **Added Elsewhere**. A rule for another host is listed too, but marked +as not used. When the agent reports a path map change, the extension refreshes +the call stack and remaps existing source breakpoints. + +## Save to the debug configuration + +The view's **Save Path Map to Debug Configuration** button replaces `pathMap` +in the current session's named configuration in `.vscode/launch.json` after +confirmation, including contexts, removals and ordering. Workspace +destinations are saved using `${workspaceFolder}`. Rules under **Added +Elsewhere** are not saved. + +Saving requires a workspace launch configuration with a unique name. Changes +that are not saved only apply to the running session. diff --git a/docs/configuration/settings.md b/docs/configuration/settings.md new file mode 100644 index 0000000..1643362 --- /dev/null +++ b/docs/configuration/settings.md @@ -0,0 +1,66 @@ +# Settings + +Options that are the same for all debug sessions are VS Code settings, in the +user or workspace settings. + +| Setting | Default | Description | +| ------------------------------------------------- | --------- | ---------------------------------------------------------------------------------------- | +| `simics-target-debug.console.open` | `true` | Open the Simics CLI after attaching, see [Simics console](/debugging/simics-console). | +| `simics-target-debug.console.historySessions` | `3` | Earlier sessions shown above the Simics CLI. | +| `simics-target-debug.console.editingKeys` | `true` | Send editing keys such as Ctrl+P to Simics. | +| `simics-target-debug.callStack.hierarchy` | `true` | Groups in the [Call Stack](/debugging/call-stack#layout-settings) view. | +| `simics-target-debug.callStack.compact` | `true` | A group that is alone in its parent shares the parent's row. | +| `simics-target-debug.disassembly.functionHeaders` | `true` | [Function header rows](/debugging/disassembly#function-headers) in the Disassembly view. | +| `simics-target-debug.tcfTrace.enabled` | `false` | Log TCF messages to Output › Simics Target Debug, see [TCF trace](#tcf-trace). | +| `simics-target-debug.tcfTrace.silence` | see below | TCF messages left out of the TCF trace. | + +The call stack, disassembly and TCF trace settings are read when a debug +session starts. + +## Open the settings + +**Simics Target Debug: Open Settings** in the Command Palette shows the +settings of the extension in the Settings editor of VS Code. The **Open +Settings** button in the title of the Consoles view and of the +[launch configurations editor](/configuration/launch-configurations#launch-configurations-editor) +does the same. + +To keep the focus in the Simics console when the target stops, turn off the +VS Code setting `debug.focusEditorOnBreak`, see +[Simics console](/debugging/simics-console#stay-in-the-console-when-the-target-stops). + +## TCF trace + +Turn on `simics-target-debug.tcfTrace.enabled` to log the TCF messages +between VS Code and the agent in Output › Simics Target Debug. +`simics-target-debug.tcfTrace.silence` lists the messages to leave out. The +default silences the agent's `Locator` peer events, such as the heartbeat, +the Simics console (the `CommandLine` service) and the Simics log events: + +```json +"simics-target-debug.tcfTrace.silence": [ + "Locator/event/peerHeartBeat", + "Locator/event/peerAdded", + "Locator/event/peerRemoved", + "Locator/event/peerChanged", + "CommandLine", + "SimicsLogs/event" +] +``` + +- Each item is a rule `service/type/name`. It silences the messages of + `service` that have the type `type` and are called `name`. +- `*` matches anything, and so does a part that is left out: `CommandLine` + silences all messages of that service. +- The types are `command` (a command C and its results R, P and N, which the + agent sends back with the command's token), `event` (E) and `flowControl` + (F). A command's results have its service and name. A rule can have several + types, separated by commas, such as `Memory/command,event`. +- Flow control messages have no service or name, so only a rule with `*` as + service and no name, such as `*/flowControl`, silences them. +- A list in the settings replaces the default. Remove a rule to log its + messages. `[]` logs everything. + +In `settings.json`, services and message types are suggested while you type +a rule. The suggested services are those of the Simics TCF agent; any other +service name can be typed too. diff --git a/docs/configuration/symbol-files.md b/docs/configuration/symbol-files.md new file mode 100644 index 0000000..d5691f7 --- /dev/null +++ b/docs/configuration/symbol-files.md @@ -0,0 +1,126 @@ +# Symbol files + +Symbol files can be loaded from the debug configuration instead of (or in +addition to) `add-symbol-file` in Simics. They can also be added, edited and +removed in the **Symbol Files** view while debugging. + +## In the debug configuration + +```json +{ + "type": "simics-target-debug", + "request": "attach", + "name": "Attach to TCF agent", + "port": 1534, + "symbolFiles": [ + { "path": "${workspaceFolder}/build/firmware.elf" }, + { "path": "build/app.elf", "contexts": ["board.mb.cpu0.core[0][0]"] }, + { "path": "build/driver.elf", "contextQuery": "**/HasState=true", "address": "0x40000000" }, + { "path": "build/module.elf", "address": "0xff000", "absolute": true } + ] +} +``` + +| Property | Description | +| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `path` | The symbol file (ELF with debug information), as seen by the agent. Relative paths are relative to the workspace folder. | +| `contexts` | IDs or names of the contexts the symbols apply to. | +| `contextQuery` | A TCF context query selecting the contexts the symbols apply to, for example `**/HasState=true` for all processors. Use it instead of `contexts`, not with it. | +| `address` | Relocation offset added to all addresses in the file, like the Simics command `add-symbol-file -relative`. It may be negative, for example `"-0x1000"`. If not set, the addresses in the file are used. With `absolute`, a load address instead. | +| `absolute` | If `true`, `address` is a load address: the symbols are relocated so that the loadable segment with the lowest file offset (normally the first one, see `readelf -lW`) is at this address. | + +Without `contexts` and `contextQuery` the symbols apply to all contexts, see +[Selecting contexts](/configuration/contexts). A file for several contexts is +added to each of them. + +The agent removes the symbol files when the debug session ends. The +[path map](/configuration/path-mapping) rules also apply to the paths of +symbol files. + +## Relocation + +The two ways of relocating differ in what the address refers to. For a file +whose first loadable segment is linked at 0x3ff000, with `.text` at 0x400000: + +- `"address": "-0x300000"` subtracts 0x300000 from every address in the file, + so `.text` ends up at 0x100000. +- `"address": "0xff000", "absolute": true` gives the same result by placing + that segment at 0xff000. The value must be the segment address, not the + `.text` address. + +## Add symbol files while debugging + +![The Symbol Files view](../images/symbol-files.png){width=298} + +The buttons in the title of the **Symbol Files** view are, from the left, +**Add Symbol File...**, **Save Symbol Files to Debug Configuration** and +**Reload All Symbol Files**. The buttons on a file are **Edit Symbol +Mapping...**, **Reload Symbol File** and **Remove Symbol File**. They show +when the pointer is over the file, or when it is selected. + +To add a symbol file after attaching, open **Symbol Files** in Run and Debug +and use its **+** button, or run **Simics Target Debug: Add Symbol File...** +from the Command Palette. Enter: + +- The path as seen by the agent. Relative paths are resolved against the + debug session's workspace folder. As you type the path, local files and + folders are suggested; select a folder to list it, or `..` for its parent + folder. **Browse for a File...** and **Browse for a Folder...** open the + file dialog. Enter a path directly if the file is only available to the + agent. +- The contexts the symbols apply to, with the + [context picker](/configuration/contexts#the-context-picker). +- How the symbols are placed: the file addresses, a relocation offset (like + `-relative`), or an absolute load address. + +The same view lets you change the files: + +- The pencil action on a file edits its path, contexts, or load address. +- The reload and remove actions on a file reload or remove its mapping. +- The view's reload button clears and reapplies all symbol mappings so the + agent can load updated files. + +New entries and edits affect only the running session unless they are saved, +see below. + +If a configured file is missing on the VS Code host at startup, a warning +offers to update its path using the file picker. The file may still exist on +a remote TCF agent, so the warning can be dismissed. + +## Save to the debug configuration + +Use **Save Symbol Files to Debug Configuration** (the save button in the +Symbol Files view, also available in the Command Palette) to keep the +session's current list. After confirmation, it replaces `symbolFiles` in the +active session's uniquely named workspace configuration in +`.vscode/launch.json`, including removals, contexts, context queries, +relocation offsets, and absolute load addresses. + +- Saving an empty list clears the configured symbol files. +- Paths are saved as reported by the session, since symbol files are opened + on the agent and may not exist on this host. +- Other configuration properties and surrounding comments are preserved. + +## Files added elsewhere + +Files that are in the agent's memory maps but were not added by this session, +for example with `add-symbol-file` in Simics, by OS awareness, or by another +client, are listed read-only under **Added Elsewhere** in the Symbol Files +view. They are grouped by file. + +The description shows the context, or the number of contexts, and the +relocation offset or lowest mapped address. The tooltip lists the contexts, +the region IDs set by other clients, and the mapped regions. + +## When the memory map changes + +When the agent reports that the memory map changed while the target is +suspended, for example after `add-symbol-file` in Simics, the call stack and +variables are refreshed. The Symbol Files view is refreshed on any memory map +change. + +## Function breakpoints in a symbol file + +Right-click a symbol file that has contexts or a context query to add a +function breakpoint in them, see +[Breakpoints](/debugging/breakpoints#add-a-function-breakpoint-from-a-symbol-file). diff --git a/docs/debugging/breakpoints.md b/docs/debugging/breakpoints.md new file mode 100644 index 0000000..e4486c6 --- /dev/null +++ b/docs/debugging/breakpoints.md @@ -0,0 +1,114 @@ +# Breakpoints + +Breakpoints are kept in sync with the agent's breakpoint table: adding, +editing and removing breakpoints in VS Code changes them in the agent. +Breakpoints apply to all contexts the agent debugs, except function +breakpoints limited to selected contexts and instruction breakpoints, see +below. + +## Kinds of breakpoints + +| Breakpoint | How to set it | +| ----------- | ------------------------------------------------------------------------------------------------------------------- | +| Source line | Click left of a line in the editor. | +| Function | **+** in the Breakpoints view. Enter the function name, or any expression the agent accepts. | +| Data | **Add Data Breakpoint at Address** in the Breakpoints view. It breaks on read or write of the given address range. | +| Instruction | Click left of an instruction in the [Disassembly view](/debugging/disassembly). | + +Breakpoints can have: + +- A condition, which is evaluated by the agent. +- A hit count `N` or `>= N`. The breakpoint breaks from the N:th hit. +- A log message, which makes it a [logpoint](#logpoints). + +## Verified breakpoints + +A breakpoint is shown as verified when the agent reports at least one planted +instance. The line is moved to where the agent planted it, for example from a +line without code to the next line with code. Errors from the agent (unknown +file, line without code, invalid expression) are shown on the breakpoint. + +## Logpoints + +Logpoints are planted as breakpoints. When one is hit, the message is printed +to the Debug Console, with `{expression}` evaluated by the agent, and the +target is resumed. A step that is interrupted by a logpoint stops there. + +## Function breakpoints + +Function breakpoints stop at the first instruction of the function. + +### Limit a function breakpoint to selected contexts + +Use **Simics Target Debug: Add Function Breakpoint in Context...** from the +Command Palette, the Breakpoints toolbar, or a stack frame's context menu. It +opens the [context picker](/configuration/contexts#the-context-picker), with +the selected call-stack context as the suggested choice, and then asks for +the symbol. + +![The Breakpoints view with two buttons marked](../images/breakpoints.png){width=298} + +The marked buttons in the title of the Breakpoints view are **Add Function +Breakpoint in Context...** (left) and **Edit Function Breakpoint +Contexts...** (right). The buttons show when the pointer is over the view. + +The contexts are part of the name of the breakpoint, which the Breakpoints +view shows: + +| Name | Stops in | +| ------------------------------------------- | ------------------------------------------- | +| `start_kernel` | All contexts. | +| `start_kernel @ board.cpu[0]` | The context with this ID. | +| `start_kernel @ board.cpu[0], board.cpu[1]` | The listed contexts. | +| `start_kernel @? **/HasState=true` | The contexts that match the context query. | + +The same syntax can be entered or edited using the built-in function +breakpoint **+** or **Edit Function Breakpoint...**. + +- The ` @ ` suffix holds exact TCF context IDs, which are saved with the + breakpoint; selecting another frame does not change its scope. Context IDs + that contain commas cannot be used. +- The scope applies to the listed contexts (and, for a process context, its + threads), not to other cores. +- The agent must be able to limit breakpoints to contexts (`ContextIds`) or + to a context query (`ContextQuery`). If it cannot, the breakpoint gets an + error. It is never set in all contexts instead. + +### Change the contexts of a function breakpoint + +Use **Simics Target Debug: Edit Function Breakpoint Contexts...** from the +Command Palette or the edit icon in the Breakpoints toolbar. VS Code does not +tell extensions which breakpoint is selected in the Breakpoints view, so the +command asks for the function breakpoint when there is more than one. + +The context picker starts with the breakpoint's current contexts or query. +In its checklist, contexts that are not in the current session stay listed so +they are not dropped by accident. The breakpoint is replaced by one with the +new name and the same enabled state, condition, hit count, and log message, +so it moves to the end of the Breakpoints view. + +### Add a function breakpoint from a symbol file + +In the [Symbol Files](/configuration/symbol-files) view, right-click a +symbol file that has contexts or a context query and select **Add Function +Breakpoint...** to enter a symbol directly. The breakpoint uses the file's +contexts or query rather than the selected call-stack core. Context names are +resolved to exact TCF IDs; unavailable or ambiguous contexts produce an error +instead of creating a global breakpoint. Files for all contexts do not offer +this action. + +## Instruction breakpoints + +An address only has a meaning in one address space, so an instruction +breakpoint is limited to the process of the context shown in the Disassembly +view, and to the threads of that process. Without OS awareness the process of +a CPU context is the CPU itself. Agents that do not support limiting +breakpoints to contexts get the breakpoint in all contexts. + +## Limitations + +- There are no exception breakpoints. +- Breakpoints created by other TCF clients (or the Simics CLI) are not shown. + +The breakpoint properties sent to the agent are listed in +[TCF services](/reference/tcf-services#breakpoints). diff --git a/docs/debugging/call-stack.md b/docs/debugging/call-stack.md new file mode 100644 index 0000000..8289fd8 --- /dev/null +++ b/docs/debugging/call-stack.md @@ -0,0 +1,108 @@ +# Call stack + +The Call Stack view shows the parts of the target that can run and be +stopped: processors and, with OS awareness, the processes and threads of the +operating system. They are shown as a tree that follows the structure of the +target. Parts with several threads, such as a board with several CPUs, an OS +awareness tracker or a multi-threaded process, are shown as groups that can +be expanded. Expand a thread to see its call stack. + +## How the tree is built + +To keep the tree short: + +- Only parts with at least two threads get a group. A part with a single + thread, such as most Linux processes, gets no group: its thread is listed + in the group above. +- A thread listed in a group above is named by the parts in between, so + thread `worker` of process `p3` is listed as `p3.worker`. A repeated name, + such as process `init` with thread `init`, is shown once. +- If a group would hold only one thread next to other groups, that thread + gets a row of its own, with its call stack right below it. + +In a group, the threads are listed first, then the single threads with rows +of their own, then the other groups, each in the order of the target. + +Groups come and go as processes and threads start and end. All groups share +the breakpoints and the Debug Console. Stopping or restarting any of them +stops or restarts the whole debug session. + +## Example + +Take this target with a Linux OS awareness tracker, with simplified names: + +```text +Linux +├── Kernel +│ ├── Other ── core[0][0] +│ ├── Idle ──┬── core[0][0] +│ │ └── core[1][0] +│ └── Threads ──┬── kthreadd +│ └── kworker/0:0 +└── Userspace ──┬── init ── init + ├── rc ── rc + └── udevd ── udevd +``` + +The Call Stack view shows it like this: + +```text +Linux group, in the row of the debug configuration +├── Kernel group +│ ├── Other.core[0][0] single thread with a row of its own +│ ├── Idle group +│ │ ├── core[0][0] thread +│ │ └── core[1][0] thread +│ └── Threads group +│ ├── kthreadd thread +│ └── kworker/0:0 thread +└── Userspace group + ├── init thread + ├── rc thread + └── udevd thread +``` + +`Other` and the processes in `Userspace` have a single thread each, so they +get no group. The thread of `Other` is next to the groups `Idle` and +`Threads`, so it gets a row of its own. + +In VS Code it looks like this. The thread `init` has stopped at a breakpoint +and is expanded to show its call stack: + +![The example target in the Call Stack view](../images/call-stack.png){width=298} + +## Layout settings + +Two settings change the layout. You find them under **Call Stack** in the +[settings](/configuration/settings). They are read when a debug session +starts. + +- Turning off `simics-target-debug.callStack.hierarchy` shows no groups. All + threads are listed directly under the debug configuration, named by all the + parts above them, like `board.cpu0`. In the example, the threads are named + `Linux.Kernel.Idle.core[0][0]`, `Linux.Userspace.init.init` and so on. +- Turning off `simics-target-debug.callStack.compact` gives every group a row + of its own. By default, a group that is alone in its parent shares the + parent's row and shows its own name only, like `Linux` in the example. When + off, the name of the debug configuration gets a row of its own above + `Linux`. + +## Stack frames + +VS Code first loads the top frame of a suspended thread and then the rest in +pages (**Load More Stack Frames**). + +Each frame shows its function name and source line. For caller frames, the +line of the call is shown. Frames without source are shown dimmed, and frames +without a known function show the address instead. To get the address of any +frame (the PC, or the return address for caller frames), right-click it and +select **Copy Address**. + +Selecting a frame shows the +[local variables and registers](/debugging/variables) of that frame, as +unwound by the agent. If the agent has no `StackTrace` service, or if it +fails, a single frame for the PC is shown. + +When the source file of a frame is not found on this host, you can +[locate it](/configuration/path-mapping#locate-a-source-file), which adds a +path map rule. diff --git a/docs/debugging/disassembly.md b/docs/debugging/disassembly.md new file mode 100644 index 0000000..c4a44a4 --- /dev/null +++ b/docs/debugging/disassembly.md @@ -0,0 +1,47 @@ +# Disassembly + +When the agent offers the `Disassembly` service, open a stack frame's context +menu and select **Open Disassembly View**. The view shows decoded +instructions, and opcode bytes when the agent provides them. It works without +source files. + +The view shows the code of the context of the frame it was opened from, so +several CPUs can be inspected. + +Click left of an instruction to set an +[instruction breakpoint](/debugging/breakpoints#instruction-breakpoints). +While the view has focus, the step commands +[step by instruction](/debugging/stepping). + +## Function headers + +Function entries get a header row, like in `objdump`, when the agent offers +the `Symbols` service. VS Code shows the header through its source line +support, which puts the line number first: + +- `22: dummy-prog1.c: ` gives the source line and file of the entry. +- `1: ` is shown when there is no line information. + +Double-clicking a header opens a read-only document with the header on that +line. Inlined functions get no header. + +The headers need the VS Code setting `debug.disassemblyView.showSourceCode`, +which is on by default. Turn them off with the setting +`simics-target-debug.disassembly.functionHeaders`, see +[Settings](/configuration/settings), to save the symbol lookups. + +## Instruction sets with variable length + +On instruction sets with variable length (x86), the instructions before an +address have to be found by decoding from an earlier address, which can get +out of step with the real instructions. The extension keeps decoding in step +with addresses known to start an instruction: PCs where a context stopped, +and line starts from the debug information. + +## Speed + +Some agents take long per request, for example with slow symbol lookup in +large modules, so the disassembly is cached per context. Code rarely changes, +so the cache is kept when stepping. After a resume or a memory write, cached +instructions are only used once their opcode bytes are found unchanged in +target memory. A memory map change clears the cache. diff --git a/docs/debugging/simics-console.md b/docs/debugging/simics-console.md new file mode 100644 index 0000000..31db8c0 --- /dev/null +++ b/docs/debugging/simics-console.md @@ -0,0 +1,60 @@ +# Simics console + +When the agent has the Simics `CommandLine` service, the Simics command line +opens in a terminal named **Simics CLI** after attaching. Simics does all +line editing, history and tab completion. + +The console uses the debug session's connection. When the session ends, it +stays open, read-only and grayed out. + +## The Consoles view + +The **Consoles** view in the Run and Debug side bar lists the console of each +agent and its state. Click a console to show it, or to connect it when it is +not open or disconnected. + +![The Consoles view](../images/consoles.png){width=298} + +The button in the title of the view opens the +[settings](/configuration/settings). The buttons on a console are the lock +button, which switches the editing keys, and **Clear History**. They show +when the pointer is over the console, or when it is selected. + +## Options + +The options of the console are the `simics-target-debug.console.*` +[settings](/configuration/settings), under **Console**. + +| Setting | Default | Description | +| --------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------ | +| `simics-target-debug.console.open` | `true` | Open the console after attaching. When off, open it from the Consoles view. | +| `simics-target-debug.console.historySessions` | `3` | How many earlier sessions with the same agent to show above the command line. 0 turns it off. | +| `simics-target-debug.console.editingKeys` | `true` | Send editing keys to Simics instead of VS Code while the console has focus. | + +When `open` is on, the Debug Console does not open at start. + +## History of earlier sessions + +The next session with the same agent shows the output of earlier sessions +above the command line, also after a window reload. `historySessions` sets +how many. **Clear History** in the Consoles view deletes them. + +## Keys + +- Ctrl+C copies the selection and stops the simulation. Ctrl+D is not sent. +- With `editingKeys` on, Ctrl+E, F, G, K, P, R and W (and Ctrl+\_ on Windows) + go to Simics instead of VS Code while the console has focus. The lock + button in the Consoles view switches the setting, in the workspace settings + if they set it, else in the user settings. + +## Stay in the console when the target stops + +When the target stops, VS Code moves the focus to the editor. To keep the +focus in the console, so that Enter repeats for example `step-line`, turn off +the VS Code setting `debug.focusEditorOnBreak`. + +## TCF trace + +The console's TCF traffic and the Simics log events are left out of the +[TCF trace](/configuration/settings#tcf-trace) unless the silence list is +changed. diff --git a/docs/debugging/snapshots.md b/docs/debugging/snapshots.md new file mode 100644 index 0000000..6cda031 --- /dev/null +++ b/docs/debugging/snapshots.md @@ -0,0 +1,46 @@ +# Snapshots + +The **Snapshots** view in the Run and Debug side bar lists the Simics +snapshots of the agent. Use it to take, restore and delete snapshots without +typing commands in the Simics CLI. Snapshots that are taken or deleted +elsewhere, for example in the Simics CLI, show up in the view too. + +Snapshots need the Simics TCF agent with the snapshot commands of its +`SimUtils` service. With other agents, and with Simics versions that lack +these commands, the view says that snapshots are not available and the +buttons to take one are disabled. + +![The Snapshots view](../images/snapshots.png){width=298} + +The buttons in the title of the view are, from the left, **Take Snapshot**, +**Take Named Snapshot...**, **Delete All Snapshots...** and **Refresh +Snapshots**. The buttons on a snapshot are **Restore Snapshot** and **Delete +Snapshot**. They show when the pointer is over the snapshot, or when it is +selected. + +## Take a snapshot + +Use the buttons in the title of the view: + +- **Take Snapshot** takes a snapshot with a free name, picked like the Simics + command `take-snapshot` does: `snapshot`, `snapshot1`, `snapshot2` and so + on. +- **Take Named Snapshot...** asks for the name, and suggests a free one. The + name must not be used by another snapshot, and cannot start or end with + white space. + +## Restore and delete a snapshot + +Each snapshot in the view has two buttons: + +- **Restore Snapshot** restores the snapshot. +- **Delete Snapshot** deletes it, after asking. + +**Delete All Snapshots...** in the title of the view deletes all snapshots of +the agent, after asking. This cannot be undone. + +## From the Command Palette + +The commands are also in the Command Palette, for example **Simics Target +Debug: Take Snapshot**. **Restore Snapshot** and **Delete Snapshot** then ask +which snapshot to use. **Refresh Snapshots** lists the snapshots again. diff --git a/docs/debugging/stepping.md b/docs/debugging/stepping.md new file mode 100644 index 0000000..f123ba7 --- /dev/null +++ b/docs/debugging/stepping.md @@ -0,0 +1,31 @@ +# Stepping + +**Step Over** and **Step Into** step by source line, and **Step Out** steps +out of the current function. When VS Code asks for instruction granularity, +as it does while the Disassembly view has focus, Step Over and Step Into step +by instruction instead. + +## What line stepping needs + +Line stepping requires that the agent knows the symbol files for the target, +for example loaded with `add-symbol-file` in Simics or with +[`symbolFiles`](/configuration/symbol-files) in the debug configuration. + +If the context does not support line stepping, instruction stepping is used +instead. The Simics agent itself falls back to instruction stepping when +there is no line information for the current PC. + +## Things to know + +- A line step only completes when execution reaches another line, so + stepping over a line that loops forever keeps the target running until it + is paused. +- A line can have several code addresses (for example several line table + rows for one statement), and the agent plants a line breakpoint at all of + them. A step from the first address then stops at the next one on the same + line with reason "breakpoint"; step again to continue. +- A step that is interrupted by a [logpoint](/debugging/breakpoints#logpoints) + stops there. + +The TCF resume mode used for each step is listed in +[TCF services](/reference/tcf-services#stepping). diff --git a/docs/debugging/target-memory.md b/docs/debugging/target-memory.md new file mode 100644 index 0000000..9caea97 --- /dev/null +++ b/docs/debugging/target-memory.md @@ -0,0 +1,94 @@ +# Target Memory + +The Target Memory view is a hex view of target memory. Unreadable bytes are +shown as `??`. + +![The Target Memory view with two parts marked](../images/target-memory.png) + +1. The toolbar. From the left: the memory to show, the address box, the + number of bytes per group, the byte order and the number of bytes per row. + The buttons on the right read memory again, open the find box, and show or + hide the data inspector. +2. The data inspector. + +The bar at the bottom shows which memory is shown, the address of the cursor, +and how changed and modified bytes are marked. + +## Open the view + +- **Simics Target Debug: Open Target Memory** in the Command Palette, also in + the debug toolbar, opens the view. +- **Open in Target Memory** in the context menu of the Variables view shows + what a pointer points to, or where any other variable is stored, with the + variable's bytes selected. +- **New Target Memory View** in the editor title bar of the view opens + another one. + +## Select the memory + +The view shows the memory of the focused thread, or of a physical memory +context (for example a Simics memory space) selected in the drop-down list. +Physical memory contexts have full names like the threads in the call stack, +for example `board.mb.phys_mem`. + +## Go to an address + +Enter an address (`0x1000`, or decimal) or an expression (`&buffer`, `$sp`) +evaluated in the selected frame, and press Enter to go there. Ctrl+G moves to +the address box. You can also scroll anywhere in the address space. + +Ctrl+G and Ctrl+F are keybindings of the view +(`simics-target-debug.targetMemory.goto` and +`simics-target-debug.targetMemory.find`). They are active while the view is +the active editor, so they replace VS Code's Go to Line and Find there. + +## When memory is read + +Memory is read again automatically when the target stops, when another thread +gets the focus and when the agent reports that memory changed. Bytes that +changed are shown in red. The refresh button reads memory again on demand. + +While the target runs, thread memory is dimmed and cannot be changed; +physical memory can still be read. + +## Layout + +Group 1, 2, 4 or 8 bytes. Groups are shown as numbers in little (default) or +big endian. The number of bytes per row is fixed or fits the width. + +## Edit memory + +Edit memory by typing hex digits over the groups, or text in the text column. + +- Click a digit, or move with Left/Right, to put the caret on it; typing + replaces just that digit. +- Up/Down keep the digit, Ctrl+Left/Right move by group and Shift+arrows + select. +- Backspace moves back one digit and restores its original value. + +Changed bytes are shown underlined until written: an Apply/Discard bar +appears. Enter applies the changes and Escape discards them. + +## Find + +Ctrl+F finds: + +- Hex numbers, in the selected byte order, so `12345678` in little endian is + the bytes `78 56 34 12`. Single bytes such as `de ad be ef` are a byte + sequence. +- ASCII text. +- An 8 to 64-bit integer. + +The search can be limited to aligned addresses, for example to find an 8-byte +integer only at multiples of 8, and to a range (by default the low 1 TiB). +Enter and Shift+Enter search forward and backward from the selection and wrap +around in the range. The buttons next to the range fields set it to start or +end at the cursor; a hint offers that when the cursor is outside the range. + +The search shows its progress. Memory-mapped I/O is not read. + +## Data inspector and copy + +The data inspector shows the bytes at the cursor as integers and floating +point numbers. Right-click for the copy commands (hex, text or address); they +act on the right-clicked entry, or on the selection if it is in it. diff --git a/docs/debugging/variables.md b/docs/debugging/variables.md new file mode 100644 index 0000000..5993ce5 --- /dev/null +++ b/docs/debugging/variables.md @@ -0,0 +1,40 @@ +# Variables and expressions + +The agent does all parsing and evaluation of variables and expressions. +Values are read when the thread is suspended and are refreshed after each +resume or step. + +## Local variables + +The **Locals** scope in the Variables view lists the local variables and +arguments of the selected stack frame. + +- Values are formatted using their type: integers, characters, booleans, + enumerators (by name), floating point numbers and pointers. Structs, unions + and arrays are summarized as `{...}` and `[N]`. +- Structs, unions, arrays and non-null pointers can be expanded. Pointers to + structs expand directly to the members. Arrays with more than 100 elements + are shown in pages. + +To see what a pointer points to, or where any other variable is stored, +right-click it and select **Open in Target Memory**, see +[Target Memory](/debugging/target-memory). + +## Registers + +The **Registers** scope shows the registers of the selected frame as a tree. +Register groups without a readable value (for example Simics register groups) +are shown as expandable groups. Registers with fields can be expanded to show +the fields. + +## Watch, hover and the Debug Console + +Watch expressions, hovers and expressions typed in the Debug Console are +evaluated in the selected frame. **Add to Watch** and **Copy as Expression** +use a readable expression such as `s->corners[2].x`. + +## Limitations + +- Variables and registers are read-only, there is no **Set Value**. +- `char *` and `char[]` are not shown as strings; expand them to see the + characters. diff --git a/docs/getting-started.md b/docs/getting-started.md new file mode 100644 index 0000000..2b412ed --- /dev/null +++ b/docs/getting-started.md @@ -0,0 +1,97 @@ +# Getting started + +Simics Target Debug is a VS Code debugger extension that connects to a +[TCF](https://download.eclipse.org/tools/tcf/tcf-docs/) agent, for example +the Simics TCF agent. This page takes you from installing the extension to a +running debug session. + +## Requirements + +- VS Code 1.90 or later. +- A target with a TCF agent that VS Code can reach over TCP, for example a + Simics session. +- Node.js 24 or later and npm, to build the extension. + +## Install the extension + +The extension is installed from a `.vsix` file that you build from the +[repository](https://github.com/intel/simics-vs-code-tcf-debug). Clone it, +then run these commands from its root directory: + +```sh +npm ci +npm run package +``` + +This creates `simics-target-debug-.vsix`. Install it in VS Code: + +1. Press Ctrl + Shift + P to open the + Command Palette. +2. Run **Extensions: Install from VSIX...**. +3. Select the generated `.vsix` file. + +## Start the TCF agent + +Start a TCF agent, for example in Simics: + +```text +simics> new-tcf-agent +``` + +The agent listens on TCP port 1534 by default. Use +`new-tcf-agent parameters = "TCP::"` to select another port. + +## Attach to the agent + +Start debugging with a launch configuration like this one in +`.vscode/launch.json`: + +```json +{ + "type": "simics-target-debug", + "request": "attach", + "name": "Attach to TCF agent", + "host": "localhost", + "port": 1534 +} +``` + +Without a `launch.json`, selecting the "Simics Target Debug" debugger +attaches to `localhost:1534`. + +When the session has attached, the [Call Stack](/debugging/call-stack) view +shows the parts of the target that can run and be stopped. If the agent has +the Simics `CommandLine` service, the +[Simics console](/debugging/simics-console) opens in a terminal. + +The debugger uses only standard TCF services. The Simics console and +[snapshots](/debugging/snapshots) need the Simics agent, and are not +available with other agents. + +## Where to find things + +![VS Code during a debug session, with four parts marked](./images/overview.png) + +1. The [Call Stack](/debugging/call-stack) view shows the processors, + processes and threads of the target. +2. **Open Target Memory** in the debug toolbar opens the + [Target Memory](/debugging/target-memory) view. +3. The extension adds four views to the Run and Debug side bar: + [Path Maps](/configuration/path-mapping#the-path-maps-view), + [Symbol Files](/configuration/symbol-files#add-symbol-files-while-debugging), + [Consoles](/debugging/simics-console#the-consoles-view) and + [Snapshots](/debugging/snapshots). Click a title to open the view. +4. The [Simics console](/debugging/simics-console) is a terminal in the + panel. + +## Next steps + +- Source lines, line stepping and variables need symbol files. Load them + with `add-symbol-file` in Simics, or from the debug configuration, see + [Symbol files](/configuration/symbol-files). +- If the sources are not at the path compiled into the debug information, + add [path mapping](/configuration/path-mapping) rules. +- [Launch configurations](/configuration/launch-configurations) lists the + attributes of a debug configuration and describes the form to edit them. +- [Settings](/configuration/settings) lists the options that are the same + for all debug sessions. diff --git a/docs/images/breakpoints.png b/docs/images/breakpoints.png new file mode 100644 index 0000000..e384e0f Binary files /dev/null and b/docs/images/breakpoints.png differ diff --git a/docs/images/call-stack.png b/docs/images/call-stack.png new file mode 100644 index 0000000..024dc0b Binary files /dev/null and b/docs/images/call-stack.png differ diff --git a/docs/images/consoles.png b/docs/images/consoles.png new file mode 100644 index 0000000..52a082c Binary files /dev/null and b/docs/images/consoles.png differ diff --git a/docs/images/context-picker.png b/docs/images/context-picker.png new file mode 100644 index 0000000..d3a55c5 Binary files /dev/null and b/docs/images/context-picker.png differ diff --git a/docs/images/launch-configurations.png b/docs/images/launch-configurations.png new file mode 100644 index 0000000..30608a2 Binary files /dev/null and b/docs/images/launch-configurations.png differ diff --git a/docs/images/overview.png b/docs/images/overview.png new file mode 100644 index 0000000..2a023a3 Binary files /dev/null and b/docs/images/overview.png differ diff --git a/docs/images/path-maps.png b/docs/images/path-maps.png new file mode 100644 index 0000000..5765295 Binary files /dev/null and b/docs/images/path-maps.png differ diff --git a/docs/images/snapshots.png b/docs/images/snapshots.png new file mode 100644 index 0000000..3c10c58 Binary files /dev/null and b/docs/images/snapshots.png differ diff --git a/docs/images/symbol-files.png b/docs/images/symbol-files.png new file mode 100644 index 0000000..f333871 Binary files /dev/null and b/docs/images/symbol-files.png differ diff --git a/docs/images/target-memory.png b/docs/images/target-memory.png new file mode 100644 index 0000000..31a07f8 Binary files /dev/null and b/docs/images/target-memory.png differ diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..e516da8 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,44 @@ +--- +layout: home + +hero: + name: Simics Target Debug + text: Debug targets through a TCF agent + tagline: A VS Code debugger extension that connects to a TCF agent, such as the Simics TCF agent. + actions: + - theme: brand + text: Get started + link: /getting-started + - theme: alt + text: View on GitHub + link: https://github.com/intel/simics-vs-code-tcf-debug + +features: + - title: Call stack + details: Processors and, with OS awareness, the processes and threads of the operating system, in a tree that follows the structure of the target. + link: /debugging/call-stack + - title: Breakpoints + details: Source line, function, data and instruction breakpoints, with conditions, hit counts and logpoints. Function breakpoints can be limited to selected contexts. + link: /debugging/breakpoints + - title: Variables and expressions + details: Local variables, registers, watch expressions and hovers, evaluated by the agent in the selected frame. + link: /debugging/variables + - title: Disassembly + details: Decoded instructions with function headers, instruction breakpoints and stepping by instruction. + link: /debugging/disassembly + - title: Target Memory + details: A hex view to inspect, edit and search the memory of a thread or a physical memory space. + link: /debugging/target-memory + - title: Simics console + details: The Simics command line in a VS Code terminal, on the connection of the debug session. + link: /debugging/simics-console + - title: Snapshots + details: Take, restore and delete Simics snapshots from a view in Run and Debug. + link: /debugging/snapshots + - title: Symbol files + details: Load symbol files from the debug configuration or during a session, for all contexts or for selected ones. + link: /configuration/symbol-files + - title: Path mapping + details: Map the source paths in the debug information to the files on your host. + link: /configuration/path-mapping +--- diff --git a/docs/reference/limitations.md b/docs/reference/limitations.md new file mode 100644 index 0000000..7bf3ec6 --- /dev/null +++ b/docs/reference/limitations.md @@ -0,0 +1,12 @@ +# Limitations + +- No exception breakpoints. +- Breakpoints created by other TCF clients (or the Simics CLI) are not shown. +- Variables and registers are read-only, there is no **Set Value**. +- `char *` and `char[]` are not shown as strings; expand them to see the + characters. +- No **Restart Frame**. +- The `pathMap` rules of the debug configuration are read when attaching. Use + the [Path Maps view](/configuration/path-mapping#the-path-maps-view) to + change the rules of a running session. +- Only TCP transport. diff --git a/docs/reference/tcf-services.md b/docs/reference/tcf-services.md new file mode 100644 index 0000000..0fa22af --- /dev/null +++ b/docs/reference/tcf-services.md @@ -0,0 +1,62 @@ +# TCF services + +The extension implements the VS Code Debug Adapter Protocol (DAP) and +translates DAP requests to commands of the +[Target Communication Framework](https://download.eclipse.org/tools/tcf/tcf-docs/) +(TCF). The debugger uses standard TCF services, so it should work with any +agent that follows the TCF specification. The +[Simics console](/debugging/simics-console) and +[snapshots](/debugging/snapshots) need services that only the Simics agent +has. + +Turn on the [TCF trace](/configuration/settings#tcf-trace) to see the +messages between VS Code and the agent. + +## VS Code features + +| VS Code (DAP) | TCF | +| ----------------------------- | ------------------------------------------------------------------------------------- | +| attach | TCP connection + `Locator.Hello` | +| threads | `RunControl` contexts with `HasState`, see [Call stack](/debugging/call-stack) | +| pause / continue | `RunControl.suspend` / `RunControl.resume` | +| step over / into / out | `RunControl.resume` with a step mode, see [below](#stepping) | +| stopped / continued | `contextSuspended`, `containerSuspended`, `contextResumed`, `containerResumed` events | +| call stack | `StackTrace.getChildrenRange` / `getChildren` / `getContext` | +| Locals scope | `Expressions.getChildren` of the selected frame | +| watch / hover / Debug Console | `Expressions.create` / `evaluate` in the selected frame | +| Registers scope | `Registers.getChildren` / `getContext` / `get` for the selected frame | +| disassembly | `Disassembly.disassemble` in the frame's context | +| breakpoints | `Breakpoints.add` / `change` / `remove`, `status` events, see [below](#breakpoints) | +| Target Memory | `Memory.get` / `set` / `getChildren` / `getContext`, `memoryChanged` events | +| symbol files | `MemoryMap.set` / `get` | +| path mapping | `PathMap.set` / `get` | +| context queries | `ContextQuery.query` | +| Simics console | Simics `CommandLine` service | +| Snapshots | Simics `SimUtils.getSnapshotIDs` / `takeSnapshot` / `restoreSnapshot` / `deleteSnapshot`, `snapshotsChanged` events | + +## Stepping + +Steps are sent to the thread's own run control context. + +| VS Code | TCF resume mode (default) | TCF resume mode (instruction granularity) | +| --------- | ------------------------- | ----------------------------------------- | +| Step Over | `RM_STEP_OVER_LINE` (3) | `RM_STEP_OVER` (1) | +| Step Into | `RM_STEP_INTO_LINE` (4) | `RM_STEP_INTO` (2) | +| Step Out | `RM_STEP_OUT` (5) | `RM_STEP_OUT` (5) | + +## Breakpoints + +| VS Code | TCF breakpoint properties | +| ----------------------- | ----------------------------------------------------------------- | +| Source line breakpoint | `File` (path as in VS Code), `Line`, `Column` | +| Function breakpoint | `Location` = the function name (any expression the agent accepts) | +| Data breakpoint | `Location` = address, `Size`, `AccessMode` read/write | +| Instruction breakpoint | `Location` = address, `ContextIds` = the process and its threads | +| Condition | `Condition`, evaluated by the agent | +| Hit count `N` or `>= N` | `IgnoreCount` = N - 1 (break from the N:th hit) | +| Logpoint | a normal breakpoint, the message is printed by the extension | + +The contexts of a +[scoped function breakpoint](/debugging/breakpoints#limit-a-function-breakpoint-to-selected-contexts) +are sent as the breakpoint's `ContextIds`, and a context query as its +`ContextQuery`. diff --git a/package-lock.json b/package-lock.json index 7231242..7bcb0d1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,8 +24,10 @@ "@vscode/vsce": "^4.1.0", "esbuild": "^0.28.2", "fast-check": "4.10.2", + "playwright-core": "^1.65.1", "prettier": "^3.9.10", - "typescript": "^7.0.2" + "typescript": "^7.0.2", + "vitepress": "2.0.0-alpha.21" }, "engines": { "vscode": "^1.90.0" @@ -210,6 +212,77 @@ "node": ">=20" } }, + "node_modules/@babel/helper-string-parser": { + "version": "7.29.15", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.15.tgz", + "integrity": "sha512-C2FuapQ2Kh1OnVHAoLi5rD3GBJ8COb9Q609T6HEpLqaBAo560PDP5OxBE5dCI/h951MBO/+bCUYU5SZ+8ZlV+w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", + "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.29.15", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.15.tgz", + "integrity": "sha512-RpKWyisHoP81twtSCgmE02iU0RnPcq1DN5bBEbpUePrjA9Q3wXhufnCJrrayPpoZieqFh3zyZQqwtSK0gGccRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.15" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/types": { + "version": "7.29.15", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.15.tgz", + "integrity": "sha512-/XKpKDakL//LZ66bq1XsZOswuqeI5MZqPLDu18o3XdkU1fNJ7bdPtzgnc4ZNS+bBGHV0FJG8jjb8SwcC3nNVQQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.29.15", + "@babel/helper-validator-identifier": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@docsearch/css": { + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/@docsearch/css/-/css-4.7.1.tgz", + "integrity": "sha512-AsMPnbNmVLDNjhtgfq4ZRskNvWR8vuK6riEegHp3kjBFtxbmTWPzZ5s1FJ04SGr2D0ZXglueUNISsV2sDgV6Jw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@docsearch/js": { + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/@docsearch/js/-/js-4.7.1.tgz", + "integrity": "sha512-3FWRs18TuemPlLP5NeQG3+aYarmp3gTGnYLnZTLVlTnbFLWAgHafxUdFDWqtsqyvsbCMAeHyzwrX6MG6BuZfZA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@docsearch/sidepanel-js": { + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/@docsearch/sidepanel-js/-/sidepanel-js-4.7.1.tgz", + "integrity": "sha512-uyOKbC6rjHCZBVbLCSZVb1NDWzjbD27WqxTuRYnkTW717laEj2dX+W8Ho1fNHSyG4dqssIlPWlXdg+McGxxxxg==", + "dev": true, + "license": "MIT" + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.28.2", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.2.tgz", @@ -652,6 +725,23 @@ "node": ">=18" } }, + "node_modules/@iconify-json/simple-icons": { + "version": "1.2.104", + "resolved": "https://registry.npmjs.org/@iconify-json/simple-icons/-/simple-icons-1.2.104.tgz", + "integrity": "sha512-WBozLa9oBsb6XuY+lnH7maIiYmabee0k276PvVVw+34oGAXNRnfJeilEOB4iQs2wFNU/8M/vQFVy66SHGJaDRw==", + "dev": true, + "license": "CC0-1.0", + "dependencies": { + "@iconify/types": "*" + } + }, + "node_modules/@iconify/types": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@iconify/types/-/types-2.0.0.tgz", + "integrity": "sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==", + "dev": true, + "license": "MIT" + }, "node_modules/@isaacs/nonrecursive-glob-match": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@isaacs/nonrecursive-glob-match/-/nonrecursive-glob-match-1.0.3.tgz", @@ -659,6 +749,13 @@ "dev": true, "license": "BlueOak-1.0.0" }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz", + "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==", + "dev": true, + "license": "MIT" + }, "node_modules/@napi-rs/keyring": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/@napi-rs/keyring/-/keyring-1.3.0.tgz", @@ -906,281 +1003,769 @@ "node": ">= 10" } }, - "node_modules/@secretlint/core": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/@secretlint/core/-/core-10.2.2.tgz", - "integrity": "sha512-6rdwBwLP9+TO3rRjMVW1tX+lQeo5gBbxl1I5F8nh8bgGtKwdlCMhMKsBWzWg1ostxx/tIG7OjZI0/BxsP8bUgw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@secretlint/profiler": "^10.2.2", - "@secretlint/types": "^10.2.2", - "debug": "^4.4.1", - "structured-source": "^4.0.0" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@secretlint/profiler": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/@secretlint/profiler/-/profiler-10.2.2.tgz", - "integrity": "sha512-qm9rWfkh/o8OvzMIfY8a5bCmgIniSpltbVlUVl983zDG1bUuQNd1/5lUEeWx5o/WJ99bXxS7yNI4/KIXfHexig==", - "dev": true, - "license": "MIT" - }, - "node_modules/@secretlint/secretlint-rule-no-dotenv": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/@secretlint/secretlint-rule-no-dotenv/-/secretlint-rule-no-dotenv-10.2.2.tgz", - "integrity": "sha512-KJRbIShA9DVc5Va3yArtJ6QDzGjg3PRa1uYp9As4RsyKtKSSZjI64jVca57FZ8gbuk4em0/0Jq+uy6485wxIdg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@secretlint/types": "^10.2.2" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@secretlint/secretlint-rule-preset-recommend": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/@secretlint/secretlint-rule-preset-recommend/-/secretlint-rule-preset-recommend-10.2.2.tgz", - "integrity": "sha512-K3jPqjva8bQndDKJqctnGfwuAxU2n9XNCPtbXVI5JvC7FnQiNg/yWlQPbMUlBXtBoBGFYp08A94m6fvtc9v+zA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@secretlint/source-creator": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/@secretlint/source-creator/-/source-creator-10.2.2.tgz", - "integrity": "sha512-h6I87xJfwfUTgQ7irWq7UTdq/Bm1RuQ/fYhA3dtTIAop5BwSFmZyrchph4WcoEvbN460BWKmk4RYSvPElIIvxw==", + "node_modules/@oxc-project/types": { + "version": "0.160.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.160.0.tgz", + "integrity": "sha512-gw4k9syEmnckbOgw2A2FU1TBDdX9hfwV9jEn/uio65pguPzwWiXQS3OIJDMEhv9m06tj9XiEe6RoD0YA+LgreA==", "dev": true, "license": "MIT", - "dependencies": { - "@secretlint/types": "^10.2.2", - "istextorbinary": "^9.5.0" - }, - "engines": { - "node": ">=20.0.0" + "funding": { + "url": "https://github.com/sponsors/oxc-project" } }, - "node_modules/@secretlint/types": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/@secretlint/types/-/types-10.2.2.tgz", - "integrity": "sha512-Nqc90v4lWCXyakD6xNyNACBJNJ0tNCwj2WNk/7ivyacYHxiITVgmLUFXTBOeCdy79iz6HtN9Y31uw/jbLrdOAg==", + "node_modules/@rolldown/binding-android-arm-eabi": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.3.4.tgz", + "integrity": "sha512-xCW8CkL/ualx/SbYqeG9iK87lJCZGDQ0soE+kaORJ0Bd+pHALyE4qK7BStmEAyYWLEzZ3/biSIpA6/7GDFvzIg==", + "cpu": [ + "arm" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@types/node": { - "version": "26.6.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-26.6.6.tgz", - "integrity": "sha512-MzQj+8Kx3XI40OmUAE6Qoh58ZMNstNNMwn2nfd3qWsfe7nDNSqJNzes4njhz6AHwrSHOffSLwXU6yb474Q4aog==", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~8.9.0" - } - }, - "node_modules/@types/react": { - "version": "19.3.0", - "resolved": "https://registry.npmjs.org/@types/react/-/react-19.3.0.tgz", - "integrity": "sha512-N0rFCuH9YoxG9/m61l9MfpJKfmLOVU0em7ipIz6TRgSSkvReLB9vL85GB+yr8Bs5leqpvg96JSwF4ZS1s4viQg==", - "dev": true, - "license": "MIT", - "dependencies": { - "csstype": "^3.2.2" - } - }, - "node_modules/@types/react-dom": { - "version": "19.3.0", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.3.0.tgz", - "integrity": "sha512-ZI7bU42mZXXKHn/qNLEw2IrbiINU7X5+vfgdixBHkCNpYWXjKgfQ/P+uyGb5CjOLB9UcnTeg3rylQtV2hym44Q==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "@types/react": "^19.3.0" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@types/vscode": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.90.0.tgz", - "integrity": "sha512-oT+ZJL7qHS9Z8bs0+WKf/kQ27qWYR3trsXpq46YDjFqBsMLG4ygGGjPaJ2tyrH0wJzjOEmDyg9PDJBBhWg9pkQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@typescript/typescript-aix-ppc64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-aix-ppc64/-/typescript-aix-ppc64-7.0.2.tgz", - "integrity": "sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==", + "node_modules/@rolldown/binding-android-arm64": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.3.4.tgz", + "integrity": "sha512-5lifIO+b/prcM9sx/bkPN4w6UEToEfQ3gjhx0+0neuL+dkYskI792CfAq03T51jc8JFcaYXs2hi3l8RjiH/VWQ==", "cpu": [ - "ppc64" + "arm64" ], "dev": true, - "license": "Apache-2.0", + "license": "MIT", "optional": true, "os": [ - "aix" + "android" ], "engines": { - "node": ">=16.20.0" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@typescript/typescript-darwin-arm64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-darwin-arm64/-/typescript-darwin-arm64-7.0.2.tgz", - "integrity": "sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==", + "node_modules/@rolldown/binding-darwin-arm64": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.3.4.tgz", + "integrity": "sha512-RCgxTI4AJQxhVF//BI3ImQOsXTHrF4Eg+f99jBy8WoETA2kSEGFxpnrVmW0leQq/2aBR4R5AC6csmy3rc66e3Q==", "cpu": [ "arm64" ], "dev": true, - "license": "Apache-2.0", + "license": "MIT", "optional": true, "os": [ "darwin" ], "engines": { - "node": ">=16.20.0" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@typescript/typescript-darwin-x64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-darwin-x64/-/typescript-darwin-x64-7.0.2.tgz", - "integrity": "sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==", + "node_modules/@rolldown/binding-darwin-x64": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.3.4.tgz", + "integrity": "sha512-zNPJVVPUaDEj+L0lImoK3rFv2b+Z5gNijI6DWu/fcD3/1TfmRXKb9ZyxbSN+2AhlctqjbNzUvCsMa+EBhnEM4Q==", "cpu": [ "x64" ], "dev": true, - "license": "Apache-2.0", + "license": "MIT", "optional": true, "os": [ "darwin" ], "engines": { - "node": ">=16.20.0" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@typescript/typescript-freebsd-arm64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-freebsd-arm64/-/typescript-freebsd-arm64-7.0.2.tgz", - "integrity": "sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==", + "node_modules/@rolldown/binding-freebsd-x64": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.3.4.tgz", + "integrity": "sha512-upP6g7ZIRy5by1RDQ/EphHIdJ5xK0eUD7sUgfZFWJ49s4XdbYsIvIlAPtrFpayR70Hhf9J22lb4Pm8/9FhrZmg==", "cpu": [ - "arm64" + "x64" ], "dev": true, - "license": "Apache-2.0", + "license": "MIT", "optional": true, "os": [ "freebsd" ], "engines": { - "node": ">=16.20.0" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@typescript/typescript-freebsd-x64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-freebsd-x64/-/typescript-freebsd-x64-7.0.2.tgz", - "integrity": "sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==", + "node_modules/@rolldown/binding-linux-arm-gnueabihf": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.3.4.tgz", + "integrity": "sha512-SAX5C5+poMLCxu8dkPF6h5yst40rkzs+9Y3cbPn2OFSydmHjAEprrGi64zGgnYyPIVZfdGUFqJ2fJbfbnHI+mA==", "cpu": [ - "x64" + "arm" ], "dev": true, - "license": "Apache-2.0", + "license": "MIT", "optional": true, "os": [ - "freebsd" + "linux" ], "engines": { - "node": ">=16.20.0" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@typescript/typescript-linux-arm": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-arm/-/typescript-linux-arm-7.0.2.tgz", - "integrity": "sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==", + "node_modules/@rolldown/binding-linux-arm64-gnu": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.3.4.tgz", + "integrity": "sha512-nwHqdlRZS6GWBef3dG5/pMY6RNTBBUjj7s0Da+m6xsFpe7jx6IC46SLZcCu8f46JOfCovZmwnrz51EzGE+7Fyw==", "cpu": [ - "arm" + "arm64" ], "dev": true, - "license": "Apache-2.0", + "libc": [ + "glibc" + ], + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=16.20.0" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@typescript/typescript-linux-arm64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-arm64/-/typescript-linux-arm64-7.0.2.tgz", - "integrity": "sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==", + "node_modules/@rolldown/binding-linux-arm64-musl": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.3.4.tgz", + "integrity": "sha512-Gr78X2ur/AgLCkmZgHffk/FerIX8S5zb/eII4bCcvJo0ANzeXhTShahdNbpnY6bpiszIAgIfiuKS9ziziWsamw==", "cpu": [ "arm64" ], "dev": true, - "license": "Apache-2.0", + "libc": [ + "musl" + ], + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=16.20.0" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@typescript/typescript-linux-loong64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-loong64/-/typescript-linux-loong64-7.0.2.tgz", - "integrity": "sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==", + "node_modules/@rolldown/binding-linux-ppc64-gnu": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.3.4.tgz", + "integrity": "sha512-o9Wcn8nWrsQasaBRYM4d//FwhlBsTJYWkPVlhlt6FwzpwEoovY4IopRZjk5Fq3+ntRuSDORJjF/nA8sFeF2q6w==", "cpu": [ - "loong64" + "ppc64" ], "dev": true, - "license": "Apache-2.0", + "libc": [ + "glibc" + ], + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=16.20.0" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@typescript/typescript-linux-mips64el": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-mips64el/-/typescript-linux-mips64el-7.0.2.tgz", - "integrity": "sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==", + "node_modules/@rolldown/binding-linux-s390x-gnu": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.3.4.tgz", + "integrity": "sha512-UDWu4jkVcx2kiBKm3Ec//4lVCbeTWj8gmJ9SyLWCdLWtTlyq7fQVeVV/14nXvRtSLErvJ2+yA/Ux5taS31Y17Q==", "cpu": [ - "mips64el" + "s390x" ], "dev": true, - "license": "Apache-2.0", + "libc": [ + "glibc" + ], + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=16.20.0" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@typescript/typescript-linux-ppc64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-ppc64/-/typescript-linux-ppc64-7.0.2.tgz", - "integrity": "sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==", + "node_modules/@rolldown/binding-linux-x64-gnu": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.3.4.tgz", + "integrity": "sha512-W9mGtTa0w4fWh8RLMNPyaEhhcuqUfO07Q4I1bBc4PDMNg7gQSw0yPQNQ3D0qwbkXwxbyL4YrIzc8n6k1vuFExQ==", "cpu": [ - "ppc64" + "x64" ], "dev": true, - "license": "Apache-2.0", + "libc": [ + "glibc" + ], + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=16.20.0" + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-musl": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.3.4.tgz", + "integrity": "sha512-8B+ofyQZ7/aCmkqnyMonPr5zKLqMVNczhRGFNtdIuItiwNn8iQWJawMq2E58r7bxD1XEbtRRsULY/eCWwZQ01Q==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-openharmony-arm64": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.3.4.tgz", + "integrity": "sha512-TlD0FSZaC7o2B4NCe9V5N11ugTnhzTM9ksj4sgRLvrKosDzjEkvlsTX3ehkw4ZlPv8AADimZZTvJGEa16pfXug==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-wasm32-wasi": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.3.4.tgz", + "integrity": "sha512-jwO8P3o53ygo7b5061B7BeaJ1BGv3BKZ6jroFdw/01qWry7Z+qNBlDvulzbTle5s/A0Fc1FRgsTxrke9DvsSbA==", + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@oxc-project/types": "0.160.0" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=23.5.0" + } + }, + "node_modules/@rolldown/binding-win32-arm64-msvc": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.3.4.tgz", + "integrity": "sha512-8adGMrNtrdzi2WD1ozhYapER59gD8Q/DV6SCKJlyG2HqULPdeQUBvMa33lTsiEYwIqTZUaIU2MmvPp5f1wbtXA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-x64-msvc": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.3.4.tgz", + "integrity": "sha512-rIMjtESdXJCIoOiUTroQ1Y1rjVDZkuUVRUxs3APX2vNv175D7TDWvzdELiIhzGq9cUNUFat+co+PTmPHPqSREg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.1.1.tgz", + "integrity": "sha512-glFIJDvLNDtJhT9qrMFWLPbvS+skxgt4L0K8Ei2YtnhPysAJnsI7nyxSJxKj4ADeKX0OLjC4ntRkwpLOoS3rwA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@secretlint/core": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/@secretlint/core/-/core-10.2.2.tgz", + "integrity": "sha512-6rdwBwLP9+TO3rRjMVW1tX+lQeo5gBbxl1I5F8nh8bgGtKwdlCMhMKsBWzWg1ostxx/tIG7OjZI0/BxsP8bUgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@secretlint/profiler": "^10.2.2", + "@secretlint/types": "^10.2.2", + "debug": "^4.4.1", + "structured-source": "^4.0.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@secretlint/profiler": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/@secretlint/profiler/-/profiler-10.2.2.tgz", + "integrity": "sha512-qm9rWfkh/o8OvzMIfY8a5bCmgIniSpltbVlUVl983zDG1bUuQNd1/5lUEeWx5o/WJ99bXxS7yNI4/KIXfHexig==", + "dev": true, + "license": "MIT" + }, + "node_modules/@secretlint/secretlint-rule-no-dotenv": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/@secretlint/secretlint-rule-no-dotenv/-/secretlint-rule-no-dotenv-10.2.2.tgz", + "integrity": "sha512-KJRbIShA9DVc5Va3yArtJ6QDzGjg3PRa1uYp9As4RsyKtKSSZjI64jVca57FZ8gbuk4em0/0Jq+uy6485wxIdg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@secretlint/types": "^10.2.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@secretlint/secretlint-rule-preset-recommend": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/@secretlint/secretlint-rule-preset-recommend/-/secretlint-rule-preset-recommend-10.2.2.tgz", + "integrity": "sha512-K3jPqjva8bQndDKJqctnGfwuAxU2n9XNCPtbXVI5JvC7FnQiNg/yWlQPbMUlBXtBoBGFYp08A94m6fvtc9v+zA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@secretlint/source-creator": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/@secretlint/source-creator/-/source-creator-10.2.2.tgz", + "integrity": "sha512-h6I87xJfwfUTgQ7irWq7UTdq/Bm1RuQ/fYhA3dtTIAop5BwSFmZyrchph4WcoEvbN460BWKmk4RYSvPElIIvxw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@secretlint/types": "^10.2.2", + "istextorbinary": "^9.5.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@secretlint/types": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/@secretlint/types/-/types-10.2.2.tgz", + "integrity": "sha512-Nqc90v4lWCXyakD6xNyNACBJNJ0tNCwj2WNk/7ivyacYHxiITVgmLUFXTBOeCdy79iz6HtN9Y31uw/jbLrdOAg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@shikijs/core": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-4.6.0.tgz", + "integrity": "sha512-bfd4OKgvoyXYiYmMRuleA656P4V7M/Du9lcTl38Ngm6KszMj7bq4J1IGZwSYR4c95Tv5UQALtYNWUwaI9UT3xw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@shikijs/primitive": "4.6.0", + "@shikijs/types": "4.6.0", + "@shikijs/vscode-textmate": "^10.1.0", + "@types/hast": "^3.0.5", + "hast-util-to-html": "^9.0.6" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/@shikijs/engine-javascript": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-4.6.0.tgz", + "integrity": "sha512-K0oqxFoL+kEMdz89mHLFO15Tsbv3kFZ6WR1cXZKMvLSc+oqaM00A6pyga1qSeXB22dP0tTiSApRcGBaKWsEccg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@shikijs/types": "4.6.0", + "@shikijs/vscode-textmate": "^10.1.0", + "oniguruma-to-es": "^4.3.6" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/@shikijs/engine-oniguruma": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-4.6.0.tgz", + "integrity": "sha512-aggd6Q7SuJOXNnsUbfG2XesxBJKBMAw/PDTUo9PyRjMaaJJ2dNrI+q0C+25ARXAK9yLHAlwxc9oRT2u68YKZ7w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@shikijs/types": "4.6.0", + "@shikijs/vscode-textmate": "^10.1.0" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/@shikijs/langs": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-4.6.0.tgz", + "integrity": "sha512-1yMEX3oCVV54LUq/ovfpRkDQoYDkcvjSWFFa/YLUDMiSoRzMi2uxLJYbv41ahT8Lu9lFMaa7hecd3Q39trqUyg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@shikijs/types": "4.6.0" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/@shikijs/primitive": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@shikijs/primitive/-/primitive-4.6.0.tgz", + "integrity": "sha512-c54+TQEo9ToqgfL/AU8FpjnV09+GA9Oa7M5ROkkXteZfp5XzpAJGXjjvZQFQioJOwm/w/6Z3lIzQstAkl8coag==", + "dev": true, + "license": "MIT", + "dependencies": { + "@shikijs/types": "4.6.0", + "@shikijs/vscode-textmate": "^10.1.0", + "@types/hast": "^3.0.5" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/@shikijs/themes": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-4.6.0.tgz", + "integrity": "sha512-qHAVAs80RiGD+IRuH9G+JPDOEc9A/kHsng4EzCUCwB9bLzW6Z0y9WETh2YyCcADJBmfrIaJ1Jp7KBNP6FHkgtQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@shikijs/types": "4.6.0" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/@shikijs/transformers": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@shikijs/transformers/-/transformers-4.6.0.tgz", + "integrity": "sha512-oZ28gYlPOYspv6AD74lCb14AAJugSY/+nJxRWjH42yDbdLAdftVU/PP36tOhb435Sfop2UGWcRGXY7HLLveKCg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@shikijs/core": "4.6.0", + "@shikijs/types": "4.6.0" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/@shikijs/types": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-4.6.0.tgz", + "integrity": "sha512-+ENG1adsKt/X7cRYw1Nl7BEpBmPOjmQ7bR/eGmHuMlT8gtOFf3KEi5l31DJYyAWhW6Y6bjP1plU7FmaxWGENFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@shikijs/vscode-textmate": "^10.1.0", + "@types/hast": "^3.0.5" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/@shikijs/vscode-textmate": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-10.1.0.tgz", + "integrity": "sha512-cVBuhDQjBZaNMTwBquYfPydrUP+E3hE6oYGasx8h6ZrODIM7/r+gxLDXdd66oszbrggZHEntdE6j+5gYIVyMWQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/hast": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.5.tgz", + "integrity": "sha512-rp/ezSWaD1m44dPKICGhiskI13nVr7qTloFwDa/IYkhhf5nzwP+zIQcIJh3WIFSBOy/H1PzB40jPjMDksN4F+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "*" + } + }, + "node_modules/@types/linkify-it": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-5.0.0.tgz", + "integrity": "sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/markdown-it": { + "version": "14.2.0", + "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-14.2.0.tgz", + "integrity": "sha512-NoQ2yGlLWj4wpxMs+TYmRKk3thDrQ97agr7sFqfLsAlvoS8SNQuTrlObhFqG9iugdTtgOE9jpJ6FNM4ZGsa5xQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/linkify-it": "^5", + "@types/mdurl": "^2" + } + }, + "node_modules/@types/mdast": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", + "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "*" + } + }, + "node_modules/@types/mdurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-2.0.0.tgz", + "integrity": "sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "26.6.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-26.6.6.tgz", + "integrity": "sha512-MzQj+8Kx3XI40OmUAE6Qoh58ZMNstNNMwn2nfd3qWsfe7nDNSqJNzes4njhz6AHwrSHOffSLwXU6yb474Q4aog==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~8.9.0" + } + }, + "node_modules/@types/react": { + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.3.0.tgz", + "integrity": "sha512-N0rFCuH9YoxG9/m61l9MfpJKfmLOVU0em7ipIz6TRgSSkvReLB9vL85GB+yr8Bs5leqpvg96JSwF4ZS1s4viQg==", + "dev": true, + "license": "MIT", + "dependencies": { + "csstype": "^3.2.2" + } + }, + "node_modules/@types/react-dom": { + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.3.0.tgz", + "integrity": "sha512-ZI7bU42mZXXKHn/qNLEw2IrbiINU7X5+vfgdixBHkCNpYWXjKgfQ/P+uyGb5CjOLB9UcnTeg3rylQtV2hym44Q==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@types/react": "^19.3.0" + } + }, + "node_modules/@types/unist": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", + "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/vscode": { + "version": "1.90.0", + "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.90.0.tgz", + "integrity": "sha512-oT+ZJL7qHS9Z8bs0+WKf/kQ27qWYR3trsXpq46YDjFqBsMLG4ygGGjPaJ2tyrH0wJzjOEmDyg9PDJBBhWg9pkQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/web-bluetooth": { + "version": "0.0.22", + "resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.22.tgz", + "integrity": "sha512-4O7kU0Ut0irZvFyk3EvgDrzFYBQI80Puhkb65I7eV6WTZX4iOo5zoDrEfjDBRB7x5Stz31csoHO4hAjSiRTALw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@typescript/typescript-aix-ppc64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-aix-ppc64/-/typescript-aix-ppc64-7.0.2.tgz", + "integrity": "sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-darwin-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-darwin-arm64/-/typescript-darwin-arm64-7.0.2.tgz", + "integrity": "sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-darwin-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-darwin-x64/-/typescript-darwin-x64-7.0.2.tgz", + "integrity": "sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-freebsd-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-freebsd-arm64/-/typescript-freebsd-arm64-7.0.2.tgz", + "integrity": "sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-freebsd-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-freebsd-x64/-/typescript-freebsd-x64-7.0.2.tgz", + "integrity": "sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-arm": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-arm/-/typescript-linux-arm-7.0.2.tgz", + "integrity": "sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-arm64/-/typescript-linux-arm64-7.0.2.tgz", + "integrity": "sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-loong64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-loong64/-/typescript-linux-loong64-7.0.2.tgz", + "integrity": "sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-mips64el": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-mips64el/-/typescript-linux-mips64el-7.0.2.tgz", + "integrity": "sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-ppc64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-ppc64/-/typescript-linux-ppc64-7.0.2.tgz", + "integrity": "sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" } }, "node_modules/@typescript/typescript-linux-riscv64": { @@ -1368,6 +1953,30 @@ "node": ">=22.0.0" } }, + "node_modules/@ungap/structured-clone": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.4.0.tgz", + "integrity": "sha512-1mEZtMKPM09vDmQt5y7YvmN2+DFTP7Tg0EWXdic8/C6VRnpb33e4ghisCIE3WZjsE2N8mf+QV1Zqh7ZFYLWInQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/@vitejs/plugin-vue": { + "version": "6.0.11", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-6.0.11.tgz", + "integrity": "sha512-m48lskIUJGlB6qUiYhDMI8nd2ngeidz2U4nKTjqI13cFMu5rH8JeEILPkDtK9Fk/TjBA2pkj8AlbenqDaKu+ww==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rolldown/pluginutils": "^1.0.1" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "peerDependencies": { + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0", + "vue": "^3.2.25 || ^3.6.0-rc.15" + } + }, "node_modules/@vscode/codicons": { "version": "0.0.46-24", "resolved": "https://registry.npmjs.org/@vscode/codicons/-/codicons-0.0.46-24.tgz", @@ -1579,6 +2188,276 @@ "win32" ] }, + "node_modules/@vue/compiler-core": { + "version": "3.5.46", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.46.tgz", + "integrity": "sha512-yb+N8/mgBcoeqCJPVyJI/D3OphLrSMXnB3ZQUNmRLU/1fsMW4bFfdJWNi9oIj7+EA3ULKKkP7b/VCpcYQYeiuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.12", + "@vue/shared": "3.5.46", + "entities": "^7.0.1", + "estree-walker": "^2.0.2", + "source-map-js": "^1.2.3" + } + }, + "node_modules/@vue/compiler-core/node_modules/entities": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-7.0.1.tgz", + "integrity": "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/@vue/compiler-dom": { + "version": "3.5.46", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.46.tgz", + "integrity": "sha512-Bj3lCSw3DQnDRDxw115XqdLDd0+18Nftlgd8OXSGG+ud74hxJIE17eYrM+VWgQrTMsvJbLh9Hzf2MkwAzru36Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vue/compiler-core": "3.5.46", + "@vue/shared": "3.5.46" + } + }, + "node_modules/@vue/compiler-sfc": { + "version": "3.5.46", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.46.tgz", + "integrity": "sha512-hjUvMxGh+QIgegwksfp6BRBYleE/a8veZHvTR6sa+o+bM4HU+WnrUZlhN0X+pDcsl8Lhwmbu72xPvLMk3XUwog==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.12", + "@vue/compiler-core": "3.5.46", + "@vue/compiler-dom": "3.5.46", + "@vue/compiler-ssr": "3.5.46", + "@vue/shared": "3.5.46", + "estree-walker": "^2.0.2", + "magic-string": "^0.30.21", + "postcss": "^8.5.32", + "source-map-js": "^1.2.3" + } + }, + "node_modules/@vue/compiler-ssr": { + "version": "3.5.46", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.46.tgz", + "integrity": "sha512-qebChL3aP0m1k+TlSf+fZWvOwAf3flBCi5o+n01ykR3DX4mTIWheFltmoiQ12+z66/4cGeXqbB2P7sPWkGhQNQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vue/compiler-dom": "3.5.46", + "@vue/shared": "3.5.46" + } + }, + "node_modules/@vue/devtools-api": { + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-8.2.1.tgz", + "integrity": "sha512-6u4vXBlIBAC1wMplIZgpyPn7uh/s4Bf6F5bMzvLv+EdJ0aHs/+4B7Ygv864EStQSjRbsRzTko/kUG1A1IejQ3A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vue/devtools-kit": "^8.2.1" + } + }, + "node_modules/@vue/devtools-kit": { + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/@vue/devtools-kit/-/devtools-kit-8.2.1.tgz", + "integrity": "sha512-FIGIuq3AWReEpbAHY/cRGeHDfI0qOb8OCQ3YjbEAX04uaxIDbGc9rhkbVcG7rnfHPXE3RsU5KrWOu9V/okd8AQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vue/devtools-shared": "^8.2.1", + "birpc": "^2.6.1", + "hookable": "^5.5.3", + "perfect-debounce": "^2.0.0" + } + }, + "node_modules/@vue/devtools-shared": { + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/@vue/devtools-shared/-/devtools-shared-8.2.1.tgz", + "integrity": "sha512-Fkac7lUdGReh6pVOi3AYPRGe82LQqRmAfThW7RRligOAP0ZA/Z1z9XLHDM9dv34pV2HRc79DK8uKPeG2fLnA/g==", + "dev": true, + "license": "MIT" + }, + "node_modules/@vue/reactivity": { + "version": "3.5.46", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.46.tgz", + "integrity": "sha512-+FHtYTvGxgFoX3oRs7soz6JHizGv50Q26WJN6PWtXuTLXRfkfUpDUTRuoTA/kiZVVt8NMeMpsPQLh9h++ReUjQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vue/shared": "3.5.46" + } + }, + "node_modules/@vue/runtime-core": { + "version": "3.5.46", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.5.46.tgz", + "integrity": "sha512-eJUzKAUaHAmtnys/l9qduPzUnBrYMkmsCU7TN+vbSOSpm8kcETT7nacKxIO4MBej/XiOraVzq+lSeZv7o1//jQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vue/reactivity": "3.5.46", + "@vue/shared": "3.5.46" + } + }, + "node_modules/@vue/runtime-dom": { + "version": "3.5.46", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.5.46.tgz", + "integrity": "sha512-6L7lbBvXTYBFFjIt25a0pgdpmn3Ns8RqUnNVibRzF4bgyiWJvqOhKEV5MXYWKlCttZE3aGeJN8mveo+6IrIKXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vue/reactivity": "3.5.46", + "@vue/runtime-core": "3.5.46", + "@vue/shared": "3.5.46", + "csstype": "^3.2.4" + } + }, + "node_modules/@vue/server-renderer": { + "version": "3.5.46", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.5.46.tgz", + "integrity": "sha512-4mc0YWREc6OZ5pDCigvKPDzIUV+aciiH92yvyTS6xaHHxW/80rMceQQn11pYe7OEEBt2YQgYWR9zF8QF30GJUQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vue/compiler-ssr": "3.5.46", + "@vue/runtime-dom": "3.5.46", + "@vue/shared": "3.5.46" + } + }, + "node_modules/@vue/shared": { + "version": "3.5.46", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.46.tgz", + "integrity": "sha512-P1WePbdzHrcIciWtmY2Im9EFhdakd3rZxYqvalOa3SfoxtF35Q8Uhmj1tKn6bWP4utcOpN8ao6BoJUItq0Uf+g==", + "dev": true, + "license": "MIT" + }, + "node_modules/@vueuse/core": { + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-15.1.0.tgz", + "integrity": "sha512-OuZ5ecLw/sikX0HFjlJM/p/PkfL0567Ntfov9G0jYlw92QqZpPVikZOoB1Mpe4unZ+7E/QQ+uFpEgAjj2FYRbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/web-bluetooth": "^0.0.22", + "@vueuse/metadata": "15.1.0", + "@vueuse/shared": "15.1.0" + }, + "engines": { + "node": ">=22" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "vue": "^3.5.0" + } + }, + "node_modules/@vueuse/integrations": { + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/@vueuse/integrations/-/integrations-15.1.0.tgz", + "integrity": "sha512-wkWMVNeK8kpLzX1piF5Oo5RUEiCsPj6eAQINrlP0OUp1vWF1mFsaTKH9qK7/qiWZDfkZfkLREDeTVutcJsR2aQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vueuse/core": "15.1.0", + "@vueuse/shared": "15.1.0" + }, + "engines": { + "node": ">=22" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "async-validator": "^4", + "axios": "^1", + "change-case": "^5", + "drauu": "^1 || ^0.4", + "focus-trap": "^7 || ^8", + "fuse.js": "^7", + "idb-keyval": "^6", + "jwt-decode": "^4", + "nprogress": "^0.2", + "qrcode": "^1.5", + "sortablejs": "^1", + "universal-cookie": "^7 || ^8", + "vue": "^3.5.0" + }, + "peerDependenciesMeta": { + "async-validator": { + "optional": true + }, + "axios": { + "optional": true + }, + "change-case": { + "optional": true + }, + "drauu": { + "optional": true + }, + "focus-trap": { + "optional": true + }, + "fuse.js": { + "optional": true + }, + "idb-keyval": { + "optional": true + }, + "jwt-decode": { + "optional": true + }, + "nprogress": { + "optional": true + }, + "qrcode": { + "optional": true + }, + "sortablejs": { + "optional": true + }, + "universal-cookie": { + "optional": true + } + } + }, + "node_modules/@vueuse/metadata": { + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-15.1.0.tgz", + "integrity": "sha512-yHKFelRTdQdp7vdjXXEw68Wh9v8OgyxWm1v1aHbGM6Z4qbqHhB6QgB8MTNB76pZYh22wPeALCdr8qjShlxPBHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=22" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@vueuse/shared": { + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-15.1.0.tgz", + "integrity": "sha512-JAbQLO+vOULt8MPR4oRbvstBuztTTMIX4LOfCGeBvp9JSgj5OppZDing3gKDrmlyUQvYYFSPIX4dxkfJgdsxWQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=22" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "vue": "^3.5.0" + } + }, "node_modules/agent-base": { "version": "7.1.4", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", @@ -1626,6 +2505,16 @@ "url": "https://bevry.me/fund" } }, + "node_modules/birpc": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/birpc/-/birpc-2.9.0.tgz", + "integrity": "sha512-KrayHS5pBi69Xi9JmvoqrIgYGDkD6mcSe/i6YKi3w5kekCLzrX4+nawcXqrj2tIp50Kw/mT/s3p+GVK0A0sKxw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, "node_modules/boundary": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/boundary/-/boundary-2.0.0.tgz", @@ -1693,21 +2582,54 @@ "node": ">= 0.4" } }, - "node_modules/call-bound": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", - "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/ccount": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ccount/-/ccount-2.0.1.tgz", + "integrity": "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities-html4": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-2.1.0.tgz", + "integrity": "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities-legacy": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz", + "integrity": "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==", "dev": true, "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "get-intrinsic": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "type": "github", + "url": "https://github.com/sponsors/wooorm" } }, "node_modules/cockatiel": { @@ -1720,6 +2642,17 @@ "node": ">=16" } }, + "node_modules/comma-separated-tokens": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz", + "integrity": "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/commander": { "version": "12.1.0", "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", @@ -1731,9 +2664,9 @@ } }, "node_modules/csstype": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", - "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.4.tgz", + "integrity": "sha512-PoKaoPzQapnEoqUSnHx1u6W6ku8CVEgKsnpmmzU3m1nwkidpPBQ8V/Zq2+bWNrsOKoKLwTGdbx6xF7BXP1zLVQ==", "dev": true, "license": "MIT" }, @@ -1798,6 +2731,40 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/devlop": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/devlop/-/devlop-1.1.0.tgz", + "integrity": "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==", + "dev": true, + "license": "MIT", + "dependencies": { + "dequal": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/dunder-proto": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", @@ -1928,6 +2895,13 @@ "@esbuild/win32-x64": "0.28.2" } }, + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true, + "license": "MIT" + }, "node_modules/fast-check": { "version": "4.10.2", "resolved": "https://registry.npmjs.org/fast-check/-/fast-check-4.10.2.tgz", @@ -1969,6 +2943,31 @@ } } }, + "node_modules/focus-trap": { + "version": "8.2.6", + "resolved": "https://registry.npmjs.org/focus-trap/-/focus-trap-8.2.6.tgz", + "integrity": "sha512-4V7uTf/7Ax3ynfbey6K3o8NOfIz+go9atKNtFU+KCP5NWhyvn2M/Qk4HY+9kOi8NWujpglRGe0y6G3r/L5M/Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "tabbable": "^6.5.2" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -2064,6 +3063,51 @@ "node": ">= 0.4" } }, + "node_modules/hast-util-to-html": { + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-9.0.7.tgz", + "integrity": "sha512-HYNDA3qdnzUPitY/LcQm1nWs8z0cWFNH1Nz09jdI/tXifAqF7h3+jrLl4S/b9Mi4VSjn0Dsn54ctuTV6zhBthA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/unist": "^3.0.0", + "ccount": "^2.0.0", + "comma-separated-tokens": "^2.0.0", + "hast-util-whitespace": "^3.0.0", + "html-void-elements": "^3.0.0", + "mdast-util-to-hast": "^13.0.0", + "property-information": "^7.0.0", + "space-separated-tokens": "^2.0.0", + "stringify-entities": "^4.0.0", + "zwitch": "^2.0.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-whitespace": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-3.0.0.tgz", + "integrity": "sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hookable": { + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/hookable/-/hookable-5.5.3.tgz", + "integrity": "sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==", + "dev": true, + "license": "MIT" + }, "node_modules/hosted-git-info": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", @@ -2077,6 +3121,17 @@ "node": ">=10" } }, + "node_modules/html-void-elements": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-3.0.0.tgz", + "integrity": "sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/http-proxy-agent": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", @@ -2115,128 +3170,401 @@ "is-docker": "cli.js" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-in-ssh": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-in-ssh/-/is-in-ssh-1.0.0.tgz", + "integrity": "sha512-jYa6Q9rH90kR1vKB6NM7qqd1mge3Fx4Dhw5TVlK1MUBqhEOuCagrEHMevNuCcbECmXZ0ThXkRm+Ymr51HwEPAw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-inside-container": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", + "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-docker": "^3.0.0" + }, + "bin": { + "is-inside-container": "cli.js" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-wsl": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.1.tgz", + "integrity": "sha512-e6rvdUCiQCAuumZslxRJWR/Doq4VpPR82kqclvcS0efgt430SlGIk05vdCN58+VrzgtIcfNODjozVielycD4Sw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-inside-container": "^1.0.0" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/istextorbinary": { + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/istextorbinary/-/istextorbinary-9.5.0.tgz", + "integrity": "sha512-5mbUj3SiZXCuRf9fT3ibzbSSEWiy63gFfksmGfdOzujPjW3k+z8WvIBxcJHBoQNlaZaiyB25deviif2+osLmLw==", + "dev": true, + "license": "Artistic-2.0", + "dependencies": { + "binaryextensions": "^6.11.0", + "editions": "^6.21.0", + "textextensions": "^6.11.0" + }, + "engines": { + "node": ">=4" + }, + "funding": { + "url": "https://bevry.me/fund" + } + }, + "node_modules/jsonc-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.3.1.tgz", + "integrity": "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==", + "license": "MIT" + }, + "node_modules/jsonwebtoken": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.3.tgz", + "integrity": "sha512-MT/xP0CrubFRNLNKvxJ2BYfy53Zkm++5bX9dtuPbqAeQpTVe0MQTFhao8+Cp//EmJp244xt6Drw/GVEGCUj40g==", + "dev": true, + "license": "MIT", + "dependencies": { + "jws": "^4.0.1", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=12", + "npm": ">=6" + } + }, + "node_modules/jwa": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.1.tgz", + "integrity": "sha512-hRF04fqJIP8Abbkq5NKGN0Bbr3JxlQ+qhZufXVr0DvujKy93ZCbXZMHDL4EOtodSbCWxOqR8MS1tXA5hwqCXDg==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-equal-constant-time": "^1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/jws": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.1.tgz", + "integrity": "sha512-EKI/M/yqPncGUUh44xz0PxSidXFr/+r0pA70+gIYhjv+et7yxM+s29Y+VGDkovRofQem0fs7Uvf4+YmAdyRduA==", + "dev": true, + "license": "MIT", + "dependencies": { + "jwa": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/lightningcss": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz", + "integrity": "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.33.0", + "lightningcss-darwin-arm64": "1.33.0", + "lightningcss-darwin-x64": "1.33.0", + "lightningcss-freebsd-x64": "1.33.0", + "lightningcss-linux-arm-gnueabihf": "1.33.0", + "lightningcss-linux-arm64-gnu": "1.33.0", + "lightningcss-linux-arm64-musl": "1.33.0", + "lightningcss-linux-x64-gnu": "1.33.0", + "lightningcss-linux-x64-musl": "1.33.0", + "lightningcss-win32-arm64-msvc": "1.33.0", + "lightningcss-win32-x64-msvc": "1.33.0" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.33.0.tgz", + "integrity": "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.33.0.tgz", + "integrity": "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.33.0.tgz", + "integrity": "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.33.0.tgz", + "integrity": "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/is-in-ssh": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-in-ssh/-/is-in-ssh-1.0.0.tgz", - "integrity": "sha512-jYa6Q9rH90kR1vKB6NM7qqd1mge3Fx4Dhw5TVlK1MUBqhEOuCagrEHMevNuCcbECmXZ0ThXkRm+Ymr51HwEPAw==", + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.33.0.tgz", + "integrity": "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==", + "cpu": [ + "arm" + ], "dev": true, - "license": "MIT", + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=20" + "node": ">= 12.0.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/is-inside-container": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", - "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.33.0.tgz", + "integrity": "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "is-docker": "^3.0.0" - }, - "bin": { - "is-inside-container": "cli.js" - }, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=14.16" + "node": ">= 12.0.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/is-wsl": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.1.tgz", - "integrity": "sha512-e6rvdUCiQCAuumZslxRJWR/Doq4VpPR82kqclvcS0efgt430SlGIk05vdCN58+VrzgtIcfNODjozVielycD4Sw==", + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.33.0.tgz", + "integrity": "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "is-inside-container": "^1.0.0" - }, + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=16" + "node": ">= 12.0.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/istextorbinary": { - "version": "9.5.0", - "resolved": "https://registry.npmjs.org/istextorbinary/-/istextorbinary-9.5.0.tgz", - "integrity": "sha512-5mbUj3SiZXCuRf9fT3ibzbSSEWiy63gFfksmGfdOzujPjW3k+z8WvIBxcJHBoQNlaZaiyB25deviif2+osLmLw==", + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.33.0.tgz", + "integrity": "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==", + "cpu": [ + "x64" + ], "dev": true, - "license": "Artistic-2.0", - "dependencies": { - "binaryextensions": "^6.11.0", - "editions": "^6.21.0", - "textextensions": "^6.11.0" - }, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=4" + "node": ">= 12.0.0" }, "funding": { - "url": "https://bevry.me/fund" + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/jsonc-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.3.1.tgz", - "integrity": "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==", - "license": "MIT" - }, - "node_modules/jsonwebtoken": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.3.tgz", - "integrity": "sha512-MT/xP0CrubFRNLNKvxJ2BYfy53Zkm++5bX9dtuPbqAeQpTVe0MQTFhao8+Cp//EmJp244xt6Drw/GVEGCUj40g==", + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.33.0.tgz", + "integrity": "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "jws": "^4.0.1", - "lodash.includes": "^4.3.0", - "lodash.isboolean": "^3.0.3", - "lodash.isinteger": "^4.0.4", - "lodash.isnumber": "^3.0.3", - "lodash.isplainobject": "^4.0.6", - "lodash.isstring": "^4.0.1", - "lodash.once": "^4.0.0", - "ms": "^2.1.1", - "semver": "^7.5.4" - }, + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=12", - "npm": ">=6" + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/jwa": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.1.tgz", - "integrity": "sha512-hRF04fqJIP8Abbkq5NKGN0Bbr3JxlQ+qhZufXVr0DvujKy93ZCbXZMHDL4EOtodSbCWxOqR8MS1tXA5hwqCXDg==", + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.33.0.tgz", + "integrity": "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "buffer-equal-constant-time": "^1.0.1", - "ecdsa-sig-formatter": "1.0.11", - "safe-buffer": "^5.0.1" + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/jws": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.1.tgz", - "integrity": "sha512-EKI/M/yqPncGUUh44xz0PxSidXFr/+r0pA70+gIYhjv+et7yxM+s29Y+VGDkovRofQem0fs7Uvf4+YmAdyRduA==", + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.33.0.tgz", + "integrity": "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "jwa": "^2.0.1", - "safe-buffer": "^5.0.1" + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, "node_modules/lodash.includes": { @@ -2301,6 +3629,23 @@ "node": ">=10" } }, + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/mark.js": { + "version": "8.11.1", + "resolved": "https://registry.npmjs.org/mark.js/-/mark.js-8.11.1.tgz", + "integrity": "sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ==", + "dev": true, + "license": "MIT" + }, "node_modules/marked": { "version": "18.1.3", "resolved": "https://registry.npmjs.org/marked/-/marked-18.1.3.tgz", @@ -2324,6 +3669,122 @@ "node": ">= 0.4" } }, + "node_modules/mdast-util-to-hast": { + "version": "13.2.2", + "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-13.2.2.tgz", + "integrity": "sha512-l2pnmOuqs+SGLVpTVXnRLQu5v1AzvDe181404fbXzzqObVxrAnnVxapAP27pUwzLBL/ABIkgUhGlPVU7QSvIFg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "@ungap/structured-clone": "^1.0.0", + "devlop": "^1.0.0", + "micromark-util-sanitize-uri": "^2.0.0", + "trim-lines": "^3.0.0", + "unist-util-position": "^5.0.0", + "unist-util-visit": "^5.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-util-character": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz", + "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-encode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-2.0.1.tgz", + "integrity": "sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT" + }, + "node_modules/micromark-util-sanitize-uri": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.1.tgz", + "integrity": "sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-encode": "^2.0.0", + "micromark-util-symbol": "^2.0.0" + } + }, + "node_modules/micromark-util-symbol": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", + "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT" + }, + "node_modules/micromark-util-types": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.3.tgz", + "integrity": "sha512-oxB2Ik03hI0gv+VNn9tnh1t1YEe9MDPptViAEgfdf3YQHsn0pzGTgCdlSCJXcwhqm8phaEuM7zeEu3QQzVBrPg==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT" + }, "node_modules/mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", @@ -2354,19 +3815,63 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, - "license": "MIT" - }, - "node_modules/mute-stream": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", - "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "node_modules/minisearch": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/minisearch/-/minisearch-7.2.0.tgz", + "integrity": "sha512-dqT2XBYUOZOiC5t2HRnwADjhNS2cecp9u+TJRiJ1Qp/f5qjkeT5APcGPjHw+bz89Ms8Jp+cG4AlE+QZ/QnDglg==", + "dev": true, + "license": "MIT" + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "dev": true, + "license": "ISC" + }, + "node_modules/nanoid": { + "version": "3.3.20", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz", + "integrity": "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/napi-windows-process-start-time": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/napi-windows-process-start-time/-/napi-windows-process-start-time-0.1.0.tgz", + "integrity": "sha512-zHxhzKsIFu3elch3eFw69WEUGc79DFhbc3nD/WEOzWL/pFFLZRW13EHnuO0c+0YjncE5uCaS9ICHxOBXkb6vPw==", + "cpu": [ + "x64", + "arm64" + ], "dev": true, - "license": "ISC" + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=20" + } }, "node_modules/object-inspect": { "version": "1.13.4", @@ -2381,6 +3886,25 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/oniguruma-parser": { + "version": "0.12.2", + "resolved": "https://registry.npmjs.org/oniguruma-parser/-/oniguruma-parser-0.12.2.tgz", + "integrity": "sha512-6HVa5oIrgMC6aA6WF6XyyqbhRPJrKR02L20+2+zpDtO5QAzGHAUGw5TKQvwi5vctNnRHkJYmjAhRVQF2EKdTQw==", + "dev": true, + "license": "MIT" + }, + "node_modules/oniguruma-to-es": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/oniguruma-to-es/-/oniguruma-to-es-4.3.6.tgz", + "integrity": "sha512-csuQ9x3Yr0cEIs/Zgx/OEt9iBw9vqIunAPQkx19R/fiMq2oGVTgcMqO/V3Ybqefr1TBvosI6jU539ksaBULJyA==", + "dev": true, + "license": "MIT", + "dependencies": { + "oniguruma-parser": "^0.12.2", + "regex": "^6.1.0", + "regex-recursion": "^6.0.2" + } + }, "node_modules/open": { "version": "11.0.4", "resolved": "https://registry.npmjs.org/open/-/open-11.0.4.tgz", @@ -2422,6 +3946,20 @@ "dev": true, "license": "MIT" }, + "node_modules/perfect-debounce": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/perfect-debounce/-/perfect-debounce-2.1.0.tgz", + "integrity": "sha512-LjgdTytVFXeUgtHZr9WYViYSM/g8MkcTPYDlPa3cDqMirHjKiSZPYd6DoL7pK8AJQr+uWkQvCjHNdiMqsrJs+g==", + "dev": true, + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, "node_modules/picomatch": { "version": "4.0.7", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", @@ -2435,6 +3973,48 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/playwright-core": { + "version": "1.65.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.65.1.tgz", + "integrity": "sha512-hqPpz7blSMPxWVdoeE1yiBSzXsKiVOd2k+kjCvmUywD2GPO2Dd9HfcWnq9NN0GHbNZDFgZ9JfBFr+X5/BLo0qw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "playwright-core": "cli.js" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/postcss": { + "version": "8.5.34", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.34.tgz", + "integrity": "sha512-P1Qzj0XXZjMda74C7qiVnBG90UKNbyNUAOeQRBW8X63RsIMV57gevRqjnkELdwtZ/S2/uQFksJhmwuN8xShLPw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.20", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.4" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, "node_modules/powershell-utils": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/powershell-utils/-/powershell-utils-0.2.1.tgz", @@ -2476,6 +4056,17 @@ "signal-exit": "^3.0.2" } }, + "node_modules/property-information": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/property-information/-/property-information-7.2.0.tgz", + "integrity": "sha512-IAtzIB6sUiWaJYrX9smp3V46pBGbBeLFRGdh25kg1334VcBlD8HzhPeNIWQH9zhGmo2itIe25EHt9dQP7G5hmg==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/pure-rand": { "version": "8.4.2", "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-8.4.2.tgz", @@ -2544,6 +4135,33 @@ "node": ">=0.8" } }, + "node_modules/regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/regex/-/regex-6.1.0.tgz", + "integrity": "sha512-6VwtthbV4o/7+OaAF9I5L5V3llLEsoPyq9P1JVXkedTP33c7MfCG0/5NOPcSJn0TzXcG9YUrR0gQSWioew3LDg==", + "dev": true, + "license": "MIT", + "dependencies": { + "regex-utilities": "^2.3.0" + } + }, + "node_modules/regex-recursion": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/regex-recursion/-/regex-recursion-6.0.2.tgz", + "integrity": "sha512-0YCaSCq2VRIebiaUviZNs0cBz1kg5kVS2UKUfNIx8YVs1cN3AV7NTctO5FOKBA+UT2BPJIWZauYHPqJODG50cg==", + "dev": true, + "license": "MIT", + "dependencies": { + "regex-utilities": "^2.3.0" + } + }, + "node_modules/regex-utilities": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/regex-utilities/-/regex-utilities-2.3.0.tgz", + "integrity": "sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng==", + "dev": true, + "license": "MIT" + }, "node_modules/retry": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", @@ -2554,6 +4172,41 @@ "node": ">= 4" } }, + "node_modules/rolldown": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.3.4.tgz", + "integrity": "sha512-p2rq4bfBmF0M6yaR8+A89fbkBQynZI2fxUW4G07eq9kpctAkpo7q5BZ4X4Mo4XZ7HHROu33cX9PeopUFN6u+2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@oxc-project/types": "=0.160.0", + "@rolldown/pluginutils": "^1.0.0" + }, + "bin": { + "rolldown": "bin/cli.mjs" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "optionalDependencies": { + "@rolldown/binding-android-arm-eabi": "1.3.4", + "@rolldown/binding-android-arm64": "1.3.4", + "@rolldown/binding-darwin-arm64": "1.3.4", + "@rolldown/binding-darwin-x64": "1.3.4", + "@rolldown/binding-freebsd-x64": "1.3.4", + "@rolldown/binding-linux-arm-gnueabihf": "1.3.4", + "@rolldown/binding-linux-arm64-gnu": "1.3.4", + "@rolldown/binding-linux-arm64-musl": "1.3.4", + "@rolldown/binding-linux-ppc64-gnu": "1.3.4", + "@rolldown/binding-linux-s390x-gnu": "1.3.4", + "@rolldown/binding-linux-x64-gnu": "1.3.4", + "@rolldown/binding-linux-x64-musl": "1.3.4", + "@rolldown/binding-openharmony-arm64": "1.3.4", + "@rolldown/binding-wasm32-wasi": "1.3.4", + "@rolldown/binding-win32-arm64-msvc": "1.3.4", + "@rolldown/binding-win32-x64-msvc": "1.3.4" + } + }, "node_modules/run-applescript": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.1.0.tgz", @@ -2617,6 +4270,26 @@ "node": ">=10" } }, + "node_modules/shiki": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-4.6.0.tgz", + "integrity": "sha512-imjLsVHgPuWhvpU3P+zOekvMYqnel7QmKsFC4Sn0fCuAvaaalBsxwKEsrU8Ko5BdFnZA6Go/8a0RzahS634UgA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@shikijs/core": "4.6.0", + "@shikijs/engine-javascript": "4.6.0", + "@shikijs/engine-oniguruma": "4.6.0", + "@shikijs/langs": "4.6.0", + "@shikijs/themes": "4.6.0", + "@shikijs/types": "4.6.0", + "@shikijs/vscode-textmate": "^10.1.0", + "@types/hast": "^3.0.5" + }, + "engines": { + "node": ">=20" + } + }, "node_modules/side-channel": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.1.tgz", @@ -2700,6 +4373,42 @@ "dev": true, "license": "ISC" }, + "node_modules/source-map-js": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.4.tgz", + "integrity": "sha512-J7ZjMvHd9O1fcT/5V09QWaaSl2BbWx3F6O08spde82Namf9UB0GxRVIPiNbVsdKkoizHiSpTodo3vp2bAy91MA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/space-separated-tokens": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz", + "integrity": "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/stringify-entities": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.5.tgz", + "integrity": "sha512-jNuI2fNNw5ecxrWmgm90R3iH0Kc/94AQwoQWoSUYphWzvmUA2pjFG34H56Z7Z3FkvH3FpYwwewKAa97oQnPFhw==", + "dev": true, + "license": "MIT", + "dependencies": { + "character-entities-html4": "^2.0.0", + "character-entities-legacy": "^3.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/structured-source": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/structured-source/-/structured-source-4.0.0.tgz", @@ -2710,6 +4419,13 @@ "boundary": "^2.0.0" } }, + "node_modules/tabbable": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/tabbable/-/tabbable-6.5.2.tgz", + "integrity": "sha512-XgdnB1nGU6KU4VgMnZPaZCx7M1hBrLyEiZYau2G2gq9UT0d7d4FUBlNX7vvPlm/B1vk1PjrzJBx9Lbv4fsqS9g==", + "dev": true, + "license": "MIT" + }, "node_modules/textextensions": { "version": "6.11.0", "resolved": "https://registry.npmjs.org/textextensions/-/textextensions-6.11.0.tgz", @@ -2743,6 +4459,17 @@ "url": "https://github.com/sponsors/SuperchupuDev" } }, + "node_modules/trim-lines": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz", + "integrity": "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/tslib": { "version": "2.9.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.9.1.tgz", @@ -2821,6 +4548,79 @@ "dev": true, "license": "MIT" }, + "node_modules/unist-util-is": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-6.0.1.tgz", + "integrity": "sha512-LsiILbtBETkDz8I9p1dQ0uyRUWuaQzd/cuEeS1hoRSyW5E5XGmTzlwY1OrNzzakGowI9Dr/I8HVaw4hTtnxy8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-position": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-5.0.0.tgz", + "integrity": "sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-stringify-position": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz", + "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-visit": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.2.0.tgz", + "integrity": "sha512-fpsYs/VVoZxfGY9/j3FQpZmN8wdLJaV1Pt38AaJNZu9uKIHcFU3halCdBveEq1HGKO1OEfJY65w1zvoFV1b3qQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-is": "^6.0.0", + "unist-util-visit-parents": "^6.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-visit-parents": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-6.1.0.tgz", + "integrity": "sha512-vKXxz6O38sKDj1mtx/k2cWvkkFBuYGx6uGrlzBkVeWCRF/F8sdI0j3Wbkz/5rVNRRuVc8UrgRdbCxNhmYXgP3w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-is": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/url-join": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz", @@ -2841,6 +4641,178 @@ "url": "https://bevry.me/fund" } }, + "node_modules/vfile": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz", + "integrity": "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-message": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-4.0.4.tgz", + "integrity": "sha512-66ycRswIkNmHH9PHku7ADtv5RVwgIrOcuv3J8Svz6h4qgGRrKVa+9/neuKyJZUXyOpYwLTvS+whZ4R2urHHgQg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-stringify-position": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vite": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.4.0.tgz", + "integrity": "sha512-X2nUJg+9cutlz3hzqyO6p+WTwk9H257DjwAEf9EQYUFrQbDItmetadi9gYmb+l7VDy4r3VXLUnmLTwuPmzejDw==", + "dev": true, + "license": "MIT", + "dependencies": { + "lightningcss": "^1.33.0", + "picomatch": "^4.0.7", + "postcss": "^8.5.33", + "rolldown": "~1.3.2", + "tinyglobby": "^0.2.17" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3", + "napi-windows-process-start-time": "^0.1.0" + }, + "peerDependencies": { + "@types/node": "^20.19.0 || >=22.12.0", + "@vitejs/devtools": "^0.7.1 || ^0.8.0", + "esbuild": "^0.27.0 || ^0.28.0", + "jiti": ">=1.21.0", + "less": "^4.0.0", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "@vitejs/devtools": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vitepress": { + "version": "2.0.0-alpha.21", + "resolved": "https://registry.npmjs.org/vitepress/-/vitepress-2.0.0-alpha.21.tgz", + "integrity": "sha512-b2PFPIw2mVfxDi490FhSq4AlkFi17b9lofLCqWfH4uPKz/dF4oy2C9vBpP2r7l7hl2hc5BG7OTRPvRFfRzF7MA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@docsearch/css": "^4.7.1", + "@docsearch/js": "^4.7.1", + "@docsearch/sidepanel-js": "^4.7.1", + "@iconify-json/simple-icons": "^1.2.99", + "@shikijs/transformers": "^4.5.0", + "@types/markdown-it": "^14.2.0", + "@vitejs/plugin-vue": "^6.0.9", + "@vue/devtools-api": "^8.2.1", + "@vue/shared": "^3.5.43", + "@vueuse/core": "^15.0.0", + "@vueuse/integrations": "^15.0.0", + "focus-trap": "^8.2.3", + "mark.js": "8.11.1", + "minisearch": "^7.2.0", + "shiki": "^4.5.0", + "vite": "^8.3.4", + "vue": "^3.5.43" + }, + "bin": { + "vitepress": "bin/vitepress.js" + }, + "peerDependencies": { + "markdown-it-mathjax3": "^4", + "postcss": "^8" + }, + "peerDependenciesMeta": { + "markdown-it-mathjax3": { + "optional": true + }, + "postcss": { + "optional": true + } + } + }, + "node_modules/vue": { + "version": "3.5.46", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.5.46.tgz", + "integrity": "sha512-0kW5CgfjMPBqmH158049SaE1muufp+K/ZyrwvSEwrwYky6QB7zL2y8kXfruneKb9O12eh0xAJL6CVSpzb9o0Kg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vue/compiler-dom": "3.5.46", + "@vue/compiler-sfc": "3.5.46", + "@vue/runtime-dom": "3.5.46", + "@vue/server-renderer": "3.5.46", + "@vue/shared": "3.5.46" + }, + "peerDependencies": { + "typescript": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, "node_modules/wsl-utils": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/wsl-utils/-/wsl-utils-1.0.1.tgz", @@ -2911,6 +4883,17 @@ "dependencies": { "buffer-crc32": "~0.2.3" } + }, + "node_modules/zwitch": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz", + "integrity": "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } } } } diff --git a/package.json b/package.json index 2960bfb..1a128ad 100644 --- a/package.json +++ b/package.json @@ -1012,7 +1012,10 @@ "test": "node esbuild.mjs --tests && node --enable-source-maps --test \"out/test/*.test.js\"", "test:fuzz": "node esbuild.mjs --tests && node --enable-source-maps --test out/test/fuzzing.test.js", "vscode:prepublish": "npm run typecheck && npm run compile:production", - "package": "vsce package --no-dependencies" + "package": "vsce package --no-dependencies", + "docs:develop": "vitepress dev docs", + "docs:build": "vitepress build docs", + "docs:screenshots": "bash scripts/docs-screenshots/run.sh" }, "dependencies": { "@vscode/debugadapter": "^1.68.0", @@ -1030,8 +1033,10 @@ "@vscode/vsce": "^4.1.0", "esbuild": "^0.28.2", "fast-check": "4.10.2", + "playwright-core": "^1.65.1", "prettier": "^3.9.10", - "typescript": "^7.0.2" + "typescript": "^7.0.2", + "vitepress": "2.0.0-alpha.21" }, "overrides": { "@vscode/vsce": { diff --git a/scripts/docs-screenshots/agent.mjs b/scripts/docs-screenshots/agent.mjs new file mode 100644 index 0000000..486b95b --- /dev/null +++ b/scripts/docs-screenshots/agent.mjs @@ -0,0 +1,556 @@ +/* + * A stand-in TCF agent for capture.mjs, so that the screenshots need no + * Simics. It answers the commands that the extension sends with a small + * made-up target: the Linux example of docs/debugging/call-stack.md, with one + * thread stopped in workspace/src/server.c. Nothing here comes from a real + * target. The reply formats are those of the TCF services, see the tcf skill. + */ +import net from "node:net"; +import path from "node:path"; + +const ESC = 3; +const big = (v) => BigInt(v); +const toJson = (v) => + JSON.stringify(v, (_k, x) => (typeof x === "bigint" ? `\u0000big:${x}` : x)).replace(/"\\u0000big:(-?\d+)"/g, "$1"); +const parse = (text) => + text === "" + ? undefined + : JSON.parse(text, (_k, v, ctx) => + typeof v === "number" && !Number.isSafeInteger(v) && /^-?\d+$/.test(ctx.source) ? BigInt(ctx.source) : v, + ); +const b64le = (value, size) => { + const b = Buffer.alloc(size); + let v = BigInt.asUintN(size * 8, big(value)); + for (let i = 0; i < size; i++, v >>= 8n) { + b[i] = Number(v & 0xffn); + } + return b.toString("base64"); +}; + +export function createAgent({ workspace }) { + const source = path.join(workspace, "src", "server.c"); + + // ---- Functions and lines ------------------------------------------- + const functions = [ + { + name: "checksum", + addr: 0x401000n, + size: 0x50, + lines: [ + [0x00, 5], + [0x10, 7], + [0x20, 8], + [0x30, 9], + [0x40, 11], + ], + }, + { + name: "handle_request", + addr: 0x401050n, + size: 0x50, + lines: [ + [0x00, 14], + [0x10, 16], + [0x20, 17], + [0x30, 19], + [0x40, 20], + ], + }, + { + name: "serve", + addr: 0x4010a0n, + size: 0x30, + lines: [ + [0x00, 23], + [0x10, 26], + [0x20, 27], + ], + }, + { + name: "main", + addr: 0x4010d0n, + size: 0x40, + lines: [ + [0x00, 31], + [0x10, 33], + [0x20, 34], + [0x30, 35], + ], + }, + { name: "default_idle", addr: 0xffffffff81c2a4d0n, size: 0x40 }, + { name: "do_idle", addr: 0xffffffff810f2b10n, size: 0x200 }, + { name: "schedule", addr: 0xffffffff81c1f3a0n, size: 0x80 }, + { name: "kthreadd", addr: 0xffffffff810c9e60n, size: 0x180 }, + { name: "worker_thread", addr: 0xffffffff810c1a40n, size: 0x300 }, + { name: "start_kernel", addr: 0xffffffff82e1c0a0n, size: 0x400 }, + ]; + const fn = (name) => functions.find((f) => f.name === name); + const functionAt = (addr) => functions.find((f) => addr >= f.addr && addr < f.addr + big(f.size)); + const at = (name, offset) => fn(name).addr + big(offset); + + // ---- Run control contexts ------------------------------------------ + const contexts = new Map(); + const order = []; + const add = (names, frames) => { + const id = names.join("."); + const parent = names.length > 1 ? names.slice(0, -1).join(".") : undefined; + contexts.set(id, { id, name: names.at(-1), parent, frames }); + order.push(id); + return id; + }; + const idle = [at("default_idle", 0x12), at("do_idle", 0x1c8)]; + add(["Linux"]); + add(["Linux", "Kernel"]); + add(["Linux", "Kernel", "Other"]); + add(["Linux", "Kernel", "Other", "core[0][0]"], [at("start_kernel", 0x3a4)]); + add(["Linux", "Kernel", "Idle"]); + add(["Linux", "Kernel", "Idle", "core[0][0]"], idle); + add(["Linux", "Kernel", "Idle", "core[1][0]"], idle); + add(["Linux", "Kernel", "Threads"]); + add(["Linux", "Kernel", "Threads", "kthreadd"], [at("schedule", 0x4e), at("kthreadd", 0x121)]); + add(["Linux", "Kernel", "Threads", "kworker/0:0"], [at("schedule", 0x4e), at("worker_thread", 0x2b0)]); + add(["Linux", "Userspace"]); + add(["Linux", "Userspace", "init"]); + const focus = add( + ["Linux", "Userspace", "init", "init"], + [at("checksum", 0x34), at("handle_request", 0x38), at("serve", 0x28), at("main", 0x28)], + ); + add(["Linux", "Userspace", "rc"]); + add(["Linux", "Userspace", "rc", "rc"], [0x7f3a5c41e9a2n]); + add(["Linux", "Userspace", "udevd"]); + add(["Linux", "Userspace", "udevd", "udevd"], [0x7f81d20c37f5n]); + const threads = order.filter((id) => contexts.get(id).frames); + const children = (parent) => order.filter((id) => contexts.get(id).parent === parent); + const rcContext = (id) => { + const c = contexts.get(id); + return { + ID: id, + ...(c.parent && { ParentID: c.parent }), + Name: c.name, + IsContainer: !c.frames, + HasState: !!c.frames, + CanSuspend: true, + CanResume: 0x3f, + ...(c.frames && { ProcessID: c.parent }), + RCGroup: "Linux", + }; + }; + const frameOf = (frameId) => { + const [ctx, index] = frameId.split("#"); + const c = contexts.get(ctx); + return c?.frames && index !== undefined + ? { ctx, index: Number(index), ip: c.frames[Number(index)] } + : undefined; + }; + + // ---- Variables of the top frame of the focused thread --------------- + const types = { + "type:u8": { Name: "uint8_t", TypeClass: 1, Size: 1 }, + "type:u8p": { TypeClass: 4, Size: 8, BaseTypeID: "type:u8" }, + "type:size_t": { Name: "size_t", TypeClass: 1, Size: 8 }, + "type:u32": { Name: "uint32_t", TypeClass: 1, Size: 4 }, + }; + const locals = [ + { name: "data", type: "type:u8p", value: 0x601040n }, + { name: "len", type: "type:size_t", value: 26n }, + { name: "sum", type: "type:u32", value: 0x5a3cn }, + { name: "i", type: "type:size_t", value: 7n }, + ]; + const registers = [ + ["rax", 0x5a3cn], + ["rbx", 0n], + ["rcx", 7n], + ["rdx", 0x47n], + ["rsi", 26n], + ["rdi", 0x601040n], + ["rbp", 0x7ffd4c2e1b40n], + ["rsp", 0x7ffd4c2e1b20n], + ["rip", at("checksum", 0x34)], + ["eflags", 0x202n], + ]; + const expression = (id) => { + const local = locals.find((l) => `expr:${l.name}` === id); + if (local) { + return local; + } + const m = /^script:(.*)$/.exec(id); + const text = m?.[1].trim(); + const named = locals.find((l) => l.name === text); + if (named) { + return named; + } + if (text === "$sp" || text === "$rsp") { + return { name: text, type: "type:size_t", value: 0x7ffd4c2e1b20n }; + } + return text && /^(0x[0-9a-f]+|\d+)$/i.test(text) + ? { name: text, type: "type:size_t", value: big(text) } + : undefined; + }; + + // ---- Memory ---------------------------------------------------------- + const image = Buffer.alloc(0x400); + image.writeUInt32LE(4, 0x00); // fd + image.writeUInt32LE(26, 0x04); // length + image.writeUInt32LE(0x5a3c, 0x08); // checksum + image.writeBigUInt64LE(0x601040n, 0x10); // data + image.writeBigUInt64LE(0x601080n, 0x18); + image.write("GET /index.html HTTP/1.1\r\n", 0x40, "latin1"); + image.write("HTTP/1.1 200 OK\r\nContent-Length: 13\r\n\r\nHello, world!", 0x80, "latin1"); + image.write("listening on port %d\n\0bad request\n\0/dev/ttyS0\0", 0x100, "latin1"); + image.writeDoubleLE(3.14159, 0x140); + image.writeUInt32LE(0xdeadbeef, 0x148); + const IMAGE_BASE = 0x601000n; + const readMemory = (address, size) => { + const out = Buffer.alloc(size); + for (let i = 0; i < size; i++) { + const offset = address + big(i) - IMAGE_BASE; + if (offset >= 0n && offset < big(image.length)) { + out[i] = image[Number(offset)]; + } + } + return out; + }; + + // ---- Per connection state -------------------------------------------- + let snapshots = ["after-boot", "before-test"]; + const sockets = new Set(); + let suspended = true; + + function connection(socket) { + sockets.add(socket); + const breakpoints = new Map(); + const memoryMaps = new Map(); + let pathMap = []; + const send = (...fields) => { + const parts = []; + for (const f of fields) { + const bytes = Buffer.from(f, "utf8"); + const escaped = []; + for (const b of bytes) { + escaped.push(b); + if (b === ESC) { + escaped.push(0); + } + } + parts.push(Buffer.from(escaped), Buffer.from([0])); + } + parts.push(Buffer.from([ESC, 1])); + socket.write(Buffer.concat(parts)); + }; + const event = (service, name, ...args) => send("E", service, name, ...args.map(toJson)); + const bpStatus = (bp) => { + const f = bp.Location ? fn(String(bp.Location)) : undefined; + const address = bp.File ? at("checksum", 0x30) : (f?.addr ?? 0x401050n); + return { Instances: [{ LocationContext: bp.ContextIds?.[0] ?? focus, Address: address, HitCount: 0 }] }; + }; + const stop = (reason, data = {}) => { + suspended = true; + event("RunControl", "containerSuspended", focus, contexts.get(focus).frames[0], reason, data, threads); + }; + const fileBreakpoints = () => [...breakpoints.values()].filter((bp) => bp.File).map((bp) => bp.ID); + + const handlers = { + "RunControl.getChildren": (parent) => [null, children(parent ?? undefined)], + "RunControl.getContext": (id) => + contexts.has(id) ? [null, rcContext(id)] : [{ Code: 1, Format: "Invalid context" }, null], + "RunControl.getState": (id) => [null, suspended, contexts.get(id)?.frames?.[0] ?? 0, "Suspended", {}], + "RunControl.suspend": () => { + setTimeout(() => stop("Suspended"), 50); + return [null]; + }, + "RunControl.resume": (_id, mode) => { + suspended = false; + setTimeout(() => event("RunControl", "containerResumed", threads), 10); + setTimeout(() => (mode ? stop("Step") : stop("Breakpoint", { BPs: fileBreakpoints() })), 400); + return [null]; + }, + "StackTrace.getChildrenRange": (ctx, start, end) => { + const frames = contexts.get(ctx)?.frames ?? []; + return [null, frames.map((_f, i) => `${ctx}#${i}`).slice(start, end + 1)]; + }, + "StackTrace.getChildren": (ctx) => [ + null, + (contexts.get(ctx)?.frames ?? []).map((_f, i) => `${ctx}#${i}`).reverse(), + ], + "StackTrace.getContext": (ids) => [ + ids.map((id) => { + const f = frameOf(id); + return f ? { ID: id, ParentID: f.ctx, IP: f.ip, TopFrame: f.index === 0, Index: f.index } : null; + }), + null, + ], + "Symbols.findByAddr": (_ctx, addr) => { + const f = functionAt(big(addr)); + return f ? [null, [`fn:${f.name}`]] : [{ Code: 22, Format: "Symbol not found" }, null]; + }, + "Symbols.getContext": (id) => { + const f = id.startsWith("fn:") ? fn(id.slice(3)) : undefined; + if (f) { + return [null, { ID: id, Name: f.name, Class: 3, Address: f.addr, Size: f.size }]; + } + const local = locals.find((l) => `sym:${l.name}` === id); + if (local) { + return [ + null, + { ID: id, Name: local.name, Class: 2, TypeID: local.type, Size: types[local.type].Size }, + ]; + } + return types[id] + ? [null, { ID: id, Class: 4, ...types[id] }] + : [{ Code: 22, Format: "Symbol not found" }, null]; + }, + "Symbols.getChildren": () => [null, []], + "LineNumbers.mapToSource": (_ctx, start) => { + const f = functionAt(big(start)); + if (!f?.lines) { + return [null, []]; + } + const offset = Number(big(start) - f.addr); + const i = f.lines.findLastIndex(([o]) => o <= offset); + const end = f.lines[i + 1]?.[0] ?? f.size; + const line = f.lines[i][1]; + return [ + null, + [ + { + File: source, + SLine: line, + ELine: line + 1, + SAddr: f.addr + big(f.lines[i][0]), + EAddr: f.addr + big(end), + IsStmt: true, + }, + ], + ]; + }, + "Expressions.getChildren": (scope) => [ + null, + scope === `${focus}#0` ? locals.map((l) => `expr:${l.name}`) : [], + ], + "Expressions.getContext": (id) => { + const e = expression(id); + return e + ? [ + null, + { + ID: id, + SymbolID: `sym:${e.name}`, + Expression: e.name, + Type: e.type, + Class: types[e.type].TypeClass, + Size: types[e.type].Size, + }, + ] + : [{ Code: 1, Format: "Invalid expression" }, null]; + }, + "Expressions.create": (_ctx, _lang, script) => { + const id = `script:${script}`; + const e = expression(id); + return e + ? [ + null, + { + ID: id, + Expression: script, + Type: e.type, + Class: types[e.type].TypeClass, + Size: types[e.type].Size, + }, + ] + : [{ Code: 1, Format: `Cannot evaluate '${script}'` }, null]; + }, + "Expressions.evaluate": (id) => { + const e = expression(id); + const t = e && types[e.type]; + return e + ? [b64le(e.value, t.Size), null, { Class: t.TypeClass, Type: e.type, BigEndian: false }] + : [null, { Code: 1, Format: "Invalid expression" }, null]; + }, + "Expressions.dispose": () => [null], + "Registers.getChildren": (parent) => [ + null, + contexts.has(parent) || frameOf(parent) ? registers.map(([name]) => `reg:${name}`) : [], + ], + "Registers.getContext": (id) => [null, { ID: id, Name: id.slice(4), Size: 8, Readable: true }], + "Registers.get": (id) => [null, b64le(registers.find(([name]) => `reg:${name}` === id)?.[1] ?? 0n, 8)], + "Memory.getChildren": (parent) => [ + null, + parent === null || parent === undefined ? ["board.mb.phys_mem"] : [], + ], + "Memory.getContext": (id) => + id === "board.mb.phys_mem" + ? [null, { ID: id, Name: id, AddressSize: 8, BigEndian: false, AccessTypes: ["physical"] }] + : contexts.has(id) + ? [ + null, + { + ID: id, + Name: contexts.get(id).name, + AddressSize: 8, + BigEndian: false, + AccessTypes: ["instruction", "data", "virtual"], + }, + ] + : [{ Code: 1, Format: "Invalid context" }, null], + "Memory.get": (_id, address, _word, size) => [ + readMemory(big(address), size).toString("base64"), + null, + null, + ], + "Memory.set": (id, address, _word, size, _mode, data) => { + const bytes = Buffer.from(data, "base64"); + const offset = big(address) - IMAGE_BASE; + if (offset >= 0n && offset + big(size) <= big(image.length)) { + bytes.copy(image, Number(offset)); + } + setTimeout(() => event("Memory", "memoryChanged", id, [{ addr: big(address), size }]), 10); + return [null]; + }, + "MemoryMap.get": (id) => [ + null, + [ + ...[...memoryMaps.entries()].flatMap(([ctx, regions]) => (ctx === "" || ctx === id ? regions : [])), + { + FileName: "/home/user/linux/vmlinux", + Addr: 0xffffffff81000000n, + Size: 0x2000000, + Offs: 0x200000, + Flags: 5, + }, + ], + ], + "MemoryMap.set": (id, regions) => { + memoryMaps.set(id, regions ?? []); + setTimeout(() => event("MemoryMap", "changed", id), 10); + return [null]; + }, + "PathMap.get": () => [ + null, + [...pathMap, { ID: "simics0", Source: "/build/linux", Destination: "/home/user/linux" }], + ], + "PathMap.set": (rules) => { + pathMap = rules ?? []; + setTimeout(() => event("PathMap", "changed"), 10); + return [null]; + }, + "ContextQuery.query": (query) => { + const id = /^ID="?([^"]*)"?$/.exec(query)?.[1]; + return [null, id ? order.filter((c) => c === id) : threads]; + }, + "Breakpoints.getCapabilities": () => [ + null, + { + ID: "", + Location: true, + Condition: true, + FileLine: true, + IgnoreCount: true, + AccessMode: 15, + ContextIds: true, + ContextQuery: true, + }, + ], + "Breakpoints.add": (bp) => { + breakpoints.set(bp.ID, bp); + setTimeout(() => event("Breakpoints", "status", bp.ID, bpStatus(bp)), 10); + return [null]; + }, + "Breakpoints.change": (bp) => handlers["Breakpoints.add"](bp), + "Breakpoints.getStatus": (id) => [null, breakpoints.has(id) ? bpStatus(breakpoints.get(id)) : {}], + "Breakpoints.enable": () => [null], + "Breakpoints.disable": () => [null], + "Breakpoints.remove": (ids) => { + ids.forEach((id) => breakpoints.delete(id)); + return [null]; + }, + "CommandLine.connect": () => { + setTimeout(() => event("CommandLine", "write", "simics> "), 50); + return [null]; + }, + "CommandLine.disconnect": () => [null], + "CommandLine.sizeChanged": () => [null], + "CommandLine.keyPressed": () => [null], + "CommandLine.positionChanged": () => [null], + "CommandLine.selectionChanged": () => [null], + "CommandLine.clipboardChanged": () => [null], + "SimUtils.getCommands": () => [ + null, + ["getCommands", "getSnapshotIDs", "takeSnapshot", "restoreSnapshot", "deleteSnapshot"], + ], + "SimUtils.getSnapshotIDs": () => [null, snapshots], + "SimUtils.takeSnapshot": (id) => { + snapshots = [...snapshots, id]; + setTimeout(() => event("SimUtils", "snapshotsChanged"), 10); + return [null]; + }, + "SimUtils.restoreSnapshot": () => [null], + "SimUtils.deleteSnapshot": (id) => { + snapshots = snapshots.filter((s) => s !== id); + setTimeout(() => event("SimUtils", "snapshotsChanged"), 10); + return [null]; + }, + }; + const services = [...new Set(Object.keys(handlers).map((k) => k.split(".")[0])), "Locator"]; + + let fields = []; + let part = []; + let esc = false; + const message = (m) => { + if (m[0] !== "C") { + return; + } + const [, token, service, command, ...args] = m; + const handler = handlers[`${service}.${command}`]; + if (!handler) { + agent.unknown.add(`${service}.${command}`); + send("N", token); + return; + } + try { + send("R", token, ...handler(...args.map(parse)).map((v) => (v === undefined ? "" : toJson(v)))); + } catch (err) { + agent.errors.push(`${service}.${command}: ${err.stack}`); + send("R", token, toJson({ Code: 1, Format: String(err) })); + } + }; + socket.on("data", (data) => { + for (const b of data) { + if (esc) { + esc = false; + if (b === 0) { + part.push(ESC); + } else if (b === 1) { + message(fields); + fields = []; + part = []; + } + } else if (b === ESC) { + esc = true; + } else if (b === 0) { + fields.push(Buffer.from(part).toString("utf8")); + part = []; + } else { + part.push(b); + } + } + }); + socket.on("close", () => sockets.delete(socket)); + socket.on("error", () => sockets.delete(socket)); + send("E", "Locator", "Hello", toJson(services)); + } + + const server = net.createServer(connection); + const agent = { + unknown: new Set(), + errors: [], + focus, + threads, + listen: (port) => + new Promise((resolve, reject) => server.once("error", reject).listen(port, "127.0.0.1", resolve)), + close: () => { + sockets.forEach((s) => s.destroy()); + return new Promise((resolve) => server.close(resolve)); + }, + }; + return agent; +} diff --git a/scripts/docs-screenshots/capture.mjs b/scripts/docs-screenshots/capture.mjs new file mode 100644 index 0000000..7c2ff91 --- /dev/null +++ b/scripts/docs-screenshots/capture.mjs @@ -0,0 +1,827 @@ +/* + * Takes the screenshots of the user guide: starts VS Code with the extension, + * attaches it to the stand-in agent of agent.mjs, and saves one picture per + * block below. It also prints what each picture shows, as text, so that the + * result can be checked without looking at every pixel. + * + * Run it with run.sh, see .github/skills/docs-screenshots/SKILL.md. + */ +import { execFileSync } from "node:child_process"; +import * as fs from "node:fs"; +import * as path from "node:path"; +import { createAgent } from "./agent.mjs"; +import { launch, workspace } from "./vscode.mjs"; + +if (process.env.SHOTS_SANDBOX !== "1") { + // Outside the sandbox the pictures would show paths of this machine, + // and port 1534 may belong to a real agent. + console.error("Run scripts/docs-screenshots/run.sh instead, it starts this script in a sandbox."); + process.exit(2); +} + +const out = process.env.SHOTS_OUT; +/** The pictures of the last commit, to tell which ones changed. */ +const before = process.env.SHOTS_BEFORE; +const firstCapture = process.env.SHOTS_FIRST_CAPTURE; +/** A picture with at most this many clearly different pixels counts as unchanged. */ +const NOISE = 10; +fs.mkdirSync(path.join(out, "raw"), { recursive: true }); +// Files that the example launch configuration names. +for (const f of ["build/server.elf", "build/driver.ko", "libs/.keep", "src/net.h"]) { + fs.mkdirSync(path.dirname(path.join(workspace, f)), { recursive: true }); + fs.writeFileSync(path.join(workspace, f), f.endsWith(".h") ? "int open_port(int port);\n" : ""); +} + +const WIDTH = 1240; +const HEIGHT = 800; +const agent = createAgent({ workspace }); +await agent.listen(1534); +const { app, page } = await launch({ + width: WIDTH, + height: HEIGHT, + settings: { "workbench.hover.delay": 100000, "editor.hover.enabled": false }, +}); +const sleep = (ms) => page.waitForTimeout(ms); +/** Waits until a scrollbar that showed during scrolling has faded out. */ +const scrollbarsFaded = () => sleep(1600); +/** Moves the pointer to the title bar, which no picture shows, so that nothing in a picture is hovered. */ +async function park() { + await page.mouse.move(WIDTH / 2, 12); + await sleep(400); +} +const shots = []; +console.log("VS Code", await app.evaluate(({ app: electron }) => electron.getVersion())); + +async function shot(name, clip) { + await page.screenshot({ path: path.join(out, "raw", `${name}.png`), ...(clip && { clip }) }); + shots.push(name); + console.log( + `shot ${name}: ${clip ? `${Math.round(clip.width)}x${Math.round(clip.height)} at ${Math.round(clip.x)},${Math.round(clip.y)}` : "window"}`, + ); +} + +async function command(title) { + await page.keyboard.press("F1"); + await page.locator(".quick-input-widget input").first().waitFor({ state: "visible" }); + await page.keyboard.type(title, { delay: 5 }); + await sleep(500); + const first = await page.locator(".quick-input-widget .monaco-list-row").first().textContent(); + if (!first?.includes(title.replace(/^.*: /, "").slice(0, 20))) { + throw new Error(`command "${title}" not found, first match: ${first}`); + } + await page.keyboard.press("Enter"); + await sleep(700); +} + +const header = (name) => page.locator(`.part.sidebar .pane-header[aria-label="${name} Section"]`); +const pane = (name) => page.locator(`.part.sidebar .pane:has(> .pane-header[aria-label="${name} Section"])`); + +async function setPanes(open) { + const all = [ + "Variables", + "Watch", + "Call Stack", + "Breakpoints", + "Path Maps", + "Symbol Files", + "Consoles", + "Snapshots", + ]; + for (const name of all) { + const expanded = (await header(name).getAttribute("aria-expanded")) === "true"; + if (expanded !== open.includes(name)) { + await header(name).locator("h3").click(); + await sleep(250); + } + } + await sleep(400); +} + +/** The pane's box, cut below its last row. */ +function paneBox(name, minHeight = 0) { + return page.evaluate( + ([label, min]) => { + const head = document.querySelector(`.part.sidebar .pane-header[aria-label="${label} Section"]`); + const r = head.parentElement.getBoundingClientRect(); + const bottoms = [...head.parentElement.querySelectorAll(".monaco-list-row")] + .map((e) => e.getBoundingClientRect()) + .filter((b) => b.height > 0 && b.top >= r.top && b.bottom <= r.bottom + 1) + .map((b) => b.bottom); + const bottom = Math.max(head.getBoundingClientRect().bottom + min, ...bottoms) + 8; + return { x: r.x, y: r.y, width: r.width, height: Math.min(r.bottom, bottom) - r.y }; + }, + [name, minHeight], + ); +} + +/** The rows a pane shows, top to bottom, with the labels of their visible buttons. */ +function paneRows(name) { + return page.evaluate((label) => { + const head = document.querySelector(`.part.sidebar .pane-header[aria-label="${label} Section"]`); + const r = head.parentElement.getBoundingClientRect(); + const shown = (e) => { + const b = e.getBoundingClientRect(); + return b.width > 0 && b.height > 0 && getComputedStyle(e).visibility !== "hidden"; + }; + const actions = (e) => + [...e.querySelectorAll(".action-label")] + .filter(shown) + .sort((a, b) => a.getBoundingClientRect().x - b.getBoundingClientRect().x) + .map((a) => a.getAttribute("aria-label")) + .join(", "); + const rows = [...head.parentElement.querySelectorAll(".monaco-list-row")] + .filter((e) => { + const b = e.getBoundingClientRect(); + return b.height > 0 && b.top >= r.top && b.bottom <= r.bottom + 1; + }) + .sort((a, b) => a.getBoundingClientRect().y - b.getBoundingClientRect().y) + .map((e) => { + const state = e.getAttribute("aria-expanded"); + const mark = state === "true" ? "v " : state === "false" ? "> " : " "; + const acts = actions(e); + return `${" ".repeat(Number(e.getAttribute("aria-level") ?? 1) - 1)}${mark}${e.innerText.trim().replace(/\s+/g, " ")}${acts ? ` {${acts}}` : ""}`; + }); + return [`title buttons: ${actions(head) || "(none shown)"}`, ...rows]; + }, name); +} + +async function describePane(name) { + console.log(`--- ${name}\n ${(await paneRows(name)).join("\n ")}`); +} + +const union = (boxes) => { + const x = Math.min(...boxes.map((b) => b.x)); + const y = Math.min(...boxes.map((b) => b.y)); + return { + x, + y, + width: Math.max(...boxes.map((b) => b.x + b.width)) - x, + height: Math.max(...boxes.map((b) => b.y + b.height)) - y, + }; +}; + +async function boxOf(target) { + const box = typeof target.boundingBox === "function" ? await target.first().boundingBox() : target; + if (!box || box.width <= 0 || box.height <= 0) { + throw new Error("element for a callout is not shown"); + } + return box; +} + +const BADGE = 20; +const PAD = 2; +/** Where the badge of a callout box goes: a named place, or a point. */ +function badgeRect(b, place = b.place) { + if (typeof place === "object") { + return { x: place.x, y: place.y, width: BADGE, height: BADGE }; + } + const [x, y] = { + left: [b.x - PAD - BADGE - 2, b.y + b.height / 2 - BADGE / 2], + right: [b.x + b.width + PAD + 2, b.y + b.height / 2 - BADGE / 2], + top: [b.x + b.width / 2 - BADGE / 2, b.y - PAD - BADGE - 2], + bottom: [b.x + b.width / 2 - BADGE / 2, b.y + b.height + PAD + 2], + inside: [b.x + b.width - BADGE - 4, b.y + 4], + insideBottom: [b.x + b.width - BADGE - 4, b.y + b.height - BADGE - 4], + }[place]; + return { x, y, width: BADGE, height: BADGE }; +} + +/** The texts and controls that a rectangle (in window coordinates) covers in a page or webview frame. */ +async function covered(scope, rect) { + const origin = scope === page ? { x: 0, y: 0 } : await scope.locator("html").boundingBox(); + return scope.evaluate( + (r) => { + const hit = (b) => + b.width > 0 && + b.height > 0 && + b.left < r.x + r.width && + b.right > r.x && + b.top < r.y + r.height && + b.bottom > r.y; + const shown = (e) => { + for (let p = e; p; p = p.parentElement) { + const s = getComputedStyle(p); + if (s.visibility === "hidden" || s.display === "none" || s.opacity === "0") { + return false; + } + } + return true; + }; + const hits = new Set(); + const walker = document.createTreeWalker(document.body, NodeFilter.SHOW_TEXT); + for (let n = walker.nextNode(); n; n = walker.nextNode()) { + if (!n.textContent.trim() || n.parentElement.closest("#shot-callouts")) { + continue; + } + const range = document.createRange(); + range.selectNodeContents(n); + if ([...range.getClientRects()].some(hit) && shown(n.parentElement)) { + const p = n.parentElement; + hits.add( + `"${n.textContent.trim().slice(0, 24)}" in ${p.tagName.toLowerCase()}.${String(p.className).split(" ")[0]}`, + ); + } + } + for (const e of document.querySelectorAll("button, input, select, .codicon, .action-label")) { + if (hit(e.getBoundingClientRect()) && shown(e)) { + hits.add( + `<${e.tagName.toLowerCase()} ${e.getAttribute("title") ?? e.getAttribute("aria-label") ?? e.className}>`.slice( + 0, + 50, + ), + ); + } + } + return [...hits]; + }, + { x: rect.x - origin.x, y: rect.y - origin.y, width: rect.width, height: rect.height }, + ); +} + +/** Draws numbered outlines; returns a function that removes them. `scopes` are checked for what the badges cover. */ +async function callouts(items, within, scopes = [page]) { + const boxes = []; + for (const [n, target, place = "inside"] of items) { + const box = await boxOf(target); + if ( + within && + (box.x < within.x - 1 || + box.y < within.y - 1 || + box.x + box.width > within.x + within.width + 1 || + box.y + box.height > within.y + within.height + 1) + ) { + throw new Error( + `callout ${n} is outside the picture: ${JSON.stringify(box)} not in ${JSON.stringify(within)}`, + ); + } + boxes.push({ n, place, ...box }); + } + console.log( + "callouts:", + boxes + .map( + (b) => + `${b.n ?? "-"}@${Math.round(b.x)},${Math.round(b.y)} ${Math.round(b.width)}x${Math.round(b.height)}`, + ) + .join(" "), + ); + for (const b of boxes.filter((box) => box.n !== null)) { + const hitsAt = async (place) => { + const hits = []; + for (const scope of scopes) { + hits.push(...(await covered(scope, badgeRect(b, place)))); + } + return hits; + }; + const hits = await hitsAt(b.place); + const at = typeof b.place === "object" ? `${Math.round(b.place.x)},${Math.round(b.place.y)}` : b.place; + console.log(` badge ${b.n} (${at}) covers: ${hits.join(", ") || "nothing"}`); + if (hits.length > 0) { + for (const place of ["left", "right", "top", "bottom", "inside", "insideBottom"]) { + const r = badgeRect(b, place); + const inPicture = + !within || + (r.x >= within.x && + r.y >= within.y && + r.x + r.width <= within.x + within.width && + r.y + r.height <= within.y + within.height); + console.log( + ` ${place}: ${inPicture ? (await hitsAt(place)).join(", ") || "nothing" : "outside the picture"}`, + ); + } + throw new Error(`badge ${b.n} covers ${hits[0]}; the lines above list what each other place covers`); + } + } + await page.evaluate( + (list) => { + const layer = document.createElement("div"); + layer.id = "shot-callouts"; + Object.assign(layer.style, { position: "fixed", inset: "0", zIndex: "1000000", pointerEvents: "none" }); + for (const b of list) { + const pad = 2; + const frame = document.createElement("div"); + Object.assign(frame.style, { + position: "fixed", + left: `${b.x - pad}px`, + top: `${b.y - pad}px`, + width: `${b.width + 2 * pad}px`, + height: `${b.height + 2 * pad}px`, + border: "2px solid #ffb000", + borderRadius: "4px", + boxSizing: "border-box", + }); + const size = 20; + const pos = [b.badge.x, b.badge.y]; + layer.append(frame); + if (b.n === null) { + continue; + } + const badge = document.createElement("div"); + badge.textContent = String(b.n); + Object.assign(badge.style, { + position: "fixed", + left: `${pos[0]}px`, + top: `${pos[1]}px`, + width: `${size}px`, + height: `${size}px`, + borderRadius: "50%", + background: "#ffb000", + color: "#1b1b1b", + font: "bold 13px/20px sans-serif", + textAlign: "center", + boxShadow: "0 0 0 1px #1b1b1b", + }); + layer.append(badge); + } + document.body.append(layer); + }, + boxes.map((b) => ({ ...b, badge: badgeRect(b) })), + ); + await sleep(150); + return () => page.evaluate(() => document.getElementById("shot-callouts")?.remove()); +} + +/** The webview frame that has an element matching `selector`. */ +async function webview(selector) { + for (let i = 0; i < 60; i++) { + for (const frame of page.frames()) { + if ( + (await frame + .locator(selector) + .count() + .catch(() => 0)) > 0 + ) { + return frame; + } + } + await sleep(250); + } + throw new Error( + `no webview with ${selector}; frames: ${page + .frames() + .map((f) => f.url().slice(0, 60)) + .join(" ; ")}`, + ); +} + +/** + * How many pixels of a picture differ clearly from a reference picture: + * undefined without a reference, -1 if the sizes differ. The same view + * can differ in a pixel or two between runs, and that changes the colours + * that compressing picks, so small differences in colour are not counted. + */ +async function changedPixels(file, reference) { + if (!fs.existsSync(reference)) { + return undefined; + } + return page.evaluate( + async (files) => { + const [a, b] = await Promise.all( + files.map(async (base64) => { + const bytes = Uint8Array.from(atob(base64), (c) => c.charCodeAt(0)); + const bitmap = await createImageBitmap(new Blob([bytes], { type: "image/png" })); + const context = new OffscreenCanvas(bitmap.width, bitmap.height).getContext("2d"); + context.drawImage(bitmap, 0, 0); + return context.getImageData(0, 0, bitmap.width, bitmap.height); + }), + ); + if (a.width !== b.width || a.height !== b.height) { + return -1; + } + let count = 0; + for (let i = 0; i < a.data.length; i += 4) { + if ([0, 1, 2].some((c) => Math.abs(a.data[i + c] - b.data[i + c]) > 40)) { + count++; + } + } + return count; + }, + [file, reference].map((f) => fs.readFileSync(f).toString("base64")), + ); +} + +/** Writes a smaller copy of a picture for the documentation. pngquant also removes metadata. */ +function compress(raw, file) { + try { + execFileSync("pngquant", ["--quality=80-98", "--speed", "1", "--strip", "--force", "--output", file, raw]); + } catch { + // pngquant writes nothing if it cannot keep the quality. A capture has no metadata either. + fs.copyFileSync(raw, file); + } +} + +/** The fonts Chromium really draws the first match of each selector with. */ +async function fonts(selectors) { + const cdp = await page.context().newCDPSession(page); + await cdp.send("DOM.enable"); + await cdp.send("CSS.enable"); + const { root } = await cdp.send("DOM.getDocument"); + for (const selector of selectors) { + const { nodeId } = await cdp.send("DOM.querySelector", { nodeId: root.nodeId, selector }); + if (!nodeId) { + console.log(`font ${selector}: no such element`); + continue; + } + const { fonts: used } = await cdp.send("CSS.getPlatformFontsForNode", { nodeId }); + console.log( + `font ${selector}: ${used.map((f) => `${f.familyName} (${f.glyphCount} glyphs)`).join(", ") || "no text"}`, + ); + } + await cdp.detach(); +} + +const state = () => + page.evaluate(() => { + const box = (sel) => { + const e = document.querySelector(sel); + const r = e?.getBoundingClientRect(); + return r && r.width > 0 + ? `${Math.round(r.x)},${Math.round(r.y)} ${Math.round(r.width)}x${Math.round(r.height)}` + : "hidden"; + }; + const texts = (sel) => + [...document.querySelectorAll(sel)] + .filter((e) => e.getBoundingClientRect().width > 0) + .map((e) => e.getAttribute("aria-label") ?? e.textContent.trim()); + return { + window: `${innerWidth}x${innerHeight}`, + sidebar: box(".part.sidebar"), + auxiliarybar: box(".part.auxiliarybar"), + panel: box(".part.panel"), + editor: box(".part.editor"), + toasts: texts(".notifications-toasts .notification-list-item-message").join(" | ") || "(none)", + tabs: texts(".part.editor .tab").join(" | ") || "(none)", + debugToolbar: `${box(".debug-toolbar")}: ${texts(".debug-toolbar .action-label").filter(Boolean).join(" | ")}`, + editorTitleButtons: texts(".part.editor .editor-actions .action-label").join(" | ") || "(none)", + currentLine: document.querySelector(".part.editor .view-overlays .debug-top-stack-frame-line") + ? "highlighted" + : "not highlighted", + editorText: [...document.querySelectorAll(".part.editor .view-line")] + .slice(0, 3) + .map((l) => l.textContent.replace(/\u00a0/g, " ")) + .join(" / "), + terminal: + [...document.querySelectorAll(".part.panel .xterm-rows > div")] + .map((d) => d.textContent.trimEnd()) + .filter(Boolean) + .join(" / ") || "(empty)", + panelTab: texts(".part.panel .composite.title .action-item.checked a").join(" | "), + statusBar: texts(".part.statusbar .statusbar-item").join(" | "), + }; + }); + +async function describe(title) { + console.log(`\n=== ${title}`); + for (const [k, v] of Object.entries(await state())) { + console.log(`${k}: ${v}`); + } +} + +try { + await sleep(2500); + await command("Notifications: Clear All Notifications"); + await command("View: Show Run and Debug"); + await page.keyboard.press("F5"); + await page.locator(".debug-toolbar").waitFor({ state: "visible", timeout: 30000 }); + await sleep(5000); + // Continue: the agent stops again in the example thread, which takes the focus. + await page.keyboard.press("F5"); + await sleep(3000); + await command("Notifications: Clear All Notifications"); + // The floating debug toolbar covers the editor tabs, move it to the right of them. + await page.evaluate((dx) => { + const grip = document.querySelector(".debug-toolbar .drag-area"); + const r = grip.getBoundingClientRect(); + const x = r.x + r.width / 2; + const y = r.y + r.height / 2; + const event = (type, clientX) => + new MouseEvent(type, { bubbles: true, cancelable: true, view: window, clientX, clientY: y, button: 0 }); + grip.dispatchEvent(event("mousedown", x)); + document.body.dispatchEvent(event("mousemove", x + dx / 2)); + document.body.dispatchEvent(event("mousemove", x + dx)); + document.body.dispatchEvent(event("mouseup", x + dx)); + }, 320); + await park(); + await sleep(300); + + // ---- overview.png: a debug session ------------------------------------ + await setPanes(["Variables", "Call Stack", "Breakpoints"]); + // VS Code opens this group or not, depending on timing. The picture has it open. + const other = pane("Call Stack").locator(".monaco-list-row:has(.session)", { hasText: "Other.core[0][0]" }); + if ((await other.getAttribute("aria-expanded")) === "false") { + await other.locator(".monaco-tl-twistie").click(); + await sleep(700); + } + // The same selection and no keyboard focus in every run: no outline, no blinking cursor. + await pane("Call Stack").locator(".monaco-list-row:has(.stack-frame)", { hasText: "checksum" }).click(); + await sleep(700); + await page.evaluate(() => document.activeElement.blur()); + await park(); + await scrollbarsFaded(); + await describe("overview"); + for (const name of ["Variables", "Call Stack"]) { + await describePane(name); + } + await fonts([ + ".part.sidebar .debug-call-stack .monaco-list-row .name", + ".part.editor .view-line", + ".part.sidebar .pane-header h3", + ".part.panel .xterm-rows > div", + ".debug-toolbar .codicon", + ]); + const full = { x: 0, y: 30, width: WIDTH, height: HEIGHT - 30 }; + const viewHeaders = []; + for (const name of ["Path Maps", "Symbol Files", "Consoles", "Snapshots"]) { + viewHeaders.push(await header(name).boundingBox()); + } + let remove = await callouts( + [ + [1, pane("Call Stack")], + [2, page.locator('.debug-toolbar .action-label[aria-label="Open Target Memory"]'), "bottom"], + [3, union(viewHeaders)], + [4, page.locator(".part.panel"), "insideBottom"], + ], + full, + ); + await shot("overview", full); + await remove(); + + // ---- call-stack.png: the Call Stack view with all groups open ----------- + await setPanes(["Call Stack"]); + for (let i = 0; i < 12; i++) { + const row = pane("Call Stack").locator('.monaco-list-row[aria-expanded="false"]:has(.session)').first(); + if ((await row.count()) === 0) { + break; + } + await row.locator(".monaco-tl-twistie").click(); + await sleep(700); + } + const stackBox = await pane("Call Stack").boundingBox(); + await page.mouse.move(stackBox.x + 150, stackBox.y + 200); + await page.mouse.wheel(0, -3000); + await sleep(300); + // Select the current frame again, the last expanded group has the focus. + await pane("Call Stack").locator(".monaco-list-row:has(.stack-frame)", { hasText: "checksum" }).click(); + await park(); + await scrollbarsFaded(); + await describePane("Call Stack"); + console.log("selected row:", await pane("Call Stack").locator(".monaco-list-row.selected").innerText()); + await shot("call-stack", await paneBox("Call Stack")); + + // ---- context-picker.png and breakpoints.png ----------------------------- + await setPanes(["Call Stack", "Breakpoints"]); + const quick = page.locator(".quick-input-widget"); + const quickState = async () => + `${(await quick.locator(".quick-input-title").innerText()).trim()} :: ${( + await quick + .locator(".monaco-list-row") + .evaluateAll((rows) => + rows + .filter((r) => r.getBoundingClientRect().height > 0) + .map( + (r) => + `${r.classList.contains("focused") ? "*" : ""}${r.innerText.trim().replace(/\s+/g, " ")}`, + ), + ) + ).join(" | ")} :: placeholder "${await quick.locator("input").first().getAttribute("placeholder")}"`; + await command("Simics Target Debug: Add Function Breakpoint in Context..."); + await sleep(800); + console.log("picker:", await quickState()); + const q = await quick.boundingBox(); + await shot("context-picker", q); + await page.keyboard.press("Enter"); + await sleep(700); + console.log("input:", (await quick.locator(".quick-input-title").textContent())?.trim()); + await page.keyboard.type("handle_request"); + await page.keyboard.press("Enter"); + await sleep(800); + await command("Simics Target Debug: Add Function Breakpoint in Context..."); + await sleep(800); + await page.keyboard.type("Context Query"); + await sleep(400); + await page.keyboard.press("Enter"); + await sleep(700); + await page.keyboard.type("**/HasState=true"); + await page.keyboard.press("Enter"); + await sleep(700); + await page.keyboard.type("start_kernel"); + await page.keyboard.press("Enter"); + await sleep(1500); + // Hovering does not show in screenshots. A focused view shows its title buttons too. + await pane("Breakpoints").locator(".monaco-list").first().focus(); + await park(); + await scrollbarsFaded(); + await describePane("Breakpoints"); + const bpClip = await paneBox("Breakpoints"); + remove = await callouts( + [ + [ + null, + union([ + await header("Breakpoints") + .locator('.action-label[aria-label^="Add Function Breakpoint in Context"]') + .boundingBox(), + await header("Breakpoints") + .locator('.action-label[aria-label^="Edit Function Breakpoint Contexts"]') + .boundingBox(), + ]), + ], + ], + bpClip, + ); + await shot("breakpoints", bpClip); + await remove(); + + // ---- path-maps.png, symbol-files.png, consoles.png, snapshots.png ------- + await setPanes(["Path Maps", "Symbol Files", "Consoles", "Snapshots"]); + await sleep(800); + await park(); + for (const [name, file] of [ + ["Path Maps", "path-maps"], + ["Symbol Files", "symbol-files"], + ["Consoles", "consoles"], + ["Snapshots", "snapshots"], + ]) { + // The focused row shows its buttons, like a row under the pointer does. + await pane(name).locator(".monaco-list").first().focus(); + await page.keyboard.press("Home"); + await scrollbarsFaded(); + await describePane(name); + console.log( + `focused row: ${(await pane(name).locator(".monaco-list-row.focused").innerText()).replace(/\s+/g, " ")}`, + ); + await shot(file, await paneBox(name)); + } + + // ---- target-memory.png -------------------------------------------------- + await page.locator('.debug-toolbar .action-label[aria-label="Open Target Memory"]').click(); + const tm = await webview(".toolbar .target-select"); + await tm.locator(".address-input").fill("data"); + await tm.locator(".address-input").press("Enter"); + await sleep(2000); + if ((await tm.locator(".inspector").count()) === 0) { + await tm.locator('button[title="Data inspector"]').click(); + await sleep(500); + } + await park(); + await describe("target memory"); + console.log( + "memory rows:", + ( + await tm + .locator(".row") + .evaluateAll((rows) => rows.slice(0, 6).map((r) => r.innerText.replace(/\s+/g, " "))) + ).join(" / "), + ); + console.log( + "memory target:", + await tm + .locator(".target-select") + .evaluate((s) => [...s.options].map((o) => `${o.selected ? "*" : ""}${o.textContent}`).join(" | ")), + ); + console.log("memory inspector:", (await tm.locator(".inspector").innerText()).replace(/\s+/g, " ").slice(0, 260)); + console.log("memory status:", (await tm.locator(".status-bar").innerText()).replace(/\s+/g, " ")); + console.log( + "memory toolbar:", + ( + await tm.locator(".toolbar > *").evaluateAll((items) => + items.map((e) => { + const r = e.getBoundingClientRect(); + return `${e.getAttribute("title") ?? e.className}@${Math.round(r.x)},${Math.round(r.y)} ${Math.round(r.width)}x${Math.round(r.height)}`; + }), + ) + ).join(" "), + ); + let editorBox = await page.locator(".part.editor").boundingBox(); + const perRow = await tm.locator('select[title="Bytes per row"]').boundingBox(); + const readAgain = await tm.locator('button[title="Read memory again"]').boundingBox(); + const toolbarBox = await tm.locator(".toolbar").boundingBox(); + remove = await callouts( + [ + // The badge goes in the gap between the left and the right group of controls. + [ + 1, + toolbarBox, + { + x: (perRow.x + perRow.width + readAgain.x) / 2 - BADGE / 2, + y: toolbarBox.y + toolbarBox.height / 2 - BADGE / 2, + }, + ], + [2, tm.locator(".inspector"), "insideBottom"], + ], + editorBox, + [page, tm], + ); + await shot("target-memory", editorBox); + await remove(); + + // ---- launch-configurations.png ------------------------------------------ + await command("View: Toggle Panel Visibility"); + await command("Simics Target Debug: Edit Launch Configurations"); + const form = await webview("nav.list"); + await sleep(1500); + await form.locator(".context-scope").first().scrollIntoViewIfNeeded(); + await park(); + await sleep(500); + await describe("launch configurations"); + console.log( + "form list:", + ( + await form + .locator("nav.list li") + .evaluateAll((items) => + items.map((i) => `${i.classList.contains("selected") ? "*" : ""}${i.textContent}`), + ) + ).join(" | "), + ); + console.log("form settings:", (await form.locator(".details .setting-title .label").allTextContents()).join(" | ")); + console.log( + "form start button:", + await form + .locator(".details-header button.start") + .evaluate((b) => `${b.getAttribute("aria-label")} disabled=${b.disabled}`), + ); + console.log( + "form contexts:", + ( + await form + .locator(".context-scope select") + .evaluateAll((s) => s.map((e) => e.selectedOptions[0].textContent)) + ).join(" | "), + ); + editorBox = await page.locator(".part.editor").boundingBox(); + // The Contexts column of the first table; the badge goes in the free part of its header cell. + const table = form.locator(".object-list").first(); + const th = await table.locator("th", { hasText: "Contexts" }).boundingBox(); + const column = [th]; + for (const cell of await table.locator(".context-scope").all()) { + column.push(await cell.boundingBox()); + } + remove = await callouts( + [ + [1, form.locator("nav.list"), "insideBottom"], + [2, form.locator(".details-header .actions"), "left"], + [3, union(column), { x: th.x + th.width - BADGE - 3, y: th.y + (th.height - BADGE) / 2 }], + [ + 4, + union([ + await page + .locator('.part.editor .editor-actions .action-label[aria-label^="Open launch.json as Text"]') + .boundingBox(), + await page + .locator('.part.editor .editor-actions .action-label[aria-label^="Open Settings"]') + .boundingBox(), + ]), + "left", + ], + ], + editorBox, + [page, form], + ); + await shot("launch-configurations", editorBox); + await remove(); + + // ---- Which pictures differ from the committed ones ------------------------ + console.log("\ncompared with the committed pictures:"); + const changes = []; + for (const name of shots) { + const file = path.join(out, `${name}.png`); + compress(path.join(out, "raw", `${name}.png`), file); + const pixels = await changedPixels(file, path.join(before, `${name}.png`)); + const state = pixels === undefined ? "new" : pixels < 0 || pixels > NOISE ? "changed" : "unchanged"; + const note = pixels === undefined ? "" : pixels < 0 ? "other size" : `${pixels} pixels differ`; + console.log(` ${name}.png: ${state}${note && ` (${note})`}`); + changes.push(`${name}.png\t${state}\t${note}\n`); + } + if (firstCapture) { + const missing = new Set(fs.readdirSync(firstCapture).filter((name) => name.endsWith(".png"))); + const differences = []; + for (const name of shots) { + const file = `${name}.png`; + missing.delete(file); + const pixels = await changedPixels(path.join(out, file), path.join(firstCapture, file)); + if (pixels === undefined) differences.push(`${file}: missing from first capture`); + else if (pixels < 0) differences.push(`${file}: different dimensions`); + else if (pixels > NOISE) differences.push(`${file}: ${pixels} pixels differ`); + } + for (const file of missing) differences.push(`${file}: missing from second capture`); + if (differences.length > 0) throw new Error(`captures are not repeatable:\n ${differences.join("\n ")}`); + console.log(`Repeatability check passed (${shots.length} pictures, at most ${NOISE} different pixels each)`); + } + fs.writeFileSync(path.join(out, "changes.txt"), changes.join("")); +} catch (err) { + console.error("FAILED:", err.message); + await page.screenshot({ path: path.join(out, "failure.png") }).catch(() => undefined); + await describe("at failure").catch(() => undefined); + process.exitCode = 1; +} finally { + console.log("\nshots:", shots.join(", ") || "none"); + // Commands the stand-in agent does not know. The extension gets "not supported" for them. + console.log("unknown commands:", [...agent.unknown].join(", ") || "none"); + console.log("agent errors:", agent.errors.join("\n") || "none"); + if (agent.errors.length > 0) { + process.exitCode = 1; + } + await app.close().catch(() => undefined); + await agent.close(); +} diff --git a/scripts/docs-screenshots/run.sh b/scripts/docs-screenshots/run.sh new file mode 100644 index 0000000..f9c2ee5 --- /dev/null +++ b/scripts/docs-screenshots/run.sh @@ -0,0 +1,112 @@ +#!/usr/bin/env bash +# Makes the screenshots of the user guide (docs/images/) again. +# See .github/skills/docs-screenshots/SKILL.md. + +set -euo pipefail + +repo="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)" +tool="$repo/scripts/docs-screenshots" +work="$repo/.tmp/docs-screenshots" +images="$repo/docs/images" + +repeatability=false +if [[ $# -eq 1 && "$1" == --check-repeatability ]]; then + repeatability=true +elif [[ $# -ne 0 ]]; then + echo "Usage: npm run docs:screenshots -- [--check-repeatability]" >&2 + exit 2 +fi + +for cmd in bwrap xvfb-run pngquant curl tar sha256sum git node npm; do + if ! command -v "$cmd" >/dev/null; then + echo "$cmd is needed, but it is not installed." >&2 + exit 1 + fi +done +if [[ ! -d "$repo/node_modules/playwright-core" ]]; then + echo "Run 'npm ci' first." >&2 + exit 1 +fi +mkdir -p "$work" + +# VS Code: the latest stable build, kept in $work, unless VSCODE_BIN names its executable. +if [[ -z "${VSCODE_BIN:-}" ]]; then + info="$(curl -fsSL "https://update.code.visualstudio.com/api/update/linux-x64/stable/latest")" + read -r version url sha256 < <(node -e ' + const info = JSON.parse(require("fs").readFileSync(0, "utf8")); + console.log(info.productVersion, info.url, info.sha256hash);' <<<"$info") + VSCODE_BIN="$work/vscode-$version/code" + if [[ ! -x "$VSCODE_BIN" ]]; then + echo "Downloading VS Code $version..." + curl -fL --progress-bar -o "$work/vscode.tar.gz" "$url" + echo "$sha256 $work/vscode.tar.gz" | sha256sum --check --quiet + rm -rf "$work/vscode-$version.partial" + mkdir "$work/vscode-$version.partial" + tar -xzf "$work/vscode.tar.gz" -C "$work/vscode-$version.partial" --strip-components=1 + mv "$work/vscode-$version.partial" "$work/vscode-$version" + rm "$work/vscode.tar.gz" + # A build is about 1 GB, and an older one is not used again. + find "$work" -mindepth 1 -maxdepth 1 -type d -name 'vscode-*' ! -name "vscode-$version" -exec rm -rf {} + + fi +fi + +# The pictures show the extension as it is in the working tree. +(cd "$repo" && npm run --silent compile) + +rm -rf "${work:?}/before" +mkdir -p "$work/before" +# The pictures of the last commit, to tell which ones change. +git -C "$repo" archive HEAD docs/images 2>/dev/null | tar -x -C "$work/before" --strip-components=2 2>/dev/null || true + +# The sandbox hides /home and /tmp and has no network, so that a picture cannot +# show a path or a host name of this machine, and so that port 1534 is the +# stand-in agent and never a real one. Keep only the paths needed for capture. +keep=() +for dir in "$repo" "$(dirname "$VSCODE_BIN")" "$(dirname "$(dirname "$(readlink -f "$(command -v node)")")")"; do + if [[ "$dir" == /home/* || "$dir" == /tmp/* ]]; then + keep+=(--bind "$dir" "$dir") + fi +done + +capture() { + local first_capture="${1:-}" + rm -rf "${work:?}/workspace" "${work:?}/home" "${work:?}/out" + mkdir -p "$work/home" "$work/out" + cp -r "$tool/workspace" "$work/workspace" + bwrap --bind / / --dev-bind /dev /dev --proc /proc --tmpfs /tmp \ + --tmpfs /home --bind "$work/home" /home/user --bind "$work/workspace" /home/user/server \ + "${keep[@]}" \ + --unshare-net --unshare-pid --die-with-parent \ + --setenv HOME /home/user --setenv SHOTS_SANDBOX 1 --setenv VSCODE_BIN "$VSCODE_BIN" \ + --setenv SHOTS_WORKSPACE /home/user/server --setenv SHOTS_WORK "$work" \ + --setenv SHOTS_OUT "$work/out" --setenv SHOTS_BEFORE "$work/before" \ + --setenv SHOTS_FIRST_CAPTURE "$first_capture" \ + xvfb-run -a -s "-screen 0 2600x2000x24" node "$tool/capture.mjs" 2>&1 | tee "$work/capture.log" +} + +capture +if "$repeatability"; then + rm -rf "${work:?}/first-capture" + mv "$work/out" "$work/first-capture" + mv "$work/capture.log" "$work/first-capture.log" + capture "$work/first-capture" +fi + +# Pictures that changed go to docs/images. +echo +echo "Pictures in docs/images:" +mkdir -p "$images" +while IFS=$'\t' read -r name state note; do + if [[ "$state" == unchanged ]]; then + cp "$work/before/$name" "$images/$name" + else + cp "$work/out/$name" "$images/$name" + fi + printf ' %-28s %s\n' "$name" "$state${note:+ ($note)}" +done <"$work/out/changes.txt" +for old in "$images"/*.png; do + if [[ ! -e "$work/out/$(basename "$old")" ]]; then + printf ' %-28s %s\n' "$(basename "$old")" "not made by this run" + fi +done +echo "Log: ${work#"$repo"/}/capture.log, pictures of the last commit: ${work#"$repo"/}/before/" diff --git a/scripts/docs-screenshots/vscode.mjs b/scripts/docs-screenshots/vscode.mjs new file mode 100644 index 0000000..dcde5dd --- /dev/null +++ b/scripts/docs-screenshots/vscode.mjs @@ -0,0 +1,84 @@ +// Starts VS Code with the extension of this repository, for capture.mjs. +import { _electron as electron } from "playwright-core"; +import * as fs from "node:fs"; +import * as path from "node:path"; + +const repo = path.resolve(import.meta.dirname, "../.."); +/** Scratch folder for the profile of the VS Code that is started. */ +const work = process.env.SHOTS_WORK; +/** The example workspace, at the path that the pictures show. */ +export const workspace = process.env.SHOTS_WORKSPACE; + +const SETTINGS = { + "workbench.colorTheme": "Default Dark Modern", + "workbench.startupEditor": "none", + "workbench.tips.enabled": false, + "workbench.enableExperiments": false, + "workbench.secondarySideBar.defaultVisibility": "hidden", + "workbench.layoutControl.enabled": false, + "workbench.navigationControl.enabled": false, + "window.commandCenter": false, + "window.titleBarStyle": "custom", + "window.menuBarVisibility": "compact", + "chat.commandCenter.enabled": false, + "chat.disableAIFeatures": true, + "telemetry.telemetryLevel": "off", + "update.mode": "none", + "extensions.autoUpdate": false, + "extensions.ignoreRecommendations": true, + "security.workspace.trust.enabled": false, + "editor.minimap.enabled": false, + "editor.stickyScroll.enabled": false, + "editor.fontSize": 13, + "terminal.integrated.fontSize": 13, + "debug.showInStatusBar": "never", + "git.enabled": false, + "scm.showChangesSummary": false, + // The dots on the dividers between the parts hide a while after the pointer stops. Always shown, so no timing. + "workbench.sash.autoHideGrippers": false, + "window.zoomLevel": 0, +}; + +export async function launch({ width = 1280, height = 800, settings = {}, scale = 2 } = {}) { + const userData = path.join(work, "user-data"); + fs.rmSync(userData, { recursive: true, force: true }); + fs.mkdirSync(path.join(userData, "User"), { recursive: true }); + fs.writeFileSync( + path.join(userData, "User", "settings.json"), + JSON.stringify({ ...SETTINGS, ...settings }, null, 2), + ); + // A terminal of VS Code sets variables that make the new VS Code start as plain Node.js. + const env = Object.fromEntries( + Object.entries(process.env).filter(([k]) => !k.startsWith("VSCODE_") && k !== "ELECTRON_RUN_AS_NODE"), + ); + const app = await electron.launch({ + executablePath: process.env.VSCODE_BIN, + args: [ + "--no-sandbox", + "--disable-gpu", + `--force-device-scale-factor=${scale}`, + "--skip-welcome", + "--skip-release-notes", + "--disable-workspace-trust", + "--disable-updates", + "--disable-telemetry", + "--disable-extensions", + `--extensionDevelopmentPath=${repo}`, + `--user-data-dir=${userData}`, + `--extensions-dir=${path.join(work, "extensions")}`, + workspace, + ], + env, + timeout: 60000, + }); + const page = await app.firstWindow(); + await app.evaluate( + ({ BrowserWindow }, size) => { + const w = BrowserWindow.getAllWindows()[0]; + w.setBounds({ x: 0, y: 0, width: size.width, height: size.height }); + }, + { width, height }, + ); + await page.waitForSelector(".monaco-workbench", { timeout: 60000 }); + return { app, page }; +} diff --git a/scripts/docs-screenshots/workspace/.vscode/launch.json b/scripts/docs-screenshots/workspace/.vscode/launch.json new file mode 100644 index 0000000..afc025d --- /dev/null +++ b/scripts/docs-screenshots/workspace/.vscode/launch.json @@ -0,0 +1,31 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "type": "simics-target-debug", + "request": "attach", + "name": "Attach to Simics", + "host": "localhost", + "port": 1534, + "symbolFiles": [ + { "path": "${workspaceFolder}/build/server.elf", "contextQuery": "**/HasState=true" }, + { "path": "${workspaceFolder}/build/driver.ko", "address": "0xffffffffa0000000" } + ], + "pathMap": [ + { "source": "/build/server", "destination": "${workspaceFolder}" }, + { + "source": "/build/libs", + "destination": "${workspaceFolder}/libs", + "contextQuery": "**/HasState=true" + } + ] + }, + { + "type": "simics-target-debug", + "request": "attach", + "name": "Attach to lab server", + "host": "simics-lab.example.com", + "port": 1534 + } + ] +} diff --git a/scripts/docs-screenshots/workspace/src/server.c b/scripts/docs-screenshots/workspace/src/server.c new file mode 100644 index 0000000..bc4bcd0 --- /dev/null +++ b/scripts/docs-screenshots/workspace/src/server.c @@ -0,0 +1,36 @@ +#include +#include +#include "net.h" + +static uint32_t checksum(const uint8_t *data, size_t len) +{ + uint32_t sum = 0; + for (size_t i = 0; i < len; i++) { + sum += data[i]; + } + return sum; +} + +static int handle_request(int fd, const uint8_t *request, size_t len) +{ + if (len == 0) { + return -1; + } + uint32_t sum = checksum(request, len); + return send_reply(fd, sum); +} + +static void serve(int fd) +{ + uint8_t request[256]; + size_t len = read_request(fd, request, sizeof request); + handle_request(fd, request, len); +} + +/* Serves requests on port 8080. */ +int main(void) +{ + int fd = open_port(8080); + serve(fd); + return 0; +}