diff --git a/.agents/skills/reverse-engineer-anything/SKILL.md b/.agents/skills/reverse-engineer-anything/SKILL.md index e21de6c0a..de9f6b7c1 100644 --- a/.agents/skills/reverse-engineer-anything/SKILL.md +++ b/.agents/skills/reverse-engineer-anything/SKILL.md @@ -2,7 +2,7 @@ name: reverse-engineer-anything description: Reverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. metadata: - version: "39" + version: "41" --- # REA @@ -61,12 +61,47 @@ explicit path or endpoint and do not need it. consult the NativeAOT workflow in `references/native-and-artifacts.md` for optional metadata recovery and its supported host/layout boundary. - User-owned browser page already open: `list_browser_targets`. -- Retained HAR/native mitmproxy capture: `inspect_web_network_capture`. Select +- Fiddler Everywhere traffic or a native `.saz` capture: read the + [Fiddler workflow](references/runtime-observation.md#fiddler-everywhere-traffic-debugging). + Inspect saved SAZ with `inspect_web_network_capture` and `format: "saz"`; + connect Everywhere's separate MCP server for live traffic. +- Retained HAR/SAZ/native mitmproxy/aioquic qlog capture: `inspect_web_network_capture`. Select original record ordinals when useful; inspect producer fields and byte/number sidecars without fetching recorded URLs or claiming live attribution. See [historical captures](https://github.com/morluto/rea/blob/main/docs/web-network-captures.md) for the exact upstream - profile and credential exclusions. + profile and credential exclusions. Qlog support starts with aioquic 1.5.0 + JSON 0.3; stream coverage and endpoint loss declarations do not recover bodies + or establish network loss. Prefer detail summary, then kind qlog trace/stream + pages; select one trace, stream ID and direction for contribution/range pages. + Facts retain all-recorded-events-before-selection scope. Other qlog layouts + and PCAP correlation are unsupported. - User-owned Electron runtime already open: `list_electron_targets`. +- Packet-field discovery: `inspect_packet_fields` searches installed protocols + and field names/types before choosing fields for `inspect_packet_capture`. + Query/page the relevant records; registrations do not establish observed traffic. +- Recorded packet captures: `inspect_packet_capture` with selected TShark fields, + display filters and decode-as rules. Requires Linux, util-linux prlimit and `REA_TSHARK_COMMAND`; see + [capture guide](https://github.com/morluto/rea/blob/main/docs/packet-captures.md). + Packet limits count input packets before filtering. Output defaults to 50 matching + frames; use `match_offset` / `match_limit` for later pages, or explicit null + limit for complete matching output. Preserve the source digest across pages. + This does not perform live capture. + For address/DNS/SNI/protocol summaries use `inspect_pcap_capture` with MCP + detail summary, then retained kind pcap pages. Requires Wireshark 4.x tshark + and capinfos, with Linux prlimit or Windows Job Objects; see + [packet summaries](https://github.com/morluto/rea/blob/main/docs/pcap-analysis.md). + Select an exact DNS question for address pages; page exhaustion does not prove + network completeness. This reads recordings and does not acquire traffic. +- Decoder discovery: `inspect_signal_decoders` searches installed decoder IDs + or selected decoder help, including channels and options. Query and page the + relevant details before choosing settings; this does not scan hardware. +- Recorded logic/signal traces: `decode_signal_recording` with explicit decoder, + channel and protocol settings. On Linux with util-linux prlimit, supply sigrok-cli 0.7.2 through + `REA_SIGROK_COMMAND`; see [recording guide](https://github.com/morluto/rea/blob/main/docs/signal-recordings.md). + Output defaults to 50 literal lines; select annotation classes and page with + `line_offset` / `line_limit`, or explicit null for all remaining output. + Window counts are display lines, not annotations or samples. Preserve source digests across pages. + This reads existing files; it does not acquire hardware signals. - Explicit local WebAssembly artifact: `inspect_wasm_artifact`. Supply WABT 1.0.42 through `REA_WABT_BIN_DIRECTORY`; retain exact byte/tool identity and decoded WAT. Select JavaScript glue and candidate paths explicitly and preserve URL/path @@ -75,7 +110,11 @@ explicit path or endpoint and do not need it. - Explicit local EVM bytecode carrier: `inspect_evm_interface` with caller-selected `raw` or `hex` encoding. Preserve carrier/decoded digests and treat selectors, argument strings and mutability as inferred candidates; this performs no chain - lookup or target execution. See the + lookup or target execution. For the complete inferred interface without hex or + duplicate stdout, discover support and select `detail: "summary"`; complete + Evidence stays retained under its original identity. Use the returned + `parent_evidence_id` for exact function or `bytecode_hex`/stdout/stderr pages. + Candidate coverage does not establish interface completeness. See the [EVM bytecode guide](https://github.com/morluto/rea/blob/main/docs/evm-bytecode.md). - Embedded Go compiler, module or build-setting metadata: `inspect_go_binary` with the explicit local file. This built-in target-free inspection requires no @@ -83,6 +122,15 @@ explicit path or endpoint and do not need it. absent metadata does not prove a binary is not Go, and unparsed text records remain explicit. See the [Go binary guide](https://github.com/morluto/rea/blob/main/docs/go-binaries.md). + +- Explicit local SQLite database snapshot: `inspect_sqlite_database`. Inspect + with Node.js 24.x >=24.15 or 26+ providing native SQLite limits. Read schema + first (compact inventory by default), or select an exact ordinary table + and `columns` when rows are needed. Defaults are selected-table schema and + 20 rows; request `schema_scope: "database"` for the complete stored schema. Preserve both database and existing sibling WAL identity; row samples + report truncation and have unspecified order. Use a quiescent snapshot rather + than assuming a live database/WAL pair was copied atomically. See the + [SQLite guide](https://github.com/morluto/rea/blob/main/docs/sqlite-databases.md). - Explicit Linux ELF file for offline layout, symbols, relocations or static mitigation evidence: `inspect_binary_layout`. This target-free operation uses caller-supplied pwntools without opening a disassembler database. Preserve its diff --git a/.agents/skills/reverse-engineer-anything/references/connection-and-recovery.md b/.agents/skills/reverse-engineer-anything/references/connection-and-recovery.md index 9b06a93fc..ed8393bd9 100644 --- a/.agents/skills/reverse-engineer-anything/references/connection-and-recovery.md +++ b/.agents/skills/reverse-engineer-anything/references/connection-and-recovery.md @@ -45,8 +45,8 @@ rea setup --client codex --dry-run --json Use the current supported client's ID: `claude_code`, `claude_desktop`, `codex`, `cursor`, `gemini_cli`, `windsurf`, `devin`, `opencode`, `antigravity`, -`copilot_cli`, `commandcode`, `qwen_code`, `vscode`, `grok_build`, `omp`, `pi`, -`hermes`, `dsh`, or `grok_bot`. If unknown, inspect `doctor --json` before choosing a +`copilot_cli`, `commandcode`, `qwen_code`, `vscode`, `trae`, `grok_build`, `omp`, `pi`, +`hermes`, `qoder`, `zcode`, `dsh`, or `grok_bot`. If unknown, inspect `doctor --json` before choosing a scope. `grok_bot` uses a chat registration step rather than local `mcp.json`. For unsupported clients, use version-pinned manual stdio registration or CLI. diff --git a/.agents/skills/reverse-engineer-anything/references/evidence-workflows.md b/.agents/skills/reverse-engineer-anything/references/evidence-workflows.md index 5ccd021b9..c651287f3 100644 --- a/.agents/skills/reverse-engineer-anything/references/evidence-workflows.md +++ b/.agents/skills/reverse-engineer-anything/references/evidence-workflows.md @@ -11,6 +11,19 @@ returned inline. When complete `inspect_binary_layout` or `inspect_analysis_view` for a summary, one section/symbol/module, or a stable page instead of repeating the producer. +Completed `inspect_artifact` inventory also supports a summary and +`view: {kind: "inventory", collection: "occurrences", logical_paths: ["package.json", "main.js"]}`. +Omit `logical_paths` to page all available occurrences; `[]` selects none. +Other inventory collections are `nodes`, `edges` and +`integrity_contradictions`. Keep `source_complete` separate from page exhaustion: +a missing match in partial source Evidence does not establish absence. Use the +returned parent Evidence ID for subsequent views and export before closing the +session when the source must survive it. +When `tools/list` advertises `inspect_artifact.detail`, request `"summary"` to +retain its complete source and receive that view immediately. Without that +advertised choice, keep the existing complete call. CLI inspection returns +portable complete Evidence; save it before projecting a selected inline view. + Use `record_unknown` to track unresolved questions in the user's investigation and name the authority or environment still required. Supply supporting and contradicting evidence IDs. It updates the session registry directly. diff --git a/.agents/skills/reverse-engineer-anything/references/native-and-artifacts.md b/.agents/skills/reverse-engineer-anything/references/native-and-artifacts.md index 2b0def8e4..6a942c73c 100644 --- a/.agents/skills/reverse-engineer-anything/references/native-and-artifacts.md +++ b/.agents/skills/reverse-engineer-anything/references/native-and-artifacts.md @@ -11,6 +11,21 @@ unparsed module-text line. A missing record is an unknown, not proof of a non-Go binary; observed metadata does not authenticate its claims. Function, source and type recovery remain a separate native-analysis question. +## SQLite snapshots + +Use `inspect_sqlite_database` with an explicit local database snapshot for its +schema and optional rows from one exact ordinary table. It requires Node.js +24.x >=24.15 or 26+ with the native `DatabaseSync.limits` API. It also consumes the +existing sibling `-wal`; retain both original digests when citing its result. +Default output is a compact inventory; a selected table expands only its own +schema and samples 20 rows. Select `columns` to avoid irrelevant or large cells, +and request `schema_scope: "database"` only for complete schema details. +Choose `row_limit` when a finite sample is useful and keep truncation and +unspecified row order explicit. Virtual tables, shadow tables and views are +schema facts, not row-read targets. REA inspects private copies and leaves +the source files untouched; obtain a coherent quiescent database/WAL snapshot +before inspection. See [SQLite snapshots](https://github.com/morluto/rea/blob/main/docs/sqlite-databases.md). + ## Recorded Linux crashes Use `inspect_recorded_crash` with an explicit Linux x86-64 ELF core path to @@ -36,6 +51,20 @@ retained, call `inspect_analysis_view` for a summary, mitigations or linkage facet, one section or symbol, or a stable page. Do not re-run the decoder to read a single object. +## Offline WASM + +Use `inspect_wasm_artifact` with caller-supplied WABT for selected local bytes. +For counts, validation and WAT identity, select `detail: "summary"` on the first +MCP call. The complete original Evidence stays retained; use +`normalized_result.parent_evidence_id` for exact exports or text pages. Omitted +or complete detail keeps the existing complete result. +For a completed result, use `inspect_analysis_view` with its reported retained +reference for a summary or `view: {kind: "wasm", facet: "exports", offset: 0, limit: 32}`. +Facets also include sections, imports, candidates, glue, WAT, headers, details +and tool profile. Text offsets count UTF-16 code units; follow `next_offset`. +The complete source remains retained after an oversized MCP reply. No target +execution or network acquisition is implied, and WAT is decoded representation. + ## Native targets After `open_binary`, use focused search, procedure, or function tools directly. @@ -54,6 +83,14 @@ names, the native API record, and value-flow summaries. Pseudocode offsets and l code units; use the returned `next_offset` for continuation. Provider limitations and unavailable facts remain explicit; the complete parent Evidence is retained. +`inspect_macho` on a large framework returns megabytes of imports and exports. +Select `detail: "summary"` for slice identity, UUID and per-collection counts, +then page rows with `view: {kind: "macho", facet: "exports", offset: 0, limit: 64}` +and `normalized_result.parent_evidence_id`. Facets are entrypoints, +architectures, build_metadata, load_commands, dependencies, imports, exports, +segments and provenance. `source_exhaustive: false` means unreturned symbols +may exist. + To see which functions or Objective-C methods a Mach-O actually calls in one run, use `observe_native_calls` with explicit breakpoints and a bounded `duration_ms`/`max_events`. It launches a new process under LLDB, so the target @@ -82,6 +119,8 @@ loaded bytes, file mappings, relocations and the entry against the immutable snapshot. Keep `mismatch` and `unsupported` explicit. Verified import covers the reported static image, not runtime DOS or PC-98 hardware behavior. +For Ghidra decompilation, `procedure_pseudo_code` also accepts `procedure: "file-offset:0x..."`; CLI `rea decompile --file-offset=0x... --provider ghidra` resolves the source byte offset internally. An unresolved 0x-prefixed numeric procedure selector also falls back to a unique file mapping. Existing symbols and analysis addresses win; multiple mappings fail as ambiguous. Preserve the returned file-offset and address locations and raw selection observations. ELF virtual addresses are distinct from file offsets; never assume an arbitrary offset plus image base is an analysis address. + Use `read_bytes` for initialized analysis memory and `address_to_file_offset` to anchor one observed address to original file bytes. Loader fixups can change a word; a source offset does not imply byte equality. Complete function body ranges @@ -106,6 +145,18 @@ assembly. Keep managed/native boundaries and unavailable reconstruction facts explicit. A bring-your-own reconstruction oracle is separate from the canonical parser and must not become an implicit setup dependency. +For identity/classification questions, `inspect_managed_artifact` can explicitly +select `detail: "summary"` on the first MCP call. It retains complete metadata +and returns a linked overview with full classification/evidence, nullable +module/MVID, frameworks, metadata coverage/issues/limitations and returned-row +counts. Default complete requests remain unchanged. Read original rows with +`inspect_analysis_view`, source `normalized_result.parent_evidence_id`, and +`view: {kind: "managed", collection: "attributes", offset: 0, limit: 16}`. +Collections are `references`, `resources` and `attributes`. Paging does not +repeat parsing. Returned-row exhaustion +does not prove complete metadata or absence under partial/unavailable coverage; +preserve build-local tokens and their artifact/MVID scope. + ### .NET NativeAOT NativeAOT binaries contain native machine code, so ordinary CIL decompilers @@ -121,15 +172,15 @@ them. For packaged apps, inventory/extract with REA's artifact tools and retain the exact contained image identity. PDB, ELF debug, or dSYM sidecars are additional evidence only when the provider accepts and matches them. -For deeper type recovery, the optional third-party -[Ghidra NativeAOT analyzer](https://github.com/Washi1337/ghidra-nativeaot) -rehydrates ReadyToRun metadata and can recover method tables, type relationships, -frozen objects, and strings. This is a Ghidra extension with its own install and -interactive workflow; it is not currently part of REA's managed parser or -headless Ghidra bridge. Treat its annotations as analysis evidence, retain the -binary identity, and do not present recovered types as original source. Header -discovery may require a symbol or analyst identification of the ReadyToRun -header, depending on the binary and analyzer version. +REA has a built-in read-only snapshot parser for x64 PE targets with .NET 8 RTR +9.1 metadata. An optional headless Ghidra adapter adds database annotations and +broader metadata recovery on Linux; it requires an explicitly configured +NativeAOT JAR. These are separate routes. See the +[NativeAOT guide](https://github.com/morluto/rea/blob/main/docs/ghidra-nativeaot.md) +for setup, supported layouts, and host restrictions. Preserve binary identity +and distinguish derived metadata from Ghidra database observations. Recovered +types and native pseudocode are not original C# source. Windows Ghidra P0 has +no database mutation authority. ## Packages and extraction @@ -153,8 +204,9 @@ every executable in the bundle. It also lists missing or weak loads and earlier `architecture`. System paths stay undetermined because the dyld shared cache provides them. -Use `extract_artifact` when materialized files are needed. It takes no arguments -and materializes all regular files into a fresh temporary directory chosen by +Use `extract_artifact` when materialized files are needed. It extracts the active +target and accepts optional `integrity_policy`; see the [MCP contracts](https://github.com/morluto/rea/blob/main/docs/mcp-contracts.md). +It materializes all regular files into a fresh temporary directory chosen by REA. Symlinks and encrypted entries are inventory facts, not extractable files. The result reports the materialized directory; callers do not choose the destination. No separate permission grant is needed. diff --git a/.agents/skills/reverse-engineer-anything/references/runtime-observation.md b/.agents/skills/reverse-engineer-anything/references/runtime-observation.md index 3e16a3e19..2d660d675 100644 --- a/.agents/skills/reverse-engineer-anything/references/runtime-observation.md +++ b/.agents/skills/reverse-engineer-anything/references/runtime-observation.md @@ -26,3 +26,18 @@ passive browser/Electron Evidence exist. Prefer captured-source digest identity; report path/digest disagreement as a mismatch and preserve ambiguity. Explicit path mappings are inference inputs and never broaden filesystem or CDP authority. A bundle observed at runtime does not prove every contained module executed. + +## Fiddler Everywhere traffic debugging + +For large saved captures, request `detail: "summary"`, then page retained Evidence +with `inspect_analysis_view` and `view: {kind: "capture", detail: "preview", offset: 0, limit: 20}`. +Select complete record pages only for needed headers, metadata or payloads; views +read the historical parent without repeating capture decoding. + +Inspect native `.saz` snapshots with `inspect_web_network_capture` and +`format: "saz"`; encrypted archives are unsupported. For live +traffic analysis, connect Everywhere's separate MCP server and use its +advertised session tools with an explicit `sessionsSource` (`LiveTraffic` or +`AgentCalls`). Preserve existing sessions and filters when inspecting a +recorded run. See the [capture and MCP guide](https://github.com/morluto/rea/blob/main/docs/web-network-captures.md) +for the workflow and Telerik's public setup and traffic-debugging skills. diff --git a/.gitattributes b/.gitattributes index 1774c0113..b8247b27f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3,3 +3,6 @@ # Windows command fixtures retain their native line endings. *.cmd text eol=crlf + +# Preserve whitespace in original upstream licensing texts. +licenses/npm-runtime-notices.txt whitespace=-blank-at-eol diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 02c8ed478..e45d5d566 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,8 @@ blank_issues_enabled: false contact_links: + - name: Contribution scope and integration requirements + url: https://github.com/morluto/rea/blob/main/CONTRIBUTING.md#contribution-scope + about: Check supported capabilities, excluded workflows, and the fail-closed integration rule before proposing a feature. - name: REA Documentation url: https://github.com/morluto/rea#readme about: Read the README and AGENTS.md for usage guides and configuration details. diff --git a/.github/ISSUE_TEMPLATE/design_discussion.yml b/.github/ISSUE_TEMPLATE/design_discussion.yml index 912e18c44..38d33ac82 100644 --- a/.github/ISSUE_TEMPLATE/design_discussion.yml +++ b/.github/ISSUE_TEMPLATE/design_discussion.yml @@ -1,5 +1,5 @@ name: Design discussion -description: Resolve an REA architecture, provider, or contract question before implementation +description: Discuss an REA architecture, provider, contract, or scope decision title: "[Design] " labels: - enhancement @@ -9,7 +9,12 @@ body: attributes: value: | Use this for a substantial provider, public/persisted contract, or - authority-boundary decision. Keep one decision per discussion. + authority-boundary decision. One question and a short explanation are + enough to start. Choose "Not sure yet" where needed; maintainers can help + with technical details, alternatives, and verification. + + Read the [contribution scope](https://github.com/morluto/rea/blob/main/CONTRIBUTING.md#contribution-scope). + Unresolved boundaries block integration, not opening a discussion. - type: checkboxes id: before-submitting @@ -18,14 +23,16 @@ body: options: - label: I searched the open and closed issues and pull requests for a related discussion. required: true - - label: I removed credentials, tokens, private paths, and sensitive target data. + - label: I understand the [contribution scope](https://github.com/morluto/rea/blob/main/CONTRIBUTING.md#contribution-scope) must be reviewed before integration; open questions are welcome here. + required: true + - label: This discussion does not include credentials, private samples, or sensitive target data. required: true - type: textarea id: decision attributes: label: Decision needed - description: State the exact question maintainers need to resolve. + description: What would you like maintainers to help decide? A short question is enough. placeholder: Should REA ... or ...? validations: required: true @@ -34,23 +41,57 @@ body: id: context-evidence attributes: label: Context and evidence - description: Explain why the decision is needed now. Separate observed behavior, derived evidence, and inference. + description: Explain the problem or motivation. If you have evidence, distinguish observed behavior from ideas or guesses. + validations: + required: true + + - type: dropdown + id: target-interaction + attributes: + label: Expected interaction with targets + description: >- + Select all known effects, including upstream tool behavior. Add "Not sure + yet" if anything is unclear. Use "No target interaction" only on its own. + These selections help discussion and do not establish scope approval. + multiple: true + options: + - Read existing files or captured data + - Launch or attach to a process + - Inject instrumentation or run scripts/code + - Change process memory or registers + - Write or change files/configuration + - Contact network services + - Recover protected code or work around protections + - No target interaction (documentation or usability only) + - Not sure yet validations: required: true - type: textarea id: boundary-invariants attributes: - label: Boundary and invariants - description: Identify the owning layer, provider/bridge boundary, artifact or evidence invariants, and any process or authorization constraints. - validations: - required: true + label: Boundary details (optional) + description: >- + If known, clarify target selection, selected effects, provider boundaries, + non-goals, or evidence invariants. Leave blank if you need help identifying + them. Do not include private samples or proof-of-authorization documents. - type: textarea id: options attributes: label: Options and tradeoffs - description: Compare a small number of viable approaches, including platform, compatibility, safety, evidence, and maintenance costs. + description: Optional approaches or tradeoffs. One idea is enough; maintainers can help compare alternatives. + + - type: dropdown + id: verification-readiness + attributes: + label: Verification available so far + description: Pick the closest match. An idea without samples or test results is welcome. + options: + - Idea only; I need help defining checks + - I can suggest a sample or manual check + - I have a prototype or observed results + - Not sure yet validations: required: true @@ -58,9 +99,10 @@ body: id: success-criteria attributes: label: Success criteria and open questions - description: State what outcome would settle the decision and list only unresolved questions that could change the choice. - validations: - required: true + description: >- + Optional expected output, sample, possible check, or unresolved question. + A complete test plan is not required to start; maintainers and implementers + will resolve material verification gaps before integration. - type: textarea id: references diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index 7b0767b27..4125f3db5 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -8,9 +8,13 @@ body: - type: markdown attributes: value: | - Keep one primary capability or workflow outcome per request. For a - substantial provider, public contract, or architecture change, explain - the decision maintainers need to make before implementation. + Describe one problem and the outcome you would like. Short answers are + welcome. Choose "Not sure yet" wherever needed; you do not need code, a + finished design, or a complete test plan to propose an idea. + + Read the [contribution scope](https://github.com/morluto/rea/blob/main/CONTRIBUTING.md#contribution-scope). + Maintainers can help resolve scope and technical questions. Unresolved + boundaries block integration, not opening a request for discussion. - type: checkboxes id: before-submitting @@ -19,7 +23,9 @@ body: options: - label: I searched the open and closed issues and pull requests for a related proposal. required: true - - label: I removed credentials, tokens, private paths, and sensitive target data. + - label: I understand the [contribution scope](https://github.com/morluto/rea/blob/main/CONTRIBUTING.md#contribution-scope) must be reviewed before integration; open questions are welcome here. + required: true + - label: This request does not include credentials, private samples, or sensitive target data. required: true - type: dropdown @@ -36,6 +42,7 @@ body: - MCP or agent integration - Documentation - Other + - Not sure yet validations: required: true @@ -43,7 +50,7 @@ body: id: current-limitation attributes: label: Current limitation - description: What user or agent workflow is blocked, ambiguous, or unnecessarily difficult today? + description: What are you trying to understand or do, and what is difficult today? A short example is enough. validations: required: true @@ -51,23 +58,69 @@ body: id: use-cases attributes: label: Use cases - description: Give concrete applications, targets, callers, or investigation workflows. Explain why current tools are insufficient. - validations: - required: true + description: Optional additional examples of applications, targets, or callers. Leave blank if covered above. - type: textarea id: desired-outcome attributes: label: Desired outcome and success criteria - description: Describe observable behavior, inputs, outputs, evidence, and compatibility criteria that would make this useful. + description: What would a useful result look like? Describe the output or behavior you want; implementation details are optional. + placeholder: For a selected APK, show whether it is packed and include the detection evidence. + validations: + required: true + + - type: dropdown + id: target-interaction + attributes: + label: Expected interaction with targets + description: >- + Select all known effects, including upstream tool behavior. Add "Not sure + yet" if anything is unclear. Use "No target interaction" only on its own. + These selections help discussion and do not establish scope approval. + multiple: true + options: + - Read existing files or captured data + - Launch or attach to a process + - Inject instrumentation or run scripts/code + - Change process memory or registers + - Write or change files/configuration + - Contact network services + - Recover protected code or work around protections + - No target interaction (documentation or usability only) + - Not sure yet validations: required: true - type: textarea id: boundaries attributes: - label: Authority boundaries and non-goals - description: Call out process execution, target mutation, provider licensing, evidence provenance, supported platforms, and work that should remain out of scope. + label: Target and scope details (optional) + description: >- + If known, name the target/platform, clarify selected effects, or list a + non-goal or scope question. You can leave this blank; maintainers can help. + Do not include private samples or proof-of-authorization documents. + + - type: dropdown + id: verification-readiness + attributes: + label: Verification available so far + description: Pick the closest match. An idea without samples or test results is welcome. + options: + - Idea only; I need help defining checks + - I can suggest a sample or manual check + - I have a prototype or observed results + - Not sure yet + validations: + required: true + + - type: textarea + id: verification + attributes: + label: Verification details (optional) + description: >- + Share an expected output, a possible check, or existing results if you have + them. Self-owned or appropriately licensed samples can help, but are not + required to open a request. Do not attach private or sensitive data. - type: textarea id: alternatives diff --git a/.github/actions/portable-build-cache/action.yml b/.github/actions/portable-build-cache/action.yml index 0fb8903c1..cee775ec5 100644 --- a/.github/actions/portable-build-cache/action.yml +++ b/.github/actions/portable-build-cache/action.yml @@ -1,17 +1,27 @@ name: Portable build cache -description: Reuse Turbo build outputs without serializing verification jobs. +description: Restore portable Turbo build outputs from the current run or cross-run cache. inputs: save: description: Save newly built outputs after the job succeeds. default: "false" + build_cache_artifact: + description: Reuse portable Turbo outputs uploaded by the current workflow run. + default: "" runs: using: composite steps: + - name: Download portable build outputs from this workflow run + if: inputs.build_cache_artifact != '' + uses: actions/download-artifact@v4 + with: + name: ${{ inputs.build_cache_artifact }} + path: .turbo/cache/ - name: Resolve portable build task hashes id: plan + if: inputs.build_cache_artifact == '' shell: bash env: - BUILD_CACHE_PREFIX: rea-portable-build-v1-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.npmrc') }} + BUILD_CACHE_PREFIX: rea-portable-build-v2-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.npmrc', '.nvmrc', 'package-lock.json') }} run: | npm run --silent test:prepare -- --dry=json | node --input-type=module -e ' @@ -25,16 +35,19 @@ runs: }).sort(); const hash = createHash("sha256").update(hashes.join("\n")).digest("hex"); console.log(`key=${process.env.BUILD_CACHE_PREFIX}-${hash}`); + console.log(`prefix=${process.env.BUILD_CACHE_PREFIX}-`); ' >> "$GITHUB_OUTPUT" - name: Restore portable build outputs - if: inputs.save != 'true' + if: inputs.build_cache_artifact == '' && inputs.save != 'true' uses: actions/cache/restore@v4 with: path: .turbo/cache/ key: ${{ steps.plan.outputs.key }} + restore-keys: ${{ steps.plan.outputs.prefix }} - name: Restore and save portable build outputs - if: inputs.save == 'true' + if: inputs.build_cache_artifact == '' && inputs.save == 'true' uses: actions/cache@v4 with: path: .turbo/cache/ key: ${{ steps.plan.outputs.key }} + restore-keys: ${{ steps.plan.outputs.prefix }} diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index e33ce01f4..3dec52bd0 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -19,17 +19,39 @@ describe the use case and observable outcome. --> +Follow the [contribution scope](https://github.com/morluto/rea/blob/main/CONTRIBUTING.md#contribution-scope). +Unresolved scope, authority, side effects, or required verification block +integration. Link the required maintainer scope decision for new providers or +capabilities involving target execution, injection, mutation, or protection +recovery; ordinary fixes within existing boundaries may state "not applicable". +Draft PRs may leave the scope decision pending and the final review checklist +unchecked. Maintainers can help resolve open questions. + ## Contract and boundary impact - + - Semantic owner and earliest changed stage: +- Contribution scope fit and linked maintainer decision: - CLI and MCP/tool-catalog contract: - Provider, bridge, target-format, or platform compatibility: - Evidence, artifact, provenance, or reconstruction contract: -- Process execution, authorization, cleanup, or containment impact: +- Target selection, authority, upstream behavior, and cleanup details (if applicable): - Generated metadata (`docs/public/product-catalog.json`), package, or installation impact (CI generates and validates ignored catalogs and `skills/`; edit authored instructions in `.agents/skills/reverse-engineer-anything/` and never commit build outputs): +Expected effects (check known effects; use documentation-only on its own). +Unchecked items do not establish absence; leave uncertainties visible. + +- [ ] Read existing files or captured data. +- [ ] Launch or attach to a process. +- [ ] Inject instrumentation or run scripts/code. +- [ ] Change process memory, registers, files, or configuration. +- [ ] Contact network services. +- [ ] Recover protected code or work around protections. +- [ ] Documentation or usability only; no target interaction. +- [ ] Not sure yet; investigation or maintainer guidance needed. + ## Evidence and regression coverage - [ ] This PR addresses a concrete problem or an agreed enhancement. +- [ ] Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff. - [ ] The PR has one focused outcome and the title follows `type(scope): outcome`. - [ ] Related issue is linked, or the reason for not linking one is stated above. - [ ] Tests cover changed observable behavior and meaningful failure paths. diff --git a/.github/workflows/ci-full-pr.yml b/.github/workflows/ci-full-pr.yml new file mode 100644 index 000000000..8f76a2ea2 --- /dev/null +++ b/.github/workflows/ci-full-pr.yml @@ -0,0 +1,18 @@ +name: Full PR qualification + +on: + pull_request: + branches: [main, "release/*"] + types: [labeled] + +permissions: + contents: read + actions: read + +jobs: + qualification: + name: Qualify labeled PR revision + if: github.event.label.name == 'ci:full' + uses: ./.github/workflows/ci.yml + with: + source_sha: ${{ github.sha }} diff --git a/.github/workflows/ci-timings.yml b/.github/workflows/ci-timings.yml new file mode 100644 index 000000000..30fa19464 --- /dev/null +++ b/.github/workflows/ci-timings.yml @@ -0,0 +1,46 @@ +name: CI timings + +on: + schedule: + - cron: "17 * * * *" + workflow_dispatch: + +concurrency: + group: ci-timings-${{ github.repository }} + cancel-in-progress: false + +permissions: + contents: read + actions: read + +jobs: + report: + name: Collect recent completed workflow attempts + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + # Consume only API data and execute batch code from the trusted default branch. + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.repository.default_branch }} + persist-credentials: false + - uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + - name: Record queue, execution, and matched step timing + continue-on-error: true + env: + GH_TOKEN: ${{ github.token }} + CI_REPOSITORY: ${{ github.repository }} + run: node scripts/ci/job-timings-batch.mjs + - name: Upload CI timing artifacts + if: always() && hashFiles('.cache/ci-job-timings/*') != '' + continue-on-error: true + uses: actions/upload-artifact@v4 + with: + name: ci-job-timings-batch + path: .cache/ci-job-timings/ + include-hidden-files: true + if-no-files-found: error + overwrite: true + retention-days: 14 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a8dc167e4..e0516da85 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,42 +5,44 @@ on: branches: [main] pull_request: branches: [main, "release/*"] + schedule: + - cron: "23 0-2,4-23 * * *" + - cron: "23 3 * * *" workflow_dispatch: + workflow_call: + inputs: + source_sha: + description: Exact qualification source; must match the caller revision. + required: true + type: string permissions: contents: read concurrency: - group: ci-${{ github.event.pull_request.number || github.ref }} - # The latest main push verifies the full tree, including earlier changes. - # Publication uses its own release workflow and concurrency group. - cancel-in-progress: true + # Complete qualification finishes even while main receives more pushes. + # Main feedback also finishes, coalescing newer pushes to one pending run. + # Scheduled/manual main runs coalesce to one active and the latest pending; + # release and label-triggered qualification use exact-revision groups. + group: ci-${{ (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || inputs.source_sha != '' || contains(github.event.pull_request.labels.*.name, 'ci:full')) && 'qualification' || 'feedback' }}-${{ inputs.source_sha || github.event.pull_request.number || github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' && inputs.source_sha == '' && !contains(github.event.pull_request.labels.*.name, 'ci:full') }} env: HUSKY: "0" jobs: - pr-title: - name: Conventional PR title - if: github.event_name == 'pull_request' - runs-on: ubuntu-latest - steps: - - name: Validate title for Release Please - env: - PR_TITLE: ${{ github.event.pull_request.title }} - run: >- - node -e 'const title = process.env.PR_TITLE ?? ""; - const conventional = /^(?:feat|fix|docs|refactor|perf|test|build|ci|chore|revert)(?:\([a-z0-9._/-]+\))?!?: .+/u; - if (!conventional.test(title)) { - console.error("PR title must use Conventional Commits, for example: feat: add historical source import"); - process.exit(1); - }' - changes: name: Classify changes runs-on: ubuntu-latest + timeout-minutes: 5 + permissions: + contents: read + actions: read outputs: + tier: ${{ steps.plan.outputs.tier }} + qualification_run_id: ${{ steps.qualification.outputs.run_id }} code: ${{ steps.plan.outputs.code }} + sqlite: ${{ steps.plan.outputs.sqlite }} runtime: ${{ steps.plan.outputs.runtime }} package: ${{ steps.plan.outputs.package }} apple: ${{ steps.plan.outputs.apple }} @@ -59,26 +61,58 @@ jobs: nativeaot: ${{ steps.plan.outputs.nativeaot }} website: ${{ steps.plan.outputs.website }} matrix: ${{ steps.plan.outputs.matrix }} + test_selection: ${{ steps.plan.outputs.test_selection }} steps: - uses: actions/checkout@v4 with: + ref: ${{ inputs.source_sha || github.sha }} fetch-depth: 0 - uses: actions/setup-node@v4 with: node-version-file: .nvmrc + - name: Bind qualification to the caller revision + if: inputs.source_sha != '' + env: + SOURCE_SHA: ${{ inputs.source_sha }} + run: | + test "${SOURCE_SHA}" = "${GITHUB_SHA}" + test "${SOURCE_SHA}" = "$(git rev-parse HEAD)" + - name: Find a verified ancestor for push selection + id: baseline + if: github.event_name == 'push' && inputs.source_sha == '' + env: + GH_TOKEN: ${{ github.token }} + HEAD_SHA: ${{ github.sha }} + CI_REPOSITORY: ${{ github.repository }} + CI_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} + run: node scripts/ci/baseline.mjs + - name: Admit scheduled full qualification + id: qualification + if: github.event_name == 'schedule' && inputs.source_sha == '' + env: + GH_TOKEN: ${{ github.token }} + HEAD_SHA: ${{ github.sha }} + CI_REPOSITORY: ${{ github.repository }} + CI_REPOSITORY_ID: ${{ github.repository_id }} + CI_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} + CI_FORCE_FULL: ${{ github.event.schedule == '23 3 * * *' }} + run: node scripts/ci/qualification.mjs - name: Select verification lanes id: plan env: - BASE_SHA: ${{ github.event.pull_request.base.sha }} - HEAD_SHA: ${{ github.event.pull_request.head.sha }} - CI_FULL: ${{ contains(github.event.pull_request.labels.*.name, 'ci:full') }} + BASE_SHA: ${{ steps.baseline.outputs.base || github.event.pull_request.base.sha }} + BASELINE_REASON: ${{ steps.baseline.outputs.reason }} + HEAD_SHA: ${{ inputs.source_sha || github.event.pull_request.head.sha || github.sha }} + CI_FULL: ${{ inputs.source_sha != '' || contains(github.event.pull_request.labels.*.name, 'ci:full') }} + CI_SKIP_FULL: ${{ steps.qualification.outputs.run_full == 'false' }} run: node scripts/ci/plan.mjs static: name: Static checks needs: changes - if: ${{ always() }} + if: ${{ !cancelled() && needs.changes.outputs.tier != 'reused' }} runs-on: ubuntu-latest + timeout-minutes: 10 steps: - name: Require successful change classification env: @@ -90,22 +124,38 @@ jobs: node-version-file: .nvmrc cache: npm - run: npm ci + - name: Validate workflow syntax and expressions + if: needs.changes.outputs.workflows == 'true' + run: go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.7 -shellcheck= -pyflakes= - if: needs.changes.outputs.code == 'true' run: npm run check:ci - if: needs.changes.outputs.code == 'true' run: npm run verify:test-discovery + - name: Check LLDB producer retention and launch contracts + if: needs.changes.outputs.code == 'true' + run: npm run test:python - if: needs.changes.outputs.code != 'true' run: npm run format:check + - name: Upload complete static diagnostics + if: always() && needs.changes.outputs.code == 'true' + uses: actions/upload-artifact@v4 + with: + name: static-check-reports + path: .cache/static-checks/ + include-hidden-files: true + if-no-files-found: ignore + retention-days: 7 test-shard: name: Test shard (${{ matrix.shard }}) needs: [changes, build] if: needs.changes.outputs.code == 'true' runs-on: ubuntu-latest + timeout-minutes: 30 strategy: fail-fast: false matrix: - shard: [1/4, 2/4, 3/4, 4/4] + shard: [1/6, 2/6, 3/6, 4/6, 5/6, 6/6] steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 @@ -117,7 +167,14 @@ jobs: with: name: rea-test-runtime path: . - - run: npm run test:ci:shard:run -- --shard=${{ matrix.shard }} + - name: Run complete portable suite with coverage + if: needs.changes.outputs.tier == 'full' + run: npm run test:ci:shard:run -- --shard=${{ matrix.shard }} + env: + REA_CI_TEST_HISTORY: .cache/ci-test-history/test-results.json + - name: Run complete portable suite for fast feedback + if: needs.changes.outputs.tier == 'fast' + run: npm run test:run -- --reporter=default --reporter=blob --shard=${{ matrix.shard }} env: REA_CI_TEST_HISTORY: .cache/ci-test-history/test-results.json - uses: actions/upload-artifact@v4 @@ -133,8 +190,20 @@ jobs: build: name: Build package needs: changes - if: needs.changes.outputs.code == 'true' + # Reusable provider workflows consume this run's portable build artifact, + # even when a workflow-only edit selects the lane without portable tests. + if: >- + needs.changes.outputs.code == 'true' || + needs.changes.outputs.browser == 'true' || + needs.changes.outputs.binary_layout == 'true' || + needs.changes.outputs.evm == 'true' || + needs.changes.outputs.javascript_recovery == 'true' || + needs.changes.outputs.recorded_crash == 'true' || + needs.changes.outputs.web_network == 'true' || + needs.changes.outputs.web_runtime == 'true' || + needs.changes.outputs.web_source_map == 'true' runs-on: ubuntu-latest + timeout-minutes: 10 permissions: contents: read actions: read @@ -148,27 +217,23 @@ jobs: - name: Reuse portable build outputs across runs uses: ./.github/actions/portable-build-cache with: - save: "true" + save: ${{ github.event_name != 'pull_request' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }} - run: npm run test:prepare - - name: Find successful default-branch timing history + - name: Find available trusted full-suite timing history id: history continue-on-error: true env: GH_TOKEN: ${{ github.token }} CI_REPOSITORY: ${{ github.repository }} + CI_REPOSITORY_ID: ${{ github.repository_id }} CI_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} - run: | - run_id="$(gh api --method GET \ - "repos/${CI_REPOSITORY}/actions/workflows/ci.yml/runs" \ - -f branch="${CI_DEFAULT_BRANCH}" -f event=push -f status=success -f per_page=1 \ - --jq '.workflow_runs[0].id // empty')" - echo "run-id=${run_id}" >> "${GITHUB_OUTPUT}" + run: node scripts/ci/test-history.mjs - name: Download previous timing report if: steps.history.outputs.run-id != '' continue-on-error: true uses: actions/download-artifact@v4 with: - name: test-results + name: test-timings run-id: ${{ steps.history.outputs.run-id }} github-token: ${{ github.token }} path: .cache/ci-test-history @@ -197,20 +262,24 @@ jobs: if-no-files-found: error retention-days: 7 + sqlite-runtime: + # Preserve all selected coverage, but admit expensive host/provider work + # only after static validation. Portable tests still provide early feedback. + needs: [changes, static, build] + if: needs.changes.outputs.sqlite == 'true' + uses: ./.github/workflows/sqlite-runtime.yml + test: - name: Test (coverage + timing) + name: Portable tests needs: [changes, test-shard] - if: ${{ always() }} + if: ${{ !cancelled() && needs.changes.outputs.tier != 'reused' }} runs-on: ubuntu-latest + timeout-minutes: 10 steps: - - name: Require successful test shards + - name: Require successful change classification env: CHANGES_RESULT: ${{ needs.changes.result }} - CODE_REQUIRED: ${{ needs.changes.outputs.code }} - SHARD_RESULT: ${{ needs.test-shard.result }} - run: | - test "${CHANGES_RESULT}" = "success" - test "${CODE_REQUIRED}" != "true" || test "${SHARD_RESULT}" = "success" + run: test "${CHANGES_RESULT}" = "success" - uses: actions/checkout@v4 if: needs.changes.outputs.code == 'true' && success() - uses: actions/setup-node@v4 @@ -227,7 +296,8 @@ jobs: pattern: vitest-report-* merge-multiple: true - name: Merge coverage, JUnit, and timing reports - if: needs.changes.outputs.code == 'true' && success() + id: merge + if: needs.changes.outputs.code == 'true' && needs.changes.outputs.tier == 'full' && success() run: >- npm run test:ci:merge -- --coverage.reportsDirectory=coverage @@ -237,42 +307,61 @@ jobs: --reporter=default --reporter=junit --reporter=json + --reporter=./scripts/ci/test-timing-reporter.mjs + --outputFile.junit=test-results.xml + --outputFile.json=test-results.json + - name: Merge fast-suite JUnit and timing reports + id: merge-fast + if: needs.changes.outputs.code == 'true' && needs.changes.outputs.tier == 'fast' && success() + run: >- + npm exec -- vitest --merge-reports + --reporter=default + --reporter=junit + --reporter=json + --reporter=./scripts/ci/test-timing-reporter.mjs --outputFile.junit=test-results.xml --outputFile.json=test-results.json - name: Summarize slowest test files - if: needs.changes.outputs.code == 'true' && success() - shell: bash - run: | - node <<'NODE' >> "${GITHUB_STEP_SUMMARY}" - const report = JSON.parse(require("node:fs").readFileSync("test-results.json", "utf8")); - const files = (report.testResults ?? []) - .map((result) => ({ - name: result.name, - duration: Math.max(0, (result.endTime ?? result.startTime) - result.startTime), - })) - .sort((left, right) => right.duration - left.duration) - .slice(0, 20); - console.log("## Slowest deterministic test files\n"); - console.log("| File | Duration (ms) |"); - console.log("| --- | ---: |"); - for (const file of files) { - console.log(`| \`${file.name}\` | ${file.duration} |`); - } - NODE + if: needs.changes.outputs.code == 'true' && !cancelled() && hashFiles('test-timings.json') != '' + env: + SHARD_RESULT: ${{ needs.test-shard.result }} + MERGE_RESULT: ${{ needs.changes.outputs.tier == 'full' && steps.merge.outcome || steps.merge-fast.outcome }} + CI_VERIFY_TEST_INVENTORY: "true" + CI_TEST_SELECTION: ${{ needs.changes.outputs.test_selection }} + CI_PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }} + run: node scripts/ci/test-report.mjs - uses: actions/upload-artifact@v4 - if: needs.changes.outputs.code == 'true' && always() + if: needs.changes.outputs.code == 'true' && !cancelled() && hashFiles('test-results.json') != '' with: name: test-results path: | test-results.xml test-results.json + test-timings.json coverage/ + .cache/ci-test-selection/report.json + include-hidden-files: true if-no-files-found: error retention-days: 30 + - name: Publish successful timing history + if: needs.changes.outputs.code == 'true' && needs.changes.outputs.tier == 'full' && success() && needs.test-shard.result == 'success' + uses: actions/upload-artifact@v4 + with: + name: test-timings + path: .cache/ci-test-history/test-results.json + include-hidden-files: true + if-no-files-found: error + retention-days: 30 + - name: Require successful test shards + if: ${{ !cancelled() }} + env: + CODE_REQUIRED: ${{ needs.changes.outputs.code }} + SHARD_RESULT: ${{ needs.test-shard.result }} + run: test "${CODE_REQUIRED}" != "true" || test "${SHARD_RESULT}" = "success" conformance-fixtures: name: Source-built conformance fixtures - needs: changes + needs: [changes, static] if: needs.changes.outputs.fixtures == 'true' runs-on: ubuntu-latest timeout-minutes: 10 @@ -283,7 +372,7 @@ jobs: windows-native-build: name: Build bundled Windows x64 native controls - needs: changes + needs: [changes, static] if: needs.changes.outputs.runtime == 'true' runs-on: ubuntu-latest timeout-minutes: 10 @@ -319,7 +408,7 @@ jobs: package-e2e: name: Native package baseline (${{ matrix.platform }} ${{ matrix.architecture }}) - needs: [changes, build, windows-native-build] + needs: [changes, static, build, windows-native-build] if: needs.changes.outputs.runtime == 'true' strategy: fail-fast: false @@ -358,6 +447,8 @@ jobs: name: windows-native-controls path: native/windows/build/ - run: npm run verify:windows-native:artifact + - name: Verify NativeAOT diagnostic applicability on this host + run: npm run test:focused -- tests/evaluation/package/nativeAotDiagnostics.test.ts - name: Resolve npm cache before verifier HOME isolation id: npm-cache run: | @@ -366,13 +457,24 @@ jobs: - run: npm run verify:package env: npm_config_cache: ${{ steps.npm-cache.outputs.path }} + REA_VERIFIED_PACKAGE_DIRECTORY: ${{ needs.changes.outputs.tier == 'full' && matrix.platform == 'linux' && matrix.architecture == 'x64' && '.cache/verified-package' || '' }} - name: Verify real Node Inspector discovery and observation timeout-minutes: 10 run: npm run verify:inspector + - name: Retain the exact qualified release package + if: needs.changes.outputs.tier == 'full' && matrix.platform == 'linux' && matrix.architecture == 'x64' + uses: actions/upload-artifact@v4 + with: + name: verified-release-package + path: .cache/verified-package/ + include-hidden-files: true + if-no-files-found: error + overwrite: true + retention-days: 7 apple-artifacts: name: Real Apple artifact CLI/MCP E2E - needs: changes + needs: [changes, static, build] if: needs.changes.outputs.apple == 'true' runs-on: macos-15 timeout-minutes: 15 @@ -383,6 +485,10 @@ jobs: node-version-file: .nvmrc cache: npm - run: npm ci + - uses: actions/download-artifact@v4 + with: + name: rea-build-cache + path: .turbo/cache/ - name: Verify Apple artifact formats and metadata env: REA_ARTIFACT_NODE_COMPILE_CACHE: ${{ runner.temp }}/rea-artifact-node-cache @@ -416,7 +522,7 @@ jobs: reconstruction-readiness: name: Reconstruction readiness - needs: changes + needs: [changes, static] if: needs.changes.outputs.readiness == 'true' runs-on: ubuntu-latest timeout-minutes: 15 @@ -445,7 +551,7 @@ jobs: windows-curated: name: Windows capability and package lane - needs: [changes, windows-native-build] + needs: [changes, static, build, windows-native-build] if: needs.changes.outputs.package == 'true' runs-on: windows-latest timeout-minutes: 25 @@ -456,8 +562,11 @@ jobs: node-version-file: .nvmrc cache: npm - run: npm ci + - uses: actions/download-artifact@v4 + with: + name: rea-build-cache + path: .turbo/cache/ - run: npm run build:cached - - run: npm run typecheck - uses: actions/download-artifact@v4 with: name: windows-native-controls @@ -487,6 +596,7 @@ jobs: tests/boundary/providers/native/artifactProvider.extractionCompleteness.test.ts tests/boundary/filesystem/setupUnavailableProvider.test.ts tests/boundary/filesystem/windowsNpxRegistration.test.ts + tests/acceptance/setup/homeDirectoryFallback.test.ts tests/boundary/filesystem/webScriptManifestPaths.test.ts tests/boundary/process/ProcessEvidence.host.test.ts tests/acceptance/webModuleCli.test.ts @@ -496,6 +606,7 @@ jobs: tests/boundary/filesystem/javascript-applications/javascriptArtifactReconstruction.test.ts tests/conformance/providers/ghidra/windowsCapabilities.test.ts src/ghidra/GhidraInstallation.test.ts + tests/boundary/filesystem/ghidraJavaProbe.test.ts tests/boundary/providers/ghidra/ghidraTransport.test.ts tests/boundary/providers/ghidra/ghidraTargetSnapshot.test.ts tests/boundary/providers/ghidra/ghidraLauncher.test.ts @@ -552,6 +663,7 @@ jobs: needs: changes if: needs.changes.outputs.docs == 'true' runs-on: ubuntu-latest + timeout-minutes: 10 steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 @@ -571,63 +683,69 @@ jobs: skills/reverse-engineer-anything if-no-files-found: error - workflows: - name: Validate workflows - needs: changes - if: needs.changes.outputs.workflows == 'true' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Validate workflow syntax and expressions - run: go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.7 -shellcheck= -pyflakes= - browser: - needs: changes + needs: [changes, static, build] if: needs.changes.outputs.browser == 'true' uses: ./.github/workflows/real-browser.yml + with: + build_cache_artifact: rea-build-cache binary_layout: - needs: changes + needs: [changes, static, build] if: needs.changes.outputs.binary_layout == 'true' uses: ./.github/workflows/real-binary-layout.yml + with: + build_cache_artifact: rea-build-cache evm: - needs: changes + needs: [changes, static, build] if: needs.changes.outputs.evm == 'true' uses: ./.github/workflows/real-evm-interface.yml + with: + build_cache_artifact: rea-build-cache javascript_recovery: - needs: changes + needs: [changes, static, build] if: needs.changes.outputs.javascript_recovery == 'true' uses: ./.github/workflows/real-javascript-recovery.yml + with: + build_cache_artifact: rea-build-cache recorded_crash: - needs: changes + needs: [changes, static, build] if: needs.changes.outputs.recorded_crash == 'true' uses: ./.github/workflows/real-recorded-crash.yml + with: + build_cache_artifact: rea-build-cache web_network: - needs: changes + needs: [changes, static, build] if: needs.changes.outputs.web_network == 'true' uses: ./.github/workflows/real-web-network-captures.yml + with: + build_cache_artifact: rea-build-cache web_runtime: - needs: changes + needs: [changes, static, build] if: needs.changes.outputs.web_runtime == 'true' uses: ./.github/workflows/real-web-runtime.yml + with: + build_cache_artifact: rea-build-cache web_source_map: - needs: changes + needs: [changes, static, build] if: needs.changes.outputs.web_source_map == 'true' uses: ./.github/workflows/real-web-source-map.yml + with: + build_cache_artifact: rea-build-cache nativeaot: - needs: changes + needs: [changes, static] if: needs.changes.outputs.nativeaot == 'true' uses: ./.github/workflows/nativeaot-fixtures.yml website: - needs: changes + needs: [changes, static] if: needs.changes.outputs.website == 'true' uses: ./.github/workflows/website-check.yml @@ -637,10 +755,10 @@ jobs: needs: [ changes, - pr-title, static, build, test-shard, + sqlite-runtime, test, conformance-fixtures, windows-native-build, @@ -649,7 +767,6 @@ jobs: reconstruction-readiness, windows-curated, docs, - workflows, browser, binary_layout, evm, @@ -662,12 +779,24 @@ jobs: website, ] runs-on: ubuntu-latest + timeout-minutes: 5 steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version-file: .nvmrc - name: Require every selected lane to pass + id: gate env: CI_JOBS: ${{ toJSON(needs) }} + CI_QUALIFICATION_DIRECTORY: .cache/ci-qualification run: node scripts/ci/required.mjs + - name: Upload full qualification receipt artifact + if: needs.changes.outputs.tier == 'full' && success() + uses: actions/upload-artifact@v4 + with: + name: ${{ steps.gate.outputs.receipt_name }} + path: ${{ steps.gate.outputs.receipt_path }} + if-no-files-found: error + overwrite: true + retention-days: 7 diff --git a/.github/workflows/nativeaot-fixtures.yml b/.github/workflows/nativeaot-fixtures.yml index e819ca5fb..ce7dc1ea1 100644 --- a/.github/workflows/nativeaot-fixtures.yml +++ b/.github/workflows/nativeaot-fixtures.yml @@ -12,7 +12,8 @@ jobs: name: Build Windows x64 NativeAOT fixture # .NET 8.0.22's bundled linker discovery supports VS 2019/2022. runs-on: windows-2022 - timeout-minutes: 15 + # Two bounded restore attempts and one compile can each take five minutes. + timeout-minutes: 20 env: DOTNET_CLI_TELEMETRY_OPTOUT: "1" DOTNET_PROCESSOR_COUNT: "1" diff --git a/.github/workflows/pr-title.yml b/.github/workflows/pr-title.yml new file mode 100644 index 000000000..abe98bb48 --- /dev/null +++ b/.github/workflows/pr-title.yml @@ -0,0 +1,29 @@ +name: PR title + +on: + pull_request: + branches: [main, "release/*"] + types: [opened, synchronize, reopened, edited] + +permissions: {} + +concurrency: + group: pr-title-${{ github.event.pull_request.number }} + cancel-in-progress: true + +jobs: + pr-title: + name: Conventional PR title + runs-on: ubuntu-latest + timeout-minutes: 2 + steps: + - name: Validate title for Release Please + env: + PR_TITLE: ${{ github.event.pull_request.title }} + run: >- + node -e 'const title = process.env.PR_TITLE ?? ""; + const conventional = /^(?:feat|fix|docs|refactor|perf|test|build|ci|chore|revert)(?:\([a-z0-9._/-]+\))?!?: .+/u; + if (!conventional.test(title)) { + console.error("PR title must use Conventional Commits, for example: feat: add historical source import"); + process.exit(1); + }' diff --git a/.github/workflows/real-binary-layout.yml b/.github/workflows/real-binary-layout.yml index e8c244de6..5cec952ce 100644 --- a/.github/workflows/real-binary-layout.yml +++ b/.github/workflows/real-binary-layout.yml @@ -8,14 +8,16 @@ on: type: boolean default: false workflow_call: + inputs: + build_cache_artifact: + description: Portable build cache artifact from the calling CI run. + required: false + type: string + default: "" permissions: contents: read -concurrency: - group: real-binary-layout-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - env: NODE_OPTIONS: --max-old-space-size=768 HUSKY: "0" @@ -33,6 +35,8 @@ jobs: cache: npm - run: npm ci - uses: ./.github/actions/portable-build-cache + with: + build_cache_artifact: ${{ inputs.build_cache_artifact }} - name: Acquire exact upstream libraries in an isolated runner environment shell: bash run: | diff --git a/.github/workflows/real-browser.yml b/.github/workflows/real-browser.yml index 76ba2e4a6..912fdafb1 100644 --- a/.github/workflows/real-browser.yml +++ b/.github/workflows/real-browser.yml @@ -2,12 +2,14 @@ name: Real browser verification on: workflow_call: + inputs: + build_cache_artifact: + description: Portable build cache artifact from the calling CI run. + required: false + type: string + default: "" workflow_dispatch: -concurrency: - group: real-browser-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: ${{ github.event_name == 'pull_request' }} - env: HUSKY: "0" @@ -26,6 +28,8 @@ jobs: cache: npm - run: npm ci - uses: ./.github/actions/portable-build-cache + with: + build_cache_artifact: ${{ inputs.build_cache_artifact }} - run: npm run verify:browser env: REA_BROWSER_EXECUTABLE: /usr/bin/google-chrome diff --git a/.github/workflows/real-evm-interface.yml b/.github/workflows/real-evm-interface.yml index 9e4cddeb4..dfdd3970f 100644 --- a/.github/workflows/real-evm-interface.yml +++ b/.github/workflows/real-evm-interface.yml @@ -3,14 +3,16 @@ name: Real offline EVM interface on: workflow_dispatch: workflow_call: + inputs: + build_cache_artifact: + description: Portable build cache artifact from the calling CI run. + required: false + type: string + default: "" permissions: contents: read -concurrency: - group: real-evm-interface-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - env: NODE_OPTIONS: --max-old-space-size=768 HUSKY: "0" @@ -27,6 +29,8 @@ jobs: cache: npm - run: npm ci - uses: ./.github/actions/portable-build-cache + with: + build_cache_artifact: ${{ inputs.build_cache_artifact }} - name: Acquire unchanged fixture compiler in isolated runner storage shell: bash run: | diff --git a/.github/workflows/real-javascript-recovery.yml b/.github/workflows/real-javascript-recovery.yml index 4fee667d8..817dc4dc0 100644 --- a/.github/workflows/real-javascript-recovery.yml +++ b/.github/workflows/real-javascript-recovery.yml @@ -2,15 +2,17 @@ name: Real JavaScript recovery on: workflow_call: + inputs: + build_cache_artifact: + description: Portable build cache artifact from the calling CI run. + required: false + type: string + default: "" workflow_dispatch: permissions: contents: read -concurrency: - group: javascript-recovery-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: ${{ github.event_name == 'pull_request' }} - env: HUSKY: "0" NODE_OPTIONS: "--max-old-space-size=768" @@ -28,6 +30,8 @@ jobs: cache: npm - run: npm ci - uses: ./.github/actions/portable-build-cache + with: + build_cache_artifact: ${{ inputs.build_cache_artifact }} - name: Fetch pinned Wakaru release into the job workspace shell: bash run: | diff --git a/.github/workflows/real-packet-capture.yml b/.github/workflows/real-packet-capture.yml new file mode 100644 index 000000000..b5e9f9201 --- /dev/null +++ b/.github/workflows/real-packet-capture.yml @@ -0,0 +1,58 @@ +name: Real packet capture +on: + workflow_dispatch: + pull_request: + paths: + - "tests/boundary/captures/**" + - "tests/boundary/cli/captureCleanup.test.ts" + - "tests/boundary/mcp/packetCaptureMcp.test.ts" + - "src/captures/**" + - "src/pcap/**" + - "src/domain/pcap/**" + - "src/domain/analysisView/pcapCaptureView.ts" + - "src/application/pcap/**" + - "src/contracts/pcap/**" + - "src/server/registerPcapTools.ts" + - "tests/boundary/pcap/**" + - "src/domain/captures/**" + - "src/application/captures/**" + - "src/contracts/captures/**" + - "src/composition/captures.ts" + - "src/cli/captureCommands.ts" + - "src/server/registerCaptureTools.ts" + - "src/server/createServer.ts" + - "src/server/sessionAvailabilityPolicy.ts" + - "src/application/CapabilityInventory.ts" + - "src/contracts/toolContracts.ts" + - "src/contracts/toolEffects.ts" + - "src/cli.ts" + - "src/cliCommandNames.ts" + - "src/process/**" + - "src/artifacts/readStableArtifact.ts" + - "scripts/verify-packet-capture.mjs" + - ".github/workflows/real-packet-capture.yml" + - "package*.json" + - ".nvmrc" +permissions: + contents: read +concurrency: + group: real-packet-capture-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true +jobs: + tshark: + runs-on: ubuntu-24.04 + timeout-minutes: 15 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + cache: npm + - run: sudo apt-get update && sudo DEBIAN_FRONTEND=noninteractive apt-get install -y tshark util-linux python3 + - run: npm ci + - run: npm run build:cached + - run: npm run test:focused -- tests/boundary/captures/fieldDiscovery.test.ts src/process/LinuxResourceLimits.test.ts tests/boundary/captures/captureProvider.test.ts tests/boundary/captures/captureDescriptorCleanup.test.ts tests/boundary/captures/resourceLimits.test.ts tests/boundary/captures/packetOutput.test.ts tests/boundary/mcp/packetCaptureMcp.test.ts tests/boundary/cli/captureCleanup.test.ts + - run: node scripts/verify-packet-capture.mjs + env: + REA_TSHARK_COMMAND: /usr/bin/tshark + REA_CAPINFOS_COMMAND: /usr/bin/capinfos diff --git a/.github/workflows/real-recorded-crash.yml b/.github/workflows/real-recorded-crash.yml index d4410bb24..04467a608 100644 --- a/.github/workflows/real-recorded-crash.yml +++ b/.github/workflows/real-recorded-crash.yml @@ -3,14 +3,16 @@ name: Real recorded crash evidence on: workflow_dispatch: workflow_call: + inputs: + build_cache_artifact: + description: Portable build cache artifact from the calling CI run. + required: false + type: string + default: "" permissions: contents: read -concurrency: - group: real-recorded-crash-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - env: NODE_OPTIONS: --max-old-space-size=768 HUSKY: "0" @@ -30,6 +32,8 @@ jobs: cache: npm - run: npm ci - uses: ./.github/actions/portable-build-cache + with: + build_cache_artifact: ${{ inputs.build_cache_artifact }} - name: Install GDB on the disposable CI runner shell: bash run: | diff --git a/.github/workflows/real-signal-recording.yml b/.github/workflows/real-signal-recording.yml new file mode 100644 index 000000000..cc902037e --- /dev/null +++ b/.github/workflows/real-signal-recording.yml @@ -0,0 +1,50 @@ +name: Real signal recording +on: + workflow_dispatch: + pull_request: + paths: + - "tests/boundary/signals/**" + - "tests/boundary/cli/signalCleanup.test.ts" + - "tests/boundary/mcp/signalRecordingMcp.test.ts" + - "src/signals/**" + - "src/domain/signals/**" + - "src/application/signals/**" + - "src/contracts/signals/**" + - "src/composition/signals.ts" + - "src/cli/signalCommands.ts" + - "src/server/registerSignalTools.ts" + - "src/server/createServer.ts" + - "src/server/sessionAvailabilityPolicy.ts" + - "src/application/CapabilityInventory.ts" + - "src/contracts/toolContracts.ts" + - "src/contracts/toolEffects.ts" + - "src/cli.ts" + - "src/cliCommandNames.ts" + - "src/process/**" + - "src/artifacts/readStableArtifact.ts" + - "scripts/verify-signal-recording.mjs" + - ".github/workflows/real-signal-recording.yml" + - "package*.json" + - ".nvmrc" +permissions: + contents: read +concurrency: + group: real-signal-recording-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true +jobs: + sigrok: + runs-on: ubuntu-24.04 + timeout-minutes: 15 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + cache: npm + - run: sudo apt-get update && sudo apt-get install -y sigrok-cli util-linux python3 + - run: npm ci + - run: npm run build:cached + - run: npm run test:focused -- tests/boundary/signals/decoderDiscovery.test.ts src/process/LinuxResourceLimits.test.ts src/domain/signals/annotationTextWindow.test.ts tests/boundary/signals/recordingProvider.test.ts tests/boundary/signals/recordingDescriptorCleanup.test.ts tests/boundary/signals/resourceLimits.test.ts tests/boundary/mcp/signalRecordingMcp.test.ts tests/boundary/cli/signalCleanup.test.ts + - run: node scripts/verify-signal-recording.mjs + env: + REA_SIGROK_COMMAND: /usr/bin/sigrok-cli diff --git a/.github/workflows/real-web-network-captures.yml b/.github/workflows/real-web-network-captures.yml index b888674f7..d41bb37a5 100644 --- a/.github/workflows/real-web-network-captures.yml +++ b/.github/workflows/real-web-network-captures.yml @@ -3,14 +3,16 @@ name: Real historical web network captures on: workflow_dispatch: workflow_call: + inputs: + build_cache_artifact: + description: Portable build cache artifact from the calling CI run. + required: false + type: string + default: "" permissions: contents: read -concurrency: - group: real-web-network-captures-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - env: HUSKY: "0" NODE_OPTIONS: --max-old-space-size=768 @@ -29,6 +31,8 @@ jobs: run: npm install --global npm@11.16.0 - run: npm ci - uses: ./.github/actions/portable-build-cache + with: + build_cache_artifact: ${{ inputs.build_cache_artifact }} - name: Acquire fixed upstream native profile in runner temporary storage shell: bash run: | diff --git a/.github/workflows/real-web-runtime.yml b/.github/workflows/real-web-runtime.yml index c600e895c..2575c55f9 100644 --- a/.github/workflows/real-web-runtime.yml +++ b/.github/workflows/real-web-runtime.yml @@ -1,12 +1,15 @@ name: Real website runtime attribution on: workflow_call: + inputs: + build_cache_artifact: + description: Portable build cache artifact from the calling CI run. + required: false + type: string + default: "" workflow_dispatch: permissions: contents: read -concurrency: - group: real-web-runtime-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: ${{ github.event_name == 'pull_request' }} env: HUSKY: "0" jobs: @@ -21,6 +24,8 @@ jobs: cache: npm - run: npm ci - uses: ./.github/actions/portable-build-cache + with: + build_cache_artifact: ${{ inputs.build_cache_artifact }} - run: npm run verify:browser:runtime env: REA_BROWSER_EXECUTABLE: /usr/bin/google-chrome diff --git a/.github/workflows/real-web-source-map.yml b/.github/workflows/real-web-source-map.yml index 483b2f712..8e0869eb7 100644 --- a/.github/workflows/real-web-source-map.yml +++ b/.github/workflows/real-web-source-map.yml @@ -1,12 +1,15 @@ name: Real website source-map verification on: workflow_call: + inputs: + build_cache_artifact: + description: Portable build cache artifact from the calling CI run. + required: false + type: string + default: "" workflow_dispatch: permissions: contents: read -concurrency: - group: real-web-source-map-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: ${{ github.event_name == 'pull_request' }} env: HUSKY: "0" jobs: @@ -21,6 +24,8 @@ jobs: cache: npm - run: npm ci - uses: ./.github/actions/portable-build-cache + with: + build_cache_artifact: ${{ inputs.build_cache_artifact }} - name: Install the pinned compiler into an isolated fixture directory run: npm install --prefix "$RUNNER_TEMP/rea-web-source-map-compiler" --no-audit --no-fund --package-lock=false esbuild@0.25.10 - run: npm run verify:browser:source-maps diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c60f32a2c..7cc798cfa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -290,13 +290,25 @@ jobs: if: inputs.phase == 'prepare' && steps.release.outputs.prs_created == 'true' run: npm run docs:check && git diff --exit-code - publish: - name: Publish to npm + qualification: + name: Qualify exact release revision needs: [merged-release, release-please] if: >- always() && !cancelled() && ((needs.merged-release.result == 'success' && needs.merged-release.outputs.release_created == 'true') || (needs.release-please.result == 'success' && inputs.phase == 'publish' && needs.release-please.outputs.release_created == 'true')) + permissions: + contents: read + actions: read + uses: ./.github/workflows/ci.yml + with: + source_sha: ${{ needs.merged-release.outputs.sha || needs.release-please.outputs.sha }} + + publish: + name: Publish to npm + needs: [merged-release, release-please, qualification] + if: >- + always() && !cancelled() && needs.qualification.result == 'success' runs-on: ubuntu-latest permissions: contents: read @@ -315,17 +327,20 @@ jobs: - run: npm ci - - name: Prepare Windows native build toolchain - run: sudo apt-get update && sudo apt-get install --no-install-recommends -y g++-mingw-w64-x86-64 + - name: Download the exact qualified package + uses: actions/download-artifact@v4 + with: + name: verified-release-package + path: .cache/verified-package/ - - name: Build and verify bundled Windows native controls - run: npm run build:windows-native && npm run verify:windows-native:artifact - - - name: Verify packaged release before publishing - run: npm run verify:package + - name: Verify qualified package provenance and digest + id: package + run: node scripts/ci/verified-package.mjs validate .cache/verified-package - name: Publish shell: bash + env: + VERIFIED_PACKAGE_TARBALL: ${{ steps.package.outputs.tarball }} run: | version="$(node --input-type=module -e 'import packageJson from "./package.json" with { type: "json" }; process.stdout.write(packageJson.version)')" published_version="$(npm view "rea-agents@${version}" version --json 2>/dev/null || true)" @@ -333,7 +348,7 @@ jobs: echo "rea-agents@${version} is already published; verifying the existing package." else tag="$(node scripts/release-npm-tag.mjs "${version}")" - npm publish --access public --tag "${tag}" + npm publish "${VERIFIED_PACKAGE_TARBALL}" --access public --tag "${tag}" fi - name: Verify published CLI from npm diff --git a/.github/workflows/sqlite-runtime.yml b/.github/workflows/sqlite-runtime.yml new file mode 100644 index 000000000..6e5bbcd10 --- /dev/null +++ b/.github/workflows/sqlite-runtime.yml @@ -0,0 +1,37 @@ +name: SQLite runtime compatibility + +on: + workflow_call: + +permissions: + contents: read + +env: + HUSKY: "0" + +jobs: + sqlite: + name: SQLite runtime compatibility (Node ${{ matrix.node }}) + runs-on: ubuntu-latest + timeout-minutes: 15 + strategy: + fail-fast: false + matrix: + # Exercise unavailable-runtime diagnostics, the first supported release, + # and new patches on both supported lines without hand-editing versions. + # The repository-pinned Node 24 version also runs the complete test suite. + node: ["22.x", "24.15.0", "24.x", "26.x"] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node }} + check-latest: true + cache: npm + - run: npm ci + - uses: actions/download-artifact@v4 + with: + name: rea-test-runtime + path: . + - name: Verify SQLite discovery, inspection and cleanup + run: npm run test:sqlite:run diff --git a/.github/workflows/website-check.yml b/.github/workflows/website-check.yml index 8931ba418..2a2c5406f 100644 --- a/.github/workflows/website-check.yml +++ b/.github/workflows/website-check.yml @@ -7,10 +7,6 @@ on: permissions: contents: read -concurrency: - group: website-check-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - jobs: check: name: Website checks diff --git a/.gitignore b/.gitignore index e1b8d81eb..0d006e13f 100644 --- a/.gitignore +++ b/.gitignore @@ -36,6 +36,7 @@ coverage/ .vitest/ .vitest-reports/ test-results.xml +test-timings.json .turbo/ .cache/ docs/.vitepress/cache/ @@ -47,6 +48,7 @@ Thumbs.db # Local reference sources and analysis artifacts /_reference/ +/experiments/analysis-efficiency/results/ # Generated website download /website/public/examples/notes-example.zip @@ -71,3 +73,5 @@ Thumbs.db # Complete static website output, including generated language editions. website/_site/ +# Temporary translation output prepared before replacing the complete site. +website/.i18n-*/ diff --git a/.jscpd.json b/.jscpd.json index 8c6cb653f..25608bfac 100644 --- a/.jscpd.json +++ b/.jscpd.json @@ -1,6 +1,5 @@ { - "_comment": "Test files remain included so the gate measures duplication across both src/ and tests/. The 3.0% limit leaves headroom for ordinary changes while keeping duplication visible.", - "threshold": 3.0, + "threshold": 3.5, "reporters": ["consoleFull"], "ignore": [ "node_modules/**", diff --git a/AGENTS.md b/AGENTS.md index 6ee0229f2..16a586b18 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -4,6 +4,8 @@ REA is a local-only reverse-engineering tool with shared CLI/MCP workflows. Distinguish observations, derivations, inferences, and unknowns; preserve Evidence provenance and session semantics through both adapters. Provider support and setup live in [README.md](README.md#choosing-a-deep-analysis-provider) and its linked guides. +Follow the [contribution scope and fail-closed integration rule](CONTRIBUTING.md#contribution-scope). Do not integrate capabilities while material scope, authority, side-effect, or required verification questions remain unresolved. For new providers or capabilities involving target execution, injection, mutation, or protection recovery, seek the required maintainer scope decision before substantial implementation for integration. Welcome early proposals, small exploratory prototypes, and draft PRs that help resolve questions; they do not authorize integration. + Ghidra uses ephemeral databases without modifying executable bytes or controlling a GUI; Windows Ghidra P0 has no mutation authority. IDA analysis is read-only; never save or close an attached GUI database. Configuration changes must be additive and idempotent, with backups. Installers must not install or upgrade unrelated software, including Homebrew, Node.js, npm, Java, or Ghidra. Ghidra and IDA are bring-your-own. `rea setup` must show its planned changes and require approval before writing files or installing Hopper. @@ -22,10 +24,37 @@ Assess brittleness in touched code during implementation, debugging, review, and When fixing a bug, inspect the producing boundary and affected consumers for duplicated interpretation or unclear ownership. Complete any directly related refactor in the same change and remove superseded code. Passing regression tests alone does not establish that the brittleness is resolved. If related cleanup remains, explain what remains and why. +When addressing a review thread, inspect the producing boundary and affected consumers for brittleness. Complete directly related refactoring in the same change. Before resolving the thread, explain the root cause, structural fix, validation, and any remaining cleanup. + Parse unknown boundary values and model expected failures with the tagged error algebra and `Result`. Preserve partial facts and meaningful failure reasons. Keep identity and lookup values separate from display formatting; preserve source values and explicit unknowns when normalization loses information. Absolute paths, file URLs, and HTTP paths have different semantics. Validate advertised JSON Schemas after SDK conversion against their declared dialect and actual clients. Bind handlers to named contracts with exact types; catalog ordering must never select an operation or schema. +## Performance + +Design analysis workflows and agent interfaces for efficiency from the first +implementation. Correctness, useful answers, Evidence provenance, caller choices, +compatibility and safe resource bounds remain required. + +Optimize in this order: + +1. Agent tokens and context. Return the smallest sufficient answer with + necessary provenance, coverage and limitations. Use task selection, + summaries, paging and retained Evidence where supported; honor requested + detail and keep complete Evidence accessible. Count the whole task, + including schemas, extra calls and retries. +2. Analysis time. Reuse validated results and shared work. Cache keys must + cover result-affecting inputs; define invalidation and lifetime. Validate + freshness before reporting cached live state as current. +3. CPU and memory. Avoid unnecessary work and copies; bound concurrency, + retained state and serialization growth. + +For changes affecting these costs, measure representative completed tasks and +compare equivalent workflows before and after where available. Report token +usage, elapsed time, CPU time and peak process-family memory. Separate cold +and warm runs, label estimates, and state unmeasured costs. Fewer bytes alone +do not establish fewer tokens or faster analysis. + ## Development Use [.nvmrc](.nvmrc) and `package.json#packageManager` for the pinned toolchain. Cursor Cloud may place older Node.js first on `PATH`; environment setup installs the pinned toolchain under `/usr/local/bin`. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f7a65be58..a8d5f3635 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,8 +17,108 @@ targets; optional adapter failures must preserve successful peers. Run `npm run verify:test-discovery` after adding or moving tests. Resolved import boundaries are checked by `npm run verify:module-boundaries`, included in lint. +For analysis workflows and agent interfaces, follow the +[performance priorities](AGENTS.md#performance). Explain the selected output +scope, reuse/cache decisions, and relevant before/after measurements when these +costs change. + When adding or changing an MCP tool, follow the [tool design guide](docs/tool-design.md) and preserve the canonical contracts and generated catalog. +## Contribution scope + +REA focuses on software structure, runtime behavior, and evidence through +general-purpose reverse-engineering workflows. Evaluate a proposal by its actual +capabilities, side effects, defaults, and complete workflow. A tool name or a +reference to vulnerability research, malware analysis, or CTFs does not determine +whether it belongs in REA. + +Supported contributions include format inspection, ordinary archive and standard +compression extraction, disassembly, decompilation, cross-references, general +static deobfuscation, vulnerability analysis, and evidence reporting. Static +protection detection is distinct from defeating that protection. Security fixes +and isolated regression tests remain in scope. + +Runtime investigation needs explicit boundaries. Launching or attaching to a +process, injecting instrumentation, running scripts, and changing memory or +registers require review of target selection, execution and mutation authority, +provenance, resource limits, cancellation, and cleanup. General Frida or debugger +support is not inherently read-only, and existing support does not authorize +every workflow built on it. General-purpose interfaces are not classified as +dedicated bypass workflows solely because caller-provided code could be misused; +their execution and mutation authority must still be reviewed. + +REA does not integrate or officially distribute: + +- Purpose-built workflows to defeat commercial packing or code-virtualization + protections and automatically recover protected code. +- Anti-debugging or anti-instrumentation evasion, or DRM, license, anti-cheat, or + access-control bypass workflows. +- Exploit or attack-payload automation, credential theft, covert persistence, + unauthorized access, or bulk attack workflows. + +These boundaries apply to first-party providers, adapters, plugins, bundled +scripts, defaults, examples, and documentation. Moving a capability into an +optional dependency or plugin does not exempt it. Review what the integration +exposes, including upstream defaults and raw-command or script execution paths. +Ordinary extraction and general static deobfuscation are not excluded merely +because the input is packed or obfuscated; assess added bypass or execution +behavior separately. + +This is a product and maintenance boundary, not a judgment about a contributor's +intentions or a declaration that all excluded research is unlawful. Contributors +must have the rights and authorization needed for their work. A local-only design +or an "authorized use only" disclaimer does not establish containment or settle +legal and scope questions. + +### Fail-closed integration + +If scope fit, target or authorization boundaries, side effects, or the verification +needed to establish those boundaries remain materially unresolved, **do not merge, +enable, or include the capability in official packages or distributions**. Keep +the proposal pending, narrow it, or decline it. Record unknowns explicitly; do not +turn them into "none" or assumed safety. Passing CI, completed implementation, +upstream popularity, or silence from maintainers is not scope approval. + +For a new provider or a capability involving target execution, injection, +mutation, or protection recovery, seek an explicit maintainer scope decision in +the linked issue or design discussion before substantial implementation intended +for integration. Small exploratory prototypes and draft PRs may help inform that +decision; they do not authorize integration. The decision must cover the final +proposed behavior; a scope expansion needs a new decision. Routine fixes and +documentation changes within existing boundaries do not need a separate advance +decision, but must not silently expand those boundaries. + +### Starting a proposal + +To open a feature request or design discussion, describe the problem and desired +outcome or decision. Short answers and the forms' "Not sure yet" options are +welcome. You do not need code, a complete design or test plan, legal analysis, or +private proof-of-authorization documents to start a discussion. Share what you +know and leave optional details blank when you need help. + +Form selections guide triage; they are not proof of authorization or scope +approval. Unselected effects must not be treated as established absence. +Maintainers and implementers work together to resolve the following before +integration: + +- The concrete analyst question, requested inputs and outputs, and why existing + REA operations are insufficient. +- Why the workflow fits this scope, its non-goals, and any protection recovery, + bypass, or attack automation it would expose. +- The selected targets and every execution, injection, mutation, network, or + persistence effect, including behavior inherited from upstream tools. +- How the boundaries and outcome will be verified with self-owned or appropriately + licensed samples; identify real CLI/MCP and provider coverage, cleanup and + resource checks, and remaining unknowns. Do not publish private binaries, + credentials, or sensitive target data; follow [SECURITY.md](SECURITY.md) for + private vulnerability reports. + +Mixed proposals should separate acceptable analysis capabilities from excluded +workflows so each can be decided independently. An issue may discuss unresolved +questions; opening an issue or PR does not authorize integration. This is a +maintainer integration gate, not a per-call confirmation requirement or a sandbox +guarantee. + ## Development setup Use the development toolchain pinned in `.nvmrc` and @@ -87,6 +187,10 @@ CI diagnosis. Packaging/setup/distribution changes additionally require `npm run verify:package` and `npm pack --dry-run`; provider changes require the matching real-provider lane. State which host/provider workflows ran. +`check:pr` reuses build and static-check outputs while executing the test suite +fresh, including the fast Python producer checks. `docs:check` also runs the +onboarding example consistency suite for README-only changes. + Pre-commit formats and lints staged files; pre-push runs `check:fast`. ### Generated files and command ownership diff --git a/DISCLAIMER.md b/DISCLAIMER.md new file mode 100644 index 000000000..25157cc73 --- /dev/null +++ b/DISCLAIMER.md @@ -0,0 +1,136 @@ +# Disclaimer + +## Responsible use + +REA is built for lawful analysis: security research, malware and incident +analysis, vulnerability research and coordinated disclosure, CTFs and education, +interoperability, software preservation, and debugging or auditing software you +own or are authorized to examine. + +The REA project does not support, and will not help with: + +- circumventing DRM, license checks, anti-cheat systems or other technical + protection measures; +- developing game cheats or tampering with online services; +- bypassing authentication, bot protection or access controls on systems you are + not authorized to test; +- copying proprietary software or reproducing its protected code and assets; +- evading the usage policies or safety measures of AI model providers; +- reselling or sharing AI accounts or API access. + +You are responsible for obtaining any required authorization and for complying +with applicable laws, license agreements and terms of service. Reverse +engineering may be restricted in your jurisdiction or by the license of the +software you analyze. + +Requests for help with the uses above will be closed without response in issues +and discussions, and may result in removal from the REA community. + +## User responsibility + +Do not use REA for unauthorized access or exploitation, credential theft, +malicious deployment of malware, unlawful collection or disclosure of data, +unauthorized service disruption, or unlawful circumvention of access controls or +licensing restrictions. Legitimate security research and malware analysis must +remain within the rights and permissions applicable to the work. + +You are responsible for your use of REA, including commands, configurations, +scripts, and actions you direct an AI agent to perform. Establish the legal +authority and scope required for the targets, accounts, devices, software, data, +and operations involved. Comply with applicable laws, contracts, +intellectual-property rights, privacy obligations, and tool licenses. Public +availability of software, possession of a file, or access to a debugging +endpoint does not by itself establish permission for every operation. + +## Runtime, network, and device operations + +Some REA workflows execute or observe programs, attach to runtime or browser +endpoints, capture network traffic, interact with applications, or operate on +connected devices. These actions can affect application state, files, accounts, +devices, and services. Authorization to inspect an artifact does not necessarily +authorize execution, interception, device changes, or interaction with another +party's system. + +Review the operations you request, including agent-generated plans and scripts, +and use an appropriate environment for untrusted targets. You are responsible +for protecting credentials, personal data, captured traffic, and investigation +artifacts, and for obtaining any permission required to collect, retain, +process, or share them. Local operation does not establish authorization or +guarantee that executed targets and third-party tools have no external effects. + +## Analysis results and generated output + +Decompilation, reconstruction, heuristics, and AI-assisted analysis may be +incomplete or incorrect. Results do not guarantee accuracy, completeness, +security, compatibility, or legal compliance. Review the underlying evidence and +verify consequential conclusions before relying on them. + +Obtaining source-like output or an analysis report does not grant rights to the +original program, its data, or the generated output. Check the target's rights +and the producing tool's applicable terms before publishing, sharing, or using +results in another product or service. + +## Third-party tools and licenses + +Third-party components and analysis tools retain their own licenses, copyright +notices, and usage conditions. Consult +[Third-party notices](THIRD_PARTY_NOTICES.md) for their roles, licensing +records, and preserved upstream texts. + +You must legally obtain IDA Pro and Hex-Rays decompilers, Hopper, JEB, and any +other proprietary tools, together with the rights required for your use. REA +provides no commercial-tool license, key, or activation entitlement. Permitted +trials and demos remain subject to vendor terms. An open-source bridge or +accessible API does not grant additional user, machine, feature, automation, +hosting, or output-sharing rights. Cracked copies, stolen keys, unauthorized key +sharing, and bypassing license restrictions are not authorized by REA. + +## Disclaimer of warranty + +REA is provided **AS IS**, without express or implied warranties, including +merchantability, fitness for a particular purpose, and noninfringement, as set +out in the [MIT License](LICENSE). You assume the risks of using the software +and deciding whether it is suitable for your task. No project description, +example, analysis result, or third-party integration guarantees a particular +outcome or establishes that your intended use is lawful or safe. + +## Limitation of liability + +The warranty and liability provisions of the [MIT License](LICENSE) govern REA's +authors and copyright holders, subject to applicable law. That license disclaims +liability for claims, damages, and other liability arising from or in connection +with the software or its use, whether in contract, tort, or otherwise. This +document does not expand those provisions or override rights and obligations +that cannot be excluded under applicable law. + +## Disclaimer of endorsement + +References to third-party projects, contributors, products, services, and +trademarks identify their work and REA's integrations. Credits and thanks do not +imply affiliation, sponsorship, approval, or endorsement by the named parties, +including the National Security Agency and commercial tool vendors. +Redistribution, bundling, or hosting by a third party does not by itself imply +affiliation with or endorsement by the REA project. + +## Relationship to software licenses + +This document explains REA's intended use, user responsibilities, and community +support boundaries. It does not amend the MIT license, impose additional +copyright-license conditions, replace upstream licenses, or grant rights to +third-party software or targets. The applicable software licenses and agreements +retain their own terms. + +## Versions, distribution channels, and platforms + +The project's position on lawful use and non-endorsement of illegal or +unauthorized activity covers all REA versions, distribution forms, and +platforms. This includes historical releases and Git commits, npm packages, +bundled or separately distributed REA skills, source checkouts, release +archives, and redistributed copies, regardless of installation method, agent +client, operating system, or platform. Using an older version or another +distribution channel does not imply project endorsement or remove obligations +under applicable law or to respect third-party rights. + +Each copy remains subject to the licenses accompanying that copy. This statement +does not retroactively amend existing license grants, add license conditions, or +expand historical warranty or liability exclusions. diff --git a/README.md b/README.md index 18343b9ba..c4a89bcee 100644 --- a/README.md +++ b/README.md @@ -157,16 +157,21 @@ Additional tools and host support depend on the target: | Go binaries | Embedded compiler version, modules, replacements and build settings | Built-in static ELF/PE/thin Mach-O inspection; no Go installation required | | WASM artifact | Validation, sections, exact import/export WAT forms and decoded WAT | Caller-supplied WABT 1.0.42; `inspect_wasm_artifact` | | EVM bytecode | Dispatch selectors, byte offsets, inferred arguments and mutability | Local raw/hex carrier on Linux x64; [offline EVM guide](docs/evm-bytecode.md) | +| SQLite databases | Tables, columns, indexes, views, triggers and selected ordinary-table rows | Local database/WAL snapshot; Node.js 24.x >=24.15 or 26+ with native SQLite limits | | Recorded Linux crashes | Raw notes, every recorded thread's registers/signals and optional mapping candidates | Caller-supplied pwntools on Linux x64; optional GDB/pwndbg; [recorded crashes](docs/recorded-crashes.md) | | JavaScript / Electron | Modules, imports, source maps, routes, IPC and native add-on relationships | Node.js and npm; [application analysis](https://rea.tools/guides/javascript/) | | Websites | Page structure, scripts, network observations and requested screenshots | A Chrome-family browser; [browser analysis](https://rea.tools/guides/browser/) | -| Saved network captures | Requests, responses, exposed payloads and source locations | HAR; mitmdump on Linux for native mitmproxy captures; [capture guide](docs/web-network-captures.md) | +| Saved network captures | Requests, responses, exposed payloads and source locations | HAR or Fiddler Everywhere SAZ; mitmdump on Linux for native mitmproxy; [capture guide](docs/web-network-captures.md) | | .NET assemblies | Metadata, CIL instructions, declared native dependencies and build comparisons | None (static only); [managed-code guide](docs/managed-code-analysis.md) | | Android APKs | Manifest declarations, classes, decompiled methods and references | Headless JADX and a full JDK on Linux/macOS/Windows x64; [Android guide](docs/android-analysis.md) | | Android devices | Devices, packages, processes, logs, dumps, screen captures, and APK/file transfers | Caller-supplied adb (emulator or hardware); [ADB guide](docs/adb-device-analysis.md) | | JEB projects | Engine-backed project units, artifact digests and type/method pseudo-code | A caller-started JEB client serving MCP, selected with REA_JEB_MCP_URL; [JEB guide](docs/jeb-analysis.md) | | Android resources | Decoded manifest, string tables, locales and version facts | Caller-supplied Apktool launcher; [resource guide](docs/apktool-resource-analysis.md) | +| Flutter apps | Dart snapshot hash, per-ABI library digests and engine build provenance | None (static APK parsing); [Flutter guide](docs/flutter-analysis.md) | | Firmware | Regions, extraction results and native-analysis handoffs | Binwalk / Unblob on Linux; [firmware guide](docs/firmware-analysis.md) | +| Recorded packets | Selected fields, repeated values, filters and decode-as rules | Linux: TShark 4.x + prlimit; [capture guide](docs/packet-captures.md) | +| Packet summaries | Endpoints, DNS, TLS SNI, protocol distribution and HTTP requests | Caller-supplied tshark and capinfos (Linux-verified); [pcap guide](docs/pcap-analysis.md) | +| Recorded logic signals | Decoder annotations, sample ranges and diagnostics | Linux: sigrok-cli 0.7.2 + prlimit; [signal recordings](docs/signal-recordings.md) | | Packages and resources | File inventories, digests, plists, Apple bundle anatomy and extracted resources | [Artifact and JavaScript guide](docs/javascript-artifact-reconstruction.md), [Apple applications](docs/apple-application-analysis.md) | | Process behavior | Terminal output, interactions, exit and filesystem observations, and run comparisons | Linux/macOS with a native PTY; [process capture](docs/process-capture.md) | @@ -178,7 +183,7 @@ using your user permissions; each runtime guide describes its effects. Native formats and host support vary by provider. See [Hopper and Ghidra setup](docs/installation.md#hopper), the -[IDA guide](docs/ida-provider.md), and +[IDA guide](docs/ida-provider.md) (including an optional native MCP bridge), and [experimental Windows Ghidra support](docs/windows-ghidra-p0.md). Ghidra also supports [16-bit DOS analysis](docs/ghidra-dos.md). For large binaries, raise the provider's startup deadline with @@ -317,7 +322,7 @@ Report vulnerabilities through [SECURITY.md](SECURITY.md). ## Star history -🎉 **110,000 GitHub stars — thank you!** +🎉 **170,000 GitHub stars — thank you!** Thanks to everyone using REA, reporting bugs, requesting features, testing builds, and contributing fixes. @@ -331,9 +336,13 @@ Thanks to everyone using REA, reporting bugs, requesting features, testing build ## Disclaimer -REA provides tools for lawful reverse-engineering research, analysis, and reconstruction. You are responsible for obtaining any required authorization and complying with applicable laws. The project does not endorse illegal or unauthorized use. +See [DISCLAIMER.md](DISCLAIMER.md) for responsible-use guidance. -REA is an open-source software project. We have not issued or endorsed any cryptocurrency or token. Tokens using the REA name are not affiliated with the project. +The project's position on illegal or unauthorized use covers all REA versions, +distribution channels, and platforms; each copy retains its applicable licenses. + +REA is for lawful research, education, interoperability, software preservation, +and analysis of software you own or are authorized to examine. ## Contributing @@ -348,3 +357,16 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and checks, ## License [MIT](LICENSE) + +REA-authored code is licensed under MIT. Third-party material retains its own +licenses and copyright notices; see +[Third-party notices](THIRD_PARTY_NOTICES.md) for the dependency inventory, +preserved license texts, and external-tool terms. + +**You must legally obtain and be authorized to use commercial tools**, including +IDA Pro / Hex-Rays decompilers, Hopper, and JEB, under their applicable +licenses. REA grants no tool license, key, or activation entitlement. Trials and +demos remain subject to vendor terms, including user, feature, automation, and +output sharing restrictions. Cracked copies, stolen keys, unauthorized key +sharing, and bypassing license restrictions are not authorized. This guidance +does not amend MIT or third-party licenses. diff --git a/README_ar.md b/README_ar.md index 81b7a9c81..1c0bc367e 100644 --- a/README_ar.md +++ b/README_ar.md @@ -139,12 +139,16 @@ npx rea-agents@latest setup | JavaScript / Electron | الوحدات، وعمليات الاستيراد، وخرائط المصدر، والمسارات، وIPC، وعلاقات إضافات الشيفرة الأصلية | Node.js وnpm؛ [تحليل التطبيقات](https://rea.tools/ar/guides/javascript/) | | المواقع | بنية الصفحة، والسكربتات، وملاحظات الشبكة، ولقطات الشاشة المطلوبة | متصفح من عائلة Chrome؛ [تحليل المتصفح](https://rea.tools/ar/guides/browser/) | | تسجيلات الشبكة المحفوظة | الطلبات، والاستجابات، ومحتويات الحمولة المتاحة، ومواضعها في المصدر | HAR؛ وmitmdump على Linux لتسجيلات mitmproxy بصيغتها الأصلية؛ [دليل تسجيلات الشبكة](docs/web-network-captures.md) | +| التقاط الحزم | نقاط النهاية وDNS وTLS SNI وتوزيع البروتوكولات وطلبات HTTP | tshark وcapinfos يوفّرهما المُستدعي؛ [دليل pcap](docs/pcap-analysis.md) | | تجميعات .NET | البيانات الوصفية، وتعليمات CIL، واعتماديات الشيفرة الأصلية المعلنة، ومقارنات البناء | فحص ثابت؛ [دليل الشيفرة المُدارة](docs/managed-code-analysis.md) | | حزم Android APK | تصريحات ملف manifest، والأصناف، والدوال الناتجة عن فك الترجمة، والمراجع | JADX دون واجهة رسومية وJDK كامل على Linux/macOS/Windows x64؛ [دليل Android](docs/android-analysis.md) | | أجهزة Android | الأجهزة والحزم والعمليات والسجلات والدامبات ولقطات الشاشة ونقل APK/الملفات | adb يوفّره المُستدعي (محاكي أو جهاز)؛ [دليل ADB](docs/adb-device-analysis.md) | | مشاريع JEB | وحدات المشروع من المحرك وبصمات المصنّفات والكود الزائف للأنواع/الدوال | عميل JEB يبدأه المُستدعي ويقدّم MCP، ويُختار عبر REA_JEB_MCP_URL؛ [دليل JEB](docs/jeb-analysis.md) | | موارد Android | البيان المفكوك الترميز وجداول السلاسل واللغات وحقائق الإصدار | مُشغّل Apktool يوفّره المُستدعي؛ [دليل الموارد](docs/apktool-resource-analysis.md) | +| تطبيقات Flutter | بصمة لقطة Dart وهشوش المكتبات لكل ABI وأصل بناء المحرك | لا شيء (تحليل APK ساكن)؛ [دليل Flutter](docs/flutter-analysis.md) | | البرامج الثابتة | المناطق، ونتائج الاستخراج، وما يُمرّر إلى تحليل الشيفرة الأصلية | Binwalk / Unblob على Linux؛ [دليل البرامج الثابتة](docs/firmware-analysis.md) | +| الحزم المسجلة | حقول مختارة وقيم متكررة ومرشحات وقواعد فك الترميز | Linux: TShark 4.x + prlimit; [دليل التقاط الحزم](docs/packet-captures.md) | +| الإشارات المنطقية المسجلة | تعليقات مفكك الترميز ونطاقات العينات ومعلومات التشخيص | Linux: sigrok-cli 0.7.2 + prlimit; [دليل الإشارات](docs/signal-recordings.md) | | الحزم والموارد | قوائم الملفات، والبصمات، وملفات plist، وبنية حزم Apple، والموارد المستخرجة | [دليل تحليل الملفات وJavaScript](docs/javascript-artifact-reconstruction.md)، [تطبيقات Apple](docs/apple-application-analysis.md) | | سلوك العمليات | مخرجات الطرفية، والتفاعلات، وملاحظات الخروج ونظام الملفات، ومقارنات التشغيل | Linux/macOS مع PTY أصلي؛ [تسجيل سلوك العمليات](docs/process-capture.md) | @@ -260,7 +264,7 @@ npx rea-agents@latest setup ## سجل النجوم -🎉 **110,000 نجمة على GitHub — شكرًا لكم!** +🎉 **170,000 نجمة على GitHub — شكرًا لكم!** شكرًا لكل من يستخدم REA، ويبلّغ عن الأخطاء، ويقترح ميزات، ويختبر إصدارات البناء، ويساهم بالإصلاحات. @@ -274,7 +278,13 @@ npx rea-agents@latest setup ## إخلاء المسؤولية -يوفّر REA أدوات لأبحاث الهندسة العكسية والتحليل وإعادة البناء المشروعة. أنت مسؤول عن الحصول على أي تفويض مطلوب والالتزام بالقوانين المعمول بها. لا يؤيد المشروع الاستخدام غير القانوني أو غير المصرّح به. +راجع [DISCLAIMER.md](DISCLAIMER.md) للحصول على إرشادات الاستخدام المسؤول. + +REA مخصص للبحث والتعليم والتشغيل البيني وحفظ البرمجيات بشكل قانوني، ولتحليل البرمجيات التي تملكها أو لديك تفويض لفحصها. + +The project's position on illegal or unauthorized use covers all REA +versions, distribution channels, and platforms; each copy retains its +applicable licenses. ## المساهمة @@ -285,3 +295,15 @@ npx rea-agents@latest setup ## الترخيص [MIT](LICENSE) + +REA-authored code is licensed under MIT. Third-party material retains its own +licenses and copyright notices; see [Third-party notices](THIRD_PARTY_NOTICES.md) +for the dependency inventory, preserved license texts, and external-tool terms. + +**You must legally obtain and be authorized to use commercial tools**, including +IDA Pro / Hex-Rays decompilers, Hopper, and JEB, under their applicable licenses. +REA grants no tool license, key, or activation entitlement. Trials and demos +remain subject to vendor terms, including user, feature, automation, and output +sharing restrictions. Cracked copies, stolen keys, unauthorized key sharing, +and bypassing license restrictions are not authorized. This guidance does not +amend MIT or third-party licenses. diff --git a/README_de.md b/README_de.md index 87e625852..2c6d20290 100644 --- a/README_de.md +++ b/README_de.md @@ -139,12 +139,16 @@ REA benötigt Node.js 22.x (>=22.19), 24.x (>=24.11) oder 26+ sowie npm. Zusätz | JavaScript / Electron | Module, Imports, Source Maps, Routen, IPC und Beziehungen zu nativen Add-ons | Node.js und npm; [Anwendungsanalyse](https://rea.tools/de/guides/javascript/) | | Websites | Seitenstruktur, Skripte, Netzwerkbeobachtungen und angeforderte Screenshots | Ein Browser aus der Chrome-Familie; [Browseranalyse](https://rea.tools/de/guides/browser/) | | Gespeicherte Netzwerkaufzeichnungen | Anfragen, Antworten, zugängliche Nutzdaten und Quellpositionen | HAR; mitmdump unter Linux für Aufzeichnungen im nativen mitmproxy-Format; [Leitfaden zu Netzwerkaufzeichnungen](docs/web-network-captures.md) | +| Paketerfassungen | Endpunkte, DNS, TLS SNI, Protokollverteilung und HTTP-Anfragen | Vom Aufrufer bereitgestellte tshark- und capinfos-Binaries; [pcap-Leitfaden](docs/pcap-analysis.md) | | .NET-Assemblies | Metadaten, CIL-Anweisungen, deklarierte native Abhängigkeiten und Build-Vergleiche | Statische Untersuchung; [Leitfaden für verwalteten Code](docs/managed-code-analysis.md) | | Android-APKs | Manifest-Deklarationen, Klassen, dekompilierte Methoden und Verweise | JADX ohne grafische Oberfläche und ein vollständiges JDK unter Linux/macOS/Windows x64; [Android-Leitfaden](docs/android-analysis.md) | | Android-Geräte | Geräte, Pakete, Prozesse, Logs, Dumps, Bildschirmaufnahmen sowie APK- und Dateiübertragungen | Vom Aufrufer bereitgestelltes adb (Emulator oder Gerät); [ADB-Leitfaden](docs/adb-device-analysis.md) | | JEB-Projekte | Engine-gestützte Projekteinheiten, Artefakt-Prüfsummen und Pseudokode von Typen/Methoden | Ein vom Aufrufer gestarteter JEB-Client mit MCP, ausgewählt über REA_JEB_MCP_URL; [JEB-Leitfaden](docs/jeb-analysis.md) | | Android-Ressourcen | Dekodiertes Manifest, String-Tabellen, Sprachen und Versionsfakten | Vom Aufrufer bereitgestellter Apktool-Starter; [Ressourcen-Leitfaden](docs/apktool-resource-analysis.md) | +| Flutter-Apps | Dart-Snapshot-Hash, Per-ABI-Bibliotheksprüfsummen und Engine-Build-Provenienz | Keine (statische APK-Analyse); [Flutter-Leitfaden](docs/flutter-analysis.md) | | Firmware | Bereiche, Extraktionsergebnisse und Übergaben an die native Analyse | Binwalk / Unblob unter Linux; [Firmware-Leitfaden](docs/firmware-analysis.md) | +| Aufgezeichnete Pakete | Ausgewählte Felder, wiederholte Werte, Filter und Decode-as-Regeln | Linux: TShark 4.x + prlimit; [Mitschnitt-Anleitung](docs/packet-captures.md) | +| Aufgezeichnete Logiksignale | Decoder-Anmerkungen, Sample-Bereiche und Diagnosen | Linux: sigrok-cli 0.7.2 + prlimit; [Signalaufzeichnungen](docs/signal-recordings.md) | | Pakete und Ressourcen | Dateiinventare, Hashwerte, plists, Aufbau von Apple-Bundles und extrahierte Ressourcen | [Artefakt- und JavaScript-Leitfaden](docs/javascript-artifact-reconstruction.md), [Apple-Anwendungen](docs/apple-application-analysis.md) | | Prozessverhalten | Terminalausgabe, Interaktionen, Beobachtungen zu Prozessende und Dateisystem sowie Laufvergleiche | Linux/macOS mit nativer PTY; [Prozessaufzeichnung](docs/process-capture.md) | @@ -258,7 +262,7 @@ Melde Sicherheitslücken gemäß [SECURITY.md](SECURITY.md). ## Sternverlauf -🎉 **110.000 GitHub-Sterne – vielen Dank!** +🎉 **170.000 GitHub-Sterne – vielen Dank!** Danke an alle, die REA nutzen, Fehler melden, Funktionswünsche äußern, Builds testen und Fehlerbehebungen beitragen. @@ -272,7 +276,13 @@ Danke an alle, die REA nutzen, Fehler melden, Funktionswünsche äußern, Builds ## Haftungsausschluss -REA stellt Werkzeuge für rechtmäßige Reverse-Engineering-Forschung, Analyse und Rekonstruktion bereit. Du bist dafür verantwortlich, erforderliche Genehmigungen einzuholen und geltendes Recht einzuhalten. Das Projekt unterstützt keine rechtswidrige oder unbefugte Nutzung. +Hinweise zur verantwortungsvollen Nutzung findest du in [DISCLAIMER.md](DISCLAIMER.md). + +REA dient der rechtmäßigen Forschung, Bildung, Interoperabilität, Softwareerhaltung und Analyse von Software, die dir gehört oder die du mit entsprechender Genehmigung untersuchen darfst. + +The project's position on illegal or unauthorized use covers all REA +versions, distribution channels, and platforms; each copy retains its +applicable licenses. ## Mitwirken @@ -283,3 +293,15 @@ Die Entwicklungsumgebung und Prüfungen beschreibt [CONTRIBUTING.md](CONTRIBUTIN ## Lizenz [MIT](LICENSE) + +REA-authored code is licensed under MIT. Third-party material retains its own +licenses and copyright notices; see [Third-party notices](THIRD_PARTY_NOTICES.md) +for the dependency inventory, preserved license texts, and external-tool terms. + +**You must legally obtain and be authorized to use commercial tools**, including +IDA Pro / Hex-Rays decompilers, Hopper, and JEB, under their applicable licenses. +REA grants no tool license, key, or activation entitlement. Trials and demos +remain subject to vendor terms, including user, feature, automation, and output +sharing restrictions. Cracked copies, stolen keys, unauthorized key sharing, +and bypassing license restrictions are not authorized. This guidance does not +amend MIT or third-party licenses. diff --git a/README_es.md b/README_es.md index 4c27ff12a..f955b5891 100644 --- a/README_es.md +++ b/README_es.md @@ -139,12 +139,16 @@ REA requiere Node.js 22.x (>=22.19), 24.x (>=24.11) o 26+, además de npm. Las h | JavaScript / Electron | Módulos, importaciones, mapas de código fuente, rutas, IPC y relaciones con complementos nativos | Node.js y npm; [análisis de aplicaciones](https://rea.tools/es/guides/javascript/) | | Sitios web | Estructura de la página, scripts, observaciones de red y capturas de pantalla solicitadas | Un navegador de la familia Chrome; [análisis del navegador](https://rea.tools/es/guides/browser/) | | Capturas de red guardadas | Solicitudes, respuestas, contenido accesible de las cargas útiles y ubicaciones de origen | HAR; mitmdump en Linux para capturas en formato nativo de mitmproxy; [guía de capturas](docs/web-network-captures.md) | +| Capturas de paquetes | Endpoints, DNS, TLS SNI, distribución de protocolos y solicitudes HTTP | tshark y capinfos suministrados por el autor de la llamada; [guía pcap](docs/pcap-analysis.md) | | Ensamblados .NET | Metadatos, instrucciones CIL, dependencias nativas declaradas y comparaciones de compilaciones | Inspección estática; [guía de código administrado](docs/managed-code-analysis.md) | | APK de Android | Declaraciones del manifiesto, clases, métodos descompilados y referencias | JADX sin interfaz gráfica y un JDK completo en Linux/macOS/Windows x64; [guía de Android](docs/android-analysis.md) | | Dispositivos Android | Dispositivos, paquetes, procesos, registros, volcados, capturas de pantalla y transferencias de APK/archivos | adb suministrado por el autor de la llamada (emulador o dispositivo); [guía de ADB](docs/adb-device-analysis.md) | | Proyectos JEB | Unidades de proyecto del motor, resúmenes de artefactos y pseudocódigo de tipos/métodos | Un cliente JEB iniciado por el autor de la llamada que sirve MCP, seleccionado con REA_JEB_MCP_URL; [guía de JEB](docs/jeb-analysis.md) | | Recursos de Android | Manifiesto decodificado, tablas de cadenas, idiomas y datos de versión | Lanzador de Apktool suministrado por el autor de la llamada; [guía de recursos](docs/apktool-resource-analysis.md) | +| Aplicaciones Flutter | Hash de snapshot de Dart, resúmenes de bibliotecas por ABI y procedencia de compilación del motor | Ninguna (análisis APK estático); [guía de Flutter](docs/flutter-analysis.md) | | Firmware | Regiones, resultados de extracción y derivaciones al análisis nativo | Binwalk / Unblob en Linux; [guía de firmware](docs/firmware-analysis.md) | +| Paquetes grabados | Campos seleccionados, valores repetidos, filtros y reglas de decodificación | Linux: TShark 4.x + prlimit; [guía de capturas](docs/packet-captures.md) | +| Señales lógicas grabadas | Anotaciones del decodificador, rangos de muestras y diagnósticos | Linux: sigrok-cli 0.7.2 + prlimit; [guía de señales](docs/signal-recordings.md) | | Paquetes y recursos | Inventarios de archivos, resúmenes criptográficos, plists, estructura de paquetes de Apple y recursos extraídos | [Guía de artefactos y JavaScript](docs/javascript-artifact-reconstruction.md), [aplicaciones de Apple](docs/apple-application-analysis.md) | | Comportamiento de procesos | Salida de la terminal, interacciones, observaciones de salida y del sistema de archivos, y comparaciones entre ejecuciones | Linux/macOS con una PTY nativa; [captura de procesos](docs/process-capture.md) | @@ -258,7 +262,7 @@ Informa de vulnerabilidades siguiendo [SECURITY.md](SECURITY.md). ## Historial de estrellas -🎉 **110.000 estrellas en GitHub: ¡gracias!** +🎉 **170.000 estrellas en GitHub: ¡gracias!** Gracias a quienes usan REA, informan de errores, solicitan funciones, prueban compilaciones y contribuyen con correcciones. @@ -272,7 +276,13 @@ Gracias a quienes usan REA, informan de errores, solicitan funciones, prueban co ## Aviso legal -REA proporciona herramientas para la investigación, el análisis y la reconstrucción mediante ingeniería inversa conforme a la ley. Eres responsable de obtener las autorizaciones necesarias y cumplir las leyes aplicables. El proyecto no respalda usos ilegales ni no autorizados. +Consulta [DISCLAIMER.md](DISCLAIMER.md) para obtener orientación sobre el uso responsable. + +REA está destinado a la investigación, la educación, la interoperabilidad, la preservación de software y el análisis de software propio o autorizado, dentro de la ley. + +The project's position on illegal or unauthorized use covers all REA +versions, distribution channels, and platforms; each copy retains its +applicable licenses. ## Contribuir @@ -283,3 +293,15 @@ Consulta [CONTRIBUTING.md](CONTRIBUTING.md) para preparar el entorno de desarrol ## Licencia [MIT](LICENSE) + +REA-authored code is licensed under MIT. Third-party material retains its own +licenses and copyright notices; see [Third-party notices](THIRD_PARTY_NOTICES.md) +for the dependency inventory, preserved license texts, and external-tool terms. + +**You must legally obtain and be authorized to use commercial tools**, including +IDA Pro / Hex-Rays decompilers, Hopper, and JEB, under their applicable licenses. +REA grants no tool license, key, or activation entitlement. Trials and demos +remain subject to vendor terms, including user, feature, automation, and output +sharing restrictions. Cracked copies, stolen keys, unauthorized key sharing, +and bypassing license restrictions are not authorized. This guidance does not +amend MIT or third-party licenses. diff --git a/README_fa.md b/README_fa.md index eaf018b05..54af87c57 100644 --- a/README_fa.md +++ b/README_fa.md @@ -122,23 +122,27 @@ npx rea-agents@latest setup REA به Node.js 22.x (>=22.19)، 24.x (>=24.11) یا 26+، به‌همراه npm نیاز دارد. ابزارهای اضافی و پشتیبانی سیستم میزبان به نوع هدف بستگی دارند: -| هدف | خروجی REA | پیش‌نیازها و راهنما | -| --------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | -| باینری‌های بومی | شبه‌کد، اسمبلی، رشته‌ها، نمادها، فراخوانی‌ها و ارجاعات | Hopper، Ghidra یا IDA؛ [تحلیل بومی](https://rea.tools/fa/guides/native/) | -| ساختار ELF آفلاین | بخش‌ها، سگمنت‌ها، نمادها و relocationهای اصلی و گزینه‌های احتمالی کاهش آسیب‌پذیری ایستا | pwntools تأمین‌شده توسط فراخواننده روی Linux x64؛ [تشخیص باینری](docs/binary-diagnostics.md) | -| بایت‌کد EVM | selectorهای dispatch، offsetهای بایتی، آرگومان‌های استنباط‌شده و قابلیت تغییر وضعیت | دادهٔ خام/hex محلی روی Linux x64؛ [راهنمای EVM آفلاین](docs/evm-bytecode.md) | -| کرش‌های ثبت‌شدهٔ لینوکس | یادداشت‌های خام، رجیسترها/سیگنال‌های تمام threadهای ثبت‌شده و گزینه‌های احتمالی نگاشت | pwntools تأمین‌شده توسط فراخواننده روی Linux x64؛ GDB/pwndbg اختیاری؛ [کرش‌های ثبت‌شده](docs/recorded-crashes.md) | -| JavaScript / Electron | ماژول‌ها، importها، source mapها، مسیرها، IPC و ارتباط افزونه‌های بومی | Node.js و npm؛ [تحلیل برنامه](https://rea.tools/fa/guides/javascript/) | -| وب‌سایت‌ها | ساختار صفحه، اسکریپت‌ها، مشاهدات شبکه و اسکرین‌شات‌های درخواستی | مرورگر مبتنی بر Chrome؛ [تحلیل مرورگر](https://rea.tools/fa/guides/browser/) | -| داده‌های ضبط‌شدهٔ شبکه | درخواست‌ها، پاسخ‌ها، payloadهای آشکارشده و مکان آن‌ها در منبع | HAR؛ ابزار mitmdump در لینوکس برای ضبط‌های بومی mitmproxy؛ [راهنمای ضبط شبکه](docs/web-network-captures.md) | -| اسمبلی‌های .NET | فراداده، دستورالعمل‌های CIL، وابستگی‌های بومی اعلام‌شده و مقایسهٔ buildها | بررسی ایستا؛ [راهنمای کد مدیریت‌شده](docs/managed-code-analysis.md) | -| فایل‌های APK اندروید | تعاریف Manifest، کلاس‌ها، متدهای دیکامپایل‌شده و ارجاعات | JADX بدون رابط گرافیکی و JDK کامل در Linux/macOS/Windows x64؛ [راهنمای اندروید](docs/android-analysis.md) | -| دستگاه‌های اندروید | دستگاه‌ها، بسته‌ها، فرایندها، لاگ‌ها، دامپ‌ها، اسکرین‌شات‌ها و انتقال APK/فایل | adb تأمین‌شده توسط فراخوان‌کننده (شبیه‌ساز یا دستگاه)؛ [راهنمای ADB](docs/adb-device-analysis.md) | -| پروژه‌های JEB | واحدهای پروژه از موتور، هش‌های مصنوع و شبه‌کدِ نوع/متد | یک کلاینت JEB که توسط فراخوان‌کننده اجرا شده و MCP ارائه می‌دهد و با REA_JEB_MCP_URL انتخاب می‌شود؛ [راهنمای JEB](docs/jeb-analysis.md) | -| منابع اندروید | مانیفست رمزگشایی‌شده، جداول رشته‌ها، زبان‌ها و اطلاعات نسخه | راه‌انداز Apktool تأمین‌شده توسط فراخوان‌کننده؛ [راهنمای منابع](docs/apktool-resource-analysis.md) | -| Firmware | ناحیه‌ها، نتایج استخراج و تحویل به ابزارهای تحلیل بومی | Binwalk / Unblob در لینوکس؛ [راهنمای Firmware](docs/firmware-analysis.md) | -| بسته‌ها و منابع | فهرست فایل‌ها، digestها، فایل‌های plist، ساختار bundle اپل و منابع استخراج‌شده | [راهنمای آرتیفکت و JavaScript](docs/javascript-artifact-reconstruction.md)، [برنامه‌های اپل](docs/apple-application-analysis.md) | -| رفتار فرایند | خروجی ترمینال، تعاملات، وضعیت خروج، مشاهدات سیستم فایل و مقایسهٔ اجراها | Linux/macOS با PTY بومی؛ [ضبط فرایند](docs/process-capture.md) | +| هدف | خروجی REA | پیش‌نیازها و راهنما | +| ---------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | +| باینری‌های بومی | شبه‌کد، اسمبلی، رشته‌ها، نمادها، فراخوانی‌ها و ارجاعات | Hopper، Ghidra یا IDA؛ [تحلیل بومی](https://rea.tools/fa/guides/native/) | +| ساختار ELF آفلاین | بخش‌ها، سگمنت‌ها، نمادها و relocationهای اصلی و گزینه‌های احتمالی کاهش آسیب‌پذیری ایستا | pwntools تأمین‌شده توسط فراخواننده روی Linux x64؛ [تشخیص باینری](docs/binary-diagnostics.md) | +| بایت‌کد EVM | selectorهای dispatch، offsetهای بایتی، آرگومان‌های استنباط‌شده و قابلیت تغییر وضعیت | دادهٔ خام/hex محلی روی Linux x64؛ [راهنمای EVM آفلاین](docs/evm-bytecode.md) | +| کرش‌های ثبت‌شدهٔ لینوکس | یادداشت‌های خام، رجیسترها/سیگنال‌های تمام threadهای ثبت‌شده و گزینه‌های احتمالی نگاشت | pwntools تأمین‌شده توسط فراخواننده روی Linux x64؛ GDB/pwndbg اختیاری؛ [کرش‌های ثبت‌شده](docs/recorded-crashes.md) | +| JavaScript / Electron | ماژول‌ها، importها، source mapها، مسیرها، IPC و ارتباط افزونه‌های بومی | Node.js و npm؛ [تحلیل برنامه](https://rea.tools/fa/guides/javascript/) | +| وب‌سایت‌ها | ساختار صفحه، اسکریپت‌ها، مشاهدات شبکه و اسکرین‌شات‌های درخواستی | مرورگر مبتنی بر Chrome؛ [تحلیل مرورگر](https://rea.tools/fa/guides/browser/) | +| داده‌های ضبط‌شدهٔ شبکه | درخواست‌ها، پاسخ‌ها، payloadهای آشکارشده و مکان آن‌ها در منبع | HAR؛ ابزار mitmdump در لینوکس برای ضبط‌های بومی mitmproxy؛ [راهنمای ضبط شبکه](docs/web-network-captures.md) | +| اسمبلی‌های .NET | فراداده، دستورالعمل‌های CIL، وابستگی‌های بومی اعلام‌شده و مقایسهٔ buildها | بررسی ایستا؛ [راهنمای کد مدیریت‌شده](docs/managed-code-analysis.md) | +| فایل‌های APK اندروید | تعاریف Manifest، کلاس‌ها، متدهای دیکامپایل‌شده و ارجاعات | JADX بدون رابط گرافیکی و JDK کامل در Linux/macOS/Windows x64؛ [راهنمای اندروید](docs/android-analysis.md) | +| دستگاه‌های اندروید | دستگاه‌ها، بسته‌ها، فرایندها، لاگ‌ها، دامپ‌ها، اسکرین‌شات‌ها و انتقال APK/فایل | adb تأمین‌شده توسط فراخوان‌کننده (شبیه‌ساز یا دستگاه)؛ [راهنمای ADB](docs/adb-device-analysis.md) | +| پروژه‌های JEB | واحدهای پروژه از موتور، هش‌های مصنوع و شبه‌کدِ نوع/متد | یک کلاینت JEB که توسط فراخوان‌کننده اجرا شده و MCP ارائه می‌دهد و با REA_JEB_MCP_URL انتخاب می‌شود؛ [راهنمای JEB](docs/jeb-analysis.md) | +| منابع اندروید | مانیفست رمزگشایی‌شده، جداول رشته‌ها، زبان‌ها و اطلاعات نسخه | راه‌انداز Apktool تأمین‌شده توسط فراخوان‌کننده؛ [راهنمای منابع](docs/apktool-resource-analysis.md) | +| برنامه‌های فلاتر | هش اسنپ‌شات دارت، هش کتابخانه‌ها به تفکیک ABI و اصالت بیلد موتور | هیچ (تحلیل ایستا APK)؛ [راهنمای فلاتر](docs/flutter-analysis.md) | +| Firmware | ناحیه‌ها، نتایج استخراج و تحویل به ابزارهای تحلیل بومی | Binwalk / Unblob در لینوکس؛ [راهنمای Firmware](docs/firmware-analysis.md) | +| بسته‌های ضبط‌شده | فیلدهای منتخب، مقادیر تکراری، فیلترها و قواعد رمزگشایی | Linux: TShark 4.x + prlimit; [راهنمای ضبط بسته](docs/packet-captures.md) | +| ضبط بسته‌ها | نقاط پایانی، DNS، TLS SNI، توزیع پروتکل و درخواست‌های HTTP | tshark و capinfos تأمین‌شده توسط فراخوان‌کننده؛ [راهنمای pcap](docs/pcap-analysis.md) | +| سیگنال‌های منطقی ضبط‌شده | توضیحات رمزگشا، بازه‌های نمونه و اطلاعات عیب‌یابی | Linux: sigrok-cli 0.7.2 + prlimit; [راهنمای سیگنال‌ها](docs/signal-recordings.md) | +| بسته‌ها و منابع | فهرست فایل‌ها، digestها، فایل‌های plist، ساختار bundle اپل و منابع استخراج‌شده | [راهنمای آرتیفکت و JavaScript](docs/javascript-artifact-reconstruction.md)، [برنامه‌های اپل](docs/apple-application-analysis.md) | +| رفتار فرایند | خروجی ترمینال، تعاملات، وضعیت خروج، مشاهدات سیستم فایل و مقایسهٔ اجراها | Linux/macOS با PTY بومی؛ [ضبط فرایند](docs/process-capture.md) | بررسی ایستای JavaScript و .NET فایل‌های ارائه‌شده را بدون اجرای برنامه می‌خواند. ضبط زمان اجرا، هدف انتخاب‌شده را با مجوزهای کاربری شما اجرا می‌کند یا با آن تعامل دارد؛ آثار این عملیات در راهنمای مربوط به هر نوع ضبط توضیح داده شده‌اند. @@ -243,7 +247,7 @@ npx rea-agents@latest setup ## تاریخچهٔ ستاره‌ها -🎉 **۱۱۰٬۰۰۰ ستارهٔ GitHub — سپاسگزاریم!** +🎉 **۱۷۰٬۰۰۰ ستارهٔ GitHub — سپاسگزاریم!** از همهٔ کسانی که از REA استفاده می‌کنند، خطاها را گزارش می‌دهند، قابلیت‌های جدید پیشنهاد می‌کنند، buildها را آزمایش می‌کنند و در بهبود پروژه مشارکت دارند سپاسگزاریم. @@ -251,7 +255,13 @@ npx rea-agents@latest setup ## سلب مسئولیت -REA ابزارهایی برای پژوهش، تحلیل و بازسازی قانونی در حوزهٔ مهندسی معکوس فراهم می‌کند. مسئولیت دریافت مجوزهای لازم و رعایت قوانین مربوط بر عهدهٔ شماست. این پروژه استفادهٔ غیرقانونی یا بدون مجوز را تأیید نمی‌کند. +برای راهنمای استفادهٔ مسئولانه، [DISCLAIMER.md](DISCLAIMER.md) را ببینید. + +REA برای پژوهش، آموزش، تعامل‌پذیری، حفظ نرم‌افزار و تحلیل نرم‌افزارهایی است که مالک آن‌ها هستید یا اجازهٔ بررسی آن‌ها را دارید، در چارچوب قانون. + +The project's position on illegal or unauthorized use covers all REA +versions, distribution channels, and platforms; each copy retains its +applicable licenses. ## مشارکت @@ -263,4 +273,16 @@ REA ابزارهایی برای پژوهش، تحلیل و بازسازی قان [MIT](LICENSE) +REA-authored code is licensed under MIT. Third-party material retains its own +licenses and copyright notices; see [Third-party notices](THIRD_PARTY_NOTICES.md) +for the dependency inventory, preserved license texts, and external-tool terms. + +**You must legally obtain and be authorized to use commercial tools**, including +IDA Pro / Hex-Rays decompilers, Hopper, and JEB, under their applicable licenses. +REA grants no tool license, key, or activation entitlement. Trials and demos +remain subject to vendor terms, including user, feature, automation, and output +sharing restrictions. Cracked copies, stolen keys, unauthorized key sharing, +and bypassing license restrictions are not authorized. This guidance does not +amend MIT or third-party licenses. + diff --git a/README_fr.md b/README_fr.md index f2b8a03c4..346210525 100644 --- a/README_fr.md +++ b/README_fr.md @@ -143,12 +143,16 @@ REA nécessite Node.js 22.x (>=22.19), 24.x (>=24.11) ou 26+, ainsi que npm. Les | JavaScript / Electron | Modules, imports, source maps, routes, IPC et relations avec les modules natifs | Node.js et npm ; [analyse d'applications](https://rea.tools/fr/guides/javascript/) | | Sites web | Structure des pages, scripts, observations réseau et captures d'écran demandées | Un navigateur de la famille Chrome ; [analyse du navigateur](https://rea.tools/fr/guides/browser/) | | Captures réseau enregistrées | Requêtes, réponses, payloads exposés et emplacements dans le code source | HAR ; mitmdump sous Linux pour les captures mitmproxy natives ; [guide des captures](docs/web-network-captures.md) | +| Captures de paquets | Points de terminaison, DNS, TLS SNI, distribution des protocoles et requêtes HTTP | tshark et capinfos fournis par l'appelant ; [guide pcap](docs/pcap-analysis.md) | | Assemblys .NET | Métadonnées, instructions CIL, dépendances natives déclarées et comparaisons de builds | Inspection statique ; [guide du code managé](docs/managed-code-analysis.md) | | APK Android | Déclarations du manifeste, classes, méthodes décompilées et références | JADX headless et un JDK complet sous Linux/macOS/Windows x64 ; [guide Android](docs/android-analysis.md) | | Appareils Android | Appareils, paquets, processus, journaux, dumps, captures d'écran et transferts d'APK/fichiers | adb fourni par l'appelant (émulateur ou appareil) ; [guide ADB](docs/adb-device-analysis.md) | | Projets JEB | Unités de projet fournies par le moteur, condensés d'artefacts et pseudo-code de types/méthodes | Un client JEB démarré par l'appelant servant MCP, sélectionné via REA_JEB_MCP_URL ; [guide JEB](docs/jeb-analysis.md) | | Ressources Android | Manifeste décodé, tables de chaînes, langues et faits de version | Lanceur Apktool fourni par l'appelant ; [guide des ressources](docs/apktool-resource-analysis.md) | +| Applications Flutter | Empreinte de snapshot Dart, condensés de bibliothèques par ABI et provenance de build du moteur | Aucune (analyse APK statique) ; [guide Flutter](docs/flutter-analysis.md) | | Firmware | Régions, résultats d'extraction et passage de relais vers l'analyse native | Binwalk / Unblob sous Linux ; [guide firmware](docs/firmware-analysis.md) | +| Paquets enregistrés | Champs sélectionnés, valeurs répétées, filtres et règles de décodage | Linux: TShark 4.x + prlimit; [guide des captures](docs/packet-captures.md) | +| Signaux logiques enregistrés | Annotations du décodeur, plages d’échantillons et diagnostics | Linux: sigrok-cli 0.7.2 + prlimit; [guide des signaux](docs/signal-recordings.md) | | Paquets et ressources | Inventaires de fichiers, empreintes, plists, anatomie des bundles Apple et ressources extraites | [Guide artefacts et JavaScript](docs/javascript-artifact-reconstruction.md), [applications Apple](docs/apple-application-analysis.md) | | Comportement des processus | Sortie du terminal, interactions, code de sortie, observations du système de fichiers et comparaisons | Linux/macOS avec un PTY natif ; [capture de processus](docs/process-capture.md) | @@ -262,7 +266,7 @@ Signalez les vulnérabilités via [SECURITY.md](SECURITY.md). ## Historique des étoiles -🎉 **110 000 étoiles GitHub — merci !** +🎉 **170 000 étoiles GitHub — merci !** Merci à toutes les personnes qui utilisent REA, signalent des bugs, proposent des fonctionnalités, testent les builds et contribuent des correctifs. @@ -276,7 +280,13 @@ Merci à toutes les personnes qui utilisent REA, signalent des bugs, proposent d ## Avertissement -REA fournit des outils destinés à la recherche, à l'analyse et à la reconstruction légales en rétro-ingénierie. Il vous appartient d'obtenir toute autorisation nécessaire et de respecter les lois applicables. Le projet n'encourage aucune utilisation illégale ou non autorisée. +Consultez [DISCLAIMER.md](DISCLAIMER.md) pour les consignes d'utilisation responsable. + +REA est destiné à la recherche, à l’éducation, à l’interopérabilité, à la préservation logicielle et à l’analyse de logiciels que vous possédez ou êtes autorisé à examiner, dans le respect de la loi. + +The project's position on illegal or unauthorized use covers all REA +versions, distribution channels, and platforms; each copy retains its +applicable licenses. ## Contribuer @@ -287,3 +297,15 @@ Consultez [CONTRIBUTING.md](CONTRIBUTING.md) pour l'environnement de développem ## Licence [MIT](LICENSE) + +REA-authored code is licensed under MIT. Third-party material retains its own +licenses and copyright notices; see [Third-party notices](THIRD_PARTY_NOTICES.md) +for the dependency inventory, preserved license texts, and external-tool terms. + +**You must legally obtain and be authorized to use commercial tools**, including +IDA Pro / Hex-Rays decompilers, Hopper, and JEB, under their applicable licenses. +REA grants no tool license, key, or activation entitlement. Trials and demos +remain subject to vendor terms, including user, feature, automation, and output +sharing restrictions. Cracked copies, stolen keys, unauthorized key sharing, +and bypassing license restrictions are not authorized. This guidance does not +amend MIT or third-party licenses. diff --git a/README_id.md b/README_id.md index 1976c7e76..7a564c434 100644 --- a/README_id.md +++ b/README_id.md @@ -146,12 +146,16 @@ Alat tambahan dan dukungan sistem host bergantung pada target yang dianalisis: | JavaScript / Electron | Modul, impor, source map, rute, IPC, dan hubungan add-on native | Node.js dan npm; [analisis aplikasi](https://rea.tools/id/guides/javascript/) | | Situs web | Struktur halaman, skrip, pengamatan jaringan, dan tangkapan layar yang diminta | Peramban berbasis Chrome; [analisis peramban](https://rea.tools/id/guides/browser/) | | Rekaman jaringan tersimpan | Permintaan, respons, payload yang terekspos, dan lokasi sumber | HAR; mitmdump di Linux untuk rekaman native mitmproxy; [panduan rekaman](docs/web-network-captures.md) | +| Capturan paket | Endpoint, DNS, TLS SNI, distribusi protokol, dan permintaan HTTP | tshark dan capinfos buatan pemanggil; [panduan pcap](docs/pcap-analysis.md) | | Assembly .NET | Metadata, instruksi CIL, dependensi native yang dideklarasikan, dan perbandingan build | Tidak ada (hanya analisis statis); [panduan kode terkelola](docs/managed-code-analysis.md) | | APK Android | Deklarasi manifest, kelas, metode hasil dekompilasi, dan referensi | JADX mode headless dan JDK lengkap di Linux/macOS/Windows x64; [panduan Android](docs/android-analysis.md) | | Perangkat Android | Perangkat, paket, proses, log, dump, tangkapan layar, serta transfer APK/berkas | adb buatan pemanggil (emulator atau perangkat); [panduan ADB](docs/adb-device-analysis.md) | | Proyek JEB | Unit proyek bertenaga mesin, hash artefak, dan pseudokode tipe/metode | Klien JEB yang dijalankan pemanggil dan menyajikan MCP, dipilih dengan REA_JEB_MCP_URL; [panduan JEB](docs/jeb-analysis.md) | | Resource Android | Manifest terdekode, tabel string, lokal, dan fakta versi | Peluncur Apktool buatan pemanggil; [panduan resource](docs/apktool-resource-analysis.md) | +| Aplikasi Flutter | Hash snapshot Dart, hash pustaka per ABI, dan asal build engine | Tidak ada (parsing APK statis); [panduan Flutter](docs/flutter-analysis.md) | | Firmware | Wilayah, hasil ekstraksi, dan pengalihan ke analisis native | Binwalk / Unblob di Linux; [panduan firmware](docs/firmware-analysis.md) | +| Paket rekaman | Kolom terpilih, nilai berulang, filter, dan aturan decode-as | Linux: TShark 4.x + prlimit; [panduan tangkapan](docs/packet-captures.md) | +| Sinyal logika terekam | Anotasi dekoder, rentang sampel, dan diagnostik | Linux: sigrok-cli 0.7.2 + prlimit; [panduan sinyal](docs/signal-recordings.md) | | Paket dan sumber daya | Inventaris berkas, digest, plist, struktur paket Apple, dan sumber daya yang diekstrak | [Panduan artefak dan JavaScript](docs/javascript-artifact-reconstruction.md), [aplikasi Apple](docs/apple-application-analysis.md) | | Perilaku proses | Keluaran terminal, interaksi, pengamatan proses keluar dan sistem berkas, serta perbandingan eksekusi | Linux/macOS dengan PTY native; [perekaman proses](docs/process-capture.md) | @@ -283,7 +287,7 @@ Laporkan kerentanan melalui [SECURITY.md](SECURITY.md). ## Riwayat Bintang -🎉 **110.000 bintang GitHub, terima kasih!** +🎉 **170.000 bintang GitHub, terima kasih!** Terima kasih kepada semua orang yang menggunakan REA, melaporkan bug, meminta fitur, menguji build, dan berkontribusi dalam perbaikan. @@ -297,9 +301,13 @@ Terima kasih kepada semua orang yang menggunakan REA, melaporkan bug, meminta fi ## Penafian -REA menyediakan alat untuk penelitian, analisis, dan rekonstruksi rekayasa balik yang sah. Anda bertanggung jawab untuk memperoleh otorisasi yang diperlukan dan mematuhi hukum yang berlaku. Proyek ini tidak mendukung penggunaan ilegal atau tanpa izin. +Lihat [DISCLAIMER.md](DISCLAIMER.md) untuk panduan penggunaan yang bertanggung jawab. -REA adalah proyek perangkat lunak sumber terbuka. Kami tidak menerbitkan atau mendukung mata uang kripto maupun token apa pun. Token yang menggunakan nama REA tidak berafiliasi dengan proyek ini. +REA ditujukan untuk penelitian, pendidikan, interoperabilitas, pelestarian perangkat lunak, dan analisis perangkat lunak yang Anda miliki atau diizinkan untuk Anda periksa, sesuai hukum. + +The project's position on illegal or unauthorized use covers all REA +versions, distribution channels, and platforms; each copy retains its +applicable licenses. ## Kontribusi @@ -310,3 +318,15 @@ Lihat [CONTRIBUTING.md](CONTRIBUTING.md) untuk penyiapan pengembangan dan pemeri ## Lisensi [MIT](LICENSE) + +REA-authored code is licensed under MIT. Third-party material retains its own +licenses and copyright notices; see [Third-party notices](THIRD_PARTY_NOTICES.md) +for the dependency inventory, preserved license texts, and external-tool terms. + +**You must legally obtain and be authorized to use commercial tools**, including +IDA Pro / Hex-Rays decompilers, Hopper, and JEB, under their applicable licenses. +REA grants no tool license, key, or activation entitlement. Trials and demos +remain subject to vendor terms, including user, feature, automation, and output +sharing restrictions. Cracked copies, stolen keys, unauthorized key sharing, +and bypassing license restrictions are not authorized. This guidance does not +amend MIT or third-party licenses. diff --git a/README_it.md b/README_it.md index e472d0c81..8b1c55afe 100644 --- a/README_it.md +++ b/README_it.md @@ -143,12 +143,16 @@ REA richiede Node.js 22.x (>=22.19), 24.x (>=24.11) o 26+, oltre a npm. Strument | JavaScript / Electron | Moduli, import, source map, route, IPC e relazioni con add-on nativi | Node.js e npm; [analisi delle applicazioni](https://rea.tools/it/guides/javascript/) | | Siti web | Struttura della pagina, script, osservazioni di rete e screenshot richiesti | Un browser della famiglia Chrome; [analisi browser](https://rea.tools/it/guides/browser/) | | Acquisizioni di rete salvate | Richieste, risposte, payload esposti e posizioni sorgente | HAR; mitmdump su Linux per acquisizioni mitmproxy native; [guida alle acquisizioni](docs/web-network-captures.md) | +| Captured di pacchetti | Endpoint, DNS, TLS SNI, distribuzione dei protocolli e richieste HTTP | tshark e capinfos forniti dal chiamante; [guida pcap](docs/pcap-analysis.md) | | Assembly .NET | Metadati, istruzioni CIL, dipendenze native dichiarate e confronti di build | Nessuno (solo statico); [guida managed-code](docs/managed-code-analysis.md) | | APK Android | Dichiarazioni manifest, classi, metodi decompilati e riferimenti | JADX headless e un JDK completo su Linux/macOS/Windows x64; [guida Android](docs/android-analysis.md) | | Dispositivi Android | Dispositivi, pacchetti, processi, log, dump, screenshot e trasferimenti APK/file | adb fornito dal chiamante (emulatore o hardware); [guida ADB](docs/adb-device-analysis.md) | | Progetti JEB | Unità di progetto dal motore, digest degli artifact e pseudocodice di tipi/metodi | Client JEB avviato dal chiamante via MCP, selezionato con REA_JEB_MCP_URL; [guida JEB](docs/jeb-analysis.md) | | Risorse Android | Manifest decodificato, tabelle stringhe, lingue e dati di versione | Launcher Apktool fornito dal chiamante; [guida alle risorse](docs/apktool-resource-analysis.md) | +| App Flutter | Hash dello snapshot Dart, digest delle librerie per ABI e provenienza della build del motore | Nessuno (analisi APK statica); [guida Flutter](docs/flutter-analysis.md) | | Firmware | Regioni, risultati di estrazione e passaggi all'analisi nativa | Binwalk / Unblob su Linux; [guida firmware](docs/firmware-analysis.md) | +| Pacchetti registrati | Campi selezionati, valori ripetuti, filtri e regole di decodifica | Linux: TShark 4.x + prlimit; [guida alle catture](docs/packet-captures.md) | +| Segnali logici registrati | Annotazioni del decoder, intervalli di campioni e diagnostica | Linux: sigrok-cli 0.7.2 + prlimit; [guida ai segnali](docs/signal-recordings.md) | | Pacchetti e risorse | Inventari file, digest, plist, anatomia dei bundle Apple e risorse estratte | [Guida artifact e JavaScript](docs/javascript-artifact-reconstruction.md), [Applicazioni Apple](docs/apple-application-analysis.md) | | Comportamento dei processi | Output del terminale, interazioni, osservazioni su uscita e filesystem ed confronti di esecuzione | Linux/macOS con un PTY nativo; [cattura dei processi](docs/process-capture.md) | @@ -262,7 +266,7 @@ Segnala vulnerabilità tramite [SECURITY.md](SECURITY.md). ## Cronologia delle stelle -🎉 **110.000 stelle su GitHub — grazie!** +🎉 **170.000 stelle su GitHub — grazie!** Grazie a tutti coloro che usano REA, segnalano bug, propongono funzionalità, testano le build e contribuiscono con correzioni. @@ -276,9 +280,13 @@ Grazie a tutti coloro che usano REA, segnalano bug, propongono funzionalità, te ## Disclaimer -REA fornisce strumenti per la ricerca, l'analisi e la ricostruzione di ingegneria inversa lecita. Sei responsabile di ottenere le eventuali autorizzazioni richieste e di rispettare le leggi applicabili. Il progetto non approva l'uso illegale o non autorizzato. +Consulta [DISCLAIMER.md](DISCLAIMER.md) per le indicazioni sull'uso responsabile. -REA è un progetto software open-source. Non abbiamo emesso né approvato alcuna criptovaluta o token. I token che usano il nome REA non sono affiliati al progetto. +REA è destinato alla ricerca, alla formazione, all’interoperabilità, alla conservazione del software e all’analisi di software di tua proprietà o che sei autorizzato a esaminare, nel rispetto della legge. + +The project's position on illegal or unauthorized use covers all REA +versions, distribution channels, and platforms; each copy retains its +applicable licenses. ## Contributing @@ -289,3 +297,15 @@ Vedi [CONTRIBUTING.md](CONTRIBUTING.md) per la configurazione di sviluppo e i co ## License [MIT](LICENSE) + +REA-authored code is licensed under MIT. Third-party material retains its own +licenses and copyright notices; see [Third-party notices](THIRD_PARTY_NOTICES.md) +for the dependency inventory, preserved license texts, and external-tool terms. + +**You must legally obtain and be authorized to use commercial tools**, including +IDA Pro / Hex-Rays decompilers, Hopper, and JEB, under their applicable licenses. +REA grants no tool license, key, or activation entitlement. Trials and demos +remain subject to vendor terms, including user, feature, automation, and output +sharing restrictions. Cracked copies, stolen keys, unauthorized key sharing, +and bypassing license restrictions are not authorized. This guidance does not +amend MIT or third-party licenses. diff --git a/README_ja.md b/README_ja.md index 51c997038..5fb42d096 100644 --- a/README_ja.md +++ b/README_ja.md @@ -139,12 +139,16 @@ REA には Node.js 22.x(>=22.19)、24.x(>=24.11)、または 26+ と npm | JavaScript / Electron | モジュール、インポート、ソースマップ、ルート、IPC、ネイティブアドオンの関係 | Node.js と npm;[アプリケーション分析](https://rea.tools/ja/guides/javascript/) | | ウェブサイト | ページ構造、スクリプト、ネットワークの観測結果、依頼されたスクリーンショット | Chrome 系ブラウザー;[ブラウザー分析](https://rea.tools/ja/guides/browser/) | | 保存済みのネットワークキャプチャ | リクエスト、レスポンス、取得可能なペイロード、ソース内の位置 | HAR;mitmproxy ネイティブ形式のキャプチャには Linux 上の mitmdump;[キャプチャガイド](docs/web-network-captures.md) | +| パケットキャプチャ | エンドポイント、DNS、TLS SNI、プロトコル分布、HTTPリクエスト | 呼び出し側が用意した tshark と capinfos;[pcapガイド](docs/pcap-analysis.md) | | .NET アセンブリ | メタデータ、CIL 命令、宣言されたネイティブ依存関係、ビルドの比較 | 静的な検査;[マネージドコードのガイド](docs/managed-code-analysis.md) | | Android APK | マニフェストの宣言、クラス、逆コンパイルされたメソッド、参照 | Linux/macOS/Windows x64 上のヘッドレス JADX と完全な JDK;[Android ガイド](docs/android-analysis.md) | | Android デバイス | デバイス、パッケージ、プロセス、ログ、ダンプ、スクリーンキャプチャ、APK/ファイル転送 | 呼び出し側が用意した adb(エミュレーターまたは実機);[ADB ガイド](docs/adb-device-analysis.md) | | JEBプロジェクト | エンジンによるプロジェクトユニット、アーティファクトのダイジェスト、型/メソッドの擬似コード | 呼び出し側が起動し MCP を提供する JEB クライアント(REA_JEB_MCP_URL で選択);[JEB ガイド](docs/jeb-analysis.md) | | Android リソース | デコードされたマニフェスト、文字列テーブル、ロケール、バージョン情報 | 呼び出し側が用意した Apktool ランチャー;[リソースガイド](docs/apktool-resource-analysis.md) | +| Flutter アプリ | Dart スナップショットハッシュ、ABI ごとのライブラリダイジェスト、エンジンビルドの来歴 | 不要(静的 APK 解析);[Flutter ガイド](docs/flutter-analysis.md) | | ファームウェア | 領域、抽出結果、ネイティブ分析への引き継ぎ | Linux 上の Binwalk / Unblob;[ファームウェアガイド](docs/firmware-analysis.md) | +| 記録済みパケット | 選択フィールド、繰り返し値、フィルター、デコード指定 | Linux: TShark 4.x + prlimit; [キャプチャガイド](docs/packet-captures.md) | +| 記録済みロジック信号 | デコーダ注釈、サンプル範囲、診断情報 | Linux: sigrok-cli 0.7.2 + prlimit; [信号記録ガイド](docs/signal-recordings.md) | | パッケージとリソース | ファイル一覧、ダイジェスト、plist、Apple バンドルの構造、抽出されたリソース | [アーティファクトと JavaScript のガイド](docs/javascript-artifact-reconstruction.md)、[Apple アプリケーション](docs/apple-application-analysis.md) | | プロセスの動作 | ターミナル出力、対話、終了とファイルシステムの観測結果、実行の比較 | ネイティブ PTY を備えた Linux/macOS;[プロセスキャプチャ](docs/process-capture.md) | @@ -260,7 +264,7 @@ npx rea-agents@latest setup ## スター履歴 -🎉 **GitHub スター 110,000 件、ありがとうございます!** +🎉 **GitHub スター 170,000 件、ありがとうございます!** REA の利用、バグ報告、機能の要望、ビルドのテスト、修正への貢献に感謝します。 @@ -274,7 +278,13 @@ REA の利用、バグ報告、機能の要望、ビルドのテスト、修正 ## 免責事項 -REA は、合法的なリバースエンジニアリングの研究、分析、再構築のためのツールを提供します。必要な許可を得て、適用される法律に従う責任は利用者にあります。このプロジェクトは違法または無許可の利用を支持しません。 +責任ある利用については [DISCLAIMER.md](DISCLAIMER.md) を参照してください。 + +REA は、法令に従った研究、教育、相互運用性の確保、ソフトウェアの保存、および所有するソフトウェアや調査を許可されたソフトウェアの解析を目的としています。 + +The project's position on illegal or unauthorized use covers all REA +versions, distribution channels, and platforms; each copy retains its +applicable licenses. ## 貢献する @@ -285,3 +295,15 @@ REA への貢献を歓迎します![issue を作成](https://github.com/morlut ## ライセンス [MIT](LICENSE) + +REA-authored code is licensed under MIT. Third-party material retains its own +licenses and copyright notices; see [Third-party notices](THIRD_PARTY_NOTICES.md) +for the dependency inventory, preserved license texts, and external-tool terms. + +**You must legally obtain and be authorized to use commercial tools**, including +IDA Pro / Hex-Rays decompilers, Hopper, and JEB, under their applicable licenses. +REA grants no tool license, key, or activation entitlement. Trials and demos +remain subject to vendor terms, including user, feature, automation, and output +sharing restrictions. Cracked copies, stolen keys, unauthorized key sharing, +and bypassing license restrictions are not authorized. This guidance does not +amend MIT or third-party licenses. diff --git a/README_ko.md b/README_ko.md index 0cad1695c..5a9e7cd5d 100644 --- a/README_ko.md +++ b/README_ko.md @@ -139,12 +139,16 @@ REA에는 Node.js 22.x(>=22.19), 24.x(>=24.11) 또는 26+와 npm이 필요합니 | JavaScript / Electron | 모듈, 임포트, 소스 맵, 라우트, IPC, 네이티브 애드온 관계 | Node.js와 npm; [애플리케이션 분석](https://rea.tools/ko/guides/javascript/) | | 웹사이트 | 페이지 구조, 스크립트, 네트워크 관찰 결과, 요청한 스크린샷 | Chrome 계열 브라우저; [브라우저 분석](https://rea.tools/ko/guides/browser/) | | 저장된 네트워크 캡처 | 요청, 응답, 접근 가능한 페이로드, 소스 위치 | HAR; mitmproxy 네이티브 캡처에는 Linux의 mitmdump; [캡처 가이드](docs/web-network-captures.md) | +| 패킷 캡처 | 엔드포인트, DNS, TLS SNI, 프로토콜 분포, HTTP 요청 | 호출자 제공 tshark 및 capinfos; [pcap 가이드](docs/pcap-analysis.md) | | .NET 어셈블리 | 메타데이터, CIL 명령, 선언된 네이티브 의존성, 빌드 비교 | 정적 검사; [관리 코드 가이드](docs/managed-code-analysis.md) | | Android APK | 매니페스트 선언, 클래스, 디컴파일된 메서드, 참조 | Linux/macOS/Windows x64의 헤드리스 JADX와 전체 JDK; [Android 가이드](docs/android-analysis.md) | | Android 기기 | 기기, 패키지, 프로세스, 로그, 덤프, 화면 캡처, APK/파일 전송 | 호출자 제공 adb(에뮬레이터 또는 실제 기기); [ADB 가이드](docs/adb-device-analysis.md) | | JEB 프로젝트 | 엔진 기반 프로젝트 유닛, 아티팩트 해시, 타입/메서드 의사코드 | 호출자가 시작하고 MCP를 제공하는 JEB 클라이언트(REA_JEB_MCP_URL로 선택); [JEB 가이드](docs/jeb-analysis.md) | | Android 리소스 | 디코딩된 매니페스트, 문자열 테이블, 로캘, 버전 정보 | 호출자 제공 Apktool 런처; [리소스 가이드](docs/apktool-resource-analysis.md) | +| Flutter 앱 | Dart 스냅샷 해시, ABI별 라이브러리 해시, 엔진 빌드 출처 | 없음 (정적 APK 파싱); [Flutter 가이드](docs/flutter-analysis.md) | | 펌웨어 | 영역, 추출 결과, 네이티브 분석으로 전달할 정보 | Linux의 Binwalk / Unblob; [펌웨어 가이드](docs/firmware-analysis.md) | +| 기록된 패킷 | 선택 필드, 반복 값, 필터 및 디코딩 규칙 | Linux: TShark 4.x + prlimit; [캡처 가이드](docs/packet-captures.md) | +| 기록된 논리 신호 | 디코더 주석, 샘플 범위, 진단 정보 | Linux: sigrok-cli 0.7.2 + prlimit; [신호 기록 가이드](docs/signal-recordings.md) | | 패키지 및 리소스 | 파일 목록, 다이제스트, plist, Apple 번들 구조, 추출한 리소스 | [아티팩트 및 JavaScript 가이드](docs/javascript-artifact-reconstruction.md), [Apple 애플리케이션](docs/apple-application-analysis.md) | | 프로세스 동작 | 터미널 출력, 상호작용, 종료 및 파일 시스템 관찰 결과, 실행 비교 | 네이티브 PTY를 지원하는 Linux/macOS; [프로세스 캡처](docs/process-capture.md) | @@ -260,7 +264,7 @@ npx rea-agents@latest setup ## 스타 기록 -🎉 **GitHub 스타 110,000개, 감사합니다!** +🎉 **GitHub 스타 170,000개, 감사합니다!** REA를 사용하고, 버그를 보고하고, 기능을 요청하고, 빌드를 테스트하고, 수정에 기여해 주신 모든 분께 감사드립니다. @@ -274,7 +278,13 @@ REA를 사용하고, 버그를 보고하고, 기능을 요청하고, 빌드를 ## 면책 조항 -REA는 합법적인 리버스 엔지니어링 연구, 분석, 재구성을 위한 도구를 제공합니다. 필요한 권한을 얻고 관련 법률을 준수할 책임은 사용자에게 있습니다. 이 프로젝트는 불법적이거나 허가받지 않은 사용을 지지하지 않습니다. +책임 있는 사용에 관한 안내는 [DISCLAIMER.md](DISCLAIMER.md)를 참고하세요. + +REA는 법을 준수하는 연구, 교육, 상호운용성 확보, 소프트웨어 보존, 그리고 본인이 소유하거나 조사 권한을 가진 소프트웨어의 분석을 위한 도구입니다. + +The project's position on illegal or unauthorized use covers all REA +versions, distribution channels, and platforms; each copy retains its +applicable licenses. ## 기여 @@ -285,3 +295,15 @@ REA에 도움을 보태 주세요! [issue를 등록](https://github.com/morluto/ ## 라이선스 [MIT](LICENSE) + +REA-authored code is licensed under MIT. Third-party material retains its own +licenses and copyright notices; see [Third-party notices](THIRD_PARTY_NOTICES.md) +for the dependency inventory, preserved license texts, and external-tool terms. + +**You must legally obtain and be authorized to use commercial tools**, including +IDA Pro / Hex-Rays decompilers, Hopper, and JEB, under their applicable licenses. +REA grants no tool license, key, or activation entitlement. Trials and demos +remain subject to vendor terms, including user, feature, automation, and output +sharing restrictions. Cracked copies, stolen keys, unauthorized key sharing, +and bypassing license restrictions are not authorized. This guidance does not +amend MIT or third-party licenses. diff --git a/README_pl.md b/README_pl.md index 68600ace3..c54af50fe 100644 --- a/README_pl.md +++ b/README_pl.md @@ -139,12 +139,16 @@ REA wymaga Node.js 22.x (>=22.19), 24.x (>=24.11) lub 26+ oraz npm. Dodatkowe na | JavaScript / Electron | Moduły, importy, mapy źródeł, trasy, IPC i powiązania z natywnymi dodatkami | Node.js i npm; [analiza aplikacji](https://rea.tools/pl/guides/javascript/) | | Strony internetowe | Struktura strony, skrypty, obserwacje sieciowe i zamówione zrzuty ekranu | Przeglądarka z rodziny Chrome; [analiza w przeglądarce](https://rea.tools/pl/guides/browser/) | | Zapisane przechwycenia ruchu sieciowego | Żądania, odpowiedzi, dostępne dane przesyłane i lokalizacje źródłowe | HAR; mitmdump w systemie Linux dla natywnych przechwyceń mitmproxy; [przewodnik przechwytywania](docs/web-network-captures.md) | +| Przechwytywanie pakietów | Punkty końcowe, DNS, TLS SNI, dystrybucja protokołów i żądania HTTP | Dostarczone przez wywołującego tshark i capinfos; [przewodnik pcap](docs/pcap-analysis.md) | | Zestawy .NET | Metadane, instrukcje CIL, zadeklarowane zależności natywne i porównania kompilacji | Analiza statyczna; [przewodnik kodu zarządzanego](docs/managed-code-analysis.md) | | Pakiety APK dla Androida | Deklaracje manifestu, klasy, zdekompilowane metody i odwołania | JADX bez interfejsu graficznego i pełny JDK w systemach Linux/macOS/Windows x64; [przewodnik Androida](docs/android-analysis.md) | | Urządzenia z Androidem | Urządzenia, pakiety, procesy, logi, zrzuty, zrzuty ekranu oraz transfery APK/plików | adb dostarczony przez wywołującego (emulator lub urządzenie); [przewodnik ADB](docs/adb-device-analysis.md) | | Projekty JEB | Jednostki projektu obsługiwane przez silnik, skróty artefaktów i pseudokod typów/metod | Uruchomiony przez wywołującego klient JEB udostępniający MCP, wybrany przez REA_JEB_MCP_URL; [przewodnik JEB](docs/jeb-analysis.md) | | Zasoby Androida | Zdekodowany manifest, tablice ciągów, języki i informacje o wersji | Należący do wywołującego launcher Apktool; [przewodnik zasobów](docs/apktool-resource-analysis.md) | +| Aplikacje Flutter | Hash migawki Dart, sumy bibliotek per ABI i pochodzenie kompilacji silnika | Brak (statyczna analiza APK); [przewodnik Flutter](docs/flutter-analysis.md) | | Oprogramowanie układowe | Regiony, wyniki wyodrębniania i przekazanie do analizy kodu natywnego | Binwalk / Unblob w systemie Linux; [przewodnik oprogramowania układowego](docs/firmware-analysis.md) | +| Zapisane pakiety | Wybrane pola, powtarzane wartości, filtry i reguły dekodowania | Linux: TShark 4.x + prlimit; [przewodnik po przechwyconych pakietach](docs/packet-captures.md) | +| Zapisane sygnały logiczne | Adnotacje dekodera, zakresy próbek i diagnostyka | Linux: sigrok-cli 0.7.2 + prlimit; [przewodnik po sygnałach](docs/signal-recordings.md) | | Pakiety i zasoby | Spisy plików, skróty, pliki plist, struktura pakietów Apple i wyodrębnione zasoby | [Przewodnik artefaktów i JavaScript](docs/javascript-artifact-reconstruction.md), [aplikacje Apple](docs/apple-application-analysis.md) | | Zachowanie procesów | Wyjście terminala, interakcje, obserwacje zakończenia i systemu plików oraz porównania uruchomień | Linux/macOS z natywnym PTY; [przechwytywanie procesów](docs/process-capture.md) | @@ -258,7 +262,7 @@ Zgłaszaj podatności zgodnie z [SECURITY.md](SECURITY.md). ## Historia gwiazdek -🎉 **110 000 gwiazdek na GitHubie — dziękujemy!** +🎉 **170 000 gwiazdek na GitHubie — dziękujemy!** Dziękujemy wszystkim, którzy używają REA, zgłaszają błędy, proponują nowe funkcje, testują kompilacje i przesyłają poprawki. @@ -272,7 +276,13 @@ Dziękujemy wszystkim, którzy używają REA, zgłaszają błędy, proponują no ## Zastrzeżenie -REA dostarcza narzędzia do zgodnych z prawem badań z zakresu inżynierii wstecznej, analizy i odtwarzania. Odpowiadasz za uzyskanie wymaganych zezwoleń i przestrzeganie obowiązującego prawa. Projekt nie popiera działań nielegalnych ani nieautoryzowanych. +Wskazówki dotyczące odpowiedzialnego korzystania znajdziesz w [DISCLAIMER.md](DISCLAIMER.md). + +REA służy zgodnym z prawem badaniom, edukacji, zapewnianiu interoperacyjności, zachowaniu oprogramowania oraz analizie oprogramowania, które posiadasz lub masz prawo badać. + +The project's position on illegal or unauthorized use covers all REA +versions, distribution channels, and platforms; each copy retains its +applicable licenses. ## Współtworzenie @@ -283,3 +293,15 @@ Zobacz [CONTRIBUTING.md](CONTRIBUTING.md), aby poznać konfigurację środowiska ## Licencja [MIT](LICENSE) + +REA-authored code is licensed under MIT. Third-party material retains its own +licenses and copyright notices; see [Third-party notices](THIRD_PARTY_NOTICES.md) +for the dependency inventory, preserved license texts, and external-tool terms. + +**You must legally obtain and be authorized to use commercial tools**, including +IDA Pro / Hex-Rays decompilers, Hopper, and JEB, under their applicable licenses. +REA grants no tool license, key, or activation entitlement. Trials and demos +remain subject to vendor terms, including user, feature, automation, and output +sharing restrictions. Cracked copies, stolen keys, unauthorized key sharing, +and bypassing license restrictions are not authorized. This guidance does not +amend MIT or third-party licenses. diff --git a/README_pt-BR.md b/README_pt-BR.md index 7923100ba..dd138f7ff 100644 --- a/README_pt-BR.md +++ b/README_pt-BR.md @@ -139,12 +139,16 @@ O REA requer Node.js 22.x (>=22.19), 24.x (>=24.11) ou 26+, além do npm. As fer | JavaScript / Electron | Módulos, importações, source maps, rotas, IPC e relações com complementos nativos | Node.js e npm; [análise de aplicativos](https://rea.tools/pt-BR/guides/javascript/) | | Sites | Estrutura da página, scripts, observações de rede e capturas de tela solicitadas | Um navegador da família Chrome; [análise do navegador](https://rea.tools/pt-BR/guides/browser/) | | Capturas de rede salvas | Requisições, respostas, payloads acessíveis e localizações de origem | HAR; mitmdump no Linux para capturas no formato nativo do mitmproxy; [guia de capturas](docs/web-network-captures.md) | +| Capturas de pacotes | Endpoints, DNS, TLS SNI, distribuição de protocolos e requisições HTTP | tshark e capinfos fornecidos pelo chamador; [guia pcap](docs/pcap-analysis.md) | | Assemblies .NET | Metadados, instruções CIL, dependências nativas declaradas e comparações de builds | Inspeção estática; [guia de código gerenciado](docs/managed-code-analysis.md) | | APKs Android | Declarações do manifesto, classes, métodos descompilados e referências | JADX sem interface gráfica e um JDK completo no Linux/macOS/Windows x64; [guia de Android](docs/android-analysis.md) | | Dispositivos Android | Dispositivos, pacotes, processos, logs, despejos, capturas de tela e transferências de APK/arquivos | adb fornecido pelo chamador (emulador ou aparelho); [guia de ADB](docs/adb-device-analysis.md) | | Projetos JEB | Unidades de projeto do motor, hashes de artefatos e pseudocódigo de tipos/métodos | Um cliente JEB iniciado pelo chamador servindo MCP, selecionado com REA_JEB_MCP_URL; [guia de JEB](docs/jeb-analysis.md) | | Recursos do Android | Manifesto decodificado, tabelas de strings, idiomas e fatos de versão | Lançador do Apktool fornecido pelo chamador; [guia de recursos](docs/apktool-resource-analysis.md) | +| Aplicativos Flutter | Hash de snapshot Dart, hashes de bibliotecas por ABI e procedência de build do motor | Nenhuma (análise estática de APK); [guia Flutter](docs/flutter-analysis.md) | | Firmware | Regiões, resultados de extração e encaminhamentos à análise nativa | Binwalk / Unblob no Linux; [guia de firmware](docs/firmware-analysis.md) | +| Pacotes gravados | Campos selecionados, valores repetidos, filtros e regras de decodificação | Linux: TShark 4.x + prlimit; [guia de capturas](docs/packet-captures.md) | +| Sinais lógicos gravados | Anotações do decodificador, intervalos de amostras e diagnósticos | Linux: sigrok-cli 0.7.2 + prlimit; [guia de sinais](docs/signal-recordings.md) | | Pacotes e recursos | Inventários de arquivos, digests, plists, estrutura de bundles Apple e recursos extraídos | [Guia de artefatos e JavaScript](docs/javascript-artifact-reconstruction.md), [aplicativos Apple](docs/apple-application-analysis.md) | | Comportamento de processos | Saída do terminal, interações, observações de encerramento e do sistema de arquivos, e comparações entre execuções | Linux/macOS com PTY nativo; [captura de processos](docs/process-capture.md) | @@ -258,7 +262,7 @@ Relate vulnerabilidades conforme [SECURITY.md](SECURITY.md). ## Histórico de estrelas -🎉 **110.000 estrelas no GitHub — muito obrigado!** +🎉 **170.000 estrelas no GitHub — muito obrigado!** Obrigado a todos que usam o REA, relatam bugs, sugerem funcionalidades, testam builds e contribuem com correções. @@ -272,7 +276,13 @@ Obrigado a todos que usam o REA, relatam bugs, sugerem funcionalidades, testam b ## Aviso legal -O REA fornece ferramentas para pesquisa, análise e reconstrução por engenharia reversa dentro da lei. Você é responsável por obter as autorizações necessárias e cumprir as leis aplicáveis. O projeto não apoia usos ilegais ou não autorizados. +Consulte [DISCLAIMER.md](DISCLAIMER.md) para orientações sobre o uso responsável. + +O REA destina-se à pesquisa, à educação, à interoperabilidade, à preservação de software e à análise de software que você possui ou está autorizado a examinar, dentro da lei. + +The project's position on illegal or unauthorized use covers all REA +versions, distribution channels, and platforms; each copy retains its +applicable licenses. ## Contribuir @@ -283,3 +293,15 @@ Consulte [CONTRIBUTING.md](CONTRIBUTING.md) para configurar o ambiente de desenv ## Licença [MIT](LICENSE) + +REA-authored code is licensed under MIT. Third-party material retains its own +licenses and copyright notices; see [Third-party notices](THIRD_PARTY_NOTICES.md) +for the dependency inventory, preserved license texts, and external-tool terms. + +**You must legally obtain and be authorized to use commercial tools**, including +IDA Pro / Hex-Rays decompilers, Hopper, and JEB, under their applicable licenses. +REA grants no tool license, key, or activation entitlement. Trials and demos +remain subject to vendor terms, including user, feature, automation, and output +sharing restrictions. Cracked copies, stolen keys, unauthorized key sharing, +and bypassing license restrictions are not authorized. This guidance does not +amend MIT or third-party licenses. diff --git a/README_ru.md b/README_ru.md index 5e45f9f33..34e7d3af2 100644 --- a/README_ru.md +++ b/README_ru.md @@ -130,23 +130,27 @@ npx rea-agents@latest setup REA требует Node.js 22.x (>=22.19), 24.x (>=24.11) или 26+, а также npm. Дополнительные инструменты и поддерживаемые системы зависят от цели: -| Цель | Что возвращает REA | Требования и руководство | -| --------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -| Нативные бинарные файлы | Псевдокод, ассемблер, строки, символы, вызовы и ссылки | Hopper, Ghidra или IDA; [нативный анализ](https://rea.tools/ru/guides/native/) | -| Структура ELF без запуска | Секции, сегменты, исходные символы/релокации и возможные механизмы защиты по данным статического анализа | pwntools, предоставленный вызывающей стороной, в Linux x64; [диагностика бинарных файлов](docs/binary-diagnostics.md) | -| Байт-код EVM | Селекторы диспетчеризации, смещения байтов, предполагаемые аргументы и изменяемость состояния | Локальные необработанные байты или шестнадцатеричное представление в Linux x64; [руководство по EVM без запуска](docs/evm-bytecode.md) | -| Записанные сбои Linux | Необработанные записи note, регистры/сигналы каждого записанного потока и необязательные кандидаты сопоставления с памятью | pwntools, предоставленный вызывающей стороной, в Linux x64; необязательные GDB/pwndbg; [записанные сбои](docs/recorded-crashes.md) | -| JavaScript / Electron | Модули, импорты, карты исходного кода, маршруты, IPC и связи с нативными дополнениями | Node.js и npm; [анализ приложений](https://rea.tools/ru/guides/javascript/) | -| Сайты | Структура страницы, скрипты, наблюдения за сетью и запрошенные снимки экрана | Браузер семейства Chrome; [анализ браузера](https://rea.tools/ru/guides/browser/) | -| Сохранённые сетевые захваты | Запросы, ответы, доступные полезные данные и позиции в источнике | HAR; mitmdump в Linux для захватов в собственном формате mitmproxy; [руководство по сетевым захватам](docs/web-network-captures.md) | -| Сборки .NET | Метаданные, инструкции CIL, объявленные нативные зависимости и сравнения сборок | Статическое исследование; [руководство по управляемому коду](docs/managed-code-analysis.md) | -| Android APK | Объявления манифеста, классы, декомпилированные методы и ссылки | JADX без графического интерфейса и полный JDK в Linux/macOS/Windows x64; [руководство по Android](docs/android-analysis.md) | -| Устройства Android | Устройства, пакеты, процессы, журналы, дампы, снимки экрана и передача APK/файлов | adb, предоставленный вызывающей стороной (эмулятор или устройство); [руководство по ADB](docs/adb-device-analysis.md) | -| Проекты JEB | Единицы проекта от движка, дайджесты артефактов и псевдокод типов/методов | Запущенный вызывающей стороной клиент JEB с интерфейсом MCP, выбирается через REA_JEB_MCP_URL; [руководство по JEB](docs/jeb-analysis.md) | -| Ресурсы Android | Декодированный манифест, таблицы строк, языки и сведения о версии | Запуск Apktool, предоставленный вызывающей стороной; [руководство по ресурсам](docs/apktool-resource-analysis.md) | -| Прошивки | Области, результаты извлечения и передача в нативный анализ | Binwalk / Unblob в Linux; [руководство по прошивкам](docs/firmware-analysis.md) | -| Пакеты и ресурсы | Списки файлов, хеши, plist, структура пакетов Apple и извлечённые ресурсы | [Руководство по артефактам и JavaScript](docs/javascript-artifact-reconstruction.md), [приложения Apple](docs/apple-application-analysis.md) | -| Поведение процессов | Вывод терминала, взаимодействия, наблюдения за завершением и файловой системой, сравнения запусков | Linux/macOS с нативным PTY; [захват процессов](docs/process-capture.md) | +| Цель | Что возвращает REA | Требования и руководство | +| ----------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | +| Нативные бинарные файлы | Псевдокод, ассемблер, строки, символы, вызовы и ссылки | Hopper, Ghidra или IDA; [нативный анализ](https://rea.tools/ru/guides/native/) | +| Структура ELF без запуска | Секции, сегменты, исходные символы/релокации и возможные механизмы защиты по данным статического анализа | pwntools, предоставленный вызывающей стороной, в Linux x64; [диагностика бинарных файлов](docs/binary-diagnostics.md) | +| Байт-код EVM | Селекторы диспетчеризации, смещения байтов, предполагаемые аргументы и изменяемость состояния | Локальные необработанные байты или шестнадцатеричное представление в Linux x64; [руководство по EVM без запуска](docs/evm-bytecode.md) | +| Записанные сбои Linux | Необработанные записи note, регистры/сигналы каждого записанного потока и необязательные кандидаты сопоставления с памятью | pwntools, предоставленный вызывающей стороной, в Linux x64; необязательные GDB/pwndbg; [записанные сбои](docs/recorded-crashes.md) | +| JavaScript / Electron | Модули, импорты, карты исходного кода, маршруты, IPC и связи с нативными дополнениями | Node.js и npm; [анализ приложений](https://rea.tools/ru/guides/javascript/) | +| Сайты | Структура страницы, скрипты, наблюдения за сетью и запрошенные снимки экрана | Браузер семейства Chrome; [анализ браузера](https://rea.tools/ru/guides/browser/) | +| Сохранённые сетевые захваты | Запросы, ответы, доступные полезные данные и позиции в источнике | HAR; mitmdump в Linux для захватов в собственном формате mitmproxy; [руководство по сетевым захватам](docs/web-network-captures.md) | +| Сборки .NET | Метаданные, инструкции CIL, объявленные нативные зависимости и сравнения сборок | Статическое исследование; [руководство по управляемому коду](docs/managed-code-analysis.md) | +| Android APK | Объявления манифеста, классы, декомпилированные методы и ссылки | JADX без графического интерфейса и полный JDK в Linux/macOS/Windows x64; [руководство по Android](docs/android-analysis.md) | +| Устройства Android | Устройства, пакеты, процессы, журналы, дампы, снимки экрана и передача APK/файлов | adb, предоставленный вызывающей стороной (эмулятор или устройство); [руководство по ADB](docs/adb-device-analysis.md) | +| Проекты JEB | Единицы проекта от движка, дайджесты артефактов и псевдокод типов/методов | Запущенный вызывающей стороной клиент JEB с интерфейсом MCP, выбирается через REA_JEB_MCP_URL; [руководство по JEB](docs/jeb-analysis.md) | +| Ресурсы Android | Декодированный манифест, таблицы строк, языки и сведения о версии | Запуск Apktool, предоставленный вызывающей стороной; [руководство по ресурсам](docs/apktool-resource-analysis.md) | +| Приложения Flutter | Хеш снапшота Dart, дайджесты библиотек по ABI и происхождение сборки движка | Не требуется (статический разбор APK); [руководство по Flutter](docs/flutter-analysis.md) | +| Прошивки | Области, результаты извлечения и передача в нативный анализ | Binwalk / Unblob в Linux; [руководство по прошивкам](docs/firmware-analysis.md) | +| Записанные пакеты | Выбранные поля, повторяющиеся значения, фильтры и правила декодирования | Linux: TShark 4.x + prlimit; [руководство по захватам](docs/packet-captures.md) | +| Захват пакетов | Конечные точки, DNS, TLS SNI, распределение протоколов и HTTP-запросы | Предоставленные вызывающей стороной tshark и capinfos; [руководство по pcap](docs/pcap-analysis.md) | +| Записанные логические сигналы | Аннотации декодера, диапазоны отсчётов и диагностика | Linux: sigrok-cli 0.7.2 + prlimit; [руководство по сигналам](docs/signal-recordings.md) | +| Пакеты и ресурсы | Списки файлов, хеши, plist, структура пакетов Apple и извлечённые ресурсы | [Руководство по артефактам и JavaScript](docs/javascript-artifact-reconstruction.md), [приложения Apple](docs/apple-application-analysis.md) | +| Поведение процессов | Вывод терминала, взаимодействия, наблюдения за завершением и файловой системой, сравнения запусков | Linux/macOS с нативным PTY; [захват процессов](docs/process-capture.md) | Статическое исследование JavaScript и .NET читает предоставленные файлы, не запуская приложение. Захват во время выполнения запускает выбранную цель или взаимодействует с ней с правами вашего пользователя; соответствующие руководства описывают последствия. @@ -258,7 +262,7 @@ npx rea-agents@latest setup ## История звёзд -🎉 **110 000 звёзд на GitHub — спасибо!** +🎉 **170 000 звёзд на GitHub — спасибо!** Спасибо всем, кто использует REA, сообщает об ошибках, предлагает новые функции, тестирует сборки и помогает с исправлениями. @@ -272,7 +276,13 @@ npx rea-agents@latest setup ## Отказ от ответственности -REA предоставляет инструменты для законных исследований, анализа и реконструкции с помощью реверс-инжиниринга. Вы отвечаете за получение необходимых разрешений и соблюдение применимых законов. Проект не поддерживает незаконное или несанкционированное использование. +Рекомендации по ответственному использованию приведены в [DISCLAIMER.md](DISCLAIMER.md). + +REA предназначен для законных исследований, обучения, обеспечения совместимости, сохранения программного обеспечения и анализа программ, которыми вы владеете или которые вам разрешено изучать. + +The project's position on illegal or unauthorized use covers all REA +versions, distribution channels, and platforms; each copy retains its +applicable licenses. ## Участие в проекте @@ -283,3 +293,15 @@ REA предоставляет инструменты для законных и ## Лицензия [MIT](LICENSE) + +REA-authored code is licensed under MIT. Third-party material retains its own +licenses and copyright notices; see [Third-party notices](THIRD_PARTY_NOTICES.md) +for the dependency inventory, preserved license texts, and external-tool terms. + +**You must legally obtain and be authorized to use commercial tools**, including +IDA Pro / Hex-Rays decompilers, Hopper, and JEB, under their applicable licenses. +REA grants no tool license, key, or activation entitlement. Trials and demos +remain subject to vendor terms, including user, feature, automation, and output +sharing restrictions. Cracked copies, stolen keys, unauthorized key sharing, +and bypassing license restrictions are not authorized. This guidance does not +amend MIT or third-party licenses. diff --git a/README_th.md b/README_th.md index 0c1b22297..d07bbb6a3 100644 --- a/README_th.md +++ b/README_th.md @@ -139,12 +139,16 @@ REA ต้องใช้ Node.js 22.x (>=22.19), 24.x (>=24.11) หรือ 26 | JavaScript / Electron | โมดูล การนำเข้า ซอร์สแมป เส้นทาง IPC และความสัมพันธ์กับส่วนเสริมเนทีฟ | Node.js และ npm; [การวิเคราะห์แอปพลิเคชัน](https://rea.tools/th/guides/javascript/) | | เว็บไซต์ | โครงสร้างหน้า สคริปต์ ข้อมูลเครือข่ายที่สังเกตได้ และภาพหน้าจอที่ร้องขอ | เบราว์เซอร์ในตระกูล Chrome; [การวิเคราะห์ผ่านเบราว์เซอร์](https://rea.tools/th/guides/browser/) | | ข้อมูลเครือข่ายที่บันทึกไว้ | คำขอ คำตอบ เพย์โหลดที่ปรากฏ และตำแหน่งต้นทาง | HAR; mitmdump บน Linux สำหรับข้อมูลที่บันทึกในรูปแบบเนทีฟของ mitmproxy; [คู่มือการบันทึกข้อมูล](docs/web-network-captures.md) | +| การจับแพ็กเก็ต | จุดเชื่อมต่อ, DNS, TLS SNI, การกระจายโปรโตคอล และคำขอ HTTP | tshark และ capinfos ที่ผู้เรียกจัดเตรียม; [คู่มือ pcap](docs/pcap-analysis.md) | | แอสเซมบลี .NET | เมทาดาทา คำสั่ง CIL การพึ่งพาเนทีฟที่ประกาศไว้ และการเปรียบเทียบผลการบิลด์ | การตรวจสอบแบบสถิต; [คู่มือโค้ดแบบจัดการ](docs/managed-code-analysis.md) | | APK ของ Android | การประกาศใน manifest คลาส เมธอดที่ดีคอมไพล์ และการอ้างอิง | JADX แบบไม่มี GUI และ JDK แบบเต็มบน Linux/macOS/Windows x64; [คู่มือ Android](docs/android-analysis.md) | | อุปกรณ์ Android | อุปกรณ์ แพ็กเกจ โพรเซส บันทึก ดัมพ์ ภาพหน้าจอ และการถ่ายโอน APK/ไฟล์ | adb ที่ผู้เรียกจัดเตรียม (โปรแกรมจำลองหรืออุปกรณ์จริง); [คู่มือ ADB](docs/adb-device-analysis.md) | | โปรเจกต์ JEB | หน่วยโปรเจกต์จากเอนจิน, แฮชของอาร์ติแฟกต์ และซูโดโค้ดของไทป์/เมท็อด | ไคลเอนต์ JEB ที่ผู้เรียกเริ่มและให้บริการ MCP เลือกด้วย REA_JEB_MCP_URL; [คู่มือ JEB](docs/jeb-analysis.md) | | ทรัพยากร Android | ไฟล์ manifest ที่ถอดรหัสแล้ว ตารางสตริง ภาษา และข้อมูลเวอร์ชัน | ตัวเรียก Apktool ที่ผู้เรียกจัดเตรียม; [คู่มือทรัพยากร](docs/apktool-resource-analysis.md) | +| แอป Flutter | แฮชสแนปชอต Dart, แฮชไลบรารีราย ABI และที่มาของบิลด์เอนจิน | ไม่ต้อง (วิเคราะห์ APK แบบ static); [คู่มือ Flutter](docs/flutter-analysis.md) | | เฟิร์มแวร์ | พื้นที่ข้อมูล ผลการแตกไฟล์ และการส่งต่อไปวิเคราะห์เนทีฟ | Binwalk / Unblob บน Linux; [คู่มือเฟิร์มแวร์](docs/firmware-analysis.md) | +| แพ็กเก็ตที่บันทึกไว้ | ฟิลด์ที่เลือก ค่าซ้ำ ตัวกรอง และกฎการถอดรหัส | Linux: TShark 4.x + prlimit; [คู่มือไฟล์แคปเจอร์](docs/packet-captures.md) | +| สัญญาณลอจิกที่บันทึกไว้ | คำอธิบายจากตัวถอดรหัส ช่วงตัวอย่าง และข้อมูลวินิจฉัย | Linux: sigrok-cli 0.7.2 + prlimit; [คู่มือสัญญาณ](docs/signal-recordings.md) | | แพ็กเกจและทรัพยากร | รายการไฟล์ ค่าแฮช plist โครงสร้างบันเดิลของ Apple และทรัพยากรที่แตกออกมา | [คู่มืออาร์ติแฟกต์และ JavaScript](docs/javascript-artifact-reconstruction.md), [แอปพลิเคชัน Apple](docs/apple-application-analysis.md) | | พฤติกรรมของโปรเซส | เอาต์พุตเทอร์มินัล การโต้ตอบ ข้อมูลการสิ้นสุดและระบบไฟล์ที่สังเกตได้ และการเปรียบเทียบการรัน | Linux/macOS ที่มี PTY เนทีฟ; [การบันทึกโปรเซส](docs/process-capture.md) | @@ -258,7 +262,7 @@ npx rea-agents@latest setup ## ประวัติดาว -🎉 **110,000 ดาวบน GitHub — ขอบคุณทุกคน!** +🎉 **170,000 ดาวบน GitHub — ขอบคุณทุกคน!** ขอบคุณทุกคนที่ใช้ REA รายงานบั๊ก เสนอฟีเจอร์ ทดสอบบิลด์ และช่วยแก้ไข @@ -272,7 +276,13 @@ npx rea-agents@latest setup ## ข้อสงวนสิทธิ์ -REA มีเครื่องมือสำหรับการวิจัยวิศวกรรมย้อนกลับ การวิเคราะห์ และการสร้างขึ้นใหม่อย่างถูกกฎหมาย คุณมีหน้าที่ขออนุญาตตามที่จำเป็นและปฏิบัติตามกฎหมายที่เกี่ยวข้อง โปรเจกต์นี้ไม่สนับสนุนการใช้งานที่ผิดกฎหมายหรือไม่ได้รับอนุญาต +ดูแนวทางการใช้งานอย่างรับผิดชอบใน [DISCLAIMER.md](DISCLAIMER.md) + +REA มีไว้สำหรับการวิจัย การศึกษา การทำงานร่วมกัน การอนุรักษ์ซอฟต์แวร์ และการวิเคราะห์ซอฟต์แวร์ที่คุณเป็นเจ้าของหรือได้รับอนุญาตให้ตรวจสอบ โดยปฏิบัติตามกฎหมาย + +The project's position on illegal or unauthorized use covers all REA +versions, distribution channels, and platforms; each copy retains its +applicable licenses. ## การมีส่วนร่วม @@ -283,3 +293,15 @@ REA มีเครื่องมือสำหรับการวิจั ## สัญญาอนุญาต [MIT](LICENSE) + +REA-authored code is licensed under MIT. Third-party material retains its own +licenses and copyright notices; see [Third-party notices](THIRD_PARTY_NOTICES.md) +for the dependency inventory, preserved license texts, and external-tool terms. + +**You must legally obtain and be authorized to use commercial tools**, including +IDA Pro / Hex-Rays decompilers, Hopper, and JEB, under their applicable licenses. +REA grants no tool license, key, or activation entitlement. Trials and demos +remain subject to vendor terms, including user, feature, automation, and output +sharing restrictions. Cracked copies, stolen keys, unauthorized key sharing, +and bypassing license restrictions are not authorized. This guidance does not +amend MIT or third-party licenses. diff --git a/README_tr.md b/README_tr.md index c032547c3..1daaaf9d0 100644 --- a/README_tr.md +++ b/README_tr.md @@ -139,12 +139,16 @@ REA; Node.js 22.x (>=22.19), 24.x (>=24.11) veya 26+ ve npm gerektirir. Ek araç | JavaScript / Electron | Modüller, içe aktarmalar, kaynak haritaları, rotalar, IPC ve yerel eklenti ilişkileri | Node.js ve npm; [uygulama analizi](https://rea.tools/tr/guides/javascript/) | | Web siteleri | Sayfa yapısı, betikler, ağ gözlemleri ve istenen ekran görüntüleri | Chrome ailesinden bir tarayıcı; [tarayıcı analizi](https://rea.tools/tr/guides/browser/) | | Kaydedilmiş ağ yakalamaları | İstekler, yanıtlar, erişilebilir yük içerikleri ve kaynak konumları | HAR; mitmproxy'nin kendi biçimindeki yakalamalar için Linux üzerinde mitmdump; [ağ yakalama rehberi](docs/web-network-captures.md) | +| Paket yakalamaları | Uç noktalar, DNS, TLS SNI, protokol dağılımı ve HTTP istekleri | Çağıranın sağladığı tshark ve capinfos; [pcap rehberi](docs/pcap-analysis.md) | | .NET derlemeleri | Meta veriler, CIL talimatları, bildirilmiş yerel bağımlılıklar ve derleme karşılaştırmaları | Statik inceleme; [yönetilen kod rehberi](docs/managed-code-analysis.md) | | Android APK'leri | Manifest bildirimleri, sınıflar, tersine derlenmiş metotlar ve referanslar | Linux/macOS/Windows x64 üzerinde arayüzsüz JADX ve tam bir JDK; [Android rehberi](docs/android-analysis.md) | | Android cihazları | Cihazlar, paketler, süreçler, günlükler, dökümler, ekran görüntüleri ve APK/dosya aktarımları | Çağıranın sağladığı adb (emülatör veya cihaz); [ADB rehberi](docs/adb-device-analysis.md) | | JEB projeleri | Motor destekli proje birimleri, artefakt özetleri ve tür/metot sözdekodu | Çağıranın başlattığı, MCP sunan bir JEB istemcisi, REA_JEB_MCP_URL ile seçilir; [JEB rehberi](docs/jeb-analysis.md) | | Android kaynakları | Çözülmüş manifest, dize tabloları, diller ve sürüm bilgileri | Çağıranın sağladığı Apktool başlatıcısı; [kaynak rehberi](docs/apktool-resource-analysis.md) | +| Flutter uygulamaları | Dart anlık görüntü karması, ABI başına kitaplık özetleri ve motor derleme kökeni | Yok (statik APK çözümleme); [Flutter rehberi](docs/flutter-analysis.md) | | Donanım yazılımı | Bölgeler, çıkarma sonuçları ve yerel kod analizine devirler | Linux üzerinde Binwalk / Unblob; [donanım yazılımı rehberi](docs/firmware-analysis.md) | +| Kaydedilmiş paketler | Seçilen alanlar, yinelenen değerler, filtreler ve çözümleme kuralları | Linux: TShark 4.x + prlimit; [yakalama kılavuzu](docs/packet-captures.md) | +| Kaydedilmiş mantık sinyalleri | Kod çözücü açıklamaları, örnek aralıkları ve tanılama | Linux: sigrok-cli 0.7.2 + prlimit; [sinyal kılavuzu](docs/signal-recordings.md) | | Paketler ve kaynaklar | Dosya envanterleri, özet değerleri, plist'ler, Apple paket yapısı ve çıkarılmış kaynaklar | [Artefakt ve JavaScript rehberi](docs/javascript-artifact-reconstruction.md), [Apple uygulamaları](docs/apple-application-analysis.md) | | Süreç davranışı | Terminal çıktısı, etkileşimler, sonlanma ve dosya sistemi gözlemleri, çalıştırma karşılaştırmaları | Yerel PTY ile Linux/macOS; [süreç yakalama](docs/process-capture.md) | @@ -258,7 +262,7 @@ Güvenlik açıklarını [SECURITY.md](SECURITY.md) üzerinden bildirin. ## Yıldız geçmişi -🎉 **GitHub'da 110.000 yıldız — teşekkürler!** +🎉 **GitHub'da 170.000 yıldız — teşekkürler!** REA'yı kullanan, hata bildiren, özellik talep eden, derlemeleri test eden ve düzeltmelere katkıda bulunan herkese teşekkürler. @@ -272,7 +276,13 @@ REA'yı kullanan, hata bildiren, özellik talep eden, derlemeleri test eden ve d ## Sorumluluk reddi -REA, yasal tersine mühendislik araştırması, analizi ve yeniden oluşturma için araçlar sağlar. Gerekli izinleri almak ve geçerli yasalara uymak sizin sorumluluğunuzdadır. Proje yasa dışı veya yetkisiz kullanımı desteklemez. +Sorumlu kullanım yönergeleri için [DISCLAIMER.md](DISCLAIMER.md) dosyasına bakın. + +REA; yasal araştırma, eğitim, birlikte çalışabilirlik, yazılımın korunması ve sahibi olduğunuz ya da inceleme yetkiniz bulunan yazılımların analizi için tasarlanmıştır. + +The project's position on illegal or unauthorized use covers all REA +versions, distribution channels, and platforms; each copy retains its +applicable licenses. ## Katkıda bulunma @@ -283,3 +293,15 @@ Geliştirme ortamı ve kontroller için [CONTRIBUTING.md](CONTRIBUTING.md), doğ ## Lisans [MIT](LICENSE) + +REA-authored code is licensed under MIT. Third-party material retains its own +licenses and copyright notices; see [Third-party notices](THIRD_PARTY_NOTICES.md) +for the dependency inventory, preserved license texts, and external-tool terms. + +**You must legally obtain and be authorized to use commercial tools**, including +IDA Pro / Hex-Rays decompilers, Hopper, and JEB, under their applicable licenses. +REA grants no tool license, key, or activation entitlement. Trials and demos +remain subject to vendor terms, including user, feature, automation, and output +sharing restrictions. Cracked copies, stolen keys, unauthorized key sharing, +and bypassing license restrictions are not authorized. This guidance does not +amend MIT or third-party licenses. diff --git a/README_uk.md b/README_uk.md index d40815253..14c3d4984 100644 --- a/README_uk.md +++ b/README_uk.md @@ -139,12 +139,16 @@ REA потребує Node.js 22.x (>=22.19), 24.x (>=24.11) або 26+, а та | JavaScript / Electron | Модулі, імпорти, карти вихідного коду, маршрути, IPC і зв'язки з нативними доповненнями | Node.js і npm; [аналіз застосунків](https://rea.tools/uk/guides/javascript/) | | Сайти | Структура сторінки, скрипти, мережеві спостереження й запитані знімки екрана | Браузер сімейства Chrome; [аналіз браузера](https://rea.tools/uk/guides/browser/) | | Збережені мережеві захоплення | Запити, відповіді, доступні корисні дані та місця в джерелі | HAR; mitmdump у Linux для захоплень у власному форматі mitmproxy; [посібник мережевих захоплень](docs/web-network-captures.md) | +| Захоплення пакетів | Кінцеві точки, DNS, TLS SNI, розподіл протоколів та HTTP-запити | Надані викликаючою стороною tshark та capinfos; [підручник pcap](docs/pcap-analysis.md) | | Збірки .NET | Метадані, інструкції CIL, оголошені нативні залежності й порівняння збірок | Статична перевірка; [посібник керованого коду](docs/managed-code-analysis.md) | | Android APK | Оголошення маніфесту, класи, декомпільовані методи й посилання | JADX без графічного інтерфейсу й повний JDK у Linux/macOS/Windows x64; [посібник Android](docs/android-analysis.md) | | Пристрої Android | Пристрої, пакети, процеси, журнали, дампи, знімки екрана та передавання APK/файлів | adb, наданий викликаючою стороною (емулятор або пристрій); [підручник ADB](docs/adb-device-analysis.md) | | Проєкти JEB | Єдиниці проєкту від рушія, дайджести артефактів і псевдокод типів/методів | Запущений викликаною стороною клієнт JEB з MCP, обирається через REA_JEB_MCP_URL; [посібник JEB](docs/jeb-analysis.md) | | Ресурси Android | Декодований маніфест, таблиці рядків, мови та відомості про версію | Засіб запуску Apktool, наданий викликаючою стороною; [підручник ресурсів](docs/apktool-resource-analysis.md) | +| Додатки Flutter | Хеш знімка Dart, дайджести бібліотек за ABI та походження збірки рушія | Не потрібні (статичний розбір APK); [підручник Flutter](docs/flutter-analysis.md) | | Прошивки | Області, результати видобування й передавання до нативного аналізу | Binwalk / Unblob у Linux; [посібник прошивок](docs/firmware-analysis.md) | +| Записані пакети | Вибрані поля, повторювані значення, фільтри та правила декодування | Linux: TShark 4.x + prlimit; [посібник із записів пакетів](docs/packet-captures.md) | +| Записані логічні сигнали | Анотації декодера, діапазони відліків і діагностика | Linux: sigrok-cli 0.7.2 + prlimit; [посібник із сигналів](docs/signal-recordings.md) | | Пакети й ресурси | Переліки файлів, хеші, plist, структура пакетів Apple та видобуті ресурси | [Посібник артефактів і JavaScript](docs/javascript-artifact-reconstruction.md), [застосунки Apple](docs/apple-application-analysis.md) | | Поведінка процесів | Вивід термінала, взаємодії, спостереження за завершенням і файловою системою та порівняння запусків | Linux/macOS із нативним PTY; [захоплення процесів](docs/process-capture.md) | @@ -258,7 +262,7 @@ npx rea-agents@latest setup ## Історія зірок -🎉 **110 000 зірок на GitHub — дякуємо!** +🎉 **170 000 зірок на GitHub — дякуємо!** Дякуємо всім, хто використовує REA, повідомляє про помилки, пропонує нові функції, тестує збірки й допомагає з виправленнями. @@ -272,7 +276,13 @@ npx rea-agents@latest setup ## Відмова від відповідальності -REA надає інструменти для законних досліджень, аналізу й реконструкції за допомогою реверс-інжинірингу. Ви відповідаєте за отримання необхідних дозволів і дотримання застосовних законів. Проєкт не підтримує незаконне або несанкціоноване використання. +Рекомендації щодо відповідального використання наведено в [DISCLAIMER.md](DISCLAIMER.md). + +REA призначений для законних досліджень, навчання, забезпечення сумісності, збереження програмного забезпечення й аналізу програм, якими ви володієте або які маєте дозвіл досліджувати. + +The project's position on illegal or unauthorized use covers all REA +versions, distribution channels, and platforms; each copy retains its +applicable licenses. ## Участь у проєкті @@ -283,3 +293,15 @@ REA надає інструменти для законних досліджен ## Ліцензія [MIT](LICENSE) + +REA-authored code is licensed under MIT. Third-party material retains its own +licenses and copyright notices; see [Third-party notices](THIRD_PARTY_NOTICES.md) +for the dependency inventory, preserved license texts, and external-tool terms. + +**You must legally obtain and be authorized to use commercial tools**, including +IDA Pro / Hex-Rays decompilers, Hopper, and JEB, under their applicable licenses. +REA grants no tool license, key, or activation entitlement. Trials and demos +remain subject to vendor terms, including user, feature, automation, and output +sharing restrictions. Cracked copies, stolen keys, unauthorized key sharing, +and bypassing license restrictions are not authorized. This guidance does not +amend MIT or third-party licenses. diff --git a/README_vi.md b/README_vi.md index e0f6d2f78..86544a535 100644 --- a/README_vi.md +++ b/README_vi.md @@ -139,12 +139,16 @@ REA yêu cầu Node.js 22.x (>=22.19), 24.x (>=24.11) hoặc 26+, cùng với np | JavaScript / Electron | Mô-đun, các khai báo import, source map, tuyến, IPC và quan hệ với tiện ích mở rộng mã máy | Node.js và npm; [phân tích ứng dụng](https://rea.tools/vi/guides/javascript/) | | Trang web | Cấu trúc trang, script, quan sát mạng và ảnh chụp màn hình được yêu cầu | Trình duyệt thuộc họ Chrome; [phân tích trình duyệt](https://rea.tools/vi/guides/browser/) | | Bản ghi lưu lượng mạng đã lưu | Yêu cầu, phản hồi, payload có thể truy cập và vị trí nguồn | HAR; mitmdump trên Linux cho bản ghi định dạng gốc của mitmproxy; [hướng dẫn bản ghi mạng](docs/web-network-captures.md) | +| Bắt gói tin | Điểm cuối, DNS, TLS SNI, phân bố giao thức và yêu cầu HTTP | tshark và capinfos do nơi gọi cung cấp; [hướng dẫn pcap](docs/pcap-analysis.md) | | Assembly .NET | Siêu dữ liệu, lệnh CIL, các phụ thuộc mã máy được khai báo và so sánh bản dựng | Kiểm tra tĩnh; [hướng dẫn mã được quản lý](docs/managed-code-analysis.md) | | APK Android | Khai báo manifest, lớp, phương thức được dịch ngược và tham chiếu | JADX không giao diện đồ họa và JDK đầy đủ trên Linux/macOS/Windows x64; [hướng dẫn Android](docs/android-analysis.md) | | Thiết bị Android | Thiết bị, gói, tiến trình, nhật ký, dump, ảnh chụp màn hình và truyền APK/tệp | adb do nơi gọi cung cấp (trình giả lập hoặc thiết bị); [hướng dẫn ADB](docs/adb-device-analysis.md) | | Dự án JEB | Đơn vị dự án từ engine, hash của artifact và mã giả của kiểu/phương thức | Một ứng dụng JEB do nơi gọi khởi động, phục vụ MCP, chọn bằng REA_JEB_MCP_URL; [hướng dẫn JEB](docs/jeb-analysis.md) | | Tài nguyên Android | Manifest đã giải mã, bảng chuỗi, ngôn ngữ và thông tin phiên bản | Trình khởi chạy Apktool do nơi gọi cung cấp; [hướng dẫn tài nguyên](docs/apktool-resource-analysis.md) | +| Ứng dụng Flutter | Băm snapshot Dart, hash thư viện theo ABI và nguồn gốc build engine | Không cần (phân tích APK tĩnh); [hướng dẫn Flutter](docs/flutter-analysis.md) | | Phần sụn | Các vùng, kết quả trích xuất và dữ liệu chuyển sang phân tích mã máy | Binwalk / Unblob trên Linux; [hướng dẫn phần sụn](docs/firmware-analysis.md) | +| Gói tin đã ghi | Trường được chọn, giá trị lặp, bộ lọc và quy tắc giải mã | Linux: TShark 4.x + prlimit; [hướng dẫn bản ghi gói tin](docs/packet-captures.md) | +| Tín hiệu logic đã ghi | Chú thích bộ giải mã, phạm vi mẫu và chẩn đoán | Linux: sigrok-cli 0.7.2 + prlimit; [hướng dẫn tín hiệu](docs/signal-recordings.md) | | Gói và tài nguyên | Danh sách tệp, giá trị băm, plist, cấu trúc bundle Apple và tài nguyên được trích xuất | [Hướng dẫn hiện vật phần mềm và JavaScript](docs/javascript-artifact-reconstruction.md), [ứng dụng Apple](docs/apple-application-analysis.md) | | Hành vi tiến trình | Đầu ra terminal, tương tác, quan sát khi thoát và hệ thống tệp, cùng so sánh các lần chạy | Linux/macOS có PTY gốc; [ghi lại tiến trình](docs/process-capture.md) | @@ -258,7 +262,7 @@ Báo cáo lỗ hổng theo [SECURITY.md](SECURITY.md). ## Lịch sử sao -🎉 **110.000 sao trên GitHub — xin cảm ơn!** +🎉 **170.000 sao trên GitHub — xin cảm ơn!** Cảm ơn mọi người đã sử dụng REA, báo lỗi, đề xuất tính năng, kiểm thử bản dựng và đóng góp bản sửa lỗi. @@ -272,7 +276,13 @@ Cảm ơn mọi người đã sử dụng REA, báo lỗi, đề xuất tính n ## Miễn trừ trách nhiệm -REA cung cấp công cụ cho nghiên cứu dịch ngược, phân tích và tái tạo hợp pháp. Bạn có trách nhiệm có được các quyền cho phép cần thiết và tuân thủ luật áp dụng. Dự án không ủng hộ việc sử dụng trái pháp luật hoặc không được cho phép. +Xem [DISCLAIMER.md](DISCLAIMER.md) để biết hướng dẫn sử dụng có trách nhiệm. + +REA dành cho nghiên cứu, giáo dục, khả năng tương tác, bảo tồn phần mềm và phân tích phần mềm bạn sở hữu hoặc được phép kiểm tra, trong khuôn khổ pháp luật. + +The project's position on illegal or unauthorized use covers all REA +versions, distribution channels, and platforms; each copy retains its +applicable licenses. ## Đóng góp @@ -283,3 +293,15 @@ Xem [CONTRIBUTING.md](CONTRIBUTING.md) về thiết lập môi trường phát t ## Giấy phép [MIT](LICENSE) + +REA-authored code is licensed under MIT. Third-party material retains its own +licenses and copyright notices; see [Third-party notices](THIRD_PARTY_NOTICES.md) +for the dependency inventory, preserved license texts, and external-tool terms. + +**You must legally obtain and be authorized to use commercial tools**, including +IDA Pro / Hex-Rays decompilers, Hopper, and JEB, under their applicable licenses. +REA grants no tool license, key, or activation entitlement. Trials and demos +remain subject to vendor terms, including user, feature, automation, and output +sharing restrictions. Cracked copies, stolen keys, unauthorized key sharing, +and bypassing license restrictions are not authorized. This guidance does not +amend MIT or third-party licenses. diff --git a/README_zh-TW.md b/README_zh-TW.md index ca659a42a..62c9ab2f3 100644 --- a/README_zh-TW.md +++ b/README_zh-TW.md @@ -139,12 +139,16 @@ REA 需要 Node.js 22.x(>=22.19)、24.x(>=24.11)或 26+,以及 npm。 | JavaScript / Electron | 模組、匯入、source map、路由、IPC 和原生附加元件關係 | Node.js 和 npm;[應用分析](https://rea.tools/zh-TW/guides/javascript/) | | 網站 | 頁面結構、腳本、網路觀察結果和按請求獲取的螢幕擷取畫面 | Chrome 系瀏覽器;[瀏覽器分析](https://rea.tools/zh-TW/guides/browser/) | | 已保存的網路擷取 | 請求、回應、可訪問的酬載和來源位置 | HAR;原生 mitmproxy 擷取需要 Linux 上的 mitmdump;[擷取指南](docs/web-network-captures.md) | +| 封包擷取 | 端點、DNS、TLS SNI、通訊協定分佈和 HTTP 請求 | 呼叫端提供的 tshark 和 capinfos;[pcap 指南](docs/pcap-analysis.md) | | .NET 程式集 | 中繼資料、CIL 指令、聲明的原生依賴和建置對比 | 靜態檢查;[托管程式碼指南](docs/managed-code-analysis.md) | | Android APK | 清單聲明、類別、反編譯的方法和引用 | Linux/macOS/Windows x64 上的無界面 JADX 和完整 JDK;[Android 指南](docs/android-analysis.md) | | Android 裝置 | 裝置、套件、程序、日誌、傾印、螢幕擷取以及 APK/檔案傳輸 | 呼叫端提供的 adb(模擬器或實體裝置);[ADB 指南](docs/adb-device-analysis.md) | | JEB 專案 | 引擎支援的專案單元、成品摘要和型別/方法的虛擬碼 | 由呼叫端啟動、提供 MCP 的 JEB 用戶端,透過 REA_JEB_MCP_URL 選擇;[JEB 指南](docs/jeb-analysis.md) | | Android 資源 | 解碼後的清單、字串表、語系和版本資訊 | 呼叫端提供的 Apktool 啟動器;[資源指南](docs/apktool-resource-analysis.md) | +| Flutter 應用 | Dart 快照雜湊、依 ABI 的程式庫雜湊及引擎建置來源 | 無(靜態 APK 解析);[Flutter 指南](docs/flutter-analysis.md) | | 韌體 | 區域、提取結果和轉交原生分析的內容 | Linux 上的 Binwalk / Unblob;[韌體指南](docs/firmware-analysis.md) | +| 封包記錄 | 指定欄位、重複值、篩選條件與解碼規則 | Linux: TShark 4.x + prlimit; [封包分析指南](docs/packet-captures.md) | +| 錄製的邏輯訊號 | 解碼註解、樣本範圍與診斷資訊 | Linux: sigrok-cli 0.7.2 + prlimit; [訊號記錄指南](docs/signal-recordings.md) | | 軟體包與資源 | 檔案清單、摘要、plist、Apple bundle 結構和提取的資源 | [製品與 JavaScript 指南](docs/javascript-artifact-reconstruction.md)、[Apple 應用](docs/apple-application-analysis.md) | | 處理程序行為 | 終端輸出、互動、退出和檔案系統觀察結果,以及執行對比 | 支援原生 PTY 的 Linux/macOS;[處理程序擷取](docs/process-capture.md) | @@ -260,7 +264,7 @@ npx rea-agents@latest setup ## Star 歷史 -🎉 **GitHub Star 達到 110,000 個,感謝大家!** +🎉 **GitHub Star 達到 170,000 個,感謝大家!** 感謝每一位使用 REA、報告錯誤、提出功能需求、測試建置和貢獻修復的朋友。 @@ -274,7 +278,12 @@ npx rea-agents@latest setup ## 免責聲明 -REA 為合法的逆向工程研究、分析和重建提供工具。你有責任取得所需授權並遵守適用法律。本專案不認同非法或未經授權的使用。 +負責任使用的相關指引請見 [DISCLAIMER.md](DISCLAIMER.md)。 + +REA 用於合法的研究、教育、互通性、軟體保存,以及分析你擁有或獲准檢查的軟體。 + +本專案對非法或未經授權使用的立場涵蓋所有 REA 版本、分發管道和執行平台; +每份副本仍適用其隨附的授權。 ## 參與貢獻 @@ -285,3 +294,11 @@ REA 為合法的逆向工程研究、分析和重建提供工具。你有責任 ## 授權條款 [MIT](LICENSE) + +REA 自行編寫的程式碼採用 MIT 授權;第三方內容保留各自的授權和著作權聲明。 +依賴清單、授權原文及外部工具條款見[第三方聲明](THIRD_PARTY_NOTICES.md)。 + +**使用者須自行合法取得商用工具及所需使用權**,包括 IDA Pro / Hex-Rays 反編譯器、 +Hopper 和 JEB,並遵守各自授權。REA 不提供工具授權、金鑰或啟用權利;試用版和 +展示版也須遵守廠商對使用者、功能、自動化及輸出分享的限制。不得使用破解副本、 +竊取或違規共用金鑰,也不得繞過授權限制。本指引不變更 MIT 或第三方授權。 diff --git a/README_zh.md b/README_zh.md index 3d0ffcec6..c8d66ce08 100644 --- a/README_zh.md +++ b/README_zh.md @@ -139,12 +139,16 @@ REA 需要 Node.js 22.x(>=22.19)、24.x(>=24.11)或 26+,以及 npm。 | JavaScript / Electron | 模块、导入、source map、路由、IPC 和原生扩展关系 | Node.js 和 npm;[应用分析](https://rea.tools/zh-CN/guides/javascript/) | | 网站 | 页面结构、脚本、网络观察结果和按请求获取的截图 | Chrome 系浏览器;[浏览器分析](https://rea.tools/zh-CN/guides/browser/) | | 已保存的网络捕获 | 请求、响应、可访问的载荷和来源位置 | HAR;原生 mitmproxy 捕获需要 Linux 上的 mitmdump;[捕获指南](docs/web-network-captures.md) | +| 数据包捕获 | 端点、DNS、TLS SNI、协议分布和 HTTP 请求 | 调用方提供的 tshark 和 capinfos;[pcap 指南](docs/pcap-analysis.md) | | .NET 程序集 | 元数据、CIL 指令、声明的原生依赖和构建对比 | 静态检查;[托管代码指南](docs/managed-code-analysis.md) | | Android APK | 清单声明、类、反编译的方法和引用 | Linux/macOS/Windows x64 上的无界面 JADX 和完整 JDK;[Android 指南](docs/android-analysis.md) | | Android 设备 | 设备、软件包、进程、日志、转储、屏幕截图以及 APK/文件传输 | 调用方提供的 adb(模拟器或实体设备);[ADB 指南](docs/adb-device-analysis.md) | | JEB 项目 | 引擎支持的项目单元、工件摘要和类型/方法的伪代码 | 由调用方启动、提供 MCP 的 JEB 客户端,通过 REA_JEB_MCP_URL 选择;[JEB 指南](docs/jeb-analysis.md) | | Android 资源 | 解码后的清单、字符串表、语言区域和版本信息 | 调用方提供的 Apktool 启动器;[资源指南](docs/apktool-resource-analysis.md) | +| Flutter 应用 | Dart 快照哈希、按 ABI 的库摘要及引擎构建溯源 | 无(静态 APK 解析);[Flutter 指南](docs/flutter-analysis.md) | | 固件 | 区域、提取结果和转交原生分析的内容 | Linux 上的 Binwalk / Unblob;[固件指南](docs/firmware-analysis.md) | +| 抓包文件 | 指定字段、重复值、过滤条件与解码规则 | Linux: TShark 4.x + prlimit; [抓包分析指南](docs/packet-captures.md) | +| 录制的逻辑信号 | 解码注释、样本范围和诊断信息 | Linux: sigrok-cli 0.7.2 + prlimit; [信号记录指南](docs/signal-recordings.md) | | 软件包与资源 | 文件清单、摘要、plist、Apple bundle 结构和提取的资源 | [制品与 JavaScript 指南](docs/javascript-artifact-reconstruction.md)、[Apple 应用](docs/apple-application-analysis.md) | | 进程行为 | 终端输出、交互、退出和文件系统观察结果,以及运行对比 | 支持原生 PTY 的 Linux/macOS;[进程捕获](docs/process-capture.md) | @@ -260,7 +264,7 @@ npx rea-agents@latest setup ## Star 历史 -🎉 **GitHub Star 达到 110,000 个,感谢大家!** +🎉 **GitHub Star 达到 170,000 个,感谢大家!** 感谢每一位使用 REA、报告错误、提出功能需求、测试构建和贡献修复的朋友。 @@ -274,7 +278,12 @@ npx rea-agents@latest setup ## 免责声明 -REA 为合法的逆向工程研究、分析和重建提供工具。你有责任取得所需授权并遵守适用法律。项目不支持非法或未经授权的使用。 +负责任使用的相关指引请见 [DISCLAIMER.md](DISCLAIMER.md)。 + +REA 用于合法的研究、教育、互操作性、软件保存,以及分析你拥有或获准检查的软件。 + +本项目对非法或未经授权使用的立场涵盖所有 REA 版本、分发渠道和运行平台; +每份副本仍适用其随附的许可。 ## 参与贡献 @@ -285,3 +294,11 @@ REA 为合法的逆向工程研究、分析和重建提供工具。你有责任 ## 许可证 [MIT](LICENSE) + +REA 自行编写的代码采用 MIT 许可;第三方内容保留各自的许可和著作权声明。 +依赖清单、许可原文及外部工具条款见[第三方声明](THIRD_PARTY_NOTICES.md)。 + +**用户须自行合法取得商用工具及所需使用权**,包括 IDA Pro / Hex-Rays 反编译器、 +Hopper 和 JEB,并遵守各自许可。REA 不提供工具许可、密钥或激活权利;试用版和 +演示版也须遵守厂商对用户、功能、自动化及输出分享的限制。不得使用破解副本、 +窃取或违规共用密钥,也不得绕过许可限制。本指引不变更 MIT 或第三方许可。 diff --git a/SECURITY.md b/SECURITY.md index 56d9ca784..1f3d73f8e 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -24,9 +24,12 @@ provider-dependent behavior to be reproduced safely. ## Security boundary -REA authenticates each local provider bridge session with a random capability -token and a current-user Unix socket. Tokens are transferred through private -session descriptors rather than process arguments or environment variables. +REA authenticates its Hopper and Ghidra bridges with per-session random +capability tokens. POSIX uses current-user Unix sockets; Windows Ghidra uses +authenticated loopback TCP with a private NTFS runtime whose DACL admits only +the current user and SYSTEM. See [Windows Ghidra P0](docs/windows-ghidra-p0.md#private-runtime-transport-and-lifecycle). +Tokens are transferred through private session descriptors rather than process +arguments or environment variables. This is not a sandbox and does not protect against malicious processes already running as the same operating-system user. Opening an untrusted binary delegates parsing and analysis to the selected local provider with that user's diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md new file mode 100644 index 000000000..5fceaaa47 --- /dev/null +++ b/THIRD_PARTY_NOTICES.md @@ -0,0 +1,134 @@ +# Third-party notices + +REA-authored code is licensed under [MIT](LICENSE). Third-party material retains +its own copyright, license, attribution, and NOTICE requirements. REA's MIT +license grants no rights to proprietary analysis tools. Project and product +names identify integrations; they do not imply affiliation or endorsement. + +This inventory covers the locked npm dependency graph, code or assets derived +from upstream projects, and separately obtained engines used by REA. A listed +integration is not a statement that its executable is bundled. Upstream +components and caller-selected versions may have additional terms; retain the +notices supplied with the software you actually obtain or redistribute. + +## Distributed dependencies, derived code, and assets + +| Material | Use and licensing records | +| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| npm dependencies | [Complete inventory](licenses/npm-dependencies.txt) of every entry in `package-lock.json`, including transitive, optional platform, development, and website dependencies. [Runtime notices](licenses/npm-runtime-notices.txt) preserve the copyright, license, and NOTICE documents from integrity-verified release archives, plus the MIT notice for Rolldown's generated runtime helpers. Development dependencies are inventoried but are not all distributed in REA's npm package. | +| NativeAOT parser | REA's derived parser uses the MIT-licensed [ghidra-nativeaot](https://github.com/Washi1337/ghidra-nativeaot/tree/effeb734fc570c32650f88b159608979dc7b423e) work of Washi and the NativeAOT layout definitions in [dotnet/runtime](https://github.com/dotnet/runtime/tree/a3b2d40328be0be3f8dd43f0e5cc925b8827b044). Preserve [Washi's MIT notice](licenses/nativeaot-parser-MIT.txt) and the [.NET Foundation MIT notice](licenses/dotnet-runtime-MIT.txt). | +| EVM analysis | `evmole@0.9.3`, MIT, copyright 2023 Maxim Andreev. The published npm archive omits its license document; REA retains the [original upstream license](third_party/evmole/LICENSE) and [provenance](third_party/evmole/README.md). It is also included in the runtime notices. | +| Windows native addon | The release addon is compiled with MinGW-w64 and statically links GCC runtime libraries. Preserve the [MinGW-w64 runtime notices](licenses/MinGW-w64-runtime.txt), [GPLv3 text](licenses/GPL-3.0.txt), and [GCC Runtime Library Exception 3.1](licenses/GCC-Runtime-Library-Exception-3.1.txt). The exception governs eligible compiled combinations; it does not relicense the runtime itself under MIT. The Node-API build headers are from Node 22.19.0; its [original license and component notices](licenses/Node-22.19.0-LICENSE.txt) are retained. Node itself is supplied by the user. Snapshot provenance and release-toolchain review requirements are in [licenses/README.md](licenses/README.md). | +| Dinosaur website example | Selected excerpts from [wayou/t-rex-runner](https://github.com/wayou/t-rex-runner/tree/5455bfa408ec6b707c7300ff194b7390733a766d), derived from Chromium's dinosaur game. The website retains the [original BSD-3-Clause notices](website/public/assets/licenses/dinosaur.txt), including Chromium authors and wayou. This asset is not part of the npm runtime. | + +Two locked runtime releases, [`clean-git-ref@2.0.1`](https://github.com/TheSavior/clean-git-ref/tree/bf3c8afc8032bcdc6a53634c18b601dc6df478fb) (declared Apache-2.0) and +[`minimisted@2.0.1`](https://github.com/kt3k/minimisted/tree/95fdfb8d6efb9546c1117854fe3a58105f6332ce) (declared MIT), omit a full license/copyright document in their +published archives and inspected upstream release sources. Their runtime notice +entries preserve the declared license and author metadata and include a clearly +labeled standard license text. These are documented upstream notice gaps, not +recovered copyright notices or a claim that attribution has been fully verified. + +The optional `frida@17.23.2` npm archive and tagged Node binding source also +omit a standalone license/copyright document. Its declared +`LGPL-2.0 WITH WxWindows-exception-3.1` license is recorded with unchanged +[Frida licensing text](licenses/frida-17.23.2-COPYING.txt) and the +[GNU Library GPL v2](licenses/LGPL-2.0.txt). These are licensing supplements, +not recovered Node binding or prebuild-component copyright notices. + +## Open-source engine credits and licenses + +We thank the maintainers and contributors of the projects below. Their +decompilers, binary-analysis engines, debuggers, parsers, and capture tools +provide capabilities used through REA's integrations. Each row identifies the +upstream project, its own license, and its role in REA. In particular, JADX +provides the Android decompiler, while jadx-headless-mcp provides the separate +headless integration used by REA; both projects deserve credit. + +These acknowledgments are voluntary thanks. Required upstream copyright and +NOTICE texts remain in their original form and are not replaced by this +summary. Credits do not imply endorsement or change any license. + +REA's adapters do not grant, replace, or waive these licenses. The upstream +executables and their dependency graphs are supplied separately. Git submodules +pin inspection sources; they are not included in the npm package. + +| Project | License and source | REA relationship | +| ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Ghidra | [Apache-2.0](https://github.com/NationalSecurityAgency/ghidra/blob/Ghidra_12.1.4_build/LICENSE), with the government-work and component qualifications in its [NOTICE](https://github.com/NationalSecurityAgency/ghidra/blob/Ghidra_12.1.4_build/NOTICE) | Bring your own Ghidra 12.1.4. Copies of its [LICENSE](licenses/ghidra-12.1.4-LICENSE.txt), [NOTICE](licenses/ghidra-12.1.4-NOTICE.txt), and [DISCLAIMER](licenses/ghidra-12.1.4-DISCLAIMER.txt) are retained for reference. | +| ghidra-nativeaot | [MIT](https://github.com/Washi1337/ghidra-nativeaot/blob/effeb734fc570c32650f88b159608979dc7b423e/LICENSE.md) | Pinned inspection source; derived parser attribution above. | +| JADX | [Apache-2.0](https://github.com/skylot/jadx/blob/v1.5.6/LICENSE) | The audited jadx-headless-mcp source uses JADX 1.5.6 for Android decompilation; the engine JAR is separately supplied. | +| jadx-headless-mcp | [Apache-2.0](https://github.com/1013503897/jadx-headless-mcp/blob/5844800a486d2248fa949b74c9896285f5b54de2/LICENSE) | v0.7.1; pinned submodule and user-supplied JAR. | +| Apktool | [Apache-2.0](https://github.com/iBotPeaches/Apktool/blob/master/LICENSE.md) | User-supplied Android resource decoder. | +| Binwalk | [MIT](https://github.com/ReFirmLabs/binwalk/blob/4fdab3d464d97b68e0af9088df3f9e2e1545b21c/LICENSE) | v3.1.0; pinned submodule and user-supplied firmware engine. | +| Unblob | [MIT](https://github.com/onekey-sec/unblob/blob/1fcc7a0a584a70a96c31f5a276c20944d199a089/LICENSE) | 26.6.4; pinned submodule and user-supplied firmware engine. | +| Wakaru | [Apache-2.0](https://github.com/pionxzh/wakaru/blob/8219bf5016a063d7fb215101a8c45d5959ec733f/LICENSE) | v1.14.0; pinned source and separately obtained JavaScript reconstruction tooling. | +| WABT | [Apache-2.0](https://github.com/WebAssembly/wabt/blob/ff0ef7e0009402740c805a9744c09b05be063e48/LICENSE) | v1.0.42; external WebAssembly tools; [integration provenance](third_party/wabt/README.md). | +| pwntools | [MIT, with GPL/BSD component qualifications](https://github.com/Gallopsled/pwntools/blob/3ad86ec5adab1abf9781ca7552a6f5d7cff7a33c/LICENSE-pwntools.txt) | 4.15.0; caller-supplied offline ELF analysis package. | +| pyelftools | [Public-domain dedication and component notices](https://github.com/eliben/pyelftools/blob/v0.33/LICENSE) | 0.33; includes separately licensed bundled material, including Construct. | +| Unicorn | [GPL-2.0 and component notices](https://github.com/unicorn-engine/unicorn/blob/2.1.2/COPYING) | 2.1.2; used by the caller-supplied ELF analysis profile for instruction emulation. | +| pwndbg | [MIT](third_party/pwndbg/LICENSE.md) | 2026.09.15, commit `55596aa676a2756efb8d67034f31675170eabe48`; separately obtained debugger extension. | +| GNU GDB | [GPL-3.0-or-later](https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gdb/COPYING) | Caller-supplied debugger for the optional pwndbg core-file workflow. | +| LLDB / LLVM | [Apache-2.0 with LLVM exceptions](https://github.com/llvm/llvm-project/blob/main/LICENSE.TXT) | Caller-supplied debugger; the installed distribution's component and historical notices also apply. | +| mitmproxy | [MIT](https://github.com/mitmproxy/mitmproxy/blob/6c09d56e4c29a92f5ad01b03199977584b8ea14f/LICENSE) | 12.2.3; separately supplied network capture proxy. | +| Android Debug Bridge (adb) | [Apache-2.0](https://android.googlesource.com/platform/packages/modules/adb/+/refs/heads/main/NOTICE) | User-supplied Android device tool. A complete Android SDK download has its own [SDK license terms](https://developer.android.com/studio/terms); adb's source license does not replace them. | +| ILSpy / ICSharpCode.Decompiler | [MIT](https://github.com/icsharpcode/ILSpy/blob/master/ICSharpCode.Decompiler/Properties/AssemblyInfo.cs) | Optional separately installed .NET decompiler; not a redistributed REA dependency. | + +Ghidra's original notice credits software developed at the National Security +Agency. It explains that US-government-created portions are not subject to US +copyright protection, while other portions retain their authors' rights. Its +modules include additional third-party licenses, and standalone programs under +`GPL/` have GPLv3 terms. The three retained top-level documents do not replace +the module notices and license directories in a complete Ghidra distribution. +REA is not affiliated with or endorsed by the NSA. + +## Commercial tools and bridges + +**You must legally obtain the tools and the rights needed for your use.** REA +does not include an IDA Pro, Hex-Rays decompiler, Hopper, or JEB license, license +key, or activation entitlement. A permitted trial/demo may be used only within +its official terms. Cracked copies, stolen keys, unauthorized sharing, and +bypassing activation or license limits are not authorized by REA. + +| Project / product | Applicable terms and distinction | +| -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| IDA Pro and Hex-Rays decompilers | Proprietary Hex-Rays software governed by the [EULA](https://hex-rays.com/eula), purchase agreement, and applicable license scheme. Obtain rights for the required product, user, machine, decompiler, and automation interfaces. Availability of an API or a bridge does not grant hosting, service, or additional-user rights. | +| ida-pro-mcp | The bridge's [MIT license](https://github.com/mrexodia/ida-pro-mcp/blob/main/LICENSE) belongs to Duncan Ogilvie. It licenses the bridge code, not IDA or Hex-Rays products. Its [README](https://github.com/mrexodia/ida-pro-mcp#prerequisites) requires IDA Pro and explicitly states that IDA Free is unsupported. Follow the prerequisites for the version you actually install. The bridge is separately supplied, not bundled by REA. | +| Hopper Disassembler | Proprietary Cryptic Apps software under its [license agreement](https://www.hopperapp.com/license_agreement.html). Personal and computer licenses have different permitted-user and installation rules; an official evaluation trial is available. REA setup may obtain the official installer after approval, but this grants no paid license or activation entitlement. | +| JEB | Proprietary PNF Software product under its [EULA](https://www.pnfsoftware.com/jeb/LICENSE.TXT) and edition-specific agreement. Check user/seat/server rights and whether your edition permits automation, backend/service integration, and disclosure of generated output. The published EULA restricts public or third-party disclosure of decompiled code, reconstructed artifacts, and analysis reports unless expressly permitted by the license type. | + +The vendor's applicable agreement controls. These summaries do not interpret +your individual contract or expand the rights it grants. Verify permissions +before publishing analysis output, sharing tool access, or operating a service. +Vendor terms above were checked on 2026-10-12. + +## Runtimes, development tooling, and fixtures + +REA uses a caller-supplied Node.js runtime ([MIT and component notices](https://github.com/nodejs/node/blob/main/LICENSE)). +Optional workflows may also use Python ([PSF and component licenses](https://docs.python.org/3/license.html)), +OpenJDK ([GPLv2 with Classpath Exception and component notices](https://openjdk.org/legal/)), +Electron ([MIT and component notices](https://github.com/electron/electron/blob/main/LICENSE)), +or a Chromium-based browser ([BSD-3-Clause and third-party licenses](https://chromium.googlesource.com/chromium/src/+/main/LICENSE)). +These external installations are not licensed or bundled by REA's MIT license. + +Development, test, and website npm packages are included in the locked inventory. +GitHub Actions, operating-system utilities, downloaded verification fixtures, +and their runtimes retain the terms supplied by their publishers. Fixture +identities and provenance are recorded under `scripts/fixtures/` and the +existing `third_party/` records; downloaded executable fixtures are not tracked +or included in the npm package. This notice does not claim to inventory every +dependency of a caller's operating system, agent, or separately installed tool. + +## Maintaining and redistributing notices + +Refresh the dependency inventory and runtime notice collection when the lockfile +changes. Review the actual versions and distributed contents, retain the +upstream license and copyright texts, and account for optional platform +packages. See [licenses/README.md](licenses/README.md) for source provenance, +collection scope, and known upstream notice gaps. + +The npm package includes this document, the `licenses/` directory, and the +existing redistributed license records under `third_party/`. If you additionally +bundle an external engine or modify upstream code, review that actual +distribution and retain its full applicable licenses, copyright notices, +NOTICE files, modification notices, and source obligations. REA's inventory is +not a substitute for those obligations. diff --git a/bridge/ghidra/ReaGhidraBridge.java b/bridge/ghidra/ReaGhidraBridge.java index b6fff9f25..6fcd8ac38 100644 --- a/bridge/ghidra/ReaGhidraBridge.java +++ b/bridge/ghidra/ReaGhidraBridge.java @@ -114,6 +114,8 @@ public final class ReaGhidraBridge extends HeadlessScript { private static final int MAX_HIGH_PCODE_INPUTS_PER_OP = 64; private static final int MAX_HIGH_PCODE_DEF_USE_EDGES = 12000; private static final Gson GSON = new GsonBuilder().serializeNulls().create(); + private final Map targetSourceIdentity = new IdentityHashMap<>(); + private String admittedTargetSha256; private static final Set DESCRIPTOR_KEYS = Set.of( "transport", "endpoint_path", @@ -215,6 +217,7 @@ public final class ReaGhidraBridge extends HeadlessScript { "Ghidra imported-byte digest does not match the admitted target" ); } + admittedTargetSha256 = descriptor.targetSha256; // GhidraScript wraps run() in a transaction. End it before serving so // each edit owns a real outer transaction and can roll back immediately. end(true); @@ -641,7 +644,7 @@ public final class ReaGhidraBridge extends HeadlessScript { return result; } - private JsonObject addressToFileOffset(JsonObject params) { + private JsonObject addressToFileOffset(JsonObject params) throws Exception { requireKeys(params, Set.of("document", "address")); requireDocument(params); Address address = requireAddress(params, "address"); @@ -651,14 +654,15 @@ public final class ReaGhidraBridge extends HeadlessScript { Long fileOffset = null; int mappings = 0; for (MemoryBlockSourceInfo source : block.getSourceInfos()) { - if (!source.contains(address) || source.getFileBytes().isEmpty()) continue; + if (!source.contains(address) || source.getFileBytes().isEmpty() || + !isTargetSource(source.getFileBytes().get())) continue; long offset = source.getFileBytesOffset(address); if (offset < 0) continue; fileOffset = offset; mappings++; } if (mappings != 1) - throw new RequestFailure("invalid_request", "Address has " + mappings + " authoritative source mappings: " + canonicalAddress(address)); + throw new RequestFailure("invalid_request", "Address has " + mappings + " authoritative target-file mappings: " + canonicalAddress(address)); JsonObject result = new JsonObject(); result.addProperty("address", canonicalAddress(address)); result.addProperty("file_offset", fileOffset); @@ -681,14 +685,96 @@ public final class ReaGhidraBridge extends HeadlessScript { private JsonElement procedurePseudocode(JsonObject params) throws Exception { requireKeys(params, Set.of("document", "procedure")); requireDocument(params); - Function function = resolveProcedure(requireString(params, "procedure")); - String value = decompiledText(decompile(function)); - return functionObservation( - value == null ? JsonNull.INSTANCE : GSON.toJsonTree(value), - noReturnCallLimitations( - currentProgram.getListing().getInstructions(function.getBody(), true) - ) - ); + String selector = requireString(params, "procedure"); + JsonObject selection = new JsonObject(); + Function function = resolveDecompileProcedure(selector, selection); + try { + String value = decompiledText(decompile(function)); + JsonObject result = functionObservation( + value == null ? JsonNull.INSTANCE : GSON.toJsonTree(value), + noReturnCallLimitations( + currentProgram.getListing().getInstructions(function.getBody(), true) + ) + ); + if (selection.size() > 0) result.add("selection", selection); + return result; + } catch (RequestFailure failure) { + if (selection.size() == 0) throw failure; + // Preserve completed resolution facts without changing the backend's + // failure code or suggesting that the successful mapping was invalid. + throw new RequestFailure(failure.code, "Selector " + selector + + " mapped to analysis address " + selection.get("mapped_address").getAsString() + + " and procedure " + canonicalAddress(function.getEntryPoint()) + + "; " + failure.getMessage()); + } + } + + private Function resolveDecompileProcedure(String selector, JsonObject selection) throws Exception { + String prefix = "file-offset:"; + boolean explicitOffset = selector.startsWith(prefix); + if (!explicitOffset) { + try { + return resolveProcedure(selector); + } catch (RequestFailure failure) { + // Existing names/addresses win. Only an unresolved numeric input + // can fall back to source coordinates; ambiguity never falls back. + if (!failure.code.equals("not_found") || !selector.matches("0x[0-9a-fA-F]+")) + throw failure; + } + } + String coordinate = explicitOffset ? selector.substring(prefix.length()) : selector; + if (!coordinate.matches("0x[0-9a-fA-F]+")) + throw new RequestFailure("invalid_request", "File offsets require hexadecimal file-offset:0x... syntax"); + BigInteger parsed = new BigInteger(coordinate.substring(2), 16); + if (parsed.compareTo(BigInteger.valueOf(9007199254740991L)) > 0) + throw new RequestFailure("invalid_request", "File offset exceeds the exact JSON integer range"); + long offset = parsed.longValueExact(); + monitor.checkCancelled(); + // Ghidra's convenience lookup spans every FileBytes and uses coordinates + // local to each object. Only a complete, digest-matched target source + // establishes that the caller's offset belongs to the admitted file. + Set
mappedAddresses = new java.util.LinkedHashSet<>(); + for (MemoryBlock block : currentProgram.getMemory().getBlocks()) { + for (MemoryBlockSourceInfo source : block.getSourceInfos()) { + monitor.checkCancelled(); + FileBytes backing = source.getFileBytes().orElse(null); + if (backing == null || !isTargetSource(backing)) continue; + Address mapped = source.locateAddressForFileOffset(offset); + if (mapped != null) mappedAddresses.add(mapped); + } + } + List
candidates = new ArrayList<>(mappedAddresses); + if (candidates.size() > 1) + throw new RequestFailure("ambiguous", "File offset " + coordinate + + " has multiple loaded mappings: " + candidates.stream().map(ReaGhidraBridge::canonicalAddress).toList() + + "; select an explicit analysis address"); + if (candidates.isEmpty()) + throw new RequestFailure("not_found", "File offset " + coordinate + + " has no loaded source mapping for the admitted target file; Ghidra image base: " + canonicalAddress(currentProgram.getImageBase()) + + ". Inspect mappings with rea inspect-native-load-image --provider ghidra --json or MCP inspect_native_load_image."); + Address mapped = candidates.get(0); + Function function = functionAtOrContaining(mapped); + if (function == null) + throw new RequestFailure("not_found", "File offset " + coordinate + + " maps to analysis address " + canonicalAddress(mapped) + + ", but no procedure starts at or contains that address in the current Ghidra analysis. " + + "Choose an observed procedure with CLI rea search . --kind procedures --mode regex --provider ghidra --json or MCP list_procedures."); + selection.addProperty("file_offset", offset); + selection.addProperty("mapped_address", canonicalAddress(mapped)); + selection.addProperty("procedure_address", canonicalAddress(function.getEntryPoint())); + return function; + } + + private boolean isTargetSource(FileBytes source) throws Exception { + Boolean observed = targetSourceIdentity.get(source); + if (observed != null) return observed; + // Original FileBytes are immutable even when analysis memory is edited. + // Partial/auxiliary sources remain inspectable but cannot establish an + // original-target offset from their object-local coordinates alone. + boolean matched = source.getFileOffset() == 0 && + constantTimeEquals(hashFileBytes(source, false), admittedTargetSha256); + targetSourceIdentity.put(source, matched); + return matched; } private JsonElement procedureAssembly(JsonObject params) throws Exception { @@ -1273,7 +1359,7 @@ public final class ReaGhidraBridge extends HeadlessScript { ); if (swiftLiterals.omissions().size() > 0) { limitations.add( - "Swift String literals listed in swift_string_literal_omissions matched the immortal layout but were not decoded because their text does not fit the heap budget for this dossier." + "Swift String literal records listed in swift_string_literal_omissions could not be retained or decoded within this dossier's remaining heap budget; later symbolic flows remain unexamined." ); } } else if (swift) { @@ -1862,14 +1948,25 @@ public final class ReaGhidraBridge extends HeadlessScript { Address address = explicitAddress ? parseReaAddress(value) : tryParseAddress(value); if (address == null) throw new RequestFailure("not_found", "Unknown Ghidra procedure name or address: " + value); - Function function = currentProgram.getFunctionManager().getFunctionAt(address); - if (function == null && address.isMemoryAddress()) - function = currentProgram.getFunctionManager().getFunctionContaining(address); + Function function = functionAtOrContaining(address); if (function == null) - throw new RequestFailure("not_found", "No procedure exists at the requested address: " + value); + // Other procedure operations retain their analysis-address semantics. + throw new RequestFailure("not_found", "No procedure exists at the requested address: " + value + + "; Ghidra image base: " + canonicalAddress(currentProgram.getImageBase()) + + ". Choose an observed analysis address. CLI: rea search . --kind procedures --mode regex --provider ghidra --json; " + + "MCP: list_procedures. Inspect the loaded base and source mappings with CLI rea analyze --provider ghidra --json " + + "and rea inspect-native-load-image --provider ghidra --json, or MCP binary_overview and inspect_native_load_image. " + + "Repeat the original target options. For decompile, select source coordinates explicitly with --file-offset=0x... or MCP procedure file-offset:0x...."); return function; } + private Function functionAtOrContaining(Address address) { + Function function = currentProgram.getFunctionManager().getFunctionAt(address); + return function == null && address.isMemoryAddress() + ? currentProgram.getFunctionManager().getFunctionContaining(address) + : function; + } + private JsonObject nativeApiBoundary( Function function, DecompileResults decompilation @@ -3346,6 +3443,7 @@ public final class ReaGhidraBridge extends HeadlessScript { TreeMap observed = new TreeMap<>(); TreeMap omitted = new TreeMap<>(); SwiftLiteralBudget budget = new SwiftLiteralBudget(); + Map selectedValues = new HashMap<>(); SymbolicPropogator propagator = new SymbolicPropogator(currentProgram, false); propagator.flowConstants(function.getEntryPoint(), function.getBody(), new ContextEvaluatorAdapter() { @Override @@ -3357,10 +3455,30 @@ public final class ReaGhidraBridge extends HeadlessScript { Long object = registerConstant(context, pair[1]); if (word == null || object == null) continue; SwiftLiteralLayout layout = swiftLiteralLayout(word, object); - // Ghidra forks each select without correlating its condition, so a pair whose - // registers are both selected may combine words from different cases. - if (layout == null || - (selectedValue(function, instruction, pair[0]) && selectedValue(function, instruction, pair[1]))) continue; + if (layout == null) continue; + // A selected word can combine with a path-dependent ordinary move. Cache the + // provenance question per site/register, charging retained cache state to the + // same dossier budget before allocating it. + boolean selected = false; + boolean provenanceOverCapacity = false; + for (Register register : pair) { + String provenanceKey = canonicalAddress(instruction.getAddress()) + "\u0000" + + register.getBaseRegister().getName(); + Boolean value = selectedValues.get(provenanceKey); + if (value == null) { + if (!budget.takeState()) { + provenanceOverCapacity = true; + break; + } + value = selectedValue(function, instruction, register); + selectedValues.put(provenanceKey, value); + } + if (value) { + selected = true; + break; + } + } + if (selected) continue; // Forks can reach one site with different constants, so the words are part of the key. String key = canonicalAddress(instruction.getAddress()) + "\u0000" + pair[0].getName() + "\u0000" + pair[1].getName() + "\u0000" + Long.toUnsignedString(word, 16) + @@ -3369,7 +3487,7 @@ public final class ReaGhidraBridge extends HeadlessScript { // Every record draws on the budget; the first one that does not fit is kept as an // omission and decoding stops, so later sites are never examined. String value = layout.smallValue(); - boolean overCapacity = !budget.take(layout.byteLength()); + boolean overCapacity = provenanceOverCapacity || !budget.take(layout.byteLength()); if (!overCapacity && value == null) { try { value = swiftLargeLiteralText(layout); @@ -3569,6 +3687,12 @@ public final class ReaGhidraBridge extends HeadlessScript { remaining = Math.max(0, (runtime.maxMemory() - runtime.totalMemory() + runtime.freeMemory()) / 2); } + boolean takeState() { + if (remaining < BYTES_PER_RECORD) return false; + remaining -= BYTES_PER_RECORD; + return true; + } + boolean take(long bytes) { if (remaining < BYTES_PER_RECORD || bytes > (remaining - BYTES_PER_RECORD) / BYTES_PER_LITERAL_BYTE) { diff --git a/bridge/mitmproxy/capture.py b/bridge/mitmproxy/capture.py index fa0535c02..dcd90e745 100644 --- a/bridge/mitmproxy/capture.py +++ b/bridge/mitmproxy/capture.py @@ -93,7 +93,7 @@ def project_record(state, secrets): safe_bytes, credential_url = transport_value(value, path, transport_url) content_base64 = base64.b64encode(value).decode("ascii") digest = hashlib.sha256(value).hexdigest() - hidden = any(secret in value or secret in safe_bytes for secret in byte_secrets) or any(secret in content_base64 or secret in digest for secret in secrets) + hidden = any(secret in value or secret in safe_bytes for secret in byte_secrets) or any(secret in content_base64 or secret in digest or secret in str(len(value)) for secret in secrets) safe_text = None try: safe_text = safe_bytes.decode("utf-8", errors="strict") diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 7006478bb..001c07fbe 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -17,6 +17,7 @@ export default defineConfig({ text: "Getting started", items: [ { text: "Installation and setup", link: "/installation" }, + { text: "Client configuration", link: "/client-configuration" }, { text: "CLI and Evidence", link: "/cli" }, { text: "Agent prompts", link: "/mcp-prompts" }, { text: "Roadmap", link: "/roadmap" }, @@ -36,16 +37,19 @@ export default defineConfig({ link: "/javascript-application-workflows", }, { text: "Browser observation", link: "/browser-observation" }, + { + text: "Web network captures", + link: "/web-network-captures", + }, { text: "Electron observation", link: "/electron-observation" }, { text: "Process capture", link: "/process-capture" }, { text: ".NET assemblies", link: "/managed-code-analysis" }, { text: "Android applications", link: "/android-analysis" }, { text: "Apple applications", link: "/apple-application-analysis" }, { text: "Firmware", link: "/firmware-analysis" }, - { - text: "Reconstruction readiness", - link: "/reconstruction-readiness", - }, + { text: "SQLite databases", link: "/sqlite-databases" }, + { text: "Packet captures", link: "/packet-captures" }, + { text: "Signal recordings", link: "/signal-recordings" }, ], }, { @@ -67,6 +71,11 @@ export default defineConfig({ { text: "MCP contracts", link: "/mcp-contracts" }, { text: "Tool design", link: "/tool-design" }, { text: "Testing", link: "/testing" }, + { text: "Client verification", link: "/client-verification" }, + { + text: "Reconstruction readiness", + link: "/reconstruction-readiness", + }, { text: "Releasing", link: "/releasing" }, ], }, diff --git a/docs/adb-device-analysis.md b/docs/adb-device-analysis.md index 416e78161..12fd77cd2 100644 --- a/docs/adb-device-analysis.md +++ b/docs/adb-device-analysis.md @@ -88,7 +88,7 @@ existing analysis families directly, for example | `list_adb_packages` | read | `pm list packages -f` with scope; base APK device paths | | `resolve_adb_packages` | read | Case-insensitive package-name substring search with exact-match flag | | `inspect_adb_package` | read | `dumpsys package` projection: versions, install times, installer, flags, permission count | -| `list_adb_directory` | read | `ls -la`: kinds, permissions, owner, group, sizes, symlink targets | +| `list_adb_directory` | read | NUL-framed immediate children, including hidden entries: kinds, permissions, owner, group, sizes, symlink targets | | `pull_adb_package` | read | Complete split APK set from `pm path`, each file digested | | `pull_adb_file` | read | One absolute device path pulled and digested | | `capture_adb_screen` | read | One `screencap -p` frame (exec-out, no device-side file) with dimensions | @@ -102,6 +102,9 @@ existing analysis families directly, for example ## Interpret the result +- **Directory names retain whitespace and newlines.** Symlink targets do too, + including trailing newlines. Records containing invalid UTF-8 remain as + labelled hex in `unparsed_lines` and make directory coverage partial. - **Inferences carry their basis.** Device `kind` reports `kind_basis` (serial prefix or USB transport); APK `role` reports `role_basis: file_name`; `emulator_observed` is the build's own @@ -133,8 +136,8 @@ existing analysis families directly, for example ## Resource and lifecycle limits - Caller values reach adb only as positional arguments in fixed vectors; - no tool accepts an arbitrary shell command line, and UI interaction - (`input`, `am`, `monkey`) is deliberately not exposed. + no tool accepts an arbitrary shell command line, `input`, or `monkey`. + The app/activity lifecycle tools use `am start -W` and `am force-stop`. - Per-invocation budgets: client/devices 10-20 s, shell reads 20-60 s with 64 KiB-8 MiB capture caps (logcat 4 MiB, screen 32 MiB), transfers and bugreports 600 s. Exceeded budgets report `resource_constraint`; stopped @@ -145,6 +148,11 @@ existing analysis families directly, for example - Cancellation during a package pull preserves caller-selected output. The error includes partial observations identifying completed artifacts and the interrupted local path; remaining APKs were not attempted. +- Bugreports collect into isolated staging and publish with exclusive creation; + filename collisions select the next numeric suffix. If publication fails, the + completed archive remains in staging. The error's partial observation gives + its recoverable `local_path`, the original `adb_reported_path`, and an unknown + digest status. Later operations and shutdown preserve this retained evidence. - Failed package acquisition rollback retains its directory identity and retries cleanup before later work and during shutdown. Cleanup refuses a replacement directory. Terminal shutdown stops admission and drains active operations. diff --git a/docs/android-analysis.md b/docs/android-analysis.md index 5a4a2f879..d98d9b5da 100644 --- a/docs/android-analysis.md +++ b/docs/android-analysis.md @@ -9,6 +9,27 @@ This family is present on repository main and in npm 4.1.0. Check the [released package boundary](installation.md#released-package-and-main) and the connected server's tool list before selecting it. +## Optional package delivery + +The MCP `inspect_android_package` request keeps complete output when `detail` is +omitted or `"complete"`. Select `detail: "summary"` explicitly to receive all +package, SDK and permission declarations, engine identity and class/resource +counts without decoded manifest text or duplicate raw provider replies. A +retaining session keeps the complete original Evidence and returns a distinct +linked `inspect_analysis_view` summary. This changes delivery, not JADX analysis. + +Use the returned `normalized_result.parent_evidence_id` with +`inspect_analysis_view`, source kind `retained-evidence`, and +`view: {kind: "android", facet: "manifest", offset: 0, limit: 4096}` to read the +exact decoded manifest without reopening the APK. Offsets and limits count UTF-16 +code units; follow `coverage.next_offset`. The page preserves `source_status` and +`reported_total_bytes`: exhausting retained text does not make a partial decoded +manifest complete. Complete source Evidence remains exportable under the existing +session lifetime. Servers without retention reject summary before starting JADX. +One-shot CLI output remains complete. Older servers require the existing complete +request after schema discovery. APK authenticity and runtime behavior remain +unverified. + ## Supply tools Use a **full JDK 17 or newer** (including its compiler module) and diff --git a/docs/apple-application-analysis.md b/docs/apple-application-analysis.md index e00454c3e..666717fc5 100644 --- a/docs/apple-application-analysis.md +++ b/docs/apple-application-analysis.md @@ -174,7 +174,7 @@ Resolution follows dyld: - `@rpath` tries each `LC_RPATH` of the loading image first, then those of the image that loaded it, up to the process root. - Dependencies load dependents-first in load-command order, and each image - loads once per process. A later request whose install name matches an + loads once per process. A later @rpath request whose install name matches an already loaded image reuses it. - Symlinks such as `Versions/Current` are followed inside the analyzed root. An escape through `..` or an absolute link is `escapes-target`. diff --git a/docs/architecture.mermaid b/docs/architecture.mermaid index 83c6e5cb2..753c57024 100644 --- a/docs/architecture.mermaid +++ b/docs/architecture.mermaid @@ -6,7 +6,7 @@ graph TD end subgraph "Production Composition" - COMPOSITION["src/composition/
fresh typed provider and session factories
one-shot binding and independent optional loading"] + COMPOSITION["src/composition/
fresh typed provider and session factories
one-shot binding and independent optional loading
static WASM/EVM descriptors: named contracts, factories, retryable lifetimes"] end subgraph "Adapters" @@ -27,6 +27,7 @@ graph TD subgraph "Provider Layers" PWNTOOLS["src/native/pwntools/ + src/native/pwndbg/
BYO offline ELF/core adapters
owned snapshots/Python and optional core-only GDB
unchanged upstream parsers, ABI structures and mapping API"] + WASM["src/wasm/
caller-supplied WABT; immutable artifact inspection
owned process supervision and retryable workspace cleanup"] EVM["src/evm/
unchanged EVMole/WASM in bounded owned worker
explicit carrier parsing and inferred interface adapter"] HOPPER["src/hopper/
Hopper launch & Unix-socket protocol
BridgeLauncher, HopperClient, protocol"] GHIDRA["src/ghidra/
Ghidra discovery, profile & function analysis
snapshot, Unix/Windows transport, bounded lifecycle"] @@ -94,6 +95,9 @@ graph TD APP -->|record callbacks| RECORDS SERVER -->|narrow record ports| RECORDS RECORDS --> DOMAIN + COMPOSITION --> WASM + WASM --> PROCESS + WASM --> DOMAIN COMPOSITION --> PWNTOOLS PWNTOOLS --> PROCESS PWNTOOLS --> DOMAIN diff --git a/docs/binary-diagnostics.md b/docs/binary-diagnostics.md index fc110b685..29e10a33c 100644 --- a/docs/binary-diagnostics.md +++ b/docs/binary-diagnostics.md @@ -101,7 +101,9 @@ Complete results have a 32 MiB input, 64 MiB reply, 1 MiB combined diagnostics and 30-second owned command deadline. The reply budget applies to the decoder record; the CLI/MCP Evidence envelope adds copies and encoding overhead. The pinned MCP SDK defaults to a 10 MiB receive buffer. Large complete results need -a caller-configured `StdioClientTransport({ maxBufferSize: ... })`; the large +a caller-configured `StdioClientTransport({ maxBufferSize: ... })` and a matching +server `REA_MCP_MAX_RESPONSE_BYTES`. See [MCP delivery budgets](mcp-contracts.md#tool-results). +These settings affect delivery, not decoder coverage or limits. The large extended-index verification uses 256 MiB and an explicit five-minute request timeout in its separate opt-in MCP lane. REA does not silently truncate the result. Python lowers resource soft limits to at most 3 GiB virtual address space, 30 CPU seconds and 64 MiB file output. Inherited tighter soft/hard limits are diff --git a/docs/browser-observation.md b/docs/browser-observation.md index 6cdf2942a..2f73f4261 100644 --- a/docs/browser-observation.md +++ b/docs/browser-observation.md @@ -8,6 +8,10 @@ exported script's native imports under an explicit URL/import-map context. REA can attach to a user-owned Chrome-family browser through the Chrome DevTools Protocol (CDP) and produce bounded Evidence about an existing page. This is a passive reverse-engineering capability, not a general browser automation or remote-control surface. +For request/response bodies and traffic debugging, see +[Fiddler Everywhere captures and MCP](web-network-captures.md#reading-fiddler-captures-saz). +Inspect native SAZ or HAR 1.2 offline with REA, or connect Everywhere's separate MCP server. + ## Shipped surfaces - `list_browser_targets` / `rea list-browser-targets` discovers all eligible page targets at the endpoint by default, with an optional exact-origin filter. @@ -193,7 +197,15 @@ validation and resource bounds. Omitted script metadata makes its affected section explicitly truncated. Disallowed-origin entries are filtered before retention. -CDP discovery, WebSocket connection, and commands continue until the peer responds or the caller cancels the operation; REA has no internal byte, message-count, or pending-command quota for these exchanges. Without caller cancellation, a stalled peer can leave an operation waiting. On cancellation, REA closes only its own WebSocket, waiting up to one second before terminating it. Malformed unsolicited events and malformed replies to pending commands poison the connection so later commands fail closed. When a correlated reply reports a session ID, it must match the command's selected session. An optional method is reported unavailable only when the browser rejects it as unknown; other command rejections retain their reported failure. +CDP discovery, connection, and commands wait for the peer or caller cancellation; +a stalled peer can leave an operation waiting. WebSocket messages remain subject +to the [64 MiB limit](#request-boundary). REA does not impose a message-count or +pending-command quota. On cancellation, it closes only its own WebSocket, +waiting up to one second before terminating it. Malformed unsolicited events +and malformed replies to pending commands poison the connection so later +commands fail closed. A correlated reply's session ID must match the command's +selected session. An optional method is unavailable only when the browser +rejects it as unknown; other command rejections retain their reported failure. Network and console coverage starts only after REA attaches and enables the relevant CDP domains. `prior_activity_available` is always `false`; absence from these arrays is not evidence that an event never occurred. If CDP reuses a request ID without supplying redirect metadata, REA retains the predecessor observation and marks network coverage incomplete. diff --git a/docs/browser-scenario-contract.md b/docs/browser-scenario-contract.md index 16aaa2f36..403865be8 100644 --- a/docs/browser-scenario-contract.md +++ b/docs/browser-scenario-contract.md @@ -262,8 +262,13 @@ Capturing more data alone does not establish a website change. states. Captured bodies retain base64 bytes, byte count, media type, and SHA-256 of the retained bytes. Request bytes are those exposed by Playwright; a `not_exposed` request body does not prove absence or complete multipart file -coverage. Response bytes are decoded by the browser, not the compressed wire -representation. No later fetch is substituted for the original response. +coverage. Response bytes are the result of Playwright's `Response.body()` API. +Playwright may satisfy that API with a credentialed follow-up load of the +request URL when CDP has no response body. Event and transaction references +identify the associated Playwright response object, but do not verify that the +retained bytes came from the original network transaction. Successful selected +response bodies include this limitation in the capture. These bytes are not +the compressed wire representation. Headers preserve producer order and duplicates. Authorization, Proxy-Authorization, Cookie, and Set-Cookie values are null with `redacted: true`; ordinary values remain intact. Declared UTF-8 secret values @@ -307,3 +312,9 @@ artifacts carry their normalized before/after digests and capture states. Every changed or unknown artifact record is returned inline for each aligned step. Missing, truncated, or mismatched capture coverage remains unknown instead of being treated as equality. + +`scenario.event_families` records the sorted, de-duplicated `capture.events` +selection. Captures with different selections report event evidence as unknown +with a recovery instruction, even when no selected family emitted an event. +Captures written before this field existed omit it, so their event evidence is +also unknown. diff --git a/docs/cli.md b/docs/cli.md index 16afe0f56..dcd949e11 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -62,6 +62,14 @@ unpack .NET single-file hosts or decode IL2CPP metadata. NativeAOT method bodies require native analysis. See the [managed-code guide](managed-code-analysis.md) for supported deployment forms, selection semantics, and coverage limits. +## SQLite snapshots + +For a local database snapshot, use `rea inspect-sqlite-database PATH --json`. +Add `--table NAME --row-limit 20` to read a bounded sample from an ordinary +table. This command does not require a native analysis provider. See +[SQLite database snapshots](sqlite-databases.md) for database/WAL identity, +source-file handling and row-value semantics. + ## Native analysis Inspect embedded Go build metadata without installing Go or configuring a @@ -93,7 +101,7 @@ a function dossier; `decompile` returns pseudocode. For assembly instructions alone, use `rea instructions`. A macOS `.app` bundle can be supplied directly. Run `rea --help` or a command's `--help` for arguments and output options. -The [generated catalog](product-catalog.json) lists all CLI commands and MCP +The [generated catalog](mcp-contracts.md#generated-catalog) lists all CLI commands and MCP tools. Provider-specific target support is described in the [native guide](native-investigation.md), [DOS guide](ghidra-dos.md), [raw binary guide](raw-binary.md), and @@ -150,6 +158,10 @@ an exact result when the target bytes, operation, parameters, provider and settings match. Mutations and cursor-dependent calls are excluded from the cache. Snapshot files are local and use owner-only permissions. +Dispatching a metadata write invalidates the active session's snapshot cache, +even if its reply fails: the provider may already have applied the write. +Close and reopen the target before importing or saving another snapshot. + Snapshots retain eligible target-scoped question histories in full, including mutation Evidence recorded while another target was active. Observations and related questions must still belong to the saved target. If those dependencies @@ -203,7 +215,9 @@ rea import-reference-source /absolute/path/to/source ``` The import records hashes and metadata for the supplied files, separately -from observations of the current app. It honors the source tree's `.gitignore` +from observations of the current app. For a directory inside a Git checkout, +it records the HEAD of the nearest enclosing repository; whether the working +tree matches that commit remains unknown. It honors the source tree's `.gitignore` and applies default exclusions for common generated and dependency paths such as `node_modules/`, `dist/`, and `*.log`. Pattern-based exclusions record the matched pattern and whether it came from project, default, caller, or sensitive diff --git a/docs/client-configuration.md b/docs/client-configuration.md new file mode 100644 index 000000000..00e83e179 --- /dev/null +++ b/docs/client-configuration.md @@ -0,0 +1,280 @@ +# Client configuration and troubleshooting + +Use this reference when a client's configuration paths, profiles, trust settings, +or schema limits affect REA. Start with [installation and setup](installation.md) +for the reviewed setup transaction and [client IDs](installation.md#supported-agents). +The versioned verification notes below describe their stated runs; live service +acceptance is verified only where explicitly recorded. + +## Fiddler Everywhere alongside REA + +Connect Fiddler Everywhere's MCP server separately for HTTP traffic debugging, +preserving your REA client entry. See the +[setup instructions and public skills](web-network-captures.md#fiddler-everywhere-mcp-and-public-skills). + +## GitHub Copilot CLI + +For GitHub Copilot CLI 1.0.95, `gpt-4.1` model metadata can block ordinary +chat with REA's full input-schema profile before sending a model request +(`compaction_static_context_blocked`; [#1554](https://github.com/morluto/rea/issues/1554)). +For the native offline OpenAI-compatible BYOK adapter, full-profile chat and +analysis also passed with a distinct `COPILOT_PROVIDER_MODEL_ID` such as +`rea-gpt-4.1`, `COPILOT_PROVIDER_WIRE_MODEL=gpt-4.1`, and that distinct ID selected +through `copilot --model rea-gpt-4.1`. The local fixture requested +`COPILOT_PROVIDER_MAX_PROMPT_TOKENS=1000000`; configure the limit supported by +your backend. This keeps every full schema and the actual wire model intact. +It does not establish the effective client budget or fix the built-in-ID path. +The existing compact profile passed native chat and analysis with the complete +tool inventory on Linux using a loopback model fixture. After setup, add +`"REA_MCP_INPUT_SCHEMA_PROFILE": "compact"` to the `env` object of the +`mcpServers.rea` entry in Copilot's `mcp-config.json`, preserving its other +settings, then restart the client. Compact advertisements can reduce nested +schema constraints; REA still validates complete canonical inputs. Full-profile +`gpt-5.4` metadata is also verified locally. Live model API acceptance and +Windows remain unverified; see [native client verification](testing.md). + +## Claude Code + +Claude Code normally defers MCP tool definitions through tool search. It +[turns tool search off](https://code.claude.com/docs/en/mcp#configure-tool-search) +when `ANTHROPIC_BASE_URL` points to a non-first-party host, such as DeepSeek's +Anthropic-compatible endpoint. It then sends every REA tool's name, description +and input schema with every request +([#2019](https://github.com/morluto/rea/issues/2019)). On main at 04089d5be, +with 172 tools, that payload measured about 496 KB with the default profile and +about 290 KB with `compact`. By the o200k and cl100k tokenizers, that is roughly +120k and 68k tokens. Compaction cannot remove tool definitions. If they nearly +fill the window Claude Code assumes, the context refills after every compaction +and Claude Code reports that autocompact is thrashing. To avoid this: + +- Make Claude Code assume the model's actual context window. DeepSeek's Claude + Code guide selects `deepseek-flash[1m]`; the `[1m]` suffix makes Claude Code + assume a one-million-token window. For other unrecognized model IDs, set + `CLAUDE_CODE_MAX_CONTEXT_TOKENS` to the window the provider documents. +- If the endpoint forwards `tool_reference` blocks, set `ENABLE_TOOL_SEARCH=true` + to restore deferred loading. DeepSeek's Anthropic API guide does not list + `tool_reference` among its supported content blocks, so this setting may cause + its requests to fail. +- To shrink the upfront catalog, add + `"REA_MCP_INPUT_SCHEMA_PROFILE": "compact"` to the `env` object of the + `mcpServers.rea` entry in `~/.claude.json` (`$CLAUDE_CONFIG_DIR/.claude.json` + when that variable is set), then restart Claude Code. Setup keeps this + override. + +The sizes above come from REA's own `tools/list`. A live Claude Code session +against DeepSeek's API is unverified. + +## Pi + +For [Pi](https://github.com/earendil-works/pi/blob/main/packages/coding-agent/docs/mcp.md), +setup writes a `type: "stdio"` entry under `mcpServers.rea` in the user-level +`~/.pi/agent/mcp.json` and installs the bundled skill under `~/.agents/skills`. +Use `rea setup --client pi --dry-run --json` to inspect the plan, then +`rea setup --client pi --yes --json` to approve it. Check the registration with +`rea doctor --client pi --json`. Pi reads `mcp.json` as strict JSON, like its +own loader: comments, trailing commas, a byte-order mark, or an empty existing +file are invalid, and setup reports them instead of rewriting the file. Repair +such a file to plain JSON first, then rerun setup. + +Setup follows Pi's `PI_CODING_AGENT_DIR`: unset or empty selects the default; +`~` and `~/` expand to the home directory; absolute paths and file URLs select +that directory; relative paths stay relative to the command's working directory. +On Windows, native paths, `~\`, and Git Bash/MSYS, Cygwin, and WSL drive paths +are normalized as Pi does. Run REA and Pi from the same working directory when +using a relative override. Pi has no profiles: `OMP_PROFILE`, `PI_PROFILE`, +`PI_CONFIG_DIR`, and OMP's `enabledServers`/`disabledServers` lists do not affect +Pi registration. Doctor accepts an omitted `type` for stdio but reports a +non-stdio type as invalid; `enabled: false` stays disabled. + +REA configures only the user scope. Pi also reads `.pi/mcp.json` in trusted +projects; a same-name project entry can replace the user entry or override its +enabled state and exposure. Check that file if the user registration is aligned +but unavailable in a project. An extension that registers `/mcp` can replace +Pi's built-in MCP support and use its own configuration instead. Run `/reload` +in an existing Pi session after changing servers outside the session. + +## Qwen Code + +For Qwen Code, setup registers `rea` in the `mcpServers` table of the +user-level `~/.qwen/settings.json`, or `$QWEN_HOME/settings.json` when configured. +Setup and doctor follow Qwen Code's tilde and working-directory-relative home +overrides. Qwen Code also discovers personal skills in `~/.agents/skills`, +where setup installs the bundled workflow. + +## Antigravity + +Antigravity 2.0 discovers personal skills in `~/.gemini/config/skills`. +Setup installs its selected skill copy there. + +## Gemini CLI + +Gemini CLI uses `$GEMINI_CLI_HOME/.gemini/settings.json` when that home override +is nonempty, including its shared personal skills at +`$GEMINI_CLI_HOME/.agents/skills`. Setup and doctor check MCP allow/exclude +policies from system defaults, user settings, trusted workspace settings, and +system overrides. Workspace trust follows `GEMINI_CLI_TRUST_WORKSPACE`, +`GEMINI_RESTRICTED_MODE`, the effective `security.folderTrust.enabled` setting, +and the selected `trustedFolders.json` (including +`GEMINI_CLI_TRUSTED_FOLDERS_PATH`). Settings in an untrusted workspace do not +participate. A workspace or system `mcpServers.rea` replaces the entire user +entry; setup stops if the winning definition conflicts with its planned entry. +Review those files manually: setup never edits administrator/workspace settings +or grants workspace trust. Trust supplied only by a running IDE is outside this +standalone CLI check. + +## Codex and Devin + +Codex treats an unset or empty `CODEX_HOME` as `~/.codex`. Devin honors +`XDG_CONFIG_HOME` for its `devin/mcp_config.json` on non-Windows systems. + +## OMP + +For OMP, setup writes a `type: "stdio"` entry to the user-level +`~/.omp/agent/mcp.json`. It follows `PI_CONFIG_DIR` and +`PI_CODING_AGENT_DIR` (relative to the setup working directory), and the profile selected by `OMP_PROFILE` or +`PI_PROFILE` (`~/.omp/profiles//agent/mcp.json`). Setup also removes +`rea` from that file's `disabledServers` list, which would otherwise hide the +registration. Doctor treats an `enabled: false` entry as active when +`enabledServers` lists `rea`, as OMP does, unless `disabledServers` also lists +it. Run setup under each profile that should load REA. + +## Hermes + +For Hermes, setup writes a `mcp_servers.rea` entry to `config.yaml`, preserving +comments and unrelated settings. It resolves that file from `HERMES_HOME`, else +from the platform default Hermes itself uses — `%LOCALAPPDATA%\hermes` on +Windows, `~/.hermes` elsewhere — including any `HERMES_DATA_DIR_SUFFIX`. Hermes +connects an entry unless `enabled` is false, so setup states `enabled: true`. + +Hermes personal skills install under the active Hermes home's `skills` directory. +Setup, doctor and uninstall follow the root's `active_profile` selection, as +plain Hermes CLI commands do. An explicit `HERMES_HOME` pointing to +`profiles/` selects that named profile directly. An invalid, missing or +deleted sticky profile is reported instead of writing into the default home; +repair the profile or run `hermes profile use default` before retrying. +REA follows `HERMES_HOME` whitespace trimming, environment-variable expansion, +and home expansion before resolving that profile. Setup previews the resolved +configuration and skill destinations; doctor and uninstall use those same paths. + +## Qoder CLI + +For [Qoder](https://docs.qoder.com/cli/mcp-reference), setup writes +`mcpServers.rea` into the user-level `~/.qoder/settings.json` (the +`QODER_CONFIG_DIR` override is honored). Entries carry `command`, `args`, and +`env`; stdio is the default transport. Qoder CLI discovers personal skills +from `~/.qoder/skills` (following `QODER_CONFIG_DIR` when set), so setup +installs its skill copy there. + +## Trae + +For [Trae](https://docs.trae.ai/ide/add-mcp-servers), setup writes +`mcpServers.rea` into the user-scope `mcp.json` under Trae's VS Code-style +user directory (`%APPDATA%\Trae\User` on Windows, +`~/Library/Application Support/Trae/User` on macOS, and +`~/.config/Trae/User` elsewhere). Entries carry `command`, `args`, and +`env`; stdio is the default transport. Trae discovers personal skills from +`~/.trae/skills` (`%userprofile%\.trae\skills` on Windows), so setup +installs its skill copy there. + +The user-level MCP paths follow the editor's VS Code layout. Trae's official +documentation describes the raw JSON editor without specifying those paths; +loading this registration in Trae remains unverified. + +## ZCode + +For [ZCode](https://zcode.z.ai/en/docs/mcp-services), setup registers `rea` in the nested `mcp.servers` table of the +user-level `~/.zcode/cli/config.json`. Entries carry `command`, `args`, and +`env` without a transport discriminator. ZCode discovers personal skills from +`~/.zcode/skills` rather than the shared directory, so setup installs its +skill copy there. + +ZCode reads the user-scope `~/.agents/mcp.json` fallback only while the native +`.zcode` config defines no servers at all, with no merging. When setup writes +the first native server into an empty table, it copies the fallback's +`mcpServers` entries into the native table so they keep loading, and leaves +the fallback file untouched. Existing REA environment overrides are preserved +when refreshing its command. A malformed or unreadable fallback file fails setup instead of +being silently suppressed; repair or remove it and rerun. ZCode disables a +server with `enable: false` on its entry; doctor reports such a registration +as stale, and rerunning setup removes the flag to repair it. Native configuration +uses strict JSON; setup refuses comments, trailing commas and a BOM rather than +writing a registration ZCode cannot load. + +## DeepSeek Harness + +DeepSeek Harness registers MCP clients through a Cordis YAML patch sequence +rather than a `mcpServers` object. `rea setup --client dsh` appends (or +replaces) the REA entry in the home patch `$DSH_HOME/cordis.patch.yml` +(`~/.dsh/cordis.patch.yml` when `DSH_HOME` is unset), preserving unrelated +patches and comments. `rea doctor --client dsh` checks that same entry id. +`rea uninstall` removes it by scanning supported clients; uninstall takes no +`--client` flag. The home patch applies to every Harness profile, so the +registration is written once and no per-profile edit is needed. The written +entry is: + +```yaml +- insert: + - id: rea-mcp + name: "@deepseek-ai/dsh-mcp-client" + config: + serverName: rea + transport: stdio + command: /absolute/path/to/node + args: ["/absolute/path/to/rea/scripts/rea.mjs", mcp] +``` + +Setup preserves caller-owned Cordis expressions and replaces launcher fields +with literal values that doctor can verify. It refuses to edit an expression +that produces the entire REA config, or a group-targeted REA insertion. Use a +literal config and a root-level insertion as shown above. + +For a global npm installation, the launcher is under +`$(npm root -g)/rea-agents/scripts/rea.mjs`. Restart Harness after setup; it +exposes tools as `mcp__rea__`. Run `rea setup --skill --dry-run`, +review the destination, then `rea setup --skill --yes` to install the workflow +in `~/.agents/skills` (`$DSH_AGENTS_HOME/skills` when configured); Harness +discovers that directory, and its native `skill` tool can load +`reverse-engineer-anything`. + +REA's optional [native client verification](testing.md#end-to-end-integration-and-golden-evidence) +checks headless chat, skill loading, all tool input schemas and actual analysis +using the installed Harness and a local model fixture. This establishes the +Harness integration, with live DeepSeek API compatibility remaining unverified. +See the [Harness MCP guide](https://github.com/deepseek-ai/deepseek-harness/blob/639ed015397290b3745d163aafe02ffee4aa3f84/packages/mcp/mcp-client/README.md) +for its native configuration contract. + +## Other client settings + +For OpenCode, setup writes the V1 `mcp.rea` entry, which OpenCode V1 and V2 +both load. If the configuration already uses OpenCode V2's native +`mcp.servers` table, setup registers REA there instead and replaces any earlier +`mcp.rea` entry from REA. Setup honors `OPENCODE_CONFIG_DIR` and +`OPENCODE_CONFIG`, preferring the later-loaded JSONC file when both JSON and +JSONC exist. The ordinary XDG global configuration still participates when a +custom directory is selected. Doctor checks the merged user registration; uninstall removes +REA-owned entries from every applicable user file so an older entry cannot +become active again. Malformed applicable files block setup before changes. + +Grok Build loads `[mcp_servers.rea]` from `$GROK_HOME/config.toml`, or from +`~/.grok/config.toml` when `GROK_HOME` is unset or empty. Setup edits that server +table, `[mcp_servers.rea.env]`, and a root `disabled_mcp_servers` entry that +names `rea`. It sets `startup_timeout_sec = 30` and leaves every other name +in that list. The shared skill installed under `~/.agents/skills` is already +on Grok Build's skill path. + +Grok Bot (`grok_bot`) is detected from `~/.grokbot`, or from `SAND_DATA_ROOT` +when that value is an absolute path. A relative or empty `SAND_DATA_ROOT` +stays on `~/.grokbot`. That directory is not the connector store. Grok Bot +keeps connectors in the signed-in account and runs them on its hosted +computer. It does not import `mcp.json` from the data directory, and it does +not attach a stdio server running on this machine. Setup does not call the +account connector API, does not write a registration file, and does not report +the data directory as aligned. Ask the Grok Bot chat to add a custom MCP +server named `rea` that runs on the Bot's computer: + +```bash +npx -y rea-agents@ mcp +``` + +Do not put credentials in that command or its arguments. `rea doctor --client grok_bot` +reports this manual step. `rea uninstall` does not remove the account connector. diff --git a/docs/client-verification.md b/docs/client-verification.md new file mode 100644 index 000000000..42e059382 --- /dev/null +++ b/docs/client-verification.md @@ -0,0 +1,517 @@ +# Client and agent verification + +Use these optional lanes to verify an installed client or evaluate an agent's +REA workflow. [Testing REA](testing.md) provides the normal development commands +and provider lanes. Each record below states its host, client version, model +fixture, and remaining coverage; a native-client run with a loopback model does +not establish live model-service acceptance. + +## End-to-end, integration and golden evidence + +The optional `verify:qwen-client`, `verify:pi-client`, and `verify:hermes-client` +lanes require an installed native client. Select its executable with +`REA_VERIFY_QWEN_COMMAND`, `REA_VERIFY_PI_COMMAND`, or `REA_VERIFY_HERMES_COMMAND`. +They configure disposable profiles through the public REA CLI, preserve caller +settings and backups, and exercise real stdio MCP calls and skill loading. The +`call` mode checks complete catalog discovery and actual JavaScript Evidence; +pass `-- chat` to check plain chat with REA enabled. Qwen also reads the full +result that its client offloads, and Pi exercises default codemode execution. +Use `REA_VERIFY_RUNTIME_ROOT` to select a production-only installed REA package. +Receipts retain client versions, result digests, host coverage and owned-process +cleanup. These POSIX lanes use a deterministic loopback model, so they do not +prove live model-provider or native Windows compatibility. Qwen, Pi and Hermes +bind both `HOME` and `USERPROFILE` to the disposable account. Qwen and Pi discover +the shared personal skill through their default search paths without an explicit +skill setting; Hermes discovers it through the selected `HERMES_HOME`. +Set `REA_VERIFY_HERMES_STICKY_PROFILE=1` to exercise native Hermes selection of +a named sticky profile with `HERMES_HOME` still pointing to its root. + +`verify:gemini-client` requires an installed Gemini CLI (verified with +`@google/gemini-cli@0.63.0` on POSIX and native Windows); select it with +`REA_VERIFY_GEMINI_COMMAND`. A selected `.js`, `.mjs` or `.cjs` entry point runs +under the verifier's Node. On Windows, select the npm install's +`node_modules/@google/gemini-cli/bundle/gemini.js`, because only a `gemini.cmd` +shim reaches `PATH`. +The optional lane uses native `GEMINI_CLI_HOME` discovery in an isolated +Git project, checks setup plans, backups and idempotence, activates the installed +personal skill, validates all forwarded input JSON Schemas against their declared +dialect, forwards the complete REA catalog and checks full JavaScript +Evidence for a Unicode path. Use `-- chat` for ordinary chat with REA enabled, +or `REA_VERIFY_RUNTIME_ROOT` for a production-only installed REA package. +The local fixture exercises the real Gemini API adapter, including its +`untrusted_context` tool-result envelope. Token counts are synthetic; live +Google API compatibility remains unverified. The lane disables +the client's memory-based relaunch to preserve the caller's Node heap budget. + +`verify:opencode-client` requires an installed OpenCode (verified with +`opencode-ai@1.18.35`); select it with `REA_VERIFY_OPENCODE_COMMAND`. +The optional POSIX lane configures isolated XDG roots and `OPENCODE_CONFIG_DIR`, +checks setup plans, backups, preserved JSONC comments and idempotence, activates +the installed skill, validates all forwarded input schemas and verifies complete +JavaScript Evidence for a Unicode path. JSONC is the default fixture; set +`REA_VERIFY_OPENCODE_CONFIG_FORMAT=json` for JSON. Use `-- chat` for ordinary +chat or `REA_VERIFY_RUNTIME_ROOT` for a production-only installed package. +The native core runs with external plugins disabled through `OPENCODE_PURE`; +the local OpenAI-compatible fixture has a caller-declared one-million-token +context and synthetic usage. Skills use an explicit isolated `skills.paths` +directory, so default OS-home discovery remains unverified. Live model APIs and +native Windows are also unverified. + +`verify:claude-client` requires installed Claude Code (verified with +`@anthropic-ai/claude-code@2.1.296` on POSIX and native Windows); select it +with `REA_VERIFY_CLAUDE_COMMAND`. On Windows, select +`claude.exe`: npm installs put only a `claude.cmd` shim on `PATH`, and the real +executable is under `node_modules/@anthropic-ai/claude-code/bin`. +The optional lane uses native `CLAUDE_CONFIG_DIR` discovery, an independent +Git workspace, user settings and default built-in tools. It preserves caller +preferences and backups, checks idempotent setup, waits through the native +`WaitForMcpServers` tool when discovery is pending, and validates the complete +catalog and forwarded input schemas. Call mode loads the personal skill through +native `Skill`, checks its full body and verifies named-schema JavaScript Evidence +for a Unicode path. Use `-- chat` for ordinary chat with REA enabled, or +`REA_VERIFY_RUNTIME_ROOT` for a production-only installed package. The local +Anthropic Messages/SSE fixture preserves native resource-hint envelopes in its +request artifacts. Usage is synthetic; live Anthropic API and bare-mode +personal-skill activation remain unverified by this lane. + +`verify:copilot-client` requires installed GitHub Copilot CLI (verified with +`@github/copilot@1.0.95`); select it with `REA_VERIFY_COPILOT_COMMAND`. +The optional POSIX lane uses native `COPILOT_HOME` discovery, an independent +Git workspace, guarded setup plans, preserved registrations, backups and +idempotence. Native `skill add` registers the isolated installed skill; call +mode loads its full body, validates all forwarded input schemas and checks +named-schema JavaScript Evidence for a Unicode path. When Copilot spills a +large MCP result, the model requests native `view` with `forceReadLargeFiles` +and validates the complete returned Evidence rather than its preview. +Use `-- chat` for ordinary +chat or `REA_VERIFY_RUNTIME_ROOT` for a production-only installed package. +The native offline BYOK adapter uses a loopback OpenAI completions/SSE fixture +and `gpt-5.4` model metadata; model inference and token usage are synthetic. +Set `REA_VERIFY_COPILOT_MODEL` to examine another client model ID and +`REA_VERIFY_COPILOT_WIRE_MODEL` for its backend model name (defaults to the client +ID). Every actual HTTP request's model is checked and recorded separately. +Both `HOME` and `USERPROFILE` point to the disposable account; native `skill add` +still selects the installed skill directory explicitly. + +The same native client passed full-profile chat and analysis with the actual +wire model `gpt-4.1` under a distinct BYOK model ID: + +```bash +REA_VERIFY_COPILOT_MODEL=rea-gpt-4.1 REA_VERIFY_COPILOT_WIRE_MODEL=gpt-4.1 npm run verify:copilot-client -- chat +REA_VERIFY_COPILOT_MODEL=rea-gpt-4.1 REA_VERIFY_COPILOT_WIRE_MODEL=gpt-4.1 npm run verify:copilot-client -- call +``` + +These runs retain full canonical input/output schemas, all tools, installed-skill +loading and complete Evidence readback. They use the fixture's requested +one-million-token BYOK prompt setting; effective capacity and live API acceptance +remain unknown. With the built-in `gpt-4.1` model ID, the verified client still +blocks the full input-schema profile before HTTP with +`compaction_static_context_blocked`, even when requesting a larger BYOK prompt +capacity. The effective capacity is unknown. The default verifier preserves +the complete catalog and full schemas. To verify the existing compact profile: + +```bash +REA_VERIFY_COPILOT_MODEL=gpt-4.1 REA_VERIFY_COPILOT_SCHEMA_PROFILE=compact npm run verify:copilot-client -- chat +REA_VERIFY_COPILOT_MODEL=gpt-4.1 REA_VERIFY_COPILOT_SCHEMA_PROFILE=compact npm run verify:copilot-client -- call +``` + +Both native workflows passed with the complete tool inventory. The verifier selects the +profile only in its disposable Copilot registration and records it in the +receipt. Compact advertisements can reduce nested validation structure; the +server still validates complete canonical inputs. This is a tested alternate +workflow, not a fix for the full-profile client/model limit tracked in #1554. +Live model APIs, native Windows and default OS-home skill discovery remain +unverified. + +`verify:grok-client` requires installed Grok Build (verified with the official +Linux x64 1.0.50 binary); select it with `REA_VERIFY_GROK_COMMAND`. This optional +POSIX lane isolates `GROK_HOME`, an independent Git workspace and additional +skill roots, disables foreign configuration discovery, guards setup writes, +preserves unrelated registrations/backups and checks idempotence. Call mode +loads the full skill through native `read_file`, queries all REA names and input +schemas through native `search_tool`, and calls analysis through `use_tool`. +If discovery reports `partial`, the native agent diagnoses REA registration and +retries discovery. No startup-timeout override or fixed readiness delay is used. +A larger Unicode-path fixture exercises native result offloading: the full +retained Evidence is validated against its named schema, then native terminal +queries recover the selected export facts, subject and full artifact digest in +the next model request. This verifies useful artifact recovery without claiming +that every offloaded graph fact enters model context. Native line-number and +truncation envelopes remain in the request artifacts. Use `-- chat` for ordinary +chat, or `REA_VERIFY_RUNTIME_ROOT` for a production-only installed package. +The loopback OpenAI completions/SSE custom model declares a one-million-token +context and synthetic usage. Live xAI APIs, native Windows and default OS-home +skill discovery remain unverified. + +`verify:commandcode-client` requires installed Command Code (verified with npm +1.79.2); select it with `REA_VERIFY_COMMANDCODE_COMMAND`. Auth, MCP tokens and +sessions use the actual OS home, so provision a disposable POSIX account rather +than overriding `HOME`. Set `REA_VERIFY_COMMANDCODE_ACCOUNT_HOME` to that account's +actual home and create `.rea-client-verification` there with exactly +`Disposable REA client verification account` followed by a newline. The lane +owns that account's `.commandcode` configuration and shared REA skill. Build the +runtime as the checkout owner, then run `node scripts/verify-commandcode-client.mjs` +as the disposable account; the npm shortcut also needs a writable checkout. +The verifier does not create accounts or install clients. It guards setup +targets, preserves an unrelated registration and backups, checks idempotence, +and verifies native default shared-skill discovery and complete activation. +Default deferred-schema delivery stays enabled: the native prompt advertises +every REA tool, exact-name `search_tools` returns every input schema, and a native +shell query recovers the saved catalog's count and digest when the client spills +it. Actual analysis of a Unicode-path fixture delivers full named-schema Evidence +to the next model request. Use `-- chat` for ordinary chat or +`REA_VERIFY_RUNTIME_ROOT` for a production-only installed package. The loopback +OpenAI completions/SSE model is a keyless BYOK endpoint declaring a million-token +context with synthetic usage. A synthetic account-key value satisfies the +client's print-mode gate; native local-only mode refuses hosted API calls. +Updates, telemetry and cron are disabled. Hosted authentication, live models +and Windows remain unverified. + +`verify:omp-client` requires installed OMP (verified with the official Linux x64 +18.8.7 binary); select it with `REA_VERIFY_OMP_COMMAND`. This optional POSIX lane +isolates the default agent, global config and XDG roots, guards setup targets, +preserves unrelated registrations and backups, and checks idempotence. It +compares native rejection of an invalid profile with REA's refusal to plan +fallback writes. OMP's default `xd://` interface mounts the complete REA catalog +as devices: call mode reads the complete installed skill and tool documentation, +then dispatches analysis through native `write`. It checks full named-schema +JavaScript Evidence with a Unicode path in the next model request. Device +metadata and documentation are distinct from forwarding all JSON schemas as +model functions. Native print-mode MCP readiness uses its defaults. +Use `-- chat` for ordinary chat or `REA_VERIFY_RUNTIME_ROOT` for a production-only +installed package. The loopback OpenAI completions/SSE model fixture declares a +one-million-token context and synthetic usage. Live model APIs, native Windows, +named-profile native execution and default OS-home skill discovery are +unverified; skill discovery uses an explicit isolated custom directory. + +`verify:deepseek-client` requires an installed DeepSeek Harness (`dsh`; +verified with `@deepseek-ai/dsh@0.2.0-rc.2`) and Git. Set +`REA_VERIFY_DEEPSEEK_COMMAND` to select its executable. This optional POSIX lane +seeds caller model settings and a stale Cordis registration in an isolated +`DSH_HOME`, then runs public `setup --client dsh` dry-run, setup, repeated setup, +and scoped doctor. It checks the backup and unrelated patches before booting +Harness with the generated registration. After native execution it uninstalls +through the public CLI and checks that only caller patches remain. `HOME` and +`USERPROFILE` point to the disposable account. The native default +`~/.agents/skills` search path discovers +the installed skill without a `DSH_AGENTS_HOME` override. A separate Git root prevents inherited project skills from +masking a missing installation. The default `call` mode checks skill loading, +complete catalog discovery, the actual forwarded input schemas and regexes, +and full JavaScript Evidence for a Unicode path. Use `-- chat` for ordinary +chat with REA enabled, or `REA_VERIFY_RUNTIME_ROOT` for an installed package. +The fixture uses Harness's custom OpenAI adapter and the one-million-token +context capacity declared by its default DeepSeek Flash model; it does not +establish live DeepSeek API or native Windows coverage. Receipts include +request artifacts, result digests and owned-process lineage. + +The DSH acceptance journey also exercises public setup, approval, doctor, +generated-launcher MCP startup and uninstall without an installed Harness. +That journey proves REA workflow behavior, not native Cordis expression +evaluation. Filesystem regressions retain tagged values and unrelated rows +across alias dependencies and check refusal of unsafe YAML without mutation. + +Full E2E tests invoke the production command dispatcher and real providers, +without fake launchers, runners or responses. `verify:keyed-archive` writes +Foundation binary, XML, and integer archives using one run-owned Swift module +cache. It checks CLI and separate stdio MCP parity, pagination, escaping-path +rejection, an XML graph golden, and numeric meaning for safe controls, unsafe +integers, boxed numbers, and integral-valued reals. `verify:asset-catalog` +compiles source-owned colors with +`actool`, invokes real `assetutil`, then checks CLI/MCP results, exact catalog +digest, every raw metadata field, pagination and malformed input rejection. +Neither artifact workflow requires Hopper or launches it. Both run in macOS CI. +`verify:macos-bundle` needs only macOS with Command Line Tools. It compiles a +source-owned app with `clang`: a versioned framework, XPC services, an app +extension, a login item, a privileged helper, launchd plists, and a helper tool, +signed ad hoc. It packs the app as a directory, a `ditto` ZIP, and an APFS DMG, +then checks that `inspect-artifact` plus `project-apple-application-graph` +report the same bundle anatomy for all three through the CLI, with stdio MCP +parity. It also checks that the DMG is detached afterwards. The same app +covers `trace-dylib-resolution`: + +- each resolution status and finding, with CLI/MCP parity; +- for every traced image, dependencies, rpaths, and install names equal to + `otool -l`; +- for the main executable and an XPC service, a predicted load order equal to + the images dyld actually loads under `DYLD_PRINT_LIBRARIES`. + +The lane also compiles executable/library pairs with empty embedded directory, +versioned-path, and suffix settings. It checks present and removed dependencies +through CLI and MCP, and compares actual `DYLD_PRINT_SEARCHING` diagnostics for +root-level candidates. These cases distinguish an empty search directory from +an empty versioned scan or a suffix that only repeats the original path. + +It runs in macOS CI. + +Prepare the native inspector before cases that measure producer output or exit +behavior; keep startup deadlines and cancellation in distinct cases. Run real +process-capture verification separately from package or build checks. On macOS, +new npm processes can become token-unreadable after changing their display +title and prevent verified cleanup during a capture's ownership sweep. + +MCP SDK transport tests with recording providers remain integration tests. +They are useful for schema drift and failure projection but do not prove that +Hopper, Ghidra or another substituted engine works. `verify:package` proves +packaging/install behavior and fake-provider integration; use the corresponding +real-provider lanes for engine claims. Packed-bridge checks verify shipped files and Python syntax. +Real Apple dispatch and Interface +Builder verifiers currently prove format integration through production readers. + +`verify:hopper` exercises an installed Hopper through the production stdio MCP +server and CLI. It checks source-owned call chains, CFG edges, references and +complete large inventories, then probes unnamed bookmarks, annotation clearing, +batch validation before mutation, malformed addresses and regexes, segment-end +partial reads, and synthetic file-offset rejection. Advertised schemas are +validated in their JSON Schema dialect and successful replies are checked against +their advertised output schemas. Navigation checks cover interior-object cursor +readback and mapped-memory boundaries. Annotation probes verify invalid native +text and duplicate destinations/names before mutation, preserve unselected label +owners, and exercise explicit batch label swaps. Function locals retain observed +names and stack displacements. Graph probes check symbol/interior-address parity +and a source-owned recursive cycle; literal tracing preserves complete queries +and whitespace. Disposable binary copies prove that switching and closing +actually removes the native document, and that CLI byte, function-dossier, +literal-trace results and invalid-address diagnostics agree with MCP. +No provider is mocked in this lane. +Real search probes cover Unicode names, literal metacharacters, case and regex +modes, annotation cache invalidation, complete native fragments of long literals +checked against byte reads, escaped UTF-8/control text, byte-preserving Latin-1 +decoding, and Hopper's UTF-16 symbol-name truncation boundary. It verifies native +CallReference classifications across reference and dossier results, retains long +string fragment metadata in dossiers, and exercises pathological regex deadline +and cancellation followed by successful requests in the same native session. When the macOS +Objective-C fixture is present, the lane also verifies native UTF-16 string objects +and their inferred encodings against their actual bytes. Native terminal calls +are checked across reference, instruction, assembly, block-range and procedure-length +projections; block endpoints are normalized using actual native membership. +Exact Objective-C names also exercise named CLI selectors for function, instruction, +decompilation, reference and search operations. A literal `--help` trace query proves +that selector data is preserved independently of global CLI flags. +Unmapped annotation destinations and +oversized later batch names fail before any earlier edit is applied. + +`verify:hopper:deadlines` checks the native client's optional request deadlines +on macOS with an owned source-built fixture. Zero and elapsed deadlines must +leave native comments unchanged, including when a synchronous progress observer +delays timer dispatch. It also observes a short analysis deadline and verifies +subsequent wire recovery and clean shutdown. Caller timeout does not interrupt +Hopper's synchronous native operation. Socket boundary tests deterministically +cover active and queued expiry, late replies and timer cleanup. + +The Linux demo lane remains a separate `verify:hopper:linux` command. Hopper +6.4.2's ELF loader did not recognize the original 4,119-byte literal or three +non-ASCII byte strings in the measured fixtures. The lane retains complete raw +byte checks for those literals through source-owned symbols. Recognition of the +original full-length literal is bound to its exact source address; its decoded +object coverage remains explicitly unverified on Linux even when recognized. +Absent non-ASCII recognition also reports decoded-object coverage as unverified. +Recognized non-ASCII and control-text objects must still match their source +bytes, encoding, filters and searches. +A separate 548-byte ASCII literal requires native fragmentation, shortened +provider display, complete decoded fragments and dossier provenance on Linux; +the macOS lane retains the original full-length recognition requirement. These +are observed fixture/build capabilities, not universal Hopper length limits. +Its lifecycle checks attempt competing CLI launches for the active target and a +different target, requiring rejection before either can change the owning +MCP session's documents or procedures. Lease boundary tests also preserve +unresponsive or malformed live endpoints while allowing confirmed stale +sockets to recover. + +`verify:setup:linux` exercises installation on a clean supported Linux runner as +root. Use a disposable VM: this lane installs Hopper and its Linux runtime +dependencies through the system package manager. Set `REA_VERIFY_SERVER_COMMAND` +to the CLI entrypoint being verified. The command builds and checks source-owned +ELF fixtures before testing the read-only Hopper setup plan, approved +installation, scoped doctor, real CLI/MCP analysis, rejection of a modified +launcher, idempotent setup without requesting a reinstall, and owned child +cleanup. Before installation and after teardown, a clean-runner process scan +also rejects surviving Hopper demo helpers or Xvfb groups, including orphans +whose launcher exited. This scan observes processes without signaling them. +Hopper detection compares executable file identity through `/proc`, covering +alternate or configured launcher paths even after an invoked symlink is removed. +The dedicated runner must have no unrelated Hopper/Xvfb sessions. It requires +the repository's pinned development toolchain and an +existing host C compiler, `file`, `nm`, and `strings`. Use `verify:hopper:linux` +instead when Hopper is already installed. + +`verify:hopper:fat` is a separate macOS lane requiring installed Hopper and the +existing Xcode clang/lipo toolchain. It compiles arm64/x86-64 thin executables and +one- and two-slice FAT32 containers, verifies exact/interior address mappings +against bytes in the original files, checks CLI/MCP parity, and checks owned +runtime cleanup. Source byte changes, removal, permission denial (for non-root +callers), and nonregular replacement must retain native partial mapping facts, +reject unverified original-file coordinates, +and recover after restoration. Single-slice FAT cases also relocate the slice +without changing its loaded bytes. `verify:hopper:fat64` additionally checks +FAT64 preparation through Hopper's native Mach-O loader, source-container +mappings, profile identity, +malformed and ambiguous slice rejection, and temporary-image lifetime. Both +lanes have been verified on Hopper 6.1.0-demo; this establishes REA's prepared +FAT64 workflow, not native FAT64-loader support. +Cross-architecture fixture compilation is not required by `verify:hopper`. + +Golden tests use immutable captured text inputs with producer/source provenance +under `tests/fixtures/golden/`. Expected results are reviewed for the semantic +claim; capture commands do not automatically approve new expected outputs. +Do not call handcrafted utility output or synthetic binary builders real-data +goldens. Keep unsupported binary layouts and malformed boundaries as targeted +regressions until a real fixture establishes equivalent coverage. + +`verify:browser` exercises source-map failure isolation and expanded-output limits through the compiled CLI and stdio MCP with real Chrome. It also submits five 2 MiB source-map annotations, checks retained script identities and explicit map omissions, and closes its owned fixture target. Replacement and document-reset behavior has separate producer-boundary coverage. + +The raw Chrome fixture launchers use `--password-store=basic` so Linux startup +does not wait for an unlock prompt from a reachable but locked desktop keyring. +Such a stall leaves the initial page unloaded with empty or placeholder CDP URLs; +it does not establish permission to capture that page. See +[the keyring diagnosis](https://github.com/morluto/rea/issues/1384#issuecomment-6093781686). + +`verify:browser` also captures a source-owned noise canvas as a real PNG above +8 MiB through the CLI and stdio MCP, with complete byte/digest parity and real PNG +decoding. Its SDK client explicitly permits the larger inline JSON response; +this lane does not establish large image-comparison request transport coverage. + +The scenario checks read locale, timezone, device scale and viewport dimensions +from actual page JavaScript through CLI and stdio MCP DOM captures. They also +verify that attached-page emulation is released after success, initialization +failure, action failure and cancellation while the external target stays open. + +`verify:browser:network` is a focused real-browser lane for transaction identity, +selected request/response bytes, binary and compressed responses, duplicate +headers, credential and declared-secret redaction, redirects, streaming cutoff, +CLI/MCP parity, and owned-profile cleanup. Set `REA_BROWSER_EXECUTABLE` to an +installed Chrome-family browser. An optional script argument selects an already +installed package's `scripts/rea.mjs` entry point for packaged-artifact checks. +The complete `verify:browser` lane includes these same checks. + +After building, `verify:browser:dom` checks empty and HTML-whitespace form +destinations against a native Chrome DOM-property oracle through CLI and stdio +MCP. It requires `REA_BROWSER_EXECUTABLE` and accepts an optional installed REA +entrypoint. The full browser lane includes the same public-adapter assertions +before other fixtures navigate the selected page. + +`verify:browser:scripts` checks active script capture → exact-byte export → +existing static JavaScript analysis through CLI and stdio MCP, including +manifest readback, competing query variants, and resolved relative imports. +It uses an installed browser and accepts an optional installed REA entrypoint. +The complete `verify:browser` lane also exercises passive script export through +both public adapters. See [website script export](website-script-export.md). + +`verify:browser:modules` compares CLI and stdio MCP traces against an independent +real Chromium module-loading fixture: import-map scopes, package prefixes, +null/backtracking rejection, query/fragment identities, repeated module instances, +lazy and computed unknowns, exact source/map identities and no implicit refetch. +Set `REA_BROWSER_EXECUTABLE`; the optional script argument selects an installed +package entrypoint. The complete `verify:browser` lane and existing conditional +Chrome CI include this verifier. See [module relationships](website-module-trace.md). + +## Agent evaluation and conformance records + +Evaluate native, JavaScript, managed and browser investigation tasks through a +real local Codex CLI with: + +```bash +npm run verify:agent +``` + +The lane runs scenarios sequentially in standalone Codex (`--no-daemon`) with a +disposable HOME and CODEX_HOME under `~/.cache/rea-agent-evaluations/`. Set +`REA_AGENT_EVAL_ROOT` to choose another parent directory outside the OS temporary +directory: current Codex refuses helper aliases under `/tmp`, preventing shell +commands and skill reads even if MCP works. Each owned run directory is removed +after verification unless fixture retention is requested. The lane +installs the packaged skill and MCP registration through public `rea setup`, +rather than copying a skill into a project that also inherits the caller's +skills and configuration. Only authentication is copied, when present, and it +is removed even with `REA_AGENT_EVAL_KEEP_FIXTURES=true`. No user configuration, +rules, plugins or history is copied; shell snapshots and additional agents are +disabled. Existing API-key environment authentication remains available. +The native missing-provider scenario preapproves only `open_binary` and +`close_binary` in the disposable client so it reaches REA's actual provider +boundary instead of stopping at Codex approval. This does not validate a real +native engine or authorize arbitrary runtime execution. + +Select a smaller run with `REA_AGENT_EVAL_SCENARIOS`, a comma-separated list of +scenario IDs. `asar-zh` exercises the packaged desktop rubric from a Chinese +request. `javascript-module-view` exercises summary analysis, module paging and +item inspection in a tree with unrelated modules; its routing and text checks +remain heuristic, so review the retained transcript for selector choice and +coverage claims. Set `REA_CODEX_CLI` to an installed Codex executable and +`REA_AGENT_EVAL_MODEL` to an account-supported model. Use an external resource +limit for the whole process tree when testing on a constrained host; a Node +heap limit alone does not bound client and child-process memory. + +`missing-target` leaves desktop fixtures visible without selecting one in the +request. It requires zero REA calls and a structured request for an app name or +artifact path. Its `expectedFirstTool` is `null`, and +`targetClarificationPassed` grades that limited routing outcome independently +of analysis prose heuristics. Analyzing a nearby example cannot pass this case. + +The packaged desktop and parser-comparison scenarios now assess a closed set of +known fixture claims. Each final answer must be a strict JSON manifest containing +exactly the requested claim IDs, values, Evidence IDs, and Evidence authority and +confidence. Golden values are not included in the prompt. The evaluator checks +exact values against both the fixture oracle and authenticated successful REA +results; an Evidence ID by itself is insufficient. Missing, duplicate, extra, +contradictory, incorrectly sourced, or unsupported claims fail the scenario. + +The desktop rubric covers the exposed bridge API and members, renderer and main +IPC operations, and the resolved preload. It binds its Evidence to the exact +packaged artifact path and SHA-256. The parser rubric checks the precise heading +depth addition, discriminant, complete comparison counts, and the explicit limit +on runtime semantics. Its comparison must link to the two delivered source +analyses and use the requested module and export selectors. Boundary tests package +the same source-owned desktop fixture and compare the same source-owned parser +files through actual MCP tool results, then verify that fabricated answers fail. + +Per-scenario `factualCorrectness` is `passed`, `failed`, or `not_assessed` within +the `configured_fixture_claims` scope. A pass establishes only the configured +claims, not unrestricted factual correctness. Native, managed, browser, +navigation-context, and address-context scenarios have no factual rubric and +remain `not_assessed`; the managed workflow requires both artifact and member +inspection to answer its type and entry-point question. + +The closed factual scenarios request complete producer Evidence on the initial +analysis so their source selectors can authenticate all configured facts. +Summary/page/item workflows are exercised separately by `javascript-module-view`; +its heuristic gate does not establish full-producer factual correctness. + +All scenarios retain routing, workflow, validation, repetition, process-exit, +and token-use gates. Configured factual scenarios additionally require a factual +pass. Their answer-text heuristics are diagnostic and do not affect the gate. +Validation counts include complete text-only REA `invalid_request` envelopes +and failed SDK calls whose arguments violate the named current REA contract. +Client approval rejections and provider unavailability remain distinct failures; +truncated JSON previews are not parsed into invented error codes. +Repeated `binary_session` observations separated by a successful `open_binary` +or `close_binary` are treated as lifecycle verification. An unchanged retry, +including one after a failed lifecycle call, still counts as repetition. +Scenarios without a rubric retain the legacy text-heuristic gate. +`answerTermCoverageMet` checks case-insensitive substrings, +`epistemicCuePresent` checks keywords, and `finalCitesEvidence` checks only an ID's +presence. These metrics can still accept fabricated prose and must not be read +as factual assessments. Set `REA_AGENT_EVAL_TRANSCRIPT_DIR` to retain complete +tool results and final answers for review. + +Report schema version 4 adds negative routing scenarios with nullable +`expectedFirstTool` and a `targetClarificationPassed` outcome. Consumers must +allow an expected absence of REA calls; this does not make an analysis scenario +pass without its required tools. Version 3 changed the top-level +`factualCorrectness` from a constant +string to an assessment summary with status, scope, and assessed/passed/failed/ +not-assessed scenario counts. Scenario records include the factual assessment and +configured claim IDs. The evaluation scope is +`routing_workflow_and_configured_fixture_claims`. Update report consumers for +these changes. The narrower heuristic field names introduced in version 2 remain: +`answerHeuristicsMet`, `epistemicCuePresent`, `answerTermCoverageMet`, and +`requiredAnswerTermGroups`. + +Regenerate the managed conformance manifest and Evidence completion ledger from +live verification results, or check them for drift: + +```bash +npm run evidence:generate +npm run evidence:check +``` + +The records preserve unsupported and unverified coverage as explicit unknowns. +Run the matching real-tool prerequisites described in this guide. diff --git a/docs/evm-bytecode.md b/docs/evm-bytecode.md index 8db25973e..972d8b92c 100644 --- a/docs/evm-bytecode.md +++ b/docs/evm-bytecode.md @@ -35,7 +35,7 @@ license](https://github.com/morluto/rea/blob/main/third_party/evmole/README.md) and whitespace. Decoded-byte SHA-256 identifies actual selected EVM bytes. Neither digest is the Ethereum Keccak code hash. - Full bytecode, upstream function offsets and original producer representation - are returned inline. Offsets are byte positions in decoded bytecode. + are returned inline by default. Offsets are byte positions in decoded bytecode. - Upstream also returns terminal metadata during selector recovery. Its reported values remain in `raw_result`; integer precision and non-text-key coverage are unknown in the JS binding. Full bytecode retains the original encoded metadata. @@ -47,6 +47,49 @@ license](https://github.com/morluto/rea/blob/main/third_party/evmole/README.md) - Analysis is offline: no target runtime execution, implicit chain/RPC/explorer lookup, wallet action, transaction broadcast or network request. +## Selected interface delivery and retained views + +Existing CLI calls and MCP calls with omitted or `complete` detail keep the +complete inline result. On a retaining MCP server, select `detail: "summary"` +when the question needs every inferred function and its identity/uncertainty, +without bytecode text or duplicated raw stdout: + +```json +{ + "name": "inspect_evm_interface", + "arguments": { + "path": "/artifacts/runtime.hex", + "encoding": "hex", + "detail": "summary" + } +} +``` + +The result is distinct derived Evidence linked to its complete parent. Its +`normalized_result.summary` preserves every producer-returned selector, decoded +byte offset, dispatch, argument/mutability string including null, carrier/decoded +identities, original limitations and explicit unknowns. Payload `evidence_kind` +remains `inferred`. It preserves stderr/truncation and records stdout text length. +Complete-within-view coverage covers returned candidates; discovery completeness +remains unknown even for an empty or exhausted collection. Analysis still runs; +delivery selection does not save interpreter work or change source parameters. + +Use `normalized_result.parent_evidence_id` with `inspect_analysis_view` source +kind `retained-evidence`. EVM view kind `evm` pages `functions` by original row +order, or `bytecode_hex`, `stdout`, `stderr` by UTF-16 code units. Hex pages preserve +the original lowercase text without a prefix; two characters represent one decoded +byte. A text-page offset differs from a function's decoded-byte offset. Complete +parent Evidence remains accessible through the normal ledger/export workflow; +reading views does not rerun analysis or change its identity. Existing record +retention and close semantics are unchanged. + +Portable historical complete EVM Evidence can use source kind `inline` without +a provider. A fixed server without Evidence retention rejects selected summary +delivery before starting analysis and continues to support complete delivery. +Discover the actual advertised schema before sending `detail` to an older server; +use its complete operation when an equivalent workflow is required. The one-shot +CLI keeps its existing complete result. + ## Resource and lifecycle limits Inputs are limited to 4 MiB, complete replies to 16 MiB and combined diagnostic diff --git a/docs/firmware-analysis.md b/docs/firmware-analysis.md index 1674d8fd1..1f4ff14d6 100644 --- a/docs/firmware-analysis.md +++ b/docs/firmware-analysis.md @@ -123,8 +123,10 @@ Select a verified native child for the existing tools: ``` Then use `analyze_function`, `inspect_native_api` or the other native primitives. -Native architecture and executable validation still apply. This milestone does -not add MIPS/PPC/RISC-V decompilation, raw flash load profiles, bootloader/device +Native architecture and executable validation still apply. Generic +[MIPS ELF](ghidra-mips.md) and [RISC-V ELF](ghidra-riscv.md) lanes are separate +documents with their own admission boundaries. This milestone does +not add PPC decompilation, raw flash load profiles, bootloader/device tree semantics, vulnerability scanning, emulation or hardware runtime capture. ## Resource and lifecycle policy diff --git a/docs/flutter-analysis.md b/docs/flutter-analysis.md new file mode 100644 index 000000000..ebf0ccd84 --- /dev/null +++ b/docs/flutter-analysis.md @@ -0,0 +1,176 @@ +# Flutter build identification + +REA identifies a Flutter app's build facts by **pure parsing** of its APK: +the Dart VM snapshot hash, per-ABI library digests, the engine's GNU +build-id, and any labeled version strings. No engine, no tool installation, +no execution, and no external lookups — this family answers "which Dart SDK +build is this, and what exactly is in the payload?" before any deeper +native analysis. + +This is the triage step for Flutter reversing: the snapshot hash is the +artifact that maps to a Dart SDK release through an external dataset (such +as the one reFlutter maintains), and knowing the SDK version is what makes +SDK-layout-specific snapshot parsers applicable. + +## Answer an analyst question + +```sh +rea identify-flutter-build /targets/Example.apk +rea inspect-dart-aot /targets/Example.apk +rea inspect-dart-aot /targets/Example.apk --abi armeabi-v7a +``` + +The equivalent MCP methods are `identify_flutter_build` (with `path`) and +`inspect_dart_aot` (with `path` and an optional `abi`; the default prefers +arm64-v8a, then x86_64, then x86, then armeabi-v7a, then the remaining +ABIs alphabetically). + +## Optional retained AOT delivery + +MCP `inspect_dart_aot` keeps complete output when `detail` is omitted or +`"complete"`. Explicit `detail: "summary"` returns the selected target/ABI/library +identity, all snapshot headers, structural coverage, string-pool coverage and +original lower-bound counts without the string lists. It retains complete source +Evidence and returns a distinct linked `inspect_analysis_view` summary. Analysis +and the caller's ABI choice are unchanged; one-shot CLI output stays complete. + +Use `normalized_result.parent_evidence_id` as the retained source for +`inspect_analysis_view`, with `view: {kind: "dart-aot", collection: "package_uris", +offset: 0, limit: 64}`. Collections are `package_uris`, `dart_uris` and +`class_like_tokens`. Pages preserve the original strings and order, selected ABI, +library identity and source coverage. `returned_counts` describe producer-returned +rows; counts ending in `_at_least` remain lower bounds. Exhausting a page sequence +does not make a partial pool complete or turn byte-pattern tokens into typed +classes/functions. Views do not reopen the APK. Original Evidence remains +exportable under its existing session lifetime. Summary requires a retaining +server; older servers keep the complete request after schema discovery. + +## What the AOT inspection returns + +`inspect_dart_aot` reads one ABI's `libapp.so` in full and reports: + +- **Snapshot sections** — the four `_kDart*Snapshot*` symbols located + through the ELF **dynamic symbol table** (ELF32 and ELF64, little-endian, + every read bounds-checked), each with file offset, size, and — for data + sections, which carry the `f5f5dcdc` magic — the parsed header kind and + length (the stored length excludes the four magic bytes). Data headers + whose declared snapshot length does not fit their symbol retain their + observed fields and report partial coverage. Complete structural coverage + currently requires kind 3, the FullAOT value in the supported + [Dart 2.14 layout](https://github.com/dart-lang/sdk/blob/2.14.0/runtime/vm/snapshot.h). + Kind numbers vary across Dart releases; other values are preserved with + partial coverage, without guessing their interpretation. + A payload without exported snapshot symbols is refused rather + than guessed at. +- **The snapshot hash** from the header at the start of each exported data + symbol. Complete hash coverage requires a valid header from both the VM + and isolate; duplicate records inside one symbol cannot stand in for the + other's header. Aliased or overlapping data symbols report partial coverage. +- **A string-pool projection from the isolate data section**: distinct + `package:` source URIs (the app's own and its dependencies' Dart files — + a dependency inventory), `dart:` SDK URIs (which SDK libraries the app + uses), and identifier-shaped tokens, each bounded with counts and + `coverage: "partial"` when truncated. On the reference target this counts + 756 package URIs and 201 dart URIs on arm64-v8a and x86_64, and 212 / 48 + on armeabi-v7a, retaining up to 500 of each in the response. + `libapp.coverage` describes structural snapshot checks; + `string_pool.coverage` describes the bounded projection. Overall coverage + is partial when either facet is partial. + +## Interpret the result + +- **`flutter_detected`** is true when any `lib//libapp.so` exists. A + negative answer reports complete coverage: absence is an answer. +- **`snapshot_hash`** is the Dart build hash observed 20 bytes after the + snapshot magic (`f5 f5 dc dc`) inside `libapp.so`. Identification scans + byte patterns; AOT inspection reads the exported VM and isolate headers. + `snapshot_hash_sources` counts the valid records observed by the chosen + operation, and when they **disagree** the distinct values are + kept in `snapshot_hash_candidates` with `snapshot_hash: null` and + `coverage: "partial"` rather than silently picking one. +- **`elf_header_valid`** checks the supported little-endian ELF32/ELF64 + header, table entry widths, and full table extents against the library's + actual byte length. Truncated, malformed, or unsupported headers report + false and partial coverage while retaining byte-scanned hashes. This + header check does not establish valid table contents or exported symbols. +- **`libflutter` facts** are per-ABI observations: byte size, SHA-256 + digest, GNU build IDs from ELF-declared `PT_NOTE` / `SHT_NOTE` ranges, + and any _labeled_ strings the build + carries. Release engine builds often strip the `Dart VM version` string — + absence is reported as `null`, not guessed. Android clang/LLVM toolchain + lines are reported verbatim as build provenance. + `build_id_candidates` preserves distinct IDs. `build_id` is populated only + when all declared note ranges were examined and one ID was found; + conflicting IDs or malformed/bounded note metadata make coverage partial. + Matching bytes outside declared note ranges cannot supply a build ID. +- Labeled strings must fit their complete grammar. `dart_version_capped` + and `toolchain_capped` independently report labels omitted by grammar or + projection bounds; either makes identification coverage partial. Values + split across read chunks are retained without publishing truncated prefixes. +- **`coverage: "partial"`** also appears when an ABI carries `libapp.so` + without `libflutter.so` (or vice versa). +- The APK itself is digested before parsing, so `target.sha256` binds the + observation to the exact input. + +## Limits + +- **Owned snapshots.** Both operations copy the admitted APK into a + provider-owned, read-only snapshot before digesting and parsing, so a + concurrently modified original cannot mix into one observation; failed + reader closure and snapshot cleanup are retained and retried on `close()`. + The snapshot is removed only after all owned readers and file descriptors + close successfully. Copying pins one admitted descriptor and compares its + identity, size, mode and timestamps after the copy. Source permission + failures remain `access_denied`, and source identity changes remain + `artifact_changed`. Provider-owned storage failures report a + `resource_constraint` with their native I/O cause. Cancellation is checked + during copying, metadata/symbol walks, string scanning, and after cleanup. +- **Bounded reads.** APK snapshots are bounded at 2 GiB, including while + copying. Identification permits 768 MiB of cumulative library extraction; + declared sizes are checked before extraction. Library reads are bounded at 256 MiB each and ZIP + metadata at 8 MiB; the AOT image buffer is allocated at exactly the + declared size before reading. Exceeded budgets report + `resource_constraint`. +- **Engine notes.** Engine libraries are spooled into the owned root. ELF + headers, note tables and note payloads share an 8 MiB metadata budget; + up to 64 distinct build IDs are retained. Exceeding either bound preserves + the candidates already examined and reports partial coverage. +- **Metadata and candidate capacity.** Both operations refuse duplicate + relevant library paths. Inventory is limited to 32 ABIs and 1024 bytes per + relevant library path, independently of compressed size. Identification + refuses more than 64 distinct snapshot hashes with `resource_constraint` + rather than silently dropping conflicting evidence. +- **Selected ABI.** AOT inspection applies the library budget to the selected + ABI after selection; an oversized unselected library does not block it. + Undefined dynamic-symbol imports are not treated as snapshot exports. + Section-stripped images require a bounded symbol count from `DT_HASH` or + `DT_GNU_HASH`; layouts without either are refused. Symbol names and their + terminators must fit their linked string table. +- REA performs **no hash-to-SDK lookup**: mapping the snapshot hash to a + Dart SDK release requires an external dataset and is deliberately out of + scope for this family. +- The AOT string pool is a **byte-pattern projection, not deserialized + cluster semantics**: typed class and function recovery requires an + SDK-specific parser (the snapshot layout changes per release — exactly + why the hash is the key), and `class_like_tokens` include incidental + matches. JEB's GUI Dart unit and native analysis of `libapp.so` cover + some ground today. + +## Real verification + +`npm run verify:flutter -- --apk PATH [--plain-apk PATH]` runs both tools +through compiled CLI and stdio MCP, compares Evidence, and checks every ABI. +Use `--expectations scripts/fixtures/flutter-gallery-expectations.json` with +the Gallery 2.9.2 release APK to check exact per-ABI engine labels, +URI counts and the snapshot hash against its pinned SHA-256. The verifier +requires complete structural snapshot coverage on every ABI and explicitly +reports the bounded pool projection as partial/unverified when truncated. +Other APKs need their own expectations file to verify exact engine labels +and URI counts; otherwise those facets are reported unverified. +The optional plain APK checks negative detection. Record: Flutter Gallery 2.9.2 (112 MB, three +ABIs) — every ABI reports the same agreeing hash +`65817c30a78bb44c3dc3771876b6010a` from two snapshot sections, per-ABI +engine build-ids, no labeled Dart version (as expected for a release +engine), and the Android clang toolchain line; a plain aapt2-built APK +reports not-detected with complete coverage. The suite uses self-contained +synthetic ELF images and scanner payloads; it does not read private local files. diff --git a/docs/frida-instrumentation.md b/docs/frida-instrumentation.md new file mode 100644 index 000000000..c93c76465 --- /dev/null +++ b/docs/frida-instrumentation.md @@ -0,0 +1,13 @@ +# Frida instrumentation + +REA exposes Frida device and process discovery, attach or spawn sessions, and caller-authored JavaScript instrumentation through the CLI and MCP. The Node bindings are an optional package dependency and load only when a Frida operation runs. REA does not install Frida server on a target. + +For remote devices, pass a host with an optional port (`host[:port]`; bracket IPv6 addresses) and any token, certificate, origin, or keepalive options on that operation. The keepalive interval is measured in seconds, matching Frida Core 17.23.2. Authentication values are held only for the active call or session and are excluded from Evidence. Do not embed credentials in the endpoint address. + +MCP exposes `list_frida_devices`, `list_frida_processes`, `start_frida_session`, `load_frida_script`, `resume_frida_session`, `unload_frida_script`, `frida_session_status`, and `close_frida_session`. A spawned process starts paused so scripts can load first. Closing unloads session scripts and detaches. If a spawn remains paused, REA resumes it only after script cleanup or session detach confirms the instrumentation is released; if both cleanup paths fail, the target stays paused and the cleanup error is retained. REA never kills the target. MCP sessions end with the server process. The one-shot CLI command `instrument-with-frida` accepts one inline script or script file, observes messages for a bounded duration, and returns Evidence with the source hash and captured messages. + +Failed startup cleanup retains acquired Frida handles, including a paused spawn that has not attached, for later cleanup retries. Its remote connection stays leased until session detach and target resume complete. CLI commands await provider cleanup before returning; MCP retains these resources for cleanup when its server closes. A failed cleanup remains reported rather than treating an unregistered session as fully released. + +Frida scripts execute inside the selected target with that process's memory, filesystem, and network authority. Message capture is bounded to 16 MiB and reports truncation. Script source is not stored in Evidence; its selected path and SHA-256 digest are. Evidence retains non-authentication target selection such as device or endpoint, mode, program or PID, and spawn arguments. Authentication values remain excluded. Results report the observed session and messages, while unsupported platform metadata remains unknown. A request cancelled before a Frida operation starts has no provider effects. If cancellation arrives during a native Frida call, REA waits for that call to return, then closes any session it created and returns the observed session as a partial observation. Cancellation Evidence separately reports whether a target resume was observed, whether instrumentation cleanup completed, and that final target liveness remains unknown. REA does not kill the target. Remote discovery retains its observations and reports a separate cleanup error if the temporary connection cannot be removed. + +The [Frida Core API](https://frida.re/docs/frida-core-api/) documents device management, sessions, and script loading; the [JavaScript API](https://frida.re/docs/javascript-api/) documents target-side instrumentation. [Luma](https://luma.frida.re/) is Frida's standalone GUI; REA does not automate or control it. `npm run verify:frida` requires a Linux host with the optional Frida binding and uses a short-lived local Node.js fixture created by the verifier. Add `-- --address HOST:PORT --pid PID` to run the separate remote attach lane against a caller-selected target. Mock tests do not establish real device/server compatibility. diff --git a/docs/ghidra-dos.md b/docs/ghidra-dos.md index 808303681..487899bb7 100644 --- a/docs/ghidra-dos.md +++ b/docs/ghidra-dos.md @@ -130,8 +130,9 @@ range's file offset and analysis address; it does not locate the first differing byte inside that range. Mapping ends are **inclusive**, unlike the exclusive ends from `list_segments`. Appended overlays remain in source-file identity and are excluded from initialized module coverage. Uninitialized allocations are reported; -their contents and DOS runtime semantics are not verified. Formats other than MZ and explicit COM return -`unsupported` with measured observations, not a successful MZ verification. +their contents and DOS runtime semantics are not verified. Independent verification +also covers explicit [raw-binary imports](raw-binary.md); other formats return +`unsupported` with measured observations. `read_bytes` returns initialized provider memory, including loader fixups; an unmapped or uninitialized byte ends the read with an explicit returned length and @@ -150,8 +151,10 @@ For a packed executable, importing the original can analyze its unpacking stub. Analyze a separately prepared unpacked copy to inspect the original program's recovered code. Retain both artifact digests and the transformation evidence; REA never silently replaces the admitted target. Appended overlays -are separate from the initialized MZ module. Raw COM files and DOS extenders -without an admitted MZ real-mode entry are outside this import boundary. +are separate from the initialized MZ module. Headerless COM requires the +[explicit COM interpretation](#headerless-com-images); REA does not guess it +from the filename or unrecognized bytes. DOS extenders without an admitted +MZ real-mode entry remain outside this import boundary. DOS MZ is available through Ghidra, with no Hopper support claim. It is outside the Windows native PE P0 boundary. macOS x64 DOS verification remains unverified. diff --git a/docs/ghidra-provider.md b/docs/ghidra-provider.md index a79afecbd..32edbd320 100644 --- a/docs/ghidra-provider.md +++ b/docs/ghidra-provider.md @@ -41,6 +41,80 @@ does not prove text is absent. Both list and search Evidence carry this limitation. When an address is known, use `read_bytes` and `xrefs` to inspect bytes and references. +## Loaded addresses and file offsets + +`rea analyze --provider ghidra --json` and MCP `binary_overview` report +the observed loaded `image_base` in `normalized_result`. They retain each +segment's reported `image_base` and `address_space`. A provider that does not +report a base, or whose segments disagree, omits the overview field, following +the existing contract on main. REA does not substitute zero or the first +segment's address. All reported bases and address spaces remain visible in the +complete segment inventory, including conflicting observations. + +`function` and most MCP procedure selectors use procedure names or +provider analysis addresses. Ghidra `decompile` / MCP `procedure_pseudo_code` +also accept source-file byte offsets. Existing symbols and analysis addresses +take precedence; a `0x`-prefixed number that resolves to no procedure falls back +to its observed source mapping. Use `--file-offset=0x...` on the CLI or +`procedure: "file-offset:0x..."` through MCP to select file coordinates explicitly. +Multiple mapping candidates fail as ambiguous rather than selecting a bank or +address space. A successful conversion retains the file offset, mapped address +and procedure entry in raw Evidence and `locations`. + +If an offset maps to loaded target bytes but no procedure starts at or contains +the mapped address, the failure preserves both the original file offset and +analysis address. This differs from an unmapped offset and does not recommend +retrying the same offset syntax. +If the function resolves but the backend fails or cancels decompilation, the +failure retains the selector, mapped address and procedure entry without +changing the backend failure code. + +Both mapping directions require a complete original `FileBytes` source whose +SHA-256 matches the admitted target. Auxiliary files and partial source objects +remain visible in the load-image inventory but do not establish offsets in the +original target. Ghidra's object-local offsets are not silently treated as +original-file coordinates. Original-source identity is checked once per source +object per session; analysis-memory edits do not change the original bytes. + +ELF virtual addresses and file offsets are +different coordinates. Ghidra can rebase a PIE ELF during import: in the +source-owned verification fixture, ELF entry `0x1013` becomes Ghidra procedure +`0x101013` with image base `0x100000`. That example is not a general conversion +rule. + +Use `list_procedures` to select an observed procedure address. To relate file +bytes to loaded memory, call MCP `inspect_native_load_image` or: + +```sh +rea search . --kind procedures --mode regex --provider ghidra --json +rea inspect-native-load-image --provider ghidra --json +rea decompile --provider ghidra --json +rea decompile --file-offset=0x1013 --provider ghidra --json +rea address-to-file-offset --provider ghidra --json +``` + +The load-image result preserves source-file indexes, file offsets, address +spaces, and inclusive mapping ranges. Follow the mapping for the selected +source file and region; adding `image_base` to an arbitrary file offset is not +valid. For a linear byte-addressed, file-backed mapping, a file offset `F` in +`[mapping.file_offset, mapping.file_offset + mapping.length)` maps to +`mapping.start + (F - mapping.file_offset)` in the reported `address_space`. +If several mappings cover the same file offset, keep those candidates distinct +and select the procedure from the observed inventory. Uninitialized regions may +have no file backing. ELF mappings are observed +without independent format-specific load-image verification, as the result's +status and limitations state. + +An unsuccessful numeric procedure lookup reports the current Ghidra image base +and gives the CLI commands above alongside the corresponding MCP operations. +Repeat any target-format, architecture, and entry-point options used to open the +target. Other procedure operations keep their analysis-address semantics; +file-offset fallback applies only to decompilation. + +Overview workflow revision 3 binds this output to snapshot identity. Older +serialized overview Evidence remains readable; it is not replayed as a current +overview merely because its source artifact is unchanged. + ## Admitted function-analysis semantics | Concern | Ghidra contract | diff --git a/docs/ghidra-riscv.md b/docs/ghidra-riscv.md new file mode 100644 index 000000000..5b3407361 --- /dev/null +++ b/docs/ghidra-riscv.md @@ -0,0 +1,105 @@ +# RISC-V ELF analysis through Ghidra + +This lane extends native ELF analysis for `EM_RISCV` targets. It does not +execute RISC-V code, emulate a boot sequence, or rehost firmware. It addresses +[#2063](https://github.com/morluto/rea/issues/2063) and follows the same +lane shape as [generic MIPS support](ghidra-mips.md). + +## Admission boundary + +ELF `EM_RISCV` (243) is retained as the provider-neutral `riscv` family. The +target also retains the raw ELF declarations that decide a lane: class, byte +order, `e_type`, and `e_flags`. Recognition does not mean every provider or +RISC-V variant is supported. Existing PE, managed and Mach-O architecture sets +are unchanged, and caller-supplied headerless raw-binary entry still accepts only +its existing four families. + +The Ghidra lane admits little-endian ELF32 and ELF64 `ET_EXEC` images that +declare `EF_RISCV_FLOAT_ABI_DOUBLE` in `e_flags`, with no `EF_RISCV_RVE`, +`EF_RISCV_TSO`, or any bit outside `EF_RISCV_RVC | EF_RISCV_FLOAT_ABI`. These are +header declarations, not proof that every instruction conforms to that ISA. + +Provider selection returns the specific unsupported constraint rather than +guessing a compatible profile: + +| Declaration | Outcome | +| ----------------------------------------------- | ---------------------------------------------------------------------------------------- | +| Little-endian ELF64 `ET_EXEC`, double-float ABI | admitted, `RISCV:LE:64:default` + `gcc` | +| Little-endian ELF32 `ET_EXEC`, double-float ABI | admitted, `RISCV:LE:32:default` + `gcc` | +| Big-endian | refused; Ghidra 12.1.4 ships no big-endian RISC-V language | +| `ET_REL`, `ET_DYN`, other `e_type` | refused with the declared value | +| `EF_RISCV_RVE` | refused; the embedded 16-register profile (x0–x15) needs its own processor specification | +| `EF_RISCV_TSO` | refused; the total-store-order memory model is unverified here | +| Soft, single, or quad float ABI | refused; the pinned generic compiler specification models double-float | +| Reserved or newer `e_flags` bits | refused with the offending bits named | + +`e_type` is the only load-shape declaration this lane reads. A fixed-address +`ET_EXEC` declaration does **not** establish static linkage: `PT_INTERP` and +dynamic dependencies are not inspected, and the session records that boundary as +a limitation rather than inferring a load model. + +## Why the language is pinned + +Ghidra's header-based selection is not reliable for RV32. The 12.1.4 +`riscv.opinion` pins `variant="default"` for the 64-bit constraint and leaves the +32-bit constraint unpinned with the comment that the loader "must choose between +'default' and 'AndeStar' variants". Measured against the installed release tree: + +| Fixture | Ghidra auto-selection | +| ----------------------------------------------- | ----------------------------- | +| RV64 ELF, `e_flags 0x5` (RVC, double-float ABI) | `RISCV:LE:64:default:gcc` | +| RV32 ELF, `e_flags 0x5`, no Andes declaration | `RISCV:LE:32:AndeStar_v5:gcc` | + +So an ordinary RV32 image lands on an Andes processor model unless the language +is stated. REA therefore pins `RISCV:LE:32:default` or `RISCV:LE:64:default` +with the `gcc` compiler specification per class, records +`language_selection: provider-pinned-v1`, and refuses a caller-selected +`REA_GHIDRA_LANGUAGE_ID` or `REA_GHIDRA_COMPILER_SPEC_ID` that disagrees with the +pin without changing the requested override. An override that matches the pin is +accepted and recorded as `configured-v1`. + +## Evidence + +The lane identity is `elf32-exec-le-double-float-generic-v1` or +`elf64-exec-le-double-float-generic-v1`, and `riscv_elf` retains `elf_class`, +`byte_order`, `type`, and the raw `flags` alongside the read-only booleans +`float_abi_double`, `rvc_declared`, `rve_declared`, and `tso_declared`. Those +fields report declarations the header makes; none of them is evidence of the +original compiler, of instruction conformance, or of a floating-point calling +convention beyond the ABI the pinned language models. + +## Verification and limits + +Ghidra 12.1.4 PUBLIC with a 64-bit JDK 21+ is required, and on macOS the release +tree ships no host decompiler binary, so `Decompiler/os//decompile` and +`sleigh` must come from your own build; see +[installation](installation.md#ghidra). + +Run `npm run verify:ghidra:riscv` with an existing Ghidra 12.1.4 installation, +JDK 21+, and a RISC-V-capable Clang, LLD and LLVM readelf. The verifier acquires +no tools and never executes target code. Select installed tools explicitly when +they are not on `PATH`: + +```sh +GHIDRA_INSTALL_DIR=/path/to/ghidra_12.1.4_PUBLIC \ +JAVA_HOME=/path/to/jdk-21 \ +REA_RISCV_CLANG=/path/to/llvm/bin/clang \ +REA_RISCV_LLD=/path/to/lld/bin/ld.lld \ +REA_RISCV_READELF=/path/to/llvm/bin/llvm-readelf \ +npm run verify:ghidra:riscv +``` + +The lane builds the committed freestanding C and assembly sources into RV32 and +RV64 `ET_EXEC` fixtures. Independent LLVM readelf observations establish ELF +declarations and symbol addresses. Public CLI and stdio MCP workflows verify +function enumeration, decompilation, pinned language/compiler identity, decoded +probe bytes, global data, and direct calls. It validates advertised MCP output +schemas and both JSON representations, saves and reopens snapshots, rejects +header-mutated soft-float and unsupported high-bit declarations, and checks +unchanged source bytes and owned cleanup. Failures retain the diagnostic +workspace; successful runs remove it and report the observed process lineage. + +Module tests cover admission and malformed headers. Call-graph completeness, +string inventories, dynamic linkage, Andes or RVE/TSO images, and big-endian +targets are **not** established by this lane. `.riscv.attributes` ISA extensions +are not inspected; the generic language pin remains an analysis convention. diff --git a/docs/ida-provider.md b/docs/ida-provider.md index d2e939561..b22a35cce 100644 --- a/docs/ida-provider.md +++ b/docs/ida-provider.md @@ -1,6 +1,6 @@ -# IDA Pro provider +# IDA provider -REA adapts an existing [mrexodia/ida-pro-mcp](https://github.com/mrexodia/ida-pro-mcp) server into its native analysis tools. Install and configure IDA, Hex-Rays, Python, and upstream MCP using that repository's instructions. REA does not install, upgrade, activate, or license them, and does not bundle another IDA server. +REA adapts an existing IDA MCP server into its native analysis tools. Existing IDA Pro profiles use [mrexodia/ida-pro-mcp](https://github.com/mrexodia/ida-pro-mcp); an optional native bridge for IDA Pro and IDA Free is described below. Install and configure your selected engine and upstream MCP using their instructions. REA does not install, upgrade, activate, or license them, and does not bundle another IDA server. Choose one lifecycle mode in an upstream MCP JSON registration. Set `REA_IDA_MCP_CONFIG` to that file, then select `ida` once through `REA_ANALYSIS_PROVIDER`, the CLI's `--provider ida`, or MCP's `open_binary.provider_id`. No provider startup occurs during discovery. @@ -32,7 +32,33 @@ Open the **original input binary** in REA, not an `.idb` or `.i64` database. Its REA's close operation releases its MCP connection or proxy. It never saves or closes the existing GUI database. External edits remain visible because results are live and are not replayed from snapshots. These checks do not lock the GUI or prove that the database is unpatched. -The legacy producer moves the active GUI as a side effect: assembly and raw function instructions jump to the function, and successful pseudocode opens or reuses a pseudocode view. A function dossier does both. `binary_session` reports these operations with `effects.may_show_ui: true` in attached mode; headless operations and the other attached operations report `false`. +## Optional native IDA MCP bridge + +IDA Pro and IDA Free can use the separate [ida-free-mcp native plugin](https://github.com/0xshlomil/ida-free-mcp) through an explicit attached registration. Install and start that plugin using its upstream instructions, open the original binary in the IDA GUI, and wait for analysis. The native MCP 1.1.2 release binds `0.0.0.0` without a listen-address setting. Restrict inbound access with the host firewall or use an upstream build that binds only to loopback before starting it. REA's loopback URL restriction does not change the plugin's listener. REA does not install IDA, build the plugin, activate a license, or launch the GUI. + +```json +{ + "mode": "attached", + "protocol": "native", + "url": "http://127.0.0.1:13337/mcp" +} +``` + +Set `REA_IDA_MCP_CONFIG` to this file and select `ida` using the same CLI/MCP commands above. Omitting `protocol` preserves existing IDA Pro registrations. Native mode requires `resources/read` for `ida://idb/metadata` and its recorded input SHA-256; it never substitutes a digest of an unrelated local file. The native resource's `path` describes the IDB in the upstream protocol, not the original input path. REA retains it and checks database identity and image base before and after requests. + +This experimental profile provides function/string inventory and search, function lookup, assembly, GUI pseudocode, callees, address xrefs, instruction windows, and function dossiers. Direct callers remain unavailable: native code/data xref labels do not prove call edges. It requires neither IDAPython nor idalib. Native headless registrations are rejected. + +Native string observations use upstream C-string rendering; other representations remain unknown. Literal searches request conservative candidates and apply REA's original case and Unicode matching rules. Regex searches retain the full scan because native byte-oriented regex semantics cannot replace REA's Unicode regex semantics. All candidate pages are examined, and upstream search errors remain failures. + +Native callee resolution batches unique queries and checks each reply's query identity. Results remain live: a recorded input hash does not establish database revision, so cross-request analysis caches cannot prove freshness. For focused questions, use pseudocode, callees, or instruction-window tools; a function dossier requests additional facets and returns more Evidence. + +IDA Free's cloud decompiler needs network access and may request consent. Follow its licensing and supported architecture limits; see [IDA Free](https://hex-rays.com/ida-free). Decompilation moves GUI focus and the upstream plugin closes existing pseudocode tabs before requesting fresh output. REA advertises UI/network effects and closes only its MCP connection, preserving the open database. Rendered pseudocode has upstream traversal limits and does not prove complete source recovery. Cloud/widget failures remain explicit failures; retry after the GUI finishes or dismiss its prompt. + +Native MCP 1.1.2 can navigate in the previously focused pseudocode tab when switching functions. Use upstream 1.1.3 or a source build including [the navigation correction](https://github.com/0xshlomil/ida-free-mcp/commit/6adf2c615a2a03661059673e9c136ef28d0dc778), which focuses the disassembly view **before** jumping to the requested entry. This REA profile does not repair stale GUI output. Verification must include two different functions before claiming reliable function switching. The initial Linux verification used a locally corrected 1.1.2 plugin; upstream 1.1.3 has not been verified by that run. + +Native tool observations retain actual tool names and complete JSON text. Upstream `structuredContent` can be a shortened preview even while text contains the full result. REA reads the full native representation and rejects missing/malformed text instead of treating previews as complete observations. + +The legacy producer moves the active GUI as a side effect: assembly and raw function instructions jump to the function, and successful pseudocode opens or reuses a pseudocode view. A function dossier does both. Native GUI decompilation also changes the active view. `binary_session` reports these operations with `effects.may_show_ui: true`; headless operations and the other attached operations report `false`. ## Give REA a target for headless analysis @@ -58,7 +84,7 @@ rea function 'D:\samples\program.exe' main --json Headless REA and the configured supervisor must share the host filesystem and native path syntax. Run REA on Windows when the supervisor runs on Windows. The attached profile can span WSL and a Windows GUI because it binds recorded input hashes instead of asking the GUI to open a WSL path. -REA copies the admitted binary into a private temporary directory, checks its digest, and requests an owned worker with `force_headless`. POSIX workspaces use mode `0700`; Windows uses the matching package's native private-DACL boundary on a local NTFS temporary directory. It injects the returned database ID into analysis requests. It verifies the active owned worker and input path rather than adopting a user database. On close or failed startup, it releases its session with `save: false`, verifies that it is absent from upstream session discovery, and removes its private input and sidecars. An unverified release retains the workspace and reports incomplete cleanup. +REA copies the admitted binary into a private temporary directory, checks its digest, and requests an owned worker with `force_headless`. POSIX workspaces are created atomically with owner-only permissions, respecting the process umask; Windows uses the matching package's native private-DACL boundary on a local NTFS temporary directory. It injects the returned database ID into analysis requests. It verifies the active owned worker and input path rather than adopting a user database. On close or failed startup, it releases its session with `save: false`, verifies that it is absent from upstream session discovery, and removes its private input and sidecars. An unverified release retains the workspace and reports incomplete cleanup. One REA session owns one database. Stdio registrations default `IDA_MCP_MAX_WORKERS` to `1`; the explicit upstream `--max-workers 1` also bounds a supervisor. Database size and engine memory depend on the target and upstream; REA does not impose an engine memory limit. The original binary is never executed or overwritten. Optional `workspaceRoot` selects an existing absolute temporary-directory parent on the REA host. Ensure it has space for the input copy and IDA working files. @@ -98,9 +124,9 @@ For guided registration, set `REA_IDA_MCP_CONFIG` before `rea setup --client .recovery` copy of the current bytes. +Both snapshots remain available; a failed rollback reports the current recovery +copy's path and the restore failure. +Setup also retains valid environment overrides in REA's existing server entry, +such as `REA_MCP_INPUT_SCHEMA_PROFILE` and `REA_MCP_MAX_RESPONSE_BYTES`. +Detected provider settings replace only matching environment keys. +Setup and doctor report a malformed REA environment map or invalid runtime +setting before setup writes files. Repair the named setting in the client +configuration; setup does not silently discard the rest of the map. + +After setup, REA reports which agents, analysis tools, and workflow files passed +its final checks. Restart any agent named in the completion message, then begin +your investigation. Failed steps and diagnostics remain in terminal history. + +Select exact clients in scripts with repeatable `--client` flags. Each explicit +client skips interactive selection. Use `--all-detected` only when you intend +to configure every detected supported client. `--skill=false` omits the +workflow, and `--dry-run` returns a read-only plan with status `planned` and +exit code 0: ```bash -npx rea-agents@latest setup +rea setup --client codex --client cursor --skill=false --dry-run ``` -REA runs the version npm selects. To update older agent registrations, run the -latest-version command and review its setup plan. For unattended package -downloads, add `--yes` before the package name; this does not approve REA's -setup changes. +Prompt UI and progress are written to stderr so stdout remains available for +structured results and pipelines. `NO_COLOR=1` disables color. Use +`--accessible` for sequential, vertically rendered yes/no prompts. Implicit +interactive setup requires stdin, stdout, and stderr to all be terminals; when +any stream is redirected, setup stays non-interactive. Declining or cancelling +returns status `cancelled` with exit code 0. -For an intentional rollback, make the package request explicit: +For automation, `rea setup --json` reports the plan and a compact `.doctor` +readiness projection without applying it. Use `rea doctor --json` for full +health diagnostics and canonical tool catalog details. Pair +`--yes` with explicit scope such as `--client codex`, or use +`--all-detected` when the broad scope is intended. Without a scope flag, +`--yes` is limited to existing REA-owned registrations; it does not select all +detected clients. An unapproved actual apply reports `needs_confirmation` and +exits 1. Installing missing Hopper non-interactively additionally requires +`--install-hopper`: ```bash -npm exec --yes --package=rea-agents@2.4.0 -- rea setup +rea setup --yes --all-detected --install-hopper --json ``` -Setup continues to pin persistent MCP registrations to the exact version that -performed setup. Running current setup later migrates unversioned or older -managed registrations through the normal reviewed setup transaction. +### Skill destinations -With Bun, `bunx rea-agents setup` (or `bunx rea-agents@latest setup`) is the -equivalent entry point. Setup run through `npx` registers -`npx -y rea-agents@ mcp`; setup run through `bunx` or `bun x` registers -`bunx rea-agents@ mcp`. On Windows, setup wraps either command in -`cmd.exe /d /c` so clients can start the runner's command shim. Neither -registration points into the runner's temporary package cache. +The bundled skill is installed in each selected client's personal skill directory. +See [client configuration](client-configuration.md) for client-specific roots, +profiles, and environment overrides. A mixed selection plans each distinct +destination. Selecting the skill without a client uses `~/.agents/skills`. +Setup leaves existing skill copies in other locations untouched. -REA supports Node.js 22.x (>=22.19), 24.x (>=24.11), and 26+. Node.js 23, 25, and prereleases are unsupported. It uses the npm already paired with that runtime and never upgrades Node.js, npm, or Homebrew. +`rea setup --skill-client claude_code --yes --json` refreshes and verifies the +selected skill destination independently of MCP registration selection. The +final `doctor.scope.skill_clients` records which skill destinations were +checked; `doctor.scope.clients` continues to describe required registrations. +An unselected shared skill does not affect a client-only refresh. -When REA runs on Bun, the `rea doctor` `node` check reports the Bun version and -the Node.js compatibility version Bun declares, and passes when that -compatibility version is in the supported range. Bun does not enforce the V8 -heap flags REA gives its owned helper processes, so Evidence that reports those -limits on Node.js records them as unavailable under Bun. On Windows, the owned -Job Object of each JavaScript helper (source analyzer, source-map codec and HAR -decoder) instead limits its committed memory to that helper's heap budget plus -a 512 MiB reserve for Bun itself, and Evidence reports that limit. This needs -the matching bundled Windows native artifact; an artifact without the control -refuses to start the helper rather than running it unlimited. CI tests Node.js -only. +`doctor --skill --json` verifies the selected copies against the bundled +instructions and references. Consumers should use `identity.skill.state`, +`installed_version`, and `installed_tool_count` for skill readiness. The +obsolete `installed_catalog_digest` field has been removed; current catalog +identity remains available at `identity.catalog`. -Running `npm install rea-agents` without `--global` installs the executable only -in the current project's `node_modules/.bin`; it does not make `rea` available -on the shell `PATH`. Use the setup command above for the guided setup -journey, `npx -y rea-agents@latest` for unattended one-off commands, or install globally -with `npm install --global rea-agents` for a shell-visible `rea` command. +Setup pins package-runner MCP registrations to the exact installed REA version, +installs the matching skill and on-demand references in the same plan, and adds +`startup_timeout_sec = 30` for Codex and Grok Build. -The optional curl wrapper installs only the global npm package: +## Check readiness for your task + +Run `rea doctor` when you need diagnosis. It reads host prerequisites and agent +configuration without changing them. Without options, it audits every detected +registration, the installed skill and optional analysis engines; its overall +`healthy` value can be false while your chosen workflow works. + +Select the part you want to check: + +| Task | Readiness check | +| ----------------------------------- | ------------------------------------------------------------------------ | +| Static JavaScript/Electron analysis | Run `rea analyze-javascript-application PATH --json` directly. | +| One analysis engine | `rea doctor --provider ghidra --json` (or `hopper`, `ida`) | +| One agent registration | `rea doctor --client codex --json` (see [client IDs](#supported-agents)) | +| Installed workflow instructions | `rea doctor --skill --json` | + +A scoped report has `scope.mode: "explicit"`. Its `scope_checks` determine +`healthy` and the exit status. Other checks appear in `informational_checks`; +`environment_healthy` summarizes the full audit. `--target` adds a target check, +but the report remains audit-wide unless a scope option is also supplied. + +Follow the remediation for the failed check. If a native target has several +available providers, choose one with `--provider` on the CLI or `provider_id` +on `open_binary`. A `capability_unavailable` failure carries +`details.selection_reason`: `ambiguous` asks you to choose from +`details.candidate_ids`, while `provider_unavailable` asks you to repair the +selected engine. See [provider selection](cli.md#choose-a-provider). + +## Diagnose, update, and remove + +`rea doctor --json` is strictly read-only. `rea update` updates only the npm or Bun global installation that owns the running CLI. Source checkouts and package-runner copies must be updated through the mechanism that owns them; a fresh package-runner invocation can use `npx rea-agents@latest` or `bunx rea-agents@latest`. `rea uninstall` removes only REA-owned agent registrations and skill files; `--purge-data` additionally removes REA cache and state paths. ```bash -curl -fsSL https://raw.githubusercontent.com/morluto/rea/main/install.sh | bash +rea update +rea uninstall +rea uninstall --purge-data ``` -It prints the version, runtime, npm command, and destination before installing. When a controlling terminal exists it starts `rea setup`; otherwise it prints the command to run later. +Uninstall preserves Hopper, Node.js, Evidence files, captures, unrelated skills +and other MCP servers. Purging removes only REA's cache and state under +`~/.rea`. A client configuration that is malformed, unreadable, or at an unsafe +path stops the operation before anything is removed, and a client that fails +while being updated stops the remaining removals. A purge path that is a +symbolic link is retained and reported rather than followed. Uninstall checks +REA's managed shared and Claude Code personal skill locations. See the +[CLI guide](cli.md#output-and-exit-status) for exit statuses. -Pass options with `bash -s --`: +### Update the owning installation -```bash -curl -fsSL https://raw.githubusercontent.com/morluto/rea/main/install.sh | - bash -s -- --dry-run -``` - -Supported options are `--version `, `--dry-run`, `--no-setup`, `--no-prompt`, and `--verbose`. Neither `--no-prompt` nor a non-interactive shell grants permission to install external dependencies. +`rea update` installs the exact resolved +release into the npm prefix or Bun global directory that owns the running +package, then checks the new executable's version before reporting success. It +does not reopen onboarding. For npm installations, release lookup and +installation both use npm's configured registry. Bun global updates require +Bun 1.2.17 or later, which introduced `bun info`. The updater checks `bun --version` +first and stops with an instruction to upgrade Bun manually if the version is +older or cannot be parsed; it does not upgrade Bun itself. +For supported Bun global installations, `bun info` and +`bun add --global --ignore-scripts` use Bun's configured registry +and run inside the owning Bun global directory (`BUN_INSTALL_GLOBAL_DIR`, else +`$BUN_INSTALL/install/global`, else `$XDG_CACHE_HOME/.bun/install/global`, +else `~/.bun/install/global`), never in the caller's current project. A Bun +global directory without its `package.json` is not treated as an owned +installation, because Bun would install into the nearest ancestor project +instead. +Its maintenance plan selects only existing REA registrations and an already +installed REA skill. Run the returned scoped setup command to review and approve +those changes, then restart affected agents. The plan is returned in terminal, +non-TTY, and JSON modes without applying configuration changes. ## Released package and main @@ -143,8 +260,8 @@ readiness for one task instead of auditing every integration, see ## Supported agents -Setup can configure these clients for REA's local MCP server. Grok Bot is -listed after the table because its connector is not one of these files: +Setup can configure these clients for REA's local MCP server. Grok Bot uses a manual +hosted connector; see [its configuration](client-configuration.md#other-client-settings). | Client | `--client` value | | ------------------ | ---------------- | @@ -165,356 +282,24 @@ listed after the table because its connector is not one of these files: | OMP | `omp` | | Pi | `pi` | | Hermes | `hermes` | +| Qoder | `qoder` | +| Trae | `trae` | +| ZCode | `zcode` | | DeepSeek Harness | `dsh` | `dsh` is main-only until a release after 6.4.0. The registry check above does not cover it. -For GitHub Copilot CLI 1.0.95, `gpt-4.1` model metadata can block ordinary -chat with REA's full input-schema profile before sending a model request -(`compaction_static_context_blocked`; [#1554](https://github.com/morluto/rea/issues/1554)). -For the native offline OpenAI-compatible BYOK adapter, full-profile chat and -analysis also passed with a distinct `COPILOT_PROVIDER_MODEL_ID` such as -`rea-gpt-4.1`, `COPILOT_PROVIDER_WIRE_MODEL=gpt-4.1`, and that distinct ID selected -through `copilot --model rea-gpt-4.1`. The local fixture requested -`COPILOT_PROVIDER_MAX_PROMPT_TOKENS=1000000`; configure the limit supported by -your backend. This keeps every full schema and the actual wire model intact. -It does not establish the effective client budget or fix the built-in-ID path. -The existing compact profile passed native chat and analysis with the complete -tool inventory on Linux using a loopback model fixture. After setup, add -`"REA_MCP_INPUT_SCHEMA_PROFILE": "compact"` to the `env` object of the -`mcpServers.rea` entry in Copilot's `mcp-config.json`, preserving its other -settings, then restart the client. Compact advertisements can reduce nested -schema constraints; REA still validates complete canonical inputs. Full-profile -`gpt-5.4` metadata is also verified locally. Live model API acceptance and -Windows remain unverified; see [native client verification](testing.md). - -Claude Code normally defers MCP tool definitions through tool search. It -[turns tool search off](https://code.claude.com/docs/en/mcp#configure-tool-search) -when `ANTHROPIC_BASE_URL` points to a non-first-party host, such as DeepSeek's -Anthropic-compatible endpoint. It then sends every REA tool's name, description -and input schema with every request -([#2019](https://github.com/morluto/rea/issues/2019)). On main at 04089d5be, -with 172 tools, that payload measured about 496 KB with the default profile and -about 290 KB with `compact`. By the o200k and cl100k tokenizers, that is roughly -120k and 68k tokens. Compaction cannot remove tool definitions. If they nearly -fill the window Claude Code assumes, the context refills after every compaction -and Claude Code reports that autocompact is thrashing. To avoid this: - -- Make Claude Code assume the model's actual context window. DeepSeek's Claude - Code guide selects `deepseek-flash[1m]`; the `[1m]` suffix makes Claude Code - assume a one-million-token window. For other unrecognized model IDs, set - `CLAUDE_CODE_MAX_CONTEXT_TOKENS` to the window the provider documents. -- If the endpoint forwards `tool_reference` blocks, set `ENABLE_TOOL_SEARCH=true` - to restore deferred loading. DeepSeek's Anthropic API guide does not list - `tool_reference` among its supported content blocks, so this setting may cause - its requests to fail. -- To shrink the upfront catalog, add - `"REA_MCP_INPUT_SCHEMA_PROFILE": "compact"` to the `env` object of the - `mcpServers.rea` entry in `~/.claude.json` (`$CLAUDE_CONFIG_DIR/.claude.json` - when that variable is set), then restart Claude Code. Setup keeps this - override. - -The sizes above come from REA's own `tools/list`. A live Claude Code session -against DeepSeek's API is unverified. - -For [Pi](https://github.com/earendil-works/pi/blob/main/packages/coding-agent/docs/mcp.md), -setup writes a `type: "stdio"` entry under `mcpServers.rea` in the user-level -`~/.pi/agent/mcp.json` and installs the bundled skill under `~/.agents/skills`. -Use `rea setup --client pi --dry-run --json` to inspect the plan, then -`rea setup --client pi --yes --json` to approve it. Check the registration with -`rea doctor --client pi --json`. Pi reads `mcp.json` as strict JSON, like its -own loader: comments, trailing commas, a byte-order mark, or an empty existing -file are invalid, and setup reports them instead of rewriting the file. Repair -such a file to plain JSON first, then rerun setup. - -Setup follows Pi's `PI_CODING_AGENT_DIR`: unset or empty selects the default; -`~` and `~/` expand to the home directory; absolute paths and file URLs select -that directory; relative paths stay relative to the command's working directory. -On Windows, native paths, `~\`, and Git Bash/MSYS, Cygwin, and WSL drive paths -are normalized as Pi does. Run REA and Pi from the same working directory when -using a relative override. Pi has no profiles: `OMP_PROFILE`, `PI_PROFILE`, -`PI_CONFIG_DIR`, and OMP's `enabledServers`/`disabledServers` lists do not affect -Pi registration. Doctor accepts an omitted `type` for stdio but reports a -non-stdio type as invalid; `enabled: false` stays disabled. - -REA configures only the user scope. Pi also reads `.pi/mcp.json` in trusted -projects; a same-name project entry can replace the user entry or override its -enabled state and exposure. Check that file if the user registration is aligned -but unavailable in a project. An extension that registers `/mcp` can replace -Pi's built-in MCP support and use its own configuration instead. Run `/reload` -in an existing Pi session after changing servers outside the session. - -For Qwen Code, setup registers `rea` in the `mcpServers` table of the -user-level `~/.qwen/settings.json`, or `$QWEN_HOME/settings.json` when configured. -Setup and doctor follow Qwen Code's tilde and working-directory-relative home -overrides. Qwen Code also discovers personal skills in `~/.agents/skills`, -where setup installs the bundled workflow. - -Gemini CLI uses `$GEMINI_CLI_HOME/.gemini/settings.json` when that home override -is nonempty, including its shared personal skills at -`$GEMINI_CLI_HOME/.agents/skills`. Setup and doctor check MCP allow/exclude -policies from system defaults, user settings, trusted workspace settings, and -system overrides. Workspace trust follows `GEMINI_CLI_TRUST_WORKSPACE`, -`GEMINI_RESTRICTED_MODE`, the effective `security.folderTrust.enabled` setting, -and the selected `trustedFolders.json` (including -`GEMINI_CLI_TRUSTED_FOLDERS_PATH`). Settings in an untrusted workspace do not -participate. A workspace or system `mcpServers.rea` replaces the entire user -entry; setup stops if the winning definition conflicts with its planned entry. -Review those files manually: setup never edits administrator/workspace settings -or grants workspace trust. Trust supplied only by a running IDE is outside this -standalone CLI check. - -Codex treats an unset or empty `CODEX_HOME` as `~/.codex`. Devin honors -`XDG_CONFIG_HOME` for its `devin/mcp_config.json` on non-Windows systems. - -For OMP, setup writes a `type: "stdio"` entry to the user-level -`~/.omp/agent/mcp.json`. It follows `PI_CONFIG_DIR` and -`PI_CODING_AGENT_DIR` (relative to the setup working directory), and the profile selected by `OMP_PROFILE` or -`PI_PROFILE` (`~/.omp/profiles//agent/mcp.json`). Setup also removes -`rea` from that file's `disabledServers` list, which would otherwise hide the -registration. Doctor treats an `enabled: false` entry as active when -`enabledServers` lists `rea`, as OMP does, unless `disabledServers` also lists -it. Run setup under each profile that should load REA. - -For Hermes, setup writes a `mcp_servers.rea` entry to `config.yaml`, preserving -comments and unrelated settings. It resolves that file from `HERMES_HOME`, else -from the platform default Hermes itself uses — `%LOCALAPPDATA%\hermes` on -Windows, `~/.hermes` elsewhere — including any `HERMES_DATA_DIR_SUFFIX`. Hermes -connects an entry unless `enabled` is false, so setup states `enabled: true`. - -Hermes personal skills install under the active Hermes home's `skills` directory. -Setup, doctor and uninstall follow the root's `active_profile` selection, as -plain Hermes CLI commands do. An explicit `HERMES_HOME` pointing to -`profiles/` selects that named profile directly. An invalid, missing or -deleted sticky profile is reported instead of writing into the default home; -repair the profile or run `hermes profile use default` before retrying. -REA follows `HERMES_HOME` whitespace trimming, environment-variable expansion, -and home expansion before resolving that profile. Setup previews the resolved -configuration and skill destinations; doctor and uninstall use those same paths. +See [client configuration and troubleshooting](client-configuration.md) for +configuration paths, profiles, trust policies, and schema-limit workarounds. ### DeepSeek Harness -DeepSeek Harness registers MCP clients through a Cordis YAML patch sequence -rather than a `mcpServers` object. `rea setup --client dsh` appends (or -replaces) the REA entry in the home patch `$DSH_HOME/cordis.patch.yml` -(`~/.dsh/cordis.patch.yml` when `DSH_HOME` is unset), preserving unrelated -patches and comments. `rea doctor --client dsh` checks that same entry id. -`rea uninstall` removes it by scanning supported clients; uninstall takes no -`--client` flag. The home patch applies to every Harness profile, so the -registration is written once and no per-profile edit is needed. The written -entry is: - -```yaml -- insert: - - id: rea-mcp - name: "@deepseek-ai/dsh-mcp-client" - config: - serverName: rea - transport: stdio - command: /absolute/path/to/node - args: ["/absolute/path/to/rea/scripts/rea.mjs", mcp] -``` - -Setup preserves caller-owned Cordis expressions and replaces launcher fields -with literal values that doctor can verify. It refuses to edit an expression -that produces the entire REA config, or a group-targeted REA insertion. Use a -literal config and a root-level insertion as shown above. - -For a global npm installation, the launcher is under -`$(npm root -g)/rea-agents/scripts/rea.mjs`. Restart Harness after setup; it -exposes tools as `mcp__rea__`. Run `rea setup --skill --dry-run`, -review the destination, then `rea setup --skill --yes` to install the workflow -in `~/.agents/skills` (`$DSH_AGENTS_HOME/skills` when configured); Harness -discovers that directory, and its native `skill` tool can load -`reverse-engineer-anything`. - -REA's optional [native client verification](testing.md#end-to-end-integration-and-golden-evidence) -checks headless chat, skill loading, all tool input schemas and actual analysis -using the installed Harness and a local model fixture. This establishes the -Harness integration, with live DeepSeek API compatibility remaining unverified. -See the [Harness MCP guide](https://github.com/deepseek-ai/deepseek-harness/blob/639ed015397290b3745d163aafe02ffee4aa3f84/packages/mcp/mcp-client/README.md) -for its native configuration contract. +See [the Cordis patch and launcher setup](client-configuration.md#deepseek-harness). ### Other client settings -For OpenCode, setup writes the V1 `mcp.rea` entry, which OpenCode V1 and V2 -both load. If the configuration already uses OpenCode V2's native -`mcp.servers` table, setup registers REA there instead and replaces any earlier -`mcp.rea` entry from REA. Setup honors `OPENCODE_CONFIG_DIR` and -`OPENCODE_CONFIG`, preferring the later-loaded JSONC file when both JSON and -JSONC exist. The ordinary XDG global configuration still participates when a -custom directory is selected. Doctor checks the merged user registration; uninstall removes -REA-owned entries from every applicable user file so an older entry cannot -become active again. Malformed applicable files block setup before changes. - -Grok Build loads `[mcp_servers.rea]` from `$GROK_HOME/config.toml`, or from -`~/.grok/config.toml` when `GROK_HOME` is unset or empty. Setup edits that server -table, `[mcp_servers.rea.env]`, and a root `disabled_mcp_servers` entry that -names `rea`. It sets `startup_timeout_sec = 30` and leaves every other name -in that list. The shared skill installed under `~/.agents/skills` is already -on Grok Build's skill path. - -Grok Bot (`grok_bot`) is detected from `~/.grokbot`, or from `SAND_DATA_ROOT` -when that value is an absolute path. A relative or empty `SAND_DATA_ROOT` -stays on `~/.grokbot`. That directory is not the connector store. Grok Bot -keeps connectors in the signed-in account and runs them on its hosted -computer. It does not import `mcp.json` from the data directory, and it does -not attach a stdio server running on this machine. Setup does not call the -account connector API, does not write a registration file, and does not report -the data directory as aligned. Ask the Grok Bot chat to add a custom MCP -server named `rea` that runs on the Bot's computer: - -```bash -npx -y rea-agents@ mcp -``` - -Do not put credentials in that command or its arguments. `rea doctor --client grok_bot` -reports this manual step. `rea uninstall` does not remove the account connector. - -## Review setup changes - -`rea setup` first offers the supported agents in a multi-select. Existing REA -registrations are selected by default. Newly detected clients remain available -but unselected: detection gives setup context, not permission to add a new -registration. Clients without a detected configuration can still be selected. -Explicit `--client` flags skip this question. - -Setup adds MCP access for selected clients. It installs REA's bundled workflow -with those integrations by default; use `--skill=false` to omit it. If no agent -is selected, setup offers the workflow separately for CLI use, with No as the -default. Hopper is a separate optional choice: setup shows its proposed -installation or connection and requires its own explicit approval. It can also -save verified paths for an existing Ghidra installation. - -The bundled skill is installed where each selected client discovers personal -skills: Claude Code uses `~/.claude/skills` (or -`$CLAUDE_CONFIG_DIR/skills` when configured). Gemini CLI uses `.agents/skills` -under its selected home; Antigravity 2.0 uses `~/.gemini/config/skills`. -Other integrations, including Qwen Code, use `~/.agents/skills`. -A mixed selection plans each distinct destination. Selecting the skill without a client uses the shared -directory. Setup leaves existing skill copies in other locations untouched. - -`rea setup --skill-client claude_code --yes --json` refreshes and verifies the -selected skill destination independently of MCP registration selection. The -final `doctor.scope.skill_clients` records which skill destinations were -checked; `doctor.scope.clients` continues to describe required registrations. -An unselected shared skill does not affect a client-only refresh. - -`doctor --skill --json` verifies the selected copies against the bundled -instructions and references. Consumers should use `identity.skill.state`, -`installed_version`, and `installed_tool_count` for skill readiness. The -obsolete `installed_catalog_digest` field has been removed; current catalog -identity remains available at `identity.catalog`. - -After selection, review the plan's exact paths and changes and approve before -REA writes files or installs Hopper. You can cancel at any prompt. - -Before applying changes, REA checks your current configuration. The plan lists: - -- an existing Hopper installation, a verified existing Ghidra installation, or the official Hopper package it proposes to install; -- each detected agent configuration path; -- each selected REA skill destination; -- external software, network origins, integrity evidence, and package-manager - commands. - -Malformed or unsafe existing configuration blocks the whole transaction before -Hopper installation or any file write. Declining or pressing Ctrl-C makes no -changes. Agent configuration writes preserve unrelated entries and comments, -create backups, use atomic replacement, and verify their result. Setup and -uninstall retain an existing `.rea.backup` rather than replacing the first snapshot. -Setup also retains valid environment overrides in REA's existing server entry, -such as `REA_MCP_INPUT_SCHEMA_PROFILE` and `REA_MCP_MAX_RESPONSE_BYTES`. -Detected provider settings replace only matching environment keys. -Setup and doctor report a malformed REA environment map or invalid runtime -setting before setup writes files. Repair the named setting in the client -configuration; setup does not silently discard the rest of the map. - -After setup, REA reports which agents, analysis tools, and workflow files passed -its final checks. Restart any agent named in the completion message, then begin -your investigation. Failed steps and diagnostics remain in terminal history. - -Select exact clients in scripts with repeatable `--client` flags. Each explicit -client skips interactive selection. Use `--all-detected` only when you intend -to configure every detected supported client. `--skill=false` omits the -workflow, and `--dry-run` returns a read-only plan with status `planned` and -exit code 0: - -```bash -rea setup --client codex --client cursor --skill=false --dry-run -``` - -Prompt UI and progress are written to stderr so stdout remains available for -structured results and pipelines. `NO_COLOR=1` disables color. Use -`--accessible` for sequential, vertically rendered yes/no prompts. Implicit -interactive setup requires stdin, stdout, and stderr to all be terminals; when -any stream is redirected, setup stays non-interactive. Declining or cancelling -returns status `cancelled` with exit code 0. - -For automation, `rea setup --json` reports the plan and a compact `.doctor` -readiness projection without applying it. Use `rea doctor --json` for full -health diagnostics and canonical tool catalog details. Pair -`--yes` with explicit scope such as `--client codex`, or use -`--all-detected` when the broad scope is intended. Without a scope flag, -`--yes` is limited to existing REA-owned registrations; it does not select all -detected clients. An unapproved actual apply reports `needs_confirmation` and -exits 1. Installing missing Hopper non-interactively additionally requires -`--install-hopper`: - -```bash -rea setup --yes --all-detected --install-hopper --json -``` - -Setup pins package-runner MCP registrations to the exact installed REA version, -installs the matching skill and on-demand references in the same plan, and adds -`startup_timeout_sec = 30` for Codex and Grok Build. `rea update` installs the exact resolved -release into the npm prefix or Bun global directory that owns the running -package, then checks the new executable's version before reporting success. It -does not reopen onboarding. For npm installations, release lookup and -installation both use npm's configured registry. Bun global updates require -Bun 1.2.17 or later, which introduced `bun info`. The updater checks `bun --version` -first and stops with an instruction to upgrade Bun manually if the version is -older or cannot be parsed; it does not upgrade Bun itself. -For supported Bun global installations, `bun info` and -`bun add --global --ignore-scripts` use Bun's configured registry -and run inside the owning Bun global directory (`BUN_INSTALL_GLOBAL_DIR`, else -`$BUN_INSTALL/install/global`, else `$XDG_CACHE_HOME/.bun/install/global`, -else `~/.bun/install/global`), never in the caller's current project. A Bun -global directory without its `package.json` is not treated as an owned -installation, because Bun would install into the nearest ancestor project -instead. -Its maintenance plan selects only existing REA registrations and an already -installed REA skill. Run the returned scoped setup command to review and approve -those changes, then restart affected agents. The plan is returned in terminal, -non-TTY, and JSON modes without applying configuration changes. - -## Check readiness for your task - -Run `rea doctor` when you need diagnosis. It reads host prerequisites and agent -configuration without changing them. Without options, it audits every detected -registration, the installed skill and optional analysis engines; its overall -`healthy` value can be false while your chosen workflow works. - -Select the part you want to check: - -| Task | Readiness check | -| ----------------------------------- | ------------------------------------------------------------------------ | -| Static JavaScript/Electron analysis | Run `rea analyze-javascript-application PATH --json` directly. | -| One analysis engine | `rea doctor --provider ghidra --json` (or `hopper`, `ida`) | -| One agent registration | `rea doctor --client codex --json` (see [client IDs](#supported-agents)) | -| Installed workflow instructions | `rea doctor --skill --json` | - -A scoped report has `scope.mode: "explicit"`. Its `scope_checks` determine -`healthy` and the exit status. Other checks appear in `informational_checks`; -`environment_healthy` summarizes the full audit. `--target` adds a target check, -but the report remains audit-wide unless a scope option is also supplied. - -Follow the remediation for the failed check. If a native target has several -available providers, choose one with `--provider` on the CLI or `provider_id` -on `open_binary`. A `capability_unavailable` failure carries -`details.selection_reason`: `ambiguous` asks you to choose from -`details.candidate_ids`, while `provider_unavailable` asks you to repair the -selected engine. See [provider selection](cli.md#choose-a-provider). +See [OpenCode, Grok Build, and Grok Bot settings](client-configuration.md#other-client-settings). ## Hopper @@ -536,8 +321,8 @@ The Hopper launcher action used by REA creates a document from an executable; its supported command-line interface does not attach to an already-open document. While another live REA session owns the same target and loader profile, a second session reports the owning run ID instead of opening a -duplicate document. Closing the owning REA session releases this guard; Hopper -keeps its document open. A later REA session can therefore open another +duplicate document. On macOS, closing the owning REA session releases this guard; +Hopper keeps its document open. A later REA session can therefore open another document for the same target. REA does not currently identify, focus, or reuse that existing GUI document, and the supported launcher exposes no attach or reuse action for it. @@ -560,8 +345,14 @@ Hopper application per user across cooperating REA processes. A competing CLI or MCP session receives the owning session ID before Hopper is launched, for both the same target and a different target. Switch targets through that MCP session, or close it before starting another session. Closing the owner -releases the reservation. This does not attach to or claim ownership of -manually opened Hopper applications. +releases the reservation and stops REA's owned demo application and private +display; the headless Linux demo does not retain documents after MCP shutdown. +Its helper watches a private lifetime pipe, so an owner crash or SIGKILL also +stops those children, without relying on a reusable PID or a process-name scan. +A later session recovers the dead owner's stale lease after child cleanup; +private runtime files can remain when REA itself was killed. This does not attach to +or claim ownership of manually opened Hopper applications. An application left +running by an older REA version must still be closed before starting a new session. Stale lease recovery is serialized. If an interrupted recovery leaves its reservation directory, the diagnostic identifies that exact path. Stop REA @@ -650,33 +441,13 @@ code or signal and bounded output in `details.launcher`. An exit can precede output-stream closure; `output_closed: false` keeps that uncertainty explicit. Later requests retain the known exit instead of reducing it to socket loss. An external GUI's helper exit does not establish that the GUI itself exited. -Cursor navigation returns the observed object start when Hopper snaps an interior -address; adjacent-object navigation rejects unmapped inputs and document ends. -Native API text rejects NUL characters and unpaired Unicode surrogates before -annotation changes. Renames preserve unselected label owners; use a batch with -all affected addresses to move or swap existing labels explicitly. Every rename -destination must be mapped, and native symbol names must fit Hopper's 1024 UTF-16 -code-unit limit. Oversized names fail before any batch edits; bookmarks and -literal string results are not subject to that symbol-name limit. Rename success -requires exact final readback. New bookmarks must point into mapped memory; -existing legacy bookmarks outside it can still be removed. -String results read each native typed object's complete bytes, retain the original -provider display in `provider_value`, and report its encoding, byte length, and -termination. `encoding_status: inferred` distinguishes REA's decoding from an -observed source encoding. Hopper can split long literals into adjacent -unterminated objects; search matches each object's decoded bytes independently. -Undecodable objects retain native display text with `decoding.available: false` -and a reason, so one uncertain object does not block unrelated inspections. -Function dossiers retain this same string evidence. Native call edges retain -Hopper's partial `CallReference` classification and exact endpoints; detailed -reference flags remain unavailable rather than being invented. -Regex searches use ECMAScript Unicode syntax in a cancellable worker with a -five-second matching deadline. Deadline or cancellation stops matching while -leaving the Hopper API available. Literal mode retains Unicode casefold matching. +For cursor navigation, string decoding, symbol-name limits, and regex matching, +see [Hopper analysis behavior](native-investigation.md#hopper-analysis-behavior). Closing or switching a target closes its bound Hopper document, shuts down REA's -bridge and removes its temporary socket directory while preserving the Hopper -application and unrelated documents. A `cleanup_incomplete` +bridge and removes its temporary socket directory. The macOS Hopper application +and unrelated documents remain open; the owned Linux demo application stops. +A `cleanup_incomplete` result identifies resources whose cleanup could not be verified. REA retains unresolved cleanup ownership and any confirmed shutdown phases. After addressing the reported failure, retry `close_binary` on the same @@ -732,7 +503,8 @@ operations and twelve function-analysis operations. These cover metadata, decompilation, assembly, resolved calls, typed references, xrefs, function dossiers, instructions, recovered data types, measured load mappings, loaded memory bytes, and observed file offsets. Independent load-image attestation -supports DOS MZ and explicitly selected COM; PE returns its measurements with that limitation. +supports DOS MZ, explicitly selected COM, and explicit raw-binary imports; +PE returns measurements with an unsupported attestation status. On Linux and macOS, `annotate_native_function` also edits a function name and/or entry comments atomically and returns refreshed analysis, and `set_address_name` and `set_addresses_names` name a function entry or any other mapped address @@ -785,7 +557,7 @@ Ghidra's default analysis settings, and loads its packaged Java bridge via `-scriptPath`; it never opens an existing user project. Linux and macOS use a current-user-only local bridge socket and descriptor. The project remains under the selected temporary directory. If its Unix socket -pathname would exceed the host's byte limit, REA allocates a separate mode-0700 +pathname would exceed the host's byte limit, REA allocates a separate owner-only socket directory under `/tmp` and removes it on close, cancellation, or failure. Diagnostics retain the actual endpoint and both owned directories. On Linux and macOS, REA starts the inspected JVM directly using Ghidra's own LaunchSupport @@ -842,12 +614,39 @@ rea doctor --json The copy step requires the destination to be absent and preserves an existing decompiler. This recipe is specific to macOS x64: the [Ghidra 12.1.4 Makefile](https://github.com/NationalSecurityAgency/ghidra/blob/Ghidra_12.1.4_build/Ghidra/Features/Decompiler/src/decompile/cpp/Makefile) -explicitly selects `-arch x86_64` on Darwin. For other architectures or a Gradle +explicitly selects `-arch x86_64` on Darwin. For a Gradle build, follow the matching release's [native component instructions](https://github.com/NationalSecurityAgency/ghidra/blob/Ghidra_12.1.4_build/GhidraDocs/GettingStarted.md#building-native-components). REA accepts the matching executable under either `os//` or `build/os//`; it does not build the component during setup or diagnosis. +### macOS arm64 native decompiler + +On Apple Silicon the same source build works with explicit overrides; no +Makefile edits and no Rosetta are needed. The Darwin block in the +[Ghidra 12.1.4 Makefile](https://github.com/NationalSecurityAgency/ghidra/blob/Ghidra_12.1.4_build/Ghidra/Features/Decompiler/src/decompile/cpp/Makefile) +pins `-arch x86_64`, but `ARCH_TYPE` and `OSDIR` are ordinary make variables, +and command-line assignments replace them for every compile and link rule: + +```bash +cd "$GHIDRA_INSTALL_DIR/Ghidra/Features/Decompiler/src/decompile/cpp" +make ghidra_opt ARCH_TYPE="-arch arm64" OSDIR=mac_arm_64 +decompiler_dir="$GHIDRA_INSTALL_DIR/Ghidra/Features/Decompiler/os/mac_arm_64" +mkdir -p "$decompiler_dir" +test ! -e "$decompiler_dir/decompile" && test ! -L "$decompiler_dir/decompile" && + install -m 755 ghidra_opt "$decompiler_dir/decompile" +rea doctor --json +``` + +Verified end to end on macOS 15.6 arm64 with Apple clang 17 and the stock +bison 2.3, against Ghidra 12.1.4: the build produces a Mach-O arm64 +`ghidra_opt`, the doctor check `ghidra-native_decompiler` turns healthy with +"reports mach-o arm64, which matches darwin/arm64", and `rea decompile` on an +arm64 Mach-O returns decompiled C through the headless provider. The JDK is +not needed for the make step, only for the Ghidra provider. If your toolchain +rejects the inherited `-mmacosx-version-min=10.6` flag, retry the make with +`ADDITIONAL_FLAGS="-w"`. + ### Ghidra import language and analysis seeds Ghidra detects the language from the executable header. To set it (for example, Borland C++ PE images): @@ -982,25 +781,6 @@ read-only operations, digest identity, and runtime cleanup. The separate ordinary user. It requires the built Windows native bundle and an existing Ghidra/JDK installation; neither is inferred from startup alone. -## Diagnose, update, and remove - -`rea doctor --json` is strictly read-only. `rea update` updates only the npm or Bun global installation that owns the running CLI. Source checkouts and package-runner copies must be updated through the mechanism that owns them; a fresh package-runner invocation can use `npx rea-agents@latest` or `bunx rea-agents@latest`. `rea uninstall` removes only REA-owned agent registrations and skill files; `--purge-data` additionally removes REA cache and state paths. - -```bash -rea update -rea uninstall -rea uninstall --purge-data -``` - -Uninstall preserves Hopper, Node.js, Evidence files, captures, unrelated skills -and other MCP servers. Purging removes only REA's cache and state under -`~/.rea`. A client configuration that is malformed, unreadable, or at an unsafe -path stops the operation before anything is removed, and a client that fails -while being updated stops the remaining removals. A purge path that is a -symbolic link is retained and reported rather than followed. Uninstall checks -REA's managed shared and Claude Code personal skill locations. See the -[CLI guide](cli.md#output-and-exit-status) for exit statuses. - ## MCP Registry REA is published in the official MCP Registry as `io.github.morluto/rea`. Registry @@ -1033,3 +813,71 @@ writes the same package-runner shape, or `bunx rea-agents@ mcp` when setup runs through `bunx`, and pins it to the exact version that performed setup. Run current setup to refresh an older registration, then restart the client. + +## Package runners and global installation + +A package-runner invocation can use a REA version installed in the current project. To +request the latest release explicitly, use: + +```bash +npx rea-agents@latest setup +``` + +REA runs the version npm selects. To update older agent registrations, run the +latest-version command and review its setup plan. For unattended package +downloads, add `--yes` before the package name; this does not approve REA's +setup changes. + +For an intentional rollback, make the package request explicit: + +```bash +npm exec --yes --package=rea-agents@2.4.0 -- rea setup +``` + +Setup continues to pin persistent MCP registrations to the exact version that +performed setup. Running current setup later migrates unversioned or older +managed registrations through the normal reviewed setup transaction. + +With Bun, `bunx rea-agents setup` (or `bunx rea-agents@latest setup`) is the +equivalent entry point. Setup run through `npx` registers +`npx -y rea-agents@ mcp`; setup run through `bunx` or `bun x` registers +`bunx rea-agents@ mcp`. On Windows, setup wraps either command in +`cmd.exe /d /c` so clients can start the runner's command shim. Neither +registration points into the runner's temporary package cache. + +REA supports Node.js 22.x (>=22.19), 24.x (>=24.11), and 26+. Node.js 23, 25, and prereleases are unsupported. It uses the npm already paired with that runtime and never upgrades Node.js, npm, or Homebrew. + +When REA runs on Bun, the `rea doctor` `node` check reports the Bun version and +the Node.js compatibility version Bun declares, and passes when that +compatibility version is in the supported range. Bun does not enforce the V8 +heap flags REA gives its owned helper processes, so Evidence that reports those +limits on Node.js records them as unavailable under Bun. On Windows, the owned +Job Object of each JavaScript helper (source analyzer, source-map codec and HAR +decoder) instead limits its committed memory to that helper's heap budget plus +a 512 MiB reserve for Bun itself, and Evidence reports that limit. This needs +the matching bundled Windows native artifact; an artifact without the control +refuses to start the helper rather than running it unlimited. CI tests Node.js +only. + +Running `npm install rea-agents` without `--global` installs the executable only +in the current project's `node_modules/.bin`; it does not make `rea` available +on the shell `PATH`. Use the setup command above for the guided setup +journey, `npx -y rea-agents@latest` for unattended one-off commands, or install globally +with `npm install --global rea-agents` for a shell-visible `rea` command. + +The optional curl wrapper installs only the global npm package: + +```bash +curl -fsSL https://raw.githubusercontent.com/morluto/rea/main/install.sh | bash +``` + +It prints the version, runtime, npm command, and destination before installing. When a controlling terminal exists it starts `rea setup`; otherwise it prints the command to run later. + +Pass options with `bash -s --`: + +```bash +curl -fsSL https://raw.githubusercontent.com/morluto/rea/main/install.sh | + bash -s -- --dry-run +``` + +Supported options are `--version `, `--dry-run`, `--no-setup`, `--no-prompt`, and `--verbose`. Neither `--no-prompt` nor a non-interactive shell grants permission to install external dependencies. diff --git a/docs/javascript-application-graph.md b/docs/javascript-application-graph.md index 2290491a5..48e17bf44 100644 --- a/docs/javascript-application-graph.md +++ b/docs/javascript-application-graph.md @@ -104,6 +104,15 @@ static inferences. Dynamic or ambiguous IPC is retained without a pairing edge. Runtime entities retain passive-CDP authority, while a successful static/runtime correspondence is a separately identified cross-layer inference. +Source module links retain their resolution mode. Static imports in `.ts` and +`.tsx` are `compiler-dependent` when compiler options have not been retained. +REA compares Node import and require resolution: a shared outcome remains +available with a limitation; divergent outcomes remain unavailable with both +conditional branches and their limitations. This models source relationships, +not verified emitted code or execution. A declaration file found only through +an emitted-extension fallback is retained as a candidate, not a runtime target; +an explicitly selected path keeps its original identity. + ## Evidence and authority Every observation and edge carries all of the following: diff --git a/docs/javascript-application-workflows.md b/docs/javascript-application-workflows.md index af0b6ba94..1e9e7fe19 100644 --- a/docs/javascript-application-workflows.md +++ b/docs/javascript-application-workflows.md @@ -23,6 +23,14 @@ artifact digest and structural graph ID. Semantic tracing requires the semantic relation graph and reports when it is unavailable rather than treating missing data as an empty graph. +Explicit TypeScript `import type` and `export type` declarations remain source +facts and do not create runtime import or export relationships. Type export names +are reported separately from value export names. Inline `type` specifiers can +leave an empty import or re-export with side effects under +[`verbatimModuleSyntax`](https://www.typescriptlang.org/tsconfig/verbatimModuleSyntax.html); +REA retains those dependency candidates and reports the unavailable compiler +options rather than assuming the dependency is erased. + The semantic graph wire format stores shared non-location provenance once in its required `evidence_contexts` table. Each node, relation, fingerprint, and unknown retains its exact `evidence.location` and names the owning context with @@ -156,9 +164,12 @@ to the comparison Evidence in a live session. `compare_source_to_bundle` compares one cryptographically committed `HistoricalSourceGraph` with authenticated application-graph Evidence. The stable scoring model reports every admitted signal and weight: exact source -digest, source-map original path, exact current path, path suffix, basename, and -language extension. Exact digest wins over location inference; weak basename -or extension evidence never forces a mapping. +digest, source-map original path, exact current path, path suffix, Unicode- +equivalent path, basename, and language extension. Exact digest wins over +location inference; weak basename, extension, and Unicode-equivalence evidence +never forces a mapping. Unicode-equivalent spellings are candidate evidence +only because distinct filesystem paths can preserve those spellings as separate +files; multiple canonical-equivalent candidates remain unknown. Each historical source file is classified as `unchanged`, `modified`, `removed`, `split`, `merged`, `duplicated`, or `unknown`. Multiple equally diff --git a/docs/javascript-artifact-reconstruction.md b/docs/javascript-artifact-reconstruction.md index b721d829d..090902ff8 100644 --- a/docs/javascript-artifact-reconstruction.md +++ b/docs/javascript-artifact-reconstruction.md @@ -1,19 +1,14 @@ # JavaScript artifact reconstruction -REA can project an operator-supplied Electron/JavaScript application directory -or ASAR into [JavaScript Application Graph](javascript-application-graph.md) -without executing application code. The target-free -`analyze_javascript_application` MCP tool, dedicated -`rea analyze-javascript-application` CLI command, and generic -`rea analyze PATH` directory/ASAR route expose the same application -service and return an Evidence envelope containing the graph and an Electron -boundary summary. +Inspect a local Electron/JavaScript directory or ASAR without executing its code. +`analyze_javascript_application` and the CLI routes below return an Evidence +record with the [application graph](javascript-application-graph.md), static +Electron observations, statistics, limitations, and coverage. -The resulting Evidence can be combined with passive web or Electron capture -Evidence through -[`reconcile_javascript_runtime`](javascript-runtime-reconciliation.md). That -second operation does not rerun static analysis or contact CDP; it preserves -separate static, runtime, and cross-layer inference authorities. +Start with the [public workflow](#public-workflow), select sources when useful, +then [read the analysis](#read-the-analysis). Use [application workflows](javascript-application-workflows.md) +for tracing and comparisons, or [partial recovery](#recover-partial-analysis) +when an operation is interrupted. ## Public workflow @@ -105,141 +100,7 @@ only reduces delivery; source selection reduces text acquisition and analysis. Explicit native provider or snapshot routing rejects `--source-path` rather than ignoring it. -## ASAR integrity - -ASAR inventory checks Electron integrity metadata for embedded archive entries -and supplied `.asar.unpacked` companion files. An integrity failure identifies -the logical path, declared and calculated SHA-256 values, and whether the entry -was unpacked. By default, a mismatch is returned as a failure with its artifact -context. Application analysis can explicitly select `record-and-continue` to -analyze observed bytes while retaining each contradiction's declared and -observed hashes and `observed-untrusted` trust. Such results mark application -graph coverage partial and include every contradicted path in the limitations. -Mismatched nested ASARs stay opaque rather than being expanded. An unpacked -entry whose companion bytes were not supplied remains `unavailable`. - -An unpacked entry whose companion bytes were not supplied remains -`unavailable`. REA continues analyzing embedded JavaScript and records the -missing native/resource bytes as unknown. See [what is reconstructed](#what-is-reconstructed) -for the inventory fields and [MCP integrity handling](mcp-contracts.md#integrity-record-and-continue) -for the tool-result contract. - -## Large results - -Application analysis projects semantic relationships one source file at a time. -After projection, it retains only the lexical module facts and exported return -shapes needed to build application relationships. Full source IR does not stay -resident for every file together. Callable ownership and contained-reference -queries use per-file range indexes, while call sites use exact-range lookups. -Existing node budgets and coverage reporting remain in effect. - -Progress identifies the source file being parsed and projected. Cancellation is -checked between files and throughout result transfer. The owned analyzer can -be stopped while its synchronous parser or semantic extractor is active; -the CLI/MCP process remains available for control requests. - -Graph and Evidence identifiers hash canonical JSON incrementally, without -assembling a single string for the whole graph. The canonical bytes and existing -identifiers remain unchanged. The opt-in regression check is -`npm run verify:javascript:digests`; -it hashes a value larger than the running Node engine's single-string limit. - -Both application CLI routes stream complete JSON and JSONL output in bounded -chunks, including field filters and `--full-output`. They wait for each stdout -write instead of constructing or reparsing a document-sized string. The opt-in -`npm run verify:javascript:output` checks the actual CLI formatting boundary with -a temporary output file larger than the running engine's string limit, verifies -its bytes and digest, and removes it. Use `-- jsonl` for the compact JSONL check. -Each check needs space for one output file plus a 1 GiB free-space reserve. - -Other CLI formats and `--token-count` still assemble whole strings. -Field selection remains useful when the caller needs a -smaller view, for example `--format json --filter-output -evidence_id,normalized_result.statistics`. Streaming output does not bound the -memory needed to construct the analysis graph itself. - -JavaScript source parsing, static analysis and semantic projection run in one -owned analysis process, reused sequentially across files. Target code is never -executed. The analyzer defaults to 1024 MiB of V8 old-space and a 300000 ms -deadline per source, including startup and fact transfer. Select -`max_heap_mb` and `analysis_timeout_ms` through MCP, or `--max-heap-mb` and -`--analysis-timeout-ms` on the dedicated CLI command. These choices control the -analyzer; the caller's `NODE_OPTIONS` still controls the CLI/MCP process heap. -V8 old-space limits do not impose a process RSS limit. When REA runs on Bun, -the analyzer ignores the V8 heap flags; resource failures then report -`worker_heap_limit_bytes` as null instead of a requested or V8-reported limit. -On Windows, the analyzer's owned Job Object instead limits its committed -memory to `max_heap_mb` plus a 512 MiB reserve for Bun itself (1536 MiB by -default). Reaching it fails the current source with the same memory resource -failure and reports `worker_process_memory_limit_bytes`, also a coverage limit; -the next source starts a new analyzer. Bun elsewhere enforces no analyzer limit. - -The default semantic capacities are 100000 nodes across the application and -20000 per source. Large bundles may explicitly select `max_semantic_nodes` and -`max_semantic_nodes_per_file` (CLI: `--max-semantic-nodes` and -`--max-semantic-nodes-per-file`), each from 1 to 1000000. The per-file offer is -also bounded by the remaining application capacity. Raising these controls does -not bypass worker heap, execution deadline or parent result admission. Truncated -coverage reports both effective node ceilings; omitted relationships remain -unknown. - -While sources remain, the sequential worker reserves one next compact static -checkpoint at its 8 MiB bound with the same 6x retention expansion used at -admission. Earlier checkpoints are already charged to retained bytes; the -remaining inventory does not multiply the reserve. Streamed file transfers keep the default 512 MiB -allowance, and can grow with the parent's offered retention budget (8x byte -expansion), up to 2 GiB. Individual records remain bounded to 8 MiB. The parent -still independently checks actual bytes, record overhead, digests and source -identities before adopting results. - -A source that exhausts the analyzer heap does not terminate the CLI/MCP -process. Completed static facts are retained, other files can still be analyzed, -and unexamined semantic relationships remain explicit unknowns. The parent -also checks transfer expansion and accumulated results against its remaining -heap before accepting semantic facts. A resource-limited result has partial -coverage, the observed limits and an `analyze-javascript-source` unknown scope -with the specific failure, including captured diagnostics when available. -Resource failures do not increment syntax parse failures. There is no fixed -source-length cutoff. - -Static observations also need memory when expanded into nodes, relationships -and Evidence. If that expansion does not fit, the file node retains -`static_analysis` and any admitted `semantic_module_analysis` observations, -including their exact values and source locations. Use the public modules item -view to read them. The graph marks those unexpanded relationships as unknown. -If cumulative result capacity is exhausted, analysis stops; inventoried but -unexamined files remain present with explicit unknown scopes. - -A timeout stops the remaining analysis and returns typed failure details with -completed partial Evidence. MCP failure details return -`partial_observation: { kind: "retained-evidence", evidence_id: "..." }` -after recording succeeds, so `inspect_analysis_view` can open that analysis -directly without serializing the entire partial graph into the error response. -CLI failure output retains the complete partial Evidence. -Cancellation after source analysis begins likewise retains completed facts, -including cancellation during analyzer cleanup, graph construction, or Evidence -sealing. REA finishes projecting those owned facts cooperatively to return partial -Evidence. An SDK client may reject its cancelled request before receiving that -reply. On the same MCP connection, inspect the Evidence bundle -and use the retained analysis ID with `inspect_analysis_view`. Owned analyzer -cleanup is verified before its private files are released. Cleanup uncertainty -is reported separately and retains ownership for retry. - -CLI workflows parse larger JSON input files incrementally from one verified -regular-file handle, without constructing a document-sized string. Smaller -files retain native JSON parsing. Both paths require strict JSON and valid -UTF-8, and return one complete value; the assembled object still needs memory. -An individual JSON string exceeding the native length limit or the available -heap headroom for assembly returns -`resource_constraint` with `input_reason: "too-large"`. Supply a smaller valid -value; for Evidence workflows, re-analyze a smaller selection of the original -target and use its complete Evidence. Splitting JSON text or trimming Evidence -fields does not produce a valid workflow input. - -Evidence bundle and analysis snapshot file readers still decode whole -documents. Their runtime string-limit failures report a resource constraint -with the selected path, observed bytes and UTF-16 limit, rather than malformed -JSON. +## Read the analysis `analyze_javascript_application` returns the complete analysis Evidence by default. Select `"detail": "summary"` to retain that complete Evidence in the @@ -251,18 +112,82 @@ workflows as a retained reference. The summary does not repeat or truncate the analysis; a server without session retention refuses summary detail with `capability_unavailable`. CLI output is unchanged and always complete. -MCP prepares the complete repeated response incrementally against the pinned -SDK's 10 MiB stdio receive-buffer budget. Oversized results return an actionable -transport constraint and the exact same-session Evidence reference. Use -`inspect_analysis_view` with the retained Evidence ID for a summary, one -module, or a stable page of module identities. Use `trace_application_feature` -once a module, route, or string seed is known, or `export_evidence_bundle` to -write the complete canonical bundle without a document-sized allocation. -Same-session analysis reads reuse authenticated immutable snapshots; foreign -inline Evidence is still parsed and authenticated. -See [MCP tool results](mcp-contracts.md#tool-results) for larger client buffers -and `REA_MCP_MAX_RESPONSE_BYTES`. Follow-up results remain complete and can also -exceed the transport budget. +With a connected MCP `client` and the caller-selected absolute `inputPath`, this +recipe analyzes once and pages module identities using the returned ID: + +```js +const analysis = await client.callTool({ + name: "analyze_javascript_application", + arguments: { input_path: inputPath, detail: "summary" }, +}); +if (analysis.isError) throw new Error(JSON.stringify(analysis.content)); +const parentId = + analysis.structuredContent.normalized_result.parent_evidence_id; +const modules = await client.callTool({ + name: "inspect_analysis_view", + arguments: { + source: { kind: "retained-evidence", evidence_id: parentId }, + view: { kind: "page", collection: "modules", offset: 0, limit: 16 }, + }, +}); +if (modules.isError) throw new Error(JSON.stringify(modules.content)); +``` + +Select a returned module's exact `node_id` for an item view. A path can identify +several graph roles; module items preserve their recorded properties and source +locations. Follow `coverage.next_offset` when another page matters. For feature +tracing, version comparison, and retained-input examples, use the +[application workflows](javascript-application-workflows.md). + +For supplied passive browser or Electron observations, use +[runtime reconciliation](javascript-runtime-reconciliation.md). It compares +existing Evidence without rerunning static analysis or contacting CDP. + +## ASAR integrity + +ASAR inventory checks Electron integrity metadata for embedded archive entries +and supplied `.asar.unpacked` companion files. An integrity failure identifies +the logical path, declared and calculated SHA-256 values, and whether the entry +was unpacked. By default, a mismatch is returned as a failure with its artifact +context. Application analysis can explicitly select `record-and-continue` to +analyze observed bytes while retaining each contradiction's declared and +observed hashes and `observed-untrusted` trust. Such results mark application +graph coverage partial and include every contradicted path in the limitations. +Mismatched nested ASARs stay opaque rather than being expanded. + +An unpacked entry whose companion bytes were not supplied remains +`unavailable`. REA continues analyzing embedded JavaScript and records the +missing native/resource bytes as unknown. The occurrence keeps +`hash_status: unavailable`; no content-addressed child artifact is created for +those missing bytes. See [MCP integrity handling](mcp-contracts.md#integrity-record-and-continue) +for the tool-result contract. + +## Large results + +Use MCP `detail: "summary"` for a large application, then read selected views of +the retained analysis. Summary changes delivery only. To reduce source parsing, +select exact [source paths](#select-sources-before-analysis). + +If a complete response exceeds the transport budget, use its retained Evidence +ID for a summary, module page, or item, or export the bundle. See +[MCP tool results](mcp-contracts.md#tool-results) for delivery limits, export, and +matching server/client buffer settings. Follow-up results also need to fit that +budget. [Analyzer limits](#analyzer-and-result-admission) control analysis memory, +source deadlines, and semantic capacity separately. + +## Recover partial analysis + +A source timeout stops the remaining analysis and returns completed facts as +partial Evidence. Cancellation after source analysis begins can also retain +completed facts, including when interrupted during cleanup, graph construction, +or Evidence sealing. Unexamined relationships remain unknown. + +MCP returns a `partial_observation` retained reference after recording succeeds; +open it with `inspect_analysis_view` on the same connection. If the SDK stopped +waiting before receiving the reply, follow [MCP cancellation recovery](mcp-contracts.md#progress-and-cancellation) +to find the record. CLI failure output contains the complete partial Evidence. +Owned analyzer cleanup is verified before private files are released; uncertain +cleanup retains ownership for retry and is reported separately. ## What is reconstructed @@ -279,14 +204,6 @@ execute them. JavaScript and HTML source ranges retain an initial UTF-8 BOM as one UTF-16 code unit, matching the original bytes identified by the artifact digest. -If an ASAR declares an unpacked companion entry but the corresponding -`.unpacked` file is absent from the operator-supplied artifact set, REA -keeps the ASAR occurrence with `hash_status: unavailable`, records an explicit -limitation, and does not create a content-addressed child artifact for those -missing bytes. This allows static JavaScript/Electron reconstruction to proceed -for the embedded files while preserving the missing native/resource bytes as an -unknown instead of silently treating them as absent or verified. - Plain `.ts` artifact sources use TypeScript syntax without JSX, including angle-bracket type assertions. `.tsx` and `.jsx` retain JSX parsing. @@ -516,6 +433,110 @@ and inventoried containment edge is retained. If parsing or artifact safety boundaries omit input, coverage reports that omission; when an exact omission count is not knowable, `omitted_count` is `null` rather than a guessed value. +### Analyzer and result admission + +Application analysis projects semantic relationships one source file at a time. +After projection, it retains only the lexical module facts and exported return +shapes needed to build application relationships. Full source IR does not stay +resident for every file together. Callable ownership and contained-reference +queries use per-file range indexes, while call sites use exact-range lookups. +Existing node budgets and coverage reporting remain in effect. + +Progress identifies the source file being parsed and projected. Cancellation is +checked between files and throughout result transfer. The owned analyzer can +be stopped while its synchronous parser or semantic extractor is active; +the CLI/MCP process remains available for control requests. + +Graph and Evidence identifiers hash canonical JSON incrementally, without +assembling a single string for the whole graph. The canonical bytes and existing +identifiers remain unchanged. The opt-in regression check is +`npm run verify:javascript:digests`; +it hashes a value larger than the running Node engine's single-string limit. + +Both application CLI routes stream complete JSON and JSONL output in bounded +chunks, including field filters and `--full-output`. They wait for each stdout +write instead of constructing or reparsing a document-sized string. The opt-in +`npm run verify:javascript:output` checks the actual CLI formatting boundary with +a temporary output file larger than the running engine's string limit, verifies +its bytes and digest, and removes it. Use `-- jsonl` for the compact JSONL check. +Each check needs space for one output file plus a 1 GiB free-space reserve. + +Other CLI formats and `--token-count` still assemble whole strings. +Field selection remains useful when the caller needs a +smaller view, for example `--format json --filter-output +evidence_id,normalized_result.statistics`. Streaming output does not bound the +memory needed to construct the analysis graph itself. + +JavaScript source parsing, static analysis and semantic projection run in one +owned analysis process, reused sequentially across files. Target code is never +executed. The analyzer defaults to 1024 MiB of V8 old-space and a 300000 ms +deadline per source, including startup and fact transfer. Select +`max_heap_mb` and `analysis_timeout_ms` through MCP, or `--max-heap-mb` and +`--analysis-timeout-ms` on the dedicated CLI command. These choices control the +analyzer; the caller's `NODE_OPTIONS` still controls the CLI/MCP process heap. +V8 old-space limits do not impose a process RSS limit. When REA runs on Bun, +the analyzer ignores the V8 heap flags; resource failures then report +`worker_heap_limit_bytes` as null instead of a requested or V8-reported limit. +On Windows, the analyzer's owned Job Object instead limits its committed +memory to `max_heap_mb` plus a 512 MiB reserve for Bun itself (1536 MiB by +default). Reaching it fails the current source with the same memory resource +failure and reports `worker_process_memory_limit_bytes`, also a coverage limit; +the next source starts a new analyzer. Bun elsewhere enforces no analyzer limit. + +The default semantic capacities are 100000 nodes across the application and +20000 per source. Large bundles may explicitly select `max_semantic_nodes` and +`max_semantic_nodes_per_file` (CLI: `--max-semantic-nodes` and +`--max-semantic-nodes-per-file`), each from 1 to 1000000. The per-file offer is +also bounded by the remaining application capacity. Raising these controls does +not bypass worker heap, execution deadline or parent result admission. Truncated +coverage reports both effective node ceilings; omitted relationships remain +unknown. + +While sources remain, the sequential worker reserves one next compact static +checkpoint at its 8 MiB bound with the same 6x retention expansion used at +admission. Earlier checkpoints are already charged to retained bytes; the +remaining inventory does not multiply the reserve. Streamed file transfers keep the default 512 MiB +allowance, and can grow with the parent's offered retention budget (8x byte +expansion), up to 2 GiB. Individual records remain bounded to 8 MiB. The parent +still independently checks actual bytes, record overhead, digests and source +identities before adopting results. + +A source that exhausts the analyzer heap does not terminate the CLI/MCP +process. Completed static facts are retained, other files can still be analyzed, +and unexamined semantic relationships remain explicit unknowns. The parent +also checks transfer expansion and accumulated results against its remaining +heap before accepting semantic facts. A resource-limited result has partial +coverage, the observed limits and an `analyze-javascript-source` unknown scope +with the specific failure, including captured diagnostics when available. +Resource failures do not increment syntax parse failures. There is no fixed +source-length cutoff. + +Static observations also need memory when expanded into nodes, relationships +and Evidence. If that expansion does not fit, the file node retains +`static_analysis` and any admitted `semantic_module_analysis` observations, +including their exact values and source locations. Use the public modules item +view to read them. The graph marks those unexpanded relationships as unknown. +If cumulative result capacity is exhausted, analysis stops; inventoried but +unexamined files remain present with explicit unknown scopes. + +### Large local JSON inputs + +CLI workflows parse larger JSON input files incrementally from one verified +regular-file handle, without constructing a document-sized string. Smaller +files retain native JSON parsing. Both paths require strict JSON and valid +UTF-8, and return one complete value; the assembled object still needs memory. +An individual JSON string exceeding the native length limit or the available +heap headroom for assembly returns +`resource_constraint` with `input_reason: "too-large"`. Supply a smaller valid +value; for Evidence workflows, re-analyze a smaller selection of the original +target and use its complete Evidence. Splitting JSON text or trimming Evidence +fields does not produce a valid workflow input. + +Evidence bundle and analysis snapshot file readers still decode whole +documents. Their runtime string-limit failures report a resource constraint +with the selected path, observed bytes and UTF-16 limit, rather than malformed +JSON. + ## Verification boundary The source-owned fixture covers an extracted directory, a direct ASAR with an diff --git a/docs/javascript-runtime-observation.md b/docs/javascript-runtime-observation.md index ecfed708f..9a0e90b1f 100644 --- a/docs/javascript-runtime-observation.md +++ b/docs/javascript-runtime-observation.md @@ -36,7 +36,9 @@ application starts, and REA never resumes it or sends `Runtime.runIfWaitingForDebugger`. Resume a paused target with a separate caller-owned debugger before requesting application runtime observations. -The caller supplies the literal-loopback HTTP endpoint directly. Selecting an endpoint exposes all targets it serves and their local script locations or renderer origins. A target must match the exact requested target ID and expose a same-port WebSocket reported by that endpoint. Targets already marked attached are rejected rather than displacing another debugger. Local paths are canonicalized after symlink resolution. +The caller supplies the literal-loopback HTTP endpoint directly. Selecting an endpoint exposes all targets it serves and their local script locations or renderer origins. A target must match the exact requested target ID and expose a same-port WebSocket reported by that endpoint. Targets explicitly marked attached are rejected rather than displacing another debugger. Node's `/json/list` omits attachment state, so REA preserves it as `null` (unknown), reports that limitation, and permits observation unless the endpoint explicitly reports `attached: true`. Local paths are canonicalized after symlink resolution. + +The `attached` field in JavaScript runtime and browser target results is nullable: `true` and `false` are reported only when discovery supplied a boolean; `null` means the endpoint omitted or could not report the state. CDP `TargetInfo` worker records require an `attached` boolean; REA excludes a worker record with a missing or malformed value as an invalid protocol value. `list_javascript_runtime_targets` returns every available target in one inline array. diff --git a/docs/javascript-runtime-reconciliation.md b/docs/javascript-runtime-reconciliation.md index af59e825b..a0a600574 100644 --- a/docs/javascript-runtime-reconciliation.md +++ b/docs/javascript-runtime-reconciliation.md @@ -1,28 +1,31 @@ # JavaScript static/runtime reconciliation REA can combine an existing static JavaScript Application Graph with one or -more passive browser, Electron page, or Node/Electron V8 Inspector captures without collapsing their different -authorities. The `reconcile_javascript_runtime` MCP tool and +more browser, Electron, or Node/Electron V8 Inspector observations while +preserving their different authorities. The `reconcile_javascript_runtime` MCP tool and `rea reconcile-javascript-runtime` CLI command accept Evidence records and return derived Evidence containing a combined JavaScript Application Graph and explicit match, ambiguity, mismatch, and unknown classifications. The operation performs no filesystem, browser, or Electron I/O. It accepts only semantically verified Evidence produced by `analyze_javascript_application`, -`inspect_web_page`, `inspect_electron_page`, or -`observe_javascript_runtime`; matching operation names alone +`inspect_web_page`, `inspect_electron_page`, `observe_javascript_runtime`, or +`capture_electron_scenario`; matching operation names alone is insufficient. Provider identity, predicate type, subject digest, target parameters, and normalized-result schemas are checked before reconciliation. +`capture_electron_scenario` supplies target-only partial observations. It does +not establish loaded-script coverage; see [Electron observation](electron-observation.md). + ## Workflow 1. Run `analyze_javascript_application` against exactly one application layer. Optional cache or assets directories can be analyzed independently and supplied as additional layers. 2. Run `inspect_web_page`, `inspect_electron_page`, or the attach-only - `observe_javascript_runtime`. Capturing script sources - is optional, but a source capture provides the strongest byte - identity. + `observe_javascript_runtime`, or supply existing `capture_electron_scenario` + Evidence with the partial scope above. Capturing script sources is optional, + but a source capture provides the strongest byte identity. 3. Pass the resulting Evidence records to `reconcile_javascript_runtime`. Browser URLs normally need an explicit URL-prefix mapping. Extracted Electron and V8 Inspector file locations are mapped automatically when runtime files remain @@ -104,7 +107,7 @@ nodes. REA evaluates compatible static candidates conservatively: Every successful cross-layer `observed_as` edge has `authority: cross-layer-reconciliation` and `state: inferred`. The underlying -artifact/AST observations and passive-CDP observations remain unchanged and +artifact/AST observations and runtime observations remain unchanged and retain their own Evidence links. ## Loaded, resident, and not observed diff --git a/docs/managed-code-analysis.md b/docs/managed-code-analysis.md index 18360ec3d..060b44bc2 100644 --- a/docs/managed-code-analysis.md +++ b/docs/managed-code-analysis.md @@ -26,6 +26,61 @@ current tool set. The canonical tool inventory is the [build-generated catalog](mcp-contracts.md#generated-catalog). +## Inspect an assembly + +```bash +rea inspect-managed-artifact /absolute/path/Assembly.dll --json +rea inspect-managed-members /absolute/path/Assembly.dll --json +``` + +Use the artifact result to identify the assembly and its metadata coverage. +Member results retain build-local tokens, signatures, CIL bodies, and decoded +relationships. Use an exact reported `full_name` with `--type` when a focused +inspection is needed; see [selected member inspection](#selected-member-inspection). +Compare separate builds with [member comparison](#member-comparison), preserving +their paths, digests, and selection scope. + +### Metadata overview and retained rows + +The existing CLI and omitted/complete MCP detail return complete metadata +inventories. For identity and classification questions, select +`inspect_managed_artifact` with +`{"path":"/absolute/path/Assembly.dll","detail":"summary"}` on the first call. +This keeps the complete source in the session and returns a distinct linked +`inspect_analysis_view` overview with complete PE/CLI, classification and its +evidence, metadata status, module/MVID, assembly, frameworks, returned-row counts, +coverage/issues and limitations. No assembly is loaded or executed. + +Use `normalized_result.parent_evidence_id` to page original rows: + +```json +{ + "source": { + "kind": "retained-evidence", + "evidence_id": "" + }, + "view": { + "kind": "managed", + "collection": "attributes", + "offset": 0, + "limit": 16 + } +} +``` + +Collections are `references`, `resources` and `attributes`; rows retain their +original values, nulls, order, metadata tokens and offsets. Pages retain source +metadata status and coverage. Exhaustion covers the returned parent collection, +not all possible metadata, and empty rows under partial/unavailable metadata do +not establish absence. Tokens are build-local and require the recorded artifact +SHA-256 and known module MVID for cross-observation matching. + +Retained views do not repeat the parser or require the source file to remain +available. Portable views use the authenticated original Evidence inline, +including the existing `inspect-analysis-view` CLI. Session record lifetime and +export/import semantics remain unchanged. A server without Evidence retention +rejects selected summary before analysis; complete delivery remains available. + ## Shipped scope The canonical parser admits PE/CLI bytes and their metadata/CIL without loading @@ -53,6 +108,12 @@ CIL decoding, and projected inspection records have a separate conservative output occurrences still consume that budget. These are inspection resource policies, not PE format limits or a hard bound on total V8 heap use. +Path-based member comparison uses the same per-input snapshot policy and +inspects its two selected paths sequentially, retaining each inspection rather +than both full byte snapshots. The limit therefore remains a per-file resource +admission rule, not an aggregate comparison limit. Comparison Evidence keeps +the caller-selected paths as its parameters and artifact locations. + Input overflow returns a resource constraint. Decode or projection overflow reports `resource-limit` with unavailable or partial coverage; omitted facts do not become empty observations. Ambiguous PE section mappings are rejected @@ -88,19 +149,39 @@ assembly. Older member Evidence without `selection` remains readable. ## Analysis objective -REA's managed-code track is intended to answer five different questions without -collapsing them: +Start by identifying the artifact with `inspect_managed_artifact`, then inspect +its types and CIL with `inspect_managed_members`. Use [member comparison](#member-comparison) +for another build, and [managed/native boundary rules](#managed-native-boundaries) +when matching declared native calls to supplied native Evidence. Static inspection +does not load or execute the assembly. Reconstructed structure and unresolved +native/runtime questions retain their own authority and coverage. -1. What exact artifact and managed deployment form is this? -2. What do its admitted metadata and CIL bytes state? -3. What source-like or behavioral structure can be reconstructed or inferred? -4. Which findings survive an exact-build check or a cross-build structural - comparison? -5. Which remaining questions require native analysis or runtime evidence that - static inspection cannot supply? +## Member comparison -The ordinary workflow ends at question four. Static analysis never loads or -executes the target. +Names and semantic labels do not establish durable member identity. Comparison +preserves observed differences, structural inferences, and unknowns separately. + +Cross-version matching first prefers exact CIL/signature identity. When that +does not match, it pairs an exact declared type, method name, and raw signature +before trying structural body shape. The exact-signature key uses names only +as part of that full tuple; names alone never select a pair. Duplicate tuples +remain ambiguous rather than being paired by token order. Fields follow the +same exact tiers. The raw signature is exact whether or not REA decoded it, so +undecoded signatures pair by that tuple too, but they never enter structural +rounds. An unmatched member is therefore reported as `unknown`, not added or +removed, when its own signature was not decoded or when the other side has an +unpaired member, one-sided or ambiguous, with the same declared type and name +whose signature was not decoded. + +For a matched method, an unavailable or partial body makes body-shape facets +unknown while preserving observed signature differences. Structural identity +compares normalized signatures, the limited decoded-CIL tuple fingerprint, +constants, and bounded shape context. It reports all candidates at the winning +score and remains ambiguous when the evidence does not distinguish them. The +digest does not itself remap metadata tokens. + +Tokens are always remapped through observed structure. A caller cannot carry +`0x06001234` into a new MVID and assume it names the same method. ## NativeAOT metadata recovery @@ -122,24 +203,40 @@ lists supported OS/architecture targets and deployment limitations, while its [native library guide](https://learn.microsoft.com/en-us/dotnet/core/deploying/native-aot/libraries) describes exported shared-library entry points. -REA supports an optional headless adapter for the Ghidra NativeAOT analyzer. -Supply a locally built `REA_GHIDRA_NATIVEAOT_JAR`; REA does not install the -extension or its toolchain. The verified boundary is .NET 8.0.22 RTR 9.1, -x86-64 ELF and native Windows PE targets analyzed on Linux x64 with Ghidra -12.1.4 and JDK 21. Other layouts, architectures, and hosts are unsupported. -See [NativeAOT recovery](ghidra-nativeaot.md) for build/configuration, recovered -metadata, derived-memory provenance, and the real verification lane. +REA offers a built-in read-only snapshot parser for x64 PE/RTR 9.1 metadata and +an optional Linux headless Ghidra adapter for annotations and broader recovery. +The adapter requires a locally built `REA_GHIDRA_NATIVEAOT_JAR`; REA does not +install it or its toolchain. The [NativeAOT guide](ghidra-nativeaot.md) defines +these routes, their layout/host restrictions, derived-memory provenance, and +verification coverage. REA's experimental Windows Ghidra boundary admits native x86 and x86-64 PE applications and DLLs for static analysis. This does not establish Windows NativeAOT metadata-recovery coverage. For NativeAOT analysis, preserve the selected native artifact's path and digest -and report recovered type data as provider observations. Linking those types +and report recovered type data with its returned provenance. Linking those types to native function addresses requires verified provider evidence; names or vtable similarity alone do not prove that a native function implements a specific managed method. +
+ +## Managed/native boundary rules + +`verify_managed_native_boundaries` compares declared P/Invoke module and entry +point identities with supplied native export or function evidence. Name/module +matches establish declaration links; they do not establish that a call executed. + +Metadata tokens are not native addresses. Native body mapping for C++/CLI, +ReadyToRun, NativeAOT, and IL2CPP requires separately verified format and provider +support. The managed static tools do not recover those mappings. The optional +[Ghidra NativeAOT extension](ghidra-nativeaot.md) has its own supported boundary. + +Declared import inventory supports a bounded positive claim. Its absence does +not exclude dynamic resolution, generated code, protected code, native helpers, +or server-side behavior. + ## Evidence record shape Member comparison, application graph projection, and managed/native verification @@ -223,48 +320,6 @@ For example, a decoded `nop; ret` body serializes exactly as This vector specifies the tuple order, `null` handling, absence of whitespace, UTF-8 encoding, and lowercase hexadecimal output. -## Member comparison - -Names and semantic labels do not establish durable member identity. Comparison -preserves observed differences, structural inferences, and unknowns separately. - -Cross-version matching first prefers exact CIL/signature identity. When that -does not match, it pairs an exact declared type, method name, and raw signature -before trying structural body shape. The exact-signature key uses names only -as part of that full tuple; names alone never select a pair. Duplicate tuples -remain ambiguous rather than being paired by token order. Fields follow the -same exact tiers. The raw signature is exact whether or not REA decoded it, so -undecoded signatures pair by that tuple too, but they never enter structural -rounds. An unmatched member is therefore reported as `unknown`, not added or -removed, when its own signature was not decoded or when the other side has an -unpaired member, one-sided or ambiguous, with the same declared type and name -whose signature was not decoded. - -For a matched method, an unavailable or partial body makes body-shape facets -unknown while preserving observed signature differences. Structural identity -compares normalized signatures, the limited decoded-CIL tuple fingerprint, -constants, and bounded shape context. It reports all candidates at the winning -score and remains ambiguous when the evidence does not distinguish them. The -digest does not itself remap metadata tokens. - -Tokens are always remapped through observed structure. A caller cannot carry -`0x06001234` into a new MVID and assume it names the same method. - -## Managed/native boundary rules - -`verify_managed_native_boundaries` compares declared P/Invoke module and entry -point identities with supplied native export or function evidence. Name/module -matches establish declaration links; they do not establish that a call executed. - -Metadata tokens are not native addresses. Native body mapping for C++/CLI, -ReadyToRun, NativeAOT, and IL2CPP requires separately verified format and provider -support. The managed static tools do not recover those mappings. The optional -[Ghidra NativeAOT extension](ghidra-nativeaot.md) has its own supported boundary. - -Declared import inventory supports a bounded positive claim. Its absence does -not exclude dynamic resolution, generated code, protected code, native helpers, -or server-side behavior. - ## Tool and packaging boundary The production parser is REA-owned TypeScript and ships with the existing Node diff --git a/docs/mcp-contracts.md b/docs/mcp-contracts.md index 9a8d35d7f..f3f7892f6 100644 --- a/docs/mcp-contracts.md +++ b/docs/mcp-contracts.md @@ -1,14 +1,278 @@ # MCP runtime contracts -## Generated catalog +Use this reference to call REA tools and interpret their replies on one MCP +connection. Start with [tool results](#tool-results), [retained Evidence](#retained-application-evidence-inputs), +and [session discovery](#identity-and-discovery). See [cancellation](#progress-and-cancellation) +for partial-result recovery and [first-query deadlines](#ghidra-first-query-deadlines-and-recovery) +when a cold provider exceeds the client's wait. -Run `npm run docs:generate` in a source checkout to generate the machine-readable -catalog at `docs/public/product-catalog.json`. Documentation deployments serve -the same file at [/rea/product-catalog.json](/rea/product-catalog.json). PR CI retains it with the packaged -skill and portable conformance projections in the `generated-docs` artifact. -These outputs describe the exact source revision being built; they are not -checked-in snapshots. For a running server, `binary_session` remains the -authoritative source of catalog identity and tool availability. +## Tool results + +Evidence-producing tools return the complete canonical Evidence record in both +text and structured content. Read `structuredContent.normalized_result` for the +operation result and `structuredContent.evidence_id` for its identity. +`raw_result` holds a provider representation distinct from that result, such +as an upstream tool's original report, and is `null` when there is none. The same +record is retained in the session bundle. `analysis_profile` is always present: +a concrete profile object or `null`; either value participates in semantic +identity. Records omitting this field are rejected. Pass the returned Evidence +directly to a compatible comparison tool: `analyze_function` Evidence can be passed +directly to `compare_functions`, and `inspect_artifact` Evidence to +`compare_artifacts`. Use `get_evidence_bundle` when the task needs broader +retained session history or an explicit bundle for transfer. + +Evidence and bundle imports reject unsupported fields in their envelopes, +identities, manifests and other fixed metadata before authentication. Imports +leave retained session state unchanged when validation fails. Keep application +metadata in the supported JSON payloads (`parameters`, `raw_result`, +`normalized_result`, or analysis-profile parameters), where keys are preserved. + +Tool execution failures return `isError: true` and the complete canonical +`{ "error": ... }` diagnostic as JSON in text `content`. Read that diagnostic +for the error code, target details, partial observations, and remediation. +Failures omit `structuredContent`, since each advertised `outputSchema` +describes successful results. Successful replies retain their schema-validated +structured data and matching text projection. Oversized errors are retained +as Evidence before delivery of a bounded diagnostic with an export reference; +if retention is unavailable or fails, the diagnostic reports that reason. + +`get_call_graph` returns a `graph` keyed by traversal depth and a top-level +`limitations` array with deduplicated execution caveats. Each node keeps its +relationship coverage and read-specific `limitations`, alongside observed +`calls`. When a provider does not classify its caveats, they remain on that +node and coverage is `unknown`. An empty call list with partial or unknown +coverage is not proof that the function has no calls. +`trace_call_path` reports each limited expansion in `residual_unknowns` and +sets `truncated: true`; any path already supported by observed edges remains +visible. When a requested goal is not reached but an expansion is unresolved, +`goal_status` is `unknown`; `not_reached` means traversal exhausted without +unresolved relationship reads. Cancellation remains a tool error. + +REA prepares complete MCP results within the pinned stdio client's 10 MiB +receive-buffer budget, including both text and structured representations and +room for the JSON-RPC envelope. Tool errors carry only their text +representation, so only that text counts against the budget. Response budget settings are captured at startup; +restart or recreate the server to apply changes. If a result cannot fit, REA returns +`resource_constraint` with `details.resource: "transport"` before constructing +a document-sized string. Analysis Evidence remains complete in the current +session. Its exact reference is reported in +`details.reported_limits.evidence_reference`; call `inspect_analysis_view` with +that reference for a summary, one section/module, or a stable page, or call +`export_evidence_bundle` with a destination path. Complete +bundle exports stream canonical JSON into an atomically published file. + +For oversized native function Evidence, `details.reported_limits.continuation` +contains a ready-to-call `inspect_analysis_view` request for the retained +pseudocode's first page. Use its `name` and `arguments` directly, then follow +`normalized_result.coverage.next_offset` for subsequent pages. The suggested +limit is the view contract's default, not a guarantee that arbitrary source or +metadata fits; reduce the limit or export when needed. Continuations are +offered for completed `analyze_function` results only after session recording is +acknowledged; the complete result and its retention reference remain intact. + +A broad follow-up or `get_evidence_bundle` can also exceed the response budget; exporting +preserves the complete session without sending it through a single MCP frame. +To discover existing records without their large payloads, call +`get_evidence_bundle` with `detail: "summary"`. Its `result.records` contain +Evidence IDs, artifact/provider identities, analysis-profile digests and native +procedure metadata. Optional `filters` match exact `evidence_id`, `operation`, +`target_sha256`, `analysis_profile_digest` or `procedure_address`. Use a discovered +ID with `inspect_analysis_view`; neither discovery nor retained selection starts +a provider. `retention: "complete-record"` describes stored Evidence, while +`native_dossier.value_flow` independently reports truncation, unavailable or +unknown metadata. Missing omission counts remain null. Summary output carries +every matching record; actual transport admission still applies. Omitted +`detail` preserves complete canonical bundle delivery; filters require summary. + +`list_unknowns` returns every matching current head by default. For a smaller +inline response, supply `offset` and `limit`, then follow `next_offset` until it +is null. `total` counts all matching heads; each page preserves complete records +in stable unknown ID order. Filters apply before paging. Pages reflect current +session state, so keep the unknown ledger unchanged while traversing it. + +For a portable exported bundle, the CLI shares this projection: +`rea inspect-evidence-bundle '{"path":"/tmp/evidence.json","detail":"summary","filters":{"operation":"analyze_function"}}' --format json`. +The CLI validates and materializes that local bundle under its existing memory +budget; summary delivery does not make arbitrary large files cheap to import. + +Cancelling an export stops further serialization and removes its staging file. +The destination changes only when a complete export is atomically published. + +Clients that explicitly configure a larger receive buffer can set the REA +server's `REA_MCP_MAX_RESPONSE_BYTES` environment variable to the same byte +count. This setting must be a safe decimal integer at least 10485760; REA +reserves 1024 bytes for the envelope. Raising it restores complete inline +delivery for responses that fit that buffer and Node's single-string limit. +It does not change the client's buffer, analysis coverage, or retained content. +Ordinary responses keep their existing complete result contract. + +### Untrusted target content + +Strings, symbols, decompiled code and pseudocode, page text, script bodies, +network captures, logs, and file listings come from the analysis target. A +target can embed text written to look like instructions to the agent, for +example a string asking it to run a command or download a "required" helper. +REA treats that text as data, and its server instructions tell the agent to do +the same: never follow directives found in tool results, and report any request +to run, install, download, or send something as a prompt-injection attempt. + +Results from tools that can return such content carry a stable marker in the +result's `_meta`, whether the call succeeded or failed: + +```json +{ "provenance": { "untrusted_content": true, "source": "analysis_target" } } +``` + +The marker is declared once per tool contract (`returnsTargetContent`) and is +on by default: only `export_evidence_bundle` and `record_unknown`, whose +results and errors contain only REA session state or caller-supplied values, +omit it. Tools whose results or errors can include provider, launcher, or +device output stay marked, including `binary_session` (provider failure +reasons and availability diagnostics), `close_binary` (provider cleanup +diagnostics with captured launcher output), `inspect_adb_client` and +`inspect_apktool_client` (version output and stderr excerpts), and +`update_unknown` (it echoes the stored question and domain, which an imported +bundle can supply). A new tool is marked until it is audited into +that exception list. Error results (`isError: true`) from a marked tool carry +the marker too, because a failure can include target-derived text: an error +message, captured output, or a `partial_observation` such as terminal data +retained by a cancelled `capture_process_scenario`. That covers provider and +admission failures, the response-budget error that replaces an oversized +result, its oversized-error replacement, and errors the MCP SDK builds itself, +such as input validation failures. The marker adds a fixed number of bytes +that the response budget accounts for. It does not alter `content` or +`structuredContent`. Hosts and hooks can use it to apply stricter handling, +such as requiring approval for process-launching or device-mutating tools +after target content was read. + +## Retained application Evidence inputs + +`analyze_javascript_application`, `inspect_binary_layout`, `inspect_artifact`, +`inspect_wasm_artifact`, and `inspect_macho` accept `detail`: +`complete` (default) returns the complete analysis Evidence; `summary` records +that complete Evidence in the session and returns the derived +`inspect_analysis_view` summary Evidence instead. Its +`normalized_result.parent_evidence_id` and `evidence_links` name the retained +analysis, so later views and application workflows read it without repeating +analysis or moving the complete record through the response. A server without +session retention refuses summary detail with `capability_unavailable`. +For `inspect_artifact`, omission also keeps the original request parameters and +complete output shape. Delivery selection never reaches the inventory engine; +the complete inspection and its atomic inventory Evidence remain retained. + +`inspect_analysis_view` also accepts `api-surface` for retained HAR capture Evidence, +grouping request lines by method, origin and format-rule path template. Templated +segments are inferences. Because paging follows the full grouping, every page is +inferred Evidence whenever any group is templated, and derived Evidence only when +no group was templated. +See [derived API surfaces](web-network-captures.md#derived-api-surface). + +`inspect_analysis_view` projects a caller-selected view of already completed +`inspect_binary_layout`, `analyze_javascript_application`, or `analyze_function` +Evidence. Native views select procedure, pseudocode, assembly, basic blocks, +comments, callers/callees, references, unresolved calls, referenced strings and +names, the native API record, and high-pcode facets without starting a provider. Native offset +and limit default to 0 and 64; pseudocode uses UTF-16 code units and never +splits surrogate pairs, while other pages count rows. Unavailable facts and +provider limitations remain explicit. Source is +an exact same-session retained reference or portable inline Evidence. Views are +a summary, a layout mitigations or linkage facet, one section/symbol/module, or +a stable page with a caller-selected positive `limit`. Module pages include +JavaScript assets, bundled modules, and source modules. Select an exact +`node_id` when a path is ambiguous or unavailable. Module items retain their +recorded property values and source locations; summaries include parent +application and semantic coverage. The result carries a digest of the selected +facts. Actual serialized size determines MCP transport admission: reduce the +page size or export retained Evidence if the view is too large. + +Completed `inspect_artifact` and atomic `inventory_artifact` Evidence also +support summary and inventory views. A summary reports the manifest's expected +counts separately from available record counts, observed entry kinds, inventory +Evidence IDs and inspection coverage. An inventory view selects `nodes`, +`occurrences`, `edges`, or `integrity_contradictions`, with `offset` and `limit` +defaulting to 0 and 64. For occurrences, optional `logical_paths` matches exact +recorded strings: omission selects all available records; `[]` selects none. +These selectors do not reopen the artifact or resolve filesystem paths. +`source_complete` records whether the available inventory passes the complete +graph checks. Exhausting a page from a partial source does not establish that +unreturned paths are absent. Views carry their own Evidence IDs and preserve +links to the original parent; complete producer output and historical inline +Evidence input parsing retain their existing shapes. + +Completed `inspect_wasm_artifact` Evidence supports a summary and +`view: {kind: "wasm", facet: "exports", offset: 0, limit: 64}`. Other facets +are `sections`, `imports`, `candidates`, `glue`, `wat`, `headers`, `details`, and +the singleton `tool_profile` (offset 0). Arrays retain original WABT forms and +records. Text facets page by UTF-16 code units and preserve complete Unicode +characters. Summaries report the selected artifact's identity, validation, +available counts, decoded WAT digest/length and exact tool profile. Runtime +execution and network acquisition remain `not-performed`. A valid WAT digest +is checked at the owning model boundary for current output and portable input. +The original producer still returns complete Evidence by default. When its +complete MCP reply exceeds the frame, use the exact reported retained +reference with these views, or export the complete source. Views do not run +WABT again and do not turn decoded WAT into original source. +For counts, validation and WAT identity, select `detail: "summary"` on the first +`inspect_wasm_artifact` call. It retains the original complete source without +attempting oversized delivery, and returns the same summary with an exact +`parent_evidence_id` for later export or facet reads. Delivery detail does not +reach WABT or change the original source Evidence ID. + +Completed `inspect_macho` Evidence supports a summary and +`view: {kind: "macho", facet: "exports", offset: 0, limit: 64}`. Facets are +`entrypoints`, `architectures`, `build_metadata`, `load_commands`, +`dependencies`, `imports`, `exports`, `segments`, and `provenance`; pages return +the original rows. The summary keeps the selected slice, header fields and UUID, +and replaces each collection with its returned count, reported total and +`exhaustive` flag. Each page repeats the paged collection's `source_total` and +`source_exhaustive`; exhausting a non-exhaustive collection does not establish +that unreturned symbols are absent. Large frameworks return megabytes of +symbols (Electron Framework: 2.5 MB of imports and exports, 3.3 KB as a +summary), so select `detail: "summary"` on the first call. Delivery detail +never reaches the native tools or changes the source Evidence ID. + +`trace_application_feature`, `trace_javascript_semantics`, +`compare_application_versions`, `compare_source_to_bundle`, and +`compare_javascript_export_shapes` accept complete inline application Evidence +or an exact reference to a record already retained by the current connection: + +```json +{ + "name": "trace_application_feature", + "arguments": { + "application": { + "kind": "retained-evidence", + "evidence_id": "ev_<64 lowercase hex characters>" + }, + "seed": { "kind": "module", "value": "search.js", "match": "exact" } + } +} +``` + +Use the `evidence_id` returned by `analyze_javascript_application` (or another +compatible application-graph producer). Comparisons accept this form in `left` +and `right`; each side can independently be inline or retained. Native +observation arrays continue to take complete inline Evidence. Results and their +Evidence remain complete inline, and both input forms pass the same semantic, +identity, authority, and provenance checks without running the producer again. + +References belong to the current connection's Evidence ledger. Opening another +target preserves retained records; `close_binary` clears them, even when no +binary is active. A fresh connection has its own ledger. A missing reference +reports its exact ID and `details.reason: "missing"`; the server cannot infer +whether it was never recorded, cleared, or retained by another connection. +Supply complete inline Evidence, repeat its producer, or import an exported +Evidence bundle before referencing that imported record. Export a bundle before +closing if the investigation needs it later. + +CLI application workflows continue to read portable inline Evidence from files +and run the same analysis workflows; a standalone CLI invocation cannot resolve +another MCP connection's retained records. No additional lookup call, provider +selection, or approval step is required for a same-session follow-up. +CLI `inspect-artifact` continues to return complete portable Evidence. Save that +JSON to a file and use `inspect-analysis-view` with inline source Evidence for +later inventory summaries or pages; a one-shot CLI session cannot retain a +parent for another invocation. ## Identity and discovery @@ -23,94 +287,6 @@ are currently unavailable. Opening or closing a target or observing a provider health transition leaves that catalog unchanged and does not emit `notifications/tools/list_changed`. -Advertised input and output schemas contain no reachable recursive references. -Schemas share repeated definitions through schema-local references while -preserving complete nested fields and validation rules. Input properties retain -their descriptions and literal examples. - -Hosts forward input schemas to the model with every request, so advertised -examples never copy complete producer Evidence. An embedded Evidence record is -shown as its exact `{"kind":"retained-evidence","evidence_id":"ev_..."}` -reference where the tool accepts one. An example that can only carry inline -Evidence stays in the canonical contract and its executable tests, but is not -advertised. Every advertised example is a distinct valid canonical input. - -Root object unions are presented as -one object without root `anyOf`, `oneOf`, or `allOf` for model API compatibility. -The projection merges properties, retains shared required fields and -group-specific field dependencies, and describes the accepted input groups. -Canonical runtime validation enforces the exact union, including exclusions -that the advertised projection does not express. Tests validate the schemas -after SDK conversion and check advertised validation and actual calls. -Individual model APIs can impose additional nesting limits; complete producer -captures can exceed ten structural levels. - -### Compact input schema profile - -Some function-calling providers reject a request while any single tool's -`parameters` schema exceeds a literal serialized size cap; Moonshot clients -such as kimi-cli fail every request while the default catalog is attached -([#1484](https://github.com/morluto/rea/issues/1484)). Setting the server's -`REA_MCP_INPUT_SCHEMA_PROFILE` environment variable to `compact` renders every -advertised input schema within a 13,312-byte budget, measured to sit below -Moonshot's observed cap (community measurements: a 13.7 KB schema is accepted -while a ~15 KB one is rejected). The setting is read at startup; restart the -server to apply changes, as with `REA_MCP_MAX_RESPONSE_BYTES`. The default -value `full` keeps the complete advertisement unchanged. - -The compact profile renders the same tool set, output schemas, annotations, -and canonical server-side validation. It changes only the advertised input -JSON Schema: - -- Annotation prose leaves the advertised form: nested property descriptions, - literal examples, defaults, and titles are dropped. The root keeps its - description because it states the accepted input groups. -- Schema-local references are inlined within the budget. Kimi Code expands - references before sending provider requests, so sharing definitions cannot - establish the provider-facing size. Expansion stops at the budget before - allocating an oversized presentation. Unconstrained JSON fields advertise - all JSON value types explicitly so Kimi cannot infer string for Evidence - objects or arrays. -- The few schemas whose validation structure alone exceeds the budget - (`compare_web_captures`, `build_reconstruction_obligation_ledger`, - `evaluate_reconstruction_coverage`, `project_managed_application_graph`, - `compare_application_versions`, `capture_browser_scenario`) are advertised - in a reduced form: property names, reference-resolved types (including union - alternatives), first-level guidance, and the root's required-field constraints, - with nested validation detail elided. The - canonical schema still rejects malformed calls server-side, so callers - following the reduced advertisement receive the canonical typed error - instead of silent acceptance. - -Boundary tests pin every advertised compact schema to the budget, keep them -valid JSON Schema that still accepts every canonical example, and hold the -set of six reduced presentations as contracts evolve. Client verification -also checks provider-facing sizes and canonical examples after conversion by -the actual Kimi Code CLI; local captures do not establish Moonshot acceptance. - -Self-contained output schemas advertise a content-bound `$id`, including their -declared dialect. SDK validators can reuse compiled schemas across complete -catalog refreshes and equivalent tool outputs; changing the schema changes its -identity. Explicit schema IDs and relative external reference bases are -preserved. This keeps every tool and validation rule in discovery and does not -change the SDK's catalog invalidation or availability checks. - -`compare_web_captures` accepts exactly one of two input shapes: - -- Passive: `before` and `after` each contain `inspection`, the complete - `normalized_result` from `inspect_web_page`. Each may also contain `webmcp`, - the complete `normalized_result` from `discover_webmcp_tools`, or null. -- Scenario: `before_scenario` and `after_scenario` contain complete - `normalized_result` objects from `capture_browser_scenario`. Optional - `normalization` defaults to `{ "rules": [] }`. - -The advertised schema includes complete nested capture fields and rejects -incomplete pairs and structurally malformed captures. Mixed comparison families -can pass advertised validation; the SDK rejects them against the canonical -input schema before invoking the handler. Domain validation additionally checks -relationships such as event sequence references and retained counts; JSON -Schema does not express those cross-field invariants. - Call `binary_session` with `{}` and read `result.tool_availability` to choose a callable operation for the current target, provider, host, and negotiated client capabilities. The default result contains the complete inventory in groups that @@ -172,15 +348,6 @@ inventories, and do not claim that no short-lived descendant existed. ## Progress and cancellation -Tool execution failures return `isError: true` and the complete canonical -`{ "error": ... }` diagnostic as JSON in text `content`. Read that diagnostic -for the error code, target details, partial observations, and remediation. -Failures omit `structuredContent`, since each advertised `outputSchema` -describes successful results. Successful replies retain their schema-validated -structured data and matching text projection. Oversized errors are retained -as Evidence before delivery of a bounded diagnostic with an export reference; -if retention is unavailable or fails, the diagnostic reports that reason. - REA accepts ordinary `tools/call` progress tokens. The numeric `progress` counts emitted status observations and strictly increases, including when a waiting phase has completed no additional work. Updates are rate-bounded to at most one @@ -216,8 +383,13 @@ during graph/result sealing, cross-graph binding checks, Evidence JSON validatio and canonical hashing. Its final result validation reuses exact graphs whose owned constructors validated and completely sealed them; imported graphs still receive full schema and commitment checks. -Cancellation observed before completion returns `cancelled` and prevents the -provisional result from entering the session ledger; prior Evidence stays usable. +Cancellation before completion returns `cancelled` instead of a successful +result. Completed facts can be retained as new partial Evidence; prior Evidence +also stays usable. Read the error's `partial_observation` reference on the same +MCP connection. If the SDK stopped waiting before that reply arrived, use +`get_evidence_bundle` with `detail: "summary"` and an operation filter to find +the partial record, then open it with `inspect_analysis_view`. Cancellation +before any facts are completed may leave no partial record. Single-file parsing, graph construction, and validation of imported graphs still run synchronously, so control messages can wait for those phases to release the event loop. A rejected client promise alone does not @@ -229,6 +401,48 @@ through provider cleanup, including repeated delivery by package runners. Existing controlled-process cleanup and provider shutdown rules still apply; REA never kills a process it cannot prove it owns. +## Request scope and local effects + +Each tool request names the target and lifecycle it will use. Browser calls +carry a loopback CDP endpoint and target ID, with optional origin filters; +process and Electron scenarios carry the executable, arguments, actions, and +cleanup behavior; artifact tools carry the input path and requested operation. +REA runs the declared request directly and does not infer a broader target or +action from it. + +REA does not require permission grants or per-call approval flags. Setup still +prints its plan and requires confirmation before changing configuration or +installing Hopper. MCP clients control their own confirmation UI. + +Tool annotations describe effects and are hints, not authorization controls +([MCP ToolAnnotations](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations)). +`readOnlyHint` includes session state: an analysis call that records additive +Evidence is marked non-read-only even when it leaves the target unchanged. +`destructiveHint` is true when a tool may discard data (overwriting or clearing +analyst metadata, replacing files, dropping session state), runs or drives code +REA does not own (`executesForeignCode`: process, LLDB, Electron, browser, and +native UI scenarios), or changes an attached Android device (`mutatesDevice`: +push, install, uninstall, start, and stop). Ordinary Evidence recording is not +destructive. The effect record in `binary_session` and the generated catalog +carries each flag separately. +Effect metadata covers possible behavior across supported inputs: DMG inventory +can launch `hdiutil` and create an owned temporary mount directory; extraction +creates a fresh output directory on every call. Comparing supplied web captures +or PNG artifacts uses local data without contacting the browser. + +Host requirements remain in force. macOS may deny Accessibility, +Screen Recording, or native mounting; provider tools require their selected +analysis runtime. These failures are reported at the operation that needs +them. A configured provider or an endpoint alone does not establish that a +target is supported. + +Evidence bundles, snapshots, and extraction use the paths and output behavior +declared by their tools. Artifact extraction materializes the selected regular +files into a fresh REA-chosen temporary directory and reports its path. + +`analyze_javascript_application` reads the supplied local directory or ASAR path +and returns its result and Evidence inline. + ## Ghidra first-query deadlines and recovery A successful MCP initialize handshake establishes the REA connection. @@ -328,161 +542,6 @@ automatically. A provider timeout, installation failure, or host permission denial needs its own reported recovery; increasing a client deadline alone does not fix those failures. -## Tool results - -Custom clients upgrading from 6.1 should follow the -[6.2 migration guide](migration-6.2.md#mcp-results-and-evidence). - -Evidence-producing tools return the complete canonical Evidence record in both -text and structured content. Read `structuredContent.normalized_result` for the -operation result and `structuredContent.evidence_id` for its identity. -`raw_result` holds a provider representation distinct from that result, such -as an upstream tool's original report, and is `null` when there is none. The same -record is retained in the session bundle. `analysis_profile` is always present: -a concrete profile object or `null`; either value participates in semantic -identity. Records omitting this field are rejected. Pass the returned Evidence -directly to a compatible comparison tool: `analyze_function` Evidence can be passed -directly to `compare_functions`, and `inspect_artifact` Evidence to -`compare_artifacts`. Use `get_evidence_bundle` when the task needs broader -retained session history or an explicit bundle for transfer. - -`get_call_graph` returns a `graph` keyed by traversal depth and a top-level -`limitations` array with deduplicated execution caveats. Each node keeps its -relationship coverage and read-specific `limitations`, alongside observed -`calls`. When a provider does not classify its caveats, they remain on that -node and coverage is `unknown`. An empty call list with partial or unknown -coverage is not proof that the function has no calls. -`trace_call_path` reports each limited expansion in `residual_unknowns` and -sets `truncated: true`; any path already supported by observed edges remains -visible. Tool errors remain in their existing error or failure fields. - -REA prepares complete MCP results within the pinned stdio client's 10 MiB -receive-buffer budget, including both text and structured representations and -room for the JSON-RPC envelope. Tool errors carry only their text -representation, so only that text counts against the budget. Response budget settings are captured at startup; -restart or recreate the server to apply changes. If a result cannot fit, REA returns -`resource_constraint` with `details.resource: "transport"` before constructing -a document-sized string. Analysis Evidence remains complete in the current -session. Its exact reference is reported in -`details.reported_limits.evidence_reference`; call `inspect_analysis_view` with -that reference for a summary, one section/module, or a stable page, or call -`export_evidence_bundle` with a destination path. Complete -bundle exports stream canonical JSON into an atomically published file. - -For oversized native function Evidence, `details.reported_limits.continuation` -contains a ready-to-call `inspect_analysis_view` request for the retained -pseudocode's first page. Use its `name` and `arguments` directly, then follow -`normalized_result.coverage.next_offset` for subsequent pages. The suggested -limit is the view contract's default, not a guarantee that arbitrary source or -metadata fits; reduce the limit or export when needed. Continuations are -offered for completed `analyze_function` results only after session recording is -acknowledged; the complete result and its retention reference remain intact. - -A broad follow-up or `get_evidence_bundle` can also exceed the response budget; exporting -preserves the complete session without sending it through a single MCP frame. -To discover existing records without their large payloads, call -`get_evidence_bundle` with `detail: "summary"`. Its `result.records` contain -Evidence IDs, artifact/provider identities, analysis-profile digests and native -procedure metadata. Optional `filters` match exact `evidence_id`, `operation`, -`target_sha256`, `analysis_profile_digest` or `procedure_address`. Use a discovered -ID with `inspect_analysis_view`; neither discovery nor retained selection starts -a provider. `retention: "complete-record"` describes stored Evidence, while -`native_dossier.value_flow` independently reports truncation, unavailable or -unknown metadata. Missing omission counts remain null. Summary output carries -every matching record; actual transport admission still applies. Omitted -`detail` preserves complete canonical bundle delivery; filters require summary. - -For a portable exported bundle, the CLI shares this projection: -`rea inspect-evidence-bundle '{"path":"/tmp/evidence.json","detail":"summary","filters":{"operation":"analyze_function"}}' --format json`. -The CLI validates and materializes that local bundle under its existing memory -budget; summary delivery does not make arbitrary large files cheap to import. - -Cancelling an export stops further serialization and removes its staging file. -The destination changes only when a complete export is atomically published. - -Clients that explicitly configure a larger receive buffer can set the REA -server's `REA_MCP_MAX_RESPONSE_BYTES` environment variable to the same byte -count. This setting must be a safe decimal integer at least 10485760; REA -reserves 1024 bytes for the envelope. Raising it restores complete inline -delivery for responses that fit that buffer and Node's single-string limit. -It does not change the client's buffer, analysis coverage, or retained content. -Ordinary responses keep their existing complete result contract. - -## Retained application Evidence inputs - -`analyze_javascript_application` and `inspect_binary_layout` accept `detail`: -`complete` (default) returns the complete analysis Evidence; `summary` records -that complete Evidence in the session and returns the derived -`inspect_analysis_view` summary Evidence instead. Its -`normalized_result.parent_evidence_id` and `evidence_links` name the retained -analysis, so later views and application workflows read it without repeating -analysis or moving the complete record through the response. A server without -session retention refuses summary detail with `capability_unavailable`. - -`inspect_analysis_view` also accepts `api-surface` for retained HAR capture Evidence, -grouping request lines by method, origin and format-rule path template. Templated -segments are inferences. Because paging follows the full grouping, every page is -inferred Evidence whenever any group is templated, and derived Evidence only when -no group was templated. -See [derived API surfaces](web-network-captures.md#derived-api-surface). - -`inspect_analysis_view` projects a caller-selected view of already completed -`inspect_binary_layout`, `analyze_javascript_application`, or `analyze_function` -Evidence. Native views select procedure, pseudocode, assembly, basic blocks, -comments, callers/callees, references, unresolved calls, referenced strings and -names, the native API record, and high-pcode facets without starting a provider. Native offset -and limit default to 0 and 64; pseudocode uses UTF-16 code units and never -splits surrogate pairs, while other pages count rows. Unavailable facts and -provider limitations remain explicit. Source is -an exact same-session retained reference or portable inline Evidence. Views are -a summary, a layout mitigations or linkage facet, one section/symbol/module, or -a stable page with a caller-selected positive `limit`. Module pages include -JavaScript assets, bundled modules, and source modules. Select an exact -`node_id` when a path is ambiguous or unavailable. Module items retain their -recorded property values and source locations; summaries include parent -application and semantic coverage. The result carries a digest of the selected -facts. Actual serialized size determines MCP transport admission: reduce the -page size or export retained Evidence if the view is too large. - -`trace_application_feature`, `trace_javascript_semantics`, -`compare_application_versions`, `compare_source_to_bundle`, and -`compare_javascript_export_shapes` accept complete inline application Evidence -or an exact reference to a record already retained by the current connection: - -```json -{ - "name": "trace_application_feature", - "arguments": { - "application": { - "kind": "retained-evidence", - "evidence_id": "ev_<64 lowercase hex characters>" - }, - "seed": { "kind": "module", "value": "search.js", "match": "exact" } - } -} -``` - -Use the `evidence_id` returned by `analyze_javascript_application` (or another -compatible application-graph producer). Comparisons accept this form in `left` -and `right`; each side can independently be inline or retained. Native -observation arrays continue to take complete inline Evidence. Results and their -Evidence remain complete inline, and both input forms pass the same semantic, -identity, authority, and provenance checks without running the producer again. - -References belong to the current connection's Evidence ledger. Opening another -target preserves retained records; `close_binary` clears them, even when no -binary is active. A fresh connection has its own ledger. A missing reference -reports its exact ID and `details.reason: "missing"`; the server cannot infer -whether it was never recorded, cleared, or retained by another connection. -Supply complete inline Evidence, repeat its producer, or import an exported -Evidence bundle before referencing that imported record. Export a bundle before -closing if the investigation needs it later. - -CLI application workflows continue to read portable inline Evidence from files -and run the same analysis workflows; a standalone CLI invocation cannot resolve -another MCP connection's retained records. No additional lookup call, provider -selection, or approval step is required for a same-session follow-up. - ## Aggregate native context `get_navigation_context` composes the selected document, current address, and @@ -496,48 +555,6 @@ unsupported facets are local `unavailable` outcomes. Use `current_document`, `current_address`, and `current_procedure` for direct single-field lookups; use the aggregate tools when you need related context together. -## Request scope and local effects - -Each tool request names the target and lifecycle it will use. Browser calls -carry a loopback CDP endpoint and target ID, with optional origin filters; -process and Electron scenarios carry the executable, arguments, actions, and -cleanup behavior; artifact tools carry the input path and requested operation. -REA runs the declared request directly and does not infer a broader target or -action from it. - -REA does not require permission grants or per-call approval flags. Setup still -prints its plan and requires confirmation before changing configuration or -installing Hopper. MCP clients control their own confirmation UI. - -Tool annotations describe effects and are hints, not authorization controls -([MCP ToolAnnotations](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations)). -`readOnlyHint` includes session state: an analysis call that records additive -Evidence is marked non-read-only even when it leaves the target unchanged. -`destructiveHint` is true when a tool may discard data (overwriting or clearing -analyst metadata, replacing files, dropping session state), runs or drives code -REA does not own (`executesForeignCode`: process, LLDB, Electron, browser, and -native UI scenarios), or changes an attached Android device (`mutatesDevice`: -push, install, uninstall, start, and stop). Ordinary Evidence recording is not -destructive. The effect record in `binary_session` and the generated catalog -carries each flag separately. -Effect metadata covers possible behavior across supported inputs: DMG inventory -can launch `hdiutil` and create an owned temporary mount directory; extraction -creates a fresh output directory on every call. Comparing supplied web captures -or PNG artifacts uses local data without contacting the browser. - -Host requirements remain in force. macOS may deny Accessibility, -Screen Recording, or native mounting; provider tools require their selected -analysis runtime. These failures are reported at the operation that needs -them. A configured provider or an endpoint alone does not establish that a -target is supported. - -Evidence bundles, snapshots, and extraction use the paths and output behavior -declared by their tools. Artifact extraction materializes the selected regular -files into a fresh REA-chosen temporary directory and reports its path. - -`analyze_javascript_application` reads the supplied local directory or ASAR path -and returns its result and Evidence inline. - ## Integrity record-and-continue Artifact integrity fails closed by default. A request can explicitly select @@ -566,3 +583,110 @@ writing the archive header, so their declared hashes no longer match. Electron does not check unpacked companions against those hashes at runtime. Integrity failures for such entries name this cause and the operation to rerun with `record-and-continue`; REA does not exempt unpacked entries silently. + +## Schema advertisement + +Advertised input and output schemas contain no reachable recursive references. +Schemas share repeated definitions through schema-local references while +preserving complete nested fields and validation rules. Input properties retain +their descriptions and literal examples. + +When a host forwards input schemas to the model, their examples consume context. +REA's advertised examples therefore never copy complete producer Evidence. +An embedded Evidence record is shown as its exact `{"kind":"retained-evidence","evidence_id":"ev_..."}` +reference where the tool accepts one. An example that can only carry inline +Evidence stays in the canonical contract and its executable tests, but is not +advertised. Every advertised example is a distinct valid canonical input. + +Root object unions are presented as +one object without root `anyOf`, `oneOf`, or `allOf` for model API compatibility. +The projection merges properties, retains shared required fields and +group-specific field dependencies, and describes the accepted input groups. +Canonical runtime validation enforces the exact union, including exclusions +that the advertised projection does not express. Tests validate the schemas +after SDK conversion and check advertised validation and actual calls. +Individual model APIs can impose additional nesting limits; complete producer +captures can exceed ten structural levels. + +### Compact input schema profile + +Some function-calling providers reject a request while any single tool's +`parameters` schema exceeds a literal serialized size cap; Moonshot clients +such as kimi-cli fail every request while the default catalog is attached +([#1484](https://github.com/morluto/rea/issues/1484)). Setting the server's +`REA_MCP_INPUT_SCHEMA_PROFILE` environment variable to `compact` renders every +advertised input schema within a 13,312-byte budget, measured to sit below +Moonshot's observed cap (community measurements: a 13.7 KB schema is accepted +while a ~15 KB one is rejected). The setting is read at startup; restart the +server to apply changes, as with `REA_MCP_MAX_RESPONSE_BYTES`. The default +value `full` keeps the complete advertisement unchanged. + +The compact profile renders the same tool set, output schemas, annotations, +and canonical server-side validation. It changes only the advertised input +JSON Schema: + +- Annotation prose leaves the advertised form: nested property descriptions, + literal examples, defaults, and titles are dropped. The root keeps its + description because it states the accepted input groups. +- Schema-local references are inlined within the budget. Kimi Code expands + references before sending provider requests, so sharing definitions cannot + establish the provider-facing size. Expansion stops at the budget before + allocating an oversized presentation. Unconstrained JSON fields advertise + all JSON value types explicitly so Kimi cannot infer string for Evidence + objects or arrays. +- The few schemas whose validation structure alone exceeds the budget + (`compare_web_captures`, `build_reconstruction_obligation_ledger`, + `evaluate_reconstruction_coverage`, `project_managed_application_graph`, + `compare_application_versions`, `capture_browser_scenario`) are advertised + in a reduced form: property names, reference-resolved types (including union + alternatives), first-level guidance, and the root's required-field constraints, + with nested validation detail elided. The + canonical schema still rejects malformed calls server-side, so callers + following the reduced advertisement receive the canonical typed error + instead of silent acceptance. + +Boundary tests pin every advertised compact schema to the budget, keep them +valid JSON Schema that still accepts every canonical example, and hold the +set of six reduced presentations as contracts evolve. Client verification +also checks provider-facing sizes and canonical examples after conversion by +the actual Kimi Code CLI; local captures do not establish Moonshot acceptance. + +### Output schemas + +Self-contained output schemas advertise a content-bound `$id`, including their +declared dialect. SDK validators can reuse compiled schemas across complete +catalog refreshes and equivalent tool outputs; changing the schema changes its +identity. Explicit schema IDs and relative external reference bases are +preserved. This keeps every tool and validation rule in discovery and does not +change the SDK's catalog invalidation or availability checks. + +### Comparison input shapes + +`compare_web_captures` accepts exactly one of two input shapes: + +- Passive: `before` and `after` each contain `inspection`, the complete + `normalized_result` from `inspect_web_page`. Each may also contain `webmcp`, + the complete `normalized_result` from `discover_webmcp_tools`, or null. +- Scenario: `before_scenario` and `after_scenario` contain complete + `normalized_result` objects from `capture_browser_scenario`. Optional + `normalization` defaults to `{ "rules": [] }`. + +The advertised schema includes complete nested capture fields and rejects +incomplete pairs and structurally malformed captures. Mixed comparison families +can pass advertised validation; the SDK rejects them against the canonical +input schema before invoking the handler. Domain validation additionally checks +relationships such as event sequence references and retained counts; JSON +Schema does not express those cross-field invariants. + +## Generated catalog + +Custom clients upgrading from 6.1 should follow the +[6.2 migration guide](migration-6.2.md#mcp-results-and-evidence). + +Run `npm run docs:generate` in a source checkout to generate the machine-readable +catalog at `docs/public/product-catalog.json`. Documentation deployments serve +the same file at [/rea/product-catalog.json](/rea/product-catalog.json). PR CI retains it with the packaged +skill and portable conformance projections in the `generated-docs` artifact. +These outputs describe the exact source revision being built; they are not +checked-in snapshots. For a running server, `binary_session` remains the +authoritative source of catalog identity and tool availability. diff --git a/docs/mcp-prompts.md b/docs/mcp-prompts.md index 3c9167265..6233d9de1 100644 --- a/docs/mcp-prompts.md +++ b/docs/mcp-prompts.md @@ -91,6 +91,12 @@ identifiers only; they do not retrieve or replace the inline Evidence result. Completion sources are live projections of the current session: +Document and procedure completion in a binary session reads an already-ready +provider; it does not start analysis. A cold provider, a target transition, or +unavailable inventory can return no suggestions. Run an analysis query first +when you need inventory from a provider that supplies it. An empty completion +list does not establish that the target has no procedures. + | Argument family | Source and filtering | | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | Document | Current provider `list_documents` result. | diff --git a/docs/native-investigation.md b/docs/native-investigation.md index b878b17b1..27381246b 100644 --- a/docs/native-investigation.md +++ b/docs/native-investigation.md @@ -1,132 +1,34 @@ -# Native UI and dispatch investigation +
-REA joins static resources, native metadata and code facts while keeping runtime -observations separate. Every result reports its evidence, target identity, -coverage and unknowns. The CLI and MCP use the same application workflows. +# Native binary investigation -## Static inspection +Use a native provider to discover functions, inspect instructions and pseudocode, +follow references, and examine database types. Static resources and runtime +observation complement that analysis when they answer a specific question. -`inspect_macho.selected_architecture` identifies the exact selected lipo slice -and its `container_file_offset` in the input file. A thin Mach-O has a known -offset of zero; an unknown universal-slice offset stays null. The Evidence -subject format describes the input container: `mach-o-universal` for FAT files, -including those with one slice. The normalized result describes the selected -Mach-O image. Architecture -`file_offset` values are container-relative. Entrypoint, segment and section -`file_offset` values retain their source meaning and are relative to the -selected Mach-O slice. Raw load-command fields retain their original values. -Evidence locations map the LC_MAIN entrypoint and nonempty file-backed segment -ranges to container offsets by adding the observed slice offset. Zero-fill -segments do not produce file ranges. When the selected slice's container offset -is unknown, those mapped locations are omitted with an explicit limitation; -architecture inventory locations remain available. +## Start with a function -Hopper's `address_to_file_offset` combines the native image-relative mapping with -original-file coordinates only after checking the source against the session's -SHA-256. FAT tables and embedded Mach-O headers come from that same hashing pass. -A changed or nonregular source reports `artifact_changed`; an unreadable or -missing source reports its access or filesystem failure. Those errors retain the native offset, -loaded header and provider source path in `details.partial_observation`, with the -original-file coordinate explicitly unavailable. Restore the original bytes or -reopen the changed executable to obtain verified coordinates. Snapshot replay -remains historical evidence for its recorded artifact identity. +Choose an installed provider from [setup](installation.md#hopper). For Ghidra: -A selected Hopper database's digest identifies the database rather than its -original executable. Original-file mapping is unavailable for that selection; -native mapping facts remain in partial evidence, and `read_bytes` still reads -the loaded database. Open the original executable to verify source coordinates. +```bash +rea inspect /absolute/path/to/program --provider ghidra --json +rea search /absolute/path/to/program entry --kind procedures --provider ghidra --json +``` -Native Xcode command execution uses shared process supervision with a 60-second -deadline and a 64 MiB aggregate stdout/stderr budget. Timeout, cancellation, -stream failure, and output exhaustion retain the captured output, exit details, -and cleanup outcome in the error result. Truncated output is never parsed as a -complete observation. +Select an exact name or address from the returned inventory, then use it with +`rea function PATH PROCEDURE --provider ghidra --json` for a function dossier, +`rea instructions` for assembly, or `rea decompile` for pseudocode. Do not assume +that every target names its entry function `entry`. MCP uses `open_binary` and +focused tools such as `list_procedures` and `analyze_function` on the same session. -- `trace_dylib_resolution` / `rea trace-dylib-resolution ` - parses Mach-O load commands in TypeScript and follows dyld's path expansion - for every executable in an app bundle, or for one Mach-O within its directory. - It reports each `@rpath`, `@loader_path` and `@executable_path` candidate with - its outcome. Paths outside the analyzed root, including shared-cache system - libraries, stay undetermined. See - [Apple application analysis](apple-application-analysis.md#dylib-load-resolution). -- `inspect_asset_catalog` / `rea inspect-asset-catalog ` reads compiled - `Assets.car` metadata through macOS `assetutil --info`. Catalog digests, raw - rendition fields, pagination and exact UI resource-name matches are returned. - Image extraction and undocumented rendition interpretation are unsupported. -- `inspect_keyed_archive` / `rea inspect-keyed-archive ` reads XML or - binary Foundation keyed archives without instantiating classes. For an active - app, provide its relative archive path as the second CLI argument or MCP - `path`. Results retain original `$objects` indices, named `$top` roots, - shared/cyclic references, class descriptors, raw serialized fields and - malformed/unresolved/nil references. Missing fields stay absent; unknown - classes are preserved. Select `root`, `offset` and `limit` explicitly. - UID 0 cannot distinguish conditional nil from ordinary nil. Limits are - 64 MiB of input, 200,000 objects/references and 128 nesting levels. - XML dictionary entries decoded as `__proto__` are omitted with an explicit - count because REA results cannot represent that key. XML tag whitespace and - comments do not change that handling. Other values and the original archive - digest are preserved; key interpretation follows the pinned plist decoder. -- `decode_interface_builder` / `rea decode-interface-builder ` reads - compiled storyboard and nib resources into objects, outlets, actions, - connections and controller/class names. `verify:interface-builder` compiles - a source-owned AppKit XIB with `ibtool`. Storyboards require an installed - iOS platform; unsupported archive forms remain explicit. - XML plist archives accept UTF-8 and BOM-marked UTF-16 in either byte order. - App bundle `Info.plist` executable resolution uses the same decoder as keyed - archives and Interface Builder. The decoder consumes an initial - BOM and rejects malformed byte sequences, unsupported encoding declarations, - and declarations that disagree with the detected encoding. It never substitutes - UTF-8 for a declared encoding it cannot process. Archive and evidence digests - still identify the original serialized bytes. Bundle resolution reports - malformed bytes and unsupported encodings against the original plist path - before looking up the executable. Interface Builder decoding - limits aggregate input archives to 32 MiB. - Before decoding, it also bounds the serialized structure: expanded binary - plist references, NIB table records, XML elements and text, plus their - projected representations must fit the 256 MiB aggregate decode budget. - NIB string values, data, property names and class names are charged at each - projected JSON occurrence, including when the archive reuses one source - value. Binary plist data projection also accounts for the temporary byte - copy made by the pinned decoder projection. These are format-derived - representation reservations, not exact heap measurements or a process-wide - heap ceiling. - Archives beyond either aggregate budget are omitted with their paths and an - explicitly partial `archive_decode` facet; previously decoded documents and - their identities remain available. -- `inspect_native_dispatch_metadata` / - `rea inspect-native-dispatch-metadata ` prefers a validated macOS Mach-O byte reader. It decodes - 64-bit little-endian Objective-C class/metaclass records, superclass pointers, - absolute/relative method entries, ivar offsets/sizes/alignment and protocol - declarations. It also decodes simple Swift conformances, static synchronous - witness slots, signed-relative pointers and non-generic, non-resilient class - vtable descriptors. Records include exact virtual addresses/file offsets and - artifact evidence. Vtable indexes are metadata word offsets; witness indexes - start after the conformance header. Names unavailable in metadata remain null. - Pointers are decoded through the image's fixups: - - `LC_DYLD_CHAINED_FIXUPS` rebases and binds, including the authenticated - arm64e formats; - - legacy `LC_DYLD_INFO` bind opcodes. - - So an external superclass resolves from its `_OBJC_CLASS_$_` bind (for - example `NSObject`). The `pointer_fixups` coverage facet names the mechanism. - Class properties preserve each encoded attribute as a raw `{name, value}` - pair, for example `{ name: "N", value: "" }`, and report atomicity on the - property: `N` means `nonatomic`; a complete typed attribute string without - `N` means the Objective-C default `atomic`; - missing or incomplete attribute metadata leaves `atomicity` and any - unestablished read-only value null. `is_meta_class`, `is_root_class`, and - `ivar_count` are also nullable when the selected provider exposes only symbol - names. Class implementation methods have null `is_required` and `is_optional` - fields because those facts apply to protocol declarations; decoded protocol - method lists retain their observed required/optional values. Class properties - and `__objc_catlist` categories are also decoded. Categories record the - extended class, local or external, plus - their methods, protocols and properties; category methods appear as - implementations with a `category`. Swift field-offset globals that are only - initialized at runtime stay unresolved. Generic, resilient, async and - coroutine tables, and inherited overrides, have explicit unsupported or - partial coverage. Other providers retain the - existing symbol-based inventory with its narrower coverage. +| Question | Section | +| ------------------------------------------------------------ | -------------------------------------------------------------------------------------- | +| Which instructions, calls, references, or types are present? | [Native primitives](#native-instruction-call-and-type-primitives) | +| How can I select a name beginning with a dash? | [CLI selectors](#exact-cli-selectors) | +| What static path connects these functions? | [Bounded traces](#bounded-static-traces) | +| Which UI resources or dispatch metadata are present? | [Static inspection](#static-inspection) | +| What did the declared runtime scenario observe? | [Desktop](#native-desktop-observation) or [call observation](#native-call-observation) | +| What can this provider and host establish? | [Provider boundaries](#provider-and-verification-boundaries) | ## Exact CLI selectors @@ -272,6 +174,37 @@ array semantics are not inferred. The real lane uses a native DWARF 4 object with a struct containing a union, enum and recursive pointer; a stripped linked binary may have no corresponding recovered layout. +Ghidra serializes at most 20,000 fields or enum members per inspected type. +Check `total_fields` and `truncated` before treating the returned layout as +complete. These fields describe omissions from the response, independently of +whether Ghidra recovered the original source layout. + +### Hopper analysis behavior + +Cursor navigation returns the observed object start when Hopper snaps an interior +address; adjacent-object navigation rejects unmapped inputs and document ends. +Native API text rejects NUL characters and unpaired Unicode surrogates before +annotation changes. Renames preserve unselected label owners; use a batch with +all affected addresses to move or swap existing labels explicitly. Every rename +destination must be mapped, and native symbol names must fit Hopper's 1024 UTF-16 +code-unit limit. Oversized names fail before any batch edits; bookmarks and +literal string results are not subject to that symbol-name limit. Rename success +requires exact final readback. New bookmarks must point into mapped memory; +existing legacy bookmarks outside it can still be removed. +String results read each native typed object's complete bytes, retain the original +provider display in `provider_value`, and report its encoding, byte length, and +termination. `encoding_status: inferred` distinguishes REA's decoding from an +observed source encoding. Hopper can split long literals into adjacent +unterminated objects; search matches each object's decoded bytes independently. +Undecodable objects retain native display text with `decoding.available: false` +and a reason, so one uncertain object does not block unrelated inspections. +Function dossiers retain this same string evidence. Native call edges retain +Hopper's partial `CallReference` classification and exact endpoints; detailed +reference flags remain unavailable rather than being invented. +Regex searches use ECMAScript Unicode syntax in a cancellable worker with a +five-second matching deadline. Deadline or cancellation stops matching while +leaving the Hopper API available. Literal mode retains Unicode casefold matching. + ## Bounded static traces `trace_native_ui_action` / `rea trace-native-ui-action ` accepts @@ -322,6 +255,130 @@ scaled ADD/BR instructions and the recovered target set. It reads exactly the proven count and preserves unknowns for other forms. Real ELF and host ARM64 Mach-O fixtures check each case against source-owned return values. +## Static inspection + +`inspect_macho.selected_architecture` identifies the exact selected lipo slice +and its `container_file_offset` in the input file. A thin Mach-O has a known +offset of zero; an unknown universal-slice offset stays null. The Evidence +subject format describes the input container: `mach-o-universal` for FAT files, +including those with one slice. The normalized result describes the selected +Mach-O image. Architecture +`file_offset` values are container-relative. Entrypoint, segment and section +`file_offset` values retain their source meaning and are relative to the +selected Mach-O slice. Raw load-command fields retain their original values. +Evidence locations map the LC_MAIN entrypoint and nonempty file-backed segment +ranges to container offsets by adding the observed slice offset. Zero-fill +segments do not produce file ranges. When the selected slice's container offset +is unknown, those mapped locations are omitted with an explicit limitation; +architecture inventory locations remain available. + +Hopper's `address_to_file_offset` combines the native image-relative mapping with +original-file coordinates only after checking the source against the session's +SHA-256. FAT tables and embedded Mach-O headers come from that same hashing pass. +A changed or nonregular source reports `artifact_changed`; an unreadable or +missing source reports its access or filesystem failure. Those errors retain the native offset, +loaded header and provider source path in `details.partial_observation`, with the +original-file coordinate explicitly unavailable. Restore the original bytes or +reopen the changed executable to obtain verified coordinates. Snapshot replay +remains historical evidence for its recorded artifact identity. + +A selected Hopper database's digest identifies the database rather than its +original executable. Original-file mapping is unavailable for that selection; +native mapping facts remain in partial evidence, and `read_bytes` still reads +the loaded database. Open the original executable to verify source coordinates. + +Native Xcode command execution uses shared process supervision with a 60-second +deadline and a 64 MiB aggregate stdout/stderr budget. Timeout, cancellation, +stream failure, and output exhaustion retain the captured output, exit details, +and cleanup outcome in the error result. Truncated output is never parsed as a +complete observation. + +- `trace_dylib_resolution` / `rea trace-dylib-resolution ` + parses Mach-O load commands in TypeScript and follows dyld's path expansion + for every executable in an app bundle, or for one Mach-O within its directory. + It reports each `@rpath`, `@loader_path` and `@executable_path` candidate with + its outcome. Paths outside the analyzed root, including shared-cache system + libraries, stay undetermined. See + [Apple application analysis](apple-application-analysis.md#dylib-load-resolution). +- `inspect_asset_catalog` / `rea inspect-asset-catalog ` reads compiled + `Assets.car` metadata through macOS `assetutil --info`. Catalog digests, raw + rendition fields, pagination and exact UI resource-name matches are returned. + Image extraction and undocumented rendition interpretation are unsupported. +- `inspect_keyed_archive` / `rea inspect-keyed-archive ` reads XML or + binary Foundation keyed archives without instantiating classes. For an active + app, provide its relative archive path as the second CLI argument or MCP + `path`. Results retain original `$objects` indices, named `$top` roots, + shared/cyclic references, class descriptors, raw serialized fields and + malformed/unresolved/nil references. Missing fields stay absent; unknown + classes are preserved. Select `root`, `offset` and `limit` explicitly. + UID 0 cannot distinguish conditional nil from ordinary nil. Limits are + 64 MiB of input, 200,000 objects/references and 128 nesting levels. + XML dictionary entries decoded as `__proto__` are omitted with an explicit + count because REA results cannot represent that key. XML tag whitespace and + comments do not change that handling. Other values and the original archive + digest are preserved; key interpretation follows the pinned plist decoder. +- `decode_interface_builder` / `rea decode-interface-builder ` reads + compiled storyboard and nib resources into objects, outlets, actions, + connections and controller/class names. `verify:interface-builder` compiles + a source-owned AppKit XIB with `ibtool`. Storyboards require an installed + iOS platform; unsupported archive forms remain explicit. + XML plist archives accept UTF-8 and BOM-marked UTF-16 in either byte order. + App bundle `Info.plist` executable resolution uses the same decoder as keyed + archives and Interface Builder. The decoder consumes an initial + BOM and rejects malformed byte sequences, unsupported encoding declarations, + and declarations that disagree with the detected encoding. It never substitutes + UTF-8 for a declared encoding it cannot process. Archive and evidence digests + still identify the original serialized bytes. Bundle resolution reports + malformed bytes and unsupported encodings against the original plist path + before looking up the executable. Interface Builder decoding + limits aggregate input archives to 32 MiB. + Before decoding, it also bounds the serialized structure: expanded binary + plist references, NIB table records, XML elements and text, plus their + projected representations must fit the 256 MiB aggregate decode budget. + NIB string values, data, property names and class names are charged at each + projected JSON occurrence, including when the archive reuses one source + value. Binary plist data projection also accounts for the temporary byte + copy made by the pinned decoder projection. These are format-derived + representation reservations, not exact heap measurements or a process-wide + heap ceiling. + Archives beyond either aggregate budget are omitted with their paths and an + explicitly partial `archive_decode` facet; previously decoded documents and + their identities remain available. +- `inspect_native_dispatch_metadata` / + `rea inspect-native-dispatch-metadata ` prefers a validated macOS Mach-O byte reader. It decodes + 64-bit little-endian Objective-C class/metaclass records, superclass pointers, + absolute/relative method entries, ivar offsets/sizes/alignment and protocol + declarations. It also decodes simple Swift conformances, static synchronous + witness slots, signed-relative pointers and non-generic, non-resilient class + vtable descriptors. Records include exact virtual addresses/file offsets and + artifact evidence. Vtable indexes are metadata word offsets; witness indexes + start after the conformance header. Names unavailable in metadata remain null. + Pointers are decoded through the image's fixups: + - `LC_DYLD_CHAINED_FIXUPS` rebases and binds, including the authenticated + arm64e formats; + - legacy `LC_DYLD_INFO` bind opcodes. + + So an external superclass resolves from its `_OBJC_CLASS_$_` bind (for + example `NSObject`). The `pointer_fixups` coverage facet names the mechanism. + Class properties preserve each encoded attribute as a raw `{name, value}` + pair, for example `{ name: "N", value: "" }`, and report atomicity on the + property: `N` means `nonatomic`; a complete typed attribute string without + `N` means the Objective-C default `atomic`; + missing or incomplete attribute metadata leaves `atomicity` and any + unestablished read-only value null. `is_meta_class`, `is_root_class`, and + `ivar_count` are also nullable when the selected provider exposes only symbol + names. Class implementation methods have null `is_required` and `is_optional` + fields because those facts apply to protocol declarations; decoded protocol + method lists retain their observed required/optional values. Class properties + and `__objc_catlist` categories are also decoded. Categories record the + extended class, local or external, plus + their methods, protocols and properties; category methods appear as + implementations with a `category`. Swift field-offset globals that are only + initialized at runtime stay unresolved. Generic, resilient, async and + coroutine tables, and inherited overrides, have explicit unsupported or + partial coverage. Other providers retain the + existing symbol-based inventory with its narrower coverage. + ## Native desktop observation `observe_native_ui` captures one explicitly selected existing PID/window ID. diff --git a/docs/packet-captures.md b/docs/packet-captures.md new file mode 100644 index 000000000..32cedb11b --- /dev/null +++ b/docs/packet-captures.md @@ -0,0 +1,176 @@ +# Recorded packet capture inspection + +`inspect_packet_capture` answers which selected protocol fields TShark observes +in an existing capture. Network, USB or Bluetooth recordings can use the same +field/filter interface when the installed TShark supports their encapsulation +and dissectors. This tool does not acquire traffic, open an interface or control +a device. HAR/SAZ/mitmproxy web-capture workflows remain separate. + +Supply an existing TShark 4.x installation **on Linux**, with util-linux +`prlimit` available at `/usr/bin/prlimit`. Override its absolute path with +`REA_TSHARK_PRLIMIT_COMMAND` if required. Unsupported hosts, including macOS +and Windows, are refused before inspection because this integration requires +an enforced address-space limit: + +```sh +export REA_TSHARK_COMMAND=/absolute/path/to/tshark +rea inspect-packet-capture /artifacts/device.pcapng \ + --fields ip.addr --fields udp.port --fields data.data \ + --display_filter 'udp' --format json +``` + +The corresponding MCP call is: + +```json +{ + "name": "inspect_packet_capture", + "arguments": { + "path": "/artifacts/device.pcapng", + "fields": ["ip.addr", "udp.port", "data.data"], + "display_filter": "udp" + } +} +``` + +`frame.number` is always included. Repeated values are ordered string arrays, +for example `"ip.addr": ["192.0.2.1", "192.0.2.2"]`. Missing fields remain +absent; they are not converted to zero or empty arrays. Export-only index/score +metadata is discarded. No payload bytes are automatically added; select a +supported byte field such as `data.data` or `@data` when needed. + +Selectors are limited before argv expansion: at most 1,024 fields and 1,024 +`decode_as` rules, 8,192 UTF-16 code units per selector, and 32 KiB total encoded +selector arguments (UTF-8 text, terminators, option names and argv pointers). +This leaves headroom below Linux's [execve argument/environment limits](https://man7.org/linux/man-pages/man2/execve.2.html); +an unusually large inherited environment can still prevent launching. + +Output is paged after filtering: `match_limit` defaults to 50 and `match_offset` +to 0. The result retains original frame numbers and reports `output_window` +with the matching count within the input read scope, returned count and +`has_more`. Request later pages with the offset, or explicit `match_limit: null` +(CLI `--all_matches`) for all remaining matches. Paging does not shorten +input reading or change two-pass reassembly. Producer output must still fit its +resource limit; use selected fields, a display filter or an input-packet limit +when dissection output is too large. Each call checks the recording's current +digest, so pages from different source digests must not be combined. + +Additional selections: + +- `display_filter`: Wireshark display-filter syntax; omitted means no filter. +- `decode_as`: explicit dissector overrides, such as `["udp.port==5555,dns"]`. + Repeat `--decode_as` in the CLI for multiple overrides. +- `packet_limit`: optional maximum **input packets read before filtering**. + A limit of 1 can therefore yield zero matching packets even when later frames + match. Omitted means read to EOF within resource limits. The report records + `to-eof` or `up-to-input-packet-limit`, never inferring total capture size from + the returned packet count. +- `two_pass`: defaults to true for fields that need later packets and reassembly + dependencies. MCP may set false; CLI uses `--no-two_pass` for a single pass. + +See the [TShark manual](https://www.wireshark.org/docs/man-pages/tshark.html) +for field names, display filters, decode-as syntax and pass semantics. Invalid +fields or filters return producer diagnostics. An empty result does not prove +absence of traffic outside the selected recording, filter or read range. +Dissector results are observations, not independently verified device behavior. + +Evidence includes source path/digest/size, exact selections, typed packet fields, +configured and resolved executable paths/digests/full version banner, arguments and stderr. Warnings remain +visible even on exit zero. `tool.version_diagnostics` also retains warnings from +the separate version probe. Post-run identity failures identify the affected +private copy, executable or limiter; resource-signal errors retain the signal +and effective ceilings. Two-pass mode cannot recover missing capture bytes. + +Each call uses a private read-only capture copy and an empty personal +configuration directory (`WIRESHARK_CONFIG_DIR`), with name resolution disabled. +The executable, resource limiter and private input copy are rechecked after execution. Owned +processes, file descriptors and private files are cleaned up; failed cleanup retains ownership and +completed observations for retry. The one-shot CLI awaits a cleanup retry while +preserving the original failure and completed Evidence. Completed observations +remain in the MCP session after cancellation or cleanup failure; bounded +post-run integrity checks finish before honoring a late abort. Source files +are never passed to TShark. +Installed libraries, global configuration and plugins remain trusted, are not +fully fingerprinted, and can influence dissection. This is not an OS sandbox. + +Input is limited to 32 MiB before reading, each command to 30 seconds, and +combined stdout/stderr to 4 MiB during collection. Output overflow fails instead +of returning truncated success. Before execution, `prlimit` enforces **1 GiB +address space per process**, **64 MiB per file**, **30 CPU seconds** and no core +dumps. Stricter inherited soft/hard limits are preserved; Evidence records the effective +ceilings. Both limits are set before execution, so dissector allocations and +compressed-capture expansion cannot exceed the per-process address-space cap. +These are not aggregate process-memory or filesystem quotas. The selected +limiter is trusted; its path, digest and arguments are retained in Evidence. +No arbitrary process flags are accepted. + +## Verification + +```sh +npm run build:cached +REA_TSHARK_COMMAND=/absolute/path/to/tshark node scripts/verify-packet-capture.mjs +``` + +The verifier generates its own Ethernet/IPv4/UDP/DNS and Bluetooth HCI PCAPs. +It exercises real compiled CLI/MCP parity, advertised schemas, repeated/missing +fields, filtering, decode-as, both pass modes, a packet limit before matching +frames, Evidence persistence, failure diagnostics, source identity and cleanup. +An optional positional REA entrypoint verifies an installed package. + +The real-tool lane requires Linux and TShark 4.x. A separate kernel-limit +regression checks the inherited soft/hard limits and verifies an oversized +allocation is refused before it can consume memory. The Ubuntu workflow uses +its distribution package; check its outcome before claiming that build verified. +The earlier macOS check does not establish the current bounded integration, +which deliberately refuses unsupported hosts. Other formats (including PCAPNG), +USB, BLE ATT and actual physical capture are not established by these fixtures. + +Each provider admits one inspection at a time, including acquisition and cleanup. +An occupied provider returns a retryable capacity error before acquiring another +file or worker. Closing the provider stops new admission and drains accepted work; +failed cleanup remains owned and can be retried. + +## Discover protocols and field names + +`inspect_packet_fields` / `inspect-packet-fields` queries the installed TShark +registration glossary before selecting fields for capture inspection: + +```sh +rea inspect-packet-fields --query usb +rea inspect-packet-fields --kind fields --protocol usb --query idVendor +rea inspect-packet-fields --kind fields --protocol udp --all +``` + +`kind` defaults to `protocols`; `fields` selects field definitions. `protocol` +selects an exact protocol abbreviation (the protocol itself or its child fields). +`query` is a case-insensitive literal substring in name, abbreviation or field +description. `offset` skips matching records; `limit` defaults to 50. MCP +`limit: null` or CLI `--all` requests all remaining matches within the resource +budget. `--all` and `--limit` conflict. The window reports examined records of +the selected kind before filters, matching records, returned records and +`has_more`; it never counts capture packets. + +Returned records preserve field type, parent protocol, display base, bitmask, +description and original glossary line number. Empty producer strings remain +empty; protocol records have null field-only properties. Repeated abbreviations +remain separate registrations. A listed field is an installation capability, not +proof that the field appears in a selected recording. + +The adapter uses the documented `tshark -G fields` grammar under its existing +private empty profile and Linux process limits. TShark 4.6.9's full glossary was +measured at 22,303,197 bytes; discovery admits at most **32 MiB** combined command +output (capture inspection remains at **4 MiB**). Parsing walks lines once and +constructs objects only for the selected page. Returned strings are copied so +retained pages do not retain the complete glossary string. Before constructing a selected +record it charges six times the source UTF-8 bytes plus 512 bytes against an +**8 MiB** representation budget, covering JSON escaping and record bookkeeping. +If that budget would be exceeded, narrow the query or page size; results are not +silently truncated. This is a conservative admission budget, not measured heap +usage. Parent pipe buffers and producer per-process limits remain distinct. + +Tool/limiter identity, version, stderr and selected arguments are retained in +Evidence. No capture, interface or device is opened. Discovery shares capture +analysis's admission slot and cleanup owner. Each call rereads the glossary; +installed plugins, libraries and global configuration remain trusted and are not +fully fingerprinted. There is no cache or snapshot-consistent pagination claim. +The real Linux lane checks public CLI/MCP queries against the direct glossary, +including USB vendor-ID typing, negative queries and paging. diff --git a/docs/pcap-analysis.md b/docs/pcap-analysis.md new file mode 100644 index 000000000..1df3e5ccd --- /dev/null +++ b/docs/pcap-analysis.md @@ -0,0 +1,118 @@ +# Packet capture summaries + +REA summarizes already saved pcap/pcapng files through caller-selected Wireshark +4.x `tshark` and `capinfos`. Use `inspect_packet_capture` for selected fields, +filters and decode-as rules; use this family for address, DNS, SNI, protocol-stack +and URI inventories. It does not acquire traffic or fetch recorded targets. + +## Supply tools + +```sh +export REA_TSHARK_COMMAND=/absolute/path/tshark +export REA_CAPINFOS_COMMAND=/absolute/path/capinfos +# Linux only; default /usr/bin/prlimit +export REA_TSHARK_PRLIMIT_COMMAND=/absolute/path/prlimit +rea inspect-pcap-client +rea inspect-pcap-capture /captures/session.pcapng --json +``` + +Without explicit tool commands, this family resolves them through PATH and +records that selection source. Client inspection reads no capture file. Capture +inspection requires Linux with util-linux prlimit or Windows with owned Job +Objects. macOS capture inspection returns a capability gap because the new +native memory boundary is unverified; its version probes remain available. +Tools and installed libraries/plugins are caller-trusted. An empty private +personal Wireshark configuration is used; this is not an OS sandbox. + +## Inspect only the needed facts + +MCP `inspect_pcap_capture` accepts `path` and optional `detail: "summary"`. +Complete delivery remains the default. Summary commits and retains the same +complete Evidence, returning identity, capture metadata, observed counts, +retained counts, source coverage and diagnostic lengths without large lists. +Then use its `normalized_result.parent_evidence_id` with +`inspect_analysis_view` source kind `retained-evidence`: + +```json +{"kind":"pcap","facet":"endpoints","offset":0,"limit":20} +{"kind":"pcap","facet":"dns-queries","offset":0,"limit":20} +{"kind":"pcap","facet":"dns-addresses","query":"example.com","offset":0,"limit":20} +{"kind":"pcap","facet":"tls-sni","offset":0,"limit":20} +{"kind":"pcap","facet":"diagnostics","stream":"tshark","offset":0,"limit":4096} +``` + +Other row facets are `protocols`, `http-uris` and `unattributed-addresses`. +Defaults are offset 0 and limit 64. DNS question pages give address counts; +select one exact retained question to page its addresses. Diagnostic windows +count UTF-16 code units; other windows count rows. Missing/ambiguous selectors +fail. Unknown legacy diagnostics remain unknown, not an observed empty stream. +Portable CLI views use the existing `inspect-analysis-view` workflow with inline +complete Evidence. Views never reread the source or launch Wireshark and work +after the original file is deleted. Page exhaustion covers the retained facet; +it does not establish network completeness or recover missing traffic. + +## Interpret provenance and coverage + +`target.sha256` binds observations to an admitted stable capture snapshot. Both +tools read that copy, which is hashed again after analysis. Capture metadata and +literal field values are producer observations; address/protocol counts and DNS +associations are derivations. Capture Evidence has historical-reference authority. + +Addresses count once per packet, including loopback and nested IP occurrences. +DNS addresses are associated only with one question in the same response packet; +additional records may be included, so this does not prove final resolution. +Ambiguous addresses remain in a separate inventory. Protocol distribution counts +exact `frame.protocols` stack strings. TLS SNI is recorded handshake metadata, +not process identity or proof of the destination's authenticity. + +All examined inventories are retained within the resource budget; no fixed +200/100/50-item truncation is applied. HTTP transport credentials are excluded +without rewriting other URI bytes; ambiguous credential spans cause omission. +Counts preserve distinct observed source URIs before omission or coalescing. +`coverage: "partial"` records unresolved DNS attribution or URI item loss; +component credential exclusion is also counted explicitly. Diagnostics retain +both tool stderr streams. Recorded fields do not establish decrypted payloads, +causality, process identity, absence of unrecorded traffic or current deployments. + +## Resources and lifecycle + +One inspection is admitted at a time per provider. Concurrent calls return a +capacity error; close drains active work before releasing resources. Captures +are streamed into a read-only owned snapshot with a 2 GiB disk budget. Native +capture commands enforce Linux address-space ceilings of at most 1 GiB, +300 CPU seconds, 64 MiB per file and no core dumps, preserving stricter inherited +limits. Windows uses a 1 GiB committed-memory limit for each owned tool tree. +These are not aggregate machine or filesystem quotas. + +TShark output is bounded at 8 MiB; its known five-level selected-field shape and +128 MiB graph-expansion estimate are checked before allocation. Retained facts +have a separate 16 MiB estimate. Capinfos output is limited to 64 KiB. Command +wall deadlines are 300 s for dissection, 60 s for metadata and 20 s for probes. +Native ownership preparation has its own bounded lifecycle. + +Malformed/oversized output returns no partial success. Unvalidated partial JSON +is not returned as facts. Cancellation reaches probes, acquisition, commands and +projection. Cleanup failure returns a typed error, retains completed Evidence +when available, and retains owned resources for retry on close. + +## Verification scope + +Current follow-up verification uses Linux/Node 24.18.0 and Wireshark 4.0.17. +Private real recorded corpora are checked against independent raw-frame/IP +parsing and Python aggregation, public CLI/stdio MCP parity, SDK schemas, source +hashes and retained views. Synthetic native tools separately test malformed +output, cancellation, source/snapshot mutation, capacity and cleanup; they do +not establish real Wireshark or other-platform behavior. + +The original proposal reported Linux 4.6.6, macOS/Windows 4.6.9 verification on +its earlier implementation. Those reports do not verify the new final memory +boundary. Actual Windows/Bun Wireshark execution is unverified here; macOS +capture support needs a separate enforceable-bound decision. + +```sh +npm run verify:pcap -- --pcap /absolute/saved-capture.pcapng +``` + +This verifier exercises built CLI/stdio MCP, schemas, artifact identity and +cleanup. Without `--pcap`, capture inspection is reported as unverified. Private +captures, keys and provider runtime files are not committed. diff --git a/docs/process-capture.md b/docs/process-capture.md index 198ca264d..cc163f715 100644 --- a/docs/process-capture.md +++ b/docs/process-capture.md @@ -40,7 +40,17 @@ this helper before reporting macOS capture as available. ## Capture a command -Write a JSON scenario and pass its path to the CLI: +For a small first capture, save this as `scenario.json`: + +```json +{ + "executable": "node", + "arguments": ["-e", "console.log('ready')"], + "timeout_ms": 5000 +} +``` + +Run the scenario through the CLI: ```sh rea capture-process ./scenario.json --json > capture.json @@ -51,6 +61,85 @@ format is TOON. The file contains the complete capture Evidence record. Choose an output file distinct from the scenario input: shell redirection opens and truncates the output before REA reads the scenario. +Read the result's terminal observations, exit/settlement status, and cleanup +outcome. [Scenario and result details](#scenario-and-result-details) describe +limits, normalization, filesystem coverage, and incomplete observations. + +## Compare two captures + +Compare saved capture Evidence with: + +```sh +rea compare-process-captures authority.json reconstruction.json +``` + +The comparison checks terminal, interaction, exit, filesystem, and +process observations under a shared comparison contract. It reports observed +differences with their locations, while residual unknowns or truncated +observations prevent a complete-equivalence claim. Matching scenario +commitments do not reveal whether redacted sensitive inputs were equal. + +For scenarios where independent scheduling can change event order, the CLI +also accepts an optional trace-specification JSON file as the third argument. +That specification must state the exact events and ordering constraints to +accept; it does not discard unmatched observations or make timestamps into +causal evidence. Trace comparison returns `unknown` when a capture lacks the +required complete event journal or contains relevant residual unknowns. + +Each capture carries commitments for the selected scenario, executable, +comparison contract, and normalization rules. The comparison contract covers +the working directory, explicit environment, filesystem observation paths, +terminal size, scripted events, timeouts, limits, and normalization; the +executable and its arguments may differ. Comparison rejects captures whose +comparison contracts differ and names the differing fields, so run both +scenarios from the same absolute working directory and observation paths. +Captures are local Evidence files; keep +their source artifacts and invocation context available when interpreting a +difference. + +## Hash a report independently of terminal output + +Select the producer's report directory and give `file_bytes` enough room for +the complete files you need, including other files in those roots. For example, +save this scenario and run `rea capture-process ./scenario.json --json > capture.json`: + +```json +{ + "executable": "node", + "arguments": [ + "-e", + "const fs=require('node:fs');fs.mkdirSync('reports',{recursive:true});fs.writeFileSync('reports/final.json',JSON.stringify({status:'complete',data:'X'.repeat(131072)}));console.log('x'.repeat(8192));" + ], + "working_directory": ".", + "filesystem_observation_paths": ["./reports"], + "limits": { "output_bytes": 1024, "file_bytes": 262144 } +} +``` + +The report exceeds the terminal budget but fits the independent 256 KiB hash +budget. Its complete SHA-256 appears in `normalized_result.files_after` at +`root_0:final.json`; check `truncation_details.filesystem_after` for omissions +and actual bytes hashed. The verbose terminal output is truncated without +preventing the report digest. The same scenario object is the MCP +`capture_process_scenario` input. REA never returns a prefix hash as a full-file +digest: an insufficient remaining budget produces a null digest and an +explicit omission reason. + +A digest binds the complete bytes observed at that checkpoint, not the +producer's notion of a finished report. A stable periodic or running report +can also have a complete digest. Choose the final file and verify the +producer's documented completion marker, exit outcome and settlement +observations before calling it final. `after_settlement` names a filesystem +checkpoint, not a guarantee that an application finished successfully or +that an unobserved writer will never change the file. REA checks opened-file +identity/state around hashing and reports observed changes or unavailable +files; cancellation stops the hash. If an external sealer produces a manifest, +keep its completion claims and digest separate from REA's checkpoint facts. + +## Scenario and result details + +### Progress + While the capture runs, REA writes live status to stderr as one JSON object per line. Stdout stays the final Evidence document: @@ -79,7 +168,7 @@ into the latest status, and stale live observations are discarded before final cleanup status. Progress never copies child output. Child output remains in the capture Evidence on stdout. -For example: +### Scenario with interactions ```json { @@ -328,73 +417,51 @@ as well. A newly started unreadable process can prevent verified cleanup even after the selected command exits. REA preserves this uncertainty and leaves that process untouched. -## Hash a report independently of terminal output +Reading those tokens requires compiling a small Swift helper with `xcrun swiftc`. +By default that compilation reuses Swift's shared module cache, while the +compiler's intermediate objects stay inside the per-run temporary root that REA +removes afterwards. Set `REA_DARWIN_MODULE_CACHE_PATH` to a writable directory +when a shared cache is unavailable, for example under an enforced write +boundary. REA creates the directory, passes it to the compiler as +`-module-cache-path`, and exports it as `CLANG_MODULE_CACHE_PATH` so the +Objective-C header modules the helper builds land there too. REA never removes +that directory: it outlives each run, so the first compilation into a new +directory pays a cold-cache build and later runs reuse it. An absent or empty +value keeps the shared default. -Select the producer's report directory and give `file_bytes` enough room for -the complete files you need, including other files in those roots. For example, -save this scenario and run `rea capture-process ./scenario.json --json > capture.json`: +`xcrun` also maintains a separate tool-lookup cache. Its `--no-cache` option +refreshes entries and does not guarantee a write-free lookup. To avoid that +lookup while compiling REA's helper, set `REA_DARWIN_SWIFTC_PATH` to the absolute +path of an installed `swiftc` and `SDKROOT` to the absolute path of a compatible +macOS SDK. REA invokes that compiler directly with `-sdk` and the selected SDK; +an unset or empty compiler setting keeps the normal `xcrun swiftc` path. A +missing or relative SDK/compiler path fails with an actionable prerequisite +error before compilation. An incompatible installation reports the compiler's +bounded diagnostics; REA does not repair or replace the toolchain. -```json -{ - "executable": "node", - "arguments": [ - "-e", - "const fs=require('node:fs');fs.mkdirSync('reports',{recursive:true});fs.writeFileSync('reports/final.json',JSON.stringify({status:'complete',data:'X'.repeat(131072)}));console.log('x'.repeat(8192));" - ], - "working_directory": ".", - "filesystem_observation_paths": ["./reports"], - "limits": { "output_bytes": 1024, "file_bytes": 262144 } -} -``` - -The report exceeds the terminal budget but fits the independent 256 KiB hash -budget. Its complete SHA-256 appears in `normalized_result.files_after` at -`root_0:final.json`; check `truncation_details.filesystem_after` for omissions -and actual bytes hashed. The verbose terminal output is truncated without -preventing the report digest. The same scenario object is the MCP -`capture_process_scenario` input. REA never returns a prefix hash as a full-file -digest: an insufficient remaining budget produces a null digest and an -explicit omission reason. - -A digest binds the complete bytes observed at that checkpoint, not the -producer's notion of a finished report. A stable periodic or running report -can also have a complete digest. Choose the final file and verify the -producer's documented completion marker, exit outcome and settlement -observations before calling it final. `after_settlement` names a filesystem -checkpoint, not a guarantee that an application finished successfully or -that an unobserved writer will never change the file. REA checks opened-file -identity/state around hashing and reports observed changes or unavailable -files; cancellation stops the hash. If an external sealer produces a manifest, -keep its completion claims and digest separate from REA's checkpoint facts. - -## Compare two captures - -Compare saved capture Evidence with: +For example, select paths from your existing Xcode or Command Line Tools +installation **before** entering an enforced write boundary: ```sh -rea compare-process-captures authority.json reconstruction.json +export REA_DARWIN_SWIFTC_PATH="$(xcrun --find swiftc)" +export SDKROOT="$(xcrun --show-sdk-path)" +export REA_DARWIN_MODULE_CACHE_PATH="$PWD/rea-cache/modules" +export TMPDIR="$PWD/rea-cache/tmp" +mkdir -p "$TMPDIR" +rea analyze-javascript-application ./fixture --artifact-format directory ``` -The comparison checks terminal, interaction, exit, filesystem, and -process observations under a shared comparison contract. It reports observed -differences with their locations, while residual unknowns or truncated -observations prevent a complete-equivalence claim. Matching scenario -commitments do not reveal whether redacted sensitive inputs were equal. +Keep the selected compiler and SDK paired. Permit REA's evidence/output paths +and its temporary directory as well as the caller-owned module cache. REA does +not create a sandbox or claim that these settings contain every write made by +arbitrary toolchains or analysis providers. They bypass REA's `xcrun` lookup +and select the helper's Swift/Clang cache without disabling ownership checks. +The caller-owned cache survives cancellation and cleanup; per-run compiler +intermediates and the compiled helper remain REA-owned temporary files. -For scenarios where independent scheduling can change event order, the CLI -also accepts an optional trace-specification JSON file as the third argument. -That specification must state the exact events and ordering constraints to -accept; it does not discard unmatched observations or make timestamps into -causal evidence. Trace comparison returns `unknown` when a capture lacks the -required complete event journal or contains relevant residual unknowns. - -Each capture carries commitments for the selected scenario, executable, -comparison contract, and normalization rules. The comparison contract covers -the working directory, explicit environment, filesystem observation paths, -terminal size, scripted events, timeouts, limits, and normalization; the -executable and its arguments may differ. Comparison rejects captures whose -comparison contracts differ and names the differing fields, so run both -scenarios from the same absolute working directory and observation paths. -Captures are local Evidence files; keep -their source artifacts and invocation context available when interpreting a -difference. +The boundary must also permit process-table inspection. On macOS, `/bin/ps` +is setuid and a blanket sandbox may reject its launch with `spawn EPERM`. +REA then preserves ownership uncertainty and can report `cleanup_incomplete`; +it does not disable verification to continue. A sandbox that explicitly allows +this read-only process inspector is a separate prerequisite from the compiler +and cache settings. diff --git a/docs/raw-binary.md b/docs/raw-binary.md index 43fcd54f4..8e277568b 100644 --- a/docs/raw-binary.md +++ b/docs/raw-binary.md @@ -61,7 +61,7 @@ Independent raw verification streams the complete private snapshot digest and extent with bounded memory and supports cancellation during the read. Hopper and IDA refuse raw-binary targets. Windows Ghidra P0 continues to admit -PE applications only. +native PE applications and DLLs only; raw-binary targets are unsupported. ## Limitations diff --git a/docs/reconstruction-readiness.md b/docs/reconstruction-readiness.md index 1827311c4..cf4784aca 100644 --- a/docs/reconstruction-readiness.md +++ b/docs/reconstruction-readiness.md @@ -36,7 +36,7 @@ check project-owned conformance fixtures and fail-closed report behavior. | ------------------------------- | --------------------------------------------------------------------------------------------------------------------- | | `discover-classify` | target-free startup, artifact inventory, compatible workflow selection, and exact visible limits | | `diagnose-environment` | broken runtime separated from analysis failure, version skew detected, and revision changed after recovery | -| `declare-request` | exact target, operation, and lifecycle are carried by the request before launch | +| `acquire-authority` | missing scope reported, narrow grant resumed, expansion reprompted, and denial launched nothing | | `static-analysis` | native and JavaScript routing plus preserved ambiguity, truncation, unsupported syntax, and residual unknowns | | `reactive-scenarios` | predicate-driven interaction, descendant settlement, Electron correlation, and cancellation cleanup Evidence | | `compare-authority-candidate` | explicit partial-order/finite-trace semantics, primary divergence localization, and unknown for incomplete comparison | diff --git a/docs/releasing.md b/docs/releasing.md index 37a28d532..c532d0663 100644 --- a/docs/releasing.md +++ b/docs/releasing.md @@ -6,7 +6,10 @@ checks to pass. Merging that PR into main starts publication automatically. The Release workflow validates the merged release metadata and ancestry before creating a tag. npm and MCP Registry publication use the exact reviewed merge -SHA returned by Release Please. Later main commits cannot change that source. +SHA returned by Release Please. Before either registry is published, the release +run calls full CI qualification at that exact revision, including coverage, +portable providers, and every native package host. Later main commits cannot +change or cancel that proof. Ordinary main pushes and closed, unmerged PRs cannot publish packages. Check both publication jobs and the published-package canary; a merged PR or GitHub tag alone does not establish that publication finished. Retry failed jobs in @@ -196,8 +199,14 @@ both registry publishes. See [npm's provenance implementation](https://github.com/npm/cli/blob/v11.16.0/workspaces/libnpmpublish/lib/provenance.js) for the use of GitHub's workflow ref and commit SHA. -The workflow builds the bundled Windows controls and verifies the packaged -artifact before npm publication. It then verifies the published CLI, the +Full qualification builds the bundled Windows controls and verifies the packaged +artifact on its native hosts. The Linux x64 verifier retains the exact tarball +it installed and tested, after its workspace cleanup completes. The npm job +downloads that archive from the same workflow run and checks its source SHA, +run identity/attempt, package and Node versions, host identity, and SHA-256. +It publishes that archive without rebuilding or repacking it. Re-running failed +publisher jobs can reuse a prior successful attempt from the same run. +The workflow then verifies the published CLI, the capability-scoped MCP catalog, and the isolated package update path before publishing MCP Registry metadata. @@ -218,6 +227,15 @@ release baseline and can propose an already-published version again. After publication, open a PR from the release branch back to main. Preserve main's later implementation changes and regenerate ignored build outputs from the combined contracts with the released package version. +Before merging, check whether GitHub permits merge commits: + +```bash +gh api repos/morluto/rea --jq .allow_merge_commit +``` + +If disabled, a maintainer must arrange an approved ancestry-preserving merge +path before synchronization can finish. Squash and rebase merges do not put the +released tag in main's ancestry. Do not substitute them for this step. Review and test this synchronization PR, then use a merge commit so the release tag remains in main's ancestry. Keep the released tag unchanged. diff --git a/docs/signal-recordings.md b/docs/signal-recordings.md new file mode 100644 index 000000000..69b14d193 --- /dev/null +++ b/docs/signal-recordings.md @@ -0,0 +1,142 @@ +# Recorded signal decoding + +`decode_signal_recording` answers what a selected protocol decoder observes in +an existing recording. It uses caller-supplied **sigrok-cli 0.7.2** with +libsigrokdecode on **Linux**. util-linux `prlimit` is required (default +`/usr/bin/prlimit`, overridable with absolute `REA_SIGROK_PRLIMIT_COMMAND`). +The limiter sets soft and hard address-space limits before the decoder starts. +macOS and Windows are refused because this adapter cannot enforce that limit on +those hosts. It does not acquire samples or communicate with hardware. + +```sh +export REA_SIGROK_COMMAND=/absolute/path/to/sigrok-cli +rea decode-signal-recording /artifacts/uart.vcd \ + --decoders uart:rx=RX:baudrate=9600 --input_format vcd \ + --annotations uart=rx-data --format json +``` + +The corresponding MCP request is: + +```json +{ + "name": "decode_signal_recording", + "arguments": { + "path": "/artifacts/uart.vcd", + "decoders": "uart:rx=RX:baudrate=9600", + "input_format": "vcd", + "annotations": "uart=rx-data" + } +} +``` + +`decoders` uses sigrok's decoder stack and option/channel syntax. Channel names +must match the recording; REA does not guess wiring, baud rate or protocol. +Omitting `input_format` requests sigrok's autodetection. Omitting `annotations` +retains every annotation class. Both omitted selections are recorded as null. +See the [upstream manual](https://sigrok.org/wiki/Sigrok-cli) for formats, +decoder stacking and annotation selectors. No arbitrary command flags are accepted. + +Output defaults to 50 literal LF-separated lines. Use `line_offset` and +`line_limit` for later pages, or MCP `line_limit: null` / CLI `--all_lines` +for all remaining output. `output_window` reports `total_lines`, `returned_lines` +and `has_more`; these count display lines, **not annotations or samples**. +Line endings, blank lines and text within the selected window stay unchanged. +REA does not parse display text into protocol facts, as explained by +[upstream's annotation output guidance](https://sigrok.org/wiki/Protocol_decoder_output). +Paging does not shorten decoding and producer output must still fit its limit. +Use annotation-class selection to reduce producer output. Calls independently +check the source digest; do not combine pages from different digests. + +Each selector is limited to 8,192 UTF-16 code units, and total encoded selector +arguments (UTF-8, option prefixes, terminators and 64-bit argv pointers) to +32 KiB before launching. This reserves headroom below Linux execve's minimum +argument/environment budget; a large inherited environment may still exhaust it. + +The returned Evidence includes the input path/digest, exact selections, tool +configured and resolved paths/digests, full version banner (including library versions), annotation text +with sample-number ranges, and stderr. For example, `1104-1938 uart-1: 52` +is producer display text over a sample range, not a timestamp or an independently +verified protocol fact. Text is retained verbatim; it is not parsed as a lossless +binary payload. Empty output does not establish absence of traffic. Warnings +remain visible even when sigrok exits zero, including `tool.version_diagnostics` +from the separate version probe. Post-run identity failures name the tool, limiter +or private copy involved, rather than blaming the admitted source. Resource-signal +failures retain the signal and effective limits without inferring its exact cause. + +REA decodes a private, read-only copy of the recording, verifies that copy and +the selected executable and resource limiter after decoding, and removes the workspace after owned +process cleanup. Failed descriptor, process or workspace cleanup retains ownership for retry, and the one-shot +CLI awaits a retry without replacing the original failure or completed Evidence. +Completed observations remain in the MCP session after cancellation or cleanup +failure; bounded post-run integrity checks finish before honoring a late abort. The source file is +never passed to sigrok. Caller-supplied tools and their libraries/decoder modules +are trusted, and hashes identify bytes rather than publisher authenticity. + +The input copy is bounded at 32 MiB before reading, each command has a 30-second +deadline, and combined stdout/stderr is bounded at 4 MiB during collection. +Oversized output fails rather than becoming truncated success. These limits do +not form an OS sandbox. Before execution, `prlimit` enforces **1 GiB address +space per process**, **64 MiB per file**, **30 CPU seconds** and no core dumps. +Stricter inherited soft/hard limits are preserved; Evidence records the effective +ceilings. Both limits are set before execution, so decoder allocations and compressed +recording expansion cannot exceed the per-process address-space cap. These are +not aggregate process-memory or filesystem quotas. The selected limiter is +trusted and its path, digest and arguments are retained in Evidence. + +## Verification + +```sh +npm run build:cached +REA_SIGROK_COMMAND=/absolute/path/to/sigrok-cli node scripts/verify-signal-recording.mjs +``` + +The verifier synthesizes a 9600-baud 8N1 UART VCD carrying `REA`, then checks +actual CLI/MCP parity, advertised schemas, stored Evidence, source hashes, +annotation filtering/autodetection, invalid decoder/input failures and cleanup. +An optional positional REA entrypoint verifies an installed package. +The real-tool lane requires Linux, sigrok-cli 0.7.2 and libsigrokdecode. A separate +kernel-limit regression checks the inherited soft/hard limits and verifies an +oversized allocation is refused before it can consume memory. Other formats, +decoders and physical acquisition are not established by the UART fixture. +The workflow result must be checked before claiming a specific Linux build +verified. The earlier macOS tool check does not establish the current bounded +integration, which deliberately refuses unsupported hosts. + +One decode is admitted at a time, including acquisition and cleanup. Excess +requests receive a retryable capacity error before acquiring another file or +worker. Shutdown closes admission and drains accepted work; failed cleanup +remains owned and retryable. + +## Discover decoders before choosing settings + +`inspect_signal_decoders` / `inspect-signal-decoders` queries the **installed** +sigrok catalog without opening a recording or scanning devices: + +```sh +rea inspect-signal-decoders --query uart +rea inspect-signal-decoders --decoder uart --query baud +rea inspect-signal-decoders --decoder i2c --offset 0 --limit 50 +``` + +Omit `decoder` to search decoder IDs and names. Supply one exact decoder ID to +read its literal help, including required/optional channels, options, annotation +classes and documentation. `query` is a case-insensitive literal substring; +matching help retains original one-based line numbers. Empty query selects all. +`offset` skips matches; `limit` defaults to 50. MCP `limit: null` or CLI `--all` +returns all remaining matches; CLI `--all` and `--limit` conflict. +The window reports examined, matching and returned records and `has_more`. +A filtered empty page is not evidence that the installation has no decoders. + +Discovery refuses more than 65,535 line separators before constructing record +objects (65,536-line representation budget), in addition to the 4 MiB output cap. +Exceeding that budget is a resource failure with captured output. Returned text +is copied so a retained page does not keep the complete producer output alive. + +Discovery shares decoding's owned process, admission slot, resource limits, +cleanup retries and Evidence delivery. It records the executable and limiter +identities, version banner and warnings. Failed version checks and malformed +producer output preserve diagnostics. Help is producer text, not an independently +validated parameter schema. Each request probes again; it does not cache or claim +stable pages across installation changes. Libraries/decoder modules remain +trusted and are not fully fingerprinted. Catalog output includes a SHA-256 of +its executable, not a digest of the complete installation. diff --git a/docs/sqlite-databases.md b/docs/sqlite-databases.md new file mode 100644 index 000000000..3b8f40b01 --- /dev/null +++ b/docs/sqlite-databases.md @@ -0,0 +1,144 @@ +# SQLite database snapshots + +`inspect_sqlite_database` / `inspect-sqlite-database` inspects one explicitly +selected local SQLite database snapshot without an active native analysis +target. Use it to understand application storage, configuration or retained +database evidence. No separate SQLite installation is required. + +This operation requires Node.js 24.x >=24.15 or 26+ with the native +`DatabaseSync.limits` API. The worker verifies that capability before querying +the copied database. Other REA features retain their published Node.js 22.x, +24.x or 26+ requirements. + +`rea capabilities` reports `inspect_sqlite_database` availability and the +runtime requirement without opening a database. Unsupported runtimes show +`available: false`, `availability_code: "unsupported_version"`, and an upgrade +note while the inventory command still succeeds. + +```sh +rea capabilities --json +rea inspect-sqlite-database ./application.sqlite --json +rea inspect-sqlite-database ./application.sqlite --table settings --column key --column value --row-limit 20 --json +``` + +```json +{ + "name": "inspect_sqlite_database", + "arguments": { + "path": "/artifacts/application.sqlite", + "table": "settings", + "columns": ["key", "value"], + "row_limit": 20 + } +} +``` + +MCP paths must be absolute filesystem paths on the current host. CLI paths +resolve against the operator's working directory. Select a quiescent snapshot: +stop the writer or obtain a consistent database/WAL pair using the application's +backup workflow before inspection. A file copy of a live pair does not establish +an atomic SQLite snapshot, even if no change is detected during inspection. + +## Returned evidence + +Without a table selection, the default `schema_scope` is `inventory`: compact +table metadata and index, view and trigger names, without SQL declarations or +column details. Selecting a table defaults to `selected_table`, which expands +that table and its indexes and triggers. Explicit `schema_scope: "database"` +(or CLI `--schema-scope database`) expands all stored declarations and supported +columns. `schema.completeness` refers to the reported scope; omitted column +details are marked `not_requested`. SQL declarations retain the original text. Virtual and +shadow tables are identified as such; their supported metadata coverage is +reported. If a virtual table cannot be resolved, possible backing tables have +`kind: "unknown"` and an explicit limitation; their rows are refused. Unrelated +ordinary tables remain selectable. Schema inventory does not execute views, +triggers or arbitrary SQL. + +Rows are optional. `table` selects one exact ordinary-table name. `columns` +(CLI repeated `--column`) selects exact visible column names in the requested +order; omission selects all visible columns, including generated columns. +Unselected cells are not evaluated or projected. Column selection requires a +table and at least one name; empty-string identifiers are valid. `row_limit` +requires `table`, defaults to 20 and accepts positive safe integers. Samples +remain subject to the byte and worker resource limits below, regardless of row count. The result reports +the selected limit, returned count and whether more rows were observed. Row +order is unspecified; a truncated sample does not prove anything about omitted +records. View, virtual-table and shadow-table row reads are unsupported. + +SQLite integers are decimal strings so every signed 64-bit value survives JSON +serialization. Real values retain their numbers; `"Infinity"`, `"-Infinity"` +and `"-0"` explicitly preserve infinities and negative zero through JSON. +Text returns the decoded string together with its bytes as hex and the database +encoding, preserving malformed text that the SQLite binding may replace for +display. Blobs are hex, and SQL NULL is a distinct tagged value. + +Database and existing sibling `-wal` files have separate original SHA-256 and +byte counts. The Evidence subject identifies the original database file; +the WAL identity is also necessary to interpret pending committed data. The +SQLite engine version is reported with the observed result. Neither digest is +a claim that the database is healthy, complete or trusted. + +## Source files and failures + +REA copies the selected database and existing sibling WAL to an owned private +temporary directory before SQLite opens them. Source files are not opened by +SQLite, so its locks or shared-memory sidecars cannot modify the original +snapshot. Temporary copies and the owned worker are cleaned up on success, +failure and cancellation. Extension loading and schema trust are disabled. +Empty rollback journals and fully zeroed journal headers left by successful +`TRUNCATE` and `PERSIST` commits are accepted after stable identity checks. +Journal headers are checked both before and after acquisition; unchanged file +metadata alone does not establish that a journal remains inactive. +Other retained rollback journals are refused because recovery is outside this +profile. Journal files are never modified or copied into the worker snapshot. + +A provider admits at most two inspections through acquisition, worker execution +and cleanup. Additional requests receive a typed capacity error before reading +files or creating workers; retry after an active inspection finishes. This +bounds simultaneous input buffering and private snapshot/worker counts. + +The database and WAL together are limited to 256 MiB. SQLite values/records, +SQL statements and the complete worker JSON reply each have a 16 MiB limit. +The owned worker has a 256 MiB JavaScript heap limit and a 30-second inspection +deadline. SQLite native allocations are separate from the JavaScript heap; +overall native heap and total resident memory are not capped. Row limits do not +override these byte and resource limits. Resource-limit failures do not return +an incomplete schema as successful complete evidence. + +MCP also applies its configured response budget to the complete Evidence +envelope. If delivery exceeds that budget, it reports a transport constraint +with guidance for exporting retained Evidence, requesting a matching larger +client/server response budget or using complete CLI JSON output. + +A cancellation received after the worker has completed does not erase the +completed observation. If subsequent private-root cleanup fails, the error +retains the completed Evidence and the resource owner for cleanup retry. MCP +records that Evidence before delivering the error, which carries its retained +evidence ID for later retrieval or export. + +Changed input identities, special files, malformed databases, unsupported +formats and resource failures are reported as errors with the selected path and +meaningful reason. Encrypted databases, database repair, arbitrary SQL, +cross-database queries and live capture are outside this inspection's coverage. + +## Compatibility verification + +Run `npm run test:sqlite` after changing the SQLite adapter or its shared +process, filesystem, CLI or MCP boundaries. It prepares the compiled runtime +and runs SQLite service, snapshot, inspection, cleanup and public CLI/MCP +tests. Directory-based selection includes new SQLite service and boundary +tests automatically. `npm run test:sqlite:run` runs the same cases when the +compiled runtime and generated test artifacts are already current. + +The reusable SQLite CI workflow consumes the shared build artifact and tests +the latest Node 22.x unavailable-runtime diagnostics, the minimum supported +24.15.0 release, and the latest 24.x and 26.x releases. The repository-pinned +runtime also runs the full suite. CI's required gate waits for every selected +SQLite matrix job; a failed, cancelled, skipped or missing selected lane blocks +the gate. Workflow changes themselves select the build and compatibility lane. + +PR checks run against GitHub's merge with the current base branch. A later +change to `main` can introduce failures outside SQLite; inspect the failing +job and recheck the updated merge before treating an earlier green run as +current verification. Compatibility checks detect regressions, but cannot +guarantee that an arbitrary future upstream change remains compatible. diff --git a/docs/testing.md b/docs/testing.md index 92cf8dc44..1288a954a 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -1,8 +1,158 @@ # Testing REA Use this guide when choosing coverage, pruning tests, or running a verification -lane. For commands, jump to [developer commands](#developer-commands); for engine -prerequisites, use [real-toolchain lanes](#real-toolchain-verification-lanes). +lane. Start with the commands below; use [real-toolchain lanes](#real-toolchain-verification-lanes) +for engine prerequisites and [client verification](client-verification.md) for +installed-client and agent runs. + +## Developer commands + +Use source feedback while editing, explicit boundary checks for the changed +behavior, and complete CI evidence before merging. + +| Command | Scope | +| --------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `npm run test:local` | Dirty source tests via the import graph, without build; explicit source paths run regardless of Git status | +| `npm run test:focused -- PATH...` | Exact existing test files; compiled boundaries build first, and unmatched paths fail | +| `npm run test:changed` | Source tests affected since the merge base with `origin/main`, including committed and dirty changes | +| `npm run test:fast` | All domain, service, adapter, composition, conformance, and evaluation tests without build | +| `npm run test:boundary` | Boundary, CLI boundary, MCP boundary, process boundary, and process-global projects | +| `npm run test:mcp` | MCP boundary project | +| `npm run test:acceptance` | Complete compiled CLI and MCP acceptance workflows | +| `npm run test:python` | LLDB producer retention and launch contracts with a fake LLDB API; no native debugger required | +| `npm run test:watch` | Dirty source tests in watch mode, without build | +| `npm run test:watch:all` | Changed tests from every project; builds at startup, so rebuild after production edits before relying on compiled tests | +| `npm run check:changed` | Cached typecheck/lint and branch-related source feedback | +| `npm run check:pr` | Opt-in complete local deterministic gate and generated-file checks | +| `npm run docs:check` | Generated-document validation and fresh onboarding example consistency checks | + +For example: + +```bash +npm run test:local -- src/config.test.ts +npm run test:focused -- tests/acceptance/applications/runtime.test.ts +npm run test:changed -- --base origin/main +npm run test:changed -- --dry-run +``` + +`test:focused` accepts exact repository-relative test file paths. Source-only +paths do not build; boundary, acceptance, process-global, or unfamiliar `tests/` +paths build conservatively. Tests use Vitest concurrency and isolated +workspaces; commands do not hold a broad test lock. Build and documentation +writers retain checkout-local locks for their shared output files. Explicit +selections do not use `--changed` or permit zero-test success. +The dry-run option reports the chosen merge base, scope and build prerequisite +without executing tests or building. A missing Git base reports how to fetch +it or select another revision. + +Source typechecking needs no compiled runtime or generated test metadata. +`npm run build:cached` compiles the CLI/MCP runtime and its packaged skill. +Turbo's strict task environment preserves caller-selected `GOMAXPROCS`, +`GOMEMLIMIT`, and `UV_THREADPOOL_SIZE` for resource-constrained builds and +checks. These execution controls do not change artifact content, so changing +their values retains cache reuse. They control individual runtimes; monitor +the complete process family separately when enforcing a total memory budget. +`npm run test:prepare` also generates the MCP contract test catalog, product +catalog, and portable managed evidence used by the complete suite. Focused +tests prepare those extra outputs only when their selected files consume them. +The MCP test catalog is JSON in `.cache/mcp-tool-catalog.json`; the tracked +test loader supplies its types without making generation a source-check +prerequisite. Run `npm run mcp-catalog:generate` to refresh it independently. +Documentation generation and managed conformance run through their separate +`docs:generate` and `evidence:generate` task graphs. + +Changed selection can miss runtime registration, generated data, shell +entrypoints, bridges, or other relationships absent from the import graph. +An empty changed selection means no tests were selected, not verified +correctness. Select relevant boundary files and real-provider lanes explicitly. +Source projects also contain large capacity regressions; `test:fast` promises +no compiled-runtime prerequisite, not a fixed time budget. + +`npm run lint` prints errors and a warning summary; `npm run jscpd` prints +duplication statistics. Complete reports remain in `.cache/static-checks/` and +CI uploads them as `static-check-reports`, including after a failed static gate. +Use `npm run lint:details` or `npm run jscpd:details` for all console diagnostics. +Both duplicate commands scan production and test code with the same 3% limit; +the summary commands preserve checker failures and restore reports from cached +static tasks. Both lint caches include the website, documentation configuration, +and experiment code scanned by the checker; a regression compares the actual +lint inventory with Turbo's resolved inputs. + +Routine iterations and rebases need focused regressions and relevant checks. +Before handing off a PR, run `npm run check` and generated-document checks when +applicable; CI owns the full suite and coverage. Use the full local gate for +broad changes or diagnosing CI, rather than after every edit. Package/install +changes additionally need package verification; provider changes need actual +provider evidence. + +Vitest projects use up to two workers, bounded by host parallelism. +`process-boundary` runs later with serial files because process-tree sampling +shares host resources. Acceptance and process-global cases use isolated forks +without serial scheduling. Pure domain/service, composition, conformance, +evaluation, CLI boundary, and MCP boundary projects share module graphs. Their +tests avoid process-global state and keep resource cleanup test-scoped. Each +MCP session still owns its resources, and CLI cases retain fresh command +instances or subprocesses. CLI module mocks belong in `tests/process-global/` +so they keep per-file isolation. Product catalog verification stays with the +isolated filesystem boundary tests because it loads both source and compiled +module graphs. Adapter, other boundary, acceptance, and process-global projects +retain per-file isolation. See `vitest.config.ts` for current settings. + +The reused CLI boundary workers cap V8 old space at 384 MiB, based on their +profiled allocation and cleanup behavior. This encourages collection between +files; spawned REA processes retain their own heap settings. + +Vitest worker limits do not bound subprocesses launched within a test. Bound +those batches separately so repeated CLI validation cannot oversubscribe the +runner. Preserve simultaneous launches where concurrency is itself under test. + +Build/documentation writers hold checkout-local output locks. Tests do not +hold a broad command lock; `check:pr` finishes tests before document validation. +Turbo caches deterministic preparation and static checks, but `test:run` always +executes. Repository files do not fully describe installed tool contents or host +state. A previous test pass therefore cannot replace current validation, even +when the source tree is unchanged. `check:pr` also runs the fast Python producer +suite; CI runs it in the static job for code changes. These producer tests do not +establish real LLDB engine coverage. + +Vitest's persistent compile cache remains disabled. The `cliTest` fixture shares +a temporary Node compile cache among its fresh CLI subprocesses. The worker +removes it after test-scoped processes finish. Explicit child environment +settings take precedence; children requesting `NODE_V8_COVERAGE` do not receive +the fixture cache. These subprocesses are outside aggregate Vitest coverage; +subprocess coverage attachment remains disabled. Cold-start import checks launch +independently without this fixture cache. + +The Apple artifact verifier step shares a job-temporary bytecode cache among +its fresh CLI/MCP children via `REA_ARTIFACT_NODE_COMPILE_CACHE`. The artifact +helper maps this setting to child `NODE_COMPILE_CACHE`; npm, Turbo, and nested +Vitest runs do not inherit that setting. Explicit `NODE_COMPILE_CACHE` takes +precedence, and coverage collection or `NODE_DISABLE_COMPILE_CACHE=1` disables +the helper's cache. The cache is discarded with the CI job. + +To evaluate persistent compile caching for repeated local runs, opt in for both +cold and warm measurements with an isolated cache: + +```bash +NODE_COMPILE_CACHE=.cache/node-compile npm test +``` + +Do not report the warm result as a cold-suite improvement, and do not enable +the cache in coverage or benchmark CI without first showing that its +instrumentation remains equivalent. + +## Choose verification for the change + +| Change or claim | First check | Additional coverage | +| ----------------------------------------- | ------------------------------------------------------------- | ----------------------------------------------------------- | +| Source semantics | `npm run test:local -- PATH...` | Relevant boundary cases when the behavior crosses a port | +| CLI/MCP workflow | `npm run test:focused -- PATH...` | Actual public calls; an injected provider has limited scope | +| Documentation or generated metadata | `npm run docs:check` | `npm run docs:build` for rendered pages and links | +| Engine adapter | Its real-provider lane below | Host, version, target identity, and owned cleanup | +| Client configuration or schema conversion | [Native client lane](client-verification.md) | Distinguish loopback models from live services | +| Agent investigation quality | [Agent evaluation](#agent-evaluation-and-conformance-records) | Review transcript and scenario-specific evidence | + +## Test design and pruning Prefer real public CLI/MCP workflows, then production-boundary integration, then goldens captured from real producers. Keep module tests for distinct @@ -93,372 +243,106 @@ entrypoint and include its verifier/fixture files in their cache inputs. ## End-to-end, integration and golden evidence -The optional `verify:qwen-client`, `verify:pi-client`, and `verify:hermes-client` -lanes require an installed native client. Select its executable with -`REA_VERIFY_QWEN_COMMAND`, `REA_VERIFY_PI_COMMAND`, or `REA_VERIFY_HERMES_COMMAND`. -They configure disposable profiles through the public REA CLI, preserve caller -settings and backups, and exercise real stdio MCP calls and skill loading. The -`call` mode checks complete catalog discovery and actual JavaScript Evidence; -pass `-- chat` to check plain chat with REA enabled. Qwen also reads the full -result that its client offloads, and Pi exercises default codemode execution. -Use `REA_VERIFY_RUNTIME_ROOT` to select a production-only installed REA package. -Receipts retain client versions, result digests, host coverage and owned-process -cleanup. These POSIX lanes use a deterministic loopback model, so they do not -prove live model-provider or native Windows compatibility. Qwen, Pi and Hermes -bind both `HOME` and `USERPROFILE` to the disposable account. Qwen and Pi discover -the shared personal skill through their default search paths without an explicit -skill setting; Hermes discovers it through the selected `HERMES_HOME`. -Set `REA_VERIFY_HERMES_STICKY_PROFILE=1` to exercise native Hermes selection of -a named sticky profile with `HERMES_HOME` still pointing to its root. +Prefer the public CLI or MCP workflow when it can observe the required behavior. +Use production-boundary integration for contracts the complete workflow cannot +reliably exercise, and producer goldens for format-specific facts. An acceptance +case with an injected provider verifies that integration boundary; it does not +establish real-provider behavior. -`verify:gemini-client` requires an installed Gemini CLI (verified with -`@google/gemini-cli@0.63.0` on POSIX and native Windows); select it with -`REA_VERIFY_GEMINI_COMMAND`. A selected `.js`, `.mjs` or `.cjs` entry point runs -under the verifier's Node. On Windows, select the npm install's -`node_modules/@google/gemini-cli/bundle/gemini.js`, because only a `gemini.cmd` -shim reaches `PATH`. -The optional lane uses native `GEMINI_CLI_HOME` discovery in an isolated -Git project, checks setup plans, backups and idempotence, activates the installed -personal skill, validates all forwarded input JSON Schemas against their declared -dialect, forwards the complete REA catalog and checks full JavaScript -Evidence for a Unicode path. Use `-- chat` for ordinary chat with REA enabled, -or `REA_VERIFY_RUNTIME_ROOT` for a production-only installed REA package. -The local fixture exercises the real Gemini API adapter, including its -`untrusted_context` tool-result envelope. Token counts are synthetic; live -Google API compatibility remains unverified. The lane disables -the client's memory-based relaunch to preserve the caller's Node heap budget. +For installed-client versions, executable selectors, disposable profiles, model +fixtures, and detailed receipts, see [client verification](client-verification.md#end-to-end-integration-and-golden-evidence). +Use [real-toolchain lanes](#real-toolchain-verification-lanes) for engines and +[agent evaluation](#agent-evaluation-and-conformance-records) for investigation +quality. Report unavailable tools or authority explicitly and verify owned +cleanup before claiming success. -`verify:opencode-client` requires an installed OpenCode (verified with -`opencode-ai@1.18.35`); select it with `REA_VERIFY_OPENCODE_COMMAND`. -The optional POSIX lane configures isolated XDG roots and `OPENCODE_CONFIG_DIR`, -checks setup plans, backups, preserved JSONC comments and idempotence, activates -the installed skill, validates all forwarded input schemas and verifies complete -JavaScript Evidence for a Unicode path. JSONC is the default fixture; set -`REA_VERIFY_OPENCODE_CONFIG_FORMAT=json` for JSON. Use `-- chat` for ordinary -chat or `REA_VERIFY_RUNTIME_ROOT` for a production-only installed package. -The native core runs with external plugins disabled through `OPENCODE_PURE`; -the local OpenAI-compatible fixture has a caller-declared one-million-token -context and synthetic usage. Skills use an explicit isolated `skills.paths` -directory, so default OS-home discovery remains unverified. Live model APIs and -native Windows are also unverified. +## Coverage and timing -`verify:claude-client` requires installed Claude Code (verified with -`@anthropic-ai/claude-code@2.1.296` on POSIX and native Windows); select it -with `REA_VERIFY_CLAUDE_COMMAND`. On Windows, select -`claude.exe`: npm installs put only a `claude.cmd` shim on `PATH`, and the real -executable is under `node_modules/@anthropic-ai/claude-code/bin`. -The optional lane uses native `CLAUDE_CONFIG_DIR` discovery, an independent -Git workspace, user settings and default built-in tools. It preserves caller -preferences and backups, checks idempotent setup, waits through the native -`WaitForMcpServers` tool when discovery is pending, and validates the complete -catalog and forwarded input schemas. Call mode loads the personal skill through -native `Skill`, checks its full body and verifies named-schema JavaScript Evidence -for a Unicode path. Use `-- chat` for ordinary chat with REA enabled, or -`REA_VERIFY_RUNTIME_ROOT` for a production-only installed package. The local -Anthropic Messages/SSE fixture preserves native resource-hint envelopes in its -request artifacts. Usage is synthetic; live Anthropic API and bare-mode -personal-skill activation remain unverified by this lane. +CI owns coverage; aggregate and domain/contract thresholds are maintained in +`vitest.config.ts`. They are glob-specific and never updated automatically. +Coverage does not replace named boundary or real-provider scenarios. -`verify:copilot-client` requires installed GitHub Copilot CLI (verified with -`@github/copilot@1.0.95`); select it with `REA_VERIFY_COPILOT_COMMAND`. -The optional POSIX lane uses native `COPILOT_HOME` discovery, an independent -Git workspace, guarded setup plans, preserved registrations, backups and -idempotence. Native `skill add` registers the isolated installed skill; call -mode loads its full body, validates all forwarded input schemas and checks -named-schema JavaScript Evidence for a Unicode path. When Copilot spills a -large MCP result, the model requests native `view` with `forceReadLargeFiles` -and validates the complete returned Evidence rather than its preview. -Use `-- chat` for ordinary -chat or `REA_VERIFY_RUNTIME_ROOT` for a production-only installed package. -The native offline BYOK adapter uses a loopback OpenAI completions/SSE fixture -and `gpt-5.4` model metadata; model inference and token usage are synthetic. -Set `REA_VERIFY_COPILOT_MODEL` to examine another client model ID and -`REA_VERIFY_COPILOT_WIRE_MODEL` for its backend model name (defaults to the client -ID). Every actual HTTP request's model is checked and recorded separately. -Both `HOME` and `USERPROFILE` point to the disposable account; native `skill add` -still selects the installed skill directory explicitly. +CI runs six native Vitest shards without retries. Each shard emits a blob +report; the merge job produces JUnit and JSON diagnostics, a module timing +report, plus aggregate coverage during full qualification. It retains available +reports even when a shard fails, uploads available diagnostics, and writes the +slowest files to the workflow summary. Partial reports are marked diagnostic +only. Failed, cancelled, or missing selected shards still fail the required gate, +and aggregate coverage thresholds remain enforced in full qualification. +Only successful complete full-tier merges publish the small `test-timings` artifact, with +checkout-relative paths; the build job downloads that artifact for the sequencer +instead of the coverage/JUnit bundle. Timing weights come from Vitest module +diagnostics and include tests and hooks, worker preparation, environment, +imports, and setup. Import timings already include transform waits, which are +not added again. The weights describe file costs under the measured worker and +coverage settings; their sum is not workflow elapsed time. The diagnostic +artifact retains the phase breakdown, while shard history keeps only each +file's total. Legacy test-body-only history and missing history fall back to native +sharding. Static checks, documentation, build, package verification, and +real-system lanes remain separate jobs so one kind of evidence cannot stand in +for another. Workflow syntax and expression validation runs inside the required +static-check job when workflow changes select it, avoiding a separate runner. +Native, provider, fixture, SQLite compatibility, and website lanes wait for +static checks to succeed before allocating their runners. This avoids spending +those runner slots on revisions that already fail static validation. Portable +test shards and documentation checks remain independent of static results, so +they can still provide diagnostic feedback. The required gate rejects skipped +selected lanes when static checks fail; passing revisions retain all selected +coverage. This ordering reduces peak demand on invalid revisions but can add +static-check waiting to otherwise passing runs; it is not a measured reduction +in end-to-end latency. -The same native client passed full-profile chat and analysis with the actual -wire model `gpt-4.1` under a distinct BYOK model ID: +Core jobs have execution limits of five minutes for classification, ten minutes +for static checks, builds, docs, and report merging, and thirty minutes per +portable test shard. These limits leave headroom for cold setup and full coverage +while preventing a hung job from holding the active main run for hours. They do +not bound runner queue waiting. Timeouts still fail the required gate. -```bash -REA_VERIFY_COPILOT_MODEL=rea-gpt-4.1 REA_VERIFY_COPILOT_WIRE_MODEL=gpt-4.1 npm run verify:copilot-client -- chat -REA_VERIFY_COPILOT_MODEL=rea-gpt-4.1 REA_VERIFY_COPILOT_WIRE_MODEL=gpt-4.1 npm run verify:copilot-client -- call -``` +The separate `CI timings` workflow batches recent completed CI and Release runs +hourly or on manual dispatch. It uploads `ci-job-timings-batch` with raw API pages and +a normalized point-in-time report for each collected workflow attempt, plus a +batch manifest describing examined coverage, failures, and limits. Overlapping +lookback windows may collect an attempt again; identify records by run ID and +attempt. Each batch examines at most 100 completed runs per workflow created in +the preceding 24 hours, with a four-minute API collection budget. It collects the +latest attempt of each selected run and does not claim an exhaustive archive. +It runs the reporter from the trusted default branch with read-only permissions, +treating workflow runs as API data. It does not allocate a new reporter job for +every completed, cancelled, or skipped workflow. Reports separate queue +waiting (`created_at` to `started_at`) from completed execution and report +percentiles plus matched `npm ci` and artifact-step durations. +Queue excludes dependency waiting before job creation and does not establish +whether account concurrency or runner availability caused the wait. Queued jobs with +placeholder start times, skipped jobs, and missing or invalid timestamps remain +unknown. The reporter targets each selected run and attempt explicitly. +Summed job elapsed time is parallel work, not workflow wall time, CPU time, +memory usage, or billing. Step names identify samples, not complete transfer +costs. Its queue, execution, and failures are independent of the required gate +and publication. CPU time and peak process-family memory are not measured by this API. -These runs retain full canonical input/output schemas, all tools, installed-skill -loading and complete Evidence readback. They use the fixture's requested -one-million-token BYOK prompt setting; effective capacity and live API acceptance -remain unknown. With the built-in `gpt-4.1` model ID, the verified client still -blocks the full input-schema profile before HTTP with -`compaction_static_context_blocked`, even when requesting a larger BYOK prompt -capacity. The effective capacity is unknown. The default verifier preserves -the complete catalog and full schemas. To verify the existing compact profile: +The build job saves portable Turbo outputs across runs. Eight Linux real-system +lanes restore this cache without waiting for the build job. The shared action +derives its key from `test:prepare --dry=json` task hashes, runner OS and +architecture, `.npmrc`, `.nvmrc`, and the lockfile; test-only changes can reuse compiled outputs. Every +build and verification command still runs, so Turbo checks task inputs and +rebuilds misses. A restore prefix with the same platform and toolchain permits +partial task reuse when one generator's inputs change; Turbo still invalidates +that generator's entry. Native outputs are not stored in this cache. -```bash -REA_VERIFY_COPILOT_MODEL=gpt-4.1 REA_VERIFY_COPILOT_SCHEMA_PROFILE=compact npm run verify:copilot-client -- chat -REA_VERIFY_COPILOT_MODEL=gpt-4.1 REA_VERIFY_COPILOT_SCHEMA_PROFILE=compact npm run verify:copilot-client -- call -``` +Native package jobs, the Windows curated lane, and the Apple artifact lane reuse +the same workflow's Turbo cache for portable compiled JavaScript, skills, and +catalogs. The Windows lane relies on the Linux static job for typechecking. They retain the normal build and prepack +commands, which restore matching outputs or rebuild on a cache miss. Native +artifacts, dependency installs, package archives, and runtime verification remain +host-local. Keep platform-dependent outputs out of this shared cache. -Both native workflows passed with the complete tool inventory. The verifier selects the -profile only in its disposable Copilot registration and records it in the -receipt. Compact advertisements can reduce nested validation structure; the -server still validates complete canonical inputs. This is a tested alternate -workflow, not a fix for the full-profile client/model limit tracked in #1554. -Live model APIs, native Windows and default OS-home skill discovery remain -unverified. - -`verify:grok-client` requires installed Grok Build (verified with the official -Linux x64 1.0.50 binary); select it with `REA_VERIFY_GROK_COMMAND`. This optional -POSIX lane isolates `GROK_HOME`, an independent Git workspace and additional -skill roots, disables foreign configuration discovery, guards setup writes, -preserves unrelated registrations/backups and checks idempotence. Call mode -loads the full skill through native `read_file`, queries all REA names and input -schemas through native `search_tool`, and calls analysis through `use_tool`. -If discovery reports `partial`, the native agent diagnoses REA registration and -retries discovery. No startup-timeout override or fixed readiness delay is used. -A larger Unicode-path fixture exercises native result offloading: the full -retained Evidence is validated against its named schema, then native terminal -queries recover the selected export facts, subject and full artifact digest in -the next model request. This verifies useful artifact recovery without claiming -that every offloaded graph fact enters model context. Native line-number and -truncation envelopes remain in the request artifacts. Use `-- chat` for ordinary -chat, or `REA_VERIFY_RUNTIME_ROOT` for a production-only installed package. -The loopback OpenAI completions/SSE custom model declares a one-million-token -context and synthetic usage. Live xAI APIs, native Windows and default OS-home -skill discovery remain unverified. - -`verify:commandcode-client` requires installed Command Code (verified with npm -1.79.2); select it with `REA_VERIFY_COMMANDCODE_COMMAND`. Auth, MCP tokens and -sessions use the actual OS home, so provision a disposable POSIX account rather -than overriding `HOME`. Set `REA_VERIFY_COMMANDCODE_ACCOUNT_HOME` to that account's -actual home and create `.rea-client-verification` there with exactly -`Disposable REA client verification account` followed by a newline. The lane -owns that account's `.commandcode` configuration and shared REA skill. Build the -runtime as the checkout owner, then run `node scripts/verify-commandcode-client.mjs` -as the disposable account; the npm shortcut also needs a writable checkout. -The verifier does not create accounts or install clients. It guards setup -targets, preserves an unrelated registration and backups, checks idempotence, -and verifies native default shared-skill discovery and complete activation. -Default deferred-schema delivery stays enabled: the native prompt advertises -every REA tool, exact-name `search_tools` returns every input schema, and a native -shell query recovers the saved catalog's count and digest when the client spills -it. Actual analysis of a Unicode-path fixture delivers full named-schema Evidence -to the next model request. Use `-- chat` for ordinary chat or -`REA_VERIFY_RUNTIME_ROOT` for a production-only installed package. The loopback -OpenAI completions/SSE model is a keyless BYOK endpoint declaring a million-token -context with synthetic usage. A synthetic account-key value satisfies the -client's print-mode gate; native local-only mode refuses hosted API calls. -Updates, telemetry and cron are disabled. Hosted authentication, live models -and Windows remain unverified. - -`verify:omp-client` requires installed OMP (verified with the official Linux x64 -18.8.7 binary); select it with `REA_VERIFY_OMP_COMMAND`. This optional POSIX lane -isolates the default agent, global config and XDG roots, guards setup targets, -preserves unrelated registrations and backups, and checks idempotence. It -compares native rejection of an invalid profile with REA's refusal to plan -fallback writes. OMP's default `xd://` interface mounts the complete REA catalog -as devices: call mode reads the complete installed skill and tool documentation, -then dispatches analysis through native `write`. It checks full named-schema -JavaScript Evidence with a Unicode path in the next model request. Device -metadata and documentation are distinct from forwarding all JSON schemas as -model functions. Native print-mode MCP readiness uses its defaults. -Use `-- chat` for ordinary chat or `REA_VERIFY_RUNTIME_ROOT` for a production-only -installed package. The loopback OpenAI completions/SSE model fixture declares a -one-million-token context and synthetic usage. Live model APIs, native Windows, -named-profile native execution and default OS-home skill discovery are -unverified; skill discovery uses an explicit isolated custom directory. - -`verify:deepseek-client` requires an installed DeepSeek Harness (`dsh`; -verified with `@deepseek-ai/dsh@0.2.0-rc.2`) and Git. Set -`REA_VERIFY_DEEPSEEK_COMMAND` to select its executable. This optional POSIX lane -seeds caller model settings and a stale Cordis registration in an isolated -`DSH_HOME`, then runs public `setup --client dsh` dry-run, setup, repeated setup, -and scoped doctor. It checks the backup and unrelated patches before booting -Harness with the generated registration. After native execution it uninstalls -through the public CLI and checks that only caller patches remain. `HOME` and -`USERPROFILE` point to the disposable account. The native default -`~/.agents/skills` search path discovers -the installed skill without a `DSH_AGENTS_HOME` override. A separate Git root prevents inherited project skills from -masking a missing installation. The default `call` mode checks skill loading, -complete catalog discovery, the actual forwarded input schemas and regexes, -and full JavaScript Evidence for a Unicode path. Use `-- chat` for ordinary -chat with REA enabled, or `REA_VERIFY_RUNTIME_ROOT` for an installed package. -The fixture uses Harness's custom OpenAI adapter and the one-million-token -context capacity declared by its default DeepSeek Flash model; it does not -establish live DeepSeek API or native Windows coverage. Receipts include -request artifacts, result digests and owned-process lineage. - -The DSH acceptance journey also exercises public setup, approval, doctor, -generated-launcher MCP startup and uninstall without an installed Harness. -That journey proves REA workflow behavior, not native Cordis expression -evaluation. Filesystem regressions retain tagged values and unrelated rows -across alias dependencies and check refusal of unsafe YAML without mutation. - -Full E2E tests invoke the production command dispatcher and real providers, -without fake launchers, runners or responses. `verify:keyed-archive` writes -Foundation binary, XML, and integer archives using one run-owned Swift module -cache. It checks CLI and separate stdio MCP parity, pagination, escaping-path -rejection, an XML graph golden, and numeric meaning for safe controls, unsafe -integers, boxed numbers, and integral-valued reals. `verify:asset-catalog` -compiles source-owned colors with -`actool`, invokes real `assetutil`, then checks CLI/MCP results, exact catalog -digest, every raw metadata field, pagination and malformed input rejection. -Neither artifact workflow requires Hopper or launches it. Both run in macOS CI. -`verify:macos-bundle` needs only macOS with Command Line Tools. It compiles a -source-owned app with `clang`: a versioned framework, XPC services, an app -extension, a login item, a privileged helper, launchd plists, and a helper tool, -signed ad hoc. It packs the app as a directory, a `ditto` ZIP, and an APFS DMG, -then checks that `inspect-artifact` plus `project-apple-application-graph` -report the same bundle anatomy for all three through the CLI, with stdio MCP -parity. It also checks that the DMG is detached afterwards. The same app -covers `trace-dylib-resolution`: - -- each resolution status and finding, with CLI/MCP parity; -- for every traced image, dependencies, rpaths, and install names equal to - `otool -l`; -- for the main executable and an XPC service, a predicted load order equal to - the images dyld actually loads under `DYLD_PRINT_LIBRARIES`. - -The lane also compiles executable/library pairs with empty embedded directory, -versioned-path, and suffix settings. It checks present and removed dependencies -through CLI and MCP, and compares actual `DYLD_PRINT_SEARCHING` diagnostics for -root-level candidates. These cases distinguish an empty search directory from -an empty versioned scan or a suffix that only repeats the original path. - -It runs in macOS CI. - -Prepare the native inspector before cases that measure producer output or exit -behavior; keep startup deadlines and cancellation in distinct cases. Run real -process-capture verification separately from package or build checks. On macOS, -new npm processes can become token-unreadable after changing their display -title and prevent verified cleanup during a capture's ownership sweep. - -MCP SDK transport tests with recording providers remain integration tests. -They are useful for schema drift and failure projection but do not prove that -Hopper, Ghidra or another substituted engine works. `verify:package` proves -packaging/install behavior and fake-provider integration; use the corresponding -real-provider lanes for engine claims. Packed-bridge checks verify shipped files and Python syntax. -Real Apple dispatch and Interface -Builder verifiers currently prove format integration through production readers. - -`verify:hopper` exercises an installed Hopper through the production stdio MCP -server and CLI. It checks source-owned call chains, CFG edges, references and -complete large inventories, then probes unnamed bookmarks, annotation clearing, -batch validation before mutation, malformed addresses and regexes, segment-end -partial reads, and synthetic file-offset rejection. Advertised schemas are -validated in their JSON Schema dialect and successful replies are checked against -their advertised output schemas. Navigation checks cover interior-object cursor -readback and mapped-memory boundaries. Annotation probes verify invalid native -text and duplicate destinations/names before mutation, preserve unselected label -owners, and exercise explicit batch label swaps. Function locals retain observed -names and stack displacements. Graph probes check symbol/interior-address parity -and a source-owned recursive cycle; literal tracing preserves complete queries -and whitespace. Disposable binary copies prove that switching and closing -actually removes the native document, and that CLI byte, function-dossier, -literal-trace results and invalid-address diagnostics agree with MCP. -No provider is mocked in this lane. -Real search probes cover Unicode names, literal metacharacters, case and regex -modes, annotation cache invalidation, complete native fragments of long literals -checked against byte reads, escaped UTF-8/control text, byte-preserving Latin-1 -decoding, and Hopper's UTF-16 symbol-name truncation boundary. It verifies native -CallReference classifications across reference and dossier results, retains long -string fragment metadata in dossiers, and exercises pathological regex deadline -and cancellation followed by successful requests in the same native session. When the macOS -Objective-C fixture is present, the lane also verifies native UTF-16 string objects -and their inferred encodings against their actual bytes. Native terminal calls -are checked across reference, instruction, assembly, block-range and procedure-length -projections; block endpoints are normalized using actual native membership. -Exact Objective-C names also exercise named CLI selectors for function, instruction, -decompilation, reference and search operations. A literal `--help` trace query proves -that selector data is preserved independently of global CLI flags. -Unmapped annotation destinations and -oversized later batch names fail before any earlier edit is applied. - -`verify:hopper:deadlines` checks the native client's optional request deadlines -on macOS with an owned source-built fixture. Zero and elapsed deadlines must -leave native comments unchanged, including when a synchronous progress observer -delays timer dispatch. It also observes a short analysis deadline and verifies -subsequent wire recovery and clean shutdown. Caller timeout does not interrupt -Hopper's synchronous native operation. Socket boundary tests deterministically -cover active and queued expiry, late replies and timer cleanup. - -The Linux demo lane remains a separate `verify:hopper:linux` command. Its -lifecycle checks attempt competing CLI launches for the active target and a -different target, requiring rejection before either can change the owning -MCP session's documents or procedures. Lease boundary tests also preserve -unresponsive or malformed live endpoints while allowing confirmed stale -sockets to recover. - -`verify:hopper:fat` is a separate macOS lane requiring installed Hopper and the -existing Xcode clang/lipo toolchain. It compiles arm64/x86-64 thin executables and -one- and two-slice FAT32 containers, verifies exact/interior address mappings -against bytes in the original files, checks CLI/MCP parity, and checks owned -runtime cleanup. Source byte changes, removal, permission denial (for non-root -callers), and nonregular replacement must retain native partial mapping facts, -reject unverified original-file coordinates, -and recover after restoration. Single-slice FAT cases also relocate the slice -without changing its loaded bytes. `verify:hopper:fat64` additionally checks -FAT64 preparation through Hopper's native Mach-O loader, source-container -mappings, profile identity, -malformed and ambiguous slice rejection, and temporary-image lifetime. Both -lanes have been verified on Hopper 6.1.0-demo; this establishes REA's prepared -FAT64 workflow, not native FAT64-loader support. -Cross-architecture fixture compilation is not required by `verify:hopper`. - -Golden tests use immutable captured text inputs with producer/source provenance -under `tests/fixtures/golden/`. Expected results are reviewed for the semantic -claim; capture commands do not automatically approve new expected outputs. -Do not call handcrafted utility output or synthetic binary builders real-data -goldens. Keep unsupported binary layouts and malformed boundaries as targeted -regressions until a real fixture establishes equivalent coverage. - -`verify:browser` exercises source-map failure isolation and expanded-output limits through the compiled CLI and stdio MCP with real Chrome. It also submits five 2 MiB source-map annotations, checks retained script identities and explicit map omissions, and closes its owned fixture target. Replacement and document-reset behavior has separate producer-boundary coverage. - -The raw Chrome fixture launchers use `--password-store=basic` so Linux startup -does not wait for an unlock prompt from a reachable but locked desktop keyring. -Such a stall leaves the initial page unloaded with empty or placeholder CDP URLs; -it does not establish permission to capture that page. See -[the keyring diagnosis](https://github.com/morluto/rea/issues/1384#issuecomment-6093781686). - -`verify:browser` also captures a source-owned noise canvas as a real PNG above -8 MiB through the CLI and stdio MCP, with complete byte/digest parity and real PNG -decoding. Its SDK client explicitly permits the larger inline JSON response; -this lane does not establish large image-comparison request transport coverage. - -The scenario checks read locale, timezone, device scale and viewport dimensions -from actual page JavaScript through CLI and stdio MCP DOM captures. They also -verify that attached-page emulation is released after success, initialization -failure, action failure and cancellation while the external target stays open. - -`verify:browser:network` is a focused real-browser lane for transaction identity, -selected request/response bytes, binary and compressed responses, duplicate -headers, credential and declared-secret redaction, redirects, streaming cutoff, -CLI/MCP parity, and owned-profile cleanup. Set `REA_BROWSER_EXECUTABLE` to an -installed Chrome-family browser. An optional script argument selects an already -installed package's `scripts/rea.mjs` entry point for packaged-artifact checks. -The complete `verify:browser` lane includes these same checks. - -After building, `verify:browser:dom` checks empty and HTML-whitespace form -destinations against a native Chrome DOM-property oracle through CLI and stdio -MCP. It requires `REA_BROWSER_EXECUTABLE` and accepts an optional installed REA -entrypoint. The full browser lane includes the same public-adapter assertions -before other fixtures navigate the selected page. - -`verify:browser:scripts` checks active script capture → exact-byte export → -existing static JavaScript analysis through CLI and stdio MCP, including -manifest readback, competing query variants, and resolved relative imports. -It uses an installed browser and accepts an optional installed REA entrypoint. -The complete `verify:browser` lane also exercises passive script export through -both public adapters. See [website script export](website-script-export.md). - -`verify:browser:modules` compares CLI and stdio MCP traces against an independent -real Chromium module-loading fixture: import-map scopes, package prefixes, -null/backtracking rejection, query/fragment identities, repeated module instances, -lazy and computed unknowns, exact source/map identities and no implicit refetch. -Set `REA_BROWSER_EXECUTABLE`; the optional script argument selects an installed -package entrypoint. The complete `verify:browser` lane and existing conditional -Chrome CI include this verifier. See [module relationships](website-module-trace.md). +Record cold and warm preparation separately from fresh test execution when +benchmarking the optional `npm run check:pr` gate. Compare multiple runs on the +same host, including subprocess and queue costs; a cached pass is not a test +runtime measurement. A PR that touches packaging or real-system +behavior requires the applicable `verify:*` lanes; packaging and installation +changes also require `npm run verify:package`. The full-gate benchmark measures +that explicit lane, not the routine iteration requirement. ## Real-toolchain verification lanes @@ -479,6 +363,7 @@ prove behavior on the verified Ghidra 12.1.4 and JDK 21 build. | `npm run verify:ghidra` | Linux x64/arm64 ELF or macOS x64/arm64 Mach-O | Host C compiler, Ghidra 12.1.4, and full JDK 21 | | `npm run verify:ghidra:seeds` | POSIX; raw x86 fixture; seed ordering, BSS labels, analyzer readback and unknown-name rejection | Ghidra 12.1.4 and full JDK 21 | | `npm run verify:ghidra:swift` | macOS x64/arm64 Mach-O | Host Swift compiler, Ghidra 12.1.4, and full JDK 21 | +| `npm run verify:ghidra:riscv` | Linux/macOS x64/arm64 host; source-owned RV32/RV64 ELF through CLI and MCP | RISC-V Clang, LLD, LLVM readelf, Ghidra 12.1.4, and full JDK 21 | | `npm run verify:ghidra:switch` | Linux x64 ELF; GCC/Clang optimized and stripped switch fixtures | GCC, Clang, GNU nm/objdump/strip, Ghidra 12.1.4, and full JDK 21 | | `npm run verify:ghidra:aarch64-jump-table` | Any supported Ghidra host; AArch64 ELF; signed/unsigned byte/halfword tables; host ARM64 Mach-O | Clang with AArch64 target support, Ghidra 12.1.4, and full JDK 21 | | `npm run verify:ghidra:cross-format` | Any supported Ghidra host; also analyzes AArch64 ELF, x86-64 PE, and x86-64 Mach-O | `clang`, LLD, and `lld-link` in addition to host-lane prerequisites | @@ -684,6 +569,36 @@ with the reported target identity, apktool.yml metadata projection [Apktool resource analysis](apktool-resource-analysis.md) for boundaries and budgets. +## Flutter build identification + +`npm run verify:flutter -- --apk PATH [--plain-apk PATH]` runs both pure +static operations against a real Flutter APK, plus an optional non-Flutter +APK for the negative check. No engine or external tool is involved. Record: +Flutter Gallery 2.9.2 (112 MB, arm64-v8a / armeabi-v7a / x86_64) — every +ABI reports the same agreeing snapshot hash +(`65817c30a78bb44c3dc3771876b6010a`, two sections each) read 20 bytes after +the Dart snapshot magic, per-ABI engine GNU build-ids, no labeled Dart +version string (expected for a release engine build), and the Android +clang/LLVM toolchain line; the AOT inspection locates all four snapshot +symbols through the dynamic symbol table on both ELF64 and ELF32 images, +validates the data-section headers, agrees with the identification hash, +and counts 756 `package:` and 201 `dart:` URIs on arm64-v8a and x86_64, +and 212 / 48 on armeabi-v7a, from each isolate data section. Responses +retain at most 500 URIs per family and 2000 class-like tokens. Gallery's +pool projection and overall AOT coverage are partial while its structural +`libapp.coverage` is complete. A plain aapt2-built APK reports not-detected with +complete coverage. The suite uses self-contained synthetic ELF images and recorded scanner +prefixes, with no private local-file dependency. The verifier now compares +compiled CLI and stdio MCP Evidence on every ABI, including data-header kind +and declared lengths. Add +`--expectations scripts/fixtures/flutter-gallery-expectations.json` for the +documented Gallery APK to assert its pinned digest, hash, exact engine labels +and per-ABI URI counts. The verifier requires complete structural snapshot +coverage, reports bounded pool coverage as partial/unverified, and reports +exact labels/counts on other APKs unverified without an expectations file. +See [Flutter build identification](flutter-analysis.md) for boundaries and +budgets. + ## ADB device acquisition `npm run verify:adb` exercises every ADB operation against a live device or @@ -757,11 +672,12 @@ or upgrade Java, Ghidra, .NET or native toolchains. See `npm run verify:ida -- --target /absolute/path/to/program --procedure main` uses the existing `REA_IDA_MCP_CONFIG` registration. It installs no engine, Python package, or compiler. The target must already be open in the GUI for -the legacy attached profile; the database-supervisor headless profile opens +the legacy or native attached profile; the database-supervisor headless profile opens a digest-verified private copy. A caller-supplied fixture keeps prerequisites limited to the selected engine and host. `tests/conformance/ida/inventory.c` -provides an optional small native fixture source with an exported -`rea_fixture_add` function. +provides an optional small native fixture source with exported +`rea_fixture_add` and `rea_fixture_subtract` functions. For their switching check, +use `--second-procedure rea_fixture_subtract --second-marker='- 13'`. The lane invokes the production CLI dispatcher and connects the pinned MCP client SDK to the production REA server. It verifies function Evidence and @@ -789,6 +705,10 @@ failed intermittently on that host. Linux headless, modern attached GUI tools, other engine versions and architectures remain unverified; see the [provider guide](ida-provider.md). +Native IDA MCP verification uses `"protocol": "native"` with an already-running native plugin and requires `--second-procedure other_function --second-marker unique_second_body_text` to exercise GUI function switching and a return to the first function. These options remain optional for other profiles. The literal marker must appear in the second function's pseudocode and be absent from the first. Native cloud/widget failures are reported without hidden retries. + +The initial Linux x64 IDA Free 9.4 run used native MCP 1.1.2 with a local navigation correction. Windows x64 verification uses **IDA Pro 9.3**, the two-function public fixture, and the shipped Windows `whoami.exe` application. The native plugin was built from upstream `c9d15d98e8a143fc74f6e14037c48f63889b6d6c`, including the merged navigation fix, with a local loopback-listener change. Production CLI/MCP parity, switching, identity and cleanup passed. Correctness and performance measurements are recorded in the [Windows native verification notes](https://github.com/morluto/rea/blob/main/experiments/analysis-efficiency/ida-native-windows.md). Stock 1.1.2 switching, native macOS, and Windows IDA Free remain unverified. See the [native bridge prerequisites](ida-provider.md#optional-native-ida-mcp-bridge). + ## DOS Ghidra analysis `npm run verify:ghidra:dos` requires the supported Ghidra and JDK installation @@ -822,6 +742,44 @@ specifications, independent mappings, unchanged bytes, and decompilation of a known return value. AArch64 remains covered by deterministic tests rather than this real-provider lane. See [raw binary analysis](raw-binary.md). +`npm run verify:ghidra:address-context` runs on Linux with a caller-installed +Ghidra, full JDK, and an x86-64 ELF GCC toolchain (`CC` selects another compatible +compiler). It builds +`tests/conformance/c/pie-address-context.c` as a PIE ELF without executing it. +The compiled CLI and real stdio MCP workflow must expose the measured image +base, retain segment address spaces, agree on the overview, resolve explicit and +numeric file offsets, and reject unmapped analysis addresses with actionable +guidance. It checks the reverse `address-to-file-offset` mapping, file-coordinate +Evidence locations, and the suggested CLI search and load-image commands. +The verifier compares mapped bytes with the source file and checks source +identity, session preservation after failed lookup, owned runtime cleanup, and +verified empty process lineage. This lane does not establish Windows or macOS +real-provider coverage. + +For source-identity boundaries that a normal single-file import cannot create, +`tests/conformance/ghidra/ReaFileOffsetSourceProbe.java` exercises the production +bridge against real Ghidra `FileBytes`. It rejects auxiliary and partial sources, +checks the original target's round trip, and retains ambiguity when duplicate +target bytes have distinct loaded mappings. Injected decompiler failures and +cancellation verify that completed source/function resolution facts and backend +failure codes survive; these injections do not establish natural engine failures. +On Windows, after creating the +source-owned PE fixture, run from the repository root: + +```powershell +node scripts/create-ghidra-windows-fixture.mjs +$proofRoot = Join-Path $env:TEMP 'rea-file-offset-source-proof' +New-Item -ItemType Directory -Path $proofRoot -Force | Out-Null +Copy-Item bridge/ghidra/ReaGhidraBridge.java, bridge/ghidra/ReaGhidraExtensions.java, tests/conformance/ghidra/ReaFileOffsetSourceProbe.java -Destination $proofRoot +& "$env:GHIDRA_INSTALL_DIR/support/analyzeHeadless.bat" $proofRoot source-proof -import "$PWD/build/fixtures/rea-ghidra-windows.exe" -scriptPath $proofRoot -postScript ReaFileOffsetSourceProbe.java -deleteProject +``` + +Require the `REA_FILE_OFFSET_SOURCE_OK` marker and no script errors; Ghidra may +exit successfully even when a post-script fails. The probe edits only its +temporary analysis database and does not execute the fixture. This producer +regression supplements public CLI/MCP coverage and does not establish Linux +host behavior or native process-supervision controls. + ## Apple Interface Builder archives `npm run verify:interface-builder` compiles the source-owned AppKit XIB into a @@ -837,54 +795,153 @@ not make native host acceptance unavailable. ## Native platform baseline in CI Pull requests that change only root `README*.md` files, `docs/`, `AGENTS.md`, -or `CONTRIBUTING.md` run formatting and generated-document validation without -the source-test shards or native package lanes. Classification compares the PR -head with its merge base, so later base-branch changes do not expand that scope. -Static and coverage aggregate jobs remain present and fail if classification -fails. Every code change retains the complete four-shard Linux suite; individual -test files are not selected by imports or filenames. +`CONTRIBUTING.md`, `CHANGELOG.md`, `SECURITY.md`, `native/windows/README.md`, +or the GitHub issue and pull-request templates run formatting and +generated-document validation, including the small onboarding example consistency +suite, without the source-test shards or native package +lanes. Classification compares the PR head with its merge base, so later +base-branch changes do not expand that scope. Static and portable-test aggregate jobs +remain present and fail if classification fails. Every code change retains the +complete six-shard Linux suite; individual test files are not selected by +imports or filenames. + +Ordinary PRs also produce an **observational** test-selection plan. The candidate +leaf-adapter ownership table lives in `scripts/ci/test-selection.mjs`, separately +from provider-job scopes. It proposes keeping affected owners plus every unowned +test, including all CLI/MCP, acceptance, composition, conformance, and process +tests. Shared inputs, unknown paths, missing owner tests, and removed tests fall +back to the complete inventory. Renames account for both paths. Main, scheduled, +manual, and `ci:full` runs always propose the full suite. + +All six shards still execute the complete suite. The existing report merge +compares the proposal with actual module outcomes and retains +`.cache/ci-test-selection/report.json` in `test-results`, including selected and +omitted paths, changed input paths, missed failures, unobserved files, scheduling weights, PR head and +executed merge SHA. This adds no test reruns or runner jobs. Missing, duplicate, +skipped, interrupted, or unhandled results cannot establish a complete comparison; +even a complete passing comparison is not proof of ownership completeness. +Before enabling omissions, review representative full-run comparisons and +cross-owner consumers, including failures, and measure completed CI feedback and +runner demand. There is no automatic promotion or switch to skip tests. The +initial proposal measures only leaf producer-test omissions; it does not promise +the savings of a broader affected-test planner. `scripts/ci/plan.mjs` selects lanes using the ownership table in `scripts/ci/scopes.mjs`. Provider implementation changes run their real-provider -verifiers and the Linux x64 installed-package/Inspector baseline. Test-only -changes run the Linux suite without native package verification. Website changes -run website checks. Provider workflow changes validate the workflow and run that provider's verifier. -Manual-provider/Android workflow changes run workflow validation only. -Shared process/contract/CLI boundaries, dependencies, packaging inputs, unknown -paths, and changes to the planner select the full baseline. Package script-only -edits select their owning verifier when its entrypoint is identifiable; unknown -or shared script changes select everything. Android build-script edits retain -the Linux suite and workflow validation; real Android verification stays manual. -Renames account for both paths. +verifiers and the Linux x64 installed-package/Inspector baseline. The `apple` +scope owns the Apple artifact lane; the `package` scope owns the multi-host +package matrix and the Windows curated lane, including Windows native controls, +Inspector, setup, configuration and packaging entrypoints. Runtime sources under +`src/` or `bridge/` without an owner, and the authored skill, run the Linux suite +and the Linux x64 installed-package/Inspector baseline only. Test-only changes +run the Linux suite without native package verification, except test files that +the Apple or Windows curated lanes invoke explicitly, which also select that +lane. Edits to verifier entrypoints run only by manual, licensed or self-hosted +workflows run static checks and the Linux suite. Website changes run website +checks. Provider workflow changes validate the workflow and run that provider's +verifier. Manual-provider/Android workflow changes run workflow validation only. +The four-version SQLite compatibility matrix has its own `sqlite` scope for +SQLite implementation, contracts, CLI/MCP registration, fixtures, and shared +runtime boundaries. SQLite and server-lifecycle test edits and the SQLite npm +scripts also select it. Unrelated code edits retain the complete portable suite +on the pinned Node version without starting four additional compatibility jobs. +Full qualification retains every SQLite version. +Shared process/contract/CLI boundaries, dependencies, other packaging inputs, +unknown paths, and changes to the planner select the full baseline. +CI timing collection, timing history, and test-report helper edits retain static +checks and the complete portable suite without selecting unrelated host/provider +lanes. Classification, qualification, gate, release receipt, and unknown CI +scripts keep the broad fallback. +Package script-only edits select their owning verifier when its entrypoint is +identifiable; unknown or shared script changes select everything. Android +build-script edits retain the Linux suite and workflow validation; real Android +verification stays manual. Renames account for both paths. -Main pushes and manual dispatch retain the full baseline, including all portable -provider lanes and the native matrix below. A `ci:full` PR label selects the full -baseline on the next PR run; manual dispatch can request it immediately. Each +This narrower selection trades PR-time coverage for runner capacity. A change to +unowned shared runtime code that fails only on arm64, macOS, Windows, the Apple +artifact lane, or a provider lane that does not own the file is not caught on +the PR; scheduled full qualification reports it after merge. Ownership globs do +not follow imports. Use the `ci:full` label when a change may have native-host +or provider effects outside its owners. + +Ordinary main pushes use the same owner scopes as PRs. Their diff starts at a +successful ancestor push run of this CI workflow, rather than the preceding +push: changes from failed or cancelled intermediate runs remain in scope. +Missing, untrusted, or non-ancestor history selects every lane. The lookup is +bounded to the last 100 successful push runs; lookup failures broaden selection. +Every code change still runs all six portable shards, without coverage +instrumentation in this fast tier. This deliberately avoids relying on an +import graph for generated files, filesystem inputs, subprocesses, or bridges. + +Scheduled qualification is admitted hourly at minute 23. A forced full run at +03:23 UTC refreshes runner and dependency drift every day. Other hourly runs +can reuse a successful full-qualification receipt for the exact source SHA +from the same repository's trusted CI workflow on its default branch. Both the +receipt and original workflow run must be less than 24 hours old, so retrying an +old gate cannot renew stale proof. Missing, expired, failed, foreign, or uncertain proof runs full +validation; API lookup failure also runs full. Lookups examine at most 100 named +receipts and three candidate runs within a 20-second budget. Reused runs select +no validation lanes, identify the original run, and produce no new receipt, so +reuse cannot indefinitely extend proof freshness. They make no fresh provider +observation. Manual dispatch, `ci:full`, and exact release qualification always +run full validation. + +Full qualification includes aggregate coverage, +every portable provider lane, and all native hosts below. Adding `ci:full` +immediately starts the separate `Full PR qualification` workflow against the +label event's merge revision; subsequent PR revisions also select the full tier +in normal CI while that label remains. Unrelated labels do not start validation +jobs or replace the main CI checks. Manual dispatch also requests full validation. +Fast-tier broad fallbacks retain all owner lanes and the three-host +package matrix; Intel macOS and coverage remain full-tier obligations. Each classification job records its selection and broad-fallback reasons in the run summary. Representative Git-diff cases live in `tests/boundary/filesystem/ciChangeScope.test.ts`. -`CI required` checks classification and every selected lane, rejecting failed, -cancelled, or unexpectedly skipped work. Existing required check names are -preserved; changing branch protection to require the new aggregate is a separate -repository-settings operation. Newer commits cancel superseded CI for the same -PR or main branch. Release publication has its own concurrency group and retains -its package verification and public-registry canary. Licensed/self-hosted +`CI required` always runs and checks classification and every selected lane, +rejecting failed, cancelled, or unexpectedly skipped work. It rejects missing or +unknown tiers and requires every canonical scope to be explicitly `true` or +`false`; incomplete classification cannot silently omit verification lanes. +Branch protection +should require this aggregate, `Static checks`, `Portable tests`, and +`Conventional PR title`. Title validation runs separately on PR opening, +reopening, commits, and edits; correcting a title refreshes only this lightweight +check. It reads title text through an environment variable, executes no PR code, +and has no token permissions. Its separate concurrency group cannot cancel +test runs. Fast PR runs cancel superseded feedback for the same PR. Main push +runs keep one active run and the latest pending run for that branch. +Scheduled/manual qualification has a separate concurrency group: active work +finishes and only the latest pending run is retained. Release qualification uses +its exact source SHA and cannot be cancelled by newer main pushes. Provider and +website lanes inherit their caller's scheduling; reusable +workflows have no independent cancellation group. Direct manual lane dispatches +run independently on disposable hosted runners. Publication +requires that qualification to succeed and consumes its exact verified tarball, +checking source SHA, workflow run, run attempt, package/Node version and SHA-256 +before npm publication. Earlier attempts from the same workflow run are accepted +when rerunning failed publisher jobs; future attempts and other runs are rejected. +The public-registry canary still verifies the published package. Licensed/self-hosted provider workflows and the Android smoke test retain their explicit triggers. CI exercises the pinned Node.js runtime on native hosted runners: -| Host | Runner | Baseline checks | -| --------------------- | ------------------ | ---------------------------------------------------------------------------------------- | -| Linux x64 | `ubuntu-latest` | Installed package and real Node Inspector CLI/MCP | -| Linux arm64 (aarch64) | `ubuntu-24.04-arm` | Installed package and real Node Inspector CLI/MCP | -| macOS 15 arm64 | `macos-15` | Installed package and real Node Inspector CLI/MCP | -| macOS 15 x64 | `macos-15-intel` | Installed package and real Node Inspector CLI/MCP | -| Windows x64 | `windows-latest` | Curated capabilities, native controls, installed package and real Node Inspector CLI/MCP | +| Host | Runner | Baseline checks | +| --------------------- | ------------------ | ------------------------------------------------------------------------------------------- | +| Linux x64 | `ubuntu-latest` | Installed package and real Node Inspector CLI/MCP | +| Linux arm64 (aarch64) | `ubuntu-24.04-arm` | Installed package and real Node Inspector CLI/MCP | +| macOS 15 arm64 | `macos-15` | Installed package and real Node Inspector CLI/MCP | +| macOS 15 x64 | `macos-15-intel` | Installed package and real Node Inspector CLI/MCP (hourly, dispatch, release and `ci:full`) | +| Windows x64 | `windows-latest` | Curated capabilities, native controls, installed package and real Node Inspector CLI/MCP | + +macOS x64 is the slowest package host. Ordinary PRs and main pushes omit it, +so darwin x64 installed-package and Inspector regressions surface in full +qualification. Schedule admission can be delayed by GitHub; the hourly trigger +does not guarantee an hourly completed result. Release publication waits for +its own complete result at the exact released revision. Package lanes assert the actual Node platform/architecture before verification -and record those values with the Node version. The four-host package matrix -runs up to four jobs concurrently on independent hosted runners with explicit +and record those values with the Node version. The package matrix runs up to +four jobs concurrently on independent hosted runners with explicit timeouts and per-runner Node heap/thread limits; Windows retains its curated capability lane. Package checks cover installation, CLI/MCP discovery, target-free analysis, configuration backups/recovery, Evidence and owned @@ -906,17 +963,34 @@ The Linux source-test shards download a shared runtime and generated test metadata snapshot produced by the build job with `npm run test:prepare`. The snapshot includes `dist/`, generated skills, the MCP tool catalog, product catalog, and managed-conformance metadata. Each shard still installs the locked -dependencies and runs its assigned coverage-enabled tests; it no longer +dependencies and runs its assigned tests; full qualification enables coverage. It no longer regenerates the same metadata independently. -The build job also retrieves the merged timing report from the last successful -default-branch push and includes that same report in each shard's snapshot. +The build job also finds an available `test-timings` artifact from a successful +trusted default-branch scheduled or manual qualification and includes that same +report in each shard's snapshot. The bounded lookup verifies the artifact's +producer; newer schedules that reuse qualification without producing timings do +not hide the last full run's artifact. CI assigns discovered files by historical duration, with a deterministic fallback weight for new files, rather than dividing only by file count. Every -discovered file still belongs to exactly one shard; worker limits, project -ordering, coverage instrumentation, and aggregate thresholds remain unchanged. +discovered file still belongs to exactly one shard; worker limits and project +ordering remain unchanged. The merge job rejects successful reports with missing, +unexpected, or duplicate portable files. Coverage instrumentation and aggregate +thresholds remain enforced in full qualification. Missing or unusable history falls back to Vitest's default assignment. Only -timing data is reused; persistent compile caches remain disabled. +timing data is reused; live provider results are never cached. Turbo outputs are +restored by task hash, with trusted default-branch runs as cache writers and PRs +as restore-only consumers. npm caches hold downloads, not `node_modules`. + +The eight automatic browser, binary-layout, EVM, JavaScript-recovery, +recorded-crash, and web provider lanes download `rea-build-cache` from their own +run after the build and static jobs succeed. Their existing build commands still +validate task hashes and rebuild mismatched inputs; provider observations always +run. Provider-workflow-only edits also admit the build without enabling source +test shards. Direct provider dispatches retain the cross-run restore-only cache. +This removes repeated compilation on fresh source revisions, but adds the build +as a prerequisite: a delayed build can delay provider admission. Compare queue +and execution times before claiming an end-to-end speedup. These native baseline checks complement the Linux source-test shards and the separate Apple-artifact and real-provider lanes. Actual Hopper, Ghidra, IDA, @@ -952,157 +1026,13 @@ establish passing Android coverage; inspect its execution receipt. The `termux-browser-diagnostics` artifact retains the Termux command log, exit status, and Android logcat on success or failure. The emulator is disposable. -## Developer commands +## Packet capture analysis -Use source feedback while editing, explicit boundary checks for the changed -behavior, and complete CI evidence before merging. - -| Command | Scope | -| --------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `npm run test:local` | Dirty source tests via the import graph, without build; explicit source paths run regardless of Git status | -| `npm run test:focused -- PATH...` | Exact existing test files; compiled boundaries build first, and unmatched paths fail | -| `npm run test:changed` | Source tests affected since the merge base with `origin/main`, including committed and dirty changes | -| `npm run test:fast` | All domain, service, adapter, composition, conformance, and evaluation tests without build | -| `npm run test:boundary` | Boundary, CLI boundary, MCP boundary, process boundary, and process-global projects | -| `npm run test:mcp` | MCP boundary project | -| `npm run test:acceptance` | Complete compiled CLI and MCP acceptance workflows | -| `npm run test:watch` | Dirty source tests in watch mode, without build | -| `npm run test:watch:all` | Changed tests from every project; builds at startup, so rebuild after production edits before relying on compiled tests | -| `npm run check:changed` | Cached typecheck/lint and branch-related source feedback | -| `npm run check:pr` | Opt-in complete local deterministic gate and generated-file checks | -| `npm run docs:check` | Generated-document validation from current source and build outputs | - -For example: - -```bash -npm run test:local -- src/config.test.ts -npm run test:focused -- tests/acceptance/applications/runtime.test.ts -npm run test:changed -- --base origin/main -npm run test:changed -- --dry-run -``` - -`test:focused` accepts exact repository-relative test file paths. Source-only -paths do not build; boundary, acceptance, process-global, or unfamiliar `tests/` -paths build conservatively. Tests use Vitest concurrency and isolated -workspaces; commands do not hold a broad test lock. Build and documentation -writers retain checkout-local locks for their shared output files. Explicit -selections do not use `--changed` or permit zero-test success. -The dry-run option reports the chosen merge base, scope and build prerequisite -without executing tests or building. A missing Git base reports how to fetch -it or select another revision. - -Source typechecking needs no compiled runtime or generated test metadata. -`npm run build:cached` compiles the CLI/MCP runtime and its packaged skill. -Turbo's strict task environment preserves caller-selected `GOMAXPROCS`, -`GOMEMLIMIT`, and `UV_THREADPOOL_SIZE` for resource-constrained builds and -checks. These execution controls do not change artifact content, so changing -their values retains cache reuse. They control individual runtimes; monitor -the complete process family separately when enforcing a total memory budget. -`npm run test:prepare` also generates the MCP contract test catalog, product -catalog, and portable managed evidence used by the complete suite. Focused -tests prepare those extra outputs only when their selected files consume them. -The MCP test catalog is JSON in `.cache/mcp-tool-catalog.json`; the tracked -test loader supplies its types without making generation a source-check -prerequisite. Run `npm run mcp-catalog:generate` to refresh it independently. -Documentation generation and managed conformance run through their separate -`docs:generate` and `evidence:generate` task graphs. - -Changed selection can miss runtime registration, generated data, shell -entrypoints, bridges, or other relationships absent from the import graph. -An empty changed selection means no tests were selected, not verified -correctness. Select relevant boundary files and real-provider lanes explicitly. -Source projects also contain large capacity regressions; `test:fast` promises -no compiled-runtime prerequisite, not a fixed time budget. - -Routine iterations and rebases need focused regressions and relevant checks. -Before handing off a PR, run `npm run check` and generated-document checks when -applicable; CI owns the full suite and coverage. Use the full local gate for -broad changes or diagnosing CI, rather than after every edit. Package/install -changes additionally need package verification; provider changes need actual -provider evidence. - -Vitest projects use up to two workers, bounded by host parallelism. -`process-boundary` runs later with serial files because process-tree sampling -shares host resources. Acceptance and process-global cases use isolated forks -without serial scheduling. Pure domain/service, composition, conformance, -evaluation, CLI boundary, and MCP boundary projects share module graphs. Their -tests avoid process-global state and keep resource cleanup test-scoped. Each -MCP session still owns its resources, and CLI cases retain fresh command -instances or subprocesses. CLI module mocks belong in `tests/process-global/` -so they keep per-file isolation. Product catalog verification stays with the -isolated filesystem boundary tests because it loads both source and compiled -module graphs. Adapter, other boundary, acceptance, and process-global projects -retain per-file isolation. See `vitest.config.ts` for current settings. - -The reused CLI boundary workers cap V8 old space at 384 MiB, based on their -profiled allocation and cleanup behavior. This encourages collection between -files; spawned REA processes retain their own heap settings. - -Vitest worker limits do not bound subprocesses launched within a test. Bound -those batches separately so repeated CLI validation cannot oversubscribe the -runner. Preserve simultaneous launches where concurrency is itself under test. - -Build/documentation writers hold checkout-local output locks. Tests do not -hold a broad command lock; `check:pr` finishes tests before document validation. - -Vitest's persistent compile cache remains disabled. The `cliTest` fixture shares -a temporary Node compile cache among its fresh CLI subprocesses. The worker -removes it after test-scoped processes finish. Explicit child environment -settings take precedence; children requesting `NODE_V8_COVERAGE` do not receive -the fixture cache. These subprocesses are outside aggregate Vitest coverage; -subprocess coverage attachment remains disabled. Cold-start import checks launch -independently without this fixture cache. - -The Apple artifact verifier step shares a job-temporary bytecode cache among -its fresh CLI/MCP children via `REA_ARTIFACT_NODE_COMPILE_CACHE`. The artifact -helper maps this setting to child `NODE_COMPILE_CACHE`; npm, Turbo, and nested -Vitest runs do not inherit that setting. Explicit `NODE_COMPILE_CACHE` takes -precedence, and coverage collection or `NODE_DISABLE_COMPILE_CACHE=1` disables -the helper's cache. The cache is discarded with the CI job. - -To evaluate persistent compile caching for repeated local runs, opt in for both -cold and warm measurements with an isolated cache: - -```bash -NODE_COMPILE_CACHE=.cache/node-compile npm test -``` - -Do not report the warm result as a cold-suite improvement, and do not enable -the cache in coverage or benchmark CI without first showing that its -instrumentation remains equivalent. - -## Coverage and timing - -CI owns coverage; aggregate and domain/contract thresholds are maintained in -`vitest.config.ts`. They are glob-specific and never updated automatically. -Coverage does not replace named boundary or real-provider scenarios. - -CI runs four native Vitest shards without retries. Each shard emits a blob -report; the merge job produces aggregate coverage plus JUnit and JSON timing -reports, uploads them together, and writes the slowest files to the workflow -summary. Static checks, documentation, build, package verification, and -real-system lanes remain separate jobs so one kind of evidence cannot stand in -for another. - -The build job saves portable Turbo outputs across runs. Eight Linux real-system -lanes restore this cache without waiting for the build job. The shared action -derives its key from `test:prepare --dry=json` task hashes, runner OS and -architecture, and `.npmrc`; test-only changes can reuse compiled outputs. Every -build and verification command still runs, so Turbo checks task inputs and -rebuilds misses. There is no prefix fallback to accumulate older build outputs. - -Native package jobs reuse the same workflow's Turbo cache for portable compiled -JavaScript, skills, and catalogs. They retain the normal build and prepack -commands, which restore matching outputs or rebuild on a cache miss. Native -artifacts, dependency installs, package archives, and runtime verification remain -host-local. Keep platform-dependent outputs out of this shared cache. - -The PR acceptance target is a median `npm run check:pr` wall time below three -minutes across three warm-build runs on the benchmark host. Keep Vitest caches -cold unless separately identified. A PR that touches packaging or real-system -behavior requires the applicable `verify:*` lanes; packaging and installation -changes also require `npm run verify:package`. The full-gate benchmark measures -that explicit lane, not the routine iteration requirement. +`npm run verify:pcap -- --pcap PATH` exercises caller-supplied tshark and +capinfos against a saved capture. Linux verification uses Wireshark 4.6.6 +and captures containing DNS, TLS and HTTP traffic. Native Windows and macOS +engine behavior remains unverified; process fixtures do not establish it. +See [Packet capture analysis](pcap-analysis.md) for contracts and budgets. ## Apple native metadata and UI @@ -1245,7 +1175,8 @@ first argument to verify packaging independently of the checkout. The valid SHN_XINDEX fixture has 65,281 full section rows; CLI is checked in the ordinary lane. Its large MCP transfer is opt-in with `REA_VERIFY_LARGE_ELF_MCP=1` (or the workflow dispatch `large_mcp` input), an -explicit 256 MiB SDK receive buffer and five-minute request timeout. Ordinary +explicit 256 MiB SDK receive buffer, matching server `REA_MCP_MAX_RESPONSE_BYTES`, +and five-minute request timeout. Ordinary MCP fixtures retain the pinned SDK defaults. ### Offline EVM interface @@ -1282,115 +1213,24 @@ installed package entrypoint as the script's first argument for package coverage ## Agent evaluation and conformance records -Evaluate native, JavaScript, managed and browser investigation tasks through a -real local Codex CLI with: +`npm run verify:agent` evaluates investigation scenarios through a real local +Codex CLI. The lane runs sequentially; select scenarios with +`REA_AGENT_EVAL_SCENARIOS` and choose the installed client/model with +`REA_CODEX_CLI` and `REA_AGENT_EVAL_MODEL`. The detailed +[agent evaluation reference](client-verification.md#agent-evaluation-and-conformance-records) +contains isolation, authentication cleanup, grading, and conformance boundaries. -```bash -npm run verify:agent -``` +## Frida instrumentation -The lane runs scenarios sequentially in standalone Codex (`--no-daemon`) with a -disposable HOME and CODEX_HOME under `~/.cache/rea-agent-evaluations/`. Set -`REA_AGENT_EVAL_ROOT` to choose another parent directory outside the OS temporary -directory: current Codex refuses helper aliases under `/tmp`, preventing shell -commands and skill reads even if MCP works. Each owned run directory is removed -after verification unless fixture retention is requested. The lane -installs the packaged skill and MCP registration through public `rea setup`, -rather than copying a skill into a project that also inherits the caller's -skills and configuration. Only authentication is copied, when present, and it -is removed even with `REA_AGENT_EVAL_KEEP_FIXTURES=true`. No user configuration, -rules, plugins or history is copied; shell snapshots and additional agents are -disabled. Existing API-key environment authentication remains available. -The native missing-provider scenario preapproves only `open_binary` and -`close_binary` in the disposable client so it reaches REA's actual provider -boundary instead of stopping at Codex approval. This does not validate a real -native engine or authorize arbitrary runtime execution. - -Select a smaller run with `REA_AGENT_EVAL_SCENARIOS`, a comma-separated list of -scenario IDs. `asar-zh` exercises the packaged desktop rubric from a Chinese -request. `javascript-module-view` exercises summary analysis, module paging and -item inspection in a tree with unrelated modules; its routing and text checks -remain heuristic, so review the retained transcript for selector choice and -coverage claims. Set `REA_CODEX_CLI` to an installed Codex executable and -`REA_AGENT_EVAL_MODEL` to an account-supported model. Use an external resource -limit for the whole process tree when testing on a constrained host; a Node -heap limit alone does not bound client and child-process memory. - -`missing-target` leaves desktop fixtures visible without selecting one in the -request. It requires zero REA calls and a structured request for an app name or -artifact path. Its `expectedFirstTool` is `null`, and -`targetClarificationPassed` grades that limited routing outcome independently -of analysis prose heuristics. Analyzing a nearby example cannot pass this case. - -The packaged desktop and parser-comparison scenarios now assess a closed set of -known fixture claims. Each final answer must be a strict JSON manifest containing -exactly the requested claim IDs, values, Evidence IDs, and Evidence authority and -confidence. Golden values are not included in the prompt. The evaluator checks -exact values against both the fixture oracle and authenticated successful REA -results; an Evidence ID by itself is insufficient. Missing, duplicate, extra, -contradictory, incorrectly sourced, or unsupported claims fail the scenario. - -The desktop rubric covers the exposed bridge API and members, renderer and main -IPC operations, and the resolved preload. It binds its Evidence to the exact -packaged artifact path and SHA-256. The parser rubric checks the precise heading -depth addition, discriminant, complete comparison counts, and the explicit limit -on runtime semantics. Its comparison must link to the two delivered source -analyses and use the requested module and export selectors. Boundary tests package -the same source-owned desktop fixture and compare the same source-owned parser -files through actual MCP tool results, then verify that fabricated answers fail. - -Per-scenario `factualCorrectness` is `passed`, `failed`, or `not_assessed` within -the `configured_fixture_claims` scope. A pass establishes only the configured -claims, not unrestricted factual correctness. Native, managed, browser, -navigation-context, and address-context scenarios have no factual rubric and -remain `not_assessed`; the managed workflow requires both artifact and member -inspection to answer its type and entry-point question. - -The closed factual scenarios request complete producer Evidence on the initial -analysis so their source selectors can authenticate all configured facts. -Summary/page/item workflows are exercised separately by `javascript-module-view`; -its heuristic gate does not establish full-producer factual correctness. - -All scenarios retain routing, workflow, validation, repetition, process-exit, -and token-use gates. Configured factual scenarios additionally require a factual -pass. Their answer-text heuristics are diagnostic and do not affect the gate. -Validation counts include complete text-only REA `invalid_request` envelopes -and failed SDK calls whose arguments violate the named current REA contract. -Client approval rejections and provider unavailability remain distinct failures; -truncated JSON previews are not parsed into invented error codes. -Repeated `binary_session` observations separated by a successful `open_binary` -or `close_binary` are treated as lifecycle verification. An unchanged retry, -including one after a failed lifecycle call, still counts as repetition. -Scenarios without a rubric retain the legacy text-heuristic gate. -`answerTermCoverageMet` checks case-insensitive substrings, -`epistemicCuePresent` checks keywords, and `finalCitesEvidence` checks only an ID's -presence. These metrics can still accept fabricated prose and must not be read -as factual assessments. Set `REA_AGENT_EVAL_TRANSCRIPT_DIR` to retain complete -tool results and final answers for review. - -Report schema version 4 adds negative routing scenarios with nullable -`expectedFirstTool` and a `targetClarificationPassed` outcome. Consumers must -allow an expected absence of REA calls; this does not make an analysis scenario -pass without its required tools. Version 3 changed the top-level -`factualCorrectness` from a constant -string to an assessment summary with status, scope, and assessed/passed/failed/ -not-assessed scenario counts. Scenario records include the factual assessment and -configured claim IDs. The evaluation scope is -`routing_workflow_and_configured_fixture_claims`. Update report consumers for -these changes. The narrower heuristic field names introduced in version 2 remain: -`answerHeuristicsMet`, `epistemicCuePresent`, `answerTermCoverageMet`, and -`requiredAnswerTermGroups`. - -Regenerate the managed conformance manifest and Evidence completion ledger from -live verification results, or check them for drift: - -```bash -npm run evidence:generate -npm run evidence:check -``` - -The records preserve unsupported and unverified coverage as explicit unknowns. -Run the matching real-tool prerequisites described in this guide. +`npm run verify:frida` builds REA, spawns a short-lived local Node.js fixture, +loads a harmless marker script before resuming it, captures the message, and +detaches. This lane requires Linux on the REA host and the optional Frida +binding; it does not need a Frida server or a caller-selected process. To run +the separate remote attach lane, pass `-- --address HOST:PORT --pid PID` for an +explicitly selected process. Optional remote flags are `--token`, +`--certificate`, `--origin`, and `--keepalive-interval` (seconds); authentication values +are not written to files or included in the report. Mock tests do not establish +real device/server compatibility. ### Offline WASM artifacts diff --git a/docs/tool-design.md b/docs/tool-design.md index a4dd155f0..6117ff6d0 100644 --- a/docs/tool-design.md +++ b/docs/tool-design.md @@ -48,10 +48,12 @@ satisfy. A plan without execution does not establish runtime behavior. - Use strict inputs with explicit target identity and required fields. Preserve meaningful target, action, capture, and output choices; remove ignored options and repeated permission declarations. -- Return complete evidence inline, with artifact/provider identity, source - locations, Evidence references, and relevant confidence and limitations. - Missing coverage is unknown, not absence. Avoid extra lookups solely to - understand the answer or its provenance. +- Return the requested facts inline with artifact/provider identity, source + locations, Evidence references, coverage, and relevant confidence and + limitations. Use supported selection, summaries or views when they answer + the question; preserve access to complete source Evidence and honor existing + contracts and requested detail. Missing coverage is unknown, not absence. + Avoid extra lookups solely to understand the answer or its provenance. - Keep observed, derived, and inferred relationships distinct. Preserve unresolved edges and partial provider facts instead of requiring every provider to supply the same metadata. diff --git a/docs/user-visible-errors.csv b/docs/user-visible-errors.csv index f4934b80b..a9dd0d05d 100644 --- a/docs/user-visible-errors.csv +++ b/docs/user-visible-errors.csv @@ -86,8 +86,22 @@ harm_rank,location,trigger,current_copy,user_risk,proposed_replacement,implement 77,install.sh:node missing,node is absent,"Node.js 22.x (>=22.19), 24.x (>=24.11), or 26+ is required; install it from nodejs.org and retry.",Low risk; exact versions and recovery,Keep current copy,unchanged,verified by shell branch inspection 78,install.sh:npm missing,npm is absent,npm is required; install it with Node.js and retry.,Low risk; exact recovery,Keep current copy,unchanged,verified by shell branch inspection 79,install.sh:node unreadable,node exists but does not report a parseable version,could not determine the active Node.js version.,No cause-local recovery,"The active Node.js version could not be read. Check that node works and is on PATH, then retry.",implemented,verified by exact unreadable-Node-version installer test -80,install.sh:Node 22 floor,Node 22 minor version is below 19,"Node.js VERSION is unsupported; use Node.js 22.x (>=22.19), 24.x (>=24.11), or 26+.",Low risk; exact detected version and supported alternatives,Keep current copy,unchanged,verified by exact installer test using Node 20 and branch inspection -81,install.sh:Node 24 floor,Node 24 minor version is below 11,"Node.js VERSION is unsupported; use Node.js 22.x (>=22.19), 24.x (>=24.11), or 26+.",Low risk; exact detected version and floor,Keep current copy,unchanged,verified by shell branch inspection +80,install.sh:Node 22 floor,Node 22 minor version is below 19,"Node.js VERSION is unsupported; use Node.js 22.x (>=22.19), 24.x (>=24.11), or 26+.",No install guidance; operator must guess between nvm/fnm/system packages/nodejs.org,"Node.js VERSION is unsupported. + +REA requires Node.js 22.x (>=22.19), 24.x (>=24.11), or 26+. Install one via: + nvm: nvm install 24 && nvm use 24 (https://github.com/nvm-sh/nvm) + fnm: fnm install 24 && fnm use 24 (https://github.com/Schniz/fnm) + Direct download for OS/ARCH: + https://nodejs.org/dist/latest-v24.x/ (grab the OS-ARCH tarball) +Then rerun this installer.",implemented,verified by exact installer test using Node 20 against the `linux/x64` fake host and by shell branch inspection +81,install.sh:Node 24 floor,Node 24 minor version is below 11,"Node.js VERSION is unsupported; use Node.js 22.x (>=22.19), 24.x (>=24.11), or 26+.",No install guidance; operator must guess between nvm/fnm/system packages/nodejs.org,"Node.js VERSION is unsupported. + +REA requires Node.js 22.x (>=22.19), 24.x (>=24.11), or 26+. Install one via: + nvm: nvm install 24 && nvm use 24 (https://github.com/nvm-sh/nvm) + fnm: fnm install 24 && fnm use 24 (https://github.com/Schniz/fnm) + Direct download for OS/ARCH: + https://nodejs.org/dist/latest-v24.x/ (grab the OS-ARCH tarball) +Then rerun this installer.",implemented,verified by shell branch inspection 82,install.sh:version syntax,Explicit version is not exact semantic version,version must be an exact semantic version.,Low risk; exact correction,Keep current copy,unchanged,verified by shell branch inspection 83,install.sh:release lookup,Latest GitHub release request fails,could not resolve the latest GitHub release.,No fallback despite supporting pinned versions,"The latest REA release could not be resolved. Check network access or pass --version VERSION, then retry.",implemented,verified by exact release-lookup installer test 84,install.sh:release response,Latest release response is not valid expected JSON,Node JSON parser stack followed by the safe release-response message,Leaks a parser stack and buries recovery guidance,The release response was invalid. Retry later or pass --version VERSION.,implemented,verified by exact malformed-release test with parser stderr suppressed diff --git a/docs/wasm-artifacts.md b/docs/wasm-artifacts.md index 21e2735a0..6bc7c23ce 100644 --- a/docs/wasm-artifacts.md +++ b/docs/wasm-artifacts.md @@ -77,5 +77,5 @@ Candidates are caller-selected files; their identity does not imply validation. Both CLI and MCP use the same typed port and application service. MCP publishes SDK-compatible schemas and records Evidence for `get_evidence_bundle` readback. -See [WABT provenance](../third_party/wabt/README.md) and +See [WABT provenance](https://github.com/morluto/rea/blob/main/third_party/wabt/README.md) and [testing](testing.md#offline-wasm-artifacts) for real-tool verification. diff --git a/docs/web-network-captures.md b/docs/web-network-captures.md index d49f1dcc3..c447c4783 100644 --- a/docs/web-network-captures.md +++ b/docs/web-network-captures.md @@ -25,6 +25,36 @@ and original zero-based producer ordinals; duplicate or out-of-range selections are input errors. Every record is validated before selection, so selecting one entry does not hide a malformed entry elsewhere. +For agent discovery over MCP, request `detail: "summary"`. REA retains the +complete selected Evidence in the session and returns identity and counts. +Use `normalized_result.parent_evidence_id` with `inspect_analysis_view`: + +```json +{ + "source": { + "kind": "retained-evidence", + "evidence_id": "" + }, + "view": { "kind": "capture", "detail": "preview", "offset": 0, "limit": 20 } +} +``` + +Preview pages select recorded HTTP headline fields, event names/times when +present, original locations and byte descriptors; they omit headers, XML and +payload content. Choose `detail: "complete"` in that view for exact record +pages, including all sidecars. Offsets follow the parent's selected record +order; producer ordinals remain unchanged. `total_records` counts the original +capture while `retained_records` and page coverage count records in the parent. +An exhausted page does not establish absence from unselected records. + +Views do not reopen the file or rerun its decoder. They remain historical +Evidence if the source changes or disappears; inspect the capture again to +observe new bytes. The inspection tool's default `detail: "complete"` preserves +existing inline delivery. For CLI use, save complete inspection JSON and pass +it as inline Evidence to `inspect-analysis-view`; the same summary and capture +page contracts apply. Large complete records can still exceed MCP's response +budget; export the retained Evidence when a single record cannot fit. + ## Formats and upstream profiles HAR uses unchanged `har-schema@2.0.0` draft-06 schemas, `ajv@8.20.0`, @@ -57,11 +87,80 @@ tested upstream source is tag `v12.2.3`, commit an explicit unsupported-profile diagnostic. Non-Linux native decoding is not supported by this adapter. +## Reading Fiddler captures (`.saz`) + +Fiddler Everywhere saves traffic in **Session Archive Zip (`.saz`)** files. +Inspect native SAZ directly, without installing Fiddler or converting to HAR: + +```sh +rea inspect-web-network-capture /absolute/session.saz saz --json +rea inspect-web-network-capture /absolute/session.saz saz --record 0 --json +``` + +MCP uses the same `capture_path`, `format: "saz"`, and optional +`record_ordinals` fields as the examples above. REA pairs `raw/_c.txt` +requests, `_s.txt` responses, and `_m.xml` metadata by filename stem. Archive +member names identify the source; zero-based ordinals follow each session's +first member in ZIP directory order, not its numeric ID or capture time. + +HTTP fields and ordered duplicate headers are retained, with stored body bytes +in binary sidecars. Bodies are not dechunked or decompressed. Metadata is an +XML node tree; optional `_w.txt` and `_g.txt` files retain opaque WebSocket and +gRPC message bytes. Missing members remain null, distinct from empty bodies. +See Telerik's [SAZ format reference](https://www.telerik.com/fiddler/fiddler-everywhere/documentation/knowledge-base/fiddler-archives). + +The existing ZIP reader verifies read members; expanded archive contents are +limited to 32 MiB in addition to the input/output budgets below. Encrypted +archives and unrecognized raw session members are unsupported. SAZ requires an +enforced decoder memory bound: Node's fixed heap, or the Windows Job Object +commit limit. Bun on hosts without that Job Object limit returns capability +unavailable before starting the SAZ decoder. Non-session +members are inventoried without decoding their content. Original files remain +unchanged. Linux verification includes independently checked public recorded +Mattermost captures from [FOREST](https://github.com/dfrc-korea/FOREST/tree/405c9154658a128ea203a6c10040cec55111ed03/api-results/dataset) +and the Fiddler author's [encoding corpus](https://github.com/ericlaw1979/Clearinet/blob/b6faf78cde1e72042980364f180ceb34b77d1434/Test/data/Encodings.saz), +plus synthetic malformed/limit fixtures. Their exporting product versions are +not authenticated. An interactive export from a current Fiddler Everywhere +installation and its live MCP server remain unverified. Support here is the +bounded documented raw HTTP/XML SAZ layout, not every product/version profile. + +For visual inspection, use Everywhere's **Import Snapshot**, then **Inspectors** +and **Overview**. HAR remains an alternative: select sessions, choose +**Export > HTTPArchive**, and confirm `log.version` is `"1.2"`. Preserve the +original SAZ when exporting. See the [import/export instructions](https://www.telerik.com/fiddler/fiddler-everywhere/documentation/collaboration/exporting-and-importing). + +## Fiddler Everywhere MCP and public skills + +For agent-driven traffic debugging, connect Everywhere's MCP server separately +from REA. Run a current Everywhere release with MCP access (Trial, Pro, or +higher), internet access, and a compatible MCP client. Use +**Settings > MCP Server > Coding agent**, or **Manual setup** with the generated +API key. The default endpoint is `http://localhost:8868/mcp`. See Telerik's +[MCP setup guide](https://www.telerik.com/fiddler/fiddler-everywhere/documentation/agent-tools/fiddler-mcp-server) +and [agent-skills prerequisites](https://www.telerik.com/fiddler/fiddler-everywhere/documentation/agent-tools/agent-skills). + +Telerik's [public skills](https://github.com/telerik/fiddler-agent-tools) cover +installation (`fiddler-download-setup`), connection setup, and traffic analysis: + +```sh +npx skills add telerik/fiddler-agent-tools --skill fiddler-mcp-setup +npx skills add telerik/fiddler-agent-tools --skill fiddler-traffic-debugging +``` + +After setup, reload the agent client and use the connected server's advertised +tool names and schemas. Check status, list sessions, then inspect relevant +session IDs. Set `sessionsSource` to `LiveTraffic` for HTTP(S) traffic or +`AgentCalls` for enriched LLM calls; active filters affect the session list. +For an existing run, skip the skill's pre-capture steps that replace process +filters and clear sessions. The documented MCP session sources do not provide +a saved-snapshot selector; use the SAZ workflow above for saved files. REA does +not register or wrap the Fiddler MCP server. + ## Reading the evidence - `artifact` identifies the caller-selected file and stable snapshot digest. -- `records` preserve producer order/ordinals and original JSON pointers or byte - ranges. No live browser transaction or scenario IDs are invented. +- `records` preserve producer order/ordinals and original JSON pointers, byte + ranges, or SAZ member names. No live browser transaction or scenario IDs are invented. - `reported` retains the producer's fields. HAR container metadata is returned separately, with `log.entries` replaced by `null` and `records_pointer` identifying the record collection. This is an inspection representation, @@ -156,7 +255,7 @@ response fields, including HAR's `status: 0` and an empty `mimeType`, remain unknown, not invented statuses or MIME types. The view makes no handler-identity, schema or causality claim. It performs no -network activity. Native mitmproxy captures return a typed unsupported error. +network activity. Native mitmproxy, SAZ and qlog captures return a typed unsupported error. Parents inspected with `sensitive_values`, or whose Evidence does not record `sensitive_value_count`, return a typed unsupported error whose reason is the canonical token `sensitive_values_unretained`. The view would write path @@ -192,14 +291,15 @@ Complete evidence has a 32 MiB input, 96 MiB decoder reply and 64-level nesting budget. Exceeding a budget returns no partial success. Oversized selected captures return an input error identifying `capture_path` and the byte budget; owned reply/output failures remain output or provider errors. -HAR runs in an owned -192 MiB Node old-generation heap with one V8 worker. Native decoding applies +HAR, SAZ and qlog run in an owned +192 MiB Node old-generation heap with one V8 worker. Mitmproxy decoding applies Linux limits of 768 MiB address space, 30 seconds CPU and 96 MiB file output; both commands have a 30-second wall deadline and independently supervised process cleanup. Owned decoder diagnostics retain at most 1 MiB across stdout and stderr; the collector drops overflow as it arrives, reports the limit failure and verifies cleanup. Heap limits alone do not establish aggregate RSS limits. -When REA runs on Bun, the HAR decoder runs on Bun, which ignores these V8 heap +SAZ and qlog refuse decoding when neither a Node heap limit nor a Windows Job Object bound can be enforced. Existing HAR availability is preserved. +When REA runs on Bun, the HAR/SAZ/qlog decoder runs on Bun, which ignores these V8 heap flags; its limitations and resource failures then omit the heap sizes. On Windows, the decoder's owned Job Object instead limits its committed memory to 704 MiB, the 192 MiB budget plus a 512 MiB reserve for Bun itself. The @@ -207,7 +307,7 @@ limitations state that limit, and reaching it returns `resource_constraint` with `process_memory_limit_bytes`, whatever exit status Bun reports. Observed decoder memory exhaustion returns `resource_constraint`, with the -selected capture, applicable limits and retained process diagnostics. HAR's +selected capture, applicable limits and retained process diagnostics. HAR/SAZ/qlog's old-generation heap is fixed; inherited `NODE_OPTIONS` cannot raise it. Record selection happens after complete decoding and does not reduce that workload. Use a smaller capture exported by its producer or another decoder @@ -234,3 +334,108 @@ Command cleanup failures retain the original status and both diagnostic streams; the decoder's ownership preparation receives the same cancellation signal. MCP advertises the same strict named input contract used by the application. Historical inspection delegates argument validation to that shared application boundary so accepted explicit-sensitive declarations also cover invalid argument names and other correction details. The SDK receives raw arguments through its Standard Schema interface; malformed inputs still fail before decoder or filesystem effects and return the normal structured REA error. Protocol-envelope validation remains owned by MCP. + +## Retained aioquic qlog + +Select `format: "qlog"` through `inspect_web_network_capture`, or: + +```bash +rea inspect-web-network-capture /absolute/origin.qlog qlog --json +rea inspect-web-network-capture /absolute/origin.qlog qlog --record 95 --record 0 --json +``` + +The initial profile is **aioquic 1.5.0, JSON qlog 0.3**: one JSON object with +`qlog_format: "JSON"`, `qlog_version: "0.3"`, `traces` containing object events +with `name`, finite numeric `time` and object `data`. JSON-SEQ, JSONL, columnar +array events and other versions are unsupported. Duplicate JSON members, +malformed UTF-8, invalid interpreted QUIC integers and excessive nesting fail +without partial success, including in events outside the selected ordinals. +Well-formed event subsets and missing frame metadata remain inspectable. +Unknown extensions are retained; this is not validation of every qlog schema. + +Choosing the format selects the interpretation profile; the file does not +necessarily report or authenticate an aioquic version. The profile's clock +uses Unix-epoch milliseconds, verified in aioquic 1.5.0's `QuicLoggerTrace` +`log_event`/`encode_time`. The `qlog.clock.basis` and Evidence analysis profile +state that assumption explicitly. Numeric lexemes survive independently of +safe JSON-number projections; decimal spelling does not establish physical +clock precision or monotonicity. + +Every event has a global ordinal from trace/event source traversal and its +original `/traces/T/events/E` pointer. This order is not a global time sort. +Trace index and the selected artifact identify a connection observation; +reported ODCID is preserved without claiming global uniqueness. Streams are +scoped by trace, stream ID and sent/received direction. Control/QPACK streams +are retained, so counting streams does not count HTTP requests. + +`qlog` is a typed facet required exactly for this format. Its scope is +`all-recorded-events-before-selection`: selection changes returned event +records while facts cite the original ordinals across the entire recorded +file. The container retains trace metadata with each events array replaced +by null; there is no single events pointer shared by all traces. + +| Fact | Basis and limits | +| ----------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Original event and loss declaration | Observed endpoint report; `recovery:packet_lost` does not prove actual network loss. Missing packet number/type remains unknown. | +| STREAM ranges and byte totals | Derived per trace and direction from reported offsets and lengths using exact integer arithmetic. `unique_bytes` unions intervals; `frame_length_sum` includes overlaps; `repeated_bytes` is their difference. Overlap alone does not prove retransmission or equal contents. | +| FIN final sizes | Reported offset plus length where FIN is true; multiple conflicting sizes remain visible. A final size does not establish complete coverage or a received body. | +| Incomplete fact records | Ordinals with omitted/redacted interpretable frame metadata; usable fields in other records survive. An empty list does not establish complete logging or capture. | +| HTTP bodies and causality | `body_bytes: "not-reported"`; lengths and headers are metadata, with no reconstructed body, hash, timing causality or live process attribution. | + +QUIC integer fields interpreted here accept exact nonnegative JSON integer +values through `2^62 - 1`, including equivalent exponent notation. Offsets plus +lengths must fit that range. Derived sums are decimal strings and are not +rounded to JavaScript numbers. A missing offset is unknown, never defaulted to +zero. Ranges can start above zero or contain gaps. Packet headers, HTTP events, +raw lengths and unknown extensions remain producer evidence rather than being +normalized into invented HAR requests. + +The adapter excludes authorization/proxy authorization/cookie/set-cookie +values in known HTTP frame events, reset tokens in transport parameters and +NEW_CONNECTION_ID frames, and NEW_TOKEN frame tokens. Known URL header userinfo +and explicit sensitive values follow the shared exclusions. Ordinary extension +fields and token-looking query text remain retained. Explicit declarations also +cover normalized numeric projections, derived totals and trace pointers; facts +that cannot be safely shown are omitted with incomplete-record coordinates. +No keylog, PCAP, live URL or recorded target is opened by the qlog decoder. + +To repeat the real-provider lane with **local caller-supplied evidence** from +the educational aioquic 1.5.0 experiment (one origin trace, known 32,803-byte +stream coverage and one 1,169-byte repeated range in the loss case): + +```bash +npm run verify:web:qlog -- /absolute/control/origin.qlog /absolute/loss/origin.qlog /absolute/new-report.json +``` + +This lane checks built CLI/stdio MCP parity, SDK-converted JSON Schemas, +artifact digests, original event count, selection scope, retained parent lookup, +credential exclusions and the known control/loss facts. The report is created +exclusively and contains no keys or captured credential values. It is a +fixture-specific verification, not a general loss detector. CI uses synthetic +format inputs for malformed cases and limits; those tests do not establish +producer provenance. PCAP parsing and correlation remain outside this stage. + +### Focused qlog views + +Use MCP `inspect_web_network_capture` with `format: "qlog", detail: "summary"` +for identity, profile, scope and retained-fact counts. Then pass its +`normalized_result.parent_evidence_id` to `inspect_analysis_view` as a +`retained-evidence` source. + +```json +{"kind":"qlog","facet":"traces","offset":0,"limit":10} +{"kind":"qlog","facet":"streams","trace_index":0,"offset":0,"limit":10} +{"kind":"qlog","facet":"contributions","trace_index":0,"stream_id":"0","direction":"sent","offset":0,"limit":20} +``` + +Trace pages omit nested lists and give their counts. Stream pages preserve +exact byte totals but omit contributions, ranges and final-size lists. For +those lists select `contributions`, `ranges` or `final-sizes` with all three +stream selectors. `loss-declarations` and `incomplete-records` need only +`trace_index`. Offsets count rows in that retained facet; defaults are 0 and 64. Missing or ambiguous selectors fail rather than choosing a connection. + +These views page already interpreted facts without decoding again or opening +the source, and work after its deletion. Facts still cover all recorded events +before parent record selection. Their exhaustion does not prove logging or +network completeness. Event preview/complete pages remain available through +kind `capture`, with original numeric lexemes and producer ordinals preserved. diff --git a/docs/website-script-export.md b/docs/website-script-export.md index 31ffaff45..1af4ad295 100644 --- a/docs/website-script-export.md +++ b/docs/website-script-export.md @@ -48,9 +48,14 @@ its own descriptor. It does not duplicate script bytes. - Passive sources are the Debugger-exposed text encoded as UTF-8, with the verified source digest and source-map declaration retained. Unavailable or explicitly non-JavaScript sources remain unavailable. -- Scenario sources use observed requests classified as `script`, matched to - completed response bytes by transaction and event identity. URLs never select - the response. Binary and empty retained bytes are written exactly. +- Scenario sources use observed requests classified as `script`, associated + with one response event and the bytes returned by Playwright's + `Response.body()` API for its response object. URLs never select the response. + Playwright may load the request URL again with credentials when CDP has no + response body, so transaction and event references do not verify that + exported bytes came from the original network transaction. The capture and + export manifest retain this limitation. Binary and empty retained bytes are + written exactly. - Ordinary query-free `.js`, `.mjs`, and `.cjs` URL paths are arranged under a directory for each origin, preserving their relative module layout when it is unambiguous. @@ -62,8 +67,9 @@ its own descriptor. It does not duplicate script bytes. ## Interpretation and limits Export does not fetch URLs or execute JavaScript. Retained Debugger sources and -response bytes do not establish execution or a complete website. Response bytes -are browser-decoded bytes; they do not represent transfer encoding. Declared +response bytes do not establish execution or a complete website. Scenario +response bytes preserve Playwright's body API result; see the source-body +identity limitation above. Declared redaction is preserved and can change JavaScript syntax; passive captures do not report a byte-redaction flag, so that value remains unknown. diff --git a/docs/windows-ghidra-p0.md b/docs/windows-ghidra-p0.md index 7d72056f6..9cd3bb6d8 100644 --- a/docs/windows-ghidra-p0.md +++ b/docs/windows-ghidra-p0.md @@ -21,8 +21,10 @@ additional permission flag or degraded mode is required. - the 25 read-only Ghidra inventory, memory, and function-analysis operations. Loaded memory reads and file offsets preserve Ghidra's observed source mappings. -PE load-image inspection returns an explicit unsupported attestation status; -independent load-image verification currently supports DOS MZ only. For x64 PE +PE load-image inspection returns an explicit unsupported attestation status. +Independent verification covers admitted DOS MZ, explicit COM, and explicit +[raw-binary imports](raw-binary.md) on their supported hosts. This does not +extend Windows P0 admission beyond native PE. For x64 PE NativeAOT RTR 9.1, the read-only snapshot parser can report metadata through `inspect_native_load_image` and `inspect_native_data_type` without a JAR or database mutation. A real Windows-host NativeAOT Ghidra run is still required @@ -151,8 +153,12 @@ the private runtime, isolating Ghidra preferences, logs, and caches. Process creation assigns a suspended child atomically to an owned Job Object. Membership and kill-on-owner-close policy are verified before resume. Breakaway is disabled. Only the child's default file owner is normalized; -the caller token stays unchanged. Caller CPU affinity and priority are -preserved. Close, cancellation, timeout, startup failure, and provider failure +the caller token stays unchanged. Caller priority is preserved, and caller CPU +affinity whenever the caller and the child share a processor group. A child that +Windows places in another group keeps that group's default when the caller asked +for no bound of its own; a caller pinned to fewer processors than its group +holds is refused there rather than widened. +Close, cancellation, timeout, startup failure, and provider failure terminate the job and verify all members have settled before runtime cleanup. Cleanup removes admitted objects by handle and unlinks reparse entries without following their targets. Abrupt owner death kills the job but can leave diff --git a/experiments/analysis-efficiency/README.md b/experiments/analysis-efficiency/README.md new file mode 100644 index 000000000..5f656a02c --- /dev/null +++ b/experiments/analysis-efficiency/README.md @@ -0,0 +1,597 @@ +# Analysis efficiency measurements + +Tracks the experiments for [#2016](https://github.com/morluto/rea/issues/2016). +The production CLI/MCP contracts and defaults remain the compatibility baseline. +Downloaded artifacts, runtime copies, exported Evidence, transcripts and detailed +JSON measurements belong outside the checkout. This document keeps the measured +findings, verification scope and revision references; the scripts and `corpus.json` +keep the reproduction inputs. Generated `results/` is ignored. + +Follow-up: [latest-main capability audit](latest-main-audit.md) records the +Flutter, SQLite, TShark and sigrok priorities and the first shipped Dart AOT +baseline, preserving existing controls before introducing another selector. + +Follow-up: [Dart AOT summary and retained string pools](flutter-aot-summary.md) +records real LocalSend delivery pairs and old Evidence continuation, preserving +ABI selection, snapshot identity, original lower bounds and partial coverage. + +Follow-up: [SQLite existing-control measurements](sqlite-existing-controls.md) +tests QGIS's shipped GeoPackage through the existing column selection, preserving +full selected-table schema and typed cells before considering another API. + +Follow-up: [native PE/DOS entry views and real model verification](native-entry-views.md) +records the post-merge native continuation, including a small-function case where +four selected replies cost more bytes than the complete dossier. + +Follow-up: [EVM descriptor and real-template controls](evm-descriptor.md) extends +the offline corpus with digest-pinned Uniswap runtime templates and an independent +published ABI selector oracle, preserving unknown deployment/immutable metadata. + +Follow-up: [EVM interface summary delivery](evm-interface-summary.md) records +the opt-in retained view, old-client/Evidence migration checks and repeated SDK +and real-model pairs, including mixed token/time results and strict-answer limits. + +Follow-up: [task-scoped preset lifecycle verification](preset-lifecycle.md) checks +real Ghidra profile/snapshot boundaries, startup cancellation and retained cleanup +retry while preserving defaults and distinguishing verification from performance. + +Follow-up: [EVM descriptor lifecycle acceptance](evm-lifecycle.md) verifies actual +worker replies, late SDK cancellation, permission-induced cleanup failures, +healthy WASM peers and old CLI parity with explicit runtime and platform scope. + +Follow-up: [managed artifact delivery and retained views](managed-artifact-summary.md) +records two shipped assembly checks, previous-runtime portable Evidence, and four +actual Codex trials. Selected replies shrink substantially; observed model input +tokens increase and latency is mixed, so model-token savings are not claimed. + +Follow-up: [model tool context and per-response usage](model-context.md) separates +raw MCP replies from observed client execution/discovery and usage. Optional +trial capture retains tool/usage items while excluding account and ambient state; +existing ephemeral trials keep their default behavior. + +Follow-up: [Android package delivery and retained manifest](android-package-summary.md) +records real NewPipe SDK pairs, unchanged old requests/Evidence, exact retained +text, and actual Codex outcomes including client errors and a failed discovery. +Reply bytes fall; model-token/time gains are not established. + +Follow-up: [resource counters at payload completion](resource-counters.md) adds +optional owned counter observations while preserving unknown whole-scope final +counters, default receipt shape and the unchanged CPU/memory safeguards. + +The 12 detailed checkpoint receipts were archived byte-for-byte before removal +from the final PR tree. The archive `review-receipts-00d51e0fc-20261012` is in the +private experiment lab outside the checkout; its `archive-index.json` records +source revision, filenames, sizes and SHA-256. +Raw producer replies, model transcripts and exported Evidence remain in the same +private lab. These local files are not required to build or use REA. Historical +checkpoint commits retain their original receipts; no history was rewritten. + +## Optimization priorities and gradual migration + +Agent token consumption and end-to-end task time are the primary objectives. +Memory and CPU consumption are also measured and controlled. Correctness, +Evidence provenance, caller choices and existing-user compatibility are +acceptance conditions for every optimization. + +- Tokens: minimize unnecessary model-visible data while returning the requested + facts and useful provenance inline. Count discovery, repeated calls, errors, + retries and follow-up turns; report total/cached/uncached input and output + separately. Compact JSON bytes are a delivery measurement, not a token count. +- Time: measure completion of the same analyst question, including startup, + provider work, transport, client processing and model corrections. Separate + measured stages and cold/warm state; use repeated comparable trials before + generalizing an observed latency improvement. +- Memory: record aggregate process-tree peaks and limit/cleanup events, account + for retained Evidence and representation expansion, and keep host safeguards. +- CPU: record aggregate CPU time for the completed task. A one-CPU quota is an + experiment control; it does not itself establish reduced CPU consumption. + +Migrate domain by domain with focused real-artifact checks and relevant shared +contract checks. The native follow-up verifies selected PE and DOS MZ entry facts; +DOS COM and complete native application behavior remain unverified. The domain +matrix is a growing roadmap. A passed lane does not imply all +advertised platforms/providers have passed. Newly discovered REA bugs remain +in the separate local handoff document for later team repair. + +Old clients using existing CLI/MCP requests against the candidate retain the +complete default path. New summary/view options require explicit selection. +Actual old Evidence import/view/export checks preserve original authenticated +records and identities. These checks establish the recorded baseline/workflow +scope, not every historical release or third-party client. A new client targeting +an older server must discover the actual schema and use a supported equivalent +where available; this study does not implement a universal automatic fallback. +The catalog intentionally gains more precise/additive schemas, so its bytes and +digest are not frozen: measured runtime `259e99dd9` has about 2.6% larger complete +catalog JSON than the frozen baseline. The separate post-integration receipt +records the newer runtime, including upstream changes. Optional views can reduce +model-visible result data; old complete requests do not silently switch delivery +or acquire that reduction automatically. + +## Reproduce a measurement + +Use the repository's pinned Node/npm and locked dependencies. Build each selected +revision, then copy its `dist/`, `bridge/`, `scripts/`, `skills/`, `package.json` +and `package-lock.json` to a separate runtime directory before editing production +sources. That copy needs the matching locked dependencies. The initial frozen +baseline is `42b0ed126df7d5b908ac369715378d5e519051b7`; this study does not +silently substitute a newer `main` or the previous Code Mode experiment. + +The public artifacts and acquisition digests are in `corpus.json`. Supply their +actual local paths and an optional JSON object of explicit provider environment +settings. Do not add credentials to that file. Provider settings are inherited +by the child, but the report persists only the selected settings' digest. Runs +reject undeclared inherited REA/Hopper and Ghidra/Java configuration keys before +starting a measured server or creating a model profile; include those settings +explicitly in `--providers`. Both drivers use `provider-environment.json` and +record its digest. The system/runtime environment still needs comparable +controlled conditions; its contents are not serialized. Both drivers also +fingerprint the effective provider `PATH` without recording its value, and +the SDK comparator rejects different or unrecorded search paths. This detects different +search configuration, not replacement of executable bytes at the same path. +Historical receipts +predate this guard, so their selected-settings digest alone does not certify +that no undeclared provider setting was inherited. + +```sh +export NODE_OPTIONS=--max-old-space-size=512 +export UV_THREADPOOL_SIZE=1 +export GOMAXPROCS=1 +export GOMEMLIMIT=2GiB +python3 experiments/analysis-efficiency/resource-run.py -- \ + node experiments/analysis-efficiency/measure.mjs \ + --runtime-root /absolute/frozen-runtime \ + --revision 42b0ed126df7d5b908ac369715378d5e519051b7 \ + --artifact obsidian.asar --path /absolute/obsidian-1.14.4.asar \ + --providers /absolute/selected-providers.json \ + --output /absolute/new-measurement-directory +``` + +The wrapper requires Linux cgroup v2 and a working user systemd manager. It owns +a unique transient scope, restricts the whole process tree to one CPU, caps +memory at 4 GiB with no swap and 192 tasks, and samples memory/tasks/CPU every +100 ms. It stops its own scope above 3 GiB or below 4 GiB host available memory; +startup requires 8 GiB available. Cleanup failures retain the owned scope's +identity. Run heavy builds, providers and model trials serially. Sampled peaks +can miss short spikes; cgroup limit events are separately reported. + +An actual Codex + Chromium trial exceeded the initial 192-task allowance and +was stopped automatically below 1 GiB sampled memory, with no OOM. The isolated +browser model retry uses `resource-run.py --task-ceiling 256 -- COMMAND...` to +account for both process trees; memory, swap and CPU controls are unchanged. +Keep the original aborted run and cleanup receipt. This is experiment capacity, +not a REA defect or a successful browser analysis. + +## What the numbers mean + +`summary.json` records the selected artifact's before/after SHA-256, runtime +file-table digest, dispatcher and lockfile digests, runner source digest, +Node/SDK versions, catalog sizes, caller arguments and producer Evidence IDs. +`runtime-files.json` identifies the exact compiled files measured. Actual +provider settings and runtime files must stay fixed during a comparison. + +Every tool call measures three intervals at the public SDK Transport boundary: + +- Client work before `send`, including first-use schema preparation. +- Transport/server roundtrip, including framing, I/O, server work and client + JSON parsing. This interval is **not** a Ghidra-only or provider-only timer. +- Client work after the parsed response reaches `onmessage`. + +The SDK call's total excludes the runner's subsequent encoding and disk writes. +Result byte counts measure compact JSON of the parsed client result, not raw +wire bytes or tokens. Progress notifications retain their actual arrival times; +they do not imply more precise internal engine timings than the producer emits. +Scope CPU time and aggregate process-tree memory come from the wrapper's final +JSON line. Fresh processes have cold application caches; host page caches are +not globally flushed. + +`--delivery summary` is an explicit candidate workflow, initially for artifact +inventory. It must be supported by the selected server's advertised schema. +The default `complete` runs the existing calls unchanged. Compare the same +analyst facts and complete source Evidence before crediting a smaller response. +Projection can reduce delivery bytes without reducing upstream analysis time. +For WASM, the runner validates a summary request against the actual advertised +2020-12 input schema, including SDK-generated references. Supporting servers +return the first-call summary; older servers retain their complete path and use +summary/export views after an observed transport constraint. Original errors +remain in the receipts, and the complete source Evidence ID is a compared fact. +`--javascript-question selected` analyzes only the exact Obsidian sources +`package.json` and `main.js`, keeps inventory identity, and reads each observed +`main.js` module by its exact node ID. Package metadata is not a module selector. + +Compare paired runs with the same runner source and provider settings: + +```sh +node experiments/analysis-efficiency/compare.mjs \ + --left /absolute/complete-run --right /absolute/summary-run \ + --output /absolute/new-comparison.json +``` + +This checks all selected analyst facts, including inventory source IDs, exact +path records, manifest, counts, completeness, contradictions, coverage, +unexplored branches and limitations. It excludes only delivery observation IDs +and the named recovery-path description. Different settings, changed facts or +failed workflows make the comparator fail. Binwalk's per-invocation region UUIDs +are separately preserved with both original values and JSON paths; only those +opaque lookup values are excluded from physical-region fact equality. Original +producer replies are never rewritten. Selected JavaScript comparisons likewise +preserve both values of the two named parent-heap-dependent byte budgets before +excluding their values from fact equality; fixed limits and coverage rows remain +checked. Counts include extra view calls and +observed tool errors. Use repeated runs with alternating order before claiming +a distribution or a speedup; one pair is only one observation. + +For a completed WASM result exceeding the MCP response budget, the runner keeps +the original error, exports retained Evidence through the public tool, and +authenticates the exact reported record using the selected runtime's parser. +The report names this recovery; it does not relabel the oversized inline reply +as successful delivery. + +## Initial observations and exclusions + +The frozen baseline has 2,326,609 bytes of complete catalog JSON, of which +494,207 bytes describe names, descriptions and input schemas. One Obsidian +trial spent about 21.9 s before the first request was sent, then about 0.77 s +in that request's transport/server roundtrip. Other cold runs differed +substantially. These single observations identify a measurement boundary; +they do not establish a speedup or a distribution. + +The initial matrix exercised shipped Obsidian, NewPipe, ShareX, OpenWrt, SQLite +WASM and jq artifacts. SQLite produced a complete result larger than the +transport frame and requires an explicit recovery run. A first jq attempt hit +the SDK's default 60 s timeout because the experimental runner used a superseded +three-argument call signature. SDK 2.3.1 accepts request options as argument two; +the corrected jq run completed real Ghidra analysis in about 265 s. That earlier +driver timeout is excluded from REA regression claims. Provisional runs with +different runner source digests are not one paired statistical cohort. + +No cross-session engine database cache, default analyzer changes, external +plugin loading, or broad plugin SDK is enabled by this experiment. + +## Obsidian delivery checkpoint + +The two recorded pairs compare frozen baseline +`42b0ed12` and candidate `f1106181` in complete → summary and summary → complete +order using the same runner source, bytes and provider settings. Both preserve +every selected fact and the atomic inventory Evidence ID. + +| Measurement | Complete | Summary + exact path view | +| --------------------------------------------------- | --------------: | ------------------------: | +| Tool-result compact JSON, including lifecycle calls | 937,404 bytes | 16,322 bytes | +| Tool calls per question | 3 | 4 | +| Complete catalog compact JSON | 2,326,609 bytes | 2,370,505 bytes | +| Workflow elapsed, first pair | 11.04 s | 10.23 s | +| Workflow elapsed, second pair | 10.57 s | 10.18 s | + +Reply JSON falls by about 98.3%; catalog JSON grows by about 1.9%. The two elapsed +observations do not establish a statistical speedup. Inventory coverage and +upstream byte acquisition are unchanged. The candidate remains opt-in; existing +requests continue to deliver the complete inspection. Each run verifies the +selected artifact's before/after digest and reports no observed OOM or task +limit events. Source typing and projection improve selected delivery without +introducing an engine database cache or an external plugin protocol. + +## Task-scoped analyzer experiment + +The recorded jq pair explicitly disables +`Decompiler Switch Analysis` through the existing `REA_GHIDRA_DISABLED_ANALYZERS` +setting and compares it with the unchanged Ghidra default. Both use the same +frozen runtime and real jq bytes, one CPU, a fresh ephemeral database and the +same entry/main question. Completed main dossiers exceed the MCP frame in both +runs; existing retained native views recover the selected facts, preserving the +observed transport errors in the reports. + +One disabled/default pair takes 174.77/276.23 seconds. Entry and main pseudocode, +main strings and its block count agree. However, callee `0x40daa0` has 604 +recovered body bytes in eight ranges by default, and 164 bytes in four ranges +with the same 646-byte span after disabling switch analysis. Equal top-level +counts do not establish call-graph equivalence. **Keep the production default.** +Use the existing control only for a caller-selected task whose required facts +have been checked; no general fast preset is introduced. A separate real +coreutils/Ghidra probe rejects a nonexistent analyzer before bridge readiness, +preserves the named failure and closes the session. Source bytes remain unchanged. + +`--schemas selected` is a separate SDK 2.3.1 client experiment. It passes the exact +live named `tools/list` definition to the SDK's public `callTool` option, retaining +output validation. It does not change REA or the default runner mode. Selected +definitions compile per call rather than preparing the entire cached catalog; +report this client effect separately from engine analysis or model behavior. + +## Real Codex CLI trials + +`agent-trial.py` accepts an explicit frozen runtime and revision, the same +question templates in `questions/`, and optional explicit provider settings. +It fingerprints the actual runtime, runs pinned local Codex CLI with a private +temporary profile, copies only the authentication file with mode 0600, disables +shell/web/multi-agent tools, and removes copied profile state afterward. Raw +events and answers remain outside Git. A zero exit code is not a factual grade. +Review the original tool calls, failed requests, result limitations and answer. + +The optional `--enabled-tools FILE` supplies a list of exact names to the +temporary Codex MCP configuration's `enabled_tools`, as described in the +[official MCP configuration](https://learn.chatgpt.com/docs/extend/mcp?surface=cli). +It leaves the REA catalog and other clients intact. Initial Obsidian trials +showed parameter-correction attempts and different delivery choices even with +the same question; filtering alone has not established a cost or quality win. +Requested model aliases are recorded without inventing a resolved model identity. + +The browser question uses `--authority browser` to permit only its explicitly +selected public scenario in a fresh, owned headless profile. Browser observations +and cleanup are graded separately from static artifact analysis. + +## Real artifact compatibility checkpoint + +Six frozen baseline/pilot pairs exercise +Obsidian, NewPipe, ShareX, OpenWrt, SQLite WASM and published historical WETH code +through public MCP tools. All selected facts agree under the stated comparison +rules. Obsidian complete delivery and atomic inventory Evidence identity remain +unchanged. ShareX native-boundary claims remain scoped to the selected DLL; +NewPipe retains a null DEX descriptor rather than inventing one. + +SQLite's complete 15,382,128-code-unit WAT exceeds the MCP response budget in both +revisions. The control recovers complete Evidence through file export; the pilot +reads summary and four exact export forms inline, without running WABT again. +Inline byte totals exclude file exports, so they do not establish a size win. +OpenWrt comparison preserves both sets of upstream-generated region UUIDs before +comparing offsets, extents, signatures, coverage and limitations. WETH is a +published historical example; a live RPC request returned HTTP 403, so this is +not live-chain verification. Every pair records unchanged target bytes and zero +observed OOM/task-limit events. The Linux x64 results do not establish behavior +for IDA, Hopper, macOS, Windows or Harmony. + +## Same-question model and selected-source follow-up + +Two actual SQLite model trials preserve all +12 requested facts. The question, developer instruction, provider settings and +tool allowlist hashes match. A description-only follow-up supplies the exact +summary kind and its fields. Calls change from 42 to 3, workflow time from +292.64 to 63.79 seconds, and reported input tokens from 304,698 to 74,387. The +follow-up reads no unnecessary WAT pages. Both keep the original completed +analysis's transport error and authenticate the retained source/view identities. +This is one stochastic model pair, not a statistical or general causal claim. + +The selected JavaScript pair preserves +all 24 observed `main.js` module identities and the exact two-source selection. +The strict comparison initially differs on parent budget values derived from +observed heap availability; both values and paths remain recorded separately. +Other coverage facts, per-family rows, fixed worker limits, omitted/unknown +counts, statistics and Electron observations agree. Coverage remains partial, +with 36 unselected relevant files and 384 semantic unknowns. These static facts +do not establish runtime behavior. The comparator does not rewrite Evidence. + +Ten real CLI trial reviews cover native, +managed, Android, firmware, Electron/JavaScript, WASM, EVM and browser tasks. +The selected JavaScript model preserves core facts and partial coverage but +omits full budget/family provenance. The browser producer captures complete +DOM/accessibility/URL evidence and terminates its owned process; direct model +answers lose two accessibility metadata fields to client context clipping and +report them unknown. A requested under-development Codex code-mode configuration +still produces a direct MCP call in the actual trace, so no executor/composition +win is credited. Profile cleanup, original errors, actual calls, usage, facts and +scope limits remain independently reviewed. Enabling a configuration flag does +not prove that a capability was used. + +Discovered REA defects are recorded separately for team repair at the user's +request. This follow-up performs no additional REA bug fixes. + +## Nonempty managed boundaries and final verification + +A second shipped managed library checks +11 ModuleRefs, 147 PInvoke declarations and 225 native implementations from +ShareX HelpersLib 19.0.2. All complete normalized artifact and native-boundary +fields match between baseline and pilot, including source Evidence identities. +This covers nonempty declarations beyond the main ShareX DLL's empty import +tables. It does not verify native exports, execute the assembly or resolve CLR +dependencies. The curated receipt keeps identities, coverage, all ModuleRefs, +the first three PInvoke records and digests of the complete boundary payloads. +Full producer tables and comparison inputs stay in the private lab outputs. + +The earlier verification includes 42 real +WABT CLI/MCP cases and the complete real SQLite CLI JSON: the unchanged default +returns the same original source Evidence ID, normalized result and raw result +as the baseline exported MCP record. Source bytes are unchanged. The seven-file +contract/composition run passes 51/52 assertions and hits the existing 20-second +presentation-test deadline while sharing one CPU. That same unmodified assertion +passes alone in 10.835 seconds. The original combined failure and isolated pass +remain recorded; no test deadline or REA bug was patched. Build, type/lint/module +checks and generated-document checks pass. No full `check:pr` or unverified +provider/platform coverage is implied. + +## Actual old Evidence migration + +The migration experiment imports the original +baseline SQLite Evidence bundle into the pilot runtime, reads a typed summary +and four export forms, and exports the retained bundle again. The complete old +WASM record is deeply equal after import/export, with its original authenticated +Evidence ID. The original baseline Obsidian complete inspection also works as +inline input to the new inventory summary, retaining the old parent and atomic +inventory identities and manifest. Original input files remain byte-identical. + +The runtime explicitly selects an absent WABT directory and requests no producer +operation. These views consume existing Evidence without another provider run; +this is portable-result reuse through existing import/export, not an engine +database cache. The five-call workflow completes in 5.458 seconds with a sampled +aggregate peak of 700,542,976 bytes and no observed limit or OOM events. + +To repeat it with genuine old public outputs: + +```sh +python3 experiments/analysis-efficiency/resource-run.py -- \ + node experiments/analysis-efficiency/verify-migration.mjs \ + --runtime-root /absolute/frozen-pilot-runtime \ + --revision 259e99dd906290189217cf0fb1a19769bcf87101 \ + --bundle /absolute/baseline-exported-evidence.json \ + --inspection-reply /absolute/baseline-complete-inspection-reply.json \ + --output /absolute/new-migration-directory +``` + +## PR integration verification + +The separate post-integration verification pins runtime +`0eb42a1eb8ab17aed04240174cb77612e733a1d8`, integrated with main +`c22111eca2c4bc84a084f12711f405b3e7422a40`. Conflict resolution preserves main's +HAR API-surface views, portable capture admission, exact layout/JavaScript +summary carriers and existing CLI tests alongside inventory/WASM views. +Earlier real-model observations keep their original runtime fingerprints. + +Build, the complete `check` static gate and generated documentation checks pass. +Twelve focused files pass 123 assertions, including the presentation test run +separately with its original deadline. Actual package creation, private-prefix +installation and 42 real WABT CLI/MCP cases pass. No package is published. +The complete generic package verifier and full local `check:pr` were not run. + +Genuine old SQLite/Obsidian Evidence migration passes again with WABT unavailable. +A fresh public SDK cohort preserves the original Obsidian default result size +(937,404 compact JSON bytes), atomic inventory identity and every selected fact; +explicit summary plus exact paths still returns 16,322 bytes. Complete catalog +JSON is 2,359,082 bytes versus the original baseline's 2,326,609 (about 1.4% +larger). That difference includes intervening main changes and does not isolate +this PR's catalog contribution. One cohort is not a latency distribution. + +Recorded integration scopes have no OOM/OOM-kill or hard-limit abort. The full +source-check scope reports three `memory.high` events near its 3 GiB soft +threshold. The subsequent cold pre-push type/lint scope reports 37 such events, +with 3,221,155,840 sampled peak bytes and no hard-limit/OOM event. Heavy lanes stay +serial with the existing CPU, memory and no-swap controls. No further REA bug repairs +are included; separate local findings remain for team follow-up. + +## CI attribution + +Review of the actual main and PR job logs separates two PR-related +description/test mismatches from pre-existing main failures. The complete-graph +wording check now accepts capitalization changes; the existing effects audit +records why returning WASM execution/network metadata is not foreign execution. +Those two files pass 11 focused assertions without production changes. Main's +own CI already fails the same live prompt-completion assertion and Darwin +packaged-completion checks; the affected implementation and fixture files are +byte-identical here. Those failures remain unchanged for team review at the +maintainer's request. CI failures are not all infrastructure faults, and the +failed CI gate is not presented as passed. + +| Failure | Main `c22111eca` | Reviewed PR `8d6f7eb1c` | +| ---------------------------------------- | ---------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| Empty prompt completion after open | [main shard](https://github.com/morluto/rea/actions/runs/38224038323/job/114727940506) | [PR shard](https://github.com/morluto/rea/actions/runs/38228724531/job/114742955092) | +| Packaged prompt completion, Darwin arm64 | [main package](https://github.com/morluto/rea/actions/runs/38224038323/job/114728030045) | [PR package](https://github.com/morluto/rea/actions/runs/38228724531/job/114743092314) | +| Packaged prompt completion, Darwin x64 | [main package](https://github.com/morluto/rea/actions/runs/38224038323/job/114728029923) | [PR package](https://github.com/morluto/rea/actions/runs/38228724531/job/114743092079) | + +`src/server/promptCompletion.ts`, `src/application/binary/BinarySession.ts`, +`tests/boundary/mcp/promptCompletion.test.ts` and +`scripts/verify-package-prompts.mjs` are byte-identical to that main revision. +Main commit `07b36c148946f46b99a4ce04e55726e97d0ee03a` introduces ready-provider-only +completion; the failing fixtures expect populated completion immediately after +opening. Whether those expectations or the readiness behavior should change is +left for team review. Commit `00d51e0fcd1d1bba60bf56281725e82d525a27ae` +synchronizes only the two PR-related description checks. + +## Frozen runtime references + +### Review follow-up + +Two substantive bot findings were reproduced and addressed before merge. Atomic +inventory projections now reuse the owning subject/digest/format validation. +Actual public SDK calls with original Obsidian data demonstrated the old +acceptance of null subjects and inconsistent formats; the corrected runtime +rejects both with `invalid_request`. Six boundary assertions also cover missing +subject, wrong format and wrong digest across summary and node views. + +The related three-file run passes 37 assertions, and full static/docs gates +pass. Genuine baseline SQLite/Obsidian import/view/export still preserves whole +original records and source/view identities with WABT unavailable. A new real +Obsidian summary workflow preserves every selected fact, atomic source identity +and 16,322 delivered JSON bytes; catalog bytes remain 2,359,082. + +Both experimental drivers reject undeclared inherited provider controls before +server/profile creation and log no values. Explicit settings still override +the corresponding inherited values. This prevents claiming equal declared +settings while silently inheriting a different analysis option; it does not +certify every aspect of the inherited system/runtime environment. These are +research-driver controls, with no production configuration changes. + +The source/static scope records 98 `memory.high` events, no hard limit/OOM event, +and a sampled peak of 3,221,209,088 bytes. The real migration/Obsidian scope peaks +at 677,367,808 bytes with no limit/OOM events. All raw receipts remain outside Git. + +A later WASM finding was also reproduced: portable sources with absent subject +or a different subject path could report another artifact path. The producer and +view now share an exact path/digest identity rule. Actual WABT inspection of the +published VS Code Tree-sitter INI grammar (0.3.1, 4,716 bytes, SHA-256 +`1e8cdf3027209100fa54a43d0faed69721ae1116428164c8ad6dcc496a9aa6af`) +supplied the unchanged report for public SDK before/after checks. The old runtime +accepts both inconsistencies; the corrected runtime rejects both with +`invalid_request` and WABT unavailable. Its 26 focused assertions and type/lint +checks pass, and genuine old records still round-trip unchanged. The verification +scope peaks at 3,204,509,696 bytes with no observed limit/OOM event. The initial +CSS producer exceeded the MCP reply budget as expected; that failed probe is +preserved separately and is not credited as a completed identity reproduction. + +These revisions identify different experiment stages; model measurements were +not rerun or relabeled as post-integration measurements. + +| Stage | Source revision | +| ---------------------------------------------- | ------------------------------------------ | +| Original baseline | `42b0ed126df7d5b908ac369715378d5e519051b7` | +| Inventory delivery pairs | `f110618184e99f89fa776bc5e59703a61baa7c57` | +| Initial WASM pilot | `0002caa07ffd7319672a21ce901dbfbc55e21aac` | +| Exact WASM summary guidance | `259e99dd906290189217cf0fb1a19769bcf87101` | +| Main-integrated package/migration verification | `0eb42a1eb8ab17aed04240174cb77612e733a1d8` | + +The baseline runtime file-table SHA-256 is +`3a1765a6fec0031db0b288112d4db9bc0dd503c9c3aa0946f07ce57f7673ab4b`; +the integrated runtime file-table SHA-256 is +`e99d3bdc851822b77e7d5bfaa9b60c57e7b99bd66e27a739bdea2e9300560d5f`. +The integrated lockfile SHA-256 is +`0a55042141899a442a39dce3d49755c65a861f86d1930bd4f9c6d89cd53f5eba`. +Actual old migration inputs have SHA-256 +`e1ff3d28801436bcc11693f79cc847a4f31234f49d88449f9e0d77215c3765fc` +(SQLite bundle) and +`7cecd07012bb79f3afad2ea9e70357e056e9eab48c1aa13bbbd310cdcb43eb9f` +(Obsidian complete inspection reply). The source WASM identity +`ev_16b9f6e0fcefcab9603f14fd5e63ea00c4749accd94fef4a4e9fbb260d2e0140` +and atomic inventory identity +`ev_22c17e52489f3ec0e7298a62da37bd985dbbec202d7208a0bb1c20d863790aed` +remain unchanged after the recorded import/view/export workflows. + +### Complete carrier identity and provider search configuration + +The outer `inspect_artifact` carrier now uses the same owning subject/digest/format +validator as its atomic inventory. Invalid imported/inline carriers are rejected +before selected-view construction; the generic historical Evidence parser and +valid complete records are unchanged. Six additional boundary assertions cover +missing subject, wrong format and wrong digest across summary/node projections. +The negative checks use the small keyed-archive workflow so the original large +ZIP retention/capacity workflow keeps its existing deadline and distinct coverage. +An initial large-workflow placement timed out and is retained as a failed attempt. +The three public MCP workflows, build, fast static gate and generated docs pass. +The final static/test scope observed one soft `memory.high` event, with no hard +memory, task-limit, OOM or OOM-kill event; it is not a performance trial. + +Both research drivers fingerprint the effective provider `PATH`, including an +explicit caller override, without serializing its value or the ambient environment. +The SDK comparator rejects absent or unequal search-path fingerprints. This +records search configuration, not executable replacement at an unchanged path; +provider/runtime identities and controlled host conditions still matter. + +Actual public SDK calls using the original shipped Obsidian inspection reproduce +accepted null/wrong-format outer subjects on frozen `2ef0467bb` and `invalid_request` +on the corrected compiled runtime. Two fresh Obsidian replays with different +inherited search paths preserve selected facts and source identities, but the +comparator rejects matching settings with only `provider_search_path_sha256` +different. The original records and failed/accepted replies stay in private lab +receipts; no environment value is copied into them. + +### Resource-counter closeout qualification + +The experimental wrapper now attempts a final cgroup event read before waiting +or cleanup. Disappeared/incomplete counters or still-owned descendants make +`resource_counters_verified` false; last observations remain available separately. +The model grader treats missing final counters as unverified, never as zero, +and any recorded soft/hard/task-limit event prevents an unrestricted resource +pass. Lightweight parser probes cover missing/incomplete and nonzero counters; +an actual short command confirms disappearance is reported as unknown. Regrading +one already-correct SQLite model answer preserves its facts but rejects the old +receipt's absent final resource counters. Earlier receipts record last-sampled +observations, not verified final counters. Their bytes, facts and token reports +remain original observations; resource-qualified performance conclusions need +this additional closeout evidence. No analyzer/build/schema/package behavior is +changed, so unrelated verification is not repeated for this research-driver fix. + +The next bounded WASM delivery cohort is documented in [first-call summary measurements](wasm-first-call.md). diff --git a/experiments/analysis-efficiency/agent-trial.py b/experiments/analysis-efficiency/agent-trial.py new file mode 100644 index 000000000..6dcc7d7f8 --- /dev/null +++ b/experiments/analysis-efficiency/agent-trial.py @@ -0,0 +1,306 @@ +"""Evaluate one real Codex CLI task with an isolated REA MCP registration.""" + +import argparse +import hashlib +import json +import os +from pathlib import Path +import shutil +import signal +import subprocess +import tempfile +import time + +from codex_context import capture_tool_context + + +def file_digest(path): + digest = hashlib.sha256() + with path.open('rb') as data: + for chunk in iter(lambda: data.read(1024 * 1024), b''): + digest.update(chunk) + return digest.hexdigest() + + +def runtime_fingerprint(root): + files = [] + for name in ['dist', 'bridge']: + for path in sorted((root / name).rglob('*')): + if path.is_symlink(): + raise ValueError('Runtime fingerprint does not follow symlinks') + if path.is_file(): + files.append({'path': path.relative_to(root).as_posix(), 'sha256': file_digest(path)}) + files.sort(key=lambda row: row['path']) + text = json.dumps(files, separators=(',', ':'), ensure_ascii=False) + return files, hashlib.sha256(text.encode()).hexdigest() + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument('--mode', choices=['direct', 'client-code'], default='direct') + parser.add_argument('--runtime-root', type=Path, required=True) + parser.add_argument('--revision', required=True) + parser.add_argument('--prompt', type=Path, required=True) + parser.add_argument('--artifact-path', help='Replace {{artifact_path}} in a question template') + parser.add_argument('--output', type=Path, required=True) + parser.add_argument('--model', default='gpt-5.6-terra') + parser.add_argument('--reasoning', default='high') + parser.add_argument('--timeout', type=int, default=900) + parser.add_argument('--codex', default='/usr/bin/codex') + parser.add_argument('--providers', type=Path) + parser.add_argument('--enabled-tools', type=Path) + parser.add_argument('--authority', choices=['static', 'browser'], default='static') + parser.add_argument('--capture-tool-context', action='store_true', + help='Retain owned tool/usage items; excludes account/ambient state') + parser.add_argument('--guide-enabled-tools', action='store_true', + help='Opt-in exact-name discovery guidance for selected REA tools') + args = parser.parse_args() + if args.guide_enabled_tools and args.enabled_tools is None: + parser.error('--guide-enabled-tools requires --enabled-tools') + enabled_tools = None + if args.enabled_tools: + enabled_tools = json.loads(args.enabled_tools.read_text()) + if not isinstance(enabled_tools, list) or not all(isinstance(name, str) and name for name in enabled_tools) or len(enabled_tools) != len(set(enabled_tools)): + raise ValueError('enabled-tools must be a unique list of exact tool names') + if args.guide_enabled_tools and not enabled_tools: + parser.error('--guide-enabled-tools requires a nonempty selected tool list') + def terminate(signum, _frame): + # The outer resource scope terminates descendants together. Ensure the + # runner's copied credentials are also removed on a resource abort. + raise SystemExit(128 + signum) + signal.signal(signal.SIGTERM, terminate) + if not args.runtime_root.is_absolute() or not args.output.is_absolute(): + raise ValueError('Runtime and output paths must be absolute') + repository = args.runtime_root + driver_repository = Path(__file__).resolve().parents[2] + experiment = Path(__file__).resolve().parent + node = shutil.which('node') + if subprocess.check_output([node, '--version'], text=True).strip() != 'v24.18.0': + raise SystemExit('Use pinned Node 24.18.0 on PATH') + provider_env = {'REA_LOG_LEVEL': 'silent', 'NODE_OPTIONS': '--max-old-space-size=512'} + if args.providers: + declared = json.loads(args.providers.read_text()) + if not isinstance(declared, dict) or not all( + isinstance(value, str) for value in declared.values() + ): + raise ValueError('--providers must contain an object of explicit string settings') + provider_env.update(declared) + provider_policy_text = (experiment / 'provider-environment.json').read_text() + provider_policy = json.loads(provider_policy_text) + undeclared = sorted(key for key in os.environ if ( + any(key.startswith(prefix) for prefix in provider_policy['namespace_prefixes']) + or key in provider_policy['additional_keys'] + ) and key not in provider_env) + if undeclared: + raise ValueError('Declare inherited provider settings explicitly in --providers: ' + + ', '.join(undeclared) + '. Values are not logged.') + args.output.mkdir(parents=True, exist_ok=False, mode=0o700) + runtime_files, runtime_digest = runtime_fingerprint(repository) + (args.output / 'runtime-files.json').write_text(json.dumps(runtime_files)) + profile = Path(tempfile.mkdtemp(prefix='profile-', dir=args.output)) + trial_codex_home = profile / 'codex' + account = profile / 'account' + workspace = profile / 'workspace' + for directory in [trial_codex_home, account, workspace]: + directory.mkdir(mode=0o700) + source_auth = Path(os.environ.get('CODEX_HOME', str(Path.home() / '.codex'))) / 'auth.json' + auth = trial_codex_home / 'auth.json' + started = time.monotonic() + timeout = False + exit_code = None + environment = dict(os.environ) + environment.update({ + 'CODEX_HOME': str(trial_codex_home), 'HOME': str(account), + 'XDG_CONFIG_HOME': str(account / '.config'), + 'XDG_CACHE_HOME': str(account / '.cache'), + 'XDG_DATA_HOME': str(account / '.local/share'), + 'NODE_OPTIONS': '--max-old-space-size=512', + }) + target_digest = file_digest(Path(args.artifact_path)) if args.artifact_path else None + command_args = [str(repository / 'scripts/rea.mjs'), 'mcp'] + instruction = ( + 'Use the registered REA MCP server for this investigation. Static analysis ' + 'only: do not execute target code, fetch URLs, launch a GUI, or modify targets. ' + 'Preserve observations, derivations, inferences, limitations, and real Evidence IDs. ' + 'An Evidence value has evidence_id, normalized_result and limitations; ' + 'non-Evidence session values have result. ' + 'The analyzed target digest is Evidence.subject.digest.sha256. ' + 'normalized_result.engine.artifact_sha256 identifies the analysis engine ' + 'artifact and must never be substituted for the target digest. ' + 'Prefer summary/focused views where appropriate. Do not invent successful facts ' + 'after a tool error. No other agents. Stop once the requested facts are supported.' + ) + if args.authority == 'browser': + instruction = ( + 'Use the registered REA tools for the explicitly selected public browser scenario. ' + 'Launching the selected headless browser with a fresh empty profile and observing ' + 'the supplied public URL is authorized. Keep all actions within that scenario. ' + 'No injected code, credentials, unrelated targets, shell/file tools or other agents. ' + 'Preserve real Evidence IDs, observation completeness, failed captures and limitations. ' + 'Do not infer original source or global behavior from one observed session.' + ) + if args.mode == 'client-code': + instruction += ( + ' Use the client JavaScript executor to compose registered MCP calls when ' + 'possible and select the requested normalized_result fields before returning ' + 'intermediate output to model context. Keep real Evidence IDs and limitations.' + ) + if args.guide_enabled_tools: + instruction += ( + ' Configured REA tool function names for this trial: ' + + json.dumps(['mcp__rea__' + name for name in enabled_tools]) + + '. For discovery select only these exact names from ALL_TOOLS and ' + 'return only their metadata. Preserve the original analyst question, ' + 'dependency order and source Evidence.' + ) + quote = json.dumps + config = '\n'.join([ + 'approval_policy = "never"', 'sandbox_mode = "read-only"', + 'web_search = "disabled"', 'model = ' + quote(args.model), + 'model_reasoning_effort = ' + quote(args.reasoning), + 'developer_instructions = ' + quote(instruction), + '[features]', 'multi_agent = false', 'shell_snapshot = false', + 'shell_tool = false', 'unified_exec = false', + 'code_mode = ' + ('true' if args.mode == 'client-code' else 'false'), + 'code_mode_only = ' + ('true' if args.mode == 'client-code' else 'false'), + '[history]', 'persistence = "none"', + '[mcp_servers.rea]', 'command = ' + quote(node), + 'args = ' + quote(command_args), 'startup_timeout_sec = 60', + 'tool_timeout_sec = 600', + *([] if enabled_tools is None else ['enabled_tools = ' + quote(enabled_tools)]), + '[mcp_servers.rea.env]', + *[key + ' = ' + quote(value) for key, value in provider_env.items()], + ]) + '\n' + # MCP read-only hints cover normal static tools. Explicitly authorize only + # the session-opening primitive needed by the requested native tasks. + config += '[mcp_servers.rea.tools.open_binary]\napproval_mode = "approve"\n' + for tool in ['analyze_javascript_application', 'inspect_analysis_view', + 'inspect_android_package', 'search_android_classes', + 'inspect_android_class', 'inspect_android_method', + 'inspect_firmware_regions', 'inspect_managed_artifact', + 'inspect_sqlite_database', + 'inspect_managed_members', 'inspect_managed_native_boundaries', + 'inspect_artifact', 'inspect_wasm_artifact', + 'inspect_evm_interface', 'get_evidence_bundle', 'export_evidence_bundle', + 'capture_browser_scenario', + 'resolve_containing_procedure', 'analyze_function', 'close_binary']: + config += '[mcp_servers.rea.tools.' + tool + ']\napproval_mode = "approve"\n' + try: + if source_auth.exists(): + shutil.copyfile(source_auth, auth) + auth.chmod(0o600) + (trial_codex_home / 'config.toml').write_text(config) + (trial_codex_home / 'config.toml').chmod(0o600) + prompt = args.prompt.read_text() + template_digest = hashlib.sha256(prompt.encode()).hexdigest() + if '{{artifact_path}}' in prompt: + if not args.artifact_path or not os.path.isabs(args.artifact_path): + raise ValueError('A question template requires an absolute --artifact-path') + prompt = prompt.replace('{{artifact_path}}', args.artifact_path) + elif args.artifact_path: + raise ValueError('--artifact-path requires the literal template marker') + (args.output / 'prompt.txt').write_text(prompt) + (args.output / 'trial-settings.json').write_text(json.dumps({ + 'mode': args.mode, 'model': args.model, 'reasoning': args.reasoning, + 'capture_tool_context': args.capture_tool_context, + 'guide_enabled_tools': args.guide_enabled_tools, + 'driver_commit': subprocess.check_output( + ['git', 'rev-parse', 'HEAD'], cwd=driver_repository, text=True).strip(), + 'runtime_revision': args.revision, + 'runtime_root': str(repository), + 'selected_artifact_path': args.artifact_path, + 'selected_artifact_sha256_before': target_digest, + 'enabled_tools': enabled_tools, + 'authority': args.authority, + 'runtime_files_sha256': runtime_digest, + 'runtime_dispatcher_sha256': file_digest(repository / 'scripts/rea.mjs'), + 'package_lock_sha256': file_digest(repository / 'package-lock.json'), + 'experiment_sources_sha256': { + name: hashlib.sha256((experiment / name).read_bytes()).hexdigest() + for name in ['agent-trial.py', 'codex_context.py', 'provider-environment.json'] + }, + 'developer_instructions': instruction, + 'developer_instructions_sha256': hashlib.sha256(instruction.encode()).hexdigest(), + 'prompt_sha256': hashlib.sha256(prompt.encode()).hexdigest(), + 'question_template_sha256': template_digest, + 'provider_settings_sha256': hashlib.sha256( + json.dumps(provider_env, sort_keys=True).encode()).hexdigest(), + 'provider_search_path_sha256': hashlib.sha256( + provider_env.get('PATH', os.environ.get('PATH', '')).encode()).hexdigest(), + 'provider_environment_policy_sha256': hashlib.sha256( + provider_policy_text.encode()).hexdigest(), + 'features': {'shell_tool': False, 'unified_exec': False, + 'multi_agent': False, 'code_mode': args.mode == 'client-code', + 'code_mode_only': args.mode == 'client-code'}, + }, indent=2) + '\n') + invocation = [args.codex, '--no-daemon', 'exec', '--strict-config', + *([] if args.capture_tool_context else ['--ephemeral']), + '--skip-git-repo-check', '--ignore-rules', '--json', + '--color', 'never', '-C', str(workspace), + '--output-last-message', str(args.output.resolve() / 'answer.txt'), '-'] + with (args.output / 'events.jsonl').open('w') as events, (args.output / 'stderr.log').open('w') as errors: + child = subprocess.Popen(invocation, env=environment, cwd=workspace, + stdin=subprocess.PIPE, stdout=events, stderr=errors, text=True) + child.stdin.write(prompt) + child.stdin.close() + try: + exit_code = child.wait(timeout=args.timeout) + except subprocess.TimeoutExpired: + timeout = True + child.terminate() + try: + exit_code = child.wait(timeout=10) + except subprocess.TimeoutExpired: + child.kill() + exit_code = child.wait() + usage = [] + tools = [] + event_types = {} + with (args.output / 'events.jsonl').open() as event_file: + for line in event_file: + if not line.strip(): + continue + event = json.loads(line) + kind = event.get('type', 'unknown') + event_types[kind] = event_types.get(kind, 0) + 1 + if 'usage' in event: + usage.append(event['usage']) + item = event.get('item', {}) + if item.get('type') == 'mcp_tool_call' and kind == 'item.completed': + tools.append({ + **{k: item.get(k) for k in ['server', 'tool', 'arguments', 'status', 'error']}, + 'codex_event_result_json_utf8_bytes': len(json.dumps( + item.get('result'), separators=(',', ':'), ensure_ascii=False + ).encode()), + }) + final_target_digest = file_digest(Path(args.artifact_path)) if args.artifact_path else None + summary = { + 'mode': args.mode, 'requested_model': args.model, 'reasoning': args.reasoning, + 'runtime_revision': args.revision, + 'capture_tool_context_requested': args.capture_tool_context, + 'selected_artifact_sha256_before': target_digest, + 'selected_artifact_sha256_after': final_target_digest, + 'selected_artifact_bytes_unchanged': target_digest == final_target_digest if target_digest else None, + 'model_identity_scope': 'requested alias; resolved server-side model identity is not inferred', + 'codex_version': subprocess.check_output([args.codex, '--version'], text=True).strip(), + 'exit_code': exit_code, 'timeout': timeout, + 'wall_seconds': round(time.monotonic() - started, 3), + 'usage': usage, 'completed_mcp_calls': tools, 'event_types': event_types, + 'factual_correctness': 'not_assessed', + 'scope': 'real_cli_trial_requires_transcript_and_fact_review', + } + (args.output / 'summary.json').write_text(json.dumps(summary, indent=2) + '\n') + print(json.dumps(summary)) + finally: + try: + if args.capture_tool_context: + capture_tool_context(trial_codex_home, args.output) + finally: + # Capture failure must never prevent copied-credential cleanup. + shutil.rmtree(profile) + (args.output / 'cleanup.json').write_text(json.dumps({'profile_removed': not profile.exists()}) + '\n') + raise SystemExit(124 if timeout else exit_code) + + +if __name__ == '__main__': + main() diff --git a/experiments/analysis-efficiency/android-package-summary.md b/experiments/analysis-efficiency/android-package-summary.md new file mode 100644 index 000000000..448202d87 --- /dev/null +++ b/experiments/analysis-efficiency/android-package-summary.md @@ -0,0 +1,166 @@ +# Android package summary and exact retained manifest + +Continues [#2016](https://github.com/morluto/rea/issues/2016) and +[#2438](https://github.com/morluto/rea/pull/2438). The recurring NewPipe question +asks for APK/package/version identity, all case-sensitive MainActivity matches +and all reported onCreate entries, including explicit null DEX descriptors. +Complete package replies delivered decoded manifest text and duplicate upstream +calls unrelated to those selected facts. + +## Compatibility and ownership + +MCP `inspect_android_package` accepts explicit `detail: "summary"`; omitted and +`"complete"` requests preserve the complete output and provider request. The +one-shot CLI stays complete. Summary selection happens in the application +workflow, independently of the engine protocol, using the existing retained +analysis-view machinery. No third-party plugin API or persistent analysis cache +is introduced. Servers lacking retention reject summary before provider work. + +The complete original Evidence stays under its original ID and session lifetime. +A distinct linked derived view returns all package/SDK/permission declarations, +engine identity, class/resource counts and signature-verification status. +Manifest metadata retains the producer's partial/complete status, nullable +reported byte total, and observed UTF-16 length. Text and duplicate raw calls +remain in the original record, rather than being rewritten under its ID. + +Use `inspect_analysis_view` with the parent's ID and +`view: {kind: "android", facet: "manifest", offset: 0, limit: 4096}` to read exact +retained decoded text. Follow `coverage.next_offset`; surrogate boundaries use +the existing text-page implementation. Exhaustion describes the retained text, +not global completeness when the producer says partial. APK signatures and +runtime behavior remain unverified. Engine artifact SHA-256 identifies the JAR; +views require the authenticated APK subject and never substitute the engine +hash for a missing target identity. Older servers require schema discovery and +the original complete request; automatic fallback is not introduced. + +## Frozen runtime and real SDK pairs + +Source runtime: `28c84e78cf2fbfde4aceed345b773c59eb889f68`; later test-only schema +typing corrections do not relabel these receipts. Compiled dist/bridge file-table +SHA-256: `5332dda13981f043e146b3601ebec1f380d9f698280ca53d75786b638a912e11`. +The frozen old runtime is `8bc1601ca51e417ca472d90ea0367e9418a1a0f2`, digest +`9e7380f537301bf0cfe2926f5619011af848af7c220750e75189498e65d825e1`. + +Real NewPipe 0.29.1 bytes, acquisition and digest are pinned in `corpus.json`. +Actual configured JADX headless MCP 0.7.1/Java runs use the same selected +provider settings and search-path digests, one worker and 768 MiB Java heap. +Node is 24.18.0; actual SDK client/server are 2.3.1. Processes and engines are +fresh per trial; host page caches are not flushed. SDK schema mode is selected +in both treatments. Heavy runs are serial, with one CPU, unchanged 3 GiB early +stop/4 GiB hard memory, no swap, and 192 tasks. + +All four candidate workflows use three successful public MCP calls. Only the +first package delivery changes. Both pairs pass settings and selected-fact +comparison, including all declarations, manifest status/length, engine identity, +original limitations, matching class rows and onCreate entries. Original replies +and IDs remain separate. A fresh old-runtime complete workflow also passes +comparison against the candidate complete request; both complete package replies +are exactly 119,527 compact client-result JSON bytes. This is scoped compatibility +evidence, not a guarantee for every historical release/client/host. + +| Trial | Package reply bytes | SDK workflow seconds | Payload CPU seconds | Kernel peak bytes | +| -------------- | ------------------: | -------------------: | ------------------: | ----------------: | +| sdk-complete-1 | 119,527 | 24.059 | 25.259 | 1,225,076,736 | +| sdk-summary-1 | 8,659 | 23.694 | 24.894 | 1,226,870,784 | +| sdk-summary-2 | 8,659 | 24.407 | 25.611 | 1,228,296,192 | +| sdk-complete-2 | 119,527 | 24.509 | 25.740 | 1,229,844,480 | + +Summary replies are 8,659 bytes, about 92.8% smaller; all three replies together +fall from 149,577 to 38,709 bytes. This is a delivery result, not a model-token +or engine-work saving. The SDK timing differences are small. CPU and memory do +not establish a reduction. No provider setting or analysis scope changes. +Transport roundtrip includes server/client work and is not an engine-only timer. + +The complete catalog is 2,506,213 compact JSON bytes versus 2,497,635 on the old +runtime: about 0.34% growth, including intervening main changes. Discovery cost +remains visible alongside selected-delivery savings. + +## Authentic old Evidence continuation + +A real package record from old runtime 8bc160 imports into the candidate and +supports retained summary, exact manifest pages, inline portable summary and +export through actual public SDK tools. The new session explicitly selects an +absent JADX JAR; this workflow performs no package analysis. Eleven successful +calls preserve the original record, original ID, all declarations and all 25,222 +manifest UTF-16 units. Manifest UTF-8 SHA-256: +`fee192fe2a6d7892c22cba115184c74c7e2c42ce464e8bb37be6289f2c16881d`. +The exported original record is deeply equal to the imported record. + +## Actual Codex task outcomes + +Four serial trials run in complete/summary/summary/complete order on the same +frozen candidate. Requested configuration: Codex CLI 0.161.0, `gpt-5.6-terra` high, +three exact selected tool names and the same optional context/discovery capture +settings. The requested alias does not certify the server-resolved model. The +original analyst question is unchanged; equal treatment instructions explicitly +choose package detail and explain the summary carrier. Temporary configuration +points to the frozen modified REA MCP; no global configuration is edited. + +| Trial | Input | Cached | Uncached | Output | Seconds | MCP calls | Usage records | Facts | +| ---------------- | ------: | -----: | -------: | -----: | ------: | --------: | ------------: | ----- | +| model-complete-1 | 39,267 | 23,040 | 16,227 | 1,690 | 94.053 | 3 | 3 | Pass | +| model-summary-1 | 128,417 | 93,440 | 34,977 | 3,633 | 150.401 | 8 | 9 | Pass | +| model-summary-2 | 54,437 | 37,120 | 17,317 | 2,185 | 123.677 | 3 | 4 | Pass | +| model-complete-2 | 21,332 | 9,984 | 11,348 | 667 | 20.774 | 0 | 2 | Fail | + +Three answers pass the original selected-fact gate against the actual SDK +producer. Each trial preserves APK bytes and removes its isolated profile. +The first summary trial makes five successful calls and three rejected requests: +an invented `case_sensitive` argument, empty class-search input and empty +class-inspection input. It then repeats successful package/search work. These +errors and correction turns remain part of measured task cost; strict existing +schemas correctly reject them. The second summary trial uses the intended three +successful calls, but still does not establish improved total/uncached input or +latency against the factually acceptable first complete control. + +The final complete control's first client executor filters `ALL_TOOLS` for the +same three exact names and receives an empty array. It makes zero MCP calls, +reports all requested facts unknown and fails the factual gate. Identical name +filters worked in the other trials. Stderr contains no explanatory error; the +client visibility failure remains unexplained and is not attributed to REA or +summary delivery. Its short duration is not comparable completed work. The +original failed receipt is retained rather than replaced by a successful trial. + +These measurements demonstrate no real-model token or speed gain. Smaller raw +MCP envelopes do not establish smaller model context; observed usage also +includes discovery, execution context, corrections and extra responses. Usage +records count captured usage items rather than asserting exact remote request +contents or equating MCP calls with model rounds. The complete default and +opt-in choice remain unchanged; this is useful delivery/retention capability, +not a general performance recommendation. + +All model runs have verified payload-completion witnesses with only the observer +remaining and zero memory/task limit events at that phase. Kernel peaks are +602,472,448–1,444,945,920 bytes; the failed no-analysis control is included in that +range and is not evidence of lower analysis memory. Whole-scope final counters +remain unknown and the existing full resource grader stays false. No broader +CPU, memory, OS/provider or model claim is made. + +## Resource interpretation + +Every SDK run and portable continuation has a verified owned +payload-exited-observer-alive witness, with only the observer remaining and no +memory/task limit events at that phase. Kernel peak and CPU include that opt-in +observer. Whole-scope terminal counters remain unknown; the existing complete +physical resource grader is not changed or called successful. No OOM stress or +resource-limit increase is used. + +## Verification and scope + +Twenty-seven relevant converted-schema, SDK, domain and existing Android +failure/cancellation/cleanup checks pass. A three-case focused rerun passes after +a test-only schema typing correction. The 1 MiB manifest protocol fixture verifies +original default/full output, reconstruction after source removal, unchanged +exported Evidence and one engine launch. Other cases preserve nulls and partial +status, Unicode boundaries and tagged malformed/missing-identity failures, and +reject unavailable retention or cancelled requests before provider work. These +fixtures verify production boundaries; actual JADX claims use the real NewPipe +runs above. Full supported single-thread compiler and unchanged lint pass under +the same memory safeguards. No other Android OS/device/provider lane is inferred. + +Raw SDK/model replies, private profiles and resource receipts stay outside Git. +Reproduce SDK pairs using the existing `measure.mjs` with `--artifact newpipe.apk`, +`--schemas selected`, identical explicit provider configuration and frozen runtime, +and alternating `--delivery complete` / `--delivery summary`. Preserve failed +attempts and run `compare.mjs` on both pair orders. Model findings require their +own identical analyst facts and explicit delivery controls. diff --git a/experiments/analysis-efficiency/codex_context.py b/experiments/analysis-efficiency/codex_context.py new file mode 100644 index 000000000..cce8bf9cf --- /dev/null +++ b/experiments/analysis-efficiency/codex_context.py @@ -0,0 +1,117 @@ +"""Retain owned Codex tool/usage observations without account or ambient state.""" + +import hashlib +import json +import os + + +def token_counts(value): + if not isinstance(value, dict): + raise ValueError('Expected a token-count object') + result = {} + for key in ['input_tokens', 'cached_input_tokens', 'cache_write_input_tokens', + 'output_tokens', 'reasoning_output_tokens', 'total_tokens']: + if key in value: + count = value[key] + if not isinstance(count, int) or isinstance(count, bool) or count < 0: + raise ValueError('Expected nonnegative integer token counts') + result[key] = count + return result + + +def selected_event(event): + """Select observed items; these are not the exact submitted model request.""" + if not isinstance(event, dict) or not isinstance(event.get('payload'), dict): + raise ValueError('Expected an event object with an object payload') + if not isinstance(event.get('type'), str): + raise ValueError('Expected an event type string') + if event.get('timestamp') is not None and not isinstance(event['timestamp'], str): + raise ValueError('Expected a timestamp string or omission') + payload = event['payload'] + kind = event.get('type') + if kind == 'response_item' and payload.get('type') in [ + 'custom_tool_call', 'custom_tool_call_output', + 'function_call', 'function_call_output', + ]: + keys = ['type', 'call_id', 'name', 'input', 'arguments', 'output'] + elif kind == 'token_usage_record': + keys = ['response_id', 'usage', 'turn_token_usage', 'thread_token_usage'] + payload = {key: token_counts(payload[key]) if key != 'response_id' + else payload[key] for key in keys if key in payload} + elif kind == 'event_msg' and payload.get('type') == 'token_count': + keys = ['type', 'info'] + info = payload.get('info') + if info is not None: + if not isinstance(info, dict): + raise ValueError('Expected token-count info') + selected_info = {key: token_counts(info[key]) for key in + ['total_token_usage', 'last_token_usage'] if key in info} + window = info.get('model_context_window') + if 'model_context_window' in info: + if window is not None and (not isinstance(window, int) or isinstance(window, bool) or window <= 0): + raise ValueError('Expected a positive model context window') + selected_info['model_context_window'] = window + payload = {'type': 'token_count', 'info': selected_info} + else: + payload = {'type': 'token_count', 'info': None} + else: + return None + return { + 'timestamp': event.get('timestamp'), + 'type': kind, + 'payload': {key: payload[key] for key in keys if key in payload}, + } + + +def capture_tool_context(codex_home, output): + """Capture only an explicitly selected trial's rollouts; never its auth/config.""" + sessions = codex_home / 'sessions' + blocked = sessions.is_symlink() + sources = [] if blocked else sorted(sessions.rglob('*.jsonl')) + target = output / 'codex-tool-context.jsonl' + source_receipts = [] + errors = [{'source': 'sessions', 'reason': 'not_an_owned_directory'}] if blocked else [] + retained = 0 + with os.fdopen(os.open(target, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o600), + 'w', encoding='utf-8') as result: + for source in sources: + name = source.relative_to(codex_home).as_posix() + if source.is_symlink() or not source.is_file(): + errors.append({'source': name, 'reason': 'not_an_owned_regular_file'}) + continue + digest = hashlib.sha256() + counts = {} + with source.open('rb') as lines: + for ordinal, line in enumerate(lines, 1): + digest.update(line) + try: + event = json.loads(line) + selected = selected_event(event) + except ValueError as error: + errors.append({'source': name, 'line': ordinal, + 'reason': type(error).__name__}) + continue + kind = event.get('type') + counts[str(kind)] = counts.get(str(kind), 0) + 1 + if selected is not None: + result.write(json.dumps(selected, ensure_ascii=False) + '\n') + retained += 1 + source_receipts.append({'source': name, 'sha256': digest.hexdigest(), + 'event_counts': counts}) + retained_digest = hashlib.sha256() + with target.open('rb') as captured: + for chunk in iter(lambda: captured.read(1024 * 1024), b''): + retained_digest.update(chunk) + receipt = { + 'status': 'partial' if errors else 'captured' if source_receipts else 'unavailable', + 'retained_file': target.name, + 'retained_sha256': retained_digest.hexdigest(), + 'retained_events': retained, 'sources': source_receipts, 'errors': errors, + 'scope': 'Owned client tool-call/reply and per-response usage items, not ' + 'the exact submitted model request. Session/account metadata, ' + 'world state, user/developer messages, encrypted reasoning and ' + 'internal passthrough are omitted. Authentication, configuration ' + 'and ambient environment are never copied by this capture.', + } + (output / 'context-receipt.json').write_text(json.dumps(receipt, indent=2) + '\n') + return receipt diff --git a/experiments/analysis-efficiency/compare.mjs b/experiments/analysis-efficiency/compare.mjs new file mode 100644 index 000000000..3f5d93769 --- /dev/null +++ b/experiments/analysis-efficiency/compare.mjs @@ -0,0 +1,173 @@ +import { isDeepStrictEqual } from "node:util"; +import { readFile, writeFile } from "node:fs/promises"; +import { resolve } from "node:path"; +import { parseArgs } from "node:util"; + +const { values } = parseArgs({ + options: { + left: { type: "string" }, + right: { type: "string" }, + output: { type: "string" }, + }, +}); +if (!values.left || !values.right) + throw new Error( + "Use --left MEASUREMENT_DIR --right MEASUREMENT_DIR [--output JSON]", + ); +const read = async (directory, name) => + JSON.parse(await readFile(resolve(directory, name), "utf8")); +const left = await read(values.left, "summary.json"); +const right = await read(values.right, "summary.json"); +const leftAnswer = await read(values.left, "answer.json"); +const rightAnswer = await read(values.right, "answer.json"); +const sameSettings = [ + "artifact", + "artifact_sha256", + "artifact_sha256_after", + "retained_verification", + "native_question", + "javascript_question", + "managed_question", + "provider_settings_sha256", + "provider_search_path_sha256", + "provider_environment_policy_sha256", + "measure_source_sha256", + "native_workflow_source_sha256", + "package_lock_sha256", + "node_version", + "sdk_client_version", + "sdk_server_version", + "platform", + "architecture", +]; +const settingDifferences = sameSettings.filter( + (key) => + !isDeepStrictEqual(left[key], right[key]) || + ((key === "provider_search_path_sha256" || + (key === "native_workflow_source_sha256" && + typeof left.native_question === "string")) && + !/^[a-f0-9]{64}$/.test(left[key] ?? "")), +); +// Producer/view IDs identify different delivery observations; a named recovery +// describes the delivery path. All selected analyst facts still must agree. +const facts = (answer) => + Object.fromEntries( + Object.entries(answer).filter( + ([key]) => key !== "evidence_ids" && key !== "recovery", + ), + ); +const a = facts(leftAnswer); +const b = facts(rightAnswer); +const runSpecific = []; +for (const [side, answer] of [ + ["left", leftAnswer], + ["right", rightAnswer], +]) { + if (Object.hasOwn(answer, "evidence_ids")) + runSpecific.push({ + side, + path: ["evidence_ids"], + value: answer.evidence_ids, + }); +} +// Binwalk assigns a new opaque region UUID in each invocation. Preserve both +// original lookup values in this report; compare the observed region facts +// separately. The product and original replies retain those IDs unchanged. +if (left.artifact === "openwrt.bin") { + for (const [side, answer] of [ + ["left", a], + ["right", b], + ]) { + for (const [index, region] of answer.result.regions.entries()) { + runSpecific.push({ + side, + path: ["result", "regions", index, "provider_id"], + value: region.provider_id, + }); + delete region.provider_id; + } + } +} +// JavaScript result budgets depend on observed parent heap availability. +// Preserve their exact values on both sides, then compare the coverage facts +// and fixed worker limits. Never exclude status, omitted counts or families. +if ( + left.artifact === "obsidian.asar" && + left.javascript_question === "selected" +) { + const dynamicBudgets = new Set([ + "javascript_analysis_parent_available_result_budget_bytes", + "javascript_analysis_parent_result_budget_bytes", + ]); + for (const [side, answer] of [ + ["left", a], + ["right", b], + ]) { + for (const layer of ["application", "semantic"]) { + for (const [index, limit] of answer.coverage[layer].limits.entries()) { + if (!dynamicBudgets.has(limit.name) || limit.unit !== "bytes") continue; + runSpecific.push({ + side, + path: ["coverage", layer, "limits", index, "value"], + name: limit.name, + unit: limit.unit, + value: limit.value, + }); + delete limit.value; + } + } + } +} +const factDifferences = [ + ...new Set([...Object.keys(a), ...Object.keys(b)]), +].filter((key) => !isDeepStrictEqual(a[key], b[key])); +const cost = (report) => ({ + revision: report.revision, + runtime_files_sha256: report.runtime_files_sha256, + delivery: report.delivery, + sdk_schema_mode: report.sdk_schema_mode, + elapsed_ms: report.elapsed_ms, + catalog_json_utf8_bytes: report.catalog_json_utf8_bytes, + calls: report.calls.length, + observed_tool_errors: report.calls.filter((call) => call.is_error).length, + client_result_json_utf8_bytes: report.calls.reduce( + (sum, call) => sum + (call.client_result_json_utf8_bytes ?? 0), + 0, + ), + client_before_send_ms: report.calls.reduce( + (sum, call) => sum + (call.client_before_send_ms ?? 0), + 0, + ), + transport_roundtrip_ms: report.calls.reduce( + (sum, call) => sum + (call.transport_roundtrip_ms ?? 0), + 0, + ), + client_after_receive_ms: report.calls.reduce( + (sum, call) => sum + (call.client_after_receive_ms ?? 0), + 0, + ), +}); +const comparison = { + artifact: left.artifact, + artifact_sha256: left.artifact_sha256, + settings_match: settingDifferences.length === 0, + setting_differences: settingDifferences, + facts_match: factDifferences.length === 0, + fact_differences: factDifferences, + preserved_run_specific_values: runSpecific, + workflow_failures: [left.failure, right.failure], + left: cost(left), + right: cost(right), + scope: + "Same selected analyst facts; includes extra view calls and preserves observed tool errors. Result JSON bytes exclude file exports, catalog responses and raw wire framing. This is one paired observation, not a statistical speedup or independent ground-truth proof.", +}; +const text = JSON.stringify(comparison, null, 2) + "\n"; +if (values.output) await writeFile(values.output, text, { flag: "wx" }); +process.stdout.write(text); +if ( + settingDifferences.length || + factDifferences.length || + left.failure || + right.failure +) + process.exitCode = 1; diff --git a/experiments/analysis-efficiency/corpus.json b/experiments/analysis-efficiency/corpus.json new file mode 100644 index 000000000..163b3b49a --- /dev/null +++ b/experiments/analysis-efficiency/corpus.json @@ -0,0 +1,268 @@ +{ + "schema_version": 1, + "artifacts": [ + { + "id": "sharex.dll", + "file": "ShareX.dll", + "bytes": 2162688, + "sha256": "191a191be964e434daf0f9d76d1e0d8ddce90d7e248cba2a6b5ac9577f288d53", + "provenance": { + "project": "ShareX", + "version": "19.0.2", + "upstreamFile": "ShareX-19.0.2-portable.zip", + "url": "https://github.com/ShareX/ShareX/releases/download/v19.0.2/ShareX-19.0.2-portable.zip", + "transport_sha256": "967b5d838df5ce25fb5fd7cbd16f1bd797427e2df16907b022b74a4bc0fb9d54", + "transport_bytes": 168796487, + "derivation": "selected regular ZIP member ShareX.dll" + } + }, + { + "id": "sqlite.wasm", + "file": "sqlite3.wasm", + "bytes": 868907, + "sha256": "2ee8f3dab694532afc8840e07703127287662d08b74e6ff50491ce63f00d5752", + "provenance": { + "project": "SQLite Wasm", + "version": "3.53.4-build1", + "upstreamFile": "sqlite-wasm-3.53.4-build1.tgz", + "url": "https://registry.npmjs.org/@sqlite.org/sqlite-wasm/-/sqlite-wasm-3.53.4-build1.tgz", + "transport_sha256": "24f46db4ce5248fa8f8f24b67e81909ab1a9c152f42a4796a32c6d385a6fb62b", + "transport_bytes": 977616, + "transport_integrity": "sha512-U8pvL0patYHMgieD8JxxYJTlh9m1LUX8+BDYb7MiKQzBI89f2qbdmdcG/PvnPaLm9wsBbv4VlVG453ixnxBOnA==", + "derivation": "selected regular tar member package/dist/sqlite3.wasm" + } + }, + { + "id": "obsidian.asar", + "file": "obsidian-1.14.4.asar", + "bytes": 27477966, + "sha256": "146ef8470d8cbb4a6db209bdc19bf2bad13350444186c0fd93c31087b142b92f", + "provenance": { + "project": "Obsidian", + "version": "1.14.4", + "upstreamFile": "obsidian-1.14.4.asar", + "transport": { + "file": "obsidian-1.14.4.asar.gz", + "url": "https://github.com/obsidianmd/obsidian-releases/releases/download/v1.14.4/obsidian-1.14.4.asar.gz", + "sha256": "d1ed428c363968774f0f3906e67d8a53a058ece0b6cdd924b07865977b2ada21", + "bytes": 9200670 + }, + "derivation": "gzip decompression" + } + }, + { + "id": "newpipe.apk", + "file": "NewPipe_v0.29.1.apk", + "bytes": 11507122, + "sha256": "18447bfb1e06d113edc88df93f471827280de06f6f3d4dc42f56f28b9c1bab79", + "provenance": { + "project": "NewPipe", + "version": "0.29.1", + "upstreamFile": "NewPipe_v0.29.1.apk", + "url": "https://github.com/TeamNewPipe/NewPipe/releases/download/v0.29.1/NewPipe_v0.29.1.apk" + } + }, + { + "id": "jq", + "file": "jq-linux-amd64", + "bytes": 2267912, + "sha256": "b1c22172dd303f3be49e935aa56aa48a8b7a46e0bc838b4997d3bb451495870f", + "provenance": { + "project": "jq", + "version": "1.8.2", + "upstreamFile": "jq-linux-amd64", + "url": "https://github.com/jqlang/jq/releases/download/jq-1.8.2/jq-linux-amd64" + } + }, + { + "id": "openwrt.bin", + "file": "openwrt-25.12.5-ath79-generic-tplink_archer-c7-v5-squashfs-sysupgrade.bin", + "bytes": 7405862, + "sha256": "f15b16b36df7fce8a5cf1302320fdb428c3bb6fbc2949a4858afa257f4f364a2", + "provenance": { + "project": "OpenWrt Archer C7 v5", + "version": "25.12.5", + "upstreamFile": "openwrt-25.12.5-ath79-generic-tplink_archer-c7-v5-squashfs-sysupgrade.bin", + "url": "https://downloads.openwrt.org/releases/25.12.5/targets/ath79/generic/openwrt-25.12.5-ath79-generic-tplink_archer-c7-v5-squashfs-sysupgrade.bin" + } + }, + { + "id": "weth.hex", + "file": "weth-published.hex", + "bytes": 6251, + "sha256": "eb67ea4da28b88358df0385358bad3a58b131317835b45b3ede85c61851335e4", + "provenance": { + "project": "Published historical WETH runtime code example", + "url": "https://ethereum.org/developers/docs/apis/json-rpc/", + "contract_address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", + "published_block": "0x5daf3b", + "transport_sha256": "98c131a1bd99a0c2051dd6d6716fd306c36cdd45995d5ffd559bd9c690569c0f", + "derivation": "Parse the named eth_getCode JSON result from the official published example and preserve the hex carrier with one trailing LF", + "authority": "published historical RPC example; live retrieval returned HTTP 403; deployment authenticity remains unverified" + } + }, + { + "id": "sharex.helpers.dll", + "file": "ShareX.HelpersLib.dll", + "bytes": 1076224, + "sha256": "e91bd1ec904e2bb8a1add4bb6187443b878bf33d24fe9e27f0b799bfee9de33d", + "provenance": { + "project": "ShareX HelpersLib", + "version": "19.0.2", + "upstreamFile": "ShareX-19.0.2-portable.zip", + "url": "https://github.com/ShareX/ShareX/releases/download/v19.0.2/ShareX-19.0.2-portable.zip", + "transport_sha256": "967b5d838df5ce25fb5fd7cbd16f1bd797427e2df16907b022b74a4bc0fb9d54", + "transport_bytes": 168796487, + "derivation": "selected regular ZIP member ShareX.HelpersLib.dll; no target execution" + } + }, + { + "id": "sharex.exe", + "file": "ShareX.exe", + "bytes": 198656, + "sha256": "46af1ccc514b395cb703633abb5a505a771942b7db9b1915f31aeea541b3685f", + "provenance": { + "project": "ShareX native executable component", + "version": "19.0.2", + "upstreamFile": "ShareX-19.0.2-portable.zip", + "url": "https://github.com/ShareX/ShareX/releases/download/v19.0.2/ShareX-19.0.2-portable.zip", + "transport_sha256": "967b5d838df5ce25fb5fd7cbd16f1bd797427e2df16907b022b74a4bc0fb9d54", + "transport_bytes": 168796487, + "derivation": "selected regular ZIP member ShareX.exe; PE32+ x86-64 with no CLR directory; no target execution" + } + }, + { + "id": "freedos.edlin.exe", + "file": "EDLIN.EXE", + "bytes": 31492, + "sha256": "96b2b6d543e2d8bdc83e313756444e103339eb5ee2c1229abe3607539b31ad6e", + "provenance": { + "project": "FreeDOS EDLIN", + "version": "2.24", + "upstreamFile": "edlin.zip", + "url": "https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/repositories/1.4/base/edlin.zip", + "transport_sha256": "9db8a0b50bc4be5c2358cd0fa1fb6fc77342c6d5175a6b1084547c370e428f8a", + "transport_bytes": 377009, + "derivation": "selected regular ZIP member BIN/EDLIN.EXE; original UPX-compressed DOS MZ; APPINFO/EDLIN.LSM reports version; no execution or unpacking" + } + }, + { + "id": "vscode.tree-sitter.wasm", + "file": "tree-sitter.wasm", + "bytes": 206218, + "sha256": "3a31af706ffdf4a7116b064cdd4988df6791823298615009fc5b6bccbd42909b", + "provenance": { + "project": "VS Code Tree-sitter published WASM package", + "version": "0.3.1", + "project_url": "https://github.com/microsoft/vscode-tree-sitter-wasm", + "upstreamFile": "tree-sitter-wasm-0.3.1.tgz", + "url": "https://registry.npmjs.org/@vscode/tree-sitter-wasm/-/tree-sitter-wasm-0.3.1.tgz", + "transport_sha256": "985684b2cfbe5e8f90499a9f36e37519887c7d4e2697d0457d0f1e923ce5184c", + "transport_bytes": 2053205, + "transport_integrity": "sha512-RJFoomET6FajjG511fmQxeBQfU6M24a0aFZPqpid+ttIxanWf1VGytBG0UmsGjt07qmIPJS8U31D+aecuCucsQ==", + "derivation": "selected regular tar member package/wasm/tree-sitter.wasm; no target execution" + } + }, + { + "id": "vscode.tree-sitter-css.wasm", + "file": "tree-sitter-css.wasm", + "bytes": 128668, + "sha256": "8a23977fe271357cce6f254ef88c9bebf3854602d8046605aef6a45c02135c59", + "provenance": { + "project": "VS Code Tree-sitter published WASM package", + "version": "0.3.1", + "project_url": "https://github.com/microsoft/vscode-tree-sitter-wasm", + "upstreamFile": "tree-sitter-wasm-0.3.1.tgz", + "url": "https://registry.npmjs.org/@vscode/tree-sitter-wasm/-/tree-sitter-wasm-0.3.1.tgz", + "transport_sha256": "985684b2cfbe5e8f90499a9f36e37519887c7d4e2697d0457d0f1e923ce5184c", + "transport_bytes": 2053205, + "transport_integrity": "sha512-RJFoomET6FajjG511fmQxeBQfU6M24a0aFZPqpid+ttIxanWf1VGytBG0UmsGjt07qmIPJS8U31D+aecuCucsQ==", + "derivation": "selected regular tar member package/wasm/tree-sitter-css.wasm; no target execution" + } + }, + { + "id": "uniswap-v3.factory.hex", + "file": "UniswapV3Factory.runtime.hex", + "bytes": 49073, + "sha256": "fb152cc9b597ef4e54e9d72e81dd72c202050aae5e98c63df139864274504276", + "decoded_bytes": 24535, + "decoded_sha256": "95c34fe1e6b26c79ae42800041a3e2bdb6a978d19297cd74001ac6b316a48d8d", + "provenance": { + "project": "Uniswap v3-core UniswapV3Factory", + "version": "1.0.1", + "url": "https://registry.npmjs.org/@uniswap/v3-core/-/v3-core-1.0.1.tgz", + "transport_bytes": 86371, + "transport_sha256": "141b001e2a376fff867cb24e0713b2834095cb1250c13aae263d9a646446d329", + "transport_integrity": "sha512-7pVk4hEm00j9tc71Y9+ssYpO6ytkeI0y7WE9P6UcmNzhxPePwyAxImuhVsTqWK9YFvzgtvzJHi64pBl4jUzKMQ==", + "archive_member": "package/artifacts/contracts/UniswapV3Factory.sol/UniswapV3Factory.json", + "compiler_artifact_bytes": 104076, + "compiler_artifact_sha256": "599479f60ebb056804aff7b2d05bdd0830ddbb1fdfaa0b6c62c02294ca7188b0", + "derivation": "Parse the exact published Hardhat deployedBytecode field and preserve its original hex carrier with one trailing LF; preserve template placeholders", + "authority": "Published compiler runtime template, not a live deployed instance; original placeholders/immutables preserved; no execution or chain lookup", + "published_abi_function_count": 7, + "deployed_link_references": {}, + "immutable_references": { + "recorded": false, + "value": null + }, + "immutable_scope": "Published Hardhat artifact does not record an immutable-reference map; absence is unknown, not proof of no immutables. Runtime template bytes remain exact." + } + }, + { + "id": "uniswap-v3.pool.hex", + "file": "UniswapV3Pool.runtime.hex", + "bytes": 44287, + "sha256": "84d90218eb125074383287877cdc564eca3765241e3bf6f6afdd64a922fbed2b", + "decoded_bytes": 22142, + "decoded_sha256": "3ef71385c2a22b945bead7904f24b25db877de9db51d1401f2f9daea07ea5c0c", + "provenance": { + "project": "Uniswap v3-core UniswapV3Pool", + "version": "1.0.1", + "url": "https://registry.npmjs.org/@uniswap/v3-core/-/v3-core-1.0.1.tgz", + "transport_bytes": 86371, + "transport_sha256": "141b001e2a376fff867cb24e0713b2834095cb1250c13aae263d9a646446d329", + "transport_integrity": "sha512-7pVk4hEm00j9tc71Y9+ssYpO6ytkeI0y7WE9P6UcmNzhxPePwyAxImuhVsTqWK9YFvzgtvzJHi64pBl4jUzKMQ==", + "archive_member": "package/artifacts/contracts/UniswapV3Pool.sol/UniswapV3Pool.json", + "compiler_artifact_bytes": 111557, + "compiler_artifact_sha256": "204fb2fa7ad1a639b1df5601f035f9924b064b721b97adf60c7d5d4712643e34", + "derivation": "Parse the exact published Hardhat deployedBytecode field and preserve its original hex carrier with one trailing LF; preserve template placeholders", + "authority": "Published compiler runtime template, not a live deployed instance; original placeholders/immutables preserved; no execution or chain lookup", + "published_abi_function_count": 26, + "deployed_link_references": {}, + "immutable_references": { + "recorded": false, + "value": null + }, + "immutable_scope": "Published Hardhat artifact does not record an immutable-reference map; absence is unknown, not proof of no immutables. Runtime template bytes remain exact." + } + }, + { + "id": "localsend-arm64.apk", + "file": "LocalSend-1.18.2-android-arm64v8.apk", + "bytes": 46558706, + "sha256": "82ec3568fba2aa5295b9aae8b76f701d7a4703d86b9f8bad749472038fbaeab3", + "provenance": { + "project": "LocalSend", + "version": "1.18.2", + "upstreamFile": "LocalSend-1.18.2-android-arm64v8.apk", + "url": "https://github.com/localsend/localsend/releases/download/v1.18.2/LocalSend-1.18.2-android-arm64v8.apk", + "transport_sha256": "82ec3568fba2aa5295b9aae8b76f701d7a4703d86b9f8bad749472038fbaeab3", + "transport_bytes": 46558706, + "derivation": "Official arm64 release APK, compared with GitHub release asset digest; byte-only analysis without execution" + } + }, + { + "id": "qgis-world-map.gpkg", + "file": "qgis-world-map.gpkg", + "bytes": 12914688, + "sha256": "01d293159d1b77bd9212b5252587853f61aa9e25b2387135f34afaba8d057190", + "provenance": { + "project": "QGIS bundled world map", + "source_commit": "e1223b8e9e71fc50ee995ed556f711c54ccc101b", + "git_blob_sha1": "c9ff80228dff0de93c9acdef16a97545ba360244", + "url": "https://raw.githubusercontent.com/qgis/QGIS/e1223b8e9e71fc50ee995ed556f711c54ccc101b/resources/data/world_map.gpkg", + "derivation": "unmodified official resource file; streaming Git blob and SHA-256 verification" + } + } + ] +} diff --git a/experiments/analysis-efficiency/evm-descriptor.md b/experiments/analysis-efficiency/evm-descriptor.md new file mode 100644 index 000000000..0fcdf4d44 --- /dev/null +++ b/experiments/analysis-efficiency/evm-descriptor.md @@ -0,0 +1,218 @@ +# EVM descriptor and real-template checkpoint + +Continues [#2016](https://github.com/morluto/rea/issues/2016) after the native +checkpoint merged. The internal descriptor binds the existing exact EVM +contract, CLI name and typed service lifetime. Existing complete inputs, output, +provider selection and cleanup remain the baseline. Wiring alone does not establish +token or latency savings. + +The descriptor contains only the named contract, existing CLI name and existing +factory. The legacy `createEvmInterfaceService` export remains usable. The MCP +host selects one complete service instance, preserves injection identity, passes +that same instance to registration and retains it for cleanup/retry. No bound +service wrapper, generic registry, automatic dependency acquisition or new pack +selection is introduced. + +Five actual in-memory SDK boundary scenarios verify converted schemas, duplicate +registration rejection before use, malformed inputs, explicit unavailable or +incompatible-output failures with a healthy WASM peer, cleanup retry, and request +cancellation followed by recovery. Their injected ports are recording seams, not +real EVMole/WABT claims. Nine service and 26 provider-boundary cases also pass; +two unsupported-host scenarios are skipped on this Linux host. The existing seven +WASM MCP scenarios pass. Full `npm run check` passes; its approximately 3 GiB +sampled peak and `memory.high` events are excluded from performance claims. +Candidate real-artifact/catalog and model observations are recorded below. + +## Public inputs and independent checks + +[corpus.json](corpus.json) retains the original WETH historical example and adds +Uniswap v3-core 1.0.1 Factory/Pool compiler runtime templates from the official npm +package. Archive integrity, exact regular member, compiler JSON, original carrier +and decoded-byte digests are pinned. The carrier is the original `deployedBytecode` +field plus one trailing LF. No placeholder is rewritten and no contract is executed. + +These are compiler templates, not live deployed instances. Their published Hardhat +artifacts omit immutable-reference maps; that metadata remains explicitly unknown. +The recorded empty link-reference maps do not establish absence of immutables. +WETH remains a published historical RPC example, with unknown live authenticity. + +Actual control CLI observations infer 7 Factory and 26 Pool functions. The +[independent verifier](verify-evm-template.mjs) hashes each canonical published ABI +signature with caller-supplied Ethereum Keccak and checks the complete ABI-dispatch +selector multiset against the original REA response. Both sets match. This does not +establish inferred argument/mutability equivalence, deployment authenticity or +runtime semantics; all producer unknowns remain visible. + +## Latest-main control + +Production control: `1770f38cfc6cbe87491d0de8b8730c305c5cf8ea`, Node 24.18.0, +npm 11.16.0, matching locked dependencies and unchanged EVMole 0.9.3. +The frozen `dist/`/`bridge/` file-table SHA-256 is +`7fd6c2c37b4e166df158ec29d48d31f3712b9b087d9807ee019ee997d06ea144`. +Measurement driver SHA-256 is +`f767c0c0232be1e11918e70e3197a6919680d16688076bef28d4320662f712f7`. +Each public SDK run validates the selected named advertised schema and verifies +original carrier and decoded identities, inference/unknown scope and unchanged +input bytes. All three runs return the same complete 2,420,709-byte catalog. + +| Question | Inferred functions | SDK tool-result JSON bytes | First workflow seconds | +| ------------------------ | -----------------: | -------------------------: | ---------------------: | +| WETH historical carrier | 11 | 26,760 | 11.432 | +| Uniswap Factory template | 7 | 110,424 | 3.628 | +| Uniswap Pool template | 26 | 110,998 | 11.211 | + +These are initial observations, not paired performance conclusions or model-token +counts. Each workflow includes connection, complete catalog discovery and one +interface query. Full bytecode remains inline. Candidate/control repetitions must +use the same source driver, inputs, provider settings and Node/worker limits. + +Preparation against earlier frozen main `b1bf4a70d44191348ca20a91a52fb663da4daed0` +also passed all 59 cases of the existing real CLI/MCP EVM verifier with privately +supplied solc 0.8.30 and strace 6.1. Those cases cover compiler configurations, +raw/hex identity, malformed/unsupported carriers, missing limiter and resource +constraints. Its measured scope took 233.1 seconds, sampled peak 1,192,730,624 +bytes and last-observed CPU 181.018 seconds. This is a control, not candidate proof. + +All heavy runs are serial under one CPU, 4 GiB hard memory/3 GiB early-stop, no swap +and bounded tasks. Final cgroup counters disappear at scope teardown and remain +unverified; last-observed zero limit events are not substituted for final counters. +Raw replies, tools, compiler artifacts and detailed receipts remain outside Git. + +## Reproduction + +Build and freeze each pinned runtime using the repository toolchain, then run +`measure.mjs --artifact uniswap-v3.factory.hex` or `uniswap-v3.pool.hex` with the +exact derived carrier, `--schemas selected`, explicit runtime/revision and a fresh +private output directory. Existing `weth.hex` answer fields and invocation remain +unchanged. The same common workflow verifies all three offline carriers. + +Run `verify-evm-template.mjs` with `--artifact` selecting the corpus ID, +`--artifact-json` selecting its original published compiler JSON, `--evidence` +selecting the recorded CLI Evidence or SDK structured reply, `--keccak-module` +selecting the absolute `js-sha3/src/sha3.js` module from the private solc toolchain, +and `--output` selecting a new private receipt. It acquires no dependencies and +does not overwrite an existing receipt. + +The [template model question](questions/evm-uniswap.txt) requires the same complete +inferred interface facts and explicit unknowns. An ABI-count match is not used as +a model grade. + +## Candidate compatibility and real-provider verification + +Candidate: `152984da771450048ee9d60db8a410994a125878`, frozen runtime file-table +SHA-256 `725563640c27eb50ddb6f977d2dfbe1bdaddf7e05c02897318bceaa36fa602d7`. +Two repetitions for each EVM input produce six passing paired fact/settings +comparisons with the same driver and explicit limits. Each report preserves both +original Evidence reference maps. The complete actual SDK catalog is byte-identical +on every pair, including order, names, descriptions, schemas and annotations; +catalog SHA-256 is +`8664e42fd5225645cfd910f440f731c67ac198d3d53aa85b5c485374c74cf603`. +Result byte counts remain unchanged. Candidate Factory/Pool selectors also match +the independent published ABI oracle. + +| Question | Control seconds, repetitions 1 / 2 | Candidate seconds, repetitions 1 / 2 | +| -------- | ---------------------------------: | -----------------------------------: | +| Factory | 3.628 / 3.650 | 3.708 / 3.605 | +| Pool | 11.211 / 3.591 | 3.749 / 3.581 | +| WETH | 11.432 / 3.694 | 3.572 / 3.677 | + +First controls preceded wiring; each second pair ran candidate then control. +Every measurement starts a new MCP process; host cache/page state is not fully +controlled. Slower initial controls do not establish a descriptor speedup. +Second-pair latency and last-observed CPU are similar. Sampled EVM SDK family peaks +range from 510,255,104 to 527,622,144 bytes. No scope abort occurred; final counters +remain unknown, so these measurements are descriptive. + +The candidate passes all 59 existing real CLI/MCP verifier cases with solc 0.8.30 +and unchanged EVMole 0.9.3. Actual syscall traces report target execution and network +sockets absent for those scenarios, and the verifier reports no remaining +descendants. The scope took 177.456 seconds, sampled peak 1,237,020,672 bytes and +last-observed CPU 144.913 seconds. Different totals from the earlier control are +not attributed to unchanged provider algorithms. + +Post-descriptor public MCP regression uses the original pinned shipped corpus: + +| Domain / selected question | Actual provider / scope | Calls | Seconds | +| ------------------------------------------- | -------------------------------------------------- | ----: | ------: | +| SQLite WASM counts / exports | WABT 1.0.42; selected summary and retained read | 2 | 5.516 | +| ShareX managed metadata / native boundaries | Static PE/CLI, no assembly execution | 2 | 3.710 | +| Obsidian manifest / inventory | Complete inventory retained, no AST claim | 4 | 5.376 | +| NewPipe package / MainActivity methods | Real headless JADX 0.7.1 | 3 | 21.669 | +| OpenWrt regions | Real firmware signature scan, no device execution | 1 | 3.581 | +| jq native entry | Ghidra 12.1.4, default analysis, ephemeral Program | 4 | 270.986 | + +All six workflows pass named SDK output validation and original digest checks; +input bytes remain unchanged. Maximum sampled family peak is 1,284,648,960 bytes. +They establish those available Linux workflows, not paired performance or +Windows/macOS, IDA/Hopper, Android-device, DOS COM, browser or JavaScript AST +behavior. Browser/AST were not repeated for this narrow migration. + +## Real model complete-output calibration + +Six serial Codex CLI 0.161.0 trials request `gpt-5.6-terra`, high reasoning, with +isolated temporary profiles pointing to the frozen candidate. Resolved server-side +model identity is not inferred. Only the EVM inspection tool is enabled, matching +the earlier WETH calibration; this is not full-catalog tool selection verification. +Every trial makes one successful call and no failed call. + +| Trial | Total input | Uncached input | Output | Seconds | +| --------- | ----------: | -------------: | -----: | ------: | +| Factory 1 | 66,158 | 36,974 | 1,329 | 43.483 | +| Pool 1 | 65,600 | 36,416 | 2,307 | 69.546 | +| WETH 1 | 54,700 | 25,516 | 1,144 | 56.372 | +| Factory 2 | 65,964 | 36,780 | 1,453 | 26.412 | +| Pool 2 | 65,753 | 36,569 | 1,939 | 74.706 | +| WETH 2 | 54,502 | 25,318 | 1,208 | 35.137 | + +Every trial reports 29,184 cached input tokens. Selected fact/reference/lifecycle +grades all pass: original/decoded identities, every inferred selector, offset, +dispatch, argument/mutability string including null, explicit unknowns, no runtime +execution, observed Evidence references, unchanged bytes and removed profiles. +Raw transcripts and grades remain private. Sampled peaks are +594,853,888–776,335,360 bytes; last-observed CPU is 6.181–7.034 seconds. Strict +overall grades remain unverified because final resource counters are unknown; +they are not relabeled as wholly passing resource-qualified runs. + +This calibrates the current complete path after compatible wiring, not a paired +model performance experiment. The next token experiment should answer the same +interface question through an explicitly selected precise view, retain full +bytecode/original Evidence under the existing lifetime, and preserve complete +defaults. Discover support before sending new options to an older server. Include +discovery, follow-up, failures and retries in the complete task cost. + +## Static contract admission verification + +The follow-up from main `c462a4ebd3a10e59253bcf38353a0914b176738b` tests the +pilot's actual static boundary, without adding a dynamic module registry or +changing production code. Complete-project TypeScript checking now verifies +that the inferred descriptor type rejects a WASM operation contract, a WASM +CLI command, a WASM service factory, an unrelated input schema and an unrelated +output schema. These are negative assignability assertions: their guarantee +comes from the compiler, not from executing an incompatible descriptor. +The existing named contract and CLI identity are also checked at runtime; +separate factory calls produce distinct service/provider owners. Invalid target +input remains an application error without launching a worker. + +The actual public in-memory MCP SDK test additionally spies on the provider: +duplicate EVM registration throws the named `already registered` error before +any provider call. Converted input/output JSON Schemas validate before the +first valid operation. Invalid client arguments are rejected before execution; +incompatible provider reply data is validated **after** execution and is not +presented as a pre-use contract guarantee. Existing healthy-peer, cancellation, +retained summary/default and cleanup-retry scenarios remain covered. + +Full project typecheck passes with the installed compiler's supported single +thread scheduling; it includes all source/test files. The two exact focused +files pass 12 runtime cases. The resource scopes sample 2,057,961,472 bytes for +typecheck and 2,426,290,176 bytes for required build plus focused tests, below the +unchanged 3 GiB early-stop/4 GiB hard ceiling. Final transient-cgroup counters +remain unknown. No new real-provider or performance improvement is claimed by +these compile/SDK checks; the earlier pinned real EVMole/WABT/lifecycle evidence +retains its original scope and source identity. + +This proves the one statically composed descriptor's named/schema/factory +compatibility and duplicate-registration guard. It does not implement runtime +admission of arbitrary JavaScript descriptors, third-party plugin ABI/version +negotiation or a general plugin SDK. Those remain deferred by the original plan. +Existing callers, full defaults, provider inputs, owned lifetimes and output +identities are unchanged. diff --git a/experiments/analysis-efficiency/evm-interface-summary.md b/experiments/analysis-efficiency/evm-interface-summary.md new file mode 100644 index 000000000..cbc793a5b --- /dev/null +++ b/experiments/analysis-efficiency/evm-interface-summary.md @@ -0,0 +1,208 @@ +# EVM interface delivery and migration checkpoint + +Continues [#2016](https://github.com/morluto/rea/issues/2016) after the static +descriptor merged in [#2261](https://github.com/morluto/rea/pull/2261). Opt-in +`inspect_evm_interface` MCP `detail: "summary"` returns every inferred interface +candidate without bytecode hex or duplicate stdout. Complete Evidence remains +retained under its original identity. Delivery bytes fall; the measured model +cohort does **not** establish a stable token or task-time improvement. + +## Frozen scope + +Control production is `ad08510a113d7a9b8d92fb1e385757880e469869`; candidate +production is `32c7548b9ae5c8cda348653d177b1747127c74ba`. Their compiled file-table +SHA-256 values are respectively +`f68e85030cb05082520ea9f0d7650298ae316ce7bba59a8942e0cc1318ae9850` and +`978b3a014e3b2a1e1c6620364dcd793fa7cb40f19892d44cfb0312739a8c14a3`. +The SDK driver SHA-256 is +`a95d8d8e9f72c0b2b885c61907ed13054ebf7d1642f6f13b0126163840b1221a`. +Driver commit `03bff83e70e09a917341c1fe3ebffbfdc67785c5` fixes only reading the +public `get_evidence_bundle.result.records` envelope; production is unchanged. +Both runtimes use Node 24.18.0, matching locked dependencies, SDK client/server +2.3.1 and unchanged bundled EVMole 0.9.3. + +Inputs are the digest-pinned WETH historical hex carrier and Uniswap v3-core +1.0.1 Factory/Pool compiler runtime templates in [corpus.json](corpus.json). +Original carrier and decoded-byte identities remain distinct. Templates are +not authenticated deployed instances; constructor-dependent values and absent +immutable-reference metadata stay unknown. No chain, target execution or +signature lookup is introduced. + +## Public SDK pairs + +Two pairs per artifact run serially: complete control then selected candidate, +followed by candidate then control. Each starts a fresh MCP process, discovers +the catalog and validates the actual named advertised schema. Host caches are +not independently controlled. All six fact/settings comparisons pass. Both +answer projections omit unrequested hex; original complete replies remain intact. + +| Input | Complete / summary result bytes | Reduction | Control seconds, 1 / 2 | Candidate seconds, 1 / 2 | +| ------- | ------------------------------: | --------: | ---------------------: | -----------------------: | +| Factory | 110,424 / 14,442 | 86.92% | 3.670 / 3.766 | 3.664 / 3.867 | +| Pool | 110,998 / 19,922 | 82.05% | 4.110 / 3.740 | 3.977 / 3.870 | +| WETH | 26,760 / 15,378 | 42.53% | 3.671 / 3.710 | 3.930 / 3.673 | + +These measurements support smaller delivery, not faster interpretation. Analysis +still runs and the full parent still incurs producer/retention costs. Catalog +count and order stay at 184 tools. The complete catalog grows from 2,422,229 to +2,429,938 compact JSON bytes (+7,709); all name/description/input definitions +grow from 512,655 to 514,074 bytes. The EVM input definition grows from 1,443 to +2,029 bytes. Only `inspect_analysis_view` and `inspect_evm_interface` definitions +change. These discovery costs are visible and are not converted into token counts. + +Nine separate measurements verify new-server complete defaults, old-server +summary fallback and retained reads for all three inputs. The four-call retained +proofs retrieve the complete canonical parent plus pages and cost 160,110, +177,106 and 79,160 bytes for Factory, Pool and WETH respectively. They are +verification workflows, not examples of one-call delivery savings. + +## Real Codex pairs and answer qualification + +Twelve serial Codex CLI 0.161.0 trials use the existing identical questions for +each pair, the same artifact path, one enabled EVM tool, temporary MCP profiles +and requested `gpt-5.6-terra` high. The requested alias is not proof of the +resolved model identity. Trials include schema discovery, reasoning, one actual +successful EVM call and final answer. No call fails or retries. Profiles are +removed and input bytes remain unchanged. This fixed one-tool profile does not +test selection from the full catalog. + +| Input / repetition | Uncached input, control → candidate | Seconds, control → candidate | Candidate delivery | +| ------------------ | ----------------------------------: | ---------------------------: | ------------------ | +| Factory / 1 | 22,901 → 25,668 | 52.485 → 48.768 | summary | +| Factory / 2 | 37,181 → 15,270 | 53.404 → 45.345 | summary | +| Pool / 1 | 36,652 → 26,657 | 57.764 → 66.642 | summary | +| Pool / 2 | 28,305 → 36,259 | 62.068 → 71.756 | complete | +| WETH / 1 | 21,128 → 25,187 | 44.869 → 46.809 | summary | +| WETH / 2 | 17,417 → 17,529 | 30.364 → 39.943 | summary | + +Keep all trials, including the candidate that explicitly chose complete delivery. +Five of six candidates select summary, but uncached input improves in only two +pairs and time improves in only two. Aggregate control → candidate observations +are 362,496 → 357,770 total input; 198,912 → 211,200 cached input; +163,584 → 146,570 uncached input; 8,953 → 10,397 output; and +300.954 → 319.263 seconds. Cache state and model/service variation are not +separated; the aggregate does not establish a repeatable saving for an individual +question or a qualified performance recommendation. + +Every answer passes exact core-field checks: both identities/byte counts, every +function selector/offset/dispatch/argument/mutability including null, inference, +unknown completeness/kind/hardfork/authenticity, and absent runtime execution. +All reported IDs occur in actual responses. However, the existing grader requires +the final limitation list to equal the producer list verbatim and in order. +Only three trials pass that additional check; nine fail. The questions request +preserving limitations but do not explicitly request a verbatim ordered list. +Four failures contain all original strings with extra correct scope statements +or different ordering. The other five paraphrase or omit source caveats, including +worker or upstream-metadata limitations. Do not silently waive those omissions +or turn these into twelve fully acceptable answers. The strict reports and +original transcripts remain intact; core-field success is a narrower result. + +Model scope sampled peaks range from 562.5 to 710.5 MiB, with last-observed CPU +5.945–6.878 seconds. CPU includes the local process family, not remote model +computation. All heavy jobs use one CPU, a 4 GiB hard limit, 3 GiB early-stop, +no swap and 192 tasks. No scope abort occurs in this cohort. Final cgroup +counters are unavailable after teardown: final OOM/task/limit-event assertions +remain **unverified**. Last-observed counters are not substituted for final ones. +Consequently neither strict answer acceptance nor resource-qualified performance +success is claimed for the whole cohort. + +## Existing-user compatibility + +Omitted and explicit-complete MCP requests, the existing CLI and provider inputs +preserve their full behavior. `detail` is removed before the unchanged provider +input; original full Evidence parameters, raw result and identity are retained. +Summary receives its own identity linked to that parent. All candidate facts, +original report limitations, stderr/truncation and explicit unknowns stay inline. +Complete-within-view candidate coverage is not global discovery completeness. +Function pages retain original order; text pages use UTF-16 code units, with +hex characters distinguished from decoded-byte function offsets. + +Actual new default replies for all three artifacts validate against the frozen +old advertised input/output schemas, and structured/text payloads agree. Older +servers reject neither request nor unsupported fields because the experimental +client discovers support before selecting summary and otherwise calls complete. +This is an explicit client fallback, not universal server forward compatibility. + +Three authentic old-runtime records and old-created canonical bundles pass new +MCP import, retained summary, CLI inline summary and export. Original records, +IDs and bundle source bytes stay deeply equal. The reproducible verifier below +also checks function/hex pages with the analysis limiter explicitly unavailable, +so retained reads cannot silently start successful producer analysis. This +proves the pinned old/new Linux workflows, not every historical client release. + +The initial retained experiment failed because its driver read the bundle's +wrong envelope. Correcting that consumer produced passing retained proofs; the +failed receipt stays archived and is not recorded as a REA defect. Separately, +one static-check attempt hit the unchanged 3 GiB early-stop. The bounded retry +passes with Node heap 512 MiB/native checker memory controls; its roughly 3 GiB +peak and soft-limit events are excluded from efficiency comparisons. + +## Reproduction and checks + +Use [the shared instructions](README.md), explicit frozen revisions/runtimes and +fresh private output directories. Run `measure.mjs` for `weth.hex`, +`uniswap-v3.factory.hex` and `uniswap-v3.pool.hex`, with `--schemas selected` and +paired `--delivery complete` / `summary`; run `compare.mjs` on equivalent pairs. +Add `--verify-retained` only for the separate four-call proof. Use the unchanged +[WETH](questions/evm.txt) or [template](questions/evm-uniswap.txt) question and the +same one-tool profile for `agent-trial.py`, preserving all usage and grader results. + +Export complete Evidence with the old runtime's public ledger workflow, then run: + +```sh +node experiments/analysis-efficiency/verify-evm-retention.mjs \ + --runtime-root ABS_FROZEN_NEW_RUNTIME --revision NEW_SHA \ + --bundle ABS_OLD_BUNDLE_JSON --output NEW_PRIVATE_ABS_DIR +``` + +The script acquires no dependencies and preserves the old bundle. Revision is +caller-supplied; retain the frozen file-table receipt alongside it. Raw JSON, +transcripts, profiles, bytecode, compiler inputs and generated artifacts stay +outside Git. This checkpoint adds source verification and curated observations. + +The production change passes 64 focused EVM/WASM/generic-view/domain/service +checks and full static/docs gates. Recording provider seams establish exact +schemas, old defaults, inference/null preservation, historical identity failures, +peer availability, cancellation and cleanup retry; they are not real-provider +claims. Real-provider and shared-domain checks are recorded separately. + +The same frozen candidate also passes six actual public MCP artifact workflows: +SQLite WASM with WABT summary, ShareX managed metadata, Obsidian inventory, +NewPipe with JADX, an OpenWrt region inspection, and jq entry analysis with +Ghidra. These are shared-contract regressions; they do not establish AST analysis +of all Obsidian code, full firmware reconstruction, browser coverage, or new token +savings in those domains. Native Windows PE and DOS coverage remains at the +[earlier native checkpoint](native-entry-views.md), not a new Ghidra/Windows claim. +The source retention verifier passes for all three authentic old EVM bundles, +including exact summaries, function/hex pages, CLI inline views and unchanged +exported originals with the limiter explicitly unavailable. + +The frozen candidate passes all 59 existing real EVM CLI/MCP verifier cases with +caller-supplied solc 0.8.30 and strace 6.1, including malformed/unsupported +carriers, unavailable limiter and capacity failures. Its scope takes 96.076 +seconds with 1,345,052,672 sampled peak bytes and 95.130 last-observed CPU seconds. +This is regression evidence, not an interpreter speedup comparison; final +resource counters remain unverified. Fresh fast static and generated-document +checks also pass after adding the migration verifier and this report. + +## Latest-main integration + +The branch rebases without conflict onto main +`0043d9b134c0a353e8bf85c0bde4492275f1f720`. Production integration commit +`3766749316c345ccb594b1b748747b1af9582b34` preserves the same EVM projection, +provider and delivery semantics; intervening main adds unrelated capabilities. +The above performance cohort stays pinned to its original frozen runtimes and +is not relabeled as a measurement of the larger integrated catalog. + +At `cda794fb9d4a5ca2bd661853a899d579fb8a47b2`, all 30 affected EVM/WASM/generic-view +MCP tests pass again, as do full `npm run check` and `npm run docs:check`. A fresh +real Factory SDK selected-summary/retained-parent/page workflow and the original +Pool bundle's SDK/CLI migration verifier also pass against the rebuilt integrated +runtime. The latter still has an explicitly unavailable analysis limiter. + +The initial integrated static-check scope stops at 3,221,446,656 sampled bytes, +just above the unchanged 3 GiB early-stop. Running the same typecheck through +its single Turbo task with less launcher overhead passes at 3,219,353,600 sampled +bytes; the subsequent full gate uses that valid cached typecheck and passes. +No memory threshold or check requirement is relaxed. Preserve both receipts; +these near-limit validation jobs are excluded from efficiency conclusions. diff --git a/experiments/analysis-efficiency/evm-lifecycle.md b/experiments/analysis-efficiency/evm-lifecycle.md new file mode 100644 index 000000000..f02895b45 --- /dev/null +++ b/experiments/analysis-efficiency/evm-lifecycle.md @@ -0,0 +1,159 @@ +# EVM descriptor lifecycle acceptance + +Continues [#2016](https://github.com/morluto/rea/issues/2016) after +[#2349](https://github.com/morluto/rea/pull/2349) merged. The +[public verifier](verify-evm-lifecycle.mjs) exercises actual compiled CLI and +stdio MCP workflows with unchanged EVMole 0.9.3/WASM. This increment adds +verification only; production contracts, factories, algorithms and defaults +remain unchanged. It does not introduce a plugin SDK or database cache. + +## Runtime and public artifacts + +The verified runtime is explicitly frozen from +`67f817e3653efad35f7044e68fbd6f163b86864b`, built with Node 24.18.0 and the +matching locked dependencies. Its `dist/` and `bridge/` file-table SHA-256 is +`cf03167870ac9def929cfaab536d6bd791089031660d1b35bff20672ac07cbbf`. +The table is checked again after each workflow; source and target bytes must +remain unchanged before a success receipt is published. + +Inputs are the digest-pinned [corpus](corpus.json): published historical WETH +and official Uniswap v3-core 1.0.1 Factory/Pool compiler runtime templates. +They are not independently authenticated live deployments. Their deployment, +hardfork, immutable-reference and inferred-interface limitations remain as +recorded in [the descriptor checkpoint](evm-descriptor.md). The healthy peer +is the shipped SQLite WASM 3.53.4-build1 module, inspected by real WABT 1.0.42. +No contract, native target, chain/RPC query or transaction is executed. + +## Actual cancellation and retained cleanup + +The verifier supplies a private test launcher through the existing explicit +`REA_EVM_PRLIMIT_COMMAND` setting. It passes the original arguments to real +`/usr/bin/prlimit`, runs the unchanged Node/EVMole worker, then briefly gates +launcher completion after that worker exits and writes its complete reply. +This controls a real lifecycle boundary without replacing the analysis engine. +It adds process overhead and is not a performance comparison. + +Before cancellation or permission changes, production inspection primitives +verify the live launcher's run token, parent/group relationship and native +start identity. The complete worker reply must match the original selected +bytecode and producer facts. Filesystem changes apply only to the verified, +non-root user's temporary runtime directory. + +Three scenarios are verified: + +- **Late cancellation:** the real worker has completed, while the public SDK + request remains pending. SDK cancellation reports `REQUEST_TIMEOUT` locally; + token sweeps and directory removal independently confirm provider cleanup. + A subsequent complete request returns identical analysis facts. +- **Successful analysis followed by cleanup failure:** removing write permission + produces actual `EACCES`. MCP reports `cleanup_incomplete` and retains the + original resource path. A retry before permission repair fails on that same + resource. Real SQLite WASM analysis still succeeds. Restoring permission lets + the provider retire the old resource and perform a fresh complete EVM query. +- **Format failure followed by cleanup failure:** a deliberately malformed + odd-nibble carrier reaches the unchanged worker. The cleanup error preserves + its original `invalid_input` category and exact producer diagnostic rather + than overwriting the failure. The same repair/retry and healthy-peer checks + succeed. + +The existing CLI `inspect-evm-interface PATH hex --json` produces the same +complete normalized facts, parameters and subject as MCP. Fresh Evidence IDs +are not equated. Final verifier lineage is checked after client/transport close; +an empty descendant list is a point-in-time observation, not proof that the +workflow never launched children. Cleanup callbacks always run and preserve +verification and cleanup failures together. + +This proves cancellation after actual analysis, not interruption inside +EVMole's synchronous WASM computation. Server-shutdown cleanup retry still has +the separately labeled injected-owner SDK tests from the descriptor checkpoint. +These Linux x64 observations do not establish Windows/macOS provider behavior. +Earlier real CLI/MCP malformed/unavailable/capacity checks remain linked in the +descriptor checkpoint; they are not silently rerun or attributed to this script. + +## Measurements and compatibility scope + +Initial three-carrier verifier source SHA-256 is +`2fec069b53324ef82070d323b26dd613b6da0caa7f18100adbeb39b045cf98dc`. +All three carriers pass all three scenarios and CLI parity with this same source. + +| Carrier | Seconds | Sampled peak family bytes | Last-observed CPU seconds | +| ------- | ------: | ------------------------: | ------------------------: | +| WETH | 25.595 | 1,116,884,992 | 23.926 | +| Factory | 23.979 | 1,132,994,560 | 23.419 | +| Pool | 24.589 | 1,141,415,936 | 24.043 | + +Runs are serial under the existing one-CPU quota, 4 GiB hard memory, unchanged +3 GiB early-stop, no swap and 192-task ceiling. Resource receipts, complete +producer replies, derived malformed input, launcher and runtime copies stay in +the private lab outside Git. Final cgroup counters disappear at scope teardown +and remain unknown; sampled zero events do not prove final no-OOM/no-limit +results. This is compatibility and recovery evidence, not a model-token, +whole-task latency or CPU saving claim. + +Latest main `81cca2e0e3ebd98c21f41d7ad63d6a00e4cbc3f9` could not build during +setup: its shared partial-error handler passes three arguments to an interface +requiring four. Independently completed main CI at +`fdd8f826023c568937d237c2f97d855de283a9b8` reports the same TypeScript failure +([run 38309578208](https://github.com/morluto/rea/actions/runs/38309578208)). +The unrelated regression is recorded in the maintainer-requested private bug +handoff; this change does not repair it. The maintainer independently corrected +the producing caller in main `8fc2043eb8bcedbf34dce064f977e455438635d6`. +The frozen-runtime observations above remain pinned to their original revision; +synchronizing the branch does not relabel them as latest-main verification. + +After rebasing, a fresh build and all 10 focused EVM MCP boundary tests pass. +The same unchanged source verifier also passes all three real Factory scenarios, +CLI parity, healthy SQLite WASM checks and final cleanup on the newly built +runtime `b3eadf147221a2fa997ac26667a183ca5bccb1f4` (parent is corrected main +`8fc2043eb8bcedbf34dce064f977e455438635d6`). Its `dist/`/`bridge/` file-table +SHA-256 is `7a4cec0fa4f7e929356b50a6b13472f80bd6f526221e427125370cca3ef98d00`. +This related rerun takes 24.285 seconds, samples 1,146,167,296 peak family bytes +and records 23.662 last-observed CPU seconds. The older failed build and earlier +cohort receipts are preserved; wider domain/model matrices are not repeated. + +Static composition continues to bind one named canonical contract and one +typed factory. Existing SDK checks reject duplicate registration before use +and reject malformed inputs before invoking the provider. Producer contract +violations are detected when the producer returns a result; they cannot be +validated in advance without that result. A dynamic third-party module ABI +preflight is not implemented or claimed. The corresponding broader acceptance +item remains open rather than creating the deferred generic plugin registry. + +## Final launcher review + +A missing gate marker while gating is disabled cannot establish absence of a +new launch. The fixture now appends a launch record before starting the actual +worker; both permission-failure retries must leave that log byte-identical. +This independently verifies that retained cleanup failure stops a new EVM +launch, while preserving the original resource and healthy WASM peer. + +Final verifier source SHA-256 is +`fc9a50e2e54e4c8eede4b8a19283e11ddaa1faadea52eebc390b55b5a1902668`. +All three related real Factory scenarios, CLI parity and final cleanup pass +again on the corrected-main runtime: 23.579 seconds, 1,163,685,888 peak sampled +family bytes and 23.110 last-observed CPU seconds. The earlier three-carrier +receipts remain pinned to their earlier source; wider artifacts/models are +not repeated for this review fix. + +## Reproduction + +Build and freeze the explicit source revision as documented in the measurement +README. Supply an object of explicit string-valued provider settings, including +the caller-installed WABT paths. As a non-root Linux x64 user, run under the +existing resource wrapper: + +```bash +python3 experiments/analysis-efficiency/resource-run.py -- \ + node experiments/analysis-efficiency/verify-evm-lifecycle.mjs \ + --runtime-root /absolute/frozen-runtime \ + --revision 67f817e3653efad35f7044e68fbd6f163b86864b \ + --path /absolute/UniswapV3Factory.runtime.hex \ + --peer-path /absolute/sqlite3.wasm \ + --providers /absolute/explicit-providers.json \ + --output /absolute/new-private-receipt-directory +``` + +The verifier checks the carrier and SQLite module against the committed corpus, +creates an owner-only receipt directory without overwriting existing receipts, +and acquires no dependencies. Preserve failed attempts separately. A shorter +reply or a successful cleanup verifier does not establish an agent-cost gain. diff --git a/experiments/analysis-efficiency/flutter-aot-summary.md b/experiments/analysis-efficiency/flutter-aot-summary.md new file mode 100644 index 000000000..8893cd917 --- /dev/null +++ b/experiments/analysis-efficiency/flutter-aot-summary.md @@ -0,0 +1,160 @@ +# Dart AOT summary and retained string pools + +Continues [#2016](https://github.com/morluto/rea/issues/2016) and +[#2455](https://github.com/morluto/rea/pull/2455). The selected analyst question +asks for shipped LocalSend target/ABI/library identity, every nullable snapshot +observation, string-pool lower bounds and returned counts, and original coverage +and limitations. It does not require individual observed strings. + +## Compatibility and ownership + +MCP `inspect_dart_aot` accepts explicit `detail: "summary"`. Omitted and complete +requests preserve the complete result and original provider inputs. The CLI +remains complete. ABI omission and explicit ABI selection retain their original +meaning; the provider never receives the delivery field. Missing retention, +invalid detail and pre-cancellation fail before provider work. + +The existing application workflow retains the complete original Evidence, then +returns a distinct derived summary linked to its parent ID. It preserves target +and libapp digests, every snapshot section and nullable fact, original pool and +overall coverage, lower-bound counts and limitations. `returned_counts` reports +the lengths of the producer-returned arrays; it does not upgrade lower bounds +to a complete snapshot inventory. The analysis and original source retention +are unchanged. No new engine, persistent cache or plugin SDK is introduced. + +Read exact retained strings using `inspect_analysis_view`, the parent ID, and +`view: {kind: "dart-aot", collection: "package_uris", offset: 0, limit: 64}`. +Other collections are `dart_uris` and `class_like_tokens`. Follow the returned +next offset. Pages preserve source order, ABI/library identity and partial pool +coverage without opening the APK again. Page exhaustion describes retained +strings, not the entire snapshot. Strings remain byte-pattern observations, +rather than recovered typed class/function semantics. Missing historical +subjects remain explicitly unknown; conflicting recorded target digests fail. + +## Frozen runtime and real SDK pairs + +The official LocalSend 1.18.2 arm64 APK acquisition, size and SHA-256 are pinned +in `corpus.json`. No APK installation, target execution or version-dataset +lookup occurred. Source runtime: `811034a7283c9751a3ecbff33e8b2f28bec55793`; +compiled dist/bridge file-table SHA-256: +`dabbb63536c5862be839ecdc0f3eaad05b29c2a3816f57041528d30f754311be`. +The previous runtime is `28c84e78cf2fbfde4aceed345b773c59eb889f68`, digest +`5332dda13981f043e146b3601ebec1f380d9f698280ca53d75786b638a912e11`. +Its production sources were verified byte-equal to main f254 at acquisition. +Subsequent test-only changes and main's SAZ addition do not relabel these pins. + +Node is 24.18.0 and the SDK client/server are 2.3.1. Each workflow starts a fresh +server and validates the selected live advertised schema. Artifact bytes, +provider environment/search-path fingerprints, driver and locked dependencies +stay equal. Host page caches are not flushed. Heavy tasks run serially under +the unchanged CPU, memory, task and host guards. + +| Trial | AOT reply bytes | SDK workflow seconds | Payload CPU seconds | Kernel peak bytes | +| -------------- | --------------: | -------------------: | ------------------: | ----------------: | +| sdk-complete-1 | 151,341 | 5.139 | 6.819 | 691,441,664 | +| sdk-summary-1 | 12,037 | 5.219 | 6.608 | 639,430,656 | +| sdk-summary-2 | 12,037 | 5.064 | 6.405 | 640,868,352 | +| sdk-complete-2 | 151,341 | 5.128 | 6.468 | 633,614,336 | + +Both pairs use one successful public tool call and pass settings/fact comparison, +including all snapshot fields, coverage, original limitations and all counts. +Reply bytes fall 92.05%. Whole SDK time stays approximately 5.1 seconds; these +trials do not establish engine speed, CPU or memory savings. Payload CPU includes +driver/catalog work beyond the SDK workflow timer. Catalog JSON grows from +2,506,213 bytes on the previous runtime to 2,514,896 (about 0.35%). + +A fresh old-runtime complete request passes comparison against candidate +complete, including identical 151,341-byte replies. This is scoped compatibility +evidence, not a guarantee for every historical release or third-party client. + +## Real old Evidence continuation + +Fifteen successful public MCP calls import genuine old-runtime AOT Evidence, +project retained summary, reconstruct all 500 package URIs, 216 Dart URIs and +2,000 class-like tokens, compare inline portable summary, and export the original +record. The APK is absent during all these operations. Original string order, +lower bounds, partial coverage, nullable snapshot facts, subject and parent ID +remain intact; the original exported record is deeply equal to its source. + +The first private verification attempt used a nonexistent receipt filename and +failed before import or artifact relocation. That driver error is retained; +the corrected attempt selects the fresh old-runtime record. It is not a REA +defect or a successful migration trial. + +## Actual Codex task outcomes + +Four serial trials use the same frozen candidate in complete/summary/summary/ +complete order. Requested configuration is Codex CLI 0.161.0, `gpt-5.6-terra` +high, one exact enabled tool (`inspect_dart_aot`), and identical optional owned +context capture/discovery guidance. This requested alias does not certify the +server-resolved model. Temporary configuration points to the modified frozen +REA MCP; all copied credential profiles are removed and target bytes remain +unchanged. The source question is fixed; equal treatment instructions choose +detail and explain the summary carrier and parent reference. + +| Trial | Input | Cached | Uncached | Output | Seconds | MCP attempts | Failed attempts | Facts | +| ---------------- | -----: | -----: | -------: | -----: | ------: | -----------: | --------------: | ----- | +| model-complete-1 | 74,641 | 50,176 | 24,465 | 2,765 | 116.898 | 3 | 1 | pass | +| model-summary-1 | 38,253 | 22,016 | 16,237 | 1,449 | 88.904 | 1 | 0 | pass | +| model-summary-2 | 38,363 | 22,016 | 16,347 | 1,515 | 55.190 | 1 | 0 | pass | +| model-complete-2 | 66,585 | 38,144 | 28,441 | 2,217 | 79.180 | 2 | 0 | pass | + +Both pairs pass checks for every selected producer fact, exact nullable +observations, target digest, observed response Evidence IDs, original limitations, +artifact preservation and profile cleanup. The grader compares the reported +facts with producer observations; it is not an independent Dart deserializer. +Total input falls 48.75% / 42.38%, uncached input 33.63% / 42.52%, reported output +47.59% / 31.66%, and whole-task time 23.95% / 30.30%. Usage is the final aggregate +reported by the actual CLI, one usage record per trial; cached tokens are not +subtracted from total input. Reported output includes reasoning output (1,262, +321, 383 and 709 tokens respectively). + +The first complete trial initially supplied `artifact_path` instead of the +advertised `path`, corrected it, then repeated a successful complete call. +The second complete trial made two successful calls. Both summary trials made +one successful call. All attempts, discovery and correction costs remain +included. The paired whole-task improvement therefore includes actual model +decisions and the convenience of explicit returned counts; it does not isolate +serialization as the sole cause or establish engine acceleration. Two pairs on +one app/question/model configuration support this scope, not a universal gain. + +Payload CPU seconds / kernel peak bytes are respectively 12.556 / 876,937,216; +9.213 / 785,272,832; 9.108 / 793,939,968; and 13.164 / 803,209,216. Model payload +observations verify owned cleanup and zero phase limit events, with no guard +aborts. Whole-scope final counters remain unknown, so every strict all-selected +resource grade remains false even though the separate factual grade passes. + +## Resource and verification scope + +SDK and migration payload-exit observations verify owned cleanup and zero +observed memory/pids limit events, with peaks below 692 MB. Missing whole-scope +terminal counters remain unknown; the strict whole-resource grader stays false. +One-CPU quotas are experiment controls rather than CPU-efficiency claims. + +Production-provider fixture tests cover explicit ABI, old complete defaults, +actual SDK-converted schemas, exact pages after APK removal, portable records, +nullable/partial facts, malformed inputs, target digest conflicts and early +refusals. CLI/MCP acceptance covers original report equality, duplicate-member +refusals and unsupported snapshot kinds. Fixture successes are distinguished +from the real LocalSend SDK/migration workflows. Other Flutter apps, architectures, +SDK layouts, typed class recovery and runtime behavior remain unverified here. +Raw replies, binaries, model traces and temporary credentials stay outside Git. + +## Integration with the newer main + +The rebased verification runtime is `63984ce0898bd7997e6d9b138e6d96d0a24f2b09` +on main `a2d8b94dd50dab8d966239dd63ab84718aa8b4b4`, with compiled file-table +SHA-256 `19c8ccdd3e99bb46a5c54f4edd8c6b2d2eb4f3a4870b3c129061d38145382b68`. +Targeted Flutter/SAZ/shared-view integration passes 35 tests; one opposite +runtime-capacity branch is skipped because this host enforces decoder memory. +Documentation checks and two README conformance tests pass. + +Fresh real complete/summary SDK checks on this runtime match the earlier selected +facts and settings, with unchanged 151,341 / 12,037-byte AOT replies. Fifteen +old-Evidence migration calls again preserve every original string and record +with the source APK absent. The real one-shot CLI complete result also matches +the previous-runtime normalized report, subject, parameters and original ID. +An initial CLI-only controller check lacked an owned resource receipt; it is +retained and excluded from resource/performance claims, then repeated in the +bounded owned scope. These checks establish integration, rather than relabeling +the earlier paired model/SDK measurements as the rebased runtime. diff --git a/experiments/analysis-efficiency/ida-native-windows.md b/experiments/analysis-efficiency/ida-native-windows.md new file mode 100644 index 000000000..9adbd2143 --- /dev/null +++ b/experiments/analysis-efficiency/ida-native-windows.md @@ -0,0 +1,120 @@ +# Native IDA MCP verification on Windows + +Verification date: 2026-10-13. These runs used **IDA Pro 9.3** (executable +product version `9.3.26.0213`), not Windows IDA Free. Personal paths, raw +observations, and license registration information are excluded. + +The native plugin was built from upstream +[`c9d15d98e8a143fc74f6e14037c48f63889b6d6c`](https://github.com/0xshlomil/ida-free-mcp/commit/c9d15d98e8a143fc74f6e14037c48f63889b6d6c) +with MinGW GCC 13 and its pinned public SDK. The only local source change +bound the listener to `127.0.0.1`; the upstream function-navigation fix was +already present. This does not verify the stock 1.1.2 release listener or +its older navigation order. + +## Correctness and authority + +The public [IDA fixture](../../tests/conformance/ida/inventory.c) contains +two exported functions with distinct bodies. Production CLI/MCP verification +checks matching function Evidence, assembly, a unique second-function marker, +return to the first function, original-input identity, invalid requests, and +connection cleanup. Native verification requires the second procedure and its +unique marker; missing, incomplete and empty arguments are rejected before +connecting. Dossier relationship coverage remains unknown when direct callers +are unavailable, while standalone callee coverage retains its own observed state. +It preserves the attached GUI database. + +The later verification follow-up rejects native callee successes without an +explicit truncation marker, checks positive procedure inventory/search and +compares normalized function results. String and xref correctness require +independent positive oracles; runs without those oracles label them unverified. +Earlier reports established contract validity for these operations and did not +by themselves establish string/xref semantic correctness. + +The follow-up passed eight production checks with a known CRT literal confirmed +in the unchanged fixture bytes and a reference source address independently +identified from `main` assembly matching the C source. A loopback response-only +proxy in front of the real IDA Pro provider reproduced the earlier verifier +passing empty function inventories and xrefs. The corrected verifier rejected +those replies with positive oracles, empty string results and missing native +callee truncation markers. The comparison used verifier source `d1aaeee40` +with the same current adapter runtime; it is a verifier comparison, not an +engine performance comparison. Only response payloads were modified; the original +input digest stayed unchanged, the target was never executed, and the attached +GUI database was preserved. + +The real application was a digest-verified, unchanged copy of Windows +`whoami.exe`: 94,208 bytes, 243 recognized functions, and 314 upstream +C-string observations. The selected 1,741-byte function had 20 resolved +callees. Before and after, the task returned identical pseudocode, callee +addresses, and its one `whoami` string match. The executable was never run. +Other string representations remain unknown in the native profile. + +A Windows C++ producer golden checked 24 literal/case combinations and +408 candidate comparisons, including metacharacters, Kelvin sign, dotted I, +sigma, supplementary characters, and null bytes. Adapter tests additionally +cover malformed UTF-16 fallback, candidate pagination, explicit search errors, +and reordered, missing, duplicate, unrelated, or failed lookup replies. +These checks do not establish IDA recognition of every Unicode string format. + +## Equivalent completed tasks + +Both builds used main `59be86671`. The baseline was `fb34ccbec`, before +the native performance edits; the comparison build added those edits. +Schemas were identical. Each run opened the same analyzed binary, read the +specified function's pseudocode and callees, searched literal `whoami`, and +closed the REA session. The task then repeated on the same MCP connection. + +There were two runs per build on a shared host. Node 24.18.0 and IDA were +restricted to one logical CPU with below-normal priority; each Node process +had a 768 MiB heap ceiling. The attached database was already analyzed. +Node compile caching was disabled for the primary comparison. + +| Measurement | Before | After | +| --------------------------------------------------- | -----------: | -----------: | +| Task response text | 49,139 bytes | 32,546 bytes | +| Task response token estimate | 16,618 | 11,509 | +| Callee lookup calls, including selector | 17 | 2 | +| String-search pages | 4 | 1 | +| String-search Evidence | 19,022 bytes | 3,344 bytes | +| Mean task time, warm MCP connection | 675 ms | 317 ms | +| Mean task time, fresh MCP process and catalog | 19.72 s | 20.86 s | +| Mean Node family CPU, fresh and warm tasks together | 17.72 s | 18.62 s | +| Largest Node family peak-RSS upper bound | 776.8 MiB | 780.0 MiB | +| Mean attached IDA CPU during both tasks | 226.6 ms | 171.9 ms | + +The warm task was about 53% faster and its response estimate about 31% +smaller. Fresh-start, overall CPU, and memory improvements were not +established. Startup and full catalog conversion dominate the fresh task. +Two samples do not establish a general performance guarantee. + +Token counts use local `cl100k_base` tokenization of complete serialized +MCP response text and request arguments; they are estimates, not model usage. +Requests added 99 estimated tokens per task. The unchanged full schema +catalog contained 2,422,229 bytes and 613,965 estimated tokens. Including it +once gives first-task estimates of 630,682 before and 625,573 after. A host +may select schemas lazily; actual host injection, prompts, reasoning tokens, +and model-side costs were not measured. No retries were needed. + +Node CPU counters were captured at shutdown. The memory figure sums the +two processes' individual OS peak RSS values: an upper bound, not a +simultaneous family peak. Attached IDA is outside that process family; its +unchanged lifetime peak working set was 376.9 MiB, including initial analysis. +Measurement overhead and whole-machine resource use were not measured. + +## Reuse and cleanup + +Callee queries are deduplicated and batched within an operation. Literal +search fetches a conservative candidate set, including non-ASCII text when +needed, and preserves REA's final Unicode predicate. It examines all candidate +pages and retains full source observations. Regex searches keep the full scan. + +Cross-request analysis results remain live because an input digest does not +establish database revision or freshness. An exploratory caller-selected +[Node compile cache](https://nodejs.org/download/release/v24.16.0/docs/api/module.html#module-compile-cache) +did not demonstrate startup improvement: empty-cache and cache-hit MCP starts +were 7.35 s and 7.56 s. It occupied 6.7 MiB and was limited to this experiment; +no new default cache or installation behavior was introduced. + +Temporary source, SDK, build, portable runtime, cache, and raw measurement +outputs are test-owned cleanup targets. Attached GUI databases are retained; +REA never saves or closes them. diff --git a/experiments/analysis-efficiency/latest-main-audit.md b/experiments/analysis-efficiency/latest-main-audit.md new file mode 100644 index 000000000..8f767fb64 --- /dev/null +++ b/experiments/analysis-efficiency/latest-main-audit.md @@ -0,0 +1,75 @@ +# Latest-main efficiency continuation + +Continues [#2016](https://github.com/morluto/rea/issues/2016). The 2026-10-13 +fetch resolved main to `f254f5ac2b804b353a711264bb178f43fdf07867`, the same +revision as the preceding Android conclusion. Newer capabilities below were +added during that earlier cycle; they are additional measurement scopes, not +new commits after that conclusion. + +| Capability | Existing controls | Next evidence needed | +| ----------------------------- | ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| Flutter / Dart AOT (#1582) | Explicit ABI, bounded string observations, partial coverage | Real shipped snapshot/count question; opt-in delivery only if unrelated strings dominate | +| SQLite (#2271) | Compact inventory, selected table/columns, row limit | Real application database and model workflow before adding another selector | +| TShark (#2318) | Fields, filter, decode-as, pass, default 50 matching rows, paging, explicit null for all | Real public capture and repeated task cost; paging repeats dissection | +| sigrok (#2339) | Decoder/channels/annotation selection, default 50 display lines, paging | Real public capture; display-line count is not annotation count and paging repeats decoding | +| Retained unknown head results | Existing retained paging | Reuse the existing view rather than duplicate its implementation | + +Attached IDA, Frida and other live runtime workflows involve separate authority +and lifecycle questions and are outside this static parsing continuation. +Plugin SDKs and cross-session engine caches remain deferred until an observed +need and benefit justify them. + +## First selected scope: Dart AOT + +The official LocalSend 1.18.2 arm64 APK is pinned in `corpus.json`. The initial +real public SDK baseline inspected actual bytes without executing/installing +the APK. Its complete default AOT reply was 151,341 compact client-result JSON +bytes (70,487 normalized bytes), with 500 package URIs, 216 Dart URIs and 2,000 +class-like tokens. String-pool and overall coverage were partial. A second +explicit arm64 request returned the same normalized facts. + +These are exploratory first/warm calls, not an optimization pair. The frozen +runtime source is `28c84e78cf2fbfde4aceed345b773c59eb889f68`, with production +source bytes verified equal to main f254 at baseline acquisition. Its compiled +file-table digest is +`5332dda13981f043e146b3601ebec1f380d9f698280ca53d75786b638a912e11`; +the receipt is not relabeled as a newer build. + +The candidate adds explicit MCP `detail: "summary"` and retained pool pages. +Omitted/complete requests and the CLI preserve the old complete path. Analysis, +ABI selection and original Evidence stay intact. Summary retains target/libapp +identity, exact nullable snapshot observations, lower bounds, returned counts, +coverage and limitations. Pages preserve original string order and source +coverage without rescanning. No engine cache, provider protocol or third-party +plugin API is introduced. + +Follow-up measurements must compare identical selected facts, portable old +Evidence and actual model tasks. Reply bytes do not establish token or latency +improvements. Whole-scope final counters remain unknown if their cgroup has +disappeared, even when the narrower payload-exit observation is verified. +Raw records, binaries and model traces stay in the private lab outside Git. +Heavy work remains serial under the unchanged one-CPU, 3 GiB early-stop / 4 GiB +hard memory, no-swap and host-availability guards. + +## Main advanced during the experiment + +Main subsequently advanced to `a2d8b94dd50dab8d966239dd63ab84718aa8b4b4`, +adding native Fiddler SAZ parsing. Its web-network capture contract already +offers opt-in summary and retained capture pages, archive-member coordinates +and exact exposed encoded bytes. It decodes all records before ordinal +selection and rejects malformed/oversized inputs without partial success. +Measure real public SAZ artifacts using these controls before adding another +API or changing decoding or credential-redaction semantics. SAZ performance +remains unverified in this Flutter continuation. + +The Flutter cohorts keep their original frozen runtime; subsequent integration +onto this newer main does not relabel earlier measurement receipts. + +Main advanced again to `bb154d106` during CI, adding retained aioquic 1.5.0 +qlog 0.3 JSON parsing and qlog views. The existing capture summary/page path +already applies. Qlog's trace-scoped STREAM interval unions and endpoint loss +declarations have separate semantics: they do not recover bodies, prove network +loss or establish PCAP correlation. Measure genuine supported recordings and +existing retained views before adding delivery or caching. Other qlog layouts +and qlog performance remain unverified in the Flutter experiment. Shared-view +integration is checked after rebasing; earlier runtime receipts remain pinned. diff --git a/experiments/analysis-efficiency/managed-artifact-summary.md b/experiments/analysis-efficiency/managed-artifact-summary.md new file mode 100644 index 000000000..defcd88c3 --- /dev/null +++ b/experiments/analysis-efficiency/managed-artifact-summary.md @@ -0,0 +1,234 @@ +# Managed artifact delivery and retained views + +Continues [#2016](https://github.com/morluto/rea/issues/2016) after +[#2404](https://github.com/morluto/rea/pull/2404) merged. This checkpoint pins +the complete managed workflow before implementing another optional view. +The baseline below precedes implementation; the follow-up adds explicit summary +delivery and portable collection pages while preserving complete defaults. + +## Frozen control and analyst question + +Control source is merged main `ae8051302b5834322fa00cfa31c968ae74ab6ed9`, +Node 24.18.0, matching locked dependencies and actual compiled stdio MCP. +The frozen `dist/`/`bridge/` file-table SHA-256 is +`7a4cec0fa4f7e929356b50a6b13472f80bd6f526221e427125370cca3ef98d00`. +Measurement source SHA-256 is +`a95d8d8e9f72c0b2b885c61907ed13054ebf7d1642f6f13b0126163840b1221a`. + +Use the digest-pinned shipped ShareX DLL from [the corpus](corpus.json), +2,162,688 bytes, SHA-256 +`191a191be964e434daf0f9d76d1e0d8ddce90d7e248cba2a6b5ac9577f288d53`. +The [existing model question](questions/managed.txt) requests exact identity, +complete managed classification and its evidence, frameworks and every declared +native ModuleRef/PInvoke boundary with coverage and limitations. It explicitly +excludes unrelated resource/custom-attribute inventories. Analysis reads PE/CLI +metadata without loading or executing the assembly. + +The current complete result has exactly the same normalized facts as the earlier +real managed checkpoint linked from [the EVM descriptor study](evm-descriptor.md). +This comparison does not equate fresh Evidence IDs, provider versions or whole +catalogs. Original target bytes remain unchanged; SDK-converted named schemas +and actual replies validate in the public measurement workflow. + +## Observed data costs + +| Public operation | SDK result JSON UTF-8 bytes | Tool milliseconds | +| ----------------------------------- | --------------------------: | ----------------: | +| `inspect_managed_artifact` | 1,270,839 | 450.306 | +| `inspect_managed_native_boundaries` | 27,913 | 142.663 | + +The complete workflow, including connection/discovery and both calls, takes +3.721 seconds. The full discovered catalog is 2,482,204 compact JSON bytes; +its input definitions are 527,569 bytes. These costs include the current main +changes and are not silently substituted for an older catalog baseline. + +The artifact inspection's normalized payload alone is 607,605 compact JSON UTF-8 +bytes, measured with actual Node `JSON.stringify`: + +| Returned collection | Rows | Compact JSON UTF-8 bytes | +| ------------------- | ----: | -----------------------: | +| References | 38 | 12,153 | +| Resources | 36 | 10,357 | +| Custom attributes | 1,945 | 582,586 | + +Custom attributes dominate the payload. The remaining identity, PE/CLI, +classification, metadata, framework and coverage facts are comparatively small. +`raw_result` is null. SDK result size includes both structured and text +representations; it is not the exact context a model receives or a token count. + +The serial owned scope takes 4.852 seconds including the driver, samples +520,110,080 peak family bytes and records 4.699 last-observed CPU seconds. +One CPU, 4 GiB hard memory, unchanged 3 GiB early-stop, no swap and 192 tasks +remain in effect. No guard abort occurs. Final cgroup counters disappear and +remain unknown; sampled zero events are not final no-OOM proof. + +## Bounded candidate and acceptance + +Evaluate an explicit overview on the first artifact inspection, retaining the +unchanged complete source and returning a distinct linked view. Keep complete +identity/classification, metadata status, nullable module/MVID, assembly, +frameworks, original coverage/issues/limitations and returned-collection counts +inline. Typed pages can expose original references/resources/attributes with +their nulls, token coordinates, offsets, order and values. Returned-array +coverage must remain distinct from whole-metadata completeness. + +Reuse the existing managed schemas, retained Evidence application workflow and +named registration hooks. Keep omitted/complete requests, other managed tools, +selected target/provider behavior and original export/import identities usable. +Do not strengthen historical admission to require a non-null subject or +reinterpret foreign recorded paths through this host's filesystem. Delivery +selection must not be passed to the PE/CLI parser as an analysis option. + +At the baseline checkpoint the candidate was not implemented or measured. Compare the +same completed analyst question, actual discovery/results, full default +compatibility and retained paging without producer reruns. Follow with other +shipped managed inputs, partial/unavailable metadata and real Codex trials with +strict factual/reference checks. Preserve failed or truncated transcripts. +Count total/cached/uncached input, output, calls/retries, whole-task time, CPU +and family memory before recommending a token or latency improvement. A smaller +reply alone is insufficient. + +## Reproduce the control + +Build and freeze the explicit source revision before editing production code. +Supply the original shipped DLL and an explicit string-valued provider dictionary +in a fresh private receipt directory: + +```bash +python3 experiments/analysis-efficiency/resource-run.py -- \ + node experiments/analysis-efficiency/measure.mjs \ + --runtime-root /absolute/control-ae805 \ + --revision ae8051302b5834322fa00cfa31c968ae74ab6ed9 \ + --artifact sharex.dll --path /absolute/ShareX.dll \ + --providers /absolute/explicit-providers.json --schemas selected \ + --output /absolute/new-control-receipts +``` + +Raw replies, runtime copies, fingerprints and detailed resource receipts stay +outside Git. No new provider, plugin SDK, database cache or target execution is +introduced by this baseline. + +## Implemented candidate and real SDK observations + +Candidate `8bc1601ca51e417ca472d90ea0367e9418a1a0f2` adds +`inspect_managed_artifact({path, detail: "summary"})` and managed collection pages +through the existing `inspect_analysis_view` contract. The complete parser result +remains retained. Omitted detail and explicit `complete` keep complete output; +other managed tools do not acquire this selector. CLI inspection stays complete. +The frozen candidate runtime file-table SHA-256 is +`9e7380f537301bf0cfe2926f5619011af848af7c220750e75189498e65d825e1`. +The revised measurement driver SHA-256 is +`8c22f59e931fdc347dea1204ea0faf91330578db684357261ec6f03bd0efa85e`. + +Use `--managed-question identity` on **both** sides, with `--delivery complete` +for the control and `--delivery summary` for the candidate. The original default +`inventory` recipe remains unchanged. Both identity recipes make the same two +public calls, validate their advertised SDK schemas, and compare complete +identity/classification, frameworks, coverage and native-boundary facts. + +| Artifact | Complete metadata bytes | Summary metadata bytes | Complete two-call bytes | Summary two-call bytes | +| --------------------- | ----------------------: | ---------------------: | ----------------------: | ---------------------: | +| ShareX.dll | 1,270,839 | 10,549 | 1,298,752 | 38,462 | +| ShareX.HelpersLib.dll | 1,296,839 | 10,937 | 1,586,970 | 301,068 | + +The helper assembly is a second shipped member of the same pinned ShareX release, +1,076,224 bytes, SHA-256 +`e91bd1ec904e2bb8a1add4bb6187443b878bf33d24fe9e27f0b799bfee9de33d`. +It is not an independent application or a new runtime/provider lane. Its native +boundary report remains comparatively large and unchanged. Metadata reply bytes +fall by about 99.17% and 99.16%; two-call totals fall by about 97.04% and 81.03%. +The first committed-candidate observations take 3.699 and 3.838 seconds, versus +3.809 and 3.925 seconds for controls. These timings include discovery and do not +establish a general latency improvement. The full candidate catalog grows from +2,482,204 to 2,497,635 bytes; input definitions grow from 527,569 to 528,862. + +An earlier dirty prototype produced the same runtime file-table hash and a +separate provenance receipt. Its observations remain separate; a clean baseline +commit is never presented as the source of uncommitted production changes. + +## Actual Codex findings: token benefit is not established + +Four sequential trials use actual Codex CLI 0.161.0, requested model +`gpt-5.6-terra`, high reasoning, the unchanged question above and the same two +enabled tools. The requested alias does not prove a resolved server model ID. +Order is control, candidate, candidate, control. Both candidate trials independently +select summary; all trials preserve dependency order, make two successful calls, +leave the artifact unchanged and remove temporary profiles. + +| Trial | Input tokens | Cached input | Uncached input | Output tokens | Wall seconds | +| ----------- | -----------: | -----------: | -------------: | ------------: | -----------: | +| Control 1 | 54,821 | 29,184 | 25,637 | 1,782 | 63.207 | +| Candidate 1 | 77,594 | 50,432 | 27,162 | 1,583 | 46.685 | +| Candidate 2 | 82,426 | 49,408 | 33,018 | 2,120 | 67.379 | +| Control 2 | 55,296 | 29,184 | 26,112 | 2,361 | 62.159 | + +Uncached input is reported input minus cached input. **Candidate input and +uncached input are higher in both comparisons.** Latency is mixed. This feature +demonstrates smaller selected delivery, not measured model-token savings or a +stable whole-task speedup. Event result bytes are also not a measurement of the +exact context presented to the model. No hidden truncation/cache mechanism is +inferred from these aggregates. Keep further model-context investigation separate +from this additive view implementation. + +The question prescribes a `coverage` field without prescribing its nested labels. +The grader now accepts only explicit equivalent artifact/native scope names; +conflicting duplicate scopes still fail. Original failure receipts remain intact. +Control 1 and both candidates pass the selected factual checks after that +correction. Control 2 omits `classification.container` and does not report +separate artifact/native coverage in the expected representation; it fails these +strict selected checks. The prompt did not specify every nested key, so this is +also an answer-representation limitation. It is not counted as a fully acceptable +control answer or repaired by assuming ambiguous flat coverage. Original +limitations were additionally reviewed against producer replies. + +All four reports still fail the **complete** selected gate because final physical +resource counters are unavailable. The factual subset is reported separately; +it does not turn unknown final resource counters into a pass. Trial guards remain +unchanged, no guard abort is observed, and sampled peaks stay below the 3 GiB +early-stop threshold. A sampled zero OOM count is not final no-OOM proof. + +## Previous-runtime Evidence compatibility + +Complete actual producer Evidence from control `ae8051302b5834322fa00cfa31c968ae74ab6ed9` +for both shipped assemblies is passed, unchanged, through the candidate's public +SDK inline view. Each artifact makes 14 view calls: a summary, all original +reference/resource/attribute pages at a caller-selected 256 rows, and exhausted +pages for each collection. Summary facts, every row and order, source coverage, +parent ID, links and target digest match; the original Evidence stays unchanged. +ShareX has 38/36/1,945 reported rows and HelpersLib has 49/17/1,988. No producer +operation or target mutation is requested by this portable workflow. + +The private verification driver SHA-256 is +`7bb1f24b488beda012b1e78132de29b868fe1ea91a5e1499d7f271801fa40380`; +the receipt scope takes 5.860 seconds, samples 642,244,608 peak family bytes and +5.619 last-observed CPU seconds, with no guard abort. Final counters remain unknown. +These are actual previous-runtime records, unlike the separate synthetic +null-subject compatibility test. They do not prove every historical release. + +Focused SDK/domain checks cover first-call summary, complete defaults, selected +target reuse, paging after the source disappears, malformed metadata, historical +null subjects, digest mismatch, portable projection and unavailable retention +before file access. The exact candidate CI passes all checks after only the +browser cleanup and Apple `hdiutil` jobs are retried on the same source revision; +their original failures remain recorded in the private team handoff. + +## Committed-runtime repetition and complete defaults + +A second SDK pair reverses the order (candidate before control) for both +assemblies. Result byte totals repeat exactly. ShareX workflow times are +3.644 versus 3.687 seconds; HelpersLib times are 3.714 versus 3.859 seconds. +Both pairs preserve selected settings/facts and have no tool errors. Two pairs +per assembly, sharing one application and host, remain a narrow descriptive +sample rather than a general performance claim. + +Actual omitted-detail calls on the candidate additionally reproduce **all** +normalized metadata inventories and native-boundary facts from both controls, +not just the identity recipe's selected subset. Their canonical complete +Evidence IDs also match. This verifies the recorded old request and complete +result path alongside the explicit new delivery option. + +The changed shared projector also handles an actual shipped SQLite WASM run +through the candidate's SDK summary workflow, with real configured WABT: +two calls, 18,687 result JSON bytes, 5.614 seconds and no tool failure. This +checks that neighboring dispatch path; it does not establish a new WASM +performance improvement or additional operating-system/provider coverage. diff --git a/experiments/analysis-efficiency/measure.mjs b/experiments/analysis-efficiency/measure.mjs new file mode 100644 index 000000000..160973aa7 --- /dev/null +++ b/experiments/analysis-efficiency/measure.mjs @@ -0,0 +1,996 @@ +import { createHash } from "node:crypto"; +import { createReadStream } from "node:fs"; +import { mkdir, readFile, readdir, stat, writeFile } from "node:fs/promises"; +import { dirname, isAbsolute, resolve } from "node:path"; +import { fileURLToPath, pathToFileURL } from "node:url"; +import { isDeepStrictEqual, parseArgs } from "node:util"; +import { + NATIVE_ARTIFACTS, + measureNativeEntry, + nativeEntrySeed, +} from "./native-entry.mjs"; +import { Client } from "@modelcontextprotocol/client"; +import { StdioClientTransport } from "@modelcontextprotocol/client/stdio"; +import { Ajv2020 } from "ajv/dist/2020.js"; + +const root = resolve(dirname(fileURLToPath(import.meta.url)), "../.."); +const { values } = parseArgs({ + options: { + "runtime-root": { type: "string", default: root }, + revision: { type: "string" }, + artifact: { type: "string" }, + path: { type: "string" }, + providers: { type: "string" }, + output: { type: "string" }, + delivery: { type: "string", default: "complete" }, + "verify-retained": { type: "boolean", default: false }, + "native-question": { type: "string", default: "entry" }, + "javascript-question": { type: "string", default: "inventory" }, + "managed-question": { type: "string", default: "inventory" }, + schemas: { type: "string", default: "default" }, + "sqlite-selection": { type: "string", default: "all" }, + }, +}); +if ( + !values.revision || + !values.artifact || + !values.path || + !values.output || + !isAbsolute(values.path) || + !isAbsolute(values.output) || + !["complete", "summary"].includes(values.delivery) || + !["entry", "entry-and-main", "entry-views"].includes( + values["native-question"], + ) || + !["inventory", "selected"].includes(values["javascript-question"]) || + !["default", "selected"].includes(values.schemas) || + !["all", "columns"].includes(values["sqlite-selection"]) || + (values.artifact !== "qgis-world-map.gpkg" && + values["sqlite-selection"] !== "all") || + (values.artifact === "qgis-world-map.gpkg" && + values.delivery !== "complete") || + !["inventory", "identity"].includes(values["managed-question"]) || + (!["sharex.dll", "sharex.helpers.dll"].includes(values.artifact) && + values["managed-question"] !== "inventory") || + (["sharex.dll", "sharex.helpers.dll"].includes(values.artifact) && + values.delivery === "summary" && + values["managed-question"] !== "identity") || + (values["verify-retained"] && + !["weth.hex", "uniswap-v3.factory.hex", "uniswap-v3.pool.hex"].includes( + values.artifact, + )) || + (!NATIVE_ARTIFACTS.includes(values.artifact) && + values["native-question"] !== "entry") || + (values.artifact !== "jq" && + values["native-question"] === "entry-and-main") || + (values.artifact !== "obsidian.asar" && + values["javascript-question"] !== "inventory") +) + throw new Error( + "Use --revision SHA --artifact ID --path ABS --output NEW_ABS_DIR [--runtime-root ABS] [--providers JSON] [--delivery complete|summary]", + ); + +const sha = (text) => createHash("sha256").update(text).digest("hex"); +const fileSha = async (path) => { + const hash = createHash("sha256"); + for await (const chunk of createReadStream(path)) hash.update(chunk); + return hash.digest("hex"); +}; +const corpus = JSON.parse( + await readFile(new URL("./corpus.json", import.meta.url), "utf8"), +); +const artifact = corpus.artifacts.find(({ id }) => id === values.artifact); +if (!artifact) throw new Error("Select an artifact from the pinned corpus"); +const inputSha = await fileSha(values.path); +if ( + artifact.sha256 !== inputSha || + artifact.bytes !== (await stat(values.path)).size +) + throw new Error("Selected bytes differ from the pinned public corpus"); +const selectedProviders = values.providers + ? JSON.parse(await readFile(values.providers, "utf8")) + : {}; +if ( + selectedProviders === null || + Array.isArray(selectedProviders) || + typeof selectedProviders !== "object" || + Object.values(selectedProviders).some((value) => typeof value !== "string") +) + throw new Error( + "--providers must contain an object of explicit string settings", + ); +const providerPolicyText = await readFile( + new URL("./provider-environment.json", import.meta.url), + "utf8", +); +const providerPolicy = JSON.parse(providerPolicyText); +const undeclaredProviderKeys = Object.keys(process.env).filter( + (key) => + (providerPolicy.namespace_prefixes.some((prefix) => + key.startsWith(prefix), + ) || + providerPolicy.additional_keys.includes(key)) && + !Object.hasOwn(selectedProviders, key), +); +if (undeclaredProviderKeys.length > 0) + throw new Error( + `Declare inherited provider settings explicitly in --providers: ${undeclaredProviderKeys.sort().join(", ")}. Values are not logged.`, + ); +await mkdir(values.output, { recursive: false, mode: 0o700 }); +const runtimeFiles = []; +const fingerprintTree = async (directory) => { + for (const entry of await readdir(directory, { withFileTypes: true })) { + const path = resolve(directory, entry.name); + if (entry.isDirectory()) await fingerprintTree(path); + else if (entry.isFile()) + runtimeFiles.push({ + path: path.slice(resolve(values["runtime-root"]).length + 1), + sha256: await fileSha(path), + }); + else throw new Error("Runtime fingerprint does not follow symlinks"); + } +}; +await fingerprintTree(resolve(values["runtime-root"], "dist")); +await fingerprintTree(resolve(values["runtime-root"], "bridge")); +runtimeFiles.sort((a, b) => (a.path < b.path ? -1 : a.path > b.path ? 1 : 0)); +await writeFile( + resolve(values.output, "runtime-files.json"), + JSON.stringify(runtimeFiles), +); +const fingerprints = { + measure_source_sha256: await fileSha(fileURLToPath(import.meta.url)), + native_workflow_source_sha256: await fileSha( + fileURLToPath(new URL("./native-entry.mjs", import.meta.url)), + ), + runtime_files_sha256: sha(JSON.stringify(runtimeFiles)), + runtime_dispatcher_sha256: await fileSha( + resolve(values["runtime-root"], "scripts/rea.mjs"), + ), + package_lock_sha256: await fileSha( + resolve(values["runtime-root"], "package-lock.json"), + ), +}; +const clientVersion = JSON.parse( + await readFile( + resolve(root, "node_modules/@modelcontextprotocol/client/package.json"), + "utf8", + ), +).version; +const serverVersion = JSON.parse( + await readFile( + resolve( + values["runtime-root"], + "node_modules/@modelcontextprotocol/server/package.json", + ), + "utf8", + ), +).version; + +class ToolFailure extends Error { + constructor(value) { + super("REA returned a tool error"); + this.value = value; + } +} + +const client = new Client({ name: "rea-analysis-efficiency", version: "1" }); +const transport = new StdioClientTransport({ + command: process.execPath, + args: [resolve(values["runtime-root"], "scripts/rea.mjs"), "mcp"], + env: { ...process.env, ...selectedProviders }, + stderr: "pipe", +}); +const diagnostics = []; +const calls = []; +const catalogDefinitions = new Map(); +const pendingRpc = new Map(); +let activeCall; +const started = performance.now(); +let connectedMs, catalogMs, catalogBytes, catalogInputBytes, result, failure; +const decode = (reply) => + reply.structuredContent ?? + JSON.parse( + reply.content.find((item) => item.type === "text")?.text ?? "null", + ); +const call = async (name, arguments_) => { + const toolDefinition = + values.schemas === "selected" ? catalogDefinitions.get(name) : undefined; + if (values.schemas === "selected" && toolDefinition === undefined) + throw new Error(`No live advertised definition for ${name}`); + const began = performance.now(); + const progress = []; + const rpc = {}; + activeCall = { began, rpc }; + try { + const reply = await client.callTool( + { name, arguments: arguments_ }, + { + ...(toolDefinition === undefined ? {} : { toolDefinition }), + timeout: 600_000, + onprogress: (update) => + progress.push({ elapsed_ms: performance.now() - began, ...update }), + }, + ); + const elapsedMs = performance.now() - began; + const encodingBegan = performance.now(); + const text = JSON.stringify(reply); + const value = decode(reply); + calls.push({ + name, + arguments: arguments_, + elapsed_ms: elapsedMs, + client_before_send_ms: rpc.sent === undefined ? null : rpc.sent - began, + transport_roundtrip_ms: + rpc.received === undefined || rpc.sent === undefined + ? null + : rpc.received - rpc.sent, + client_after_receive_ms: + rpc.received === undefined ? null : began + elapsedMs - rpc.received, + client_result_json_utf8_bytes: Buffer.byteLength(text), + runner_encoding_ms: performance.now() - encodingBegan, + producer_evidence_id: value?.evidence_id ?? null, + is_error: reply.isError === true, + progress, + }); + await writeFile(resolve(values.output, `call-${calls.length}.json`), text); + if (reply.isError) throw new ToolFailure(value); + return value; + } catch (error) { + if (calls.at(-1)?.name !== name || calls.at(-1)?.arguments !== arguments_) + calls.push({ + name, + arguments: arguments_, + elapsed_ms: performance.now() - began, + failure: String(error), + progress, + }); + throw error; + } finally { + activeCall = undefined; + for (const [id, pending] of pendingRpc) + if (pending.rpc === rpc) pendingRpc.delete(id); + } +}; +const normalized = (value) => value.normalized_result; +const targetSha = (value) => value.subject?.digest.sha256; +const inventoryPaths = ["package.json", "main.js", "preload.js"]; +const unique = (values) => [...new Set(values)].sort(); +const inspectManagedTarget = async () => { + const arguments_ = { + path: values.path, + ...(values.delivery === "summary" ? { detail: "summary" } : {}), + }; + const definition = catalogDefinitions.get("inspect_managed_artifact"); + if (definition === undefined) + throw new Error("Managed inspection is not advertised"); + const accepted = new Ajv2020({ + strict: false, + validateFormats: false, + }).compile(definition.inputSchema)(arguments_); + if (!accepted) + throw new Error( + "Selected managed delivery is not advertised by this runtime", + ); + const info = await call("inspect_managed_artifact", arguments_); + const boundaries = await call("inspect_managed_native_boundaries", { + path: values.path, + }); + const received = normalized(info); + const report = received.kind === "summary" ? received.summary : received; + let artifact = report; + if (values["managed-question"] === "identity") { + const { + references, + resources, + attributes, + reported_counts, + identity_scope: _scope, + ...identity + } = report; + artifact = { + ...identity, + reported_counts: reported_counts ?? { + references: references.length, + resources: resources.length, + attributes: attributes.length, + }, + }; + } + return { + artifact_sha256: targetSha(info), + artifact, + boundaries: normalized(boundaries), + evidence_ids: [ + info.evidence_id, + ...(received.kind === "summary" ? [received.parent_evidence_id] : []), + boundaries.evidence_id, + ], + }; +}; + +/** The same counts/export question for each pinned shipped WASM module. */ +const inspectWasmTarget = async () => { + let info; + let recovery = null; + const arguments_ = { + path: values.path, + glue_paths: [], + candidate_paths: [], + }; + const definition = catalogDefinitions.get("inspect_wasm_artifact"); + if (!definition) throw new Error("Missing advertised WASM definition"); + // Validate the real advertised dialect, including SDK-generated local refs. + const supportsSummary = new Ajv2020({ + strict: false, + validateFormats: false, + }).compile(definition.inputSchema)({ ...arguments_, detail: "summary" }); + try { + info = await call("inspect_wasm_artifact", { + ...arguments_, + ...(values.delivery === "summary" && supportsSummary + ? { detail: "summary" } + : {}), + }); + } catch (error) { + const reference = + error instanceof ToolFailure && + error.value?.error?.code === "resource_constraint" + ? error.value.error.details?.reported_limits?.evidence_reference + : undefined; + if (reference?.kind !== "retained-evidence") throw error; + if (values.delivery === "summary") { + info = await call("inspect_analysis_view", { + source: reference, + view: { kind: "summary" }, + }); + recovery = + "existing completed producer reference read through typed WASM views"; + } else { + const path = resolve(values.output, "retained-evidence.json"); + await call("export_evidence_bundle", { path }); + const bundle = JSON.parse(await readFile(path, "utf8")); + const record = bundle.records.find( + (row) => row.evidence_id === reference.evidence_id, + ); + const { parseEvidence } = await import( + pathToFileURL( + resolve(values["runtime-root"], "dist/domain/evidence.js"), + ).href + ); + info = parseEvidence(record); + recovery = + "complete producer Evidence exported after an observed transport constraint"; + } + } + const n = normalized(info); + if (n.kind === "summary") { + const summary = n.summary; + const exportsEvidence = await call("inspect_analysis_view", { + source: { kind: "retained-evidence", evidence_id: n.parent_evidence_id }, + view: { kind: "wasm", facet: "exports", offset: 0, limit: 4 }, + }); + return { + artifact_sha256: targetSha(info), + validation: summary.validation, + section_count: summary.available_counts.sections, + import_count: summary.available_counts.imports, + export_count: summary.available_counts.exports, + exports_first4: normalized(exportsEvidence).item, + wat_sha256: summary.wat.sha256, + wat_code_units: summary.wat.code_units, + tool_profile: summary.tool_profile, + runtime_execution: summary.runtime_execution, + network_fetch: summary.network_fetch, + evidence_ids: [ + n.parent_evidence_id, + info.evidence_id, + exportsEvidence.evidence_id, + ], + source_evidence_id: n.parent_evidence_id, + recovery, + }; + } + return { + artifact_sha256: targetSha(info), + validation: n.validation, + section_count: n.sections.length, + import_count: n.imports.length, + export_count: n.exports.length, + exports_first4: n.exports.slice(0, 4), + wat_sha256: n.wat.sha256, + wat_code_units: n.wat.text.length, + tool_profile: n.tool_profile, + runtime_execution: n.runtime_execution, + network_fetch: n.network_fetch, + evidence_ids: [info.evidence_id], + source_evidence_id: info.evidence_id, + recovery, + }; +}; + +/** Identical interface facts for complete delivery, selected summary or old-server fallback. */ +const inspectEvmTarget = async () => { + const definition = catalogDefinitions.get("inspect_evm_interface"); + if (!definition) throw new Error("Missing advertised EVM definition"); + const input = { path: values.path, encoding: "hex" }; + const supportsSummary = new Ajv2020({ + strict: false, + validateFormats: false, + }).compile(definition.inputSchema)({ ...input, detail: "summary" }); + const info = await call("inspect_evm_interface", { + ...input, + ...(values.delivery === "summary" && supportsSummary + ? { detail: "summary" } + : {}), + }); + const result = normalized(info); + const projected = result.kind === "summary"; + const n = projected ? result.summary : result; + const references = [info.evidence_id]; + if (projected) { + if ( + result.parent_operation !== "inspect_evm_interface" || + result.parent_evidence_id === info.evidence_id || + !info.evidence_links.includes(result.parent_evidence_id) || + "hex" in n.bytecode || + "stdout" in n.diagnostics + ) + throw new Error( + "EVM summary changed source provenance or precise delivery", + ); + references.push(result.parent_evidence_id); + } + if ( + n.evidence_kind !== "inferred" || + n.artifact.path !== values.path || + n.artifact.sha256 !== inputSha || + n.artifact.bytes !== artifact.bytes || + n.artifact.encoding !== "hex" || + n.discovery_completeness !== "unknown" || + n.runtime_execution !== "not-performed" || + ["kind", "hardfork", "deployment_authenticity"].some( + (key) => n.bytecode[key] !== "unknown", + ) || + (artifact.decoded_sha256 !== undefined && + n.bytecode.sha256 !== artifact.decoded_sha256) || + (artifact.decoded_bytes !== undefined && + n.bytecode.bytes !== artifact.decoded_bytes) + ) + throw new Error("EVM interface identity or uncertainty changed"); + if (values["verify-retained"]) { + if (!projected) + throw new Error( + "Retained verification requires supported selected summary", + ); + const bundle = (await call("get_evidence_bundle", {})).result; + const parent = bundle.records.find( + (record) => record.evidence_id === result.parent_evidence_id, + ); + if ( + !parent || + parent.operation !== "inspect_evm_interface" || + parent.subject?.digest.sha256 !== inputSha || + parent.parameters.path !== values.path || + parent.parameters.encoding !== "hex" || + "detail" in parent.parameters + ) + throw new Error( + "Complete original EVM source was not retained unchanged", + ); + const original = normalized(parent); + const { hex: _hex, ...identity } = original.bytecode; + const { stdout, ...diagnostics } = original.diagnostics; + const expected = { + ...original, + bytecode: identity, + diagnostics: { ...diagnostics, stdout_code_units: stdout.length }, + }; + if (!isDeepStrictEqual(expected, n)) + throw new Error("EVM summary changed selected original facts"); + for (const [facet, item] of [ + ["functions", original.functions.slice(0, 64)], + [ + "bytecode_hex", + { text: original.bytecode.hex.slice(0, 64), unit: "utf16-code-units" }, + ], + ]) { + const page = await call("inspect_analysis_view", { + source: { kind: "retained-evidence", evidence_id: parent.evidence_id }, + view: { kind: "evm", facet, offset: 0, limit: 64 }, + }); + const v = normalized(page); + if ( + !isDeepStrictEqual(v.item, item) || + v.parent_evidence_id !== parent.evidence_id || + v.artifact.sha256 !== inputSha + ) + throw new Error("EVM retained read changed source facts or identity"); + if (references.includes(page.evidence_id)) + throw new Error("EVM retained read reused an Evidence identity"); + references.push(page.evidence_id); + } + } + const { hex: _hex, ...bytecode } = n.bytecode; + return { + artifact_sha256: targetSha(info), + artifact: n.artifact, + bytecode, + functions: n.functions, + discovery_completeness: n.discovery_completeness, + runtime_execution: n.runtime_execution, + limitations: n.limitations, + evidence_ids: references, + }; +}; + +const workflows = { + "qgis-world-map.gpkg": async () => { + const columns = ["fid", "NAME", "ISO_A3"]; + const input = { + path: values.path, + table: "countries", + row_limit: 1, + ...(values["sqlite-selection"] === "columns" ? { columns } : {}), + }; + const definition = catalogDefinitions.get("inspect_sqlite_database"); + if ( + definition === undefined || + !new Ajv2020({ strict: false, validateFormats: false }).validate( + definition.inputSchema, + input, + ) + ) + throw new Error( + "Selected SQLite request is not advertised by this runtime", + ); + const inspected = await call("inspect_sqlite_database", input); + const report = normalized(inspected); + if (report.rows === null || report.rows.table !== "countries") + throw new Error("Runtime returned no selected country sample"); + const indexes = columns.map((column) => { + const index = report.rows.columns.indexOf(column); + if (index < 0) + throw new Error(`Missing requested SQLite column ${column}`); + return index; + }); + return { + artifact_sha256: targetSha(inspected), + artifact: report.artifact, + wal: report.wal, + engine: report.engine, + database_encoding: report.database_encoding, + schema: report.schema, + rows: { + ...report.rows, + columns, + values: report.rows.values.map((row) => + indexes.map((index) => row[index]), + ), + }, + producer_limitations: report.limitations, + limitations: inspected.limitations, + evidence_ids: [inspected.evidence_id], + }; + }, + "obsidian.asar": async () => { + if (values["javascript-question"] === "selected") { + const inspected = await call("analyze_javascript_application", { + input_path: values.path, + source_paths: ["package.json", "main.js"], + detail: "summary", + }); + const receipt = normalized(inspected); + const parent = receipt.parent_evidence_id; + const evidenceIds = [parent, inspected.evidence_id]; + const modules = []; + let offset = 0; + do { + const page = await call("inspect_analysis_view", { + source: { kind: "retained-evidence", evidence_id: parent }, + view: { kind: "page", collection: "modules", offset, limit: 64 }, + }); + evidenceIds.push(page.evidence_id); + const view = normalized(page); + for (const module of view.items.filter( + (row) => row.path === "main.js", + )) { + const selected = await call("inspect_analysis_view", { + source: { kind: "retained-evidence", evidence_id: parent }, + view: { + kind: "item", + collection: "modules", + selector: { node_id: module.node_id }, + }, + }); + evidenceIds.push(selected.evidence_id); + modules.push(normalized(selected).item); + } + if (view.coverage.exhausted) break; + if ( + view.coverage.next_offset === null || + view.coverage.next_offset <= offset + ) + throw new Error("Module page did not advance"); + offset = view.coverage.next_offset; + } while (true); + return { + artifact_sha256: targetSha(inspected), + ...receipt.summary, + modules, + limitations: receipt.limitations, + evidence_ids: evidenceIds, + }; + } + await call("open_binary", { path: values.path }); + try { + const inspected = await call( + "inspect_artifact", + values.delivery === "summary" ? { detail: "summary" } : {}, + ); + if (values.delivery === "summary") { + const view = normalized(inspected); + const summary = view.summary; + if (!summary.source_complete || !summary.inspection) + throw new Error( + "Expected a complete inventory with inspection coverage", + ); + const parent = view.parent_evidence_id; + const selected = await call("inspect_analysis_view", { + source: { kind: "retained-evidence", evidence_id: parent }, + view: { + kind: "inventory", + collection: "occurrences", + logical_paths: inventoryPaths, + offset: 0, + limit: 64, + }, + }); + const contradictions = []; + let offset = 0; + while (offset < summary.available_counts.integrity_contradictions) { + const page = normalized( + await call("inspect_analysis_view", { + source: { kind: "retained-evidence", evidence_id: parent }, + view: { + kind: "inventory", + collection: "integrity_contradictions", + offset, + limit: 64, + }, + }), + ); + contradictions.push(...page.items); + if (page.coverage.exhausted) break; + if ( + page.coverage.next_offset === null || + page.coverage.next_offset <= offset + ) + throw new Error("Inventory page did not advance"); + offset = page.coverage.next_offset; + } + return { + artifact_sha256: targetSha(inspected), + manifest: summary.manifest, + source_complete: summary.source_complete, + entry_kind_counts: summary.observed_entry_kind_counts, + requested_paths: normalized(selected).items, + inventory_evidence_ids: summary.inventory_evidence_ids, + integrity_contradictions: contradictions, + coverage: summary.inspection.coverage, + unexplored_branches: summary.inspection.unexplored_branches, + limitations: view.limitations, + evidence_ids: [inspected.evidence_id, selected.evidence_id], + }; + } + const inspection = normalized(inspected); + const inventory = inspection.substeps[0].evidence; + const graph = normalized(inventory); + const counts = { file: 0, directory: 0, symlink: 0, slice: 0 }; + for (const row of graph.occurrences) counts[row.entry_kind]++; + const { parseArtifactInventoryEvidence } = await import( + pathToFileURL( + resolve( + values["runtime-root"], + "dist/domain/artifactInventoryEvidence.js", + ), + ).href + ); + const checked = parseArtifactInventoryEvidence(inventory); + return { + artifact_sha256: targetSha(inspected), + manifest: graph.manifest, + source_complete: checked.inventory.complete, + entry_kind_counts: counts, + requested_paths: graph.occurrences.filter((row) => + inventoryPaths.includes(row.logical_path), + ), + inventory_evidence_ids: [inventory.evidence_id], + integrity_contradictions: graph.integrity_contradictions, + coverage: inspection.coverage, + unexplored_branches: inspection.unexplored_branches, + evidence_ids: [inspected.evidence_id, inventory.evidence_id], + limitations: unique([ + ...inspected.limitations, + ...inspection.limitations, + ...inventory.limitations, + ]), + }; + } finally { + await call("close_binary", {}); + } + }, + "newpipe.apk": async () => { + const packageInput = { + path: values.path, + ...(values.delivery === "summary" ? { detail: "summary" } : {}), + }; + const definition = catalogDefinitions.get("inspect_android_package"); + if ( + definition === undefined || + !new Ajv2020({ strict: false, validateFormats: false }).validate( + definition.inputSchema, + packageInput, + ) + ) + throw new Error( + "Selected Android delivery is not advertised by this runtime", + ); + const pkg = await call("inspect_android_package", packageInput); + const result = normalized(pkg); + const report = values.delivery === "summary" ? result.summary : result; + if ( + values.delivery === "summary" && + (result.kind !== "summary" || + result.parent_operation !== "inspect_android_package") + ) + throw new Error("Runtime returned no retained Android package summary"); + const { manifest, ...declarations } = report; + const manifestObservation = + values.delivery === "summary" + ? manifest + : { + status: manifest.status, + reported_total_bytes: manifest.reported_total_bytes, + text_code_units: manifest.text.length, + text_included: false, + }; + const found = await call("search_android_classes", { + path: values.path, + query: "MainActivity", + }); + const cls = await call("inspect_android_class", { + path: values.path, + class_name: "org.schabi.newpipe.MainActivity", + }); + return { + artifact_sha256: targetSha(pkg), + package_name: report.package_name, + version_name: report.version_name, + version_code: report.version_code, + package_declarations: declarations, + manifest_observation: manifestObservation, + package_limitations: pkg.limitations, + matches: normalized(found).matches, + coverage: normalized(found).coverage, + onCreate: normalized(cls).methods.filter( + (row) => row.name === "onCreate", + ), + evidence_ids: [pkg.evidence_id, found.evidence_id, cls.evidence_id], + }; + }, + "sharex.dll": inspectManagedTarget, + "sharex.helpers.dll": inspectManagedTarget, + "localsend-arm64.apk": async () => { + const input = { + path: values.path, + ...(values.delivery === "summary" ? { detail: "summary" } : {}), + }; + const definition = catalogDefinitions.get("inspect_dart_aot"); + if ( + definition === undefined || + !new Ajv2020({ strict: false, validateFormats: false }).validate( + definition.inputSchema, + input, + ) + ) + throw new Error( + "Selected Dart AOT delivery is not advertised by this runtime", + ); + const inspected = await call("inspect_dart_aot", input); + const result = normalized(inspected); + if ( + values.delivery === "summary" && + (result.kind !== "summary" || + result.parent_operation !== "inspect_dart_aot") + ) + throw new Error("Runtime returned no retained Dart AOT summary"); + const report = values.delivery === "summary" ? result.summary : result; + const { package_uris, dart_uris, class_like_tokens, ...pool } = + report.string_pool; + return { + artifact_sha256: targetSha(inspected), + target: report.target, + abi: report.abi, + libapp: report.libapp, + string_pool: + values.delivery === "summary" + ? pool + : { + ...pool, + returned_counts: { + package_uris: package_uris.length, + dart_uris: dart_uris.length, + class_like_tokens: class_like_tokens.length, + }, + }, + coverage: report.coverage, + limitations: inspected.limitations, + evidence_ids: [inspected.evidence_id], + }; + }, + "openwrt.bin": async () => { + const info = await call("inspect_firmware_regions", { path: values.path }); + return { + artifact_sha256: targetSha(info), + result: normalized(info), + evidence_ids: [info.evidence_id], + }; + }, + "sqlite.wasm": inspectWasmTarget, + "vscode.tree-sitter.wasm": inspectWasmTarget, + "vscode.tree-sitter-css.wasm": inspectWasmTarget, + "weth.hex": inspectEvmTarget, + "uniswap-v3.factory.hex": inspectEvmTarget, + "uniswap-v3.pool.hex": inspectEvmTarget, + ...Object.fromEntries( + NATIVE_ARTIFACTS.map((artifact) => [ + artifact, + async () => + measureNativeEntry({ + seed: await nativeEntrySeed(artifact, values.path), + values, + call, + inputSha, + ToolFailure, + }), + ]), + ), +}; + +try { + await client.connect(transport); + connectedMs = performance.now() - started; + // Observe the public Transport seam without replacing its codec or lifecycle. + // These intervals separate SDK work from the transport/server roundtrip; + // the roundtrip still includes server work, framing, IO and client parsing. + const send = transport.send.bind(transport); + transport.send = (message, options) => { + if (message.method === "tools/call" && activeCall !== undefined) { + activeCall.rpc.sent = performance.now(); + pendingRpc.set(message.id, activeCall); + } + return send(message, options); + }; + const receive = transport.onmessage; + transport.onmessage = (message, extra) => { + if ("result" in message || "error" in message) { + const pending = pendingRpc.get(message.id); + if (pending !== undefined) { + pending.rpc.received = performance.now(); + pendingRpc.delete(message.id); + } + } + receive?.(message, extra); + }; + transport.stderr?.on("data", (chunk) => diagnostics.push(chunk.toString())); + const catalogStarted = performance.now(); + const tools = []; + let cursor; + do { + const page = await client.listTools(cursor === undefined ? {} : { cursor }); + tools.push(...page.tools); + cursor = page.nextCursor; + } while (cursor !== undefined); + catalogMs = performance.now() - catalogStarted; + for (const tool of tools) { + if (catalogDefinitions.has(tool.name)) + throw new Error("Duplicate advertised tool name"); + catalogDefinitions.set(tool.name, tool); + } + catalogBytes = Buffer.byteLength(JSON.stringify(tools)); + catalogInputBytes = Buffer.byteLength( + JSON.stringify( + tools.map(({ name, description, inputSchema }) => ({ + name, + description, + inputSchema, + })), + ), + ); + await writeFile( + resolve(values.output, "catalog.json"), + JSON.stringify(tools), + ); + const workflow = workflows[values.artifact]; + if (!workflow) throw new Error("No pinned question for selected artifact"); + result = await workflow(); + if (result.artifact_sha256 !== inputSha) + throw new Error("Producer target digest differs from selected bytes"); +} catch (error) { + failure = String(error); +} finally { + try { + await client.close(); + } catch (error) { + failure = `${failure ?? ""} cleanup: ${String(error)}`; + } +} +await writeFile( + resolve(values.output, "diagnostics.log"), + diagnostics.join(""), +); +const finalInputSha = await fileSha(values.path); +if (finalInputSha !== inputSha) + failure = `${failure ?? ""} Selected artifact bytes changed during the workflow`; +if (result) + await writeFile( + resolve(values.output, "answer.json"), + JSON.stringify(result), + ); +const report = { + revision: values.revision, + runtime_root: values["runtime-root"], + artifact: values.artifact, + artifact_sha256: inputSha, + artifact_sha256_after: finalInputSha, + delivery: values.delivery, + sdk_schema_mode: values.schemas, + retained_verification: values["verify-retained"], + native_question: NATIVE_ARTIFACTS.includes(values.artifact) + ? values["native-question"] + : null, + javascript_question: + values.artifact === "obsidian.asar" ? values["javascript-question"] : null, + managed_question: ["sharex.dll", "sharex.helpers.dll"].includes( + values.artifact, + ) + ? values["managed-question"] + : null, + sqlite_selection: + values.artifact === "qgis-world-map.gpkg" + ? values["sqlite-selection"] + : null, + provider_settings_sha256: sha(JSON.stringify(selectedProviders)), + provider_search_path_sha256: sha( + selectedProviders.PATH ?? process.env.PATH ?? "", + ), + provider_environment_policy_sha256: sha(providerPolicyText), + ...fingerprints, + node_version: process.version, + sdk_client_version: clientVersion, + sdk_server_version: serverVersion, + platform: process.platform, + architecture: process.arch, + connected_ms: connectedMs, + catalog_ms: catalogMs, + catalog_json_utf8_bytes: catalogBytes, + catalog_input_definition_utf8_bytes: catalogInputBytes, + elapsed_ms: performance.now() - started, + calls, + failure: failure ?? null, + measurement_scope: + "Public SDK Transport timestamps split client work from the transport/server roundtrip; parsed result JSON bytes are not raw wire bytes; runner encoding and writes are outside each call; engine-stage durations and independent producer truth are not inferred", +}; +await writeFile( + resolve(values.output, "summary.json"), + JSON.stringify(report, null, 2), +); +process.stdout.write( + JSON.stringify({ + artifact: values.artifact, + delivery: values.delivery, + elapsed_ms: report.elapsed_ms, + failure: failure?.slice(0, 800) ?? null, + }) + "\n", +); +if (failure) process.exitCode = 1; diff --git a/experiments/analysis-efficiency/model-context.md b/experiments/analysis-efficiency/model-context.md new file mode 100644 index 000000000..3d878beed --- /dev/null +++ b/experiments/analysis-efficiency/model-context.md @@ -0,0 +1,209 @@ +# Observe the client boundary before claiming token savings + +Continues [#2016](https://github.com/morluto/rea/issues/2016) after the managed +summary [PR #2413](https://github.com/morluto/rea/pull/2413) merged as +`82cfcee19f18b0eeae9a330ba04e0411cdf85225`. That opt-in view has verified smaller +delivery and complete-default migration, while its original real-model cohort +does not establish token savings. This follow-up measures why raw reply bytes +and aggregate model usage cannot be treated as interchangeable observations. + +## Concrete diagnostic observation + +An individual real Codex CLI 0.161.0 control uses frozen runtime +`ae8051302b5834322fa00cfa31c968ae74ab6ed9`, the unchanged ShareX identity question, +requested `gpt-5.6-terra` high and the same two enabled REA tools. A private +diagnostic copy removes the original runner's explicit `--ephemeral` flag. +Authentication/profile cleanup still runs; only selected tool/usage items are +retained after filtering the owned rollout. Its source rollout SHA-256 is +`d4df41d6187880d177f00b7533d85ad032c9c4ec502a39e7d5a566180e10461b` and the retained +filtered-item SHA-256 is +`0d5b4fb67c5674d1ba14ac32ae37e9a72b0368f4d9f5f9f81eb4d13193cda260`. +The original whole-copy is removed; account metadata, world state, messages and +internal passthrough are not retained in the filtered receipt. + +Despite the requested `direct` configuration label, the observed client uses +three JavaScript `exec` calls. First it filters `ALL_TOOLS` with a broad +`/REA|reverse|artifact|managed|assembly|metadata/i` expression and prints matching +metadata. The client reports truncation of a 164,005-token original output. +This is the client's output measurement, not billed input or a complete inventory. +Next it invokes complete managed inspection but selects requested normalized +identity/classification fields before printing. Finally it invokes native-boundary +inspection and prints selected fields. The actual original complete MCP replies +remain available in the separate public-event transcript. + +The persisted custom-tool output values are 41,704 / 2,154 / 13,489 UTF-8 bytes. +These are the serialized recorded output **values**, not raw wire bytes or exact +submitted model requests. The trace reports four per-response usage observations: + +| Response | Input | Cached input | Output | +| -------- | -----: | -----------: | -----: | +| 1 | 10,400 | 0 | 132 | +| 2 | 19,992 | 9,984 | 456 | +| 3 | 21,242 | 19,200 | 251 | +| 4 | 24,799 | 20,224 | 1,535 | + +Their totals match public turn usage: 76,433 input, 49,408 cached, 27,025 uncached +and 2,374 output, with 61.436 seconds observed wall time. Two MCP calls alone do +not describe the client's discovery/execution rounds. This proves the observed +control can project a complete result before printing it; it does not establish +that every earlier control/candidate did the same, or attribute every token +difference to discovery. The earlier `direct` label specifies requested client +configuration, not a verified absence of an executor. + +Initial transcript-capture attempts retained empty source lists because the +original runner intentionally passed `--ephemeral`. A first private flag-removal +edit missed its newline and failed; that candidate remains an unsuccessful +capture attempt. The later corrected control is an individual diagnostic, +not a comparable pair with that candidate. Other exploratory aggregates remain +private and are not silently folded into the original four-trial cohort. + +## Reproducible optional capture + +`agent-trial.py --capture-tool-context` omits `--ephemeral` only for that explicitly +selected temporary trial. Its default is unchanged. The profile still disappears +in `finally`, including when capture fails. The capture reads only its owned +`sessions/*.jsonl` records, rejects symlink sources, and retains: + +- Custom/function tool calls and replies, preserving call IDs and exact values. +- Per-response token counts and cumulative counts, with original response IDs. +- Client token-count events, retaining explicit unknown `info: null`. + +It excludes session/account metadata, world state, user/developer messages, +encrypted reasoning, internal passthrough and unknown nested usage fields. It +does not copy authentication, configuration or the ambient environment. Receipts +record source/retained digests, event counts, malformed-line failures and missing +rollouts as unavailable. Capture is an observation of persisted client items, +not proof of the exact request accepted by a remote model service. + +Run the same frozen runtime, question, tool selection and capture mode on both +sides. Preserve source/settings hashes and separate requested versus observed +behavior. Use the existing resource wrapper with unchanged one CPU, 4 GiB hard +memory, 3 GiB early-stop, no swap and task/host safeguards. Final physical counters +remain unknown when transient cgroups disappear; this instrumentation does not +repair that measurement limitation. + +The focused Python tests run through the existing CI `test:python` gate. +They cover account/ambient exclusion while preserving caller data, malformed and +missing records, foreign symlinks, and capture failure without copied-credential +leakage. The cleanup test simulates a CLI and establishes only cleanup semantics; +it is not real-model/provider evidence. + +## An explicit discovery-guidance experiment + +`--guide-enabled-tools` is another opt-in experiment flag. It requires a nonempty +`--enabled-tools` list and adds the exact corresponding `mcp__rea__...` function +names to the temporary developer instructions, requesting only exact-name +metadata discovery. It preserves the analyst question, operation order, tool +selection and provider inputs. The default instruction is unchanged. Missing or +invalid selected tools fail before creating an output/profile. The test gate +also verifies the new prerequisite without acquiring a profile. + +Compare guided and unguided runs on the **same** frozen REA runtime with matching +capture mode and requested facts. A smaller discovery response or additional +hint is not itself a task/token success: grade answers, count all response usage, +preserve failed/truncated runs and repeat both orders before recommending this +guidance. This is a caller-side experiment, not a new REA tool or provider preset. + +## First committed capture pair + +Checkpoint `9ebdcc458c399b9bdecaaca2ef47422888231181` runs the unchanged question +against frozen control `ae8051302b5834322fa00cfa31c968ae74ab6ed9` and candidate +`8bc1601ca51e417ca472d90ea0367e9418a1a0f2`, both with capture enabled and no tool +guidance. Both captures succeed with 10 retained events, unchanged source bytes, +removed profiles, two successful MCP calls and passing selected factual checks. +Full grader gates remain false because final physical resource counters are +unavailable; factual subsets do not override that limitation. + +| Side | Input | Cached | Uncached | Output | Wall seconds | +| ----------------- | -----: | -----: | -------: | -----: | -----------: | +| Complete control | 52,656 | 27,136 | 25,520 | 2,015 | 57.736 | +| Summary candidate | 56,655 | 29,184 | 27,471 | 1,534 | 55.055 | + +Both clients make two executor calls and three response-usage observations. +First they print broad discovered metadata, with truncation. Then each executor +sequentially performs both MCP operations, preserving selected-target dependency +order. The control prints a 2,086-byte output value; the candidate prints 22,770 +bytes. Their discovery output values are 41,723 and 41,675 bytes. These are +recorded serialized values and remain distinct from raw MCP envelopes, billed +tokens and exact submitted requests. Both requested modes are `direct`; the +actual executor use is separately observed. + +The candidate's smaller raw metadata reply does not result in a smaller printed +client value in this pair. Candidate input/uncached tokens remain higher. The +observed projection and round counts are useful constraints for the next +experiment; this one pair does not attribute all usage differences to either +formatting or discovery, or establish a reliable speedup. + +## Same-runtime guided discovery, repeated in both orders + +Checkpoint `e20bd0e2a905f06bc8c56fe04b0e61f3da88636a` runs four actual Codex trials +in unguided/guided/guided/unguided order. All use the **same** frozen candidate +runtime, artifact, original question, requested model/reasoning, two selected +tools, provider settings and capture mode. Only the explicit discovery-guidance +treatment changes. Every trial selects artifact summary and makes the same two +successful MCP calls in dependency order; source bytes stay unchanged, captures +succeed and profiles are removed. + +| Trial | Input | Cached | Uncached | Output | Seconds | Observed responses | +| ---------- | ------: | -----: | -------: | -----: | ------: | -----------------: | +| Unguided 1 | 77,251 | 50,432 | 26,819 | 1,931 | 62.066 | 4 | +| Guided 1 | 39,175 | 23,040 | 16,135 | 1,763 | 55.658 | 3 | +| Guided 2 | 58,336 | 38,144 | 20,192 | 1,626 | 50.685 | 4 | +| Unguided 2 | 103,301 | 72,704 | 30,597 | 1,983 | 60.336 | 5 | + +Both guided discovery output values repeat at 12,336 bytes without truncation, +versus 41,709 bytes with truncation on both unguided trials. The recorded +executor/output usage explains observable discovery and round differences; it +does not certify exact remote request contents or attribute every token to the +hint. CPU samples are 6.303–6.554 seconds and peak family memory 684,519,424– +712,028,160 bytes, with no guard abort. Final resource counters remain unknown. +These samples do not establish a memory or CPU improvement. + +Unguided 1 omits `classification.container` and fails the selected factual gate; +it is not a fully acceptable comparison answer. Guided 1 and Unguided 2 pass +that gate. Guided 2 initially fails exact coverage-object equality because it +adds `module_ref_count: 0` and `pinvoke_import_count: 0` to the explicitly named +native scope. Both numbers exactly match the producer's returned arrays. The +grader now explicitly verifies only these two known additional counts, including +integer type, while still requiring all original coverage facts. Unknown extra +claims, conflicting aliases, wrong counts, boolean/string counts and omitted +issues continue to fail. Source coverage remains unchanged; returned-row counts +do not establish global absence. Original failure receipts remain preserved; +the regrade separately records its new source hash. Guided 2 then passes selected +facts, but every **full** gate still fails unknown final physical resource checks. + +The second comparison has two factually acceptable answers: observed guided input +falls about 43.5%, uncached input about 34.0%, and wall time about 16.0%. The first +comparison has an incomplete unguided answer and is reported without counting it +as equivalent completed work. Two trials per treatment on one question/application +remain a preliminary signal, not a general default recommendation. The hint stays +opt-in; wider questions/domains, count/coverage representation and client round +behavior need further verification before promoting it into general guidance. + +## Real Android follow-up: the primary outcomes are mixed + +Checkpoint `22834c7d73056e2480b426848f58c31af0c307bc` checks the pinned real +NewPipe 0.29.1 APK using actual configured JADX 0.7.1/Java, the original Android +question and the same frozen candidate runtime. First a fresh SDK workflow +validates three live advertised operations and produces the comparison facts: +package/version identity, every case-sensitive MainActivity match and all +reported onCreate entries, preserving signatures, overload indices and null DEX +descriptors. It takes 26.961 seconds; the owned scope samples 1,234,735,104 bytes. + +Both subsequent actual Codex trials use the same three selected tool names, +capture mode, model/reasoning, question and provider settings. Only discovery +guidance changes. Each makes three successful MCP calls and five observed model +responses, passes selected facts against the fresh actual producer, preserves +source bytes and removes its temporary profile. No APK execution is requested. + +| Trial | Input | Cached | Uncached | Output | Wall seconds | Sampled peak bytes | +| -------- | -----: | -----: | -------: | -----: | -----------: | -----------------: | +| Unguided | 99,913 | 80,640 | 19,273 | 1,527 | 66.797 | 1,405,829,120 | +| Guided | 89,220 | 62,464 | 26,756 | 2,142 | 76.936 | 1,345,576,960 | + +Total input falls about 10.7%, but uncached input increases and wall time is +longer. One pair does not demonstrate improved Android performance or memory. +No guard abort occurs; final counters remain unknown and full resource gates +remain false. This second domain is a concrete counterexample to generalizing +the favorable managed comparison. Keep both flags optional and continue +task-specific experiments before changing installed/default agent guidance. diff --git a/experiments/analysis-efficiency/native-entry-views.md b/experiments/analysis-efficiency/native-entry-views.md new file mode 100644 index 000000000..1c02fbfd1 --- /dev/null +++ b/experiments/analysis-efficiency/native-entry-views.md @@ -0,0 +1,178 @@ +# Native PE and DOS entry-view checkpoint + +Continuation of [#2016](https://github.com/morluto/rea/issues/2016) after +#2122 and #2193 merged. Real Ghidra observations and real Codex CLI answers +support the selected native facets on these shipped inputs. They do not justify +an automatic native summary policy: the four selected replies are larger than +the complete dossier for the small PE entry, and smaller for the DOS entry. +The initial complete analysis still runs and is delivered in both cases. + +This checkpoint changes experiment scripts, corpus inputs and grading only. +Existing production CLI/MCP contracts, defaults and session behavior are unchanged. + +## Inputs and runtime + +Production runtime: main `10400fdb57e4226c5ce15af17968a664f35498ce`, +including the merged WASM summary work and subsequent main changes. Node +24.18.0/npm 11.16.0, locked dependencies, actual Ghidra 12.1.4 on Linux. +Default auto-analysis remains enabled, with a 768 MiB JVM ceiling and one +active processor. The whole process family uses the existing one-CPU, +4 GiB hard/3 GiB early-stop, no-swap, bounded-task resource scope. + +| Shipped artifact | Selected bytes | SHA-256 | Static scope | +| ---------------------------------- | -------------: | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------- | +| ShareX 19.0.2 `ShareX.exe` | 198,656 | `46af1ccc514b395cb703633abb5a505a771942b7db9b1915f31aeea541b3685f` | Native PE32+ x86-64 component with no CLR directory; entry `0x1400125c0` derived from original image base/RVA | +| FreeDOS EDLIN 2.24 `BIN/EDLIN.EXE` | 31,492 | `96b2b6d543e2d8bdc83e313756444e103339eb5ee2c1229abe3607539b31ad6e` | Original UPX-compressed DOS MZ; admitted entry `0x10000`, independently verified static load image | + +Acquisition URLs, archive sizes/digests and exact regular ZIP members are in +[corpus.json](corpus.json). EDLIN's package `APPINFO/EDLIN.LSM` reports its +version and UPX compression. No binary was executed, unpacked or committed. +The independent PE header does not establish Windows runtime behavior. +DOS load-image verification and unpacking-stub pseudocode do not recover the +editor's application logic or establish DOS execution. DOS COM is still untested. + +The SDK and frozen model runtime share the exact `dist/` and `bridge/` file +table digest: +`e2b67eb0966072fd8b159edfab074cbaf1db9bfc0ac9c57d25ba1435cc0fdbcf`. +The model copy was independently checked against all 1,375 compiled files and +30 bridge files. Runtime copies and detailed receipts remain outside Git. + +## Public SDK observations + +The workflow opens the selected target with Ghidra, resolves the entry, +calls `analyze_function` once, reads retained procedure/pseudocode/callers/callees +facets, and closes the ephemeral session. DOS obtains its address from +`inspect_native_load_image` before resolving the procedure. Each facet is checked +against the complete producer facts, original parent ID, target digest and distinct +derived Evidence ID. The actual SDK validates named advertised output contracts. + +| Entry | Complete dossier JSON bytes | Four facet replies combined | Workflow seconds | First provider query seconds | Last-observed family CPU seconds | Sampled family peak MiB | +| ------------ | --------------------------: | --------------------------: | ---------------: | ---------------------------: | -------------------------------: | ----------------------: | +| ShareX PE | 50,936 | 68,257 | 63.123 | 57.490 | 63.660 | 1,197.85 | +| EDLIN DOS MZ | 224,670 | 70,539 | 26.436 | 21.366 | 26.899 | 939.25 | + +These are exploratory observations, not a paired implementation performance +cohort. JSON byte counts include the SDK tool-result representations, excluding +catalog discovery and wire framing; they are not model token counts. Four PE +facets cost about 34% more bytes than that dossier. The DOS facets cost about +69% fewer bytes **when reading already-retained Evidence**. Their first analysis +still returned the full dossier; summing both paths increases first-task traffic. +The first provider query includes the observable wait for the imported Program +and its analysis, not an independently measured engine-only stage. + +The observed PE entry contains 18 analyzed bytes, zero recorded callers and two +resolved callees. Ghidra's terminal-call caveat remains explicit. The DOS entry +contains 53 analyzed bytes and zero recorded callers/callees; overlapping +instruction and abnormal stack-frame warnings remain in the pseudocode. +Neither zero count establishes absence of unresolved runtime calls. + +An earlier PE probe completed production analysis and two facets, then failed +its harness assertion: a pseudocode page is `{text, unit}`, not a string. That +failed attempt remains archived and is excluded from successful workflow figures. +The corrected exploratory SDK driver fingerprints are +`4876c0ecaa84069ddc508e29649715c6c914bd3c4960a76fa9724b5992123699` +and native-helper `76023ad45cd1edab57dcd4a8ccf29a9b8a8378029ff2d9711ae35c73940e80d6`. +The published helper in `6d7f6885c` removes redundant scopes; replaying the actual +PE/DOS replies reproduces every answer field and the same 9/10 calls. Recorded +real jq entry and entry/main replies also preserve their selected facts, profile +and 4/12-call ordering. These replays are driver regression checks, not fresh +provider runs or timing measurements. + +## Real Codex CLI observations + +Three serial runs used Codex CLI 0.161.0, requested alias `gpt-5.6-terra`, high +reasoning, temporary isolated profiles and the frozen modified REA MCP runtime. +Resolved server-side model identity is not inferred. The same explicit seven-tool +subset was enabled: open, containing-procedure resolution, dossier, analysis view, +load image, retained Evidence discovery and close. This is not full-catalog tool +selection verification. Questions are [PE](questions/native-pe.txt) and +[DOS](questions/native-dos.txt). + +| Trial | Total input | Cached input | Uncached input | Output | Seconds | Calls / failed | +| ----- | ----------: | -----------: | -------------: | -----: | ------: | -------------: | +| PE 1 | 451,337 | 399,616 | 51,721 | 3,820 | 130.073 | 12 / 2 | +| DOS 1 | 730,578 | 658,944 | 71,634 | 3,310 | 134.435 | 9 / 0 | +| PE 2 | 498,322 | 429,056 | 69,266 | 3,038 | 192.373 | 9 / 1 | + +All three answers match the selected original digest, address, procedure +classification/signature/locals, inclusive body ranges, body byte count, +pseudocode prefix and relationship counts. Actual Evidence references were +observed in the responses; target bytes remained unchanged, close completed and +the copied profiles were removed. DOS additionally matches the verified load +status and every supplied load-image metadata field. Manual review preserves +static/packed-target and terminal-flow qualifications. + +The first grader expected only particular nested JSON shapes. It rejected PE's +equivalent text-page object/inclusive-range label and could not grade DOS's +explicit `entry @ 0x10000` display. The updated grader compares exact source +values for those representations without parsing displays into lookup identities. +It still rejects wrong text units, returned lengths, body endpoints and missing +facts. Original answers and first grading attempts remain archived; regrading +does not repeat model calls or change their tokens/times. + +The PE agent hit the advertised-but-unimplemented native summary recipe: both +trials attempted `view: {kind: "summary"}`; the first also tried the invalid +native facet `summary`. Those failed calls and all subsequent recovery/repeated +reads remain included. The public SDK independently reproduced `invalid_request` +for native summary on both inputs. This pre-existing contract-description mismatch +is recorded in `/tmp/rea-analysis-efficiency-bugs-20261012.md` for team repair, +as requested; this branch does not repair it. + +Model sampled peaks were 1,318.74 / 1,017.70 / 1,234.92 MiB, with last-observed +family CPU 72.956 / 71.534 / 74.089 seconds. SDK/model scopes did not abort and +their last-observed limit-event counters were zero. Final cgroup counters remained +unavailable after scope teardown: the strict resource-qualified overall grades +remain unverified. The selected fact/lifecycle checks pass; no universal latency, +OOM absence or CPU/memory saving is inferred from these samples. + +## Reproduction and next decision + +Use the pinned toolchain and build the selected production revision. Keep its +runtime copy, matching dependencies, provider settings, binaries and receipts +outside the checkout, as described in [README.md](README.md). + +```sh +python3 experiments/analysis-efficiency/resource-run.py -- \ + node experiments/analysis-efficiency/measure.mjs \ + --runtime-root /absolute/frozen-runtime --revision EXACT_PRODUCTION_SHA \ + --artifact sharex.exe --path /absolute/ShareX.exe \ + --providers /absolute/explicit-providers.json \ + --native-question entry-views --schemas selected \ + --output /absolute/new-native-measurement +``` + +For DOS select `--artifact freedos.edlin.exe` and the original extracted +`EDLIN.EXE`. `--native-question entry` retains the existing compact experimental +answer; `entry-views` performs additional verification reads and the explicit +summary refusal probe. It does not select summary delivery from `analyze_function`. +The helper fingerprint participates in comparison, and missing native helper +fingerprints are not treated as a comparable current driver. + +The reviewed `entry-views` answer separates selected facet facts from run-specific +references: `evidence_ids.retained_views` retains each facet's original view and +parent ID, while `retained_views` holds its item, coverage, limitations and unknowns. +DOS load-image facts retain their source ID and must match the selected carrier +digest before their entry address can be used; a stale result closes the session +without querying a procedure. +Derived view IDs are checked against every prior producer reference as well as +other derived views. DOS model grades require the actual completed load-image +response and its reported source ID; status, digest, entry and supplied metadata +are checked against that observation. Missing, failed or unreferenced responses +cannot establish load-image verification. +The comparator preserves both runs' reference maps and compares the facts. Existing +`entry`/`entry-and-main` answers keep their ID arrays. Historical SDK receipts above +retain their original pre-review representation; no replies or measurements were +rewritten, and no provider/model runs were repeated for this representation fix. + +Relevant validation includes the real workflows above, recorded-reply regression, +grader negative probes, JavaScript/Python syntax, formatting/diff checks and +`npm run check:fast`. The cold type/lint gate passed in 112.602 seconds with +sampled peak 3,220,914,176 bytes and five last-observed `memory.high` events; +this gate is not a performance-qualified experiment. Unrelated domain suites, +packaging and earlier model cohorts were not rerun for this experiment-only change. + +The next useful comparison is question-specific native primitives versus a +complete dossier, with identical requested facts and actual model trials. +Larger PE functions and another unpacked DOS/COM application can extend the +coverage progressively. Preserve existing complete defaults and solve the +summary-description bug separately before recommending a native summary route. diff --git a/experiments/analysis-efficiency/native-entry.mjs b/experiments/analysis-efficiency/native-entry.mjs new file mode 100644 index 000000000..84bc934ff --- /dev/null +++ b/experiments/analysis-efficiency/native-entry.mjs @@ -0,0 +1,272 @@ +import { open, readFile } from "node:fs/promises"; +import { isDeepStrictEqual } from "node:util"; + +export const NATIVE_ARTIFACTS = ["jq", "sharex.exe", "freedos.edlin.exe"]; +const normalized = (value) => value.normalized_result; + +const retainedEntryViews = async ( + call, + info, + inputSha, + ToolFailure, + sourceEvidenceIds, +) => { + const n = normalized(info); + const retainedViews = []; + const retainedViewEvidence = []; + const observedEvidenceIds = new Set([info.evidence_id, ...sourceEvidenceIds]); + let nativeSummaryOutcome, summaryEvidenceId; + for (const facet of ["procedure", "pseudocode", "callers", "callees"]) { + const selected = await call("inspect_analysis_view", { + source: { kind: "retained-evidence", evidence_id: info.evidence_id }, + view: { + kind: "native", + facet, + offset: 0, + limit: facet === "pseudocode" ? 512 : 64, + }, + }); + const view = normalized(selected); + if (observedEvidenceIds.has(selected.evidence_id)) + throw new Error("Retained native view reused an Evidence identity"); + const expected = + facet === "procedure" + ? n.procedure + : facet === "pseudocode" + ? { text: n.pseudocode.slice(0, 512), unit: "utf16-code-units" } + : n[facet].slice(0, 64); + if ( + !isDeepStrictEqual(view.item, expected) || + view.parent_evidence_id !== info.evidence_id || + view.artifact.sha256 !== inputSha + ) + throw new Error( + "Retained native view changed the selected source facts or identity", + ); + observedEvidenceIds.add(selected.evidence_id); + retainedViews.push({ + facet, + item: view.item, + coverage: view.coverage, + limitations: view.limitations, + unknowns: view.unknowns, + }); + retainedViewEvidence.push({ + facet, + evidence_id: selected.evidence_id, + parent_evidence_id: view.parent_evidence_id, + }); + } + // Exercise the advertised summary recipe separately. A known refusal + // is recorded as such; it does not validate a nonexistent capability. + try { + const summary = await call("inspect_analysis_view", { + source: { kind: "retained-evidence", evidence_id: info.evidence_id }, + view: { kind: "summary" }, + }); + if (observedEvidenceIds.has(summary.evidence_id)) + throw new Error("Native summary reused an Evidence identity"); + nativeSummaryOutcome = { status: "supported" }; + summaryEvidenceId = summary.evidence_id; + } catch (error) { + if ( + !(error instanceof ToolFailure) || + error.value?.error?.code !== "invalid_request" + ) + throw error; + nativeSummaryOutcome = { + status: "unsupported", + error: error.value.error, + }; + } + return { + retainedViews, + retainedViewEvidence, + nativeSummaryOutcome, + summaryEvidenceId, + }; +}; + +const retainedJqMain = async (call, ToolFailure) => { + // This exact application entry is materialized in the pinned jq entry's + // observed MOV RDI, 0x401f00 instruction, not an original-source claim. + let main; + const mainEvidenceIds = []; + let sourceId; + try { + const completed = await call("analyze_function", { + procedure: "0x401f00", + }); + sourceId = completed.evidence_id; + } catch (error) { + const reference = + error instanceof ToolFailure && + error.value?.error?.code === "resource_constraint" + ? error.value.error.details?.reported_limits?.evidence_reference + : undefined; + if (reference?.kind !== "retained-evidence") throw error; + sourceId = reference.evidence_id; + } + mainEvidenceIds.push(sourceId); + main = {}; + for (const facet of [ + "procedure", + "pseudocode", + "referenced_strings", + "callees", + "callers", + "basic_blocks", + ]) { + let offset = 0; + const items = []; + const pages = []; + do { + const selected = await call("inspect_analysis_view", { + source: { kind: "retained-evidence", evidence_id: sourceId }, + view: { + kind: "native", + facet, + offset, + limit: + facet === "pseudocode" ? 65536 : facet === "basic_blocks" ? 1 : 64, + }, + }); + mainEvidenceIds.push(selected.evidence_id); + const v = normalized(selected); + items.push(v.item); + pages.push({ + coverage: v.coverage, + limitations: v.limitations, + unknowns: v.unknowns, + }); + if (v.coverage.exhausted || facet === "basic_blocks") break; + if (v.coverage.next_offset === null || v.coverage.next_offset <= offset) + throw new Error("Native view did not advance"); + offset = v.coverage.next_offset; + } while (true); + main[facet] = { items, pages }; + } + return { main, mainEvidenceIds }; +}; + +export const measureNativeEntry = async ({ + seed, + values, + call, + inputSha, + ToolFailure, +}) => { + await call("open_binary", { path: values.path, provider_id: "ghidra" }); + try { + // DOS addresses follow the actual admitted load image. A file header + // offset is not a provider address or proof of runtime execution. + let loadImage, loadImageEvidenceId; + if (seed === undefined) { + const imageEvidence = await call("inspect_native_load_image", {}); + loadImage = normalized(imageEvidence); + if (loadImage.status !== "verified") + throw new Error( + "The shipped DOS load image was not independently verified", + ); + if (loadImage.target_sha256 !== inputSha) + throw new Error("The DOS load image belongs to a different target"); + loadImageEvidenceId = imageEvidence.evidence_id; + seed = loadImage.entry.linear_address; + } + const address = seed; + const containing = await call("resolve_containing_procedure", { + address, + }); + const info = await call("analyze_function", { procedure: address }); + const n = normalized(info); + const selected = + values["native-question"] === "entry-views" + ? await retainedEntryViews(call, info, inputSha, ToolFailure, [ + containing.evidence_id, + ...(loadImageEvidenceId === undefined ? [] : [loadImageEvidenceId]), + ]) + : {}; + const { main, mainEvidenceIds = [] } = + values["native-question"] === "entry-and-main" + ? await retainedJqMain(call, ToolFailure) + : {}; + return { + artifact_sha256: info.subject?.digest.sha256, + entry_address: address, + containing_procedure: normalized(containing), + procedure: n.procedure, + pseudocode_prefix: n.pseudocode.slice(0, 512), + caller_count: n.callers.length, + callee_count: n.callees.length, + ...(main === undefined ? {} : { main }), + analysis_profile: info.analysis_profile, + ...(loadImage === undefined ? {} : { load_image: loadImage }), + ...(selected.retainedViews === undefined + ? {} + : { + retained_views: selected.retainedViews, + native_summary_outcome: selected.nativeSummaryOutcome, + }), + evidence_ids: + selected.retainedViews === undefined + ? [ + containing.evidence_id, + info.evidence_id, + ...mainEvidenceIds, + ...(loadImageEvidenceId === undefined + ? [] + : [loadImageEvidenceId]), + ] + : { + containing_procedure: containing.evidence_id, + function_dossier: info.evidence_id, + ...(loadImageEvidenceId === undefined + ? {} + : { native_load_image: loadImageEvidenceId }), + retained_views: selected.retainedViewEvidence, + ...(selected.summaryEvidenceId === undefined + ? {} + : { native_summary: selected.summaryEvidenceId }), + }, + }; + } finally { + await call("close_binary", {}); + } +}; + +export const nativeEntrySeed = async (artifact, path) => { + if (artifact === "jq") { + const file = await open(path, "r"); + let header; + try { + header = (await file.read(Buffer.alloc(32), 0, 32, 0)).buffer; + } finally { + await file.close(); + } + if (header.subarray(0, 6).toString("hex") !== "7f454c460201") + throw new Error("Expected ELF64 little endian entry seed"); + return `0x${header.readBigUInt64LE(24).toString(16)}`; + } + if (artifact === "sharex.exe") { + const bytes = await readFile(path); + const pe = bytes.readUInt32LE(0x3c); + const optional = pe + 24; + if ( + bytes.subarray(pe, pe + 4).toString("hex") !== "50450000" || + bytes.readUInt16LE(pe + 4) !== 0x8664 || + bytes.readUInt16LE(optional) !== 0x20b || + bytes.readUInt32LE(optional + 108) <= 14 || + bytes.readUInt32LE(optional + 112 + 14 * 8) !== 0 || + bytes.readUInt32LE(optional + 116 + 14 * 8) !== 0 + ) + throw new Error( + "Expected the pinned native PE32+ entry seed without CLR metadata", + ); + const address = + bytes.readBigUInt64LE(optional + 24) + + BigInt(bytes.readUInt32LE(optional + 16)); + return `0x${address.toString(16)}`; + } + if (artifact === "freedos.edlin.exe") return undefined; + throw new Error("Select a pinned native artifact"); +}; diff --git a/experiments/analysis-efficiency/preset-lifecycle.md b/experiments/analysis-efficiency/preset-lifecycle.md new file mode 100644 index 000000000..ee46c4914 --- /dev/null +++ b/experiments/analysis-efficiency/preset-lifecycle.md @@ -0,0 +1,208 @@ +# Task-scoped preset lifecycle verification + +Continues [#2016](https://github.com/morluto/rea/issues/2016) after +[#2308](https://github.com/morluto/rea/pull/2308) merged. This increment verifies +existing caller-selected Ghidra settings and immutable JSON snapshots through +actual public CLI/MCP workflows. Production defaults, provider selection and +public contracts remain unchanged; an engine database cache is still deferred. + +Runtime baseline is main `f76163c2467db623f9de0bda757c9d8610ca9565`, built with +Node 24.18.0 and matching locked dependencies. Real Ghidra 12.1.4 uses the +existing caller-supplied JDK 21 and 768 MiB Java heap under one CPU. No target +execution, annotation or attached GUI database operation is requested. + +## Small shipped input and profile boundaries + +The first input is the installed `/usr/bin/true`, 35,664 bytes, SHA-256 +`c79bf44242829108e323378531f4ac839513ca1fba45efd6583643526e1e9fd2`. +The local package database reports Debian `coreutils` `9.1-1` `amd64`; these are +installed-artifact observations, not independent archive authenticity proof. +The target itself is never invoked, including for version discovery. REA's +actual `list_procedures` chooses an internal, non-thunk procedure at `0x102000`. + +The default profile reports `analyzer_preset: "ghidra-default"`. The selected +alternative reports `ghidra-default+disabled:Decompiler Switch Analysis` and +the exact disabled name in its analysis options. Their profile digests differ. +The selected initializer's complete normalized facts agree, while the profile +and provenance remain distinct. This does not establish equivalence for other +procedures, call graphs or applications. The earlier jq experiment found a +callee body difference; the existing default remains the recommendation. + +The public [snapshot verifier](verify-preset-snapshot.mjs) checks: + +- The default `analyze_function` actually produces a stored query entry and an + authenticated original Evidence record in the exported snapshot. +- The same profile returns identical task facts, subject, parameters and profile + through a fresh MCP connection. Its limitations explicitly mark snapshot reuse; + its distinct response identity does not masquerade as the original record. +- A disabled profile refuses the default snapshot before headless Ghidra starts, + then successfully analyzes the same caller-selected target with its own profile. +- Restoring the default refuses the disabled snapshot and accepts the original + default snapshot. Original snapshot/source bytes stay unchanged. +- The existing CLI `function --provider ghidra --snapshot ... --json` returns + the original cached Evidence identity and exact task facts without modifying + the source snapshot. + +Actual `strace` records the known headless launch command once for fresh default +and once for fresh disabled analysis, and zero times for either rejection or +accepted reuse. The audit covers that known command, not an arbitrary execution +or network-absence guarantee. Source bytes and snapshot bytes remain unchanged. + +## Real cancellation and cleanup retry + +The [lifecycle verifier](verify-preset-lifecycle.mjs) observes actual pending +startup before the bridge endpoint exists. It verifies the JVM's run token, +launcher relationship and native process start identity with production process +inspection primitives, then cancels through the SDK's normal request signal. +Read-only token sweeps confirm cleanup, including processes outside the old +parent chain; owned runtime/socket directories are removed. The selected target +remains open and a fresh provider query succeeds. + +REA preserves the logical run ID when reimporting that selected target. A new +native process start identity proves the new generation; requiring a new logical +ID would test a different contract. No PID/path pair alone establishes ownership. + +After recovery, the verifier removes write permission only from the verified, +user-owned temporary Ghidra project directory. The actual public `close_binary` +reports `cleanup_incomplete` with the retained resource and `EACCES` reason. +Permissions are restored, a second close succeeds, and token sweeps/root removal +confirm cleanup. The original executable is unchanged. This is a controlled real +filesystem failure, not a recording provider simulation. The error does not +authorize automatic retry before fixing its cause. + +These observations pass for both the default and disabled-switch profiles on the +small input. The source verifier preserves verification and restoration/close +failures together, always attempts cleanup, validates the manifest at its read +boundary and publishes success only after its cleanup callbacks complete. + +## Failed harness assumptions and measurement limits + +Keep the initial probes and their corrections outside Git: + +- A primitive-only `procedure_info` snapshot contained no replay entries. Equal + content-addressed output after another analysis was not proof of cache reuse. + The corrected probe requires a stored `analyze_function` entry, a cache-reuse + marker and actual headless launch traces. +- After cancellation, activity was `not_observed`, rather than `idle`, because + no provider activity snapshot remained. Preserve that unknown; successful fresh + work proves recovery without relabeling absent metadata. +- Reimport preserved the logical run ID. Native start identity, not that logical + ID, establishes the new process generation. + +These were verification assumptions, not newly demonstrated REA defects. No +unrelated production repair is made. Existing defects remain in the requested +private `/tmp` record. + +The initial complete snapshot/profile/CLI source run takes 91.838 seconds and +samples 1,180,246,016 peak family bytes. The real default/disabled cancellation +and permission-retry prototype takes 66.977 seconds and samples 1,040,846,848 +bytes. Their last-observed CPU totals are 90.486 and 65.542 seconds respectively. +Both use one CPU, 4 GiB hard memory, 3 GiB early-stop, no swap and 192 tasks. +No scope abort occurs, but final counters disappear at teardown and remain +unverified. Sampled values are not final OOM/limit-event proof. + +These are lifecycle verification costs. Discovery, profile inspection, rejection, +cleanup and syscall tracing make their call sequences different. They are not +paired completed-question performance trials, and contain no model token counts. +Explicit snapshot reuse is existing REA behavior, not a new speedup introduced by +these verifiers. Broader native inputs and failure scenarios remain follow-ups. + +## Shipped jq continuation + +The same source snapshot verifier additionally passes on the pinned public jq +binary, SHA-256 +`b1c22172dd303f3be49e935aa56aa48a8b7a46e0bc838b4997d3bb451495870f`. +Procedure `0x403a50` comes from the earlier actual REA entry observation, rather +than a newly guessed file offset. Default and disabled profiles each perform a +fresh headless analysis. Both profile mismatch directions reject before a +headless launch, both valid default reuses return exact task facts with zero +headless launches, and CLI reuse retains the original Evidence ID and snapshot +bytes. The selected entry agrees across profiles; the earlier differing callee +still prevents a general equivalence or fast-preset recommendation. + +Default/disabled fresh `analyze_function` calls take 294.525/298.621 seconds in +this verification; default snapshot calls take 0.222 and 0.168 seconds. The CLI +reuse takes 2.899 seconds. These are calls within different verification sequences, +not repeated completed-question performance cohorts. They demonstrate the existing +explicit snapshot mechanism without an engine database cache; they do not measure +model tokens or introduce a new optimization. + +The complete jq verification takes 624.537 seconds, samples 1,218,355,200 peak +family bytes and observes 567.198 CPU seconds before teardown. The final resource +counters remain unknown. The source verifier SHA-256 is +`42060686f9633da06bb5f257fa5c70f588e66569cf0befebe6a1a13f43bf0e88`; +the initial lifecycle verifier hash is +`b1680f4f506ef9328d1beabb4b1fbe97c911b3f06986857f0a59a4b97a3b61d3`. +Both hashes also match completed small-input source runs, including the final +cleanup/error-preservation implementation. Runtime production remains the pinned +main baseline; the follow-up changes only experiment sources and documentation. + +## Invalid analyzer failure and healthy peers + +Real MCP and CLI requests with `REA_GHIDRA_DISABLED_ANALYZERS` set to +`REA Nonexistent Analyzer 2016` both report `execution_failure`. Their diagnostics +preserve the exact unavailable analyzer name, selected provider, operation, +target identity and Ghidra pre-script failure. MCP still answers a bundled EVM +peer request and closes the selected native target; original target bytes stay +unchanged and the owned Ghidra runtime directory is removed. + +The first healthy-peer probe assumed ELF layout support was built in. This main +requires an explicitly supplied pwntools interpreter for that format and correctly +reports `provider_unavailable`; none was configured. The corrected probe uses +the already verified bundled EVM peer. No installer or provider fallback is added. + +The first CLI observer also looked inside `error` as if it had MCP's shape. The +actual CLI envelope has an error string and sibling `code`, `message`, `details` +and other fields. Regrading its saved complete reply proves the named diagnostics +are preserved. The original incorrect assertion/report remains archived; no +provider rerun or production repair is needed for that correction. + +The invalid-name behavior is reproducible with the existing CLI: + +```sh +REA_GHIDRA_DISABLED_ANALYZERS='REA Nonexistent Analyzer 2016' \ + node ABS_RUNTIME/scripts/rea.mjs function ABS_TRUE_BINARY 0x102000 \ + --provider ghidra --json +``` + +Use the address actually observed by REA for a different target. The deliberately +invalid name is expected to fail; fixing the setting is required before retrying. + +## Reproduction + +Build the pinned runtime and supply an explicit string-valued provider settings +JSON, real Ghidra/JDK, a caller-supplied Linux strace executable and a fresh private +output directory. The snapshot verifier streams target hashes and stores actual +SDK/CLI replies, profile commitments and exec traces outside the checkout: + +```sh +node experiments/analysis-efficiency/verify-preset-snapshot.mjs \ + --runtime-root ABS_RUNTIME --revision SHA --path ABS_NATIVE_TARGET \ + --providers ABS_SETTINGS_JSON --strace ABS_STRACE --output NEW_ABS_DIR +``` + +Select `--procedure` from actual REA evidence when the question already identifies +one; otherwise the verifier uses the actual procedure list. `--timeout-ms` is an +explicit observation window; `--disabled-analyzers` uses the existing setting. + +Run cancellation/permission retry as a non-root Linux user: + +```sh +node experiments/analysis-efficiency/verify-preset-lifecycle.mjs \ + --runtime-root ABS_RUNTIME --revision SHA --path ABS_NATIVE_TARGET \ + --providers ABS_SETTINGS_JSON --output NEW_ABS_DIR +``` + +Runtime revision is caller-supplied; keep the built/frozen runtime receipt alongside +the verifier source fingerprint. Target bytes, provider projects, raw JSON, traces +and profiles are not committed. The scripts acquire no dependencies or change +the user's installed configuration. + +## Final cleanup review + +The final review adds an independent filesystem check that the recovered +bridge socket directory is absent after permission restoration and close retry, +and preserves its ownership manifest in the receipt. Both default and disabled +profiles pass this related real workflow again. Its source SHA-256 is +`f5d29efdb056032072b99ac1e6fe1d6d2099bbe84c324c75032bd0178bb747c5`. The previous observations and source hashes stay archived; +the jq/model/provider matrices were not repeated for this observer change. diff --git a/experiments/analysis-efficiency/probe-analyzers.mjs b/experiments/analysis-efficiency/probe-analyzers.mjs new file mode 100644 index 000000000..6ae961c4b --- /dev/null +++ b/experiments/analysis-efficiency/probe-analyzers.mjs @@ -0,0 +1,116 @@ +import { createHash } from "node:crypto"; +import { createReadStream } from "node:fs"; +import { mkdir, open, readFile, writeFile } from "node:fs/promises"; +import { resolve } from "node:path"; +import { parseArgs } from "node:util"; +import { Client } from "@modelcontextprotocol/client"; +import { StdioClientTransport } from "@modelcontextprotocol/client/stdio"; + +const { values } = parseArgs({ + options: { + "runtime-root": { type: "string" }, + path: { type: "string" }, + providers: { type: "string" }, + output: { type: "string" }, + }, +}); +if ( + !values["runtime-root"] || + !values.path || + !values.providers || + !values.output +) + throw new Error( + "Use --runtime-root ABS --path ABS --providers JSON --output NEW_ABS_DIR", + ); +const selected = JSON.parse(await readFile(values.providers, "utf8")); +const expectedName = selected.REA_GHIDRA_DISABLED_ANALYZERS; +if (!expectedName) + throw new Error( + "The probe requires an explicitly selected invalid analyzer name", + ); +const digest = async () => { + const hash = createHash("sha256"); + for await (const chunk of createReadStream(values.path)) hash.update(chunk); + return hash.digest("hex"); +}; +const before = await digest(); +await mkdir(values.output, { mode: 0o700 }); +const file = await open(values.path, "r"); +let address; +try { + const header = Buffer.alloc(32); + const { bytesRead } = await file.read(header, 0, header.length, 0); + if ( + bytesRead !== 32 || + header.subarray(0, 6).toString("hex") !== "7f454c460201" + ) + throw new Error( + "This counterexample uses a real ELF64 little-endian application", + ); + address = `0x${header.readBigUInt64LE(24).toString(16)}`; +} finally { + await file.close(); +} +const client = new Client({ name: "rea-analyzer-verification", version: "1" }); +const transport = new StdioClientTransport({ + command: process.execPath, + args: [resolve(values["runtime-root"], "scripts/rea.mjs"), "mcp"], + env: { ...process.env, ...selected }, + stderr: "pipe", +}); +const calls = []; +const call = async (name, arguments_) => { + const reply = await client.callTool( + { name, arguments: arguments_ }, + { timeout: 600_000 }, + ); + await writeFile( + resolve(values.output, `call-${calls.length + 1}.json`), + JSON.stringify(reply), + ); + calls.push({ name, is_error: reply.isError === true }); + return reply; +}; +let rejected = false; +let named = false; +let failure = null; +try { + await client.connect(transport); + const opened = await call("open_binary", { + path: values.path, + provider_id: "ghidra", + }); + const reply = opened.isError + ? opened + : await call("resolve_containing_procedure", { address }); + rejected = reply.isError === true; + named = rejected && JSON.stringify(reply).includes(expectedName); +} catch (error) { + failure = String(error); +} finally { + try { + await call("close_binary", {}); + } catch (error) { + failure = `${failure ?? ""} close: ${String(error)}`; + } + await client.close(); +} +const after = await digest(); +const report = { + target_sha256: before, + target_sha256_after: after, + expected_analyzer: expectedName, + rejected, + rejection_names_requested_analyzer: named, + failure, + calls, + oracle: + "A syntactically valid but nonexistent analyzer must produce a meaningful public refusal, not successful Evidence claiming that preset. A not-found procedure still means Ghidra reached readiness.", +}; +await writeFile( + resolve(values.output, "summary.json"), + JSON.stringify(report, null, 2), +); +process.stdout.write(JSON.stringify(report) + "\n"); +if (!rejected || !named || failure || before !== after) process.exitCode = 1; diff --git a/experiments/analysis-efficiency/probe-browser.mjs b/experiments/analysis-efficiency/probe-browser.mjs new file mode 100644 index 000000000..3ec1eb816 --- /dev/null +++ b/experiments/analysis-efficiency/probe-browser.mjs @@ -0,0 +1,85 @@ +import { mkdir, readFile, writeFile } from "node:fs/promises"; +import { resolve } from "node:path"; +import { parseArgs } from "node:util"; +import { Client } from "@modelcontextprotocol/client"; +import { StdioClientTransport } from "@modelcontextprotocol/client/stdio"; + +const { values } = parseArgs({ + options: { + "runtime-root": { type: "string" }, + scenario: { type: "string" }, + output: { type: "string" }, + }, +}); +if (!values["runtime-root"] || !values.scenario || !values.output) + throw new Error( + "Use --runtime-root ABS --scenario JSON --output NEW_ABS_DIR", + ); +await mkdir(values.output, { mode: 0o700 }); +const scenario = JSON.parse(await readFile(values.scenario, "utf8")); +const client = new Client({ name: "rea-real-browser-app", version: "1" }); +const transport = new StdioClientTransport({ + command: process.execPath, + args: [resolve(values["runtime-root"], "scripts/rea.mjs"), "mcp"], + env: { + ...process.env, + REA_LOG_LEVEL: "silent", + NODE_OPTIONS: "--max-old-space-size=512", + }, + stderr: "pipe", +}); +let failure; +try { + await client.connect(transport); + transport.stderr?.resume(); + const reply = await client.callTool( + { name: "capture_browser_scenario", arguments: scenario }, + { timeout: 120_000 }, + ); + await writeFile(resolve(values.output, "reply.json"), JSON.stringify(reply)); + const value = + reply.structuredContent ?? + JSON.parse( + reply.content.find((item) => item.type === "text")?.text ?? "null", + ); + if (reply.isError) { + failure = value.error; + } else { + const capture = value.normalized_result; + await writeFile( + resolve(values.output, "summary.json"), + JSON.stringify( + { + evidence_id: value.evidence_id, + browser: capture.browser, + scenario: capture.scenario, + completeness: capture.completeness, + step_count: capture.steps.length, + event_count: capture.events.retained, + limitations: value.limitations, + }, + null, + 2, + ), + ); + process.stdout.write( + JSON.stringify({ + evidence_id: value.evidence_id, + browser: capture.browser, + step_count: capture.steps.length, + }) + "\n", + ); + } +} finally { + await client.close(); +} +if (failure) { + await writeFile( + resolve(values.output, "failure.json"), + JSON.stringify(failure, null, 2), + ); + process.stdout.write( + JSON.stringify({ code: failure.code, message: failure.message }) + "\n", + ); + process.exitCode = 1; +} diff --git a/experiments/analysis-efficiency/process-trace-validation.md b/experiments/analysis-efficiency/process-trace-validation.md new file mode 100644 index 000000000..a32848596 --- /dev/null +++ b/experiments/analysis-efficiency/process-trace-validation.md @@ -0,0 +1,113 @@ +# Process trace validation + +A 6,000-event directed cycle previously overflowed the JavaScript stack inside +the schema refinement. Cycle detection now uses iterative topological traversal. +Cyclic inputs retain independent declaration diagnostics without expanding all +event pairs. Unordered declarations retain group membership, with one diagnostic +per overlapping or conflicting group, instead of allocating a pair set and +repeating the same error for every pair. + +A unique topological order proves that every event pair is ordered, allowing +rank comparisons without retaining transitive closure. Other acyclic graphs +retain only one origin's forward and backward reachability sets at a time. +Complete pair validation preserves the missing count and first declaration-order +missing pair. General partial orders still require quadratic pair examination +and repeated graph traversal; they trade CPU time for bounded retained state. + +## Initial cycle fix comparison + +Flameox ran three randomized paired blocks (seed 917), each limited to 20 seconds +and 512 MiB. Node 24.18.0 used a 384-MiB old-space limit on macOS arm64. Each +process validated the same 2,500-event acyclic chain four times, then checked the +known 6,000-event cycle failure with per-event not-before constraints and one +unordered group containing every event. All six executions passed the embedded answer +digest and expected rejection checks. + +The baseline source is from `bb540826d`; the candidate is the initial cycle fix +in `10935b7b1`, which still memoized reachability sets for every queried origin. +Both modules had TypeScript annotations removed with Node's identical built-in +transform and used the same copied runtime dependencies. This isolates schema +validation rather than comparing complete packaged CLI/MCP processes. + +| Median measurement | Baseline | Candidate | +| -------------------------------------------- | -------: | --------: | +| First validation elapsed milliseconds | 335.80 | 177.25 | +| Warm validation elapsed milliseconds | 313.36 | 165.23 | +| First validation CPU milliseconds | 366.85 | 218.39 | +| Warm validation CPU milliseconds | 335.32 | 194.08 | +| Whole-process elapsed milliseconds | 1,344.13 | 787.00 | +| Process CPU milliseconds before final report | 1,457.67 | 941.05 | +| Peak process-family MiB | 328.36 | 395.52 | + +The input is identical: 233,095 JSON bytes, estimated at 77,010 tokens by tokenx +1.3.0. The valid parsed result digest is +`28bd99ce83f0da8e45600ef20f114cb52bb26b5f5e6bfc1601ca3e712eaf3147`. +Actual agent tokens, catalog injection, transport, model reasoning and provider +costs were not measured. This is a component measurement, not an end-to-end +investigation speed claim. + +First validation excludes module import and fixture preparation; warm runs reuse +the process but create fresh per-validation graph state. Whole-process elapsed +includes startup, imports, all four validations, the cyclic-input check, token +estimation and reporting. CPU includes startup through metrics publication; +peak RSS covers the complete single-process workload, with no children. Host +caches were not flushed. Peak memory increased in this cohort. Its retained +valid-order closure still required quadratic memory, prompting the follow-up. +Three pairs describe this fixture only. + +Preserved Flameox evidence: +`d6211639446e8b6ec2e82636913eaf471def96673e28f03e9c7f98bec07f8e13`; +analysis `e663b6bd8f5693975542d5b5e2b18437b3c167a0be939bb7386eb68549936231`. +An earlier cohort lost modules during another checkout build; its three failed +executions and timing results are excluded. The successful cohort uses an +isolated runtime copy. Source-module SHA-256 values are +`a7729faa2183b0e493b9ac4fc55f6feaee5b2e5294be13d1b29b57a44b899788` +(baseline) and `725409ce84902125941251037a8a214ccc3c1eec577e484c164c361ca580d693` +(candidate). + +## Bounded retention follow-up + +Flameox compared `10935b7b1` with the rank/streaming implementation in three +randomized paired blocks (seed 624), under the same host, Node, heap, memory and +20-second execution bounds. Each execution validated the chain above four times, +then a 1,200-event partial order with 600 unordered two-event layers and all four +edges between consecutive layers four times, then the same cyclic failure. +All six executions passed both parsed-answer digests and the cycle diagnostic. +Runtime dependencies were copied and isolated from concurrent checkout builds. + +| Median measurement | Memoized closure | Rank/streaming | +| ---------------------------------------- | ---------------: | -------------: | +| Chain first elapsed milliseconds | 166.11 | 11.37 | +| Chain warm elapsed milliseconds | 154.25 | 5.32 | +| Chain first CPU milliseconds | 210.13 | 24.38 | +| Chain warm CPU milliseconds | 184.76 | 16.84 | +| Partial order first elapsed milliseconds | 49.44 | 116.54 | +| Partial order warm elapsed milliseconds | 50.67 | 110.29 | +| Partial order first CPU milliseconds | 72.47 | 137.69 | +| Partial order warm CPU milliseconds | 70.65 | 121.77 | +| Capture process elapsed milliseconds | 901.24 | 557.30 | +| Process CPU milliseconds before report | 1,101.12 | 665.03 | +| Peak process-family MiB | 391.13 | 127.72 | + +First samples exclude module import and fixture preparation. Partial-order first +samples follow four chain validations, so they are first use of that fixture +within an already running process. Warm medians pool the three subsequent samples +from each of three processes. CPU and peak RSS cover the combined workload; +capture elapsed additionally includes Flameox capture startup and overhead. +Host caches were not flushed. The partial-order fixture is slower after this +change; these results establish a retention tradeoff, not universal acceleration. + +The partial-order input is 165,590 JSON bytes, estimated at 52,783 tokens by tokenx +1.3.0; its parsed-answer SHA-256 is +`41d06e593813e497221c36793bf00d5fece7055081895b5f6c123ba6ad9a8227`. +Chain bytes, token estimate and answer digest remain unchanged. Actual agent +tokens, transport, catalog injection, model reasoning and provider costs remain +unmeasured. Both cohorts are component measurements, not complete investigations. + +Preserved evidence: +`e29086af99afd8e67cbbd92e43d960ea40f73b4d318ea0cbca60f493575462b8`; +analysis `086133516f2acf031032d357a3ddb1ac611ce4f12556a24065a2becd567c5f7b`. +The baseline module SHA-256 is +`725409ce84902125941251037a8a214ccc3c1eec577e484c164c361ca580d693`; +the candidate module SHA-256 is +`2109f1096406e9ecac8bbf4f7ae8abb5113404790a9382487285d2831fcddf26`. diff --git a/experiments/analysis-efficiency/provider-environment.json b/experiments/analysis-efficiency/provider-environment.json new file mode 100644 index 000000000..de145d10e --- /dev/null +++ b/experiments/analysis-efficiency/provider-environment.json @@ -0,0 +1,10 @@ +{ + "namespace_prefixes": ["REA_", "HOPPER_"], + "additional_keys": [ + "GHIDRA_INSTALL_DIR", + "JAVA_HOME", + "JAVA_TOOL_OPTIONS", + "JDK_JAVA_OPTIONS", + "_JAVA_OPTIONS" + ] +} diff --git a/experiments/analysis-efficiency/questions/android.txt b/experiments/analysis-efficiency/questions/android.txt new file mode 100644 index 000000000..e303575f7 --- /dev/null +++ b/experiments/analysis-efficiency/questions/android.txt @@ -0,0 +1,3 @@ +Statically investigate the actual shipped APK at {{artifact_path}} using only the registered REA tools. Report the exact artifact SHA-256, package name, version name/code, every class-name match for the case-sensitive substring MainActivity, and all onCreate method descriptors reported for org.schabi.newpipe.MainActivity. Preserve reported signatures and explicit unknowns. For each onCreate entry include reported_signature, overload_index and dex_descriptor exactly as reported, preserving null. Final answer must be JSON with artifact_sha256, package_name, version_name, version_code, matches, onCreate, evidence_ids, limitations. Include real Evidence IDs supporting each result. Do not execute the APK or use shell, host file tools, network or other agents. Stop once these facts are supported. + +When a client JavaScript executor is available, compose the required REA calls in one execution and return only selected facts from normalized_result, real Evidence IDs, target identity from subject.digest.sha256 and limitations. Parse original MCP text content if necessary. Do not return raw_result, whole Evidence or unrelated inventories. All matching classes and onCreate overloads must still be included. diff --git a/experiments/analysis-efficiency/questions/browser.txt b/experiments/analysis-efficiency/questions/browser.txt new file mode 100644 index 000000000..c66f39422 --- /dev/null +++ b/experiments/analysis-efficiency/questions/browser.txt @@ -0,0 +1 @@ +Observe the real public Excalidraw application through REA capture_browser_scenario using exactly this authorized fresh-profile headless scenario: {"browser": {"mode": "launch", "executable_path": "/home/yann/.cache/ms-playwright/chromium-1234/chrome-linux64/chrome", "headless": true}, "start_url": {"url": "https://excalidraw.com/", "query": []}, "actions": [{"step_id": "settled", "action": "wait_for_timeout", "duration_ms": 2000}], "capture": {"at_end": ["url", "dom", "accessibility"], "events": ["network", "page-errors"]}}. Report actual browser product/version, start origin, final sanitized URL, DOM/accessibility artifact SHA-256 and byte counts when captured, step count, network/page-error observations, completeness, provider-owned process cleanup, real Evidence ID and limitations. Preserve unavailable and partial capture states. This is one runtime observation, not a claim about original source or all behavior. Do not supply credentials, interact with other targets or inject JavaScript. Final JSON fields: browser, start_origin, final_url, dom, accessibility, step_count, network, page_errors, completeness, evidence_ids, limitations. diff --git a/experiments/analysis-efficiency/questions/electron-inventory.txt b/experiments/analysis-efficiency/questions/electron-inventory.txt new file mode 100644 index 000000000..bb3e70cf1 --- /dev/null +++ b/experiments/analysis-efficiency/questions/electron-inventory.txt @@ -0,0 +1 @@ +Statically inventory {{artifact_path}} using only the registered REA tools. Open this ASAR as an archive, inspect its artifact inventory, and close the session. Report exact target SHA-256, the complete inventory manifest, counts of every entry_kind across all occurrences, the original occurrence records for root paths package.json, main.js and preload.js if present, all integrity contradictions, inspection coverage, unexplored branches, real Evidence IDs and limitations. This question asks about package bytes and inventory, not AST interpretation or runtime behavior. Do not execute target code, analyze all JavaScript, extract files, launch a GUI, use shell/file tools/network or other agents. When a client JavaScript executor is available, compose original calls in dependency order and return only requested fields from normalized_result; the full inventory is the Evidence nested in the inspect_artifact inventory_artifact substep. Use Evidence.subject.digest.sha256 for the target identity and retain both inspection and inventory Evidence IDs. Final JSON fields: artifact_sha256, manifest, entry_kind_counts, requested_paths, integrity_contradictions, coverage, unexplored_branches, evidence_ids, limitations. Stop when these facts and cleanup are supported. diff --git a/experiments/analysis-efficiency/questions/evm-uniswap.txt b/experiments/analysis-efficiency/questions/evm-uniswap.txt new file mode 100644 index 000000000..a1db16f21 --- /dev/null +++ b/experiments/analysis-efficiency/questions/evm-uniswap.txt @@ -0,0 +1 @@ +Statically inspect the published Uniswap v3-core 1.0.1 compiler runtime template at {{artifact_path}} using only REA inspect_evm_interface with encoding hex. Report original carrier SHA-256/byte count, decoded bytecode SHA-256/byte count, every inferred function selector with bytecode_offset, dispatch, inferred_arguments and inferred_state_mutability exactly including null. Preserve evidence_kind, discovery_completeness, bytecode kind/hardfork/deployment_authenticity, runtime_execution, real Evidence IDs and limitations. The unchanged template came from the official published compiler artifact; constructor-dependent values and immutable-reference metadata are not established. Do not infer a live deployed instance, original source signatures or runtime behavior. No RPC, transactions, target execution, shell/file tools or other agents. Final JSON fields: artifact_sha256, artifact_bytes, bytecode_sha256, bytecode_bytes, functions, evidence_kind, discovery_completeness, bytecode_kind, hardfork, deployment_authenticity, runtime_execution, evidence_ids, limitations. diff --git a/experiments/analysis-efficiency/questions/evm.txt b/experiments/analysis-efficiency/questions/evm.txt new file mode 100644 index 000000000..a5ba2f6a6 --- /dev/null +++ b/experiments/analysis-efficiency/questions/evm.txt @@ -0,0 +1 @@ +Statically inspect the published historical WETH hex carrier at {{artifact_path}} using only REA inspect_evm_interface with encoding hex. Report original carrier SHA-256/byte count, decoded bytecode SHA-256/byte count, every inferred function selector with bytecode_offset, dispatch, inferred_arguments and inferred_state_mutability exactly including null. Preserve evidence_kind, discovery_completeness, bytecode kind/hardfork/deployment_authenticity, runtime_execution, real Evidence IDs and limitations. This file comes from the official Ethereum published historical eth_getCode example; do not infer live deployment authenticity, original source signatures or runtime behavior. No RPC, transactions, target execution, shell/file tools or other agents. Final JSON fields: artifact_sha256, artifact_bytes, bytecode_sha256, bytecode_bytes, functions, evidence_kind, discovery_completeness, bytecode_kind, hardfork, deployment_authenticity, runtime_execution, evidence_ids, limitations. diff --git a/experiments/analysis-efficiency/questions/firmware.txt b/experiments/analysis-efficiency/questions/firmware.txt new file mode 100644 index 000000000..de03fe9ff --- /dev/null +++ b/experiments/analysis-efficiency/questions/firmware.txt @@ -0,0 +1 @@ +Statically inspect {{artifact_path}} using only the registered REA tools. Report exact target SHA-256 and every reported firmware region with offsets, signatures, reported extents, provider provenance and examined coverage. Preserve unknowns and limitations; a signature scan does not prove partition boundaries or boot/runtime validity. Do not execute target code, extract files, launch a GUI, use shell/file tools/network or other agents. When a client JavaScript executor is available, select the requested normalized_result fields, Evidence.subject.digest.sha256 and real Evidence IDs before returning output. Final JSON fields: artifact_sha256, result, evidence_ids, limitations. Stop when the requested facts are supported. diff --git a/experiments/analysis-efficiency/questions/flutter-aot.txt b/experiments/analysis-efficiency/questions/flutter-aot.txt new file mode 100644 index 000000000..c4c3c3897 --- /dev/null +++ b/experiments/analysis-efficiency/questions/flutter-aot.txt @@ -0,0 +1 @@ +Statically inspect the shipped Flutter APK at {{artifact_path}} using only the registered REA inspect_dart_aot tool. Use its default ABI selection. Report target identity, chosen ABI, every libapp ELF/snapshot field exactly as reported including null, original string-pool coverage, all three counts ending in _at_least, printable_run_count, and returned_counts for package_uris, dart_uris and class_like_tokens. Compute returned_counts from the returned arrays if needed. Preserve original overall coverage and producer limitations exactly, including order. Counts ending in _at_least are lower bounds and class-like tokens are byte-pattern observations, not recovered typed classes. Do not return individual strings or infer Dart SDK versions, class semantics, runtime behavior or complete inventory. Final answer must be JSON with artifact_sha256, target, abi, libapp, string_pool, coverage, limitations, evidence_ids. Use actual response Evidence IDs. Do not execute the APK, use shell or host file tools, access the network, or call other agents. Stop when these facts are supported. diff --git a/experiments/analysis-efficiency/questions/javascript-selected.txt b/experiments/analysis-efficiency/questions/javascript-selected.txt new file mode 100644 index 000000000..e4a7520da --- /dev/null +++ b/experiments/analysis-efficiency/questions/javascript-selected.txt @@ -0,0 +1 @@ +Investigate the actual shipped Obsidian ASAR at {{artifact_path}} using REA analyze_javascript_application with source_paths ["package.json","main.js"] and detail summary. Keep complete inventory identity while analyzing only those exact sources. Read retained module views for each main.js module identity; module pages may contain several identities for a path, so preserve their exact node_id values. package.json is package metadata and need not be a module. Report selected input path/root artifact SHA-256, requested_paths and unselected_files, graph/statistics, Electron observations, exact selected main.js module identities/types/digests, analysis and semantic coverage, retained source Evidence ID, view Evidence IDs and limitations. Do not execute target JavaScript, analyze other sources, extract files, use network/shell/file tools or other agents. Static AST results do not prove actual runtime behavior or original source. Final JSON fields: input_path, artifact_sha256, source_selection, statistics, electron, modules, coverage, evidence_ids, limitations. diff --git a/experiments/analysis-efficiency/questions/managed-nonempty.txt b/experiments/analysis-efficiency/questions/managed-nonempty.txt new file mode 100644 index 000000000..cfa47b5c5 --- /dev/null +++ b/experiments/analysis-efficiency/questions/managed-nonempty.txt @@ -0,0 +1 @@ +Statically inspect the shipped ShareX HelpersLib assembly at {{artifact_path}} using only registered REA tools. Report exact target SHA-256 and module MVID, native ModuleRef/PInvoke/native-implementation counts, every original ModuleRef record, the first three complete PInvoke declaration records in producer order, coverage and limitations. Preserve tokens, import scope/name, flags, nulls and verification states exactly; declarations do not prove native-library/export availability or runtime behavior. No assembly load, native symbol lookup, target execution, GUI, shell/file tools, network or other agents. Final JSON fields: artifact_sha256, module_mvid, summary, module_refs, pinvoke_first3, coverage, evidence_ids, limitations. Stop once those selected facts are supported. Use compact selected evidence when the client supports it, but do not invent fields hidden by client output clipping. diff --git a/experiments/analysis-efficiency/questions/managed.txt b/experiments/analysis-efficiency/questions/managed.txt new file mode 100644 index 000000000..57125c432 --- /dev/null +++ b/experiments/analysis-efficiency/questions/managed.txt @@ -0,0 +1 @@ +Statically inspect {{artifact_path}} using only the registered REA tools. Report exact target SHA-256, assembly name/version, module name/MVID, managed classification and architecture with its evidence, every reported target framework, and all declared native ModuleRef/PInvoke boundaries with coverage and limitations. Do not load or execute the assembly, launch a GUI, use shell/file tools/network or other agents. When a client JavaScript executor is available, compose the required original MCP calls and return only requested normalized_result fields, target identity from subject.digest.sha256 and real Evidence IDs. Do not return whole Evidence, raw_result or unrelated resources/custom-attribute inventories. Preserve dependency order for operations sharing the selected managed target. Final JSON fields: artifact_sha256, assembly, module, classification, target_frameworks, native_boundaries, coverage, evidence_ids, limitations. Stop when these facts are supported. diff --git a/experiments/analysis-efficiency/questions/native-dos.txt b/experiments/analysis-efficiency/questions/native-dos.txt new file mode 100644 index 000000000..48c52a9ec --- /dev/null +++ b/experiments/analysis-efficiency/questions/native-dos.txt @@ -0,0 +1 @@ +Statically inspect {{artifact_path}} using only the registered REA tools and Ghidra. This is the original UPX-compressed FreeDOS EDLIN 2.24 DOS MZ executable; inspect its admitted load image and entry stub, without running or unpacking it. Keep default auto-analysis enabled. Open the target with provider_id ghidra, call inspect_native_load_image, and use its verified entry.linear_address as the seed. Resolve the containing procedure, analyze that procedure once, and close the ephemeral session after obtaining the facts. If a result is clipped, use retained native facets without reanalysis. Report exact target SHA-256, entry_address, containing_procedure, complete procedure metadata including classification, signature, locals and inclusive body ranges, the first 512 UTF-16 units of pseudocode, caller_count, callee_count, real Evidence IDs and limitations. Preserve missing/partial facts and terminal-flow caveats. Verified static import and unpacking-stub pseudocode do not prove DOS execution or recovery of the editor's application logic. Do not execute targets, launch a GUI, or use shell/file tools/network or other agents. Final JSON fields: artifact_sha256, load_image_status, entry_address, containing_procedure, procedure, pseudocode_prefix, caller_count, callee_count, evidence_ids, limitations. Stop when these facts and cleanup are supported; report unsupported outcomes explicitly. diff --git a/experiments/analysis-efficiency/questions/native-pe.txt b/experiments/analysis-efficiency/questions/native-pe.txt new file mode 100644 index 000000000..749e96200 --- /dev/null +++ b/experiments/analysis-efficiency/questions/native-pe.txt @@ -0,0 +1 @@ +Statically inspect {{artifact_path}} using only the registered REA tools and Ghidra. The independently read, pinned PE32+ header reports image base 0x140000000 and entry RVA 0x125c0, so use address 0x1400125c0 as the analyst seed. This is a native x86-64 Windows PE component with no CLR directory, inspected on Linux; do not claim Windows runtime behavior. Keep default auto-analysis enabled. Open the target with provider_id ghidra, resolve the containing procedure, analyze that procedure once, and close the ephemeral session after obtaining the facts. If a result is clipped, use retained native facets without reanalysis. Report exact target SHA-256, entry_address, containing_procedure, complete procedure metadata including classification, signature, locals and inclusive body ranges, the first 512 UTF-16 units of pseudocode, caller_count, callee_count, real Evidence IDs and limitations. Preserve terminal-flow caveats and unresolved static edges; recovered pseudocode is not original source. Do not execute targets, launch a GUI, or use shell/file tools/network or other agents. Final JSON fields: artifact_sha256, entry_address, containing_procedure, procedure, pseudocode_prefix, caller_count, callee_count, evidence_ids, limitations. The seed applies only to the pinned ShareX.exe in corpus.json. Stop when these facts and cleanup are supported. diff --git a/experiments/analysis-efficiency/questions/native.txt b/experiments/analysis-efficiency/questions/native.txt new file mode 100644 index 000000000..2a790b1e6 --- /dev/null +++ b/experiments/analysis-efficiency/questions/native.txt @@ -0,0 +1 @@ +Statically inspect {{artifact_path}} using only the registered REA tools and Ghidra. The pinned ELF header was independently observed to report entry address 0x403a50; treat that address as the analyst's seed, not as a function-name assumption. Keep default auto-analysis enabled and allow at least 600 seconds for native analysis (including the script deadline if using a bridge). Open the target with provider_id ghidra, resolve the containing procedure for that address, analyze it, and close the ephemeral session in a finally block or a subsequent cleanup call. Report exact target SHA-256, the entry_address, containing_procedure, procedure metadata, the first 512 UTF-16 units of pseudocode, caller_count, callee_count, real Evidence IDs and limitations. Do not execute target code, launch a GUI, use shell/file tools/network or other agents. When a client JavaScript executor is available, compose the original calls in dependency order and select requested fields before returning output; use Evidence.subject.digest.sha256 for the target identity. Final JSON fields: artifact_sha256, entry_address, containing_procedure, procedure, pseudocode_prefix, caller_count, callee_count, evidence_ids, limitations. The address seed applies only to the pinned jq artifact in corpus.json. Stop when these facts and cleanup are supported. diff --git a/experiments/analysis-efficiency/questions/sqlite-qgis.txt b/experiments/analysis-efficiency/questions/sqlite-qgis.txt new file mode 100644 index 000000000..636c7a685 --- /dev/null +++ b/experiments/analysis-efficiency/questions/sqlite-qgis.txt @@ -0,0 +1 @@ +Statically inspect the supplied QGIS world-map GeoPackage at {{artifact_path}} using only the registered REA inspect_sqlite_database tool. Select the ordinary countries table with row_limit 1 and its default selected_table schema scope. Report the complete returned schema exactly as reported, including SQL, every declared column, indexes, views, triggers, completeness and explicit nulls. For the one returned sample, report only fid, NAME and ISO_A3 in that order, preserving the original tagged SQLite cells exactly: decimal integer strings, text values with bytes_hex and encoding, and SQL null. Preserve row_limit, returned_rows, truncated and order; row order is unspecified and this is not a complete country inventory. Preserve original artifact identity, wal including null, engine, database_encoding, both normalized-result producer limitations and outer Evidence limitations exactly including order. Do not return geometry blobs or unrequested sample cells, interpret boundaries/political labels as current facts, or infer missing values. Final JSON fields: artifact_sha256, artifact, wal, engine, database_encoding, schema, rows, producer_limitations, limitations, evidence_ids. Include real response Evidence IDs. Do not use shell or host file tools, network, other agents or execute QGIS. Stop once these facts are supported. diff --git a/experiments/analysis-efficiency/questions/wasm-interface.txt b/experiments/analysis-efficiency/questions/wasm-interface.txt new file mode 100644 index 000000000..fd09040cd --- /dev/null +++ b/experiments/analysis-efficiency/questions/wasm-interface.txt @@ -0,0 +1 @@ +Statically inspect the real shipped WASM module at {{artifact_path}} using only REA tools. Report exact selected artifact SHA-256, valid/invalid status, section count, import count, export count, first four complete export WAT forms in producer order, decoded WAT SHA-256 and code-unit length, WABT release/source commit, and exact runtime_execution/network_fetch states. If complete delivery exceeds the MCP frame, use the exact retained reference for summary and wasm exports views. Preserve original strings, uncertainties and real Evidence IDs. Do not execute WASM, fetch URLs or use shell/file tools. Final JSON fields: artifact_sha256, validation, section_count, import_count, export_count, exports_first4, wat_sha256, wat_code_units, wabt_release, wabt_source_commit, runtime_execution, network_fetch, evidence_ids, limitations. diff --git a/experiments/analysis-efficiency/questions/wasm.txt b/experiments/analysis-efficiency/questions/wasm.txt new file mode 100644 index 000000000..555c0e3ca --- /dev/null +++ b/experiments/analysis-efficiency/questions/wasm.txt @@ -0,0 +1 @@ +Statically inspect the real shipped SQLite WASM at {{artifact_path}} using only REA tools. Report exact selected artifact SHA-256, valid/invalid status, section count, import count, export count, first four complete export WAT forms in producer order, decoded WAT SHA-256 and code-unit length, WABT release/source commit, and exact runtime_execution/network_fetch states. If complete delivery exceeds the MCP frame, use the exact retained reference for summary and wasm exports views. Preserve original strings, uncertainties and real Evidence IDs. Do not execute WASM, fetch URLs or use shell/file tools. Final JSON fields: artifact_sha256, validation, section_count, import_count, export_count, exports_first4, wat_sha256, wat_code_units, wabt_release, wabt_source_commit, runtime_execution, network_fetch, evidence_ids, limitations. diff --git a/experiments/analysis-efficiency/resource-counters.md b/experiments/analysis-efficiency/resource-counters.md new file mode 100644 index 000000000..8b21f54df --- /dev/null +++ b/experiments/analysis-efficiency/resource-counters.md @@ -0,0 +1,103 @@ +# Resource counters at payload completion + +Continues [#2016](https://github.com/morluto/rea/issues/2016) from merged main +`4f4f6cd7b5d7a400b90772a138d7b9f942c2a556`. A transient cgroup can disappear +before the existing supervisor reads terminal counters. Earlier reports keep +those counters unknown; sampled zero events are not final no-OOM proof. + +An optional `resource-run.py --observe-payload-exit -- COMMAND...` adds one small +observer inside the same owned scope. It waits for the direct payload, records +kernel `memory.peak`, CPU and memory/task events, and reports remaining processes +before acknowledging completion to the outer supervisor. The observer remains +alive until receipt acknowledgement, bounded by the existing ten-second cleanup +interval. Payload stdio and process exit status remain observable. + +The receipt phase is **payload-exited-observer-alive**. The supervisor validates +the owned-unit token, numeric fields, cgroup identity, live observer membership, +payload exit status and absence of additional processes before marking that +observation verified. Wrong-owner, malformed, missing or inconsistent receipts +stay unknown; lingering actors stay explicit and cannot certify cleanup. +Unexpected metadata is omitted rather than copying an inherited environment. + +This is not a final whole-scope counter: the observer still has to exit. Existing +`resource_events_final` and `resource_counters_verified` retain their original +meaning and unknown state. The grader's existing full resource gate is unchanged. +Earlier runs and source/runtime hashes are not relabeled. Observer CPU/memory and +acknowledgement time are included in this new measurement mode; comparable runs +must use the same mode. Default commands do not start an observer or add fields. + +One CPU, the unchanged 3 GiB early-stop/4 GiB hard ceiling, no swap, task limits +and host-available-memory safeguards remain in force. No resource limit is raised. +The opt-in mode requires at least two task slots for observer plus payload; +smaller caller-selected ceilings fail before process acquisition. Default mode +continues to accept a one-task ceiling. +Cleanup uses the uniquely owned systemd scope, without signaling a process merely +because a recorded PID exists. Failed scope cleanup retains the named owner. + +## Focused verification + +Five semantic Python cases cover acquisition-free capacity rejection, nonzero exit/kernel facts, missing or malformed +receipts, wrong ownership, integer types, contradictory cleanup, lingering actors, +foreign symlinks and exclusion of unrelated metadata. They join the existing +Python gate; simulated receipts do not establish actual cgroup behavior. + +Actual Linux cgroup/systemd probes additionally verify: + +- Default mode keeps its receipt shape and success status. +- Success and exit-code 3 preserve the payload outcome and verify a sole observer. +- A bounded 16 MiB Node allocation yields a kernel peak, including work that the + 100 ms sampler can miss. +- A payload leaving a child reports both actors and refuses verification; the + supervisor retires the owned scope. +- A caller-selected task ceiling of 4 triggers the existing task-limit early stop + with exit 125 and an unverified observation. +- Interrupting a confirmed-live owned controller preserves failure and retires + its scope; missing completion counters are not replaced with zeros. + +These are metering/lifecycle probes, not a new model/provider performance claim. +Actual REA workflows and repeated observer-overhead measurements remain necessary +before relying on the new mode for domain comparisons. Raw receipts remain in +the private experiment lab outside Git. + +## Actual REA and model observations + +Checkpoint `d1f2cfe76df28e6effe973123f2e19313f6d0d4b` repeats real SDK workflows +against the unchanged frozen candidate `8bc1601ca51e417ca472d90ea0367e9418a1a0f2` +(runtime file-table SHA-256 +`9e7380f537301bf0cfe2926f5619011af848af7c220750e75189498e65d825e1`). +The resource supervisor changes; the compiled REA/provider algorithms do not. +Managed pairs use default/observer/observer/default order with the same question, +settings, two public calls and identical selected facts. Raw receipts remain +private and new measurements do not replace historical resource unknowns. + +| Workflow | SDK milliseconds | Scope seconds | Sampled peak bytes | Kernel peak at payload exit | Payload CPU microseconds | +| -------------------- | ---------------: | ------------: | -----------------: | --------------------------: | -----------------------: | +| Managed default 1 | 5,168.485 | 11.814 | 525,873,152 | unknown | unknown | +| Managed observer 1 | 4,156.708 | 5.358 | 527,777,792 | 535,724,032 | 5,195,457 | +| Managed observer 2 | 3,810.362 | 5.056 | 538,742,784 | 539,529,216 | 4,818,497 | +| Managed default 2 | 4,263.993 | 5.360 | 526,032,896 | unknown | unknown | +| SQLite WASM observer | 6,733.216 | 8.087 | 777,199,616 | 777,199,616 | 7,830,130 | +| NewPipe APK observer | 23,162.195 | 24.600 | 1,286,586,368 | 1,287,548,928 | 23,965,627 | + +The WASM and APK runs use actual configured WABT and JADX/Java. Every observer +receipt verifies a sole remaining observer, successful payload exit and the +expected owned group. No guard abort occurs. The initial default scope timing is +an outlier relative to its SDK workflow and later scopes; its cause is not +established. Two managed pairs are insufficient to characterize observer overhead +or establish a speed/memory improvement. Kernel peak and CPU include the observer. + +One actual Codex CLI 0.161.0 trial uses the original managed question, exact-name +guidance, context capture and requested `gpt-5.6-terra` high. It passes selected +facts, preserves source bytes, removes its profile and makes three successful MCP +calls (including an additional artifact inspection). Reported usage is 61,173 +input, 48,128 cached, 13,045 uncached and 2,678 output tokens; wall time is 125.798 +seconds. The payload-exit witness records 812,896,256 kernel peak bytes and +8,566,029 CPU microseconds with only the observer alive and zero recorded +memory/task limit events at that phase. This confirms the completed model/MCP +payload boundary, not a token/time benefit or final whole-scope no-OOM proof. +Its full existing grader remains false for unknown terminal physical counters. + +The subsequent review adds supervisor/helper source SHA-256 to opt-in receipts +before process acquisition, without adding those fields to default receipts. +This distinguishes measurement implementations independently of frozen runtime +identity and keeps the observer's phase explicit. diff --git a/experiments/analysis-efficiency/resource-run.py b/experiments/analysis-efficiency/resource-run.py new file mode 100644 index 000000000..1790cdcca --- /dev/null +++ b/experiments/analysis-efficiency/resource-run.py @@ -0,0 +1,214 @@ +"""Run one owned experiment in a bounded, transient Linux systemd scope.""" + +import argparse +import hashlib +import json +import os +from pathlib import Path +import subprocess +import sys +import tempfile +import time +import uuid + +from resource_payload import read_observation + + +def available_bytes(): + for line in Path('/proc/meminfo').read_text().splitlines(): + if line.startswith('MemAvailable:'): + return int(line.split()[1]) * 1024 + raise RuntimeError('MemAvailable unavailable') + + +def scope_has_processes(group): + if group is None: + return False + try: + return bool((group / 'cgroup.procs').read_text().strip()) + except FileNotFoundError: + return False + + +def final_resource_events(group): + """An exited transient cgroup may disappear; missing counters are unknown.""" + if group is None: + return None + try: + result = {name: dict((key, int(value)) for key, value in + (line.split() for line in (group / name).read_text().splitlines())) + for name in ['memory.events', 'pids.events']} + except (OSError, ValueError): + return None + required = {'memory.events': ['high', 'max', 'oom', 'oom_kill'], + 'pids.events': ['max']} + if not all(all(key in result[name] for key in keys) + for name, keys in required.items()): + return None + return result + + +def stop_owned_scope(unit, process, group): + subprocess.run(['systemctl', '--user', 'stop', '--no-block', unit], + check=False, timeout=5) + for attempt in range(2): + deadline = time.monotonic() + 10 + while process.poll() is None or scope_has_processes(group): + if time.monotonic() >= deadline: + break + time.sleep(0.1) + else: + return + if attempt == 1: + raise RuntimeError('Cleanup unverified; retain owned scope ' + unit) + subprocess.run(['systemctl', '--user', 'kill', '--kill-who=all', + '--signal=SIGKILL', unit], check=False, timeout=5) + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument('--task-ceiling', type=int, default=192) + parser.add_argument('--observe-payload-exit', action='store_true', + help='Observe payload-exit counters before the cgroup observer exits') + parser.add_argument('command', nargs=argparse.REMAINDER) + options = parser.parse_args() + if options.task_ceiling <= 0: + parser.error('--task-ceiling must be positive') + if options.observe_payload_exit and options.task_ceiling < 2: + parser.error('--observe-payload-exit requires capacity for the observer and payload (at least 2 tasks)') + args = options.command + if args and args[0] == '--': + args = args[1:] + if not args: + raise SystemExit('Usage: resource-run.py -- COMMAND ARGS...') + gib = 1024 ** 3 + if available_bytes() < 8 * gib: + raise SystemExit('Refusing experiment: less than 8 GiB available') + unit = 'rea-efficiency-' + uuid.uuid4().hex + '.scope' + cpu = max(os.sched_getaffinity(0)) + receipt_root = tempfile.TemporaryDirectory(prefix='rea-payload-counters-') if options.observe_payload_exit else None + receipt_path = Path(receipt_root.name) / 'observation.json' if receipt_root else None + release_path = Path(receipt_root.name) / 'release' if receipt_root else None + payload = args if receipt_root is None else [ + sys.executable, str(Path(__file__).with_name('resource_payload.py')), + str(receipt_path), str(release_path), unit, *args, + ] + command = [ + 'systemd-run', '--user', '--scope', '--unit=' + unit, + '-p', 'MemoryMax=4G', '-p', 'MemoryHigh=3G', '-p', 'MemorySwapMax=0', + '-p', 'CPUQuota=100%', '-p', 'TasksMax=' + str(options.task_ceiling), + 'taskset', '-c', str(cpu), *payload, + ] + observer_sources = { + name: hashlib.sha256(Path(__file__).with_name(name).read_bytes()).hexdigest() + for name in ['resource-run.py', 'resource_payload.py'] + } if options.observe_payload_exit else None + try: + process = subprocess.Popen(command) + except BaseException: + if receipt_root is not None: + receipt_root.cleanup() + raise + peak = 0 + peak_tasks = 0 + events = {} + cpu_stats = {} + abort = None + final_events = None + payload_observation = None + payload_group = None + code = None + group = None + started = time.monotonic() + try: + while process.poll() is None: + if group is None: + reply = subprocess.run( + ['systemctl', '--user', 'show', unit, '--value', + '--property=ControlGroup'], + capture_output=True, text=True, check=False, + ) + path = reply.stdout.strip() + if path: + group = Path('/sys/fs/cgroup') / path.lstrip('/') + if receipt_path is not None and payload_observation is None and group is not None: + candidate = read_observation(receipt_path, unit) + if candidate is not None: + payload_observation = candidate + if candidate['control_group'] == str(group.relative_to('/sys/fs/cgroup')): + try: + actors = [int(x) for x in (group / 'cgroup.procs').read_text().splitlines()] + if candidate['observer_pid'] in actors: + payload_group = group + except (OSError, ValueError): + pass + release_path.touch(exist_ok=False) + current = group / 'memory.current' if group else None + if current and current.exists(): + try: + peak = max(peak, int(current.read_text())) + peak_tasks = max(peak_tasks, int((group / 'pids.current').read_text())) + cpu_stats = dict((key, int(value)) for key, value in + (line.split() for line in (group / 'cpu.stat').read_text().splitlines())) + for event_file in ['memory.events', 'pids.events']: + events[event_file] = dict( + (key, int(value)) for key, value in + (line.split() for line in (group / event_file).read_text().splitlines()) + ) + except FileNotFoundError: + # A completed transient scope can disappear between reads. + pass + if peak > 3 * gib: + abort = 'scope_memory_early_stop' + elif available_bytes() < 4 * gib: + abort = 'host_available_memory_early_stop' + elif events.get('pids.events', {}).get('max', 0): + abort = 'scope_task_limit_observed' + if abort: + stop_owned_scope(unit, process, group) + break + time.sleep(0.1) + # Read while the owned group still exists, before wait/cleanup can remove it. + final_events = final_resource_events(group) + code = process.wait() + if receipt_path is not None and payload_observation is None: + payload_observation = read_observation(receipt_path, unit) + except BaseException: + stop_owned_scope(unit, process, group) + raise + finally: + if scope_has_processes(group): + final_events = None + stop_owned_scope(unit, process, group) + print(json.dumps({ + 'resource_scope': unit, 'peak_cgroup_bytes_sampled': peak, + 'elapsed_seconds': round(time.monotonic() - started, 3), + 'abort': abort, 'hard_memory_bytes': 4 * gib, + 'early_stop_bytes': 3 * gib, 'cpu_quota_percent': 100, + 'cpu_affinity': [cpu], + 'task_ceiling': options.task_ceiling, 'peak_tasks_sampled': peak_tasks, + 'resource_events_last_observed': events, + 'resource_events_final': final_events, + 'resource_counters_verified': final_events is not None, + 'cpu_stat_last_observed': cpu_stats, + **({ + 'payload_resource_observation': payload_observation, + 'payload_resource_observation_verified': ( + payload_observation is not None + and payload_observation['payload_cleanup_verified'] + and payload_group is not None and abort is None + and code is not None + and (payload_observation['payload_exit_code'] if payload_observation['payload_exit_code'] >= 0 + else 128 - payload_observation['payload_exit_code']) == code + ), + 'payload_observation_scope': 'Counters at payload exit while observer remains alive; not final whole-scope counters.', + 'payload_observer_sources_sha256': observer_sources, + } if options.observe_payload_exit else {}), + }), file=sys.stderr) + if receipt_root is not None: + receipt_root.cleanup() + raise SystemExit(125 if abort else code) + + +if __name__ == '__main__': + main() diff --git a/experiments/analysis-efficiency/resource_payload.py b/experiments/analysis-efficiency/resource_payload.py new file mode 100644 index 000000000..700598cbf --- /dev/null +++ b/experiments/analysis-efficiency/resource_payload.py @@ -0,0 +1,114 @@ +"""Observe a finished payload while its owned cgroup observer is still alive.""" + +import json +import os +from pathlib import Path +import subprocess +import sys +import time + + +def pairs(path): + values = {} + for line in path.read_text().splitlines(): + name, value = line.split() + number = int(value) + if number < 0 or name in values: + raise ValueError('Invalid kernel counter') + values[name] = number + return values + + +def snapshot(group, token, code): + actors = [int(line) for line in (group / 'cgroup.procs').read_text().splitlines()] + observer = os.getpid() + return { + 'phase': 'payload-exited-observer-alive', 'ownership_token': token, + 'payload_exit_code': code, 'observer_pid': observer, + 'remaining_processes': actors, 'payload_cleanup_verified': actors == [observer], + 'resource_events': {name: pairs(group / name) + for name in ['memory.events', 'pids.events']}, + 'cpu_stat': pairs(group / 'cpu.stat'), + 'memory_peak_bytes': int((group / 'memory.peak').read_text()), + 'control_group': str(group.relative_to('/sys/fs/cgroup')), + } + + +def read_observation(path, token): + """Validate the observer receipt; missing/malformed witnesses stay unknown.""" + try: + if path.is_symlink(): + return None + value = json.loads(path.read_text()) + if not isinstance(value, dict) or value.get('ownership_token') != token: + return None + if value.get('phase') != 'payload-exited-observer-alive': + return None + if not isinstance(value.get('control_group'), str) or not value['control_group']: + return None + for name in ['payload_exit_code', 'observer_pid', 'memory_peak_bytes']: + if type(value.get(name)) is not int: + return None + if value['observer_pid'] <= 0 or value['memory_peak_bytes'] < 0: + return None + actors = value.get('remaining_processes') + if not isinstance(actors, list) or any(type(x) is not int or x <= 0 for x in actors): + return None + if type(value.get('payload_cleanup_verified')) is not bool: + return None + if value['payload_cleanup_verified'] != (actors == [value['observer_pid']]): + return None + required = {'memory.events': ['high', 'max', 'oom', 'oom_kill'], + 'pids.events': ['max']} + events = value.get('resource_events') + if not isinstance(events, dict): + return None + for name, keys in required.items(): + record = events.get(name) + if not isinstance(record, dict) or any(key not in record for key in keys): + return None + if any(type(x) is not int or x < 0 for x in record.values()): + return None + cpu = value.get('cpu_stat') + if not isinstance(cpu, dict) or 'usage_usec' not in cpu: + return None + if any(type(x) is not int or x < 0 for x in cpu.values()): + return None + names = ['phase', 'ownership_token', 'payload_exit_code', 'observer_pid', + 'remaining_processes', 'payload_cleanup_verified', + 'cpu_stat', 'memory_peak_bytes', 'control_group'] + return {**{name: value[name] for name in names}, + 'resource_events': {name: events[name] for name in required}} + except (OSError, ValueError, TypeError): + return None + + +def main(): + output, release, token = Path(sys.argv[1]), Path(sys.argv[2]), sys.argv[3] + command = sys.argv[4:] + if not command: + raise SystemExit('Missing explicit payload command') + child = subprocess.Popen(command) + code = child.wait() + paths = [line[3:] for line in Path('/proc/self/cgroup').read_text().splitlines() + if line.startswith('0::')] + try: + if len(paths) != 1: + raise ValueError('Expected one unified cgroup') + group = Path('/sys/fs/cgroup') / paths[0].lstrip('/') + observation = snapshot(group, token, code) + with os.fdopen(os.open(output, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o600), + 'w') as file: + json.dump(observation, file) + # Keep the owner alive until its supervisor acknowledges the receipt. + # Bound a broken supervisor by the existing ten-second cleanup interval. + deadline = time.monotonic() + 10 + while not release.exists() and time.monotonic() < deadline: + time.sleep(0.02) + except (OSError, ValueError) as error: + print('Payload counter observation unavailable: ' + type(error).__name__, file=sys.stderr) + raise SystemExit(code if code >= 0 else 128 - code) + + +if __name__ == '__main__': + main() diff --git a/experiments/analysis-efficiency/review-model.py b/experiments/analysis-efficiency/review-model.py new file mode 100644 index 000000000..0d6e1e8d7 --- /dev/null +++ b/experiments/analysis-efficiency/review-model.py @@ -0,0 +1,358 @@ +"""Check selected model facts against public producer observations, not exit status.""" + +import argparse +import hashlib +import json +from pathlib import Path +import re + + +def read(path): + return json.loads(path.read_text()) + + +def strings(value): + if isinstance(value, str): + yield value + elif isinstance(value, list): + for entry in value: + yield from strings(entry) + elif isinstance(value, dict): + for entry in value.values(): + yield from strings(entry) + + +def evidence_ids(value): + return {s for s in strings(value) if re.fullmatch(r'ev_[a-f0-9]{64}', s)} + + +def decode(result): + value = result.get('structured_content', result.get('structuredContent')) + if value is not None: + return value + for entry in result.get('content', []): + if entry.get('type') == 'text': + try: + return json.loads(entry['text']) + except json.JSONDecodeError: + pass + return None + + +def named_scope(value, names): + """Accept explicit equivalent scope labels; contradictory duplicates stay a failure.""" + if not isinstance(value, dict): + return None + selected = {name: value[name] for name in names if name in value} + values = list(selected.values()) + if not values: + return None + if all(entry == values[0] for entry in values): + return values[0] + return {'conflicting_reported_scopes': selected} + + +def scope_with_verified_counts(value, expected_scope, returned_counts): + """Validate explicit extra row counts; never erase unknown or conflicting facts.""" + if not isinstance(value, dict): + return value, {} + scope = dict(value) + checks = {} + for name, expected in returned_counts.items(): + if name in scope: + reported = scope[name] + checks[name] = type(reported) is int and reported == expected + if name not in expected_scope: + del scope[name] + return scope, checks + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument('--domain', choices=['wasm', 'evm', 'android', 'flutter-aot', 'sqlite', 'managed', 'managed-nonempty', 'firmware', 'inventory', 'javascript', 'native', 'browser'], required=True) + parser.add_argument('--trial', type=Path, required=True) + parser.add_argument('--reference', type=Path) + parser.add_argument('--resource-log', type=Path, required=True) + parser.add_argument('--output', type=Path, required=True) + args = parser.parse_args() + summary = read(args.trial / 'summary.json') + settings = read(args.trial / 'trial-settings.json') + answer_text = (args.trial / 'answer.txt').read_text().strip() + fenced = answer_text.startswith('```json\n') and answer_text.endswith('\n```') + answer = json.loads(answer_text[8:-4] if fenced else answer_text) + reference = read(args.reference / 'answer.json') if args.reference else None + observed_ids = set() + producer_results = {} + tool_errors = [] + for line in (args.trial / 'events.jsonl').open(): + event = json.loads(line) + item = event.get('item', {}) + if event.get('type') != 'item.completed' or item.get('type') != 'mcp_tool_call': + continue + result = item.get('result') or {} + parsed = decode(result) + if item['status'] == 'completed': + # Only response text contributes observed IDs, never model arguments. + for text in strings(result): + observed_ids.update(re.findall(r'ev_[a-f0-9]{64}', text)) + if parsed is not None: + producer_results.setdefault(item['tool'], []).append(parsed) + else: + tool_errors.append({'tool': item['tool'], 'arguments': item['arguments'], 'response': parsed if parsed is not None else result}) + if parsed is not None and parsed.get('error', {}).get('code') == 'resource_constraint': + reference_value = parsed['error'].get('details', {}).get('reported_limits', {}).get('evidence_reference') + observed_ids.update(evidence_ids(reference_value)) + reported_ids = evidence_ids(answer.get('evidence_ids')) + checks = { + 'reported_evidence_ids_observed_in_responses': bool(reported_ids) and reported_ids <= observed_ids, + 'temporary_profile_removed': read(args.trial / 'cleanup.json')['profile_removed'], + } + if summary.get('selected_artifact_sha256_before') is not None: + checks['selected_artifact_bytes_unchanged'] = summary['selected_artifact_bytes_unchanged'] + if reference is not None: + checks['target_digest'] = answer.get('artifact_sha256') == reference['artifact_sha256'] + differences = {} + + def check(name, actual, expected): + checks[name] = actual == expected + if not checks[name]: + differences[name] = {'answer': actual, 'producer': expected} + + domain = args.domain + if domain == 'wasm': + for key in ['validation', 'section_count', 'import_count', 'export_count', 'exports_first4', 'wat_sha256', 'wat_code_units', 'runtime_execution', 'network_fetch']: + check(key, answer.get(key), reference[key]) + for key in ['release', 'source_commit']: + check('wabt_' + key, answer.get('wabt_' + key), reference['tool_profile'][key]) + elif domain == 'evm': + n = producer_results['inspect_evm_interface'][-1]['normalized_result'] + if n.get('kind') == 'summary': + check('evm_summary.parent_operation', n.get('parent_operation'), 'inspect_evm_interface') + checks['evm_summary.parent_reference_observed'] = n.get('parent_evidence_id') in observed_ids + n = n['summary'] + for key, expected in {'artifact_bytes': n['artifact']['bytes'], 'bytecode_sha256': n['bytecode']['sha256'], 'bytecode_bytes': n['bytecode']['bytes'], 'functions': n['functions'], 'evidence_kind': n['evidence_kind'], 'discovery_completeness': n['discovery_completeness'], 'runtime_execution': n['runtime_execution'], 'bytecode_kind': n['bytecode']['kind'], 'hardfork': n['bytecode']['hardfork'], 'deployment_authenticity': n['bytecode']['deployment_authenticity']}.items(): + check(key, answer.get(key), expected) + check('evm_original_limitations', answer.get('limitations'), n['limitations']) + elif domain == 'sqlite': + for key in ['artifact', 'wal', 'engine', 'database_encoding', 'schema', 'rows', 'producer_limitations', 'limitations']: + # Missing is not SQL/JSON null; booleans are not numeric counters. + check(key, (key in answer, json.dumps(answer.get(key), sort_keys=True)), + (True, json.dumps(reference[key], sort_keys=True))) + elif domain == 'flutter-aot': + for key in ['target', 'abi', 'libapp', 'string_pool', 'coverage', 'limitations']: + check(key, answer.get(key), reference[key]) + elif domain == 'android': + for key in ['package_name', 'version_name', 'version_code', 'matches']: + check(key, answer.get(key), reference[key]) + fields = ['reported_signature', 'overload_index', 'dex_descriptor'] + checks['onCreate_fields_present_including_explicit_null'] = all(all(k in row for k in fields) for row in answer.get('onCreate', [])) + check('all_onCreate_descriptors', [{k: row.get(k) for k in fields} for row in answer.get('onCreate', [])], [{k: row[k] for k in fields} for row in reference['onCreate']]) + elif domain == 'managed': + n = reference['artifact'] + for group, fields in [('assembly', ['name', 'version']), ('module', ['name', 'mvid'])]: + for field in fields: + check(group + '.' + field, answer.get(group, {}).get(field), n[group][field]) + for key in ['classification', 'target_frameworks']: + check(key, answer.get(key), n[key]) + for key in ['module_refs', 'pinvoke_imports']: + check(key, answer.get('native_boundaries', {}).get(key), reference['boundaries'][key]) + check('artifact_coverage', named_scope(answer.get('coverage'), ['artifact', 'managed_artifact', 'managed_metadata']), n['coverage']) + boundary_scope, counts = scope_with_verified_counts( + named_scope(answer.get('coverage'), ['native_boundaries', 'native_boundary_declarations']), + reference['boundaries']['coverage'], + {'module_ref_count': len(reference['boundaries']['module_refs']), + 'pinvoke_import_count': len(reference['boundaries']['pinvoke_imports'])}) + check('native_boundaries_coverage', boundary_scope, reference['boundaries']['coverage']) + checks.update({'native_coverage_' + name: valid for name, valid in counts.items()}) + elif domain == 'managed-nonempty': + n = reference['boundaries'] + check('module_mvid', answer.get('module_mvid'), n['module']['mvid']) + check('summary', {key: answer.get('summary', {}).get(key) for key in n['summary']}, n['summary']) + check('all_original_module_refs', answer.get('module_refs'), n['module_refs']) + check('first3_complete_pinvoke_records', answer.get('pinvoke_first3'), n['pinvoke_imports'][:3]) + check('coverage', answer.get('coverage'), n['coverage']) + elif domain == 'firmware': + source = producer_results['inspect_firmware_regions'][-1] + n = source['normalized_result'] + result = answer['result'] + check('input_size', result.get('input_size'), n['input_size']) + check('examined_coverage', result.get('coverage', result.get('examined_coverage')), n['coverage']) + fields = ['provider_id', 'offset', 'reported_size', 'signature', 'description', 'reported_confidence', 'size_basis'] + check('all_original_region_records', [{k: row.get(k) for k in fields} for row in result.get('regions', [])], [{k: row[k] for k in fields} for row in n['regions']]) + engine = result.get('engine', result.get('provider_provenance', {}).get('engine', {})) + for key in ['name', 'version']: + check('engine.' + key, engine.get(key), n['engine'][key]) + check('engine_executable_digest', engine.get('executable_sha256', engine.get('artifact_sha256')), n['engine']['executable_sha256']) + elif domain == 'inventory': + for key in ['manifest', 'entry_kind_counts', 'integrity_contradictions']: + check(key, answer.get(key), reference[key]) + original = producer_results['inspect_artifact'][-1]['normalized_result'] + if original.get('kind') == 'summary': + branches = original['summary']['inspection']['unexplored_branches'] + else: + branches = original['unexplored_branches'] + # Caller-selected integrity policy participates in atomic Evidence and + # branch identity. Match those IDs to this original response, not a + # reference invocation that may use a different policy. + check('unexplored_branches_with_original_ids', answer.get('unexplored_branches'), branches) + coverage = answer.get('coverage', {}) + check('inspection_coverage', coverage.get('inspection', coverage), reference['coverage']) + paths = answer.get('requested_paths') + if isinstance(paths, dict): + paths = [row for value in paths.values() for row in (value if isinstance(value, list) else [value]) if row is not None] + canonical = lambda row: json.dumps(row, sort_keys=True, separators=(',', ':')) + check('original_selected_path_records', sorted(map(canonical, paths or [])), sorted(map(canonical, reference['requested_paths']))) + elif domain == 'javascript': + for key in ['input_path', 'source_selection', 'statistics', 'electron']: + check(key, answer.get(key), reference[key]) + coverage = answer['coverage'] + expected = reference['coverage'] + for key in ['application_unknowns', 'semantic_unknowns']: + check('coverage.' + key, coverage.get(key), expected[key]) + for layer in ['application', 'semantic']: + for key, value in expected[layer].items(): + if key in ['limits', 'families']: continue + check('coverage.' + layer + '.' + key, coverage[layer].get(key), value) + # Budgets vary with parent heap and belong to this actual invocation. + # Exact optional provenance remains a separate strict check; omissions + # must not be hidden by accepting the coarse coverage summary. + original = producer_results['analyze_javascript_application'][-1]['normalized_result']['summary']['coverage'] + check('full_coverage_provenance', coverage, original) + # The question names types/digests, not literal answer property names. + # Exact node IDs select the producer's main.js records. No source or + # Evidence values are rewritten to accept these answer labels. + select = lambda rows: sorted([{ + 'node_id': row.get('node_id'), + 'kind': row.get('kind', row.get('type')), + 'identity': row.get('identity'), + 'hashes': row.get('hashes', row.get('digests')), + } for row in rows], key=lambda row: row['node_id']) + check('all_selected_module_identities', select(answer.get('modules', [])), select(reference['modules'])) + elif domain == 'native': + for key in ['entry_address', 'caller_count', 'callee_count']: + check(key, answer.get(key), reference[key]) + prefix = answer.get('pseudocode_prefix') + if isinstance(prefix, dict) and prefix.get('unit') == 'utf16-code-units': + text = prefix.get('text') + if 'requested' in prefix: + check('pseudocode_prefix.requested', prefix['requested'], 512) + if 'returned' in prefix: + check('pseudocode_prefix.returned', prefix['returned'], len(reference['pseudocode_prefix'].encode('utf-16-le')) // 2) + prefix = text + check('pseudocode_prefix', prefix, reference['pseudocode_prefix']) + containing = answer.get('containing_procedure') + expected_containing = reference['containing_procedure']['procedure'] + if isinstance(containing, str): + # Compare the explicitly reported display to the known source; + # never parse a display name into a canonical lookup identity. + check('containing_procedure.display', containing, + expected_containing['name'] + ' @ ' + expected_containing['address']) + else: + containing = containing if isinstance(containing, dict) else {} + nested = containing.get('procedure') + nested = nested if isinstance(nested, dict) else {} + for key in ['address', 'name']: + check('containing_procedure.' + key, containing.get(key, nested.get(key)), expected_containing[key]) + procedure = answer.get('procedure') + procedure = procedure if isinstance(procedure, dict) else {} + expected = reference['procedure'] + for key in ['address', 'name', 'classification', 'signature', 'locals']: + check('procedure.' + key, procedure.get(key), expected[key]) + body = procedure.get('body') + body = body if isinstance(body, dict) else {} + check('procedure.body_ranges', procedure.get('body_ranges', body.get('ranges', body.get('ranges_inclusive'))), expected['body']['ranges']) + check('procedure.total_bytes', procedure.get('total_bytes', body.get('total_bytes')), expected['body']['total_bytes']) + if 'load_image' in reference: + sources = [source for source in producer_results.get('inspect_native_load_image', []) + if isinstance(source, dict) + and source.get('operation') == 'inspect_native_load_image' + and isinstance(source.get('evidence_id'), str) + and source.get('evidence_id') in reported_ids + and isinstance(source.get('normalized_result'), dict)] + checks['load_image_source_observed_and_referenced'] = bool(sources) + load = sources[-1]['normalized_result'] if sources else {} + entry = load.get('entry') + entry = entry if isinstance(entry, dict) else {} + check('load_image.target_sha256', load.get('target_sha256'), reference['artifact_sha256']) + check('load_image.source_status', load.get('status'), reference['load_image']['status']) + check('load_image.source_entry', entry.get('linear_address'), reference['entry_address']) + status = answer.get('load_image_status') + check('load_image_status', status.get('status') if isinstance(status, dict) else status, load.get('status')) + if isinstance(status, dict): + for key in ['format', 'load_segment', 'header_bytes', 'module_bytes', 'overlay_bytes']: + if key in status: + check('load_image.' + key, status[key], load.get(key)) + if 'entry_linear_address' in status: + check('load_image.entry_linear_address', status['entry_linear_address'], entry.get('linear_address')) + calls = summary['completed_mcp_calls'] + checks['default_analysis_not_disabled'] = all(not call['arguments'].get('skip_auto_analysis', False) for call in calls if call['tool'] == 'open_binary') + checks['session_close_completed'] = any(call['tool'] == 'close_binary' and call['status'] == 'completed' for call in calls) + elif domain == 'browser': + source = producer_results['capture_browser_scenario'][-1] + n = source['normalized_result'] + for key in ['browser', 'completeness']: + check(key, answer.get(key), n[key]) + check('start_origin', answer.get('start_origin'), n['scenario']['start_origin']) + step_count = answer.get('step_count') + check('step_count', step_count.get('captured_steps') if isinstance(step_count, dict) else step_count, len(n['steps'])) + final = n['steps'][-1] + expected_url = final['after_url'] if isinstance(answer.get('final_url'), dict) else final['after_url']['url'] + check('final_url', answer.get('final_url'), expected_url) + for key in ['dom', 'accessibility']: + expected = final['artifacts'][key] + actual = answer.get(key, {}) + if expected['state'] == 'captured': + actual = actual.get('value', actual) + for field in ['sha256', 'bytes']: + check(key + '.' + field, actual.get(field), expected['value'][field]) + else: + check(key + '.state', actual.get('state'), expected['state']) + checks['owned_browser_terminated'] = n['browser']['cleanup'] == 'terminated-owned-process' + events = n['events']['items'] + page_errors = [event for event in events if event['kind'] == 'page-error'] + if isinstance(answer.get('page_errors'), dict): + check('page_error_count', answer['page_errors'].get('count'), len(page_errors)) + network = answer.get('network', {}) + if 'observed_transactions' in network: + check('network_transaction_count', network['observed_transactions'], len({event['transaction_id'] for event in events if event.get('transaction_id') is not None})) + if 'observed_response_statuses' in network: + statuses = {} + for event in events: + if event['kind'] == 'response': + status = str(event['status']) + statuses[status] = statuses.get(status, 0) + 1 + check('network_response_statuses', network['observed_response_statuses'], statuses) + factual_checks = dict(checks) + scopes = [json.loads(line) for line in args.resource_log.read_text().splitlines() if line.startswith('{')] + scope = next(value for value in reversed(scopes) if 'resource_scope' in value) + checks['no_resource_abort'] = scope['abort'] is None + events = scope.get('resource_events_final') + checks['resource_counters_verified'] = scope.get('resource_counters_verified') is True + checks['no_observed_oom_or_task_limit'] = ( + isinstance(events, dict) + and all(events.get('memory.events', {}).get(k) == 0 for k in ['max', 'oom', 'oom_kill']) + and events.get('pids.events', {}).get('max') == 0 + ) + checks['no_resource_limit_event'] = ( + checks['resource_counters_verified'] + and checks['no_observed_oom_or_task_limit'] + and events['memory.events'].get('high') == 0 + ) + report = { + 'review_source_sha256': hashlib.sha256(Path(__file__).read_bytes()).hexdigest(), + 'domain': domain, 'checks': checks, 'all_selected_checks_pass': all(checks.values()), + 'factual_checks': factual_checks, 'all_factual_checks_pass': all(factual_checks.values()), + 'differences': differences, 'tool_errors': tool_errors, 'summary': summary, + 'fingerprints': {key: value for key, value in settings.items() if 'sha256' in key or key in ['runtime_revision', 'enabled_tools', 'authority']}, + 'answer_file_sha256': hashlib.sha256((args.trial / 'answer.txt').read_bytes()).hexdigest(), + 'answer_had_json_fence': fenced, 'reported_evidence_ids': sorted(reported_ids), 'resource': scope, + 'scope': 'Fixed selected-fact review against actual public producer observations. Equivalent explicitly named answer representations are accepted; unknowns/nulls remain checked. Limitations, unsupported claims and broader behavior still require transcript review. Token usage and failed calls are retained; zero exit status is not a factual grade.', + } + with args.output.open('x') as output: + output.write(json.dumps(report, indent=2, ensure_ascii=False) + '\n') + print(json.dumps({'domain': domain, 'passed': report['all_selected_checks_pass'], 'failed_checks': [key for key, value in checks.items() if not value]})) + raise SystemExit(0 if report['all_selected_checks_pass'] else 1) + + +if __name__ == '__main__': + main() diff --git a/experiments/analysis-efficiency/sqlite-existing-controls.md b/experiments/analysis-efficiency/sqlite-existing-controls.md new file mode 100644 index 000000000..9bac9f064 --- /dev/null +++ b/experiments/analysis-efficiency/sqlite-existing-controls.md @@ -0,0 +1,181 @@ +# SQLite existing-control measurements + +Continues [#2016](https://github.com/morluto/rea/issues/2016) after the Flutter +lane. The measured main runtime is pinned to +`172407787f1842dedbcd27b5385177595f786ce4`. Its only post-Flutter +commit repairs Windows transient runtime admission (#2467); this Linux round +does not establish Windows performance. No production/API change is proposed +merely because another summary or cache could be added. + +Before PR integration, main advanced to +`bb540826d65316c164d2de8ba4ef10f81a8ad073`. Its five intervening commits cover +MCP archive contracts/documentation, an advertised-schema inventory test, +pwntools cleanup identity, concurrent Mach-O slice inspection, and transient +DMG verification retries. None changes the SQLite selector. Rebase and current +main verification do not relabel the frozen measurements below. + +The committed post-format driver passes a real SDK smoke against the frozen +runtime. After rebase, a fresh build, real all/selected-column SDK pair and docs +check pass on the updated main. Selected facts match each other and the frozen +runtime; artifact bytes remain unchanged. These are integration checks, not +additional model performance pairs. + +## Real application data and question + +Use QGIS's bundled `world_map.gpkg`, unmodified from official immutable source +commit `e1223b8e9e71fc50ee995ed556f711c54ccc101b`. `corpus.json` pins its URL, +12,914,688-byte size, Git blob `c9ff80228dff0de93c9acdef16a97545ba360244`, and +SHA-256 `01d293159d1b77bd9212b5252587853f61aa9e25b2387135f34afaba8d057190`. +Streaming acquisition matches the upstream blob. The upstream resource install +list includes `data/*`; [its README](https://github.com/qgis/QGIS/blob/e1223b8e9e71fc50ee995ed556f711c54ccc101b/resources/data/README_world_map.md) +records data provenance. This is shipped application data, not a generated REA +fixture. QGIS is neither installed nor executed. + +The source question asks for the complete returned `countries` table schema +and one sample's `fid`, `NAME`, `ISO_A3` tagged cells, in that order. It preserves +database/WAL identity, engine/encoding, exact original SQL and columns, integer +strings, text bytes, nulls, row limit/count, unspecified order, truncation and +both producer/outer limitations. It does not require geometry blobs or a full +country inventory. Neither political labels nor the sampled ordering are +inferred to be current or globally exhaustive. + +SQLite already defaults to compact schema inventory without a table, detailed +selected-table schema with a table, and exposes exact `columns`. Selecting +columns avoids constructing unrelated cells without changing the requested +table schema. Thus compare existing all-visible columns against exact columns +on the same main runtime, rather than changing an old user's default or adding +a new delivery mechanism. Inventory scope cannot substitute for the detailed +schema requested by this question. + +## Public SDK observations + +Frozen runtime: main `172407787f1842dedbcd27b5385177595f786ce4`, compiled +dist/bridge file-table SHA-256 +`72a4ac6c6db491c455f3e4a798f8f52ed5850c08831e7cdc9f25c1525a5a1d11`. +Node 24.18.0, SDK client/server 2.3.1, observed SQLite 3.53.1, WAL null. Driver, +provider settings/search-path fingerprints, artifact and locked dependencies +remain equal. Each workflow starts a fresh server and validates the selected +actual advertised schema. Host page caches are not flushed. + +The initial default inventory returns 26 table entries, including explicit +virtual/shadow classifications, no rows and `not_requested` column details: +27,185 compact client-result JSON bytes. Selecting `countries` reveals eight +columns, including a geometry blob. Its one-row full reply is 485,277 bytes. +The selected request retains every requested declared-schema field and exact +tagged sample values while omitting unrelated sample cells. + +| Trial | Reply bytes | SDK workflow seconds | Payload CPU seconds | Kernel peak bytes | +| ------------- | ----------: | -------------------: | ------------------: | ----------------: | +| sdk-all-1 | 485,277 | 11.820 | 12.755 | 562,884,608 | +| sdk-columns-1 | 18,509 | 14.017 | 13.715 | 557,510,656 | +| sdk-columns-2 | 18,509 | 15.826 | 14.162 | 548,343,808 | +| sdk-all-2 | 485,277 | 5.679 | 7.310 | 561,704,960 | + +Both pairs make one successful call, pass settings/selected-fact comparison, +retain complete original schema and all requested typed cells, and preserve +source bytes. Reply bytes fall about 96.2%. These observations **do not show SDK +speed or CPU improvement**: selected workflows are slower in both pairs and +timing varies substantially. No cause is inferred from these data. Payload CPU +includes runner/catalog work outside the SDK workflow timer. Memory changes +are small and do not establish a general reduction. Raw replies and the exact +pre-format driver source are archived privately. + +Reproduce with `measure.mjs --artifact qgis-world-map.gpkg` and +`--sqlite-selection all|columns`, using the same `--runtime-root`, `--revision`, +artifact path and `--schemas selected`. `--delivery` stays `complete`; this is +an existing request selection, not a new summary API. Original caller arguments +and schemas remain in the private receipts. The source question is +`questions/sqlite-qgis.txt` and the selected factual grader is +`review-model.py --domain sqlite`. + +## Decision and scope + +The initial four actual Codex attempts never executed SQLite: the client rejected +the tool because its private snapshot writes require approval and the isolated +driver lacked this exact tool's approval override. Every factual grade fails; +these are failed client attempts, not completed-task performance comparisons. +All profiles are removed. The existing experiment-only per-tool approval list +now includes `inspect_sqlite_database`; each corrected trial exposes only that +exact enabled tool. REA annotations, target authority and global Codex configuration +are unchanged. The [official configuration reference](https://learn.chatgpt.com/docs/config-file/config-reference) +documents the per-tool override. Corrected cohorts use fresh output directories +and retain the original failures separately. + +Actual repeated Codex comparisons determine the task token/time benefit before +crediting smaller replies. An existing selector that answers the question is +evidence against adding another production mechanism. Keep negative outcomes +and unavailable coverage, including failure/retry costs and profile cleanup. + +Four corrected serial trials use Codex CLI 0.161.0, requested `gpt-5.6-terra` +high, one enabled tool, identical owned context/discovery capture, and the same +frozen main runtime. The requested alias is not a verified server-resolved model. +Equal treatment instructions select the existing all-visible or exact-column +request; the source question and requested schema/sample facts stay fixed. + +| Corrected trial | Input | Cached | Uncached | Output | Seconds | MCP calls | Facts | +| ------------------------ | -----: | -----: | -------: | -----: | ------: | --------: | ----- | +| approved-model-all-1 | 88,131 | 52,480 | 35,651 | 3,369 | 84.007 | 2 | pass | +| approved-model-columns-1 | 37,340 | 20,992 | 16,348 | 3,006 | 87.514 | 1 | pass | +| approved-model-columns-2 | 56,148 | 36,096 | 20,052 | 3,298 | 97.466 | 2 | pass | +| approved-model-all-2 | 88,340 | 52,480 | 35,860 | 3,084 | 113.847 | 2 | pass | + +Both pairs pass every selected producer fact, exact SQL/schema/null/tagged +cells, observed response Evidence IDs, target-byte preservation and profile +cleanup. The grader checks producer observations, not independent geometry +semantics. Actual events contain only the chosen MCP tool and agent messages; +no shell or other agent execution appears. Usage is the final aggregate actually +reported by the CLI, one usage record per trial; cached input remains included +in total input. Output includes 853 / 357 / 523 / 664 reasoning tokens. + +Total input falls **57.63% / 36.44%**, uncached input **54.14% / 44.08%**. +Time is mixed: columns are **4.17% slower** in pair 1 and **14.39% faster** in +pair 2. Output is 10.77% lower / 6.94% higher. Repeated calls remain counted; +pair 1 has two all-column calls versus one selected call, while pair 2 has two +calls on both sides. This supports scoped token savings from using the existing +selector, not a dependable speedup or a new API requirement. Client context and +usage are observed separately from raw SDK reply bytes. + +Model payload CPU seconds / kernel peaks are 7.596 / 763,838,464; +7.772 / 761,143,296; 8.409 / 762,597,376; and 11.759 / 774,025,216. CPU is mixed +and memory differences are small. Payload cleanup/limit observations pass; +missing terminal counters keep every strict whole-resource grade false. + +The original blocked attempts remain separate and never provide comparison +denominators. They each have one failed call, no SQLite result and failed facts: + +| Blocked trial | Input | Cached | Uncached | Output | Seconds | +| --------------- | -----: | -----: | -------: | -----: | ------: | +| model-all-1 | 35,290 | 29,952 | 5,338 | 798 | 59.881 | +| model-columns-1 | 35,356 | 22,016 | 13,340 | 670 | 44.764 | +| model-columns-2 | 35,034 | 20,992 | 14,042 | 639 | 30.007 | +| model-all-2 | 35,104 | 20,992 | 14,112 | 673 | 25.132 | + +**Decision: no production/API change.** Existing column selection materially +reduces unnecessary delivery and actual model input while retaining the complete +requested schema and exact cells. Existing documentation already recommends +table/column selection. No additional summary, schema-scope default change, +automatic field omission, plugin layer or cross-session cache is justified by +these results. Preserve the negative/mixed time, output and CPU findings. + +Real one-shot CLI inventory, all-column sample and exact-column sample match +the corresponding full MCP normalized results, subjects, parameters and IDs; +the source digest remains unchanged. An independent Python binding using SQLite +3.40.1 opens this immutable artifact read-only and agrees with the exact stored +table SQL, eight declared columns and selected tagged sample cells. This is a +second engine/binding observation of this file, not a general row-order or +geometry-semantics guarantee. The six existing context/driver regression tests +pass; Python compilation and JavaScript syntax checks pass. No new product test +or production implementation is added for this measurement-only finding. + +Manual review tightens the SQLite grader to distinguish missing fields from +explicit null and preserve JSON scalar types. Regrading all four stored model +answers still passes every selected fact; deliberate omission of `wal` and a +boolean substituted for numeric `row_limit` both fail. Original transcripts, +usage and previous review receipts stay intact; no model trial is rerun. + +Heavy tasks remain serial under one CPU, unchanged 3 GiB early stop / 4 GiB hard +memory, no swap, owned task scopes and host guards. SDK payload observations +verify cleanup and zero phase limit events; final whole-scope counters remain +unknown. This does not establish live/WAL atomicity, all SQLite applications, +other runtimes/platforms or geospatial geometry semantics. Other packet/signal +and capture lanes remain incremental follow-ups using their existing controls. diff --git a/experiments/analysis-efficiency/test_codex_context.py b/experiments/analysis-efficiency/test_codex_context.py new file mode 100644 index 000000000..37df83a7c --- /dev/null +++ b/experiments/analysis-efficiency/test_codex_context.py @@ -0,0 +1,175 @@ +"""Distinct capture/cleanup failures; simulated CLI is not real-model evidence.""" + +import importlib.util +import io +import json +import os +import runpy +import sys +from pathlib import Path +import tempfile +import unittest +from unittest.mock import Mock, patch + +from codex_context import capture_tool_context, selected_event + + +class ManagedCoverageTests(unittest.TestCase): + def test_verifies_extra_counts_and_preserves_unknown_fields(self): + review = runpy.run_path(str(Path(__file__).with_name('review-model.py'))) + project = review['scope_with_verified_counts'] + expected = {'state': 'partial', 'issues': ['unreturned rows remain unknown']} + original = {**expected, 'module_ref_count': 0, 'pinvoke_import_count': 2} + scope, checks = project(original, expected, {'module_ref_count': 0, 'pinvoke_import_count': 2}) + self.assertEqual(scope, expected) + self.assertTrue(all(checks.values())) + self.assertEqual(original['pinvoke_import_count'], 2) + for count in [3, '2', True]: + scope, checks = project({**expected, 'pinvoke_import_count': count}, expected, {'pinvoke_import_count': 2}) + self.assertFalse(checks['pinvoke_import_count']) + _, checks = project({**expected, 'module_ref_count': False}, {**expected, 'module_ref_count': 0}, {'module_ref_count': 0}) + self.assertFalse(checks['module_ref_count']) + scope, _ = project({**expected, 'unsupported_claim': True}, expected, {}) + self.assertNotEqual(scope, expected) + scope, _ = project({'state': 'partial', 'module_ref_count': 0}, expected, {'module_ref_count': 0}) + self.assertNotEqual(scope, expected) + ambiguous = review['named_scope']({'native_boundaries': expected, 'native_boundary_declarations': {'state': 'complete'}}, ['native_boundaries', 'native_boundary_declarations']) + scope, _ = project(ambiguous, expected, {'module_ref_count': 0}) + self.assertNotEqual(scope, expected) + + +class ContextCaptureTests(unittest.TestCase): + def test_filters_ambient_account_and_nested_usage_state(self): + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) + home = root / 'home' + sessions = home / 'sessions' + sessions.mkdir(parents=True) + output = root / 'output' + output.mkdir() + events = [ + {'type': 'world_state', 'payload': {'state': {'env': 'ambient-marker'}}}, + {'type': 'session_meta', 'payload': {'creator_account_id': 'account-marker'}}, + {'type': 'response_item', 'payload': { + 'type': 'custom_tool_call_output', 'call_id': 'original-call', + 'output': 'caller-selected evidence and paths', + 'internal_chat_message_metadata_passthrough': 'private-marker'}}, + {'type': 'token_usage_record', 'payload': { + 'response_id': 'original-response', 'usage': { + 'input_tokens': 12, 'cached_input_tokens': 4, + 'environment': 'nested-ambient-marker'}, + 'transport_auth': 'auth-marker'}}, + ] + (sessions / 'rollout.jsonl').write_text(''.join(json.dumps(x) + '\n' for x in events)) + (home / 'auth.json').write_text('copied-credential-marker') + receipt = capture_tool_context(home, output) + text = (output / 'codex-tool-context.jsonl').read_text() + self.assertEqual(receipt['status'], 'captured') + self.assertEqual(receipt['retained_events'], 2) + for marker in ['ambient-marker', 'account-marker', 'private-marker', + 'auth-marker', 'copied-credential-marker']: + self.assertNotIn(marker, text) + self.assertIn('caller-selected evidence and paths', text) + self.assertIn('original-response', text) + self.assertEqual((output / 'codex-tool-context.jsonl').stat().st_mode & 0o777, 0o600) + + def test_missing_rollouts_are_unknown_and_malformed_lines_remain_partial(self): + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) + output = root / 'missing' + output.mkdir() + self.assertEqual(capture_tool_context(root / 'home', output)['status'], 'unavailable') + sessions = root / 'home' / 'sessions' + sessions.mkdir(parents=True) + (sessions / 'rollout.jsonl').write_text('not-json\n' + json.dumps({ + 'type': 'event_msg', 'payload': {'type': 'token_count', 'info': None}}) + '\n') + partial = root / 'partial' + partial.mkdir() + receipt = capture_tool_context(root / 'home', partial) + self.assertEqual(receipt['status'], 'partial') + self.assertEqual(receipt['errors'][0]['line'], 1) + self.assertEqual(receipt['retained_events'], 1) + with self.assertRaises(ValueError): + selected_event({'type': 'token_usage_record', 'payload': {'usage': {'input_tokens': True}}}) + with self.assertRaises(ValueError): + selected_event({'type': {'environment': 'unexpected'}, 'payload': {}}) + with self.assertRaises(ValueError): + selected_event({'type': 'response_item', 'timestamp': {'environment': 'unexpected'}, 'payload': {}}) + unknown = selected_event({'type': 'event_msg', 'payload': {'type': 'token_count', 'info': {'model_context_window': None}}}) + self.assertIsNone(unknown['payload']['info']['model_context_window']) + + def test_capture_failure_still_removes_trial_credentials_and_profile(self): + spec = importlib.util.spec_from_file_location('agent_trial', Path(__file__).with_name('agent-trial.py')) + agent = importlib.util.module_from_spec(spec) + spec.loader.exec_module(agent) + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) + runtime = root / 'runtime' + (runtime / 'scripts').mkdir(parents=True) + (runtime / 'scripts' / 'rea.mjs').write_text('') + (runtime / 'package-lock.json').write_text('{}') + auth_home = root / 'source-auth' + auth_home.mkdir() + (auth_home / 'auth.json').write_text('synthetic-credential') + question = root / 'question.txt' + question.write_text('Observe the declared fixture.') + output = root / 'trial' + child = Mock(stdin=io.StringIO()) + child.wait.return_value = 0 + arguments = ['agent-trial.py', '--runtime-root', str(runtime), '--revision', 'fixture', + '--prompt', str(question), '--output', str(output), '--capture-tool-context'] + with patch.dict(os.environ, {'CODEX_HOME': str(auth_home)}, clear=True), \ + patch.object(sys, 'argv', arguments), \ + patch.object(agent.shutil, 'which', return_value='/fixture/node'), \ + patch.object(agent.subprocess, 'check_output', return_value='v24.18.0\n'), \ + patch.object(agent.subprocess, 'Popen', return_value=child), \ + patch.object(agent, 'capture_tool_context', side_effect=OSError('fixture capture failure')), \ + patch('builtins.print'): + with self.assertRaisesRegex(OSError, 'fixture capture failure'): + agent.main() + self.assertFalse(list(output.glob('profile-*'))) + self.assertTrue(json.loads((output / 'cleanup.json').read_text())['profile_removed']) + self.assertEqual((auth_home / 'auth.json').read_text(), 'synthetic-credential') + + def test_refuses_foreign_session_directory_and_symlink_records(self): + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) + home = root / 'home' + home.mkdir() + foreign = root / 'foreign' + foreign.mkdir() + (foreign / 'rollout.jsonl').write_text('private marker') + (home / 'sessions').symlink_to(foreign, target_is_directory=True) + output = root / 'directory-result' + output.mkdir() + receipt = capture_tool_context(home, output) + self.assertEqual(receipt['status'], 'partial') + self.assertEqual(receipt['retained_events'], 0) + (home / 'sessions').unlink() + (home / 'sessions').mkdir() + (home / 'sessions' / 'linked.jsonl').symlink_to(foreign / 'rollout.jsonl') + output = root / 'file-result' + output.mkdir() + receipt = capture_tool_context(home, output) + self.assertEqual(receipt['status'], 'partial') + self.assertEqual(receipt['errors'][0]['reason'], 'not_an_owned_regular_file') + self.assertEqual((foreign / 'rollout.jsonl').read_text(), 'private marker') + + def test_guidance_requires_selected_tools_before_acquiring_a_profile(self): + spec = importlib.util.spec_from_file_location('agent_trial', Path(__file__).with_name('agent-trial.py')) + agent = importlib.util.module_from_spec(spec) + spec.loader.exec_module(agent) + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) + output = root / 'trial' + arguments = ['agent-trial.py', '--runtime-root', str(root), '--revision', 'fixture', + '--prompt', str(root / 'question'), '--output', str(output), '--guide-enabled-tools'] + with patch.object(sys, 'argv', arguments), patch.object(sys, 'stderr', io.StringIO()): + with self.assertRaises(SystemExit) as raised: + agent.main() + self.assertEqual(raised.exception.code, 2) + self.assertFalse(output.exists()) + + +if __name__ == '__main__': + unittest.main() diff --git a/experiments/analysis-efficiency/test_resource_payload.py b/experiments/analysis-efficiency/test_resource_payload.py new file mode 100644 index 000000000..3f091efb9 --- /dev/null +++ b/experiments/analysis-efficiency/test_resource_payload.py @@ -0,0 +1,103 @@ +"""Receipt semantics; real systemd/cgroup workflows are verified separately.""" + +import json +import importlib.util +import io +from pathlib import Path +import sys +import tempfile +import unittest +from unittest.mock import patch + +from resource_payload import read_observation + + +def receipt(): + return { + 'phase': 'payload-exited-observer-alive', 'ownership_token': 'own-unit', + 'payload_exit_code': 3, 'observer_pid': 100, 'remaining_processes': [100], + 'payload_cleanup_verified': True, 'memory_peak_bytes': 123, + 'control_group': 'user.slice/own-unit.scope', + 'resource_events': {'memory.events': {'high': 0, 'max': 0, 'oom': 0, 'oom_kill': 0}, + 'pids.events': {'max': 0}}, + 'cpu_stat': {'usage_usec': 1000}, + } + + +class PayloadObservationTests(unittest.TestCase): + def test_observer_capacity_failure_precedes_any_process_acquisition(self): + spec = importlib.util.spec_from_file_location('resource_run', Path(__file__).with_name('resource-run.py')) + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + arguments = ['resource-run.py', '--observe-payload-exit', '--task-ceiling', '1', '--', 'payload'] + with patch.object(sys, 'argv', arguments), patch.object(sys, 'stderr', io.StringIO()), \ + patch.object(module.subprocess, 'Popen') as spawn: + with self.assertRaises(SystemExit) as failure: + module.main() + self.assertEqual(failure.exception.code, 2) + spawn.assert_not_called() + + def test_preserves_nonzero_status_kernel_peak_and_nonzero_events(self): + with tempfile.TemporaryDirectory() as directory: + path = Path(directory) / 'receipt.json' + value = receipt() + value['resource_events']['memory.events']['oom'] = 1 + path.write_text(json.dumps(value)) + observed = read_observation(path, 'own-unit') + self.assertEqual(observed['payload_exit_code'], 3) + self.assertEqual(observed['memory_peak_bytes'], 123) + self.assertEqual(observed['resource_events']['memory.events']['oom'], 1) + + def test_rejects_missing_malformed_wrong_owner_and_inconsistent_cleanup(self): + with tempfile.TemporaryDirectory() as directory: + path = Path(directory) / 'receipt.json' + self.assertIsNone(read_observation(path, 'own-unit')) + path.write_text('incomplete-json') + self.assertIsNone(read_observation(path, 'own-unit')) + cases = [] + for key, invalid in [('ownership_token', 'other-unit'), ('observer_pid', True), + ('memory_peak_bytes', -1), ('remaining_processes', [100, 101]), + ('payload_cleanup_verified', 'true'), ('phase', 'scope-exited')]: + value = receipt() + value[key] = invalid + cases.append(value) + value = receipt() + del value['resource_events']['memory.events']['oom'] + cases.append(value) + value = receipt() + value['cpu_stat']['usage_usec'] = False + cases.append(value) + for value in cases: + with self.subTest(value=value): + path.write_text(json.dumps(value)) + self.assertIsNone(read_observation(path, 'own-unit')) + + def test_retains_lingering_actor_facts_without_certifying_cleanup(self): + with tempfile.TemporaryDirectory() as directory: + path = Path(directory) / 'receipt.json' + value = receipt() + value['remaining_processes'].append(101) + value['payload_cleanup_verified'] = False + path.write_text(json.dumps(value)) + observed = read_observation(path, 'own-unit') + self.assertEqual(observed['remaining_processes'], [100, 101]) + self.assertFalse(observed['payload_cleanup_verified']) + + def test_excludes_unrelated_metadata_and_foreign_symlinks(self): + with tempfile.TemporaryDirectory() as directory: + path = Path(directory) / 'receipt.json' + value = receipt() + value['environment'] = {'ambient': 'excluded'} + value['resource_events']['unrelated'] = {'ambient': 'excluded'} + path.write_text(json.dumps(value)) + observed = read_observation(path, 'own-unit') + self.assertNotIn('environment', observed) + self.assertNotIn('unrelated', observed['resource_events']) + link = Path(directory) / 'linked.json' + link.symlink_to(path) + self.assertIsNone(read_observation(link, 'own-unit')) + self.assertEqual(json.loads(path.read_text()), value) + + +if __name__ == '__main__': + unittest.main() diff --git a/experiments/analysis-efficiency/unknown-pagination.md b/experiments/analysis-efficiency/unknown-pagination.md new file mode 100644 index 000000000..da84f4450 --- /dev/null +++ b/experiments/analysis-efficiency/unknown-pagination.md @@ -0,0 +1,60 @@ +# Selected unknown retrieval + +`list_unknowns` now accepts optional paging. Omitted limits still return all +matching heads. Selection happens before payload cloning in the ledger owner; +MCP returns complete selected records and the total matching count. + +## Bounded workflow comparison + +The task is to retrieve the first ten complete current unknown heads, in stable +ID order, from a session containing 200 heads. The complete-list workflow reads +all heads and selects ten locally. The selected-page workflow requests +`{"offset":0,"limit":10}`. Both use one real SDK MCP call through +`Client`/`InMemoryTransport`, with the same imported session and no provider. +All six executions returned identical selected records and the expected total. + +These are two workflows on the candidate implementation, **not** a historical +before/after binary comparison. The candidate was built from `f09bb8a99` plus +the paging changes. Runtime file-table SHA-256 for the preserved complete-list +copy: `06a457dac90912dceba88f945573897372701f6c6b2e0934d7028023b4646648`. +Node 24.18.0, locked MCP SDK 2.3.1, tokenx 1.3.0, macOS arm64. + +Flameox 0.2.9 ran three randomized paired blocks, seed 731, with a 30-second +and 1-GiB limit per execution. Each fresh process performed a first read and +five identical warm reads. The semantic oracle checked the selected answer +SHA-256, `c18d718a71323eb53712040b4b09ffebfc3497000d1ff8f58d57665638077310`. +Every execution and oracle passed. + +| Measurement | Complete list | Selected page | +| ----------------------------------------- | ------------: | ------------: | +| Calls / errors per task | 1 / 0 | 1 / 0 | +| Serialized response bytes | 646,855 | 32,603 | +| Estimated request tokens | 12 | 21 | +| Estimated response tokens | 151,097 | 7,647 | +| Estimated full catalog tokens | 764,512 | 764,512 | +| Median first-read elapsed milliseconds | 1,084.05 | 1,082.65 | +| Median warm-read elapsed milliseconds | 3.943 | 0.426 | +| Median first-read CPU milliseconds | 1,333.23 | 1,328.47 | +| Median warm-read CPU milliseconds | 5.012 | 0.591 | +| Median whole-process elapsed milliseconds | 1,752.40 | 1,664.42 | +| Median peak process-family MiB | 598.59 | 554.09 | + +Read timings include the MCP call and answer validation. First-read timings +exclude startup, imports, session preparation, handshake and catalog discovery; +the whole-process elapsed measurement includes those, all six reads, token +estimation and cleanup. Whole-process CPU was not measured. Peak RSS includes +preparation and imports; this workload has no child processes. Host caches were +not flushed. Three pairs and fifteen warm reads per workflow describe this +fixture only; they do not establish broad speed or memory improvements. + +Token counts estimate serialized request, response and catalog JSON, including +both MCP response representations. They are not measured model tokens. Host +schema injection, prompts, reasoning, retries and actual agent behavior are +unmeasured. The full catalog cost is unchanged between these workflows and can +dominate a first task. Smaller selected delivery does not remove that cost. + +Native Flameox evidence was preserved locally as +`14ea4c0ef6595a1b89645299d4e184a582d5e975f7916294d68c1f1b312608d0`, +analysis `f66e125179623591ce00b1ccf0d917c2e90512de55db1061269c042d65e1125d`. +An earlier 512-MiB capture exceeded its memory limit and is excluded from these +measurements. No production provider or model trial was run. diff --git a/experiments/analysis-efficiency/verify-evm-lifecycle.mjs b/experiments/analysis-efficiency/verify-evm-lifecycle.mjs new file mode 100644 index 000000000..0a16f78d2 --- /dev/null +++ b/experiments/analysis-efficiency/verify-evm-lifecycle.mjs @@ -0,0 +1,504 @@ +import assert from "node:assert/strict"; +import { createHash } from "node:crypto"; +import { execFile } from "node:child_process"; +import { createReadStream } from "node:fs"; +import { + access, + chmod, + lstat, + mkdir, + readFile, + readdir, + rm, + writeFile, +} from "node:fs/promises"; +import { isAbsolute, join } from "node:path"; +import { setTimeout as delay } from "node:timers/promises"; +import { pathToFileURL } from "node:url"; +import { parseArgs, promisify } from "node:util"; +import { z } from "zod"; +import { Client } from "@modelcontextprotocol/client"; +import { StdioClientTransport } from "@modelcontextprotocol/client/stdio"; + +const { values } = parseArgs({ + options: { + "runtime-root": { type: "string" }, + revision: { type: "string" }, + path: { type: "string" }, + "peer-path": { type: "string" }, + providers: { type: "string" }, + output: { type: "string" }, + }, +}); +for (const key of ["runtime-root", "path", "peer-path", "providers", "output"]) + assert.ok(isAbsolute(values[key] ?? ""), "Supply --" + key + " ABS"); +assert.match(values.revision ?? "", /^[a-f0-9]{40}$/u); +assert.equal(process.platform, "linux"); +assert.equal(process.arch, "x64"); +assert.notEqual( + process.getuid(), + 0, + "Permission faults require a non-root user", +); +const runtime = values["runtime-root"], + lab = values.output; +const providers = z + .record(z.string(), z.string()) + .parse(JSON.parse(await readFile(values.providers, "utf8"))); +const sha = (bytes) => createHash("sha256").update(bytes).digest("hex"); +const fileSha = async (path) => { + const hash = createHash("sha256"); + for await (const part of createReadStream(path)) hash.update(part); + return hash.digest("hex"); +}; +const sourceBefore = await fileSha(new URL(import.meta.url)); +const targetBefore = await fileSha(values.path); +const peerBefore = await fileSha(values["peer-path"]); +const corpus = JSON.parse( + await readFile(new URL("./corpus.json", import.meta.url)), +); +assert.ok(corpus.artifacts.some((x) => x.sha256 === targetBefore)); +assert.equal( + corpus.artifacts.find((x) => x.id === "sqlite.wasm").sha256, + peerBefore, +); +const load = (path) => import(pathToFileURL(join(runtime, "dist", path))); +const { toolContract } = await load("contracts/toolContracts.js"); +const { analysisErrorProjectionSchema } = await load( + "contracts/errorSchemas.js", +); +const { parseEvidence } = await load("domain/evidence.js"); +const { evmoleInterfaceReplySchema } = await load( + "evm/EvmoleInterfaceAdapter.js", +); +const { + observeOwnedProcessLineage, + observeProcessStartIdentity, + systemProcessOwnershipHost: host, +} = await load("process/ProcessOwnershipObservation.js"); +const { verifyNoTokenOwnedProcesses } = await load( + "process/ProcessOwnership.js", +); +const { createVerifierRun, completeVerifierRun } = await import( + pathToFileURL(join(runtime, "scripts/lib/verifier-run.mjs")) +); +const run = createVerifierRun(); +await mkdir(lab, { mode: 0o700 }); +const runtimeFiles = []; +const fingerprint = async (directory) => { + for (const entry of await readdir(directory, { withFileTypes: true })) { + const path = join(directory, entry.name); + if (entry.isDirectory()) await fingerprint(path); + else if (entry.isFile()) + runtimeFiles.push({ + path: path.slice(runtime.length + 1), + sha256: await fileSha(path), + }); + else throw new Error("Runtime fingerprint must not follow symlinks"); + } +}; +await fingerprint(join(runtime, "dist")); +await fingerprint(join(runtime, "bridge")); +runtimeFiles.sort((a, b) => (a.path < b.path ? -1 : a.path > b.path ? 1 : 0)); +await writeFile(join(lab, "runtime-files.json"), JSON.stringify(runtimeFiles), { + flag: "wx", + mode: 0o600, +}); +const work = join(lab, "temporary"); +await mkdir(work, { mode: 0o700 }); +const wrapper = join(lab, "gated-prlimit.mjs"); +// Only gate command completion AFTER unchanged EVMole has produced its reply. +// This does not measure interruption inside its synchronous WASM computation. +await writeFile( + wrapper, + `#!${process.execPath} +import { spawn } from "node:child_process"; +import { access, appendFile, readFile, rename, writeFile } from "node:fs/promises"; +import { join } from "node:path"; +import { setTimeout as delay } from "node:timers/promises"; +const gate = process.env.REA_VERIFY_EVM_GATE; +await appendFile(join(gate, "launches.log"), process.cwd() + "\\n", { mode: 0o600 }); +const child = spawn("/usr/bin/prlimit", process.argv.slice(2), { stdio: "inherit" }); +const code = await new Promise((resolve, reject) => { + child.once("error", reject); + child.once("exit", (code, signal) => signal ? reject(new Error(signal)) : resolve(code)); +}); +if (code !== 0) process.exit(code ?? 1); +if (await readFile(join(gate, "mode"), "utf8") === "hold") { + await writeFile(join(gate, "ready.pending.json"), JSON.stringify({ + pid: process.pid, parent_pid: process.ppid, run_id: process.env.REA_PROCESS_RUN_ID, + root: process.cwd(), worker_exit: code, + }), { flag: "wx", mode: 0o600 }); + await rename(join(gate, "ready.pending.json"), join(gate, "ready.json")); + const end = Date.now() + 15000; + for (;;) { + try { await access(join(gate, "release")); break; } + catch (error) { if (error.code !== "ENOENT") throw error; } + if (Date.now() >= end) throw new Error("Verification gate exceeded 15 seconds"); + await delay(25); + } +} +`, + { flag: "wx", mode: 0o700 }, +); +const markerSchema = z.strictObject({ + pid: z.number().int().positive(), + parent_pid: z.number().int().positive(), + run_id: z.string().regex(/^rea-evm-interface-[a-f0-9-]+$/u), + root: z.string(), + worker_exit: z.literal(0), +}); +const roots = async () => + (await readdir(work)).filter((x) => x.startsWith("rea-evm-interface-")); +const gateMode = async (mode) => { + await rm(join(lab, "ready.json"), { force: true }); + await rm(join(lab, "ready.pending.json"), { force: true }); + await rm(join(lab, "release"), { force: true }); + await writeFile(join(lab, "mode"), mode, { mode: 0o600 }); +}; +await gateMode("off"); +const client = new Client({ name: "rea-real-evm-lifecycle", version: "1" }); +const environment = { + ...process.env, + ...providers, + TMPDIR: work, + REA_EVM_PRLIMIT_COMMAND: wrapper, + REA_VERIFY_EVM_GATE: lab, +}; +const transport = new StdioClientTransport({ + command: process.execPath, + args: [join(runtime, "scripts/rea.mjs"), "mcp"], + env: environment, + stderr: "pipe", +}); +const rows = []; +let fault; +const textValue = (reply) => + JSON.parse(reply.content.find((x) => x.type === "text").text); +const errorValue = (reply) => { + assert.equal(reply.isError, true); + return analysisErrorProjectionSchema.parse(textValue(reply).error); +}; +const evidenceValue = (reply, name) => { + assert.notEqual(reply.isError, true, JSON.stringify(reply)); + return parseEvidence( + toolContract(name).outputSchema.parse(reply.structuredContent), + ); +}; +const request = (path = values.path, signal) => + client.callTool( + { + name: "inspect_evm_interface", + arguments: { path, encoding: "hex" }, + }, + { timeout: 45000, ...(signal === undefined ? {} : { signal }) }, + ); +const waitFor = async (probe, message, milliseconds = 10000) => { + const end = Date.now() + milliseconds; + while (Date.now() < end) { + const value = await probe(); + if (value) return value; + await delay(50); + } + throw new Error(message); +}; +const observeGate = async (expectedSuccess) => { + const marker = await waitFor(async () => { + try { + return markerSchema.parse( + JSON.parse(await readFile(join(lab, "ready.json"))), + ); + } catch (error) { + if (error.code === "ENOENT") return; + throw error; + } + }, "No completed real worker at the pending command gate"); + assert.equal(marker.root.startsWith(work + "/rea-evm-interface-"), true); + const rootStat = await lstat(marker.root); + assert.equal(rootStat.isDirectory(), true); + assert.equal(rootStat.uid, process.getuid()); + const processRow = (await host.listProcesses()).find( + (x) => x.pid === marker.pid, + ); + assert.ok(processRow, "Gated owned launcher already exited"); + const ownership = { + runId: marker.run_id, + leaderPid: marker.pid, + processGroupId: processRow.processGroupId, + expectedParentPid: marker.parent_pid, + }; + const lineage = await observeOwnedProcessLineage(ownership); + assert.equal(lineage.status, "verified", JSON.stringify(lineage)); + const identity = await observeProcessStartIdentity( + marker.pid, + undefined, + marker.run_id, + ); + assert.equal(identity?.state, "readable"); + const rawBytes = await readFile(join(marker.root, "reply.json")); + const raw = JSON.parse(rawBytes); + assert.equal(raw.ok, expectedSuccess); + if (raw.ok) { + assert.equal(raw.version, "0.9.3"); + evmoleInterfaceReplySchema.parse(raw.raw); + } else assert.equal(raw.reason, "format"); + return { + marker, + ownership, + lineage, + identity, + root_mode: rootStat.mode & 0o777, + worker_reply_sha256: sha(rawBytes), + worker_reply: raw, + }; +}; +const confirmCleanup = async (launch, baseline, absentRoot) => + waitFor(async () => { + const result = await verifyNoTokenOwnedProcesses( + launch.marker.run_id, + undefined, + baseline, + { + leaderPid: launch.ownership.leaderPid, + processGroupId: launch.ownership.processGroupId, + }, + ); + if (!result.cleaned) return; + if (absentRoot && (await roots()).length !== 0) return; + return result; + }, "Owned EVM cleanup not verified"); +const peer = async () => + evidenceValue( + await client.callTool( + { + name: "inspect_wasm_artifact", + arguments: { + path: values["peer-path"], + glue_paths: [], + candidate_paths: [], + detail: "summary", + }, + }, + { timeout: 45000 }, + ), + "inspect_wasm_artifact", + ); +const restore = async () => { + if (fault === undefined) return; + await chmod(fault.path, fault.mode); + fault = undefined; +}; +const verifyWithCleanup = async (verify, cleanups) => { + const failures = []; + let value; + try { + value = await verify(); + } catch (error) { + failures.push(error); + } + for (const cleanup of cleanups) { + try { + await cleanup(); + } catch (error) { + failures.push(error); + } + } + if (failures.length > 0) + throw new AggregateError(failures, "Verification or cleanup failed"); + return value; +}; +const verifyLateCancellation = async (original) => { + const baseline = await host.captureBaseline(); + await gateMode("hold"); + const controller = new AbortController(); + let settled = false; + const pending = request(values.path, controller.signal).then( + (reply) => { + settled = true; + return { reply }; + }, + (error) => { + settled = true; + return { + error: { name: error.name, code: error.code, message: error.message }, + }; + }, + ); + let launch; + try { + launch = await observeGate(true); + assert.deepEqual(launch.worker_reply.raw, original.raw_result); + assert.deepEqual(launch.worker_reply.bytecode, { + sha256: original.normalized_result.bytecode.sha256, + bytes: original.normalized_result.bytecode.bytes, + hex: original.normalized_result.bytecode.hex, + }); + assert.equal(settled, false, "Request completed before SDK cancellation"); + } finally { + controller.abort( + new Error("Late real EVM worker cancellation verification"), + ); + await pending; + } + const canceled = await pending; + assert.equal(canceled.error?.code, "REQUEST_TIMEOUT"); + const cleanup = await confirmCleanup(launch, baseline, true); + await assert.rejects(access(launch.marker.root), { code: "ENOENT" }); + await gateMode("off"); + const recovered = evidenceValue(await request(), "inspect_evm_interface"); + assert.deepEqual(recovered.normalized_result, original.normalized_result); + return { + scenario: "late-cancellation", + launch, + canceled, + cleanup, + recovery_evidence_id: recovered.evidence_id, + }; +}; +await verifyWithCleanup(async () => { + await client.connect(transport); + const catalog = await client.listTools(); + assert.equal( + catalog.tools.filter((x) => x.name === "inspect_evm_interface").length, + 1, + ); + const original = evidenceValue(await request(), "inspect_evm_interface"); + assert.equal(original.subject.digest.sha256, targetBefore); + assert.equal(original.provider.version, "evmole@0.9.3"); + const cli = await promisify(execFile)( + process.execPath, + [ + join(runtime, "scripts/rea.mjs"), + "inspect-evm-interface", + values.path, + "hex", + "--json", + ], + { env: environment, timeout: 45000, maxBuffer: 32 * 1024 * 1024 }, + ); + const cliEvidence = parseEvidence(JSON.parse(cli.stdout)); + assert.deepEqual(cliEvidence.normalized_result, original.normalized_result); + assert.deepEqual(cliEvidence.parameters, original.parameters); + assert.deepEqual(cliEvidence.subject, original.subject); + await writeFile(join(lab, "cli.json"), cli.stdout, { + flag: "wx", + mode: 0o600, + }); + await writeFile(join(lab, "original.json"), JSON.stringify(original), { + flag: "wx", + mode: 0o600, + }); + rows.push(await verifyLateCancellation(original)); + + const malformed = join(lab, "odd-nibble.hex"); + await writeFile(malformed, "0x0\n", { flag: "wx", mode: 0o600 }); + for (const scenario of ["success", "format-failure"]) { + const baseline = await host.captureBaseline(); + await gateMode("hold"); + const pending = request(scenario === "success" ? values.path : malformed); + let launch; + await verifyWithCleanup(async () => { + launch = await observeGate(scenario === "success"); + fault = { path: launch.marker.root, mode: launch.root_mode }; + await chmod(fault.path, 0o500); + await writeFile(join(lab, "release"), "release", { + flag: "wx", + mode: 0o600, + }); + const failed = errorValue(await pending); + assert.equal(failed.code, "cleanup_incomplete"); + assert.deepEqual(failed.details.resources, [launch.marker.root]); + assert.match(failed.details.diagnostics.reason, /EACCES/u); + const previous = failed.details.diagnostics.previous_error; + if (scenario === "success") assert.equal(previous, null); + else assert.equal(previous.category, "invalid_input"); + const cleanup = await confirmCleanup(launch, baseline, false); + assert.deepEqual(await roots(), [ + launch.marker.root.slice(work.length + 1), + ]); + await gateMode("off"); + const launchLogBefore = await readFile(join(lab, "launches.log")); + const retryBeforeRepair = errorValue(await request()); + assert.equal(retryBeforeRepair.code, "cleanup_incomplete"); + assert.deepEqual(retryBeforeRepair.details.resources, [ + launch.marker.root, + ]); + assert.deepEqual( + await readFile(join(lab, "launches.log")), + launchLogBefore, + ); + const peerEvidence = await peer(); + assert.equal(peerEvidence.subject.digest.sha256, peerBefore); + await restore(); + const recovered = evidenceValue(await request(), "inspect_evm_interface"); + assert.deepEqual(recovered.normalized_result, original.normalized_result); + await assert.rejects(access(launch.marker.root), { code: "ENOENT" }); + assert.deepEqual(await roots(), []); + rows.push({ + scenario: "cleanup-retry-after-" + scenario, + launch, + failed, + cleanup, + retry_before_permission_repair: retryBeforeRepair, + launch_log_sha256_before_retry: sha(launchLogBefore), + peer_evidence_id: peerEvidence.evidence_id, + recovery_evidence_id: recovered.evidence_id, + }); + }, [ + restore, + () => writeFile(join(lab, "release"), "release", { mode: 0o600 }), + () => pending, + ]); + } +}, [ + restore, + () => writeFile(join(lab, "release"), "release", { mode: 0o600 }), + () => client.close(), + () => transport.close(), +]); +assert.deepEqual(await roots(), []); +const finalRun = await completeVerifierRun(run); +assert.equal( + finalRun.process_lineage.status, + "verified", + JSON.stringify(finalRun), +); +assert.deepEqual(finalRun.process_lineage.descendants, []); +assert.equal(await fileSha(values.path), targetBefore); +assert.equal(await fileSha(values["peer-path"]), peerBefore); +assert.equal(await fileSha(new URL(import.meta.url)), sourceBefore); +const runtimeTable = JSON.stringify(runtimeFiles); +runtimeFiles.length = 0; +await fingerprint(join(runtime, "dist")); +await fingerprint(join(runtime, "bridge")); +runtimeFiles.sort((a, b) => (a.path < b.path ? -1 : a.path > b.path ? 1 : 0)); +assert.equal( + JSON.stringify(runtimeFiles), + runtimeTable, + "Runtime changed during verification", +); +await writeFile( + join(lab, "summary.json"), + JSON.stringify({ + revision: values.revision, + verifier_run: finalRun, + verifier_sha256: sourceBefore, + runtime_file_table_sha256: sha(JSON.stringify(runtimeFiles)), + cli_default_parity: true, + fixture_sha256: await fileSha(wrapper), + artifact: { path: values.path, sha256: targetBefore }, + peer: { path: values["peer-path"], sha256: peerBefore }, + scope: + "Linux x64; actual EVMole reply before fixture-held command completion; no mid-WASM interruption claim", + rows, + source_bytes_unchanged: true, + target_bytes_unchanged: true, + peer_bytes_unchanged: true, + owned_runtime_roots_removed: true, + runtime_files_unchanged: true, + }), + { flag: "wx", mode: 0o600 }, +); +console.log( + JSON.stringify({ pass: true, scenarios: rows.map((x) => x.scenario) }), +); diff --git a/experiments/analysis-efficiency/verify-evm-retention.mjs b/experiments/analysis-efficiency/verify-evm-retention.mjs new file mode 100644 index 000000000..e5f7de74c --- /dev/null +++ b/experiments/analysis-efficiency/verify-evm-retention.mjs @@ -0,0 +1,167 @@ +import assert from "node:assert/strict"; +import { execFile } from "node:child_process"; +import { createHash } from "node:crypto"; +import { mkdir, readFile, writeFile } from "node:fs/promises"; +import { isAbsolute, resolve } from "node:path"; +import { parseArgs, promisify } from "node:util"; +import { Client } from "@modelcontextprotocol/client"; +import { StdioClientTransport } from "@modelcontextprotocol/client/stdio"; + +const { values } = parseArgs({ + options: { + "runtime-root": { type: "string" }, + revision: { type: "string" }, + bundle: { type: "string" }, + output: { type: "string" }, + }, +}); +for (const key of ["runtime-root", "bundle", "output"]) + assert.ok(values[key] && isAbsolute(values[key]), `Supply --${key} ABS`); +assert.ok(values.revision); +await mkdir(values.output, { mode: 0o700 }); +const sha = (bytes) => createHash("sha256").update(bytes).digest("hex"); +const bytes = await readFile(values.bundle); +const original = JSON.parse(bytes.toString("utf8")); +const parents = original.records.filter( + (record) => record.operation === "inspect_evm_interface", +); +assert.ok(parents.length > 0, "Select a bundle containing old EVM Evidence"); +const entrypoint = resolve(values["runtime-root"], "scripts/rea.mjs"); +const environment = { + ...process.env, + REA_LOG_LEVEL: "silent", + NODE_OPTIONS: "--max-old-space-size=512", + // If a view accidentally starts analysis, its required limiter is unavailable. + REA_EVM_PRLIMIT_COMMAND: resolve(values.output, "absent-prlimit"), +}; +const client = new Client({ name: "rea-old-evm-retention", version: "1" }); +const transport = new StdioClientTransport({ + command: process.execPath, + args: [entrypoint, "mcp"], + env: environment, + stderr: "pipe", +}); +const definitions = new Map(); +const calls = []; +const call = async (name, args) => { + const definition = definitions.get(name); + assert.ok(definition, `Missing named contract ${name}`); + const reply = await client.callTool( + { name, arguments: args }, + { toolDefinition: definition, timeout: 60_000 }, + ); + await writeFile( + resolve(values.output, `call-${calls.length + 1}.json`), + JSON.stringify(reply), + { flag: "wx", mode: 0o600 }, + ); + assert.notEqual(reply.isError, true, JSON.stringify(reply)); + const text = JSON.parse(reply.content.find((x) => x.type === "text").text); + assert.deepEqual(reply.structuredContent, text); + calls.push({ name, arguments: args, evidence_id: text.evidence_id ?? null }); + return text; +}; +const checked = []; +try { + await client.connect(transport); + transport.stderr?.resume(); + for (const definition of (await client.listTools()).tools) + definitions.set(definition.name, definition); + await call("import_evidence_bundle", { path: values.bundle }); + const imported = (await call("get_evidence_bundle", {})).result.records; + for (const parent of parents) { + assert.deepEqual( + imported.find((record) => record.evidence_id === parent.evidence_id), + parent, + ); + const source = { + kind: "retained-evidence", + evidence_id: parent.evidence_id, + }; + const view = await call("inspect_analysis_view", { + source, + view: { kind: "summary" }, + }); + const { hex, ...bytecode } = parent.normalized_result.bytecode; + const { stdout, ...diagnostics } = parent.normalized_result.diagnostics; + assert.deepEqual(view.normalized_result.summary, { + ...parent.normalized_result, + bytecode, + diagnostics: { ...diagnostics, stdout_code_units: stdout.length }, + }); + assert.equal(view.normalized_result.parent_evidence_id, parent.evidence_id); + assert.notEqual(view.evidence_id, parent.evidence_id); + assert.deepEqual(view.evidence_links, [parent.evidence_id]); + for (const [facet, expected] of [ + ["functions", parent.normalized_result.functions.slice(0, 2)], + ["bytecode_hex", { text: hex.slice(0, 64), unit: "utf16-code-units" }], + ]) { + const page = await call("inspect_analysis_view", { + source, + view: { + kind: "evm", + facet, + offset: 0, + limit: facet === "functions" ? 2 : 64, + }, + }); + assert.deepEqual(page.normalized_result.item, expected); + assert.equal( + page.normalized_result.parent_evidence_id, + parent.evidence_id, + ); + assert.deepEqual(page.evidence_links, [parent.evidence_id]); + } + const inlinePath = resolve(values.output, `inline-${checked.length}.json`); + await writeFile( + inlinePath, + JSON.stringify({ + source: { kind: "inline", evidence: parent }, + view: { kind: "summary" }, + }), + { flag: "wx", mode: 0o600 }, + ); + const result = await promisify(execFile)( + process.execPath, + [entrypoint, "inspect-analysis-view", inlinePath, "--json"], + { env: environment, timeout: 60_000, maxBuffer: 16 * 1024 * 1024 }, + ); + const inline = JSON.parse(result.stdout); + assert.equal( + inline.normalized_result.parent_evidence_id, + parent.evidence_id, + ); + assert.deepEqual( + inline.normalized_result.summary, + view.normalized_result.summary, + ); + checked.push(parent.evidence_id); + } + const path = resolve(values.output, "exported.json"); + await call("export_evidence_bundle", { path }); + const exported = JSON.parse(await readFile(path, "utf8")); + for (const record of original.records) + assert.deepEqual( + exported.records.find((x) => x.evidence_id === record.evidence_id), + record, + ); + assert.deepEqual(await readFile(values.bundle), bytes); +} finally { + await client.close(); +} +const report = { + runtime_revision: values.revision, + original_bundle_sha256: sha(bytes), + checked_original_evidence_ids: checked, + original_records_and_source_bytes_unchanged: true, + exact_summaries_pages_and_cli_inline_pass: true, + calls, + scope: + "Old EVM Evidence through actual public SDK/CLI with an unavailable analysis limiter; original inferred facts, explicit unknowns, parent identities and export records preserved. Caller supplies the frozen runtime revision; this is migration verification, not a performance pair.", +}; +await writeFile( + resolve(values.output, "summary.json"), + JSON.stringify(report, null, 2), + { flag: "wx", mode: 0o600 }, +); +process.stdout.write(JSON.stringify(report) + "\n"); diff --git a/experiments/analysis-efficiency/verify-evm-template.mjs b/experiments/analysis-efficiency/verify-evm-template.mjs new file mode 100644 index 000000000..d119d14b4 --- /dev/null +++ b/experiments/analysis-efficiency/verify-evm-template.mjs @@ -0,0 +1,95 @@ +import assert from "node:assert/strict"; +import { createHash } from "node:crypto"; +import { readFile, writeFile } from "node:fs/promises"; +import { isAbsolute } from "node:path"; +import { pathToFileURL } from "node:url"; +import { parseArgs } from "node:util"; + +const { values } = parseArgs({ + options: Object.fromEntries( + ["artifact", "artifact-json", "evidence", "keccak-module", "output"].map( + (key) => [key, { type: "string" }], + ), + ), +}); +assert.ok(values.artifact, "Select the exact corpus artifact ID"); +for (const key of ["artifact-json", "evidence", "keccak-module", "output"]) + assert.ok(isAbsolute(values[key] ?? ""), `${key} requires an absolute path`); +const corpus = JSON.parse( + await readFile(new URL("./corpus.json", import.meta.url), "utf8"), +); +const selected = corpus.artifacts.find(({ id }) => id === values.artifact); +assert.ok(selected?.provenance.compiler_artifact_sha256); +const source = await readFile(values["artifact-json"]); +const hash = (bytes) => createHash("sha256").update(bytes).digest("hex"); +assert.equal(hash(source), selected.provenance.compiler_artifact_sha256); +assert.equal(source.length, selected.provenance.compiler_artifact_bytes); +const artifact = JSON.parse(source); +const carrier = Buffer.from(artifact.deployedBytecode + "\n"); +assert.equal(hash(carrier), selected.sha256); +assert.equal(carrier.length, selected.bytes); +const { keccak_256 } = (await import(pathToFileURL(values["keccak-module"]))) + .default; +assert.equal( + typeof keccak_256, + "function", + "Supply js-sha3's Ethereum Keccak implementation", +); +const canonicalType = (input) => + input.type.startsWith("tuple") + ? `(${input.components.map(canonicalType).join(",")})${input.type.slice(5)}` + : input.type; +const selectors = artifact.abi + .filter((entry) => entry.type === "function") + .map((entry) => { + const signature = `${entry.name}(${entry.inputs.map(canonicalType).join(",")})`; + return { signature, selector: `0x${keccak_256(signature).slice(0, 8)}` }; + }); +const reply = JSON.parse(await readFile(values.evidence, "utf8")); +const evidence = reply.structuredContent ?? reply; +assert.equal(evidence.operation, "inspect_evm_interface"); +assert.equal(evidence.subject.digest.sha256, selected.sha256); +assert.equal(evidence.normalized_result.artifact.sha256, selected.sha256); +assert.equal( + evidence.normalized_result.bytecode.sha256, + selected.decoded_sha256, +); +assert.equal( + hash(Buffer.from(evidence.normalized_result.bytecode.hex, "hex")), + selected.decoded_sha256, +); +assert.equal(evidence.normalized_result.bytecode.bytes, selected.decoded_bytes); +assert.equal(evidence.normalized_result.evidence_kind, "inferred"); +assert.equal(evidence.normalized_result.discovery_completeness, "unknown"); +const observed = evidence.normalized_result.functions + .filter((entry) => entry.dispatch === "abi") + .map((entry) => entry.selector); +assert.deepEqual( + observed.toSorted(), + selectors.map((entry) => entry.selector).toSorted(), +); +await writeFile( + values.output, + JSON.stringify( + { + artifact: selected.id, + compiler_artifact_sha256: hash(source), + keccak_module_sha256: hash(await readFile(values["keccak-module"])), + evidence_id: evidence.evidence_id, + selector_set_matches_published_abi: true, + selectors, + scope: + "Independent published ABI-derived selector oracle; no deployed authenticity, inferred argument/mutability equivalence or runtime verification is established.", + }, + null, + 2, + ) + "\n", + { flag: "wx", mode: 0o600 }, +); +process.stdout.write( + JSON.stringify({ + artifact: selected.id, + selector_count: selectors.length, + selector_set_matches_published_abi: true, + }) + "\n", +); diff --git a/experiments/analysis-efficiency/verify-migration.mjs b/experiments/analysis-efficiency/verify-migration.mjs new file mode 100644 index 000000000..c5f0244ae --- /dev/null +++ b/experiments/analysis-efficiency/verify-migration.mjs @@ -0,0 +1,163 @@ +import assert from "node:assert/strict"; +import { createHash } from "node:crypto"; +import { readFile, writeFile, mkdir } from "node:fs/promises"; +import { isAbsolute, resolve } from "node:path"; +import { parseArgs } from "node:util"; +import { Client } from "@modelcontextprotocol/client"; +import { StdioClientTransport } from "@modelcontextprotocol/client/stdio"; + +const { values } = parseArgs({ + options: { + "runtime-root": { type: "string" }, + revision: { type: "string" }, + bundle: { type: "string" }, + "inspection-reply": { type: "string" }, + output: { type: "string" }, + }, +}); +for (const key of ["runtime-root", "bundle", "inspection-reply", "output"]) + assert.ok(values[key] && isAbsolute(values[key]), `Supply --${key} ABS`); +assert.ok(values.revision); +await mkdir(values.output, { mode: 0o700 }); +const sha = (value) => createHash("sha256").update(value).digest("hex"); +const bundleBytes = await readFile(values.bundle); +const oldBundle = JSON.parse(bundleBytes.toString("utf8")); +const oldWasm = oldBundle.records.find( + (record) => record.operation === "inspect_wasm_artifact", +); +assert.ok(oldWasm); +const inspectionBytes = await readFile(values["inspection-reply"]); +const oldInspection = JSON.parse( + inspectionBytes.toString("utf8"), +).structuredContent; +assert.equal(oldInspection.operation, "inspect_artifact"); +const definitions = new Map(); +const client = new Client({ + name: "rea-real-evidence-migration", + version: "1", +}); +// An absent explicitly selected WABT directory makes accidental re-analysis +// fail. Imported/portable views must operate on existing Evidence alone. +const transport = new StdioClientTransport({ + command: process.execPath, + args: [resolve(values["runtime-root"], "scripts/rea.mjs"), "mcp"], + env: { + ...process.env, + REA_LOG_LEVEL: "silent", + NODE_OPTIONS: "--max-old-space-size=512", + REA_WABT_BIN_DIRECTORY: resolve(values.output, "absent-wabt"), + }, + stderr: "pipe", +}); +const calls = []; +const call = async (name, arguments_) => { + const reply = await client.callTool( + { name, arguments: arguments_ }, + { toolDefinition: definitions.get(name), timeout: 120_000 }, + ); + await writeFile( + resolve(values.output, `call-${calls.length + 1}.json`), + JSON.stringify(reply), + ); + assert.notEqual(reply.isError, true, JSON.stringify(reply)); + const result = reply.structuredContent ?? JSON.parse(reply.content[0].text); + calls.push({ + name, + arguments: + name === "inspect_analysis_view" && arguments_.source.kind === "inline" + ? { + source: { + kind: "inline", + original_evidence_id: arguments_.source.evidence.evidence_id, + }, + view: arguments_.view, + } + : arguments_, + evidence_id: result.evidence_id ?? null, + }); + return result; +}; +let report; +try { + await client.connect(transport); + transport.stderr?.resume(); + for (const definition of (await client.listTools()).tools) + definitions.set(definition.name, definition); + await call("import_evidence_bundle", { path: values.bundle }); + const source = { + kind: "retained-evidence", + evidence_id: oldWasm.evidence_id, + }; + const summary = await call("inspect_analysis_view", { + source, + view: { kind: "summary" }, + }); + const exports = await call("inspect_analysis_view", { + source, + view: { kind: "wasm", facet: "exports", offset: 0, limit: 4 }, + }); + assert.equal( + summary.normalized_result.parent_evidence_id, + oldWasm.evidence_id, + ); + assert.equal(summary.subject.digest.sha256, oldWasm.subject.digest.sha256); + assert.equal( + summary.normalized_result.summary.wat.sha256, + oldWasm.normalized_result.wat.sha256, + ); + assert.deepEqual( + exports.normalized_result.item, + oldWasm.normalized_result.exports.slice(0, 4), + ); + const inventory = await call("inspect_analysis_view", { + source: { kind: "inline", evidence: oldInspection }, + view: { kind: "summary" }, + }); + assert.equal( + inventory.normalized_result.parent_evidence_id, + oldInspection.evidence_id, + ); + const oldAtomic = oldInspection.normalized_result.substeps[0].evidence; + assert.deepEqual( + inventory.normalized_result.summary.manifest, + oldAtomic.normalized_result.manifest, + ); + assert.deepEqual(inventory.normalized_result.summary.inventory_evidence_ids, [ + oldAtomic.evidence_id, + ]); + const exportedPath = resolve(values.output, "exported-after-import.json"); + await call("export_evidence_bundle", { path: exportedPath }); + const exported = JSON.parse(await readFile(exportedPath, "utf8")); + assert.deepEqual( + exported.records.find( + (record) => record.evidence_id === oldWasm.evidence_id, + ), + oldWasm, + ); + assert.equal(sha(await readFile(values.bundle)), sha(bundleBytes)); + assert.equal( + sha(await readFile(values["inspection-reply"])), + sha(inspectionBytes), + ); + report = { + runtime_revision: values.revision, + original_bundle_sha256: sha(bundleBytes), + original_inspection_reply_sha256: sha(inspectionBytes), + source_files_unchanged: true, + imported_wasm_source_evidence_id: oldWasm.evidence_id, + original_wasm_record_preserved_exactly: true, + typed_summary_and_first4_exports_match: true, + portable_old_inspection_and_atomic_inventory_identity_preserved: true, + original_inventory_evidence_id: oldAtomic.evidence_id, + calls, + scope: + "Actual old complete Evidence imported or passed inline to the new runtime; original authentication, IDs, records, source bytes and selected facts preserved. WABT is unavailable and no producer analysis is requested. Existing file import/export is used, not an engine database cache.", + }; +} finally { + await client.close(); +} +await writeFile( + resolve(values.output, "summary.json"), + JSON.stringify(report, null, 2), +); +process.stdout.write(JSON.stringify(report) + "\n"); diff --git a/experiments/analysis-efficiency/verify-preset-lifecycle.mjs b/experiments/analysis-efficiency/verify-preset-lifecycle.mjs new file mode 100644 index 000000000..8675c8590 --- /dev/null +++ b/experiments/analysis-efficiency/verify-preset-lifecycle.mjs @@ -0,0 +1,395 @@ +import assert from "node:assert/strict"; +import { createHash, randomUUID } from "node:crypto"; +import { + access, + chmod, + lstat, + mkdir, + readFile, + readdir, + writeFile, +} from "node:fs/promises"; +import { dirname, join, isAbsolute } from "node:path"; +import { parseArgs } from "node:util"; +import { createReadStream } from "node:fs"; +import { setTimeout as delay } from "node:timers/promises"; +import { pathToFileURL } from "node:url"; +import { z } from "zod"; +import { Client } from "@modelcontextprotocol/client"; +import { StdioClientTransport } from "@modelcontextprotocol/client/stdio"; +const { values } = parseArgs({ + options: { + "runtime-root": { type: "string" }, + revision: { type: "string" }, + path: { type: "string" }, + providers: { type: "string" }, + output: { type: "string" }, + "disabled-analyzers": { + type: "string", + default: "Decompiler Switch Analysis", + }, + "timeout-ms": { type: "string", default: "900000" }, + }, +}); +for (const key of ["runtime-root", "path", "providers", "output"]) + assert.ok(values[key] && isAbsolute(values[key]), "Supply --" + key + " ABS"); +assert.match(values.revision ?? "", /^[a-f0-9]{40}$/u); +assert.equal(process.platform, "linux"); +assert.notEqual( + process.getuid(), + 0, + "Permission fault injection requires a non-root user", +); +const timeout = Number(values["timeout-ms"]); +assert.ok(Number.isSafeInteger(timeout) && timeout > 0); +const lab = values.output, + runtime = values["runtime-root"]; +const { ghidraDisabledAnalyzersSchema } = await import( + pathToFileURL(runtime + "/dist/config/ghidraDisabledAnalyzers.js") +); +assert.ok( + ghidraDisabledAnalyzersSchema.parse(values["disabled-analyzers"]) !== + undefined, + "Select at least one analyzer to disable", +); +await mkdir(lab, { mode: 0o700 }); +const providerBytes = await readFile(values.providers); +const providers = JSON.parse(providerBytes.toString("utf8")); +assert.ok( + providers !== null && + !Array.isArray(providers) && + typeof providers === "object", +); +assert.ok(Object.values(providers).every((x) => typeof x === "string")); +const verifierSource = await readFile(new URL(import.meta.url)); +const { + observeOwnedProcessLineage, + observeProcessStartIdentity, + systemProcessOwnershipHost: host, +} = await import( + pathToFileURL(runtime + "/dist/process/ProcessOwnershipObservation.js") +); +const { verifyNoTokenOwnedProcesses } = await import( + pathToFileURL(runtime + "/dist/process/ProcessOwnership.js") +); +const target = values.path; +const sha = (x) => createHash("sha256").update(x).digest("hex"); +const fileSha = async (path) => { + const hash = createHash("sha256"); + for await (const part of createReadStream(path)) hash.update(part); + return hash.digest("hex"); +}; +const before = await fileSha(target); +const rows = []; +const roots = async (work) => + (await readdir(work)) + .filter((x) => x.startsWith("rea-ghidra-")) + .map((x) => join(work, x)); +const ownershipSchema = z + .object({ + run_id: z.string().uuid(), + pid: z.number().int().positive(), + process_group_id: z.number().int().positive(), + parent_pid: z.number().int().positive(), + launcher: z.string().min(1), + endpoint_path: z.string().min(1), + ownership_kind: z.literal("posix-process-group"), + }) + .passthrough(); +const manifest = async (root) => + ownershipSchema.parse( + JSON.parse(await readFile(join(root, "ownership.json"), "utf8")), + ); +const verifyWithCleanup = async (verify, cleanups) => { + const failures = []; + let result; + try { + result = await verify(); + } catch (error) { + failures.push(error); + } + for (const cleanup of cleanups) { + try { + await cleanup(); + } catch (error) { + failures.push(error); + } + } + if (failures.length > 0) + throw new AggregateError( + failures, + "Verification or resource cleanup failed", + ); + return result; +}; +const restoreProject = async (project, mode) => { + if (project === undefined || mode === undefined) return; + try { + await chmod(project, mode); + } catch (error) { + if (error.code !== "ENOENT") throw error; + } +}; +const unreadyLaunch = async (work) => { + for (const root of await roots(work)) { + let record; + try { + record = await manifest(root); + } catch (error) { + if (error.code === "ENOENT") continue; + throw error; + } + const lineage = await observeOwnedProcessLineage(owned(record)); + if (lineage.status !== "verified") continue; + const identity = await observeProcessStartIdentity( + record.pid, + undefined, + record.run_id, + ); + if (identity?.state !== "readable") continue; + try { + await access(record.endpoint_path); + } catch (error) { + if (error.code !== "ENOENT") throw error; + return { root, manifest: record, lineage, start_identity: identity }; + } + } +}; +const owned = (m) => ({ + runId: m.run_id, + leaderPid: m.pid, + processGroupId: m.process_group_id, + expectedParentPid: m.parent_pid, + expectedCommand: m.launcher, +}); +const cancelStartup = async ({ client, defs, work, call }) => { + const baseline = await host.captureBaseline(); + const controller = new AbortController(); + const pattern = "rea-lifecycle-" + randomUUID(); + let settled = false; + const pending = client + .callTool( + { name: "search_procedures", arguments: { pattern } }, + { + toolDefinition: defs.get("search_procedures"), + timeout, + signal: controller.signal, + }, + ) + .then( + (reply) => { + settled = true; + return { reply }; + }, + (error) => { + settled = true; + return { + error: { + name: error.name, + message: error.message, + code: error.code, + }, + }; + }, + ); + let launch; + try { + const deadline = Date.now() + 30000; + while (Date.now() < deadline && !settled) { + launch = await unreadyLaunch(work); + if (launch) break; + await delay(50); + } + assert.ok(launch, "No token-verified live JVM before endpoint readiness"); + assert.equal(settled, false); + } finally { + controller.abort(new Error("Preset startup cancellation")); + await pending; + } + const canceled = await pending; + assert.ok(canceled.error, "Pending SDK request did not cancel"); + await writeFile(work + "/cancellation.json", JSON.stringify(canceled), { + flag: "wx", + mode: 0o600, + }); + let cleanup; + const deadline = Date.now() + 30000; + while (Date.now() < deadline) { + cleanup = await verifyNoTokenOwnedProcesses( + launch.manifest.run_id, + undefined, + baseline, + { + leaderPid: launch.manifest.pid, + processGroupId: launch.manifest.process_group_id, + }, + ); + const liveRoots = await roots(work); + if (cleanup.cleaned && liveRoots.length === 0) break; + await delay(100); + } + assert.equal(cleanup.cleaned, true, JSON.stringify(cleanup)); + assert.deepEqual(await roots(work), []); + await assert.rejects(access(dirname(launch.manifest.endpoint_path)), { + code: "ENOENT", + }); + const afterCancel = (await call("binary_session")).result; + assert.equal(afterCancel.open, true); + assert.notEqual(afterCancel.analysis_activity.status, "busy"); + return { launch, cleanup, afterCancel, pattern }; +}; +for (const profile of ["default", "disabled"]) { + const work = lab + "/" + profile; + await mkdir(work, { mode: 0o700 }); + const client = new Client({ + name: "rea-real-preset-lifecycle", + version: "1", + }); + const transport = new StdioClientTransport({ + command: process.execPath, + args: [runtime + "/scripts/rea.mjs", "mcp"], + env: { + ...process.env, + ...providers, + NODE_OPTIONS: "--max-old-space-size=512", + TMPDIR: work, + REA_GHIDRA_DISABLED_ANALYZERS: + profile === "default" ? "" : values["disabled-analyzers"], + }, + stderr: "pipe", + }); + const defs = new Map(); + let count = 0; + const call = async (name, args = {}, error = false) => { + const definition = defs.get(name); + assert.ok(definition, "Missing named contract " + name); + const reply = await client.callTool( + { name, arguments: args }, + { toolDefinition: definition, timeout }, + ); + await writeFile( + work + "/call-" + ++count + ".json", + JSON.stringify(reply), + { flag: "wx", mode: 0o600 }, + ); + const value = + reply.structuredContent ?? + JSON.parse(reply.content.find((x) => x.type === "text").text); + assert.equal(reply.isError === true, error, JSON.stringify(value)); + return value; + }; + let project, mode; + const row = await verifyWithCleanup(async () => { + await client.connect(transport); + transport.stderr?.resume(); + for (const t of (await client.listTools()).tools) defs.set(t.name, t); + await call("open_binary", { path: target, provider_id: "ghidra" }); + const selectedProfile = (await call("binary_session")).result + .analysis_provider_binding.analysis_profile; + const { launch, cleanup, afterCancel, pattern } = await cancelStartup({ + client, + defs, + work, + call, + }); + const recovered = await call("search_procedures", { pattern }); + assert.deepEqual(recovered.normalized_result, []); + const activeRoots = await roots(work); + assert.equal(activeRoots.length, 1); + const active = await manifest(activeRoots[0]); + const activeIdentity = await observeProcessStartIdentity( + active.pid, + undefined, + active.run_id, + ); + assert.equal(activeIdentity?.state, "readable"); + assert.notEqual(activeIdentity.identity, launch.start_identity.identity); + const activeLineage = await observeOwnedProcessLineage(owned(active)); + assert.equal(activeLineage.status, "verified"); + const activeBaseline = await host.captureBaseline(); + project = join(activeRoots[0], "project"); + const info = await lstat(project); + assert.ok(info.isDirectory() && !info.isSymbolicLink()); + assert.equal( + info.uid, + process.getuid(), + "Fault must affect only this user-owned project", + ); + mode = info.mode & 0o777; + await chmod(project, 0o500); + const refusal = await verifyWithCleanup( + () => call("close_binary", {}, true), + [() => restoreProject(project, mode)], + ); + assert.equal(refusal.error.code, "cleanup_incomplete"); + assert.ok(refusal.error.details.resources.includes(activeRoots[0])); + await writeFile(work + "/cleanup-refusal.json", JSON.stringify(refusal), { + flag: "wx", + mode: 0o600, + }); + assert.ok( + (await roots(work)).includes(activeRoots[0]), + "Failed cleanup resource ownership disappeared", + ); + await call("close_binary"); + assert.deepEqual(await roots(work), []); + await assert.rejects(access(dirname(active.endpoint_path)), { + code: "ENOENT", + }); + const retried = await verifyNoTokenOwnedProcesses( + active.run_id, + undefined, + activeBaseline, + { leaderPid: active.pid, processGroupId: active.process_group_id }, + ); + assert.equal(retried.cleaned, true, JSON.stringify(retried)); + assert.equal((await call("binary_session")).result.open, false); + assert.equal(await fileSha(target), before); + return { + profile, + selected_profile: selectedProfile, + source_sha256: before, + actual_pending_startup_canceled: true, + verified_launch: launch, + token_cleanup: cleanup, + post_cancellation_activity: afterCancel.analysis_activity, + recovery_preserves_selected_target: true, + logical_run_id_after_recovery: active.run_id, + recovered_ownership: active, + new_verified_process_generation_after_recovery: activeIdentity, + real_permission_cleanup_failure: refusal, + retry_cleanup: retried, + source_bytes_unchanged: true, + }; + }, [() => restoreProject(project, mode), () => client.close()]); + rows.push(row); + await writeFile( + lab + "/progress.json", + JSON.stringify(rows, null, 2) + "\n", + { mode: 0o600 }, + ); + process.stdout.write(JSON.stringify({ profile, status: "passed" }) + "\n"); +} +assert.deepEqual( + await readFile(new URL(import.meta.url)), + verifierSource, + "Verifier source changed during execution", +); +await writeFile( + lab + "/summary.json", + JSON.stringify( + { + caller_supplied_runtime_revision: values.revision, + verifier_source_sha256: sha(verifierSource), + provider_settings_sha256: sha(providerBytes), + source_path: target, + source_sha256: before, + rows, + scope: + "Actual public MCP on Linux: token/start-identity verified pending Ghidra startup cancellation, fresh work under the selected target, controlled permission failure in an owned temporary project, retained-resource close retry and read-only token sweeps. Original input is unchanged. Runtime revision is caller-supplied; this is lifecycle verification, not paired performance or general OS coverage.", + }, + null, + 2, + ) + "\n", + { flag: "wx", mode: 0o600 }, +); diff --git a/experiments/analysis-efficiency/verify-preset-snapshot.mjs b/experiments/analysis-efficiency/verify-preset-snapshot.mjs new file mode 100644 index 000000000..ff8acca4b --- /dev/null +++ b/experiments/analysis-efficiency/verify-preset-snapshot.mjs @@ -0,0 +1,387 @@ +import assert from "node:assert/strict"; +import { execFile } from "node:child_process"; +import { createHash } from "node:crypto"; +import { createReadStream } from "node:fs"; +import { mkdir, readFile, readdir, writeFile } from "node:fs/promises"; +import { isAbsolute, resolve } from "node:path"; +import { performance } from "node:perf_hooks"; +import { parseArgs, promisify, isDeepStrictEqual } from "node:util"; +import { pathToFileURL } from "node:url"; +import { Client } from "@modelcontextprotocol/client"; +import { StdioClientTransport } from "@modelcontextprotocol/client/stdio"; + +const { values } = parseArgs({ + options: { + "runtime-root": { type: "string" }, + revision: { type: "string" }, + path: { type: "string" }, + providers: { type: "string" }, + strace: { type: "string" }, + output: { type: "string" }, + procedure: { type: "string" }, + "timeout-ms": { type: "string", default: "900000" }, + "disabled-analyzers": { + type: "string", + default: "Decompiler Switch Analysis", + }, + }, +}); +for (const key of ["runtime-root", "path", "providers", "strace", "output"]) + assert.ok(values[key] && isAbsolute(values[key]), `Supply --${key} ABS`); +assert.match(values.revision ?? "", /^[a-f0-9]{40}$/u); +assert.equal(process.platform, "linux", "This verifier requires Linux strace"); +const timeout = Number(values["timeout-ms"]); +assert.ok(Number.isSafeInteger(timeout) && timeout > 0); +assert.ok(values["disabled-analyzers"].trim().length > 0); +const verifierSource = await readFile(new URL(import.meta.url)); +await mkdir(values.output, { mode: 0o700 }); +const fileSha = async (path) => { + const hash = createHash("sha256"); + for await (const chunk of createReadStream(path)) hash.update(chunk); + return hash.digest("hex"); +}; +const before = await fileSha(values.path); +const providerBytes = await readFile(values.providers); +const providers = JSON.parse(providerBytes.toString("utf8")); +assert.ok( + providers !== null && + !Array.isArray(providers) && + typeof providers === "object", +); +assert.ok(Object.values(providers).every((value) => typeof value === "string")); +const entrypoint = resolve(values["runtime-root"], "scripts/rea.mjs"); +const { parseAnalysisSnapshot } = await import( + pathToFileURL( + resolve(values["runtime-root"], "dist/domain/analysisSnapshot.js"), + ) +); +const { parseEvidence } = await import( + pathToFileURL(resolve(values["runtime-root"], "dist/domain/evidence.js")) +); +const { createVerifierRun, completeVerifierRun } = await import( + pathToFileURL(resolve(values["runtime-root"], "scripts/lib/verifier-run.mjs")) +); +const run = createVerifierRun(); +const snapshotPath = resolve(values.output, "default.snapshot.json"); +const changedSnapshotPath = resolve(values.output, "changed.snapshot.json"); +const tracedArgs = (work, args) => [ + "-ff", + "-s", + "4096", + "-e", + "trace=execve,execveat", + "-o", + resolve(work, "exec.trace"), + process.execPath, + entrypoint, + ...args, +]; +const headlessLaunches = async (work) => { + const files = (await readdir(work)).filter((name) => + name.startsWith("exec.trace."), + ); + assert.ok(files.length > 0, "No actual syscall trace was recorded"); + const lines = ( + await Promise.all( + files.map((name) => readFile(resolve(work, name), "utf8")), + ) + ).flatMap((text) => text.split("\n")); + // This checks the complete known Ghidra launch argument, not arbitrary target execution. + return lines.filter( + (line) => + line.includes("ghidra.app.util.headless.AnalyzeHeadless") && + line.endsWith("= 0"), + ).length; +}; +const environmentFor = (work, disabled) => ({ + ...process.env, + ...providers, + NODE_OPTIONS: "--max-old-space-size=512", + TMPDIR: work, + REA_PROCESS_RUN_ID: run.run_id, + REA_GHIDRA_DISABLED_ANALYZERS: disabled, +}); +const exactTaskFacts = (actual, expected) => { + assert.deepEqual(actual.normalized_result, expected.normalized_result); + assert.deepEqual(actual.subject, expected.subject); + assert.deepEqual(actual.analysis_profile, expected.analysis_profile); + assert.deepEqual(actual.parameters, expected.parameters); +}; +let selected = values.procedure, + original, + profile, + snapshotBytes; +const rows = []; +for (const scenario of [ + "default", + "same-profile", + "changed-profile", + "restored-default", +]) { + const work = resolve(values.output, scenario); + await mkdir(work, { mode: 0o700 }); + const environment = environmentFor( + work, + scenario === "changed-profile" ? values["disabled-analyzers"] : "", + ); + const client = new Client({ + name: "rea-preset-snapshot-verifier", + version: "1", + }); + const transport = new StdioClientTransport({ + command: values.strace, + args: tracedArgs(work, ["mcp"]), + env: environment, + stderr: "pipe", + }); + const definitions = new Map(); + const calls = []; + const call = async (name, args = {}, expectedError = false) => { + const definition = definitions.get(name); + assert.ok(definition, `Missing named contract ${name}`); + const start = performance.now(); + const reply = await client.callTool( + { name, arguments: args }, + { toolDefinition: definition, timeout }, + ); + await writeFile( + resolve(work, `call-${calls.length + 1}.json`), + JSON.stringify(reply), + { flag: "wx", mode: 0o600 }, + ); + const value = + reply.structuredContent ?? + JSON.parse(reply.content.find((item) => item.type === "text").text); + calls.push({ + name, + arguments: args, + elapsed_ms: performance.now() - start, + is_error: reply.isError === true, + evidence_id: value.evidence_id ?? null, + }); + assert.equal(reply.isError === true, expectedError, JSON.stringify(value)); + return value; + }; + try { + await client.connect(transport); + transport.stderr?.resume(); + for (const definition of (await client.listTools()).tools) + definitions.set(definition.name, definition); + if (scenario === "changed-profile") { + const rejected = await call( + "open_binary", + { + path: values.path, + provider_id: "ghidra", + snapshot_path: snapshotPath, + }, + true, + ); + assert.equal(rejected.error.code, "evidence_integrity_mismatch"); + assert.match(JSON.stringify(rejected.error), /profile_mismatch/u); + assert.equal((await call("binary_session")).result.open, false); + assert.equal(await headlessLaunches(work), 0); + await client.ping(); + await call("open_binary", { path: values.path, provider_id: "ghidra" }); + const changed = (await call("binary_session")).result + .analysis_provider_binding.analysis_profile; + assert.notEqual(changed.digest, profile.digest); + assert.notEqual( + changed.parameters.analyzer_preset, + profile.parameters.analyzer_preset, + ); + const fact = parseEvidence( + await call("analyze_function", { procedure: selected }), + ); + assert.deepEqual(fact.analysis_profile, changed); + await call("close_binary", { snapshot_path: changedSnapshotPath }); + rows.push({ + scenario, + wrong_snapshot_rejected_before_headless_launch: true, + selected_profile: changed, + source_snapshot_unchanged: true, + selected_function_facts_match_default: isDeepStrictEqual( + fact.normalized_result, + original.normalized_result, + ), + limitations: fact.limitations, + calls, + }); + } else { + if (scenario === "restored-default") { + const rejected = await call( + "open_binary", + { + path: values.path, + provider_id: "ghidra", + snapshot_path: changedSnapshotPath, + }, + true, + ); + assert.equal(rejected.error.code, "evidence_integrity_mismatch"); + assert.match(JSON.stringify(rejected.error), /profile_mismatch/u); + assert.equal((await call("binary_session")).result.open, false); + assert.equal(await headlessLaunches(work), 0); + } + await call("open_binary", { + path: values.path, + provider_id: "ghidra", + ...(scenario === "default" ? {} : { snapshot_path: snapshotPath }), + }); + if (selected === undefined) { + const procedures = (await call("list_procedures")).normalized_result; + const observed = procedures.find( + (row) => + row.procedure?.external === false && row.procedure.thunk === false, + ); + assert.ok( + observed, + "No provider-observed internal procedure; select --procedure explicitly", + ); + selected = observed.address; + } + const fact = parseEvidence( + await call("analyze_function", { procedure: selected }), + ); + const actualProfile = (await call("binary_session")).result + .analysis_provider_binding.analysis_profile; + assert.equal(actualProfile.parameters.analyzer_preset, "ghidra-default"); + if (scenario === "default") { + original = fact; + profile = actualProfile; + await call("close_binary", { snapshot_path: snapshotPath }); + snapshotBytes = await readFile(snapshotPath); + const snapshot = parseAnalysisSnapshot( + JSON.parse(snapshotBytes.toString("utf8")), + ); + assert.ok( + snapshot.entries.some( + (entry) => entry.operation === "analyze_function", + ), + "The actual query must be stored, not merely equal after re-analysis", + ); + assert.ok( + snapshot.evidence_bundle.records.some( + (record) => record.evidence_id === original.evidence_id, + ), + ); + } else { + assert.deepEqual(actualProfile, profile); + exactTaskFacts(fact, original); + assert.ok( + fact.limitations.some((limitation) => + limitation.includes("local REA analysis snapshot"), + ), + "No producer cache-reuse marker", + ); + await call("close_binary"); + } + rows.push({ + scenario, + selected_profile: actualProfile, + original_evidence_id: original.evidence_id, + returned_evidence_id: fact.evidence_id, + limitations: fact.limitations, + calls, + }); + } + assert.equal((await call("binary_session")).result.open, false); + } finally { + await client.close(); + } + const launches = await headlessLaunches(work); + assert.equal( + launches, + scenario === "default" || scenario === "changed-profile" ? 1 : 0, + ); + rows.at(-1).headless_launches = launches; + assert.equal(await fileSha(values.path), before); + assert.deepEqual(await readFile(snapshotPath), snapshotBytes); + await writeFile( + resolve(values.output, "progress.json"), + JSON.stringify(rows, null, 2), + { mode: 0o600 }, + ); + process.stdout.write( + JSON.stringify({ + scenario, + status: "passed", + headless_launches: launches, + }) + "\n", + ); +} +const cliWork = resolve(values.output, "cli"); +await mkdir(cliWork, { mode: 0o700 }); +const cliStart = performance.now(); +const { stdout, stderr } = await promisify(execFile)( + values.strace, + tracedArgs(cliWork, [ + "function", + values.path, + selected, + "--provider", + "ghidra", + "--snapshot", + snapshotPath, + "--json", + ]), + { + env: environmentFor(cliWork, ""), + timeout, + maxBuffer: 16 * 1024 * 1024, + }, +); +await writeFile(resolve(cliWork, "reply.json"), stdout, { + flag: "wx", + mode: 0o600, +}); +await writeFile(resolve(cliWork, "stderr.log"), stderr, { + flag: "wx", + mode: 0o600, +}); +const cli = parseEvidence(JSON.parse(stdout)); +exactTaskFacts(cli, original); +assert.equal(cli.evidence_id, original.evidence_id); +assert.deepEqual(await readFile(snapshotPath), snapshotBytes); +assert.equal(await headlessLaunches(cliWork), 0); +assert.equal(await fileSha(values.path), before); +const lineage = await completeVerifierRun(run); +assert.equal(lineage.process_lineage.status, "verified"); +assert.deepEqual(lineage.process_lineage.descendants, []); +const report = { + caller_supplied_runtime_revision: values.revision, + verifier_source_sha256: createHash("sha256") + .update(verifierSource) + .digest("hex"), + source_sha256: before, + source_path: values.path, + provider_settings_sha256: createHash("sha256") + .update(providerBytes) + .digest("hex"), + original_evidence_id: original.evidence_id, + source_snapshot_sha256: createHash("sha256") + .update(snapshotBytes) + .digest("hex"), + selected_procedure: selected, + original_record_and_source_bytes_unchanged: true, + rows, + cli: { + elapsed_ms: performance.now() - cliStart, + returned_evidence_id: cli.evidence_id, + exact_original_task_facts: true, + headless_launches: 0, + }, + lineage, + scope: + "Actual Ghidra public SDK and CLI, explicit default/disabled profiles and immutable JSON snapshot reuse. Revision is caller-supplied. Selection/discovery and all verification calls are included; timings are not paired performance evidence. No engine database cache, target execution or annotation is requested. Final descendant observation is point-in-time; syscall audit covers the known headless launch command.", +}; +assert.deepEqual( + await readFile(new URL(import.meta.url)), + verifierSource, + "Verifier source changed during execution", +); +await writeFile( + resolve(values.output, "summary.json"), + JSON.stringify(report, null, 2), + { flag: "wx", mode: 0o600 }, +); diff --git a/experiments/analysis-efficiency/wasm-first-call.md b/experiments/analysis-efficiency/wasm-first-call.md new file mode 100644 index 000000000..fb554507a --- /dev/null +++ b/experiments/analysis-efficiency/wasm-first-call.md @@ -0,0 +1,149 @@ +# WASM first-call summary delivery + +Refs [#2016](https://github.com/morluto/rea/issues/2016). This bounded follow-up +adds optional MCP `inspect_wasm_artifact detail: summary`. Omitted/complete MCP +requests and CLI output remain complete. Full original Evidence is retained; +delivery selection is stripped before provider inputs, and exact export views +read the original parent without another WABT invocation. + +## Pinned repeated public SDK cohort + +- Control: `18e5d6275965c5f1d3ef9fe373d1792822098003`. +- Candidate: `45831c622a13368494d2a8f3a9718effa91c937c`. +- Runtime file-table SHA-256: control `ef65527c2d41b621f71059b7553050660d801ad905a61a71b81aba266f70e1ec`; + candidate `353f5513ea09b0a627fa99814cebe0a1231c6c8f7e0e12a28205521133478b1a`. +- Actual WABT 1.0.42, identical explicitly selected provider configuration and + effective search-path fingerprint, pinned Node 24.18.0 and locked SDK. +- Three paired fresh-process trials per digest-pinned shipped module, serial + on one CPU: control/candidate, candidate/control, control/candidate. +- Same validation/counts/first-four complete export forms/WAT identity/provider + identity/execution and fetch states; complete original source Evidence ID is + also compared. All nine pairs preserve these selected facts and source IDs. + +| Shipped module | Result JSON bytes, control → summary | Calls / errors | Median seconds, control → summary (ranges) | +| ----------------------------- | -----------------------------------: | -------------- | ----------------------------------------------- | +| `sqlite.wasm` | 20,118 → 18,533 | 3/1 → 2/0 | 15.962 (15.719–21.138) → 18.171 (10.242–18.649) | +| `vscode.tree-sitter-css.wasm` | 20,366 → 18,781 | 3/1 → 2/0 | 4.920 (4.885–4.936) → 5.191 (4.971–5.232) | +| `vscode.tree-sitter.wasm` | 6,433,872 → 18,891 | 1/0 → 2/0 | 5.225 (5.172–5.519) → 4.763 (4.729–4.830) | + +Byte counts include all investigation call results, including failed delivery +and extra views. They exclude catalog responses, raw wire framing and file +exports; they are not actual model tokens. The complete catalog is 2,359,082 +versus 2,362,451 JSON bytes (+3,369 bytes, about 0.14%). An extra export-view +call is included when summary replaces an otherwise fitting complete reply. + +| Shipped module | Median owned CPU seconds, control → summary | Median sampled family MiB, control → summary (maxima) | +| ----------------------------- | ------------------------------------------- | ----------------------------------------------------- | +| `sqlite.wasm` | 15.376 → 15.954 | 660.84 (671.27) → 633.07 (671.51) | +| `vscode.tree-sitter-css.wasm` | 5.760 → 6.027 | 692.91 (694.93) → 678.98 (693.88) | +| `vscode.tree-sitter.wasm` | 6.134 → 5.663 | 674.04 (695.66) → 550.66 (553.47) | + +All 18 scopes have no sampled abort and their last observations contain no +memory-high/hard/OOM/OOM-kill or task-limit event. Final counters are unverified +under the subsequent closeout audit below. Sampling can miss brief peaks. Application caches are cold per process; +host page caches are not flushed. SDK elapsed time includes startup, discovery, +schema work and persistence, not just provider analysis. Three observations +give descriptive medians/ranges, not a statistical or cross-domain speed claim. + +SQLite and the CSS grammar already recovered an oversized complete result +through retained views in the control. The new path removes the initial error +and one call; result-byte savings are correspondingly modest. The Tree-sitter +runtime fits the MCP frame but delivers megabytes of unneeded WAT; its summary +plus exact exports greatly reduces delivery. Full provider analysis and complete +Evidence retention still occur, so this does not establish an engine shortcut. + +An earlier 18-run cohort did not activate the treatment: the driver looked +for an inline enum and missed SDK-generated `$ref` definitions. Those original +runs and their source are archived separately and excluded from benefit claims. +The corrected driver validates the actual advertised 2020-12 request schema. + +## Real model verification + +Ten actual Codex CLI 0.161.0 trials request `gpt-5.6-terra` high: three paired +SQLite repetitions and one pair for each published VS Code component. The +resolved server-side model identity is not inferred from the requested alias. +Same question, fixed developer instructions, four allowlisted REA tools and +explicit WABT settings; private profiles, shell/web/other-agent restrictions +and target-byte preservation remain verified. + +All ten answers match the 12 requested producer facts, including exact export +forms and explicit execution/fetch states. Reported Evidence IDs occur in real +responses; all copied profiles are removed. Manual review retains static-analysis +limitations and makes no original-source/runtime claim. Every candidate chooses +`detail: summary` on its first inspection and then reads exports without WABT +rerun. Original control errors and client-context clipping remain in transcripts. + +| Module / observations per side | Total input, control → summary | Cached input | Uncached input | Output | +| --------------------------------- | -----------------------------: | ----------------: | --------------: | ------------: | +| `sqlite.wasm` / 3 | 96,832 → 79,264 | 70,656 → 51,456 | 26,215 → 28,004 | 1,470 → 1,512 | +| `vscode.tree-sitter-css.wasm` / 1 | 247,889 → 79,389 | 207,872 → 61,440 | 40,017 → 17,949 | 1,931 → 1,327 | +| `vscode.tree-sitter.wasm` / 1 | 556,424 → 282,165 | 478,208 → 239,360 | 78,216 → 42,805 | 2,560 → 2,110 | + +SQLite rows show medians of three observations; VS Code rows are single pairs. +Usage is the CLI-reported total for the turn, with cached/uncached input listed +separately. Lower total input does not imply a proportional monetary saving, +uncached-input reduction or faster answer. + +| Module | Calls / observed errors, control → summary | Seconds, control → summary | +| ----------------------------- | ------------------------------------------ | ----------------------------------------------- | +| `sqlite.wasm` | 3/1 → 2/0 | 61.521 (54.301–80.579) → 55.656 (42.960–62.145) | +| `vscode.tree-sitter-css.wasm` | 3/1 → 2/0 | 87.126 → 106.580 | +| `vscode.tree-sitter.wasm` | 4/0 → 2/0 | 56.952 → 104.999 | + +SQLite total input falls about 18% and median answer time about 10%, while +its median uncached input rises about 7%. The two VS Code pairs reduce total +input by about 49% and 68%, but observed answer time rises about 84% and 22%. +These data support optional smaller delivery; they do not establish uniform +model speedup. The runtime control also makes one protocol resource-discovery +call, included in the four-call count. Cache state, model reasoning and service +latency are not separated by this small sample. + +The model and SDK cohorts ran with the original resource wrapper. Their final +receipts retain last-sampled cgroup counters, not verified final counters. +The subsequent closeout correction regrades all ten existing answers: selected +facts, real IDs, unchanged target bytes and profile cleanup still pass, while +the final resource conditions are **unverified**. No model/build/provider run +was repeated for that review-only correction. Last-sampled peaks are 656–944 +MiB for model scopes with no observed limit events; one CPU, 4 GiB hard ceiling, +3 GiB early-stop and no-swap controls were active. This is not a proof of absent +late resource events or a fully resource-qualified performance conclusion. +The original transcripts/usage and regrades remain archived separately. + +## Reproduction and verification + +Use [the common measurement/model instructions](README.md) with the public +digest-pinned inputs in [corpus.json](corpus.json), `--schemas selected` and +`--delivery summary`. For each artifact run the above three paired orders +against separately frozen runtimes, then `compare.mjs`. Use the same +[WASM interface question](questions/wasm-interface.txt), four exact enabled +tools (`inspect_wasm_artifact`, `inspect_analysis_view`, `get_evidence_bundle`, +`export_evidence_bundle`), explicit WABT settings and resource scope for models. + +The VS Code artifacts are two published components from +[@vscode/tree-sitter-wasm 0.3.1](https://github.com/microsoft/vscode-tree-sitter-wasm). +The selected regular archive members have verified digests and package SHA-512 +integrity. This is component analysis, not proof of the whole VS Code runtime. + +The prototype passes 54 focused assertions and full static/docs gates. After +rebasing, 29 focused assertions and 42 actual installed-package WABT CLI/MCP +cases pass; the final rebased snapshot passes build/fast static and seven WASM +MCP workflows again. Omitted/explicit-complete behavior, retained identity, +fixed-server absence of retention, oversized continuation and invalid WAT +digest remain checked. No version publication or target execution occurs. +The final static/build scope has 51 soft memory-high events and no hard/OOM +events; this is not credited as a performance trial. + +Detailed JSON, transcripts, target bytes, profiles and acquisition receipts +stay outside Git. Source inputs, scripts and this concise measured scope are +reviewable in the repository. + +## Main integration checkpoint + +Prerequisite #2122 is merged at `58fb372071e56da9c5df0e37593ee3f0da6b64bc`. +The follow-up is rebased directly onto latest fetched main. Intervening changes +outside the prerequisite concern CLI/logging/CI planning rather than WASM +production/delivery. Seven focused WASM MCP workflows and one fresh real-WABT +SQLite public-SDK request pass against the new build: selected facts and original +source ID match the pinned candidate, summary uses two calls with no tool error. +Only the relevant integration checks and required pre-push gate are repeated; +earlier measurements retain their original runtimes, not the new main label. diff --git a/experiments/analysis-efficiency/windows-empty-profile.md b/experiments/analysis-efficiency/windows-empty-profile.md new file mode 100644 index 000000000..f8e5558e0 --- /dev/null +++ b/experiments/analysis-efficiency/windows-empty-profile.md @@ -0,0 +1,69 @@ +# Windows empty-profile startup verification + +Follow-up to [#2345](https://github.com/morluto/rea/pull/2345), including +@gefrezim's diagnosis of the import-time Windows home lookup. + +## Source and boundary + +Baseline: main `172407787f1842dedbcd27b5385177595f786ce4`. Verification used +the real Windows 11 10.0.22631.0 host, official Windows x64 Node 24.18.0, +locked production dependencies and REA's compiled public CLI / SDK 2.3.1 MCP +server. No IDA or Ghidra engine was used. Runtime copies and compact receipts +live outside the checkout; no account profile path or ambient environment is +recorded here. + +The tested dispatcher SHA-256 is +`526105418604cc6e5a202a6275b700814e27450bfaffd45e7510530ba669de8d`. +Only the dispatcher changed in the deployed runtime. It treats an empty Windows +`USERPROFILE` as unset before dependency imports. Nonempty selections continue +to reach the existing home resolver; no additional lookup or fallback owner is +introduced. + +## Real Windows observations + +With `HOME` empty in each case, the baseline produced: + +| USERPROFILE selection | `--version` | `--help` | MCP discovery | +| --------------------------- | ----------------------- | ----------------------- | ------------- | +| Unset | Exit 0 | Exit 0 | Healthy | +| Empty | Exit 1, `uv_os_homedir` | Exit 1, `uv_os_homedir` | Healthy | +| Nonempty test-owned profile | Exit 0 | Exit 0 | Healthy | + +The corrected CLI passed all six invocations with no stderr. Version output +remained 6 bytes and help output 15,497 bytes. Real setup dry runs with empty +and nonempty profile selections both exited 0, planned their configuration +under the expected home, preserved existing configuration bytes and created no +configuration under the working directory. No installation was performed. + +MCP was already healthy in the baseline; this change does not claim to repair +an MCP startup failure. Complete baseline discovery was 187 tools and 2,545,790 +serialized bytes, SHA-256 +`1e6bbca7f62852134eb703ea098f5a302d1fe333b8433475429f6fc1b1aba18f`. +All three corrected MCP controls also passed with no stderr and the same +catalogue bytes and digest. + +The existing `homeDirectoryFallback` acceptance test exercises the import-time +failure through the public setup dry run. Adding it to the Windows curated lane +makes that regression execute on the affected platform. No duplicate startup +test was retained. Nine related tests passed, including the existing MCP doctor +and curated-lane path checks; Linux passing alone does not prove Windows behavior. +Review caught a missing package-scope registration for the newly listed test; +the original CI shard failed that ownership invariant. The path is now also +registered in `scripts/ci/scopes.mjs`, and all 84 scope checks plus the two +curated-path checks pass. Runtime source and its tested digest are unchanged. + +## Efficiency and resource limits + +Heavy host probes ran serially at BelowNormal priority, with one CPU and a +512 MiB CLI/server heap setting (256 MiB for the probe parent). Heap settings do +not bound total process memory. An exit-time `process.resourceUsage()` observer +recorded individual corrected CLI invocations: CPU time ranged from 7.968 to +9.874 seconds and peak working set from 299,956 to 301,852 KiB. These figures +exclude the probe parent and any observer overhead outside the CLI process. +The six observed wall times ranged from 8.656 to 10.961 seconds. + +The baseline did not use that resource observer, and cold/warm caches were not +normalized. These observations establish functional behavior and bounded probe +scope; no CPU, memory or latency improvement is claimed. The fix adds one +constant-time environment check, no filesystem lookup, engine call, retry or +cache. Output bytes are not model tokens; actual model usage was not measured. diff --git a/experiments/analysis-efficiency/windows-runtime-retry.md b/experiments/analysis-efficiency/windows-runtime-retry.md new file mode 100644 index 000000000..2286727e8 --- /dev/null +++ b/experiments/analysis-efficiency/windows-runtime-retry.md @@ -0,0 +1,107 @@ +# Windows runtime admission retry verification + +Scope: [#2257](https://github.com/morluto/rea/issues/2257). Related initial +diagnosis: [#2266](https://github.com/morluto/rea/pull/2266). + +## Revisions and real input + +The baseline is `4f4f6cd7b5d7a400b90772a138d7b9f942c2a556`. +The candidate was developed from +`4773c152bc5f299fa682575bb8d1efea7587c7bc`; relevant runtime, native and +dependency-lock sources are identical between those two revisions. +These measurements precede integration of subsequent main changes. + +The host ran Windows 11 10.0.22631.0, official Windows x64 Node 24.18.0, +and locked production dependencies. The real application input was the official +npm 11.16.0 launcher distribution's `bin` directory. REA inspected that source; +it did not execute the application as an analysis target. Runtime copies, +raw replies and test executables remain outside the checkout. No IDA or Ghidra +engine was involved in this native-runtime verification. + +## Correctness and recovery + +A test-owned directory handle requesting `FILE_ADD_FILE` produced an actual +kernel sharing violation (Win32 32) during native runtime-parent admission. +Releasing that handle restored admission. Before the fix, public CLI analysis +reported a permanent `unsupported_provider` failure with `retryable: false`. +The corrected CLI preserves `capability_unavailable` and the reason, with +`category: unavailable` and `retryable: true`. + +Normal CLI analysis and post-conflict recovery produced the same canonical +normalized result before and after the correction: 535,733 compact JSON bytes, +SHA-256 `a24d3c2d9897cccc5ba70e9ee4dce03da88f033a939fe87457136fc5b3a3e2db`. +The complete successful CLI reply remained 537,124 bytes. + +A single real SDK 2.3.1 stdio MCP connection first completed analysis, then +encountered the same kernel conflict after native authority caching, then +recovered successfully when the handle was released. Its final receipt passed +and found no residual runtime directories. The native producer supplies +`runtimeAllocation: "not-started"` only when parent admission failed before +directory creation. The adapter requires that fact and exact numeric codes +32/33; permission failures, opaque error text and unknown allocation state +remain nonretryable. Incomplete cleanup also prevents retry. + +The native verifier additionally reproduces a real sharing conflict using an +owned runtime's DELETE lease, verifies the original error and allocation fact, +and confirms no child directory was allocated. This case runs unconditionally +in the Windows native verifier, without the optional process-boundary fixture. +The full verifier passed with 20 positive controls. Its optional independently +built process-boundary fixture was not supplied in this run. + +The related focused suite passed 99 tests across seven files, including worker +ownership, cancellation, cleanup, error projection, loader behavior and adapter +boundaries. Source-map and WABT acquisition-failure tests use injected failures; +they establish disposition propagation, not real engine execution. + +Thirty baseline native self-tests passed with no residual directories. +Win32 5 from #1701/#2196 was not reproduced on this host; these results do not +establish its cause or resolution. + +## Delivery and resource measurements + +One final same-connection MCP trial used one CPU per Node process, BelowNormal +priority, a 512 MiB client heap setting and a 768 MiB server heap setting. +Heap settings do not bound total process or family memory. + +| Stage | Observed wall time | Serialized reply bytes | +| ---------------------------------- | -----------------: | ---------------------: | +| Connect | 11,351 ms | Not recorded | +| Complete tool discovery, 187 tools | 744 ms | 2,498,686 | +| Normal analysis | 12,887 ms | 1,126,797 | +| Sharing failure | 265 ms | 878 | +| Recovery on the same connection | 5,578 ms | 1,126,797 | + +The earlier warm failure reply was 1,218 bytes. Successful reply sizes and the +catalogue digest were unchanged within the tested source comparison: +`7bdadddc909f4b2b093f0b3da9f79fafdac879c9d3c147938b8fbce1b52cd726`. +These are delivery bytes, not model tokens. Model-visible discovery handling, +actual model token usage and total model task cost were not measured. + +A targeted process-generation sampler collected 343 observations over +35,630 ms. Its aggregate observed CPU time was a **lower bound** of 26,766 ms: +process exits can hide the final CPU tail. Its peak sampled working-set sum was +727,244,800 bytes (about 694 MiB). This is a sampled sum, can double-count shared +pages and is not an exact physical-memory peak. Only the test-owned Node and +directory-holder processes were included; the observer itself was excluded. + +This is one controlled functional trial, with no paired CPU/memory baseline. +Cold/warm filesystem caches and host noise were not normalized. No speedup, +CPU reduction, memory reduction or model-token savings are claimed. The change +adds no analysis retry loop or cache and performs no additional engine calls. +Existing successful native authority caching remains intact; failed readiness +is retried by a later caller attempt. Retry becomes useful advice only after +the transient condition clears and cleanup permits another attempt. + +## Integration replay + +After rebasing onto main `a2d8b94dd`, runtime candidate +`2c7a09eaf3ffe26667b40081f1cf0fd2ce44a146` again passed the 99 related tests, +static and documentation gates, real Windows CLI and same-connection MCP +normal/conflict/recovery sequence. Both workflows found no residual directories; +the CLI normalized-result digest above still matched. The MCP success and error +reply sizes remained 1,126,797 and 878 bytes respectively. Upstream Android/SAZ +contract changes increased complete discovery to 2,517,904 bytes, digest +`d14588eab7404ad129907eb34a45a0db0d43233c4de829f76babd59723bed199`. +This later catalogue is not evidence of a delivery-size change caused by the +runtime-admission fix. Resource sampling above belongs to the earlier pinned +candidate; aggregate resources were not resampled for this integration replay. diff --git a/install.sh b/install.sh index 5ed7cafc7..c18726611 100755 --- a/install.sh +++ b/install.sh @@ -25,6 +25,46 @@ fail() { exit 1 } +# Bash can return status 0 while parsing an incomplete [[ condition. Keep that +# grammar in a constant quoted expression so truncated downloads fail while +# parsing the outer brace group. eval parses only this literal; the arguments +# are expanded as data by the conditional, not interpolated into shell code. +matches() { + eval '[[ "$1" =~ $2 ]]' +} + +# Resolve the current host's Node.js tarball label pair; a label we cannot map +# is kept verbatim so the operator can still read it. Falls back on the raw +# `uname` outputs rather than inventing a label the Node.js release index does +# not publish, so a mismatch is obvious instead of silently wrong. +node_host_labels() { + case "$(uname -m)" in + arm64|aarch64) node_arch_label="arm64" ;; + x86_64|amd64) node_arch_label="x64" ;; + *) node_arch_label="$(uname -m)" ;; + esac + case "$(uname -s)" in + Darwin) node_os_label="darwin" ;; + Linux) node_os_label="linux" ;; + *) node_os_label="$(uname -s | tr '[:upper:]' '[:lower:]')" ;; + esac +} + +# Exit with actionable remediation when the active Node.js is unsupported. +# The engine floor stays in sync with package.json#engines.node — change both. +fail_node_version() { + local observed="$1" + node_host_labels + printf 'REA installation failed: Node.js %s is unsupported.\n\n' "$observed" >&2 + printf 'REA requires Node.js 22.x (>=22.19), 24.x (>=24.11), or 26+. Install one via:\n' >&2 + printf ' nvm: nvm install 24 && nvm use 24 (https://github.com/nvm-sh/nvm)\n' >&2 + printf ' fnm: fnm install 24 && fnm use 24 (https://github.com/Schniz/fnm)\n' >&2 + printf ' Direct download for %s/%s:\n' "$node_os_label" "$node_arch_label" >&2 + printf ' https://nodejs.org/dist/latest-v24.x/ (grab the %s-%s tarball)\n' "$node_os_label" "$node_arch_label" >&2 + printf 'Then rerun this installer.\n' >&2 + exit 1 +} + usage() { cat <<'EOF' Usage: install.sh [--version VERSION] [--dry-run] [--no-setup] [--no-prompt] [--verbose] @@ -63,41 +103,41 @@ main() { esac done - if [[ "$verbose" == true ]]; then + if [ "$verbose" = true ]; then set -x fi platform="$(uname -s)" - [[ "$platform" == "Darwin" || "$platform" == "Linux" ]] || fail "REA supports macOS and selected 64-bit Linux distributions." + [ "$platform" = "Darwin" ] || [ "$platform" = "Linux" ] || fail "REA supports macOS and selected 64-bit Linux distributions." command -v curl >/dev/null 2>&1 || fail "curl is required. Install curl, then rerun this installer." command -v node >/dev/null 2>&1 || fail "Node.js 22.x (>=22.19), 24.x (>=24.11), or 26+ is required; install it from https://nodejs.org and retry." command -v npm >/dev/null 2>&1 || fail "npm is required; install it with Node.js and retry." node_version="$(node -p 'process.versions.node' 2>/dev/null || true)" IFS=. read -r node_major node_minor _node_patch <<<"$node_version" - [[ "$node_major" =~ ^[0-9]+$ && "$node_minor" =~ ^[0-9]+$ ]] || fail "the active Node.js version could not be read. Check that node works and is on PATH, then retry." - if ! [[ "$_node_patch" =~ ^[0-9]+(\+[0-9A-Za-z.-]+)?$ ]] || + matches "$node_major" '^[0-9]+$' && matches "$node_minor" '^[0-9]+$' || fail "the active Node.js version could not be read. Check that node works and is on PATH, then retry." + if ! matches "$_node_patch" '^[0-9]+(\+[0-9A-Za-z.-]+)?$' || ! ((node_major == 22 && node_minor >= 19 || node_major == 24 && node_minor >= 11 || node_major >= 26)); then - fail "Node.js $node_version is unsupported; use Node.js 22.x (>=22.19), 24.x (>=24.11), or 26+." + fail_node_version "$node_version" fi - if [[ -n "$version" ]]; then - [[ "$version" =~ ^${version_pattern}$ ]] || fail "version must be an exact semantic version." + if [ -n "$version" ]; then + matches "$version" "^${version_pattern}$" || fail "version must be an exact semantic version." else release_json="$(curl -fsSL --proto '=https' --tlsv1.2 --retry 3 -H 'Accept: application/vnd.github+json' "https://api.github.com/repos/$REPOSITORY/releases/latest")" || fail "the latest REA release could not be resolved. Check network access or pass --version VERSION, then retry." tag="$(printf '%s' "$release_json" | node -e 'let s="";process.stdin.on("data",c=>s+=c).on("end",()=>{const v=JSON.parse(s).tag_name;if(typeof v!=="string")process.exit(1);process.stdout.write(v)})' 2>/dev/null)" || fail "the release response was invalid. Retry later or pass --version VERSION." - [[ "$tag" =~ ^rea-agents-(${version_pattern})$ ]] || fail "the latest release tag was invalid. Retry later or pass --version VERSION." + matches "$tag" "^rea-agents-(${version_pattern})$" || fail "the latest release tag was invalid. Retry later or pass --version VERSION." version="${BASH_REMATCH[1]}" fi # npm's exact-version resolver cleans build metadata from the requested version, # so it may install the base release and make the post-install identity check fail. - if [[ "$version" =~ \+ ]]; then + if matches "$version" '\+'; then fail "npm cannot install an exact version with build metadata. Pass a version without build metadata, then retry." fi install_args=(install --global) - if [[ "$platform" == "Linux" ]]; then + if [ "$platform" = "Linux" ]; then install_args+=(--prefix "$HOME/.local") install_bin="$HOME/.local/bin/rea" else @@ -113,21 +153,21 @@ main() { printf ' %q' npm "${install_args[@]}" printf '\n' printf ' Binary: %s\n' "$install_bin" - printf ' Setup: %s\n' "$([[ "$start_setup" == true ]] && printf 'start when a terminal is available' || printf 'skipped')" + printf ' Setup: %s\n' "$([ "$start_setup" = true ] && printf 'start when a terminal is available' || printf 'skipped')" - if [[ "$dry_run" == true ]]; then + if [ "$dry_run" = true ]; then printf 'Dry run complete; no changes made.\n' exit 0 fi printf 'Installing %s@%s...\n' "$PACKAGE" "$version" npm "${install_args[@]}" || fail "npm could not install REA. Check registry access and npm permissions, then retry." - [[ -x "$install_bin" ]] || fail "npm completed without installing the rea command. Check the npm global bin directory and PATH, then retry." + [ -x "$install_bin" ] || fail "npm completed without installing the rea command. Check the npm global bin directory and PATH, then retry." installed_version="$("$install_bin" --version 2>/dev/null | tr -d '[:space:]')" || fail "the installed REA version could not be read. Reinstall the requested version, then retry." - [[ "$installed_version" == "$version" ]] || fail "installed version $installed_version does not match $version. Reinstall the requested version, then retry." + [ "$installed_version" = "$version" ] || fail "installed version $installed_version does not match $version. Reinstall the requested version, then retry." printf 'REA %s is installed.\n' "$version" - if [[ "$start_setup" == true && -r /dev/tty && -w /dev/tty && -t 1 ]]; then + if [ "$start_setup" = true ] && [ -r /dev/tty ] && [ -w /dev/tty ] && [ -t 1 ] && [ -t 2 ]; then printf 'Starting REA setup...\n' "$install_bin" setup /dev/tty else diff --git a/knip.json b/knip.json index 8d38b4ef1..72d093397 100644 --- a/knip.json +++ b/knip.json @@ -7,6 +7,7 @@ "src/contracts/errorSchemas.ts", "src/evaluation/AgentEvaluationFixtures.ts", "src/application/RealHopperAssertions.ts", + "scripts/verify/fridaBindingsCompatibility.ts", "scripts/verify/termux/browser.mjs", "scripts/verify-real-ghidra-noreturn.mjs", "tests/processOwnershipRunner.ts" diff --git a/licenses/Apache-2.0.txt b/licenses/Apache-2.0.txt new file mode 100644 index 000000000..d64569567 --- /dev/null +++ b/licenses/Apache-2.0.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/GCC-Runtime-Library-Exception-3.1.txt b/licenses/GCC-Runtime-Library-Exception-3.1.txt new file mode 100644 index 000000000..e1b3c69c1 --- /dev/null +++ b/licenses/GCC-Runtime-Library-Exception-3.1.txt @@ -0,0 +1,73 @@ +GCC RUNTIME LIBRARY EXCEPTION + +Version 3.1, 31 March 2009 + +Copyright (C) 2009 Free Software Foundation, Inc. + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. + +This GCC Runtime Library Exception ("Exception") is an additional +permission under section 7 of the GNU General Public License, version +3 ("GPLv3"). It applies to a given file (the "Runtime Library") that +bears a notice placed by the copyright holder of the file stating that +the file is governed by GPLv3 along with this Exception. + +When you use GCC to compile a program, GCC may combine portions of +certain GCC header files and runtime libraries with the compiled +program. The purpose of this Exception is to allow compilation of +non-GPL (including proprietary) programs to use, in this way, the +header files and runtime libraries covered by this Exception. + +0. Definitions. + +A file is an "Independent Module" if it either requires the Runtime +Library for execution after a Compilation Process, or makes use of an +interface provided by the Runtime Library, but is not otherwise based +on the Runtime Library. + +"GCC" means a version of the GNU Compiler Collection, with or without +modifications, governed by version 3 (or a specified later version) of +the GNU General Public License (GPL) with the option of using any +subsequent versions published by the FSF. + +"GPL-compatible Software" is software whose conditions of propagation, +modification and use would permit combination with GCC in accord with +the license of GCC. + +"Target Code" refers to output from any compiler for a real or virtual +target processor architecture, in executable form or suitable for +input to an assembler, loader, linker and/or execution +phase. Notwithstanding that, Target Code does not include data in any +format that is used as a compiler intermediate representation, or used +for producing a compiler intermediate representation. + +The "Compilation Process" transforms code entirely represented in +non-intermediate languages designed for human-written code, and/or in +Java Virtual Machine byte code, into Target Code. Thus, for example, +use of source code generators and preprocessors need not be considered +part of the Compilation Process, since the Compilation Process can be +understood as starting with the output of the generators or +preprocessors. + +A Compilation Process is "Eligible" if it is done using GCC, alone or +with other GPL-compatible software, or if it is done without using any +work based on GCC. For example, using non-GPL-compatible Software to +optimize any GCC intermediate representations would not qualify as an +Eligible Compilation Process. + +1. Grant of Additional Permission. + +You have permission to propagate a work of Target Code formed by +combining the Runtime Library with Independent Modules, even if such +propagation would otherwise violate the terms of GPLv3, provided that +all Target Code was generated by Eligible Compilation Processes. You +may then convey such a combination under terms of your choice, +consistent with the licensing of the Independent Modules. + +2. No Weakening of GCC Copyleft. + +The availability of this Exception does not imply any general +presumption that third-party software is unaffected by the copyleft +requirements of the license of GCC. + diff --git a/licenses/GPL-3.0.txt b/licenses/GPL-3.0.txt new file mode 100644 index 000000000..94a9ed024 --- /dev/null +++ b/licenses/GPL-3.0.txt @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/licenses/LGPL-2.0.txt b/licenses/LGPL-2.0.txt new file mode 100644 index 000000000..ede5d5441 --- /dev/null +++ b/licenses/LGPL-2.0.txt @@ -0,0 +1,480 @@ + GNU LIBRARY GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1991 Free Software Foundation, Inc. + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the library GPL. It is + numbered 2 because it goes with version 2 of the ordinary GPL.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Library General Public License, applies to some +specially designated Free Software Foundation software, and to any +other libraries whose authors decide to use it. You can use it for +your libraries, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if +you distribute copies of the library, or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link a program with the library, you must provide +complete object files to the recipients so that they can relink them +with the library, after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + Our method of protecting your rights has two steps: (1) copyright +the library, and (2) offer you this license which gives you legal +permission to copy, distribute and/or modify the library. + + Also, for each distributor's protection, we want to make certain +that everyone understands that there is no warranty for this free +library. If the library is modified by someone else and passed on, we +want its recipients to know that what they have is not the original +version, so that any problems introduced by others will not reflect on +the original authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that companies distributing free +software will individually obtain patent licenses, thus in effect +transforming the program into proprietary software. To prevent this, +we have made it clear that any patent must be licensed for everyone's +free use or not licensed at all. + + Most GNU software, including some libraries, is covered by the ordinary +GNU General Public License, which was designed for utility programs. This +license, the GNU Library General Public License, applies to certain +designated libraries. This license is quite different from the ordinary +one; be sure to read it in full, and don't assume that anything in it is +the same as in the ordinary license. + + The reason we have a separate public license for some libraries is that +they blur the distinction we usually make between modifying or adding to a +program and simply using it. Linking a program with a library, without +changing the library, is in some sense simply using the library, and is +analogous to running a utility program or application program. However, in +a textual and legal sense, the linked executable is a combined work, a +derivative of the original library, and the ordinary General Public License +treats it as such. + + Because of this blurred distinction, using the ordinary General +Public License for libraries did not effectively promote software +sharing, because most developers did not use the libraries. We +concluded that weaker conditions might promote sharing better. + + However, unrestricted linking of non-free programs would deprive the +users of those programs of all benefit from the free status of the +libraries themselves. This Library General Public License is intended to +permit developers of non-free programs to use free libraries, while +preserving your freedom as a user of such programs to change the free +libraries that are incorporated in them. (We have not seen how to achieve +this as regards changes in header files, but we have achieved it as regards +changes in the actual functions of the Library.) The hope is that this +will lead to faster development of free libraries. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, while the latter only +works together with the library. + + Note that it is possible for a library to be covered by the ordinary +General Public License rather than by this special one. + + GNU LIBRARY GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library which +contains a notice placed by the copyright holder or other authorized +party saying it may be distributed under the terms of this Library +General Public License (also called "this License"). Each licensee is +addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also compile or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + c) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + d) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the source code distributed need not include anything that is normally +distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Library General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, see . + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Moe Ghoul, President of Vice + +That's all there is to it! diff --git a/licenses/MIT-template.txt b/licenses/MIT-template.txt new file mode 100644 index 000000000..d817195da --- /dev/null +++ b/licenses/MIT-template.txt @@ -0,0 +1,18 @@ +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and +associated documentation files (the "Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial +portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO +EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/MinGW-w64-runtime.txt b/licenses/MinGW-w64-runtime.txt new file mode 100644 index 000000000..ca6a077e2 --- /dev/null +++ b/licenses/MinGW-w64-runtime.txt @@ -0,0 +1,240 @@ +MinGW-w64 runtime licensing +*************************** + +This program or library was built using MinGW-w64 and statically +linked against the MinGW-w64 runtime. Some parts of the runtime +are under licenses which require that the copyright and license +notices are included when distributing the code in binary form. +These notices are listed below. + + +======================== +Overall copyright notice +======================== + +Copyright (c) 2009, 2010, 2011, 2012, 2013 by the mingw-w64 project + +This license has been certified as open source. It has also been designated +as GPL compatible by the Free Software Foundation (FSF). + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions in source code must retain the accompanying copyright + notice, this list of conditions, and the following disclaimer. + 2. Redistributions in binary form must reproduce the accompanying + copyright notice, this list of conditions, and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + 3. Names of the copyright holders must not be used to endorse or promote + products derived from this software without prior written permission + from the copyright holders. + 4. The right to distribute this software or to use it for any purpose does + not give you the right to use Servicemarks (sm) or Trademarks (tm) of + the copyright holders. Use of them is covered by separate agreement + with the copyright holders. + 5. If any files are modified, you must cause the modified files to carry + prominent notices stating that you changed the files and the date of + any change. + +Disclaimer + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +======================================== +getopt, getopt_long, and getop_long_only +======================================== + +Copyright (c) 2002 Todd C. Miller + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Sponsored in part by the Defense Advanced Research Projects +Agency (DARPA) and Air Force Research Laboratory, Air Force +Materiel Command, USAF, under agreement number F39502-99-1-0512. + + * * * * * * * + +Copyright (c) 2000 The NetBSD Foundation, Inc. +All rights reserved. + +This code is derived from software contributed to The NetBSD Foundation +by Dieter Baron and Thomas Klausner. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + + +=============================================================== +gdtoa: Converting between IEEE floating point numbers and ASCII +=============================================================== + +The author of this software is David M. Gay. + +Copyright (C) 1997, 1998, 1999, 2000, 2001 by Lucent Technologies +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of Lucent or any of its entities +not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. +IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + * * * * * * * + +The author of this software is David M. Gay. + +Copyright (C) 2005 by David M. Gay +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that the copyright notice and this permission notice and warranty +disclaimer appear in supporting documentation, and that the name of +the author or any of his current or former employers not be used in +advertising or publicity pertaining to distribution of the software +without specific, written prior permission. + +THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN +NO EVENT SHALL THE AUTHOR OR ANY OF HIS CURRENT OR FORMER EMPLOYERS BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY +DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + + * * * * * * * + +The author of this software is David M. Gay. + +Copyright (C) 2004 by David M. Gay. +All Rights Reserved +Based on material in the rest of /netlib/fp/gdota.tar.gz, +which is copyright (C) 1998, 2000 by Lucent Technologies. + +Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of Lucent or any of its entities +not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. +IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +========================= +Parts of the math library +========================= + +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. + + * * * * * * * + +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. + + * * * * * * * + +FIXME: Cephes math lib +Copyright (C) 1984-1998 Stephen L. Moshier + +It sounds vague, but as to be found at +, it gives an +impression that the author could be willing to give an explicit +permission to distribute those files e.g. under a BSD style license. So +probably there is no problem here, although it could be good to get a +permission from the author and then add a license into the Cephes files +in MinGW runtime. At least on follow-up it is marked that debian sees the +version a-like BSD one. As MinGW.org (where those cephes parts are coming +from) distributes them now over 6 years, it should be fine. + +=================================== +Headers and IDLs imported from Wine +=================================== + +Some header and IDL files were imported from the Wine project. These files +are prominent maked in source. Their copyright belongs to contributors and +they are distributed under LGPL license. + +Disclaimer + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. diff --git a/licenses/Node-22.19.0-LICENSE.txt b/licenses/Node-22.19.0-LICENSE.txt new file mode 100644 index 000000000..bed41c4c0 --- /dev/null +++ b/licenses/Node-22.19.0-LICENSE.txt @@ -0,0 +1,2666 @@ +Node.js is licensed for use as follows: + +""" +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + +The Node.js license applies to all parts of Node.js that are not externally +maintained libraries. + +The externally maintained libraries used by Node.js are: + +- Acorn, located at deps/acorn, is licensed as follows: + """ + MIT License + + Copyright (C) 2012-2022 by various contributors (see AUTHORS) + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + """ + +- c-ares, located at deps/cares, is licensed as follows: + """ + MIT License + + Copyright (c) 1998 Massachusetts Institute of Technology + Copyright (c) 2007 - 2023 Daniel Stenberg with many contributors, see AUTHORS + file. + + Permission is hereby granted, free of charge, to any person obtaining a copy of + this software and associated documentation files (the "Software"), to deal in + the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice (including the next + paragraph) shall be included in all copies or substantial portions of the + Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + """ + +- cjs-module-lexer, located at deps/cjs-module-lexer, is licensed as follows: + """ + MIT License + ----------- + + Copyright (C) 2018-2020 Guy Bedford + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + """ + +- ittapi, located at deps/v8/third_party/ittapi, is licensed as follows: + """ + Copyright (c) 2019 Intel Corporation. All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + """ + +- amaro, located at deps/amaro, is licensed as follows: + """ + MIT License + + Copyright (c) Marco Ippolito and Amaro contributors + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + """ + +- swc, located at deps/amaro/dist, is licensed as follows: + """ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2024 SWC contributors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + """ + +- ICU, located at deps/icu-small, is licensed as follows: + """ + UNICODE LICENSE V3 + + COPYRIGHT AND PERMISSION NOTICE + + Copyright © 2016-2025 Unicode, Inc. + + NOTICE TO USER: Carefully read the following legal agreement. BY + DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR + SOFTWARE, YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE + TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT + DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE. + + Permission is hereby granted, free of charge, to any person obtaining a + copy of data files and any associated documentation (the "Data Files") or + software and any associated documentation (the "Software") to deal in the + Data Files or Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, and/or sell + copies of the Data Files or Software, and to permit persons to whom the + Data Files or Software are furnished to do so, provided that either (a) + this copyright and permission notice appear with all copies of the Data + Files or Software, or (b) this copyright and permission notice appear in + associated Documentation. + + THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + THIRD PARTY RIGHTS. + + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE + BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, + OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, + WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, + ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA + FILES OR SOFTWARE. + + Except as contained in this notice, the name of a copyright holder shall + not be used in advertising or otherwise to promote the sale, use or other + dealings in these Data Files or Software without prior written + authorization of the copyright holder. + + SPDX-License-Identifier: Unicode-3.0 + + ---------------------------------------------------------------------- + + Third-Party Software Licenses + + This section contains third-party software notices and/or additional + terms for licensed third-party software components included within ICU + libraries. + + ---------------------------------------------------------------------- + + ICU License - ICU 1.8.1 to ICU 57.1 + + COPYRIGHT AND PERMISSION NOTICE + + Copyright (c) 1995-2016 International Business Machines Corporation and others + All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, and/or sell copies of the Software, and to permit persons + to whom the Software is furnished to do so, provided that the above + copyright notice(s) and this permission notice appear in all copies of + the Software and that both the above copyright notice(s) and this + permission notice appear in supporting documentation. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT + OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR + HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY + SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER + RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF + CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + Except as contained in this notice, the name of a copyright holder + shall not be used in advertising or otherwise to promote the sale, use + or other dealings in this Software without prior written authorization + of the copyright holder. + + All trademarks and registered trademarks mentioned herein are the + property of their respective owners. + + ---------------------------------------------------------------------- + + Chinese/Japanese Word Break Dictionary Data (cjdict.txt) + + # The Google Chrome software developed by Google is licensed under + # the BSD license. Other software included in this distribution is + # provided under other licenses, as set forth below. + # + # The BSD License + # http://opensource.org/licenses/bsd-license.php + # Copyright (C) 2006-2008, Google Inc. + # + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are met: + # + # Redistributions of source code must retain the above copyright notice, + # this list of conditions and the following disclaimer. + # Redistributions in binary form must reproduce the above + # copyright notice, this list of conditions and the following + # disclaimer in the documentation and/or other materials provided with + # the distribution. + # Neither the name of Google Inc. nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + # CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # + # + # The word list in cjdict.txt are generated by combining three word lists + # listed below with further processing for compound word breaking. The + # frequency is generated with an iterative training against Google web + # corpora. + # + # * Libtabe (Chinese) + # - https://sourceforge.net/project/?group_id=1519 + # - Its license terms and conditions are shown below. + # + # * IPADIC (Japanese) + # - http://chasen.aist-nara.ac.jp/chasen/distribution.html + # - Its license terms and conditions are shown below. + # + # ---------COPYING.libtabe ---- BEGIN-------------------- + # + # /* + # * Copyright (c) 1999 TaBE Project. + # * Copyright (c) 1999 Pai-Hsiang Hsiao. + # * All rights reserved. + # * + # * Redistribution and use in source and binary forms, with or without + # * modification, are permitted provided that the following conditions + # * are met: + # * + # * . Redistributions of source code must retain the above copyright + # * notice, this list of conditions and the following disclaimer. + # * . Redistributions in binary form must reproduce the above copyright + # * notice, this list of conditions and the following disclaimer in + # * the documentation and/or other materials provided with the + # * distribution. + # * . Neither the name of the TaBE Project nor the names of its + # * contributors may be used to endorse or promote products derived + # * from this software without specific prior written permission. + # * + # * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + # * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + # * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + # * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + # * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + # * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + # * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + # * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + # * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + # * OF THE POSSIBILITY OF SUCH DAMAGE. + # */ + # + # /* + # * Copyright (c) 1999 Computer Systems and Communication Lab, + # * Institute of Information Science, Academia + # * Sinica. All rights reserved. + # * + # * Redistribution and use in source and binary forms, with or without + # * modification, are permitted provided that the following conditions + # * are met: + # * + # * . Redistributions of source code must retain the above copyright + # * notice, this list of conditions and the following disclaimer. + # * . Redistributions in binary form must reproduce the above copyright + # * notice, this list of conditions and the following disclaimer in + # * the documentation and/or other materials provided with the + # * distribution. + # * . Neither the name of the Computer Systems and Communication Lab + # * nor the names of its contributors may be used to endorse or + # * promote products derived from this software without specific + # * prior written permission. + # * + # * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + # * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + # * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + # * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + # * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + # * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + # * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + # * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + # * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + # * OF THE POSSIBILITY OF SUCH DAMAGE. + # */ + # + # Copyright 1996 Chih-Hao Tsai @ Beckman Institute, + # University of Illinois + # c-tsai4@uiuc.edu http://casper.beckman.uiuc.edu/~c-tsai4 + # + # ---------------COPYING.libtabe-----END-------------------------------- + # + # + # ---------------COPYING.ipadic-----BEGIN------------------------------- + # + # Copyright 2000, 2001, 2002, 2003 Nara Institute of Science + # and Technology. All Rights Reserved. + # + # Use, reproduction, and distribution of this software is permitted. + # Any copy of this software, whether in its original form or modified, + # must include both the above copyright notice and the following + # paragraphs. + # + # Nara Institute of Science and Technology (NAIST), + # the copyright holders, disclaims all warranties with regard to this + # software, including all implied warranties of merchantability and + # fitness, in no event shall NAIST be liable for + # any special, indirect or consequential damages or any damages + # whatsoever resulting from loss of use, data or profits, whether in an + # action of contract, negligence or other tortuous action, arising out + # of or in connection with the use or performance of this software. + # + # A large portion of the dictionary entries + # originate from ICOT Free Software. The following conditions for ICOT + # Free Software applies to the current dictionary as well. + # + # Each User may also freely distribute the Program, whether in its + # original form or modified, to any third party or parties, PROVIDED + # that the provisions of Section 3 ("NO WARRANTY") will ALWAYS appear + # on, or be attached to, the Program, which is distributed substantially + # in the same form as set out herein and that such intended + # distribution, if actually made, will neither violate or otherwise + # contravene any of the laws and regulations of the countries having + # jurisdiction over the User or the intended distribution itself. + # + # NO WARRANTY + # + # The program was produced on an experimental basis in the course of the + # research and development conducted during the project and is provided + # to users as so produced on an experimental basis. Accordingly, the + # program is provided without any warranty whatsoever, whether express, + # implied, statutory or otherwise. The term "warranty" used herein + # includes, but is not limited to, any warranty of the quality, + # performance, merchantability and fitness for a particular purpose of + # the program and the nonexistence of any infringement or violation of + # any right of any third party. + # + # Each user of the program will agree and understand, and be deemed to + # have agreed and understood, that there is no warranty whatsoever for + # the program and, accordingly, the entire risk arising from or + # otherwise connected with the program is assumed by the user. + # + # Therefore, neither ICOT, the copyright holder, or any other + # organization that participated in or was otherwise related to the + # development of the program and their respective officials, directors, + # officers and other employees shall be held liable for any and all + # damages, including, without limitation, general, special, incidental + # and consequential damages, arising out of or otherwise in connection + # with the use or inability to use the program or any product, material + # or result produced or otherwise obtained by using the program, + # regardless of whether they have been advised of, or otherwise had + # knowledge of, the possibility of such damages at any time during the + # project or thereafter. Each user will be deemed to have agreed to the + # foregoing by his or her commencement of use of the program. The term + # "use" as used herein includes, but is not limited to, the use, + # modification, copying and distribution of the program and the + # production of secondary products from the program. + # + # In the case where the program, whether in its original form or + # modified, was distributed or delivered to or received by a user from + # any person, organization or entity other than ICOT, unless it makes or + # grants independently of ICOT any specific warranty to the user in + # writing, such person, organization or entity, will also be exempted + # from and not be held liable to the user for any such damages as noted + # above as far as the program is concerned. + # + # ---------------COPYING.ipadic-----END---------------------------------- + + ---------------------------------------------------------------------- + + Lao Word Break Dictionary Data (laodict.txt) + + # Copyright (C) 2016 and later: Unicode, Inc. and others. + # License & terms of use: http://www.unicode.org/copyright.html + # Copyright (c) 2015 International Business Machines Corporation + # and others. All Rights Reserved. + # + # Project: https://github.com/rober42539/lao-dictionary + # Dictionary: https://github.com/rober42539/lao-dictionary/laodict.txt + # License: https://github.com/rober42539/lao-dictionary/LICENSE.txt + # (copied below) + # + # This file is derived from the above dictionary version of Nov 22, 2020 + # ---------------------------------------------------------------------- + # Copyright (C) 2013 Brian Eugene Wilson, Robert Martin Campbell. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are met: + # + # Redistributions of source code must retain the above copyright notice, this + # list of conditions and the following disclaimer. Redistributions in binary + # form must reproduce the above copyright notice, this list of conditions and + # the following disclaimer in the documentation and/or other materials + # provided with the distribution. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + # COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + # OF THE POSSIBILITY OF SUCH DAMAGE. + # -------------------------------------------------------------------------- + + ---------------------------------------------------------------------- + + Burmese Word Break Dictionary Data (burmesedict.txt) + + # Copyright (c) 2014 International Business Machines Corporation + # and others. All Rights Reserved. + # + # This list is part of a project hosted at: + # github.com/kanyawtech/myanmar-karen-word-lists + # + # -------------------------------------------------------------------------- + # Copyright (c) 2013, LeRoy Benjamin Sharon + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions + # are met: Redistributions of source code must retain the above + # copyright notice, this list of conditions and the following + # disclaimer. Redistributions in binary form must reproduce the + # above copyright notice, this list of conditions and the following + # disclaimer in the documentation and/or other materials provided + # with the distribution. + # + # Neither the name Myanmar Karen Word Lists, nor the names of its + # contributors may be used to endorse or promote products derived + # from this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + # CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS + # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + # TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF + # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + # SUCH DAMAGE. + # -------------------------------------------------------------------------- + + ---------------------------------------------------------------------- + + Time Zone Database + + ICU uses the public domain data and code derived from Time Zone + Database for its time zone support. The ownership of the TZ database + is explained in BCP 175: Procedure for Maintaining the Time Zone + Database section 7. + + # 7. Database Ownership + # + # The TZ database itself is not an IETF Contribution or an IETF + # document. Rather it is a pre-existing and regularly updated work + # that is in the public domain, and is intended to remain in the + # public domain. Therefore, BCPs 78 [RFC5378] and 79 [RFC3979] do + # not apply to the TZ Database or contributions that individuals make + # to it. Should any claims be made and substantiated against the TZ + # Database, the organization that is providing the IANA + # Considerations defined in this RFC, under the memorandum of + # understanding with the IETF, currently ICANN, may act in accordance + # with all competent court orders. No ownership claims will be made + # by ICANN or the IETF Trust on the database or the code. Any person + # making a contribution to the database or code waives all rights to + # future claims in that contribution or in the TZ Database. + + ---------------------------------------------------------------------- + + Google double-conversion + + Copyright 2006-2011, the V8 project authors. All rights reserved. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + ---------------------------------------------------------------------- + + JSON parsing library (nlohmann/json) + + File: vendor/json/upstream/single_include/nlohmann/json.hpp (only for ICU4C) + + MIT License + + Copyright (c) 2013-2022 Niels Lohmann + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + + ---------------------------------------------------------------------- + + File: aclocal.m4 (only for ICU4C) + Section: pkg.m4 - Macros to locate and utilise pkg-config. + + Copyright © 2004 Scott James Remnant . + Copyright © 2012-2015 Dan Nicholson + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. + + As a special exception to the GNU General Public License, if you + distribute this file as part of a program that contains a + configuration script generated by Autoconf, you may include it under + the same distribution terms that you use for the rest of that + program. + + (The condition for the exception is fulfilled because + ICU4C includes a configuration script generated by Autoconf, + namely the `configure` script.) + + ---------------------------------------------------------------------- + + File: config.guess (only for ICU4C) + + This file is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . + + As a special exception to the GNU General Public License, if you + distribute this file as part of a program that contains a + configuration script generated by Autoconf, you may include it under + the same distribution terms that you use for the rest of that + program. This Exception is an additional permission under section 7 + of the GNU General Public License, version 3 ("GPLv3"). + + (The condition for the exception is fulfilled because + ICU4C includes a configuration script generated by Autoconf, + namely the `configure` script.) + + ---------------------------------------------------------------------- + + File: install-sh (only for ICU4C) + + Copyright 1991 by the Massachusetts Institute of Technology + + Permission to use, copy, modify, distribute, and sell this software and its + documentation for any purpose is hereby granted without fee, provided that + the above copyright notice appear in all copies and that both that + copyright notice and this permission notice appear in supporting + documentation, and that the name of M.I.T. not be used in advertising or + publicity pertaining to distribution of the software without specific, + written prior permission. M.I.T. makes no representations about the + suitability of this software for any purpose. It is provided "as is" + without express or implied warranty. + """ + +- libuv, located at deps/uv, is licensed as follows: + """ + Copyright (c) 2015-present libuv project contributors. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + This license applies to parts of libuv originating from the + https://github.com/joyent/libuv repository: + + ==== + + Copyright Joyent, Inc. and other Node contributors. All rights reserved. + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + + ==== + + This license applies to all parts of libuv that are not externally + maintained libraries. + + The externally maintained libraries used by libuv are: + + - tree.h (from FreeBSD), copyright Niels Provos. Two clause BSD license. + + - inet_pton and inet_ntop implementations, contained in src/inet.c, are + copyright the Internet Systems Consortium, Inc., and licensed under the ISC + license. + """ + +- llhttp, located at deps/llhttp, is licensed as follows: + """ + This software is licensed under the MIT License. + + Copyright Fedor Indutny, 2018. + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to permit + persons to whom the Software is furnished to do so, subject to the + following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + USE OR OTHER DEALINGS IN THE SOFTWARE. + """ + +- corepack, located at deps/corepack, is licensed as follows: + """ + **Copyright © Corepack contributors** + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + """ + +- undici, located at deps/undici, is licensed as follows: + """ + MIT License + + Copyright (c) Matteo Collina and Undici contributors + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + """ + +- postject, located at test/fixtures/postject-copy, is licensed as follows: + """ + Postject is licensed for use as follows: + + """ + MIT License + + Copyright (c) 2022 Postman, Inc + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + """ + + The Postject license applies to all parts of Postject that are not externally + maintained libraries. + + The externally maintained libraries used by Postject are: + + - LIEF, located at vendor/LIEF, is licensed as follows: + """ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2017 - 2022 R. Thomas + Copyright 2017 - 2022 Quarkslab + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + """ + """ + +- OpenSSL, located at deps/openssl, is licensed as follows: + """ + Apache License + Version 2.0, January 2004 + https://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + """ + +- Punycode.js, located at lib/punycode.js, is licensed as follows: + """ + Copyright Mathias Bynens + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + """ + +- V8, located at deps/v8, is licensed as follows: + """ + This license applies to all parts of V8 that are not externally + maintained libraries. The externally maintained libraries used by V8 + are: + + - PCRE test suite, located in + test/mjsunit/third_party/regexp-pcre/regexp-pcre.js. This is based on the + test suite from PCRE-7.3, which is copyrighted by the University + of Cambridge and Google, Inc. The copyright notice and license + are embedded in regexp-pcre.js. + + - Layout tests, located in test/mjsunit/third_party/object-keys. These are + based on layout tests from webkit.org which are copyrighted by + Apple Computer, Inc. and released under a 3-clause BSD license. + + - Strongtalk assembler, the basis of the files assembler-arm-inl.h, + assembler-arm.cc, assembler-arm.h, assembler-ia32-inl.h, + assembler-ia32.cc, assembler-ia32.h, assembler-x64-inl.h, + assembler-x64.cc, assembler-x64.h, assembler.cc and assembler.h. + This code is copyrighted by Sun Microsystems Inc. and released + under a 3-clause BSD license. + + - Valgrind client API header, located at src/third_party/valgrind/valgrind.h + This is released under the BSD license. + + - The Wasm C/C++ API headers, located at third_party/wasm-api/wasm.{h,hh} + This is released under the Apache license. The API's upstream prototype + implementation also formed the basis of V8's implementation in + src/wasm/c-api.cc. + + These libraries have their own licenses; we recommend you read them, + as their terms may differ from the terms below. + + Further license information can be found in LICENSE files located in + sub-directories. + + Copyright 2014, the V8 project authors. All rights reserved. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + """ + +- SipHash, located at deps/v8/src/third_party/siphash, is licensed as follows: + """ + SipHash reference C implementation + + Copyright (c) 2016 Jean-Philippe Aumasson + + To the extent possible under law, the author(s) have dedicated all + copyright and related and neighboring rights to this software to the public + domain worldwide. This software is distributed without any warranty. + """ + +- zlib, located at deps/zlib, is licensed as follows: + """ + zlib.h -- interface of the 'zlib' general purpose compression library + version 1.3.1, January 22nd, 2024 + + Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Jean-loup Gailly Mark Adler + jloup@gzip.org madler@alumni.caltech.edu + """ + +- simdjson, located at deps/simdjson, is licensed as follows: + """ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2025 The simdjson authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + """ + +- simdutf, located at deps/simdutf, is licensed as follows: + """ + Copyright 2021 The simdutf authors + + Permission is hereby granted, free of charge, to any person obtaining a copy of + this software and associated documentation files (the "Software"), to deal in + the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + """ + +- ada, located at deps/ada, is licensed as follows: + """ + Copyright 2023 Yagiz Nizipli and Daniel Lemire + + Permission is hereby granted, free of charge, to any person obtaining a copy of + this software and associated documentation files (the "Software"), to deal in + the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + """ + +- minimatch, located at deps/minimatch, is licensed as follows: + """ + The ISC License + + Copyright (c) 2011-2023 Isaac Z. Schlueter and Contributors + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR + IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + """ + +- npm, located at deps/npm, is licensed as follows: + """ + The npm application + Copyright (c) npm, Inc. and Contributors + Licensed on the terms of The Artistic License 2.0 + + Node package dependencies of the npm application + Copyright (c) their respective copyright owners + Licensed on their respective license terms + + The npm public registry at https://registry.npmjs.org + and the npm website at https://www.npmjs.com + Operated by npm, Inc. + Use governed by terms published on https://www.npmjs.com + + "Node.js" + Trademark Joyent, Inc., https://joyent.com + Neither npm nor npm, Inc. are affiliated with Joyent, Inc. + + The Node.js application + Project of Node Foundation, https://nodejs.org + + The npm Logo + Copyright (c) Mathias Pettersson and Brian Hammond + + "Gubblebum Blocky" typeface + Copyright (c) Tjarda Koster, https://jelloween.deviantart.com + Used with permission + + -------- + + The Artistic License 2.0 + + Copyright (c) 2000-2006, The Perl Foundation. + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + This license establishes the terms under which a given free software + Package may be copied, modified, distributed, and/or redistributed. + The intent is that the Copyright Holder maintains some artistic + control over the development of that Package while still keeping the + Package available as open source and free software. + + You are always permitted to make arrangements wholly outside of this + license directly with the Copyright Holder of a given Package. If the + terms of this license do not permit the full use that you propose to + make of the Package, you should contact the Copyright Holder and seek + a different licensing arrangement. + + Definitions + + "Copyright Holder" means the individual(s) or organization(s) + named in the copyright notice for the entire Package. + + "Contributor" means any party that has contributed code or other + material to the Package, in accordance with the Copyright Holder's + procedures. + + "You" and "your" means any person who would like to copy, + distribute, or modify the Package. + + "Package" means the collection of files distributed by the + Copyright Holder, and derivatives of that collection and/or of + those files. A given Package may consist of either the Standard + Version, or a Modified Version. + + "Distribute" means providing a copy of the Package or making it + accessible to anyone else, or in the case of a company or + organization, to others outside of your company or organization. + + "Distributor Fee" means any fee that you charge for Distributing + this Package or providing support for this Package to another + party. It does not mean licensing fees. + + "Standard Version" refers to the Package if it has not been + modified, or has been modified only in ways explicitly requested + by the Copyright Holder. + + "Modified Version" means the Package, if it has been changed, and + such changes were not explicitly requested by the Copyright + Holder. + + "Original License" means this Artistic License as Distributed with + the Standard Version of the Package, in its current version or as + it may be modified by The Perl Foundation in the future. + + "Source" form means the source code, documentation source, and + configuration files for the Package. + + "Compiled" form means the compiled bytecode, object code, binary, + or any other form resulting from mechanical transformation or + translation of the Source form. + + Permission for Use and Modification Without Distribution + + (1) You are permitted to use the Standard Version and create and use + Modified Versions for any purpose without restriction, provided that + you do not Distribute the Modified Version. + + Permissions for Redistribution of the Standard Version + + (2) You may Distribute verbatim copies of the Source form of the + Standard Version of this Package in any medium without restriction, + either gratis or for a Distributor Fee, provided that you duplicate + all of the original copyright notices and associated disclaimers. At + your discretion, such verbatim copies may or may not include a + Compiled form of the Package. + + (3) You may apply any bug fixes, portability changes, and other + modifications made available from the Copyright Holder. The resulting + Package will still be considered the Standard Version, and as such + will be subject to the Original License. + + Distribution of Modified Versions of the Package as Source + + (4) You may Distribute your Modified Version as Source (either gratis + or for a Distributor Fee, and with or without a Compiled form of the + Modified Version) provided that you clearly document how it differs + from the Standard Version, including, but not limited to, documenting + any non-standard features, executables, or modules, and provided that + you do at least ONE of the following: + + (a) make the Modified Version available to the Copyright Holder + of the Standard Version, under the Original License, so that the + Copyright Holder may include your modifications in the Standard + Version. + + (b) ensure that installation of your Modified Version does not + prevent the user installing or running the Standard Version. In + addition, the Modified Version must bear a name that is different + from the name of the Standard Version. + + (c) allow anyone who receives a copy of the Modified Version to + make the Source form of the Modified Version available to others + under + + (i) the Original License or + + (ii) a license that permits the licensee to freely copy, + modify and redistribute the Modified Version using the same + licensing terms that apply to the copy that the licensee + received, and requires that the Source form of the Modified + Version, and of any works derived from it, be made freely + available in that license fees are prohibited but Distributor + Fees are allowed. + + Distribution of Compiled Forms of the Standard Version + or Modified Versions without the Source + + (5) You may Distribute Compiled forms of the Standard Version without + the Source, provided that you include complete instructions on how to + get the Source of the Standard Version. Such instructions must be + valid at the time of your distribution. If these instructions, at any + time while you are carrying out such distribution, become invalid, you + must provide new instructions on demand or cease further distribution. + If you provide valid instructions or cease distribution within thirty + days after you become aware that the instructions are invalid, then + you do not forfeit any of your rights under this license. + + (6) You may Distribute a Modified Version in Compiled form without + the Source, provided that you comply with Section 4 with respect to + the Source of the Modified Version. + + Aggregating or Linking the Package + + (7) You may aggregate the Package (either the Standard Version or + Modified Version) with other packages and Distribute the resulting + aggregation provided that you do not charge a licensing fee for the + Package. Distributor Fees are permitted, and licensing fees for other + components in the aggregation are permitted. The terms of this license + apply to the use and Distribution of the Standard or Modified Versions + as included in the aggregation. + + (8) You are permitted to link Modified and Standard Versions with + other works, to embed the Package in a larger work of your own, or to + build stand-alone binary or bytecode versions of applications that + include the Package, and Distribute the result without restriction, + provided the result does not expose a direct interface to the Package. + + Items That are Not Considered Part of a Modified Version + + (9) Works (including, but not limited to, modules and scripts) that + merely extend or make use of the Package, do not, by themselves, cause + the Package to be a Modified Version. In addition, such works are not + considered parts of the Package itself, and are not subject to the + terms of this license. + + General Provisions + + (10) Any use, modification, and distribution of the Standard or + Modified Versions is governed by this Artistic License. By using, + modifying or distributing the Package, you accept this license. Do not + use, modify, or distribute the Package, if you do not accept this + license. + + (11) If your Modified Version has been derived from a Modified + Version made by someone other than you, you are nevertheless required + to ensure that your Modified Version complies with the requirements of + this license. + + (12) This license does not grant you the right to use any trademark, + service mark, tradename, or logo of the Copyright Holder. + + (13) This license includes the non-exclusive, worldwide, + free-of-charge patent license to make, have made, use, offer to sell, + sell, import and otherwise transfer the Package with respect to any + patent claims licensable by the Copyright Holder that are necessarily + infringed by the Package. If you institute patent litigation + (including a cross-claim or counterclaim) against any party alleging + that the Package constitutes direct or contributory patent + infringement, then this Artistic License to you shall terminate on the + date that such litigation is filed. + + (14) Disclaimer of Warranty: + THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS + IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED + WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR + NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL + LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL + DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF + ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + -------- + """ + +- GYP, located at tools/gyp, is licensed as follows: + """ + Copyright (c) 2020 Node.js contributors. All rights reserved. + Copyright (c) 2009 Google Inc. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + """ + +- inspector_protocol, located at deps/inspector_protocol, is licensed as follows: + """ + // Copyright 2016 The Chromium Authors. + // + // Redistribution and use in source and binary forms, with or without + // modification, are permitted provided that the following conditions are + // met: + // + // * Redistributions of source code must retain the above copyright + // notice, this list of conditions and the following disclaimer. + // * Redistributions in binary form must reproduce the above + // copyright notice, this list of conditions and the following disclaimer + // in the documentation and/or other materials provided with the + // distribution. + // * Neither the name of Google Inc. nor the names of its + // contributors may be used to endorse or promote products derived from + // this software without specific prior written permission. + // + // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + """ + +- jinja2, located at tools/inspector_protocol/jinja2, is licensed as follows: + """ + Copyright (c) 2009 by the Jinja Team, see AUTHORS for more details. + + Some rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + * The names of the contributors may not be used to endorse or + promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + """ + +- markupsafe, located at tools/inspector_protocol/markupsafe, is licensed as follows: + """ + Copyright (c) 2010 by Armin Ronacher and contributors. See AUTHORS + for more details. + + Some rights reserved. + + Redistribution and use in source and binary forms of the software as well + as documentation, with or without modification, are permitted provided + that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + * The names of the contributors may not be used to endorse or + promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE AND DOCUMENTATION IS PROVIDED BY THE COPYRIGHT HOLDERS AND + CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT + NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE AND DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH + DAMAGE. + """ + +- cpplint.py, located at tools/cpplint.py, is licensed as follows: + """ + Copyright (c) 2009 Google Inc. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + """ + +- gypi_to_gn.py, located at tools/gypi_to_gn.py, is licensed as follows: + """ + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + """ + +- gtest, located at deps/googletest, is licensed as follows: + """ + Copyright 2008, Google Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + """ + +- nghttp2, located at deps/nghttp2, is licensed as follows: + """ + The MIT License + + Copyright (c) 2012, 2014, 2015, 2016 Tatsuhiro Tsujikawa + Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + """ + +- large_pages, located at src/large_pages, is licensed as follows: + """ + Copyright (C) 2018 Intel Corporation + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom + the Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES + OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE + OR OTHER DEALINGS IN THE SOFTWARE. + """ + +- caja, located at lib/internal/freeze_intrinsics.js, is licensed as follows: + """ + Adapted from SES/Caja - Copyright (C) 2011 Google Inc. + Copyright (C) 2018 Agoric + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + """ + +- brotli, located at deps/brotli, is licensed as follows: + """ + Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + """ + +- zstd, located at deps/zstd, is licensed as follows: + """ + BSD License + + For Zstandard software + + Copyright (c) Meta Platforms, Inc. and affiliates. All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name Facebook, nor Meta, nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + """ + +- HdrHistogram, located at deps/histogram, is licensed as follows: + """ + The code in this repository code was Written by Gil Tene, Michael Barker, + and Matt Warren, and released to the public domain, as explained at + http://creativecommons.org/publicdomain/zero/1.0/ + + For users of this code who wish to consume it under the "BSD" license + rather than under the public domain or CC0 contribution text mentioned + above, the code found under this directory is *also* provided under the + following license (commonly referred to as the BSD 2-Clause License). This + license does not detract from the above stated release of the code into + the public domain, and simply represents an additional license granted by + the Author. + + ----------------------------------------------------------------------------- + ** Beginning of "BSD 2-Clause License" text. ** + + Copyright (c) 2012, 2013, 2014 Gil Tene + Copyright (c) 2014 Michael Barker + Copyright (c) 2014 Matt Warren + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + THE POSSIBILITY OF SUCH DAMAGE. + """ + +- node-heapdump, located at src/heap_utils.cc, is licensed as follows: + """ + ISC License + + Copyright (c) 2012, Ben Noordhuis + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + === src/compat.h src/compat-inl.h === + + ISC License + + Copyright (c) 2014, StrongLoop Inc. + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + """ + +- rimraf, located at lib/internal/fs/rimraf.js, is licensed as follows: + """ + The ISC License + + Copyright (c) Isaac Z. Schlueter and Contributors + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR + IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + """ + +- uvwasi, located at deps/uvwasi, is licensed as follows: + """ + MIT License + + Copyright (c) 2019 Colin Ihrig and Contributors + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + """ + +- ngtcp2, located at deps/ngtcp2/ngtcp2/, is licensed as follows: + """ + The MIT License + + Copyright (c) 2016 ngtcp2 contributors + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + """ + +- nghttp3, located at deps/ngtcp2/nghttp3/, is licensed as follows: + """ + The MIT License + + Copyright (c) 2019 nghttp3 contributors + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + """ + +- node-fs-extra, located at lib/internal/fs/cp, is licensed as follows: + """ + (The MIT License) + + Copyright (c) 2011-2017 JP Richardson + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files + (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, + merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE + WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS + OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + """ + +- on-exit-leak-free, located at lib/internal/process/finalization, is licensed as follows: + """ + MIT License + + Copyright (c) 2021 Matteo Collina + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + """ + +- sonic-boom, located at lib/internal/streams/fast-utf8-stream.js, is licensed as follows: + """ + MIT License + + Copyright (c) 2017 Matteo Collina + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + """ diff --git a/licenses/README.md b/licenses/README.md new file mode 100644 index 000000000..c811a4f76 --- /dev/null +++ b/licenses/README.md @@ -0,0 +1,68 @@ +# Preserved licenses and attribution + +Start with [THIRD_PARTY_NOTICES.md](../THIRD_PARTY_NOTICES.md) for the distinction +between distributed material and separately obtained tools. These files retain +upstream texts; they do not change [REA's MIT license](../LICENSE). + +| Files | Provenance and scope | +| ------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `npm-dependencies.txt` | Every package path in the root lockfile, with its exact version, declared license, scope, download URL, and integrity. Includes development and optional platform entries. | +| `npm-runtime-notices.txt` | Original license, copyright, and NOTICE texts collected from integrity-verified locked runtime npm archives across all platforms; also the license of Rolldown's generated runtime helpers. The archive manifest's name and version are checked. | +| `nativeaot-parser-MIT.txt` | Original Washi notice for derived NativeAOT parser code; source revision is recorded in the parser and the root notices. | +| `dotnet-runtime-MIT.txt` | Original .NET Foundation MIT text from the NativeAOT reference revision `a3b2d40328be0be3f8dd43f0e5cc925b8827b044`. | +| `ghidra-12.1.4-{LICENSE,NOTICE,DISCLAIMER}.txt` | Unchanged top-level documents from `Ghidra_12.1.4_build`. Ghidra is not bundled; these reference copies do not replace its component and GPL support-program notices. The US-government-specific disclaimer applies to Ghidra, not to REA. | +| `cfworker-MIT.txt`, `xterm-MIT.txt` | Original notices missing from their published runtime npm archives, recovered from the releases' upstream Git revisions. They are included in the corresponding runtime entries. | +| `Apache-2.0.txt`, `MIT-template.txt` | Standard license texts for explicitly documented upstream notice gaps. The MIT placeholders are not an attribution to an inferred author or year. | +| `frida-17.23.2-COPYING.txt`, `LGPL-2.0.txt` | Unchanged licensing supplements for the optional Frida dependency: tagged Frida wxWindows notice and GNU Library GPL v2 text. The npm archive and tagged Node binding omit a standalone license/copyright document; these texts do not recover binding or prebuild-component attribution. | +| `MinGW-w64-runtime.txt` | Upstream's combined runtime copyright and license notices, snapshot from v12.0.0, for the statically linked Windows addon. This is a notice snapshot, not a pin of the compiler used in release CI. | +| `GPL-3.0.txt`, `GCC-Runtime-Library-Exception-3.1.txt` | Unchanged GPLv3 and GCC runtime exception texts from GCC 14.2.0. The exception permits eligible compiled combinations under its conditions; the runtime keeps its own license. This snapshot does not assert that every release uses GCC 14.2.0. | +| `Node-22.19.0-LICENSE.txt` | The original Node 22.19.0 license and third-party notices. The Windows addon uses Node-API headers from that release; the complete Node runtime and all components listed in this reference document are not bundled. | +| `upstream-sources.json` | Source URLs and SHA-256 digests for the new unchanged reference and supplemental texts. These digests identify the preserved local texts. | + +Additional preserved originals live at +[evmole/LICENSE](../third_party/evmole/LICENSE), +[pwndbg/LICENSE.md](../third_party/pwndbg/LICENSE.md), and +[the website dinosaur notice](../website/public/assets/licenses/dinosaur.txt). + +## Collection scope and maintenance + +The inventory and runtime texts were prepared from the root lockfile. The +collection downloaded the locked npm archives, checked their lockfile +integrity and package identity, and read license/NOTICE/copyright documents +without installing packages or executing lifecycle scripts. It includes +optional platform packages that may not be present in one local installation. +Temporary archives were removed after collection. + +For releases that omit original documents, the collection uses pinned upstream +texts, embedded source/README license sections, or the same release's parent +notice for the `@lydell/node-pty` prebuilt family. `evmole@0.9.3` uses the existing +preserved upstream license. `clean-git-ref@2.0.1` and `minimisted@2.0.1` provide +only license and author metadata: their missing original copyright documents +remain explicitly identified in the runtime texts. Do not describe those +entries as complete recovered attribution. + +`frida@17.23.2` also lacks an original standalone notice in its npm archive and +tagged Node source. Its declared license and the preserved licensing supplements +are recorded explicitly without inferring a copyright holder or year. + +These records do not establish the legal accuracy of upstream metadata or +prove that every upstream source-file attribution has been supplied in an +archive. Review and refresh them when dependencies change; compare reference +texts with the sources and SHA-256 digests in `upstream-sources.json`. + +When updating engines, copied code, website assets, or the Windows release +toolchain, review their actual upstream notices as well. The Linux MinGW-w64 +compiler in release CI is not version-pinned by REA: compare its installed +runtime/component notices with the retained snapshots and update them if they +differ. Do not assume that a compiler change leaves redistribution requirements +unchanged. Preserve applicable originals with any additionally bundled engine; +top-level reference copies alone may not cover its entire distribution. + +Generate the exact locked inventory with `npm run licenses:generate`. After +refreshing verified runtime notices, update their header fingerprint to the +generator's reported `runtime_dependency_fingerprint`, then run +`npm run licenses:check`; `docs:check` also runs this check. It compares the +inventory, runtime package identities, +license declarations, archive URLs/integrity, runtime dependency fingerprint, +and preserved reference digests. It does not verify legal completeness or +replace inspection of original upstream notices. diff --git a/licenses/cfworker-MIT.txt b/licenses/cfworker-MIT.txt new file mode 100644 index 000000000..85bcd787b --- /dev/null +++ b/licenses/cfworker-MIT.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Jeremy Danyow + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/dotnet-runtime-MIT.txt b/licenses/dotnet-runtime-MIT.txt new file mode 100644 index 000000000..984713a49 --- /dev/null +++ b/licenses/dotnet-runtime-MIT.txt @@ -0,0 +1,23 @@ +The MIT License (MIT) + +Copyright (c) .NET Foundation and Contributors + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/frida-17.23.2-COPYING.txt b/licenses/frida-17.23.2-COPYING.txt new file mode 100644 index 000000000..b01d49c67 --- /dev/null +++ b/licenses/frida-17.23.2-COPYING.txt @@ -0,0 +1,50 @@ + wxWindows Library Licence, Version 3.1 + ====================================== + +Copyright (c) 1998-2005 Julian Smart, Robert Roebling et al + +Everyone is permitted to copy and distribute verbatim copies +of this licence document, but changing it is not allowed. + + WXWINDOWS LIBRARY LICENCE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +This library is free software; you can redistribute it and/or modify it +under the terms of the GNU Library General Public Licence as published by +the Free Software Foundation; either version 2 of the Licence, or (at your +option) any later version. + +This library is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public +Licence for more details. + +You should have received a copy of the GNU Library General Public Licence +along with this software, usually in a file named COPYING.LIB. If not, +write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth +Floor, Boston, MA 02110-1301 USA. + +EXCEPTION NOTICE + +1. As a special exception, the copyright holders of this library give +permission for additional uses of the text contained in this release of the +library as licenced under the wxWindows Library Licence, applying either +version 3.1 of the Licence, or (at your option) any later version of the +Licence as published by the copyright holders of version 3.1 of the Licence +document. + +2. The exception is that you may use, copy, link, modify and distribute +under your own terms, binary object code versions of works based on the +Library. + +3. If you copy code from files distributed under the terms of the GNU +General Public Licence or the GNU Library General Public Licence into a +copy of this library, as this licence permits, the exception does not apply +to the code that you add in this way. To avoid misleading anyone as to the +status of such modified files, you must delete this exception notice from +such code and/or adjust the licensing conditions notice accordingly. + +4. If you write modifications of your own for this library, it is your +choice whether to permit this exception to apply to your modifications. If +you do not wish that, you must delete the exception notice from such code +and/or adjust the licensing conditions notice accordingly. diff --git a/licenses/ghidra-12.1.4-DISCLAIMER.txt b/licenses/ghidra-12.1.4-DISCLAIMER.txt new file mode 100644 index 000000000..a33b5994f --- /dev/null +++ b/licenses/ghidra-12.1.4-DISCLAIMER.txt @@ -0,0 +1,13 @@ +# Disclaimer of Warranty + +This Work is provided "AS IS." +Any express or implied warranties, including but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. +In no event shall the United States Government be liable for any direct, indirect, incidental, special, exemplary or consequential damages (including, but not limited to, procurement of substitute goods or services, loss of use, data or profits, or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this Work, even if advised of the possibility of such damage. + +The User of this Work agrees to hold harmless and indemnify the United States Government, its agents and employees from every claim or liability (whether in tort or in contract), including attorney's fees, court costs, and expenses, arising in direct consequence of Recipient's use of the item, including, but not limited to, claims or liabilities made for injury to or death of personnel of User or third parties, damage to or destruction of property of User or third parties, and infringement or other violations of intellectual property or technical data rights. + +# Disclaimer of Endorsement + +Nothing in this Work is intended to constitute an endorsement, explicit or implied, by the United States Government of any particular manufacturer's product or service. + +Reference herein to any specific commercial product, process, or service by trade name, trademark, manufacturer, or otherwise, in this Work does not constitute an endorsement, recommendation, or favoring by the United States Government and shall not be used for advertising or product endorsement purposes. diff --git a/licenses/ghidra-12.1.4-LICENSE.txt b/licenses/ghidra-12.1.4-LICENSE.txt new file mode 100644 index 000000000..261eeb9e9 --- /dev/null +++ b/licenses/ghidra-12.1.4-LICENSE.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/ghidra-12.1.4-NOTICE.txt b/licenses/ghidra-12.1.4-NOTICE.txt new file mode 100644 index 000000000..a88075667 --- /dev/null +++ b/licenses/ghidra-12.1.4-NOTICE.txt @@ -0,0 +1,49 @@ +Ghidra + +This product includes software developed at National Security Agency +(https://www.nsa.gov) + +Portions of this product were created by the U.S. Government and not subject to +U.S. copyright protections under 17 U.S.C. + +The remaining portions are copyright their respective authors and have been +contributed under the terms of one or more open source licenses, and made +available to you under the terms of those licenses. (See LICENSE) + + + +Licensing Intent + +The intent is that this software and documentation ("Project") should be treated +as if it is licensed under the license associated with the Project ("License") +in the LICENSE file. However, because we are part of the United States (U.S.) +Federal Government, it is not that simple. + +The portions of this Project written by U.S. Federal Government employees within +the scope of their federal employment are ineligible for copyright protection in +the U.S.; this is generally understood to mean that these portions of the +Project are placed in the public domain. + +In countries where copyright protection is available (which does not include the +U.S.), contributions made by U.S. Federal Government employees are released +under the License. Merged contributions from private contributors are released +under the License. + +The Ghidra software is released under the Apache License, Version 2.0 +("Apache 2.0"). + +In addition, each module may contain numerous 3rd party components (libraries, +icons, etc.) that each have their own license which is compatible with Apache +2.0. Each module has a LICENSE.txt file that lists each license used in that +module and the 3rd party files that fall under that license. The license files +for each license used by Ghidra can be found in the licenses directory at the +installation root. + +Also, in the GPL directory, there are several stand-alone support programs that +are released using the GPL 3 license. Ghidra executes these programs as needed +and parses the output to get the desired results. There is a licenses directory +under the GPL directory that has the GPL license files. + +Consistent with the inbound=outbound model, contributions to any module must be +made available, by the contributor, under the applicable license(s). Please read +the Legal section of the CONTRIBUTING.md guide. diff --git a/licenses/npm-dependencies.txt b/licenses/npm-dependencies.txt new file mode 100644 index 000000000..ce45f7459 --- /dev/null +++ b/licenses/npm-dependencies.txt @@ -0,0 +1,2937 @@ +REA npm dependency inventory +Prepared from the root package-lock.json; refresh this inventory when locked dependencies change. +License identifiers are upstream lockfile declarations, not a legal assessment. +Runtime includes transitive and optional platform packages; development includes build, test and website tooling. +Locked package entries: 586; runtime: 174. +Full runtime copyright/license/NOTICE texts: npm-runtime-notices.txt. + +@algolia/abtesting@1.25.0 | development | MIT + Lockfile path: node_modules/@algolia/abtesting + Package: https://www.npmjs.com/package/@algolia/abtesting/v/1.25.0 + Archive: https://registry.npmjs.org/@algolia/abtesting/-/abtesting-1.25.0.tgz + Integrity: sha512-rSTin9Uta23uaewYVQEp8XI9T3iA/zrg0/1G2vhf8oFFDxFL5vybnZ5IQwsVAg4JpKxPX4/WYNKdcfWrZymk7w== +@algolia/autocomplete-core@1.17.7 | development | MIT + Lockfile path: node_modules/@algolia/autocomplete-core + Package: https://www.npmjs.com/package/@algolia/autocomplete-core/v/1.17.7 + Archive: https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.17.7.tgz + Integrity: sha512-BjiPOW6ks90UKl7TwMv7oNQMnzU+t/wk9mgIDi6b1tXpUek7MW0lbNOUHpvam9pe3lVCf4xPFT+lK7s+e+fs7Q== +@algolia/autocomplete-plugin-algolia-insights@1.17.7 | development | MIT + Lockfile path: node_modules/@algolia/autocomplete-plugin-algolia-insights + Package: https://www.npmjs.com/package/@algolia/autocomplete-plugin-algolia-insights/v/1.17.7 + Archive: https://registry.npmjs.org/@algolia/autocomplete-plugin-algolia-insights/-/autocomplete-plugin-algolia-insights-1.17.7.tgz + Integrity: sha512-Jca5Ude6yUOuyzjnz57og7Et3aXjbwCSDf/8onLHSQgw1qW3ALl9mrMWaXb5FmPVkV3EtkD2F/+NkT6VHyPu9A== +@algolia/autocomplete-preset-algolia@1.17.7 | development | MIT + Lockfile path: node_modules/@algolia/autocomplete-preset-algolia + Package: https://www.npmjs.com/package/@algolia/autocomplete-preset-algolia/v/1.17.7 + Archive: https://registry.npmjs.org/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.17.7.tgz + Integrity: sha512-ggOQ950+nwbWROq2MOCIL71RE0DdQZsceqrg32UqnhDz8FlO9rL8ONHNsI2R1MH0tkgVIDKI/D0sMiUchsFdWA== +@algolia/autocomplete-shared@1.17.7 | development | MIT + Lockfile path: node_modules/@algolia/autocomplete-shared + Package: https://www.npmjs.com/package/@algolia/autocomplete-shared/v/1.17.7 + Archive: https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.17.7.tgz + Integrity: sha512-o/1Vurr42U/qskRSuhBH+VKxMvkkUVTLU6WZQr+L5lGZZLYWyhdzWjW0iGXY7EkwRTjBqvN2EsR81yCTGV/kmg== +@algolia/client-abtesting@5.59.0 | development | MIT + Lockfile path: node_modules/@algolia/client-abtesting + Package: https://www.npmjs.com/package/@algolia/client-abtesting/v/5.59.0 + Archive: https://registry.npmjs.org/@algolia/client-abtesting/-/client-abtesting-5.59.0.tgz + Integrity: sha512-bm2XN0hCSMYwStSsCBT0/PUB2BDxoyR1Lnub3c392HMEy9bi8PUSW8vR6zltVEKWG2t4PQFWMD5C07bmJxGgPg== +@algolia/client-analytics@5.59.0 | development | MIT + Lockfile path: node_modules/@algolia/client-analytics + Package: https://www.npmjs.com/package/@algolia/client-analytics/v/5.59.0 + Archive: https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-5.59.0.tgz + Integrity: sha512-XOFPOTa69WuqHR6c5tMgnUUwwqQgNSzMpxmhrgA9KmxRf8WIqEa0cokHJvohk5CYb7CZx0xeSL6Bk2IUJ7Lv7Q== +@algolia/client-common@5.59.0 | development | MIT + Lockfile path: node_modules/@algolia/client-common + Package: https://www.npmjs.com/package/@algolia/client-common/v/5.59.0 + Archive: https://registry.npmjs.org/@algolia/client-common/-/client-common-5.59.0.tgz + Integrity: sha512-PC8ipLOYFKRTfIUY1J3FJxS6ryzWziaXmIX9/sNMoUR8L+XhF7hX2QAeUI87YVl5zujvlYTSOb+HAIqKXDjyHQ== +@algolia/client-insights@5.59.0 | development | MIT + Lockfile path: node_modules/@algolia/client-insights + Package: https://www.npmjs.com/package/@algolia/client-insights/v/5.59.0 + Archive: https://registry.npmjs.org/@algolia/client-insights/-/client-insights-5.59.0.tgz + Integrity: sha512-yFNcCMM5fHiyoR0HuxMrzy+VjDcmhFUZTm2IJ2DHwGsVH3B5SEob4zTmeEZ3j/AZqNnmrJOCKl/tJnBg7+84bA== +@algolia/client-personalization@5.59.0 | development | MIT + Lockfile path: node_modules/@algolia/client-personalization + Package: https://www.npmjs.com/package/@algolia/client-personalization/v/5.59.0 + Archive: https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-5.59.0.tgz + Integrity: sha512-GYja6HkDt2VrQhWmB2cLx3Z5fDwI9no7q+xwCWcFrTPm5CLH9QZvK0XLO9co1FcNIDxxkMaP3AXM39/XcecEOg== +@algolia/client-query-suggestions@5.59.0 | development | MIT + Lockfile path: node_modules/@algolia/client-query-suggestions + Package: https://www.npmjs.com/package/@algolia/client-query-suggestions/v/5.59.0 + Archive: https://registry.npmjs.org/@algolia/client-query-suggestions/-/client-query-suggestions-5.59.0.tgz + Integrity: sha512-Wofg7bMpWh8N5qDDZs0wy6whc+KMmdNsxgrIGp9Ug2s1Bka0uq7AjyckdxReKPHLA0Q1qH8X/SNh0wn2t2X2Lw== +@algolia/client-search@5.59.0 | development | MIT + Lockfile path: node_modules/@algolia/client-search + Package: https://www.npmjs.com/package/@algolia/client-search/v/5.59.0 + Archive: https://registry.npmjs.org/@algolia/client-search/-/client-search-5.59.0.tgz + Integrity: sha512-fHnALZfbEnODczGk14Y/1YBRApp6UEpZUTexGcMUPzY7RDc7q4HN2Y6jh0KUG8Jo9B+q+wOoQEc3ziR0ErbuFg== +@algolia/ingestion@1.59.0 | development | MIT + Lockfile path: node_modules/@algolia/ingestion + Package: https://www.npmjs.com/package/@algolia/ingestion/v/1.59.0 + Archive: https://registry.npmjs.org/@algolia/ingestion/-/ingestion-1.59.0.tgz + Integrity: sha512-Fa38s1mHgoaLCT117sfJ6P78rtxUt93CYxBYpq1VOIcslaF+cH+1h5uikAPsKfxLnsuEDZHiBiaI6eNPTsQMRA== +@algolia/monitoring@1.59.0 | development | MIT + Lockfile path: node_modules/@algolia/monitoring + Package: https://www.npmjs.com/package/@algolia/monitoring/v/1.59.0 + Archive: https://registry.npmjs.org/@algolia/monitoring/-/monitoring-1.59.0.tgz + Integrity: sha512-NyNsRSqM2tF1MX7ZGw/j4rduoEJiQ5wfvbSo/CFVdEzYCjyxbGFRPOZyS/GETJG9rk1TdHOq8NZqKqk/u1fm4g== +@algolia/recommend@5.59.0 | development | MIT + Lockfile path: node_modules/@algolia/recommend + Package: https://www.npmjs.com/package/@algolia/recommend/v/5.59.0 + Archive: https://registry.npmjs.org/@algolia/recommend/-/recommend-5.59.0.tgz + Integrity: sha512-nXBK2uygWtvbCOffMWqqfjjcEtp9enDKY5/2Pw/Hhw8VVaOyK2ThbGK04bNX/Le+qoK1VHYkodWGVTKfw0Otkw== +@algolia/requester-browser-xhr@5.59.0 | development | MIT + Lockfile path: node_modules/@algolia/requester-browser-xhr + Package: https://www.npmjs.com/package/@algolia/requester-browser-xhr/v/5.59.0 + Archive: https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-5.59.0.tgz + Integrity: sha512-yb+4afX/zja8QwX0KmV4/ae2kyYkRknsE79CRusYS2U5D8qwn2wq0cn1x12f3tm3F3+5FgmDdbuGdQTuCLSKMQ== +@algolia/requester-fetch@5.59.0 | development | MIT + Lockfile path: node_modules/@algolia/requester-fetch + Package: https://www.npmjs.com/package/@algolia/requester-fetch/v/5.59.0 + Archive: https://registry.npmjs.org/@algolia/requester-fetch/-/requester-fetch-5.59.0.tgz + Integrity: sha512-Lp52TmpA1QtNmdHzs505Xwf4tgII7RAapkDSF9AAtWIBETcGaTIaXci4Rd9nS6SdaWK1BWTSqAPp5wzh6UN3Ag== +@algolia/requester-node-http@5.59.0 | development | MIT + Lockfile path: node_modules/@algolia/requester-node-http + Package: https://www.npmjs.com/package/@algolia/requester-node-http/v/5.59.0 + Archive: https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-5.59.0.tgz + Integrity: sha512-YYHLEs5rC6oRTFwT7bJaKBR9NSFzikeVHGAT1ffATmUQzR8XqyhHXjoieAUoR7fBU6I5cfy1FVeh5GoRgriuzA== +@babel/helper-string-parser@8.0.0 | runtime | MIT + Lockfile path: node_modules/@babel/helper-string-parser + Package: https://www.npmjs.com/package/@babel/helper-string-parser/v/8.0.0 + Archive: https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-8.0.0.tgz + Integrity: sha512-6mJgmFFFIIO82vvoLt9XtRC7/TkzXfts1t/SpRX4IHSzMgqoPYCWesVu1udUPUWioAE/2fcG6WuI8zrkE1gwrg== +@babel/helper-validator-identifier@8.0.4 | runtime | MIT + Lockfile path: node_modules/@babel/helper-validator-identifier + Package: https://www.npmjs.com/package/@babel/helper-validator-identifier/v/8.0.4 + Archive: https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-8.0.4.tgz + Integrity: sha512-4wFaiLd0bVo4cIoTXI3zKI038NIWE/cr3jvBjejOVYVxV/m8Ltav1USiGzG1fmS5J2RhgEOgXNNK46cRPnRsrg== +@babel/parser@8.0.4 | runtime | MIT + Lockfile path: node_modules/@babel/parser + Package: https://www.npmjs.com/package/@babel/parser/v/8.0.4 + Archive: https://registry.npmjs.org/@babel/parser/-/parser-8.0.4.tgz + Integrity: sha512-srpptsAkEbbNIC/q8nT7o+m6CQe8CJUTV/t7MYc9NnWlgYVtHOb7JH6SorxMhN0kuRJjVqXbKClG6xSbPtzz+g== +@babel/types@8.0.4 | runtime | MIT + Lockfile path: node_modules/@babel/types + Package: https://www.npmjs.com/package/@babel/types/v/8.0.4 + Archive: https://registry.npmjs.org/@babel/types/-/types-8.0.4.tgz + Integrity: sha512-eY+Yn3dCqTGmyiq2QRU66lA5FL8lqqqvecHt0fF3uHONIa7ToYsaCiWV8lOKqAs0Rb2SjixiKFROngnulPtt2g== +@bcoe/v8-coverage@1.0.2 | development | MIT + Lockfile path: node_modules/@bcoe/v8-coverage + Package: https://www.npmjs.com/package/@bcoe/v8-coverage/v/1.0.2 + Archive: https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-1.0.2.tgz + Integrity: sha512-6zABk/ECA/QYSCQ1NGiVwwbQerUCZ+TQbp64Q3AgmfNvurHH0j8TtXa1qbShXA6qqkpAj4V5W8pP6mLe1mcMqA== +@cfworker/json-schema@4.1.1 | runtime | MIT + Lockfile path: node_modules/@cfworker/json-schema + Package: https://www.npmjs.com/package/@cfworker/json-schema/v/4.1.1 + Archive: https://registry.npmjs.org/@cfworker/json-schema/-/json-schema-4.1.1.tgz + Integrity: sha512-gAmrUZSGtKc3AiBL71iNWxDsyUC5uMaKKGdvzYsBoTW/xi42JQHl7eKV2OYzCUqvc+D2RCcf7EXY2iCyFIk6og== +@clack/core@1.4.3 | runtime | MIT + Lockfile path: node_modules/@clack/core + Package: https://www.npmjs.com/package/@clack/core/v/1.4.3 + Archive: https://registry.npmjs.org/@clack/core/-/core-1.4.3.tgz + Integrity: sha512-/kr3UWNtdJfxZtPgDqUOmG2pvwlmcLGheex5yiZKdwbzZJxhV+HMNR9QNmyY5cGwTNV6LrR7Jtp+KjhUAP1qBQ== +@clack/prompts@1.7.0 | runtime | MIT + Lockfile path: node_modules/@clack/prompts + Package: https://www.npmjs.com/package/@clack/prompts/v/1.7.0 + Archive: https://registry.npmjs.org/@clack/prompts/-/prompts-1.7.0.tgz + Integrity: sha512-y7/yvZ2TPAnR9+jnc00klvNNLkJiXFFrQA/hlLCcxA9a2A4zQIOimyFQ9XfwYKiGD1fb5GY8vbKIIgO8d5Tb2A== +@docsearch/css@3.8.2 | development | MIT + Lockfile path: node_modules/@docsearch/css + Package: https://www.npmjs.com/package/@docsearch/css/v/3.8.2 + Archive: https://registry.npmjs.org/@docsearch/css/-/css-3.8.2.tgz + Integrity: sha512-y05ayQFyUmCXze79+56v/4HpycYF3uFqB78pLPrSV5ZKAlDuIAAJNhaRi8tTdRNXh05yxX/TyNnzD6LwSM89vQ== +@docsearch/js@3.8.2 | development | MIT + Lockfile path: node_modules/@docsearch/js + Package: https://www.npmjs.com/package/@docsearch/js/v/3.8.2 + Archive: https://registry.npmjs.org/@docsearch/js/-/js-3.8.2.tgz + Integrity: sha512-Q5wY66qHn0SwA7Taa0aDbHiJvaFJLOJyHmooQ7y8hlwwQLQ/5WwCcoX0g7ii04Qi2DJlHsd0XXzJ8Ypw9+9YmQ== +@docsearch/react@3.8.2 | development | MIT + Lockfile path: node_modules/@docsearch/react + Package: https://www.npmjs.com/package/@docsearch/react/v/3.8.2 + Archive: https://registry.npmjs.org/@docsearch/react/-/react-3.8.2.tgz + Integrity: sha512-xCRrJQlTt8N9GU0DG4ptwHRkfnSnD/YpdeaXe02iKfqs97TkZJv60yE+1eq/tjPcVnTW8dP5qLP7itifFVV5eg== +@electron/asar@4.2.0 | runtime | MIT + Lockfile path: node_modules/@electron/asar + Package: https://www.npmjs.com/package/@electron/asar/v/4.2.0 + Archive: https://registry.npmjs.org/@electron/asar/-/asar-4.2.0.tgz + Integrity: sha512-npW1NW5yy8EB9XY/vEw9sUdgmq0sJEhmSBb6bqyFOAw1CSkrhvAvO6QWlW8CdIMo8VN1lkdF345l/MeW0LrY0Q== +commander@13.1.0 | runtime | MIT + Lockfile path: node_modules/@electron/asar/node_modules/commander + Package: https://www.npmjs.com/package/commander/v/13.1.0 + Archive: https://registry.npmjs.org/commander/-/commander-13.1.0.tgz + Integrity: sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw== +@emnapi/core@1.11.2 | development, optional | MIT + Lockfile path: node_modules/@emnapi/core + Package: https://www.npmjs.com/package/@emnapi/core/v/1.11.2 + Archive: https://registry.npmjs.org/@emnapi/core/-/core-1.11.2.tgz + Integrity: sha512-TC8MkTuZUtcTSiFeuC0ksCh9QIJ5+F21MvZ4Wn4ORfYaFJ/0dsiudv5tVkejgwZlwQ39jL9WWDe2lz8x0WglOA== +@emnapi/runtime@1.11.2 | development, optional | MIT + Lockfile path: node_modules/@emnapi/runtime + Package: https://www.npmjs.com/package/@emnapi/runtime/v/1.11.2 + Archive: https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.2.tgz + Integrity: sha512-kyOl3X0DuTiT1h2ft8r2fYO8JYtU9a9Xis/zBSiGArNaagCOWx90N1k2wxp18czFDH+OgcWGb5ZP/XMt3dcyPA== +@emnapi/wasi-threads@1.2.2 | development, optional | MIT + Lockfile path: node_modules/@emnapi/wasi-threads + Package: https://www.npmjs.com/package/@emnapi/wasi-threads/v/1.2.2 + Archive: https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.2.tgz + Integrity: sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA== +@fast-check/vitest@0.5.0 | development | MIT + Lockfile path: node_modules/@fast-check/vitest + Package: https://www.npmjs.com/package/@fast-check/vitest/v/0.5.0 + Archive: https://registry.npmjs.org/@fast-check/vitest/-/vitest-0.5.0.tgz + Integrity: sha512-Kgbj2smuq1P4OhGKuPATs5i2fAxNmGbJ/zSmTrzWhQSLUrHREbKWgv9WGbNUOXcx77q6joLVMmTygyXuwP2Bog== +@iconify-json/simple-icons@1.2.99 | development | CC0-1.0 + Lockfile path: node_modules/@iconify-json/simple-icons + Package: https://www.npmjs.com/package/@iconify-json/simple-icons/v/1.2.99 + Archive: https://registry.npmjs.org/@iconify-json/simple-icons/-/simple-icons-1.2.99.tgz + Integrity: sha512-kouZhqvUoNdxEe+lZksbJJZMCZv4b4Ob62O1GW3fcpz/I0mVPzM+9/Qf/DUuv5ns8l6c46D8M/ubhJjjbLp9HQ== +@iconify/types@2.0.0 | development | MIT + Lockfile path: node_modules/@iconify/types + Package: https://www.npmjs.com/package/@iconify/types/v/2.0.0 + Archive: https://registry.npmjs.org/@iconify/types/-/types-2.0.0.tgz + Integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg== +@jridgewell/resolve-uri@3.1.2 | runtime | MIT + Lockfile path: node_modules/@jridgewell/resolve-uri + Package: https://www.npmjs.com/package/@jridgewell/resolve-uri/v/3.1.2 + Archive: https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz + Integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== +@jridgewell/sourcemap-codec@1.6.0 | runtime | MIT + Lockfile path: node_modules/@jridgewell/sourcemap-codec + Package: https://www.npmjs.com/package/@jridgewell/sourcemap-codec/v/1.6.0 + Archive: https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz + Integrity: sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw== +@jridgewell/trace-mapping@0.3.31 | runtime | MIT + Lockfile path: node_modules/@jridgewell/trace-mapping + Package: https://www.npmjs.com/package/@jridgewell/trace-mapping/v/0.3.31 + Archive: https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz + Integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw== +@lydell/node-pty@1.1.0 | runtime | MIT + Lockfile path: node_modules/@lydell/node-pty + Package: https://www.npmjs.com/package/@lydell/node-pty/v/1.1.0 + Archive: https://registry.npmjs.org/@lydell/node-pty/-/node-pty-1.1.0.tgz + Integrity: sha512-VDD8LtlMTOrPKWMXUAcB9+LTktzuunqrMwkYR1DMRBkS6LQrCt+0/Ws1o2rMml/n3guePpS7cxhHF7Nm5K4iMw== +@lydell/node-pty-darwin-arm64@1.1.0 | runtime, optional | MIT + Lockfile path: node_modules/@lydell/node-pty-darwin-arm64 + Package: https://www.npmjs.com/package/@lydell/node-pty-darwin-arm64/v/1.1.0 + Archive: https://registry.npmjs.org/@lydell/node-pty-darwin-arm64/-/node-pty-darwin-arm64-1.1.0.tgz + Integrity: sha512-7kFD+owAA61qmhJCtoMbqj3Uvff3YHDiU+4on5F2vQdcMI3MuwGi7dM6MkFG/yuzpw8LF2xULpL71tOPUfxs0w== +@lydell/node-pty-darwin-x64@1.1.0 | runtime, optional | MIT + Lockfile path: node_modules/@lydell/node-pty-darwin-x64 + Package: https://www.npmjs.com/package/@lydell/node-pty-darwin-x64/v/1.1.0 + Archive: https://registry.npmjs.org/@lydell/node-pty-darwin-x64/-/node-pty-darwin-x64-1.1.0.tgz + Integrity: sha512-XZdvqj5FjAMjH8bdp0YfaZjur5DrCIDD1VYiE9EkkYVMDQqRUPHYV3U8BVEQVT9hYfjmpr7dNaELF2KyISWSNA== +@lydell/node-pty-linux-arm64@1.1.0 | runtime, optional | MIT + Lockfile path: node_modules/@lydell/node-pty-linux-arm64 + Package: https://www.npmjs.com/package/@lydell/node-pty-linux-arm64/v/1.1.0 + Archive: https://registry.npmjs.org/@lydell/node-pty-linux-arm64/-/node-pty-linux-arm64-1.1.0.tgz + Integrity: sha512-yyDBmalCfHpLiQMT2zyLcqL2Fay4Xy7rIs8GH4dqKLnEviMvPGOK7LADVkKAsbsyXBSISL3Lt1m1MtxhPH6ckg== +@lydell/node-pty-linux-x64@1.1.0 | runtime, optional | MIT + Lockfile path: node_modules/@lydell/node-pty-linux-x64 + Package: https://www.npmjs.com/package/@lydell/node-pty-linux-x64/v/1.1.0 + Archive: https://registry.npmjs.org/@lydell/node-pty-linux-x64/-/node-pty-linux-x64-1.1.0.tgz + Integrity: sha512-NcNqRTD14QT+vXcEuqSSvmWY+0+WUBn2uRE8EN0zKtDpIEr9d+YiFj16Uqds6QfcLCHfZmC+Ls7YzwTaqDnanA== +@lydell/node-pty-win32-arm64@1.1.0 | runtime, optional | MIT + Lockfile path: node_modules/@lydell/node-pty-win32-arm64 + Package: https://www.npmjs.com/package/@lydell/node-pty-win32-arm64/v/1.1.0 + Archive: https://registry.npmjs.org/@lydell/node-pty-win32-arm64/-/node-pty-win32-arm64-1.1.0.tgz + Integrity: sha512-JOMbCou+0fA7d/m97faIIfIU0jOv8sn2OR7tI45u3AmldKoKoLP8zHY6SAvDDnI3fccO1R2HeR1doVjpS7HM0w== +@lydell/node-pty-win32-x64@1.1.0 | runtime, optional | MIT + Lockfile path: node_modules/@lydell/node-pty-win32-x64 + Package: https://www.npmjs.com/package/@lydell/node-pty-win32-x64/v/1.1.0 + Archive: https://registry.npmjs.org/@lydell/node-pty-win32-x64/-/node-pty-win32-x64-1.1.0.tgz + Integrity: sha512-3N56BZ+WDFnUMYRtsrr7Ky2mhWGl9xXcyqR6cexfuCqcz9RNWL+KoXRv/nZylY5dYaXkft4JaR1uVu+roiZDAw== +@modelcontextprotocol/client@2.3.1 | runtime | Apache-2.0 + Lockfile path: node_modules/@modelcontextprotocol/client + Package: https://www.npmjs.com/package/@modelcontextprotocol/client/v/2.3.1 + Archive: https://registry.npmjs.org/@modelcontextprotocol/client/-/client-2.3.1.tgz + Integrity: sha512-mIGZXpHsjnZ6lD+gD/WCMpR5k8yVQQ8nNFH1N0Srf7AvnwTUMYD6pvTY8ng2+He5FfV7YMZLmrjL7cLa/cc3dQ== +@modelcontextprotocol/core@2.3.1 | runtime | Apache-2.0 + Lockfile path: node_modules/@modelcontextprotocol/core + Package: https://www.npmjs.com/package/@modelcontextprotocol/core/v/2.3.1 + Archive: https://registry.npmjs.org/@modelcontextprotocol/core/-/core-2.3.1.tgz + Integrity: sha512-laVmIhPGpWi7rG9q+0UigblRN0Hws/Yjlb6qLFtVqryXVLkc4h+yN8z731POD2LnAGQlFe7/tXhUm7Bi0YB91g== +@modelcontextprotocol/server@2.3.1 | runtime | Apache-2.0 + Lockfile path: node_modules/@modelcontextprotocol/server + Package: https://www.npmjs.com/package/@modelcontextprotocol/server/v/2.3.1 + Archive: https://registry.npmjs.org/@modelcontextprotocol/server/-/server-2.3.1.tgz + Integrity: sha512-e59MfWuSssj6DoQ96JCTqdW1AXT5/XtnTl0WWd6MU1Ka434fFUGGosCLJbGNySDhHGvxQWoRWK137FXYFkYNWw== +@napi-rs/lzma-linux-x64-gnu@1.5.1 | development, optional | MIT + Lockfile path: node_modules/@napi-rs/lzma-linux-x64-gnu + Package: https://www.npmjs.com/package/@napi-rs/lzma-linux-x64-gnu/v/1.5.1 + Archive: https://registry.npmjs.org/@napi-rs/lzma-linux-x64-gnu/-/lzma-linux-x64-gnu-1.5.1.tgz + Integrity: sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ== +@napi-rs/wasm-runtime@1.2.5 | development, optional | MIT + Lockfile path: node_modules/@napi-rs/wasm-runtime + Package: https://www.npmjs.com/package/@napi-rs/wasm-runtime/v/1.2.5 + Archive: https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.2.5.tgz + Integrity: sha512-HshSvXzmBxNzqejd3k/KemgQ3hdREUYFRRrgxOZ+gPljDIsO2SDZrVZMd4Z/HsxudQbE62OVyVFE8z9BCurfjA== +@oxc-parser/binding-android-arm-eabi@0.150.0 | development, optional | MIT + Lockfile path: node_modules/@oxc-parser/binding-android-arm-eabi + Package: https://www.npmjs.com/package/@oxc-parser/binding-android-arm-eabi/v/0.150.0 + Archive: https://registry.npmjs.org/@oxc-parser/binding-android-arm-eabi/-/binding-android-arm-eabi-0.150.0.tgz + Integrity: sha512-oQef2Zu4Prz1KLKznz3HqZzU9uVoA5PMoDZuuLmqms7hKmKSAPzlaMnLllJq3t+rgKmfJJ2siPrpZfFrW06btw== +@oxc-parser/binding-android-arm64@0.150.0 | development, optional | MIT + Lockfile path: node_modules/@oxc-parser/binding-android-arm64 + Package: https://www.npmjs.com/package/@oxc-parser/binding-android-arm64/v/0.150.0 + Archive: https://registry.npmjs.org/@oxc-parser/binding-android-arm64/-/binding-android-arm64-0.150.0.tgz + Integrity: sha512-B6ofpoFiAUwIZ0MJ2IgHPvZK8FAtL4qzSZRwOkAKIfxEobE1mQC8nDdiFZj7pUaJiVUVCsfkMsBJKedzO8rZvA== +@oxc-parser/binding-darwin-arm64@0.150.0 | development, optional | MIT + Lockfile path: node_modules/@oxc-parser/binding-darwin-arm64 + Package: https://www.npmjs.com/package/@oxc-parser/binding-darwin-arm64/v/0.150.0 + Archive: https://registry.npmjs.org/@oxc-parser/binding-darwin-arm64/-/binding-darwin-arm64-0.150.0.tgz + Integrity: sha512-J+9IHKzx/bSz1JetOfD4zKXSK9sOm4/a7+0qomJODcTL6JsRXGeV/ZdkAPSIDydfFmWzYCraMlQEosSZEyBYkQ== +@oxc-parser/binding-darwin-x64@0.150.0 | development, optional | MIT + Lockfile path: node_modules/@oxc-parser/binding-darwin-x64 + Package: https://www.npmjs.com/package/@oxc-parser/binding-darwin-x64/v/0.150.0 + Archive: https://registry.npmjs.org/@oxc-parser/binding-darwin-x64/-/binding-darwin-x64-0.150.0.tgz + Integrity: sha512-v6IPfcAcSYrBWXV5Tce1DmxDMXLhEYpIIWiRFPJopgCVscZdLaV4MRQOUxvL3usQlw+yrwYOjBFB9IwBx+jUiQ== +@oxc-parser/binding-freebsd-x64@0.150.0 | development, optional | MIT + Lockfile path: node_modules/@oxc-parser/binding-freebsd-x64 + Package: https://www.npmjs.com/package/@oxc-parser/binding-freebsd-x64/v/0.150.0 + Archive: https://registry.npmjs.org/@oxc-parser/binding-freebsd-x64/-/binding-freebsd-x64-0.150.0.tgz + Integrity: sha512-AoR/4jD02HET0KO0yNT4nbTE+XJUxiO9jB1X/ycEjUE3WrIJ3IjV/Vf+gskhWLcqqeXfvNnkDtBR7epllAm88A== +@oxc-parser/binding-linux-arm-gnueabihf@0.150.0 | development, optional | MIT + Lockfile path: node_modules/@oxc-parser/binding-linux-arm-gnueabihf + Package: https://www.npmjs.com/package/@oxc-parser/binding-linux-arm-gnueabihf/v/0.150.0 + Archive: https://registry.npmjs.org/@oxc-parser/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-0.150.0.tgz + Integrity: sha512-A/hycCFjLUrCmLoL5O/vBp40ohlaXO1Ta3v5hqYZxicYFs129wZmgZJggcW4mYGYbZebQLhup+N8JjeQl8qwyw== +@oxc-parser/binding-linux-arm-musleabihf@0.150.0 | development, optional | MIT + Lockfile path: node_modules/@oxc-parser/binding-linux-arm-musleabihf + Package: https://www.npmjs.com/package/@oxc-parser/binding-linux-arm-musleabihf/v/0.150.0 + Archive: https://registry.npmjs.org/@oxc-parser/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-0.150.0.tgz + Integrity: sha512-pbqahg1Pkz7J4RKmXm30s/iQu99hv64ayXCu8P4p75HcEH5azOdR4eGqiB6lFGkFR3mMpzaYsSKLkS8oJbjmeQ== +@oxc-parser/binding-linux-arm64-gnu@0.150.0 | development, optional | MIT + Lockfile path: node_modules/@oxc-parser/binding-linux-arm64-gnu + Package: https://www.npmjs.com/package/@oxc-parser/binding-linux-arm64-gnu/v/0.150.0 + Archive: https://registry.npmjs.org/@oxc-parser/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-0.150.0.tgz + Integrity: sha512-HV11aRbBQGwqv8bEo+K/6qr88uB4fEe1mhXncMhlVCrj+WpBSraxrUzHaPVmeQRU6x6x8v/3DuCbbo93rpp+fw== +@oxc-parser/binding-linux-arm64-musl@0.150.0 | development, optional | MIT + Lockfile path: node_modules/@oxc-parser/binding-linux-arm64-musl + Package: https://www.npmjs.com/package/@oxc-parser/binding-linux-arm64-musl/v/0.150.0 + Archive: https://registry.npmjs.org/@oxc-parser/binding-linux-arm64-musl/-/binding-linux-arm64-musl-0.150.0.tgz + Integrity: sha512-k6pVkJqALwtEuP4zukVhGRhdIy4+ofChUIUUsAHHyqDZlNsknmel3JjbggrJiWGaes6h/dIcWmEXsKW4SmK9oQ== +@oxc-parser/binding-linux-ppc64-gnu@0.150.0 | development, optional | MIT + Lockfile path: node_modules/@oxc-parser/binding-linux-ppc64-gnu + Package: https://www.npmjs.com/package/@oxc-parser/binding-linux-ppc64-gnu/v/0.150.0 + Archive: https://registry.npmjs.org/@oxc-parser/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-0.150.0.tgz + Integrity: sha512-tEFg39mw/rHO5n8GK2DR4ZMFfsPQZtnQIPbsIpjoQRomJc/2tRfsCSmCT6gNit+NZGoeJG5aH9ATDH5bf0WnoQ== +@oxc-parser/binding-linux-riscv64-gnu@0.150.0 | development, optional | MIT + Lockfile path: node_modules/@oxc-parser/binding-linux-riscv64-gnu + Package: https://www.npmjs.com/package/@oxc-parser/binding-linux-riscv64-gnu/v/0.150.0 + Archive: https://registry.npmjs.org/@oxc-parser/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-0.150.0.tgz + Integrity: sha512-0JO7IFkoek6HqV589Menx3hJySNXi6quRhO4tq2P7kpEHKEXoDATnoPVUpn5B7gDH2KLkdo751N0uIrGJFCTCw== +@oxc-parser/binding-linux-riscv64-musl@0.150.0 | development, optional | MIT + Lockfile path: node_modules/@oxc-parser/binding-linux-riscv64-musl + Package: https://www.npmjs.com/package/@oxc-parser/binding-linux-riscv64-musl/v/0.150.0 + Archive: https://registry.npmjs.org/@oxc-parser/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-0.150.0.tgz + Integrity: sha512-7XPzREnyAS5wHU9aB+49Uaqgoo1gVCklHc3DRlc3fJy2tXD/eAJFN1QFz/crj+Ulup5P1+axNREF+/RGaB/IRA== +@oxc-parser/binding-linux-s390x-gnu@0.150.0 | development, optional | MIT + Lockfile path: node_modules/@oxc-parser/binding-linux-s390x-gnu + Package: https://www.npmjs.com/package/@oxc-parser/binding-linux-s390x-gnu/v/0.150.0 + Archive: https://registry.npmjs.org/@oxc-parser/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-0.150.0.tgz + Integrity: sha512-7n7ZxcbRWDFaTdyj8M8p0O9OfzoMKm8O6syBAIgcSutbOALq0Bb9G52Me+XH0anMLZV+NgXc726gqgG2q39vcQ== +@oxc-parser/binding-linux-x64-gnu@0.150.0 | development, optional | MIT + Lockfile path: node_modules/@oxc-parser/binding-linux-x64-gnu + Package: https://www.npmjs.com/package/@oxc-parser/binding-linux-x64-gnu/v/0.150.0 + Archive: https://registry.npmjs.org/@oxc-parser/binding-linux-x64-gnu/-/binding-linux-x64-gnu-0.150.0.tgz + Integrity: sha512-Vx0GSA9ZCRTUiczoEQnIIyXkMvtEY8uc6IiwLQtMe5ci2sXPqjrry0Ek5fsPP1k2kCzkML3ow9UOOEgnEDi7Bw== +@oxc-parser/binding-linux-x64-musl@0.150.0 | development, optional | MIT + Lockfile path: node_modules/@oxc-parser/binding-linux-x64-musl + Package: https://www.npmjs.com/package/@oxc-parser/binding-linux-x64-musl/v/0.150.0 + Archive: https://registry.npmjs.org/@oxc-parser/binding-linux-x64-musl/-/binding-linux-x64-musl-0.150.0.tgz + Integrity: sha512-ii4/9m3viDLssMnfXU7/Pni/3nYplApuGayceX4qsVGaqqQJCx3tHIH9M/HWIeSty5i8LjS21zPYT6lVIkwLxw== +@oxc-parser/binding-openharmony-arm64@0.150.0 | development, optional | MIT + Lockfile path: node_modules/@oxc-parser/binding-openharmony-arm64 + Package: https://www.npmjs.com/package/@oxc-parser/binding-openharmony-arm64/v/0.150.0 + Archive: https://registry.npmjs.org/@oxc-parser/binding-openharmony-arm64/-/binding-openharmony-arm64-0.150.0.tgz + Integrity: sha512-ZtoxX5rez36ZWkwtiEhjkCPnlTPoQ2I7lIL0IYZ1yjxMYohbvoOjBmUIZzrf9W/HouONq0omIfTeCWEY+R380w== +@oxc-parser/binding-win32-arm64-msvc@0.150.0 | development, optional | MIT + Lockfile path: node_modules/@oxc-parser/binding-win32-arm64-msvc + Package: https://www.npmjs.com/package/@oxc-parser/binding-win32-arm64-msvc/v/0.150.0 + Archive: https://registry.npmjs.org/@oxc-parser/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-0.150.0.tgz + Integrity: sha512-VqeRb5JX/bKYBrff7TUDvJyKY0914UzuCkuXIGxJS4FUmvMNfqkCbc7Sq90iMz9DlmAtlggwaBYQ9eg3h3ltiw== +@oxc-parser/binding-win32-ia32-msvc@0.150.0 | development, optional | MIT + Lockfile path: node_modules/@oxc-parser/binding-win32-ia32-msvc + Package: https://www.npmjs.com/package/@oxc-parser/binding-win32-ia32-msvc/v/0.150.0 + Archive: https://registry.npmjs.org/@oxc-parser/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-0.150.0.tgz + Integrity: sha512-EPqJfeZ4Pgg2BJSsCV8GozxV0FDltRzpVtGVa1r2noJu1iu+opOw3gtBWXwIo9odCT/MdFfyHxdy0/CRqs3OqA== +@oxc-parser/binding-win32-x64-msvc@0.150.0 | development, optional | MIT + Lockfile path: node_modules/@oxc-parser/binding-win32-x64-msvc + Package: https://www.npmjs.com/package/@oxc-parser/binding-win32-x64-msvc/v/0.150.0 + Archive: https://registry.npmjs.org/@oxc-parser/binding-win32-x64-msvc/-/binding-win32-x64-msvc-0.150.0.tgz + Integrity: sha512-n5YMzbqwPQqozbkrexi0lNZrUz5cnPHalYpFWe6Dau7AmKIWNo+y24IwzDuZEQtEdUHuKhXmMMih/MPjOI+CMw== +@oxc-project/types@0.152.0 | development | MIT + Lockfile path: node_modules/@oxc-project/types + Package: https://www.npmjs.com/package/@oxc-project/types/v/0.152.0 + Archive: https://registry.npmjs.org/@oxc-project/types/-/types-0.152.0.tgz + Integrity: sha512-oM/5rLBm2tPkg0iBgkH/FOeR3PCDpY19GTgAZjMFM8h9WI9VW7cLgzp6nwtarYKmovavIQZ+Fe/RKX/8C8O/Rw== +@oxc-resolver/binding-android-arm-eabi@11.24.2 | development, optional | MIT + Lockfile path: node_modules/@oxc-resolver/binding-android-arm-eabi + Package: https://www.npmjs.com/package/@oxc-resolver/binding-android-arm-eabi/v/11.24.2 + Archive: https://registry.npmjs.org/@oxc-resolver/binding-android-arm-eabi/-/binding-android-arm-eabi-11.24.2.tgz + Integrity: sha512-y09e0L0SRI2OA2tUIrjBgoV3eH5hvUKXNkJqXmNo5V2WxIjyC7I7aJfRLMEVpA8yi95f90gFDvO0VMgrDw+vwA== +@oxc-resolver/binding-android-arm64@11.24.2 | development, optional | MIT + Lockfile path: node_modules/@oxc-resolver/binding-android-arm64 + Package: https://www.npmjs.com/package/@oxc-resolver/binding-android-arm64/v/11.24.2 + Archive: https://registry.npmjs.org/@oxc-resolver/binding-android-arm64/-/binding-android-arm64-11.24.2.tgz + Integrity: sha512-cl4icWaZFnLdg8m6qtnh5rBMuGbxc/ptStFHLeCNwr+2cZjkjNwQu/jYRS0CHlnPecOJMpuS5M6/BH+0J/YkEg== +@oxc-resolver/binding-darwin-arm64@11.24.2 | development, optional | MIT + Lockfile path: node_modules/@oxc-resolver/binding-darwin-arm64 + Package: https://www.npmjs.com/package/@oxc-resolver/binding-darwin-arm64/v/11.24.2 + Archive: https://registry.npmjs.org/@oxc-resolver/binding-darwin-arm64/-/binding-darwin-arm64-11.24.2.tgz + Integrity: sha512-At29QEMF6HajbQvgY8K6OXnHD1x9rad74xBEfmCB6ZqCGsdq75aK7tOYcTbOanMy8qdIBrfL3SMr3p/lfSlb9w== +@oxc-resolver/binding-darwin-x64@11.24.2 | development, optional | MIT + Lockfile path: node_modules/@oxc-resolver/binding-darwin-x64 + Package: https://www.npmjs.com/package/@oxc-resolver/binding-darwin-x64/v/11.24.2 + Archive: https://registry.npmjs.org/@oxc-resolver/binding-darwin-x64/-/binding-darwin-x64-11.24.2.tgz + Integrity: sha512-A5Kqr1EUj4oIL5CF4WRssq/o5P0Y11cwoFouMRmQ7YnC/A8V93nv1nb7aSU8HwcgmXropjLNkVTl4MN87cu28Q== +@oxc-resolver/binding-freebsd-x64@11.24.2 | development, optional | MIT + Lockfile path: node_modules/@oxc-resolver/binding-freebsd-x64 + Package: https://www.npmjs.com/package/@oxc-resolver/binding-freebsd-x64/v/11.24.2 + Archive: https://registry.npmjs.org/@oxc-resolver/binding-freebsd-x64/-/binding-freebsd-x64-11.24.2.tgz + Integrity: sha512-R5xkRBRRz7ceH/P5Jrc6G7FmdUdgpLYyESFAUDVTNQ9K0sGPxcp4ljiwEwEqsvNcQ4sYbMRrWcHHBCu7ksAJVw== +@oxc-resolver/binding-linux-arm-gnueabihf@11.24.2 | development, optional | MIT + Lockfile path: node_modules/@oxc-resolver/binding-linux-arm-gnueabihf + Package: https://www.npmjs.com/package/@oxc-resolver/binding-linux-arm-gnueabihf/v/11.24.2 + Archive: https://registry.npmjs.org/@oxc-resolver/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-11.24.2.tgz + Integrity: sha512-k/RuYL4L/R58IBn3wT5ma3Wh4k62bp1eYCFRWCmMsasUOqL+H6sW0VGFadEzKWXFFlz+2uIMoeMk9ySSZJHgbg== +@oxc-resolver/binding-linux-arm-musleabihf@11.24.2 | development, optional | MIT + Lockfile path: node_modules/@oxc-resolver/binding-linux-arm-musleabihf + Package: https://www.npmjs.com/package/@oxc-resolver/binding-linux-arm-musleabihf/v/11.24.2 + Archive: https://registry.npmjs.org/@oxc-resolver/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-11.24.2.tgz + Integrity: sha512-bnHAak3ujYfH5pKk4NieFNbvYvernfoQDgwLddbZ3OtMYrem87/qjlA+u+aKG0oZcqSLGCful/6/CEA+aeAgaA== +@oxc-resolver/binding-linux-arm64-gnu@11.24.2 | development, optional | MIT + Lockfile path: node_modules/@oxc-resolver/binding-linux-arm64-gnu + Package: https://www.npmjs.com/package/@oxc-resolver/binding-linux-arm64-gnu/v/11.24.2 + Archive: https://registry.npmjs.org/@oxc-resolver/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-11.24.2.tgz + Integrity: sha512-vDT3KHgzYp47gmtNOqL2VNhCyl5Zv643eyxm//A68J8DeUGXrvD1pZFiaT4jSfe+RInfnn1R2yVHye4enx6RnA== +@oxc-resolver/binding-linux-arm64-musl@11.24.2 | development, optional | MIT + Lockfile path: node_modules/@oxc-resolver/binding-linux-arm64-musl + Package: https://www.npmjs.com/package/@oxc-resolver/binding-linux-arm64-musl/v/11.24.2 + Archive: https://registry.npmjs.org/@oxc-resolver/binding-linux-arm64-musl/-/binding-linux-arm64-musl-11.24.2.tgz + Integrity: sha512-+kMlQvbzfyEYtu5FcjE4p+ttBLpKW4d/AsAsuE69BxV6V4twZJeIQZFfD8gh/wqglY0MkPSezWXQH0jBV13MUw== +@oxc-resolver/binding-linux-ppc64-gnu@11.24.2 | development, optional | MIT + Lockfile path: node_modules/@oxc-resolver/binding-linux-ppc64-gnu + Package: https://www.npmjs.com/package/@oxc-resolver/binding-linux-ppc64-gnu/v/11.24.2 + Archive: https://registry.npmjs.org/@oxc-resolver/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-11.24.2.tgz + Integrity: sha512-shjfMhmZ3gq9fv/w7bi3PnZlgOPG+2QAOFf0BJF0EgBSIGZ6PMLN2zbGEblTUYB/NKVDRyYhE2ff3dJ1QqNPkA== +@oxc-resolver/binding-linux-riscv64-gnu@11.24.2 | development, optional | MIT + Lockfile path: node_modules/@oxc-resolver/binding-linux-riscv64-gnu + Package: https://www.npmjs.com/package/@oxc-resolver/binding-linux-riscv64-gnu/v/11.24.2 + Archive: https://registry.npmjs.org/@oxc-resolver/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-11.24.2.tgz + Integrity: sha512-zGelwFR5oRo+b69k8Lrzun86DyUHzfKN6cnjbR9l7Z7NIRznOE/2ZvPa1IUKqAL2PzAXOdwkfVqNvO1H2RlpAw== +@oxc-resolver/binding-linux-riscv64-musl@11.24.2 | development, optional | MIT + Lockfile path: node_modules/@oxc-resolver/binding-linux-riscv64-musl + Package: https://www.npmjs.com/package/@oxc-resolver/binding-linux-riscv64-musl/v/11.24.2 + Archive: https://registry.npmjs.org/@oxc-resolver/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-11.24.2.tgz + Integrity: sha512-qxZ1SWCXJY0eyhAlP6Lmo9F2Nrtx7EkYj9oCgL8apDPCwXwCEDA2U697bbT81JIc2IrVjxO4KX6WU2N+oN9Z4w== +@oxc-resolver/binding-linux-s390x-gnu@11.24.2 | development, optional | MIT + Lockfile path: node_modules/@oxc-resolver/binding-linux-s390x-gnu + Package: https://www.npmjs.com/package/@oxc-resolver/binding-linux-s390x-gnu/v/11.24.2 + Archive: https://registry.npmjs.org/@oxc-resolver/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-11.24.2.tgz + Integrity: sha512-sGCecF3cx2DFlH4t/z7ApnOnXqN48p5p5mlHDEnHTAukQa2P+qMVE4CwyWE9W+q/m3QJ7kKfGrIjax31f44oFQ== +@oxc-resolver/binding-linux-x64-gnu@11.24.2 | development, optional | MIT + Lockfile path: node_modules/@oxc-resolver/binding-linux-x64-gnu + Package: https://www.npmjs.com/package/@oxc-resolver/binding-linux-x64-gnu/v/11.24.2 + Archive: https://registry.npmjs.org/@oxc-resolver/binding-linux-x64-gnu/-/binding-linux-x64-gnu-11.24.2.tgz + Integrity: sha512-k/VlMMcSzMlahb3/fENM4rTlsJ0s3fFROA0KXPBmKggqmTSaE383sl8F3KCOXPLmVsYfW6hCitMhXCEtNeZxxg== +@oxc-resolver/binding-linux-x64-musl@11.24.2 | development, optional | MIT + Lockfile path: node_modules/@oxc-resolver/binding-linux-x64-musl + Package: https://www.npmjs.com/package/@oxc-resolver/binding-linux-x64-musl/v/11.24.2 + Archive: https://registry.npmjs.org/@oxc-resolver/binding-linux-x64-musl/-/binding-linux-x64-musl-11.24.2.tgz + Integrity: sha512-8hbnZyNi97b/8wapYaIF9+t9GmZKBW2vunaOc3h9HGJptH7b7XpvZqOTBSm/MpTjr7H497BlgOaSfLUdhmy2bw== +@oxc-resolver/binding-openharmony-arm64@11.24.2 | development, optional | MIT + Lockfile path: node_modules/@oxc-resolver/binding-openharmony-arm64 + Package: https://www.npmjs.com/package/@oxc-resolver/binding-openharmony-arm64/v/11.24.2 + Archive: https://registry.npmjs.org/@oxc-resolver/binding-openharmony-arm64/-/binding-openharmony-arm64-11.24.2.tgz + Integrity: sha512-MvyGik3a6pVgZ0t/kWlbmFxFLmXQJwgLsY2eYFHLpy0wGwRbfzeIGgDwQ3kXqE30z+kSXennRkCrT7TUvkptNg== +@oxc-resolver/binding-wasm32-wasi@11.24.2 | development, optional | MIT + Lockfile path: node_modules/@oxc-resolver/binding-wasm32-wasi + Package: https://www.npmjs.com/package/@oxc-resolver/binding-wasm32-wasi/v/11.24.2 + Archive: https://registry.npmjs.org/@oxc-resolver/binding-wasm32-wasi/-/binding-wasm32-wasi-11.24.2.tgz + Integrity: sha512-vHcssMPwO08RTvj/c0iOBz90attxyG3wQJ0dTcyEQK43LRpcdLWZlV5feBhv6Isn6ahbQIzHbCgfa81+RiML0Q== +@oxc-resolver/binding-win32-arm64-msvc@11.24.2 | development, optional | MIT + Lockfile path: node_modules/@oxc-resolver/binding-win32-arm64-msvc + Package: https://www.npmjs.com/package/@oxc-resolver/binding-win32-arm64-msvc/v/11.24.2 + Archive: https://registry.npmjs.org/@oxc-resolver/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-11.24.2.tgz + Integrity: sha512-uokJqro2iBqkFvJdKQLP7d8/BUmFwESQFVmIJUQKj1Xn1a/LysJoe1vmeECLF5b3jsV8CAL5sEMJXX6SdK9Nhg== +@oxc-resolver/binding-win32-x64-msvc@11.24.2 | development, optional | MIT + Lockfile path: node_modules/@oxc-resolver/binding-win32-x64-msvc + Package: https://www.npmjs.com/package/@oxc-resolver/binding-win32-x64-msvc/v/11.24.2 + Archive: https://registry.npmjs.org/@oxc-resolver/binding-win32-x64-msvc/-/binding-win32-x64-msvc-11.24.2.tgz + Integrity: sha512-UqGPmo56KDfLlfXFAFIrNflHT8tFxWGEivWg3Zeyp4Uy2NlKN1FGPr6/BxcLGG3+kZ6Wp14g5Uj+n71boqZfiw== +@oxfmt/binding-android-arm-eabi@0.72.0 | development, optional | MIT + Lockfile path: node_modules/@oxfmt/binding-android-arm-eabi + Package: https://www.npmjs.com/package/@oxfmt/binding-android-arm-eabi/v/0.72.0 + Archive: https://registry.npmjs.org/@oxfmt/binding-android-arm-eabi/-/binding-android-arm-eabi-0.72.0.tgz + Integrity: sha512-u4U1uaDOVBuorGNC/07NLm48nECHOiJJka002YGML16Md2DRvf38RGBt01lH60EOGvNlFVmbLoksQedNBoZHKw== +@oxfmt/binding-android-arm64@0.72.0 | development, optional | MIT + Lockfile path: node_modules/@oxfmt/binding-android-arm64 + Package: https://www.npmjs.com/package/@oxfmt/binding-android-arm64/v/0.72.0 + Archive: https://registry.npmjs.org/@oxfmt/binding-android-arm64/-/binding-android-arm64-0.72.0.tgz + Integrity: sha512-GCnM+Ae2mWOKC+92y3FOb6eZJeVnBAVz82e3lITUUg+kxukYKzBNAvJ/hhHIfa2A0md55SYYhdWPddSSy3KPVA== +@oxfmt/binding-darwin-arm64@0.72.0 | development, optional | MIT + Lockfile path: node_modules/@oxfmt/binding-darwin-arm64 + Package: https://www.npmjs.com/package/@oxfmt/binding-darwin-arm64/v/0.72.0 + Archive: https://registry.npmjs.org/@oxfmt/binding-darwin-arm64/-/binding-darwin-arm64-0.72.0.tgz + Integrity: sha512-LjQ8tlevdtwraFlWC6AnQ1Forzde0clRmnsP3QmK+ydSElDt/J+5Jc+m+//Ly1G97aP7WCNUw110QMIUw2K7xA== +@oxfmt/binding-darwin-x64@0.72.0 | development, optional | MIT + Lockfile path: node_modules/@oxfmt/binding-darwin-x64 + Package: https://www.npmjs.com/package/@oxfmt/binding-darwin-x64/v/0.72.0 + Archive: https://registry.npmjs.org/@oxfmt/binding-darwin-x64/-/binding-darwin-x64-0.72.0.tgz + Integrity: sha512-+ZbcxhB1C34RQR5IldSyY6Z/yalJIxHXhP36PGE4sEq0f/lgL5jCLmOKoDeVm8dqd9gFGDsd1bNWHSGCAwdSkw== +@oxfmt/binding-freebsd-x64@0.72.0 | development, optional | MIT + Lockfile path: node_modules/@oxfmt/binding-freebsd-x64 + Package: https://www.npmjs.com/package/@oxfmt/binding-freebsd-x64/v/0.72.0 + Archive: https://registry.npmjs.org/@oxfmt/binding-freebsd-x64/-/binding-freebsd-x64-0.72.0.tgz + Integrity: sha512-yGPhA8sePEBFV9iGcprhyOk3Bz3fZshswMH3DpYIPZFLT1DG5LjiZ0j6AJQpSueaL6bUK0av1K+5+fe+ldy5EQ== +@oxfmt/binding-linux-arm-gnueabihf@0.72.0 | development, optional | MIT + Lockfile path: node_modules/@oxfmt/binding-linux-arm-gnueabihf + Package: https://www.npmjs.com/package/@oxfmt/binding-linux-arm-gnueabihf/v/0.72.0 + Archive: https://registry.npmjs.org/@oxfmt/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-0.72.0.tgz + Integrity: sha512-/g5axuqFMcAtoQrFLR5EJEMDjR5Ea4GuzpdDmMpPWAgrF1DmL4kD1NPNVlpXEOxpFJnD6lPvLKYj1lzdlrfifA== +@oxfmt/binding-linux-arm-musleabihf@0.72.0 | development, optional | MIT + Lockfile path: node_modules/@oxfmt/binding-linux-arm-musleabihf + Package: https://www.npmjs.com/package/@oxfmt/binding-linux-arm-musleabihf/v/0.72.0 + Archive: https://registry.npmjs.org/@oxfmt/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-0.72.0.tgz + Integrity: sha512-InVitdHbS09PM+w+WinIiyX37rC9R3L7lUP9mKy9uKTEDSUFaLjWsLoreRIxKivnv7Ndqc6Trvi+K+b6ZzhiJg== +@oxfmt/binding-linux-arm64-gnu@0.72.0 | development, optional | MIT + Lockfile path: node_modules/@oxfmt/binding-linux-arm64-gnu + Package: https://www.npmjs.com/package/@oxfmt/binding-linux-arm64-gnu/v/0.72.0 + Archive: https://registry.npmjs.org/@oxfmt/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-0.72.0.tgz + Integrity: sha512-WKjlyRAxpPjXoqeuwFBim5LscgvY+RNEiZ971C9JlRQZONhJTsXDki/oHFYQE+fzzRpzXh3owZvOdT3kNL2g+g== +@oxfmt/binding-linux-arm64-musl@0.72.0 | development, optional | MIT + Lockfile path: node_modules/@oxfmt/binding-linux-arm64-musl + Package: https://www.npmjs.com/package/@oxfmt/binding-linux-arm64-musl/v/0.72.0 + Archive: https://registry.npmjs.org/@oxfmt/binding-linux-arm64-musl/-/binding-linux-arm64-musl-0.72.0.tgz + Integrity: sha512-poafnbsPpJhR+5Mbwpf8CscugTyiRAzjTOxRVn8ra3X2jnURs2xL5Du2xl5g2iW85lICMglpmLf8jDjZEbNgzQ== +@oxfmt/binding-linux-ppc64-gnu@0.72.0 | development, optional | MIT + Lockfile path: node_modules/@oxfmt/binding-linux-ppc64-gnu + Package: https://www.npmjs.com/package/@oxfmt/binding-linux-ppc64-gnu/v/0.72.0 + Archive: https://registry.npmjs.org/@oxfmt/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-0.72.0.tgz + Integrity: sha512-zNUi0gKRsO7S3IfPzsTbnm88OedPuX32hmZFWZRWHvWJlAoZRwVbeO6Nb3hng4vDgL7qUKp4TGqzPz1mhsycYg== +@oxfmt/binding-linux-riscv64-gnu@0.72.0 | development, optional | MIT + Lockfile path: node_modules/@oxfmt/binding-linux-riscv64-gnu + Package: https://www.npmjs.com/package/@oxfmt/binding-linux-riscv64-gnu/v/0.72.0 + Archive: https://registry.npmjs.org/@oxfmt/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-0.72.0.tgz + Integrity: sha512-qTY7z/iyF/rWI2HWwWMevXqZW5PZUOofUy2afK7v6rseXnpld3yjgyIk6pCux3DqWQ0lB+f5atvLJNBwzLvFsw== +@oxfmt/binding-linux-riscv64-musl@0.72.0 | development, optional | MIT + Lockfile path: node_modules/@oxfmt/binding-linux-riscv64-musl + Package: https://www.npmjs.com/package/@oxfmt/binding-linux-riscv64-musl/v/0.72.0 + Archive: https://registry.npmjs.org/@oxfmt/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-0.72.0.tgz + Integrity: sha512-w18qfo8vEMD6EKEHtzTvjc6jH8yCyXIT1Bn7PFWJd0PpZyzH/VQDx4xvjCh0LGz6GRzqiezbisTdG9AoXtpkZQ== +@oxfmt/binding-linux-s390x-gnu@0.72.0 | development, optional | MIT + Lockfile path: node_modules/@oxfmt/binding-linux-s390x-gnu + Package: https://www.npmjs.com/package/@oxfmt/binding-linux-s390x-gnu/v/0.72.0 + Archive: https://registry.npmjs.org/@oxfmt/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-0.72.0.tgz + Integrity: sha512-grW8HwEir+vK7fCcq1ZgL3NHQCfZ1PidiERE9Hbf+24xGys+DoDaoqTht4ccfn0PcBwbViLkwkda/KNpJu2KRQ== +@oxfmt/binding-linux-x64-gnu@0.72.0 | development, optional | MIT + Lockfile path: node_modules/@oxfmt/binding-linux-x64-gnu + Package: https://www.npmjs.com/package/@oxfmt/binding-linux-x64-gnu/v/0.72.0 + Archive: https://registry.npmjs.org/@oxfmt/binding-linux-x64-gnu/-/binding-linux-x64-gnu-0.72.0.tgz + Integrity: sha512-wQJRQfWBRIn88Pkr449EUViwRayrYUScg7ty+Ihiem21mQ9BUA6S9e/4RAgyNk9lMag0KBouyKskjq61rOC0WQ== +@oxfmt/binding-linux-x64-musl@0.72.0 | development, optional | MIT + Lockfile path: node_modules/@oxfmt/binding-linux-x64-musl + Package: https://www.npmjs.com/package/@oxfmt/binding-linux-x64-musl/v/0.72.0 + Archive: https://registry.npmjs.org/@oxfmt/binding-linux-x64-musl/-/binding-linux-x64-musl-0.72.0.tgz + Integrity: sha512-T1B0uQzafxuGPjjaPrZJ497nxoi1BiI65JfsYc56nNpmev3msfb/iaTmH2kQuNFqa8PKxpMlf3GhWrWBvBPORQ== +@oxfmt/binding-openharmony-arm64@0.72.0 | development, optional | MIT + Lockfile path: node_modules/@oxfmt/binding-openharmony-arm64 + Package: https://www.npmjs.com/package/@oxfmt/binding-openharmony-arm64/v/0.72.0 + Archive: https://registry.npmjs.org/@oxfmt/binding-openharmony-arm64/-/binding-openharmony-arm64-0.72.0.tgz + Integrity: sha512-OKxxgTurl7+hypVplO8QRAbbQlwEs0j1Y6FZv+ZN2qNbdxQk2muMlzuJNBGTCWwxQ0rkkOD1uK/DW1fvzoUSJA== +@oxfmt/binding-win32-arm64-msvc@0.72.0 | development, optional | MIT + Lockfile path: node_modules/@oxfmt/binding-win32-arm64-msvc + Package: https://www.npmjs.com/package/@oxfmt/binding-win32-arm64-msvc/v/0.72.0 + Archive: https://registry.npmjs.org/@oxfmt/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-0.72.0.tgz + Integrity: sha512-L78TKzURqvjuZOCo88ixMbPXf/RP7u31Y0cmjJ/KEmrHmfYhmhEvsDaTYPiyTRne64jUgCbADfY0YeoQk4/Xyw== +@oxfmt/binding-win32-ia32-msvc@0.72.0 | development, optional | MIT + Lockfile path: node_modules/@oxfmt/binding-win32-ia32-msvc + Package: https://www.npmjs.com/package/@oxfmt/binding-win32-ia32-msvc/v/0.72.0 + Archive: https://registry.npmjs.org/@oxfmt/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-0.72.0.tgz + Integrity: sha512-gQtFW+Ii8BWgtJTAD17TY/WsdNS5gUfAPov8iI1jeq4r9lRRYImmxPL08UU00/RLaCfBJwh2UgINnDY0iOiZ+A== +@oxfmt/binding-win32-x64-msvc@0.72.0 | development, optional | MIT + Lockfile path: node_modules/@oxfmt/binding-win32-x64-msvc + Package: https://www.npmjs.com/package/@oxfmt/binding-win32-x64-msvc/v/0.72.0 + Archive: https://registry.npmjs.org/@oxfmt/binding-win32-x64-msvc/-/binding-win32-x64-msvc-0.72.0.tgz + Integrity: sha512-uhooIN+DCzWX5uH7mQkSVCsODqsGluGJ4n3ch4+mITtWKpESMDjUJUSDBAVFuYQDwqY2McPDKdKJbM0oZVW/Qw== +@oxlint/binding-android-arm-eabi@1.87.0 | development, optional | MIT + Lockfile path: node_modules/@oxlint/binding-android-arm-eabi + Package: https://www.npmjs.com/package/@oxlint/binding-android-arm-eabi/v/1.87.0 + Archive: https://registry.npmjs.org/@oxlint/binding-android-arm-eabi/-/binding-android-arm-eabi-1.87.0.tgz + Integrity: sha512-22tVIHlB9898OYsBKmYB6He1MCSqdTmK1BVWuSNUTVrpS0KWNege+U9uEYqGJ+KatQag0r/oU44i3OOs46z7HQ== +@oxlint/binding-android-arm64@1.87.0 | development, optional | MIT + Lockfile path: node_modules/@oxlint/binding-android-arm64 + Package: https://www.npmjs.com/package/@oxlint/binding-android-arm64/v/1.87.0 + Archive: https://registry.npmjs.org/@oxlint/binding-android-arm64/-/binding-android-arm64-1.87.0.tgz + Integrity: sha512-JfZQ3MWf74n8ov0DojZpkOduIubYJvZL5tbTMMhDutsal6u1xH1QuNpN+lK+EQwF8AeAfgwTR2fgh5U2br27XA== +@oxlint/binding-darwin-arm64@1.87.0 | development, optional | MIT + Lockfile path: node_modules/@oxlint/binding-darwin-arm64 + Package: https://www.npmjs.com/package/@oxlint/binding-darwin-arm64/v/1.87.0 + Archive: https://registry.npmjs.org/@oxlint/binding-darwin-arm64/-/binding-darwin-arm64-1.87.0.tgz + Integrity: sha512-rkx6Xvvw93z2GImVOyvbZwAZcoY0Z6MJW177XNsSB+i/CBsH7ANyelTp01VZyIkM3iSXtqKVb4+ptBgPHap5pQ== +@oxlint/binding-darwin-x64@1.87.0 | development, optional | MIT + Lockfile path: node_modules/@oxlint/binding-darwin-x64 + Package: https://www.npmjs.com/package/@oxlint/binding-darwin-x64/v/1.87.0 + Archive: https://registry.npmjs.org/@oxlint/binding-darwin-x64/-/binding-darwin-x64-1.87.0.tgz + Integrity: sha512-cw5nYw7L/pQ2SgGBgOcg/Qo89llQre3vIc/kuBLhSICzu1r5s8L76H3ug6AIFsD98WpROj8/z5JVzkf4daxHaQ== +@oxlint/binding-freebsd-x64@1.87.0 | development, optional | MIT + Lockfile path: node_modules/@oxlint/binding-freebsd-x64 + Package: https://www.npmjs.com/package/@oxlint/binding-freebsd-x64/v/1.87.0 + Archive: https://registry.npmjs.org/@oxlint/binding-freebsd-x64/-/binding-freebsd-x64-1.87.0.tgz + Integrity: sha512-x/SuznE6loRZK9gz9AS4ZmzNzSu+5KdeoCS+sVHhnrE8HM6AD8UyTjwldQTTqlXGvkwHASgB0NiTNOc3o3PdAg== +@oxlint/binding-linux-arm-gnueabihf@1.87.0 | development, optional | MIT + Lockfile path: node_modules/@oxlint/binding-linux-arm-gnueabihf + Package: https://www.npmjs.com/package/@oxlint/binding-linux-arm-gnueabihf/v/1.87.0 + Archive: https://registry.npmjs.org/@oxlint/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.87.0.tgz + Integrity: sha512-+JEDmCAXiiFmKhAjZhgAOwaHWY6WENOQ5QA+lFuY59tgsUCDOTRi46B+lENK6CWvtxsXpwkZXNOgpjAQcpIpnA== +@oxlint/binding-linux-arm-musleabihf@1.87.0 | development, optional | MIT + Lockfile path: node_modules/@oxlint/binding-linux-arm-musleabihf + Package: https://www.npmjs.com/package/@oxlint/binding-linux-arm-musleabihf/v/1.87.0 + Archive: https://registry.npmjs.org/@oxlint/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-1.87.0.tgz + Integrity: sha512-/uC9XqXLAC9AHFLNycwmSQEvKqGrOCgU+uXALI7gNW0DG81TJ/3T2eHnKdRvcb5R1gFEfjxDwI4e4zIa29rICQ== +@oxlint/binding-linux-arm64-gnu@1.87.0 | development, optional | MIT + Lockfile path: node_modules/@oxlint/binding-linux-arm64-gnu + Package: https://www.npmjs.com/package/@oxlint/binding-linux-arm64-gnu/v/1.87.0 + Archive: https://registry.npmjs.org/@oxlint/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.87.0.tgz + Integrity: sha512-FTRYPsBy/M728vnUv7l+KAwSAa3Qi4BQbhVvy7NYuMTZ0sUa/OWsbMx79HVFw6u/5KWcaYayDsoOiv7xbevzDg== +@oxlint/binding-linux-arm64-musl@1.87.0 | development, optional | MIT + Lockfile path: node_modules/@oxlint/binding-linux-arm64-musl + Package: https://www.npmjs.com/package/@oxlint/binding-linux-arm64-musl/v/1.87.0 + Archive: https://registry.npmjs.org/@oxlint/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.87.0.tgz + Integrity: sha512-6sC+N7IY0h1egd8SrYUGNN7CUyKJZ4bIZakKa7V7hfinf4jfi8Kq4+klJvFp5DqXcwMn44I5MeBwmJluO1odFg== +@oxlint/binding-linux-ppc64-gnu@1.87.0 | development, optional | MIT + Lockfile path: node_modules/@oxlint/binding-linux-ppc64-gnu + Package: https://www.npmjs.com/package/@oxlint/binding-linux-ppc64-gnu/v/1.87.0 + Archive: https://registry.npmjs.org/@oxlint/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.87.0.tgz + Integrity: sha512-d5Mnn+ICbhoJPi37Ccjy+86T5qfH2+mSTrTMBXNPfB+wqSWOayBBLLIrCXdUy1YssluCVdGkl+DO9w5r5ODmUA== +@oxlint/binding-linux-riscv64-gnu@1.87.0 | development, optional | MIT + Lockfile path: node_modules/@oxlint/binding-linux-riscv64-gnu + Package: https://www.npmjs.com/package/@oxlint/binding-linux-riscv64-gnu/v/1.87.0 + Archive: https://registry.npmjs.org/@oxlint/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-1.87.0.tgz + Integrity: sha512-sf5YWuUo1Dx9loqWCgF8P278MycfcD4JHjDC/LV5j11L3Lqa4PFiwCjD6B8kP4AjsgZZkLn3xbpJEtZBaccs4Q== +@oxlint/binding-linux-riscv64-musl@1.87.0 | development, optional | MIT + Lockfile path: node_modules/@oxlint/binding-linux-riscv64-musl + Package: https://www.npmjs.com/package/@oxlint/binding-linux-riscv64-musl/v/1.87.0 + Archive: https://registry.npmjs.org/@oxlint/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-1.87.0.tgz + Integrity: sha512-+aCraYbmK3uU3P0rFojjeaK9pGY6JvBDXh/0CM+gPyWKmNmXmnFe0qj4qj02U4ibFpbd9Pa9CmDvIdjJUd29rA== +@oxlint/binding-linux-s390x-gnu@1.87.0 | development, optional | MIT + Lockfile path: node_modules/@oxlint/binding-linux-s390x-gnu + Package: https://www.npmjs.com/package/@oxlint/binding-linux-s390x-gnu/v/1.87.0 + Archive: https://registry.npmjs.org/@oxlint/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.87.0.tgz + Integrity: sha512-7rzbZQIljo6VLWVPqUyLa2P/WV3VFsJB4M52R4NCUJn1A50yjtUsHxiMHFL9opEKGFIiTbZ3VQzmtcJOPUq4NQ== +@oxlint/binding-linux-x64-gnu@1.87.0 | development, optional | MIT + Lockfile path: node_modules/@oxlint/binding-linux-x64-gnu + Package: https://www.npmjs.com/package/@oxlint/binding-linux-x64-gnu/v/1.87.0 + Archive: https://registry.npmjs.org/@oxlint/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.87.0.tgz + Integrity: sha512-Dry46Fa+AXE/xt9J/YriujU1pU9mzfNWHGQwtOYibAFH8HLrKWCi93AhIGnuUMiwn2JbuBkRyz51f50Ly4r4ow== +@oxlint/binding-linux-x64-musl@1.87.0 | development, optional | MIT + Lockfile path: node_modules/@oxlint/binding-linux-x64-musl + Package: https://www.npmjs.com/package/@oxlint/binding-linux-x64-musl/v/1.87.0 + Archive: https://registry.npmjs.org/@oxlint/binding-linux-x64-musl/-/binding-linux-x64-musl-1.87.0.tgz + Integrity: sha512-f/HMZez74gJvnRpGz+b5sdGyWrEgRLmFTXg9sNoqjPWogGxYHUhXKTKyMiYsu9rUGR2ciYqL3fk+Ua4JhMJbRA== +@oxlint/binding-openharmony-arm64@1.87.0 | development, optional | MIT + Lockfile path: node_modules/@oxlint/binding-openharmony-arm64 + Package: https://www.npmjs.com/package/@oxlint/binding-openharmony-arm64/v/1.87.0 + Archive: https://registry.npmjs.org/@oxlint/binding-openharmony-arm64/-/binding-openharmony-arm64-1.87.0.tgz + Integrity: sha512-lEC6ZfPZm/07JlB7FsOWX9o1RiHlXiBW594LSUGuXmekC8LZmvUPP9XzE2WZcNxJi5cHA/Fw56o02c3JxgMA5g== +@oxlint/binding-win32-arm64-msvc@1.87.0 | development, optional | MIT + Lockfile path: node_modules/@oxlint/binding-win32-arm64-msvc + Package: https://www.npmjs.com/package/@oxlint/binding-win32-arm64-msvc/v/1.87.0 + Archive: https://registry.npmjs.org/@oxlint/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.87.0.tgz + Integrity: sha512-afBWKOD36dUiA9AenaiWpCg8xfyUVPYznyAAVXu413brK4RA5UI/Xoc4yfeGIT8G1a44MV+JR7hioryerBDzGQ== +@oxlint/binding-win32-ia32-msvc@1.87.0 | development, optional | MIT + Lockfile path: node_modules/@oxlint/binding-win32-ia32-msvc + Package: https://www.npmjs.com/package/@oxlint/binding-win32-ia32-msvc/v/1.87.0 + Archive: https://registry.npmjs.org/@oxlint/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.87.0.tgz + Integrity: sha512-daptNsEOuru4/nJTxV4DBHNJ5GepzmaBVQf+jjgKQGi9NRlZKik+RFq4hUL7ewsF1pwjKM+SkYaMbF82UwFGnw== +@oxlint/binding-win32-x64-msvc@1.87.0 | development, optional | MIT + Lockfile path: node_modules/@oxlint/binding-win32-x64-msvc + Package: https://www.npmjs.com/package/@oxlint/binding-win32-x64-msvc/v/1.87.0 + Archive: https://registry.npmjs.org/@oxlint/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.87.0.tgz + Integrity: sha512-k+m/EShyXE29J/r1fjk0HlAzhN5JhIvj044oSJkXTEkCLrWZQgXb/3r4q5LTw/eaKW/4GuMXG2xmiJs3s5rPNw== +@pinojs/redact@0.4.0 | runtime | MIT + Lockfile path: node_modules/@pinojs/redact + Package: https://www.npmjs.com/package/@pinojs/redact/v/0.4.0 + Archive: https://registry.npmjs.org/@pinojs/redact/-/redact-0.4.0.tgz + Integrity: sha512-k2ENnmBugE/rzQfEcdWHcCY+/FM3VLzH9cYEsbdsoqrvzAKRhUZeRNhAZvB8OitQJ1TBed3yqWtdjzS6wJKBwg== +@rolldown/binding-android-arm-eabi@1.2.12 | development, optional | MIT + Lockfile path: node_modules/@rolldown/binding-android-arm-eabi + Package: https://www.npmjs.com/package/@rolldown/binding-android-arm-eabi/v/1.2.12 + Archive: https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.12.tgz + Integrity: sha512-dB/a1214qKfHMXCpgqR4OZT+jS4kTyEXbQGJPqzobt5EwH5rX080pxE37alt3RzvR1bf1Yz/yGqRfrYAxuPw0A== +@rolldown/binding-android-arm64@1.2.12 | development, optional | MIT + Lockfile path: node_modules/@rolldown/binding-android-arm64 + Package: https://www.npmjs.com/package/@rolldown/binding-android-arm64/v/1.2.12 + Archive: https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.12.tgz + Integrity: sha512-7KHFgQ5VJxIHcLlrwrc3Xbds7oTNQT7Pgi9gQCJKrd2VGab/UksIOYp6VD8MzCstGxOKMgNamPwUCfxPdP1OHg== +@rolldown/binding-darwin-arm64@1.2.12 | development, optional | MIT + Lockfile path: node_modules/@rolldown/binding-darwin-arm64 + Package: https://www.npmjs.com/package/@rolldown/binding-darwin-arm64/v/1.2.12 + Archive: https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.12.tgz + Integrity: sha512-3YIhqHD96nA5SaYNRBR16HnGv4oavZvXfD/ayHM+oYZ0WD/8lBAtf6zQua4kEyAvpqrluKXl0lnOBoiNby7x9w== +@rolldown/binding-darwin-x64@1.2.12 | development, optional | MIT + Lockfile path: node_modules/@rolldown/binding-darwin-x64 + Package: https://www.npmjs.com/package/@rolldown/binding-darwin-x64/v/1.2.12 + Archive: https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.12.tgz + Integrity: sha512-UuuJ35MFw4gmFOrE9pEqIV+K3syIKveph+Qc1/ljHZVdoDW4pz/JHR/eMVom+TZGl/5OOvGJOWaOCVt3ZfqhxA== +@rolldown/binding-freebsd-x64@1.2.12 | development, optional | MIT + Lockfile path: node_modules/@rolldown/binding-freebsd-x64 + Package: https://www.npmjs.com/package/@rolldown/binding-freebsd-x64/v/1.2.12 + Archive: https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.12.tgz + Integrity: sha512-uMvssit0a4W+/7D8CbHUvG719mH3R2jwXAlh/XcPvuHTE0g++LymF88DCGNX0HM2rBOn0xrzgXktIB6fLSJBTQ== +@rolldown/binding-linux-arm-gnueabihf@1.2.12 | development, optional | MIT + Lockfile path: node_modules/@rolldown/binding-linux-arm-gnueabihf + Package: https://www.npmjs.com/package/@rolldown/binding-linux-arm-gnueabihf/v/1.2.12 + Archive: https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.12.tgz + Integrity: sha512-XcFu0R0xWnwzSf4IQgFH1rJIckPN1pLy2R+4r9IDB7Yfu/ys9cVqfa4pBrMHj7a3gl8mIR4nRNPg0e5IvEVs6g== +@rolldown/binding-linux-arm64-gnu@1.2.12 | development, optional | MIT + Lockfile path: node_modules/@rolldown/binding-linux-arm64-gnu + Package: https://www.npmjs.com/package/@rolldown/binding-linux-arm64-gnu/v/1.2.12 + Archive: https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.12.tgz + Integrity: sha512-260UrKgn8tz39ak+SMDOirKzr7V04M9dWPw5llW00SwBivCZoWcRBKV1d8cXnRkUmSZA3BdiUmBHWk7734Ulpw== +@rolldown/binding-linux-arm64-musl@1.2.12 | development, optional | MIT + Lockfile path: node_modules/@rolldown/binding-linux-arm64-musl + Package: https://www.npmjs.com/package/@rolldown/binding-linux-arm64-musl/v/1.2.12 + Archive: https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.12.tgz + Integrity: sha512-5YK1I9SqDkbPgc1IA8BgDl34suqUS2q0KWnBrirm0E51YjOs6eo6dV6jbQfNE/argHRSvd0QUGgtpIoYx+WWpw== +@rolldown/binding-linux-ppc64-gnu@1.2.12 | development, optional | MIT + Lockfile path: node_modules/@rolldown/binding-linux-ppc64-gnu + Package: https://www.npmjs.com/package/@rolldown/binding-linux-ppc64-gnu/v/1.2.12 + Archive: https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.12.tgz + Integrity: sha512-Rkcrmp7eFRg74yL5fXEU91JEWbdEPLevWwGtXpmhbjlD1StScbWTmO94Bhly+Mo+ketKYkdmM1vNUKeWSlx8cQ== +@rolldown/binding-linux-s390x-gnu@1.2.12 | development, optional | MIT + Lockfile path: node_modules/@rolldown/binding-linux-s390x-gnu + Package: https://www.npmjs.com/package/@rolldown/binding-linux-s390x-gnu/v/1.2.12 + Archive: https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.12.tgz + Integrity: sha512-qvK4DuAsQc2BSjlx+Xr+IzOIvvxbGZqxFwdWfG6F518Erj0GGISyQbJ6pIappnOxlNPzNHvo/L0BwB30GZ+zVw== +@rolldown/binding-linux-x64-gnu@1.2.12 | development, optional | MIT + Lockfile path: node_modules/@rolldown/binding-linux-x64-gnu + Package: https://www.npmjs.com/package/@rolldown/binding-linux-x64-gnu/v/1.2.12 + Archive: https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.12.tgz + Integrity: sha512-Q9uLBO53Xd4QIq1WOycVQyPP1O4HhraEV2qqb3uTrnVw6QZih9duY4vNXOivL1xoUS1/z+W8eF4NMfl2a8Sdjw== +@rolldown/binding-linux-x64-musl@1.2.12 | development, optional | MIT + Lockfile path: node_modules/@rolldown/binding-linux-x64-musl + Package: https://www.npmjs.com/package/@rolldown/binding-linux-x64-musl/v/1.2.12 + Archive: https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.12.tgz + Integrity: sha512-3IBxWFMjbOZskDPKv8Lf9BCnahlKuHthWkYnyIxOH/QcJrFcS4EmcenthApkwr/5+nEqZlLzeYbxeMaX7A5u4g== +@rolldown/binding-openharmony-arm64@1.2.12 | development, optional | MIT + Lockfile path: node_modules/@rolldown/binding-openharmony-arm64 + Package: https://www.npmjs.com/package/@rolldown/binding-openharmony-arm64/v/1.2.12 + Archive: https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.12.tgz + Integrity: sha512-xtX61xg4LKPkPWilZU1ynKClz5Gj4bf74LML4r3eVLWumKnGjoEr1OSHQhMdbBDoYTi+yjrujvpZe2pUnqCrrA== +@rolldown/binding-win32-arm64-msvc@1.2.12 | development, optional | MIT + Lockfile path: node_modules/@rolldown/binding-win32-arm64-msvc + Package: https://www.npmjs.com/package/@rolldown/binding-win32-arm64-msvc/v/1.2.12 + Archive: https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.12.tgz + Integrity: sha512-At7fPB6PCaIjzgIhEZFxuT+BBFqiQibJDT4d3PhiR3f4E7bbMZF4aKblbFfEM3sETRDd1YiQx/+U/g/B/ou5Ew== +@rolldown/binding-win32-x64-msvc@1.2.12 | development, optional | MIT + Lockfile path: node_modules/@rolldown/binding-win32-x64-msvc + Package: https://www.npmjs.com/package/@rolldown/binding-win32-x64-msvc/v/1.2.12 + Archive: https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.12.tgz + Integrity: sha512-WIw2haVKwjuYdXkHaoC0mF8Le71TuCBxjrdKqLbJGctbBABj+ClfmNvtbOnzpq3RokNo5+V1qhtSzJyXorsklQ== +@rolldown/pluginutils@1.0.1 | development | MIT + Lockfile path: node_modules/@rolldown/pluginutils + Package: https://www.npmjs.com/package/@rolldown/pluginutils/v/1.0.1 + Archive: https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz + Integrity: sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw== +@rollup/rollup-android-arm-eabi@4.64.1 | development, optional | MIT + Lockfile path: node_modules/@rollup/rollup-android-arm-eabi + Package: https://www.npmjs.com/package/@rollup/rollup-android-arm-eabi/v/4.64.1 + Archive: https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.64.1.tgz + Integrity: sha512-QRU7UpoS9hd8Ij5I6fCVBxZ0UpdfAbZ5y7BWG5STFGMoM9jGzUP464yYAa3CzZxvG+jBwq1kI8L07xx0ReAdGA== +@rollup/rollup-android-arm64@4.64.1 | development, optional | MIT + Lockfile path: node_modules/@rollup/rollup-android-arm64 + Package: https://www.npmjs.com/package/@rollup/rollup-android-arm64/v/4.64.1 + Archive: https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.64.1.tgz + Integrity: sha512-ttQF6Rp4MrNy9/2AOPmHmMXbNE8kIlNPYoGC3ksid9tonleMQALfrhTFJiQxobBvXYKG5Wcc8VGcHWTHR0ik8w== +@rollup/rollup-darwin-arm64@4.64.1 | development, optional | MIT + Lockfile path: node_modules/@rollup/rollup-darwin-arm64 + Package: https://www.npmjs.com/package/@rollup/rollup-darwin-arm64/v/4.64.1 + Archive: https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.64.1.tgz + Integrity: sha512-MvzZ+qbBi5jrafURHsASUF1qW/58tOJFt/gFVJo2znQWrKX4CSf/Lt/qGONtoA4yHsNL5QzgdXMuITZxAs62Vg== +@rollup/rollup-darwin-x64@4.64.1 | development, optional | MIT + Lockfile path: node_modules/@rollup/rollup-darwin-x64 + Package: https://www.npmjs.com/package/@rollup/rollup-darwin-x64/v/4.64.1 + Archive: https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.64.1.tgz + Integrity: sha512-9uj1VBuiPK5ij/+g0mCK17X+V/4SbErvRQMXIQjZAtbl4VcUhv63RhPZsFSWHrCRkTd3FKDtaVTrtT0+8bIhhQ== +@rollup/rollup-freebsd-arm64@4.64.1 | development, optional | MIT + Lockfile path: node_modules/@rollup/rollup-freebsd-arm64 + Package: https://www.npmjs.com/package/@rollup/rollup-freebsd-arm64/v/4.64.1 + Archive: https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.64.1.tgz + Integrity: sha512-FCoXm836IqcXWhWPRkqlLx3Hjnv9S7c8tg5MFwsgHB3aFCz1JjUy6b1ssrxEjEbqaHpnvRmNjUUHxsXuU85NYA== +@rollup/rollup-freebsd-x64@4.64.1 | development, optional | MIT + Lockfile path: node_modules/@rollup/rollup-freebsd-x64 + Package: https://www.npmjs.com/package/@rollup/rollup-freebsd-x64/v/4.64.1 + Archive: https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.64.1.tgz + Integrity: sha512-Xa6Oxo86Ilx1hq1vNb69541NOuUyhGEH3Sc0g7eGkfsfRblWh4hAa4Lj2GWwZyfUVYL+Z4xK3TxhwIuZ3fNPLg== +@rollup/rollup-linux-arm-gnueabihf@4.64.1 | development, optional | MIT + Lockfile path: node_modules/@rollup/rollup-linux-arm-gnueabihf + Package: https://www.npmjs.com/package/@rollup/rollup-linux-arm-gnueabihf/v/4.64.1 + Archive: https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.64.1.tgz + Integrity: sha512-Nkw7cVMu1yrczpzr42Mh1BZ5Ai5A4Fsz2Je/frbwHmazpQTJzP+qo7pNjdxHrxVj56ivKTJihNoN90OD1hGxBA== +@rollup/rollup-linux-arm-musleabihf@4.64.1 | development, optional | MIT + Lockfile path: node_modules/@rollup/rollup-linux-arm-musleabihf + Package: https://www.npmjs.com/package/@rollup/rollup-linux-arm-musleabihf/v/4.64.1 + Archive: https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.64.1.tgz + Integrity: sha512-JONaLM9mZPXbSetxMzYG3496qoJuWvG2ERCTrrVptfw/Fwe4UzrQoEx/mYEeZCRv/Xz0RldOLFeqDfqmH75/Zg== +@rollup/rollup-linux-arm64-gnu@4.64.1 | development, optional | MIT + Lockfile path: node_modules/@rollup/rollup-linux-arm64-gnu + Package: https://www.npmjs.com/package/@rollup/rollup-linux-arm64-gnu/v/4.64.1 + Archive: https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.64.1.tgz + Integrity: sha512-OfimHma+prmdoobHI3tfYud2enQ2LXYaMu+iMUQH7IjJkykJ6qUmAs1M/scdQaEKRWysiKwTctsDa2LXvaO0xw== +@rollup/rollup-linux-arm64-musl@4.64.1 | development, optional | MIT + Lockfile path: node_modules/@rollup/rollup-linux-arm64-musl + Package: https://www.npmjs.com/package/@rollup/rollup-linux-arm64-musl/v/4.64.1 + Archive: https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.64.1.tgz + Integrity: sha512-X5fwh2HM8EHbgfFwpf4m2x2pG/AHdQ2aPDPk+JCDwV4DPeM8yxYmKG1vvm123JSc9gBSu8tu9NECA99wHPztsw== +@rollup/rollup-linux-loong64-gnu@4.64.1 | development, optional | MIT + Lockfile path: node_modules/@rollup/rollup-linux-loong64-gnu + Package: https://www.npmjs.com/package/@rollup/rollup-linux-loong64-gnu/v/4.64.1 + Archive: https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.64.1.tgz + Integrity: sha512-8dp2TxKdjiX/4f7Da9gF7BR29hygxOQlHxKNa8qxJHoqZ13ytrogFTpMPhtVEFrgFu9MSOabAn006PeoygavjA== +@rollup/rollup-linux-loong64-musl@4.64.1 | development, optional | MIT + Lockfile path: node_modules/@rollup/rollup-linux-loong64-musl + Package: https://www.npmjs.com/package/@rollup/rollup-linux-loong64-musl/v/4.64.1 + Archive: https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.64.1.tgz + Integrity: sha512-YuYDpRSZnU9qLf6sqyhiBdMRCw5ImECGLNqRjM2hZrJIEwAckameWkRJ3SUnn0oxSewZIib/4iLwyEXj40QqQQ== +@rollup/rollup-linux-ppc64-gnu@4.64.1 | development, optional | MIT + Lockfile path: node_modules/@rollup/rollup-linux-ppc64-gnu + Package: https://www.npmjs.com/package/@rollup/rollup-linux-ppc64-gnu/v/4.64.1 + Archive: https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.64.1.tgz + Integrity: sha512-gGj3v7YYkysy7IbfclMI4PDtHaa6YX4nU1D5NR1fyvXAGqM4TDk28ZWvrpOkkK92eoQRryAludWz6jNjsm77Qg== +@rollup/rollup-linux-ppc64-musl@4.64.1 | development, optional | MIT + Lockfile path: node_modules/@rollup/rollup-linux-ppc64-musl + Package: https://www.npmjs.com/package/@rollup/rollup-linux-ppc64-musl/v/4.64.1 + Archive: https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.64.1.tgz + Integrity: sha512-DTZVwvS94FUYpP0CjCfz2iT0XTmBfQGc/arx9IdwUbDImpe9h8dWuMT/oPUvcGiwLKMQoNmuFBx3AVajm+FNjA== +@rollup/rollup-linux-riscv64-gnu@4.64.1 | development, optional | MIT + Lockfile path: node_modules/@rollup/rollup-linux-riscv64-gnu + Package: https://www.npmjs.com/package/@rollup/rollup-linux-riscv64-gnu/v/4.64.1 + Archive: https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.64.1.tgz + Integrity: sha512-NWnyiq2moc8iEHGyTjIFadJTy8VCvCU/rUBfor+3l30JOQKAifpmKdxX4ZxRRPSPE/rLhFpLADdzNjS3Ldctdw== +@rollup/rollup-linux-riscv64-musl@4.64.1 | development, optional | MIT + Lockfile path: node_modules/@rollup/rollup-linux-riscv64-musl + Package: https://www.npmjs.com/package/@rollup/rollup-linux-riscv64-musl/v/4.64.1 + Archive: https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.64.1.tgz + Integrity: sha512-yIz+7L37g7bVOGLaUQmGqiYADH262krL4dtf5zU6QGldPgOairLEgW1FTs5pP0UFkHq5uf2qxDttOFsVAX6kxg== +@rollup/rollup-linux-s390x-gnu@4.64.1 | development, optional | MIT + Lockfile path: node_modules/@rollup/rollup-linux-s390x-gnu + Package: https://www.npmjs.com/package/@rollup/rollup-linux-s390x-gnu/v/4.64.1 + Archive: https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.64.1.tgz + Integrity: sha512-sRK+GWovJZV6ijyV/k1Ft3FL5+4DscF5OYsJolTbhVTTLFxKOPVjS0wxUUHakvL0vRw/cbFxZNeZLfM/EzuQhA== +@rollup/rollup-linux-x64-gnu@4.64.1 | development, optional | MIT + Lockfile path: node_modules/@rollup/rollup-linux-x64-gnu + Package: https://www.npmjs.com/package/@rollup/rollup-linux-x64-gnu/v/4.64.1 + Archive: https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.64.1.tgz + Integrity: sha512-T2C0NXqqD063yJdm8UGdcoudBATDODdphEXWS7rEoh0jOITfoEBv7LHfRBYVsy+pI7wwxgScoZpkFiQOf40ryQ== +@rollup/rollup-linux-x64-musl@4.64.1 | development, optional | MIT + Lockfile path: node_modules/@rollup/rollup-linux-x64-musl + Package: https://www.npmjs.com/package/@rollup/rollup-linux-x64-musl/v/4.64.1 + Archive: https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.64.1.tgz + Integrity: sha512-05wl8uRZMkcobB6YZrzskr2SiM0VOdzlFw3bAxOjKKTt3M6o3O0X/hE/8xk15u8oQY17xUCdTKcNMMg45ZAFog== +@rollup/rollup-openbsd-x64@4.64.1 | development, optional | MIT + Lockfile path: node_modules/@rollup/rollup-openbsd-x64 + Package: https://www.npmjs.com/package/@rollup/rollup-openbsd-x64/v/4.64.1 + Archive: https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.64.1.tgz + Integrity: sha512-NoRZK1VclOgn9x3b9vPJ3sTxwvQ/F+Hf93xurRKSFJKiwNZyQZnLxVpqlCejhDvesMLMF8VNN+Y4jHTFddV/Xg== +@rollup/rollup-openharmony-arm64@4.64.1 | development, optional | MIT + Lockfile path: node_modules/@rollup/rollup-openharmony-arm64 + Package: https://www.npmjs.com/package/@rollup/rollup-openharmony-arm64/v/4.64.1 + Archive: https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.64.1.tgz + Integrity: sha512-SDkX4OkZBePUPf0/XsXVJLwS+O61CmkDKuIyk5CeWddK3vkE8AZjmWK+p1ILRez4wnbS5rTK+U9YmcbRyx2dHw== +@rollup/rollup-win32-arm64-msvc@4.64.1 | development, optional | MIT + Lockfile path: node_modules/@rollup/rollup-win32-arm64-msvc + Package: https://www.npmjs.com/package/@rollup/rollup-win32-arm64-msvc/v/4.64.1 + Archive: https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.64.1.tgz + Integrity: sha512-JQ7el/Plr3juYFxIVu9YXDPNl57XR2L8WIc87JX9wj0L3goV8fXQPQXb3DaHVXq61X/WCGWsTCQsQHo6/Mz5UQ== +@rollup/rollup-win32-ia32-msvc@4.64.1 | development, optional | MIT + Lockfile path: node_modules/@rollup/rollup-win32-ia32-msvc + Package: https://www.npmjs.com/package/@rollup/rollup-win32-ia32-msvc/v/4.64.1 + Archive: https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.64.1.tgz + Integrity: sha512-oZSlQ2H3ZDOz3ce1jEyuOZKuD0tPY/D2cKGMcMl0jhHQauBvkHHKAGR1OeRiMluvu3itzLRU2xCTUZptLayObA== +@rollup/rollup-win32-x64-gnu@4.64.1 | development, optional | MIT + Lockfile path: node_modules/@rollup/rollup-win32-x64-gnu + Package: https://www.npmjs.com/package/@rollup/rollup-win32-x64-gnu/v/4.64.1 + Archive: https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.64.1.tgz + Integrity: sha512-Do2m3jUeVAvUDpee/yVZYRqhO8Ecx4x5sX3EVGalqLx+OxecLDGx3sIwPEm1Nq+MFK2FV3pgdpwWP4624b85Og== +@rollup/rollup-win32-x64-msvc@4.64.1 | development, optional | MIT + Lockfile path: node_modules/@rollup/rollup-win32-x64-msvc + Package: https://www.npmjs.com/package/@rollup/rollup-win32-x64-msvc/v/4.64.1 + Archive: https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.64.1.tgz + Integrity: sha512-KpxCwRn1Qh3tmBHAqIAF4HtUCVKqZd0w57TsItWblx3QVeJLtXaSgeBFAj1WAvBSpBo+Mh9iZCjj6YW/HaBVMw== +@scalar/openapi-types@0.8.0 | runtime | MIT + Lockfile path: node_modules/@scalar/openapi-types + Package: https://www.npmjs.com/package/@scalar/openapi-types/v/0.8.0 + Archive: https://registry.npmjs.org/@scalar/openapi-types/-/openapi-types-0.8.0.tgz + Integrity: sha512-WmaxVSfvY5K/TwcG2B2TU1WOe1As1uc2s7myswtP6dBlcjU3hM08SApxv/jmyGaCE8t4gO5BBhmHY4pDUfmr2g== +@shikijs/core@2.5.0 | development | MIT + Lockfile path: node_modules/@shikijs/core + Package: https://www.npmjs.com/package/@shikijs/core/v/2.5.0 + Archive: https://registry.npmjs.org/@shikijs/core/-/core-2.5.0.tgz + Integrity: sha512-uu/8RExTKtavlpH7XqnVYBrfBkUc20ngXiX9NSrBhOVZYv/7XQRKUyhtkeflY5QsxC0GbJThCerruZfsUaSldg== +@shikijs/engine-javascript@2.5.0 | development | MIT + Lockfile path: node_modules/@shikijs/engine-javascript + Package: https://www.npmjs.com/package/@shikijs/engine-javascript/v/2.5.0 + Archive: https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-2.5.0.tgz + Integrity: sha512-VjnOpnQf8WuCEZtNUdjjwGUbtAVKuZkVQ/5cHy/tojVVRIRtlWMYVjyWhxOmIq05AlSOv72z7hRNRGVBgQOl0w== +@shikijs/engine-oniguruma@2.5.0 | development | MIT + Lockfile path: node_modules/@shikijs/engine-oniguruma + Package: https://www.npmjs.com/package/@shikijs/engine-oniguruma/v/2.5.0 + Archive: https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-2.5.0.tgz + Integrity: sha512-pGd1wRATzbo/uatrCIILlAdFVKdxImWJGQ5rFiB5VZi2ve5xj3Ax9jny8QvkaV93btQEwR/rSz5ERFpC5mKNIw== +@shikijs/langs@2.5.0 | development | MIT + Lockfile path: node_modules/@shikijs/langs + Package: https://www.npmjs.com/package/@shikijs/langs/v/2.5.0 + Archive: https://registry.npmjs.org/@shikijs/langs/-/langs-2.5.0.tgz + Integrity: sha512-Qfrrt5OsNH5R+5tJ/3uYBBZv3SuGmnRPejV9IlIbFH3HTGLDlkqgHymAlzklVmKBjAaVmkPkyikAV/sQ1wSL+w== +@shikijs/themes@2.5.0 | development | MIT + Lockfile path: node_modules/@shikijs/themes + Package: https://www.npmjs.com/package/@shikijs/themes/v/2.5.0 + Archive: https://registry.npmjs.org/@shikijs/themes/-/themes-2.5.0.tgz + Integrity: sha512-wGrk+R8tJnO0VMzmUExHR+QdSaPUl/NKs+a4cQQRWyoc3YFbUzuLEi/KWK1hj+8BfHRKm2jNhhJck1dfstJpiw== +@shikijs/transformers@2.5.0 | development | MIT + Lockfile path: node_modules/@shikijs/transformers + Package: https://www.npmjs.com/package/@shikijs/transformers/v/2.5.0 + Archive: https://registry.npmjs.org/@shikijs/transformers/-/transformers-2.5.0.tgz + Integrity: sha512-SI494W5X60CaUwgi8u4q4m4s3YAFSxln3tzNjOSYqq54wlVgz0/NbbXEb3mdLbqMBztcmS7bVTaEd2w0qMmfeg== +@shikijs/types@2.5.0 | development | MIT + Lockfile path: node_modules/@shikijs/types + Package: https://www.npmjs.com/package/@shikijs/types/v/2.5.0 + Archive: https://registry.npmjs.org/@shikijs/types/-/types-2.5.0.tgz + Integrity: sha512-ygl5yhxki9ZLNuNpPitBWvcy9fsSKKaRuO4BAlMyagszQidxcpLAr0qiW/q43DtSIDxO6hEbtYLiFZNXO/hdGw== +@shikijs/vscode-textmate@10.0.2 | development | MIT + Lockfile path: node_modules/@shikijs/vscode-textmate + Package: https://www.npmjs.com/package/@shikijs/vscode-textmate/v/10.0.2 + Archive: https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-10.0.2.tgz + Integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg== +@toon-format/toon@2.3.1 | runtime | MIT + Lockfile path: node_modules/@toon-format/toon + Package: https://www.npmjs.com/package/@toon-format/toon/v/2.3.1 + Archive: https://registry.npmjs.org/@toon-format/toon/-/toon-2.3.1.tgz + Integrity: sha512-sWqEMeAJGMda9qRrfPKrX3C4c33CO9SJuvJzzrcBEn5sbDB+k6pSLkDsfN0rVnLQwR97MV3sDgVbcxQNsq8xVw== +@turbo/darwin-64@2.11.7 | development, optional | MIT + Lockfile path: node_modules/@turbo/darwin-64 + Package: https://www.npmjs.com/package/@turbo/darwin-64/v/2.11.7 + Archive: https://registry.npmjs.org/@turbo/darwin-64/-/darwin-64-2.11.7.tgz + Integrity: sha512-Z2LFOxwbiJueD1miByXJS/BrW21vv6YaQXZustty5jEX4vQYw6zyh101Sz1QO7WG0mqBzKagZ/DoAeeujI0/Sw== +@turbo/darwin-arm64@2.11.7 | development, optional | MIT + Lockfile path: node_modules/@turbo/darwin-arm64 + Package: https://www.npmjs.com/package/@turbo/darwin-arm64/v/2.11.7 + Archive: https://registry.npmjs.org/@turbo/darwin-arm64/-/darwin-arm64-2.11.7.tgz + Integrity: sha512-Vhv8ybgIflosNDSSRD9fNXHlCFA60dsGyTqQmc7l28SEX5jOaweCCD4BBYNd8/p0WGkw3e7tZbfA9w6FsujGvw== +@turbo/linux-64@2.11.7 | development, optional | MIT + Lockfile path: node_modules/@turbo/linux-64 + Package: https://www.npmjs.com/package/@turbo/linux-64/v/2.11.7 + Archive: https://registry.npmjs.org/@turbo/linux-64/-/linux-64-2.11.7.tgz + Integrity: sha512-rAqRp3blQKk1+ylMGlZHAW0eJjVNuuGUm4ZrC6RU1Im8tLryvaO4a2zLQ/FQi1TRlmKqKV9YXBki2YeytlLbXA== +@turbo/linux-arm64@2.11.7 | development, optional | MIT + Lockfile path: node_modules/@turbo/linux-arm64 + Package: https://www.npmjs.com/package/@turbo/linux-arm64/v/2.11.7 + Archive: https://registry.npmjs.org/@turbo/linux-arm64/-/linux-arm64-2.11.7.tgz + Integrity: sha512-thVYGov7S+llXAxrl3kBb/efalav0xhrjl5NHCR6AfKx14JkbqaetvbVwyss4FvZ9rt+Pv3xsTb+8SIYix8DTg== +@turbo/windows-64@2.11.7 | development, optional | MIT + Lockfile path: node_modules/@turbo/windows-64 + Package: https://www.npmjs.com/package/@turbo/windows-64/v/2.11.7 + Archive: https://registry.npmjs.org/@turbo/windows-64/-/windows-64-2.11.7.tgz + Integrity: sha512-ZIoKT7J7KutgYl4bGxmmgeUQjG+7E0nY8BF9dxUOiMH2vdTsM4JQ2uSwTYFkTR2Llbg6ghGjSmuZ8LQtkLEYjg== +@turbo/windows-arm64@2.11.7 | development, optional | MIT + Lockfile path: node_modules/@turbo/windows-arm64 + Package: https://www.npmjs.com/package/@turbo/windows-arm64/v/2.11.7 + Archive: https://registry.npmjs.org/@turbo/windows-arm64/-/windows-arm64-2.11.7.tgz + Integrity: sha512-88Xv2f7SLGVJ68lRRx8o375dKmnZYNdDtvlKcPA0kZpcF93eAQd8l96BKQ0/AMHG0bMJA0Z5QqoqtetxzNsC+g== +@tybys/wasm-util@0.10.4 | development, optional | MIT + Lockfile path: node_modules/@tybys/wasm-util + Package: https://www.npmjs.com/package/@tybys/wasm-util/v/0.10.4 + Archive: https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.4.tgz + Integrity: sha512-W3c4gRigFS0T/Ma4qIYF3GDAc5AQdHb1yL5znJT1Zv1YaD9Kitx656wBjvr19qbiosmZT8lWDM5BEMynUqX65A== +@types/chai@5.2.3 | development | MIT + Lockfile path: node_modules/@types/chai + Package: https://www.npmjs.com/package/@types/chai/v/5.2.3 + Archive: https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz + Integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA== +@types/cross-spawn@6.0.6 | development | MIT + Lockfile path: node_modules/@types/cross-spawn + Package: https://www.npmjs.com/package/@types/cross-spawn/v/6.0.6 + Archive: https://registry.npmjs.org/@types/cross-spawn/-/cross-spawn-6.0.6.tgz + Integrity: sha512-fXRhhUkG4H3TQk5dBhQ7m/JDdSNHKwR2BBia62lhwEIq9xGiQKLxd6LymNhn47SjXhsUEPmxi+PKw2OkW4LLjA== +@types/deep-eql@4.0.2 | development | MIT + Lockfile path: node_modules/@types/deep-eql + Package: https://www.npmjs.com/package/@types/deep-eql/v/4.0.2 + Archive: https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz + Integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw== +@types/estree@1.0.9 | development | MIT + Lockfile path: node_modules/@types/estree + Package: https://www.npmjs.com/package/@types/estree/v/1.0.9 + Archive: https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz + Integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg== +@types/hast@3.0.5 | development | MIT + Lockfile path: node_modules/@types/hast + Package: https://www.npmjs.com/package/@types/hast/v/3.0.5 + Archive: https://registry.npmjs.org/@types/hast/-/hast-3.0.5.tgz + Integrity: sha512-rp/ezSWaD1m44dPKICGhiskI13nVr7qTloFwDa/IYkhhf5nzwP+zIQcIJh3WIFSBOy/H1PzB40jPjMDksN4F+g== +@types/linkify-it@5.0.0 | development | MIT + Lockfile path: node_modules/@types/linkify-it + Package: https://www.npmjs.com/package/@types/linkify-it/v/5.0.0 + Archive: https://registry.npmjs.org/@types/linkify-it/-/linkify-it-5.0.0.tgz + Integrity: sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q== +@types/markdown-it@14.2.0 | development | MIT + Lockfile path: node_modules/@types/markdown-it + Package: https://www.npmjs.com/package/@types/markdown-it/v/14.2.0 + Archive: https://registry.npmjs.org/@types/markdown-it/-/markdown-it-14.2.0.tgz + Integrity: sha512-NoQ2yGlLWj4wpxMs+TYmRKk3thDrQ97agr7sFqfLsAlvoS8SNQuTrlObhFqG9iugdTtgOE9jpJ6FNM4ZGsa5xQ== +@types/mdast@4.0.4 | development | MIT + Lockfile path: node_modules/@types/mdast + Package: https://www.npmjs.com/package/@types/mdast/v/4.0.4 + Archive: https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz + Integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA== +@types/mdurl@2.0.0 | development | MIT + Lockfile path: node_modules/@types/mdurl + Package: https://www.npmjs.com/package/@types/mdurl/v/2.0.0 + Archive: https://registry.npmjs.org/@types/mdurl/-/mdurl-2.0.0.tgz + Integrity: sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg== +@types/node@26.6.4 | development | MIT + Lockfile path: node_modules/@types/node + Package: https://www.npmjs.com/package/@types/node/v/26.6.4 + Archive: https://registry.npmjs.org/@types/node/-/node-26.6.4.tgz + Integrity: sha512-ldVPDCzj7fsaGZrLB0NuHuTvJcsNasysBAqMolr/cgxrLd1xbqxIr3XJiPnHHJUCxj5sNF1vnRj9aWnrVh5Jcg== +@types/semver@7.7.1 | development | MIT + Lockfile path: node_modules/@types/semver + Package: https://www.npmjs.com/package/@types/semver/v/7.7.1 + Archive: https://registry.npmjs.org/@types/semver/-/semver-7.7.1.tgz + Integrity: sha512-FmgJfu+MOcQ370SD0ev7EI8TlCAfKYU+B4m5T3yXc1CiRN94g/SZPtsCkk506aUDtlMnFZvasDwHHUcZUEaYuA== +@types/unist@3.0.3 | development | MIT + Lockfile path: node_modules/@types/unist + Package: https://www.npmjs.com/package/@types/unist/v/3.0.3 + Archive: https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz + Integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q== +@types/web-bluetooth@0.0.21 | development | MIT + Lockfile path: node_modules/@types/web-bluetooth + Package: https://www.npmjs.com/package/@types/web-bluetooth/v/0.0.21 + Archive: https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.21.tgz + Integrity: sha512-oIQLCGWtcFZy2JW77j9k8nHzAOpqMHLQejDA48XXMWH6tjCQHz5RCFz1bzsmROyL6PUm+LLnUiI4BCn221inxA== +@types/write-file-atomic@4.0.3 | development | MIT + Lockfile path: node_modules/@types/write-file-atomic + Package: https://www.npmjs.com/package/@types/write-file-atomic/v/4.0.3 + Archive: https://registry.npmjs.org/@types/write-file-atomic/-/write-file-atomic-4.0.3.tgz + Integrity: sha512-qdo+vZRchyJIHNeuI1nrpsLw+hnkgqP/8mlaN6Wle/NKhydHmUN9l4p3ZE8yP90AJNJW4uB8HQhedb4f1vNayQ== +@types/ws@8.18.1 | development | MIT + Lockfile path: node_modules/@types/ws + Package: https://www.npmjs.com/package/@types/ws/v/8.18.1 + Archive: https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz + Integrity: sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg== +@typescript/typescript-aix-ppc64@7.0.2 | development, optional | Apache-2.0 + Lockfile path: node_modules/@typescript/typescript-aix-ppc64 + Package: https://www.npmjs.com/package/@typescript/typescript-aix-ppc64/v/7.0.2 + Archive: https://registry.npmjs.org/@typescript/typescript-aix-ppc64/-/typescript-aix-ppc64-7.0.2.tgz + Integrity: sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ== +@typescript/typescript-darwin-arm64@7.0.2 | development, optional | Apache-2.0 + Lockfile path: node_modules/@typescript/typescript-darwin-arm64 + Package: https://www.npmjs.com/package/@typescript/typescript-darwin-arm64/v/7.0.2 + Archive: https://registry.npmjs.org/@typescript/typescript-darwin-arm64/-/typescript-darwin-arm64-7.0.2.tgz + Integrity: sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA== +@typescript/typescript-darwin-x64@7.0.2 | development, optional | Apache-2.0 + Lockfile path: node_modules/@typescript/typescript-darwin-x64 + Package: https://www.npmjs.com/package/@typescript/typescript-darwin-x64/v/7.0.2 + Archive: https://registry.npmjs.org/@typescript/typescript-darwin-x64/-/typescript-darwin-x64-7.0.2.tgz + Integrity: sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA== +@typescript/typescript-freebsd-arm64@7.0.2 | development, optional | Apache-2.0 + Lockfile path: node_modules/@typescript/typescript-freebsd-arm64 + Package: https://www.npmjs.com/package/@typescript/typescript-freebsd-arm64/v/7.0.2 + Archive: https://registry.npmjs.org/@typescript/typescript-freebsd-arm64/-/typescript-freebsd-arm64-7.0.2.tgz + Integrity: sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ== +@typescript/typescript-freebsd-x64@7.0.2 | development, optional | Apache-2.0 + Lockfile path: node_modules/@typescript/typescript-freebsd-x64 + Package: https://www.npmjs.com/package/@typescript/typescript-freebsd-x64/v/7.0.2 + Archive: https://registry.npmjs.org/@typescript/typescript-freebsd-x64/-/typescript-freebsd-x64-7.0.2.tgz + Integrity: sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw== +@typescript/typescript-linux-arm@7.0.2 | development, optional | Apache-2.0 + Lockfile path: node_modules/@typescript/typescript-linux-arm + Package: https://www.npmjs.com/package/@typescript/typescript-linux-arm/v/7.0.2 + Archive: https://registry.npmjs.org/@typescript/typescript-linux-arm/-/typescript-linux-arm-7.0.2.tgz + Integrity: sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ== +@typescript/typescript-linux-arm64@7.0.2 | development, optional | Apache-2.0 + Lockfile path: node_modules/@typescript/typescript-linux-arm64 + Package: https://www.npmjs.com/package/@typescript/typescript-linux-arm64/v/7.0.2 + Archive: https://registry.npmjs.org/@typescript/typescript-linux-arm64/-/typescript-linux-arm64-7.0.2.tgz + Integrity: sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ== +@typescript/typescript-linux-loong64@7.0.2 | development, optional | Apache-2.0 + Lockfile path: node_modules/@typescript/typescript-linux-loong64 + Package: https://www.npmjs.com/package/@typescript/typescript-linux-loong64/v/7.0.2 + Archive: https://registry.npmjs.org/@typescript/typescript-linux-loong64/-/typescript-linux-loong64-7.0.2.tgz + Integrity: sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ== +@typescript/typescript-linux-mips64el@7.0.2 | development, optional | Apache-2.0 + Lockfile path: node_modules/@typescript/typescript-linux-mips64el + Package: https://www.npmjs.com/package/@typescript/typescript-linux-mips64el/v/7.0.2 + Archive: https://registry.npmjs.org/@typescript/typescript-linux-mips64el/-/typescript-linux-mips64el-7.0.2.tgz + Integrity: sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA== +@typescript/typescript-linux-ppc64@7.0.2 | development, optional | Apache-2.0 + Lockfile path: node_modules/@typescript/typescript-linux-ppc64 + Package: https://www.npmjs.com/package/@typescript/typescript-linux-ppc64/v/7.0.2 + Archive: https://registry.npmjs.org/@typescript/typescript-linux-ppc64/-/typescript-linux-ppc64-7.0.2.tgz + Integrity: sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA== +@typescript/typescript-linux-riscv64@7.0.2 | development, optional | Apache-2.0 + Lockfile path: node_modules/@typescript/typescript-linux-riscv64 + Package: https://www.npmjs.com/package/@typescript/typescript-linux-riscv64/v/7.0.2 + Archive: https://registry.npmjs.org/@typescript/typescript-linux-riscv64/-/typescript-linux-riscv64-7.0.2.tgz + Integrity: sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ== +@typescript/typescript-linux-s390x@7.0.2 | development, optional | Apache-2.0 + Lockfile path: node_modules/@typescript/typescript-linux-s390x + Package: https://www.npmjs.com/package/@typescript/typescript-linux-s390x/v/7.0.2 + Archive: https://registry.npmjs.org/@typescript/typescript-linux-s390x/-/typescript-linux-s390x-7.0.2.tgz + Integrity: sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw== +@typescript/typescript-linux-x64@7.0.2 | development, optional | Apache-2.0 + Lockfile path: node_modules/@typescript/typescript-linux-x64 + Package: https://www.npmjs.com/package/@typescript/typescript-linux-x64/v/7.0.2 + Archive: https://registry.npmjs.org/@typescript/typescript-linux-x64/-/typescript-linux-x64-7.0.2.tgz + Integrity: sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A== +@typescript/typescript-netbsd-arm64@7.0.2 | development, optional | Apache-2.0 + Lockfile path: node_modules/@typescript/typescript-netbsd-arm64 + Package: https://www.npmjs.com/package/@typescript/typescript-netbsd-arm64/v/7.0.2 + Archive: https://registry.npmjs.org/@typescript/typescript-netbsd-arm64/-/typescript-netbsd-arm64-7.0.2.tgz + Integrity: sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA== +@typescript/typescript-netbsd-x64@7.0.2 | development, optional | Apache-2.0 + Lockfile path: node_modules/@typescript/typescript-netbsd-x64 + Package: https://www.npmjs.com/package/@typescript/typescript-netbsd-x64/v/7.0.2 + Archive: https://registry.npmjs.org/@typescript/typescript-netbsd-x64/-/typescript-netbsd-x64-7.0.2.tgz + Integrity: sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA== +@typescript/typescript-openbsd-arm64@7.0.2 | development, optional | Apache-2.0 + Lockfile path: node_modules/@typescript/typescript-openbsd-arm64 + Package: https://www.npmjs.com/package/@typescript/typescript-openbsd-arm64/v/7.0.2 + Archive: https://registry.npmjs.org/@typescript/typescript-openbsd-arm64/-/typescript-openbsd-arm64-7.0.2.tgz + Integrity: sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ== +@typescript/typescript-openbsd-x64@7.0.2 | development, optional | Apache-2.0 + Lockfile path: node_modules/@typescript/typescript-openbsd-x64 + Package: https://www.npmjs.com/package/@typescript/typescript-openbsd-x64/v/7.0.2 + Archive: https://registry.npmjs.org/@typescript/typescript-openbsd-x64/-/typescript-openbsd-x64-7.0.2.tgz + Integrity: sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg== +@typescript/typescript-sunos-x64@7.0.2 | development, optional | Apache-2.0 + Lockfile path: node_modules/@typescript/typescript-sunos-x64 + Package: https://www.npmjs.com/package/@typescript/typescript-sunos-x64/v/7.0.2 + Archive: https://registry.npmjs.org/@typescript/typescript-sunos-x64/-/typescript-sunos-x64-7.0.2.tgz + Integrity: sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g== +@typescript/typescript-win32-arm64@7.0.2 | development, optional | Apache-2.0 + Lockfile path: node_modules/@typescript/typescript-win32-arm64 + Package: https://www.npmjs.com/package/@typescript/typescript-win32-arm64/v/7.0.2 + Archive: https://registry.npmjs.org/@typescript/typescript-win32-arm64/-/typescript-win32-arm64-7.0.2.tgz + Integrity: sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ== +@typescript/typescript-win32-x64@7.0.2 | development, optional | Apache-2.0 + Lockfile path: node_modules/@typescript/typescript-win32-x64 + Package: https://www.npmjs.com/package/@typescript/typescript-win32-x64/v/7.0.2 + Archive: https://registry.npmjs.org/@typescript/typescript-win32-x64/-/typescript-win32-x64-7.0.2.tgz + Integrity: sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g== +@ungap/structured-clone@1.4.0 | development | ISC + Lockfile path: node_modules/@ungap/structured-clone + Package: https://www.npmjs.com/package/@ungap/structured-clone/v/1.4.0 + Archive: https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.4.0.tgz + Integrity: sha512-1mEZtMKPM09vDmQt5y7YvmN2+DFTP7Tg0EWXdic8/C6VRnpb33e4ghisCIE3WZjsE2N8mf+QV1Zqh7ZFYLWInQ== +@vitest/coverage-v8@5.0.3 | development | MIT + Lockfile path: node_modules/@vitest/coverage-v8 + Package: https://www.npmjs.com/package/@vitest/coverage-v8/v/5.0.3 + Archive: https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-5.0.3.tgz + Integrity: sha512-+klsyz7BvT1vCU28Zkfzms1Ia78XD0V41U3FUtRaa3S+vOr/EXvK1O6BvVD7l1RzEjm6SONR2aybOvDDf9u0mQ== +@vitest/istanbul-lib-coverage@1.0.2 | development | MIT + Lockfile path: node_modules/@vitest/istanbul-lib-coverage + Package: https://www.npmjs.com/package/@vitest/istanbul-lib-coverage/v/1.0.2 + Archive: https://registry.npmjs.org/@vitest/istanbul-lib-coverage/-/istanbul-lib-coverage-1.0.2.tgz + Integrity: sha512-9J/JMwOf9AoJhAywhrn7ScKTL38hsWQP/qPG60OtaAFcQ5OXPwKsxZFlbnuCKmZ61m8/lGgHYnFpdyQZUvG/iA== +@vitest/istanbul-lib-report@1.0.2 | development | MIT + Lockfile path: node_modules/@vitest/istanbul-lib-report + Package: https://www.npmjs.com/package/@vitest/istanbul-lib-report/v/1.0.2 + Archive: https://registry.npmjs.org/@vitest/istanbul-lib-report/-/istanbul-lib-report-1.0.2.tgz + Integrity: sha512-gUsfXZJbzPamoIY5TvHFiMMoXESBrUMo+xqaj+rYrWI69+EnvRlYBlP96ZnHPY4vX8kyUpgAnFUCg5wZG/HkDQ== +@vitest/mocker@5.0.3 | development | MIT + Lockfile path: node_modules/@vitest/mocker + Package: https://www.npmjs.com/package/@vitest/mocker/v/5.0.3 + Archive: https://registry.npmjs.org/@vitest/mocker/-/mocker-5.0.3.tgz + Integrity: sha512-T8sWAIbkSyAjkwTcaEc3Iu0o9A27X1/kdXrizhZkGuSKScRQtRzclfAMpOTcGdXCsqxeWlpGy3XjqaW8CpLORg== +@vitest/spy@5.0.3 | development | MIT + Lockfile path: node_modules/@vitest/spy + Package: https://www.npmjs.com/package/@vitest/spy/v/5.0.3 + Archive: https://registry.npmjs.org/@vitest/spy/-/spy-5.0.3.tgz + Integrity: sha512-XhFysQTB8AZ+P4gMi+Lpo99vg2AZi0qKpaB9yXQl37+CaMEAPO3iH/wGVnSyL5MPERiLezpqTVtrR6UZH5GCXg== +@vue/compiler-core@3.5.43 | development | MIT + Lockfile path: node_modules/@vue/compiler-core + Package: https://www.npmjs.com/package/@vue/compiler-core/v/3.5.43 + Archive: https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.43.tgz + Integrity: sha512-zdiLhnbe1QQqgDT8xZMpNmyqZ3qlI+/Q/FHQco57Kwl/b05HhCzN6eVGN9QU9rbga4CrS0H5SYY8VGHZCt/1Hg== +@babel/helper-string-parser@7.29.7 | development | MIT + Lockfile path: node_modules/@vue/compiler-core/node_modules/@babel/helper-string-parser + Package: https://www.npmjs.com/package/@babel/helper-string-parser/v/7.29.7 + Archive: https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz + Integrity: sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw== +@babel/helper-validator-identifier@7.29.7 | development | MIT + Lockfile path: node_modules/@vue/compiler-core/node_modules/@babel/helper-validator-identifier + Package: https://www.npmjs.com/package/@babel/helper-validator-identifier/v/7.29.7 + Archive: https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz + Integrity: sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg== +@babel/parser@7.29.9 | development | MIT + Lockfile path: node_modules/@vue/compiler-core/node_modules/@babel/parser + Package: https://www.npmjs.com/package/@babel/parser/v/7.29.9 + Archive: https://registry.npmjs.org/@babel/parser/-/parser-7.29.9.tgz + Integrity: sha512-CjXrNHTnvqBVqHgdBysY3vk2T8tpJHb5/RMeHJBTyVa9xgugCB0CJTx/3oO8RV2QRQP391RWpB7D6hLjm8V9uA== +@babel/types@7.29.8 | development | MIT + Lockfile path: node_modules/@vue/compiler-core/node_modules/@babel/types + Package: https://www.npmjs.com/package/@babel/types/v/7.29.8 + Archive: https://registry.npmjs.org/@babel/types/-/types-7.29.8.tgz + Integrity: sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg== +estree-walker@2.0.2 | development | MIT + Lockfile path: node_modules/@vue/compiler-core/node_modules/estree-walker + Package: https://www.npmjs.com/package/estree-walker/v/2.0.2 + Archive: https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz + Integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w== +@vue/compiler-dom@3.5.43 | development | MIT + Lockfile path: node_modules/@vue/compiler-dom + Package: https://www.npmjs.com/package/@vue/compiler-dom/v/3.5.43 + Archive: https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.43.tgz + Integrity: sha512-PEZoAk3NQmsn/ejMzSOCyTYqwGqczrWm70PuhBKjjv1+TCoQAaO/zOqNwjV+honlNstT5ILxtc+8r8UUfj+iEQ== +@vue/compiler-sfc@3.5.43 | development | MIT + Lockfile path: node_modules/@vue/compiler-sfc + Package: https://www.npmjs.com/package/@vue/compiler-sfc/v/3.5.43 + Archive: https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.43.tgz + Integrity: sha512-FCbrG3XNCRl+js3huuKx4IVHBLTvMkJhVepjbxSPu1gn4yWLaYtGNQdjJGZaMytXB6qb76qQDDmDSLy/vkmleQ== +@babel/helper-string-parser@7.29.7 | development | MIT + Lockfile path: node_modules/@vue/compiler-sfc/node_modules/@babel/helper-string-parser + Package: https://www.npmjs.com/package/@babel/helper-string-parser/v/7.29.7 + Archive: https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz + Integrity: sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw== +@babel/helper-validator-identifier@7.29.7 | development | MIT + Lockfile path: node_modules/@vue/compiler-sfc/node_modules/@babel/helper-validator-identifier + Package: https://www.npmjs.com/package/@babel/helper-validator-identifier/v/7.29.7 + Archive: https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz + Integrity: sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg== +@babel/parser@7.29.9 | development | MIT + Lockfile path: node_modules/@vue/compiler-sfc/node_modules/@babel/parser + Package: https://www.npmjs.com/package/@babel/parser/v/7.29.9 + Archive: https://registry.npmjs.org/@babel/parser/-/parser-7.29.9.tgz + Integrity: sha512-CjXrNHTnvqBVqHgdBysY3vk2T8tpJHb5/RMeHJBTyVa9xgugCB0CJTx/3oO8RV2QRQP391RWpB7D6hLjm8V9uA== +@babel/types@7.29.8 | development | MIT + Lockfile path: node_modules/@vue/compiler-sfc/node_modules/@babel/types + Package: https://www.npmjs.com/package/@babel/types/v/7.29.8 + Archive: https://registry.npmjs.org/@babel/types/-/types-7.29.8.tgz + Integrity: sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg== +estree-walker@2.0.2 | development | MIT + Lockfile path: node_modules/@vue/compiler-sfc/node_modules/estree-walker + Package: https://www.npmjs.com/package/estree-walker/v/2.0.2 + Archive: https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz + Integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w== +magic-string@0.30.21 | development | MIT + Lockfile path: node_modules/@vue/compiler-sfc/node_modules/magic-string + Package: https://www.npmjs.com/package/magic-string/v/0.30.21 + Archive: https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz + Integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ== +@vue/compiler-ssr@3.5.43 | development | MIT + Lockfile path: node_modules/@vue/compiler-ssr + Package: https://www.npmjs.com/package/@vue/compiler-ssr/v/3.5.43 + Archive: https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.43.tgz + Integrity: sha512-GF62orf7KiJX9RqrHNGrYBudsQGD0OhJ5nDs90O8UiDuS40+YMYomiXu6w6EuvtXuRDc3MSNis3EaaSKAVSWpg== +@vue/devtools-api@7.7.10 | development | MIT + Lockfile path: node_modules/@vue/devtools-api + Package: https://www.npmjs.com/package/@vue/devtools-api/v/7.7.10 + Archive: https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-7.7.10.tgz + Integrity: sha512-KxtEpUOOpFz/qOGRrAwA36QF7DqIA+FXgCYit9mk9wjbaZt0sXOFz81ElOZtKA4HbWHUdwNjZHBFsFFyp5BZiA== +@vue/devtools-kit@7.7.10 | development | MIT + Lockfile path: node_modules/@vue/devtools-kit + Package: https://www.npmjs.com/package/@vue/devtools-kit/v/7.7.10 + Archive: https://registry.npmjs.org/@vue/devtools-kit/-/devtools-kit-7.7.10.tgz + Integrity: sha512-3WNi2Kq4tbpVbmhml7RiphmAt0279oh3fKNeWMQIrltfX8Q91b4i5PL8DtyNKdwmcsGrV4fg+erwWOmD05CLIw== +@vue/devtools-shared@7.7.10 | development | MIT + Lockfile path: node_modules/@vue/devtools-shared + Package: https://www.npmjs.com/package/@vue/devtools-shared/v/7.7.10 + Archive: https://registry.npmjs.org/@vue/devtools-shared/-/devtools-shared-7.7.10.tgz + Integrity: sha512-wOPslzB8vTvpxwdaOcR2qAbwmuSP0L+rhpoC6Cf56V3Jip+HWb7PQQXOUPgBNQARpXsbQX/+mvi8kKucmBGRwQ== +@vue/reactivity@3.5.43 | development | MIT + Lockfile path: node_modules/@vue/reactivity + Package: https://www.npmjs.com/package/@vue/reactivity/v/3.5.43 + Archive: https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.43.tgz + Integrity: sha512-G/c9GyOZNI2jVaaS6OX1EF1SSFSv7H0ERqNTl4+DTFMlZmB5eVAB53aLQNam/7NL2NPtaDD7RdVrzf8uJzMuOA== +@vue/runtime-core@3.5.43 | development | MIT + Lockfile path: node_modules/@vue/runtime-core + Package: https://www.npmjs.com/package/@vue/runtime-core/v/3.5.43 + Archive: https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.5.43.tgz + Integrity: sha512-hU6U6VnVhBGQDpvlnnDlIB8ZGJBiOcgk2lh/0InltHiz3D8oSkluvuvY+do1G2H3+udeKFsmaBlgVYP7gXQzEw== +@vue/runtime-dom@3.5.43 | development | MIT + Lockfile path: node_modules/@vue/runtime-dom + Package: https://www.npmjs.com/package/@vue/runtime-dom/v/3.5.43 + Archive: https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.5.43.tgz + Integrity: sha512-Bb2Jc0YjjJdMt1SJmb9b2L/IWd3I8lIT9x9eS/xvvP9CiVgna0ffua74xKRmt4/uSJ+0r4iN8ex1jrqkhQGWQw== +@vue/server-renderer@3.5.43 | development | MIT + Lockfile path: node_modules/@vue/server-renderer + Package: https://www.npmjs.com/package/@vue/server-renderer/v/3.5.43 + Archive: https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.5.43.tgz + Integrity: sha512-l2Ygjv9NehV94PSBxNWsAHC0j/eIIKbn92mBuWXAPGLnn6HfJ6MH5ubsd+Nk0YoZ5FRuxWI1P2VSoh+dbPQhCQ== +@vue/shared@3.5.43 | development | MIT + Lockfile path: node_modules/@vue/shared + Package: https://www.npmjs.com/package/@vue/shared/v/3.5.43 + Archive: https://registry.npmjs.org/@vue/shared/-/shared-3.5.43.tgz + Integrity: sha512-uksS7YGMR5NZyr4JNq0Rp+QyLns0ueaz20KwzIPW9R0LH1Vnt4E+XUM29PNseEbf1www2gOuhuDi5AKOIXag9Q== +@vueuse/core@12.8.2 | development | MIT + Lockfile path: node_modules/@vueuse/core + Package: https://www.npmjs.com/package/@vueuse/core/v/12.8.2 + Archive: https://registry.npmjs.org/@vueuse/core/-/core-12.8.2.tgz + Integrity: sha512-HbvCmZdzAu3VGi/pWYm5Ut+Kd9mn1ZHnn4L5G8kOQTPs/IwIAmJoBrmYk2ckLArgMXZj0AW3n5CAejLUO+PhdQ== +@vueuse/integrations@12.8.2 | development | MIT + Lockfile path: node_modules/@vueuse/integrations + Package: https://www.npmjs.com/package/@vueuse/integrations/v/12.8.2 + Archive: https://registry.npmjs.org/@vueuse/integrations/-/integrations-12.8.2.tgz + Integrity: sha512-fbGYivgK5uBTRt7p5F3zy6VrETlV9RtZjBqd1/HxGdjdckBgBM4ugP8LHpjolqTj14TXTxSK1ZfgPbHYyGuH7g== +@vueuse/metadata@12.8.2 | development | MIT + Lockfile path: node_modules/@vueuse/metadata + Package: https://www.npmjs.com/package/@vueuse/metadata/v/12.8.2 + Archive: https://registry.npmjs.org/@vueuse/metadata/-/metadata-12.8.2.tgz + Integrity: sha512-rAyLGEuoBJ/Il5AmFHiziCPdQzRt88VxR+Y/A/QhJ1EWtWqPBBAxTAFaSkviwEuOEZNtW8pvkPgoCZQ+HxqW1A== +@vueuse/shared@12.8.2 | development | MIT + Lockfile path: node_modules/@vueuse/shared + Package: https://www.npmjs.com/package/@vueuse/shared/v/12.8.2 + Archive: https://registry.npmjs.org/@vueuse/shared/-/shared-12.8.2.tgz + Integrity: sha512-dznP38YzxZoNloI0qpEfpkms8knDtaoQ6Y/sfS0L7Yki4zh40LFHEhur0odJC6xTHG5dxWVPiUWBXn+wCG2s5w== +@xmldom/xmldom@0.9.12 | runtime | MIT + Lockfile path: node_modules/@xmldom/xmldom + Package: https://www.npmjs.com/package/@xmldom/xmldom/v/0.9.12 + Archive: https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.9.12.tgz + Integrity: sha512-5AXjrcMClTryPe9LgZrygpB1lj7s0S9E0+W+AHaVKAVyHanafK86iPSvG5xHVSp/jC+VH1UXu0TAEmY279xH7A== +@xterm/addon-serialize@0.14.0 | runtime | MIT + Lockfile path: node_modules/@xterm/addon-serialize + Package: https://www.npmjs.com/package/@xterm/addon-serialize/v/0.14.0 + Archive: https://registry.npmjs.org/@xterm/addon-serialize/-/addon-serialize-0.14.0.tgz + Integrity: sha512-uteyTU1EkrQa2Ux6P/uFl2fzmXI46jy5uoQMKEOM0fKTyiW7cSn0WrFenHm5vO5uEXX/GpwW/FgILvv3r0WbkA== +@xterm/headless@6.0.0 | runtime | MIT + Lockfile path: node_modules/@xterm/headless + Package: https://www.npmjs.com/package/@xterm/headless/v/6.0.0 + Archive: https://registry.npmjs.org/@xterm/headless/-/headless-6.0.0.tgz + Integrity: sha512-5Yj1QINYCyzrZtf8OFIHi47iQtI+0qYFPHmouEfG8dHNxbZ9Tb9YGSuLcsEwj9Z+OL75GJqPyJbyoFer80a2Hw== +@zip.js/zip.js@2.15.0 | runtime | BSD-3-Clause + Lockfile path: node_modules/@zip.js/zip.js + Package: https://www.npmjs.com/package/@zip.js/zip.js/v/2.15.0 + Archive: https://registry.npmjs.org/@zip.js/zip.js/-/zip.js-2.15.0.tgz + Integrity: sha512-hYAuHAaWjt0axbofaDL5XUlmrQPsBDcK3f45ApZuh6N+8UGVk26GoGdtGDvcvzahsHytTQ6DtBVXwG9IcCMjjQ== +abort-controller@3.0.0 | runtime | MIT + Lockfile path: node_modules/abort-controller + Package: https://www.npmjs.com/package/abort-controller/v/3.0.0 + Archive: https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz + Integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== +ajv@8.20.0 | runtime | MIT + Lockfile path: node_modules/ajv + Package: https://www.npmjs.com/package/ajv/v/8.20.0 + Archive: https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz + Integrity: sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA== +ajv-formats@3.0.1 | runtime | MIT + Lockfile path: node_modules/ajv-formats + Package: https://www.npmjs.com/package/ajv-formats/v/3.0.1 + Archive: https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz + Integrity: sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ== +algoliasearch@5.59.0 | development | MIT + Lockfile path: node_modules/algoliasearch + Package: https://www.npmjs.com/package/algoliasearch/v/5.59.0 + Archive: https://registry.npmjs.org/algoliasearch/-/algoliasearch-5.59.0.tgz + Integrity: sha512-wUXzaeI7B526W4y1gFg3lcxgDZ67XSgRJIiellYWOas/pLpO7rOtxm9Gr2E/C8aiSDXIgx1q5TdSsvK67Uakqw== +ansi-escapes@7.3.0 | development | MIT + Lockfile path: node_modules/ansi-escapes + Package: https://www.npmjs.com/package/ansi-escapes/v/7.3.0 + Archive: https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-7.3.0.tgz + Integrity: sha512-BvU8nYgGQBxcmMuEeUEmNTvrMVjJNSH7RgW24vXexN4Ven6qCvy4TntnvlnwnMLTVlcRQQdbRY8NKnaIoeWDNg== +ansi-regex@6.2.2 | development | MIT + Lockfile path: node_modules/ansi-regex + Package: https://www.npmjs.com/package/ansi-regex/v/6.2.2 + Archive: https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz + Integrity: sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg== +ansi-styles@6.2.3 | development | MIT + Lockfile path: node_modules/ansi-styles + Package: https://www.npmjs.com/package/ansi-styles/v/6.2.3 + Archive: https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz + Integrity: sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg== +assertion-error@2.0.1 | development | MIT + Lockfile path: node_modules/assertion-error + Package: https://www.npmjs.com/package/assertion-error/v/2.0.1 + Archive: https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz + Integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA== +ast-v8-to-istanbul@1.0.7 | development | MIT + Lockfile path: node_modules/ast-v8-to-istanbul + Package: https://www.npmjs.com/package/ast-v8-to-istanbul/v/1.0.7 + Archive: https://registry.npmjs.org/ast-v8-to-istanbul/-/ast-v8-to-istanbul-1.0.7.tgz + Integrity: sha512-kFL68AG6ajd8fg248zwM9GQrUWEp79gsmjum34OEXjs4yHuUMZfYKwOLW9GMmB4oNvVrj+EAGxsP7ye2UR9UlA== +async-lock@1.4.1 | runtime | MIT + Lockfile path: node_modules/async-lock + Package: https://www.npmjs.com/package/async-lock/v/1.4.1 + Archive: https://registry.npmjs.org/async-lock/-/async-lock-1.4.1.tgz + Integrity: sha512-Az2ZTpuytrtqENulXwO3GGv1Bztugx6TT37NIo7imr/Qo0gsYiGtSdBa2B6fsXhTpVZDNfu1Qn3pk531e3q+nQ== +atomic-sleep@1.0.0 | runtime | MIT + Lockfile path: node_modules/atomic-sleep + Package: https://www.npmjs.com/package/atomic-sleep/v/1.0.0 + Archive: https://registry.npmjs.org/atomic-sleep/-/atomic-sleep-1.0.0.tgz + Integrity: sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ== +available-typed-arrays@1.0.7 | runtime | MIT + Lockfile path: node_modules/available-typed-arrays + Package: https://www.npmjs.com/package/available-typed-arrays/v/1.0.7 + Archive: https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz + Integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ== +balanced-match@4.0.4 | runtime | MIT + Lockfile path: node_modules/balanced-match + Package: https://www.npmjs.com/package/balanced-match/v/4.0.4 + Archive: https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz + Integrity: sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA== +base64-js@1.5.1 | runtime | MIT + Lockfile path: node_modules/base64-js + Package: https://www.npmjs.com/package/base64-js/v/1.5.1 + Archive: https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz + Integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== +bindings@1.5.0 | runtime, optional | MIT + Lockfile path: node_modules/bindings + Package: https://www.npmjs.com/package/bindings/v/1.5.0 + Archive: https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz + Integrity: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== +birpc@2.9.0 | development | MIT + Lockfile path: node_modules/birpc + Package: https://www.npmjs.com/package/birpc/v/2.9.0 + Archive: https://registry.npmjs.org/birpc/-/birpc-2.9.0.tgz + Integrity: sha512-KrayHS5pBi69Xi9JmvoqrIgYGDkD6mcSe/i6YKi3w5kekCLzrX4+nawcXqrj2tIp50Kw/mT/s3p+GVK0A0sKxw== +bl@4.1.0 | runtime, optional | MIT + Lockfile path: node_modules/bl + Package: https://www.npmjs.com/package/bl/v/4.1.0 + Archive: https://registry.npmjs.org/bl/-/bl-4.1.0.tgz + Integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== +buffer@5.7.1 | runtime, optional | MIT + Lockfile path: node_modules/bl/node_modules/buffer + Package: https://www.npmjs.com/package/buffer/v/5.7.1 + Archive: https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz + Integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== +readable-stream@3.6.2 | runtime, optional | MIT + Lockfile path: node_modules/bl/node_modules/readable-stream + Package: https://www.npmjs.com/package/readable-stream/v/3.6.2 + Archive: https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz + Integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== +brace-expansion@5.0.12 | runtime | MIT + Lockfile path: node_modules/brace-expansion + Package: https://www.npmjs.com/package/brace-expansion/v/5.0.12 + Archive: https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz + Integrity: sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ== +buffer@6.0.3 | runtime | MIT + Lockfile path: node_modules/buffer + Package: https://www.npmjs.com/package/buffer/v/6.0.3 + Archive: https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz + Integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== +call-bind@1.0.9 | runtime | MIT + Lockfile path: node_modules/call-bind + Package: https://www.npmjs.com/package/call-bind/v/1.0.9 + Archive: https://registry.npmjs.org/call-bind/-/call-bind-1.0.9.tgz + Integrity: sha512-a/hy+pNsFUTR+Iz8TCJvXudKVLAnz/DyeSUo10I5yvFDQJBFU2s9uqQpoSrJlroHUKoKqzg+epxyP9lqFdzfBQ== +call-bind-apply-helpers@1.0.2 | runtime | MIT + Lockfile path: node_modules/call-bind-apply-helpers + Package: https://www.npmjs.com/package/call-bind-apply-helpers/v/1.0.2 + Archive: https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz + Integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ== +call-bound@1.0.4 | runtime | MIT + Lockfile path: node_modules/call-bound + Package: https://www.npmjs.com/package/call-bound/v/1.0.4 + Archive: https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz + Integrity: sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg== +canonicalize@3.0.0 | runtime | Apache-2.0 + Lockfile path: node_modules/canonicalize + Package: https://www.npmjs.com/package/canonicalize/v/3.0.0 + Archive: https://registry.npmjs.org/canonicalize/-/canonicalize-3.0.0.tgz + Integrity: sha512-yYLfHyDMIXRyRqsKBRLX023riFLpXY2YOfdtqKXZRZy9qsfOJ9U+4F9YZL7MEzL5+ziN2x2nlBvY/Voi3EBljA== +ccount@2.0.1 | development | MIT + Lockfile path: node_modules/ccount + Package: https://www.npmjs.com/package/ccount/v/2.0.1 + Archive: https://registry.npmjs.org/ccount/-/ccount-2.0.1.tgz + Integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg== +chai@6.3.0 | development | MIT + Lockfile path: node_modules/chai + Package: https://www.npmjs.com/package/chai/v/6.3.0 + Archive: https://registry.npmjs.org/chai/-/chai-6.3.0.tgz + Integrity: sha512-XWAtwJ6OHO+tj0EKCs0Y2UamnyOxseZWltU4x2U2wh8g4AigdjwvtUjvLP2tqkA/avxHEtzxNaqGq/YGNwckKg== +character-entities-html4@2.1.0 | development | MIT + Lockfile path: node_modules/character-entities-html4 + Package: https://www.npmjs.com/package/character-entities-html4/v/2.1.0 + Archive: https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-2.1.0.tgz + Integrity: sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA== +character-entities-legacy@3.0.0 | development | MIT + Lockfile path: node_modules/character-entities-legacy + Package: https://www.npmjs.com/package/character-entities-legacy/v/3.0.0 + Archive: https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz + Integrity: sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ== +chownr@1.1.4 | runtime, optional | ISC + Lockfile path: node_modules/chownr + Package: https://www.npmjs.com/package/chownr/v/1.1.4 + Archive: https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz + Integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== +clean-git-ref@2.0.1 | runtime | Apache-2.0 + Lockfile path: node_modules/clean-git-ref + Package: https://www.npmjs.com/package/clean-git-ref/v/2.0.1 + Archive: https://registry.npmjs.org/clean-git-ref/-/clean-git-ref-2.0.1.tgz + Integrity: sha512-bLSptAy2P0s6hU4PzuIMKmMJJSE6gLXGH1cntDu7bWJUksvuM+7ReOK61mozULErYvP6a15rnYl0zFDef+pyPw== +cli-cursor@5.0.0 | development | MIT + Lockfile path: node_modules/cli-cursor + Package: https://www.npmjs.com/package/cli-cursor/v/5.0.0 + Archive: https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz + Integrity: sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw== +cli-truncate@5.2.0 | development | MIT + Lockfile path: node_modules/cli-truncate + Package: https://www.npmjs.com/package/cli-truncate/v/5.2.0 + Archive: https://registry.npmjs.org/cli-truncate/-/cli-truncate-5.2.0.tgz + Integrity: sha512-xRwvIOMGrfOAnM1JYtqQImuaNtDEv9v6oIYAs4LIHwTiKee8uwvIi363igssOC0O5U04i4AlENs79LQLu9tEMw== +colorette@2.0.20 | development | MIT + Lockfile path: node_modules/colorette + Package: https://www.npmjs.com/package/colorette/v/2.0.20 + Archive: https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz + Integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== +comma-separated-tokens@2.0.3 | development | MIT + Lockfile path: node_modules/comma-separated-tokens + Package: https://www.npmjs.com/package/comma-separated-tokens/v/2.0.3 + Archive: https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz + Integrity: sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg== +commander@14.0.3 | development | MIT + Lockfile path: node_modules/commander + Package: https://www.npmjs.com/package/commander/v/14.0.3 + Archive: https://registry.npmjs.org/commander/-/commander-14.0.3.tgz + Integrity: sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw== +copy-anything@4.1.5 | development | MIT + Lockfile path: node_modules/copy-anything + Package: https://www.npmjs.com/package/copy-anything/v/4.1.5 + Archive: https://registry.npmjs.org/copy-anything/-/copy-anything-4.1.5.tgz + Integrity: sha512-vePst2VLTSqPglW7Q98VwFpGiGpOHTyXIo81MO5VyLecA5zMbZw/P/V1vmwD1jksa2iJpn/YkDrJ3XhTfzUyhQ== +crc-32@1.2.2 | runtime | Apache-2.0 + Lockfile path: node_modules/crc-32 + Package: https://www.npmjs.com/package/crc-32/v/1.2.2 + Archive: https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz + Integrity: sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ== +cross-spawn@7.0.6 | runtime | MIT + Lockfile path: node_modules/cross-spawn + Package: https://www.npmjs.com/package/cross-spawn/v/7.0.6 + Archive: https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz + Integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== +csstype@3.2.3 | development | MIT + Lockfile path: node_modules/csstype + Package: https://www.npmjs.com/package/csstype/v/3.2.3 + Archive: https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz + Integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ== +decompress-response@6.0.0 | runtime | MIT + Lockfile path: node_modules/decompress-response + Package: https://www.npmjs.com/package/decompress-response/v/6.0.0 + Archive: https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz + Integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ== +deep-extend@0.6.0 | runtime, optional | MIT + Lockfile path: node_modules/deep-extend + Package: https://www.npmjs.com/package/deep-extend/v/0.6.0 + Archive: https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz + Integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== +define-data-property@1.1.4 | runtime | MIT + Lockfile path: node_modules/define-data-property + Package: https://www.npmjs.com/package/define-data-property/v/1.1.4 + Archive: https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz + Integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== +dequal@2.0.3 | development | MIT + Lockfile path: node_modules/dequal + Package: https://www.npmjs.com/package/dequal/v/2.0.3 + Archive: https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz + Integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA== +detect-libc@2.1.2 | runtime | Apache-2.0 + Lockfile path: node_modules/detect-libc + Package: https://www.npmjs.com/package/detect-libc/v/2.1.2 + Archive: https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz + Integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ== +devlop@1.1.0 | development | MIT + Lockfile path: node_modules/devlop + Package: https://www.npmjs.com/package/devlop/v/1.1.0 + Archive: https://registry.npmjs.org/devlop/-/devlop-1.1.0.tgz + Integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA== +diff@9.0.0 | runtime | BSD-3-Clause + Lockfile path: node_modules/diff + Package: https://www.npmjs.com/package/diff/v/9.0.0 + Archive: https://registry.npmjs.org/diff/-/diff-9.0.0.tgz + Integrity: sha512-svtcdpS8CgJyqAjEQIXdb3OjhFVVYjzGAPO8WGCmRbrml64SPw/jJD4GoE98aR7r25A0XcgrK3F02yw9R/vhQw== +diff3@0.0.3 | runtime | MIT + Lockfile path: node_modules/diff3 + Package: https://www.npmjs.com/package/diff3/v/0.0.3 + Archive: https://registry.npmjs.org/diff3/-/diff3-0.0.3.tgz + Integrity: sha512-iSq8ngPOt0K53A6eVr4d5Kn6GNrM2nQZtC740pzIriHtn4pOQ2lyzEXQMBeVcWERN0ye7fhBsk9PbLLQOnUx/g== +dunder-proto@1.0.1 | runtime | MIT + Lockfile path: node_modules/dunder-proto + Package: https://www.npmjs.com/package/dunder-proto/v/1.0.1 + Archive: https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz + Integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A== +emoji-regex@10.6.0 | development | MIT + Lockfile path: node_modules/emoji-regex + Package: https://www.npmjs.com/package/emoji-regex/v/10.6.0 + Archive: https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz + Integrity: sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A== +emoji-regex-xs@1.0.0 | development | MIT + Lockfile path: node_modules/emoji-regex-xs + Package: https://www.npmjs.com/package/emoji-regex-xs/v/1.0.0 + Archive: https://registry.npmjs.org/emoji-regex-xs/-/emoji-regex-xs-1.0.0.tgz + Integrity: sha512-LRlerrMYoIDrT6jgpeZ2YYl/L8EulRTt5hQcYjy5AInh7HWXKimpqx68aknBFpGL2+/IcogTcaydJEgaTmOpDg== +end-of-stream@1.4.5 | runtime, optional | MIT + Lockfile path: node_modules/end-of-stream + Package: https://www.npmjs.com/package/end-of-stream/v/1.4.5 + Archive: https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz + Integrity: sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg== +entities@7.0.1 | development | BSD-2-Clause + Lockfile path: node_modules/entities + Package: https://www.npmjs.com/package/entities/v/7.0.1 + Archive: https://registry.npmjs.org/entities/-/entities-7.0.1.tgz + Integrity: sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA== +environment@1.1.0 | development | MIT + Lockfile path: node_modules/environment + Package: https://www.npmjs.com/package/environment/v/1.1.0 + Archive: https://registry.npmjs.org/environment/-/environment-1.1.0.tgz + Integrity: sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q== +es-define-property@1.0.1 | runtime | MIT + Lockfile path: node_modules/es-define-property + Package: https://www.npmjs.com/package/es-define-property/v/1.0.1 + Archive: https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz + Integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g== +es-errors@1.3.0 | runtime | MIT + Lockfile path: node_modules/es-errors + Package: https://www.npmjs.com/package/es-errors/v/1.3.0 + Archive: https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz + Integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== +es-module-lexer@2.3.2 | development | MIT + Lockfile path: node_modules/es-module-lexer + Package: https://www.npmjs.com/package/es-module-lexer/v/2.3.2 + Archive: https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.3.2.tgz + Integrity: sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw== +es-object-atoms@1.1.2 | runtime | MIT + Lockfile path: node_modules/es-object-atoms + Package: https://www.npmjs.com/package/es-object-atoms/v/1.1.2 + Archive: https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz + Integrity: sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw== +estree-walker@3.0.3 | development | MIT + Lockfile path: node_modules/estree-walker + Package: https://www.npmjs.com/package/estree-walker/v/3.0.3 + Archive: https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz + Integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g== +event-target-shim@5.0.1 | runtime | MIT + Lockfile path: node_modules/event-target-shim + Package: https://www.npmjs.com/package/event-target-shim/v/5.0.1 + Archive: https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz + Integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== +eventemitter3@5.0.4 | development | MIT + Lockfile path: node_modules/eventemitter3 + Package: https://www.npmjs.com/package/eventemitter3/v/5.0.4 + Archive: https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.4.tgz + Integrity: sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw== +events@3.3.0 | runtime | MIT + Lockfile path: node_modules/events + Package: https://www.npmjs.com/package/events/v/3.3.0 + Archive: https://registry.npmjs.org/events/-/events-3.3.0.tgz + Integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== +eventsource@3.0.7 | runtime | MIT + Lockfile path: node_modules/eventsource + Package: https://www.npmjs.com/package/eventsource/v/3.0.7 + Archive: https://registry.npmjs.org/eventsource/-/eventsource-3.0.7.tgz + Integrity: sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA== +eventsource-parser@3.1.0 | runtime | MIT + Lockfile path: node_modules/eventsource-parser + Package: https://www.npmjs.com/package/eventsource-parser/v/3.1.0 + Archive: https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.1.0.tgz + Integrity: sha512-kJezFj9YFAMLeORyi7aCLxLbD5/qWMQnoMVlVPyHIll7lgRJCc3JVln9Vgl9nwQi0YkMnhdGTMNn7CkRRAptMg== +evmole@0.9.3 | runtime | MIT + Lockfile path: node_modules/evmole + Package: https://www.npmjs.com/package/evmole/v/0.9.3 + Archive: https://registry.npmjs.org/evmole/-/evmole-0.9.3.tgz + Integrity: sha512-UhO5HMAoEPCupSxvBJPlm/L0Qk/KVJ/OJo3r4EyhXADIEHqU5aTkAzsBfzk4lXGjqxVnaYbh1GPSmZtmSHFnQQ== +expand-template@2.0.3 | runtime, optional | (MIT OR WTFPL) + Lockfile path: node_modules/expand-template + Package: https://www.npmjs.com/package/expand-template/v/2.0.3 + Archive: https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz + Integrity: sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg== +expect-type@1.4.0 | development | Apache-2.0 + Lockfile path: node_modules/expect-type + Package: https://www.npmjs.com/package/expect-type/v/1.4.0 + Archive: https://registry.npmjs.org/expect-type/-/expect-type-1.4.0.tgz + Integrity: sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA== +fast-check@4.9.0 | development | MIT + Lockfile path: node_modules/fast-check + Package: https://www.npmjs.com/package/fast-check/v/4.9.0 + Archive: https://registry.npmjs.org/fast-check/-/fast-check-4.9.0.tgz + Integrity: sha512-7ms6T7SybUev/PQITciI0yLM2pOSFy5zpG8Ty7tQofcVaQUvrMXp6CBwqF6fThLCLOrfBtuHAtwq6Yu4XPCllg== +fast-deep-equal@3.1.3 | runtime | MIT + Lockfile path: node_modules/fast-deep-equal + Package: https://www.npmjs.com/package/fast-deep-equal/v/3.1.3 + Archive: https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz + Integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== +fast-string-truncated-width@3.0.3 | runtime | MIT + Lockfile path: node_modules/fast-string-truncated-width + Package: https://www.npmjs.com/package/fast-string-truncated-width/v/3.0.3 + Archive: https://registry.npmjs.org/fast-string-truncated-width/-/fast-string-truncated-width-3.0.3.tgz + Integrity: sha512-0jjjIEL6+0jag3l2XWWizO64/aZVtpiGE3t0Zgqxv0DPuxiMjvB3M24fCyhZUO4KomJQPj3LTSUnDP3GpdwC0g== +fast-string-width@3.0.2 | runtime | MIT + Lockfile path: node_modules/fast-string-width + Package: https://www.npmjs.com/package/fast-string-width/v/3.0.2 + Archive: https://registry.npmjs.org/fast-string-width/-/fast-string-width-3.0.2.tgz + Integrity: sha512-gX8LrtNEI5hq8DVUfRQMbr5lpaS4nMIWV+7XEbXk2b8kiQIizgnlr12B4dA3ZEx3308ze0O4Q1R+cHts8kyUJg== +fast-uri@3.1.8 | runtime | BSD-3-Clause + Lockfile path: node_modules/fast-uri + Package: https://www.npmjs.com/package/fast-uri/v/3.1.8 + Archive: https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.8.tgz + Integrity: sha512-GZMtZUTNRpOVIECoXwLNZS5xUGE+mVNbTB8h/7Rwh2TFWcBQiPzTgyZi05BF9UMZKkLJv8XBRJTlU7zg8+ZfMg== +fast-wrap-ansi@0.2.2 | runtime | MIT + Lockfile path: node_modules/fast-wrap-ansi + Package: https://www.npmjs.com/package/fast-wrap-ansi/v/0.2.2 + Archive: https://registry.npmjs.org/fast-wrap-ansi/-/fast-wrap-ansi-0.2.2.tgz + Integrity: sha512-7F2Fl+TjRSenLqlU3UjSH0iyqopqoZIu7eZVpEirP2g1GtWa2G/ecEmBdgz31+Mxr+ELclgg6sokpSFIQiZ02Q== +fd-package-json@2.0.0 | development | MIT + Lockfile path: node_modules/fd-package-json + Package: https://www.npmjs.com/package/fd-package-json/v/2.0.0 + Archive: https://registry.npmjs.org/fd-package-json/-/fd-package-json-2.0.0.tgz + Integrity: sha512-jKmm9YtsNXN789RS/0mSzOC1NUq9mkVd65vbSSVsKdjGvYXBuE4oWe2QOEoFeRmJg+lPuZxpmrfFclNhoRMneQ== +fdir@6.5.0 | development | MIT + Lockfile path: node_modules/fdir + Package: https://www.npmjs.com/package/fdir/v/6.5.0 + Archive: https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz + Integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg== +file-uri-to-path@1.0.0 | runtime, optional | MIT + Lockfile path: node_modules/file-uri-to-path + Package: https://www.npmjs.com/package/file-uri-to-path/v/1.0.0 + Archive: https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz + Integrity: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== +focus-trap@7.8.0 | development | MIT + Lockfile path: node_modules/focus-trap + Package: https://www.npmjs.com/package/focus-trap/v/7.8.0 + Archive: https://registry.npmjs.org/focus-trap/-/focus-trap-7.8.0.tgz + Integrity: sha512-/yNdlIkpWbM0ptxno3ONTuf+2g318kh2ez3KSeZN5dZ8YC6AAmgeWz+GasYYiBJPFaYcSAPeu4GfhUaChzIJXA== +for-each@0.3.5 | runtime | MIT + Lockfile path: node_modules/for-each + Package: https://www.npmjs.com/package/for-each/v/0.3.5 + Archive: https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz + Integrity: sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg== +formatly@0.7.1 | development | MIT + Lockfile path: node_modules/formatly + Package: https://www.npmjs.com/package/formatly/v/0.7.1 + Archive: https://registry.npmjs.org/formatly/-/formatly-0.7.1.tgz + Integrity: sha512-ESuCEJE0SGgabl9q+zABI8LhJDmF+8nhpuqDzuM48HfJ9QTD5o6PqFJDFZY7w6f8xsh5lixuj5nJsQNvYOWvKQ== +frida@17.23.2 | runtime, optional | LGPL-2.0 WITH WxWindows-exception-3.1 + Lockfile path: node_modules/frida + Package: https://www.npmjs.com/package/frida/v/17.23.2 + Archive: https://registry.npmjs.org/frida/-/frida-17.23.2.tgz + Integrity: sha512-gRCmmTUFdEILyHRN1b66erRoXafwsfWTqXyoBBqkSCFX0Ue7Jhvs/KhA3JO0XrgITNlPd91QAGsFvWzh0mhVgg== +fs-constants@1.0.0 | runtime, optional | MIT + Lockfile path: node_modules/fs-constants + Package: https://www.npmjs.com/package/fs-constants/v/1.0.0 + Archive: https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz + Integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== +fsevents@2.3.3 | development, optional | MIT + Lockfile path: node_modules/fsevents + Package: https://www.npmjs.com/package/fsevents/v/2.3.3 + Archive: https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz + Integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== +function-bind@1.1.2 | runtime | MIT + Lockfile path: node_modules/function-bind + Package: https://www.npmjs.com/package/function-bind/v/1.1.2 + Archive: https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz + Integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== +get-east-asian-width@1.6.0 | development | MIT + Lockfile path: node_modules/get-east-asian-width + Package: https://www.npmjs.com/package/get-east-asian-width/v/1.6.0 + Archive: https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.6.0.tgz + Integrity: sha512-QRbvDIbx6YklUe6RxeTeleMR0yv3cYH6PsPZHcnVn7xv7zO1BHN8r0XETu8n6Ye3Q+ahtSarc3WgtNWmehIBfA== +get-intrinsic@1.3.0 | runtime | MIT + Lockfile path: node_modules/get-intrinsic + Package: https://www.npmjs.com/package/get-intrinsic/v/1.3.0 + Archive: https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz + Integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ== +get-proto@1.0.1 | runtime | MIT + Lockfile path: node_modules/get-proto + Package: https://www.npmjs.com/package/get-proto/v/1.0.1 + Archive: https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz + Integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g== +get-tsconfig@4.14.3 | development | MIT + Lockfile path: node_modules/get-tsconfig + Package: https://www.npmjs.com/package/get-tsconfig/v/4.14.3 + Archive: https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.14.3.tgz + Integrity: sha512-++QEw4DIY7WGoukz+/+A/8dGYPT9l9yIadnmSgZ8Rjr3YVSVDipQSO9CdnJo9ePqFqUUqh+wk9uIaoiAwsiPkA== +github-from-package@0.0.0 | runtime, optional | MIT + Lockfile path: node_modules/github-from-package + Package: https://www.npmjs.com/package/github-from-package/v/0.0.0 + Archive: https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz + Integrity: sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw== +glob@13.0.6 | runtime | BlueOak-1.0.0 + Lockfile path: node_modules/glob + Package: https://www.npmjs.com/package/glob/v/13.0.6 + Archive: https://registry.npmjs.org/glob/-/glob-13.0.6.tgz + Integrity: sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw== +gopd@1.2.0 | runtime | MIT + Lockfile path: node_modules/gopd + Package: https://www.npmjs.com/package/gopd/v/1.2.0 + Archive: https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz + Integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg== +har-schema@2.0.0 | runtime | ISC + Lockfile path: node_modules/har-schema + Package: https://www.npmjs.com/package/har-schema/v/2.0.0 + Archive: https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz + Integrity: sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q== +has-property-descriptors@1.0.2 | runtime | MIT + Lockfile path: node_modules/has-property-descriptors + Package: https://www.npmjs.com/package/has-property-descriptors/v/1.0.2 + Archive: https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz + Integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== +has-symbols@1.1.0 | runtime | MIT + Lockfile path: node_modules/has-symbols + Package: https://www.npmjs.com/package/has-symbols/v/1.1.0 + Archive: https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz + Integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ== +has-tostringtag@1.0.2 | runtime | MIT + Lockfile path: node_modules/has-tostringtag + Package: https://www.npmjs.com/package/has-tostringtag/v/1.0.2 + Archive: https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz + Integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw== +hasown@2.0.4 | runtime | MIT + Lockfile path: node_modules/hasown + Package: https://www.npmjs.com/package/hasown/v/2.0.4 + Archive: https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz + Integrity: sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A== +hast-util-to-html@9.0.5 | development | MIT + Lockfile path: node_modules/hast-util-to-html + Package: https://www.npmjs.com/package/hast-util-to-html/v/9.0.5 + Archive: https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-9.0.5.tgz + Integrity: sha512-OguPdidb+fbHQSU4Q4ZiLKnzWo8Wwsf5bZfbvu7//a9oTYoqD/fWpe96NuHkoS9h0ccGOTe0C4NGXdtS0iObOw== +hast-util-whitespace@3.0.0 | development | MIT + Lockfile path: node_modules/hast-util-whitespace + Package: https://www.npmjs.com/package/hast-util-whitespace/v/3.0.0 + Archive: https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-3.0.0.tgz + Integrity: sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw== +hookable@5.5.3 | development | MIT + Lockfile path: node_modules/hookable + Package: https://www.npmjs.com/package/hookable/v/5.5.3 + Archive: https://registry.npmjs.org/hookable/-/hookable-5.5.3.tgz + Integrity: sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ== +html-void-elements@3.0.0 | development | MIT + Lockfile path: node_modules/html-void-elements + Package: https://www.npmjs.com/package/html-void-elements/v/3.0.0 + Archive: https://registry.npmjs.org/html-void-elements/-/html-void-elements-3.0.0.tgz + Integrity: sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg== +husky@9.1.7 | development | MIT + Lockfile path: node_modules/husky + Package: https://www.npmjs.com/package/husky/v/9.1.7 + Archive: https://registry.npmjs.org/husky/-/husky-9.1.7.tgz + Integrity: sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA== +ieee754@1.2.1 | runtime | BSD-3-Clause + Lockfile path: node_modules/ieee754 + Package: https://www.npmjs.com/package/ieee754/v/1.2.1 + Archive: https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz + Integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== +ignore@7.0.6 | runtime | MIT + Lockfile path: node_modules/ignore + Package: https://www.npmjs.com/package/ignore/v/7.0.6 + Archive: https://registry.npmjs.org/ignore/-/ignore-7.0.6.tgz + Integrity: sha512-BAg6QkE8W+TuQLrrw0Ugr7HegXduRuuj8/ti2kSOc+jz1dmx8/WNcjr6XGnq5YpDWxFwwaavqD0+jIUOKelTsw== +imurmurhash@0.1.4 | runtime | MIT + Lockfile path: node_modules/imurmurhash + Package: https://www.npmjs.com/package/imurmurhash/v/0.1.4 + Archive: https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz + Integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== +incur@0.6.1 | runtime | MIT + Lockfile path: node_modules/incur + Package: https://www.npmjs.com/package/incur/v/0.6.1 + Archive: https://registry.npmjs.org/incur/-/incur-0.6.1.tgz + Integrity: sha512-QgaPKsKH+/3SLdUTSkCYwMWzL56vO3wn7iheEwKE0jOtWSa9Irzn8KeyhkRIkTzHW0ReiQwo0EtT8bBGR9PpMw== +@modelcontextprotocol/server@2.0.0-alpha.4 | runtime | MIT + Lockfile path: node_modules/incur/node_modules/@modelcontextprotocol/server + Package: https://www.npmjs.com/package/@modelcontextprotocol/server/v/2.0.0-alpha.4 + Archive: https://registry.npmjs.org/@modelcontextprotocol/server/-/server-2.0.0-alpha.4.tgz + Integrity: sha512-/KEo3ZJ50HlagHp0lz2vPgfBZFtXHu6zTBXT9XqPc+4O9i4+IbBVWKq/a9yAfv/ifp0u3+mRo8SUk5kMKzhN8A== +inherits@2.0.4 | runtime | ISC + Lockfile path: node_modules/inherits + Package: https://www.npmjs.com/package/inherits/v/2.0.4 + Archive: https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz + Integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== +ini@1.3.8 | runtime, optional | ISC + Lockfile path: node_modules/ini + Package: https://www.npmjs.com/package/ini/v/1.3.8 + Archive: https://registry.npmjs.org/ini/-/ini-1.3.8.tgz + Integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== +is-callable@1.2.7 | runtime | MIT + Lockfile path: node_modules/is-callable + Package: https://www.npmjs.com/package/is-callable/v/1.2.7 + Archive: https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz + Integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== +is-fullwidth-code-point@5.1.0 | development | MIT + Lockfile path: node_modules/is-fullwidth-code-point + Package: https://www.npmjs.com/package/is-fullwidth-code-point/v/5.1.0 + Archive: https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.1.0.tgz + Integrity: sha512-5XHYaSyiqADb4RnZ1Bdad6cPp8Toise4TzEjcOYDHZkTCbKgiUl7WTUCpNWHuxmDt91wnsZBc9xinNzopv3JMQ== +is-typed-array@1.1.15 | runtime | MIT + Lockfile path: node_modules/is-typed-array + Package: https://www.npmjs.com/package/is-typed-array/v/1.1.15 + Archive: https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz + Integrity: sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ== +isarray@2.0.5 | runtime | MIT + Lockfile path: node_modules/isarray + Package: https://www.npmjs.com/package/isarray/v/2.0.5 + Archive: https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz + Integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== +isexe@2.0.0 | runtime | ISC + Lockfile path: node_modules/isexe + Package: https://www.npmjs.com/package/isexe/v/2.0.0 + Archive: https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz + Integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== +isomorphic-git@1.38.7 | runtime | MIT + Lockfile path: node_modules/isomorphic-git + Package: https://www.npmjs.com/package/isomorphic-git/v/1.38.7 + Archive: https://registry.npmjs.org/isomorphic-git/-/isomorphic-git-1.38.7.tgz + Integrity: sha512-2J2rCV7gTgcpscEDT7PjU5shbsKKI10E4RqBlPDI3LmMXDjSKsN2w1jTIKiay14v87sPDfXjJkgp/Rrxc0zlSg== +ignore@5.3.2 | runtime | MIT + Lockfile path: node_modules/isomorphic-git/node_modules/ignore + Package: https://www.npmjs.com/package/ignore/v/5.3.2 + Archive: https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz + Integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== +jiti@2.7.0 | development | MIT + Lockfile path: node_modules/jiti + Package: https://www.npmjs.com/package/jiti/v/2.7.0 + Archive: https://registry.npmjs.org/jiti/-/jiti-2.7.0.tgz + Integrity: sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ== +jose@6.2.3 | runtime | MIT + Lockfile path: node_modules/jose + Package: https://www.npmjs.com/package/jose/v/6.2.3 + Archive: https://registry.npmjs.org/jose/-/jose-6.2.3.tgz + Integrity: sha512-YYVDInQKFJfR/xa3ojUTl8c2KoTwiL1R5Wg9YCydwH0x0B9grbzlg5HC7mMjCtUJjbQ/YnGEZIhI5tCgfTb4Hw== +js-tokens@10.0.0 | development | MIT + Lockfile path: node_modules/js-tokens + Package: https://www.npmjs.com/package/js-tokens/v/10.0.0 + Archive: https://registry.npmjs.org/js-tokens/-/js-tokens-10.0.0.tgz + Integrity: sha512-lM/UBzQmfJRo9ABXbPWemivdCW8V2G8FHaHdypQaIy523snUjog0W71ayWXTjiR+ixeMyVHN2XcpnTd/liPg/Q== +jscpd@5.0.12 | development | MIT + Lockfile path: node_modules/jscpd + Package: https://www.npmjs.com/package/jscpd/v/5.0.12 + Archive: https://registry.npmjs.org/jscpd/-/jscpd-5.0.12.tgz + Integrity: sha512-87dC+akj2mCywlt8p3xnRlDg0B55u4GDbfE9cuwOOeIxbEuWuIoNqGoYi65A0516aJ4EzAjGwBj1Qb/Ahc8WAQ== +jscpd-darwin-arm64@5.0.12 | development, optional | MIT + Lockfile path: node_modules/jscpd-darwin-arm64 + Package: https://www.npmjs.com/package/jscpd-darwin-arm64/v/5.0.12 + Archive: https://registry.npmjs.org/jscpd-darwin-arm64/-/jscpd-darwin-arm64-5.0.12.tgz + Integrity: sha512-CQCDYhQY9yOGGeauzkRGYW/QtXurPCjfDkEhUoM/M5UdmpzxfG3i9mnNsaheJ0RdFRf73mL7JaLVRP8U2l5/kA== +jscpd-darwin-x64@5.0.12 | development, optional | MIT + Lockfile path: node_modules/jscpd-darwin-x64 + Package: https://www.npmjs.com/package/jscpd-darwin-x64/v/5.0.12 + Archive: https://registry.npmjs.org/jscpd-darwin-x64/-/jscpd-darwin-x64-5.0.12.tgz + Integrity: sha512-7XNCDfChP9fPkIWLepd0zGnTov7/5mR7rJ5Utc1MdWFdgkN//qz6FAJ1FhQA0E/qjFedy9XTucfUCgLybSBsjw== +jscpd-linux-arm64-gnu@5.0.12 | development, optional | MIT + Lockfile path: node_modules/jscpd-linux-arm64-gnu + Package: https://www.npmjs.com/package/jscpd-linux-arm64-gnu/v/5.0.12 + Archive: https://registry.npmjs.org/jscpd-linux-arm64-gnu/-/jscpd-linux-arm64-gnu-5.0.12.tgz + Integrity: sha512-i/usHD0/8twzb2Qo4vFWcnuAD4IDLS6K/mTXwYy1CiJZDw4gmjfH45jtjdKUyoutTAiNs+ZWZgx1gIRljUbFuA== +jscpd-linux-x64-gnu@5.0.12 | development, optional | MIT + Lockfile path: node_modules/jscpd-linux-x64-gnu + Package: https://www.npmjs.com/package/jscpd-linux-x64-gnu/v/5.0.12 + Archive: https://registry.npmjs.org/jscpd-linux-x64-gnu/-/jscpd-linux-x64-gnu-5.0.12.tgz + Integrity: sha512-TqaeSTaGawcqyXSrQvYJFtLRn4aQeHgphGGsq2ZtVAg+lPeuMmh81c3bl0yi2dL3gDX1RGBQKBVul1XQknOuoA== +jscpd-linux-x64-musl@5.0.12 | development, optional | MIT + Lockfile path: node_modules/jscpd-linux-x64-musl + Package: https://www.npmjs.com/package/jscpd-linux-x64-musl/v/5.0.12 + Archive: https://registry.npmjs.org/jscpd-linux-x64-musl/-/jscpd-linux-x64-musl-5.0.12.tgz + Integrity: sha512-WelugY1/rdoo0Y0sqJ2XQOIvyIZTfRe+vP3MJe4XvEUwPF0v+9SQoS34FnfblRhsddVixyNkgl7x/sHid9UMJw== +jscpd-windows-x64-msvc@5.0.12 | development, optional | MIT + Lockfile path: node_modules/jscpd-windows-x64-msvc + Package: https://www.npmjs.com/package/jscpd-windows-x64-msvc/v/5.0.12 + Archive: https://registry.npmjs.org/jscpd-windows-x64-msvc/-/jscpd-windows-x64-msvc-5.0.12.tgz + Integrity: sha512-01x1klKjvfzI6Of5tI9u72x7TIQZQLLG6kMdsEPJKl/BXbskdknrfCepeTXRBbdFPKs25jfcd0klZ4OdDvww5w== +json-schema-traverse@1.0.0 | runtime | MIT + Lockfile path: node_modules/json-schema-traverse + Package: https://www.npmjs.com/package/json-schema-traverse/v/1.0.0 + Archive: https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz + Integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== +jsonc-parser@3.3.1 | runtime | MIT + Lockfile path: node_modules/jsonc-parser + Package: https://www.npmjs.com/package/jsonc-parser/v/3.3.1 + Archive: https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.3.1.tgz + Integrity: sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ== +knip@6.39.0 | development | ISC + Lockfile path: node_modules/knip + Package: https://www.npmjs.com/package/knip/v/6.39.0 + Archive: https://registry.npmjs.org/knip/-/knip-6.39.0.tgz + Integrity: sha512-Y7g6Ve1ATMox1u1v+gx3z9LTlvzVLTJISm/LVn9TgBU4qc7OoC63AWGO8qCFPVDDdaqlYdXkDDvvO1METBfTRw== +yaml@2.9.1 | development | ISC + Lockfile path: node_modules/knip/node_modules/yaml + Package: https://www.npmjs.com/package/yaml/v/2.9.1 + Archive: https://registry.npmjs.org/yaml/-/yaml-2.9.1.tgz + Integrity: sha512-3NxN8+78OdzbT7C/WjGsyfPAtJaN3FNDsWxv7Y7mcDsT/oOmgW8BpyQQFFBnvZE3j9Y2Sdz1ULFLezL7Eb2yFw== +lightningcss@1.33.0 | development | MPL-2.0 + Lockfile path: node_modules/lightningcss + Package: https://www.npmjs.com/package/lightningcss/v/1.33.0 + Archive: https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz + Integrity: sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA== +lightningcss-android-arm64@1.33.0 | development, optional | MPL-2.0 + Lockfile path: node_modules/lightningcss-android-arm64 + Package: https://www.npmjs.com/package/lightningcss-android-arm64/v/1.33.0 + Archive: https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.33.0.tgz + Integrity: sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg== +lightningcss-darwin-arm64@1.33.0 | development, optional | MPL-2.0 + Lockfile path: node_modules/lightningcss-darwin-arm64 + Package: https://www.npmjs.com/package/lightningcss-darwin-arm64/v/1.33.0 + Archive: https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.33.0.tgz + Integrity: sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg== +lightningcss-darwin-x64@1.33.0 | development, optional | MPL-2.0 + Lockfile path: node_modules/lightningcss-darwin-x64 + Package: https://www.npmjs.com/package/lightningcss-darwin-x64/v/1.33.0 + Archive: https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.33.0.tgz + Integrity: sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ== +lightningcss-freebsd-x64@1.33.0 | development, optional | MPL-2.0 + Lockfile path: node_modules/lightningcss-freebsd-x64 + Package: https://www.npmjs.com/package/lightningcss-freebsd-x64/v/1.33.0 + Archive: https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.33.0.tgz + Integrity: sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg== +lightningcss-linux-arm-gnueabihf@1.33.0 | development, optional | MPL-2.0 + Lockfile path: node_modules/lightningcss-linux-arm-gnueabihf + Package: https://www.npmjs.com/package/lightningcss-linux-arm-gnueabihf/v/1.33.0 + Archive: https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.33.0.tgz + Integrity: sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ== +lightningcss-linux-arm64-gnu@1.33.0 | development, optional | MPL-2.0 + Lockfile path: node_modules/lightningcss-linux-arm64-gnu + Package: https://www.npmjs.com/package/lightningcss-linux-arm64-gnu/v/1.33.0 + Archive: https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.33.0.tgz + Integrity: sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg== +lightningcss-linux-arm64-musl@1.33.0 | development, optional | MPL-2.0 + Lockfile path: node_modules/lightningcss-linux-arm64-musl + Package: https://www.npmjs.com/package/lightningcss-linux-arm64-musl/v/1.33.0 + Archive: https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.33.0.tgz + Integrity: sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ== +lightningcss-linux-x64-gnu@1.33.0 | development, optional | MPL-2.0 + Lockfile path: node_modules/lightningcss-linux-x64-gnu + Package: https://www.npmjs.com/package/lightningcss-linux-x64-gnu/v/1.33.0 + Archive: https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.33.0.tgz + Integrity: sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg== +lightningcss-linux-x64-musl@1.33.0 | development, optional | MPL-2.0 + Lockfile path: node_modules/lightningcss-linux-x64-musl + Package: https://www.npmjs.com/package/lightningcss-linux-x64-musl/v/1.33.0 + Archive: https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.33.0.tgz + Integrity: sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw== +lightningcss-win32-arm64-msvc@1.33.0 | development, optional | MPL-2.0 + Lockfile path: node_modules/lightningcss-win32-arm64-msvc + Package: https://www.npmjs.com/package/lightningcss-win32-arm64-msvc/v/1.33.0 + Archive: https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.33.0.tgz + Integrity: sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA== +lightningcss-win32-x64-msvc@1.33.0 | development, optional | MPL-2.0 + Lockfile path: node_modules/lightningcss-win32-x64-msvc + Package: https://www.npmjs.com/package/lightningcss-win32-x64-msvc/v/1.33.0 + Archive: https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.33.0.tgz + Integrity: sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA== +lint-staged@16.4.0 | development | MIT + Lockfile path: node_modules/lint-staged + Package: https://www.npmjs.com/package/lint-staged/v/16.4.0 + Archive: https://registry.npmjs.org/lint-staged/-/lint-staged-16.4.0.tgz + Integrity: sha512-lBWt8hujh/Cjysw5GYVmZpFHXDCgZzhrOm8vbcUdobADZNOK/bRshr2kM3DfgrrtR1DQhfupW9gnIXOfiFi+bw== +listr2@9.0.5 | development | MIT + Lockfile path: node_modules/listr2 + Package: https://www.npmjs.com/package/listr2/v/9.0.5 + Archive: https://registry.npmjs.org/listr2/-/listr2-9.0.5.tgz + Integrity: sha512-ME4Fb83LgEgwNw96RKNvKV4VTLuXfoKudAmm2lP8Kk87KaMK0/Xrx/aAkMWmT8mDb+3MlFDspfbCs7adjRxA2g== +log-update@6.1.0 | development | MIT + Lockfile path: node_modules/log-update + Package: https://www.npmjs.com/package/log-update/v/6.1.0 + Archive: https://registry.npmjs.org/log-update/-/log-update-6.1.0.tgz + Integrity: sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w== +slice-ansi@7.1.2 | development | MIT + Lockfile path: node_modules/log-update/node_modules/slice-ansi + Package: https://www.npmjs.com/package/slice-ansi/v/7.1.2 + Archive: https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.2.tgz + Integrity: sha512-iOBWFgUX7caIZiuutICxVgX1SdxwAVFFKwt1EvMYYec/NWO5meOJ6K5uQxhrYBdQJne4KxiqZc+KptFOWFSI9w== +lossless-json@4.3.1 | runtime | MIT + Lockfile path: node_modules/lossless-json + Package: https://www.npmjs.com/package/lossless-json/v/4.3.1 + Archive: https://registry.npmjs.org/lossless-json/-/lossless-json-4.3.1.tgz + Integrity: sha512-SqD/Bg3ZfltBJ2Z14hJ/BihnvtV553WO4g9/ePtlp4lrnl9jF3AdIJt53A/Wkg/0Li+LMfxaBqgx1MiFZdQlpQ== +lru-cache@11.5.2 | runtime | BlueOak-1.0.0 + Lockfile path: node_modules/lru-cache + Package: https://www.npmjs.com/package/lru-cache/v/11.5.2 + Archive: https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.2.tgz + Integrity: sha512-4pfM1Ff0x50o0tQwb5ucw/RzNyD0/YJME6IVcStalZuMWxdt3sR3huStTtxz4PUmvZfRguvDejasvQ2kifR11g== +magic-string@1.4.3 | development | MIT + Lockfile path: node_modules/magic-string + Package: https://www.npmjs.com/package/magic-string/v/1.4.3 + Archive: https://registry.npmjs.org/magic-string/-/magic-string-1.4.3.tgz + Integrity: sha512-z12OxmaPGE0F4xlpGdjuAUckipLpQlTAuAmyGhNoD7ODpYUzvDfvtxUbjM/jwznyP178oju/KDdyi220wNJ0RQ== +magicast@0.5.5 | development | MIT + Lockfile path: node_modules/magicast + Package: https://www.npmjs.com/package/magicast/v/0.5.5 + Archive: https://registry.npmjs.org/magicast/-/magicast-0.5.5.tgz + Integrity: sha512-UicdXN8zQ3JHlxVq+28afMXPr1z7WNY6+7EJnzTdQWkTAlMLF5fNCCKxJHBQwGaNGR11581EiQmQzx73+MvszA== +@babel/helper-string-parser@7.29.7 | development | MIT + Lockfile path: node_modules/magicast/node_modules/@babel/helper-string-parser + Package: https://www.npmjs.com/package/@babel/helper-string-parser/v/7.29.7 + Archive: https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz + Integrity: sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw== +@babel/helper-validator-identifier@7.29.7 | development | MIT + Lockfile path: node_modules/magicast/node_modules/@babel/helper-validator-identifier + Package: https://www.npmjs.com/package/@babel/helper-validator-identifier/v/7.29.7 + Archive: https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz + Integrity: sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg== +@babel/parser@7.29.9 | development | MIT + Lockfile path: node_modules/magicast/node_modules/@babel/parser + Package: https://www.npmjs.com/package/@babel/parser/v/7.29.9 + Archive: https://registry.npmjs.org/@babel/parser/-/parser-7.29.9.tgz + Integrity: sha512-CjXrNHTnvqBVqHgdBysY3vk2T8tpJHb5/RMeHJBTyVa9xgugCB0CJTx/3oO8RV2QRQP391RWpB7D6hLjm8V9uA== +@babel/types@7.29.8 | development | MIT + Lockfile path: node_modules/magicast/node_modules/@babel/types + Package: https://www.npmjs.com/package/@babel/types/v/7.29.8 + Archive: https://registry.npmjs.org/@babel/types/-/types-7.29.8.tgz + Integrity: sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg== +mark.js@8.11.1 | development | MIT + Lockfile path: node_modules/mark.js + Package: https://www.npmjs.com/package/mark.js/v/8.11.1 + Archive: https://registry.npmjs.org/mark.js/-/mark.js-8.11.1.tgz + Integrity: sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ== +math-intrinsics@1.1.0 | runtime | MIT + Lockfile path: node_modules/math-intrinsics + Package: https://www.npmjs.com/package/math-intrinsics/v/1.1.0 + Archive: https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz + Integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g== +mdast-util-to-hast@13.2.1 | development | MIT + Lockfile path: node_modules/mdast-util-to-hast + Package: https://www.npmjs.com/package/mdast-util-to-hast/v/13.2.1 + Archive: https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-13.2.1.tgz + Integrity: sha512-cctsq2wp5vTsLIcaymblUriiTcZd0CwWtCbLvrOzYCDZoWyMNV8sZ7krj09FSnsiJi3WVsHLM4k6Dq/yaPyCXA== +micromark-util-character@2.1.1 | development | MIT + Lockfile path: node_modules/micromark-util-character + Package: https://www.npmjs.com/package/micromark-util-character/v/2.1.1 + Archive: https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz + Integrity: sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q== +micromark-util-encode@2.0.1 | development | MIT + Lockfile path: node_modules/micromark-util-encode + Package: https://www.npmjs.com/package/micromark-util-encode/v/2.0.1 + Archive: https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-2.0.1.tgz + Integrity: sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw== +micromark-util-sanitize-uri@2.0.1 | development | MIT + Lockfile path: node_modules/micromark-util-sanitize-uri + Package: https://www.npmjs.com/package/micromark-util-sanitize-uri/v/2.0.1 + Archive: https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.1.tgz + Integrity: sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ== +micromark-util-symbol@2.0.1 | development | MIT + Lockfile path: node_modules/micromark-util-symbol + Package: https://www.npmjs.com/package/micromark-util-symbol/v/2.0.1 + Archive: https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz + Integrity: sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q== +micromark-util-types@2.0.3 | development | MIT + Lockfile path: node_modules/micromark-util-types + Package: https://www.npmjs.com/package/micromark-util-types/v/2.0.3 + Archive: https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.3.tgz + Integrity: sha512-oxB2Ik03hI0gv+VNn9tnh1t1YEe9MDPptViAEgfdf3YQHsn0pzGTgCdlSCJXcwhqm8phaEuM7zeEu3QQzVBrPg== +mimic-function@5.0.1 | development | MIT + Lockfile path: node_modules/mimic-function + Package: https://www.npmjs.com/package/mimic-function/v/5.0.1 + Archive: https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz + Integrity: sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA== +mimic-response@3.1.0 | runtime | MIT + Lockfile path: node_modules/mimic-response + Package: https://www.npmjs.com/package/mimic-response/v/3.1.0 + Archive: https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz + Integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== +minimatch@10.2.5 | runtime | BlueOak-1.0.0 + Lockfile path: node_modules/minimatch + Package: https://www.npmjs.com/package/minimatch/v/10.2.5 + Archive: https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz + Integrity: sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg== +minimist@1.2.8 | runtime | MIT + Lockfile path: node_modules/minimist + Package: https://www.npmjs.com/package/minimist/v/1.2.8 + Archive: https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz + Integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== +minimisted@2.0.1 | runtime | MIT + Lockfile path: node_modules/minimisted + Package: https://www.npmjs.com/package/minimisted/v/2.0.1 + Archive: https://registry.npmjs.org/minimisted/-/minimisted-2.0.1.tgz + Integrity: sha512-1oPjfuLQa2caorJUM8HV8lGgWCc0qqAO1MNv/k05G4qslmsndV/5WdNZrqCiyqiz3wohia2Ij2B7w2Dr7/IyrA== +minipass@7.1.3 | runtime | BlueOak-1.0.0 + Lockfile path: node_modules/minipass + Package: https://www.npmjs.com/package/minipass/v/7.1.3 + Archive: https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz + Integrity: sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A== +minisearch@7.2.0 | development | MIT + Lockfile path: node_modules/minisearch + Package: https://www.npmjs.com/package/minisearch/v/7.2.0 + Archive: https://registry.npmjs.org/minisearch/-/minisearch-7.2.0.tgz + Integrity: sha512-dqT2XBYUOZOiC5t2HRnwADjhNS2cecp9u+TJRiJ1Qp/f5qjkeT5APcGPjHw+bz89Ms8Jp+cG4AlE+QZ/QnDglg== +mitt@3.0.1 | development | MIT + Lockfile path: node_modules/mitt + Package: https://www.npmjs.com/package/mitt/v/3.0.1 + Archive: https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz + Integrity: sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw== +mkdirp-classic@0.5.3 | runtime, optional | MIT + Lockfile path: node_modules/mkdirp-classic + Package: https://www.npmjs.com/package/mkdirp-classic/v/0.5.3 + Archive: https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz + Integrity: sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== +nanoid@3.3.20 | development | MIT + Lockfile path: node_modules/nanoid + Package: https://www.npmjs.com/package/nanoid/v/3.3.20 + Archive: https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz + Integrity: sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ== +napi-build-utils@2.0.0 | runtime, optional | MIT + Lockfile path: node_modules/napi-build-utils + Package: https://www.npmjs.com/package/napi-build-utils/v/2.0.0 + Archive: https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-2.0.0.tgz + Integrity: sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA== +node-abi@3.98.0 | runtime, optional | MIT + Lockfile path: node_modules/node-abi + Package: https://www.npmjs.com/package/node-abi/v/3.98.0 + Archive: https://registry.npmjs.org/node-abi/-/node-abi-3.98.0.tgz + Integrity: sha512-Llh8noNw7s15m+rmIrZnZQbe4gLyasL9loT74rC92PkmwWKeEedKvc7o6pjp8B3MhrYT/Cl846NOYZbz1wmddw== +obug@2.2.1 | development | MIT + Lockfile path: node_modules/obug + Package: https://www.npmjs.com/package/obug/v/2.2.1 + Archive: https://registry.npmjs.org/obug/-/obug-2.2.1.tgz + Integrity: sha512-XrsrhT5sybtKI6wakr2SPOlGZWWYbUXZ7a0jT8/QOeAPau+1X/bSegNe5YR75oJmEZQbKningirmGOEJCIk61Q== +on-exit-leak-free@2.1.2 | runtime | MIT + Lockfile path: node_modules/on-exit-leak-free + Package: https://www.npmjs.com/package/on-exit-leak-free/v/2.1.2 + Archive: https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-2.1.2.tgz + Integrity: sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA== +once@1.4.0 | runtime | ISC + Lockfile path: node_modules/once + Package: https://www.npmjs.com/package/once/v/1.4.0 + Archive: https://registry.npmjs.org/once/-/once-1.4.0.tgz + Integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== +onetime@7.0.0 | development | MIT + Lockfile path: node_modules/onetime + Package: https://www.npmjs.com/package/onetime/v/7.0.0 + Archive: https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz + Integrity: sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ== +oniguruma-to-es@3.1.1 | development | MIT + Lockfile path: node_modules/oniguruma-to-es + Package: https://www.npmjs.com/package/oniguruma-to-es/v/3.1.1 + Archive: https://registry.npmjs.org/oniguruma-to-es/-/oniguruma-to-es-3.1.1.tgz + Integrity: sha512-bUH8SDvPkH3ho3dvwJwfonjlQ4R80vjyvrU8YpxuROddv55vAEJrTuCuCVUhhsHbtlD9tGGbaNApGQckXhS8iQ== +oxc-parser@0.150.0 | development | MIT + Lockfile path: node_modules/oxc-parser + Package: https://www.npmjs.com/package/oxc-parser/v/0.150.0 + Archive: https://registry.npmjs.org/oxc-parser/-/oxc-parser-0.150.0.tgz + Integrity: sha512-zwajKw1GUa57IOdafIS7/yOObGF2NihwIfZfs5yJTRprMSkiwhWOc/k+n8bwnUPbHr2/XsjfBO8KyTPaW3VpWg== +@oxc-project/types@0.150.0 | development | MIT + Lockfile path: node_modules/oxc-parser/node_modules/@oxc-project/types + Package: https://www.npmjs.com/package/@oxc-project/types/v/0.150.0 + Archive: https://registry.npmjs.org/@oxc-project/types/-/types-0.150.0.tgz + Integrity: sha512-rDS5/31E9HfPl/CIzGrn0DOlvBbXFseQ5URJ9sYMfstbKLD/c6Gm9vmRzRGDdAXyOIL4zmO37lc9RIwYqVruZw== +oxc-resolver@11.24.2 | development | MIT + Lockfile path: node_modules/oxc-resolver + Package: https://www.npmjs.com/package/oxc-resolver/v/11.24.2 + Archive: https://registry.npmjs.org/oxc-resolver/-/oxc-resolver-11.24.2.tgz + Integrity: sha512-FY91FiDBj7ls5MsFS9jN3tjz2o0/zsdSsymlakySaBwVJZorHhkWyICLZMKxlu1R9vYo+sd3z1jwb4J8x7bNDw== +oxfmt@0.72.0 | development | MIT + Lockfile path: node_modules/oxfmt + Package: https://www.npmjs.com/package/oxfmt/v/0.72.0 + Archive: https://registry.npmjs.org/oxfmt/-/oxfmt-0.72.0.tgz + Integrity: sha512-16OQeL0uhPZbfmT9S9WWM0Nv9+BmVi8Ra1uTYaSKj/qSCs6FB30KOhz9JoNYw6thT+K5bVxsk/tSEOu497i34g== +oxlint@1.87.0 | development | MIT + Lockfile path: node_modules/oxlint + Package: https://www.npmjs.com/package/oxlint/v/1.87.0 + Archive: https://registry.npmjs.org/oxlint/-/oxlint-1.87.0.tgz + Integrity: sha512-drxVlaW7Oqq7wSy1CN25znRu00aRq8n57Q2wniJRxCmtYVz07ufCm7EVDPQFZURrTgQIjzKrVEHAD/HcvJXObg== +package-manager-detector@1.9.0 | development | MIT + Lockfile path: node_modules/package-manager-detector + Package: https://www.npmjs.com/package/package-manager-detector/v/1.9.0 + Archive: https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-1.9.0.tgz + Integrity: sha512-zAMfbta9nPA8AKkA4WdmNAT8R8s6Dk0/xwPsqNnRidMFcLo1YkLuPDTgs2f64XdzS8vbLNnoJ+uUIkgbz7oRHA== +pako@1.0.11 | runtime | (MIT AND Zlib) + Lockfile path: node_modules/pako + Package: https://www.npmjs.com/package/pako/v/1.0.11 + Archive: https://registry.npmjs.org/pako/-/pako-1.0.11.tgz + Integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== +parse5@8.0.1 | runtime | MIT + Lockfile path: node_modules/parse5 + Package: https://www.npmjs.com/package/parse5/v/8.0.1 + Archive: https://registry.npmjs.org/parse5/-/parse5-8.0.1.tgz + Integrity: sha512-z1e/HMG90obSGeidlli3hj7cbocou0/wa5HacvI3ASx34PecNjNQeaHNo5WIZpWofN9kgkqV1q5YvXe3F0FoPw== +entities@8.1.0 | runtime | BSD-2-Clause + Lockfile path: node_modules/parse5/node_modules/entities + Package: https://www.npmjs.com/package/entities/v/8.1.0 + Archive: https://registry.npmjs.org/entities/-/entities-8.1.0.tgz + Integrity: sha512-kxL7msIffSuh9aaFAMD7rxAIuTRMAHMeBtgHW2yUdWw732ZNh4MehkF2gdjvtdmikkaIP9bFDDJOPlsvm7avrA== +path-key@3.1.1 | runtime | MIT + Lockfile path: node_modules/path-key + Package: https://www.npmjs.com/package/path-key/v/3.1.1 + Archive: https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz + Integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== +path-scurry@2.0.2 | runtime | BlueOak-1.0.0 + Lockfile path: node_modules/path-scurry + Package: https://www.npmjs.com/package/path-scurry/v/2.0.2 + Archive: https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz + Integrity: sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg== +perfect-debounce@1.0.0 | development | MIT + Lockfile path: node_modules/perfect-debounce + Package: https://www.npmjs.com/package/perfect-debounce/v/1.0.0 + Archive: https://registry.npmjs.org/perfect-debounce/-/perfect-debounce-1.0.0.tgz + Integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA== +picocolors@1.1.1 | development | ISC + Lockfile path: node_modules/picocolors + Package: https://www.npmjs.com/package/picocolors/v/1.1.1 + Archive: https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz + Integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== +picomatch@4.0.7 | development | MIT + Lockfile path: node_modules/picomatch + Package: https://www.npmjs.com/package/picomatch/v/4.0.7 + Archive: https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz + Integrity: sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA== +pify@4.0.1 | runtime | MIT + Lockfile path: node_modules/pify + Package: https://www.npmjs.com/package/pify/v/4.0.1 + Archive: https://registry.npmjs.org/pify/-/pify-4.0.1.tgz + Integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== +pino@10.4.0 | runtime | MIT + Lockfile path: node_modules/pino + Package: https://www.npmjs.com/package/pino/v/10.4.0 + Archive: https://registry.npmjs.org/pino/-/pino-10.4.0.tgz + Integrity: sha512-bk1ZMTwG/Vymx+zPoa28MhNzucFvXJWp3csrSuxuHPSMeUettaCoQ5Jvg07mtC4JGNpcfTwz41oVCnNgBK9+vA== +pino-abstract-transport@3.0.0 | runtime | MIT + Lockfile path: node_modules/pino-abstract-transport + Package: https://www.npmjs.com/package/pino-abstract-transport/v/3.0.0 + Archive: https://registry.npmjs.org/pino-abstract-transport/-/pino-abstract-transport-3.0.0.tgz + Integrity: sha512-wlfUczU+n7Hy/Ha5j9a/gZNy7We5+cXp8YL+X+PG8S0KXxw7n/JXA3c46Y0zQznIJ83URJiwy7Lh56WLokNuxg== +pino-std-serializers@7.1.0 | runtime | MIT + Lockfile path: node_modules/pino-std-serializers + Package: https://www.npmjs.com/package/pino-std-serializers/v/7.1.0 + Archive: https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-7.1.0.tgz + Integrity: sha512-BndPH67/JxGExRgiX1dX0w1FvZck5Wa4aal9198SrRhZjH3GxKQUKIBnYJTdj2HDN3UQAS06HlfcSbQj2OHmaw== +pkce-challenge@5.0.1 | runtime | MIT + Lockfile path: node_modules/pkce-challenge + Package: https://www.npmjs.com/package/pkce-challenge/v/5.0.1 + Archive: https://registry.npmjs.org/pkce-challenge/-/pkce-challenge-5.0.1.tgz + Integrity: sha512-wQ0b/W4Fr01qtpHlqSqspcj3EhBvimsdh0KlHhH8HRZnMsEa0ea2fTULOXOS9ccQr3om+GcGRk4e+isrZWV8qQ== +playwright-core@1.58.2 | runtime | Apache-2.0 + Lockfile path: node_modules/playwright-core + Package: https://www.npmjs.com/package/playwright-core/v/1.58.2 + Archive: https://registry.npmjs.org/playwright-core/-/playwright-core-1.58.2.tgz + Integrity: sha512-yZkEtftgwS8CsfYo7nm0KE8jsvm6i/PTgVtB8DL726wNf6H2IMsDuxCpJj59KDaxCtSnrWan2AeDqM7JBaultg== +plist@5.0.0 | runtime | MIT + Lockfile path: node_modules/plist + Package: https://www.npmjs.com/package/plist/v/5.0.0 + Archive: https://registry.npmjs.org/plist/-/plist-5.0.0.tgz + Integrity: sha512-20N+g1DvMm/DFRbsvER7tT4wDryq0WunK7VMkDaiJcKNapAnUMkTsAnacFYf8n420F4Hf6/hefgmJRkMb1M0fg== +possible-typed-array-names@1.1.0 | runtime | MIT + Lockfile path: node_modules/possible-typed-array-names + Package: https://www.npmjs.com/package/possible-typed-array-names/v/1.1.0 + Archive: https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz + Integrity: sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg== +postcss@8.5.29 | development | MIT + Lockfile path: node_modules/postcss + Package: https://www.npmjs.com/package/postcss/v/8.5.29 + Archive: https://registry.npmjs.org/postcss/-/postcss-8.5.29.tgz + Integrity: sha512-49cGhUbXj8Qenv0iTMxA1cFBzxXoctpC9Ujd77t1WcbJIr6nF/eI7g/8MgxrYldFRuAXvja7xQRwavoW7kgrxQ== +preact@10.29.8 | development | MIT + Lockfile path: node_modules/preact + Package: https://www.npmjs.com/package/preact/v/10.29.8 + Archive: https://registry.npmjs.org/preact/-/preact-10.29.8.tgz + Integrity: sha512-ej2aVZ+vZ8WO7tvlQWRM9N63A0KzF9q4mWJfDUHgYaIofWY9hu74QdnQrjoPMmZi2/nZ5gN0bJCQF49xQqx09Q== +prebuild-install@7.1.3 | runtime, optional | MIT + Lockfile path: node_modules/prebuild-install + Package: https://www.npmjs.com/package/prebuild-install/v/7.1.3 + Archive: https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.3.tgz + Integrity: sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug== +process@0.11.10 | runtime | MIT + Lockfile path: node_modules/process + Package: https://www.npmjs.com/package/process/v/0.11.10 + Archive: https://registry.npmjs.org/process/-/process-0.11.10.tgz + Integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== +process-warning@5.0.0 | runtime | MIT + Lockfile path: node_modules/process-warning + Package: https://www.npmjs.com/package/process-warning/v/5.0.0 + Archive: https://registry.npmjs.org/process-warning/-/process-warning-5.0.0.tgz + Integrity: sha512-a39t9ApHNx2L4+HBnQKqxxHNs1r7KF+Intd8Q/g1bUh6q0WIp9voPXJ/x0j+ZL45KF1pJd9+q2jLIRMfvEshkA== +property-information@7.2.0 | development | MIT + Lockfile path: node_modules/property-information + Package: https://www.npmjs.com/package/property-information/v/7.2.0 + Archive: https://registry.npmjs.org/property-information/-/property-information-7.2.0.tgz + Integrity: sha512-IAtzIB6sUiWaJYrX9smp3V46pBGbBeLFRGdh25kg1334VcBlD8HzhPeNIWQH9zhGmo2itIe25EHt9dQP7G5hmg== +pump@3.0.4 | runtime, optional | MIT + Lockfile path: node_modules/pump + Package: https://www.npmjs.com/package/pump/v/3.0.4 + Archive: https://registry.npmjs.org/pump/-/pump-3.0.4.tgz + Integrity: sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA== +pure-rand@8.4.2 | development | MIT + Lockfile path: node_modules/pure-rand + Package: https://www.npmjs.com/package/pure-rand/v/8.4.2 + Archive: https://registry.npmjs.org/pure-rand/-/pure-rand-8.4.2.tgz + Integrity: sha512-vvuOGgcuPJAirlHvuQw1TrOiw7ptaIXXmIbNuiNOY6lNGJJH49PQ1Kj4nd783nPdQhQdicgOjVI2yI/9BD6/Ng== +quick-format-unescaped@4.0.4 | runtime | MIT + Lockfile path: node_modules/quick-format-unescaped + Package: https://www.npmjs.com/package/quick-format-unescaped/v/4.0.4 + Archive: https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz + Integrity: sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg== +rc@1.2.8 | runtime, optional | (BSD-2-Clause OR MIT OR Apache-2.0) + Lockfile path: node_modules/rc + Package: https://www.npmjs.com/package/rc/v/1.2.8 + Archive: https://registry.npmjs.org/rc/-/rc-1.2.8.tgz + Integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== +strip-json-comments@2.0.1 | runtime, optional | MIT + Lockfile path: node_modules/rc/node_modules/strip-json-comments + Package: https://www.npmjs.com/package/strip-json-comments/v/2.0.1 + Archive: https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz + Integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== +readable-stream@4.7.0 | runtime | MIT + Lockfile path: node_modules/readable-stream + Package: https://www.npmjs.com/package/readable-stream/v/4.7.0 + Archive: https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz + Integrity: sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg== +real-require@1.0.0 | runtime | MIT + Lockfile path: node_modules/real-require + Package: https://www.npmjs.com/package/real-require/v/1.0.0 + Archive: https://registry.npmjs.org/real-require/-/real-require-1.0.0.tgz + Integrity: sha512-P4nbQYQfePJxRSmY+v/KINxVucm4NF3p3s7pJveMTtom52FR4YGltUQLB8idDXwDDWW+eYrWDFbuzUnjoWHF7g== +regex@6.1.0 | development | MIT + Lockfile path: node_modules/regex + Package: https://www.npmjs.com/package/regex/v/6.1.0 + Archive: https://registry.npmjs.org/regex/-/regex-6.1.0.tgz + Integrity: sha512-6VwtthbV4o/7+OaAF9I5L5V3llLEsoPyq9P1JVXkedTP33c7MfCG0/5NOPcSJn0TzXcG9YUrR0gQSWioew3LDg== +regex-recursion@6.0.2 | development | MIT + Lockfile path: node_modules/regex-recursion + Package: https://www.npmjs.com/package/regex-recursion/v/6.0.2 + Archive: https://registry.npmjs.org/regex-recursion/-/regex-recursion-6.0.2.tgz + Integrity: sha512-0YCaSCq2VRIebiaUviZNs0cBz1kg5kVS2UKUfNIx8YVs1cN3AV7NTctO5FOKBA+UT2BPJIWZauYHPqJODG50cg== +regex-utilities@2.3.0 | development | MIT + Lockfile path: node_modules/regex-utilities + Package: https://www.npmjs.com/package/regex-utilities/v/2.3.0 + Archive: https://registry.npmjs.org/regex-utilities/-/regex-utilities-2.3.0.tgz + Integrity: sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng== +require-from-string@2.0.2 | runtime | MIT + Lockfile path: node_modules/require-from-string + Package: https://www.npmjs.com/package/require-from-string/v/2.0.2 + Archive: https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz + Integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== +resolve-pkg-maps@1.0.0 | development | MIT + Lockfile path: node_modules/resolve-pkg-maps + Package: https://www.npmjs.com/package/resolve-pkg-maps/v/1.0.0 + Archive: https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz + Integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw== +restore-cursor@5.1.0 | development | MIT + Lockfile path: node_modules/restore-cursor + Package: https://www.npmjs.com/package/restore-cursor/v/5.1.0 + Archive: https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz + Integrity: sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA== +rfdc@1.4.1 | development | MIT + Lockfile path: node_modules/rfdc + Package: https://www.npmjs.com/package/rfdc/v/1.4.1 + Archive: https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz + Integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA== +rolldown@1.2.12 | development | MIT + Lockfile path: node_modules/rolldown + Package: https://www.npmjs.com/package/rolldown/v/1.2.12 + Archive: https://registry.npmjs.org/rolldown/-/rolldown-1.2.12.tgz + Integrity: sha512-8wafseiaG80xmXSfqidUNqZcylTlhmPZZt+za2m+js2sFZ8dTNlhIOV2WcbIPx2hgwPBJpEUGFAMZ9bgBBLTSQ== +rollup@4.64.1 | development | MIT + Lockfile path: node_modules/rollup + Package: https://www.npmjs.com/package/rollup/v/4.64.1 + Archive: https://registry.npmjs.org/rollup/-/rollup-4.64.1.tgz + Integrity: sha512-7s4V+3J8ux75WNj9qwSJnrWmlCmZ2YHr2fojtHy5RiIMvhJv6DGe7HKKz7L6G1sq1Eg1fLC8SjYtAtDis1F4CQ== +safe-buffer@5.2.1 | runtime | MIT + Lockfile path: node_modules/safe-buffer + Package: https://www.npmjs.com/package/safe-buffer/v/5.2.1 + Archive: https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz + Integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== +safe-stable-stringify@2.5.0 | runtime | MIT + Lockfile path: node_modules/safe-stable-stringify + Package: https://www.npmjs.com/package/safe-stable-stringify/v/2.5.0 + Archive: https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz + Integrity: sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA== +search-insights@2.17.3 | development | MIT + Lockfile path: node_modules/search-insights + Package: https://www.npmjs.com/package/search-insights/v/2.17.3 + Archive: https://registry.npmjs.org/search-insights/-/search-insights-2.17.3.tgz + Integrity: sha512-RQPdCYTa8A68uM2jwxoY842xDhvx3E5LFL1LxvxCNMev4o5mLuokczhzjAgGwUZBAmOKZknArSxLKmXtIi2AxQ== +semver@7.8.5 | runtime | ISC + Lockfile path: node_modules/semver + Package: https://www.npmjs.com/package/semver/v/7.8.5 + Archive: https://registry.npmjs.org/semver/-/semver-7.8.5.tgz + Integrity: sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA== +set-function-length@1.2.2 | runtime | MIT + Lockfile path: node_modules/set-function-length + Package: https://www.npmjs.com/package/set-function-length/v/1.2.2 + Archive: https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz + Integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== +sha.js@2.4.12 | runtime | (MIT AND BSD-3-Clause) + Lockfile path: node_modules/sha.js + Package: https://www.npmjs.com/package/sha.js/v/2.4.12 + Archive: https://registry.npmjs.org/sha.js/-/sha.js-2.4.12.tgz + Integrity: sha512-8LzC5+bvI45BjpfXU8V5fdU2mfeKiQe1D1gIMn7XUlF3OTUrpdJpPPH4EMAnF0DsHHdSZqCdSss5qCmJKuiO3w== +shebang-command@2.0.0 | runtime | MIT + Lockfile path: node_modules/shebang-command + Package: https://www.npmjs.com/package/shebang-command/v/2.0.0 + Archive: https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz + Integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== +shebang-regex@3.0.0 | runtime | MIT + Lockfile path: node_modules/shebang-regex + Package: https://www.npmjs.com/package/shebang-regex/v/3.0.0 + Archive: https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz + Integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== +shiki@2.5.0 | development | MIT + Lockfile path: node_modules/shiki + Package: https://www.npmjs.com/package/shiki/v/2.5.0 + Archive: https://registry.npmjs.org/shiki/-/shiki-2.5.0.tgz + Integrity: sha512-mI//trrsaiCIPsja5CNfsyNOqgAZUb6VpJA+340toL42UpzQlXpwRV9nch69X6gaUxrr9kaOOa6e3y3uAkGFxQ== +signal-exit@4.1.0 | runtime | ISC + Lockfile path: node_modules/signal-exit + Package: https://www.npmjs.com/package/signal-exit/v/4.1.0 + Archive: https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz + Integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== +simple-concat@1.0.1 | runtime | MIT + Lockfile path: node_modules/simple-concat + Package: https://www.npmjs.com/package/simple-concat/v/1.0.1 + Archive: https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz + Integrity: sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== +simple-get@4.0.1 | runtime | MIT + Lockfile path: node_modules/simple-get + Package: https://www.npmjs.com/package/simple-get/v/4.0.1 + Archive: https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz + Integrity: sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA== +sisteransi@1.0.5 | runtime | MIT + Lockfile path: node_modules/sisteransi + Package: https://www.npmjs.com/package/sisteransi/v/1.0.5 + Archive: https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz + Integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== +slice-ansi@8.0.0 | development | MIT + Lockfile path: node_modules/slice-ansi + Package: https://www.npmjs.com/package/slice-ansi/v/8.0.0 + Archive: https://registry.npmjs.org/slice-ansi/-/slice-ansi-8.0.0.tgz + Integrity: sha512-stxByr12oeeOyY2BlviTNQlYV5xOj47GirPr4yA1hE9JCtxfQN0+tVbkxwCtYDQWhEKWFHsEK48ORg5jrouCAg== +smol-toml@1.9.0 | runtime | BSD-3-Clause + Lockfile path: node_modules/smol-toml + Package: https://www.npmjs.com/package/smol-toml/v/1.9.0 + Archive: https://registry.npmjs.org/smol-toml/-/smol-toml-1.9.0.tgz + Integrity: sha512-hpd+HLON7HdZXqYchMM/+LaTTbdK0AU3NngIJ4KVyWbY9bfQqdL9cD+4yf6dUoU2Ap4VsU0JkQi6FxAI1B2mXQ== +sonic-boom@4.2.1 | runtime | MIT + Lockfile path: node_modules/sonic-boom + Package: https://www.npmjs.com/package/sonic-boom/v/4.2.1 + Archive: https://registry.npmjs.org/sonic-boom/-/sonic-boom-4.2.1.tgz + Integrity: sha512-w6AxtubXa2wTXAUsZMMWERrsIRAdrK0Sc+FUytWvYAhBJLyuI4llrMIC1DtlNSdI99EI86KZum2MMq3EAZlF9Q== +source-map-js@1.2.2 | development | BSD-3-Clause + Lockfile path: node_modules/source-map-js + Package: https://www.npmjs.com/package/source-map-js/v/1.2.2 + Archive: https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz + Integrity: sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw== +space-separated-tokens@2.0.2 | development | MIT + Lockfile path: node_modules/space-separated-tokens + Package: https://www.npmjs.com/package/space-separated-tokens/v/2.0.2 + Archive: https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz + Integrity: sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q== +speakingurl@14.0.1 | development | BSD-3-Clause + Lockfile path: node_modules/speakingurl + Package: https://www.npmjs.com/package/speakingurl/v/14.0.1 + Archive: https://registry.npmjs.org/speakingurl/-/speakingurl-14.0.1.tgz + Integrity: sha512-1POYv7uv2gXoyGFpBCmpDVSNV74IfsWlDW216UPjbWufNf+bSU6GdbDsxdcxtfwb4xlI3yxzOTKClUosxARYrQ== +split2@4.2.0 | runtime | ISC + Lockfile path: node_modules/split2 + Package: https://www.npmjs.com/package/split2/v/4.2.0 + Archive: https://registry.npmjs.org/split2/-/split2-4.2.0.tgz + Integrity: sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg== +std-env@4.2.0 | development | MIT + Lockfile path: node_modules/std-env + Package: https://www.npmjs.com/package/std-env/v/4.2.0 + Archive: https://registry.npmjs.org/std-env/-/std-env-4.2.0.tgz + Integrity: sha512-oCUKSupKTHX53EyjDtuZQ64pjLJ6yYCtpmEw0goYxtjG9KpbRe8KAsl2tBUGU9DyMcJ0RwJ8GqJAFzMXcXW1Rw== +stream-chain@4.2.6 | runtime | BSD-3-Clause + Lockfile path: node_modules/stream-chain + Package: https://www.npmjs.com/package/stream-chain/v/4.2.6 + Archive: https://registry.npmjs.org/stream-chain/-/stream-chain-4.2.6.tgz + Integrity: sha512-1zeJ8CrtJfmiba26ui8jXkq/xLRFvhzkdH02D5QLO9Cnovgeb28IJxg88DdraWnjnkbOol/++uIAybJbJhk7ig== +stream-json@3.7.0 | runtime | BSD-3-Clause + Lockfile path: node_modules/stream-json + Package: https://www.npmjs.com/package/stream-json/v/3.7.0 + Archive: https://registry.npmjs.org/stream-json/-/stream-json-3.7.0.tgz + Integrity: sha512-rCSBdcBP/bPk6T8QFcxAj1MSzAuc5i49cYW6IE7sYObNEPccBJIUiL6fU9c9BWt40aJK0siVynLX7lWaW8alXw== +string-argv@0.3.2 | development | MIT + Lockfile path: node_modules/string-argv + Package: https://www.npmjs.com/package/string-argv/v/0.3.2 + Archive: https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz + Integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q== +string-width@8.2.2 | development | MIT + Lockfile path: node_modules/string-width + Package: https://www.npmjs.com/package/string-width/v/8.2.2 + Archive: https://registry.npmjs.org/string-width/-/string-width-8.2.2.tgz + Integrity: sha512-GaPUh5gfdrYzqeVNZvUfT23vYYxXzKYidUcnMtJg/3rxRV63EFZy3k6xfKlmfeJD0176lnUV/Usr3XcwSvFzpg== +string_decoder@1.3.0 | runtime | MIT + Lockfile path: node_modules/string_decoder + Package: https://www.npmjs.com/package/string_decoder/v/1.3.0 + Archive: https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz + Integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== +stringify-entities@4.0.4 | development | MIT + Lockfile path: node_modules/stringify-entities + Package: https://www.npmjs.com/package/stringify-entities/v/4.0.4 + Archive: https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.4.tgz + Integrity: sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg== +strip-ansi@7.2.0 | development | MIT + Lockfile path: node_modules/strip-ansi + Package: https://www.npmjs.com/package/strip-ansi/v/7.2.0 + Archive: https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz + Integrity: sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w== +strip-json-comments@5.0.3 | development | MIT + Lockfile path: node_modules/strip-json-comments + Package: https://www.npmjs.com/package/strip-json-comments/v/5.0.3 + Archive: https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-5.0.3.tgz + Integrity: sha512-1tB5mhVo7U+ETBKNf92xT4hrQa3pm0MZ0PQvuDnWgAAGHDsfp4lPSpiS6psrSiet87wyGPh9ft6wmhOMQ0hDiw== +superjson@2.2.6 | development | MIT + Lockfile path: node_modules/superjson + Package: https://www.npmjs.com/package/superjson/v/2.2.6 + Archive: https://registry.npmjs.org/superjson/-/superjson-2.2.6.tgz + Integrity: sha512-H+ue8Zo4vJmV2nRjpx86P35lzwDT3nItnIsocgumgr0hHMQ+ZGq5vrERg9kJBo5AWGmxZDhzDo+WVIJqkB0cGA== +tabbable@6.5.0 | development | MIT + Lockfile path: node_modules/tabbable + Package: https://www.npmjs.com/package/tabbable/v/6.5.0 + Archive: https://registry.npmjs.org/tabbable/-/tabbable-6.5.0.tgz + Integrity: sha512-wieBHXygIm7OyQOu5hQlkk62/WyCFYGlWg7L6/ZCUZwx0o398Zkn4pVmMyfYhfMG8kGrj/Krt8eIk6UKC6VzwA== +tar-fs@2.1.5 | runtime, optional | MIT + Lockfile path: node_modules/tar-fs + Package: https://www.npmjs.com/package/tar-fs/v/2.1.5 + Archive: https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.5.tgz + Integrity: sha512-OboTd8mmMhZDNPV+UjQcK9yKAatXu2aJ+r1w4im1Otd4M4fl2hwvdoXUxIYHFTHWK/3y3FarBP70v3vwmGlOxw== +tar-stream@2.2.0 | runtime, optional | MIT + Lockfile path: node_modules/tar-stream + Package: https://www.npmjs.com/package/tar-stream/v/2.2.0 + Archive: https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz + Integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ== +readable-stream@3.6.2 | runtime, optional | MIT + Lockfile path: node_modules/tar-stream/node_modules/readable-stream + Package: https://www.npmjs.com/package/readable-stream/v/3.6.2 + Archive: https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz + Integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== +thread-stream@4.2.0 | runtime | MIT + Lockfile path: node_modules/thread-stream + Package: https://www.npmjs.com/package/thread-stream/v/4.2.0 + Archive: https://registry.npmjs.org/thread-stream/-/thread-stream-4.2.0.tgz + Integrity: sha512-e2zZ96wSChazBsbENf/Pcm/4swHt2cEKQ92rhUjkL9GCKiTDJIaTBenjE/m9DXi0QBmTMDkFDdOomUy20A1tDQ== +tinybench@6.2.0 | development | MIT + Lockfile path: node_modules/tinybench + Package: https://www.npmjs.com/package/tinybench/v/6.2.0 + Archive: https://registry.npmjs.org/tinybench/-/tinybench-6.2.0.tgz + Integrity: sha512-78U2TlB2CnVenajOFzf3BKSm0J6oz5L0NV7g32LCPccvYc0lbWvys4d3uUUCS2B1N8PAf2+aekR8i1KbC3HO7Q== +tinyexec@1.3.1 | development | MIT + Lockfile path: node_modules/tinyexec + Package: https://www.npmjs.com/package/tinyexec/v/1.3.1 + Archive: https://registry.npmjs.org/tinyexec/-/tinyexec-1.3.1.tgz + Integrity: sha512-GCvB3aoys96IuDFBMcTB46JOR6mdMtAToqwiW8JlWhsoh1mhHi/xn9ss/Dg7N555GiJyEt2qzoG/NHCwM6h1EA== +tinyglobby@0.2.17 | development | MIT + Lockfile path: node_modules/tinyglobby + Package: https://www.npmjs.com/package/tinyglobby/v/0.2.17 + Archive: https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz + Integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g== +tinypool@2.2.0 | development | MIT + Lockfile path: node_modules/tinypool + Package: https://www.npmjs.com/package/tinypool/v/2.2.0 + Archive: https://registry.npmjs.org/tinypool/-/tinypool-2.2.0.tgz + Integrity: sha512-jBrmx4lYmaC9k/mgPbylxs7kBUxHtD8256up+HjLaDFfXScKJQyil+SWXSvhAtT7XHo+yTVlpB81PGmHP8oLSQ== +tinyrainbow@3.2.0 | development | MIT + Lockfile path: node_modules/tinyrainbow + Package: https://www.npmjs.com/package/tinyrainbow/v/3.2.0 + Archive: https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.2.0.tgz + Integrity: sha512-LgO3D9yZJjApUiuUfl9iFAwrtaX4+lok3wJIqttGoKCHlWUqHqbQpnxCf82L8FjgKsh4iGo78hqJwgL8F6To2A== +to-buffer@1.2.2 | runtime | MIT + Lockfile path: node_modules/to-buffer + Package: https://www.npmjs.com/package/to-buffer/v/1.2.2 + Archive: https://registry.npmjs.org/to-buffer/-/to-buffer-1.2.2.tgz + Integrity: sha512-db0E3UJjcFhpDhAF4tLo03oli3pwl3dbnzXOUIlRKrp+ldk/VUxzpWYZENsw2SZiuBjHAk7DfB0VU7NKdpb6sw== +tokenx@1.3.0 | runtime | MIT + Lockfile path: node_modules/tokenx + Package: https://www.npmjs.com/package/tokenx/v/1.3.0 + Archive: https://registry.npmjs.org/tokenx/-/tokenx-1.3.0.tgz + Integrity: sha512-NLdXTEZkKiO0gZuLtMoZKjCXTREXeZZt8nnnNeyoXtNZAfG/GKGSbQtLU5STspc0rMSwcA+UJfWZkbNU01iKmQ== +trim-lines@3.0.1 | development | MIT + Lockfile path: node_modules/trim-lines + Package: https://www.npmjs.com/package/trim-lines/v/3.0.1 + Archive: https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz + Integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg== +tslib@2.8.1 | development, optional | 0BSD + Lockfile path: node_modules/tslib + Package: https://www.npmjs.com/package/tslib/v/2.8.1 + Archive: https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz + Integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== +tunnel-agent@0.6.0 | runtime, optional | Apache-2.0 + Lockfile path: node_modules/tunnel-agent + Package: https://www.npmjs.com/package/tunnel-agent/v/0.6.0 + Archive: https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz + Integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w== +turbo@2.11.7 | development | MIT + Lockfile path: node_modules/turbo + Package: https://www.npmjs.com/package/turbo/v/2.11.7 + Archive: https://registry.npmjs.org/turbo/-/turbo-2.11.7.tgz + Integrity: sha512-RhXHbqfvY6o3xt/zSHCwSNwLrZlXiqHzewi4eAj9PtZ1T1CqgMJ2yIDb7SKPTG9IikTm925mfzL6hldQVdyNWw== +typed-array-buffer@1.0.3 | runtime | MIT + Lockfile path: node_modules/typed-array-buffer + Package: https://www.npmjs.com/package/typed-array-buffer/v/1.0.3 + Archive: https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz + Integrity: sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw== +typescript@7.0.2 | development | Apache-2.0 + Lockfile path: node_modules/typescript + Package: https://www.npmjs.com/package/typescript/v/7.0.2 + Archive: https://registry.npmjs.org/typescript/-/typescript-7.0.2.tgz + Integrity: sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA== +typescript@5.9.3 | development | Apache-2.0 + Lockfile path: node_modules/typescript-termux + Package: https://www.npmjs.com/package/typescript/v/5.9.3 + Archive: https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz + Integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw== +unbash@4.0.12 | development | ISC + Lockfile path: node_modules/unbash + Package: https://www.npmjs.com/package/unbash/v/4.0.12 + Archive: https://registry.npmjs.org/unbash/-/unbash-4.0.12.tgz + Integrity: sha512-PnKvRX+Fbxl/usVlTr/31tXIOVAH+8OdC9qaxUQcvurwEnoc3Vk/ipi2Ce8IjMxzK9byfSGdsUBjqqJGc1o5lw== +undici-types@8.9.0 | development | MIT + Lockfile path: node_modules/undici-types + Package: https://www.npmjs.com/package/undici-types/v/8.9.0 + Archive: https://registry.npmjs.org/undici-types/-/undici-types-8.9.0.tgz + Integrity: sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg== +unist-util-is@6.0.1 | development | MIT + Lockfile path: node_modules/unist-util-is + Package: https://www.npmjs.com/package/unist-util-is/v/6.0.1 + Archive: https://registry.npmjs.org/unist-util-is/-/unist-util-is-6.0.1.tgz + Integrity: sha512-LsiILbtBETkDz8I9p1dQ0uyRUWuaQzd/cuEeS1hoRSyW5E5XGmTzlwY1OrNzzakGowI9Dr/I8HVaw4hTtnxy8g== +unist-util-position@5.0.0 | development | MIT + Lockfile path: node_modules/unist-util-position + Package: https://www.npmjs.com/package/unist-util-position/v/5.0.0 + Archive: https://registry.npmjs.org/unist-util-position/-/unist-util-position-5.0.0.tgz + Integrity: sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA== +unist-util-stringify-position@4.0.0 | development | MIT + Lockfile path: node_modules/unist-util-stringify-position + Package: https://www.npmjs.com/package/unist-util-stringify-position/v/4.0.0 + Archive: https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz + Integrity: sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ== +unist-util-visit@5.1.0 | development | MIT + Lockfile path: node_modules/unist-util-visit + Package: https://www.npmjs.com/package/unist-util-visit/v/5.1.0 + Archive: https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.1.0.tgz + Integrity: sha512-m+vIdyeCOpdr/QeQCu2EzxX/ohgS8KbnPDgFni4dQsfSCtpz8UqDyY5GjRru8PDKuYn7Fq19j1CQ+nJSsGKOzg== +unist-util-visit-parents@6.0.2 | development | MIT + Lockfile path: node_modules/unist-util-visit-parents + Package: https://www.npmjs.com/package/unist-util-visit-parents/v/6.0.2 + Archive: https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-6.0.2.tgz + Integrity: sha512-goh1s1TBrqSqukSc8wrjwWhL0hiJxgA8m4kFxGlQ+8FYQ3C/m11FcTs4YYem7V664AhHVvgoQLk890Ssdsr2IQ== +util-deprecate@1.0.2 | runtime, optional | MIT + Lockfile path: node_modules/util-deprecate + Package: https://www.npmjs.com/package/util-deprecate/v/1.0.2 + Archive: https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz + Integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== +vfile@6.0.3 | development | MIT + Lockfile path: node_modules/vfile + Package: https://www.npmjs.com/package/vfile/v/6.0.3 + Archive: https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz + Integrity: sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q== +vfile-message@4.0.3 | development | MIT + Lockfile path: node_modules/vfile-message + Package: https://www.npmjs.com/package/vfile-message/v/4.0.3 + Archive: https://registry.npmjs.org/vfile-message/-/vfile-message-4.0.3.tgz + Integrity: sha512-QTHzsGd1EhbZs4AsQ20JX1rC3cOlt/IWJruk893DfLRr57lcnOeMaWG4K0JrRta4mIJZKth2Au3mM3u03/JWKw== +vite@8.3.2 | development | MIT + Lockfile path: node_modules/vite + Package: https://www.npmjs.com/package/vite/v/8.3.2 + Archive: https://registry.npmjs.org/vite/-/vite-8.3.2.tgz + Integrity: sha512-SQr1x6W5vVSbROg7vsyXIaxK9b0G7zsT68acdWWRmnBUsgDieLCRG+Rep9WdZgcposvv/GSnr4GUUBqB3vXq6w== +vitepress@1.6.4 | development | MIT + Lockfile path: node_modules/vitepress + Package: https://www.npmjs.com/package/vitepress/v/1.6.4 + Archive: https://registry.npmjs.org/vitepress/-/vitepress-1.6.4.tgz + Integrity: sha512-+2ym1/+0VVrbhNyRoFFesVvBvHAVMZMK0rw60E3X/5349M1GuVdKeazuksqopEdvkKwKGs21Q729jX81/bkBJg== +@esbuild/aix-ppc64@0.25.12 | development, optional | MIT + Lockfile path: node_modules/vitepress/node_modules/@esbuild/aix-ppc64 + Package: https://www.npmjs.com/package/@esbuild/aix-ppc64/v/0.25.12 + Archive: https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz + Integrity: sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA== +@esbuild/android-arm@0.25.12 | development, optional | MIT + Lockfile path: node_modules/vitepress/node_modules/@esbuild/android-arm + Package: https://www.npmjs.com/package/@esbuild/android-arm/v/0.25.12 + Archive: https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.12.tgz + Integrity: sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg== +@esbuild/android-arm64@0.25.12 | development, optional | MIT + Lockfile path: node_modules/vitepress/node_modules/@esbuild/android-arm64 + Package: https://www.npmjs.com/package/@esbuild/android-arm64/v/0.25.12 + Archive: https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.12.tgz + Integrity: sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg== +@esbuild/android-x64@0.25.12 | development, optional | MIT + Lockfile path: node_modules/vitepress/node_modules/@esbuild/android-x64 + Package: https://www.npmjs.com/package/@esbuild/android-x64/v/0.25.12 + Archive: https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.12.tgz + Integrity: sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg== +@esbuild/darwin-arm64@0.25.12 | development, optional | MIT + Lockfile path: node_modules/vitepress/node_modules/@esbuild/darwin-arm64 + Package: https://www.npmjs.com/package/@esbuild/darwin-arm64/v/0.25.12 + Archive: https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.12.tgz + Integrity: sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg== +@esbuild/darwin-x64@0.25.12 | development, optional | MIT + Lockfile path: node_modules/vitepress/node_modules/@esbuild/darwin-x64 + Package: https://www.npmjs.com/package/@esbuild/darwin-x64/v/0.25.12 + Archive: https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.12.tgz + Integrity: sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA== +@esbuild/freebsd-arm64@0.25.12 | development, optional | MIT + Lockfile path: node_modules/vitepress/node_modules/@esbuild/freebsd-arm64 + Package: https://www.npmjs.com/package/@esbuild/freebsd-arm64/v/0.25.12 + Archive: https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.12.tgz + Integrity: sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg== +@esbuild/freebsd-x64@0.25.12 | development, optional | MIT + Lockfile path: node_modules/vitepress/node_modules/@esbuild/freebsd-x64 + Package: https://www.npmjs.com/package/@esbuild/freebsd-x64/v/0.25.12 + Archive: https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.12.tgz + Integrity: sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ== +@esbuild/linux-arm@0.25.12 | development, optional | MIT + Lockfile path: node_modules/vitepress/node_modules/@esbuild/linux-arm + Package: https://www.npmjs.com/package/@esbuild/linux-arm/v/0.25.12 + Archive: https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.12.tgz + Integrity: sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw== +@esbuild/linux-arm64@0.25.12 | development, optional | MIT + Lockfile path: node_modules/vitepress/node_modules/@esbuild/linux-arm64 + Package: https://www.npmjs.com/package/@esbuild/linux-arm64/v/0.25.12 + Archive: https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.12.tgz + Integrity: sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ== +@esbuild/linux-ia32@0.25.12 | development, optional | MIT + Lockfile path: node_modules/vitepress/node_modules/@esbuild/linux-ia32 + Package: https://www.npmjs.com/package/@esbuild/linux-ia32/v/0.25.12 + Archive: https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.12.tgz + Integrity: sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA== +@esbuild/linux-loong64@0.25.12 | development, optional | MIT + Lockfile path: node_modules/vitepress/node_modules/@esbuild/linux-loong64 + Package: https://www.npmjs.com/package/@esbuild/linux-loong64/v/0.25.12 + Archive: https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.12.tgz + Integrity: sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng== +@esbuild/linux-mips64el@0.25.12 | development, optional | MIT + Lockfile path: node_modules/vitepress/node_modules/@esbuild/linux-mips64el + Package: https://www.npmjs.com/package/@esbuild/linux-mips64el/v/0.25.12 + Archive: https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.12.tgz + Integrity: sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw== +@esbuild/linux-ppc64@0.25.12 | development, optional | MIT + Lockfile path: node_modules/vitepress/node_modules/@esbuild/linux-ppc64 + Package: https://www.npmjs.com/package/@esbuild/linux-ppc64/v/0.25.12 + Archive: https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.12.tgz + Integrity: sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA== +@esbuild/linux-riscv64@0.25.12 | development, optional | MIT + Lockfile path: node_modules/vitepress/node_modules/@esbuild/linux-riscv64 + Package: https://www.npmjs.com/package/@esbuild/linux-riscv64/v/0.25.12 + Archive: https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.12.tgz + Integrity: sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w== +@esbuild/linux-s390x@0.25.12 | development, optional | MIT + Lockfile path: node_modules/vitepress/node_modules/@esbuild/linux-s390x + Package: https://www.npmjs.com/package/@esbuild/linux-s390x/v/0.25.12 + Archive: https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.12.tgz + Integrity: sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg== +@esbuild/linux-x64@0.25.12 | development, optional | MIT + Lockfile path: node_modules/vitepress/node_modules/@esbuild/linux-x64 + Package: https://www.npmjs.com/package/@esbuild/linux-x64/v/0.25.12 + Archive: https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.12.tgz + Integrity: sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw== +@esbuild/netbsd-arm64@0.25.12 | development, optional | MIT + Lockfile path: node_modules/vitepress/node_modules/@esbuild/netbsd-arm64 + Package: https://www.npmjs.com/package/@esbuild/netbsd-arm64/v/0.25.12 + Archive: https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.12.tgz + Integrity: sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg== +@esbuild/netbsd-x64@0.25.12 | development, optional | MIT + Lockfile path: node_modules/vitepress/node_modules/@esbuild/netbsd-x64 + Package: https://www.npmjs.com/package/@esbuild/netbsd-x64/v/0.25.12 + Archive: https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.12.tgz + Integrity: sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ== +@esbuild/openbsd-arm64@0.25.12 | development, optional | MIT + Lockfile path: node_modules/vitepress/node_modules/@esbuild/openbsd-arm64 + Package: https://www.npmjs.com/package/@esbuild/openbsd-arm64/v/0.25.12 + Archive: https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.12.tgz + Integrity: sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A== +@esbuild/openbsd-x64@0.25.12 | development, optional | MIT + Lockfile path: node_modules/vitepress/node_modules/@esbuild/openbsd-x64 + Package: https://www.npmjs.com/package/@esbuild/openbsd-x64/v/0.25.12 + Archive: https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.12.tgz + Integrity: sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw== +@esbuild/openharmony-arm64@0.25.12 | development, optional | MIT + Lockfile path: node_modules/vitepress/node_modules/@esbuild/openharmony-arm64 + Package: https://www.npmjs.com/package/@esbuild/openharmony-arm64/v/0.25.12 + Archive: https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.12.tgz + Integrity: sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg== +@esbuild/sunos-x64@0.25.12 | development, optional | MIT + Lockfile path: node_modules/vitepress/node_modules/@esbuild/sunos-x64 + Package: https://www.npmjs.com/package/@esbuild/sunos-x64/v/0.25.12 + Archive: https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.12.tgz + Integrity: sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w== +@esbuild/win32-arm64@0.25.12 | development, optional | MIT + Lockfile path: node_modules/vitepress/node_modules/@esbuild/win32-arm64 + Package: https://www.npmjs.com/package/@esbuild/win32-arm64/v/0.25.12 + Archive: https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.12.tgz + Integrity: sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg== +@esbuild/win32-ia32@0.25.12 | development, optional | MIT + Lockfile path: node_modules/vitepress/node_modules/@esbuild/win32-ia32 + Package: https://www.npmjs.com/package/@esbuild/win32-ia32/v/0.25.12 + Archive: https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.12.tgz + Integrity: sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ== +@esbuild/win32-x64@0.25.12 | development, optional | MIT + Lockfile path: node_modules/vitepress/node_modules/@esbuild/win32-x64 + Package: https://www.npmjs.com/package/@esbuild/win32-x64/v/0.25.12 + Archive: https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.12.tgz + Integrity: sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA== +@vitejs/plugin-vue@5.2.4 | development | MIT + Lockfile path: node_modules/vitepress/node_modules/@vitejs/plugin-vue + Package: https://www.npmjs.com/package/@vitejs/plugin-vue/v/5.2.4 + Archive: https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.2.4.tgz + Integrity: sha512-7Yx/SXSOcQq5HiiV3orevHUFn+pmMB4cgbEkDYgnkUWb0WfeQ/wa2yFv6D5ICiCQOVpjA7vYDXrC7AGO8yjDHA== +esbuild@0.25.12 | development | MIT + Lockfile path: node_modules/vitepress/node_modules/esbuild + Package: https://www.npmjs.com/package/esbuild/v/0.25.12 + Archive: https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz + Integrity: sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg== +vite@6.4.4 | development | MIT + Lockfile path: node_modules/vitepress/node_modules/vite + Package: https://www.npmjs.com/package/vite/v/6.4.4 + Archive: https://registry.npmjs.org/vite/-/vite-6.4.4.tgz + Integrity: sha512-xGjU/SyjeNyb0E4KxXBvYz/1C+3JXuujvf2hXNOtnlcE+58o5ajd9N2/n2VhkiJvpCP2qQasnUpx5PXNeI+p1Q== +vitest@5.0.3 | development | MIT + Lockfile path: node_modules/vitest + Package: https://www.npmjs.com/package/vitest/v/5.0.3 + Archive: https://registry.npmjs.org/vitest/-/vitest-5.0.3.tgz + Integrity: sha512-xMw97S3rjdtj5dkVat7jCsqWBpvchs3RlpQctUqwJD0KkERk40vz2fJ77lDwW/Vzh/pk18eItYAzkodhSes3jQ== +vue@3.5.43 | development | MIT + Lockfile path: node_modules/vue + Package: https://www.npmjs.com/package/vue/v/3.5.43 + Archive: https://registry.npmjs.org/vue/-/vue-3.5.43.tgz + Integrity: sha512-o5qZoksdnjIKvW1srZ3ab7pcDNYAerBjRe54D0LBLfRdCYFrSgBHVXokMas35czQc0//lmx4/tuY4ZNQ+Rf2Ng== +walk-up-path@4.0.0 | development | ISC + Lockfile path: node_modules/walk-up-path + Package: https://www.npmjs.com/package/walk-up-path/v/4.0.0 + Archive: https://registry.npmjs.org/walk-up-path/-/walk-up-path-4.0.0.tgz + Integrity: sha512-3hu+tD8YzSLGuFYtPRb48vdhKMi0KQV5sn+uWr8+7dMEq/2G/dtLrdDinkLjqq5TIbIBjYJ4Ax/n3YiaW7QM8A== +which@2.0.2 | runtime | ISC + Lockfile path: node_modules/which + Package: https://www.npmjs.com/package/which/v/2.0.2 + Archive: https://registry.npmjs.org/which/-/which-2.0.2.tgz + Integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== +which-typed-array@1.1.22 | runtime | MIT + Lockfile path: node_modules/which-typed-array + Package: https://www.npmjs.com/package/which-typed-array/v/1.1.22 + Archive: https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.22.tgz + Integrity: sha512-fvO4ExWMFsqyhG3AiPAObMuY1lxaqgYcxbc49CNdWDDECOJNgQyvsOWVwbZc+qf3rzRtxojBK+CMEv0Ld5CYpw== +why-is-node-running@3.2.1 | development | MIT + Lockfile path: node_modules/why-is-node-running + Package: https://www.npmjs.com/package/why-is-node-running/v/3.2.1 + Archive: https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-3.2.1.tgz + Integrity: sha512-Tb2FUhB4vUsGQlfSquQLYkApkuPAFQXGFzxWKHHumVz2dK+X1RUm/HnID4+TfIGYJ1kTcwOaCk/buYCEJr6YjQ== +wrap-ansi@9.0.2 | development | MIT + Lockfile path: node_modules/wrap-ansi + Package: https://www.npmjs.com/package/wrap-ansi/v/9.0.2 + Archive: https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz + Integrity: sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww== +string-width@7.2.0 | development | MIT + Lockfile path: node_modules/wrap-ansi/node_modules/string-width + Package: https://www.npmjs.com/package/string-width/v/7.2.0 + Archive: https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz + Integrity: sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ== +wrappy@1.0.2 | runtime | ISC + Lockfile path: node_modules/wrappy + Package: https://www.npmjs.com/package/wrappy/v/1.0.2 + Archive: https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz + Integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== +write-file-atomic@7.0.0 | runtime | ISC + Lockfile path: node_modules/write-file-atomic + Package: https://www.npmjs.com/package/write-file-atomic/v/7.0.0 + Archive: https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-7.0.0.tgz + Integrity: sha512-YnlPC6JqnZl6aO4uRc+dx5PHguiR9S6WeoLtpxNT9wIG+BDya7ZNE1q7KOjVgaA73hKhKLpVPgJ5QA9THQ5BRg== +ws@8.21.0 | runtime | MIT + Lockfile path: node_modules/ws + Package: https://www.npmjs.com/package/ws/v/8.21.0 + Archive: https://registry.npmjs.org/ws/-/ws-8.21.0.tgz + Integrity: sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g== +xmlbuilder@15.1.1 | runtime | MIT + Lockfile path: node_modules/xmlbuilder + Package: https://www.npmjs.com/package/xmlbuilder/v/15.1.1 + Archive: https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz + Integrity: sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg== +yaml@2.9.0 | runtime | ISC + Lockfile path: node_modules/yaml + Package: https://www.npmjs.com/package/yaml/v/2.9.0 + Archive: https://registry.npmjs.org/yaml/-/yaml-2.9.0.tgz + Integrity: sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA== +zod@4.4.3 | runtime | MIT + Lockfile path: node_modules/zod + Package: https://www.npmjs.com/package/zod/v/4.4.3 + Archive: https://registry.npmjs.org/zod/-/zod-4.4.3.tgz + Integrity: sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ== +zwitch@2.0.4 | development | MIT + Lockfile path: node_modules/zwitch + Package: https://www.npmjs.com/package/zwitch/v/2.0.4 + Archive: https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz + Integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A== diff --git a/licenses/npm-runtime-notices.txt b/licenses/npm-runtime-notices.txt new file mode 100644 index 000000000..d981aa68a --- /dev/null +++ b/licenses/npm-runtime-notices.txt @@ -0,0 +1,8219 @@ +REA third-party npm runtime copyright, license and NOTICE texts +Collected from integrity-verified locked npm archives. Release-specific supplements and upstream notice gaps are identified in their entries. +External engines are separately obtained; see THIRD_PARTY_NOTICES.md. +Runtime dependency fingerprint (SHA-256): 5de9cf97e7c327da1892efeff30b40507e4c7f8e496b5d305b8016c162bc15e3 + +===== @babel/helper-string-parser@8.0.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-8.0.0.tgz +Integrity: sha512-6mJgmFFFIIO82vvoLt9XtRC7/TkzXfts1t/SpRX4IHSzMgqoPYCWesVu1udUPUWioAE/2fcG6WuI8zrkE1gwrg== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) 2014-present Sebastian McKenzie and other contributors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +===== @babel/helper-validator-identifier@8.0.4 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-8.0.4.tgz +Integrity: sha512-4wFaiLd0bVo4cIoTXI3zKI038NIWE/cr3jvBjejOVYVxV/m8Ltav1USiGzG1fmS5J2RhgEOgXNNK46cRPnRsrg== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) 2014-present Sebastian McKenzie and other contributors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +===== @babel/parser@8.0.4 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/@babel/parser/-/parser-8.0.4.tgz +Integrity: sha512-srpptsAkEbbNIC/q8nT7o+m6CQe8CJUTV/t7MYc9NnWlgYVtHOb7JH6SorxMhN0kuRJjVqXbKClG6xSbPtzz+g== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +Copyright (C) 2012-2014 by various contributors (see AUTHORS) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +===== @babel/types@8.0.4 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/@babel/types/-/types-8.0.4.tgz +Integrity: sha512-eY+Yn3dCqTGmyiq2QRU66lA5FL8lqqqvecHt0fF3uHONIa7ToYsaCiWV8lOKqAs0Rb2SjixiKFROngnulPtt2g== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) 2014-present Sebastian McKenzie and other contributors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +===== @cfworker/json-schema@4.1.1 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/@cfworker/json-schema/-/json-schema-4.1.1.tgz +Integrity: sha512-gAmrUZSGtKc3AiBL71iNWxDsyUC5uMaKKGdvzYsBoTW/xi42JQHl7eKV2OYzCUqvc+D2RCcf7EXY2iCyFIk6og== +Scope: npm runtime dependency, including optional platform packages. + +--- licenses/cfworker-MIT.txt (license from the npm release's upstream gitHead; see upstream-sources.json) --- + +MIT License + +Copyright (c) 2020 Jeremy Danyow + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== @clack/core@1.4.3 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/@clack/core/-/core-1.4.3.tgz +Integrity: sha512-/kr3UWNtdJfxZtPgDqUOmG2pvwlmcLGheex5yiZKdwbzZJxhV+HMNR9QNmyY5cGwTNV6LrR7Jtp+KjhUAP1qBQ== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +MIT License Copyright (c) 2025-Present [Bombshell contributors](https://bomb.sh/team) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +===== @clack/prompts@1.7.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/@clack/prompts/-/prompts-1.7.0.tgz +Integrity: sha512-y7/yvZ2TPAnR9+jnc00klvNNLkJiXFFrQA/hlLCcxA9a2A4zQIOimyFQ9XfwYKiGD1fb5GY8vbKIIgO8d5Tb2A== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +MIT License Copyright (c) 2025-Present [Bombshell contributors](https://bomb.sh/team) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +===== @electron/asar@4.2.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/@electron/asar/-/asar-4.2.0.tgz +Integrity: sha512-npW1NW5yy8EB9XY/vEw9sUdgmq0sJEhmSBb6bqyFOAw1CSkrhvAvO6QWlW8CdIMo8VN1lkdF345l/MeW0LrY0Q== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE.md --- + +Copyright (c) 2014 GitHub Inc. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +===== commander@13.1.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/commander/-/commander-13.1.0.tgz +Integrity: sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +(The MIT License) + +Copyright (c) 2011 TJ Holowaychuk + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +===== @jridgewell/resolve-uri@3.1.2 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz +Integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +Copyright 2019 Justin Ridgewell + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +===== @jridgewell/sourcemap-codec@1.6.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz +Integrity: sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +Copyright 2024 Justin Ridgewell + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== @jridgewell/trace-mapping@0.3.31 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz +Integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +Copyright 2024 Justin Ridgewell + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== @lydell/node-pty@1.1.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/@lydell/node-pty/-/node-pty-1.1.0.tgz +Integrity: sha512-VDD8LtlMTOrPKWMXUAcB9+LTktzuunqrMwkYR1DMRBkS6LQrCt+0/Ws1o2rMml/n3guePpS7cxhHF7Nm5K4iMw== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +Copyright (c) 2012-2015, Christopher Jeffrey (https://github.com/chjj/) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + + +The MIT License (MIT) + +Copyright (c) 2016, Daniel Imms (http://www.growingwiththeweb.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + + +MIT License + +Copyright (c) 2018 - present Microsoft Corporation + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== @lydell/node-pty-darwin-arm64@1.1.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/@lydell/node-pty-darwin-arm64/-/node-pty-darwin-arm64-1.1.0.tgz +Integrity: sha512-7kFD+owAA61qmhJCtoMbqj3Uvff3YHDiU+4on5F2vQdcMI3MuwGi7dM6MkFG/yuzpw8LF2xULpL71tOPUfxs0w== +Scope: npm runtime dependency, including optional platform packages. + +--- @lydell/node-pty@1.1.0: package/LICENSE (same-release prebuilt family) --- + +Copyright (c) 2012-2015, Christopher Jeffrey (https://github.com/chjj/) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + + +The MIT License (MIT) + +Copyright (c) 2016, Daniel Imms (http://www.growingwiththeweb.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + + +MIT License + +Copyright (c) 2018 - present Microsoft Corporation + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== @lydell/node-pty-darwin-x64@1.1.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/@lydell/node-pty-darwin-x64/-/node-pty-darwin-x64-1.1.0.tgz +Integrity: sha512-XZdvqj5FjAMjH8bdp0YfaZjur5DrCIDD1VYiE9EkkYVMDQqRUPHYV3U8BVEQVT9hYfjmpr7dNaELF2KyISWSNA== +Scope: npm runtime dependency, including optional platform packages. + +--- @lydell/node-pty@1.1.0: package/LICENSE (same-release prebuilt family) --- + +Copyright (c) 2012-2015, Christopher Jeffrey (https://github.com/chjj/) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + + +The MIT License (MIT) + +Copyright (c) 2016, Daniel Imms (http://www.growingwiththeweb.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + + +MIT License + +Copyright (c) 2018 - present Microsoft Corporation + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== @lydell/node-pty-linux-arm64@1.1.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/@lydell/node-pty-linux-arm64/-/node-pty-linux-arm64-1.1.0.tgz +Integrity: sha512-yyDBmalCfHpLiQMT2zyLcqL2Fay4Xy7rIs8GH4dqKLnEviMvPGOK7LADVkKAsbsyXBSISL3Lt1m1MtxhPH6ckg== +Scope: npm runtime dependency, including optional platform packages. + +--- @lydell/node-pty@1.1.0: package/LICENSE (same-release prebuilt family) --- + +Copyright (c) 2012-2015, Christopher Jeffrey (https://github.com/chjj/) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + + +The MIT License (MIT) + +Copyright (c) 2016, Daniel Imms (http://www.growingwiththeweb.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + + +MIT License + +Copyright (c) 2018 - present Microsoft Corporation + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== @lydell/node-pty-linux-x64@1.1.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/@lydell/node-pty-linux-x64/-/node-pty-linux-x64-1.1.0.tgz +Integrity: sha512-NcNqRTD14QT+vXcEuqSSvmWY+0+WUBn2uRE8EN0zKtDpIEr9d+YiFj16Uqds6QfcLCHfZmC+Ls7YzwTaqDnanA== +Scope: npm runtime dependency, including optional platform packages. + +--- @lydell/node-pty@1.1.0: package/LICENSE (same-release prebuilt family) --- + +Copyright (c) 2012-2015, Christopher Jeffrey (https://github.com/chjj/) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + + +The MIT License (MIT) + +Copyright (c) 2016, Daniel Imms (http://www.growingwiththeweb.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + + +MIT License + +Copyright (c) 2018 - present Microsoft Corporation + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== @lydell/node-pty-win32-arm64@1.1.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/@lydell/node-pty-win32-arm64/-/node-pty-win32-arm64-1.1.0.tgz +Integrity: sha512-JOMbCou+0fA7d/m97faIIfIU0jOv8sn2OR7tI45u3AmldKoKoLP8zHY6SAvDDnI3fccO1R2HeR1doVjpS7HM0w== +Scope: npm runtime dependency, including optional platform packages. + +--- @lydell/node-pty@1.1.0: package/LICENSE (same-release prebuilt family) --- + +Copyright (c) 2012-2015, Christopher Jeffrey (https://github.com/chjj/) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + + +The MIT License (MIT) + +Copyright (c) 2016, Daniel Imms (http://www.growingwiththeweb.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + + +MIT License + +Copyright (c) 2018 - present Microsoft Corporation + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== @lydell/node-pty-win32-x64@1.1.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/@lydell/node-pty-win32-x64/-/node-pty-win32-x64-1.1.0.tgz +Integrity: sha512-3N56BZ+WDFnUMYRtsrr7Ky2mhWGl9xXcyqR6cexfuCqcz9RNWL+KoXRv/nZylY5dYaXkft4JaR1uVu+roiZDAw== +Scope: npm runtime dependency, including optional platform packages. + +--- @lydell/node-pty@1.1.0: package/LICENSE (same-release prebuilt family) --- + +Copyright (c) 2012-2015, Christopher Jeffrey (https://github.com/chjj/) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + + +The MIT License (MIT) + +Copyright (c) 2016, Daniel Imms (http://www.growingwiththeweb.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + + +MIT License + +Copyright (c) 2018 - present Microsoft Corporation + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== @modelcontextprotocol/client@2.3.1 ===== +Declared license: Apache-2.0 +Archive: https://registry.npmjs.org/@modelcontextprotocol/client/-/client-2.3.1.tgz +Integrity: sha512-mIGZXpHsjnZ6lD+gD/WCMpR5k8yVQQ8nNFH1N0Srf7AvnwTUMYD6pvTY8ng2+He5FfV7YMZLmrjL7cLa/cc3dQ== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +The MCP project is undergoing a licensing transition from the MIT License to the Apache License, Version 2.0 ("Apache-2.0"). All new code and specification contributions to the project are licensed under Apache-2.0. Documentation contributions (excluding specifications) are licensed under CC-BY-4.0. + +Contributions for which relicensing consent has been obtained are licensed under Apache-2.0. Contributions made by authors who originally licensed their work under the MIT License and who have not yet granted explicit permission to relicense remain licensed under the MIT License. + +No rights beyond those granted by the applicable original license are conveyed for such contributions. + +--- + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to the Licensor for inclusion in the Work by the copyright + owner or by an individual or Legal Entity authorized to submit on behalf + of the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + +--- + +MIT License + +Copyright (c) 2024-2025 Model Context Protocol a Series of LF Projects, LLC. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Creative Commons Attribution 4.0 International (CC-BY-4.0) + +Documentation in this project (excluding specifications) is licensed under +CC-BY-4.0. See https://creativecommons.org/licenses/by/4.0/legalcode for +the full license text. + + +===== @modelcontextprotocol/core@2.3.1 ===== +Declared license: Apache-2.0 +Archive: https://registry.npmjs.org/@modelcontextprotocol/core/-/core-2.3.1.tgz +Integrity: sha512-laVmIhPGpWi7rG9q+0UigblRN0Hws/Yjlb6qLFtVqryXVLkc4h+yN8z731POD2LnAGQlFe7/tXhUm7Bi0YB91g== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +The MCP project is undergoing a licensing transition from the MIT License to the Apache License, Version 2.0 ("Apache-2.0"). All new code and specification contributions to the project are licensed under Apache-2.0. Documentation contributions (excluding specifications) are licensed under CC-BY-4.0. + +Contributions for which relicensing consent has been obtained are licensed under Apache-2.0. Contributions made by authors who originally licensed their work under the MIT License and who have not yet granted explicit permission to relicense remain licensed under the MIT License. + +No rights beyond those granted by the applicable original license are conveyed for such contributions. + +--- + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to the Licensor for inclusion in the Work by the copyright + owner or by an individual or Legal Entity authorized to submit on behalf + of the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + +--- + +MIT License + +Copyright (c) 2024-2025 Model Context Protocol a Series of LF Projects, LLC. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Creative Commons Attribution 4.0 International (CC-BY-4.0) + +Documentation in this project (excluding specifications) is licensed under +CC-BY-4.0. See https://creativecommons.org/licenses/by/4.0/legalcode for +the full license text. + + +===== @modelcontextprotocol/server@2.3.1 ===== +Declared license: Apache-2.0 +Archive: https://registry.npmjs.org/@modelcontextprotocol/server/-/server-2.3.1.tgz +Integrity: sha512-e59MfWuSssj6DoQ96JCTqdW1AXT5/XtnTl0WWd6MU1Ka434fFUGGosCLJbGNySDhHGvxQWoRWK137FXYFkYNWw== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +The MCP project is undergoing a licensing transition from the MIT License to the Apache License, Version 2.0 ("Apache-2.0"). All new code and specification contributions to the project are licensed under Apache-2.0. Documentation contributions (excluding specifications) are licensed under CC-BY-4.0. + +Contributions for which relicensing consent has been obtained are licensed under Apache-2.0. Contributions made by authors who originally licensed their work under the MIT License and who have not yet granted explicit permission to relicense remain licensed under the MIT License. + +No rights beyond those granted by the applicable original license are conveyed for such contributions. + +--- + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to the Licensor for inclusion in the Work by the copyright + owner or by an individual or Legal Entity authorized to submit on behalf + of the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + +--- + +MIT License + +Copyright (c) 2024-2025 Model Context Protocol a Series of LF Projects, LLC. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Creative Commons Attribution 4.0 International (CC-BY-4.0) + +Documentation in this project (excluding specifications) is licensed under +CC-BY-4.0. See https://creativecommons.org/licenses/by/4.0/legalcode for +the full license text. + + +===== @pinojs/redact@0.4.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/@pinojs/redact/-/redact-0.4.0.tgz +Integrity: sha512-k2ENnmBugE/rzQfEcdWHcCY+/FM3VLzH9cYEsbdsoqrvzAKRhUZeRNhAZvB8OitQJ1TBed3yqWtdjzS6wJKBwg== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) 2025 pinojs contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== @scalar/openapi-types@0.8.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/@scalar/openapi-types/-/openapi-types-0.8.0.tgz +Integrity: sha512-WmaxVSfvY5K/TwcG2B2TU1WOe1As1uc2s7myswtP6dBlcjU3hM08SApxv/jmyGaCE8t4gO5BBhmHY4pDUfmr2g== +Scope: npm runtime dependency, including optional platform packages. + +--- package/2.0/license.d.ts --- + +import type { Extensions } from './schema' +/** + * License object + * + * License information for the exposed API. + * + * @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#license-object} + */ +export type LicenseObject = { + /** **Required.** The license name used for the API. */ + name: string + /** A URL to the license used for the API. MUST be in the format of a URL. */ + url?: string +} & Extensions + + +--- package/3.0/license.d.ts --- + +/** + * License object + * + * License information for the exposed API. + * + * @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#license-object} + */ +export type LicenseObject = { + /** **REQUIRED**. The license name used for the API. */ + name: string + /** A URL for the license used for the API. This MUST be in the form of a URL. */ + url?: string +} & Record<`x-${string}`, unknown> + + +--- package/3.1/license.d.ts --- + +/** + * License object + * + * License information for the exposed API. + * + * @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#license-object} + */ +export type LicenseObject = { + /** **REQUIRED**. The license name used for the API. */ + name: string + /** An [SPDX](https://spdx.org/licenses/) license expression for the API. The `identifier` field is mutually exclusive of the `url` field. */ + identifier?: string + /** A URI for the license used for the API. This MUST be in the form of a URI. The `url` field is mutually exclusive of the `identifier` field. */ + url?: string +} & Record<`x-${string}`, unknown> + + +--- package/3.2/license.d.ts --- + +/** + * License object + * + * License information for the exposed API. + * + * @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.2.0.md#license-object} + */ +export type LicenseObject = { + /** **REQUIRED**. The license name used for the API. */ + name: string + /** An [SPDX](https://spdx.org/licenses/) license expression for the API. The `identifier` field is mutually exclusive of the `url` field. */ + identifier?: string + /** A URI for the license used for the API. This MUST be in the form of a URI. The `url` field is mutually exclusive of the `identifier` field. */ + url?: string +} & Record<`x-${string}`, unknown> + + +===== @toon-format/toon@2.3.1 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/@toon-format/toon/-/toon-2.3.1.tgz +Integrity: sha512-sWqEMeAJGMda9qRrfPKrX3C4c33CO9SJuvJzzrcBEn5sbDB+k6pSLkDsfN0rVnLQwR97MV3sDgVbcxQNsq8xVw== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) 2025-PRESENT Johann Schopplich + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== @xmldom/xmldom@0.9.12 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.9.12.tgz +Integrity: sha512-5AXjrcMClTryPe9LgZrygpB1lj7s0S9E0+W+AHaVKAVyHanafK86iPSvG5xHVSp/jC+VH1UXu0TAEmY279xH7A== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +Copyright 2019 - present Christopher J. Brody and other contributors, as listed in: https://github.com/xmldom/xmldom/graphs/contributors +Copyright 2012 - 2017 @jindw and other contributors, as listed in: https://github.com/jindw/xmldom/graphs/contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +===== @xterm/addon-serialize@0.14.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/@xterm/addon-serialize/-/addon-serialize-0.14.0.tgz +Integrity: sha512-uteyTU1EkrQa2Ux6P/uFl2fzmXI46jy5uoQMKEOM0fKTyiW7cSn0WrFenHm5vO5uEXX/GpwW/FgILvv3r0WbkA== +Scope: npm runtime dependency, including optional platform packages. + +--- licenses/xterm-MIT.txt (license from the npm release's upstream gitHead; see upstream-sources.json) --- + +Copyright (c) 2017-2019, The xterm.js authors (https://github.com/xtermjs/xterm.js) +Copyright (c) 2014-2016, SourceLair Private Company (https://www.sourcelair.com) +Copyright (c) 2012-2013, Christopher Jeffrey (https://github.com/chjj/) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +===== @xterm/headless@6.0.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/@xterm/headless/-/headless-6.0.0.tgz +Integrity: sha512-5Yj1QINYCyzrZtf8OFIHi47iQtI+0qYFPHmouEfG8dHNxbZ9Tb9YGSuLcsEwj9Z+OL75GJqPyJbyoFer80a2Hw== +Scope: npm runtime dependency, including optional platform packages. + +--- licenses/xterm-MIT.txt (license from the npm release's upstream gitHead; see upstream-sources.json) --- + +Copyright (c) 2017-2019, The xterm.js authors (https://github.com/xtermjs/xterm.js) +Copyright (c) 2014-2016, SourceLair Private Company (https://www.sourcelair.com) +Copyright (c) 2012-2013, Christopher Jeffrey (https://github.com/chjj/) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +===== @zip.js/zip.js@2.15.0 ===== +Declared license: BSD-3-Clause +Archive: https://registry.npmjs.org/@zip.js/zip.js/-/zip.js-2.15.0.tgz +Integrity: sha512-hYAuHAaWjt0axbofaDL5XUlmrQPsBDcK3f45ApZuh6N+8UGVk26GoGdtGDvcvzahsHytTQ6DtBVXwG9IcCMjjQ== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +BSD 3-Clause License + +Copyright (c) 2023, Gildas Lormeau + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +===== abort-controller@3.0.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz +Integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) 2017 Toru Nagashima + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== ajv@8.20.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz +Integrity: sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +The MIT License (MIT) + +Copyright (c) 2015-2021 Evgeny Poberezkin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + + +===== ajv-formats@3.0.1 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz +Integrity: sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) 2020 Evgeny Poberezkin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== async-lock@1.4.1 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/async-lock/-/async-lock-1.4.1.tgz +Integrity: sha512-Az2ZTpuytrtqENulXwO3GGv1Bztugx6TT37NIo7imr/Qo0gsYiGtSdBa2B6fsXhTpVZDNfu1Qn3pk531e3q+nQ== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +The MIT License (MIT) + +Copyright (c) 2016 Rogier Schouten + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + + +===== atomic-sleep@1.0.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/atomic-sleep/-/atomic-sleep-1.0.0.tgz +Integrity: sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +The MIT License (MIT) +Copyright (c) 2020 David Mark Clements + + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE +OR OTHER DEALINGS IN THE SOFTWARE. + + + +===== available-typed-arrays@1.0.7 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz +Integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) 2020 Inspect JS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== balanced-match@4.0.4 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz +Integrity: sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE.md --- + +(MIT) + +Original code Copyright Julian Gruber + +Port to TypeScript Copyright Isaac Z. Schlueter + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== base64-js@1.5.1 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz +Integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +The MIT License (MIT) + +Copyright (c) 2014 Jameson Little + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +===== brace-expansion@5.0.12 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz +Integrity: sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright Julian Gruber + +TypeScript port Copyright Isaac Z. Schlueter + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== buffer@6.0.3 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz +Integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +The MIT License (MIT) + +Copyright (c) Feross Aboukhadijeh, and other contributors. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +===== call-bind@1.0.9 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/call-bind/-/call-bind-1.0.9.tgz +Integrity: sha512-a/hy+pNsFUTR+Iz8TCJvXudKVLAnz/DyeSUo10I5yvFDQJBFU2s9uqQpoSrJlroHUKoKqzg+epxyP9lqFdzfBQ== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) 2020 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== call-bind-apply-helpers@1.0.2 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz +Integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) 2024 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== call-bound@1.0.4 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz +Integrity: sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) 2024 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== canonicalize@3.0.0 ===== +Declared license: Apache-2.0 +Archive: https://registry.npmjs.org/canonicalize/-/canonicalize-3.0.0.tgz +Integrity: sha512-yYLfHyDMIXRyRqsKBRLX023riFLpXY2YOfdtqKXZRZy9qsfOJ9U+4F9YZL7MEzL5+ziN2x2nlBvY/Voi3EBljA== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +===== clean-git-ref@2.0.1 ===== +Declared license: Apache-2.0 +Archive: https://registry.npmjs.org/clean-git-ref/-/clean-git-ref-2.0.1.tgz +Integrity: sha512-bLSptAy2P0s6hU4PzuIMKmMJJSE6gLXGH1cntDu7bWJUksvuM+7ReOK61mozULErYvP6a15rnYl0zFDef+pyPw== +Scope: npm runtime dependency, including optional platform packages. + +--- Published package metadata and standard license text (upstream omits a full license/copyright document) --- + +The published package declares Apache-2.0 but contains no full license/copyright document. No copyright holder or year is inferred. +Author as declared by upstream package metadata: "Eli White " +Declared license: Apache-2.0 + +Standard license text from licenses/Apache-2.0.txt; this is not a recovered upstream copyright notice. + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +===== crc-32@1.2.2 ===== +Declared license: Apache-2.0 +Archive: https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz +Integrity: sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright (C) 2014-present SheetJS LLC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +===== cross-spawn@7.0.6 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz +Integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +The MIT License (MIT) + +Copyright (c) 2018 Made With MOXY Lda + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +===== decompress-response@6.0.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz +Integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ== +Scope: npm runtime dependency, including optional platform packages. + +--- package/license --- + +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +===== define-data-property@1.1.4 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz +Integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) 2023 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== diff@9.0.0 ===== +Declared license: BSD-3-Clause +Archive: https://registry.npmjs.org/diff/-/diff-9.0.0.tgz +Integrity: sha512-svtcdpS8CgJyqAjEQIXdb3OjhFVVYjzGAPO8WGCmRbrml64SPw/jJD4GoE98aR7r25A0XcgrK3F02yw9R/vhQw== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +BSD 3-Clause License + +Copyright (c) 2009-2015, Kevin Decker +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +===== diff3@0.0.3 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/diff3/-/diff3-0.0.3.tgz +Integrity: sha512-iSq8ngPOt0K53A6eVr4d5Kn6GNrM2nQZtC740pzIriHtn4pOQ2lyzEXQMBeVcWERN0ye7fhBsk9PbLLQOnUx/g== +Scope: npm runtime dependency, including optional platform packages. + +--- package/diff3.js: original leading copyright/license comments --- + +// Copyright (c) 2006, 2008 Tony Garnock-Jones +// Copyright (c) 2006, 2008 LShift Ltd. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation files +// (the "Software"), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +// BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + + +--- package/onp.js: original leading copyright/license comment --- + +/* + * URL: https://github.com/cubicdaiya/onp + * + * Copyright (c) 2013 Tatsuhiko Kubo + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +===== dunder-proto@1.0.1 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz +Integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) 2024 ECMAScript Shims + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== es-define-property@1.0.1 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz +Integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) 2024 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== es-errors@1.3.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz +Integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) 2024 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== es-object-atoms@1.1.2 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz +Integrity: sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) 2024 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== event-target-shim@5.0.1 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz +Integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +The MIT License (MIT) + +Copyright (c) 2015 Toru Nagashima + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + + +===== events@3.3.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/events/-/events-3.3.0.tgz +Integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT + +Copyright Joyent, Inc. and other Node contributors. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + + +===== eventsource@3.0.7 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/eventsource/-/eventsource-3.0.7.tgz +Integrity: sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +The MIT License + +Copyright (c) EventSource GitHub organisation + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +===== eventsource-parser@3.1.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.1.0.tgz +Integrity: sha512-kJezFj9YFAMLeORyi7aCLxLbD5/qWMQnoMVlVPyHIll7lgRJCc3JVln9Vgl9nwQi0YkMnhdGTMNn7CkRRAptMg== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) 2026 Espen Hovlandsdal + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== evmole@0.9.3 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/evmole/-/evmole-0.9.3.tgz +Integrity: sha512-UhO5HMAoEPCupSxvBJPlm/L0Qk/KVJ/OJo3r4EyhXADIEHqU5aTkAzsBfzk4lXGjqxVnaYbh1GPSmZtmSHFnQQ== +Scope: npm runtime dependency, including optional platform packages. + +--- third_party/evmole/LICENSE (unchanged upstream 0.9.3 license) --- + +MIT License + +Copyright (c) 2023 Maxim Andreev + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== fast-deep-equal@3.1.3 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz +Integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) 2017 Evgeny Poberezkin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== fast-string-truncated-width@3.0.3 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/fast-string-truncated-width/-/fast-string-truncated-width-3.0.3.tgz +Integrity: sha512-0jjjIEL6+0jag3l2XWWizO64/aZVtpiGE3t0Zgqxv0DPuxiMjvB3M24fCyhZUO4KomJQPj3LTSUnDP3GpdwC0g== +Scope: npm runtime dependency, including optional platform packages. + +--- package/license --- + +The MIT License (MIT) + +Copyright (c) 2024-present Fabio Spampinato + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + + +===== fast-string-width@3.0.2 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/fast-string-width/-/fast-string-width-3.0.2.tgz +Integrity: sha512-gX8LrtNEI5hq8DVUfRQMbr5lpaS4nMIWV+7XEbXk2b8kiQIizgnlr12B4dA3ZEx3308ze0O4Q1R+cHts8kyUJg== +Scope: npm runtime dependency, including optional platform packages. + +--- package/license --- + +The MIT License (MIT) + +Copyright (c) 2024-present Fabio Spampinato + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + + +===== fast-uri@3.1.8 ===== +Declared license: BSD-3-Clause +Archive: https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.8.tgz +Integrity: sha512-GZMtZUTNRpOVIECoXwLNZS5xUGE+mVNbTB8h/7Rwh2TFWcBQiPzTgyZi05BF9UMZKkLJv8XBRJTlU7zg8+ZfMg== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +Copyright (c) 2011-2021, Gary Court until https://github.com/garycourt/uri-js/commit/a1acf730b4bba3f1097c9f52e7d9d3aba8cdcaae +Copyright (c) 2021-present The Fastify team +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * The names of any contributors may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + * * * + +The complete list of contributors can be found at: +- https://github.com/garycourt/uri-js/graphs/contributors + +===== fast-wrap-ansi@0.2.2 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/fast-wrap-ansi/-/fast-wrap-ansi-0.2.2.tgz +Integrity: sha512-7F2Fl+TjRSenLqlU3UjSH0iyqopqoZIu7eZVpEirP2g1GtWa2G/ecEmBdgz31+Mxr+ELclgg6sokpSFIQiZ02Q== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) 2025 James Garbutt + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== for-each@0.3.5 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz +Integrity: sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +The MIT License (MIT) + +Copyright (c) 2012 Raynos. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + + +===== function-bind@1.1.2 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz +Integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +Copyright (c) 2013 Raynos. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + + +===== get-intrinsic@1.3.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz +Integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) 2020 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== get-proto@1.0.1 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz +Integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) 2025 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== glob@13.0.6 ===== +Declared license: BlueOak-1.0.0 +Archive: https://registry.npmjs.org/glob/-/glob-13.0.6.tgz +Integrity: sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE.md --- + +All packages under `src/` are licensed according to the terms in +their respective `LICENSE` or `LICENSE.md` files. + +The remainder of this project is licensed under the Blue Oak +Model License, as follows: + +----- + +# Blue Oak Model License + +Version 1.0.0 + +## Purpose + +This license gives everyone as much permission to work with +this software as possible, while protecting contributors +from liability. + +## Acceptance + +In order to receive this license, you must agree to its +rules. The rules of this license are both obligations +under that agreement and conditions to your license. +You must not do anything with this software that triggers +a rule that you cannot or will not follow. + +## Copyright + +Each contributor licenses you to do everything with this +software that would otherwise infringe that contributor's +copyright in it. + +## Notices + +You must ensure that everyone who gets a copy of +any part of this software from you, with or without +changes, also gets the text of this license or a link to +. + +## Excuse + +If anyone notifies you in writing that you have not +complied with [Notices](#notices), you can keep your +license by taking all practical steps to comply within 30 +days after the notice. If you do not do so, your license +ends immediately. + +## Patent + +Each contributor licenses you to do everything with this +software that would otherwise infringe any patent claims +they can license or become able to license. + +## Reliability + +No contributor can revoke this license. + +## No Liability + +***As far as the law allows, this software comes as is, +without any warranty or condition, and no contributor +will be liable to anyone for any damages related to this +software or this license, under any kind of legal claim.*** + + +===== gopd@1.2.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz +Integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) 2022 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== har-schema@2.0.0 ===== +Declared license: ISC +Archive: https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz +Integrity: sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +Copyright (c) 2015, Ahmad Nassri + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +===== has-property-descriptors@1.0.2 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz +Integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) 2022 Inspect JS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== has-symbols@1.1.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz +Integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) 2016 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== has-tostringtag@1.0.2 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz +Integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) 2021 Inspect JS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== hasown@2.0.4 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz +Integrity: sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) Jordan Harband and contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== ieee754@1.2.1 ===== +Declared license: BSD-3-Clause +Archive: https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz +Integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +Copyright 2008 Fair Oaks Labs, Inc. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +===== ignore@7.0.6 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/ignore/-/ignore-7.0.6.tgz +Integrity: sha512-BAg6QkE8W+TuQLrrw0Ugr7HegXduRuuj8/ti2kSOc+jz1dmx8/WNcjr6XGnq5YpDWxFwwaavqD0+jIUOKelTsw== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE-MIT --- + +Copyright (c) 2013 Kael Zhang , contributors +http://kael.me/ + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +===== imurmurhash@0.1.4 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz +Integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== +Scope: npm runtime dependency, including optional platform packages. + +--- package/README.md: License (MIT) section --- + +License (MIT) +------------- +Copyright (c) 2013 Gary Court, Jens Taylor + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +===== incur@0.6.1 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/incur/-/incur-0.6.1.tgz +Integrity: sha512-QgaPKsKH+/3SLdUTSkCYwMWzL56vO3wn7iheEwKE0jOtWSa9Irzn8KeyhkRIkTzHW0ReiQwo0EtT8bBGR9PpMw== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) 2025-present weth, LLC + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +===== @modelcontextprotocol/server@2.0.0-alpha.4 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/@modelcontextprotocol/server/-/server-2.0.0-alpha.4.tgz +Integrity: sha512-/KEo3ZJ50HlagHp0lz2vPgfBZFtXHu6zTBXT9XqPc+4O9i4+IbBVWKq/a9yAfv/ifp0u3+mRo8SUk5kMKzhN8A== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +The MCP project is undergoing a licensing transition from the MIT License to the Apache License, Version 2.0 ("Apache-2.0"). All new code and specification contributions to the project are licensed under Apache-2.0. Documentation contributions (excluding specifications) are licensed under CC-BY-4.0. + +Contributions for which relicensing consent has been obtained are licensed under Apache-2.0. Contributions made by authors who originally licensed their work under the MIT License and who have not yet granted explicit permission to relicense remain licensed under the MIT License. + +No rights beyond those granted by the applicable original license are conveyed for such contributions. + +--- + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to the Licensor for inclusion in the Work by the copyright + owner or by an individual or Legal Entity authorized to submit on behalf + of the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + +--- + +MIT License + +Copyright (c) 2024-2025 Model Context Protocol a Series of LF Projects, LLC. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Creative Commons Attribution 4.0 International (CC-BY-4.0) + +Documentation in this project (excluding specifications) is licensed under +CC-BY-4.0. See https://creativecommons.org/licenses/by/4.0/legalcode for +the full license text. + + +===== inherits@2.0.4 ===== +Declared license: ISC +Archive: https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz +Integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + + + +===== is-callable@1.2.7 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz +Integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +The MIT License (MIT) + +Copyright (c) 2015 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + + +===== is-typed-array@1.1.15 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz +Integrity: sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +The MIT License (MIT) + +Copyright (c) 2015 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + + +===== isarray@2.0.5 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz +Integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) 2013 Julian Gruber + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== isexe@2.0.0 ===== +Declared license: ISC +Archive: https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz +Integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +===== isomorphic-git@1.38.7 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/isomorphic-git/-/isomorphic-git-1.38.7.tgz +Integrity: sha512-2J2rCV7gTgcpscEDT7PjU5shbsKKI10E4RqBlPDI3LmMXDjSKsN2w1jTIKiay14v87sPDfXjJkgp/Rrxc0zlSg== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE.md --- + +Copyright 2017-2023 the 'isomorphic-git' authors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +--- package/managers/index.umd.min.js.LICENSE.txt --- + +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ + +/*! + * This code for `path.join` is directly copied from @zenfs/core/path for bundle size improvements. + * SPDX-License-Identifier: LGPL-3.0-or-later + * Copyright (c) James Prevett and other ZenFS contributors. + * + * Windows support added: + * - Backslashes are normalised to forward slashes before processing. + * - Drive-letter prefixes (e.g. "C:") are detected and preserved through + * normalisation, so absolute Windows paths are handled correctly. + * - An absolute argument passed to join() resets the accumulated path, + * matching Node behaviour and handling worktree gitdir paths properly. + * + * Limitation: UNC paths (e.g. \\server\share) are not supported. The leading + * backslashes are normalised to forward slashes and then collapsed by + * normalizeString, losing the UNC root. Git on Windows works with + * drive-letter paths, so this is not expected to be a practical issue. + */ + +/*! crc32.js (C) 2014-present SheetJS -- http://sheetjs.com */ + +/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ + +/*! safe-buffer. MIT License. Feross Aboukhadijeh */ + + +--- package/models/index.umd.min.js.LICENSE.txt --- + +/*! + * This code for `path.join` is directly copied from @zenfs/core/path for bundle size improvements. + * SPDX-License-Identifier: LGPL-3.0-or-later + * Copyright (c) James Prevett and other ZenFS contributors. + * + * Windows support added: + * - Backslashes are normalised to forward slashes before processing. + * - Drive-letter prefixes (e.g. "C:") are detected and preserved through + * normalisation, so absolute Windows paths are handled correctly. + * - An absolute argument passed to join() resets the accumulated path, + * matching Node behaviour and handling worktree gitdir paths properly. + * + * Limitation: UNC paths (e.g. \\server\share) are not supported. The leading + * backslashes are normalised to forward slashes and then collapsed by + * normalizeString, losing the UNC root. Git on Windows works with + * drive-letter paths, so this is not expected to be a practical issue. + */ + + +===== ignore@5.3.2 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz +Integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE-MIT --- + +Copyright (c) 2013 Kael Zhang , contributors +http://kael.me/ + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +===== jose@6.2.3 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/jose/-/jose-6.2.3.tgz +Integrity: sha512-YYVDInQKFJfR/xa3ojUTl8c2KoTwiL1R5Wg9YCydwH0x0B9grbzlg5HC7mMjCtUJjbQ/YnGEZIhI5tCgfTb4Hw== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE.md --- + +The MIT License (MIT) + +Copyright (c) 2018 Filip Skokan + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== json-schema-traverse@1.0.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz +Integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) 2017 Evgeny Poberezkin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== jsonc-parser@3.3.1 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.3.1.tgz +Integrity: sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE.md --- + +The MIT License (MIT) + +Copyright (c) Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== lossless-json@4.3.1 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/lossless-json/-/lossless-json-4.3.1.tgz +Integrity: sha512-SqD/Bg3ZfltBJ2Z14hJ/BihnvtV553WO4g9/ePtlp4lrnl9jF3AdIJt53A/Wkg/0Li+LMfxaBqgx1MiFZdQlpQ== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE.md --- + +The MIT License (MIT) + +Copyright (c) 2016-2026 Jos de Jong + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +===== lru-cache@11.5.2 ===== +Declared license: BlueOak-1.0.0 +Archive: https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.2.tgz +Integrity: sha512-4pfM1Ff0x50o0tQwb5ucw/RzNyD0/YJME6IVcStalZuMWxdt3sR3huStTtxz4PUmvZfRguvDejasvQ2kifR11g== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE.md --- + +# Blue Oak Model License + +Version 1.0.0 + +## Purpose + +This license gives everyone as much permission to work with +this software as possible, while protecting contributors +from liability. + +## Acceptance + +In order to receive this license, you must agree to its +rules. The rules of this license are both obligations +under that agreement and conditions to your license. +You must not do anything with this software that triggers +a rule that you cannot or will not follow. + +## Copyright + +Each contributor licenses you to do everything with this +software that would otherwise infringe that contributor's +copyright in it. + +## Notices + +You must ensure that everyone who gets a copy of +any part of this software from you, with or without +changes, also gets the text of this license or a link to +. + +## Excuse + +If anyone notifies you in writing that you have not +complied with [Notices](#notices), you can keep your +license by taking all practical steps to comply within 30 +days after the notice. If you do not do so, your license +ends immediately. + +## Patent + +Each contributor licenses you to do everything with this +software that would otherwise infringe any patent claims +they can license or become able to license. + +## Reliability + +No contributor can revoke this license. + +## No Liability + +***As far as the law allows, this software comes as is, +without any warranty or condition, and no contributor +will be liable to anyone for any damages related to this +software or this license, under any kind of legal claim.*** + + +===== math-intrinsics@1.1.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz +Integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) 2024 ECMAScript Shims + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== mimic-response@3.1.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz +Integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== +Scope: npm runtime dependency, including optional platform packages. + +--- package/license --- + +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +===== minimatch@10.2.5 ===== +Declared license: BlueOak-1.0.0 +Archive: https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz +Integrity: sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE.md --- + +# Blue Oak Model License + +Version 1.0.0 + +## Purpose + +This license gives everyone as much permission to work with +this software as possible, while protecting contributors +from liability. + +## Acceptance + +In order to receive this license, you must agree to its +rules. The rules of this license are both obligations +under that agreement and conditions to your license. +You must not do anything with this software that triggers +a rule that you cannot or will not follow. + +## Copyright + +Each contributor licenses you to do everything with this +software that would otherwise infringe that contributor's +copyright in it. + +## Notices + +You must ensure that everyone who gets a copy of +any part of this software from you, with or without +changes, also gets the text of this license or a link to +. + +## Excuse + +If anyone notifies you in writing that you have not +complied with [Notices](#notices), you can keep your +license by taking all practical steps to comply within 30 +days after the notice. If you do not do so, your license +ends immediately. + +## Patent + +Each contributor licenses you to do everything with this +software that would otherwise infringe any patent claims +they can license or become able to license. + +## Reliability + +No contributor can revoke this license. + +## No Liability + +**_As far as the law allows, this software comes as is, +without any warranty or condition, and no contributor +will be liable to anyone for any damages related to this +software or this license, under any kind of legal claim._** + + +===== minimist@1.2.8 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz +Integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +===== minimisted@2.0.1 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/minimisted/-/minimisted-2.0.1.tgz +Integrity: sha512-1oPjfuLQa2caorJUM8HV8lGgWCc0qqAO1MNv/k05G4qslmsndV/5WdNZrqCiyqiz3wohia2Ij2B7w2Dr7/IyrA== +Scope: npm runtime dependency, including optional platform packages. + +--- Published package metadata and standard license text (upstream omits a full license/copyright document) --- + +The published package declares MIT but contains no full license/copyright document. No copyright holder or year is inferred. +Author as declared by upstream package metadata: "Yoshiya Hinosawa (https://twitter.com/kt3k)" +Declared license: MIT + +Standard license text from licenses/MIT-template.txt; this is not a recovered upstream copyright notice. + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and +associated documentation files (the "Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial +portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO +EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + + +===== minipass@7.1.3 ===== +Declared license: BlueOak-1.0.0 +Archive: https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz +Integrity: sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE.md --- + +# Blue Oak Model License + +Version 1.0.0 + +## Purpose + +This license gives everyone as much permission to work with +this software as possible, while protecting contributors +from liability. + +## Acceptance + +In order to receive this license, you must agree to its +rules. The rules of this license are both obligations +under that agreement and conditions to your license. +You must not do anything with this software that triggers +a rule that you cannot or will not follow. + +## Copyright + +Each contributor licenses you to do everything with this +software that would otherwise infringe that contributor's +copyright in it. + +## Notices + +You must ensure that everyone who gets a copy of +any part of this software from you, with or without +changes, also gets the text of this license or a link to +. + +## Excuse + +If anyone notifies you in writing that you have not +complied with [Notices](#notices), you can keep your +license by taking all practical steps to comply within 30 +days after the notice. If you do not do so, your license +ends immediately. + +## Patent + +Each contributor licenses you to do everything with this +software that would otherwise infringe any patent claims +they can license or become able to license. + +## Reliability + +No contributor can revoke this license. + +## No Liability + +***As far as the law allows, this software comes as is, +without any warranty or condition, and no contributor +will be liable to anyone for any damages related to this +software or this license, under any kind of legal claim.*** + + +===== on-exit-leak-free@2.1.2 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-2.1.2.tgz +Integrity: sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) 2021 Matteo Collina + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== once@1.4.0 ===== +Declared license: ISC +Archive: https://registry.npmjs.org/once/-/once-1.4.0.tgz +Integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +===== pako@1.0.11 ===== +Declared license: (MIT AND Zlib) +Archive: https://registry.npmjs.org/pako/-/pako-1.0.11.tgz +Integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +(The MIT License) + +Copyright (C) 2014-2017 by Vitaly Puzrin and Andrei Tuputcyn + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +===== parse5@8.0.1 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/parse5/-/parse5-8.0.1.tgz +Integrity: sha512-z1e/HMG90obSGeidlli3hj7cbocou0/wa5HacvI3ASx34PecNjNQeaHNo5WIZpWofN9kgkqV1q5YvXe3F0FoPw== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +Copyright (c) 2013-2019 Ivan Nikulin (ifaaan@gmail.com, https://github.com/inikulin) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +===== entities@8.1.0 ===== +Declared license: BSD-2-Clause +Archive: https://registry.npmjs.org/entities/-/entities-8.1.0.tgz +Integrity: sha512-kxL7msIffSuh9aaFAMD7rxAIuTRMAHMeBtgHW2yUdWw732ZNh4MehkF2gdjvtdmikkaIP9bFDDJOPlsvm7avrA== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +Copyright (c) Felix Böhm +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +===== path-key@3.1.1 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz +Integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== +Scope: npm runtime dependency, including optional platform packages. + +--- package/license --- + +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +===== path-scurry@2.0.2 ===== +Declared license: BlueOak-1.0.0 +Archive: https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz +Integrity: sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE.md --- + +# Blue Oak Model License + +Version 1.0.0 + +## Purpose + +This license gives everyone as much permission to work with +this software as possible, while protecting contributors +from liability. + +## Acceptance + +In order to receive this license, you must agree to its +rules. The rules of this license are both obligations +under that agreement and conditions to your license. +You must not do anything with this software that triggers +a rule that you cannot or will not follow. + +## Copyright + +Each contributor licenses you to do everything with this +software that would otherwise infringe that contributor's +copyright in it. + +## Notices + +You must ensure that everyone who gets a copy of +any part of this software from you, with or without +changes, also gets the text of this license or a link to +. + +## Excuse + +If anyone notifies you in writing that you have not +complied with [Notices](#notices), you can keep your +license by taking all practical steps to comply within 30 +days after the notice. If you do not do so, your license +ends immediately. + +## Patent + +Each contributor licenses you to do everything with this +software that would otherwise infringe any patent claims +they can license or become able to license. + +## Reliability + +No contributor can revoke this license. + +## No Liability + +***As far as the law allows, this software comes as is, +without any warranty or condition, and no contributor +will be liable to anyone for any damages related to this +software or this license, under any kind of legal claim.*** + + +===== pify@4.0.1 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/pify/-/pify-4.0.1.tgz +Integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== +Scope: npm runtime dependency, including optional platform packages. + +--- package/license --- + +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +===== pino@10.4.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/pino/-/pino-10.4.0.tgz +Integrity: sha512-bk1ZMTwG/Vymx+zPoa28MhNzucFvXJWp3csrSuxuHPSMeUettaCoQ5Jvg07mtC4JGNpcfTwz41oVCnNgBK9+vA== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +The MIT License (MIT) + +Copyright (c) 2016-present Matteo Collina, David Mark Clements and the Pino contributors listed at and in the README file. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== pino-abstract-transport@3.0.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/pino-abstract-transport/-/pino-abstract-transport-3.0.0.tgz +Integrity: sha512-wlfUczU+n7Hy/Ha5j9a/gZNy7We5+cXp8YL+X+PG8S0KXxw7n/JXA3c46Y0zQznIJ83URJiwy7Lh56WLokNuxg== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) 2021 pino + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== pino-std-serializers@7.1.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-7.1.0.tgz +Integrity: sha512-BndPH67/JxGExRgiX1dX0w1FvZck5Wa4aal9198SrRhZjH3GxKQUKIBnYJTdj2HDN3UQAS06HlfcSbQj2OHmaw== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +Copyright Mateo Collina, David Mark Clements, James Sumners + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +===== pkce-challenge@5.0.1 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/pkce-challenge/-/pkce-challenge-5.0.1.tgz +Integrity: sha512-wQ0b/W4Fr01qtpHlqSqspcj3EhBvimsdh0KlHhH8HRZnMsEa0ea2fTULOXOS9ccQr3om+GcGRk4e+isrZWV8qQ== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) 2019 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== playwright-core@1.58.2 ===== +Declared license: Apache-2.0 +Archive: https://registry.npmjs.org/playwright-core/-/playwright-core-1.58.2.tgz +Integrity: sha512-yZkEtftgwS8CsfYo7nm0KE8jsvm6i/PTgVtB8DL726wNf6H2IMsDuxCpJj59KDaxCtSnrWan2AeDqM7JBaultg== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Portions Copyright (c) Microsoft Corporation. + Portions Copyright 2017 Google Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +--- package/NOTICE --- + +Playwright +Copyright (c) Microsoft Corporation + +This software contains code derived from the Puppeteer project (https://github.com/puppeteer/puppeteer), +available under the Apache 2.0 license (https://github.com/puppeteer/puppeteer/blob/master/LICENSE). + + +===== plist@5.0.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/plist/-/plist-5.0.0.tgz +Integrity: sha512-20N+g1DvMm/DFRbsvER7tT4wDryq0WunK7VMkDaiJcKNapAnUMkTsAnacFYf8n420F4Hf6/hefgmJRkMb1M0fg== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +(The MIT License) + +Copyright (c) 2010-2017 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + + +===== possible-typed-array-names@1.1.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz +Integrity: sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) 2024 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== process@0.11.10 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/process/-/process-0.11.10.tgz +Integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +(The MIT License) + +Copyright (c) 2013 Roman Shtylman + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +===== process-warning@5.0.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/process-warning/-/process-warning-5.0.0.tgz +Integrity: sha512-a39t9ApHNx2L4+HBnQKqxxHNs1r7KF+Intd8Q/g1bUh6q0WIp9voPXJ/x0j+ZL45KF1pJd9+q2jLIRMfvEshkA== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) Fastify + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== quick-format-unescaped@4.0.4 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz +Integrity: sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +The MIT License (MIT) + +Copyright (c) 2016-2019 David Mark Clements + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== readable-stream@4.7.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz +Integrity: sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +Node.js is licensed for use as follows: + +""" +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + + +===== real-require@1.0.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/real-require/-/real-require-1.0.0.tgz +Integrity: sha512-P4nbQYQfePJxRSmY+v/KINxVucm4NF3p3s7pJveMTtom52FR4YGltUQLB8idDXwDDWW+eYrWDFbuzUnjoWHF7g== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE.md --- + +The MIT License (MIT) + +Copyright (c) 2021 Paolo Insogna and the real-require contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== require-from-string@2.0.2 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz +Integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== +Scope: npm runtime dependency, including optional platform packages. + +--- package/license --- + +The MIT License (MIT) + +Copyright (c) Vsevolod Strukchinsky (github.com/floatdrop) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +===== rolldown@1.2.12 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/rolldown/-/rolldown-1.2.12.tgz +Integrity: sha512-8wafseiaG80xmXSfqidUNqZcylTlhmPZZt+za2m+js2sFZ8dTNlhIOV2WcbIPx2hgwPBJpEUGFAMZ9bgBBLTSQ== +Scope: generated runtime helpers; the build compiler is not bundled. + +--- package/LICENSE --- + +MIT License + +Copyright (c) 2024-present VoidZero Inc. & Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +end of terms and conditions + +The licenses of externally maintained libraries from which parts of the Software is derived are listed [here](https://github.com/rolldown/rolldown/blob/main/THIRD-PARTY-LICENSE). + + +===== safe-buffer@5.2.1 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz +Integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +The MIT License (MIT) + +Copyright (c) Feross Aboukhadijeh + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +===== safe-stable-stringify@2.5.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz +Integrity: sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +The MIT License (MIT) + +Copyright (c) Ruben Bridgewater + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== semver@7.8.5 ===== +Declared license: ISC +Archive: https://registry.npmjs.org/semver/-/semver-7.8.5.tgz +Integrity: sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +===== set-function-length@1.2.2 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz +Integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) Jordan Harband and contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== sha.js@2.4.12 ===== +Declared license: (MIT AND BSD-3-Clause) +Archive: https://registry.npmjs.org/sha.js/-/sha.js-2.4.12.tgz +Integrity: sha512-8LzC5+bvI45BjpfXU8V5fdU2mfeKiQe1D1gIMn7XUlF3OTUrpdJpPPH4EMAnF0DsHHdSZqCdSss5qCmJKuiO3w== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +Copyright (c) 2013-2018 sha.js contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +Copyright (c) 1998 - 2009, Paul Johnston & Contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, this +list of conditions and the following disclaimer in the documentation and/or +other materials provided with the distribution. + +Neither the name of the author nor the names of its contributors may be used to +endorse or promote products derived from this software without specific prior +written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + +===== shebang-command@2.0.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz +Integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== +Scope: npm runtime dependency, including optional platform packages. + +--- package/license --- + +MIT License + +Copyright (c) Kevin Mårtensson (github.com/kevva) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +===== shebang-regex@3.0.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz +Integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== +Scope: npm runtime dependency, including optional platform packages. + +--- package/license --- + +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +===== signal-exit@4.1.0 ===== +Declared license: ISC +Archive: https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz +Integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE.txt --- + +The ISC License + +Copyright (c) 2015-2023 Benjamin Coe, Isaac Z. Schlueter, and Contributors + +Permission to use, copy, modify, and/or distribute this software +for any purpose with or without fee is hereby granted, provided +that the above copyright notice and this permission notice +appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE +LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +===== simple-concat@1.0.1 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz +Integrity: sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +The MIT License (MIT) + +Copyright (c) Feross Aboukhadijeh + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +===== simple-get@4.0.1 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz +Integrity: sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +The MIT License (MIT) + +Copyright (c) Feross Aboukhadijeh + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +===== sisteransi@1.0.5 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz +Integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== +Scope: npm runtime dependency, including optional platform packages. + +--- package/license --- + +MIT License + +Copyright (c) 2018 Terkel Gjervig Nielsen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== smol-toml@1.9.0 ===== +Declared license: BSD-3-Clause +Archive: https://registry.npmjs.org/smol-toml/-/smol-toml-1.9.0.tgz +Integrity: sha512-hpd+HLON7HdZXqYchMM/+LaTTbdK0AU3NngIJ4KVyWbY9bfQqdL9cD+4yf6dUoU2Ap4VsU0JkQi6FxAI1B2mXQ== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +Copyright (c) Squirrel Chat et al., All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. Neither the name of the copyright holder nor the names of its contributors + may be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +===== sonic-boom@4.2.1 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/sonic-boom/-/sonic-boom-4.2.1.tgz +Integrity: sha512-w6AxtubXa2wTXAUsZMMWERrsIRAdrK0Sc+FUytWvYAhBJLyuI4llrMIC1DtlNSdI99EI86KZum2MMq3EAZlF9Q== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) 2017 Matteo Collina + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== split2@4.2.0 ===== +Declared license: ISC +Archive: https://registry.npmjs.org/split2/-/split2-4.2.0.tgz +Integrity: sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +Copyright (c) 2014-2018, Matteo Collina + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +===== stream-chain@4.2.6 ===== +Declared license: BSD-3-Clause +Archive: https://registry.npmjs.org/stream-chain/-/stream-chain-4.2.6.tgz +Integrity: sha512-1zeJ8CrtJfmiba26ui8jXkq/xLRFvhzkdH02D5QLO9Cnovgeb28IJxg88DdraWnjnkbOol/++uIAybJbJhk7ig== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +Copyright 2005-2026 Eugene Lazutkin + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +===== stream-json@3.7.0 ===== +Declared license: BSD-3-Clause +Archive: https://registry.npmjs.org/stream-json/-/stream-json-3.7.0.tgz +Integrity: sha512-rCSBdcBP/bPk6T8QFcxAj1MSzAuc5i49cYW6IE7sYObNEPccBJIUiL6fU9c9BWt40aJK0siVynLX7lWaW8alXw== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +Copyright 2005-2026 Eugene Lazutkin + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +===== string_decoder@1.3.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz +Integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +Node.js is licensed for use as follows: + +""" +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + + + +===== thread-stream@4.2.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/thread-stream/-/thread-stream-4.2.0.tgz +Integrity: sha512-e2zZ96wSChazBsbENf/Pcm/4swHt2cEKQ92rhUjkL9GCKiTDJIaTBenjE/m9DXi0QBmTMDkFDdOomUy20A1tDQ== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) 2021 Matteo Collina + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== to-buffer@1.2.2 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/to-buffer/-/to-buffer-1.2.2.tgz +Integrity: sha512-db0E3UJjcFhpDhAF4tLo03oli3pwl3dbnzXOUIlRKrp+ldk/VUxzpWYZENsw2SZiuBjHAk7DfB0VU7NKdpb6sw== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +The MIT License (MIT) + +Copyright (c) 2016 Mathias Buus + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +===== tokenx@1.3.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/tokenx/-/tokenx-1.3.0.tgz +Integrity: sha512-NLdXTEZkKiO0gZuLtMoZKjCXTREXeZZt8nnnNeyoXtNZAfG/GKGSbQtLU5STspc0rMSwcA+UJfWZkbNU01iKmQ== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) 2023-PRESENT Johann Schopplich + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== typed-array-buffer@1.0.3 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz +Integrity: sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) 2023 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +===== which@2.0.2 ===== +Declared license: ISC +Archive: https://registry.npmjs.org/which/-/which-2.0.2.tgz +Integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +===== which-typed-array@1.1.22 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.22.tgz +Integrity: sha512-fvO4ExWMFsqyhG3AiPAObMuY1lxaqgYcxbc49CNdWDDECOJNgQyvsOWVwbZc+qf3rzRtxojBK+CMEv0Ld5CYpw== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +The MIT License (MIT) + +Copyright (c) 2015 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + + +===== wrappy@1.0.2 ===== +Declared license: ISC +Archive: https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz +Integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +===== write-file-atomic@7.0.0 ===== +Declared license: ISC +Archive: https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-7.0.0.tgz +Integrity: sha512-YnlPC6JqnZl6aO4uRc+dx5PHguiR9S6WeoLtpxNT9wIG+BDya7ZNE1q7KOjVgaA73hKhKLpVPgJ5QA9THQ5BRg== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE.md --- + +Copyright (c) 2015, Rebecca Turner + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + + +===== ws@8.21.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/ws/-/ws-8.21.0.tgz +Integrity: sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +Copyright (c) 2011 Einar Otto Stangvik +Copyright (c) 2013 Arnout Kazemier and contributors +Copyright (c) 2016 Luigi Pinca and contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +===== xmlbuilder@15.1.1 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz +Integrity: sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +The MIT License (MIT) + +Copyright (c) 2013 Ozgur Ozcitak + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +===== yaml@2.9.0 ===== +Declared license: ISC +Archive: https://registry.npmjs.org/yaml/-/yaml-2.9.0.tgz +Integrity: sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +Copyright Eemeli Aro + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +===== zod@4.4.3 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/zod/-/zod-4.4.3.tgz +Integrity: sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) 2025 Colin McDonnell + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + + +===== bindings@1.5.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz +Integrity: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE.md --- + +(The MIT License) + +Copyright (c) 2012 Nathan Rajlich <nathan@tootallnate.net> + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + +===== bl@4.1.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/bl/-/bl-4.1.0.tgz +Integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE.md --- + +The MIT License (MIT) +===================== + +Copyright (c) 2013-2019 bl contributors +---------------------------------- + +*bl contributors listed at * + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + +===== buffer@5.7.1 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz +Integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +The MIT License (MIT) + +Copyright (c) Feross Aboukhadijeh, and other contributors. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + + +===== chownr@1.1.4 ===== +Declared license: ISC +Archive: https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz +Integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + + +===== deep-extend@0.6.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz +Integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +The MIT License (MIT) + +Copyright (c) 2013-2018, Viacheslav Lotsmanov + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + +===== detect-libc@2.1.2 ===== +Declared license: Apache-2.0 +Archive: https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz +Integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + + +===== end-of-stream@1.4.5 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz +Integrity: sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +The MIT License (MIT) + +Copyright (c) 2014 Mathias Buus + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +===== expand-template@2.0.3 ===== +Declared license: (MIT OR WTFPL) +Archive: https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz +Integrity: sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +The MIT License (MIT) + +Copyright (c) 2018 Lars-Magnus Skog + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +===== file-uri-to-path@1.0.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz +Integrity: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +Copyright (c) 2014 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + +===== frida@17.23.2 ===== +Declared license: LGPL-2.0 WITH WxWindows-exception-3.1 +Archive: https://registry.npmjs.org/frida/-/frida-17.23.2.tgz +Integrity: sha512-gRCmmTUFdEILyHRN1b66erRoXafwsfWTqXyoBBqkSCFX0Ue7Jhvs/KhA3JO0XrgITNlPd91QAGsFvWzh0mhVgg== +Scope: npm runtime dependency, including optional platform packages. + +--- Declared metadata and supplemental licensing texts --- + +The integrity-verified npm archive and tagged frida-node source omit a standalone license/copyright document. The package declares LGPL-2.0 WITH WxWindows-exception-3.1. No Frida copyright holder or year is inferred. +The following unchanged Frida 17.23.2 COPYING and GNU Library GPL v2 texts are licensing supplements. The copyright in COPYING belongs to that license document; it is not recovered attribution for the Node binding or every component in its downloaded prebuild. + +Authors as declared by upstream package metadata: ["Frida Developers"] +Frida Node source: https://github.com/frida/frida-node/tree/11d56293686c5494f538247ccf89f08ab57912ef +License text provenance and SHA-256: licenses/upstream-sources.json + +--- licenses/frida-17.23.2-COPYING.txt --- + + wxWindows Library Licence, Version 3.1 + ====================================== + +Copyright (c) 1998-2005 Julian Smart, Robert Roebling et al + +Everyone is permitted to copy and distribute verbatim copies +of this licence document, but changing it is not allowed. + + WXWINDOWS LIBRARY LICENCE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +This library is free software; you can redistribute it and/or modify it +under the terms of the GNU Library General Public Licence as published by +the Free Software Foundation; either version 2 of the Licence, or (at your +option) any later version. + +This library is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public +Licence for more details. + +You should have received a copy of the GNU Library General Public Licence +along with this software, usually in a file named COPYING.LIB. If not, +write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth +Floor, Boston, MA 02110-1301 USA. + +EXCEPTION NOTICE + +1. As a special exception, the copyright holders of this library give +permission for additional uses of the text contained in this release of the +library as licenced under the wxWindows Library Licence, applying either +version 3.1 of the Licence, or (at your option) any later version of the +Licence as published by the copyright holders of version 3.1 of the Licence +document. + +2. The exception is that you may use, copy, link, modify and distribute +under your own terms, binary object code versions of works based on the +Library. + +3. If you copy code from files distributed under the terms of the GNU +General Public Licence or the GNU Library General Public Licence into a +copy of this library, as this licence permits, the exception does not apply +to the code that you add in this way. To avoid misleading anyone as to the +status of such modified files, you must delete this exception notice from +such code and/or adjust the licensing conditions notice accordingly. + +4. If you write modifications of your own for this library, it is your +choice whether to permit this exception to apply to your modifications. If +you do not wish that, you must delete the exception notice from such code +and/or adjust the licensing conditions notice accordingly. + + +--- licenses/LGPL-2.0.txt --- + + GNU LIBRARY GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1991 Free Software Foundation, Inc. + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the library GPL. It is + numbered 2 because it goes with version 2 of the ordinary GPL.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Library General Public License, applies to some +specially designated Free Software Foundation software, and to any +other libraries whose authors decide to use it. You can use it for +your libraries, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if +you distribute copies of the library, or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link a program with the library, you must provide +complete object files to the recipients so that they can relink them +with the library, after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + Our method of protecting your rights has two steps: (1) copyright +the library, and (2) offer you this license which gives you legal +permission to copy, distribute and/or modify the library. + + Also, for each distributor's protection, we want to make certain +that everyone understands that there is no warranty for this free +library. If the library is modified by someone else and passed on, we +want its recipients to know that what they have is not the original +version, so that any problems introduced by others will not reflect on +the original authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that companies distributing free +software will individually obtain patent licenses, thus in effect +transforming the program into proprietary software. To prevent this, +we have made it clear that any patent must be licensed for everyone's +free use or not licensed at all. + + Most GNU software, including some libraries, is covered by the ordinary +GNU General Public License, which was designed for utility programs. This +license, the GNU Library General Public License, applies to certain +designated libraries. This license is quite different from the ordinary +one; be sure to read it in full, and don't assume that anything in it is +the same as in the ordinary license. + + The reason we have a separate public license for some libraries is that +they blur the distinction we usually make between modifying or adding to a +program and simply using it. Linking a program with a library, without +changing the library, is in some sense simply using the library, and is +analogous to running a utility program or application program. However, in +a textual and legal sense, the linked executable is a combined work, a +derivative of the original library, and the ordinary General Public License +treats it as such. + + Because of this blurred distinction, using the ordinary General +Public License for libraries did not effectively promote software +sharing, because most developers did not use the libraries. We +concluded that weaker conditions might promote sharing better. + + However, unrestricted linking of non-free programs would deprive the +users of those programs of all benefit from the free status of the +libraries themselves. This Library General Public License is intended to +permit developers of non-free programs to use free libraries, while +preserving your freedom as a user of such programs to change the free +libraries that are incorporated in them. (We have not seen how to achieve +this as regards changes in header files, but we have achieved it as regards +changes in the actual functions of the Library.) The hope is that this +will lead to faster development of free libraries. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, while the latter only +works together with the library. + + Note that it is possible for a library to be covered by the ordinary +General Public License rather than by this special one. + + GNU LIBRARY GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library which +contains a notice placed by the copyright holder or other authorized +party saying it may be distributed under the terms of this Library +General Public License (also called "this License"). Each licensee is +addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also compile or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + c) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + d) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the source code distributed need not include anything that is normally +distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Library General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, see . + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Moe Ghoul, President of Vice + +That's all there is to it! + + + +===== fs-constants@1.0.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz +Integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +The MIT License (MIT) + +Copyright (c) 2018 Mathias Buus + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + + +===== github-from-package@0.0.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz +Integrity: sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + +===== ini@1.3.8 ===== +Declared license: ISC +Archive: https://registry.npmjs.org/ini/-/ini-1.3.8.tgz +Integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + + +===== mkdirp-classic@0.5.3 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz +Integrity: sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +The MIT License (MIT) + +Copyright (c) 2020 James Halliday (mail@substack.net) and Mathias Buus + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + + +===== napi-build-utils@2.0.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-2.0.0.tgz +Integrity: sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) 2018 inspiredware + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + + +===== node-abi@3.98.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/node-abi/-/node-abi-3.98.0.tgz +Integrity: sha512-Llh8noNw7s15m+rmIrZnZQbe4gLyasL9loT74rC92PkmwWKeEedKvc7o6pjp8B3MhrYT/Cl846NOYZbz1wmddw== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +MIT License + +Copyright (c) 2016 Lukas Geiger + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + + +===== prebuild-install@7.1.3 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.3.tgz +Integrity: sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +The MIT License (MIT) + +Copyright (c) 2015 Mathias Buus + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + + +===== pump@3.0.4 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/pump/-/pump-3.0.4.tgz +Integrity: sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +The MIT License (MIT) + +Copyright (c) 2014 Mathias Buus + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +===== rc@1.2.8 ===== +Declared license: (BSD-2-Clause OR MIT OR Apache-2.0) +Archive: https://registry.npmjs.org/rc/-/rc-1.2.8.tgz +Integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE.APACHE2 --- + +Apache License, Version 2.0 + +Copyright (c) 2011 Dominic Tarr + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + + +--- package/LICENSE.BSD --- + +Copyright (c) 2013, Dominic Tarr +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +The views and conclusions contained in the software and documentation are those +of the authors and should not be interpreted as representing official policies, +either expressed or implied, of the FreeBSD Project. + + +--- package/LICENSE.MIT --- + +The MIT License + +Copyright (c) 2011 Dominic Tarr + +Permission is hereby granted, free of charge, +to any person obtaining a copy of this software and +associated documentation files (the "Software"), to +deal in the Software without restriction, including +without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom +the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + +===== readable-stream@3.6.2 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz +Integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +Node.js is licensed for use as follows: + +""" +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + + + +===== strip-json-comments@2.0.1 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz +Integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== +Scope: npm runtime dependency, including optional platform packages. + +--- package/license --- + +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + + +===== tar-fs@2.1.5 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.5.tgz +Integrity: sha512-OboTd8mmMhZDNPV+UjQcK9yKAatXu2aJ+r1w4im1Otd4M4fl2hwvdoXUxIYHFTHWK/3y3FarBP70v3vwmGlOxw== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +The MIT License (MIT) + +Copyright (c) 2014 Mathias Buus + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +===== tar-stream@2.2.0 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz +Integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +The MIT License (MIT) + +Copyright (c) 2014 Mathias Buus + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +===== tunnel-agent@0.6.0 ===== +Declared license: Apache-2.0 +Archive: https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz +Integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of this License; and + +You must cause any modified files to carry prominent notices stating that You changed the files; and + +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + + +===== util-deprecate@1.0.2 ===== +Declared license: MIT +Archive: https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz +Integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== +Scope: npm runtime dependency, including optional platform packages. + +--- package/LICENSE --- + +(The MIT License) + +Copyright (c) 2014 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + + diff --git a/licenses/upstream-sources.json b/licenses/upstream-sources.json new file mode 100644 index 000000000..fb1dad975 --- /dev/null +++ b/licenses/upstream-sources.json @@ -0,0 +1,72 @@ +[ + { + "file": "licenses/ghidra-12.1.4-LICENSE.txt", + "source": "https://raw.githubusercontent.com/NationalSecurityAgency/ghidra/Ghidra_12.1.4_build/LICENSE", + "sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4" + }, + { + "file": "licenses/ghidra-12.1.4-NOTICE.txt", + "source": "https://raw.githubusercontent.com/NationalSecurityAgency/ghidra/Ghidra_12.1.4_build/NOTICE", + "sha256": "ad4b2bb6e75e908251226180081b5afa01c7161d7710e08b603d0c340a08a23f" + }, + { + "file": "licenses/ghidra-12.1.4-DISCLAIMER.txt", + "source": "https://raw.githubusercontent.com/NationalSecurityAgency/ghidra/Ghidra_12.1.4_build/DISCLAIMER.md", + "sha256": "324f4544abe620362f7bc66fbd8ec3c90e62e1aeac249fb850aef67e71c8b24d" + }, + { + "file": "licenses/dotnet-runtime-MIT.txt", + "source": "https://raw.githubusercontent.com/dotnet/runtime/a3b2d40328be0be3f8dd43f0e5cc925b8827b044/LICENSE.TXT", + "sha256": "cfc21f5e8bd655ae997eec916138b707b1d290b83272c02a95c9f821b8c87310" + }, + { + "file": "licenses/cfworker-MIT.txt", + "source": "https://raw.githubusercontent.com/cfworker/cfworker/5409fdc2bd144f68e8b28c61c71fcb16600000a6/LICENSE.md", + "sha256": "376944252ab78ca6b41aee44ddea8894927ee67891e77e61eb9d59af63e35094" + }, + { + "file": "licenses/xterm-MIT.txt", + "source": "https://raw.githubusercontent.com/xtermjs/xterm.js/f447274f430fd22513f6adbf9862d19524471c04/LICENSE", + "sha256": "b569f629d00f2626a8100df2a1798210535621e42164dfd426a6fe5aac7b0ccd" + }, + { + "file": "licenses/Apache-2.0.txt", + "source": "https://www.apache.org/licenses/LICENSE-2.0.txt", + "sha256": "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30" + }, + { + "file": "licenses/MIT-template.txt", + "source": "https://raw.githubusercontent.com/spdx/license-list-data/main/text/MIT.txt", + "sha256": "b05785f9f18e6716bab63424b11454513b9943a222595b70411009202fc592b5" + }, + { + "file": "licenses/MinGW-w64-runtime.txt", + "source": "https://raw.githubusercontent.com/mingw-w64/mingw-w64/v12.0.0/COPYING.MinGW-w64-runtime/COPYING.MinGW-w64-runtime.txt", + "sha256": "e9b2dc02451ea29092a1f25fa0f3c07207ed421f1807dffb0c4e6dce69dee7bd" + }, + { + "file": "licenses/GPL-3.0.txt", + "source": "https://raw.githubusercontent.com/gcc-mirror/gcc/releases/gcc-14.2.0/COPYING3", + "sha256": "8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903" + }, + { + "file": "licenses/GCC-Runtime-Library-Exception-3.1.txt", + "source": "https://raw.githubusercontent.com/gcc-mirror/gcc/releases/gcc-14.2.0/COPYING.RUNTIME", + "sha256": "9d6b43ce4d8de0c878bf16b54d8e7a10d9bd42b75178153e3af6a815bdc90f74" + }, + { + "file": "licenses/Node-22.19.0-LICENSE.txt", + "source": "https://raw.githubusercontent.com/nodejs/node/v22.19.0/LICENSE", + "sha256": "e991d81497a85bb24fc6bffae0a3637a6accd6c6bc5ce1f2c5698bd555cf9d49" + }, + { + "file": "licenses/frida-17.23.2-COPYING.txt", + "source": "https://raw.githubusercontent.com/frida/frida/9adf8ed33ab6f1122b17399ee96dcbe101b941c9/COPYING", + "sha256": "5ea1544b51a28bc823b03159190d4108f9fb4f4ef912389f5137c6d295e175b2" + }, + { + "file": "licenses/LGPL-2.0.txt", + "source": "https://www.gnu.org/licenses/old-licenses/lgpl-2.0.txt", + "sha256": "cc535c21133c895b56b374c8a1dc1eb948d99003ed2b47372069456b62f42b24" + } +] diff --git a/licenses/xterm-MIT.txt b/licenses/xterm-MIT.txt new file mode 100644 index 000000000..4472336c9 --- /dev/null +++ b/licenses/xterm-MIT.txt @@ -0,0 +1,21 @@ +Copyright (c) 2017-2019, The xterm.js authors (https://github.com/xtermjs/xterm.js) +Copyright (c) 2014-2016, SourceLair Private Company (https://www.sourcelair.com) +Copyright (c) 2012-2013, Christopher Jeffrey (https://github.com/chjj/) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/native/windows/README.md b/native/windows/README.md index 82dd5526b..e2543260f 100644 --- a/native/windows/README.md +++ b/native/windows/README.md @@ -69,10 +69,22 @@ without this lane reports Windows native controls as unavailable. limits only for its JavaScript helpers when running on Bun, which ignores their V8 heap flags; Node.js launches are unchanged. - Only the suspended child's default file owner is normalized. Caller token - privileges and ownership remain unchanged. Caller CPU affinity and process - priority are preserved in the child. Environment names are sorted and - deduplicated using Windows ordinal comparison, preserving their native Unicode - semantics and caller-selected values. + privileges and ownership remain unchanged. Caller process priority is + preserved in the child, and caller CPU affinity whenever both occupy the same + processor group. Windows chooses a new process's group itself and rejects a + mask belonging to another group, so a child placed elsewhere keeps that + group's default when the caller asked for no bound of its own. A caller + deliberately pinned to fewer processors than its group holds is a constraint + such a child cannot express, and is refused rather than widened to that + group's default. A mask covering its group's whole active set does not + distinguish a caller Windows placed in that group from one that selected the + group deliberately, so such a child can still be placed elsewhere: its + processor count stays bounded, its group placement is not preserved, and + neither that case nor the refusal above has a verification lane, because both + need a host whose processors span more than one group. + Environment names are sorted and deduplicated using Windows + ordinal comparison, preserving their native Unicode semantics and + caller-selected values. - Cleanup walks locked directory objects, removes files by handle, and unlinks reparse entries without traversing their targets. Failed removal retains the root and ancestor leases for retry; a partially removed runtime accepts only @@ -85,6 +97,17 @@ Windows failures retain their constraint, requested coordinate, Win32 code, and system message. Unsupported filesystems and reparse paths are distinct from OS access denial and missing packaged controls. +A failed runtime-parent admission additionally reports +`runtimeAllocation: "not-started"`: no runtime directory was created. The +Windows adapter uses that fact with numeric sharing/lock codes 32/33 to retain +a retryable private-runtime failure, including after successful native +authority caching. Missing allocation evidence, other codes, and opaque error +text do not establish a safe retry. Analysis errors propagate the producer's +retry disposition through JavaScript, source-map and WABT workflows; transient +failures report `category: unavailable` and retain the original reason. +Incomplete cleanup blocks an operation retry until its owned resources settle. +REA adds no automatic retry loop or new analysis cache for this behavior. + Ordinary drive-absolute paths accept backslashes, forward slashes, or mixed separators. File identity retains the original requested spelling. Separator translation does not resolve dot components, repeated separators, or extend diff --git a/native/windows/src/addon.cc b/native/windows/src/addon.cc index 0e39b84c0..bffd4cbd4 100644 --- a/native/windows/src/addon.cc +++ b/native/windows/src/addon.cc @@ -87,6 +87,8 @@ napi_value failureValue(napi_env env, const Failure& failure) { set(env, error, "requestedPath", string(env, failure.path)); set(env, error, "win32Code", number(env, failure.win32)); set(env, error, "win32Message", string(env, detail)); + if (failure.runtimeDirectoryUnallocated) + set(env, error, "runtimeAllocation", string(env, std::string("not-started"))); return error; } diff --git a/native/windows/src/authority.hpp b/native/windows/src/authority.hpp index cc713ce0b..13d7e4d60 100644 --- a/native/windows/src/authority.hpp +++ b/native/windows/src/authority.hpp @@ -33,6 +33,8 @@ struct Failure : std::runtime_error { DWORD win32; std::wstring path; std::string constraint; + // Affirmative proof for a failed runtime-parent admission; omission is unknown. + bool runtimeDirectoryUnallocated = false; Failure(std::string constraint, std::wstring path = L"", DWORD code = GetLastError()) : std::runtime_error(constraint), win32(code), path(std::move(path)), constraint(std::move(constraint)) {} diff --git a/native/windows/src/filesystem.cc b/native/windows/src/filesystem.cc index 6cfbc8e97..c8f66e5c1 100644 --- a/native/windows/src/filesystem.cc +++ b/native/windows/src/filesystem.cc @@ -212,7 +212,12 @@ static void verifyPrivate(HANDLE handle, const std::wstring& path, bool root) { } std::unique_ptr createRuntime(const std::wstring& parentPath, const std::wstring& prefix) { - auto parent = openFile(parentPath, 0, true); + std::unique_ptr parent; + try { parent = openFile(parentPath, 0, true); } + catch (Failure& failure) { + failure.runtimeDirectoryUnallocated = true; + throw; + } require(!prefix.empty() && prefix.find_first_of(L"\\/:\"<>|?*") == std::wstring::npos, "Runtime prefix must be one filename component", parentPath, ERROR_INVALID_PARAMETER); std::array random; diff --git a/native/windows/src/process.cc b/native/windows/src/process.cc index ede2b5622..80a4d0ac5 100644 --- a/native/windows/src/process.cc +++ b/native/windows/src/process.cc @@ -68,6 +68,18 @@ static ULONGLONG jobMemoryLimit(napi_env env, napi_value value) { return limit; } +// An affinity mask is meaningful only inside one processor group, so only a +// process occupying exactly one group has a group a child can inherit. A +// process whose threads span groups, or whose membership cannot be read, has no +// single group. +static bool singleProcessorGroup(HANDLE process, USHORT& group) { + USHORT count = 1; + std::array groups{}; + if (!GetProcessGroupAffinity(process, &count, groups.data()) || count != 1) return false; + group = groups[0]; + return true; +} + static void pipe(Handle& read, Handle& write, bool parentReads = true) { SECURITY_ATTRIBUTES attributes{sizeof(SECURITY_ATTRIBUTES), nullptr, TRUE}; HANDLE rawRead, rawWrite; @@ -168,11 +180,27 @@ std::unique_ptr spawnProcess(const std::wstring& command, const std::ws TOKEN_OWNER owner{reinterpret_cast(tokenUser.data())->User.Sid}; require(SetTokenInformation(token.get(), TokenOwner, &owner, sizeof(owner)), "Set suspended process file owner failed", command); + // A mask names processors inside one processor group, and Windows assigns a + // new process to a group of its own choosing, so a mask belonging to another + // group is rejected (ERROR_INVALID_PARAMETER). An unconstrained caller, whose + // mask is its group's whole active set, asks for no bound the child's own + // group cannot give, so such a child keeps that group's default and the spawn + // proceeds. A narrower mask is a deliberate CPU constraint that a child in + // another group cannot express, and silently widening it would hand the + // provider tree the whole group, so that spawn fails naming the constraint. DWORD_PTR affinity = 0, systemAffinity = 0; require(GetProcessAffinityMask(GetCurrentProcess(), &affinity, &systemAffinity), "Read caller process affinity failed", command); - if (affinity != 0) + USHORT callerGroup = 0, childGroup = 0; + const bool sharedGroup = singleProcessorGroup(GetCurrentProcess(), callerGroup) && + singleProcessorGroup(result->process.get(), childGroup) && + callerGroup == childGroup; + if (affinity != 0 && sharedGroup) require(SetProcessAffinityMask(result->process.get(), affinity), "Preserve caller process affinity failed", command); + else + require(affinity == 0 || affinity == systemAffinity, + "Caller CPU affinity cannot bound an owned process in another processor group", command, + ERROR_INVALID_PARAMETER); const DWORD priority = GetPriorityClass(GetCurrentProcess()); require(priority != 0 && SetPriorityClass(result->process.get(), priority), "Preserve caller process priority failed", command); diff --git a/package-lock.json b/package-lock.json index de9c141f5..5af71e98e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -41,6 +41,7 @@ "smol-toml": "1.9.0", "stream-chain": "4.2.6", "stream-json": "3.7.0", + "tokenx": "1.3.0", "write-file-atomic": "7.0.0", "ws": "8.21.0", "yaml": "2.9.0", @@ -73,6 +74,9 @@ }, "engines": { "node": "^22.19.0 || ^24.11.0 || >=26.0.0" + }, + "optionalDependencies": { + "frida": "17.23.2" } }, "node_modules/@algolia/abtesting": { @@ -742,9 +746,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -903,9 +904,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -923,9 +921,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -943,9 +938,6 @@ "ppc64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -963,9 +955,6 @@ "riscv64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -983,9 +972,6 @@ "riscv64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -1003,9 +989,6 @@ "s390x" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1023,9 +1006,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1043,9 +1023,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -1239,9 +1216,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1256,9 +1230,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -1273,9 +1244,6 @@ "ppc64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1290,9 +1258,6 @@ "riscv64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1307,9 +1272,6 @@ "riscv64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -1324,9 +1286,6 @@ "s390x" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1341,9 +1300,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1358,9 +1314,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -1878,9 +1831,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1898,9 +1848,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -1918,9 +1865,6 @@ "ppc64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1938,9 +1882,6 @@ "riscv64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1958,9 +1899,6 @@ "riscv64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -1978,9 +1916,6 @@ "s390x" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1998,9 +1933,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2018,9 +1950,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -2214,9 +2143,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2234,9 +2160,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -2254,9 +2177,6 @@ "ppc64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2274,9 +2194,6 @@ "s390x" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2294,9 +2211,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2314,9 +2228,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -2476,9 +2387,6 @@ "arm" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2493,9 +2401,6 @@ "arm" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -2510,9 +2415,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2527,9 +2429,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -2544,9 +2443,6 @@ "loong64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2561,9 +2457,6 @@ "loong64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -2578,9 +2471,6 @@ "ppc64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2595,9 +2485,6 @@ "ppc64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -2612,9 +2499,6 @@ "riscv64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2629,9 +2513,6 @@ "riscv64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -2646,9 +2527,6 @@ "s390x" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2663,9 +2541,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2680,9 +2555,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -4142,6 +4014,16 @@ ], "license": "MIT" }, + "node_modules/bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "license": "MIT", + "optional": true, + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, "node_modules/birpc": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/birpc/-/birpc-2.9.0.tgz", @@ -4152,6 +4034,58 @@ "url": "https://github.com/sponsors/antfu" } }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "license": "MIT", + "optional": true, + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/bl/node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "optional": true, + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/bl/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "license": "MIT", + "optional": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/brace-expansion": { "version": "5.0.12", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", @@ -4290,6 +4224,13 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "license": "ISC", + "optional": true + }, "node_modules/clean-git-ref": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/clean-git-ref/-/clean-git-ref-2.0.1.tgz", @@ -4418,6 +4359,16 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/define-data-property": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", @@ -4449,9 +4400,8 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", - "dev": true, + "devOptional": true, "license": "Apache-2.0", - "peer": true, "engines": { "node": ">=8" } @@ -4513,6 +4463,16 @@ "dev": true, "license": "MIT" }, + "node_modules/end-of-stream": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz", + "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==", + "license": "MIT", + "optional": true, + "dependencies": { + "once": "^1.4.0" + } + }, "node_modules/entities": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/entities/-/entities-7.0.1.tgz", @@ -4644,6 +4604,16 @@ "node": ">=22" } }, + "node_modules/expand-template": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", + "license": "(MIT OR WTFPL)", + "optional": true, + "engines": { + "node": ">=6" + } + }, "node_modules/expect-type": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.4.0.tgz", @@ -4751,6 +4721,13 @@ } } }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "license": "MIT", + "optional": true + }, "node_modules/focus-trap": { "version": "7.8.0", "resolved": "https://registry.npmjs.org/focus-trap/-/focus-trap-7.8.0.tgz", @@ -4793,6 +4770,29 @@ "node": ">=18.3.0" } }, + "node_modules/frida": { + "version": "17.23.2", + "resolved": "https://registry.npmjs.org/frida/-/frida-17.23.2.tgz", + "integrity": "sha512-gRCmmTUFdEILyHRN1b66erRoXafwsfWTqXyoBBqkSCFX0Ue7Jhvs/KhA3JO0XrgITNlPd91QAGsFvWzh0mhVgg==", + "hasInstallScript": true, + "license": "LGPL-2.0 WITH WxWindows-exception-3.1", + "optional": true, + "dependencies": { + "bindings": "^1.5.0", + "minimatch": "^10.0.1", + "prebuild-install": "^7.1.3" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "license": "MIT", + "optional": true + }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -4880,6 +4880,13 @@ "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" } }, + "node_modules/github-from-package": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", + "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==", + "license": "MIT", + "optional": true + }, "node_modules/glob": { "version": "13.0.6", "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz", @@ -5119,6 +5126,13 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "license": "ISC" }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "license": "ISC", + "optional": true + }, "node_modules/is-callable": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", @@ -5555,9 +5569,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MPL-2.0", "optional": true, "os": [ @@ -5580,9 +5591,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MPL-2.0", "optional": true, "os": [ @@ -5605,9 +5613,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MPL-2.0", "optional": true, "os": [ @@ -5630,9 +5635,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MPL-2.0", "optional": true, "os": [ @@ -6070,6 +6072,13 @@ "dev": true, "license": "MIT" }, + "node_modules/mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", + "license": "MIT", + "optional": true + }, "node_modules/nanoid": { "version": "3.3.20", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz", @@ -6089,6 +6098,26 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/napi-build-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-2.0.0.tgz", + "integrity": "sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA==", + "license": "MIT", + "optional": true + }, + "node_modules/node-abi": { + "version": "3.98.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.98.0.tgz", + "integrity": "sha512-Llh8noNw7s15m+rmIrZnZQbe4gLyasL9loT74rC92PkmwWKeEedKvc7o6pjp8B3MhrYT/Cl846NOYZbz1wmddw==", + "license": "MIT", + "optional": true, + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/obug": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/obug/-/obug-2.2.1.tgz", @@ -6554,6 +6583,34 @@ } } }, + "node_modules/prebuild-install": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.3.tgz", + "integrity": "sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug==", + "deprecated": "No longer maintained. Please contact the author of the relevant native addon; alternatives are available.", + "license": "MIT", + "optional": true, + "dependencies": { + "detect-libc": "^2.0.0", + "expand-template": "^2.0.3", + "github-from-package": "0.0.0", + "minimist": "^1.2.3", + "mkdirp-classic": "^0.5.3", + "napi-build-utils": "^2.0.0", + "node-abi": "^3.3.0", + "pump": "^3.0.0", + "rc": "^1.2.7", + "simple-get": "^4.0.0", + "tar-fs": "^2.0.0", + "tunnel-agent": "^0.6.0" + }, + "bin": { + "prebuild-install": "bin.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", @@ -6590,6 +6647,17 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/pump": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.4.tgz", + "integrity": "sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA==", + "license": "MIT", + "optional": true, + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, "node_modules/pure-rand": { "version": "8.4.2", "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-8.4.2.tgz", @@ -6613,6 +6681,32 @@ "integrity": "sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==", "license": "MIT" }, + "node_modules/rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", + "optional": true, + "dependencies": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "bin": { + "rc": "cli.js" + } + }, + "node_modules/rc/node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/readable-stream": { "version": "4.7.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz", @@ -7178,6 +7272,51 @@ "dev": true, "license": "MIT" }, + "node_modules/tar-fs": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.5.tgz", + "integrity": "sha512-OboTd8mmMhZDNPV+UjQcK9yKAatXu2aJ+r1w4im1Otd4M4fl2hwvdoXUxIYHFTHWK/3y3FarBP70v3vwmGlOxw==", + "license": "MIT", + "optional": true, + "dependencies": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "license": "MIT", + "optional": true, + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tar-stream/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "license": "MIT", + "optional": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/thread-stream": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/thread-stream/-/thread-stream-4.2.0.tgz", @@ -7286,6 +7425,19 @@ "license": "0BSD", "optional": true }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, "node_modules/turbo": { "version": "2.11.7", "resolved": "https://registry.npmjs.org/turbo/-/turbo-2.11.7.tgz", @@ -7458,6 +7610,13 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT", + "optional": true + }, "node_modules/vfile": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz", diff --git a/package.json b/package.json index a237362b7..b2e2a51d3 100644 --- a/package.json +++ b/package.json @@ -69,6 +69,8 @@ "scripts/prepare.mjs", "skills", "README.md", + "DISCLAIMER.md", + "THIRD_PARTY_NOTICES.md", "LICENSE", "native/windows/build/manifest.json", "native/windows/build/rea-windows-x64.node", @@ -87,7 +89,7 @@ "bridge/pwndbg/core_context.py", "third_party/pwndbg/README.md", "third_party/pwndbg/LICENSE.md", - "licenses/nativeaot-parser-MIT.txt" + "licenses" ], "scripts": { "release:notes": "node scripts/release-notes.mjs", @@ -100,31 +102,35 @@ "prebuild": "npm run deps:check", "build": "node scripts/run-exclusive.mjs artifacts turbo run artifacts:skills --force", "precheck": "npm run deps:check", - "check": "node scripts/run-exclusive.mjs artifacts turbo run typecheck lint format:check knip metadata:check && npm run verify:architecture-guards", + "check": "node scripts/run-exclusive.mjs artifacts turbo run typecheck lint:built format:check knip metadata:check && npm run verify:architecture-guards", "precheck:fast": "npm run deps:check", "check:fast": "turbo run typecheck lint --output-logs=errors-only", "precheck:changed": "npm run deps:check", "check:changed": "npm run check:fast && npm run test:changed", "precheck:test": "npm run deps:check", - "check:test": "node scripts/run-exclusive.mjs artifacts turbo run typecheck lint format:check knip metadata:check test:run", + "check:test": "node scripts/run-exclusive.mjs artifacts turbo run typecheck lint:built format:check knip metadata:check test:run", "precheck:pr": "npm run deps:check", - "check:pr": "node scripts/run-exclusive.mjs artifacts turbo run typecheck lint format:check knip metadata:check test:run && npm run docs:check && npm run jscpd && npm run scan:todos", + "check:pr": "node scripts/run-exclusive.mjs artifacts turbo run typecheck lint:built format:check knip metadata:check test:run && npm run test:python && npm run docs:check && npm run jscpd && npm run scan:todos", "precheck:ci": "npm run deps:check", - "check:ci": "node scripts/run-exclusive.mjs artifacts turbo run typecheck lint format:check knip metadata:check jscpd scan:todos && npm run verify:architecture-guards", + "check:ci": "node scripts/run-exclusive.mjs artifacts turbo run typecheck lint:built format:check knip metadata:check jscpd scan:todos && npm run verify:architecture-guards", "build:cached": "node scripts/check-dependency-install.mjs && node scripts/run-exclusive.mjs artifacts turbo run artifacts:skills", "build:termux": "node scripts/run-exclusive.mjs artifacts npm run build:termux:run", "build:termux:run": "npm run compile:termux && npm run artifacts:skills", "format": "oxfmt .", "format:check": "oxfmt --check .", - "lint": "oxlint && npm run verify:module-boundaries", + "lint": "node scripts/ci/static-check-report.mjs lint && npm run verify:module-boundaries", + "lint:details": "oxlint && npm run verify:module-boundaries", + "lint:built": "npm run lint", "lint:fix": "oxlint --fix && npm run verify:module-boundaries", "knip": "knip", - "jscpd": "jscpd src/ tests/", + "jscpd": "node scripts/ci/static-check-report.mjs duplicates", + "jscpd:details": "jscpd src/ tests/ --no-tips", "scan:todos": "node scripts/scan-todos.mjs", "start": "node scripts/rea.mjs mcp", "test": "npm run test:with-build", "test:with-build": "npm run test:prepare && vitest run", "test:run": "vitest run", + "test:python": "python3 -m unittest bridge/native/test_rea_lldb_tracer.py -v && python3 -m unittest discover -s experiments/analysis-efficiency -p 'test_*.py' -v", "test:local": "node scripts/run-development-tests.mjs local", "test:fast": "vitest run --project domain --project services --project adapters --project composition --project conformance --project evaluation", "pretest:boundary": "npm run test:prepare", @@ -161,10 +167,13 @@ "verify:legacy-simulator": "npm run build:cached && node scripts/verify/apple/legacy-simulator.mjs", "verify:architecture-guards": "node scripts/verify/architecture-guards.mjs", "verify:apktool": "npm run build:cached && node scripts/verify-apktool.mjs", + "verify:pcap": "npm run build:cached && node scripts/verify-pcap.mjs", + "verify:flutter": "npm run build:cached && node scripts/verify-flutter.mjs", "verify:adb": "npm run build:cached && node scripts/verify-adb.mjs", "verify:ghidra": "npm run build:cached && node scripts/verify-real-ghidra.mjs", "verify:ghidra:seeds": "npm run build:cached && node scripts/verify/ghidra/seeds.mjs", "verify:ghidra:mips": "npm run build:cached && node scripts/verify-real-ghidra-mips.mjs", + "verify:ghidra:riscv": "npm run build:cached && node scripts/verify-real-ghidra-riscv.mjs", "verify:ghidra:mips-shared": "npm run build:cached && node scripts/verify-real-ghidra-mips-shared.mjs", "verify:ghidra:mips-relocatable": "npm run build:cached && node scripts/verify-real-ghidra-mips-relocatable.mjs", "verify:ghidra:swift": "npm run build:cached && node scripts/verify-real-ghidra-swift.mjs", @@ -173,11 +182,14 @@ "verify:ghidra:dos": "npm run build:cached && node scripts/verify-real-ghidra-dos.mjs", "verify:ghidra:com": "npm run build:cached && node scripts/verify-real-ghidra-com.mjs", "verify:ghidra:raw": "npm run build:cached && node scripts/verify-real-ghidra-raw.mjs", + "verify:ghidra:address-context": "npm run build:cached && node scripts/verify-real-ghidra-address-context.mjs", "verify:ghidra:aarch64-jump-table": "npm run build:cached && node scripts/verify-real-ghidra.mjs --aarch64-jump-table", "verify:interface-builder": "npm run build:cached && node scripts/verify/apple/interface-builder.mjs", "verify:ghidra:cross-format": "npm run build:cached && node scripts/verify-real-ghidra.mjs --cross-format", "verify:ghidra:windows": "npm run build:cached && npm run build:ghidra-windows-fixture && node scripts/verify-real-ghidra-windows.mjs", "verify:browser": "npm run build:cached && node scripts/verify-real-browser.mjs", + "verify:frida": "npm run build:cached && node scripts/verify-frida.mjs", + "verify:frida:bindings": "tsc --noEmit -p tsconfig.frida-verification.json", "verify:browser:dom": "node scripts/verify-browser-dom-destinations.mjs", "verify:browser:network": "npm run build:cached && node scripts/verify-browser-network.mjs", "verify:electron": "npm run build:cached && node scripts/verify-real-electron.mjs", @@ -196,7 +208,7 @@ "fixtures:harmony": "node scripts/fixtures/harmony/fetch.mjs", "verify:agent": "npm run build:cached && node scripts/verify-agent-experience.mjs", "verify:hopper:linux": "npm run verify:fixtures && npm run build:cached && node scripts/verify-real-hopper-linux.mjs", - "verify:setup:linux": "npm run build:cached && node scripts/verify-linux-setup-e2e.mjs", + "verify:setup:linux": "npm run verify:fixtures && npm run build:cached && node scripts/verify-linux-setup-e2e.mjs", "build:fixtures": "node scripts/build-conformance-fixtures.mjs", "build:ghidra-windows-fixture": "node scripts/create-ghidra-windows-fixture.mjs", "verify:fixtures": "npm run build:fixtures && node scripts/verify-conformance-fixtures.mjs", @@ -225,8 +237,8 @@ "docs:build": "vitepress build docs", "docs:preview": "vitepress preview docs", "docs:generate": "node scripts/check-dependency-install.mjs && node scripts/run-exclusive.mjs artifacts npm run docs:prepare", - "docs:check": "node scripts/check-dependency-install.mjs && node scripts/run-exclusive.mjs artifacts turbo run docs:check:built", - "docs:check:built": "node scripts/generate-package-metadata.mjs --check && node scripts/generate-skill-metadata.mjs --check && node scripts/generate-product-catalog.mjs --check && node scripts/generate-completion-ledger.mjs --check && node scripts/check-doc-facts.mjs && node scripts/generate-error-schema.mjs --check", + "docs:check": "node scripts/check-dependency-install.mjs && node scripts/run-exclusive.mjs artifacts turbo run docs:check:built && npm run test:local -- tests/conformance/readmeConsistency.test.ts", + "docs:check:built": "node scripts/generate-package-metadata.mjs --check && node scripts/generate-skill-metadata.mjs --check && node scripts/generate-product-catalog.mjs --check && node scripts/generate-completion-ledger.mjs --check && node scripts/check-doc-facts.mjs && node scripts/generate-error-schema.mjs --check && npm run licenses:check", "docs:error-schema": "node scripts/check-dependency-install.mjs && node scripts/run-exclusive.mjs artifacts turbo run artifacts:error-schema", "prepack": "node scripts/prepack.mjs", "prepare": "node scripts/prepare.mjs", @@ -234,6 +246,8 @@ "verify:native-calls": "npm run build:cached && node scripts/verify-native-calls.mjs", "verify:native-ui:permissions": "npm run build:cached && node scripts/verify-native-ui.mjs --allow-permission-denial", "test:focused": "node scripts/run-development-tests.mjs focused", + "test:sqlite": "npm run test:prepare && npm run test:sqlite:run", + "test:sqlite:run": "vitest run src/application/sqlite/ tests/boundary/sqlite/ tests/acceptance/sqliteDatabaseCli.test.ts tests/boundary/mcp/serverLifecycleMcp.test.ts", "build:windows-native": "node scripts/build-windows-native.mjs", "verify:windows-native:artifact": "node scripts/verify-windows-native-artifact.mjs", "prepublishOnly": "npm run verify:windows-native:artifact", @@ -266,7 +280,10 @@ "artifacts:error-schema": "node scripts/generate-error-schema.mjs", "test:prepare": "node scripts/check-dependency-install.mjs && node scripts/run-exclusive.mjs artifacts turbo run artifacts:mcp-catalog artifacts:product-catalog artifacts:managed-evidence", "evidence:check:built": "node scripts/generate-completion-ledger.mjs --check", - "docs:prepare": "node scripts/generate-package-metadata.mjs && turbo run artifacts:product-catalog artifacts:managed-evidence artifacts:error-schema" + "docs:prepare": "node scripts/generate-package-metadata.mjs && turbo run artifacts:product-catalog artifacts:managed-evidence artifacts:error-schema", + "verify:web:qlog": "npm run build:cached && node scripts/verify-qlog-captures.mjs", + "licenses:generate": "node scripts/generate-third-party-inventory.mjs", + "licenses:check": "node scripts/generate-third-party-inventory.mjs --check" }, "lint-staged": { "*.{cjs,cts,js,jsx,mjs,mts,ts,tsx}": [ @@ -308,6 +325,7 @@ "smol-toml": "1.9.0", "stream-chain": "4.2.6", "stream-json": "3.7.0", + "tokenx": "1.3.0", "write-file-atomic": "7.0.0", "ws": "8.21.0", "yaml": "2.9.0", @@ -338,5 +356,11 @@ "typescript-termux": "npm:typescript@5.9.3", "vitepress": "1.6.4", "vitest": "5.0.3" + }, + "optionalDependencies": { + "frida": "17.23.2" + }, + "allowScripts": { + "frida@17.23.2": true } } diff --git a/scripts/bundle-runtime.mjs b/scripts/bundle-runtime.mjs index bac18ed2c..6b6b45140 100644 --- a/scripts/bundle-runtime.mjs +++ b/scripts/bundle-runtime.mjs @@ -24,7 +24,7 @@ export const bundleRuntime = async (root) => { { cli: "cli.js", cliOutput: "cliOutput.js", - streamedJsonOutput: "cli/streamedJsonOutput.js", + cliResultOutput: "cli/cliResultOutput.js", mcpDoctor: "mcpDoctor.js", }, ], diff --git a/scripts/ci/baseline.mjs b/scripts/ci/baseline.mjs new file mode 100644 index 000000000..171bd7dd3 --- /dev/null +++ b/scripts/ci/baseline.mjs @@ -0,0 +1,76 @@ +import { execFileSync } from "node:child_process"; +import { appendFileSync } from "node:fs"; + +const repository = process.env.CI_REPOSITORY; +const branch = process.env.CI_DEFAULT_BRANCH; +const head = process.env.HEAD_SHA; +const shaPattern = /^[0-9a-f]{40}$/i; + +function ancestor(base) { + try { + execFileSync("git", ["merge-base", "--is-ancestor", base, head], { + stdio: "ignore", + }); + return true; + } catch { + return false; + } +} + +function write(base, reason) { + const output = { base, reason }; + if (process.env.GITHUB_OUTPUT) { + appendFileSync( + process.env.GITHUB_OUTPUT, + `base=${base}\nreason=${reason.replace(/[\r\n]/g, " ")}\n`, + ); + } + console.log(JSON.stringify(output)); +} + +if (!repository || !branch || !head || !shaPattern.test(head)) { + write("", "Repository, default branch, or checked-out head is invalid"); +} else { + try { + const response = execFileSync( + "gh", + [ + "api", + "--method", + "GET", + `repos/${repository}/actions/workflows/ci.yml/runs`, + "-f", + `branch=${branch}`, + "-f", + "event=push", + "-f", + "status=success", + "-F", + "per_page=100", + ], + { encoding: "utf8", timeout: 15_000, maxBuffer: 4 * 1024 * 1024 }, + ); + const runs = JSON.parse(response).workflow_runs; + if (!Array.isArray(runs)) + throw new Error("GitHub returned no workflow run list"); + const base = runs.find( + (run) => + run?.event === "push" && + run?.conclusion === "success" && + run?.head_branch === branch && + run?.head_repository?.full_name === repository && + typeof run?.head_sha === "string" && + shaPattern.test(run.head_sha) && + run.head_sha.toLowerCase() !== head.toLowerCase() && + ancestor(run.head_sha), + )?.head_sha; + if (base) write(base, ""); + else + write( + "", + "No trusted successful CI push baseline is an ancestor of this head", + ); + } catch { + write("", "Could not read a successful CI push baseline from GitHub"); + } +} diff --git a/scripts/ci/job-timings-batch.mjs b/scripts/ci/job-timings-batch.mjs new file mode 100644 index 000000000..842e884f0 --- /dev/null +++ b/scripts/ci/job-timings-batch.mjs @@ -0,0 +1,268 @@ +import { execFile } from "node:child_process"; +import { appendFile, mkdir, writeFile } from "node:fs/promises"; +import { join, resolve } from "node:path"; +import { promisify } from "node:util"; +import { fileURLToPath } from "node:url"; + +import { collectJobTimings } from "./job-timings.mjs"; + +const execFileAsync = promisify(execFile); +const OUTPUT_DIRECTORY = join(".cache", "ci-job-timings"); +const MAX_BUFFER = 16 * 1024 * 1024; +const API_TIMEOUT_MS = 30_000; +const WORKFLOWS = [ + { id: "ci.yml", name: "CI" }, + { id: "release.yml", name: "Release" }, +]; +const LOOKBACK_MS = 24 * 60 * 60 * 1_000; +const MAX_RUNS_PER_WORKFLOW = 100; +const TIME_BUDGET_MS = 240_000; + +/** Collect a bounded recent sample of completed CI and Release attempts. */ +export async function collectJobTimingsBatch({ + repository, + outputDirectory = OUTPUT_DIRECTORY, + observedAt = new Date().toISOString(), + env = process.env, + now = Date.now, + collect = collectJobTimings, +} = {}) { + const identity = validateRepository(repository); + const started = now(); + const cutoff = new Date(started - LOOKBACK_MS).toISOString(); + const manifest = { + schemaVersion: 1, + observedAt, + repository: identity, + selection: { + workflows: WORKFLOWS, + status: "completed", + createdAfter: cutoff, + lookbackHours: 24, + overlap: "Each hourly run re-reads the preceding 24 hours.", + pagination: + "Run listings use the first 100; jobs are paginated within the remaining time and 16 MiB response limits.", + maxRunsPerWorkflow: MAX_RUNS_PER_WORKFLOW, + timeBudgetMs: TIME_BUDGET_MS, + exhaustive: false, + }, + coverage: { + workflowsQueried: [], + runsListed: 0, + selectedRuns: 0, + collectedRuns: 0, + }, + truncation: [], + errors: [], + runs: [], + elapsedMs: 0, + }; + const budgetExpired = () => now() - started >= TIME_BUDGET_MS; + + const selected = []; + for (const workflow of WORKFLOWS) { + if (budgetExpired()) { + manifest.truncation.push("Time budget reached while listing workflows."); + break; + } + try { + const response = await apiJson( + `repos/${identity}/actions/workflows/${workflow.id}/runs?status=completed&created=%3E%3D${encodeURIComponent(cutoff)}&per_page=${String(MAX_RUNS_PER_WORKFLOW)}&page=1`, + env, + started, + now, + ); + if (!Array.isArray(response.workflow_runs)) + throw new Error("run listing must contain a workflow_runs array"); + manifest.coverage.workflowsQueried.push(workflow.name); + manifest.coverage.runsListed += response.workflow_runs.length; + if (response.workflow_runs.length >= MAX_RUNS_PER_WORKFLOW) + manifest.truncation.push( + `${workflow.name} run listing reached the 100-run first-page limit.`, + ); + for (const run of response.workflow_runs.slice( + 0, + MAX_RUNS_PER_WORKFLOW, + )) { + if ( + run.status !== "completed" || + !Number.isSafeInteger(run.id) || + !Number.isSafeInteger(run.run_attempt) + ) { + manifest.errors.push({ + scope: `workflow:${workflow.name}`, + runId: run.id ?? null, + message: + "Run record missing completed status, numeric id, or numeric latest attempt.", + }); + continue; + } + if (run.created_at && Date.parse(run.created_at) < Date.parse(cutoff)) + continue; + selected.push({ + id: run.id, + runAttempt: run.run_attempt, + workflow: workflow.name, + conclusion: run.conclusion ?? null, + createdAt: run.created_at ?? null, + }); + } + } catch (cause) { + manifest.errors.push({ + scope: `workflow:${workflow.name}`, + message: errorMessage(cause), + }); + } + } + + selected.sort( + (left, right) => + (Date.parse(right.createdAt ?? "") || 0) - + (Date.parse(left.createdAt ?? "") || 0), + ); + manifest.coverage.selectedRuns = selected.length; + for (const run of selected) { + if (budgetExpired()) { + manifest.truncation.push( + "Time budget reached before all selected runs were collected.", + ); + break; + } + const runRecord = { + ...run, + status: "pending", + rawPath: null, + reportPath: null, + error: null, + }; + manifest.runs.push(runRecord); + const runDirectory = join( + outputDirectory, + "runs", + `${String(run.id)}-${String(run.runAttempt)}`, + ); + try { + const result = await collect({ + repository: identity, + runId: String(run.id), + runAttempt: String(run.runAttempt), + outputDirectory: runDirectory, + env, + timeoutMs: Math.max( + 1, + Math.min(API_TIMEOUT_MS, TIME_BUDGET_MS - (now() - started)), + ), + }); + runRecord.status = "collected"; + runRecord.rawPath = result.rawPath; + runRecord.reportPath = result.reportPath; + manifest.coverage.collectedRuns += 1; + } catch (cause) { + runRecord.status = "error"; + runRecord.error = errorMessage(cause); + manifest.errors.push({ + scope: "run", + runId: run.id, + runAttempt: run.runAttempt, + message: runRecord.error, + }); + } + } + if (budgetExpired() && manifest.runs.length < manifest.coverage.selectedRuns) + manifest.truncation.push( + "Time budget reached; selected runs remain unattempted.", + ); + return await writeManifest(outputDirectory, manifest, started, now, env); +} + +function validateRepository(repository) { + if ( + typeof repository !== "string" || + !/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/u.test(repository) + ) + throw new Error( + "CI_REPOSITORY must be an owner/name repository identifier", + ); + return repository; +} + +async function apiJson(endpoint, env, started, now) { + const timeout = Math.max( + 1, + Math.min(API_TIMEOUT_MS, TIME_BUDGET_MS - (now() - started)), + ); + const { stdout } = await execFileAsync("gh", ["api", endpoint], { + env, + encoding: "utf8", + maxBuffer: MAX_BUFFER, + timeout, + }); + try { + return JSON.parse(stdout); + } catch (cause) { + throw new Error("GitHub Actions API returned malformed JSON", { cause }); + } +} + +async function writeManifest(outputDirectory, manifest, started, now, env) { + manifest.elapsedMs = Math.max(0, now() - started); + if ( + manifest.elapsedMs >= TIME_BUDGET_MS && + !manifest.truncation.some((item) => item.includes("Time budget")) + ) + manifest.truncation.push("Time budget reached."); + await mkdir(outputDirectory, { recursive: true }); + const manifestPath = join(outputDirectory, "batch-manifest.json"); + await writeFile( + manifestPath, + `${JSON.stringify(manifest, null, 2)}\n`, + "utf8", + ); + if (env.GITHUB_STEP_SUMMARY) + await appendBatchSummary(env.GITHUB_STEP_SUMMARY, manifest, manifestPath); + return { manifestPath, manifest }; +} + +async function appendBatchSummary(summaryPath, manifest, manifestPath) { + const collected = manifest.runs.filter( + ({ status }) => status === "collected", + ).length; + const failed = manifest.runs.filter( + ({ status }) => status === "error", + ).length; + const lines = [ + "### Batched CI timing snapshot", + "", + `Observed ${manifest.observedAt}; collected ${String(collected)} of ${String(manifest.coverage.selectedRuns)} selected recent completed runs (${String(failed)} run errors).`, + `Coverage uses the first ${String(MAX_RUNS_PER_WORKFLOW)} runs per workflow created in the preceding 24 hours and a ${String(TIME_BUDGET_MS / 1_000)} second total budget. This sample is bounded and is not exhaustive.`, + `Manifest: \`${manifestPath}\`.`, + ...manifest.truncation.map((message) => `- Truncated: ${message}`), + ...manifest.errors.map( + ({ scope, message }) => `- Error (${scope}): ${message}`, + ), + "", + ]; + await appendFile(summaryPath, lines.join("\n"), "utf8"); +} + +function errorMessage(cause) { + return cause instanceof Error ? cause.message : String(cause); +} + +if ( + process.argv[1] !== undefined && + resolve(process.argv[1]) === fileURLToPath(import.meta.url) +) { + try { + const result = await collectJobTimingsBatch({ + repository: process.env.CI_REPOSITORY, + outputDirectory: process.env.CI_JOB_TIMINGS_DIRECTORY ?? OUTPUT_DIRECTORY, + }); + process.stdout.write( + `Wrote batch manifest for ${String(result.manifest.coverage.collectedRuns)} collected runs to ${result.manifestPath}\n`, + ); + } catch (cause) { + process.stderr.write(`CI timing batch failed: ${errorMessage(cause)}\n`); + process.exitCode = 1; + } +} diff --git a/scripts/ci/job-timings.mjs b/scripts/ci/job-timings.mjs new file mode 100644 index 000000000..4d96f91b0 --- /dev/null +++ b/scripts/ci/job-timings.mjs @@ -0,0 +1,354 @@ +import { execFile } from "node:child_process"; +import { mkdir, readFile, writeFile } from "node:fs/promises"; +import { dirname, join, resolve } from "node:path"; +import { promisify } from "node:util"; +import { fileURLToPath } from "node:url"; + +const execFileAsync = promisify(execFile); +const MAX_BUFFER = 16 * 1024 * 1024; +const TIMEOUT_MS = 30_000; +const OUTPUT_DIRECTORY = join(".cache", "ci-job-timings"); +const STEP_COSTS = [ + { key: "npmCi", pattern: /\bnpm ci\b/iu }, + { key: "artifactUpload", pattern: /upload.*artifact/iu }, + { key: "artifactDownload", pattern: /download.*artifact/iu }, +]; + +/** Fetch and summarize one workflow attempt without turning telemetry into a gate. */ +export async function collectJobTimings({ + repository, + runId, + runAttempt, + outputDirectory = OUTPUT_DIRECTORY, + summaryPath, + observedAt = new Date().toISOString(), + env = process.env, + timeoutMs = TIMEOUT_MS, +}) { + const identity = validateIdentity({ repository, runId, runAttempt }); + const endpoint = `repos/${identity.repository}/actions/runs/${identity.runId}/attempts/${identity.runAttempt}/jobs?per_page=100`; + const { stdout } = await execFileAsync( + "gh", + ["api", "--paginate", "--slurp", endpoint], + { env, encoding: "utf8", maxBuffer: MAX_BUFFER, timeout: timeoutMs }, + ); + const rawPath = join(outputDirectory, "jobs.json"); + const reportPath = join(outputDirectory, "report.json"); + await mkdir(outputDirectory, { recursive: true }); + await writeFile(rawPath, stdout, "utf8"); + const pages = parsePages(stdout); + const jobs = pages.flatMap(({ jobs: pageJobs }, index) => + validateJobs(pageJobs, index), + ); + const report = normalizeReport({ identity, jobs, observedAt }); + + await writeFile(reportPath, `${JSON.stringify(report, null, 2)}\n`, "utf8"); + if (summaryPath !== undefined) + await appendSummary(summaryPath, report, rawPath, reportPath); + return { rawPath, reportPath, report }; +} + +function validateIdentity({ repository, runId, runAttempt }) { + if ( + typeof repository !== "string" || + !/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/u.test(repository) + ) + throw new Error( + "CI_REPOSITORY must be an owner/name repository identifier", + ); + return { + repository, + runId: parsePositiveInteger(runId, "CI_TIMING_RUN_ID"), + runAttempt: parsePositiveInteger(runAttempt, "CI_TIMING_RUN_ATTEMPT"), + }; +} + +function parsePositiveInteger(value, name) { + if (typeof value === "string" && /^[1-9]\d*$/u.test(value)) { + const parsed = Number(value); + if (Number.isSafeInteger(parsed)) return parsed; + } + throw new Error(`${name} must be a positive safe integer`); +} + +function parsePages(stdout) { + let pages; + try { + pages = JSON.parse(stdout); + } catch (cause) { + throw new Error("GitHub jobs API returned malformed JSON", { cause }); + } + if (!Array.isArray(pages) || pages.length === 0) + throw new Error("GitHub jobs API slurp must contain a nonempty page array"); + for (const page of pages) + if ( + typeof page !== "object" || + page === null || + Array.isArray(page) || + !Array.isArray(page.jobs) + ) + throw new Error("GitHub jobs API page must contain a jobs array"); + return pages; +} + +function validateJobs(jobs, pageIndex) { + return jobs.map((job, jobIndex) => { + if ( + typeof job !== "object" || + job === null || + Array.isArray(job) || + typeof job.name !== "string" || + job.name.length === 0 || + typeof job.status !== "string" + ) + throw new Error( + `GitHub jobs API page ${String(pageIndex + 1)} job ${String(jobIndex + 1)} is malformed`, + ); + return job; + }); +} + +function normalizeReport({ identity, jobs, observedAt }) { + const normalizedJobs = jobs.map(normalizeJob); + const queues = normalizedJobs + .map(({ queue }) => queue.seconds) + .filter((value) => value !== null); + const completedExecutions = normalizedJobs + .filter( + ({ status, conclusion }) => + status === "completed" && conclusion !== "skipped", + ) + .map(({ execution }) => execution.seconds) + .filter((value) => value !== null); + const completedDurationSumSeconds = completedExecutions.reduce( + (sum, seconds) => sum + seconds, + 0, + ); + const completedExecutionUnknown = normalizedJobs.filter( + ({ status, conclusion, execution }) => + status === "completed" && + conclusion !== "skipped" && + execution.seconds === null, + ).length; + const skipped = normalizedJobs.filter( + ({ conclusion }) => conclusion === "skipped", + ).length; + const costs = Object.fromEntries(STEP_COSTS.map(({ key }) => [key, []])); + for (const job of normalizedJobs) + for (const step of job.steps) + if (step.costKey !== null) + costs[step.costKey].push({ job: job.name, ...step }); + + return { + schemaVersion: 1, + run: { + ...identity, + observedAt, + snapshot: + normalizedJobs.length > 0 && + normalizedJobs.every(({ status }) => status === "completed") + ? "completed job status snapshot; unknown timestamps remain unmeasured" + : "partial; job statuses may still be queued or in progress", + }, + counts: { + jobs: normalizedJobs.length, + completed: normalizedJobs.filter(({ status }) => status === "completed") + .length, + skipped, + queueUnknown: normalizedJobs.filter(({ queue }) => queue.seconds === null) + .length, + executionUnknown: normalizedJobs.filter( + ({ execution }) => execution.seconds === null, + ).length, + completedExecutionUnknown, + }, + aggregates: { + queueSeconds: percentileSummary(queues), + completedExecutionSeconds: percentileSummary(completedExecutions), + summedCompletedJobElapsedSeconds: { + value: + completedExecutions.length === 0 + ? null + : round(completedDurationSumSeconds), + knownCount: completedExecutions.length, + unknownCount: completedExecutionUnknown, + label: + "sum of known completed job elapsed durations; incomplete when timestamps are unknown; not CPU time, billing, or workflow wall time", + }, + }, + jobs: normalizedJobs, + stepCostInterpretation: + "Matched install/artifact steps by step name; these are not total artifact transfer costs.", + stepCosts: costs, + }; +} + +function normalizeJob(job) { + const skipped = job.conclusion === "skipped"; + const hasStarted = ["in_progress", "completed"].includes(job.status); + const queue = skipped + ? unknownDuration("job was skipped") + : !hasStarted + ? unknownDuration("job start is not established by its status") + : duration(job.created_at, job.started_at); + const execution = skipped + ? unknownDuration("job was skipped") + : job.status === "completed" + ? duration(job.started_at, job.completed_at) + : unknownDuration("job is not completed"); + const steps = Array.isArray(job.steps) ? job.steps.map(normalizeStep) : []; + return { + id: Number.isSafeInteger(job.id) && job.id > 0 ? job.id : null, + url: stringOrNull(job.html_url), + name: job.name, + workflowName: stringOrNull(job.workflow_name), + status: job.status, + conclusion: stringOrNull(job.conclusion), + createdAt: stringOrNull(job.created_at), + startedAt: stringOrNull(job.started_at), + completedAt: stringOrNull(job.completed_at), + queue, + execution, + steps, + }; +} + +function normalizeStep(step) { + if ( + typeof step !== "object" || + step === null || + Array.isArray(step) || + typeof step.name !== "string" + ) + throw new Error("GitHub jobs API contains a malformed job step"); + const cost = STEP_COSTS.find(({ pattern }) => pattern.test(step.name)); + return { + name: step.name, + costKey: cost?.key ?? null, + duration: duration(step.started_at, step.completed_at), + }; +} + +function duration(startValue, endValue) { + if (typeof startValue !== "string" || typeof endValue !== "string") + return unknownDuration("timestamp unavailable"); + const start = Date.parse(startValue); + const end = Date.parse(endValue); + if (!Number.isFinite(start) || !Number.isFinite(end)) + return unknownDuration("invalid timestamp"); + const milliseconds = end - start; + if (!Number.isFinite(milliseconds) || milliseconds < 0) + return unknownDuration("timestamps out of order"); + return { seconds: round(milliseconds / 1_000), reason: null }; +} + +function unknownDuration(reason) { + return { seconds: null, reason }; +} + +function percentileSummary(values) { + return { + count: values.length, + p50: nearestRank(values, 0.5), + p95: nearestRank(values, 0.95), + unit: "seconds", + }; +} + +function nearestRank(values, percentile) { + if (values.length === 0) return null; + const sorted = [...values].sort((left, right) => left - right); + return round(sorted[Math.ceil(percentile * sorted.length) - 1]); +} + +function round(value) { + return Math.round(value * 1_000) / 1_000; +} + +function stringOrNull(value) { + return typeof value === "string" ? value : null; +} + +async function appendSummary(summaryPath, report, rawPath, reportPath) { + await mkdir(dirname(summaryPath), { recursive: true }); + const rows = [ + ["Queue", report.aggregates.queueSeconds], + ["Completed execution", report.aggregates.completedExecutionSeconds], + ] + .map( + ([label, item]) => + `| ${label} | ${display(item.p50)} | ${display(item.p95)} | ${String(item.count)} |`, + ) + .join("\n"); + const jobRows = report.jobs + .map( + (job) => + `| ${escapeCell(job.name)} | ${job.status} | ${job.conclusion ?? "unknown"} | ${display(job.queue.seconds)} | ${job.queue.seconds === null ? job.queue.reason : ""} | ${display(job.execution.seconds)} | ${job.execution.seconds === null ? job.execution.reason : ""} |`, + ) + .join("\n"); + const costRows = STEP_COSTS.map(({ key }) => { + const samples = report.stepCosts[key]; + const values = samples + .map(({ duration: item }) => item.seconds) + .filter((value) => value !== null); + return `| ${key} | ${String(samples.length)} | ${display(nearestRank(values, 0.5))} | ${samples.filter(({ duration: item }) => item.seconds === null).length} |`; + }).join("\n"); + const text = [ + "### CI job timing snapshot", + "", + `Observed at ${report.run.observedAt} for run ${String(report.run.runId)}, attempt ${String(report.run.runAttempt)}. This is a point-in-time snapshot of fetched jobs. Queue starts at job creation and excludes preceding dependency waiting. Missing, queued, in-progress, invalid, or out-of-order timestamps are reported as unknown. Elapsed durations are not CPU time or billing data.`, + "", + `Fetched ${String(report.counts.jobs)} jobs; ${String(report.counts.completed)} are completed (${String(report.counts.skipped)} skipped); ${String(report.counts.queueUnknown)} queue durations and ${String(report.counts.executionUnknown)} execution durations (${String(report.counts.completedExecutionUnknown)} for non-skipped completed jobs) are unknown.`, + "", + "| Metric | p50 (s) | p95 (s) | Samples |", + "| --- | ---: | ---: | ---: |", + rows, + "", + "| Job | Status | Conclusion | Queue (s) | Queue detail | Execution (s) | Execution detail |", + "| --- | --- | --- | ---: | --- | ---: | --- |", + jobRows, + "", + `Sum of known completed job elapsed durations: **${display(report.aggregates.summedCompletedJobElapsedSeconds.value)} s** across ${String(report.aggregates.summedCompletedJobElapsedSeconds.knownCount)} known and ${String(report.aggregates.summedCompletedJobElapsedSeconds.unknownCount)} unknown jobs; this is not CPU time, billing, or workflow wall time.`, + "", + "Matched install/artifact steps by name; these are not total artifact transfer costs.", + "", + "| Matched step group | Samples | p50 (s) | Unknown |", + "| --- | ---: | ---: | ---: |", + costRows, + "", + `Reports: \`${rawPath}\`, \`${reportPath}\`.`, + "", + ].join("\n"); + await writeFile(summaryPath, text, { encoding: "utf8", flag: "a" }); +} + +function display(value) { + return value === null ? "unknown" : String(value); +} + +function escapeCell(value) { + return value.replaceAll("|", "\\|").replaceAll("\n", " "); +} + +if ( + process.argv[1] !== undefined && + resolve(process.argv[1]) === fileURLToPath(import.meta.url) +) { + try { + const result = await collectJobTimings({ + repository: process.env.CI_REPOSITORY, + runId: process.env.CI_TIMING_RUN_ID, + runAttempt: process.env.CI_TIMING_RUN_ATTEMPT, + outputDirectory: process.env.CI_JOB_TIMINGS_DIRECTORY ?? OUTPUT_DIRECTORY, + summaryPath: process.env.GITHUB_STEP_SUMMARY, + }); + process.stdout.write( + `Wrote ${result.report.jobs.length} job timing records to ${result.reportPath}\n`, + ); + } catch (cause) { + process.stderr.write( + `CI timing telemetry failed: ${cause instanceof Error ? cause.message : String(cause)}\n`, + ); + process.exitCode = 1; + } +} diff --git a/scripts/ci/plan.mjs b/scripts/ci/plan.mjs index a970cc57e..86879216d 100644 --- a/scripts/ci/plan.mjs +++ b/scripts/ci/plan.mjs @@ -1,24 +1,20 @@ import { execFileSync } from "node:child_process"; import { appendFileSync } from "node:fs"; import { matchesGlob } from "node:path"; -import { SCOPES } from "./scopes.mjs"; +import { CI_FLAGS as flags, MANUAL_VERIFIERS, SCOPES } from "./scopes.mjs"; +import { planTestSelection } from "./test-selection.mjs"; -const flags = [ - "code", - "runtime", - "package", - "apple", - "fixtures", - "readiness", - "docs", - "workflows", - ...Object.keys(SCOPES), -]; +// Test files select the host/runtime lanes that execute their focused suites. +const HOST_TEST_OWNERS = ["apple", "package", "sqlite"]; // Actionlint validates workflow syntax only. The semantic suite asserts these // workflows' release, publication and self-hosted runner safeguards. const GUARDED_WORKFLOWS = new Set([ + ".github/workflows/pr-title.yml", + ".github/workflows/ci-full-pr.yml", ".github/workflows/release.yml", ".github/workflows/real-ghidra-windows.yml", + ".github/workflows/sqlite-runtime.yml", + ".github/workflows/ci-timings.yml", ]); // Sources compiled by build-conformance-fixtures.mjs. The readiness journey // analyzes the built C fixture as well as its own applications. @@ -30,6 +26,15 @@ const FIXTURE_SOURCES = [ "tests/conformance/versions/**", ]; const READINESS_SOURCES = ["tests/conformance/readiness/**"]; +// These reporters affect CI output only; they do not select a host or provider +// verification lane when changed on their own. +const PORTABLE_CI_REPORTERS = new Set([ + "scripts/ci/job-timings.mjs", + "scripts/ci/job-timings-batch.mjs", + "scripts/ci/test-report.mjs", + "scripts/ci/test-timing-reporter.mjs", + "scripts/ci/test-history.mjs", +]); const matchesAny = (file, patterns) => patterns.some((pattern) => matchesGlob(file, pattern)); const selected = Object.fromEntries(flags.map((flag) => [flag, false])); @@ -57,6 +62,10 @@ function classifyPackage(base, head) { ]), ].filter((key) => beforeScripts?.[key] !== afterScripts?.[key]); for (const script of changed) { + if (script === "test:sqlite" || script === "test:sqlite:run") { + selected.sqlite = true; + continue; + } if ( /^(test(?::|$)|check(?::|$)|lint(?::|$)|format(?::|$)|knip$|jscpd$)/.test( script, @@ -87,11 +96,11 @@ function classifyPackage(base, head) { const scriptOwners = simple && entries.every((entry) => - Object.values(SCOPES).some((patterns) => patterns.includes(entry)), + Object.values(SCOPES).some((patterns) => matchesAny(entry, patterns)), ) ? Object.entries(SCOPES) .filter(([, patterns]) => - entries.some((entry) => patterns.includes(entry)), + entries.some((entry) => matchesAny(entry, patterns)), ) .map(([owner]) => owner) : []; @@ -102,98 +111,163 @@ function classifyPackage(base, head) { } const event = process.env.GITHUB_EVENT_NAME; -let files = []; -if ( - event === "push" || +if (!["pull_request", "push", "schedule", "workflow_dispatch"].includes(event)) + throw new Error(`Unsupported CI event: ${event}`); +const requestedFull = event === "schedule" || event === "workflow_dispatch" || - process.env.CI_FULL === "true" -) { + process.env.CI_FULL === "true"; +const tier = + event === "schedule" && + process.env.CI_SKIP_FULL === "true" && + process.env.CI_FULL !== "true" + ? "reused" + : requestedFull + ? "full" + : "fast"; +let files = []; +if (tier === "reused") { + reasons.push( + "Recent exact-SHA full qualification reused; no fresh provider observation", + ); +} else if (tier === "full") { full("Full baseline requested by event or ci:full label"); -} else if (event === "pull_request") { - const base = git("merge-base", process.env.BASE_SHA, process.env.HEAD_SHA); +} else if (event === "pull_request" || event === "push") { const head = process.env.HEAD_SHA; - // Disable rename detection so both the removed and added paths participate. - files = git("diff", "--name-only", "--no-renames", "-z", base, head) - .split("\0") - .filter(Boolean); - for (const file of files) { - if ( - /^(README(?:_[^/]+)?\.md|AGENTS\.md|CONTRIBUTING\.md)$/.test(file) || - file.startsWith("docs/") - ) { - selected.docs = true; - selected.website ||= matchesAny(file, SCOPES.website); - continue; - } - if (/^(src|tests)\/.*\.(?:test|spec)\.[cm]?[jt]sx?$/.test(file)) { - selected.code = true; - continue; - } - const owners = Object.entries(SCOPES) - .filter(([, patterns]) => - patterns.some((pattern) => matchesGlob(file, pattern)), - ) - .map(([owner]) => owner); - for (const owner of owners) selected[owner] = true; - if ( - file.startsWith(".github/workflows/") || - file === ".github/actionlint.yaml" - ) { - selected.workflows = true; - if (GUARDED_WORKFLOWS.has(file)) selected.code = true; - if (file !== ".github/workflows/ci.yml") continue; - } - if (owners.length === 1 && owners[0] === "website") continue; - if (/^src\/(contracts|domain)\//.test(file)) selected.docs = true; - if (file === "package.json") { - classifyPackage(base, head); - continue; - } - selected.code = true; - if (matchesAny(file, FIXTURE_SOURCES)) { - selected.fixtures = true; - selected.readiness = true; - } - if (matchesAny(file, READINESS_SOURCES)) selected.readiness = true; - if (file.startsWith("tests/")) continue; - if ( - /^(src\/process\/|src\/filesystem\/|src\/contracts\/tool|src\/server\/createServer|src\/cli\.ts|scripts\/ci\/)/.test( - file, - ) - ) { - full(`Shared boundary: ${file}`); - } else if (owners.length) { - if (file.startsWith("src/") || file.startsWith("bridge/")) - selected.runtime = true; - } else { - full(`Unclassified input: ${file}`); + let base; + if (event === "pull_request") { + base = git("merge-base", process.env.BASE_SHA, head); + } else { + const candidate = process.env.BASE_SHA; + const baselineReason = process.env.BASELINE_REASON; + try { + if (!candidate || !/^[0-9a-f]{40}$/i.test(candidate)) + throw new Error( + baselineReason || "No valid successful push baseline was found", + ); + execFileSync("git", ["merge-base", "--is-ancestor", candidate, head], { + stdio: "ignore", + }); + base = candidate; + } catch { + full( + baselineReason || + "No valid successful push baseline ancestor; selecting all lanes", + ); } } -} else throw new Error(`Unsupported CI event: ${event}`); + if (base) { + // Disable rename detection so both the removed and added paths participate. + files = git("diff", "--name-only", "--no-renames", "-z", base, head) + .split("\0") + .filter(Boolean); + for (const file of files) { + if ( + /^(README(?:_[^/]+)?\.md|AGENTS\.md|CONTRIBUTING\.md|CHANGELOG\.md|SECURITY\.md|native\/windows\/README\.md|\.github\/pull_request_template\.md)$/.test( + file, + ) || + file.startsWith("docs/") || + file.startsWith(".github/ISSUE_TEMPLATE/") + ) { + selected.docs = true; + selected.website ||= matchesAny(file, SCOPES.website); + continue; + } + if (/^(src|tests)\/.*\.(?:test|spec)\.[cm]?[jt]sx?$/.test(file)) { + selected.code = true; + for (const owner of HOST_TEST_OWNERS) + selected[owner] ||= matchesAny(file, SCOPES[owner]); + continue; + } + if (matchesAny(file, MANUAL_VERIFIERS)) { + selected.code = true; + continue; + } + const owners = Object.entries(SCOPES) + .filter(([, patterns]) => + patterns.some((pattern) => matchesGlob(file, pattern)), + ) + .map(([owner]) => owner); + for (const owner of owners) selected[owner] = true; + if ( + file.startsWith(".github/workflows/") || + file === ".github/actionlint.yaml" + ) { + selected.workflows = true; + if (GUARDED_WORKFLOWS.has(file)) selected.code = true; + if (file !== ".github/workflows/ci.yml") continue; + } + if (owners.length === 1 && owners[0] === "website") continue; + if (/^src\/(contracts|domain)\//.test(file)) selected.docs = true; + if (file === "package.json") { + classifyPackage(base, head); + continue; + } + selected.code = true; + if (matchesAny(file, FIXTURE_SOURCES)) { + selected.fixtures = true; + selected.readiness = true; + } + if (matchesAny(file, READINESS_SOURCES)) selected.readiness = true; + if (file.startsWith("tests/")) continue; + if (PORTABLE_CI_REPORTERS.has(file)) continue; + if ( + /^(src\/process\/|src\/filesystem\/|src\/contracts\/tool|src\/server\/createServer|src\/cli\.ts|scripts\/ci\/)/.test( + file, + ) + ) { + full(`Shared boundary: ${file}`); + } else if (owners.length) { + if (file.startsWith("src/") || file.startsWith("bridge/")) + selected.runtime = true; + } else if (/^(src|bridge)\//.test(file)) { + // Unowned runtime sources keep the Linux x64 installed-package baseline; + // full qualification retains every native host. + selected.runtime = true; + reasons.push(`Unowned runtime source: ${file}`); + } else if (file.startsWith(".agents/skills/")) { + selected.runtime = true; + selected.docs = true; + } else { + full(`Unclassified input: ${file}`); + } + } + } +} selected.runtime ||= selected.package; const linux = { os: "ubuntu-latest", platform: "linux", architecture: "x64" }; +// macOS x64 is the slowest package host. Fast qualification omits it. +const intel = + tier === "full" + ? [{ os: "macos-15-intel", platform: "darwin", architecture: "x64" }] + : []; const matrix = { include: selected.package ? [ linux, { os: "ubuntu-24.04-arm", platform: "linux", architecture: "arm64" }, { os: "macos-15", platform: "darwin", architecture: "arm64" }, - { os: "macos-15-intel", platform: "darwin", architecture: "x64" }, + ...intel, ] : [linux], }; -const plan = { ...selected, matrix, files, reasons }; +const testSelection = planTestSelection(files, event, tier); +const plan = { ...selected, tier, matrix, files, reasons, testSelection }; if (process.env.GITHUB_OUTPUT) appendFileSync( process.env.GITHUB_OUTPUT, - Object.entries({ ...selected, matrix: JSON.stringify(matrix) }) + Object.entries({ + ...selected, + tier, + matrix: JSON.stringify(matrix), + test_selection: JSON.stringify(testSelection), + }) .map(([key, value]) => `${key}=${value}\n`) .join(""), ); if (process.env.GITHUB_STEP_SUMMARY) appendFileSync( process.env.GITHUB_STEP_SUMMARY, - `### Selected CI lanes\n\n${flags.filter((flag) => selected[flag]).join(", ") || "Formatting only"}\n\n${reasons.join("\n\n")}\n`, + `### Selected CI lanes (${tier})\n\n${flags.filter((flag) => selected[flag]).join(", ") || "Formatting only"}\n\n${reasons.join("\n\n")}\n`, ); console.log(JSON.stringify(plan)); diff --git a/scripts/ci/qualification.mjs b/scripts/ci/qualification.mjs new file mode 100644 index 000000000..ab47c168f --- /dev/null +++ b/scripts/ci/qualification.mjs @@ -0,0 +1,176 @@ +import { execFileSync } from "node:child_process"; +import { appendFileSync, mkdirSync, writeFileSync } from "node:fs"; +import { resolve } from "node:path"; +import { fileURLToPath } from "node:url"; + +const ARTIFACT_NAME = "ci-full-qualification-v1"; +const MAX_AGE_MS = 24 * 60 * 60 * 1000; +const positiveId = (value) => + (typeof value === "string" || typeof value === "number") && + /^[1-9]\d*$/.test(String(value)) && + Number.isSafeInteger(Number(value)); +const commitSha = (value) => + typeof value === "string" && /^[0-9a-f]{40}$/.test(value); + +/** Record only after the required gate has verified every full-tier obligation. */ +export function recordQualification(directory) { + const sourceSha = process.env.GITHUB_SHA; + const runId = process.env.GITHUB_RUN_ID; + const runAttempt = process.env.GITHUB_RUN_ATTEMPT; + const repository = process.env.GITHUB_REPOSITORY; + if ( + !commitSha(sourceSha) || + !positiveId(runId) || + !positiveId(runAttempt) || + !repository + ) + throw new Error( + "Full qualification receipt requires source and workflow identity", + ); + const checkoutSha = execFileSync("git", ["rev-parse", "HEAD"], { + encoding: "utf8", + }).trim(); + if (checkoutSha !== sourceSha) + throw new Error("Qualification checkout differs from workflow source"); + mkdirSync(directory, { recursive: true }); + const path = resolve(directory, "receipt.json"); + writeFileSync( + path, + `${JSON.stringify( + { + schemaVersion: 1, + tier: "full", + sourceSha, + repository, + runId: Number(runId), + runAttempt: Number(runAttempt), + qualifiedAt: new Date().toISOString(), + }, + null, + 2, + )}\n`, + ); + if (process.env.GITHUB_OUTPUT) + appendFileSync( + process.env.GITHUB_OUTPUT, + `receipt_name=${ARTIFACT_NAME}\nreceipt_path=${path}\n`, + ); +} + +function admit() { + if (process.env.CI_FORCE_FULL === "true") + return { + run_full: true, + reason: "Forced daily runner and dependency refresh", + }; + const repository = process.env.CI_REPOSITORY; + const repositoryId = Number(process.env.CI_REPOSITORY_ID); + const branch = process.env.CI_DEFAULT_BRANCH; + const head = process.env.HEAD_SHA; + if (!repository || !positiveId(repositoryId) || !branch || !commitSha(head)) + return { + run_full: true, + reason: "Qualification lookup identity is incomplete", + }; + + const now = Date.now(); + const deadline = now + 20_000; + const api = (...arguments_) => { + const remaining = deadline - Date.now(); + if (remaining <= 0) + throw new Error("Qualification lookup budget exhausted"); + return JSON.parse( + execFileSync("gh", ["api", "--method", "GET", ...arguments_], { + encoding: "utf8", + timeout: Math.min(15_000, remaining), + maxBuffer: 8 * 1024 * 1024, + stdio: ["ignore", "pipe", "pipe"], + }), + ); + }; + try { + const { artifacts } = api( + `repos/${repository}/actions/artifacts`, + "-f", + `name=${ARTIFACT_NAME}`, + "-F", + "per_page=100", + ); + if (!Array.isArray(artifacts)) + throw new Error("Missing qualification artifact inventory"); + const candidates = artifacts.filter((artifact) => { + const lineage = artifact?.workflow_run; + const age = now - Date.parse(artifact?.created_at); + return ( + artifact?.name === ARTIFACT_NAME && + artifact?.expired === false && + typeof artifact?.created_at === "string" && + Number.isFinite(age) && + age >= 0 && + age < MAX_AGE_MS && + positiveId(lineage?.id) && + String(lineage.id) !== process.env.GITHUB_RUN_ID && + lineage?.repository_id === repositoryId && + lineage?.head_repository_id === repositoryId && + lineage?.head_branch === branch && + lineage?.head_sha === head + ); + }); + // Artifact metadata narrows the search before run lookups. Never scan an + // unbounded history or treat a missing receipt as a successful qualification. + for (const artifact of candidates.slice(0, 3)) { + const run = api( + `repos/${repository}/actions/runs/${artifact.workflow_run.id}`, + ); + // An old run can upload a new artifact when only its gate is rerun. + // Bound the original run age as well so retries cannot renew stale proof. + const runAge = Date.now() - Date.parse(run.created_at); + if ( + typeof run.created_at === "string" && + Number.isFinite(runAge) && + runAge >= 0 && + runAge < MAX_AGE_MS && + run.id === artifact.workflow_run.id && + run.status === "completed" && + run.conclusion === "success" && + run.path === ".github/workflows/ci.yml" && + ["schedule", "workflow_dispatch"].includes(run.event) && + run.head_sha === head && + run.head_branch === branch && + run.head_repository?.full_name === repository + ) { + return { + run_full: false, + run_id: run.id, + reason: `Reusing full qualification from run ${run.id}; no fresh provider observation`, + }; + } + } + return { + run_full: true, + reason: "No trusted full qualification for this SHA within 24 hours", + }; + } catch { + return { + run_full: true, + reason: "Qualification lookup unavailable; running full validation", + }; + } +} + +if (resolve(process.argv[1] ?? "") === fileURLToPath(import.meta.url)) { + const decision = admit(); + if (process.env.GITHUB_OUTPUT) + appendFileSync( + process.env.GITHUB_OUTPUT, + Object.entries(decision) + .map(([key, value]) => `${key}=${value}\n`) + .join(""), + ); + if (process.env.GITHUB_STEP_SUMMARY) + appendFileSync( + process.env.GITHUB_STEP_SUMMARY, + `### Scheduled qualification\n\n${decision.reason}.\n`, + ); + console.log(JSON.stringify(decision)); +} diff --git a/scripts/ci/required.mjs b/scripts/ci/required.mjs index fb5115b8e..01907de37 100644 --- a/scripts/ci/required.mjs +++ b/scripts/ci/required.mjs @@ -1,18 +1,46 @@ +import { CI_FLAGS } from "./scopes.mjs"; +import { recordQualification } from "./qualification.mjs"; + const jobs = JSON.parse(process.env.CI_JOBS); -const outputs = jobs.changes.outputs; -const required = ["changes", "static", "test"]; +const outputs = jobs?.changes?.outputs; +if (!["fast", "full", "reused"].includes(outputs?.tier)) + throw new Error( + "CI classification requires a valid tier: fast, full, or reused", + ); +const invalidFlags = CI_FLAGS.filter( + (flag) => outputs[flag] !== "true" && outputs[flag] !== "false", +); +if (invalidFlags.length) + throw new Error( + `CI classification requires explicit true/false scope outputs: ${invalidFlags.join(", ")}`, + ); +const selectedScopes = CI_FLAGS.filter((flag) => outputs[flag] === "true"); +const reused = outputs.tier === "reused"; +if ( + reused && + (process.env.GITHUB_EVENT_NAME !== "schedule" || + !/^[1-9]\d*$/.test(outputs.qualification_run_id ?? "") || + !Number.isSafeInteger(Number(outputs.qualification_run_id)) || + selectedScopes.length !== 0) +) + throw new Error( + "Reused qualification requires a scheduled admission receipt and no selected lanes", + ); +if (outputs.tier === "full" && selectedScopes.length !== CI_FLAGS.length) + throw new Error("Full qualification requires every canonical CI scope"); +const required = reused ? ["changes"] : ["changes", "static", "test"]; const lanes = { code: ["build", "test-shard"], runtime: ["windows-native-build", "package-e2e"], package: ["windows-curated"], + sqlite: ["sqlite-runtime"], apple: ["apple-artifacts"], fixtures: ["conformance-fixtures"], readiness: ["reconstruction-readiness"], docs: ["docs"], + workflows: ["static"], }; -for (const [scope, value] of Object.entries(outputs)) { - if (value === "true") required.push(...(lanes[scope] ?? [scope])); -} +for (const scope of selectedScopes) required.push(...(lanes[scope] ?? [scope])); const failed = [...new Set(required)].filter( (name) => jobs[name]?.result !== "success", ); @@ -23,3 +51,9 @@ for (const [name, job] of Object.entries(jobs)) { if (failed.length) throw new Error(`CI lanes did not pass: ${failed.join(", ")}`); console.log("Every selected CI lane passed"); +if (reused) + console.log( + `Qualification reused from run ${outputs.qualification_run_id}; no fresh provider observation`, + ); +if (outputs.tier === "full" && process.env.CI_QUALIFICATION_DIRECTORY) + recordQualification(process.env.CI_QUALIFICATION_DIRECTORY); diff --git a/scripts/ci/scopes.mjs b/scripts/ci/scopes.mjs index 93c34c4a6..a8679726c 100644 --- a/scripts/ci/scopes.mjs +++ b/scripts/ci/scopes.mjs @@ -1,6 +1,139 @@ -// Ownership of the real-provider and website verification lanes. Shared build -// inputs are classified once in plan.mjs rather than repeated in every workflow. +// Ownership of the native-host, real-provider and website verification lanes. +// Shared build inputs are classified once in plan.mjs rather than repeated in +// every workflow. export const SCOPES = { + // Apple artifact CLI/MCP lane on macOS, including its focused regressions. + apple: [ + "src/native/Apple*", + "src/native/NativeMacOS*", + "src/native/NativeUi*", + "src/native/Lldb*", + "bridge/native/**", + "bridge/process/**", + "scripts/verify/apple/**", + "tests/boundary/filesystem/installScript.test.ts", + "tests/boundary/filesystem/nibNativeHierarchy.test.ts", + "tests/boundary/filesystem/interfaceBuilderBundle.test.ts", + "tests/boundary/cli/nativePlistCli.test.ts", + "tests/boundary/cli/nativePlistPrototypeKeyCli.test.ts", + "tests/boundary/cli/nativePlistSelectionFailureCli.test.ts", + "tests/boundary/cli/nativeDemangleCli.test.ts", + "tests/boundary/mcp/nativeDemangleMcp.test.ts", + "tests/boundary/providers/native/nativeSignatureTargetBinding.test.ts", + "tests/boundary/cli/nativeSignatureCli.test.ts", + "tests/boundary/mcp/nativeSignatureTargetBindingMcp.test.ts", + "src/process/capture/FilesystemSnapshot.test.ts", + "tests/boundary/process/darwinProcessRunTokenReader.test.ts", + "tests/boundary/process/directAnalysisSignals.test.ts", + "tests/boundary/process/processCaptureLifecycle.test.ts", + "tests/boundary/process/processCli.test.ts", + "tests/boundary/mcp/sessionMcp.test.ts", + ], + // Four-host installed-package matrix and the Windows curated lane. + package: [ + "src/windows/**", + "native/windows/**", + "src/inspector/**", + "scripts/verify/inspector/**", + "scripts/verify-package.mjs", + "scripts/verify-package-*", + "scripts/verify-windows-*.mjs", + "scripts/build-windows-native.mjs", + "scripts/windows-capabilities.mjs", + "scripts/prepack.mjs", + "scripts/prepare.mjs", + "scripts/rea.mjs", + "install.sh", + "src/config/**", + "src/application/Setup*.ts", + "src/application/Uninstall*.ts", + "src/cli/interactiveSetup.ts", + "src/cli/setupCommands.ts", + "tests/boundary/filesystem/binaryTarget.test.ts", + "tests/boundary/filesystem/safeOutputTree.test.ts", + "tests/boundary/providers/native/artifactProvider.archiveSafety.test.ts", + "tests/boundary/providers/native/artifactProvider.extractionCompleteness.test.ts", + "tests/boundary/filesystem/setupUnavailableProvider.test.ts", + "tests/boundary/filesystem/windowsNpxRegistration.test.ts", + "tests/acceptance/setup/homeDirectoryFallback.test.ts", + "tests/boundary/filesystem/webScriptManifestPaths.test.ts", + "tests/boundary/process/ProcessEvidence.host.test.ts", + "tests/acceptance/webModuleCli.test.ts", + "tests/acceptance/webSourceLocationCli.test.ts", + "tests/boundary/cli/referenceSourceImportStatus.test.ts", + "tests/boundary/filesystem/asarInventoryFreshness.test.ts", + "tests/boundary/filesystem/javascript-applications/javascriptArtifactReconstruction.test.ts", + "tests/conformance/providers/ghidra/windowsCapabilities.test.ts", + "src/ghidra/GhidraInstallation.test.ts", + "tests/boundary/filesystem/ghidraJavaProbe.test.ts", + "tests/boundary/providers/ghidra/ghidraTransport.test.ts", + "tests/boundary/providers/ghidra/ghidraTargetSnapshot.test.ts", + "tests/boundary/providers/ghidra/ghidraLauncher.test.ts", + "tests/boundary/providers/hopper/hopperClient.cleanupRetry.test.ts", + "src/windows/WindowsNativeLoader.test.ts", + "src/windows/WindowsOwnedProcess.test.ts", + "src/ghidra/GhidraLauncherEnvironment.test.ts", + "src/process/ProcessOwnership.test.ts", + "src/process/ProcessOwnership.part2.test.ts", + "src/process/ProcessOwnership.part3.test.ts", + "src/process/ProcessOwnership.validation.test.ts", + "src/application/Update.test.ts", + "tests/process-global/updateMaintenance.test.ts", + "tests/conformance/providers/ghidra/realGhidraWindowsWorkflow.test.ts", + "tests/boundary/filesystem/directoryArtifactReaderOpen.test.ts", + "tests/boundary/filesystem/javascriptPackagePrecedence.test.ts", + "tests/boundary/filesystem/javascriptArtifactContentIdentity.test.ts", + "tests/boundary/process/sourceMapUncHosts.test.ts", + ], + // Native SQLite runtime compatibility for the producer, public adapters, + // fixtures, shared lifecycle, and the package script that defines its suite. + sqlite: [ + "src/sqlite/**", + "src/domain/sqlite/**", + "src/contracts/sqlite/**", + "src/application/sqlite/**", + "src/composition/sqlite.ts", + "src/cli/sqliteCommands.ts", + "src/server/registerSqliteTools.ts", + "src/application/DirectAnalysisStatus*.ts", + "src/application/CapabilityInventory*.ts", + "src/application/AnalysisProvider*.ts", + "src/contracts/toolContracts.ts", + "src/contracts/toolContractTypes.ts", + "src/contracts/toolEffects*.ts", + "src/contracts/toolOutputSchemaPrimitives.ts", + "src/domain/analysisError*.ts", + "src/domain/evidence*.ts", + "src/domain/inputIssueProjection*.ts", + "src/domain/jsonSerialization*.ts", + "src/domain/jsonValue*.ts", + "src/domain/localPath*.ts", + "src/domain/providerAdapterError*.ts", + "src/domain/providerCleanupError*.ts", + "src/domain/result*.ts", + "src/process/OwnedCommand*.ts", + "src/process/ProviderProcess*.ts", + "src/process/PrivateRuntimeRoot*.ts", + "src/artifacts/ArtifactReader*.ts", + "src/artifacts/ArtifactResourceScope*.ts", + "src/artifacts/ArtifactPaths*.ts", + "src/artifacts/readStableArtifact*.ts", + "src/filesystem/OwnedFileHandle*.ts", + "src/server/EvidenceMcpServer*.ts", + "src/server/analysisAdmission*.ts", + "src/server/contractToolHandler*.ts", + "src/server/toolRegistrationOptions*.ts", + "src/server/createServer*.ts", + "src/cli.ts", + "src/cliCommandNames.ts", + "src/cliLogging.ts", + "src/cli/commandCancellation.ts", + "tests/boundary/sqlite/**", + "tests/fixtures/sqlite/**", + "tests/acceptance/sqliteDatabaseCli.test.ts", + "tests/boundary/mcp/serverLifecycleMcp.test.ts", + ".github/workflows/sqlite-runtime.yml", + ], browser: [ ".github/workflows/real-browser.yml", "scripts/verify-real-browser.mjs", @@ -216,6 +349,7 @@ export const SCOPES = { nativeaot: [ "bridge/nativeaot/**", "scripts/generate-nativeaot-fixtures.mjs", + "scripts/lib/nativeaot-build.*", "tests/fixtures/nativeaot/**", ".github/workflows/nativeaot-fixtures.yml", ], @@ -227,3 +361,37 @@ export const SCOPES = { ".github/workflows/website-pages.yml", ], }; + +export const CI_FLAGS = [ + ...new Set([ + "code", + "runtime", + "package", + "apple", + "fixtures", + "readiness", + "docs", + "workflows", + ...Object.keys(SCOPES), + ]), +]; + +// Verifier entrypoints that only manual, licensed, or self-hosted workflows +// run. No selected CI lane executes them, so their edits need only the static +// checks and the source-test suite. Shared helpers under scripts/lib remain +// broad inputs. +export const MANUAL_VERIFIERS = [ + "scripts/verify-real-electron.mjs", + "scripts/verify-real-ghidra*.mjs", + "scripts/verify-real-hopper*.mjs", + "scripts/verify-real-ida.mjs", + "scripts/verify-*-client.mjs", + "scripts/verify-native-agent-client.mjs", + "scripts/verify-jeb.mjs", + "scripts/verify-apktool.mjs", + "scripts/verify-adb.mjs", + "scripts/verify-agent-experience.mjs", + "scripts/verify-packaged-ghidra-windows.mjs", + "scripts/verify-wasm-artifact.mjs", + "scripts/verify-packaged-wasm-artifact.mjs", +]; diff --git a/scripts/ci/static-check-report.mjs b/scripts/ci/static-check-report.mjs new file mode 100644 index 000000000..04460b2c2 --- /dev/null +++ b/scripts/ci/static-check-report.mjs @@ -0,0 +1,149 @@ +import { spawnSync } from "node:child_process"; +import { mkdir, readFile, rm, writeFile } from "node:fs/promises"; +import { createRequire } from "node:module"; +import { dirname, join, relative, sep } from "node:path"; +import { z } from "zod"; + +const require = createRequire(import.meta.url); +const mode = process.argv[2]; +const reportRoot = join(".cache", "static-checks"); +const extraArguments = process.argv.slice(3); +const lintReport = z.object({ + number_of_files: z.number(), + diagnostics: z.array( + z.object({ + message: z.string(), + code: z.string().optional(), + severity: z.enum(["error", "warning", "advice"]), + filename: z.string(), + labels: z.array( + z.object({ + span: z.object({ line: z.number(), column: z.number() }), + }), + ), + }), + ), +}); +const duplicateReport = z + .object({ + duplicates: z.array( + z + .object({ + firstFile: z.object({ name: z.string() }).passthrough(), + secondFile: z.object({ name: z.string() }).passthrough(), + }) + .passthrough(), + ), + statistics: z + .object({ + total: z + .object({ + sources: z.number(), + clones: z.number(), + percentage: z.number(), + }) + .passthrough(), + }) + .passthrough(), + }) + .passthrough(); + +const run = (packageName, entrypoint, arguments_) => { + const executable = join( + dirname(require.resolve(`${packageName}/package.json`)), + entrypoint, + ); + const result = spawnSync(process.execPath, [executable, ...arguments_], { + encoding: "utf8", + maxBuffer: 32 * 1024 * 1024, + }); + if (result.stderr) process.stderr.write(result.stderr); + if (result.error !== undefined) throw result.error; + if (result.status === null) + throw new Error(`${packageName} terminated by ${result.signal}`); + return result; +}; + +try { + await mkdir(reportRoot, { recursive: true }); + if (mode === "lint") { + const reportPath = join(reportRoot, "oxlint.json"); + await rm(reportPath, { force: true }); + const result = run("oxlint", "bin/oxlint", [ + ...extraArguments, + "--format", + "json", + ]); + let report; + try { + report = lintReport.parse(JSON.parse(result.stdout)); + } catch (cause) { + process.stderr.write(result.stdout); + throw cause; + } + await writeFile(reportPath, result.stdout); + const warnings = report.diagnostics.filter( + ({ severity }) => severity === "warning", + ); + const errors = report.diagnostics.filter( + ({ severity }) => severity === "error", + ); + console.log( + `Lint: ${report.number_of_files} files, ${errors.length} errors, ${warnings.length} warnings.`, + ); + for (const diagnostic of errors) { + const location = diagnostic.labels[0]?.span; + console.error( + `${diagnostic.filename}:${location?.line ?? 1}:${location?.column ?? 1}: ${diagnostic.code ?? "lint"}: ${diagnostic.message}`, + ); + } + const counts = new Map(); + for (const { code } of warnings) + counts.set(code ?? "warning", (counts.get(code ?? "warning") ?? 0) + 1); + for (const [rule, count] of [...counts] + .sort( + (left, right) => right[1] - left[1] || left[0].localeCompare(right[0]), + ) + .slice(0, 8)) + console.log(` ${rule}: ${count} warnings`); + console.log(`Full diagnostics: ${reportPath}; npm run lint:details`); + process.exitCode = result.status; + } else if (mode === "duplicates") { + const output = join(reportRoot, "jscpd"); + const reportPath = join(output, "jscpd-report.json"); + await rm(reportPath, { force: true }); + const result = run("jscpd", "run-jscpd.js", [ + "src/", + "tests/", + ...extraArguments, + "--reporters", + "json", + "--output", + output, + "--no-colors", + "--no-tips", + "--absolute", + ]); + if (result.stdout) process.stdout.write(result.stdout); + const report = duplicateReport.parse( + JSON.parse(await readFile(reportPath, "utf8")), + ); + // jscpd otherwise strips each scan root, making src/ and tests/ names + // ambiguous. Normalize absolute producer paths once for portable reports. + for (const clone of report.duplicates) + for (const file of [clone.firstFile, clone.secondFile]) + file.name = relative(process.cwd(), file.name).split(sep).join("/"); + await writeFile(reportPath, JSON.stringify(report, null, 2)); + const { sources, clones, percentage } = report.statistics.total; + console.log( + `Duplication: ${sources} files, ${clones} clones, ${percentage.toFixed(2)}% duplicated lines.`, + ); + console.log(`Full diagnostics: ${reportPath}; npm run jscpd:details`); + process.exitCode = result.status; + } else { + throw new Error("Expected lint or duplicates"); + } +} catch (cause) { + console.error(cause instanceof Error ? cause.message : String(cause)); + process.exitCode = 1; +} diff --git a/scripts/ci/test-history.mjs b/scripts/ci/test-history.mjs new file mode 100644 index 000000000..4386f48af --- /dev/null +++ b/scripts/ci/test-history.mjs @@ -0,0 +1,114 @@ +import { execFileSync } from "node:child_process"; +import { appendFileSync } from "node:fs"; +import { resolve } from "node:path"; +import { fileURLToPath } from "node:url"; + +const ARTIFACT_NAME = "test-timings"; +const MAX_AGE_MS = 30 * 24 * 60 * 60 * 1000; +const MAX_CANDIDATES = 5; +const positiveId = (value) => + (typeof value === "string" || typeof value === "number") && + /^[1-9]\d*$/.test(String(value)) && + Number.isSafeInteger(Number(value)); + +function findTimingRun({ repository, branch, repositoryId, now = Date.now() }) { + if ( + !/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/.test(repository ?? "") || + !branch || + !positiveId(repositoryId) + ) + return ""; + const deadline = Date.now() + 20_000; + const api = (...arguments_) => { + const remaining = deadline - Date.now(); + if (remaining <= 0) + throw new Error("Timing history lookup budget exhausted"); + return JSON.parse( + execFileSync("gh", ["api", "--method", "GET", ...arguments_], { + encoding: "utf8", + timeout: Math.min(10_000, remaining), + maxBuffer: 4 * 1024 * 1024, + stdio: ["ignore", "pipe", "pipe"], + }), + ); + }; + + const { artifacts } = api( + `repos/${repository}/actions/artifacts`, + "-f", + `name=${ARTIFACT_NAME}`, + "-F", + "per_page=100", + ); + if (!Array.isArray(artifacts)) + throw new Error("Missing timing artifact inventory"); + const candidates = artifacts + .filter((artifact) => { + const lineage = artifact?.workflow_run; + const age = now - Date.parse(artifact?.created_at); + return ( + artifact?.name === ARTIFACT_NAME && + artifact?.expired === false && + typeof artifact?.created_at === "string" && + Number.isFinite(age) && + age >= 0 && + age < MAX_AGE_MS && + positiveId(lineage?.id) && + positiveId(lineage?.repository_id) && + positiveId(lineage?.head_repository_id) && + lineage.repository_id === lineage.head_repository_id && + lineage.repository_id === Number(repositoryId) && + lineage.head_branch === branch + ); + }) + .sort( + (left, right) => + Date.parse(right.created_at) - Date.parse(left.created_at), + ) + .slice(0, MAX_CANDIDATES); + + for (const artifact of candidates) { + const run = api( + `repos/${repository}/actions/runs/${artifact.workflow_run.id}`, + ); + const runAge = now - Date.parse(run?.created_at); + if ( + typeof run?.created_at === "string" && + Number.isFinite(runAge) && + runAge >= 0 && + runAge < MAX_AGE_MS && + run.id === artifact.workflow_run.id && + run.status === "completed" && + run.conclusion === "success" && + run.path === ".github/workflows/ci.yml" && + ["schedule", "workflow_dispatch"].includes(run.event) && + run.head_branch === branch && + run.head_repository?.full_name === repository + ) + return String(run.id); + } + return ""; +} + +function write(runId) { + if (process.env.GITHUB_OUTPUT) + appendFileSync(process.env.GITHUB_OUTPUT, `run-id=${runId}\n`); + console.log(JSON.stringify({ run_id: runId })); +} + +if ( + process.argv[1] && + fileURLToPath(import.meta.url) === resolve(process.argv[1]) +) { + let runId = ""; + try { + runId = findTimingRun({ + repository: process.env.CI_REPOSITORY, + branch: process.env.CI_DEFAULT_BRANCH, + repositoryId: process.env.CI_REPOSITORY_ID, + }); + } catch { + // History improves shard ordering but must never block CI. + } + write(runId); +} diff --git a/scripts/ci/test-report.mjs b/scripts/ci/test-report.mjs new file mode 100644 index 000000000..035a01990 --- /dev/null +++ b/scripts/ci/test-report.mjs @@ -0,0 +1,138 @@ +import { execFileSync } from "node:child_process"; +import { appendFile, mkdir, readFile, rm, writeFile } from "node:fs/promises"; +import { isAbsolute, join, relative, resolve, sep } from "node:path"; + +import { z } from "zod"; + +import { compareTestSelection } from "./test-selection.mjs"; + +const root = process.cwd(); +const historyDirectory = join(root, ".cache/ci-test-history"); +const historyPath = join(historyDirectory, "test-results.json"); +const selectionDirectory = join(root, ".cache/ci-test-selection"); +const selectionPath = join(selectionDirectory, "report.json"); +// Never let a failed or partial rerun leave a previous successful history file. +await rm(historyPath, { force: true }); +await rm(selectionPath, { force: true }); +const report = z + .object({ + version: z.literal(1), + success: z.boolean(), + reason: z.string().optional(), + unhandledErrors: z.number().int().nonnegative().optional(), + files: z.array( + z.object({ + name: z.string().min(1), + durationMs: z.number().finite().nonnegative(), + state: z.string().optional(), + }), + ), + }) + .parse(JSON.parse(await readFile("test-timings.json", "utf8"))); + +const files = report.files.map(({ name, durationMs, state }) => { + const path = relative(root, resolve(root, name)); + if ( + path === "" || + path === ".." || + path.startsWith(".." + sep) || + isAbsolute(path) + ) + throw new Error(`Test report path is outside the checkout: ${name}`); + return { name: path.split(sep).join("/"), durationMs, state }; +}); +const complete = process.env.SHARD_RESULT === "success"; +const passed = + complete && process.env.MERGE_RESULT === "success" && report.success; +// Successful shards and merged reports must account for the complete portable +// inventory. Coverage thresholds alone cannot prove that every file ran. +const verifyInventory = process.env.CI_VERIFY_TEST_INVENTORY === "true"; +const expected = + verifyInventory || process.env.CI_TEST_SELECTION + ? execFileSync("git", ["ls-files", "-z", "--", "src", "tests"], { + encoding: "utf8", + maxBuffer: 8 * 1024 * 1024, + }) + .split("\0") + .filter((path) => path.endsWith(".test.ts")) + : []; +let selection; +if (process.env.CI_TEST_SELECTION) { + const comparison = compareTestSelection( + JSON.parse(process.env.CI_TEST_SELECTION), + expected, + files, + ); + selection = { + ...comparison, + complete: + comparison.complete && + report.unhandledErrors === 0 && + ["passed", "failed"].includes(report.reason) && + ["success", "failure"].includes(process.env.SHARD_RESULT) && + ["success", "failure"].includes(process.env.MERGE_RESULT), + executionSha: process.env.GITHUB_SHA ?? null, + prHeadSha: process.env.CI_PR_HEAD_SHA ?? null, + runId: process.env.GITHUB_RUN_ID ?? null, + runAttempt: process.env.GITHUB_RUN_ATTEMPT ?? null, + }; + await mkdir(selectionDirectory, { recursive: true }); + await writeFile(selectionPath, JSON.stringify(selection)); +} +if (passed && verifyInventory) { + const actual = files.map(({ name }) => name); + const expectedSet = new Set(expected); + const actualSet = new Set(actual); + const missing = expected.filter((path) => !actualSet.has(path)); + const unexpected = actual.filter((path) => !expectedSet.has(path)); + if (missing.length || unexpected.length || actualSet.size !== actual.length) + throw new Error( + `Incomplete portable test inventory: ${JSON.stringify({ missing, unexpected, duplicateFiles: actual.length - actualSet.size })}`, + ); +} +const summary = [ + complete ? "## Merged test diagnostics" : "## Partial test diagnostics", + "", + ...(selection + ? [ + "### Observational PR test selection", + "", + `Plan: ${selection.plan.mode}. Proposed files: ${selection.selected.length}; omitted: ${selection.omitted.length}.`, + `Full-run comparison: ${selection.complete ? "complete" : "incomplete"}; failures outside proposed selection: ${selection.missedFailures.length}.`, + "The complete suite still ran. This report cannot enable omissions or qualify a revision. Skipped, missing, and interrupted observations do not establish parity.", + "", + ] + : []), + `Shard result: ${process.env.SHARD_RESULT ?? "unknown"}; merge result: ${process.env.MERGE_RESULT ?? "unknown"}.`, + passed + ? "Successful timing history is available." + : "This report is diagnostic only and is not a successful timing baseline.", + "", + "Durations include tests and hooks, worker preparation, environment, imports, and setup. They are scheduling weights, not summed workflow wall time.", + "", + "| Slowest file | Duration (ms) |", + "| --- | ---: |", + ...files + .toSorted((left, right) => right.durationMs - left.durationMs) + .slice(0, 20) + .map( + ({ name, durationMs }) => + `| ${name.replaceAll("|", "\\|")} | ${durationMs} |`, + ), + "", +].join("\n"); +if (process.env.GITHUB_STEP_SUMMARY) + await appendFile(process.env.GITHUB_STEP_SUMMARY, summary); +else console.log(summary); + +if (passed) { + await mkdir(historyDirectory, { recursive: true }); + await writeFile( + historyPath, + JSON.stringify({ + version: 1, + success: true, + files: files.map(({ name, durationMs }) => ({ name, durationMs })), + }), + ); +} diff --git a/scripts/ci/test-selection.d.mts b/scripts/ci/test-selection.d.mts new file mode 100644 index 000000000..c19414398 --- /dev/null +++ b/scripts/ci/test-selection.d.mts @@ -0,0 +1,35 @@ +export interface TestSelectionPlan { + readonly version: 1; + readonly mode: "full" | "candidate"; + readonly owners: readonly string[]; + readonly changedTests: readonly string[]; + readonly changedPaths: readonly string[]; + readonly reason: string; +} +export function planTestSelection( + files: readonly string[], + event: string, + tier: string, +): TestSelectionPlan; +export function compareTestSelection( + plan: unknown, + inventory: readonly string[], + results: readonly { + readonly name: string; + readonly durationMs: number; + readonly state?: string; + }[], +): { + readonly version: 1; + readonly observational: true; + readonly plan: TestSelectionPlan; + readonly selected: readonly string[]; + readonly omitted: readonly string[]; + readonly missing: readonly string[]; + readonly unexpected: readonly string[]; + readonly duplicateFiles: number; + readonly unobserved: readonly string[]; + readonly missedFailures: readonly string[]; + readonly complete: boolean; + readonly omittedDurationMs: number; +}; diff --git a/scripts/ci/test-selection.mjs b/scripts/ci/test-selection.mjs new file mode 100644 index 000000000..8165e3658 --- /dev/null +++ b/scripts/ci/test-selection.mjs @@ -0,0 +1,151 @@ +import { matchesGlob } from "node:path"; + +// Candidate ownership only: these leaf adapters and their producer tests can be +// compared with full-suite outcomes. This table never changes test execution. +// Shared application/domain code and dynamic CLI/MCP consumers are not leaf owners. +const OWNERS = { + adb: ["src/adb/**", "tests/boundary/providers/adb/**"], + apktool: ["src/apktool/**"], + dotnet: ["src/dotnet/**"], + evm: ["src/evm/**", "tests/boundary/evm/**"], + firmware: ["src/firmware/**", "tests/boundary/firmware/**"], + flutter: ["src/flutter/**"], + ghidra: ["src/ghidra/**", "tests/boundary/providers/ghidra/**"], + hopper: ["src/hopper/**", "tests/boundary/providers/hopper/**"], + ida: ["src/ida/**", "tests/boundary/providers/ida/**"], + jeb: ["src/jeb/**"], + pcap: ["src/pcap/**", "tests/boundary/pcap/**"], + sqlite: ["src/sqlite/**", "tests/boundary/sqlite/**"], + wasm: ["src/wasm/**"], +}; +const ownersOf = (path) => + Object.entries(OWNERS) + .filter(([, patterns]) => patterns.some((glob) => matchesGlob(path, glob))) + .map(([owner]) => owner); +const validPath = (path) => + typeof path === "string" && + /^(src|tests)\//.test(path) && + !/[\\\0\r\n]/.test(path) && + !path.split("/").some((part) => ["", ".", ".."].includes(part)); +const full = (reason, changedPaths = []) => ({ + version: 1, + mode: "full", + owners: [], + changedTests: [], + changedPaths, + reason, +}); + +/** Plan an observational PR subset from the classifier's existing Git diff. */ +export function planTestSelection(files, event, tier) { + if (event !== "pull_request" || tier !== "fast") + return full("Only ordinary PRs are candidates", files); + if (!files.length) return full("No changed paths available"); + const owners = new Set(); + const changedTests = []; + for (const path of files) { + if (!validPath(path)) + return full(`Shared or unknown input: ${path}`, files); + const matches = ownersOf(path); + if (!matches.length) return full(`Shared or unknown input: ${path}`, files); + for (const owner of matches) owners.add(owner); + if (path.endsWith(".test.ts")) changedTests.push(path); + } + return { + version: 1, + mode: "candidate", + owners: [...owners].sort(), + changedTests: [...new Set(changedTests)].sort(), + changedPaths: files, + reason: + "Observe affected leaf owners; retain integration and unowned tests", + }; +} + +/** Compare a proposal with the full run; missing observations never prove parity. */ +export function compareTestSelection(plan, inventory, results) { + if ( + plan?.version !== 1 || + !["full", "candidate"].includes(plan.mode) || + !Array.isArray(plan.owners) || + plan.owners.some((owner) => !Object.hasOwn(OWNERS, owner)) || + !Array.isArray(plan.changedTests) || + !Array.isArray(plan.changedPaths) || + plan.changedPaths.some((path) => typeof path !== "string") || + plan.changedTests.some( + (path) => !validPath(path) || !path.endsWith(".test.ts"), + ) || + typeof plan.reason !== "string" || + (plan.mode === "candidate" && !plan.owners.length) || + (plan.mode === "full" && (plan.owners.length || plan.changedTests.length)) + ) + throw new Error("Invalid observational test selection plan"); + const expected = new Set(inventory); + if (!expected.size || expected.size !== inventory.length) + throw new Error("Test selection requires a nonempty unique inventory"); + const ownersByFile = new Map( + plan.mode === "candidate" + ? inventory.map((path) => [path, ownersOf(path)]) + : [], + ); + // Removed/renamed tests have no current executable identity. Keep all tests. + const removed = plan.changedTests.filter((path) => !expected.has(path)); + const missingOwners = plan.owners.filter( + (owner) => + ![...ownersByFile.values()].some((owners) => owners.includes(owner)), + ); + const effective = removed.length + ? full( + `Changed tests absent from current inventory: ${removed.join(", ")}`, + plan.changedPaths, + ) + : missingOwners.length + ? full( + `Owners without executable tests: ${missingOwners.join(", ")}`, + plan.changedPaths, + ) + : plan; + const selected = []; + const omitted = []; + for (const path of inventory.toSorted()) { + const owners = ownersByFile.get(path) ?? []; + const keep = + effective.mode === "full" || + !owners.length || + effective.changedTests.includes(path) || + owners.some((owner) => effective.owners.includes(owner)); + (keep ? selected : omitted).push(path); + } + const actual = new Set(results.map((file) => file.name)); + const missing = inventory.filter((path) => !actual.has(path)); + const unexpected = [...actual].filter((path) => !expected.has(path)); + const duplicateFiles = results.length - actual.size; + const unobserved = results + .filter((file) => !["passed", "failed"].includes(file.state)) + .map((file) => file.name); + const omittedSet = new Set(omitted); + const missedFailures = results + .filter((file) => omittedSet.has(file.name) && file.state === "failed") + .map((file) => file.name); + return { + version: 1, + observational: true, + plan: effective, + selected, + omitted, + missing, + unexpected, + duplicateFiles, + unobserved, + missedFailures, + complete: + !missing.length && + !unexpected.length && + !duplicateFiles && + !unobserved.length, + // Phase totals are scheduling weights, not an estimate of wall-time savings. + omittedDurationMs: results + .filter((file) => omittedSet.has(file.name)) + .reduce((sum, file) => sum + file.durationMs, 0), + }; +} diff --git a/scripts/ci/test-timing-reporter.mjs b/scripts/ci/test-timing-reporter.mjs new file mode 100644 index 000000000..ce0b1c5dc --- /dev/null +++ b/scripts/ci/test-timing-reporter.mjs @@ -0,0 +1,43 @@ +import { writeFile } from "node:fs/promises"; + +/** @implements {import("vitest/node").Reporter} */ +export default class TestTimingReporter { + /** + * @param {ReadonlyArray} modules + * @param {ReadonlyArray} errors + * @param {import("vitest/node").TestRunEndReason} reason + */ + async onTestRunEnd(modules, errors, reason) { + const files = modules.map((module) => { + const diagnostic = module.diagnostic(); + // These disjoint phases match Vitest's per-file wall-time accounting. + // Import timings already include transform waits; do not add them again. + const phases = { + execution: diagnostic.duration, + preparation: diagnostic.prepareDuration, + environment: diagnostic.environmentSetupDuration, + imports: diagnostic.collectDuration, + setup: diagnostic.setupDuration, + }; + return { + name: module.moduleId, + state: module.state(), + durationMs: Object.values(phases).reduce( + (total, value) => total + value, + 0, + ), + phases, + }; + }); + await writeFile( + "test-timings.json", + JSON.stringify({ + version: 1, + success: reason === "passed" && errors.length === 0, + reason, + unhandledErrors: errors.length, + files, + }), + ); + } +} diff --git a/scripts/ci/verified-package.mjs b/scripts/ci/verified-package.mjs new file mode 100644 index 000000000..1053760b2 --- /dev/null +++ b/scripts/ci/verified-package.mjs @@ -0,0 +1,235 @@ +import { createHash } from "node:crypto"; +import { createReadStream } from "node:fs"; +import { execFile } from "node:child_process"; +import { copyFile, readFile, writeFile } from "node:fs/promises"; +import { join, resolve } from "node:path"; +import { fileURLToPath } from "node:url"; +import { promisify } from "node:util"; + +const MANIFEST_NAME = "manifest.json"; +const TARBALL_NAME = "package.tgz"; +const MANIFEST_KEYS = [ + "schemaVersion", + "sourceSha", + "runId", + "runAttempt", + "platform", + "architecture", + "packageVersion", + "nodeVersion", + "sha256", +].sort(); +const execFileAsync = promisify(execFile); + +/** Normalize workflow identity and host facts into the manifest-owned fields. */ +export function createVerifiedPackageMetadata({ + sourceSha, + runId, + runAttempt, + platform, + architecture, + packageVersion, + nodeVersion, +}) { + if (!/^[a-f0-9]{40}$/u.test(sourceSha)) + throw new Error("Source SHA must be a full commit SHA"); + return { + sourceSha, + runId: parsePositiveInteger(runId, "GITHUB_RUN_ID"), + runAttempt: parsePositiveInteger(runAttempt, "GITHUB_RUN_ATTEMPT"), + platform, + architecture, + packageVersion, + nodeVersion, + }; +} + +/** Build the single supported manifest representation for a verified tarball. */ +function createVerifiedPackageManifest(metadata) { + const manifest = { schemaVersion: 1, ...metadata }; + validateManifestShape(manifest); + return manifest; +} + +/** Write a manifest after the caller has completed qualification and cleanup. */ +export async function writeVerifiedPackageManifest(directory, metadata) { + const manifest = createVerifiedPackageManifest(metadata); + await writeFile( + join(directory, MANIFEST_NAME), + `${JSON.stringify(manifest, null, 2)}\n`, + { encoding: "utf8" }, + ); + return manifest; +} + +/** Copy the qualified archive under its fixed name and prepare its manifest. */ +export async function retainVerifiedPackage({ + sourceTarball, + directory, + metadata, +}) { + const tarball = join(directory, TARBALL_NAME); + await copyFile(sourceTarball, tarball); + const sha256 = await sha256File(tarball); + return { + directory, + metadata: createVerifiedPackageManifest({ ...metadata, sha256 }), + }; +} + +/** Validate a retained package against the current checkout and workflow attempt. */ +async function validateVerifiedPackage({ + directory, + sourceSha, + runId, + runAttempt, + packageVersion, + nodeVersion, +}) { + if (!/^[a-f0-9]{40}$/u.test(sourceSha)) + throw new Error("Expected source SHA must be a full commit SHA"); + if (!Number.isSafeInteger(runId) || runId <= 0) + throw new Error("Expected workflow run ID must be a positive integer"); + if (!Number.isSafeInteger(runAttempt) || runAttempt <= 0) + throw new Error("Expected workflow run attempt must be a positive integer"); + const manifestPath = join(directory, MANIFEST_NAME); + let manifest; + try { + manifest = JSON.parse(await readFile(manifestPath, "utf8")); + } catch (cause) { + throw new Error(`Could not read verified package manifest: ${cause}`, { + cause, + }); + } + validateManifestShape(manifest); + assertEqual(manifest.sourceSha, sourceSha, "source SHA"); + assertEqual(manifest.runId, runId, "workflow run ID"); + // A successful producer may belong to an earlier attempt when only failed + // publisher jobs are rerun. The workflow still requires same-run qualification. + if (manifest.runAttempt > runAttempt) + throw new Error("Verified package workflow run attempt is from the future"); + assertEqual(manifest.platform, "linux", "verifier platform"); + assertEqual(manifest.architecture, "x64", "verifier architecture"); + assertEqual(manifest.packageVersion, packageVersion, "package version"); + assertEqual(manifest.nodeVersion, nodeVersion, "Node.js version"); + + // The artifact format deliberately fixes the name; no manifest value can + // redirect validation to another path. + const tarball = resolve(directory, TARBALL_NAME); + const digest = await sha256File(tarball); + assertEqual(manifest.sha256, digest, "tarball SHA-256"); + return tarball; +} + +function validateManifestShape(manifest) { + if ( + typeof manifest !== "object" || + manifest === null || + Array.isArray(manifest) + ) + throw new Error("Verified package manifest must be a JSON object"); + const keys = Object.keys(manifest).sort(); + if ( + keys.length !== MANIFEST_KEYS.length || + keys.some((key, index) => key !== MANIFEST_KEYS[index]) + ) + throw new Error("Verified package manifest has missing or unknown fields"); + if (manifest.schemaVersion !== 1) + throw new Error("Unsupported verified package manifest schema version"); + if ( + typeof manifest.sourceSha !== "string" || + !/^[a-f0-9]{40}$/u.test(manifest.sourceSha) + ) + throw new Error("Verified package manifest has an invalid source SHA"); + if (!Number.isSafeInteger(manifest.runId) || manifest.runId <= 0) + throw new Error("Verified package manifest has an invalid workflow run ID"); + if (!Number.isSafeInteger(manifest.runAttempt) || manifest.runAttempt <= 0) + throw new Error( + "Verified package manifest has an invalid workflow run attempt", + ); + for (const key of [ + "platform", + "architecture", + "packageVersion", + "nodeVersion", + ]) + if (typeof manifest[key] !== "string" || manifest[key].length === 0) + throw new Error(`Verified package manifest has an invalid ${key}`); + if ( + typeof manifest.sha256 !== "string" || + !/^[a-f0-9]{64}$/u.test(manifest.sha256) + ) + throw new Error("Verified package manifest has an invalid tarball SHA-256"); +} + +function assertEqual(actual, expected, label) { + if (actual !== expected) + throw new Error(`Verified package ${label} mismatch`); +} + +async function sha256File(path) { + const hash = createHash("sha256"); + for await (const chunk of createReadStream(path)) hash.update(chunk); + return hash.digest("hex"); +} + +async function validateFromCli(directory) { + const sourceSha = process.env.GITHUB_SHA; + const runId = parsePositiveInteger( + process.env.GITHUB_RUN_ID, + "GITHUB_RUN_ID", + ); + const runAttempt = parsePositiveInteger( + process.env.GITHUB_RUN_ATTEMPT, + "GITHUB_RUN_ATTEMPT", + ); + if (sourceSha === undefined || !/^[a-f0-9]{40}$/u.test(sourceSha)) + throw new Error("GITHUB_SHA must be a full commit SHA"); + const checkoutSha = ( + await execFileAsync("git", ["rev-parse", "HEAD"]) + ).stdout.trim(); + assertEqual(checkoutSha, sourceSha, "checked out source SHA"); + const packageJson = JSON.parse(await readFile("package.json", "utf8")); + const tarball = await validateVerifiedPackage({ + directory, + sourceSha, + runId, + runAttempt, + packageVersion: packageJson.version, + nodeVersion: process.version, + }); + if (process.env.GITHUB_OUTPUT === undefined) + throw new Error( + "GITHUB_OUTPUT is required to publish the validated tarball path", + ); + await writeFile(process.env.GITHUB_OUTPUT, `tarball=${tarball}\n`, { + encoding: "utf8", + flag: "a", + }); + process.stdout.write(`${tarball}\n`); +} + +function parsePositiveInteger(value, name) { + if (value === undefined || !/^[1-9]\d*$/u.test(value)) + throw new Error(`${name} must be a positive integer`); + const parsed = Number(value); + if (!Number.isSafeInteger(parsed)) + throw new Error(`${name} must be a safe positive integer`); + return parsed; +} + +const invokedPath = process.argv[1]; +if ( + invokedPath !== undefined && + resolve(invokedPath) === fileURLToPath(import.meta.url) +) { + const [command, directory, ...extra] = process.argv.slice(2); + if (command !== "validate" || directory === undefined || extra.length > 0) { + process.stderr.write( + "Usage: node scripts/ci/verified-package.mjs validate \n", + ); + process.exitCode = 2; + } else { + await validateFromCli(directory); + } +} diff --git a/scripts/fixtures/flutter-gallery-expectations.json b/scripts/fixtures/flutter-gallery-expectations.json new file mode 100644 index 000000000..909d86e66 --- /dev/null +++ b/scripts/fixtures/flutter-gallery-expectations.json @@ -0,0 +1,38 @@ +{ + "target_sha256": "659b5fc6a4319dfe4f117d00ad4e7ec004915ebcadcb96628797fb3544040e29", + "snapshot_hash": "65817c30a78bb44c3dc3771876b6010a", + "engines": { + "x86_64": { + "dart_version": null, + "toolchain_lines": [ + "Android (5900059 based on r365631c) clang version 9.0.8 (https://android.googlesource.com/toolchain/llvm-project 207d7abc1a2abf3ef8d4301736d6a7ebc224a290) (based on LLVM 9.0.8svn)" + ] + }, + "armeabi-v7a": { + "dart_version": null, + "toolchain_lines": [ + "Android (5900059 based on r365631c) clang version 9.0.8 (https://android.googlesource.com/toolchain/llvm-project 207d7abc1a2abf3ef8d4301736d6a7ebc224a290) (based on LLVM 9.0.8svn)" + ] + }, + "arm64-v8a": { + "dart_version": null, + "toolchain_lines": [ + "Android (5900059 based on r365631c) clang version 9.0.8 (https://android.googlesource.com/toolchain/llvm-project 207d7abc1a2abf3ef8d4301736d6a7ebc224a290) (based on LLVM 9.0.8svn)" + ] + } + }, + "string_pools": { + "x86_64": { + "package_uri_count_at_least": 756, + "dart_uri_count_at_least": 201 + }, + "armeabi-v7a": { + "package_uri_count_at_least": 212, + "dart_uri_count_at_least": 48 + }, + "arm64-v8a": { + "package_uri_count_at_least": 756, + "dart_uri_count_at_least": 201 + } + } +} diff --git a/scripts/fixtures/generate-mitmproxy-capture.py b/scripts/fixtures/generate-mitmproxy-capture.py index 4be3dd4a7..880c5e690 100644 --- a/scripts/fixtures/generate-mitmproxy-capture.py +++ b/scripts/fixtures/generate-mitmproxy-capture.py @@ -45,6 +45,20 @@ class Generator: assert "ows-secret" not in json.dumps(projected), projected if isinstance(value, bytes): assert projected["binary_fields"][-1]["state"] == "redacted", projected + body = b"A" * 12345 + state = {"response": {"content": body}} + control = adapter.project_record(state, []) + field = control["binary_fields"][0] + assert field["state"] == "retained" and field["bytes"] == len(body), control + for literal in ["12345", "2345"]: + # Only the generated byte count matches this exclusion. + assert literal not in control["reported"]["response"]["content"] + assert literal not in field["content_base64"] and literal not in field["sha256"] + projected = adapter.project_record(state, [literal]) + assert projected["reported"]["response"]["content"] is None, projected + assert projected["binary_fields"] == [{"pointer": "/response/content", "representation": "producer-bytes", "state": "redacted", "content_base64": None, "bytes": None, "sha256": None}], projected + assert {"pointer": "/response/content", "reason": "explicit-sensitive-value"} in projected["redactions"], projected + assert literal not in json.dumps(projected), projected (root / "native-error-classifications.json").write_text(json.dumps({"passed": len(classifications) + 2})) first = http.HTTPFlow(connection.Client(peername=("127.0.0.1", 1), sockname=("127.0.0.1", 2)), connection.Server(address=("example.test", 80))) first.id = "original-producer-id" diff --git a/scripts/generate-nativeaot-fixtures.mjs b/scripts/generate-nativeaot-fixtures.mjs index 84a8ac533..fa9127cf3 100644 --- a/scripts/generate-nativeaot-fixtures.mjs +++ b/scripts/generate-nativeaot-fixtures.mjs @@ -4,9 +4,14 @@ import { createHash } from "node:crypto"; import { copyFile, mkdir, readFile, writeFile } from "node:fs/promises"; import { dirname, join, resolve } from "node:path"; import { fileURLToPath } from "node:url"; +import { + buildNativeAotFixture, + nativeAotCommandError, + supportsNativeAotFixtureHost, +} from "./lib/nativeaot-build.mjs"; const root = resolve(dirname(fileURLToPath(import.meta.url)), ".."); -if (process.arch !== "x64" || !["linux", "win32"].includes(process.platform)) +if (!supportsNativeAotFixtureHost(process.platform, process.arch)) throw new Error( "NativeAOT fixture lane requires Linux or Windows x64; it does not cross-compile NativeAOT.", ); @@ -40,9 +45,7 @@ const run = (command, args) => { maxBuffer: 8 * 1024 * 1024, }); if (result.error || result.status !== 0) - throw new Error( - `NativeAOT fixture lane requires/action failed ${command}: ${result.error?.message ?? ""}\n${result.stdout ?? ""}${result.stderr ?? ""}`, - ); + throw nativeAotCommandError(command, args[0], result); return result.stdout; }; const dotnet = process.env.REA_NATIVEAOT_DOTNET ?? "dotnet"; @@ -57,20 +60,12 @@ if (process.platform === "linux") { run("clang", ["--version"]); } const map = join(output, "NativeAotFixture.map"); -run(dotnet, [ - "publish", - join(root, "tests/fixtures/nativeaot/NativeAotFixture.csproj"), - "-r", +await buildNativeAotFixture(run, { + dotnet, + project: join(root, "tests/fixtures/nativeaot/NativeAotFixture.csproj"), runtime, - "-c", - "Release", - "-o", - join(output, "symbols"), - "--maxcpucount:1", - `-p:BaseIntermediateOutputPath=${join(output, "obj")}/`, - `-p:BaseOutputPath=${join(output, "bin")}/`, - `-p:NativeAotMapPath=${map}`, -]); + output, +}); const name = process.platform === "win32" ? "NativeAotFixture.exe" : "NativeAotFixture"; const binary = join(output, "symbols", name); diff --git a/scripts/generate-third-party-inventory.mjs b/scripts/generate-third-party-inventory.mjs new file mode 100644 index 000000000..57934ebda --- /dev/null +++ b/scripts/generate-third-party-inventory.mjs @@ -0,0 +1,120 @@ +import { createHash } from "node:crypto"; +import { readFile } from "node:fs/promises"; +import { dirname, join } from "node:path"; +import { fileURLToPath } from "node:url"; + +import { ensureGeneratedFile } from "./lib/generated-file.mjs"; + +const arguments_ = new Set(process.argv.slice(2)); +for (const argument of arguments_) + if (argument !== "--check") + throw new Error(`Unknown inventory option: ${argument}`); +const root = join(dirname(fileURLToPath(import.meta.url)), ".."); +const lock = JSON.parse( + await readFile(join(root, "package-lock.json"), "utf8"), +); +const entries = Object.entries(lock.packages) + .filter(([path]) => path !== "") + .map(([path, record]) => ({ + path, + name: record.name ?? path.slice(path.lastIndexOf("node_modules/") + 13), + version: record.version, + license: record.license ?? "UNDECLARED", + resolved: record.resolved, + integrity: record.integrity, + dev: record.dev === true, + optional: record.optional === true, + })) + .sort((left, right) => + left.path < right.path ? -1 : left.path > right.path ? 1 : 0, + ); +for (const entry of entries) + for (const field of ["name", "version", "resolved", "integrity"]) + if (typeof entry[field] !== "string" || entry[field].length === 0) + throw new Error(`Missing locked ${field}: ${entry.path}`); +const runtime = entries.filter(({ dev }) => !dev); +const runtimeFingerprint = createHash("sha256") + .update(JSON.stringify(runtime)) + .digest("hex"); +const source = [ + "REA npm dependency inventory", + "Prepared from the root package-lock.json; refresh this inventory when locked dependencies change.", + "License identifiers are upstream lockfile declarations, not a legal assessment.", + "Runtime includes transitive and optional platform packages; development includes build, test and website tooling.", + `Locked package entries: ${entries.length}; runtime: ${runtime.length}.`, + "Full runtime copyright/license/NOTICE texts: npm-runtime-notices.txt.", + "", + ...entries.flatMap((entry) => [ + `${entry.name}@${entry.version} | ${entry.dev ? "development" : "runtime"}${entry.optional ? ", optional" : ""} | ${entry.license}`, + ` Lockfile path: ${entry.path}`, + ` Package: https://www.npmjs.com/package/${entry.name}/v/${entry.version}`, + ` Archive: ${entry.resolved}`, + ` Integrity: ${entry.integrity}`, + ]), + "", +].join("\n"); +await ensureGeneratedFile({ + path: join(root, "licenses/npm-dependencies.txt"), + source, + check: arguments_.has("--check"), + generateCommand: "npm run licenses:generate", +}); + +if (arguments_.has("--check")) { + const notices = await readFile( + join(root, "licenses/npm-runtime-notices.txt"), + "utf8", + ); + const headings = [...notices.matchAll(/^===== (.+) =====$/gmu)]; + const sections = new Map(); + for (const [index, heading] of headings.entries()) { + if (sections.has(heading[1])) + throw new Error(`Duplicate runtime notice: ${heading[1]}`); + sections.set( + heading[1], + notices.slice( + heading.index + heading[0].length + 1, + headings[index + 1]?.index, + ), + ); + } + for (const entry of runtime) { + const identity = `${entry.name}@${entry.version}`; + const section = sections.get(identity); + if (section === undefined) + throw new Error(`Missing runtime notice: ${identity}`); + const metadata = [ + `Declared license: ${entry.license}`, + `Archive: ${entry.resolved}`, + `Integrity: ${entry.integrity}`, + "", + ].join("\n"); + if (!section.startsWith(metadata)) + throw new Error(`Runtime notice metadata differs for ${identity}`); + } + if ( + !notices + .slice(0, headings[0]?.index) + .includes( + `Runtime dependency fingerprint (SHA-256): ${runtimeFingerprint}\n`, + ) + ) + throw new Error( + `Runtime notice fingerprint differs; refresh verified notices for ${runtimeFingerprint}`, + ); + const references = JSON.parse( + await readFile(join(root, "licenses/upstream-sources.json"), "utf8"), + ); + for (const reference of references) { + const bytes = await readFile(join(root, reference.file)); + if (createHash("sha256").update(bytes).digest("hex") !== reference.sha256) + throw new Error(`Preserved notice digest differs: ${reference.file}`); + } +} +console.log( + JSON.stringify({ + locked_packages: entries.length, + runtime_packages: runtime.length, + runtime_dependency_fingerprint: runtimeFingerprint, + }), +); diff --git a/scripts/hopper-demo-x11.py b/scripts/hopper-demo-x11.py index 470c9fd28..da2fe884f 100644 --- a/scripts/hopper-demo-x11.py +++ b/scripts/hopper-demo-x11.py @@ -10,6 +10,7 @@ import json import os from pathlib import Path import secrets +import select import stat import subprocess import tempfile @@ -118,6 +119,7 @@ class XWindowAttributes(ctypes.Structure): def parse_args() -> argparse.Namespace: parser = argparse.ArgumentParser() parser.add_argument("--probe", action="store_true") + parser.add_argument("--owner-stdin", action="store_true") parser.add_argument("--hopper") parser.add_argument("--socket") parser.add_argument( @@ -133,6 +135,43 @@ def parse_args() -> argparse.Namespace: return parser.parse_args() +class OwnerLifetime: + """The launcher's private pipe is a lifetime capability, independent of PIDs.""" + + def __init__(self, enabled: bool) -> None: + self._poll = select.poll() if enabled else None + if self._poll is not None: + # Node/libuv can implement piped stdio with a Unix socket pair. + mode = os.fstat(0).st_mode + if not (stat.S_ISFIFO(mode) or stat.S_ISSOCK(mode)): + raise AdapterFailure( + INVALID_LAUNCH_COMMAND, + "invalid_launch_command", + "owner lifetime requires a private stdin pipe", + ) + self._poll.register(0, select.POLLIN | select.POLLHUP | select.POLLERR) + + def alive(self) -> bool: + if self._poll is None: + return True + for _, events in self._poll.poll(0): + if events & (select.POLLHUP | select.POLLERR | select.POLLNVAL): + return False + if events & select.POLLIN and not os.read(0, 4096): + return False + return True + + +def wait_for_hopper(child: subprocess.Popen[bytes], owner: OwnerLifetime) -> int: + while owner.alive(): + try: + return child.wait(timeout=0.1) + except subprocess.TimeoutExpired: + continue + # run_launch's finally owns cleanup of both direct, unreaped children. + return 0 + + def digest(path: Path) -> str: value = hashlib.sha256() with path.open("rb") as file: @@ -572,6 +611,7 @@ def start_xvfb( "-auth", str(authority), ], + stdin=subprocess.DEVNULL, stdout=subprocess.DEVNULL, stderr=subprocess.PIPE, ) @@ -627,6 +667,9 @@ def run_launch(args: argparse.Namespace) -> int: "invalid_launch_command", "missing Hopper launch coordinates", ) + owner = OwnerLifetime(args.owner_stdin) + if not owner.alive(): + return 0 hopper = Path(args.hopper) socket = Path(args.socket) try: @@ -654,6 +697,8 @@ def run_launch(args: argparse.Namespace) -> int: child: subprocess.Popen[bytes] | None = None display: int | None = None try: + if not owner.alive(): + return 0 hopper_environment = dict(os.environ) for name in ("WAYLAND_DISPLAY", "WAYLAND_SOCKET"): hopper_environment.pop(name, None) @@ -666,7 +711,10 @@ def run_launch(args: argparse.Namespace) -> int: "XDG_SESSION_TYPE": "x11", } ) - child = subprocess.Popen(command, env=hopper_environment) + # Children must not consume or retain REA's lifetime pipe. + child = subprocess.Popen( + command, env=hopper_environment, stdin=subprocess.DEVNULL + ) leader = os.getpid() os.environ["XAUTHORITY"] = str(authority) @@ -702,10 +750,12 @@ def run_launch(args: argparse.Namespace) -> int: observed: list[tuple[int, int, int, int, int]] = [] dialog: tuple[int, int, int, int, int] | None = None while time.monotonic() < deadline: + if not owner.alive(): + return 0 if socket.exists(): x11.XCloseDisplay(display) display = None - return child.wait() + return wait_for_hopper(child, owner) if not hopper_is_owned(leader, hopper): if child.poll() is None: time.sleep(0.1) @@ -749,7 +799,7 @@ def run_launch(args: argparse.Namespace) -> int: x11.XFlush(display) x11.XCloseDisplay(display) display = None - return child.wait() + return wait_for_hopper(child, owner) except AdapterFailure as error: raise error.with_stderr(capture) finally: diff --git a/scripts/lib/browser-nested-source-map-e2e.mjs b/scripts/lib/browser-nested-source-map-e2e.mjs index 0325b69e4..ff2af8863 100644 --- a/scripts/lib/browser-nested-source-map-e2e.mjs +++ b/scripts/lib/browser-nested-source-map-e2e.mjs @@ -1,13 +1,11 @@ import assert from "node:assert/strict"; import { execFile } from "node:child_process"; import { createHash } from "node:crypto"; -import { join } from "node:path"; import { fileURLToPath } from "node:url"; import { promisify } from "node:util"; import { TraceMap, eachMapping } from "@jridgewell/trace-mapping"; import { CdpBrowserProvider } from "../../dist/browser/CdpBrowserProvider.js"; import { CdpConnection } from "../../dist/browser/CdpConnection.js"; -import { waitForBrowserDevtoolsPort } from "../../dist/browser/BrowserProcessStartup.js"; import { parseEvidence } from "../../dist/domain/evidence.js"; import { traceSourceMap } from "../../dist/javascript/sourceMaps/TraceSourceMap.js"; import { startBrowserSourceMapSite } from "../fixtures/browser-source-map-site.mjs"; @@ -63,7 +61,6 @@ async function verifyCase(executable, entrypoint, scenario) { let fixture; let connection; let primaryError; - let stderr = ""; let phase = "native-map-admission"; let browserVersion; let expected; @@ -90,17 +87,7 @@ async function verifyCase(executable, entrypoint, scenario) { phase = "owned-browser-startup"; fixture = await startRuntimeFixtureBrowser(executable, site.origin); - fixture.browser.stderr.on("data", (chunk) => { - if (stderr.length < 65536) stderr += chunk; - }); - const port = await waitForBrowserDevtoolsPort({ - child: fixture.browser, - executable, - activePortPath: join(fixture.profile, "DevToolsActivePort"), - stderr: () => stderr, - timeoutMs: 20_000, - }); - const endpoint = `http://127.0.0.1:${port}`; + const endpoint = `http://127.0.0.1:${fixture.port}`; const provider = new CdpBrowserProvider(); const targets = await provider.listTargets({ cdp_endpoint: endpoint, diff --git a/scripts/lib/browser-network-assertions.mjs b/scripts/lib/browser-network-assertions.mjs index 7f99ca0b5..015a71854 100644 --- a/scripts/lib/browser-network-assertions.mjs +++ b/scripts/lib/browser-network-assertions.mjs @@ -117,7 +117,7 @@ export function assertBrowserNetworkEvidence( assert.deepEqual(retained(responseFor("/compressed")), networkFixtureDecoded); assert.equal( responseFor("/compressed").body.representation, - "browser-decoded-response-bytes", + "playwright-response-body-bytes", ); const formRequest = requestEvents.find( (event) => event.url.url === `${origin}/form`, @@ -149,7 +149,7 @@ export function assertBrowserNetworkEvidence( return { same_url_markers: markers, binary_bytes: networkFixtureBinary.length, - compressed_representation: "browser-decoded-response-bytes", + compressed_representation: "playwright-response-body-bytes", unfinished_stream: "response-unfinished", empty_response_state: responseFor("/empty").body.state, }; diff --git a/scripts/lib/browser-runtime-e2e.mjs b/scripts/lib/browser-runtime-e2e.mjs index c2ebbed02..c4cb4f09f 100644 --- a/scripts/lib/browser-runtime-e2e.mjs +++ b/scripts/lib/browser-runtime-e2e.mjs @@ -3,14 +3,12 @@ import { spawn, execFile } from "node:child_process"; import { createHash } from "node:crypto"; import { once } from "node:events"; import { access } from "node:fs/promises"; -import { join } from "node:path"; import { fileURLToPath } from "node:url"; import { promisify } from "node:util"; import { Client } from "@modelcontextprotocol/client"; import { StdioClientTransport } from "@modelcontextprotocol/client/stdio"; import { CdpBrowserProvider } from "../../dist/browser/CdpBrowserProvider.js"; import { CdpConnection } from "../../dist/browser/CdpConnection.js"; -import { waitForBrowserDevtoolsPort } from "../../dist/browser/BrowserProcessStartup.js"; import { parseEvidence } from "../../dist/domain/evidence.js"; import { webExecutionSchema } from "../../dist/domain/webExecution.js"; import { webEventListenersSchema } from "../../dist/domain/webEventListeners.js"; @@ -42,23 +40,11 @@ export async function verifyBrowserRuntime( const site = await startBrowserRuntimeSite(); let fixture; let primaryError; - let stderr = ""; let action; let client; try { fixture = await startRuntimeFixtureBrowser(executable, site.origin); - const { browser, profile } = fixture; - browser.stderr.on("data", (chunk) => { - if (stderr.length < 65536) stderr += chunk; - }); - const port = await waitForBrowserDevtoolsPort({ - child: browser, - executable, - activePortPath: join(profile, "DevToolsActivePort"), - stderr: () => stderr, - timeoutMs: 20_000, - }); - const endpoint = `http://127.0.0.1:${port}`; + const endpoint = `http://127.0.0.1:${fixture.port}`; const targets = await new CdpBrowserProvider().listTargets({ cdp_endpoint: endpoint, allowed_origins: [site.origin], diff --git a/scripts/lib/browser-runtime-fixture-lifecycle.mjs b/scripts/lib/browser-runtime-fixture-lifecycle.mjs index 24b88c793..d39617f58 100644 --- a/scripts/lib/browser-runtime-fixture-lifecycle.mjs +++ b/scripts/lib/browser-runtime-fixture-lifecycle.mjs @@ -8,8 +8,9 @@ import { spawnOwnedProviderProcess } from "../../dist/process/ProviderProcess.js import { createSystemProcessOwnershipHost } from "../../dist/process/ProcessOwnershipObservation.js"; import { liveProcesses } from "../../dist/process/ProcessOwnershipProcessTree.js"; import { CdpConnection } from "../../dist/browser/CdpConnection.js"; +import { waitForBrowserDevtoolsPort } from "../../dist/browser/BrowserProcessStartup.js"; -/** Launch only the synthetic fixture browser in its own verified process group. */ +/** Launch the synthetic fixture browser and await CDP in its own verified process group. */ export async function startRuntimeFixtureBrowser(executable, origin) { const profile = await mkdtemp(join(tmpdir(), "rea-real-web-runtime-")); let owned; @@ -38,9 +39,21 @@ export async function startRuntimeFixtureBrowser(executable, origin) { expectedCommand: null, }); owned.process.stdout?.resume(); + let stderr = ""; + owned.process.stderr?.on("data", (chunk) => { + if (stderr.length < 65536) stderr += chunk; + }); + const port = await waitForBrowserDevtoolsPort({ + child: owned.process, + executable, + activePortPath: join(profile, "DevToolsActivePort"), + stderr: () => stderr, + // Match the broader real-browser verifier's allowance for cold Chrome + // startup on shared runners; early process failures still reject at once. + timeoutMs: 60_000, + }); return { - browser: owned.process, - profile, + port, close: async () => { await stopOwnedBrowser(owned, profile); await rm(profile, { diff --git a/scripts/lib/catalog-builders.mjs b/scripts/lib/catalog-builders.mjs index f9e0c0cef..32ec51ee3 100644 --- a/scripts/lib/catalog-builders.mjs +++ b/scripts/lib/catalog-builders.mjs @@ -29,6 +29,9 @@ export const toolFamilyCatalog = (sources) => { ...sources.evmContracts.EVM_TOOL_CONTRACTS, ...sources.goContracts.GO_TOOL_CONTRACTS, ...sources.wasmContracts.WASM_TOOL_CONTRACTS, + ...sources.sqliteContracts.SQLITE_TOOL_CONTRACTS, + ...sources.captureContracts.CAPTURE_TOOL_CONTRACTS, + ...sources.signalContracts.SIGNAL_TOOL_CONTRACTS, ], }, { @@ -49,6 +52,21 @@ export const toolFamilyCatalog = (sources) => { surface: "android-provider", contracts: sources.androidContracts.ANDROID_TOOL_CONTRACTS, }, + { + id: "pcap", + surface: "pcap-provider", + contracts: sources.pcapContracts.PCAP_TOOL_CONTRACTS, + }, + { + id: "flutter", + surface: "flutter-provider", + contracts: sources.flutterContracts.FLUTTER_TOOL_CONTRACTS, + }, + { + id: "frida", + surface: "instrumentation-provider", + contracts: sources.fridaContracts.FRIDA_TOOL_CONTRACTS, + }, { id: "apktool", surface: "apktool-provider", @@ -145,6 +163,10 @@ export const providerCatalog = (sources) => { activeContracts, } = electronContractSlices(sources); return [ + { + identity: sources.fridaProvider.FRIDA_PROVIDER_IDENTITY, + contracts: sources.fridaContracts.FRIDA_TOOL_CONTRACTS, + }, { identity: sources.hopperProvider.HOPPER_PROVIDER_IDENTITY, contracts: declaredContracts( @@ -181,6 +203,14 @@ export const providerCatalog = (sources) => { ({ name }) => name === "inspect_pe_resources", ), }, + { + identity: sources.captureProvider.TSHARK_PROVIDER_IDENTITY, + contracts: sources.captureContracts.CAPTURE_TOOL_CONTRACTS, + }, + { + identity: sources.signalProvider.SIGROK_PROVIDER_IDENTITY, + contracts: sources.signalContracts.SIGNAL_TOOL_CONTRACTS, + }, { identity: sources.wasmProvider.WABT_PROVIDER_IDENTITY, contracts: sources.wasmContracts.WASM_TOOL_CONTRACTS, @@ -193,6 +223,10 @@ export const providerCatalog = (sources) => { identity: sources.goProvider.GO_BINARY_PROVIDER_IDENTITY, contracts: sources.goContracts.GO_TOOL_CONTRACTS, }, + { + identity: sources.sqliteDomain.SQLITE_PROVIDER_IDENTITY, + contracts: sources.sqliteContracts.SQLITE_TOOL_CONTRACTS, + }, { identity: sources.artifactProviders.ARTIFACT_GRAPH_PROVIDER, contracts: sources.artifactContracts.ARTIFACT_TOOL_CONTRACTS, @@ -222,6 +256,14 @@ export const providerCatalog = (sources) => { identity: sources.androidProvider.JADX_PROVIDER_IDENTITY, contracts: sources.androidContracts.ANDROID_TOOL_CONTRACTS, }, + { + identity: sources.pcapProvider.PCAP_PROVIDER_IDENTITY, + contracts: sources.pcapContracts.PCAP_TOOL_CONTRACTS, + }, + { + identity: sources.flutterProvider.FLUTTER_PROVIDER_IDENTITY, + contracts: sources.flutterContracts.FLUTTER_TOOL_CONTRACTS, + }, { identity: sources.apktoolProvider.APKTOOL_PROVIDER_IDENTITY, contracts: sources.apktoolContracts.APKTOOL_TOOL_CONTRACTS, @@ -239,6 +281,11 @@ export const providerCatalog = (sources) => { contracts: sources.webNetworkCaptureContracts.WEB_NETWORK_CAPTURE_TOOL_CONTRACTS, }, + { + identity: sources.webNetworkCaptureProvider.SAZ_CAPTURE_PROVIDER_IDENTITY, + contracts: + sources.webNetworkCaptureContracts.WEB_NETWORK_CAPTURE_TOOL_CONTRACTS, + }, { identity: sources.webNetworkCaptureProvider.MITMPROXY_CAPTURE_PROVIDER_IDENTITY, diff --git a/scripts/lib/catalog-core.mjs b/scripts/lib/catalog-core.mjs index 56ffd544c..f5488a9e6 100644 --- a/scripts/lib/catalog-core.mjs +++ b/scripts/lib/catalog-core.mjs @@ -43,11 +43,19 @@ const SOURCE_PATHS = { sessionContracts: "dist/contracts/sessionToolContracts.js", binaryDiagnosticsContracts: "dist/contracts/native/binaryDiagnosticsToolContracts.js", + fridaContracts: "dist/contracts/fridaToolContracts.js", + fridaProvider: "dist/frida/FridaInstrumentationManager.js", pwntoolsProvider: "dist/native/pwntools/PwntoolsRelease.js", nativeContracts: "dist/contracts/native/nativeToolContracts.js", + captureContracts: "dist/contracts/captures/captureToolContracts.js", + captureProvider: "dist/captures/TsharkCaptureProvider.js", + signalContracts: "dist/contracts/signals/signalToolContracts.js", + signalProvider: "dist/signals/SigrokRecordingProvider.js", wasmContracts: "dist/contracts/wasm/wasmToolContracts.js", wasmProvider: "dist/wasm/WabtRelease.js", evmContracts: "dist/contracts/evm/evmToolContracts.js", + sqliteContracts: "dist/contracts/sqlite/sqliteToolContracts.js", + sqliteDomain: "dist/domain/sqlite/sqliteDatabase.js", evmProvider: "dist/evm/EvmoleRelease.js", goContracts: "dist/contracts/go/goToolContracts.js", goProvider: "dist/go/GoBinaryProvider.js", @@ -56,8 +64,12 @@ const SOURCE_PATHS = { firmwareContracts: "dist/contracts/firmware/firmwareToolContracts.js", firmwareProvider: "dist/firmware/FirmwareRelease.js", androidContracts: "dist/contracts/android/androidToolContracts.js", + flutterContracts: "dist/contracts/flutter/flutterToolContracts.js", + flutterProvider: "dist/flutter/FlutterBuildProvider.js", androidProvider: "dist/android/JadxRelease.js", apktoolContracts: "dist/contracts/apktool/apktoolToolContracts.js", + pcapContracts: "dist/contracts/pcap/pcapToolContracts.js", + pcapProvider: "dist/pcap/PcapProvider.js", apktoolProvider: "dist/apktool/ApktoolProvider.js", jebContracts: "dist/contracts/jeb/jebToolContracts.js", jebProvider: "dist/jeb/JebProvider.js", diff --git a/scripts/lib/clean-linux-hopper-runtime.d.mts b/scripts/lib/clean-linux-hopper-runtime.d.mts new file mode 100644 index 000000000..dd1010aa1 --- /dev/null +++ b/scripts/lib/clean-linux-hopper-runtime.d.mts @@ -0,0 +1,3 @@ +export function assertCleanLinuxHopperRuntime( + launcherPaths?: readonly string[], +): Promise; diff --git a/scripts/lib/clean-linux-hopper-runtime.mjs b/scripts/lib/clean-linux-hopper-runtime.mjs new file mode 100644 index 000000000..27a306fce --- /dev/null +++ b/scripts/lib/clean-linux-hopper-runtime.mjs @@ -0,0 +1,64 @@ +import { execFile } from "node:child_process"; +import { promisify } from "node:util"; +import { readdir, stat } from "node:fs/promises"; + +const execFileAsync = promisify(execFile); + +/** + * Observe leftover demo processes on a dedicated clean Linux runner, including + * groups reparented after their launcher exits. This is not ownership proof and + * never authorizes signaling; unrelated runtime processes also block this lane. + */ +export const assertCleanLinuxHopperRuntime = async ( + launcherPaths = [ + "/opt/hopper/bin/Hopper", + ...(process.env.HOPPER_LAUNCHER_PATH === undefined + ? [] + : [process.env.HOPPER_LAUNCHER_PATH]), + ], +) => { + const { stdout } = await execFileAsync("ps", ["-ax", "-o", "command="]); + if (/\/opt\/hopper\/bin\/Hopper|\bXvfb\b|hopper-demo-x11\.py/u.test(stdout)) + throw new Error("Clean Linux runner retained a Hopper demo process"); + const launchers = []; + for (const path of launcherPaths) { + try { + launchers.push(await stat(path, { bigint: true })); + } catch (error) { + if (error?.code !== "ENOENT") throw error; + } + } + if (launchers.length === 0) return; + // /proc exposes the executed file even when argv[0] names a removed symlink. + // Compare file identity, not a display path or a process name. + let inspectionError; + for (const entry of await readdir("/proc", { withFileTypes: true })) { + if (!entry.isDirectory() || !/^\d+$/u.test(entry.name)) continue; + let executable; + try { + executable = await stat(`/proc/${entry.name}/exe`, { bigint: true }); + } catch (error) { + if (error?.code === "ENOENT" || error?.code === "ESRCH") continue; + // Other users' executables may be unreadable. The setup lane launches + // providers as the caller; unreadable caller-owned processes fail closed. + if (error?.code === "EACCES") { + const owner = await stat(`/proc/${entry.name}`).catch((cause) => { + if (cause?.code === "ENOENT") return undefined; + throw cause; + }); + if (owner === undefined || owner.uid !== process.getuid()) continue; + } + // Finish the inventory so an unrelated restricted process cannot mask a + // positively identified leak. Unknown caller processes still fail closed. + inspectionError ??= error; + continue; + } + if ( + launchers.some( + ({ dev, ino }) => dev === executable.dev && ino === executable.ino, + ) + ) + throw new Error("Clean Linux runner retained a Hopper demo process"); + } + if (inspectionError !== undefined) throw inspectionError; +}; diff --git a/scripts/lib/module-boundaries.mjs b/scripts/lib/module-boundaries.mjs index a7a6bbf91..160dad7c0 100644 --- a/scripts/lib/module-boundaries.mjs +++ b/scripts/lib/module-boundaries.mjs @@ -5,9 +5,12 @@ import { fileURLToPath, pathToFileURL } from "node:url"; const PURE_LAYERS = new Set(["domain", "contracts"]); const MIGRATED_PROVIDER_ROOTS = new Set([ + "sqlite", "evm", "go", "wasm", + "captures", + "signals", "android", "firmware", "ghidra", diff --git a/scripts/lib/nativeaot-build.d.mts b/scripts/lib/nativeaot-build.d.mts new file mode 100644 index 000000000..418111852 --- /dev/null +++ b/scripts/lib/nativeaot-build.d.mts @@ -0,0 +1,25 @@ +export function supportsNativeAotFixtureHost( + platform: string, + architecture: string, +): boolean; + +export function buildNativeAotFixture( + run: (command: string, args: string[]) => unknown, + options: { + dotnet: string; + project: string; + runtime: string; + output: string; + }, +): Promise; + +export function nativeAotCommandError( + command: string, + operation: string, + result: { + error?: { message: string }; + status: number | null; + stdout?: string | null; + stderr?: string | null; + }, +): Error; diff --git a/scripts/lib/nativeaot-build.mjs b/scripts/lib/nativeaot-build.mjs new file mode 100644 index 000000000..3b49ce839 --- /dev/null +++ b/scripts/lib/nativeaot-build.mjs @@ -0,0 +1,60 @@ +import { join } from "node:path"; +import { setTimeout as delay } from "node:timers/promises"; + +/** NativeAOT fixtures use native toolchains, not cross-compilation. */ +export function supportsNativeAotFixtureHost(platform, architecture) { + return architecture === "x64" && ["linux", "win32"].includes(platform); +} + +/** Keep network recovery separate from compilation and preserve restore failures. */ +export async function buildNativeAotFixture(run, options) { + const { dotnet, project, runtime, output } = options; + const common = [ + project, + "-r", + runtime, + "--maxcpucount:1", + "-p:Configuration=Release", + `-p:BaseIntermediateOutputPath=${join(output, "obj")}/`, + `-p:BaseOutputPath=${join(output, "bin")}/`, + `-p:NativeAotMapPath=${join(output, "NativeAotFixture.map")}`, + ]; + for (let attempt = 1; attempt <= 2; attempt++) { + console.error(`NativeAOT dependency restore: attempt ${attempt}/2`); + try { + run(dotnet, ["restore", ...common, "--verbosity", "normal"]); + break; + } catch (cause) { + if (attempt === 2) + throw new Error( + "NativeAOT dependency restore failed after two attempts", + { + cause, + }, + ); + // Child diagnostics can contain authenticated feed URLs; keep retry logs static. + console.error( + "NativeAOT dependency restore failed; retrying in 1 second", + ); + await delay(1_000); + } + } + console.error("NativeAOT compilation (dependencies already restored)"); + run(dotnet, [ + "publish", + ...common, + "--no-restore", + "-o", + join(output, "symbols"), + ]); +} + +/** Sanitize child diagnostics before any retry, cause chain, or uncaught output. */ +export function nativeAotCommandError(command, operation, result) { + const diagnostic = `NativeAOT fixture lane requires/action failed ${command} ${operation}: ${result.error?.message ?? `exit ${result.status}`}\n${result.stdout ?? ""}${result.stderr ?? ""}`; + // Only URL authority userinfo is authentication; preserve host, path, query, + // and unrelated diagnostic values. Never retain the raw result as a cause. + return new Error( + diagnostic.replace(/\b(https?:\/\/)[^\\\s/?#]*@/giu, "$1[redacted]@"), + ); +} diff --git a/scripts/lib/real-ghidra-file-offsets.mjs b/scripts/lib/real-ghidra-file-offsets.mjs new file mode 100644 index 000000000..ea881dd04 --- /dev/null +++ b/scripts/lib/real-ghidra-file-offsets.mjs @@ -0,0 +1,264 @@ +import assert from "node:assert/strict"; +import { execFile } from "node:child_process"; +import { + mkdir, + mkdtemp, + readFile, + readdir, + rm, + writeFile, +} from "node:fs/promises"; +import { tmpdir } from "node:os"; +import { join } from "node:path"; +import { promisify } from "node:util"; +import { Client } from "@modelcontextprotocol/client"; +import { StdioClientTransport } from "@modelcontextprotocol/client/stdio"; +import { parseEvidence } from "../../dist/domain/evidence.js"; +import { + requireMcpOperationResult, + requireMcpToolError, + mcpTextValue, +} from "./mcp-verifier-results.mjs"; + +/** Exercise file coordinates through public CLI/MCP using the source-owned PE fixture. */ +export async function verifyGhidraFileOffsets( + targetPath, + entrypoint, + procedure, +) { + const original = await readFile(targetPath); + const workspace = await mkdtemp(join(tmpdir(), "rea-file-offsets-")); + const runtime = join(workspace, "runtime"); + await mkdir(runtime); + const env = { + ...process.env, + TEMP: runtime, + TMP: runtime, + TMPDIR: runtime, + REA_ANALYSIS_PROVIDER: "ghidra", + REA_LOG_LEVEL: "silent", + }; + const client = new Client({ name: "rea-file-offsets", version: "1" }); + const transport = new StdioClientTransport({ + command: process.execPath, + args: [entrypoint, "mcp"], + env, + stderr: "pipe", + }); + let connected = false; + let complete = false; + let primaryFailure; + const call = async (name, arguments_ = {}) => { + const result = await client.callTool( + { name, arguments: arguments_ }, + { timeout: 240_000 }, + ); + const projected = requireMcpOperationResult(result, name); + return ["open_binary", "binary_session", "close_binary"].includes(name) + ? projected + : (result.structuredContent ?? JSON.parse(mcpTextValue(result))); + }; + try { + await client.connect(transport); + connected = true; + await call("open_binary", { path: targetPath, provider_id: "ghidra" }); + const session = await call("binary_session"); + const mapping = parseEvidence( + await call("address_to_file_offset", { address: procedure }), + ); + const offset = mapping.normalized_result.file_offset; + const coordinate = `0x${offset.toString(16)}`; + const expected = parseEvidence( + await call("procedure_pseudo_code", { procedure }), + ); + const explicit = parseEvidence( + await call("procedure_pseudo_code", { + procedure: `file-offset:${coordinate}`, + }), + ); + const automatic = parseEvidence( + await call("procedure_pseudo_code", { procedure: coordinate }), + ); + for (const actual of [explicit, automatic]) { + assert.equal(actual.normalized_result, expected.normalized_result); + assert.equal(actual.raw_result.selection.file_offset, offset); + assert.equal(actual.raw_result.selection.mapped_address, procedure); + assert.ok( + actual.locations.some( + (location) => + location.kind === "file-offset" && location.offset === offset, + ), + ); + } + const invalid = await client.callTool({ + name: "procedure_pseudo_code", + arguments: { procedure: "file-offset:0x20000000000000" }, + }); + assert.equal(requireMcpToolError(invalid).code, "invalid_request"); + const unmapped = await client.callTool({ + name: "procedure_pseudo_code", + arguments: { procedure: "file-offset:0x100000" }, + }); + assert.ok( + JSON.stringify(requireMcpToolError(unmapped)).includes( + "no loaded source mapping", + ), + ); + assert.equal( + (await call("binary_session")).analysis_run.run_id, + session.analysis_run.run_id, + ); + const image = parseEvidence(await call("inspect_native_load_image")); + const headerMapping = image.normalized_result.observations.mappings.find( + (item) => item.initialized && item.file_offset === 0, + ); + assert.ok( + headerMapping, + "Fixture header must have an observed source mapping", + ); + const headerOffset = parseEvidence( + await call("address_to_file_offset", { address: headerMapping.start }), + ); + assert.equal(headerOffset.normalized_result.file_offset, 0); + for (const selector of ["file-offset:0x0", "0x0"]) { + const missing = requireMcpToolError( + await client.callTool({ + name: "procedure_pseudo_code", + arguments: { procedure: selector }, + }), + ); + assertMissingMappedProcedure(missing, headerMapping.start); + } + assert.equal( + (await call("binary_session")).analysis_run.run_id, + session.analysis_run.run_id, + ); + await call("close_binary"); + const cli = JSON.parse( + ( + await promisify(execFile)( + process.execPath, + [ + entrypoint, + "decompile", + targetPath, + `--file-offset=${coordinate}`, + "--provider", + "ghidra", + "--json", + ], + { env, timeout: 240_000, maxBuffer: 16 * 1024 * 1024 }, + ) + ).stdout, + ); + assert.equal(cli.normalized_result, explicit.normalized_result); + assert.deepEqual(cli.locations, explicit.locations); + const missingCli = await promisify(execFile)( + process.execPath, + [ + entrypoint, + "decompile", + targetPath, + "--file-offset=0x0", + "--provider", + "ghidra", + "--json", + ], + { env, timeout: 240_000, maxBuffer: 16 * 1024 * 1024 }, + ).then( + () => { + throw new Error( + "Mapped header bytes must not decompile as a procedure", + ); + }, + (cause) => JSON.parse(cause.stdout), + ); + assertMissingMappedProcedure(missingCli, headerMapping.start); + const alias = Buffer.from(original); + const pe = alias.readUInt32LE(0x3c); + if (alias.readUInt16LE(pe + 6) >= 2) { + const secondSection = pe + 24 + alias.readUInt16LE(pe + 20) + 40; + // Both sections now carry the same original bytes at distinct virtual addresses. + alias.writeUInt32LE(0x200, secondSection + 20); + const ambiguousPath = join(workspace, "ambiguous.exe"); + await writeFile(ambiguousPath, alias); + await call("open_binary", { path: ambiguousPath, provider_id: "ghidra" }); + const ambiguous = await client.callTool( + { + name: "procedure_pseudo_code", + arguments: { procedure: `file-offset:${coordinate}` }, + }, + { timeout: 240_000 }, + ); + assert.ok( + JSON.stringify(requireMcpToolError(ambiguous)).includes( + "multiple loaded mappings", + ), + ); + await call("close_binary"); + } + assert.deepEqual(await readFile(targetPath), original); + await client.close(); + connected = false; + assert.deepEqual(await readdir(runtime), []); + complete = true; + return { + cli_mcp_parity: true, + explicit_and_numeric_offsets: true, + invalid_and_unmapped_offsets: true, + mapped_offset_without_procedure: true, + ambiguous_mappings: + alias.readUInt16LE(pe + 6) >= 2 + ? "verified" + : "unavailable-single-section", + source_unchanged: true, + cleanup: "complete", + }; + } catch (cause) { + primaryFailure = cause; + throw cause; + } finally { + const cleanupFailures = []; + if (connected) { + try { + await call("close_binary"); + } catch (cause) { + cleanupFailures.push(cause); + } + } + try { + await client.close(); + } catch (cause) { + cleanupFailures.push(cause); + } + if (cleanupFailures.length > 0) { + process.stderr.write( + `Retained file-offset verifier workspace: ${workspace}\n`, + ); + throw new AggregateError( + primaryFailure === undefined + ? cleanupFailures + : [primaryFailure, ...cleanupFailures], + "File-offset verifier cleanup failed", + ); + } + if (complete) await rm(workspace, { recursive: true, force: true }); + else + process.stderr.write( + `Retained file-offset verifier workspace: ${workspace}\n`, + ); + } +} + +function assertMissingMappedProcedure(error, mappedAddress) { + assert.equal(error.code, "invalid_request"); + const message = error.details?.issues?.[0]?.message; + assert.equal(typeof message, "string"); + assert.ok( + message.includes("File offset 0x0 maps to analysis address"), + message, + ); + assert.ok(message.includes(mappedAddress), message); + assert.ok(message.includes("no procedure starts at or contains"), message); + assert.ok(!message.includes("--file-offset"), message); +} diff --git a/scripts/lib/real-ghidra-snapshot-lifecycle.mjs b/scripts/lib/real-ghidra-snapshot-lifecycle.mjs index 4a854c731..e359f22ac 100644 --- a/scripts/lib/real-ghidra-snapshot-lifecycle.mjs +++ b/scripts/lib/real-ghidra-snapshot-lifecycle.mjs @@ -36,16 +36,11 @@ export async function verifyGhidraSnapshotLifecycle( ); const error = requireMcpToolError(reply); assert.equal( - error?.code, + error.code, "evidence_integrity_mismatch", JSON.stringify(reply), ); - assert.match(error.message, /after analysis metadata mutations/u); - assert.match( - error.remediation.action, - /close.*without saving a snapshot/iu, - ); - assert.match(error.remediation.action, /export_evidence_bundle/u); + assert.equal(error.retryable, false); rejectedCalls++; }; try { diff --git a/scripts/lib/real-hopper-owner-exit.mjs b/scripts/lib/real-hopper-owner-exit.mjs new file mode 100644 index 000000000..300b35ada --- /dev/null +++ b/scripts/lib/real-hopper-owner-exit.mjs @@ -0,0 +1,130 @@ +import assert from "node:assert/strict"; +import { execFile } from "node:child_process"; +import { setTimeout as delay } from "node:timers/promises"; +import { promisify } from "node:util"; + +import { Client } from "@modelcontextprotocol/client"; +import { StdioClientTransport } from "@modelcontextprotocol/client/stdio"; + +import { verifyNoTokenOwnedProcesses } from "../../dist/process/ProcessOwnership.js"; +import { + observeProcessStartIdentity, + signalProcessWithStartIdentity, +} from "../../dist/process/ProcessOwnershipObservation.js"; +import { startUnrelatedHopperSentinel } from "./unrelated-hopper-sentinel.mjs"; +import { + requireMcpEvidenceResult, + requireMcpLifecycleResult, +} from "./mcp-verifier-results.mjs"; + +const execFileAsync = promisify(execFile); + +/** Prove actual MCP owner exit releases the demo singleton for subsequent CLI/MCP sessions. */ +export async function verifyLinuxHopperOwnerExit({ + primary, + secondary, + serverCommand, + serverArgs, + environment, +}) { + const sentinel = await startUnrelatedHopperSentinel(); + const outcomes = []; + try { + for (const mode of ["graceful", "SIGKILL"]) { + const transport = new StdioClientTransport({ + command: serverCommand, + args: serverArgs, + env: environment, + stderr: "pipe", + }); + // Drain launcher diagnostics even on the deliberately interrupted owner. + transport.stderr?.resume(); + const client = new Client({ name: "hopper-owner-exit", version: "1" }); + const options = { timeout: 180_000 }; + try { + await client.connect(transport); + const ownerPid = transport.pid; + assert.ok(ownerPid !== null); + const owner = await observeProcessStartIdentity(ownerPid); + assert.equal(owner?.state, "readable"); + requireMcpLifecycleResult( + await client.callTool( + { + name: "open_binary", + arguments: { path: primary }, + }, + options, + ), + "open_binary", + ); + const procedures = requireMcpEvidenceResult( + await client.callTool( + { name: "list_procedures", arguments: {} }, + options, + ), + "list_procedures", + ); + assert.ok(procedures.length > 0); + const status = requireMcpLifecycleResult( + await client.callTool( + { name: "binary_session", arguments: {} }, + options, + ), + "binary_session", + ); + const runId = status.analysis_run?.run_id; + assert.equal(typeof runId, "string"); + assert.equal(status.analysis_provider_binding?.provider.id, "hopper"); + assert.equal((await verifyNoTokenOwnedProcesses(runId)).cleaned, false); + if (mode === "graceful") await client.close(); + else { + assert.equal( + await signalProcessWithStartIdentity( + ownerPid, + owner.identity, + "SIGKILL", + ), + "signaled", + ); + } + const deadline = Date.now() + 10_000; + let cleanup; + do { + cleanup = await verifyNoTokenOwnedProcesses(runId); + if (cleanup.cleaned) break; + await delay(100); + } while (Date.now() < deadline); + assert.equal(cleanup.cleaned, true, cleanup.reason); + // The SIGKILL case must recover the stale lease for both target identities. + for (const target of [primary, secondary]) { + const result = await execFileAsync( + process.execPath, + [ + "scripts/rea.mjs", + "inspect", + target, + "--provider", + "hopper", + "--format", + "json", + ], + { env: environment, timeout: 180_000, maxBuffer: 16 * 1024 * 1024 }, + ); + assert.ok(JSON.parse(result.stdout).normalized_result); + } + outcomes.push({ + mode, + ownedProcessesStopped: true, + sameTargetReopened: true, + differentTargetReopened: true, + }); + } finally { + await client.close(); + await transport.close(); + } + } + } finally { + assert.equal(await sentinel.verifyAndClose(), true); + } + return { outcomes, unrelatedHopperSurvived: true }; +} diff --git a/scripts/lib/real-hopper-search.d.mts b/scripts/lib/real-hopper-search.d.mts new file mode 100644 index 000000000..e64031652 --- /dev/null +++ b/scripts/lib/real-hopper-search.d.mts @@ -0,0 +1,30 @@ +type VerifierCall = ( + name: string, + arguments_?: Record, +) => Promise; + +interface StringExpectation { + readonly value: string; + readonly encoding: string; + readonly symbol?: string; + readonly recognitionOptional?: boolean; +} + +/** Verify source bytes, observed decoding, address filters and literal searches. */ +export function verifyHopperStringObjects( + call: VerifierCall, + expectations: readonly StringExpectation[], + inventory?: readonly z.output[] | null, +): Promise<{ + readonly sourceBytesVerified: true; + readonly recognition: readonly { + readonly value: string; + readonly address: string; + readonly state: "observed" | "not_observed"; + readonly decodedObject: "verified" | "unverified"; + }[]; + readonly displayEscapesExcludedFromMatching: true; +}>; +import type { z } from "zod"; + +import type { analysisStringSchema } from "../../src/domain/hopperValues.js"; diff --git a/scripts/lib/real-hopper-search.mjs b/scripts/lib/real-hopper-search.mjs index 0d796f3d2..3456bc6b2 100644 --- a/scripts/lib/real-hopper-search.mjs +++ b/scripts/lib/real-hopper-search.mjs @@ -1,13 +1,16 @@ import assert from "node:assert/strict"; import { mcpTextValue } from "./mcp-verifier-results.mjs"; +const fixtureSymbolPrefix = process.platform === "darwin" ? "_" : ""; + /** Exercise literal/regex search, Unicode identities and cache invalidation in Hopper. */ export async function verifyHopperSearch(call, invalid, procedure) { const address = procedure.address; const original = await call("address_name", { address }); + let stringCoverage; try { await verifySymbolNames(call, invalid, address); - await verifySearchModes(call, address); + stringCoverage = await verifySearchModes(call, address); } finally { await call("set_address_name", { address, name: original }); } @@ -26,7 +29,7 @@ export async function verifyHopperSearch(call, invalid, procedure) { symbolUtf16LimitValidatedBeforeMutation: true, regexAndCaseModes: true, annotationCacheInvalidation: true, - escapedUtf8AndByteStrings: true, + stringCoverage, }; } @@ -103,11 +106,26 @@ async function verifySearchModes(call, address) { [{ address, value: "REA_Search_Upper" }], ); const strings = await call("list_strings"); - const long = "REA_LONG_LITERAL_" + "x".repeat(4096) + "needle"; - const longItem = strings.find((item) => - item.value.startsWith("REA_LONG_LITERAL_"), + const linux = process.platform === "linux"; + const fullLiteral = "REA_LONG_LITERAL_" + "x".repeat(4096) + "needle"; + // Recognition is a provider/loader capability, not an adapter guarantee. + // Always retain the original size in raw-byte coverage; Linux additionally + // requires an extent observed to produce native fragmented string objects. + const fullBytes = Buffer.from(fullLiteral + "\0"); + const raw = await call("read_bytes", { + address: `${fixtureSymbolPrefix}rea_long_literal`, + length: fullBytes.length, + }); + assert.equal(raw.complete, true); + assert.equal(raw.bytes_hex, fullBytes.toString("hex")); + const long = linux + ? "REA_FRAGMENTED_LITERAL_" + "x".repeat(512) + "fragment_tail" + : fullLiteral; + const longItem = strings.find( + (item) => long.startsWith(item.value) && item.value.startsWith("REA_"), ); assert.ok(longItem, "fixture omitted its real long literal"); + if (!linux) assert.equal(longItem.address, raw.address); assert.ok(long.startsWith(longItem.value)); assert.ok(longItem.provider_value.endsWith("…")); assert.equal(longItem.string.termination, "missing"); @@ -158,7 +176,7 @@ async function verifySearchModes(call, address) { } assert.deepEqual( await call("search_strings", { - pattern: "needle", + pattern: linux ? "fragment_tail" : "needle", mode: "literal", case_sensitive: true, }), @@ -176,36 +194,122 @@ async function verifySearchModes(call, address) { }), expected, ); - await verifyHopperStringObjects(call, [ - { value: "REA_UTF8_é_😀", encoding: "utf-8" }, - { value: 'REA_ESCAPED_"\\line\nend\t\r', encoding: "utf-8" }, - { value: "REA_LITERAL_BACKSLASH_\\n", encoding: "utf-8" }, - { value: "REA_LITERAL_…", encoding: "utf-8" }, - { value: "REA_LATIN1_ÿ", encoding: "latin-1" }, - ]); + const objects = await verifyHopperStringObjects( + call, + [ + { + value: "REA_UTF8_é_😀", + encoding: "utf-8", + symbol: `${fixtureSymbolPrefix}rea_utf8_literal`, + recognitionOptional: linux, + }, + { value: 'REA_ESCAPED_"\\line\nend\t\r', encoding: "utf-8" }, + { value: "REA_LITERAL_BACKSLASH_\\n", encoding: "utf-8" }, + { + value: "REA_LITERAL_…", + encoding: "utf-8", + symbol: `${fixtureSymbolPrefix}rea_ellipsis_literal`, + recognitionOptional: linux, + }, + { + value: "REA_LATIN1_ÿ", + encoding: "latin-1", + symbol: `${fixtureSymbolPrefix}rea_latin1_literal`, + recognitionOptional: linux, + }, + ], + strings, + ); + return { + fullLiteralSourceBytes: fullBytes.length, + fragmentedLiteralSourceBytes: Buffer.byteLength(long), + fullLiteralRecognition: { + address: raw.address, + state: strings.some((item) => item.address === raw.address) + ? "observed" + : "not_observed", + // Linux validates the original through raw bytes; its required decoded + // fragment/dossier checks exercise the separate supported-size literal. + decodedObject: linux ? "unverified" : "verified", + }, + ...objects, + }; } /** Compare native string identities and values with the source fixture's bytes. */ -export async function verifyHopperStringObjects(call, expectations) { - const strings = await call("list_strings"); - for (const { value, encoding } of expectations) { - const item = strings.find((candidate) => candidate.value === value); - assert.ok( - item, - `Hopper omitted the decoded string ${JSON.stringify(value)}`, - ); - assert.equal(item.string.encoding, encoding); - assert.equal(item.string.encoding_status, "inferred"); - assert.equal(item.string.termination, "present_or_not_required"); +export async function verifyHopperStringObjects( + call, + expectations, + inventory = null, +) { + // Reuse only the caller's inventory for this unchanged document, never live + // state from an earlier session. Address-filter and search checks remain real. + const strings = inventory ?? (await call("list_strings")); + const recognition = []; + for (const { + value, + encoding, + symbol, + recognitionOptional = false, + } of expectations) { const expectedBytes = Buffer.from( value + "\0", encoding.replaceAll("-", ""), ); - assert.equal(item.string.byte_length, expectedBytes.length); - const bytes = await call("read_bytes", { + let sourceBytes; + if (symbol !== undefined) { + const raw = await call("read_bytes", { + address: symbol, + length: expectedBytes.length, + }); + sourceBytes = raw; + assert.equal(raw.complete, true); + assert.equal(raw.bytes_hex, expectedBytes.toString("hex")); + } + const item = strings.find((candidate) => + sourceBytes === undefined + ? candidate.value === value + : candidate.address === sourceBytes.address, + ); + if (item === undefined && recognitionOptional) { + assert.ok( + symbol, + "optional recognition requires independent source-byte coverage", + ); + recognition.push({ + value, + address: sourceBytes.address, + state: "not_observed", + decodedObject: "unverified", + }); + continue; + } + assert.ok( + item, + `Hopper omitted the decoded string ${JSON.stringify(value)}`, + ); + assert.equal( + item.value, + value, + "native string decoding changed the source value", + ); + recognition.push({ + value, address: item.address, - length: expectedBytes.length, + state: "observed", + decodedObject: "verified", }); + assert.equal(item.string.encoding, encoding); + assert.equal(item.string.encoding_status, "inferred"); + assert.equal(item.string.termination, "present_or_not_required"); + assert.equal(item.string.byte_length, expectedBytes.length); + const bytes = + sourceBytes ?? + (await call("read_bytes", { + address: item.address, + length: expectedBytes.length, + })); + assert.equal(bytes.complete, true); assert.equal(bytes.bytes_hex, expectedBytes.toString("hex")); assert.deepEqual(await call("list_strings", { address: item.address }), [ item, @@ -225,7 +329,7 @@ export async function verifyHopperStringObjects(call, expectations) { ); return { sourceBytesVerified: true, - inferredEncodingReported: true, + recognition, displayEscapesExcludedFromMatching: true, }; } diff --git a/scripts/lib/real-hopper-semantic.mjs b/scripts/lib/real-hopper-semantic.mjs index 000b806d0..cb11b433c 100644 --- a/scripts/lib/real-hopper-semantic.mjs +++ b/scripts/lib/real-hopper-semantic.mjs @@ -1,5 +1,17 @@ import assert from "node:assert/strict"; -import { requireFunctionDossierOracle } from "../../dist/application/RealHopperAssertions.js"; + +/** + * `requireFunctionDossierOracle` is only used inside `verifyRealHopperFixture`, + * which runs against the real Hopper bridge after `build:cached`. Loading it + * lazily keeps this module importable from `test:fast` (which docs promise to + * run "without build" — see docs/testing.md § test scripts) so that mock-only + * callers such as `requireCurrentDocument` and `resolveFixtureProcedure` do + * not require `dist/`. + */ +const loadFunctionDossierOracle = () => + import("../../dist/application/RealHopperAssertions.js").then( + (module) => module.requireFunctionDossierOracle, + ); /** Require truthful tri-state permissions from real Hopper memory regions. */ export const requireTruthfulMemoryRegions = (segments) => { @@ -87,6 +99,7 @@ export async function verifyRealHopperFixture({ oracle, normalizedResult, }) { + const requireFunctionDossierOracle = await loadFunctionDossierOracle(); const main = await resolveFixtureProcedure( client, options, diff --git a/scripts/lib/verify-package-core.mjs b/scripts/lib/verify-package-core.mjs index a78b516da..cd543ead8 100644 --- a/scripts/lib/verify-package-core.mjs +++ b/scripts/lib/verify-package-core.mjs @@ -2,10 +2,17 @@ import { execFile } from "node:child_process"; import { lstat } from "node:fs/promises"; import { promisify } from "node:util"; import { Ajv2020 } from "ajv/dist/2020.js"; -import { - requireMcpLifecycleResult, - sortVerifierNames, -} from "./mcp-verifier-results.mjs"; + +/** + * `mcp-verifier-results.mjs` reaches into `dist/` at module load, so eager + * importing it propagates that build dependency to every consumer in this + * file. `verifyCompleteToolCatalog` is the only consumer, so we lazy-load + * the module there and keep the other helpers (`exec`, `run`, `json`, + * `pathExists`) usable from `test:fast` callers that only need `dist/`-free + * utilities — see docs/testing.md § test scripts, which promises `test:fast` + * runs "without build". + */ +const loadMcpVerifierResults = () => import("./mcp-verifier-results.mjs"); /** Promisified child_process execution helper. */ export const exec = promisify(execFile); @@ -35,6 +42,8 @@ export const json = (text) => JSON.parse(text); /** Verify schema validity and that the MCP catalog matches session metadata. */ export const verifyCompleteToolCatalog = async (client, options) => { + const { requireMcpLifecycleResult, sortVerifierNames } = + await loadMcpVerifierResults(); const listed = await client.listTools(undefined, options); const ajv = new Ajv2020({ strict: false, validateFormats: false }); for (const tool of listed.tools) { diff --git a/scripts/prepack.mjs b/scripts/prepack.mjs index 9d0958d8e..edf3072e5 100644 --- a/scripts/prepack.mjs +++ b/scripts/prepack.mjs @@ -49,7 +49,7 @@ if (await pathExists(join(root, "src"))) { "dist/mcp/main.js", "dist/cli-runtime/cli.js", "dist/cli-runtime/cliOutput.js", - "dist/cli-runtime/streamedJsonOutput.js", + "dist/cli-runtime/cliResultOutput.js", "dist/cli-runtime/mcpDoctor.js", "dist/mcpDoctor.js", "dist/cli.js", diff --git a/scripts/rea.mjs b/scripts/rea.mjs index 3b1ef6c4a..75ee552c5 100755 --- a/scripts/rea.mjs +++ b/scripts/rea.mjs @@ -16,6 +16,12 @@ const isMcpMode = const isMcpDoctorMode = args[0] === "mcp" && args[1] === "doctor"; const packageRoot = resolve(dirname(fileURLToPath(import.meta.url)), ".."); +// Windows home lookup throws for an empty USERPROFILE. Dependencies resolve +// home during import, before REA's own resolver can apply its account fallback. +if (process.platform === "win32" && process.env.USERPROFILE === "") { + delete process.env.USERPROFILE; +} + // Playwright's registry assumes one of its three desktop host platforms when // it chooses the browser cache directory. Termux reports `android`, although // its Node runtime and filesystem are POSIX-compatible. Keep the cache path @@ -37,7 +43,7 @@ const runtimeFiles = isMcpMode : [ "dist/cli-runtime/cli.js", "dist/cli-runtime/cliOutput.js", - "dist/cli-runtime/streamedJsonOutput.js", + "dist/cli-runtime/cliResultOutput.js", ]; if (!(await compiledRuntimeExists(runtimeFiles))) { @@ -58,21 +64,26 @@ if (!(await compiledRuntimeExists(runtimeFiles))) { process.stdout.write(result.output); process.exitCode = result.exitCode; } else { - const { createCli } = await import("../dist/cli-runtime/cli.js"); - const { createStreamedCliJsonOutput } = - await import("../dist/cli-runtime/streamedJsonOutput.js"); + const { cliConfigurationError, createCli } = + await import("../dist/cli-runtime/cli.js"); + const { createCliResultOutput } = + await import("../dist/cli-runtime/cliResultOutput.js"); const { renderCliOutputArgumentError, renderEmptyFilteredCliOutput, validateCliOutputArguments, } = await import("../dist/cli-runtime/cliOutput.js"); const outputArguments = validateCliOutputArguments(args); - if (!outputArguments.ok) { + const configurationError = cliConfigurationError(process.env); + if (configurationError !== undefined) { + process.stderr.write(`${configurationError}\n`); + process.exitCode = 1; + } else if (!outputArguments.ok) { process.stdout.write(renderCliOutputArgumentError(outputArguments)); process.exitCode = 1; } else { let wroteOutput = false; - const resultOutput = createStreamedCliJsonOutput(args, process.stdout); + const resultOutput = createCliResultOutput(args, process.stdout); await createCli(process.env, resultOutput).serve(args, { stdout: (output) => { if (resultOutput?.handled) { diff --git a/scripts/run-exclusive-command.mjs b/scripts/run-exclusive-command.mjs index 11fe38d47..36efc29a2 100644 --- a/scripts/run-exclusive-command.mjs +++ b/scripts/run-exclusive-command.mjs @@ -1,6 +1,6 @@ #!/usr/bin/env node -import { spawn } from "node:child_process"; +import spawn from "cross-spawn"; import { mkdir } from "node:fs/promises"; import { join, resolve } from "node:path"; import { DatabaseSync } from "node:sqlite"; @@ -74,7 +74,6 @@ function runCommand() { child = spawn(command[0], command.slice(1), { cwd: process.cwd(), env: process.env, - shell: process.platform === "win32", stdio: "inherit", }); child.once("error", reject); diff --git a/scripts/test-website.py b/scripts/test-website.py index fed68227a..5c1aef876 100644 --- a/scripts/test-website.py +++ b/scripts/test-website.py @@ -401,7 +401,7 @@ class WebsiteTranslationChecks(unittest.TestCase): server.shutdown() worker.join() - def test_every_reading_page_offers_light_and_dark_theme_colors(self): + def test_every_reading_page_loads_theme_before_styles(self): site = ROOT / "website/_site" english_pages = reading_pages(ROOT / "website/public") self.assertTrue(english_pages) @@ -412,10 +412,20 @@ class WebsiteTranslationChecks(unittest.TestCase): for path in {original, site / relative if code == "en" else site / code / relative}: with self.subTest(language=code, page=str(path.relative_to(ROOT))): doc = Document(path.read_text()) - media = sorted(node.attrs.get("media") for node in doc.nodes if node.tag == "meta" and node.attrs.get("name") == "theme-color") - self.assertEqual(media, ["(prefers-color-scheme: dark)", "(prefers-color-scheme: light)"]) - styles = (ROOT / "website/public/assets/styles.css").read_text() - self.assertTrue("@media (prefers-color-scheme: dark)" in styles, "styles.css has no dark color scheme block") + colors = [node for node in doc.nodes if node.tag == "meta" and node.attrs.get("name") == "theme-color"] + self.assertEqual(len(colors), 1) + self.assertEqual(colors[0].attrs.get("content"), "#ffffff") + self.assertNotIn("media", colors[0].attrs) + theme = [node for node in doc.nodes if node.tag == "script" and (node.attrs.get("src") or "").endswith("/assets/theme.js")] + self.assertEqual(len(theme), 1) + for deferred in ("defer", "async", "type"): + self.assertNotIn(deferred, theme[0].attrs) + stylesheet = next(node for node in doc.nodes if node.tag == "link" and node.attrs.get("rel") == "stylesheet") + self.assertLess(theme[0].start, stylesheet.start) + toggle = [node for node in doc.nodes if "data-theme-toggle" in node.attrs] + self.assertEqual(len(toggle), 1) + self.assertEqual(toggle[0].tag, "button") + self.assertIn("hidden", toggle[0].attrs) if __name__ == "__main__": diff --git a/scripts/verify-flutter.mjs b/scripts/verify-flutter.mjs new file mode 100644 index 000000000..061ad8b20 --- /dev/null +++ b/scripts/verify-flutter.mjs @@ -0,0 +1,259 @@ +import assert from "node:assert/strict"; +import { execFile } from "node:child_process"; +import { readdir, readFile } from "node:fs/promises"; +import { resolve } from "node:path"; +import { promisify } from "node:util"; +import { Client } from "@modelcontextprotocol/client"; +import { StdioClientTransport } from "@modelcontextprotocol/client/stdio"; +import { toolContract } from "../dist/contracts/toolContracts.js"; +import { PrivateRuntimeRoot } from "../dist/process/PrivateRuntimeRoot.js"; +import { hashStableFile } from "../dist/filesystem/StableFileHash.js"; +import { mcpTextValue } from "./lib/mcp-verifier-results.mjs"; + +const options = parseArguments(process.argv.slice(2)); +if (options.help) { + process.stdout.write( + "Usage: npm run verify:flutter -- --apk PATH [--plain-apk PATH] [--expectations JSON]\n" + + "Checks real APK parsing through compiled CLI and stdio MCP. Optional\n" + + "expectations bind exact engine labels, URI counts and snapshot hash to an APK digest.\n", + ); + process.exit(0); +} +if (options.apk === null) { + process.stderr.write("No Flutter APK was provided; pass --apk PATH.\n"); + process.exit(2); +} +const expectations = + options.expectations === null + ? null + : JSON.parse(await readFile(options.expectations, "utf8")); +const root = await PrivateRuntimeRoot.create({ + prefix: "rea-flutter-verifier-", +}); +const entrypoint = resolve("scripts/rea.mjs"); +const environment = Object.fromEntries( + Object.entries(process.env).filter(([, value]) => typeof value === "string"), +); +Object.assign(environment, { + TMPDIR: root.path, + TMP: root.path, + TEMP: root.path, +}); +const client = new Client({ name: "flutter-verifier", version: "1" }); +const transport = new StdioClientTransport({ + command: process.execPath, + args: [entrypoint, "mcp"], + env: environment, + stderr: "pipe", +}); +const execute = promisify(execFile); +try { + await client.connect(transport); + const apk = resolve(options.apk); + const identity = await hashStableFile(apk); + const identified = await run("identify_flutter_build", { path: apk }); + assert.deepEqual(identified.target, { path: apk, ...identity }); + assert.equal(identified.flutter_detected, true); + assert.equal(identified.coverage, "complete"); + const abis = identified.abis.filter((abi) => abi.libapp.present); + assert.ok(abis.length > 0); + const hashes = new Set(); + for (const abi of abis) { + assert.equal(abi.libapp.elf_header_valid, true); + assert.equal(abi.libapp.snapshot_hash_sources, 2); + assert.ok(abi.libapp.snapshot_hash); + hashes.add(abi.libapp.snapshot_hash); + assert.equal(abi.libflutter.present, true); + assert.match(abi.libflutter.build_id ?? "", /^(?:[0-9a-f]{2}){4,64}$/u); + assert.deepEqual(abi.libflutter.build_id_candidates, [ + abi.libflutter.build_id, + ]); + } + assert.equal(hashes.size, 1, "Every ABI must agree on the snapshot hash"); + if (expectations !== null) { + assert.equal(identity.sha256, expectations.target_sha256); + assert.deepEqual([...hashes], [expectations.snapshot_hash]); + assert.deepEqual( + abis.map((abi) => abi.abi).sort(), + Object.keys(expectations.engines).sort(), + ); + for (const abi of abis) { + assert.deepEqual( + { + dart_version: abi.libflutter.dart_version, + toolchain_lines: abi.libflutter.toolchain_lines, + }, + expectations.engines[abi.abi], + ); + assert.equal(abi.libflutter.dart_version_capped, false); + assert.equal(abi.libflutter.toolchain_capped, false); + } + process.stdout.write( + "[ok] Exact per-ABI engine labels match digest-bound expectations\n", + ); + } else { + process.stdout.write( + "[unverified] Exact engine labels and their absence need --expectations JSON\n", + ); + } + // The same checks apply to the default selection and each remaining ABI. + const preferred = await run("inspect_dart_aot", { path: apk }); + for (const abi of abis) { + const aot = + abi.abi === preferred.abi + ? preferred + : await run("inspect_dart_aot", { path: apk, abi: abi.abi }); + assert.equal(aot.abi, abi.abi); + assert.equal( + aot.libapp.coverage, + "complete", + `Snapshot decoding must be complete on ${abi.abi}`, + ); + assert.equal(aot.coverage, aot.string_pool.coverage); + if (aot.coverage !== "complete") { + process.stdout.write( + `[unverified] ${abi.abi}: full string-pool projection (returned pool is bounded and partial)\n`, + ); + } + assert.deepEqual(aot.target, identified.target); + assert.equal(aot.libapp.sha256, abi.libapp.sha256); + assert.equal(aot.libapp.bytes, abi.libapp.bytes); + assert.equal(aot.libapp.snapshot_hash_sources, 2); + assert.equal(aot.libapp.snapshot_hash, abi.libapp.snapshot_hash); + assert.deepEqual( + aot.libapp.sections.map((section) => section.name).sort(), + [ + "_kDartVmSnapshotData", + "_kDartVmSnapshotInstructions", + "_kDartIsolateSnapshotData", + "_kDartIsolateSnapshotInstructions", + ].sort(), + ); + for (const section of aot.libapp.sections) { + assert.ok(section.offset + section.size <= aot.libapp.bytes); + if (!section.name.endsWith("Data")) continue; + assert.equal(section.magic_valid, true); + assert.equal( + section.kind, + 3, + "This verifier requires an AOT app snapshot", + ); + assert.ok( + section.header_length >= 48 && + section.header_length + 4 <= section.size, + `Snapshot extent must fit ${section.name} on ${abi.abi}`, + ); + } + assert.ok(aot.string_pool.package_uri_count_at_least > 0); + assert.ok(aot.string_pool.dart_uri_count_at_least > 0); + if (expectations?.string_pools !== undefined) { + const expected = expectations.string_pools[abi.abi]; + assert.ok( + expected, + `Pinned string-pool counts are required on ${abi.abi}`, + ); + assert.equal( + aot.string_pool.package_uri_count_at_least, + expected.package_uri_count_at_least, + ); + assert.equal( + aot.string_pool.dart_uri_count_at_least, + expected.dart_uri_count_at_least, + ); + process.stdout.write( + `[ok] ${abi.abi}: exact pinned package and Dart URI counts\n`, + ); + } else { + process.stdout.write( + `[unverified] ${abi.abi}: exact string-pool counts need --expectations JSON\n`, + ); + } + process.stdout.write( + `[ok] ${abi.abi}: four symbols, bounded AOT headers, agreeing hashes and string pool\n`, + ); + } + if (options.plainApk !== null) { + const plain = resolve(options.plainApk); + const negative = await run("identify_flutter_build", { path: plain }); + assert.deepEqual(negative.target, { + path: plain, + ...(await hashStableFile(plain)), + }); + assert.equal(negative.flutter_detected, false); + assert.equal(negative.coverage, "complete"); + } + assert.deepEqual( + await hashStableFile(apk), + identity, + "Verification must preserve its input", + ); +} finally { + // Server shutdown retries retained provider cleanup and must settle before success. + try { + await client.close(); + await transport.close(); + assert.deepEqual( + await readdir(root.path), + [], + "Provider snapshots must be released before verification succeeds", + ); + } finally { + await root.close(); + } +} +process.stdout.write( + "all asserted Flutter CLI/MCP checks passed; unverified facets are reported above\n", +); + +async function run(operation, input) { + const contract = toolContract(operation); + const args = [ + entrypoint, + operation.replaceAll("_", "-"), + input.path, + "--json", + ]; + if (input.abi !== undefined) args.push("--abi", input.abi); + const { stdout } = await execute(process.execPath, args, { + env: environment, + timeout: 60_000, + maxBuffer: 8 * 1024 * 1024, + }); + const cli = contract.outputSchema.parse(JSON.parse(stdout)); + const response = await client.callTool( + { name: operation, arguments: input }, + { timeout: 60_000 }, + ); + assert.notEqual(response.isError, true, mcpTextValue(response)); + const mcp = contract.outputSchema.parse(JSON.parse(mcpTextValue(response))); + assert.deepEqual(cli.normalized_result, mcp.normalized_result); + assert.deepEqual(cli.subject, mcp.subject); + assert.equal(cli.subject.local_path, input.path); + assert.equal(cli.subject.digest.sha256, cli.normalized_result.target.sha256); + assert.deepEqual(cli.limitations, mcp.limitations); + process.stdout.write( + `[ok] ${operation}${input.abi === undefined ? "" : ` ${input.abi}`}: CLI/MCP Evidence parity\n`, + ); + return cli.normalized_result; +} + +function parseArguments(argv) { + const parsed = { help: false, apk: null, plainApk: null, expectations: null }; + const names = { + "--apk": "apk", + "--plain-apk": "plainApk", + "--expectations": "expectations", + }; + for (let index = 0; index < argv.length; index += 1) { + const argument = argv[index]; + if (argument === "--help" || argument === "-h") parsed.help = true; + else if ( + Object.hasOwn(names, argument) && + typeof argv[index + 1] === "string" && + !argv[index + 1].startsWith("--") + ) { + parsed[names[argument]] = argv[++index]; + } else throw new Error(`Unknown argument or missing value: ${argument}`); + } + return parsed; +} diff --git a/scripts/verify-frida.mjs b/scripts/verify-frida.mjs new file mode 100644 index 000000000..ece121a14 --- /dev/null +++ b/scripts/verify-frida.mjs @@ -0,0 +1,198 @@ +import { basename } from "node:path"; + +import { FridaInstrumentationService } from "../dist/application/frida/FridaInstrumentationService.js"; +import { FridaInstrumentationManager } from "../dist/frida/FridaInstrumentationManager.js"; +import { isValidFridaRemoteAddress } from "../dist/contracts/fridaRemoteAddress.js"; + +const options = parseArguments(process.argv.slice(2)); +if (options.help) { + process.stdout.write( + "Usage: npm run verify:frida [-- --address HOST:PORT --pid PID [remote auth flags]]\n" + + "Without flags, verifies a local Node.js process created by this script.\n", + ); + process.exit(0); +} + +const manager = new FridaInstrumentationManager(); +const service = new FridaInstrumentationService(manager); +const remote = + options.address === undefined + ? undefined + : { + address: options.address, + ...(options.token === undefined ? {} : { token: options.token }), + ...(options.certificate === undefined + ? {} + : { certificate: options.certificate }), + ...(options.origin === undefined ? {} : { origin: options.origin }), + ...(options.keepaliveInterval === undefined + ? {} + : { keepaliveInterval: options.keepaliveInterval }), + }; + +try { + let targetProcess; + let input; + if (remote === undefined) { + input = { + mode: "spawn", + deviceId: "local", + program: process.execPath, + argv: ["-e", "setTimeout(() => {}, 1500)"], + source: { + sourceKind: "inline", + source: "send({ rea_frida_verification: 'ok', pid: Process.id });", + }, + durationMs: 500, + }; + targetProcess = { pid: undefined, name: basename(process.execPath) }; + } else { + const inventory = await service.listProcesses({ remote }); + if (!inventory.ok) throw new Error(inventory.error.message); + targetProcess = inventory.value.processes.find( + ({ pid }) => pid === options.pid, + ); + if (targetProcess === undefined) + throw new Error( + `Selected PID ${String(options.pid)} was not observed remotely`, + ); + input = { + mode: "attach", + remote, + pid: options.pid, + source: { + sourceKind: "inline", + source: "send({ rea_frida_verification: 'ok', pid: Process.id });", + }, + durationMs: 500, + }; + } + + const result = await service.instrument(input); + if (!result.ok) throw new Error(result.error.message); + const observed = result.value.evidence.normalized_result; + if ( + typeof observed !== "object" || + observed === null || + Array.isArray(observed) || + !Array.isArray(observed.messages) + ) + throw new Error("Frida returned no message observation"); + const messageObserved = observed.messages.some( + (message) => + typeof message === "object" && + message !== null && + !Array.isArray(message) && + message.type === "send" && + typeof message.payload === "object" && + message.payload !== null && + !Array.isArray(message.payload) && + message.payload.rea_frida_verification === "ok" && + message.payload.pid === observed.pid, + ); + if (!messageObserved) + throw new Error("Selected target did not return the Frida marker"); + const report = { + ok: result.value.cleanupError === null, + provider: "frida", + host_platform: process.platform, + target_mode: remote === undefined ? "local_spawn" : "remote_attach", + target_pid: observed.pid, + target_name: targetProcess.name, + ...(remote === undefined ? {} : { remote_target_observed: true }), + script_message_observed: true, + cleanup_error: result.value.cleanupError, + }; + process.stdout.write(`${JSON.stringify(report)}\n`); + if (!report.ok) process.exitCode = 1; +} catch (cause) { + process.stderr.write( + `Frida real-provider verification failed: ${cause instanceof Error ? cause.message : String(cause)}\n`, + ); + process.exitCode = 1; +} finally { + await manager.closeAll().catch(() => undefined); +} + +function parseArguments(args) { + if (args.length === 1 && args[0] === "--help") return { help: true }; + const values = parseOptionValues(args); + const address = values.get("--address"); + const pidValue = values.get("--pid"); + const pid = parseRemotePid(address, pidValue); + if (address === undefined) assertNoRemoteOptions(values); + const keepaliveInterval = parseKeepalive(values.get("--keepalive-interval")); + return { + help: false, + ...(address === undefined ? {} : { address }), + ...(pid === undefined ? {} : { pid }), + ...(values.has("--token") ? { token: values.get("--token") } : {}), + ...(values.has("--certificate") + ? { certificate: values.get("--certificate") } + : {}), + ...(values.has("--origin") ? { origin: values.get("--origin") } : {}), + ...(keepaliveInterval === undefined ? {} : { keepaliveInterval }), + }; +} + +function parseOptionValues(args) { + const values = new Map(); + const valueFlags = new Set([ + "--address", + "--pid", + "--token", + "--certificate", + "--origin", + "--keepalive-interval", + ]); + for (let index = 0; index < args.length; index += 1) { + const flag = args[index]; + const value = args[index + 1]; + if ( + typeof flag !== "string" || + !valueFlags.has(flag) || + value === undefined || + values.has(flag) + ) + throw new Error( + "Expected no arguments for local-fixture verification, or --address HOST:PORT --pid PID and optional remote auth flags", + ); + values.set(flag, value); + index += 1; + } + return values; +} + +function parseRemotePid(address, pidValue) { + if ((address === undefined) !== (pidValue === undefined)) + throw new Error("Remote verification requires both --address and --pid"); + if (address !== undefined && !isValidFridaRemoteAddress(address)) + throw new Error( + "--address must be a host[:port] without credentials, path, query, or fragment", + ); + const pid = pidValue === undefined ? undefined : Number(pidValue); + if (pid !== undefined && (!Number.isSafeInteger(pid) || pid <= 0)) + throw new Error("--pid must be a positive process identifier"); + return pid; +} + +function assertNoRemoteOptions(values) { + for (const flag of [ + "--token", + "--certificate", + "--origin", + "--keepalive-interval", + ]) + if (values.has(flag)) + throw new Error("Remote connection options require --address and --pid"); +} + +function parseKeepalive(value) { + const interval = value === undefined ? undefined : Number(value); + if ( + interval !== undefined && + (!Number.isSafeInteger(interval) || interval <= 0) + ) + throw new Error("--keepalive-interval must be a positive integer"); + return interval; +} diff --git a/scripts/verify-go-binary.mjs b/scripts/verify-go-binary.mjs index 3652c35f8..0724c5f4d 100644 --- a/scripts/verify-go-binary.mjs +++ b/scripts/verify-go-binary.mjs @@ -115,16 +115,25 @@ try { ], { GOOS: os, GOARCH: arch }, ); - await verify(path, target, oracle); + await verify(path, target, oracle, null, "stripped"); if (os === "linux" && arch === "amd64") { const sectionless = join(root.path, "linux-amd64-sectionless"); const bytes = Buffer.from(await readFile(path)); bytes.fill(0, 40, 48); // ELF64 e_shoff. bytes.fill(0, 58, 64); // e_shentsize, e_shnum and e_shstrndx. await writeFile(sectionless, bytes); - await verify(sectionless, target, oracle); + await verify(sectionless, target, oracle, null, "sectionless"); } } + for (const target of targets.filter(([os]) => os === "darwin")) { + const [os, arch] = target; + const path = join(root.path, `${os}-${arch}-unstripped`); + await go(["build", "-trimpath", "-buildvcs=false", "-o", path, "."], { + GOOS: os, + GOARCH: arch, + }); + await verify(path, target, oracle, null, "unstripped"); + } if (process.platform === "win32") omittedCoverage.push( "Compiler-produced non-UTF-8 argv strings were not verified on Windows; Windows argv cannot preserve arbitrary byte arguments.", @@ -317,7 +326,13 @@ async function inspect(mode, path) { return { evidence, report }; } -async function verify(path, target, oracle, byteExpected = null) { +async function verify( + path, + target, + oracle, + byteExpected = null, + fileKind = "stripped", +) { const bytes = await readFile(path); const expected = byteExpected ?? @@ -387,12 +402,7 @@ async function verify(path, target, oracle, byteExpected = null) { ); verified.push({ target: `${target[0]}/${target[1]}`, - file: - byteExpected === null - ? path.endsWith("sectionless") - ? "sectionless" - : "stripped" - : "byte-valued-strings", + file: byteExpected === null ? fileKind : "byte-valued-strings", go_version: expected.GoVersion, ...(byteExpected === null ? {} diff --git a/scripts/verify-linux-setup-e2e.mjs b/scripts/verify-linux-setup-e2e.mjs index 8b57fbacc..e08e8b160 100644 --- a/scripts/verify-linux-setup-e2e.mjs +++ b/scripts/verify-linux-setup-e2e.mjs @@ -12,6 +12,7 @@ import { tmpdir } from "node:os"; import { promisify } from "node:util"; import { completeVerifierRun, createVerifierRun } from "./lib/verifier-run.mjs"; +import { assertCleanLinuxHopperRuntime } from "./lib/clean-linux-hopper-runtime.mjs"; const execFileAsync = promisify(execFile); const verifierRun = createVerifierRun(); @@ -19,12 +20,12 @@ const command = process.env.REA_VERIFY_SERVER_COMMAND; if (process.platform !== "linux" || process.getuid?.() !== 0) throw new Error("Linux setup verification requires a root Linux runner"); if (!command) throw new Error("REA_VERIFY_SERVER_COMMAND is required"); +await assertCleanLinuxHopperRuntime(); try { await access("/opt/hopper/bin/Hopper"); throw new Error("Linux setup verification requires a clean runner"); } catch (error) { - if (error instanceof Error && error.message.includes("clean runner")) - throw error; + if (error?.code !== "ENOENT") throw error; } const runJson = async (args) => { @@ -35,14 +36,25 @@ const runJson = async (args) => { return JSON.parse(stdout); }; -const plan = await runJson(["setup", "--json"]); -if (plan.status !== "needs_confirmation") - throw new Error("setup did not produce a read-only confirmation plan"); +const plan = await runJson([ + "setup", + "--install-hopper", + "--dry-run", + "--json", +]); +if ( + plan.status !== "planned" || + !plan.plannedActions.some(({ kind }) => kind === "install_hopper") || + plan.appliedActions.length !== 0 +) + throw new Error("setup did not produce a read-only Hopper installation plan"); await access("/opt/hopper/bin/Hopper").then( () => { throw new Error("setup plan mutated the clean runner"); }, - () => undefined, + (error) => { + if (error?.code !== "ENOENT") throw error; + }, ); const installed = await runJson([ @@ -58,7 +70,7 @@ if ( throw new Error( `approved setup did not become ready: ${JSON.stringify(installed)}`, ); -const doctor = await runJson(["doctor", "--json"]); +const doctor = await runJson(["doctor", "--provider", "hopper", "--json"]); if (doctor.healthy !== true) throw new Error(`doctor is unhealthy: ${JSON.stringify(doctor)}`); @@ -67,8 +79,6 @@ await execFileAsync(command, ["analyze", "/usr/bin/true"], { timeout: 180_000, maxBuffer: 10 * 1024 * 1024, }); -process.env.HOPPER_TARGET_PATH = "/usr/bin/true"; -process.env.HOPPER_SECOND_TARGET_PATH = "/usr/bin/false"; process.env.REA_VERIFY_SERVER_ARGS_JSON = '["mcp"]'; await import("./verify-real-hopper-linux.mjs"); @@ -95,28 +105,24 @@ try { await rm(modifiedDirectory, { recursive: true, force: true }); } -const repeated = await runJson([ - "setup", - "--yes", - "--install-hopper", - "--json", -]); +const repeated = await runJson(["setup", "--yes", "--json"]); if ( repeated.status !== "ready" || - repeated.appliedActions.includes("installed_hopper") + repeated.plannedActions.length !== 0 || + repeated.appliedActions.length !== 0 ) throw new Error("a second setup was not idempotent"); -const { stdout: processes } = await execFileAsync("ps", [ - "-ax", - "-o", - "command=", -]); -if (/\/opt\/hopper\/bin\/Hopper|\bXvfb\b|hopper-demo-x11\.py/u.test(processes)) - throw new Error("Linux setup verification leaked a Hopper demo session"); +await assertCleanLinuxHopperRuntime(); +const completedVerifierRun = await completeVerifierRun(verifierRun); +if ( + completedVerifierRun.process_lineage.status !== "verified" || + completedVerifierRun.process_lineage.descendants.length !== 0 +) + throw new Error("Linux setup verification did not prove owned child cleanup"); console.log( JSON.stringify({ - verifier_run: await completeVerifierRun(verifierRun), + verifier_run: completedVerifierRun, status: "verified", setup: true, cli: true, diff --git a/scripts/verify-package-mcp.mjs b/scripts/verify-package-mcp.mjs index 0d03abab1..fda067dbe 100644 --- a/scripts/verify-package-mcp.mjs +++ b/scripts/verify-package-mcp.mjs @@ -20,7 +20,7 @@ const execute = promisify(execFile); const verifyMcpToolsAndPrompts = async (client, mcpOptions) => { await verifyCompleteToolCatalog(client, mcpOptions); await prompts.verifyPromptCatalog(client, mcpOptions, prompts.names); - await prompts.verifyPromptCompletion(client, mcpOptions, false); + await prompts.verifyPromptCompletion(client, mcpOptions, []); }; const verifyMcpTargetFree = async (client, mcpOptions) => { @@ -121,11 +121,8 @@ const verifyMcpNonLinuxCurrentDocument = async ( const verifyMcpBinaryLifecycle = async (client, mcpOptions) => { await verifyMcpOpenAndBind(client, mcpOptions); - await prompts.verifyPromptCompletion( - client, - mcpOptions, - process.platform !== "linux", - ); + // Completion never starts a provider; only an ordinary operation readies it. + await prompts.verifyPromptCompletion(client, mcpOptions, []); if (process.platform === "linux") { await verifyMcpLinuxToolAvailability(client, mcpOptions); } else { @@ -134,6 +131,7 @@ const verifyMcpBinaryLifecycle = async (client, mcpOptions) => { mcpOptions, ); await verifyMcpNonLinuxCurrentDocument(client, mcpOptions, current); + await prompts.verifyPromptCompletion(client, mcpOptions, ["fixture"]); } const closed = await client.callTool( { name: "close_binary", arguments: {} }, @@ -141,7 +139,7 @@ const verifyMcpBinaryLifecycle = async (client, mcpOptions) => { ); if (closed.isError === true) throw new Error("packaged MCP could not close its binary"); - await prompts.verifyPromptCompletion(client, mcpOptions, false); + await prompts.verifyPromptCompletion(client, mcpOptions, []); }; const verifyMcpEvidenceBundle = async (client, mcpOptions, evidenceRoot) => { diff --git a/scripts/verify-package-prompts.mjs b/scripts/verify-package-prompts.mjs index 079f925ba..9adff0179 100644 --- a/scripts/verify-package-prompts.mjs +++ b/scripts/verify-package-prompts.mjs @@ -36,9 +36,8 @@ export const verifyPromptCatalog = async (client, options, expectedNames) => { throw new Error("packaged MCP guided prompt rendering failed"); }; -/** Verify live completion through each installed stdio target state. */ -export const verifyPromptCompletion = async (client, options, targetOpen) => { - const expected = targetOpen ? ["fixture"] : []; +/** Verify completion candidates for the installed provider readiness state. */ +export const verifyPromptCompletion = async (client, options, expected) => { const requests = [ { ref: { type: "ref/prompt", name: "investigate_feature" }, @@ -57,6 +56,8 @@ export const verifyPromptCompletion = async (client, options, targetOpen) => { result.completion.total !== expected.length || result.completion.hasMore !== false ) - throw new Error("packaged MCP prompt completion lifecycle failed"); + throw new Error( + `packaged MCP ${request.argument.name} completion mismatch: expected ${JSON.stringify(expected)}, received ${JSON.stringify(result.completion)}`, + ); } }; diff --git a/scripts/verify-package.mjs b/scripts/verify-package.mjs index fff3a07c6..32bad0a62 100644 --- a/scripts/verify-package.mjs +++ b/scripts/verify-package.mjs @@ -1,6 +1,8 @@ -import { mkdtemp, rm } from "node:fs/promises"; +import { mkdir, mkdtemp, rm, unlink } from "node:fs/promises"; +import { execFile } from "node:child_process"; import { tmpdir } from "node:os"; import { join } from "node:path"; +import { promisify } from "node:util"; import { TOOL_CONTRACTS } from "../dist/contracts/toolContracts.js"; import { PRODUCT_IDENTITY } from "../dist/identity.js"; @@ -21,12 +23,19 @@ import { verifyRepositorySkill } from "./verify-repository-skill.mjs"; import { verifyManaged } from "./verify-package-managed.mjs"; import { verifyUnknownProvider } from "./verify-package-unknown-provider.mjs"; import { completeVerifierRun, createVerifierRun } from "./lib/verifier-run.mjs"; +import { + createVerifiedPackageMetadata, + retainVerifiedPackage, + writeVerifiedPackageManifest, +} from "./ci/verified-package.mjs"; import { measureMcpStartup, profileMcpModuleLoading, } from "./lib/mcp-startup-probe.mjs"; const root = process.cwd(); +const execFileAsync = promisify(execFile); +const retentionDirectory = process.env.REA_VERIFIED_PACKAGE_DIRECTORY; const verifierRun = createVerifierRun(); const workspace = await mkdtemp(join(tmpdir(), "rea-package-")); const evidenceRoot = join(workspace, "evidence"); @@ -37,6 +46,8 @@ let mcpModuleLoading; let update; let repositorySkill; let report; +let retainedPackage; +let retentionMetadata; const runStage = async (name, action) => { const started = performance.now(); @@ -49,6 +60,27 @@ const runStage = async (name, action) => { }; try { + if (retentionDirectory !== undefined && retentionDirectory !== "") { + const sourceSha = ( + await execFileAsync("git", ["rev-parse", "HEAD"], { cwd: root }) + ).stdout.trim(); + retentionMetadata = createVerifiedPackageMetadata({ + sourceSha, + runId: process.env.GITHUB_RUN_ID, + runAttempt: process.env.GITHUB_RUN_ATTEMPT, + platform: process.platform, + architecture: process.arch, + packageVersion: PRODUCT_IDENTITY.packageVersion, + nodeVersion: process.version, + }); + await mkdir(retentionDirectory, { recursive: true }); + await unlink(join(retentionDirectory, "manifest.json")).catch((cause) => { + if ( + !(cause instanceof Error && "code" in cause && cause.code === "ENOENT") + ) + throw cause; + }); + } repositorySkill = await runStage("repository skill", () => verifyRepositorySkill({ root, workspace }), ); @@ -215,6 +247,13 @@ try { mcpStartup, mcpModuleLoading, }; + if (retentionMetadata !== undefined) { + retainedPackage = await retainVerifiedPackage({ + sourceTarball: tarball, + directory: retentionDirectory, + metadata: retentionMetadata, + }); + } } finally { await runStage("workspace cleanup", () => rm(workspace, { recursive: true, force: true }), @@ -223,6 +262,11 @@ try { const verifierLineage = await runStage("verifier lineage", () => completeVerifierRun(verifierRun), ); +if (retainedPackage !== undefined) + await writeVerifiedPackageManifest( + retainedPackage.directory, + retainedPackage.metadata, + ); process.stdout.write( `${JSON.stringify({ verifier_run: verifierLineage, ...report })}\n`, ); diff --git a/scripts/verify-packet-capture.mjs b/scripts/verify-packet-capture.mjs new file mode 100644 index 000000000..9993117c2 --- /dev/null +++ b/scripts/verify-packet-capture.mjs @@ -0,0 +1,487 @@ +#!/usr/bin/env node +import assert from "node:assert/strict"; +import { estimateTokenCount } from "tokenx"; +import { execFile } from "node:child_process"; +import { createHash } from "node:crypto"; +import { readFile, writeFile, readdir, mkdir, rm } from "node:fs/promises"; +import { isAbsolute, join } from "node:path"; +import { fileURLToPath } from "node:url"; +import { promisify } from "node:util"; +import { Client } from "@modelcontextprotocol/client"; +import { StdioClientTransport } from "@modelcontextprotocol/client/stdio"; +import { Ajv2020 } from "ajv/dist/2020.js"; +import { PrivateRuntimeRoot } from "../dist/process/PrivateRuntimeRoot.js"; +import { parseEvidence } from "../dist/domain/evidence.js"; +import { createVerifierRun, completeVerifierRun } from "./lib/verifier-run.mjs"; + +if (process.platform !== "linux") + throw new Error( + "Real packet capture verification requires Linux with util-linux prlimit.", + ); +if (!isAbsolute(process.env.REA_TSHARK_COMMAND ?? "")) + throw new Error("Supply absolute REA_TSHARK_COMMAND for TShark 4.x."); +const entrypoint = + process.argv[2] ?? fileURLToPath(new URL("./rea.mjs", import.meta.url)); +const run = createVerifierRun(); +const root = await PrivateRuntimeRoot.create({ + prefix: "rea-capture-verifier-", +}); +const path = join(root.path, "network with spaces.pcap"); +const bluetooth = join(root.path, "bluetooth.pcap"); +const execute = promisify(execFile); +const environment = { + ...process.env, + TMPDIR: root.path, + TMP: root.path, + TEMP: root.path, +}; +const client = new Client({ name: "packet-capture-verifier", version: "1" }); +const transport = new StdioClientTransport({ + command: process.execPath, + args: [entrypoint, "mcp"], + env: environment, + stderr: "pipe", +}); + +// Independently synthesize PCAP bytes; no external captures or device access. +const pcap = (linktype, packets) => { + const header = Buffer.alloc(24); + header.writeUInt32LE(0xa1b2c3d4, 0); + header.writeUInt16LE(2, 4); + header.writeUInt16LE(4, 6); + header.writeUInt32LE(65535, 16); + header.writeUInt32LE(linktype, 20); + return Buffer.concat([ + header, + ...packets.flatMap((bytes, i) => { + const record = Buffer.alloc(16); + record.writeUInt32LE(1700000000 + i, 0); + record.writeUInt32LE(bytes.length, 8); + record.writeUInt32LE(bytes.length, 12); + return [record, bytes]; + }), + ]); +}; +const udp = (destination, payload) => { + const ip = Buffer.from("450000000001000040110000c0000201c0000202", "hex"); + ip.writeUInt16BE(28 + payload.length, 2); + let checksum = 0; + for (let i = 0; i < ip.length; i += 2) checksum += ip.readUInt16BE(i); + while (checksum > 0xffff) checksum = (checksum & 0xffff) + (checksum >>> 16); + ip.writeUInt16BE(~checksum & 0xffff, 10); + const header = Buffer.alloc(8); + header.writeUInt16BE(40000, 0); + header.writeUInt16BE(destination, 2); + header.writeUInt16BE(8 + payload.length, 4); + return Buffer.concat([ + Buffer.from("0200000000020200000000010800", "hex"), + ip, + header, + payload, + ]); +}; +const dnsQuery = Buffer.from( + "123401000001000000000000076578616d706c6504746573740000010001", + "hex", +); +const source = pcap(1, [ + udp(5554, Buffer.from("REA")), + udp(5555, dnsQuery), + udp(5555, dnsQuery), +]); +// LINKTYPE_BLUETOOTH_HCI_H4 = 187; H4 command packet, HCI Reset opcode 0x0c03, no parameters. +const bluetoothSource = pcap(187, [Buffer.from("01030c00", "hex")]); +let cases = 0; +const discoveryMeasurements = []; +const inheritedAddressSpace = (await readFile("/proc/self/limits", "utf8")) + .split("\n") + .find((line) => line.startsWith("Max address space ")) + ?.trim() + .match(/^Max address space\s+(\S+)\s+(\S+)\s+bytes$/u); +assert.ok(inheritedAddressSpace); +const expectedAddressSpace = Math.min( + 1073741824, + ...inheritedAddressSpace + .slice(1) + .map((value) => (value === "unlimited" ? Infinity : Number(value))), +); + +try { + await writeFile(path, source); + await writeFile(bluetooth, bluetoothSource); + await client.connect(transport); + const tool = (await client.listTools()).tools.find( + ({ name }) => name === "inspect_packet_capture", + ); + assert.ok(tool?.outputSchema); + const ajv = new Ajv2020({ strict: false, validateFormats: false }); + assert.ok(ajv.validateSchema(tool.inputSchema)); + assert.ok(ajv.validateSchema(tool.outputSchema)); + const inspect = async (input) => { + const response = await client.callTool({ + name: tool.name, + arguments: input, + }); + assert.notEqual(response.isError, true, JSON.stringify(response)); + assert.ok( + ajv.validate(tool.outputSchema, response.structuredContent), + JSON.stringify(ajv.errors), + ); + const evidence = parseEvidence(response.structuredContent); + const report = evidence.normalized_result; + assert.equal( + report.artifact.sha256, + createHash("sha256") + .update(await readFile(input.path)) + .digest("hex"), + ); + assert.equal(report.hardware_acquisition, "not-performed"); + assert.equal(report.limits.address_space_bytes, expectedAddressSpace); + assert.equal(report.tool.configured_path, process.env.REA_TSHARK_COMMAND); + assert.equal( + report.resource_limiter.configured_path, + process.env.REA_TSHARK_PRLIMIT_COMMAND ?? "/usr/bin/prlimit", + ); + assert.ok( + report.resource_limiter.arguments.includes( + `--as=${expectedAddressSpace}:${expectedAddressSpace}`, + ), + ); + assert.equal(report.configuration, "private-empty-personal-profile"); + const flags = Object.entries(input) + .filter(([key]) => key !== "path") + .flatMap(([key, value]) => + key === "match_limit" && value === null + ? ["--all_matches"] + : typeof value === "boolean" + ? [value ? `--${key}` : `--no-${key}`] + : (Array.isArray(value) ? value : [value]).flatMap((item) => [ + `--${key}`, + String(item), + ]), + ); + const cli = JSON.parse( + ( + await execute( + process.execPath, + [ + entrypoint, + "inspect-packet-capture", + input.path, + ...flags, + "--format", + "json", + ], + { env: environment, timeout: 60000, maxBuffer: 16 * 1024 * 1024 }, + ) + ).stdout, + ); + assert.deepEqual(parseEvidence(cli), evidence); + const bundle = await client.callTool({ + name: "get_evidence_bundle", + arguments: {}, + }); + assert.ok(JSON.stringify(bundle).includes(evidence.evidence_id)); + cases++; + return report; + }; + for (const two_pass of [true, false]) { + const report = await inspect({ + path, + fields: ["ip.addr", "udp.port", "tcp.port"], + display_filter: "udp.dstport == 5555", + two_pass, + }); + assert.deepEqual( + report.packets.map((p) => p["frame.number"]), + [["2"], ["3"]], + ); + assert.deepEqual(report.packets[0]["ip.addr"], ["192.0.2.1", "192.0.2.2"]); + assert.deepEqual(report.packets[0]["udp.port"], ["40000", "5555"]); + assert.equal(Object.hasOwn(report.packets[0], "tcp.port"), false); + assert.equal(report.read_scope, "to-eof"); + } + const selected = { + path, + fields: ["dns.qry.name"], + decode_as: ["udp.port==5555,dns"], + display_filter: "dns", + }; + const dns = await inspect(selected); + assert.equal(dns.packets.length, 2); + assert.deepEqual(dns.packets[0]["dns.qry.name"], ["example.test"]); + const prefix = await inspect({ ...selected, packet_limit: 1 }); + assert.deepEqual(prefix.packets, []); + assert.equal(prefix.read_scope, "up-to-input-packet-limit"); + const empty = await inspect({ + path, + fields: ["frame.number"], + display_filter: "tcp", + }); + assert.deepEqual(empty.packets, []); + const pagedPath = join(root.path, "paged.pcap"); + const pagedSource = pcap( + 1, + Array.from({ length: 120 }, () => + udp(5555, Buffer.from("owned paging fixture")), + ), + ); + await writeFile(pagedPath, pagedSource); + const page = await inspect({ path: pagedPath, fields: ["ip.addr"] }); + assert.equal(page.packets.length, 50); + assert.deepEqual(page.output_window, { + matching_packets: 120, + returned_packets: 50, + has_more: true, + }); + const nextPage = await inspect({ + path: pagedPath, + fields: ["ip.addr"], + match_offset: 50, + match_limit: 40, + }); + assert.deepEqual(nextPage.packets[0]["frame.number"], ["51"]); + assert.deepEqual(nextPage.packets.at(-1)["frame.number"], ["90"]); + const complete = await inspect({ + path: pagedPath, + fields: ["ip.addr"], + match_limit: null, + }); + assert.equal(complete.packets.length, 120); + assert.equal(complete.output_window.has_more, false); + assert.deepEqual(await readFile(pagedPath), pagedSource); + const hci = await inspect({ path: bluetooth, fields: ["bthci_cmd.opcode"] }); + assert.deepEqual(hci.packets[0]["bthci_cmd.opcode"], ["0x0c03"]); + assert.deepEqual(await readFile(path), source); + // Exercise the incremental summary workflow against the same owned bytes + // using real installed Wireshark tools; these inputs are format fixtures. + const pcapTool = (await client.listTools()).tools.find( + (t) => t.name === "inspect_pcap_capture", + ); + assert.ok(pcapTool?.outputSchema); + const pcapAjv = new Ajv2020({ strict: false, validateFormats: false }); + assert.ok(pcapAjv.validateSchema(pcapTool.inputSchema)); + assert.ok(pcapAjv.validateSchema(pcapTool.outputSchema)); + for (const capturePath of [path, bluetooth]) { + const response = await client.callTool({ + name: pcapTool.name, + arguments: { path: capturePath, detail: "summary" }, + }); + assert.notEqual(response.isError, true, JSON.stringify(response)); + assert.ok( + pcapAjv.validate(pcapTool.outputSchema, response.structuredContent), + pcapAjv.errorsText(), + ); + const summary = parseEvidence(response.structuredContent).normalized_result; + assert.equal( + summary.summary.target.sha256, + createHash("sha256") + .update(await readFile(capturePath)) + .digest("hex"), + ); + const source = { + kind: "retained-evidence", + evidence_id: summary.parent_evidence_id, + }; + const page = await client.callTool({ + name: "inspect_analysis_view", + arguments: { + source, + view: { kind: "pcap", facet: "protocols", limit: 10 }, + }, + }); + assert.notEqual(page.isError, true, JSON.stringify(page)); + assert.equal( + parseEvidence(page.structuredContent).normalized_result + .parent_evidence_id, + source.evidence_id, + ); + cases++; + } + + assert.deepEqual(await readFile(bluetooth), bluetoothSource); + for (const input of [ + { path, fields: ["frame.number"], display_filter: "this is not a filter" }, + { path, fields: ["no_such_field"] }, + { + path, + fields: ["frame.number"], + decode_as: ["no_such_protocol==1,unknown"], + }, + { path: join(root.path, "absent.pcap"), fields: ["frame.number"] }, + { path, fields: ["frame.number"], interface: "lo0" }, + ]) { + const response = await client.callTool({ + name: tool.name, + arguments: input, + }); + assert.equal(response.isError, true); + await client.ping(); + cases++; + } + await writeFile(path, "not a capture"); + assert.equal( + ( + await client.callTool({ + name: tool.name, + arguments: { path, fields: ["frame.number"] }, + }) + ).isError, + true, + ); + cases++; + const discovery = (await client.listTools()).tools.find( + ({ name }) => name === "inspect_packet_fields", + ); + assert.ok(discovery?.outputSchema); + assert.ok(ajv.validateSchema(discovery.inputSchema)); + assert.ok(ajv.validateSchema(discovery.outputSchema)); + const nativeProfile = join(root.path, "native-profile"); + await mkdir(nativeProfile); + const native = ( + await execute(process.env.REA_TSHARK_COMMAND, ["-G", "fields"], { + env: { ...environment, WIRESHARK_CONFIG_DIR: nativeProfile }, + timeout: 30000, + maxBuffer: 32 * 1024 * 1024, + }) + ).stdout; + await rm(nativeProfile, { recursive: true }); + const nativeLines = native.split(/\r?\n/); + if (nativeLines.at(-1) === "") nativeLines.pop(); + for (const input of [ + { query: "usb" }, + { limit: 1 }, + { offset: 1, limit: 2 }, + { kind: "fields", protocol: "usb", query: "idVendor" }, + { kind: "fields", protocol: "udp", limit: null }, + { kind: "fields", query: "rea_no_such_field" }, + ]) { + const started = performance.now(); + const response = await client.callTool({ + name: discovery.name, + arguments: input, + }); + assert.notEqual(response.isError, true, JSON.stringify(response)); + assert.ok( + ajv.validate(discovery.outputSchema, response.structuredContent), + JSON.stringify(ajv.errors), + ); + const evidence = parseEvidence(response.structuredContent); + const report = evidence.normalized_result; + const kind = input.kind ?? "protocols"; + const query = (input.query ?? "").toLowerCase(); + const expectedMatches = nativeLines.flatMap((line, index) => { + const columns = line.split("\t"); + if ((kind === "protocols") !== (columns[0] === "P")) return []; + if ( + input.protocol !== undefined && + (columns[0] === "P" ? columns[2] : columns[4]) !== input.protocol + ) + return []; + if ( + ![ + columns[1], + columns[2], + ...(columns[0] === "F" ? [columns[7]] : []), + ].some((value) => value.toLowerCase().includes(query)) + ) + return []; + return [{ sourceLine: index + 1, columns }]; + }); + const offset = input.offset ?? 0; + const limit = input.limit === null ? undefined : (input.limit ?? 50); + const expectedPage = expectedMatches.slice( + offset, + limit === undefined ? undefined : offset + limit, + ); + assert.deepEqual( + report.records.map((record) => record.source_line), + expectedPage.map((record) => record.sourceLine), + ); + assert.deepEqual(report.output_window, { + examined: nativeLines.filter((line) => + line.startsWith(kind === "protocols" ? "P\t" : "F\t"), + ).length, + matching: expectedMatches.length, + returned: expectedPage.length, + has_more: + Math.max(0, expectedMatches.length - offset) > expectedPage.length, + }); + discoveryMeasurements.push({ + input, + elapsed_ms: +(performance.now() - started).toFixed(2), + response_bytes: Buffer.byteLength(JSON.stringify(response)), + estimated_tokens_one_tool_request_response: estimateTokenCount( + JSON.stringify(discovery) + + JSON.stringify(input) + + JSON.stringify(response), + ), + }); + for (const record of report.records) { + const columns = nativeLines[record.source_line - 1].split("\t"); + assert.equal(record.name, columns[1]); + assert.equal(record.abbreviation, columns[2]); + assert.equal(record.field_type, columns[0] === "F" ? columns[3] : null); + assert.equal( + record.parent_protocol, + columns[0] === "F" ? columns[4] : null, + ); + assert.equal(record.description, columns[0] === "F" ? columns[7] : null); + assert.equal(record.display_base, columns[0] === "F" ? columns[5] : null); + assert.equal(record.bitmask, columns[0] === "F" ? columns[6] : null); + } + if (input.query === "idVendor") + assert.ok( + report.records.some( + (row) => + row.abbreviation === "usb.idVendor" && + row.field_type === "FT_UINT16", + ), + ); + if (input.query === "usb") + assert.ok(report.records.some((row) => row.abbreviation === "usb")); + if (input.query === "rea_no_such_field") + assert.equal(report.output_window.matching, 0); + const flags = Object.entries(input).flatMap(([key, value]) => + value === null ? ["--all"] : [`--${key}`, String(value)], + ); + const cli = JSON.parse( + ( + await execute( + process.execPath, + [entrypoint, "inspect-packet-fields", ...flags, "--format", "json"], + { env: environment, timeout: 60000, maxBuffer: 16 * 1024 * 1024 }, + ) + ).stdout, + ); + assert.deepEqual(cli.normalized_result, report); + cases++; + } + await client.close(); + assert.deepEqual((await readdir(root.path)).sort(), [ + "bluetooth.pcap", + "network with spaces.pcap", + "paged.pcap", + ]); +} finally { + await client.close(); + await transport.close(); + await root.close(); +} +console.log( + JSON.stringify( + { + status: "passed", + cases, + discovery_measurements: discoveryMeasurements, + measurement_scope: + "Warm MCP server, fresh TShark processes; tokenx estimates include one advertised tool/request/response, not billed usage. Model-driven selection, CPU and peak process-family memory are unmeasured; no cache/speedup claim.", + host: `${process.platform}/${process.arch}`, + scope: + "real TShark CLI/MCP; synthetic Ethernet/IPv4/UDP/DNS and Bluetooth HCI PCAP; no hardware acquisition", + ...(await completeVerifierRun(run)), + }, + null, + 2, + ), +); diff --git a/scripts/verify-pcap.mjs b/scripts/verify-pcap.mjs new file mode 100644 index 000000000..3adf14531 --- /dev/null +++ b/scripts/verify-pcap.mjs @@ -0,0 +1,131 @@ +import assert from "node:assert/strict"; +import { execFile } from "node:child_process"; +import { mkdtemp, readdir, rmdir } from "node:fs/promises"; +import { tmpdir } from "node:os"; +import { join, resolve } from "node:path"; +import { promisify } from "node:util"; +import { Client } from "@modelcontextprotocol/client"; +import { StdioClientTransport } from "@modelcontextprotocol/client/stdio"; +import { toolContract } from "../dist/contracts/toolContracts.js"; +import { hashStableFile } from "../dist/filesystem/StableFileHash.js"; +import { mcpTextValue } from "./lib/mcp-verifier-results.mjs"; + +const args = process.argv.slice(2); +if (args.includes("--help") || args.includes("-h")) { + console.log( + "Usage: npm run verify:pcap -- [--pcap PATH]\nRequires caller-supplied tshark/capinfos. Without --pcap, only client readiness is verified.", + ); + process.exit(0); +} +if (!(args.length === 0 || (args.length === 2 && args[0] === "--pcap"))) + throw new Error("Expected --pcap PATH"); +const path = args[1] === undefined ? null : resolve(args[1]); +// This parent is shared by independent CLI/MCP owners. A leased Windows +// runtime root would prevent their native admission of its directory handle. +const root = await mkdtemp(join(tmpdir(), "rea-pcap-verifier-")); +const environment = Object.fromEntries( + Object.entries(process.env).filter(([, value]) => typeof value === "string"), +); +Object.assign(environment, { + TMPDIR: root, + TMP: root, + TEMP: root, +}); +const entrypoint = resolve("scripts/rea.mjs"); +const execute = promisify(execFile); +const client = new Client({ name: "pcap-real-verifier", version: "1" }); +const transport = new StdioClientTransport({ + command: process.execPath, + args: [entrypoint, "mcp"], + env: environment, + stderr: "pipe", +}); +transport.stderr?.resume(); +try { + await client.connect(transport); + const readiness = await run("inspect_pcap_client", {}); + assert(readiness.client.tshark_version && readiness.client.capinfos_version); + if (path === null) + console.log("[unverified] Capture inspection: no --pcap was supplied"); + else { + const identity = await hashStableFile(path); + const result = await run("inspect_pcap_capture", { path }); + assert.deepEqual(result.target, { path, ...identity }); + assert(result.packet_count >= 0); + assert( + result.endpoints.every( + (entry) => entry.packet_count <= result.packet_count, + ), + ); + assert( + result.protocol_distribution.every( + (entry) => entry.packet_count <= result.packet_count, + ), + ); + const partial = + result.endpoint_count > result.endpoints.length || + result.dns_query_count > result.dns_queries.length || + result.tls_sni_count > result.tls_sni_values.length || + result.protocol_count > result.protocol_distribution.length || + result.http_request_uri_count > result.http_request_uris.length || + result.unattributed_dns_packet_count > 0 || + result.dns_queries.some( + (entry) => + entry.response_address_count > entry.response_addresses.length, + ); + assert.equal(result.coverage, partial ? "partial" : "complete"); + assert.deepEqual( + await hashStableFile(path), + identity, + "Input capture must remain unchanged", + ); + console.log( + `[ok] ${result.packet_count} packets; ${result.endpoint_count} addresses; coverage=${result.coverage}`, + ); + } +} finally { + try { + await client.close(); + } finally { + await transport.close(); + } + assert.deepEqual( + await readdir(root), + [], + `Owned capture resources remain under ${root}`, + ); + await rmdir(root); +} +console.log("All asserted pcap CLI/MCP checks passed"); + +async function run(name, input) { + const contract = toolContract(name); + const { stdout } = await execute( + process.execPath, + [ + entrypoint, + name.replaceAll("_", "-"), + ...(input.path === undefined ? [] : [input.path]), + "--json", + ], + { env: environment, timeout: 360_000, maxBuffer: 8 * 1024 * 1024 }, + ); + const cli = contract.outputSchema.parse(JSON.parse(stdout)); + const response = await client.callTool( + { name, arguments: input }, + { timeout: 360_000 }, + ); + assert.notEqual(response.isError, true, mcpTextValue(response)); + const mcp = contract.outputSchema.parse(JSON.parse(mcpTextValue(response))); + assert.deepEqual(mcp.normalized_result, cli.normalized_result); + assert.deepEqual(mcp.subject, cli.subject); + if (input.path !== undefined) { + assert.equal(cli.subject.local_path, input.path); + assert.equal( + cli.subject.digest.sha256, + cli.normalized_result.target.sha256, + ); + } + console.log(`[ok] ${name}: named output schema and CLI/MCP Evidence parity`); + return cli.normalized_result; +} diff --git a/scripts/verify-qlog-captures.mjs b/scripts/verify-qlog-captures.mjs new file mode 100644 index 000000000..8d1a16f6c --- /dev/null +++ b/scripts/verify-qlog-captures.mjs @@ -0,0 +1,215 @@ +#!/usr/bin/env node +import assert from "node:assert/strict"; +import { execFile } from "node:child_process"; +import { createHash } from "node:crypto"; +import { readFile, writeFile } from "node:fs/promises"; +import { isAbsolute } from "node:path"; +import { fileURLToPath } from "node:url"; +import { promisify } from "node:util"; +import { Client } from "@modelcontextprotocol/client"; +import { StdioClientTransport } from "@modelcontextprotocol/client/stdio"; +import { Ajv2020 } from "ajv/dist/2020.js"; +import { parseEvidence } from "../dist/domain/evidence.js"; + +// Caller-supplied producer evidence stays local; no fixture capture or secrets are bundled. +const [controlPath, lossPath, reportPath] = process.argv.slice(2); +if ( + ![controlPath, lossPath, reportPath].every( + (value) => typeof value === "string" && isAbsolute(value), + ) +) + throw new Error( + "Usage: node scripts/verify-qlog-captures.mjs /absolute/control/origin.qlog /absolute/loss/origin.qlog /absolute/new-report.json", + ); +const entrypoint = fileURLToPath(new URL("./rea.mjs", import.meta.url)); +const client = new Client({ name: "qlog-producer-verifier", version: "1" }); +const environment = { + PATH: process.env.PATH ?? "/usr/bin:/bin", + REA_LOG_LEVEL: "silent", + HOPPER_LAUNCHER_PATH: "/rea-unconfigured-deep-provider/hopper", +}; +const transport = new StdioClientTransport({ + command: process.execPath, + args: [entrypoint, "mcp"], + env: environment, + stderr: "pipe", +}); +let diagnostics = ""; +transport.stderr?.on("data", (bytes) => { + if (diagnostics.length < 65536) diagnostics += bytes.toString("utf8"); +}); +const ajv = new Ajv2020({ strict: false, validateFormats: false }); +const measurements = []; +try { + try { + await client.connect(transport); + } catch (cause) { + throw new Error(`MCP startup failed: ${diagnostics}`, { cause }); + } + const tool = (await client.listTools()).tools.find( + (tool) => tool.name === "inspect_web_network_capture", + ); + assert.ok(tool?.outputSchema); + for (const schema of [tool.inputSchema, tool.outputSchema]) + assert.ok(ajv.validateSchema(schema)); + const validateOutput = ajv.compile(tool.outputSchema); + for (const [lane, path] of [ + ["control", controlPath], + ["loss", lossPath], + ]) { + const source = await readFile(path); + const raw = JSON.parse(source.toString("utf8")); + const sha256 = createHash("sha256").update(source).digest("hex"); + assert.equal(raw.qlog_format, "JSON"); + assert.equal(raw.qlog_version, "0.3"); + const input = { capture_path: path, format: "qlog" }; + assert.ok(ajv.validate(tool.inputSchema, input)); + const response = await client.callTool({ + name: tool.name, + arguments: input, + }); + assert.notEqual(response.isError, true); + assert.ok( + validateOutput(response.structuredContent), + JSON.stringify(validateOutput.errors), + ); + const mcp = parseEvidence(response.structuredContent); + const completed = await promisify(execFile)( + process.execPath, + [entrypoint, "inspect-web-network-capture", path, "qlog", "--json"], + { env: environment, timeout: 40_000, maxBuffer: 96 * 1024 * 1024 }, + ); + const cli = parseEvidence(JSON.parse(completed.stdout)); + assert.equal(cli.evidence_id, mcp.evidence_id); + assert.deepEqual(cli.normalized_result, mcp.normalized_result); + const capture = mcp.normalized_result; + assert.equal(capture.artifact.sha256, sha256); + assert.equal( + capture.total_records, + raw.traces.reduce((sum, trace) => sum + trace.events.length, 0), + ); + for (const [ordinal, original] of raw.traces + .flatMap((trace) => trace.events) + .entries()) { + const record = capture.records[ordinal]; + assert.equal(record.ordinal, ordinal); + assert.equal(record.reported.name, original.name); + assert.equal(record.reported.time, original.time); + assert.deepEqual(record.binary_fields, []); + assert.ok( + record.numeric_literals.some( + (number) => + number.pointer === "/time" && + Number(number.literal) === original.time, + ), + ); + } + assert.equal(capture.qlog.body_bytes, "not-reported"); + assert.equal(mcp.authority, "historical-reference"); + assert.equal( + mcp.analysis_profile.parameters.qlog_profile, + "aioquic-1.5.0-json-0.3", + ); + const trace = capture.qlog.traces[0]; + assert.equal(trace.vantage_point, "server"); + const stream = trace.streams.find( + (stream) => stream.stream_id === "0" && stream.direction === "sent", + ); + assert.ok(stream); + assert.equal(stream.unique_bytes, "32803"); + assert.equal( + stream.frame_length_sum, + lane === "control" ? "32803" : "33972", + ); + assert.equal(stream.repeated_bytes, lane === "control" ? "0" : "1169"); + assert.equal(trace.loss_declarations.length, lane === "control" ? 0 : 1); + if (lane === "loss") + assert.deepEqual(trace.loss_declarations[0].packet_number, { + state: "reported", + value: "5", + }); + // Structurally-known secrets may not survive in Evidence, including sidecars. + const serialized = JSON.stringify(mcp); + for (const original of raw.traces.flatMap((trace) => trace.events)) { + if ( + original.name === "transport:parameters_set" && + typeof original.data.stateless_reset_token === "string" + ) + assert.ok(!serialized.includes(original.data.stateless_reset_token)); + for (const frame of original.data.frames ?? []) { + if ( + frame.frame_type === "new_connection_id" && + typeof frame.reset_token === "string" + ) + assert.ok(!serialized.includes(frame.reset_token)); + if (frame.frame_type === "new_token" && typeof frame.token === "string") + assert.ok(!serialized.includes(frame.token)); + } + } + const retained = await client.callTool({ + name: "inspect_analysis_view", + arguments: { + source: { kind: "retained-evidence", evidence_id: mcp.evidence_id }, + view: { kind: "api-surface" }, + }, + }); + assert.equal(retained.isError, true); + assert.equal( + JSON.parse(retained.content.find((item) => item.type === "text").text) + .error.code, + "unsupported_target", + ); + const selected = await client.callTool({ + name: tool.name, + arguments: { ...input, record_ordinals: [capture.total_records - 1, 0] }, + }); + const subset = parseEvidence(selected.structuredContent).normalized_result; + assert.deepEqual( + subset.records.map((record) => record.ordinal), + [capture.total_records - 1, 0], + ); + assert.deepEqual(subset.qlog, capture.qlog); + measurements.push({ + lane, + path, + sha256, + evidence_id: mcp.evidence_id, + profile_digest: mcp.analysis_profile.digest, + events: capture.total_records, + stream_id: stream.stream_id, + unique_bytes: stream.unique_bytes, + frame_length_sum: stream.frame_length_sum, + repeated_bytes: stream.repeated_bytes, + loss_declarations: trace.loss_declarations.length, + cli_mcp_parity: true, + retained_reference: true, + selected_scope_preserved: true, + auth_exclusions: true, + }); + } + await client.ping(); + const report = { + status: "passed", + profile: "aioquic-1.5.0-json-0.3", + measurements, + limitations: [ + "Caller supplies provenance; format selection does not authenticate the producer.", + "These known loopback cases do not establish WAN behavior, other qlog producers, platforms or general completeness.", + "No PCAP or keylog is read by this verifier; repeated STREAM coverage is not proof of retransmission or network loss.", + ], + }; + await writeFile(reportPath, JSON.stringify(report, null, 2) + "\n", { + flag: "wx", + mode: 0o600, + }); + console.log( + JSON.stringify({ + status: report.status, + cases: measurements.length, + report: reportPath, + }), + ); +} finally { + await client.close(); + await transport.close(); +} diff --git a/scripts/verify-real-electron.mjs b/scripts/verify-real-electron.mjs index c60fd92a1..8f647e649 100644 --- a/scripts/verify-real-electron.mjs +++ b/scripts/verify-real-electron.mjs @@ -4,7 +4,11 @@ import { join } from "node:path"; import { fileURLToPath } from "node:url"; import { PlaywrightElectronActiveProvider } from "../dist/browser/PlaywrightElectronActiveProvider.js"; -import { electronActiveObservationInputSchema } from "../dist/domain/javascript/electronActiveObservation.js"; +import { captureElectronScenario } from "../dist/application/javascript/ElectronActiveObservationService.js"; +import { + electronActiveObservationInputSchema, + electronActiveObservationResultSchema, +} from "../dist/domain/javascript/electronActiveObservation.js"; import { completeVerifierRun, createVerifierRun } from "./lib/verifier-run.mjs"; import { verifyElectronToolContracts } from "./verify/electron/tool-contracts.mjs"; @@ -50,61 +54,65 @@ const input = electronActiveObservationInputSchema.parse({ ], }); const verifierRun = createVerifierRun(); -const result = await new PlaywrightElectronActiveProvider(process.env).capture( +const result = await captureElectronScenario( + new PlaywrightElectronActiveProvider(process.env), input, ); if (!result.ok) throw result.error; +const capture = electronActiveObservationResultSchema.parse( + result.value.normalized_result, +); const output = { verifier_run: await completeVerifierRun(verifierRun), - electron: result.value.application, - actions: result.value.actions, - processes: result.value.processes, - ipc: result.value.ipc, - timeline: result.value.timeline, - windows: result.value.windows, + electron: capture.application, + actions: capture.actions, + processes: capture.processes, + ipc: capture.ipc, + timeline: capture.timeline, + windows: capture.windows, verified: - result.value.coverage.status === "partial_attach" && - result.value.actions.every(({ status }) => status === "completed") && - result.value.actions.some( + capture.coverage.status === "partial_attach" && + capture.actions.every(({ status }) => status === "completed") && + capture.actions.some( ({ kind, window_index }) => kind === "renderer-reload" && window_index === 1, ) && - result.value.actions.some( + capture.actions.some( ({ kind, window_index }) => kind === "renderer-crash" && window_index === 1, ) && - result.value.windows.length >= 2 && - result.value.ipc.events.some( + capture.windows.length >= 2 && + capture.ipc.events.some( ({ kind, channel }) => kind === "main-handler-invocation" && channel === "readiness:echo", ) && - result.value.timeline.events.some( + capture.timeline.events.some( ({ kind, event, phase }) => kind === "window-lifecycle" && event === "created" && phase === "completed", ) && - result.value.timeline.events.some( + capture.timeline.events.some( ({ kind, event }) => kind === "process-lifecycle" && event === "utility-process-fork", ) && - result.value.timeline.events.some( + capture.timeline.events.some( ({ kind, event, phase }) => kind === "shell-attempt" && event === "openExternal" && phase === "blocked", ) && - result.value.timeline.events.some( + capture.timeline.events.some( ({ kind, event, phase }) => kind === "preload" && event === "configured" && phase === "completed", ) && - result.value.timeline.events.some( + capture.timeline.events.some( ({ kind, event }) => kind === "protocol" && (event === "open-url" || event === "second-instance"), ) && - result.value.timeline.events.some( + capture.timeline.events.some( ({ kind, event }) => kind === "process-lifecycle" && event === "child.spawn", ), diff --git a/scripts/verify-real-ghidra-address-context.mjs b/scripts/verify-real-ghidra-address-context.mjs new file mode 100644 index 000000000..2b650df93 --- /dev/null +++ b/scripts/verify-real-ghidra-address-context.mjs @@ -0,0 +1,313 @@ +import assert from "node:assert/strict"; +import { execFile } from "node:child_process"; +import { createHash } from "node:crypto"; +import { mkdir, mkdtemp, readFile, readdir, rm } from "node:fs/promises"; +import { tmpdir } from "node:os"; +import { join } from "node:path"; +import { fileURLToPath } from "node:url"; +import { promisify } from "node:util"; +import { Client } from "@modelcontextprotocol/client"; +import { StdioClientTransport } from "@modelcontextprotocol/client/stdio"; +import { parseEvidence } from "../dist/domain/evidence.js"; +import { requireMcpOperationResult } from "./lib/mcp-verifier-results.mjs"; +import { createVerifierRun, completeVerifierRun } from "./lib/verifier-run.mjs"; + +if (process.argv.length !== 2 || process.platform !== "linux") + throw new Error("Run this ELF verifier on Linux without arguments."); +if (!process.env.GHIDRA_INSTALL_DIR) + throw new Error("Set GHIDRA_INSTALL_DIR to a caller-installed Ghidra."); +const exec = promisify(execFile); +const run = createVerifierRun(); +const root = fileURLToPath(new URL("..", import.meta.url)); +const workspace = await mkdtemp(join(tmpdir(), "rea-address-context-")); +const runtime = join(workspace, "runtime"); +await mkdir(runtime); +const path = join(workspace, "pie.elf"); +const entrypoint = join(root, "scripts/rea.mjs"); +const env = { + ...process.env, + TMPDIR: runtime, + REA_ANALYSIS_PROVIDER: "ghidra", + REA_LOG_LEVEL: "silent", +}; +const transport = new StdioClientTransport({ + command: process.execPath, + args: [entrypoint, "mcp"], + env, + stderr: "pipe", +}); +const client = new Client({ name: "rea-real-address-context", version: "1" }); +let stderr = ""; +transport.stderr?.on("data", (chunk) => { + stderr = (stderr + chunk.toString()).slice(-65536); +}); +let report; +let connected = false; +let primaryFailure; +let verifierRun; +try { + const compiler = process.env.CC ?? "gcc"; + const version = await exec(compiler, ["--version"], { timeout: 10000 }); + await exec( + compiler, + [ + "-O0", + "-g", + "-fPIE", + "-pie", + "-nostdlib", + "-Wl,-e,rea_pie_entry", + "-Wl,--build-id=none", + join(root, "tests/conformance/c/pie-address-context.c"), + "-o", + path, + ], + { timeout: 30000 }, + ); + const bytes = await readFile(path); + assert.equal(bytes.subarray(0, 6).toString("hex"), "7f454c460201"); + assert.equal(bytes.readUInt16LE(16), 3); // ET_DYN: source-owned x86-64 PIE. + assert.equal(bytes.readUInt16LE(18), 62); + const declaredEntry = `0x${bytes.readBigUInt64LE(24).toString(16)}`; + const sha256 = createHash("sha256").update(bytes).digest("hex"); + await client.connect(transport); + connected = true; + await call("open_binary", { path, provider_id: "ghidra" }); + const overview = parseEvidence(await call("binary_overview")); + assert.equal(overview.subject.digest.sha256, sha256); + const base = overview.normalized_result.image_base; + assert.match(base, /^0x[0-9a-f]+$/u); + assert.notEqual(base, "0x0"); + const active = await call("binary_session"); + const image = parseEvidence(await call("inspect_native_load_image")); + assert.equal(base, image.normalized_result.observations.image_base); + assert.ok(overview.normalized_result.segments.length > 0); + assert.ok( + overview.normalized_result.segments.every( + (segment) => + segment.image_base === base && + typeof segment.address_space === "string", + ), + ); + const procedures = parseEvidence(await call("list_procedures")); + const entry = procedures.normalized_result.find( + (item) => item.value === "rea_pie_entry", + ); + const addition = procedures.normalized_result.find( + (item) => item.value === "rea_pie_add", + ); + assert.ok(entry && addition); + assert.notEqual(entry.address, declaredEntry); + assert.ok( + image.normalized_result.observations.entry_points.includes(entry.address), + ); + const mapping = image.normalized_result.observations.mappings.find( + (item) => + item.source_file_index === 0 && + item.file_offset !== null && + item.address_space === "ram" && + BigInt(item.start) <= BigInt(entry.address) && + BigInt(item.end) >= BigInt(entry.address), + ); + assert.ok(mapping); + const offset = + mapping.file_offset + Number(BigInt(entry.address) - BigInt(mapping.start)); + const reverseMapping = parseEvidence( + await call("address_to_file_offset", { address: entry.address }), + ); + assert.equal(reverseMapping.normalized_result.file_offset, offset); + const memory = parseEvidence( + await call("read_bytes", { address: entry.address, length: 8 }), + ); + assert.equal( + memory.normalized_result.bytes_hex, + bytes.subarray(offset, offset + 8).toString("hex"), + ); + const fromOffset = parseEvidence( + await call("procedure_pseudo_code", { + procedure: `file-offset:0x${offset.toString(16)}`, + }), + ); + assert.ok( + fromOffset.locations.some( + (location) => + location.kind === "file-offset" && location.offset === offset, + ), + ); + assert.equal(fromOffset.raw_result.selection.mapped_address, entry.address); + const fromNumericOffset = parseEvidence( + await call("procedure_pseudo_code", { + procedure: `0x${offset.toString(16)}`, + }), + ); + assert.equal( + fromNumericOffset.normalized_result, + fromOffset.normalized_result, + ); + const missingAddress = "ram:0xffffffff"; + const rejected = await client.callTool( + { name: "procedure_pseudo_code", arguments: { procedure: missingAddress } }, + { timeout: 240000 }, + ); + assert.equal(rejected.isError, true); + assert.ok( + JSON.stringify(rejected.content).includes(`Ghidra image base: ${base}`), + ); + assert.ok(JSON.stringify(rejected.content).includes("list_procedures")); + assert.ok( + JSON.stringify(rejected.content).includes("inspect_native_load_image"), + ); + const pseudo = parseEvidence( + await call("procedure_pseudo_code", { procedure: addition.address }), + ); + assert.match(pseudo.normalized_result, /\+\s*(?:7|0x7)\b/u); + const retained = await call("binary_session"); + assert.equal(retained.analysis_run.run_id, active.analysis_run.run_id); + await call("close_binary"); + const cli = async (args) => + exec( + process.execPath, + [entrypoint, ...args, "--provider", "ghidra", "--json"], + { env, timeout: 240000, maxBuffer: 16 * 1024 * 1024 }, + ); + const cliOverview = parseEvidence( + JSON.parse((await cli(["analyze", path])).stdout), + ); + assert.deepEqual(cliOverview.normalized_result, overview.normalized_result); + let cliFailure; + try { + await cli(["decompile", path, missingAddress]); + } catch (cause) { + cliFailure = cause; + } + assert.ok(cliFailure && typeof cliFailure.stdout === "string"); + const error = JSON.parse(cliFailure.stdout); + assert.equal(error.code, "invalid_request"); + assert.ok(JSON.stringify(error).includes(`Ghidra image base: ${base}`)); + for (const command of [ + "rea search . --kind procedures --mode regex", + "rea analyze ", + "rea inspect-native-load-image ", + ]) + assert.ok(JSON.stringify(error).includes(command)); + const cliProcedures = parseEvidence( + JSON.parse( + ( + await cli([ + "search", + path, + ".", + "--kind", + "procedures", + "--mode", + "regex", + ]) + ).stdout, + ), + ); + const cliEntry = cliProcedures.normalized_result.find( + (item) => item.value === "rea_pie_entry", + ); + assert.ok(cliEntry); + assert.equal(cliEntry.address, entry.address); + const cliImage = parseEvidence( + JSON.parse((await cli(["inspect-native-load-image", path])).stdout), + ); + assert.equal(cliImage.normalized_result.observations.image_base, base); + const cliPseudo = parseEvidence( + JSON.parse((await cli(["decompile", path, cliEntry.address])).stdout), + ); + const cliOffset = parseEvidence( + JSON.parse( + (await cli(["decompile", path, `--file-offset=0x${offset.toString(16)}`])) + .stdout, + ), + ); + assert.equal(cliOffset.normalized_result, fromOffset.normalized_result); + assert.deepEqual(cliOffset.locations, fromOffset.locations); + assert.match(cliPseudo.normalized_result, /rea_pie_add/u); + assert.deepEqual(await readFile(path), bytes); + assert.deepEqual(await readdir(runtime), []); + report = { + ok: true, + mocked: false, + provider: image.provider, + compiler: version.stdout.split("\n")[0], + sha256, + declared_elf_entry: declaredEntry, + loaded_entry: entry.address, + observed_image_base: base, + cli_mcp_overview_parity: true, + failed_lookup_guidance: true, + cli_recovery_commands: true, + loaded_decompilation: true, + file_offset_decompilation: true, + address_file_offset_round_trip: true, + source_unchanged: true, + runtime_cleanup: "complete", + }; +} catch (cause) { + primaryFailure = { cause }; + if (stderr) process.stderr.write(stderr); +} + +const cleanupFailures = []; +// Await provider-owned cleanup before the SDK can terminate its MCP parent. +if (connected) { + try { + await call("close_binary"); + } catch (cause) { + cleanupFailures.push(cause); + } +} +try { + await client.close(); +} catch (cause) { + cleanupFailures.push(cause); +} +try { + await transport.close(); +} catch (cause) { + cleanupFailures.push(cause); +} +try { + assert.deepEqual(await readdir(runtime), []); + verifierRun = await completeVerifierRun(run); + assert.equal(verifierRun.process_lineage.status, "verified"); + assert.deepEqual(verifierRun.process_lineage.descendants, []); +} catch (cause) { + cleanupFailures.push(cause); +} +if (cleanupFailures.length === 0) { + try { + await rm(workspace, { recursive: true, force: true }); + } catch (cause) { + cleanupFailures.push(cause); + } +} +if (cleanupFailures.length > 0) { + process.stderr.write( + `Retained verifier workspace after cleanup failure: ${workspace}\n`, + ); + throw new AggregateError( + primaryFailure === undefined + ? cleanupFailures + : [primaryFailure.cause, ...cleanupFailures], + "Ghidra address-context verifier cleanup failed", + ); +} +if (primaryFailure !== undefined) throw primaryFailure.cause; +process.stdout.write( + JSON.stringify({ verifier_run: verifierRun, ...report }) + "\n", +); + +async function call(name, args = {}) { + const result = await client.callTool( + { name, arguments: args }, + { timeout: 240000 }, + ); + assert.notEqual(result.isError, true, JSON.stringify(result)); + return ["open_binary", "binary_session", "close_binary"].includes(name) + ? requireMcpOperationResult(result, name) + : result.structuredContent; +} diff --git a/scripts/verify-real-ghidra-mips-relocatable.mjs b/scripts/verify-real-ghidra-mips-relocatable.mjs index da8a821b1..700b93b8d 100755 --- a/scripts/verify-real-ghidra-mips-relocatable.mjs +++ b/scripts/verify-real-ghidra-mips-relocatable.mjs @@ -124,9 +124,7 @@ async function verifyFixture(byteOrder, kernelModule) { }); const call = async (name, args = {}) => requireMcpOperationResult( - await client.callTool({ name, arguments: args }, undefined, { - timeout: 180000, - }), + await client.callTool({ name, arguments: args }, { timeout: 180000 }), name, ); try { diff --git a/scripts/verify-real-ghidra-mips.mjs b/scripts/verify-real-ghidra-mips.mjs index 2b6f07c85..1c04ea978 100644 --- a/scripts/verify-real-ghidra-mips.mjs +++ b/scripts/verify-real-ghidra-mips.mjs @@ -171,7 +171,6 @@ try { const call = async (name, args = {}) => { const reply = await client.callTool( { name, arguments: args }, - undefined, { timeout: 180000 }, ); return requireMcpOperationResult(reply, name); @@ -184,7 +183,6 @@ try { name: "open_binary", arguments: { path: fixture.path, provider_id: "ghidra" }, }, - undefined, { timeout: 60000 }, ); const error = requireMcpToolError(rejected); @@ -423,7 +421,6 @@ try { snapshot_path: snapshotPath, }, }, - undefined, { timeout: 180000 }, ); requireMcpToolError(wrongSnapshot); diff --git a/scripts/verify-real-ghidra-riscv.mjs b/scripts/verify-real-ghidra-riscv.mjs new file mode 100644 index 000000000..a87adeeb5 --- /dev/null +++ b/scripts/verify-real-ghidra-riscv.mjs @@ -0,0 +1,391 @@ +#!/usr/bin/env node +import assert from "node:assert/strict"; +import { execFile } from "node:child_process"; +import { createHash } from "node:crypto"; +import { + mkdtemp, + mkdir, + readFile, + readdir, + rm, + writeFile, +} from "node:fs/promises"; +import { tmpdir } from "node:os"; +import { join } from "node:path"; +import { fileURLToPath } from "node:url"; +import { promisify } from "node:util"; +import { Client } from "@modelcontextprotocol/client"; +import { StdioClientTransport } from "@modelcontextprotocol/client/stdio"; +import Ajv from "ajv/dist/2020.js"; +import addFormats from "ajv-formats"; +import { parseBinaryTarget } from "../dist/application/BinaryTargetResolver.js"; +import { parseAnalysisSnapshot } from "../dist/domain/analysisSnapshot.js"; +import { parseEvidence } from "../dist/domain/evidence.js"; +import { functionDossierSchema } from "../dist/domain/hopperValues.js"; +import { inspectGhidraInstallation } from "../dist/ghidra/GhidraInstallation.js"; +import { buildRiscvFixture } from "../tests/conformance/ghidra/riscv-fixture.mjs"; +import { + mcpTextValue, + requireMcpOperationResult, + requireMcpToolError, +} from "./lib/mcp-verifier-results.mjs"; +import { createVerifierRun, completeVerifierRun } from "./lib/verifier-run.mjs"; + +if (process.argv.length !== 2) + throw new Error("Usage: node scripts/verify-real-ghidra-riscv.mjs"); +if (!["linux", "darwin"].includes(process.platform)) + throw new Error("This optional lane requires a Linux/macOS Ghidra host."); +if (process.env.GHIDRA_INSTALL_DIR === undefined) + throw new Error("Missing prerequisite: caller-supplied GHIDRA_INSTALL_DIR"); +for (const key of ["REA_GHIDRA_LANGUAGE_ID", "REA_GHIDRA_COMPILER_SPEC_ID"]) + if (process.env[key] !== undefined) + throw new Error( + `Unset ${key}: this lane verifies provider-pinned selection.`, + ); +const installation = inspectGhidraInstallation({ + environment: process.env, + installDir: process.env.GHIDRA_INSTALL_DIR, + ...(process.env.JAVA_HOME === undefined + ? {} + : { javaHome: process.env.JAVA_HOME }), +}); +assert.equal(installation.status, "available", JSON.stringify(installation)); +assert.equal(installation.providerVersion, "12.1.4"); + +const execute = promisify(execFile); +const entrypoint = fileURLToPath(new URL("./rea.mjs", import.meta.url)); +const run = createVerifierRun(); +const workspace = await mkdtemp(join(tmpdir(), "rea-riscv-proof-")); +const runtime = join(workspace, "runtime"); +await mkdir(runtime); +const env = { + PATH: process.env.PATH ?? "/usr/bin:/bin", + TMPDIR: runtime, + REA_LOG_LEVEL: "silent", + REA_ANALYSIS_PROVIDER: "ghidra", + REA_PROCESS_RUN_ID: run.run_id, + GHIDRA_INSTALL_DIR: installation.installDir, + JAVA_HOME: installation.javaHome, +}; +for (const key of ["GHIDRA_HEADLESS_MAXMEM", "GHIDRA_MAXMEM"]) + if (process.env[key] !== undefined) env[key] = process.env[key]; +const transport = new StdioClientTransport({ + command: process.execPath, + args: [entrypoint, "mcp"], + env, + stderr: "pipe", +}); +const client = new Client({ name: "rea-real-riscv-proof", version: "1" }); +let stderr = ""; +transport.stderr?.on("data", (chunk) => { + stderr = (stderr + chunk.toString()).slice(-65536); +}); + +const reports = []; +let failure; +try { + await client.connect(transport); + const catalog = await client.listTools(); + const ajv = new Ajv({ strict: false }); + addFormats(ajv); + const validators = new Map(); + for (const tool of catalog.tools) { + assert.ok( + ajv.validateSchema(tool.outputSchema), + `${tool.name}: invalid output schema`, + ); + const existing = + typeof tool.outputSchema.$id === "string" + ? ajv.getSchema(tool.outputSchema.$id) + : undefined; + validators.set(tool.name, existing ?? ajv.compile(tool.outputSchema)); + } + for (const bits of [32, 64]) { + const fixture = await buildRiscvFixture(workspace, bits); + const resolved = await parseBinaryTarget(fixture.path); + if (!resolved.ok) throw resolved.error; + assert.equal(resolved.value.architecture, "riscv"); + assert.equal(resolved.value.sha256, fixture.sha256); + assert.deepEqual(resolved.value.riscv, fixture.riscv); + const expectedLanguage = `RISCV:LE:${bits}:default`; + const assertProfile = (profile) => { + assert.equal(profile.provider.id, "ghidra"); + assert.equal(profile.provider.version, installation.providerVersion); + const parameters = profile.parameters; + assert.equal(parameters.language_id, expectedLanguage); + assert.equal(parameters.compiler_spec_id, "gcc"); + assert.equal(parameters.language_selection, "provider-pinned-v1"); + assert.equal( + parameters.riscv_support_lane, + `elf${bits}-exec-le-double-float-generic-v1`, + ); + assert.deepEqual(parameters.riscv_elf, { + elf_class: bits, + byte_order: "little", + type: 2, + flags: 5, + float_abi_double: true, + rvc_declared: true, + rve_declared: false, + tso_declared: false, + }); + }; + const assertEvidence = (evidence) => { + assert.equal(evidence.provider.id, "ghidra"); + assert.equal(evidence.subject.architecture, "riscv"); + assert.equal(evidence.subject.digest.sha256, fixture.sha256); + assertProfile(evidence.analysis_profile); + }; + const call = async (name, args = {}) => { + const reply = await client.callTool( + { name, arguments: args }, + { timeout: 240000 }, + ); + const projected = requireMcpOperationResult(reply, name); + const textual = JSON.parse(mcpTextValue(reply)); + assert.deepEqual(reply.structuredContent, textual); + const validate = validators.get(name); + assert.ok(validate, `${name} missing from advertised catalog`); + assert.ok( + validate(textual), + `${name}: ${JSON.stringify(validate.errors)}`, + ); + if (!["open_binary", "close_binary", "binary_session"].includes(name)) + assertEvidence(parseEvidence(textual)); + return projected; + }; + const opened = await call("open_binary", { + path: fixture.path, + provider_id: "ghidra", + }); + assert.equal(opened.architecture, "riscv"); + assert.equal(opened.sha256, fixture.sha256); + const image = await call("inspect_native_load_image"); + assert.equal(image.observations.language_id, expectedLanguage); + assert.equal(image.observations.compiler_spec_id, "gcc"); + assert.ok(image.observations.source_files.length > 0); + for (const source of image.observations.source_files) { + assert.equal(source.original_sha256, fixture.sha256); + assert.equal(source.modified_sha256, fixture.sha256); + } + const procedures = await call("list_procedures"); + for (const name of [ + "rea_riscv_entry", + "rea_riscv_leaf", + "rea_riscv_float", + "rea_riscv_probe", + ]) { + const procedure = procedures.find((value) => value.value === name); + assert.ok(procedure, `${name} missing from Ghidra inventory`); + assert.equal(BigInt(procedure.address), BigInt(fixture.symbols[name])); + } + const probe = await call("inspect_native_instruction", { + address: fixture.symbols.rea_riscv_probe, + }); + assert.equal(probe.status, "decoded"); + assert.equal(probe.architecture, expectedLanguage); + assert.equal(probe.length, 4); + assert.equal(probe.bytes, "13051501"); // addi a0, a0, 17 + const mapping = await call("address_to_file_offset", { + address: fixture.symbols.rea_riscv_probe, + }); + const sourceBytes = await readFile(fixture.path); + assert.equal( + sourceBytes + .subarray(mapping.file_offset, mapping.file_offset + 4) + .toString("hex"), + probe.bytes, + ); + const global = await call("read_bytes", { + address: fixture.symbols.rea_riscv_global, + length: 4, + }); + assert.equal(global.bytes_hex, "07000000"); + const callees = await call("procedure_callees", { + procedure: fixture.symbols.rea_riscv_entry, + }); + for (const name of ["rea_riscv_leaf", "rea_riscv_probe"]) + assert.ok( + callees.some( + (address) => BigInt(address) === BigInt(fixture.symbols[name]), + ), + ); + const dossier = functionDossierSchema.parse( + await call("analyze_function", { + procedure: fixture.symbols.rea_riscv_entry, + }), + ); + assert.ok(dossier.pseudocode.trim().length > 0); + const floatCode = await call("procedure_pseudo_code", { + procedure: fixture.symbols.rea_riscv_float, + }); + assert.ok(typeof floatCode === "string" && floatCode.trim().length > 0); + assert.match(floatCode, /\bdouble\b/u); + + const refusals = []; + for (const [flags, reason] of [ + [1, "EF_RISCV_FLOAT_ABI_DOUBLE"], + [0x80000005, "(0x80000000)"], + ]) { + // Header-mutated copies test admission; they are not new compiler claims. + const rejectedPath = join( + workspace, + `rv${bits}-flags-${flags.toString(16)}.elf`, + ); + const rejectedBytes = Buffer.from(sourceBytes); + rejectedBytes.writeUInt32LE(flags, bits === 32 ? 36 : 48); + await writeFile(rejectedPath, rejectedBytes); + const reply = await client.callTool( + { + name: "open_binary", + arguments: { path: rejectedPath, provider_id: "ghidra" }, + }, + { timeout: 60000 }, + ); + const error = requireMcpToolError(reply); + assert.ok(JSON.stringify(error).includes(reason), JSON.stringify(error)); + await assert.rejects( + execute( + process.execPath, + [ + entrypoint, + "function", + rejectedPath, + "rea_riscv_entry", + "--provider", + "ghidra", + "--json", + ], + { + env, + timeout: 60000, + maxBuffer: 1024 * 1024, + }, + ), + (cause) => + Number.isInteger(cause.code) && + cause.code !== 0 && + `${cause.stdout}\n${cause.stderr}`.includes(reason), + ); + refusals.push({ flags, reason }); + } + const snapshotPath = join(workspace, `rv${bits}.snapshot.json`); + const saved = await call("close_binary", { snapshot_path: snapshotPath }); + assert.ok(saved.evidence_records > 0); + const snapshot = parseAnalysisSnapshot( + JSON.parse(await readFile(snapshotPath, "utf8")), + ); + assert.equal(snapshot.target.architecture, "riscv"); + assert.equal(snapshot.target.sha256, fixture.sha256); + assertProfile(snapshot.binding.analysis_profile); + for (const record of snapshot.evidence_bundle.records) + assertEvidence(parseEvidence(record)); + await call("open_binary", { + path: fixture.path, + provider_id: "ghidra", + snapshot_path: snapshotPath, + }); + assert.deepEqual(await call("list_procedures"), procedures); + await call("close_binary"); + + for (const [command, arguments_] of [ + ["search", ["rea_riscv_", "--kind", "procedures"]], + ["function", ["rea_riscv_entry"]], + ]) { + const cli = await execute( + process.execPath, + [ + entrypoint, + command, + fixture.path, + ...arguments_, + "--provider", + "ghidra", + "--json", + ], + { env, timeout: 240000, maxBuffer: 16 * 1024 * 1024 }, + ); + const evidence = parseEvidence(JSON.parse(cli.stdout)); + assertEvidence(evidence); + if (command === "search") + for (const name of [ + "rea_riscv_entry", + "rea_riscv_leaf", + "rea_riscv_float", + "rea_riscv_probe", + ]) + assert.ok( + evidence.normalized_result.some((value) => value.value === name), + ); + else { + const cliDossier = functionDossierSchema.parse( + evidence.normalized_result, + ); + assert.equal(cliDossier.procedure.address, dossier.procedure.address); + assert.ok(cliDossier.pseudocode.trim().length > 0); + } + } + assert.equal( + createHash("sha256") + .update(await readFile(fixture.path)) + .digest("hex"), + fixture.sha256, + ); + reports.push({ + ...fixture, + language: expectedLanguage, + procedures: procedures.length, + refusals, + cli: true, + stdio_mcp: true, + snapshot_replay: true, + original_unchanged: true, + }); + } +} catch (cause) { + failure = cause; +} +for (const close of [() => client.close(), () => transport.close()]) { + try { + await close(); + } catch (cause) { + failure = new AggregateError( + failure === undefined ? [cause] : [failure, cause], + "Verification or cleanup failed", + ); + } +} +const completed = await completeVerifierRun(run); +if ( + completed.process_lineage.status !== "verified" || + completed.process_lineage.descendants.length !== 0 +) + throw new Error(`Cleanup unverified; retained workspace: ${workspace}`, { + cause: failure, + }); +if (failure !== undefined) + throw new Error( + `RISC-V verification failed; retained workspace: ${workspace}; MCP stderr: ${stderr}`, + { cause: failure }, + ); +assert.deepEqual( + await readdir(runtime), + [], + `Runtime resources survived server shutdown; retained workspace: ${workspace}`, +); +await rm(workspace, { recursive: true, force: true }); +console.log( + JSON.stringify( + { + verifier_run: completed, + lane: "ghidra-riscv", + mocked: false, + host: { platform: process.platform, architecture: process.arch }, + provider: { id: "ghidra", version: installation.providerVersion }, + fixtures: reports, + cleanup: "complete", + }, + null, + 2, + ), +); diff --git a/scripts/verify-real-ghidra-windows.mjs b/scripts/verify-real-ghidra-windows.mjs index 5adf96009..bc822211f 100644 --- a/scripts/verify-real-ghidra-windows.mjs +++ b/scripts/verify-real-ghidra-windows.mjs @@ -28,6 +28,7 @@ import { import { parseBinaryTarget } from "../dist/application/BinaryTargetResolver.js"; import { completeVerifierRun, createVerifierRun } from "./lib/verifier-run.mjs"; import { verifyGhidraCompactReferences } from "./lib/real-ghidra-compact-references.mjs"; +import { verifyGhidraFileOffsets } from "./lib/real-ghidra-file-offsets.mjs"; const verifierRun = createVerifierRun(); const SESSION_CAPABILITIES = GHIDRA_SESSION_CAPABILITIES.filter( @@ -300,6 +301,11 @@ try { } if (report === undefined) throw new Error("Windows Ghidra report was not produced"); +report.file_offsets = await verifyGhidraFileOffsets( + targetPath, + resolve(root, "scripts", "rea.mjs"), + architecture === "x86" ? "0x401010" : "0x140001010", +); process.stdout.write( `${JSON.stringify({ verifier_run: await completeVerifierRun(verifierRun), ...report })}\n`, ); diff --git a/scripts/verify-real-hopper-linux.mjs b/scripts/verify-real-hopper-linux.mjs index 854a58ce0..951b71078 100644 --- a/scripts/verify-real-hopper-linux.mjs +++ b/scripts/verify-real-hopper-linux.mjs @@ -11,7 +11,8 @@ createVerifierRun(); if (process.platform !== "linux") throw new Error("Linux real-Hopper verification must run on Linux"); -const launcher = process.env.HOPPER_LAUNCHER_PATH ?? "/opt/hopper/bin/Hopper"; +const configuredLauncher = process.env.HOPPER_LAUNCHER_PATH; +const launcher = configuredLauncher ?? "/opt/hopper/bin/Hopper"; await access(launcher); await access("/usr/bin/Xvfb"); await access("/usr/bin/xauth"); @@ -28,5 +29,7 @@ try { process.env.HOPPER_LAUNCHER_PATH = alternateLauncher; await import("./verify-real-hopper.mjs"); } finally { + if (configuredLauncher === undefined) delete process.env.HOPPER_LAUNCHER_PATH; + else process.env.HOPPER_LAUNCHER_PATH = configuredLauncher; await rm(alternateDirectory, { recursive: true, force: true }); } diff --git a/scripts/verify-real-hopper.mjs b/scripts/verify-real-hopper.mjs index 12400cb94..8cad9a256 100644 --- a/scripts/verify-real-hopper.mjs +++ b/scripts/verify-real-hopper.mjs @@ -47,6 +47,7 @@ import { } from "./lib/real-hopper-boundaries.mjs"; import { startUnrelatedHopperSentinel } from "./lib/unrelated-hopper-sentinel.mjs"; import { snapshotHopperRuntime } from "./lib/real-hopper-cleanup.mjs"; +import { verifyLinuxHopperOwnerExit } from "./lib/real-hopper-owner-exit.mjs"; const execFileAsync = promisify(execFile); const verifierRun = createVerifierRun(); const timeout = 180_000; @@ -577,6 +578,14 @@ if (sessionsAfter.length > 0) { } if (summary === undefined) throw new Error("Real-Hopper verification did not produce a summary"); +if (process.platform === "linux") + summary.ownerExit = await verifyLinuxHopperOwnerExit({ + primary: targetA, + secondary: targetB, + serverCommand, + serverArgs, + environment: serverEnvironment, + }); const completedVerifierRun = await completeVerifierRun(verifierRun); if ( completedVerifierRun.process_lineage.status !== "verified" || diff --git a/scripts/verify-real-ida.mjs b/scripts/verify-real-ida.mjs index ebf33b32f..cedbf5076 100644 --- a/scripts/verify-real-ida.mjs +++ b/scripts/verify-real-ida.mjs @@ -16,6 +16,10 @@ const { values } = parseArgs({ options: { target: { type: "string" }, procedure: { type: "string", default: "rea_fixture_add" }, + "second-procedure": { type: "string" }, + "second-marker": { type: "string" }, + "expected-string": { type: "string" }, + "expected-xref": { type: "string" }, "package-root": { type: "string" }, report: { type: "string" }, }, @@ -24,6 +28,16 @@ if (values.target === undefined || process.env.REA_IDA_MCP_CONFIG === undefined) throw new Error( "IDA verification requires --target and REA_IDA_MCP_CONFIG; see docs/ida-provider.md. No toolchain is installed by this lane.", ); +if ( + (values["second-procedure"] === undefined) !== + (values["second-marker"] === undefined) || + values["second-marker"] === "" +) + throw new Error( + "IDA verification requires --second-procedure and a nonempty --second-marker together; choose a marker unique to the second function's pseudocode.", + ); +if (values["expected-string"] === "" || values["expected-xref"] === "") + throw new Error("IDA verification oracles must be nonempty."); const packageRoot = resolve( values["package-root"] ?? fileURLToPath(new URL("..", import.meta.url)), ); @@ -37,16 +51,26 @@ const [ { functionDossierSchema }, { readIdaConfiguration }, { createIdaMcpConnection }, + { idaAddressSchema }, ] = await Promise.all([ importBuilt("contracts/toolContracts.js"), importBuilt("domain/evidence.js"), importBuilt("domain/hopperValues.js"), importBuilt("ida/IdaConfiguration.js"), importBuilt("ida/IdaMcpConnection.js"), + importBuilt("ida/IdaProtocolValues.js"), ]); const registration = readIdaConfiguration(process.env.REA_IDA_MCP_CONFIG); if (!registration.ok) throw registration.error; const config = registration.value; +if ( + config.protocol === "native" && + (values["second-procedure"] === undefined || + values["second-marker"] === undefined) +) + throw new Error( + "Native IDA verification requires --second-procedure and --second-marker to verify distinct-function switching; see docs/ida-provider.md.", + ); const environment = Object.fromEntries( Object.entries({ ...process.env, @@ -57,9 +81,16 @@ const environment = Object.fromEntries( const report = { passed: false, mode: config.mode, + protocol: + config.protocol ?? (config.mode === "attached" ? "legacy" : "modern"), checks: [], observations: [], + unverified: [], }; +const expectedXref = + values["expected-xref"] === undefined + ? undefined + : idaAddressSchema.parse(values["expected-xref"]); let phase = "target admission"; const workspaces = new Set(); const databases = new Set(); @@ -75,6 +106,8 @@ const observe = (input) => { assert.equal(evidence.analysis_profile.parameters.cache_policy, "live"); assert.equal(evidence.analysis_profile.parameters.engine_version, null); assert.ok(evidence.limitations.length > 0); + if (config.protocol === "native" && evidence.operation === "analyze_function") + assert.equal(evidence.relationship_coverage?.status, "unknown"); assert.ok( evidence.locations.some((location) => location.kind === "artifact-path"), ); @@ -156,17 +189,122 @@ const mcp = async (cliDossier) => { ["procedure_address", { procedure: dossier.procedure.name }], ["procedure_assembly", { procedure: dossier.procedure.address }], ["procedure_callees", { procedure: dossier.procedure.address }], - ...(config.mode === "attached" + ...(config.mode === "attached" && config.protocol !== "native" ? [["procedure_callers", { procedure: dossier.procedure.address }]] : []), ["search_procedures", { pattern: dossier.procedure.name }], ["procedure_pseudo_code", { procedure: dossier.procedure.address }], ["read_function_instructions", { procedure: dossier.procedure.address }], - ["search_strings", { pattern: "a.b", mode: "literal" }], + [ + "search_strings", + { + pattern: values["expected-string"] ?? "a.b", + mode: "literal", + case_sensitive: true, + }, + ], ["xrefs", { address: dossier.procedure.address }], ]) { const result = await call(name, args); - observe(result); + const value = observe(result); + switch (name) { + case "list_procedures": + case "search_procedures": + assert.ok( + value.some( + (item) => + item.address === dossier.procedure.address && + item.value === dossier.procedure.name, + ), + `${name} omitted the resolved procedure.`, + ); + break; + case "procedure_address": + assert.equal(value, dossier.procedure.address); + break; + case "procedure_assembly": + assert.equal(value, dossier.assembly.join("\n")); + break; + case "procedure_pseudo_code": + assert.equal(value, dossier.pseudocode); + break; + case "procedure_callers": + case "procedure_callees": { + const expected = + name === "procedure_callers" ? dossier.callers : dossier.callees; + assert.deepEqual( + [...value].sort(), + expected.map((item) => item.address).sort(), + ); + break; + } + case "read_function_instructions": + assert.deepEqual(value.procedure.address, dossier.procedure.address); + assert.deepEqual(value.instructions, dossier.assembly); + break; + case "list_strings": + case "search_strings": + if (values["expected-string"] !== undefined) + assert.ok( + value.some((item) => + item.value.includes(values["expected-string"]), + ), + `${name} omitted the expected literal.`, + ); + break; + case "xrefs": + if (expectedXref !== undefined) + assert.ok( + value.includes(expectedXref), + "xrefs omitted the expected source address.", + ); + break; + } + } + if (values["expected-string"] === undefined) + report.unverified.push( + "String inventory/search correctness: no independent expected literal supplied.", + ); + else + report.checks.push( + "string inventory and literal search contain the expected literal", + ); + if (expectedXref === undefined) + report.unverified.push( + "Xref correctness: no independent expected source address supplied.", + ); + else report.checks.push("xrefs contain the expected source address"); + if (values["second-procedure"] !== undefined) { + const secondAddress = observe( + await call("procedure_address", { + procedure: values["second-procedure"], + }), + ); + assert.notEqual(secondAddress, dossier.procedure.address); + const secondCode = observe( + await call("procedure_pseudo_code", { + procedure: values["second-procedure"], + }), + ); + assert.equal(typeof secondCode, "string"); + assert.ok(secondCode.length > 0); + assert.ok( + !dossier.pseudocode.includes(values["second-marker"]), + "The second marker also appears in the first function's pseudocode.", + ); + assert.ok( + secondCode.includes(values["second-marker"]), + "The second function's pseudocode omitted its expected marker.", + ); + const restored = observe( + await call("procedure_pseudo_code", { + procedure: dossier.procedure.address, + }), + ); + assert.equal(restored, dossier.pseudocode); + report.checks.push( + "second-function pseudocode identity and return to the original function", + ); } const invalid = await client.callTool({ name: "xrefs", @@ -177,10 +315,10 @@ const mcp = async (cliDossier) => { await call("close_binary", {}); opened = false; report.checks.push( - "one MCP connection, target selection, analysis/search/xrefs, invalid input, and close", + "one MCP connection, positive procedure inventory/search, contract-valid tool results, invalid input, and close", ); report.checks.push( - "CLI/MCP function identity, pseudocode, assembly, and raw Evidence parity", + "CLI/MCP function identity, pseudocode, assembly, instructions, and relationship parity", ); } finally { const completedPhase = phase; @@ -195,7 +333,10 @@ const cleanup = async () => { try { await upstream.connect(); if (config.mode === "attached") { - const metadata = await upstream.call("get_metadata", {}); + const metadata = + config.protocol === "native" + ? await upstream.readResource("ida://idb/metadata") + : await upstream.call("get_metadata", {}); assert.equal(metadata.sha256.toLowerCase(), await digest()); report.checks.push( "existing GUI target remains open with the original input identity", @@ -243,6 +384,7 @@ try { passed: report.passed, mode: report.mode, checks: report.checks, + unverified: report.unverified, ...(report.passed ? {} : { diff --git a/scripts/verify-signal-recording.mjs b/scripts/verify-signal-recording.mjs new file mode 100644 index 000000000..f5baaf0b9 --- /dev/null +++ b/scripts/verify-signal-recording.mjs @@ -0,0 +1,373 @@ +#!/usr/bin/env node +import assert from "node:assert/strict"; +import { estimateTokenCount } from "tokenx"; +import { execFile } from "node:child_process"; +import { createHash } from "node:crypto"; +import { readFile, writeFile, readdir } from "node:fs/promises"; +import { isAbsolute, join } from "node:path"; +import { fileURLToPath } from "node:url"; +import { promisify } from "node:util"; +import { Client } from "@modelcontextprotocol/client"; +import { StdioClientTransport } from "@modelcontextprotocol/client/stdio"; +import { Ajv2020 } from "ajv/dist/2020.js"; +import { PrivateRuntimeRoot } from "../dist/process/PrivateRuntimeRoot.js"; +import { parseEvidence } from "../dist/domain/evidence.js"; +import { createVerifierRun, completeVerifierRun } from "./lib/verifier-run.mjs"; + +if (process.platform !== "linux") + throw new Error( + "Real signal verification requires Linux with util-linux prlimit.", + ); +if (!isAbsolute(process.env.REA_SIGROK_COMMAND ?? "")) + throw new Error( + "Supply an absolute REA_SIGROK_COMMAND for sigrok-cli 0.7.2.", + ); +const entrypoint = + process.argv[2] ?? fileURLToPath(new URL("./rea.mjs", import.meta.url)); +const run = createVerifierRun(); +const root = await PrivateRuntimeRoot.create({ + prefix: "rea-signal-verifier-", +}); +const path = join(root.path, "recording with spaces.vcd"); +const pagedPath = join(root.path, "paged.vcd"); +const execute = promisify(execFile); +const environment = { + ...process.env, + TMPDIR: root.path, + TMP: root.path, + TEMP: root.path, +}; +const client = new Client({ name: "signal-recording-verifier", version: "1" }); +const transport = new StdioClientTransport({ + command: process.execPath, + args: [entrypoint, "mcp"], + env: environment, + stderr: "pipe", +}); +// Independently synthesize 9600-baud 8N1 samples at 1 MHz: bytes 52 45 41. +const lines = [ + "$timescale 1 us $end", + "$scope module logic $end", + "$var wire 1 ! RX $end", + "$upscope $end", + "$enddefinitions $end", + "#0", + "1!", +]; +let tick = 1000; +for (const byte of Buffer.from("REA")) { + for (const bit of [ + 0, + ...Array.from({ length: 8 }, (_, i) => (byte >> i) & 1), + 1, + ]) { + lines.push(`#${tick}`, `${bit}!`); + tick += 104; + } + tick += 208; +} +lines.push(`#${tick + 1000}`, "1!"); +const source = lines.join("\n") + "\n"; +let cases = 0; +const discoveryMeasurements = []; +const inheritedAddressSpace = (await readFile("/proc/self/limits", "utf8")) + .split("\n") + .find((line) => line.startsWith("Max address space ")) + ?.trim() + .match(/^Max address space\s+(\S+)\s+(\S+)\s+bytes$/u); +assert.ok(inheritedAddressSpace); +const expectedAddressSpace = Math.min( + 1073741824, + ...inheritedAddressSpace + .slice(1) + .map((value) => (value === "unlimited" ? Infinity : Number(value))), +); + +try { + await writeFile(path, source); + await client.connect(transport); + const advertised = (await client.listTools()).tools.find( + ({ name }) => name === "decode_signal_recording", + ); + assert.ok(advertised?.outputSchema); + const ajv = new Ajv2020({ strict: false, validateFormats: false }); + assert.ok(ajv.validateSchema(advertised.inputSchema)); + assert.ok(ajv.validateSchema(advertised.outputSchema)); + for (const extra of [ + { input_format: "vcd", annotations: "uart=rx-data" }, + {}, + ]) { + const input = { path, decoders: "uart:rx=RX:baudrate=9600", ...extra }; + const response = await client.callTool({ + name: advertised.name, + arguments: input, + }); + assert.notEqual(response.isError, true, JSON.stringify(response)); + assert.ok( + ajv.validate(advertised.outputSchema, response.structuredContent), + JSON.stringify(ajv.errors), + ); + const evidence = parseEvidence(response.structuredContent); + const report = evidence.normalized_result; + for (const byte of ["52", "45", "41"]) + assert.match( + report.annotations_text, + new RegExp(`\\d+-\\d+ uart-1: ${byte}\\n`), + ); + assert.equal( + report.artifact.sha256, + createHash("sha256").update(source).digest("hex"), + ); + assert.equal(report.hardware_acquisition, "not-performed"); + assert.equal(report.limits.address_space_bytes, expectedAddressSpace); + assert.equal(report.tool.configured_path, process.env.REA_SIGROK_COMMAND); + assert.equal( + report.resource_limiter.configured_path, + process.env.REA_SIGROK_PRLIMIT_COMMAND ?? "/usr/bin/prlimit", + ); + assert.ok( + report.resource_limiter.arguments.includes( + `--as=${expectedAddressSpace}:${expectedAddressSpace}`, + ), + ); + assert.equal(report.diagnostics, ""); + const flags = Object.entries(input) + .filter(([key]) => key !== "path") + .flatMap(([key, value]) => [`--${key}`, value]); + const cli = JSON.parse( + ( + await execute( + process.execPath, + [ + entrypoint, + "decode-signal-recording", + path, + ...flags, + "--format", + "json", + ], + { env: environment, timeout: 60000, maxBuffer: 16 * 1024 * 1024 }, + ) + ).stdout, + ); + assert.equal(parseEvidence(cli).evidence_id, evidence.evidence_id); + const bundle = await client.callTool({ + name: "get_evidence_bundle", + arguments: {}, + }); + assert.ok(JSON.stringify(bundle).includes(evidence.evidence_id)); + assert.equal(await readFile(path, "utf8"), source); + cases++; + } + const pagedLines = lines.slice(0, 7); + let pagedTick = 1000; + for (const byte of Array.from({ length: 120 }, (_, i) => i)) { + for (const bit of [ + 0, + ...Array.from({ length: 8 }, (_, i) => (byte >> i) & 1), + 1, + ]) { + pagedLines.push(`#${pagedTick}`, `${bit}!`); + pagedTick += 104; + } + pagedTick += 208; + } + pagedLines.push(`#${pagedTick + 1000}`, "1!"); + const pagedSource = pagedLines.join("\n") + "\n"; + await writeFile(pagedPath, pagedSource); + for (const [options, first, count] of [ + [{}, 0, 50], + [{ line_offset: 50, line_limit: 40 }, 50, 40], + [{ line_limit: null }, 0, 120], + ]) { + const input = { + path: pagedPath, + decoders: "uart:rx=RX:baudrate=9600", + input_format: "vcd", + annotations: "uart=rx-data", + ...options, + }; + const response = await client.callTool({ + name: advertised.name, + arguments: input, + }); + assert.notEqual(response.isError, true, JSON.stringify(response)); + assert.ok( + ajv.validate(advertised.outputSchema, response.structuredContent), + JSON.stringify(ajv.errors), + ); + const evidence = parseEvidence(response.structuredContent); + const report = evidence.normalized_result; + assert.deepEqual(report.output_window, { + total_lines: 120, + returned_lines: count, + has_more: first + count < 120, + }); + const observed = report.annotations_text + .trimEnd() + .split("\n") + .map((line) => { + const match = /^\d+-\d+ uart-1: ([0-9A-F]{2})$/.exec(line); + assert.ok(match, line); + return Number.parseInt(match[1], 16); + }); + assert.deepEqual( + observed, + Array.from({ length: count }, (_, i) => first + i), + ); + const flags = Object.entries(input) + .filter(([key]) => key !== "path") + .flatMap(([key, value]) => + key === "line_limit" && value === null + ? ["--all_lines"] + : [`--${key}`, String(value)], + ); + const cli = JSON.parse( + ( + await execute( + process.execPath, + [ + entrypoint, + "decode-signal-recording", + pagedPath, + ...flags, + "--format", + "json", + ], + { env: environment, timeout: 60000, maxBuffer: 16 * 1024 * 1024 }, + ) + ).stdout, + ); + assert.equal(parseEvidence(cli).evidence_id, evidence.evidence_id); + assert.equal(await readFile(pagedPath, "utf8"), pagedSource); + cases++; + } + for (const input of [ + { path, decoders: "no_such_decoder" }, + { path: join(root.path, "absent.vcd"), decoders: "uart" }, + { path, decoders: "uart", driver: "demo" }, + ]) { + const response = await client.callTool({ + name: advertised.name, + arguments: input, + }); + assert.equal(response.isError, true); + await client.ping(); + cases++; + } + await writeFile(path, "not a recording"); + const invalid = await client.callTool({ + name: advertised.name, + arguments: { path, decoders: "uart" }, + }); + assert.equal(invalid.isError, true); + cases++; + const discoveryTool = (await client.listTools()).tools.find( + ({ name }) => name === "inspect_signal_decoders", + ); + assert.ok(discoveryTool?.outputSchema); + assert.ok(ajv.validateSchema(discoveryTool.inputSchema)); + assert.ok(ajv.validateSchema(discoveryTool.outputSchema)); + const nativeHelp = ( + await execute( + process.env.REA_SIGROK_COMMAND, + ["--dont-scan", "--protocol-decoders=uart", "--show"], + { env: environment, timeout: 30000, maxBuffer: 4 * 1024 * 1024 }, + ) + ).stdout.split(/\r?\n/); + if (nativeHelp.at(-1) === "") nativeHelp.pop(); + for (const input of [ + { query: "uart" }, + { limit: 1 }, + { offset: 1, limit: 2 }, + { decoder: "uart", query: "BaUd" }, + { decoder: "uart", offset: 50, limit: null }, + { query: "rea_no_such_decoder" }, + ]) { + const started = performance.now(); + const response = await client.callTool({ + name: discoveryTool.name, + arguments: input, + }); + assert.notEqual(response.isError, true, JSON.stringify(response)); + assert.ok( + ajv.validate(discoveryTool.outputSchema, response.structuredContent), + JSON.stringify(ajv.errors), + ); + const evidence = parseEvidence(response.structuredContent); + const report = evidence.normalized_result; + discoveryMeasurements.push({ + input, + elapsed_ms: +(performance.now() - started).toFixed(2), + response_bytes: Buffer.byteLength(JSON.stringify(response)), + estimated_tokens_one_tool_request_response: estimateTokenCount( + JSON.stringify(discoveryTool) + + JSON.stringify(input) + + JSON.stringify(response), + ), + }); + if (input.decoder) { + const matched = nativeHelp + .map((text, i) => ({ line_number: i + 1, text })) + .filter(({ text }) => + text.toLowerCase().includes((input.query ?? "").toLowerCase()), + ); + assert.deepEqual( + report.help_lines, + matched.slice( + input.offset ?? 0, + input.limit === null + ? undefined + : (input.offset ?? 0) + (input.limit ?? 50), + ), + ); + } else if (input.query === "uart") + assert.ok(report.decoders.some(({ id }) => id === "uart")); + const flags = Object.entries(input).flatMap(([key, value]) => + value === null ? ["--all"] : [`--${key}`, String(value)], + ); + const cli = JSON.parse( + ( + await execute( + process.execPath, + [entrypoint, "inspect-signal-decoders", ...flags, "--format", "json"], + { env: environment, timeout: 60000, maxBuffer: 8 * 1024 * 1024 }, + ) + ).stdout, + ); + assert.deepEqual(cli.normalized_result, report); + cases++; + } + const unavailable = await client.callTool({ + name: discoveryTool.name, + arguments: { decoder: "rea_no_such_decoder" }, + }); + assert.equal(unavailable.isError, true); + cases++; + await client.close(); + assert.deepEqual((await readdir(root.path)).sort(), [ + "paged.vcd", + "recording with spaces.vcd", + ]); +} finally { + await client.close(); + await transport.close(); + await root.close(); +} +console.log( + JSON.stringify( + { + status: "passed", + cases, + discovery_measurements: discoveryMeasurements, + measurement_scope: + "Warm MCP server, fresh sigrok processes; tokenx estimates include one advertised tool/request/response, not billed model usage. No model-driven selection benchmark, CPU or peak process-family memory measurement; no cache or speedup claim.", + host: `${process.platform}/${process.arch}`, + scope: + "real sigrok UART VCD through compiled CLI/MCP; no physical acquisition", + ...(await completeVerifierRun(run)), + }, + null, + 2, + ), +); diff --git a/scripts/verify-wasm-artifact.mjs b/scripts/verify-wasm-artifact.mjs index b45c8ba7d..1f3bde2ca 100644 --- a/scripts/verify-wasm-artifact.mjs +++ b/scripts/verify-wasm-artifact.mjs @@ -248,6 +248,10 @@ try { '"fake"\nSection Details:\n Type start=0x0000000a end=0x0000000b (size=0x00000001) count: 0\n"end"', '"unicode-é\\\t"', '"visible"', + '"\uFEFFsection"', + '"\uFEFFname"', + '"\uFEFF"', + '""', ], ); if (debugNames) { diff --git a/scripts/verify-windows-native.mjs b/scripts/verify-windows-native.mjs index c63b6909f..8623081f9 100644 --- a/scripts/verify-windows-native.mjs +++ b/scripts/verify-windows-native.mjs @@ -11,6 +11,7 @@ import { mkdtemp, readFile, rename, + readdir, rm, symlink, writeFile, @@ -37,6 +38,14 @@ const { WindowsPrivateRuntime, windowsPrivateRuntime } = await import( const { ghidraSessionRoot } = await import( pathToFileURL(join(packageRoot, "dist/ghidra/GhidraSessionRoot.js")) ); +const { PrivateRuntimeRoot } = await import( + pathToFileURL(join(packageRoot, "dist/process/PrivateRuntimeRoot.js")) +); +const { PrivateRuntimeRootUnavailableError } = await import( + pathToFileURL( + join(packageRoot, "dist/process/PrivateRuntimeRootUnavailableError.js"), + ) +); const workspace = await mkdtemp(join(tmpdir(), "rea-native-conformance-")); const environment = Object.entries(process.env) .filter(([, value]) => value !== undefined) @@ -140,6 +149,30 @@ process.stdout.write(JSON.stringify({executable:basename(process.execPath),abiVe ]) assert.throws(() => native.call("open", [rejected])); report.controls.ordinaryDriveSeparatorsAndRequestedIdentity = true; + // An owned runtime's DELETE lease conflicts with a fresh parent admission. + // This produces a genuine sharing failure after successful authority caching, + // without another executable, and proves that no child runtime was created. + const sharingParent = WindowsPrivateRuntime.create( + workspace, + "rea-sharing-parent-", + ); + try { + await assert.rejects( + PrivateRuntimeRoot.create({ parent: sharingParent.observation.path }), + (failure) => { + assert.ok(failure instanceof PrivateRuntimeRootUnavailableError); + assert.equal(failure.retryable, true); + assert.ok(failure.cause instanceof Error); + assert.equal(failure.cause.win32Code, 32); + assert.equal(failure.cause.runtimeAllocation, "not-started"); + return true; + }, + ); + assert.deepEqual(await readdir(sharingParent.observation.path), []); + report.controls.transientRuntimeAdmissionBeforeAllocation = true; + } finally { + await sharingParent.close(); + } const driveRoot = parse(workspace).root; const runtimeParent = ghidraSessionRoot({ base: join(driveRoot, ".Tmp", "scratch"), @@ -629,6 +662,42 @@ setInterval(()=>{},1000);\n`, unicodeNamesPreserved: true, }); report.processes.windowsEnvironmentSemantics = true; + // Observed through this process's own id: a separate probe process would + // get its own processor group, so it cannot stand in for the process that + // spawns the child. + const callerAffinity = JSON.parse( + execFileSync(boundaryFixture, ["affinity", String(process.pid)], { + encoding: "utf8", + }), + ); + const affinityChild = native.call("process_spawn", [ + boundaryFixture, + `${quote(boundaryFixture)} affinity`, + workspace, + environment, + ]); + const observedAffinity = await wait(affinityChild); + native.call("process_close", [affinityChild.handle]); + assert.equal(observedAffinity.exitCode, 0); + const childAffinity = JSON.parse(observedAffinity.output); + // Masks cross as hexadecimal strings because a mask can exceed the + // safe-integer range. Sharing one processor group makes the caller's mask + // applicable, so it must be inherited exactly. Windows placing the child in + // another group is only permitted when the caller asked for no bound of its + // own, which its group's whole active set establishes; a narrower mask has + // to fail the spawn rather than widen to that group's default. + const sharedGroup = + callerAffinity.singleProcessorGroup && + childAffinity.singleProcessorGroup && + callerAffinity.processorGroup === childAffinity.processorGroup; + if (sharedGroup) + assert.equal(childAffinity.affinityMask, callerAffinity.affinityMask); + else assert.equal(callerAffinity.affinityMask, callerAffinity.systemMask); + report.processes.callerAffinityBoundsOwnedProcessOrRefusesToWiden = true; + report.callerAffinity = { + ...callerAffinity, + sharedGroupWithChild: sharedGroup, + }; } const ownerFixture = join(workspace, "owner.mjs"); const ownerPidFile = join(workspace, "crash-child.pid"); diff --git a/scripts/verify/apple/dispatch.mjs b/scripts/verify/apple/dispatch.mjs index 4ac861b29..2378ae335 100644 --- a/scripts/verify/apple/dispatch.mjs +++ b/scripts/verify/apple/dispatch.mjs @@ -236,6 +236,8 @@ try { await exec("/usr/bin/xcrun", [ "swiftc", "-emit-library", + "-module-name", + "ReaWitnessFixture", "-O", ...mode.flags .map((flag) => flag.replace(/^-Wl,/u, "-Xlinker\0")) diff --git a/scripts/verify/fridaBindingsCompatibility.ts b/scripts/verify/fridaBindingsCompatibility.ts new file mode 100644 index 000000000..cb156efb6 --- /dev/null +++ b/scripts/verify/fridaBindingsCompatibility.ts @@ -0,0 +1,28 @@ +import type { + Device as VendorDevice, + DeviceManager as VendorDeviceManager, + Script as VendorScript, + Session as VendorSession, +} from "../../node_modules/frida/build/src/frida_binding.js"; +import type { Device, DeviceManager, Script, Session } from "frida"; + +type Assert = Condition; + +type VendorDeviceManagerFitsShim = Assert< + VendorDeviceManager extends DeviceManager ? true : false +>; +type VendorDeviceFitsShim = Assert; +type VendorSessionFitsShim = Assert< + VendorSession extends Session ? true : false +>; +type VendorScriptFitsShim = Assert; + +// These aliases intentionally fail when the pinned Frida API narrows incompatibly. +const compatibility: readonly [ + VendorDeviceManagerFitsShim, + VendorDeviceFitsShim, + VendorSessionFitsShim, + VendorScriptFitsShim, +] = [true, true, true, true]; + +void compatibility; diff --git a/scripts/verify/harmony/analysis.mjs b/scripts/verify/harmony/analysis.mjs index 3aa90c9f0..aaa401c75 100644 --- a/scripts/verify/harmony/analysis.mjs +++ b/scripts/verify/harmony/analysis.mjs @@ -153,10 +153,36 @@ try { }); try { await client.connect(transport, { timeout: 30_000 }); + await client.listTools(); + const opened = await client.callTool( + { name: "open_binary", arguments: { path } }, + { timeout: 150_000 }, + ); + assert.notEqual(opened.isError, true, JSON.stringify(opened)); + assert.equal(opened.structuredContent?.result?.format, "hap"); + assert.equal(opened.structuredContent?.result?.sha256, fixture.sha256); + const status = await client.callTool( + { name: "binary_session", arguments: {} }, + { timeout: 150_000 }, + ); + assert.notEqual(status.isError, true, JSON.stringify(status)); + assert.equal(status.structuredContent?.result?.open, true); + assert.equal(status.structuredContent?.result?.format, "hap"); + const inspected = await client.callTool( + { name: "inspect_artifact", arguments: {} }, + { timeout: 150_000 }, + ); + assert.notEqual(inspected.isError, true, JSON.stringify(inspected)); + const mcpInspection = parseEvidence(inspected.structuredContent); + assert.deepEqual( + mcpInspection.normalized_result, + inspection.normalized_result, + ); + console.log("PASS MCP open/status/inspect_artifact parity"); const response = await client.callTool( { name: "project_harmony_application_graph", - arguments: { inventory_evidence: [inspection] }, + arguments: { inventory_evidence: [mcpInspection] }, }, { timeout: 150_000 }, ); @@ -168,6 +194,23 @@ try { projectionEvidence.normalized_result, ); console.log("PASS MCP/CLI parity project_harmony_application_graph"); + const closed = await client.callTool( + { name: "close_binary", arguments: {} }, + { timeout: 150_000 }, + ); + assert.notEqual(closed.isError, true, JSON.stringify(closed)); + const empty = await client.callTool( + { name: "binary_session", arguments: {} }, + { timeout: 150_000 }, + ); + assert.notEqual(empty.isError, true, JSON.stringify(empty)); + assert.equal(empty.structuredContent?.result?.open, false); + assert.equal( + await hashFile(path), + fixture.sha256, + "MCP workflow must preserve source bytes", + ); + console.log("PASS MCP close and unchanged source bytes"); } catch (cause) { process.stderr.write(stderr); throw cause; diff --git a/scripts/verify/inspector/runtime-observation.mjs b/scripts/verify/inspector/runtime-observation.mjs index 70224312d..6485ed3cb 100644 --- a/scripts/verify/inspector/runtime-observation.mjs +++ b/scripts/verify/inspector/runtime-observation.mjs @@ -77,6 +77,8 @@ async function verifyTarget(child, targetPath, name) { assert.equal(discovery.length, 1); const raw = discovery[0]; assert.equal(typeof raw.id, "string"); + const expectedAttached = + typeof raw.attached === "boolean" ? raw.attached : null; // Independent oracle: the fixture owns the pathname, and Node's discovery // serialization loses quotes/backslashes. Never decode underscores into it. const unresolved = process.platform === "win32" || /[_"\\]/u.test(targetPath); @@ -96,6 +98,7 @@ async function verifyTarget(child, targetPath, name) { const inventory = listed.normalized_result; assert.equal(inventory.targets.length, 1); assert.equal(inventory.targets[0].target_id, raw.id); + assert.equal(inventory.targets[0].attached, expectedAttached); assert.deepEqual(inventory.targets[0].location, expectedLocation); assert.equal(inventory.excluded.unsupported_location, 0); const mcpList = await runMcp("list_javascript_runtime_targets", { @@ -122,7 +125,13 @@ async function verifyTarget(child, targetPath, name) { observation_ms: 100, }); for (const result of [observed.normalized_result, mcpObservation]) - verifyObservation(result, raw.id, expectedLocation, targetPath); + verifyObservation( + result, + raw.id, + expectedLocation, + targetPath, + expectedAttached, + ); assert.deepEqual(mcpObservation.target, observed.normalized_result.target); process.stdout.write( `${JSON.stringify({ @@ -133,6 +142,7 @@ async function verifyTarget(child, targetPath, name) { target_id: raw.id, discovery_url: raw.url, target_location: expectedLocation, + attached: inventory.targets[0].attached, cli_scripts: observed.normalized_result.scripts.items.length, mcp_scripts: mcpObservation.scripts.items.length, listed_evidence_id: listed.evidence_id, @@ -141,9 +151,16 @@ async function verifyTarget(child, targetPath, name) { ); } -function verifyObservation(result, targetId, expectedLocation, targetPath) { +function verifyObservation( + result, + targetId, + expectedLocation, + targetPath, + expectedAttached, +) { assert.equal(result.target.target_id, targetId); assert.equal(result.target.runtime_kind, "node"); + assert.equal(result.target.attached, expectedAttached); assert.deepEqual(result.target.location, expectedLocation); assert.equal(result.capture.truncated, false); assert.ok(Array.isArray(result.directly_observed)); diff --git a/scripts/verify/javascript/output.mjs b/scripts/verify/javascript/output.mjs index dbdfdc340..e9bc9e588 100644 --- a/scripts/verify/javascript/output.mjs +++ b/scripts/verify/javascript/output.mjs @@ -10,7 +10,7 @@ import { finished } from "node:stream/promises"; import { Cli } from "incur"; -import { createStreamedCliJsonOutput } from "../../../dist/cli/streamedJsonOutput.js"; +import { createCliResultOutput } from "../../../dist/cli/cliResultOutput.js"; import { createEvidence } from "../../../dist/domain/evidence.js"; // This opt-in format-boundary check writes one temporary file larger than the @@ -79,7 +79,7 @@ try { destination = createWriteStream(path, { flags: "wx", mode: 0o600 }); const argv = [metadata.command, "--format", format, "--full-output"]; - const output = createStreamedCliJsonOutput(argv, destination); + const output = createCliResultOutput(argv, destination); assert.ok(output); let unexpectedOutputBytes = 0; let exitCode = 0; diff --git a/scripts/verify/javascript/recovery.mjs b/scripts/verify/javascript/recovery.mjs index 1d9f30eb4..67ed72deb 100644 --- a/scripts/verify/javascript/recovery.mjs +++ b/scripts/verify/javascript/recovery.mjs @@ -41,9 +41,10 @@ const cli = async (...args) => { return parseEvidence(JSON.parse(stdout)); }; const call = async (name, args) => { - const result = await client.callTool({ name, arguments: args }, undefined, { - timeout: 150000, - }); + const result = await client.callTool( + { name, arguments: args }, + { timeout: 150000 }, + ); assert.notEqual(result.isError, true, mcpTextValue(result)); return parseEvidence(JSON.parse(mcpTextValue(result))); }; diff --git a/scripts/website.py b/scripts/website.py index 7e20f53a2..22c0829b9 100644 --- a/scripts/website.py +++ b/scripts/website.py @@ -16,9 +16,9 @@ from urllib.parse import quote, urlsplit SITE_ORIGIN = "https://rea.tools" NOTES_FIXTURES = {"examples/notes-electron/index.html", "examples/notes-web/index.html"} NAVIGATION = ( + ("Get started", "get-started/"), ("Showcases", "showcase/"), ("Blog", "blog/"), - ("Get started", "get-started/"), ("Guides", "guides/"), ("FAQ", "faq/"), ) @@ -114,12 +114,12 @@ def shared_blocks(root, path, source): } from website_i18n import language_markup selector, alternates = language_markup(root, path.relative_to(site).as_posix()) - values["language_picker"] = selector if not metadata.noindex else "" + values["language_picker"] = indent(selector, " ") if not metadata.noindex else "" values["alternates"] = alternates if not metadata.noindex else "" templates = root / "website/templates" return { name: indent(Template((templates / f"{name}.html.tmpl").read_text(encoding="utf-8")).substitute(values), " ") - for name in ("sharing", "header", "footer") + for name in ("sharing", "theme", "header", "footer") } diff --git a/src/adb/AdbDeviceOutput.test.ts b/src/adb/AdbDeviceOutput.test.ts index fe11c2a26..12b82ab84 100644 --- a/src/adb/AdbDeviceOutput.test.ts +++ b/src/adb/AdbDeviceOutput.test.ts @@ -84,6 +84,24 @@ describe("parseAdbDevicesOutput", () => { ]); }); + it("accepts complete multiword states and rejects state prefixes", () => { + const output = [ + "serial-no-permission no permissions usb:1-1", + "serial-bad-device deviceXYZ ", + "serial-bad-offline offline-ish", + "serial-bad-auth unauthorizedXYZ", + ].join("\n"); + const { devices, unparsedLines } = parseAdbDevicesOutput(output); + expect(devices.map(({ serial, state }) => [serial, state])).toEqual([ + ["serial-no-permission", "no permissions"], + ]); + expect(unparsedLines).toEqual([ + "serial-bad-device deviceXYZ ", + "serial-bad-offline offline-ish", + "serial-bad-auth unauthorizedXYZ", + ]); + }); + it("returns unrecognized lines instead of dropping them", () => { const output = [ "List of devices attached", @@ -194,10 +212,10 @@ describe("parsePackageListOutput", () => { it("keeps unrecognized lines for partial coverage reporting", () => { const { packages, unparsedLines } = parsePackageListOutput( - "package:/data/app/x/base.apk=com.ok\ngarbage line\n", + "package:/data/app/x/base.apk=com.ok\n garbage line \n", ); expect(packages).toHaveLength(1); - expect(unparsedLines).toEqual(["garbage line"]); + expect(unparsedLines).toEqual([" garbage line "]); }); }); diff --git a/src/adb/AdbDeviceOutput.ts b/src/adb/AdbDeviceOutput.ts index 3380de608..8d3c74f5f 100644 --- a/src/adb/AdbDeviceOutput.ts +++ b/src/adb/AdbDeviceOutput.ts @@ -10,11 +10,15 @@ import { adbHostFileName, type AdbHostFileNameReason, } from "./AdbHostFileName.js"; +import { + ADB_DEVICE_STATES, + type AdbDeviceState, +} from "../domain/adb/adbDeviceAnalysis.js"; /** One device exactly as `adb devices -l` reports it. */ export interface AdbDeviceEntry { readonly serial: string; - readonly state: string; + readonly state: AdbDeviceState; readonly transport: "usb" | "tcp" | "unknown"; readonly product: string | null; readonly model: string | null; @@ -24,25 +28,6 @@ export interface AdbDeviceEntry { readonly kind_basis: "emulator_serial_prefix" | "usb_transport" | "none"; } -/** - * Device states adb prints after the serial, longest first so two-word - * states match before their single-word prefixes. A line whose remainder - * starts with none of them is not a device line. - */ -const DEVICE_STATES = [ - "no permissions", - "unauthorized", - "authorizing", - "offline", - "recovery", - "sideload", - "connecting", - "bootloader", - "device", - "unknown", - "host", -] as const; - const DEVICE_LINE = /^(\S+)\s+(.*)$/u; const metadataValue = (remainder: string, key: string): string | null => { @@ -73,11 +58,15 @@ export const parseAdbDevicesOutput = ( continue; } const match = DEVICE_LINE.exec(line); - const state = DEVICE_STATES.find((candidate) => - match?.[2]?.startsWith(candidate), - ); + const state = ADB_DEVICE_STATES.find((candidate) => { + const remainder = match?.[2]; + if (remainder === undefined || !remainder.startsWith(candidate)) + return false; + const next = remainder[candidate.length]; + return next === undefined || /\s/u.test(next); + }); if (match === null || state === undefined) { - if (line.trim() !== "") unparsedLines.push(line); + if (rawLine.trim() !== "") unparsedLines.push(rawLine); continue; } const serial = match[1]!; @@ -192,7 +181,7 @@ export const parsePackageListOutput = ( if (line === "") continue; const match = PACKAGE_LINE.exec(line); if (match === null) { - unparsedLines.push(line); + unparsedLines.push(rawLine); continue; } packages.push({ diff --git a/src/adb/AdbDirectoryListing.ts b/src/adb/AdbDirectoryListing.ts new file mode 100644 index 000000000..a8c055ad6 --- /dev/null +++ b/src/adb/AdbDirectoryListing.ts @@ -0,0 +1,108 @@ +import { isUtf8 } from "node:buffer"; + +interface AdbDirectoryEntry { + readonly name: string; + readonly kind: "directory" | "file" | "symlink" | "other"; + readonly permissions: string | null; + readonly owner: string | null; + readonly group: string | null; + readonly bytes: number | null; + readonly date: string | null; + readonly link_target: string | null; +} + +/** + * List direct children with Android 8 Toybox's batched `find -exec` and + * `stat -c` support. Names and link targets are NUL-framed; neither is ever + * inserted into a line-oriented metadata record or command substitution. + */ +export const ADB_DIRECTORY_BATCH_SCRIPT = String.raw`metadata=$(stat -c '%A|%U|%G|%s|%y' "$@") || exit +printf '%s\n' "$metadata" | { + while IFS= read -r metadata; do + [ "$#" -gt 0 ] || exit 1 + path=$1 + shift + printf '%s\000%s\000' "$metadata" "${"${path##*/}"}" + case "$metadata" in + l*) readlink -n "$path" || exit 1 ;; + esac + printf '\000' + done + [ "$#" -eq 0 ] +}`; + +const METADATA = + /^([bcdlps-][rwxstST-]{9})\|([^|\n]+)\|([^|\n]+)\|(\d+)\|([^|\n]+)$/u; + +const parseEntry = ( + metadata: string, + name: string, + linkTarget: string, +): AdbDirectoryEntry | null => { + const match = METADATA.exec(metadata); + if (match === null || name === "" || name.includes("/")) return null; + const permissions = match[1]!; + const bytes = Number(match[4]!); + if (!Number.isSafeInteger(bytes)) return null; + + const isSymlink = permissions.startsWith("l"); + if (isSymlink ? linkTarget === "" : linkTarget !== "") return null; + + return { + name, + kind: permissions.startsWith("d") + ? "directory" + : isSymlink + ? "symlink" + : permissions.startsWith("-") + ? "file" + : "other", + permissions, + owner: match[2]!, + group: match[3]!, + bytes, + date: match[5]!, + link_target: isSymlink ? linkTarget : null, + }; +}; + +/** Parse metadata/name/target NUL triples from `ADB_DIRECTORY_BATCH_SCRIPT`. */ +export const parseAdbDirectoryListing = ( + stdout: Buffer, +): { + entries: readonly AdbDirectoryEntry[]; + unparsedLines: readonly string[]; +} => { + const entries: AdbDirectoryEntry[] = []; + const unparsedLines: string[] = []; + let offset = 0; + while (offset < stdout.length) { + const metadataEnd = stdout.indexOf(0, offset); + const nameEnd = metadataEnd < 0 ? -1 : stdout.indexOf(0, metadataEnd + 1); + const targetEnd = nameEnd < 0 ? -1 : stdout.indexOf(0, nameEnd + 1); + if (targetEnd < 0) { + unparsedLines.push(describeUnparsedRecord(stdout.subarray(offset))); + break; + } + const rawRecord = stdout.subarray(offset, targetEnd + 1); + if (!isUtf8(rawRecord)) { + unparsedLines.push(describeUnparsedRecord(rawRecord)); + } else { + const entry = parseEntry( + stdout.toString("utf8", offset, metadataEnd), + stdout.toString("utf8", metadataEnd + 1, nameEnd), + stdout.toString("utf8", nameEnd + 1, targetEnd), + ); + if (entry === null) unparsedLines.push(rawRecord.toString("utf8")); + else entries.push(entry); + } + offset = targetEnd + 1; + } + + return { entries, unparsedLines }; +}; + +const describeUnparsedRecord = (record: Buffer): string => + isUtf8(record) + ? record.toString("utf8") + : `Invalid UTF-8 directory record (hex): ${record.toString("hex")}`; diff --git a/src/adb/AdbProvider.test.ts b/src/adb/AdbProvider.test.ts index 9ea0f026b..ae81353c7 100644 --- a/src/adb/AdbProvider.test.ts +++ b/src/adb/AdbProvider.test.ts @@ -121,6 +121,52 @@ fi`, ]); }); +it("refuses device listings with an invalid state token", async () => { + const malformedLine = "serial deviceXYZ "; + const { binary } = await writeAdbStub( + () => `if [ "$1" = "version" ]; then ${VERSION_BLOCK}; exit 0; fi +if [ "$1" = "devices" ]; then + printf 'List of devices attached\\n${malformedLine}\\n' + exit 0 +fi`, + ); + const result = await providerOver(binary).execute({ + operation: "list_adb_devices", + input: {}, + }); + expect(result.ok).toBe(false); + if (result.ok) return; + expect(result.error._tag).toBe("AnalysisProtocolError"); + expect(result.error.message).toContain(malformedLine); +}); + +it("lists rescue and detached transports alongside online devices", async () => { + const { binary } = await writeAdbStub( + () => `if [ "$1" = "version" ]; then ${VERSION_BLOCK}; exit 0; fi +if [ "$1" = "devices" ]; then + printf 'List of devices attached\\n' + printf 'serial-online device transport_id:1\\n' + printf 'serial-rescue rescue transport_id:2\\n' + printf 'serial-detached detached transport_id:3\\n' + exit 0 +fi`, + ); + const result = await evidenceResult(providerOver(binary), { + operation: "list_adb_devices", + input: {}, + }); + expect(result.devices).toEqual( + expect.arrayContaining([ + expect.objectContaining({ serial: "serial-online", state: "device" }), + expect.objectContaining({ serial: "serial-rescue", state: "rescue" }), + expect.objectContaining({ + serial: "serial-detached", + state: "detached", + }), + ]), + ); +}); + it("inspects a device through the getprop whitelist", async () => { const { binary } = await writeAdbStub( () => `if [ "$1" = "version" ]; then ${VERSION_BLOCK}; exit 0; fi @@ -199,7 +245,7 @@ const shellStub = ( second === undefined ? `[ "$4" = "${first}" ]` : `[ "$4" = "${first}" ] && [ "$5" = "${second}" ]`; - return ` if ${guard}; then printf '%b' '${output.replace(/'/gu, "'\\''")}'; exit 0; fi`; + return ` if ${guard}; then printf '%b' '${output.replaceAll("\\", "\\\\").replaceAll("\0", "\\000").replace(/'/gu, "'\\''")}'; exit 0; fi`; }) .join("\n"); return () => `if [ "$1" = "version" ]; then ${VERSION_BLOCK}; exit 0; fi @@ -495,7 +541,7 @@ it("reads a bounded logcat dump with the caller count and buffer", async () => { const { binary } = await writeAdbStub( shellStub({ logcat: - "08-10 13:00:00.000 I/Tag( 123): first\\n08-10 13:00:01.000 I/Tag( 123): second\\n", + "08-10 13:00:00.000 I/Tag( 123): first\n08-10 13:00:01.000 I/Tag( 123): second\n", }), ); const result = await evidenceResult(providerOver(binary), { @@ -508,6 +554,44 @@ it("reads a bounded logcat dump with the caller count and buffer", async () => { ]); }); +it("reports UTF-8 byte counts in total_bytes for non-ASCII logcat output", async () => { + const { binary } = await writeAdbStub( + shellStub({ + logcat: + "08-10 13:00:00.000 I/Tag( 1): 中文\n08-10 13:00:00.000 I/Tag( 1): 😀\n", + }), + ); + const result = await evidenceResult(providerOver(binary), { + operation: "read_adb_logcat", + input: { serial: "emulator-5554", count: 500, buffer: "main" }, + }); + expect(result.lines).toEqual([ + "08-10 13:00:00.000 I/Tag( 1): 中文", + "08-10 13:00:00.000 I/Tag( 1): 😀", + ]); + // 30-byte prefix + 6-byte CJK + LF = 37; 30-byte prefix + 4-byte emoji + LF = 35. + expect(result.total_bytes).toBe(72); +}); + +it("counts raw captured bytes in total_bytes for malformed UTF-8 logcat output", async () => { + const { binary } = await writeAdbStub( + () => `if [ "$1" = "version" ]; then ${VERSION_BLOCK}; exit 0; fi +if [ "$1" = "-s" ] && [ "$3" = "shell" ]; then + printf '%b' '08-10 13:00:00.000 I/Tag( 1): A\\377B\\n' + exit 0 +fi +printf 'unexpected arguments: %s\\n' "$@" +exit 1`, + ); + const result = await evidenceResult(providerOver(binary), { + operation: "read_adb_logcat", + input: { serial: "emulator-5554", count: 500, buffer: "main" }, + }); + // 30-byte prefix + "A" + one raw 0xff byte + "B" + LF = 34 captured bytes. + // Re-encoding the decoded U+FFFD replacement would report 36. + expect(result.total_bytes).toBe(34); +}); + it("projects package details from dumpsys package output", async () => { const { binary } = await writeAdbStub( shellStub({ @@ -542,6 +626,34 @@ it("projects package details from dumpsys package output", async () => { }); }); +// Android 10 and 11 append ": restricted=true" to hard- and soft-restricted +// entries of the requested-permissions list (Settings.dumpPackageLPr). +it("counts requested permissions that the device marks as restricted", async () => { + const { binary } = await writeAdbStub( + shellStub({ + "dumpsys:package": `Packages: + Package [com.example] (abcdef): + userId=10234 + versionName=1.2.3 + requested permissions: + android.permission.INTERNET + android.permission.WRITE_EXTERNAL_STORAGE: restricted=true + android.permission.CAMERA + install permissions: + android.permission.INTERNET: granted=true +`, + }), + ); + const result = await evidenceResult(providerOver(binary), { + operation: "inspect_adb_package", + input: { serial: "emulator-5554", package: "com.example" }, + }); + expect(result).toMatchObject({ + requested_permissions_count: 3, + coverage: "complete", + }); +}); + it("reports an uninstalled package from dumpsys refusal output", async () => { const { binary } = await writeAdbStub( shellStub({ "dumpsys:package": "Unable to find package: com.absent\n" }), @@ -780,42 +892,74 @@ it("lists processes, features, and services through fixed commands", async () => ]); }); -it("lists a device directory with kinds and symlink targets", async () => { - const { binary } = await writeAdbStub( - shellStub({ - ls: "total 4\n-rw-rw---- u0_a1 u0_a1 4096 2026-01-02 11:00 app.db\nlrwxrwxrwx root root 2026-01-01 10:00 lib -> /apex/com.android.art/lib\n", - }), - ); - const result = await evidenceResult(providerOver(binary), { - operation: "list_adb_directory", - input: { - serial: "emulator-5554", - device_path: "/data/data/com.example.app", - }, - }); - expect(result.entries).toEqual([ - { - name: "app.db", - kind: "file", - permissions: "-rw-rw----", - owner: "u0_a1", - group: "u0_a1", - bytes: 4096, - date: "2026-01-02 11:00", - link_target: null, - }, - { - name: "lib", - kind: "symlink", - permissions: "lrwxrwxrwx", - owner: "root", - group: "root", - bytes: null, - date: "2026-01-01 10:00", - link_target: "/apex/com.android.art/lib", - }, - ]); -}); +it.each(["complete", "truncated"] as const)( + "preserves framed directory identities with %s output", + async (variant) => { + const date = "2026-01-02 11:00:00.000000000 +0000"; + const names = [ + "app.db", + " app.db ", + " ", + "one -> two -> three", + "line\r", + "line\u2028break", + "foo\n-rw-rw---- root root 0 2026-01-01 10:00 ghost", + "literal\\n", + ]; + const links = [ + ["lib", "/apex/com.android.art/lib"], + [" lib ", " /apex/lib "], + ["one -> two\n", "three -> four\n\n"], + ] as const; + const truncated = `-rw-rw----|u0_a1|u0_a1|4096|${date}\0unfinished`; + const output = [ + ...names.map( + (name) => `-rw-rw----|u0_a1|u0_a1|4096|${date}\0${name}\0\0`, + ), + ...links.map( + ([name, target]) => + `lrwxrwxrwx|root|root|${Buffer.byteLength(target)}|${date}\0${name}\0${target}\0`, + ), + ...(variant === "truncated" ? [truncated] : []), + ].join(""); + const { binary } = await writeAdbStub(shellStub({ sh: output })); + const result = await evidenceResult(providerOver(binary), { + operation: "list_adb_directory", + input: { + serial: "emulator-5554", + device_path: "/data/data/com.example.app", + }, + }); + expect(result.entries).toEqual([ + ...names.map((name) => ({ + name, + kind: "file", + permissions: "-rw-rw----", + owner: "u0_a1", + group: "u0_a1", + bytes: 4096, + date, + link_target: null, + })), + ...links.map(([name, target]) => ({ + name, + kind: "symlink", + permissions: "lrwxrwxrwx", + owner: "root", + group: "root", + bytes: Buffer.byteLength(target), + date, + link_target: target, + })), + ]); + expect(result.unparsed_lines).toEqual( + variant === "truncated" ? [truncated] : [], + ); + expect(result.coverage).toBe( + variant === "truncated" ? "partial" : "complete", + ); + }, +); it("inspects the display and window focus", async () => { const { binary } = await writeAdbStub( @@ -871,7 +1015,7 @@ it("resolves packages by case-insensitive substring", async () => { const { binary } = await writeAdbStub( shellStub({ "pm:list": - "package:/data/app/x/base.apk=com.whatsapp\\npackage:/data/app/y/base.apk=com.whatsapp.w4b\\npackage:/data/app/z/base.apk=com.example\\n", + "package:/data/app/x/base.apk=com.whatsapp\npackage:/data/app/y/base.apk=com.whatsapp.w4b\npackage:/data/app/z/base.apk=com.example\n", }), ); const result = await evidenceResult(providerOver(binary), { @@ -1054,10 +1198,10 @@ it("rejects mistyped intent extras before touching the device", async () => { it("collects a device bugreport archive with its digest", async () => { const { binary, root } = await writeAdbStub( - (root) => `if [ "$1" = "version" ]; then ${VERSION_BLOCK}; exit 0; fi + () => `if [ "$1" = "version" ]; then ${VERSION_BLOCK}; exit 0; fi if [ "$1" = "-s" ] && [ "$3" = "bugreport" ]; then - printf 'bugreport-bytes' > "${join(root, "bugreport test.zip")}" - printf 'Bug report copied to ${join(root, "bugreport test.zip")}\\n' + printf 'bugreport-bytes' > "$4/bugreport test.zip" + printf 'Bug report copied to %s/bugreport test.zip\\n' "$4" exit 0 fi exit 1`, @@ -1071,26 +1215,29 @@ exit 1`, local_path: join(root, "bugreport test.zip"), bytes: 15, sha256: digest, - adb_reported_path: join(root, "bugreport test.zip"), + adb_reported_path: expect.stringContaining(".rea-bugreport-"), }); }); it("quotes caller text before adb joins the remote shell command", async () => { const { binary, root } = await writeAdbStub( - (root) => `if [ "$1" = "version" ]; then ${VERSION_BLOCK}; exit 0; fi + () => `if [ "$1" = "version" ]; then ${VERSION_BLOCK}; exit 0; fi shift 3 # Model adb's remote command joining, then execute the resulting shell string. -printf '#!/bin/sh\nprintf "%%s" "$@" > "${join(root, "observed")}"\n' > "${join(root, "ls")}" -chmod +x "${join(root, "ls")}" -PATH="${root}:$PATH" sh -c "$*" +sh -c "$*" `, ); - const value = `/sdcard/a 'quoted'; touch ${join(root, "injected")}`; - await providerOver(binary).execute({ + const value = join(root, `device 'quoted'; touch ${join(root, "injected")}`); + await mkdir(value, { recursive: true }); + const result = await evidenceResult(providerOver(binary), { operation: "list_adb_directory", input: { serial: "device", device_path: value }, }); - expect(await readFile(join(root, "observed"), "utf8")).toContain(value); + expect(result).toMatchObject({ + device_path: value, + entries: [], + coverage: "complete", + }); await expect(readFile(join(root, "injected"))).rejects.toThrow(); }); diff --git a/src/adb/AdbProvider.ts b/src/adb/AdbProvider.ts index eec316978..b9af6d14f 100644 --- a/src/adb/AdbProvider.ts +++ b/src/adb/AdbProvider.ts @@ -1,16 +1,17 @@ -import { execFile } from "node:child_process"; import { createHash } from "node:crypto"; import { constants as fsConstants } from "node:fs"; import { access, + copyFile, lstat, + mkdtemp, mkdir, rmdir, rm, stat, writeFile, } from "node:fs/promises"; -import { join, resolve } from "node:path"; +import { basename, dirname, extname, join, resolve } from "node:path"; import type { ExecutionOptions, @@ -21,7 +22,12 @@ import { createAnalysisExecution, type AnalysisExecution, } from "../application/AnalysisProvider.js"; -import type { AdbRequest } from "../domain/adb/adbDeviceAnalysis.js"; +import type { + AdbActivityStartPartialObservation, + AdbAcquiredFilePartialObservation, + AdbRequest, +} from "../domain/adb/adbDeviceAnalysis.js"; +import { adbResultSchemas } from "../domain/adb/adbDeviceAnalysis.js"; import { AnalysisArtifactChangedError, AnalysisCancelledError, @@ -38,7 +44,7 @@ import { err, ok, type Result } from "../domain/result.js"; import { hashStableFile } from "../filesystem/StableFileHash.js"; import { ProviderCleanupError } from "../domain/providerCleanupError.js"; import { - execFileOutput, + execFileBytes, execFileOutputFailure, } from "../process/ExecFileOutput.js"; import { @@ -56,12 +62,15 @@ import { parsePmPathOutput, } from "./AdbDeviceOutput.js"; import { adbHostFileName } from "./AdbHostFileName.js"; +import { + ADB_DIRECTORY_BATCH_SCRIPT, + parseAdbDirectoryListing, +} from "./AdbDirectoryListing.js"; import { parseAmStartOutput, parseBugreportCopiedPath, parseDumpsysPackageOutput, parseFeatureListOutput, - parseLsOutput, parsePackageChangeOutput, parseProcessListOutput, parsePngDimensions, @@ -105,7 +114,6 @@ const BUGREPORT_TIMEOUT_MS = 600_000; const BUGREPORT_MAX_OUTPUT_BYTES = 1024 * 1024; const STDERR_EXCERPT_BYTES = 512; const UNPARSED_LINES_REPORTED = 10; -const STOP_GRACE_MS = 5_000; const hashAdbFile = async ( path: string, @@ -144,19 +152,19 @@ interface AdbRunLimits { } /** Run one bounded adb invocation and keep its exact failure shape. */ -const runAdb = async ( +const runAdbCapture = async ( operation: string, targetPath: string, binary: string, arguments_: readonly string[], limits: AdbRunLimits, signal: AbortSignal | undefined, -): Promise> => { +): Promise> => { if (signal?.aborted === true) return err(new AnalysisCancelledError(operation)); try { return ok( - await execFileOutput(binary, arguments_, { + await execFileBytes(binary, arguments_, { timeout: limits.timeoutMs, maxBuffer: limits.maxOutputBytes, stopSignal: "SIGTERM", @@ -223,61 +231,22 @@ const runAdb = async ( } }; -/** Capture one adb invocation's raw binary stdout (screencap PNG). */ -const runAdbBinary = ( - operation: string, - binary: string, - arguments_: readonly string[], - limits: AdbRunLimits, - signal: AbortSignal | undefined, -): Promise> => - new Promise((settle) => { - if (signal?.aborted === true) - return settle(err(new AnalysisCancelledError(operation))); - let stopped: "abort" | "timeout" | undefined; - let deadline: NodeJS.Timeout | undefined; - let grace: NodeJS.Timeout | undefined; - const child = execFile( - binary, - [...arguments_], - { - encoding: "buffer" as const, - maxBuffer: limits.maxOutputBytes, - killSignal: "SIGTERM", - timeout: 0, - }, - (error, stdout) => { - signal?.removeEventListener("abort", onAbort); - clearTimeout(deadline); - clearTimeout(grace); - if (stopped === "abort") - return settle(err(new AnalysisCancelledError(operation))); - if (stopped === "timeout") - return settle( - err(new AnalysisTimeoutError(operation, limits.timeoutMs)), - ); - if (error !== null) - return settle( - err( - new AnalysisProtocolError( - `adb failed for ${operation}: ${error.message}`, - { cause: error }, - ), - ), - ); - settle(ok(stdout as Buffer)); - }, - ); - const stop = (reason: "abort" | "timeout"): void => { - if (stopped !== undefined) return; - stopped = reason; - child.kill("SIGTERM"); - grace = setTimeout(() => child.kill("SIGKILL"), STOP_GRACE_MS); - }; - const onAbort = (): void => stop("abort"); - signal?.addEventListener("abort", onAbort, { once: true }); - deadline = setTimeout(() => stop("timeout"), limits.timeoutMs); +/** Decode textual adb protocols after the shared byte capture and error boundary. */ +const runAdb = async ( + ...arguments_: Parameters +): Promise< + Result<{ stdout: string; stderr: string; stdoutBytes: number }, AnalysisError> +> => { + const captured = await runAdbCapture(...arguments_); + if (!captured.ok) return captured; + return ok({ + stdout: captured.value.stdout.toString("utf8"), + stderr: captured.value.stderr.toString("utf8"), + // Byte count of the captured output before UTF-8 decoding, so malformed + // sequences replaced by U+FFFD still report their true captured size. + stdoutBytes: captured.value.stdout.byteLength, }); +}; const clientIdentityResult = ( selection: AdbBinarySelection, @@ -348,30 +317,56 @@ const refuseExistingTarget = async ( return undefined; }; +/** Publish an ADB-produced archive without replacing an existing caller file. */ +const publishBugreport = async ( + source: string, + directory: string, +): Promise => { + const fileName = basename(source); + const extension = extname(fileName); + const stem = + extension === "" ? fileName : fileName.slice(0, -extension.length); + for (let suffix = 0; ; suffix += 1) { + const destination = join( + directory, + suffix === 0 ? fileName : `${stem} (${String(suffix)})${extension}`, + ); + try { + await copyFile(source, destination, fsConstants.COPYFILE_EXCL); + return destination; + } catch (cause: unknown) { + if (cause instanceof Error && "code" in cause && cause.code === "EEXIST") + continue; + throw cause; + } + } +}; + export interface AdbProviderOptions { readonly environment?: Readonly>; } -interface PendingPackageDirectoryCleanup { +interface PendingOutputDirectoryCleanup { + readonly operation: "pull_adb_package" | "collect_adb_bugreport"; readonly path: string; - readonly identity: PackageDirectoryIdentity | undefined; + readonly identity: OutputDirectoryIdentity | undefined; readonly primary: AnalysisError; readonly remove: () => Promise; } -interface PackageDirectoryIdentity { +interface OutputDirectoryIdentity { readonly dev: number; readonly ino: number; readonly mode: number; } -const removeOwnedPackageDirectory = async ( +const removeOwnedOutputDirectory = async ( path: string, - identity: PackageDirectoryIdentity | undefined, + identity: OutputDirectoryIdentity | undefined, ): Promise => { if (identity === undefined) throw new Error( - `Cannot verify the created package directory identity; refusing to remove ${path}`, + `Cannot verify the created output directory identity; refusing to remove ${path}`, ); let current: Awaited>; try { @@ -389,7 +384,7 @@ const removeOwnedPackageDirectory = async ( current.mode !== identity.mode ) throw new Error( - `The created package directory was replaced or changed; refusing to remove ${path}`, + `The created output directory was replaced or changed; refusing to remove ${path}`, ); await rm(path, { recursive: true, force: true }); }; @@ -406,7 +401,7 @@ const reservePackageDestinations = async ( ): Promise => { const reservations: { readonly path: string; - readonly identity: PackageDirectoryIdentity; + readonly identity: OutputDirectoryIdentity; }[] = []; for (const entry of entries) { const path = join(packageDirectory, entry.file_name); @@ -467,12 +462,12 @@ const reservePackageDestinations = async ( */ export class AdbProvider { private readonly environment: Readonly>; - readonly #pendingPackageDirectoryCleanup = - new Set(); + readonly #pendingOutputDirectoryCleanup = + new Set(); readonly #activeOperations = new Set>(); #closing = false; #closePromise: Promise | undefined; - #packageCleanupPromise: Promise | undefined; + #outputCleanupPromise: Promise | undefined; constructor(options: AdbProviderOptions = {}) { this.environment = options.environment ?? process.env; @@ -505,13 +500,13 @@ export class AdbProvider { } } - /** Retry removal of package directories retained after failed rollback. */ + /** Retry removal of owned output directories retained after failed cleanup. */ close(): Promise { this.#closing = true; if (this.#closePromise !== undefined) return this.#closePromise; const closing = (async () => { await Promise.all(this.#activeOperations); - await this.#retryPackageDirectoryCleanup(); + await this.#retryOutputDirectoryCleanup(); })().finally(() => { if (this.#closePromise === closing) this.#closePromise = undefined; }); @@ -519,23 +514,23 @@ export class AdbProvider { return this.#closePromise; } - #retryPackageDirectoryCleanup(): Promise { - if (this.#packageCleanupPromise !== undefined) - return this.#packageCleanupPromise; - const cleanup = this.#performPackageDirectoryCleanup().finally(() => { - if (this.#packageCleanupPromise === cleanup) - this.#packageCleanupPromise = undefined; + #retryOutputDirectoryCleanup(): Promise { + if (this.#outputCleanupPromise !== undefined) + return this.#outputCleanupPromise; + const cleanup = this.#performOutputDirectoryCleanup().finally(() => { + if (this.#outputCleanupPromise === cleanup) + this.#outputCleanupPromise = undefined; }); - this.#packageCleanupPromise = cleanup; + this.#outputCleanupPromise = cleanup; return cleanup; } - async #performPackageDirectoryCleanup(): Promise { + async #performOutputDirectoryCleanup(): Promise { const failures: AnalysisError[] = []; - for (const owner of this.#pendingPackageDirectoryCleanup) { + for (const owner of this.#pendingOutputDirectoryCleanup) { try { await owner.remove(); - this.#pendingPackageDirectoryCleanup.delete(owner); + this.#pendingOutputDirectoryCleanup.delete(owner); } catch (cause: unknown) { const cleanup = new ProviderCleanupError( ADB_PROVIDER_IDENTITY.id, @@ -543,13 +538,13 @@ export class AdbProvider { { reason: cause instanceof Error ? cause.message : String(cause), }, - { operation: "pull_adb_package", cause }, + { operation: owner.operation, cause }, ); failures.push( analysisErrorWithCleanupFailure( owner.primary, cleanup, - "pull_adb_package", + owner.operation, ), ); } @@ -558,20 +553,22 @@ export class AdbProvider { if (failures.length > 1) throw new ProviderCleanupError( ADB_PROVIDER_IDENTITY.id, - [...this.#pendingPackageDirectoryCleanup].map(({ path }) => path), + [...this.#pendingOutputDirectoryCleanup].map(({ path }) => path), { - reason: - "Failed package output directories remain after cleanup retry", + reason: "Failed ADB output directories remain after cleanup retry", + operations: [...this.#pendingOutputDirectoryCleanup].map( + ({ operation }) => operation, + ), failures: failures.map(({ message, cleanupResources }) => ({ message, resources: [...cleanupResources], })), }, { - operation: "pull_adb_package", + operation: "close_binary", cause: new AggregateError( failures, - "Multiple ADB package rollback cleanups failed", + "Multiple ADB output directory cleanups failed", ), }, ); @@ -589,16 +586,16 @@ export class AdbProvider { }); this.#activeOperations.add(active); try { - if (this.#pendingPackageDirectoryCleanup.size > 0) { + if (this.#pendingOutputDirectoryCleanup.size > 0) { try { - await this.#retryPackageDirectoryCleanup(); + await this.#retryOutputDirectoryCleanup(); } catch (cause: unknown) { return err( cause instanceof AnalysisError ? cause : new ProviderCleanupError( ADB_PROVIDER_IDENTITY.id, - [...this.#pendingPackageDirectoryCleanup].map( + [...this.#pendingOutputDirectoryCleanup].map( ({ path }) => path, ), { @@ -825,7 +822,7 @@ export class AdbProvider { buffer: request.input.buffer, pid: request.input.pid ?? null, lines: bounded, - total_bytes: ran.value.stdout.length, + total_bytes: ran.value.stdoutBytes, coverage: bounded.length !== lines.length || bounded.length === request.input.count @@ -947,12 +944,29 @@ export class AdbProvider { ); } case "list_adb_directory": { - const ran = await shell(["ls", "-la", request.input.device_path], { - timeoutMs: LISTING_TIMEOUT_MS, - maxOutputBytes: LISTING_MAX_OUTPUT_BYTES, - }); + const ran = await runAdbCapture( + operation, + request.input.serial, + selection.binary, + adbArguments(request.input.serial, [ + "shell", + "sh", + "-c", + 'cd "$1" || exit\nexec find . -mindepth 1 -maxdepth 1 -exec sh -c "$2" rea-list-directory {} +', + "rea-list-directory", + request.input.device_path, + ADB_DIRECTORY_BATCH_SCRIPT, + ]), + { + timeoutMs: LISTING_TIMEOUT_MS, + maxOutputBytes: LISTING_MAX_OUTPUT_BYTES, + }, + signal, + ); if (!ran.ok) return ran; - const { entries, unparsedLines } = parseLsOutput(ran.value.stdout); + const { entries, unparsedLines } = parseAdbDirectoryListing( + ran.value.stdout, + ); return ok( createAnalysisExecution( { @@ -965,7 +979,7 @@ export class AdbProvider { provider, { limitations: [ - "Entry kinds derive from the permission string's type character", + "Entry kinds derive from stat permission mode; directory contents and link targets may change during capture", ...unparsedOverflowLimitation(unparsedLines), ], }, @@ -1271,7 +1285,7 @@ export class AdbProvider { if (!directory.ok) return directory; const packageDirectory = join(directory.value, packageName); let packageDirectoryCreated = false; - let packageDirectoryIdentity: PackageDirectoryIdentity | undefined; + let packageDirectoryIdentity: OutputDirectoryIdentity | undefined; try { if ( await lstat(packageDirectory).then( @@ -1301,17 +1315,18 @@ export class AdbProvider { { cause }, ); if (!packageDirectoryCreated) return err(primary); - const owner: PendingPackageDirectoryCleanup = { + const owner: PendingOutputDirectoryCleanup = { + operation, path: packageDirectory, identity: packageDirectoryIdentity, primary, remove: () => - removeOwnedPackageDirectory( + removeOwnedOutputDirectory( packageDirectory, packageDirectoryIdentity, ), }; - this.#pendingPackageDirectoryCleanup.add(owner); + this.#pendingOutputDirectoryCleanup.add(owner); const cleanup = new ProviderCleanupError( ADB_PROVIDER_IDENTITY.id, [packageDirectory], @@ -1325,12 +1340,13 @@ export class AdbProvider { const failOwnedPackage = async ( primary: AnalysisError, ): Promise> => { - const owner: PendingPackageDirectoryCleanup = { + const owner: PendingOutputDirectoryCleanup = { + operation, path: packageDirectory, identity: packageDirectoryIdentity, primary, remove: () => - removeOwnedPackageDirectory( + removeOwnedOutputDirectory( packageDirectory, packageDirectoryIdentity, ), @@ -1338,7 +1354,7 @@ export class AdbProvider { try { await owner.remove(); } catch (cause: unknown) { - this.#pendingPackageDirectoryCleanup.add(owner); + this.#pendingOutputDirectoryCleanup.add(owner); const cleanup = new ProviderCleanupError( ADB_PROVIDER_IDENTITY.id, [packageDirectory], @@ -1971,28 +1987,55 @@ export class AdbProvider { signal, ); if (!started.ok) return started; - const verdict = parseAmStartOutput(started.value.stdout); - if (verdict.status === "refused") + const verdict = parseAmStartOutput( + started.value.stdout, + started.value.stderr, + ); + const result = { + ...resultFields, + started_activity: verdict.startedActivity, + reported_activity: verdict.activity, + reported_status: verdict.reportedStatus, + }; + if (verdict.status === "refused") { + const partialObservation: AdbActivityStartPartialObservation = + operation === "start_adb_app" + ? { + provider_id: "adb", + operation, + result: adbResultSchemas.start_adb_app.parse(result), + } + : { + provider_id: "adb", + operation, + result: adbResultSchemas.start_adb_activity.parse(result), + }; return err( new AnalysisUnsupportedTargetError( operation, serial, verdict.reason ?? "am start refused the intent", + { + capturedOutput: { + stdout: started.value.stdout, + stderr: started.value.stderr, + truncated: false, + }, + partialObservation, + }, ), ); + } return ok( - createAnalysisExecution( - { - ...resultFields, - started_activity: verdict.startedActivity, + createAnalysisExecution(result, provider, { + rawResult: { + stdout: started.value.stdout, + stderr: started.value.stderr, }, - provider, - { - limitations: [ - "Starting an activity changes device state; am start -W waits for launch completion but no lifecycle observation is captured", - ], - }, - ) as AnalysisExecution, + limitations: [ + "Starting an activity changes device state; am start -W waits for launch completion but no lifecycle observation is captured", + ], + }) as AnalysisExecution, ); } @@ -2046,15 +2089,16 @@ export class AdbProvider { const localPath = join(directory.value, "screen.png"); const existing = await refuseExistingTarget(operation, localPath); if (existing !== undefined) return err(existing); - const captured = await runAdbBinary( + const captured = await runAdbCapture( operation, + input.serial, selection.binary, adbArguments(input.serial, ["exec-out", "screencap", "-p"]), { timeoutMs: SCREEN_TIMEOUT_MS, maxOutputBytes: SCREEN_MAX_OUTPUT_BYTES }, signal, ); if (!captured.ok) return captured; - const dimensions = parsePngDimensions(captured.value); + const dimensions = parsePngDimensions(captured.value.stdout); if (dimensions.width === null) return err( new AnalysisProtocolError( @@ -2062,7 +2106,7 @@ export class AdbProvider { ), ); try { - await writeFile(localPath, captured.value, { flag: "wx" }); + await writeFile(localPath, captured.value.stdout, { flag: "wx" }); } catch (cause) { return err( new AnalysisOutputError( @@ -2072,14 +2116,16 @@ export class AdbProvider { ), ); } - const sha256 = createHash("sha256").update(captured.value).digest("hex"); + const sha256 = createHash("sha256") + .update(captured.value.stdout) + .digest("hex"); return ok( createAnalysisExecution( { client, serial: input.serial, local_path: localPath, - bytes: captured.value.byteLength, + bytes: captured.value.stdout.byteLength, sha256, width: dimensions.width, height: dimensions.height, @@ -2107,48 +2153,71 @@ export class AdbProvider { input.output_directory, ); if (!directory.ok) return directory; - const collected = await runAdb( - operation, - input.serial, - selection.binary, - adbArguments(input.serial, ["bugreport", directory.value]), - { - timeoutMs: BUGREPORT_TIMEOUT_MS, - maxOutputBytes: BUGREPORT_MAX_OUTPUT_BYTES, - }, - signal, - ); - if (!collected.ok) return collected; - const reportedPath = parseBugreportCopiedPath(collected.value.stdout); - if (reportedPath === null) - return err( - new AnalysisProtocolError( - "adb bugreport did not report an archive path; the build may use an unsupported format", - ), - ); + let stagingDirectory: string; + let stagingIdentity: OutputDirectoryIdentity | undefined; + let retainedObservation: AdbAcquiredFilePartialObservation | undefined; + let publishedPath: string | undefined; try { - const digest = await hashAdbFile(reportedPath, operation, signal); - return ok( - createAnalysisExecution( - { - client, - serial: input.serial, - local_path: reportedPath, - bytes: digest.bytes, - sha256: digest.sha256, - adb_reported_path: reportedPath, - }, - provider, - { - limitations: [ - "The archive is device-generated: dumpstate, dumpsys, and logcat content is the device's own report", - ], - }, - ), + stagingDirectory = await mkdtemp( + join(directory.value, ".rea-bugreport-"), ); } catch (cause) { - if (cause instanceof AnalysisCancelledError) { - cause.retainPartialObservation({ + return err( + new AnalysisOutputError( + operation, + "The bugreport staging directory could not be created", + { cause }, + ), + ); + } + const collectedResult = await (async (): Promise< + Result + > => { + let reportedPath: string | null = null; + try { + const created = await lstat(stagingDirectory); + if (!created.isDirectory() || created.isSymbolicLink()) + throw new Error( + `The created bugreport staging output is not a regular directory: ${stagingDirectory}`, + ); + stagingIdentity = { + dev: created.dev, + ino: created.ino, + mode: created.mode, + }; + const collected = await runAdb( + operation, + input.serial, + selection.binary, + adbArguments(input.serial, ["bugreport", stagingDirectory]), + { + timeoutMs: BUGREPORT_TIMEOUT_MS, + maxOutputBytes: BUGREPORT_MAX_OUTPUT_BYTES, + }, + signal, + ); + if (!collected.ok) return collected; + reportedPath = parseBugreportCopiedPath(collected.value.stdout); + if (reportedPath === null) + return err( + new AnalysisProtocolError( + "adb bugreport did not report an archive path; the build may use an unsupported format", + ), + ); + if (dirname(resolve(reportedPath)) !== stagingDirectory) + return err( + new AnalysisProtocolError( + `adb bugreport reported an archive outside its staging directory: ${reportedPath}`, + ), + ); + const archive = await lstat(reportedPath); + if (!archive.isFile() || archive.isSymbolicLink()) + return err( + new AnalysisProtocolError( + `adb bugreport did not report a regular archive file: ${reportedPath}`, + ), + ); + retainedObservation = { provider_id: "adb", operation, result: { @@ -2158,16 +2227,94 @@ export class AdbProvider { adb_reported_path: reportedPath, digest_status: "unknown", }, - }); - return err(cause); - } - return err( - new AnalysisOutputError( + }; + try { + publishedPath = await publishBugreport(reportedPath, directory.value); + } catch (cause) { + return err( + new AnalysisOutputError( + operation, + `The reported bugreport archive could not be published: ${reportedPath}`, + { cause, partialObservation: retainedObservation }, + ), + ); + } + retainedObservation = { + ...retainedObservation, + result: { ...retainedObservation.result, local_path: publishedPath }, + }; + const digest = await hashAdbFile(publishedPath, operation, signal); + const report = { + client, + serial: input.serial, + local_path: publishedPath, + bytes: digest.bytes, + sha256: digest.sha256, + adb_reported_path: reportedPath, + }; + retainedObservation = { + provider_id: "adb", + operation, + result: report, + }; + return ok( + createAnalysisExecution(report, provider, { + limitations: [ + "The archive is device-generated: dumpstate, dumpsys, and logcat content is the device's own report", + ], + }), + ); + } catch (cause) { + if (cause instanceof AnalysisCancelledError) { + if (retainedObservation !== undefined) + cause.retainPartialObservation(retainedObservation); + return err(cause); + } + return err( + new AnalysisOutputError( + operation, + `The reported bugreport archive could not be read back: ${reportedPath ?? stagingDirectory}`, + { cause, partialObservation: retainedObservation }, + ), + ); + } + })(); + // A completed acquisition becomes caller evidence even if publication fails. + // Its staging directory must not enter automatic cleanup or cleanup retries. + if (retainedObservation !== undefined && publishedPath === undefined) + return collectedResult; + try { + await removeOwnedOutputDirectory(stagingDirectory, stagingIdentity); + } catch (cause) { + const primary = collectedResult.ok + ? new AnalysisOutputError( + operation, + "The archive was published, but its staging directory could not be removed", + ) + : collectedResult.error; + if (retainedObservation !== undefined) + primary.retainPartialObservation(retainedObservation); + this.#pendingOutputDirectoryCleanup.add({ + operation, + path: stagingDirectory, + identity: stagingIdentity, + primary, + remove: () => + removeOwnedOutputDirectory(stagingDirectory, stagingIdentity), + }); + return err( + analysisErrorWithCleanupFailure( + primary, + new ProviderCleanupError( + ADB_PROVIDER_IDENTITY.id, + [stagingDirectory], + { reason: cause instanceof Error ? cause.message : String(cause) }, + { operation, cause }, + ), operation, - `The reported bugreport archive could not be read back: ${reportedPath}`, - { cause }, ), ); } + return collectedResult; } } diff --git a/src/adb/AdbShellOutput.test.ts b/src/adb/AdbShellOutput.test.ts new file mode 100644 index 000000000..1b9ad1f0b --- /dev/null +++ b/src/adb/AdbShellOutput.test.ts @@ -0,0 +1,75 @@ +import { describe, expect, it } from "vitest"; + +import { parseAmStartOutput } from "./AdbShellOutput.js"; + +const starting = + "Starting: Intent { act=android.intent.action.MAIN cmp=com.example/.Main }"; + +describe("parseAmStartOutput", () => { + it("recognizes a CRLF wait-timeout report", () => { + expect( + parseAmStartOutput( + `${starting}\r\nStatus: timeout\r\nActivity: com.example/.Main\r\nComplete\r\n`, + ), + ).toMatchObject({ + status: "refused", + activity: "com.example/.Main", + reportedStatus: "timeout", + reason: "am start reported status: timeout", + }); + }); + + it("treats every non-ok status as refusal, including a later status after ok", () => { + expect( + parseAmStartOutput(`${starting}\nStatus: ok\nStatus: timeout\n`), + ).toMatchObject({ + status: "refused", + reportedStatus: "timeout", + reason: "am start reported status: timeout", + }); + expect( + parseAmStartOutput(`${starting}\nStatus: future-value\n`), + ).toMatchObject({ + status: "refused", + reportedStatus: "future-value", + }); + }); + + it("gives hard errors in either stream priority over status and attempt", () => { + expect( + parseAmStartOutput( + `${starting}\nStatus: timeout\nActivity: com.example/.Main\n`, + "Exception: Activity class does not exist\n", + ), + ).toEqual({ + status: "refused", + startedActivity: "act=android.intent.action.MAIN cmp=com.example/.Main", + activity: "com.example/.Main", + reportedStatus: "timeout", + reason: "Activity class does not exist", + }); + expect( + parseAmStartOutput( + `${starting}\nStatus: ok\nError: Activity class does not exist\n`, + ), + ).toMatchObject({ + status: "refused", + reason: "Activity class does not exist", + }); + }); + + it("keeps Starting-only output compatible and refuses no-attempt output", () => { + expect(parseAmStartOutput(starting)).toMatchObject({ + status: "started", + reportedStatus: null, + activity: null, + }); + expect( + parseAmStartOutput("Status: ok\nWarning: Activity not started\n"), + ).toMatchObject({ + status: "refused", + startedActivity: null, + reportedStatus: "ok", + }); + }); +}); diff --git a/src/adb/AdbShellOutput.ts b/src/adb/AdbShellOutput.ts index a67cf8e89..726e6164d 100644 --- a/src/adb/AdbShellOutput.ts +++ b/src/adb/AdbShellOutput.ts @@ -53,65 +53,6 @@ export const parseProcessListOutput = ( return { columns, processes, unparsedLines }; }; -export interface AdbDirectoryEntry { - readonly name: string; - readonly kind: "directory" | "file" | "symlink" | "other"; - readonly permissions: string | null; - readonly owner: string | null; - readonly group: string | null; - readonly bytes: number | null; - readonly date: string | null; - readonly link_target: string | null; -} - -const LS_LINE = - /^([bcdlps-][rwxstST-]{9})\s+(?:(\d+)\s+)?(\S+)\s+(\S+)\s+(?:(\d+)\s+)?([\d-]{10})\s+([\d:]{4,8})\s+(.+)$/u; - -/** Parse `ls -la` output, including `total` headers and symlink targets. */ -export const parseLsOutput = ( - stdout: string, -): { - entries: readonly AdbDirectoryEntry[]; - unparsedLines: readonly string[]; -} => { - const entries: AdbDirectoryEntry[] = []; - const unparsedLines: string[] = []; - for (const rawLine of stdout.split(/\r?\n/u)) { - const line = rawLine.trimEnd(); - if (line === "" || line.startsWith("total ")) continue; - const match = LS_LINE.exec(line); - if (match === null) { - if (line.trim() !== "") unparsedLines.push(line); - continue; - } - const permissions = match[1]!; - let name = match[8]!.trim(); - let linkTarget: string | null = null; - const linkArrow = name.indexOf(" -> "); - if (linkArrow !== -1 && permissions.startsWith("l")) { - linkTarget = name.slice(linkArrow + 4); - name = name.slice(0, linkArrow); - } - entries.push({ - name, - kind: permissions.startsWith("d") - ? "directory" - : permissions.startsWith("l") - ? "symlink" - : permissions.startsWith("-") - ? "file" - : "other", - permissions, - owner: match[3] ?? null, - group: match[4] ?? null, - bytes: match[5] === undefined ? null : Number(match[5]), - date: `${match[6] ?? ""} ${match[7] ?? ""}`.trim() || null, - link_target: linkTarget, - }); - } - return { entries, unparsedLines }; -}; - export interface AdbFeatureEntry { readonly name: string; readonly version: number | null; @@ -295,7 +236,11 @@ export const parseDumpsysPackageOutput = ( inPermissions = true; continue; } - if (inPermissions && /^\s{2,}[A-Za-z0-9._]+$/.test(line)) { + // Android 10 and 11 mark restricted entries as "NAME: restricted=true". + if ( + inPermissions && + /^\s{2,}[A-Za-z0-9._]+(?:: restricted=true)?$/u.test(line) + ) { permissions += 1; continue; } @@ -379,32 +324,80 @@ export const parseResolveActivityOutput = (stdout: string): string | null => { return lines.length === 0 ? null : lines[lines.length - 1]!; }; +/** Parsed facts and verdict from the full `am start -W` report. */ +export interface AmStartOutput { + readonly status: "started" | "refused"; + readonly startedActivity: string | null; + readonly activity: string | null; + readonly reportedStatus: string | null; + readonly reason: string | null; +} + /** - * Parse `am start` output. Success prints `Starting: Intent { ... }`; - * refusals print lines starting with `Error:` or `Warning:` and activity - * classes that do not exist name the component. + * Parse the complete `am start -W` report. `Starting:` records an attempt; + * hard errors and any non-ok Activity Manager status determine the verdict. */ export const parseAmStartOutput = ( stdout: string, -): { - readonly status: "started" | "refused"; - readonly startedActivity: string | null; - readonly reason: string | null; -} => { - const text = stdout.trim(); - const starting = /^Starting:\s+Intent\s*\{(.*)\}\s*$/mu.exec(text); - if (starting !== null) + stderr = "", +): AmStartOutput => { + const normalizedStdout = stdout.replaceAll("\r\n", "\n"); + const starting = /^Starting:[ \t]+Intent[ \t]*\{(.*)\}[ \t]*$/mu.exec( + normalizedStdout, + ); + const startedActivity = starting?.[1]?.trim() ?? null; + const activityMatch = /^Activity:[ \t]*(.*)$/mu.exec(normalizedStdout); + const activity = activityMatch?.[1]?.trim() || null; + const statuses = [...normalizedStdout.matchAll(/^Status:[ \t]*(.*)$/gmu)].map( + (match) => match[1]!.trim(), + ); + const nonOkStatus = statuses.find((status) => status.toLowerCase() !== "ok"); + const reportedStatus = nonOkStatus ?? statuses[0] ?? null; + const error = [normalizedStdout, stderr.replaceAll("\r\n", "\n")] + .flatMap((stream) => stream.split("\n")) + .map((line) => line.trim()) + .map((line) => ({ + line, + match: /^(?:Error|Exception)(?::|\b)(.*)$/iu.exec(line), + })) + .find(({ match }) => match !== null); + const errorReason = error?.match?.[1]?.trim() || error?.line || null; + const statusReason = + nonOkStatus === "" + ? "am start reported an empty status" + : nonOkStatus === undefined + ? null + : `am start reported status: ${nonOkStatus}`; + const reason = + errorReason ?? + statusReason ?? + (/^Warning:/mu.test(normalizedStdout.trim()) + ? normalizedStdout.trim().slice(0, 512) + : null); + if (errorReason !== null || nonOkStatus !== undefined) + return { + status: "refused", + startedActivity, + activity, + reportedStatus, + reason: reason ?? "am start did not report a successful launch", + }; + if (startedActivity !== null) return { status: "started", - startedActivity: starting[1]!.trim(), + startedActivity, + activity, + reportedStatus, reason: null, }; - const error = /^(?:Error|Warning|Exception)(?::|\b)(.*)$/mu.exec(text); + const text = `${normalizedStdout}\n${stderr.replaceAll("\r\n", "\n")}`.trim(); return { status: "refused", - startedActivity: null, + startedActivity, + activity, + reportedStatus, reason: - error?.[1]?.trim() ?? + reason ?? (text === "" ? "am start returned no activity" : text.slice(0, 512)), }; }; diff --git a/src/android/JadxMcpTransport.ts b/src/android/JadxMcpTransport.ts index c648696fc..a40d517f5 100644 --- a/src/android/JadxMcpTransport.ts +++ b/src/android/JadxMcpTransport.ts @@ -199,9 +199,11 @@ export class JadxMcpTransport implements Transport { throw new Error(`JADX MCP frame exceeds ${MAX_FRAME_BYTES} bytes`); this.#appendFrame(fragment, frameBytes); if (newline === -1) return; - const line = this.#frameBuffer - .subarray(0, this.#frameLength) - .toString("utf8"); + const line = new TextDecoder("utf-8", { + fatal: true, + // Preserve a leading BOM so the JSON-RPC parser can reject it. + ignoreBOM: true, + }).decode(this.#frameBuffer.subarray(0, this.#frameLength)); this.#frameBuffer = Buffer.alloc(0); this.#frameLength = 0; this.onmessage?.(deserializeMessage(line)); diff --git a/src/apktool/ApktoolDecodeOutput.test.ts b/src/apktool/ApktoolDecodeOutput.test.ts index fb258b221..6ee69ec18 100644 --- a/src/apktool/ApktoolDecodeOutput.test.ts +++ b/src/apktool/ApktoolDecodeOutput.test.ts @@ -126,6 +126,12 @@ describe("parseManifestPackage", () => { it("reports null when no package attribute exists", () => { expect(parseManifestPackage("\n\n")).toBeNull(); }); + + it("rejects a well-formed document with the wrong root element", () => { + expect(() => parseManifestPackage("")).toThrowError( + new TypeError("AndroidManifest.xml root must be "), + ); + }); }); describe("parseDecodedStrings", () => { diff --git a/src/apktool/ApktoolDecodeOutput.ts b/src/apktool/ApktoolDecodeOutput.ts index 05bb54acb..05c5f8af1 100644 --- a/src/apktool/ApktoolDecodeOutput.ts +++ b/src/apktool/ApktoolDecodeOutput.ts @@ -59,7 +59,8 @@ export const parseApktoolYml = (yml: string): ApktoolMetadata => { export const parseManifestPackage = (manifest: string): string | null => { const document = parseXml(manifest, "AndroidManifest.xml"); const root = document.documentElement; - if (root === null || root.nodeName !== "manifest") return null; + if (root === null || root.nodeName !== "manifest") + throw new TypeError("AndroidManifest.xml root must be "); return root.getAttribute("package") || null; }; diff --git a/src/apktool/ApktoolProvider.test.ts b/src/apktool/ApktoolProvider.test.ts index 3cd86b72a..b6ee249e5 100644 --- a/src/apktool/ApktoolProvider.test.ts +++ b/src/apktool/ApktoolProvider.test.ts @@ -1,7 +1,14 @@ import { createHash } from "node:crypto"; -import { chmod, mkdtemp, readFile, rm, writeFile } from "node:fs/promises"; +import { + chmod, + mkdtemp, + readFile, + rm, + truncate, + writeFile, +} from "node:fs/promises"; import { join } from "node:path"; -import { expect, onTestFinished, test } from "vitest"; +import { describe, expect, onTestFinished, test } from "vitest"; import { ApktoolProvider } from "./ApktoolProvider.js"; import { projectAnalysisError } from "../domain/analysisErrorProjection.js"; @@ -69,7 +76,7 @@ const evidenceResult = async ( request: ApktoolRequest, ): Promise> => { const result = await provider.execute(request); - if (!result.ok) throw new Error(result.error.message); + if (!result.ok) throw result.error; return result.value.result as Record; }; @@ -89,21 +96,36 @@ const decodeStub = ( readonly withStrings?: boolean; readonly withGerman?: boolean; readonly failDecode?: boolean; + readonly ymlFile?: string; + readonly manifestFile?: string; + readonly stringsFile?: string; readonly stringsXml?: string; } = {}, ): ((root: string) => string) => { const withStrings = options.withStrings ?? true; const withGerman = options.withGerman ?? true; const stringsXml = options.stringsXml ?? REAL_STRINGS; + const ymlWrite = + options.ymlFile === undefined + ? `printf '%s\\n' '${REAL_YML.replace(/'/gu, "'\\''")}' > "$5/apktool.yml"` + : `cp '${options.ymlFile}' "$5/apktool.yml"`; + const manifestWrite = + options.manifestFile === undefined + ? `printf '%s\\n' '${REAL_MANIFEST.replace(/'/gu, "'\\''")}' > "$5/AndroidManifest.xml"` + : `cp '${options.manifestFile}' "$5/AndroidManifest.xml"`; + const stringsWrite = + options.stringsFile === undefined + ? `printf '%s\\n' '${stringsXml.replace(/'/gu, "'\\''")}' > "$5/res/values/strings.xml"` + : `cp '${options.stringsFile}' "$5/res/values/strings.xml"`; return () => `if [ "$1" = "--version" ]; then ${VERSION_BLOCK}; exit 0; fi if [ "$1" = "d" ]; then ${ options.failDecode === true ? `printf 'Exception in thread "main" brut.androlib.AndrolibException: Could not decode the APK\\n' >&2; exit 1;` - : `printf '%s\\n' '${REAL_YML.replace(/'/gu, "'\\''")}' > "$5/apktool.yml" - printf '%s\\n' '${REAL_MANIFEST.replace(/'/gu, "'\\''")}' > "$5/AndroidManifest.xml" + : `${ymlWrite} + ${manifestWrite} mkdir -p "$5/res/values"${withGerman ? ' "$5/res/values-de"' : ""} - ${withStrings ? `printf '%s\\n' '${stringsXml.replace(/'/gu, "'\\''")}' > "$5/res/values/strings.xml"` : ""} + ${withStrings ? stringsWrite : ""} ${withGerman ? `printf '%s\\n' '${DE_STRINGS.replace(/'/gu, "'\\''")}' > "$5/res/values-de/strings.xml"` : ""} printf 'I: Using Apktool on stub\\n' exit 0` @@ -175,6 +197,47 @@ it("decodes resources with target identity, metadata, and strings", async () => expect(result.coverage).toBe("complete"); }); +it.each([ + { + name: "malformed UTF-8", + bytes: Buffer.concat([ + Buffer.from("versionInfo:\n versionName: com."), + Buffer.from([0xff]), + Buffer.from(".app\n"), + ]), + valid: false, + }, + { + name: "a literal replacement character", + bytes: Buffer.from("versionInfo:\n versionName: com.�.app\n", "utf8"), + valid: true, + }, +])("handles $name in producer metadata", async ({ bytes, valid }) => { + const { command, root } = await writeApktoolStub((root) => + decodeStub({ ymlFile: join(root, "malformed-apktool.yml") })(root), + ); + await writeFile(join(root, "malformed-apktool.yml"), bytes); + const apk = await apkFixture(root); + if (valid) { + const result = await evidenceResult(providerOver(command), { + operation: "decode_android_resources", + input: { path: apk.path, include_strings: false }, + }); + expect(result.metadata).toMatchObject({ version_name: "com.�.app" }); + expect(result.coverage).toBe("complete"); + return; + } + const result = await providerOver(command).execute({ + operation: "decode_android_resources", + input: { path: apk.path, include_strings: false }, + }); + if (result.ok) throw new Error("expected invalid producer output"); + const projected = projectAnalysisError(result.error); + expect(projected).toMatchObject({ code: "unreadable_output" }); + expect(result.error.message).toContain("invalid UTF-8"); + expect(result.error.message).toContain("apktool.yml"); +}); + it("preserves empty resource strings and reports markup omissions as partial", async () => { const stringsXml = ' A & B Hello world'; @@ -326,18 +389,16 @@ it("uses an owned APK snapshot and framework cache and resolves regional locales it("marks an oversized strings document partial without claiming it is missing", async () => { const { command, root } = await writeApktoolStub((root) => - decodeStub()(root).replace( - " printf 'I: Using Apktool on stub", - ' dd if=/dev/zero of="$5/res/values/strings.xml" bs=1048576 count=9 2>/dev/null\n printf \'I: Using Apktool on stub', - ), + decodeStub({ stringsFile: join(root, "large-strings.xml") })(root), ); + await writeFile(join(root, "large-strings.xml"), ""); + await truncate(join(root, "large-strings.xml"), 9 * 1024 * 1024); const apk = await apkFixture(root); const result = await providerOver(command).execute({ operation: "decode_android_resources", input: { path: apk.path, include_strings: true }, }); - expect(result.ok).toBe(true); - if (!result.ok) return; + if (!result.ok) throw result.error; expect(result.value.result).toMatchObject({ coverage: "partial", strings: [], @@ -346,6 +407,42 @@ it("marks an oversized strings document partial without claiming it is missing", expect(result.value.limitations.join(" ")).not.toContain("No default"); }); +describe("truncated manifest prefixes", () => { + it.each([ + { + name: "a retained prefix ending after the root element", + manifest: `${" ".repeat(512 * 1024 + 1)}`, + }, + { + name: "a retained prefix ending before the root element closes", + manifest: `${" ".repeat(512 * 1024 + 1)}`, + }, + ])("retains $name without parsing its package", async ({ manifest }) => { + const { command, root } = await writeApktoolStub((root) => + decodeStub({ manifestFile: join(root, "large-AndroidManifest.xml") })( + root, + ), + ); + await writeFile(join(root, "large-AndroidManifest.xml"), manifest); + const apk = await apkFixture(root); + + const result = await providerOver(command).execute({ + operation: "decode_android_resources", + input: { path: apk.path, include_strings: false }, + }); + if (!result.ok) throw result.error; + + expect(result.value.result).toMatchObject({ + coverage: "partial", + manifest: manifest.slice(0, 512 * 1024), + metadata: { package_name: null, version_name: "1.2.3" }, + }); + expect(result.value.limitations.join(" ")).toContain( + "manifest is truncated", + ); + }); +}); + it("retains failed workspace cleanup and retries it on close", async () => { const { command, root } = await writeApktoolStub( decodeStub({ failDecode: true }), diff --git a/src/apktool/ApktoolProvider.ts b/src/apktool/ApktoolProvider.ts index eaf21c3e6..1e1f187c0 100644 --- a/src/apktool/ApktoolProvider.ts +++ b/src/apktool/ApktoolProvider.ts @@ -117,13 +117,20 @@ const readBoundedText = async ( throwIfCancelled(operation, signal); const truncated = length > budget; // A prefix may end within a UTF-8 character; omit those trailing bytes. - const decoder = new TextDecoder("utf-8"); - return { - text: decoder.decode(bytes.subarray(0, Math.min(length, budget)), { - stream: truncated, - }), - truncated, - }; + try { + const decoder = new TextDecoder("utf-8", { fatal: true }); + return { + text: decoder.decode(bytes.subarray(0, Math.min(length, budget)), { + stream: truncated, + }), + truncated, + }; + } catch (cause: unknown) { + throw new AnalysisProtocolError( + `apktool produced invalid UTF-8 in ${path}`, + { cause }, + ); + } } finally { await file.close(); } @@ -649,7 +656,9 @@ export class ApktoolProvider { ); const manifest = manifestRead.text; const packageName = - manifest === null ? null : parseManifestPackage(manifest); + manifest === null || manifestRead.truncated + ? null + : parseManifestPackage(manifest); const stringsDirectory = input.locale === undefined ? "values" diff --git a/src/application/AnalysisProvider.ts b/src/application/AnalysisProvider.ts index 87a717795..f3b51257a 100644 --- a/src/application/AnalysisProvider.ts +++ b/src/application/AnalysisProvider.ts @@ -54,6 +54,15 @@ export interface AnalysisExecution { readonly subject: EvidenceSubjectTarget | null; } +interface CreateAnalysisExecutionOptions { + readonly rawResult?: unknown; + readonly analysisProfile?: AnalysisProfileCommitment; + readonly limitations?: readonly string[]; + readonly relationshipCoverage?: RelationshipCoverage; + readonly locations?: readonly EvidenceLocation[]; + readonly subject?: EvidenceSubjectTarget; +} + /** * Build a validated atomic provider observation at an adapter boundary. * @@ -61,38 +70,43 @@ export interface AnalysisExecution { * `result`. Omitting it records `null` rather than a second complete copy of * the normalized result in every Evidence record and tool response. */ -export const createAnalysisExecution = ( +export function createAnalysisExecution( result: unknown, provider: ProviderIdentity, - options: { - readonly rawResult?: unknown; - readonly analysisProfile?: AnalysisProfileCommitment; - readonly limitations?: readonly string[]; - readonly relationshipCoverage?: RelationshipCoverage; - readonly locations?: readonly EvidenceLocation[]; - readonly subject?: EvidenceSubjectTarget; - } = {}, -): AnalysisExecution => ({ - result: jsonValueSchema.parse(result), - rawResult: - options.rawResult === undefined - ? null - : jsonValueSchema.parse(options.rawResult), - provider, - ...(options.analysisProfile === undefined - ? {} - : { analysisProfile: structuredClone(options.analysisProfile) }), - limitations: [...(options.limitations ?? [])], - ...(options.relationshipCoverage === undefined - ? {} - : { - relationshipCoverage: relationshipCoverageSchema.parse( - options.relationshipCoverage, - ), - }), - locations: [...(options.locations ?? [])], - subject: options.subject ?? null, -}); + options: CreateAnalysisExecutionOptions & { readonly subject: Subject }, +): Omit & { readonly subject: Subject }; +export function createAnalysisExecution( + result: unknown, + provider: ProviderIdentity, + options?: CreateAnalysisExecutionOptions, +): AnalysisExecution; +export function createAnalysisExecution( + result: unknown, + provider: ProviderIdentity, + options: CreateAnalysisExecutionOptions = {}, +): AnalysisExecution { + return { + result: jsonValueSchema.parse(result), + rawResult: + options.rawResult === undefined + ? null + : jsonValueSchema.parse(options.rawResult), + provider, + ...(options.analysisProfile === undefined + ? {} + : { analysisProfile: structuredClone(options.analysisProfile) }), + limitations: [...(options.limitations ?? [])], + ...(options.relationshipCoverage === undefined + ? {} + : { + relationshipCoverage: relationshipCoverageSchema.parse( + options.relationshipCoverage, + ), + }), + locations: [...(options.locations ?? [])], + subject: options.subject ?? null, + }; +} /** Provider-neutral application capability for one analysis operation. */ export interface AnalysisOperationPort { @@ -123,6 +137,12 @@ export interface ProviderRequestActivitySnapshot { /** Provider session bound to exactly one parsed artifact. */ export interface AnalysisClient extends AnalysisOperationPort { + /** Execute only if this operation can run without loading or starting a provider. */ + executeIfReady?( + operation: AnalysisOperation, + parameters: Readonly>, + options?: ExecutionOptions, + ): Promise | undefined>; /** Retained token-verified process snapshots for dynamic providers this client started. */ runtimeLineageSnapshots?(): readonly ProviderRuntimeLineageSnapshot[]; /** Current provider work that may outlive a timed-out or cancelled caller. */ diff --git a/src/application/AppBundleExecutable.ts b/src/application/AppBundleExecutable.ts index 12624ca02..7ab79a3cf 100644 --- a/src/application/AppBundleExecutable.ts +++ b/src/application/AppBundleExecutable.ts @@ -12,6 +12,7 @@ import { parseXmlPropertyList, } from "../domain/propertyListKeys.js"; import { decodeXmlPlistText } from "../domain/propertyListXmlText.js"; +import { hasBinaryPlistSignature } from "../domain/apple/appleArchiveFormat.js"; import { err, ok, type Result } from "../domain/result.js"; /** Decoded representation bound for one binary Info.plist. */ @@ -195,11 +196,10 @@ const resolveLayoutExecutable = async ( let name: string; try { - name = - plist.subarray(0, 6).toString("ascii") === "bplist" - ? await (fileSystem.decodeBinaryPlist?.(plistPath) ?? - parseBinaryPlistExecutable(plist)) - : parseXmlPlistExecutable(decodeXmlPlistText(plist)); + name = hasBinaryPlistSignature(plist) + ? await (fileSystem.decodeBinaryPlist?.(plistPath) ?? + parseBinaryPlistExecutable(plist)) + : parseXmlPlistExecutable(decodeXmlPlistText(plist)); } catch (cause: unknown) { return err( new BinaryTargetError( diff --git a/src/application/BinaryTargetResolver.ts b/src/application/BinaryTargetResolver.ts index cd424a7e0..ac691b55e 100644 --- a/src/application/BinaryTargetResolver.ts +++ b/src/application/BinaryTargetResolver.ts @@ -31,7 +31,8 @@ import { rawBinarySelectionError, } from "../domain/rawBinary.js"; import type { BinaryArchitecture } from "../domain/binaryTargetTypes.js"; -import { mzWindowsHeaderOffset } from "../domain/dosMz.js"; +import { observeMzWindowsHeader } from "../domain/dosMz.js"; +import { hasBinaryPlistSignature } from "../domain/apple/appleArchiveFormat.js"; import { hasZipSignature, isZipPackageFormat, @@ -207,18 +208,26 @@ export const parseBinaryTarget = async ( if (cause instanceof AnalysisCancelledError) return err(cause); if (cause instanceof BinaryTargetError) return err(cause); if (!(cause instanceof Error)) throw cause; - const code = filesystemErrorCode(cause); - if (code === undefined) throw cause; - return err( - new BinaryTargetError( - candidate, - targetFailureReason(code, cause.message), - { cause }, - ), - ); + const failure = classifyBinaryTargetFilesystemFailure(candidate, cause); + if (failure === undefined) throw cause; + return err(failure); } }; +/** Classify a filesystem failure while reading a previously selected target. */ +export const classifyBinaryTargetFilesystemFailure = ( + path: string, + cause: unknown, +): BinaryTargetError | undefined => { + if (!(cause instanceof Error)) return undefined; + const code = filesystemErrorCode(cause); + return code === undefined + ? undefined + : new BinaryTargetError(path, targetFailureReason(code, cause.message), { + cause, + }); +}; + const filesystemErrorCode = (cause: Error): string | undefined => { const code: unknown = Reflect.get(cause, "code"); return typeof code === "string" ? code : undefined; @@ -286,12 +295,15 @@ const detectArtifactFormat = async ( if (lower.endsWith(".app")) return "app-pack"; return zipPackageFormatForPath(lower) ?? "zip"; } + // Binary plists, including keyed archives, often use other extensions. + if (hasBinaryPlistSignature(magic.subarray(0, observed.bytesRead))) + return "plist"; const named = namedArtifactFormat(lower); if (named !== undefined) return named; if ( lower.endsWith(".pkg") && observed.bytesRead >= 4 && - magic.subarray(0, 4).toString("ascii") === "xar!" + magic.subarray(0, 4).equals(Buffer.from("xar!")) ) return "pkg"; if (lower.endsWith(".dmg")) { @@ -302,7 +314,7 @@ const detectArtifactFormat = async ( const trailer = Buffer.alloc(4); const read = await handle.read(trailer, 0, trailer.length, size - 512); throwIfTargetResolutionCancelled(signal); - if (read.bytesRead === 4 && trailer.toString("ascii") === "koly") + if (read.bytesRead === 4 && trailer.equals(Buffer.from("koly"))) return "dmg"; } } @@ -401,11 +413,31 @@ const readExecutableMetadata = async ( const fileSize = (await handle.stat()).size; throwIfTargetResolutionCancelled(signal); if (bytes.length >= 2 && bytes[0] === 0x4d && bytes[1] === 0x5a) { - const offset = mzWindowsHeaderOffset(bytes); - if (offset !== null) { - if (offset < 64) + let windowsHeader = observeMzWindowsHeader(bytes, fileSize); + let signatureBytes: Buffer | undefined; + if (windowsHeader.state === "signature-needed") { + const { offset } = windowsHeader; + const signature = Buffer.alloc(Math.min(4, fileSize - offset)); + const observedSignature = await handle.read( + signature, + 0, + signature.length, + offset, + ); + throwIfTargetResolutionCancelled(signal); + signatureBytes = signature.subarray(0, observedSignature.bytesRead); + windowsHeader = observeMzWindowsHeader(bytes, fileSize, signatureBytes); + } + if (windowsHeader.state === "declared") { + if (windowsHeader.offset < 64) return err("invalid Windows new-header offset in MZ image"); - return readPeMetadata(handle, offset, signal); + return readPeMetadata( + handle, + windowsHeader.offset, + bytes, + fileSize, + signal, + ); } // MZ relocation records may extend past the initial probe; their format // bounds are at most 65535 records inside a 65535-paragraph header. @@ -428,7 +460,12 @@ const readExecutableMetadata = async ( fileSize, ); } - return parseExecutableHeader(bytes, hostArchitecture, fileSize); + return parseExecutableHeader( + bytes, + hostArchitecture, + fileSize, + signatureBytes, + ); } if (bytes.length >= 8) { const magic = bytes.readUInt32BE(0); @@ -479,6 +516,8 @@ const readExecutableMetadata = async ( const readPeMetadata = async ( handle: FileHandle, offset: number, + mzPrefix: Buffer, + fileSize: number, signal?: AbortSignal, ): Promise> => { throwIfTargetResolutionCancelled(signal); @@ -492,9 +531,15 @@ const readPeMetadata = async ( throwIfTargetResolutionCancelled(signal); if (fileHeaderRead.bytesRead !== fileHeader.length) return err("invalid or truncated PE header"); - const signature = fileHeader.toString("ascii", 0, 2); - if (["NE", "LE", "LX"].includes(signature)) - return err(`unsupported ${signature} executable in MZ image`); + const windowsHeader = observeMzWindowsHeader( + mzPrefix, + fileSize, + fileHeader.subarray(0, 4), + ); + if (windowsHeader.state !== "declared") + return err("invalid Windows new-header signature in MZ image"); + if (["NE", "LE", "LX"].includes(windowsHeader.signature)) + return err(`unsupported ${windowsHeader.signature} executable in MZ image`); const optionalHeaderSize = fileHeader.readUInt16LE(20); if (optionalHeaderSize > 4096) return err("invalid PE optional header size"); const record = Buffer.alloc(24 + optionalHeaderSize); diff --git a/src/application/CallPathTracing.ts b/src/application/CallPathTracing.ts index 825c69f44..cc4ce41f4 100644 --- a/src/application/CallPathTracing.ts +++ b/src/application/CallPathTracing.ts @@ -4,10 +4,11 @@ import type { ExecutionOptions, } from "./AnalysisProvider.js"; import { projectAnalysisError } from "../domain/analysisErrorProjection.js"; +import { AnalysisCancelledError } from "../domain/analysisErrorCore.js"; import type { AnalysisError } from "../domain/analysisErrorBase.js"; import { parseRelatedAddresses } from "../domain/hopperValues.js"; import type { JsonValue } from "../domain/jsonValue.js"; -import { ok, type Result } from "../domain/result.js"; +import { err, ok, type Result } from "../domain/result.js"; import type { EnhancedResult } from "./EnhancedToolTypes.js"; import { resolveProcedureAddress } from "./ProcedureAddressResolution.js"; import type { RelationshipCoverage } from "../domain/relationshipCoverage.js"; @@ -91,24 +92,31 @@ export const traceCallPath = async ( ...(goal === undefined ? {} : { goal }), direction: input.direction, }; + if (isAborted(signal)) + return err(new AnalysisCancelledError("trace_call_path")); const state = createTraceState(resolvedInput); while ( state.queueIndex < state.queue.length && state.traversalPath.length === 0 ) { + if (isAborted(signal)) + return err(new AnalysisCancelledError("trace_call_path")); const address = state.queue[state.queueIndex++]; if (address === undefined) break; const current = state.visited.get(address); if (current === undefined) continue; - const found = await expandAddress(callRelationship, { + const expanded = await expandAddress(callRelationship, { input: resolvedInput, state, address, current, ...(signal === undefined ? {} : { signal }), }); - if (found) break; + if (!expanded.ok) return expanded; + if (expanded.value) break; } + if (isAborted(signal)) + return err(new AnalysisCancelledError("trace_call_path")); return ok(projectTrace(resolvedInput, state)); }; @@ -127,19 +135,28 @@ const createTraceState = (input: CallPathTraceInput): TraceState => ({ const expandAddress = async ( call: RelationshipCall, expansion: AddressExpansion, -): Promise => { +): Promise> => { const { input, state, address, current, signal } = expansion; const relation = input.direction === "forward" ? "callees" : "callers"; const tool = input.direction === "forward" ? "procedure_callees" : "procedure_callers"; const result = await call(tool, { procedure: address }, signal, "provider"); + if (!result.ok) { + if ( + result.error._tag === "AnalysisCancelledError" || + signal?.aborted === true + ) + return result; + } + if (isAborted(signal)) + return err(new AnalysisCancelledError("trace_call_path")); if (!result.ok) { state.failures.push({ address, error: projectAnalysisError(result.error), }); state.residual.add(`Call relationships were unavailable for ${address}.`); - return false; + return ok(false); } const related = parseRelatedAddresses(result.value.result, relation); if (!related.ok) { @@ -148,7 +165,7 @@ const expandAddress = async ( error: projectAnalysisError(related.error), }); state.residual.add(`Call relationships were unreadable for ${address}.`); - return false; + return ok(false); } for (const limitation of result.value.limitations) state.limitations.add(limitation); @@ -184,7 +201,7 @@ const expandAddress = async ( if (state.visited.has(relatedAddress)) { if (relatedAddress === input.goal) { state.traversalPath = path; - return true; + return ok(true); } continue; } @@ -194,11 +211,11 @@ const expandAddress = async ( }); if (relatedAddress === input.goal) { state.traversalPath = path; - return true; + return ok(true); } state.queue.push(relatedAddress); } - return false; + return ok(false); }; const recordEdge = ( @@ -228,7 +245,9 @@ const projectTrace = (input: CallPathTraceInput, state: TraceState) => ({ ? "not_requested" : state.traversalPath.length > 0 ? "reached" - : "not_reached", + : state.residual.size > 0 + ? "unknown" + : "not_reached", nodes: [...state.visited.entries()] .map(([address, { depth }]) => ({ address, depth })) .sort( @@ -264,3 +283,6 @@ const compareAddress = (left: string, right: string): number => const sortedUniqueAddresses = (addresses: readonly string[]): string[] => [...new Set(addresses)].sort(compareAddress); + +const isAborted = (signal: AbortSignal | undefined): boolean => + signal?.aborted === true; diff --git a/src/application/CapabilityInventory.ts b/src/application/CapabilityInventory.ts index 7c9d3910c..6fefb8e20 100644 --- a/src/application/CapabilityInventory.ts +++ b/src/application/CapabilityInventory.ts @@ -1,4 +1,5 @@ import { z } from "zod"; +import { sqliteDatabaseCapability } from "./sqlite/SqliteDatabaseCapability.js"; import type { OptionalProviderLoadFailures, OptionalProviderLoadFailure, @@ -22,6 +23,7 @@ import type { JsonValue } from "../domain/jsonValue.js"; import { isMachOFormat } from "../domain/binaryTargetTypes.js"; import type { ProviderAvailability } from "./AnalysisProvider.js"; import { TOOL_CONTRACTS } from "../contracts/toolContracts.js"; +import { FRIDA_TOOL_CONTRACTS } from "../contracts/fridaToolContracts.js"; import { clientRequirementsFor, NO_CLIENT_FEATURES, @@ -41,6 +43,8 @@ type ToolAvailabilityReason = "available" | ToolUnavailabilityReason; type ProviderDescriptor = ProviderCapability; export type AvailabilityPolicy = { + readonly packetCaptureEnabled?: boolean; + readonly signalRecordingEnabled?: boolean; readonly wasmArtifactEnabled?: boolean; readonly evmInterfaceEnabled?: boolean; readonly processCaptureEnabled: boolean; @@ -131,6 +135,9 @@ const ACTIVE_TARGET_KINDS: ReadonlySet = new Set([ "native-provider", "artifact-provider", ]); +const FRIDA_OPERATION_NAMES: ReadonlySet = new Set( + FRIDA_TOOL_CONTRACTS.map(({ name }) => name), +); /** Native contracts defined only for an active Mach-O executable. */ const MACHO_TARGET_OPERATIONS: ReadonlySet = new Set([ @@ -316,6 +323,7 @@ const optionalProviderFailureFor = ({ if (kind === "electron-provider") return failures?.electronObservation; if (kind === "runtime-provider") return failures?.javascriptRuntimeObservation; + if (FRIDA_OPERATION_NAMES.has(name)) return failures?.fridaInstrumentation; return undefined; }; @@ -336,6 +344,15 @@ const workflowAvailabilityFor = ({ }: AvailabilityContext): Availability | null => { if (name === "inspect_go_binary") return { reason: "available", remediation: null }; + if (name === "inspect_sqlite_database") { + const capability = sqliteDatabaseCapability(process.versions.node); + return capability.available + ? { reason: "available", remediation: null } + : { + reason: "provider_unavailable", + remediation: capability.reason, + }; + } if (name === "trace_web_module_imports") return { reason: "available", @@ -380,6 +397,22 @@ const workflowAvailabilityFor = ({ remediation: "On Linux x64, set absolute REA_PWNTOOLS_PYTHON to caller-supplied Python with pwntools 4.15.0. No active binary target is required.", }; + if (name === "inspect_packet_capture" || name === "inspect_packet_fields") + return policy.packetCaptureEnabled === true + ? { reason: "available", remediation: null } + : { + reason: "provider_missing", + remediation: + "On Linux, supply TShark 4.x via absolute REA_TSHARK_COMMAND and util-linux prlimit (REA_TSHARK_PRLIMIT_COMMAND, default /usr/bin/prlimit). No active binary target or hardware is required; the tool is checked at execution.", + }; + if (name === "decode_signal_recording" || name === "inspect_signal_decoders") + return policy.signalRecordingEnabled === true + ? { reason: "available", remediation: null } + : { + reason: "provider_missing", + remediation: + "On Linux, supply sigrok-cli 0.7.2 via absolute REA_SIGROK_COMMAND and util-linux prlimit (REA_SIGROK_PRLIMIT_COMMAND, default /usr/bin/prlimit). No active binary target or hardware is required; the tool is checked at execution.", + }; if (name === "inspect_wasm_artifact") return policy.wasmArtifactEnabled === true ? { reason: "available", remediation: null } @@ -448,6 +481,8 @@ const workflowAvailabilityFor = ({ remediation: "Run process capture on a supported Linux or macOS host.", }; if (kind === "application") return { reason: "available", remediation: null }; + if (kind === "pcap-provider" || kind === "flutter-provider") + return { reason: "available", remediation: null }; const electron = electronProviderAvailability(name, kind, policy); if (electron !== null) return electron; if (kind === "runtime-provider") @@ -533,6 +568,7 @@ const targetAvailability = ({ targetFormat, targetOpen, }: AvailabilityContext): Availability | null => { + if (FRIDA_OPERATION_NAMES.has(name)) return null; if (!targetOpen && ACTIVE_TARGET_KINDS.has(kind)) return { reason: "target_required", diff --git a/src/application/ClientConfigurationDocument.shape.test.ts b/src/application/ClientConfigurationDocument.shape.test.ts new file mode 100644 index 000000000..67c557a44 --- /dev/null +++ b/src/application/ClientConfigurationDocument.shape.test.ts @@ -0,0 +1,34 @@ +import { describe, expect, it } from "vitest"; + +import { parseClientConfiguration } from "./ClientConfigurationDocument.js"; + +describe("parseClientConfiguration shape diagnostics", () => { + it.each([ + ["null", "null"], + ["array", "[]"], + ["string", '"x"'], + ] as const)("names a non-object JSON root (%s)", (_label, text) => { + expect(() => parseClientConfiguration(text, "json")).toThrow( + new TypeError("The configuration root must be an object"), + ); + }); + + it.each([ + ["null", "null"], + ["array", "[]"], + ["string", '"x"'], + ] as const)( + 'names a non-object "mcpServers" value (%s)', + (_label, servers) => { + expect(() => + parseClientConfiguration(`{"mcpServers":${servers},"keep":1}`, "json"), + ).toThrow(new TypeError('"mcpServers" must be an object')); + }, + ); + + it("still rejects unparsable JSON with SyntaxError", () => { + expect(() => parseClientConfiguration("not-json", "json")).toThrow( + SyntaxError, + ); + }); +}); diff --git a/src/application/ClientConfigurationDocument.ts b/src/application/ClientConfigurationDocument.ts index 65b4ba8de..b32df3fd0 100644 --- a/src/application/ClientConfigurationDocument.ts +++ b/src/application/ClientConfigurationDocument.ts @@ -86,6 +86,7 @@ export const clientConfigurationServersKey = ( case "hermes": return "mcp_servers"; case "opencode": + case "zcode": return "mcp"; case "vscode": return "servers"; @@ -106,16 +107,21 @@ const parseDocument = ( format: ClientConfigurationFormat, ): Record => { if (format === "toml" || format === "grok") - return objectSchema.parse(parseToml(text)); + return requireObject(parseToml(text), "The configuration root"); // Pi loads `mcp.json` with a strict `JSON.parse` and no BOM tolerance, so // comments, trailing commas, a BOM, or an empty existing file must be // rejected instead of registering into a document Pi cannot load. - if (format === "pi") return objectSchema.parse(JSON.parse(text)); + if (format === "pi") + return requireObject(JSON.parse(text), "The configuration root"); // An empty file, which some clients create before any server is added, // holds no settings to preserve. if (isEmptyClientConfigurationText(text)) return {}; // Hermes stores MCP servers in `mcp_servers` inside a YAML document. - if (format === "hermes") return objectSchema.parse(parseYaml(text)); + if (format === "hermes") + return requireObject(parseYaml(text), "The configuration root"); + // ZCode loads nonempty native files with strict JSON.parse. + if (format === "zcode") + return requireObject(JSON.parse(text), "The configuration root"); const errors: ParseError[] = []; // Accept a UTF-8 BOM without shifting diagnostics or editing the original text. const jsonText = text.startsWith("\uFEFF") ? ` ${text.slice(1)}` : text; @@ -125,7 +131,39 @@ const parseDocument = ( throw new SyntaxError( `Invalid JSON/JSONC at offset ${firstError.offset}: ${printParseErrorCode(firstError.error)}`, ); - return objectSchema.parse(document); + return requireObject(document, "The configuration root"); +}; + +/** A parsed configuration whose structure, not its syntax, cannot hold MCP servers. */ +export class ClientConfigurationShapeError extends TypeError {} + +/** Validate and copy own properties, excluding non-record YAML values and parser-injected prototypes. */ +const requireObject = ( + value: unknown, + description: string, +): Record => { + const parsed = objectSchema.safeParse(value); + if (parsed.success) return parsed.data; + throw new ClientConfigurationShapeError(`${description} must be an object`, { + cause: parsed.error, + }); +}; + +/** ZCode reads the same-scope fallback as strict JSON with a mcpServers table. */ +export const parseZcodeFallbackConfiguration = ( + text: string, +): ClientConfigurationDocument => { + const document = requireObject(JSON.parse(text), "ZCode fallback root"); + return { + document, + servers: + document.mcpServers === undefined + ? {} + : requireObject(document.mcpServers, "ZCode fallback mcpServers"), + serversPath: ["mcpServers"], + dialect: "json", + legacyServers: {}, + }; }; /** Members of OpenCode V2's `mcp` object that are not server names. */ @@ -143,7 +181,23 @@ export const parseClientConfiguration = ( const document = parseDocument(text, format); const serversKey = clientConfigurationServersKey(format); const value = document[serversKey]; - const servers = value === undefined ? {} : objectSchema.parse(value); + const servers = + value === undefined ? {} : requireObject(value, `"${serversKey}"`); + // ZCode reads stdio servers from the nested `mcp.servers` table of + // `~/.zcode/cli/config.json`; entries carry `command`, `args`, and `env`. + if (format === "zcode") { + const nested = servers.servers; + return { + document, + servers: + nested === undefined + ? {} + : requireObject(nested, `"${serversKey}.servers"`), + serversPath: [serversKey, "servers"], + dialect: format, + legacyServers: {}, + }; + } const native = servers.servers; // A V1 server named `servers` has a string `type` discriminator; the V2 // table may instead hold a server object named `type`. @@ -164,7 +218,7 @@ export const parseClientConfiguration = ( }; return { document, - servers: objectSchema.parse(native), + servers: requireObject(native, `"${serversKey}.servers"`), serversPath: [serversKey, "servers"], dialect: "opencode_v2", legacyServers: Object.fromEntries( @@ -203,8 +257,16 @@ export const withClientServers = ( : editDshDocument(parsed); const [key = "", nested] = parsed.serversPath; if (nested === undefined) return { ...parsed.document, [key]: servers }; - const outer = { ...objectSchema.parse(parsed.document[key]) }; - if (removeLegacy !== undefined && !OPENCODE_V2_MCP_SETTINGS.has(removeLegacy)) + // A fresh document may not hold the outer table yet (for example a new + // ZCode `config.json` without an `mcp` object), so treat absence as empty. + const outerValue = parsed.document[key]; + const outer = + outerValue === undefined ? {} : { ...objectSchema.parse(outerValue) }; + if ( + parsed.dialect === "opencode_v2" && + removeLegacy !== undefined && + !OPENCODE_V2_MCP_SETTINGS.has(removeLegacy) + ) delete outer[removeLegacy]; return { ...parsed.document, [key]: { ...outer, [nested]: servers } }; }; diff --git a/src/application/ClientRegistrationStatus.ts b/src/application/ClientRegistrationStatus.ts index dc246d5e6..caeba4fb6 100644 --- a/src/application/ClientRegistrationStatus.ts +++ b/src/application/ClientRegistrationStatus.ts @@ -7,6 +7,7 @@ import { clientServerForcedEnabled, clientServerListedDisabled, effectiveClientServer, + type ClientConfigurationDocument, } from "./ClientConfigurationDocument.js"; import { access } from "node:fs/promises"; import { resolve } from "node:path"; @@ -74,24 +75,48 @@ const registrationSchema = z }) .passthrough(); -/** Inspect supported client registrations without reading their environment. */ +interface ClientRegistrationReadOptions { + readonly platform?: NodeJS.Platform; + readonly environment?: NodeJS.ProcessEnv; + readonly resources?: ArtifactResourceScope; +} + +/** Registration facts shared by diagnostics and update maintenance. */ +export interface ClientRegistrationInspection { + readonly status: ClientRegistrationStatus; + readonly activation: "enabled" | "disabled" | "unknown"; +} + +/** Project diagnostics from the same inspection used to select maintenance. */ export const readClientRegistrationStatuses = async ( home: string, currentCommandPath: string = resolve(process.argv[1] ?? "unknown"), - options: { - readonly platform?: NodeJS.Platform; - readonly environment?: NodeJS.ProcessEnv; - readonly resources?: ArtifactResourceScope; - } = {}, -): Promise => { - const statuses: ClientRegistrationStatus[] = []; + options: ClientRegistrationReadOptions = {}, +): Promise => + ( + await readClientRegistrationInspections(home, currentCommandPath, options) + ).map(({ status }) => status); + +/** Parse effective registrations and their client-specific activation once. */ +export const readClientRegistrationInspections = async ( + home: string, + currentCommandPath: string = resolve(process.argv[1] ?? "unknown"), + options: ClientRegistrationReadOptions = {}, +): Promise => { + const inspections: ClientRegistrationInspection[] = []; + const record = ( + status: ClientRegistrationStatus, + activation: ClientRegistrationInspection["activation"] = "unknown", + ): void => { + inspections.push({ status, activation }); + }; for (const client of supportedClients( home, options.platform, options.environment, )) { if (client.configPathError !== undefined) { - statuses.push({ + record({ client: client.name, config_path: client.configPath, command: [], @@ -104,7 +129,7 @@ export const readClientRegistrationStatuses = async ( const manualRemediation = manualRegistrationRemediation(client.name); if (client.format === "unsupported") { if (manualRemediation !== undefined) - statuses.push({ + record({ client: client.name, config_path: client.markerPath ?? client.configPath, command: [], @@ -119,7 +144,7 @@ export const readClientRegistrationStatuses = async ( options.resources, ); if (!files.ok) { - statuses.push({ + record({ client: client.name, config_path: client.configPath, command: [], @@ -130,9 +155,7 @@ export const readClientRegistrationStatuses = async ( } const parsed = effectiveClientConfiguration(files.value); if (parsed === undefined) { - statuses.push( - unavailableStatus(client.name, client.configPath, "missing"), - ); + record(unavailableStatus(client.name, client.configPath, "missing")); continue; } const policy = await readClientPolicyBlock( @@ -142,7 +165,7 @@ export const readClientRegistrationStatuses = async ( options.resources, ); if (!policy.ok) { - statuses.push({ + record({ client: client.name, config_path: client.configPath, command: [], @@ -159,7 +182,7 @@ export const readClientRegistrationStatuses = async ( ? dshDocument(parsed.document).editabilityError : undefined; if (editabilityError !== undefined) { - statuses.push({ + record({ client: client.name, config_path: client.configPath, command: [], @@ -168,9 +191,7 @@ export const readClientRegistrationStatuses = async ( }); continue; } - statuses.push( - unavailableStatus(client.name, client.configPath, "missing"), - ); + record(unavailableStatus(client.name, client.configPath, "missing")); continue; } const registration = parseRegistration(raw, client); @@ -178,21 +199,18 @@ export const readClientRegistrationStatuses = async ( registration.command, ...registration.args, ]; - statuses.push( + const activation = registrationActivation(registration, client, parsed); + record( configuredStatus( client.name, client.configPath, command, - registrationAligned( - registration, - client, - currentCommandPath, - options.platform ?? process.platform, - clientServerForcedEnabled(parsed, PRODUCT_IDENTITY.mcpServerKey), - ) && - !clientServerListedDisabled( - parsed, - PRODUCT_IDENTITY.mcpServerKey, + activation === "enabled" && + registrationAligned( + registration, + client, + currentCommandPath, + options.platform ?? process.platform, ) && (parsed.dialect !== "dsh" || dshDocument(parsed.document).ready) && policyBlock === undefined @@ -200,9 +218,10 @@ export const readClientRegistrationStatuses = async ( : "stale", policyBlock, ), + activation, ); } catch (cause: unknown) { - statuses.push( + record( unavailableStatus( client.name, client.configPath, @@ -211,24 +230,31 @@ export const readClientRegistrationStatuses = async ( ); } } - return statuses.sort((left, right) => - compareUnicodeCodePoints(left.client, right.client), + return inspections.sort((left, right) => + compareUnicodeCodePoints(left.status.client, right.status.client), ); }; +const registrationActivation = ( + registration: z.output, + client: SetupClient, + parsed: ClientConfigurationDocument, +): "enabled" | "disabled" => + (client.format !== "grok" && registration.disabled === true) || + (registration.enabled === false && + !clientServerForcedEnabled(parsed, PRODUCT_IDENTITY.mcpServerKey)) || + (client.format === "zcode" && registration.enable === false) || + clientServerListedDisabled(parsed, PRODUCT_IDENTITY.mcpServerKey) + ? "disabled" + : "enabled"; + const registrationAligned = ( registration: z.output, client: SetupClient, currentCommandPath: string, platform: NodeJS.Platform, - forcedEnabled = false, ): boolean => { const command = [registration.command, ...registration.args]; - if ( - (client.format !== "grok" && registration.disabled === true) || - (registration.enabled === false && !forcedEnabled) - ) - return false; if (!isOwnedClientRegistrationCommand(command, currentCommandPath)) return false; if ( diff --git a/src/application/DirectAnalysisStatus.ts b/src/application/DirectAnalysisStatus.ts index c19bd0c16..d67dcc920 100644 --- a/src/application/DirectAnalysisStatus.ts +++ b/src/application/DirectAnalysisStatus.ts @@ -4,6 +4,9 @@ import { createServerIdentity } from "../serverIdentity.js"; import { silentLogger } from "../logger.js"; import type { Logger } from "pino"; import type { DirectAnalysisDependencies } from "./DirectAnalysisDependencies.js"; +import { providerCapabilitySet } from "../contracts/toolOutputSchemaPrimitives.js"; +import { providerCapabilitySets } from "./binary/BinarySessionStatus.js"; +import { sqliteDatabaseCapability } from "./sqlite/SqliteDatabaseCapability.js"; /** Read target-free provider status and operation availability. */ export const runSessionStatus = async ( @@ -17,8 +20,15 @@ export const runSessionStatus = async ( if (!config.ok) return { error: projectAnalysisError(config.error) }; const session = await dependencies.createBinarySession(config.value, logger); try { + const status = jsonObjectSchema.parse(session.status()); return { - ...jsonObjectSchema.parse(session.status()), + ...status, + capabilities: [ + ...providerCapabilitySet.array().parse(status.capabilities), + ...providerCapabilitySets([ + sqliteDatabaseCapability(process.versions.node), + ]), + ], server_identity: createServerIdentity({ startedAt: new Date().toISOString(), }), diff --git a/src/application/EnhancedToolSelectorOrigin.test.ts b/src/application/EnhancedToolSelectorOrigin.test.ts index 387d4ebfb..48c21ea03 100644 --- a/src/application/EnhancedToolSelectorOrigin.test.ts +++ b/src/application/EnhancedToolSelectorOrigin.test.ts @@ -4,7 +4,11 @@ import { type AnalysisOperation, type AnalysisOperationPort, } from "./AnalysisProvider.js"; -import { AnalysisInputError } from "../domain/analysisErrorCore.js"; +import { + AnalysisCancelledError, + AnalysisInputError, + AnalysisProtocolError, +} from "../domain/analysisErrorCore.js"; import type { JsonValue } from "../domain/jsonValue.js"; import { err, ok } from "../domain/result.js"; import { EnhancedTools } from "./EnhancedTools.js"; @@ -140,3 +144,118 @@ describe("selector origin of composed workflows", () => { ).toBe(false); }); }); + +describe("trace path completion and cancellation", () => { + it("keeps an unreachable goal unknown when provider coverage is unresolved", async () => { + const tools = new EnhancedTools({ + execute: async (operation, parameters) => { + if (operation === "procedure_address") + return ok(createAnalysisExecution(parameters.procedure, provider)); + if (operation === "procedure_callees") + return ok( + createAnalysisExecution([], provider, { + relationshipCoverage: { + status: "unknown", + reason: "the provider cannot confirm graph coverage", + }, + }), + ); + throw new Error(`Unexpected operation: ${operation}`); + }, + }); + + const result = await tools.execute("trace_call_path", { + start: "0x1000", + goal: "0x2000", + }); + + expect(result).toMatchObject({ + ok: true, + value: { goal_status: "unknown", truncated: true }, + }); + }); + + it.each([ + { abortSignal: false, errorKind: "cancelled" }, + { abortSignal: true, errorKind: "cancelled" }, + { abortSignal: true, errorKind: "protocol" }, + ])( + "preserves provider $errorKind failure and cleanup with request abort: $abortSignal", + async ({ abortSignal, errorKind }) => { + const cleanup = { + reason: "provider cleanup is still pending", + resources: ["provider session"], + }; + const providerFailure = + errorKind === "cancelled" + ? new AnalysisCancelledError("procedure_callees", { cleanup }) + : new AnalysisProtocolError("provider relationship read failed", { + cleanup, + }); + const controller = new AbortController(); + const tools = new EnhancedTools({ + execute: async (operation, parameters) => { + if (operation === "procedure_address") + return ok(createAnalysisExecution(parameters.procedure, provider)); + if (operation === "procedure_callees") { + if (abortSignal) controller.abort(); + return err(providerFailure); + } + throw new Error(`Unexpected operation: ${operation}`); + }, + }); + + const result = await tools.execute( + "trace_call_path", + { start: "0x1000", goal: "0x2000" }, + abortSignal ? controller.signal : undefined, + ); + + expect(result).toMatchObject({ + ok: false, + error: { + _tag: + errorKind === "cancelled" + ? "AnalysisCancelledError" + : "AnalysisProtocolError", + cleanup, + }, + }); + if (result.ok) throw new Error("expected provider failure"); + expect(result.error).toBe(providerFailure); + }, + ); + + it("stops after cancellation races with a successful relationship response", async () => { + const controller = new AbortController(); + const calls: string[] = []; + const tools = new EnhancedTools({ + execute: async (operation, parameters) => { + calls.push(operation); + if (operation === "procedure_address") + return ok(createAnalysisExecution(parameters.procedure, provider)); + if (operation === "procedure_callees") { + controller.abort(); + return ok(createAnalysisExecution(["0x2000"], provider)); + } + throw new Error(`Unexpected operation: ${operation}`); + }, + }); + + const result = await tools.execute( + "trace_call_path", + { start: "0x1000", goal: "0x3000" }, + controller.signal, + ); + + expect(calls).toEqual([ + "procedure_address", + "procedure_address", + "procedure_callees", + ]); + expect(result).toMatchObject({ + ok: false, + error: { _tag: "AnalysisCancelledError" }, + }); + }); +}); diff --git a/src/application/EnhancedTools.ts b/src/application/EnhancedTools.ts index a5d09ecc2..87d27fc5f 100644 --- a/src/application/EnhancedTools.ts +++ b/src/application/EnhancedTools.ts @@ -22,6 +22,7 @@ import { parseListCount, parseRelatedAddresses, parseSegments, + parseSegmentImageBase, } from "../domain/hopperValues.js"; import { err, ok, type Result } from "../domain/result.js"; import { @@ -45,6 +46,7 @@ import { traceCallPath } from "./CallPathTracing.js"; import { resolveProcedureAddress } from "./ProcedureAddressResolution.js"; import { traceLiteralFeature } from "./EnhancedLiteralTracing.js"; import { projectNativeApiInspection } from "./native/NativeApiInspection.js"; + /** * Composes direct provider operations into bounded reverse-engineering tools. * Direct callers use `execute`; adapters that own validation use @@ -532,14 +534,21 @@ export class EnhancedTools { const stringCount = parseListCount(stringsResult.value, "strings"); if (!stringCount.ok) return stringCount; + const imageBase = parseSegmentImageBase(segments.value); + return ok({ document: document.value, - segments: segments.value.map(({ name, start, end }) => ({ - name, - start, - end, - length: addressDistance(start, end), - })), + ...(imageBase === undefined ? {} : { image_base: imageBase }), + segments: segments.value.map( + ({ name, start, end, image_base, address_space }) => ({ + name, + start, + end, + length: addressDistance(start, end), + ...(image_base === undefined ? {} : { image_base }), + ...(address_space === undefined ? {} : { address_space }), + }), + ), segment_count: segments.value.length, procedure_count: procedureCount.value, string_count: stringCount.value, @@ -591,6 +600,7 @@ export class EnhancedTools { ...(signal === undefined ? {} : { signal }), ...(selectorOrigin === undefined ? {} : { selectorOrigin }), }); + if (!execution.ok) return execution; if (isAborted(signal)) return err(new AnalysisCancelledError(name)); return execution; } diff --git a/src/application/EvidenceBundleFiles.ts b/src/application/EvidenceBundleFiles.ts index a9ff27990..ecca7ab1e 100644 --- a/src/application/EvidenceBundleFiles.ts +++ b/src/application/EvidenceBundleFiles.ts @@ -1,7 +1,9 @@ +import { resolve } from "node:path"; + import { - createImmutableEvidenceBundle, describeEvidenceBundleFailure, describeValidationFailure, + parseImmutableEvidenceBundle, parseEvidenceBundle, type EvidenceBundle, } from "../domain/evidenceBundle.js"; @@ -36,41 +38,40 @@ type EvidenceWriteFailure = /** Read and validate an evidence bundle at the caller-supplied path. */ export const readEvidenceBundle = ( path: string, + signal?: AbortSignal, + resources?: ArtifactResourceScope, ): Promise> => - readBundle(path, parseEvidenceBundle); + readBundle(path, parseEvidenceBundle, signal, resources); /** Read an authenticated immutable snapshot for a subsequent session import. */ export const readImmutableEvidenceBundle = ( path: string, signal?: AbortSignal, + resources?: ArtifactResourceScope, ): Promise> => - readBundle( - path, - (input) => { - const bundle = parseEvidenceBundle(input); - return createImmutableEvidenceBundle(bundle.records, bundle.unknowns); - }, - signal, - ); + readBundle(path, parseImmutableEvidenceBundle, signal, resources); const readBundle = async ( path: string, parseBundle: (input: unknown) => EvidenceBundle, signal?: AbortSignal, + resources?: ArtifactResourceScope, ): Promise> => { if (signal?.aborted) return err(new AnalysisCancelledError("import_evidence_bundle")); - const loaded = await readJsonFile(path, signal).catch((cause: unknown) => { - // A failed close transfers a live handle owner; preserve that failure. - if ( - signal?.aborted === true && - !(cause instanceof RegularFileCleanupFailure) - ) - return err( - new AnalysisCancelledError("import_evidence_bundle", { cause }), - ); - throw cause; - }); + const loaded = await readJsonFile(path, signal, resources).catch( + (cause: unknown) => { + // A failed close transfers a live handle owner; preserve that failure. + if ( + signal?.aborted === true && + !(cause instanceof RegularFileCleanupFailure) + ) + return err( + new AnalysisCancelledError("import_evidence_bundle", { cause }), + ); + throw cause; + }, + ); if (!loaded.ok) return loaded; if (signal?.aborted) return err(new AnalysisCancelledError("import_evidence_bundle")); @@ -78,10 +79,19 @@ const readBundle = async ( try { bundle = parseBundle(loaded.value); } catch (cause: unknown) { + const failure = describeEvidenceBundleFailure(loaded.value, cause); + if (failure.kind === "single-record") + return err( + new EvidenceFileError("read", "wrong-kind", { + path: resolve(path), + cause, + userMessage: failure.message, + }), + ); return err( new EvidenceIntegrityError("Evidence bundle validation failed", { cause, - userMessage: describeEvidenceBundleFailure(loaded.value, cause), + userMessage: failure.message, }), ); } diff --git a/src/application/InvestigationProviders.ts b/src/application/InvestigationProviders.ts index 883d3878c..5dcb18150 100644 --- a/src/application/InvestigationProviders.ts +++ b/src/application/InvestigationProviders.ts @@ -18,11 +18,11 @@ export const workflowAnalysisProfile = ( ): AnalysisProfileCommitment => createAnalysisProfile(REA_WORKFLOW_PROVIDER, { upstream_analysis_profile: upstream, - ...(operation === "binary_overview" || - operation === "batch_decompile" || - operation === "get_call_graph" - ? { workflow_revision: 2 } - : {}), + ...(operation === "binary_overview" + ? { workflow_revision: 3 } + : operation === "batch_decompile" || operation === "get_call_graph" + ? { workflow_revision: 2 } + : {}), }); /** Provider identity for deterministic artifact inventories. */ diff --git a/src/application/JsonFiles.ts b/src/application/JsonFiles.ts index 76a05f9cb..6bd1d66c8 100644 --- a/src/application/JsonFiles.ts +++ b/src/application/JsonFiles.ts @@ -24,6 +24,7 @@ import { type JsonObjectMemberReader, } from "./JsonInputFile.js"; import { NonRegularFileReadError } from "../filesystem/RegularFile.js"; +import { RegularFileCleanupFailure } from "./RegularFileRead.js"; import type { ArtifactResourceScope } from "../artifacts/ArtifactResourceScope.js"; import { ArtifactReaderFailure } from "../artifacts/ArtifactReader.js"; import { OwnedFileHandle } from "../filesystem/OwnedFileHandle.js"; @@ -42,12 +43,14 @@ type TextWriteResult = export const readJsonFile = async ( path: string, signal?: AbortSignal, + resources?: ArtifactResourceScope, ): Promise< Result > => readJsonFileInput( path, - (selected) => readJsonInputFile(selected, "read_evidence_file", signal), + (selected) => + readJsonInputFile(selected, "read_evidence_file", signal, resources), signal, ); @@ -56,6 +59,7 @@ export const readJsonObjectMembersFile = ( path: string, scans: readonly ReadonlyMap[], signal?: AbortSignal, + resources?: ArtifactResourceScope, ): Promise< Result< void, @@ -65,7 +69,13 @@ export const readJsonObjectMembersFile = ( readJsonFileInput( path, (selected) => - readJsonObjectFile(selected, "read_evidence_file", scans, signal), + readJsonObjectFile( + selected, + "read_evidence_file", + scans, + signal, + resources, + ), signal, ); @@ -103,6 +113,7 @@ const readJsonFileInput = async ( } return ok(decoded.value); } catch (cause: unknown) { + if (cause instanceof RegularFileCleanupFailure) throw cause; if (cause instanceof AnalysisResourceConstraintError) return err(cause); if (signal?.aborted === true) throw cause; return err( diff --git a/src/application/JsonInputFile.ts b/src/application/JsonInputFile.ts index bceb482d2..25e5fcec0 100644 --- a/src/application/JsonInputFile.ts +++ b/src/application/JsonInputFile.ts @@ -11,6 +11,7 @@ import streamValues from "stream-json/streamers/stream-values.js"; import streamArray from "stream-json/streamers/stream-array.js"; import { RegularFileChangedError } from "../filesystem/RegularFile.js"; +import type { ArtifactResourceScope } from "../artifacts/ArtifactResourceScope.js"; import { withRegularFile } from "./RegularFileRead.js"; import { JSON_BYTE_ORDER_MARK_MESSAGE, @@ -55,6 +56,7 @@ export const readJsonObjectFile = ( operation: string, scans: readonly ReadonlyMap[], signal?: AbortSignal, + resources?: ArtifactResourceScope, ): Promise> => withRegularFile( path, @@ -76,7 +78,9 @@ export const readJsonObjectFile = ( value === null || Array.isArray(value) ) - throw new TypeError("JSON document root must be an object"); + return err( + invalidJson(operation, "JSON document root must be an object"), + ); for (const members of scans) for (const [key, member] of members) { if (!Object.hasOwn(value, key)) continue; @@ -175,7 +179,9 @@ export const readJsonObjectFile = ( signal === undefined ? {} : { signal }, ); if (!rootObject) - throw new TypeError("JSON document root must be an object"); + return err( + invalidJson(operation, "JSON document root must be an object"), + ); const digest = hash.digest("hex"); if (previousDigest !== undefined && digest !== previousDigest) throw new RegularFileChangedError(path); @@ -188,7 +194,10 @@ export const readJsonObjectFile = ( throw cause; } }, - { signal }, + { + signal, + ...(resources === undefined ? {} : { resources }), + }, ); const memberConsumer = ( @@ -236,6 +245,7 @@ export const readJsonInputFile = ( path: string, operation: string, signal?: AbortSignal, + resources?: ArtifactResourceScope, ): Promise> => withRegularFile( path, @@ -294,7 +304,10 @@ export const readJsonInputFile = ( throw cause; } }, - { signal }, + { + signal, + ...(resources === undefined ? {} : { resources }), + }, ); const jsonReadFailure = ( diff --git a/src/application/MacHopper.test.ts b/src/application/MacHopper.test.ts index d75959fd5..7896208c5 100644 --- a/src/application/MacHopper.test.ts +++ b/src/application/MacHopper.test.ts @@ -2,12 +2,16 @@ import { createHash } from "node:crypto"; import { describe, expect, it } from "vitest"; -import { installMacHopper, type MacHopperInstallHost } from "./MacHopper.js"; +import { + installMacHopper, + type MacHopperBundleVerification, + type MacHopperInstallHost, +} from "./MacHopper.js"; class FakeMacHopperHost implements MacHopperInstallHost { readonly archive = new TextEncoder().encode("hopper-dmg"); archiveOk = true; - valid = true; + verification: MacHopperBundleVerification = "verified"; existing = false; mountSucceeds = true; copySucceeds = true; @@ -15,6 +19,7 @@ class FakeMacHopperHost implements MacHopperInstallHost { badHash = false; unmounts = 0; cleanups = 0; + installs = 0; opens = 0; replaces = false; @@ -47,7 +52,7 @@ class FakeMacHopperHost implements MacHopperInstallHost { return Promise.resolve(); }; appBundle = () => Promise.resolve("/mounted/Hopper Disassembler.app"); - validBundle = () => Promise.resolve(this.valid); + validBundle = () => Promise.resolve(this.verification); destinationExists = () => Promise.resolve(this.existing); installBundle = ( _source: string, @@ -55,6 +60,7 @@ class FakeMacHopperHost implements MacHopperInstallHost { _stage: string, replaceExisting: boolean, ) => { + this.installs += 1; this.replaces = replaceExisting; return Promise.resolve(this.copySucceeds); }; @@ -115,7 +121,7 @@ describe("macOS Hopper installation", () => { it("cleans and detaches after bundle validation fails", async () => { const host = new FakeMacHopperHost(); - host.valid = false; + host.verification = "invalid_signature"; await expect(installMacHopper({}, host)).resolves.toEqual({ status: "failed", reason: "bundle", @@ -123,4 +129,17 @@ describe("macOS Hopper installation", () => { expect(host.unmounts).toBe(1); expect(host.cleanups).toBe(1); }); + + it("reports a publisher mismatch without copying or launching the bundle", async () => { + const host = new FakeMacHopperHost(); + host.verification = "unverified_publisher"; + await expect(installMacHopper({}, host)).resolves.toEqual({ + status: "failed", + reason: "publisher_verification_failed", + }); + expect(host.installs).toBe(0); + expect(host.opens).toBe(0); + expect(host.unmounts).toBe(1); + expect(host.cleanups).toBe(1); + }); }); diff --git a/src/application/MacHopper.ts b/src/application/MacHopper.ts index 31ca522f4..a211e9f2d 100644 --- a/src/application/MacHopper.ts +++ b/src/application/MacHopper.ts @@ -24,7 +24,35 @@ const execFileAsync = promisify(execFile); const RELEASES_URL = "https://www.hopperapp.com/include/files-api.php?request=releases&public=true"; const DOWNLOAD_PREFIX = "https://www.hopperapp.com:443/downloader/public/"; -const BUNDLE_IDENTIFIER = "com.cryptic-apps.hopper-web-4"; + +/** + * Apple publisher identity pinned for the official Hopper macOS bundle. The + * team identifier was captured from `Hopper-6.6.0-demo.dmg` at + * `https://www.hopperapp.com:443/downloader/public/Hopper-6.6.0-demo.dmg` + * (34846271 bytes, SHA-1 0be530f038249742590992199c7b042ea20ca955) with + * `codesign -dvvv`, which reported + * `Authority=Developer ID Application: Cryptic Apps (2AMA2753NF)`. + */ +export const HOPPER_PUBLISHER = Object.freeze({ + bundleIdentifier: "com.cryptic-apps.hopper-web-4", + teamIdentifier: "2AMA2753NF", +}); + +/** + * Code requirement enforcing the bundle identifier and signing team together. + * The identifier is read from the sealed CodeDirectory, so it cannot be changed + * by editing `Info.plist` the way the previous string comparison could. + */ +const HOPPER_PUBLISHER_REQUIREMENT = + `= identifier "${HOPPER_PUBLISHER.bundleIdentifier}"` + + ` and anchor apple generic` + + ` and certificate leaf[subject.OU] = "${HOPPER_PUBLISHER.teamIdentifier}"`; + +/** Outcome of reading a mounted bundle's signature and publisher identity. */ +export type MacHopperBundleVerification = + | "verified" + | "invalid_signature" + | "unverified_publisher"; /** Stable network and command effects disclosed before macOS Hopper setup. */ export const macHopperInstallDisclosure = { @@ -32,6 +60,7 @@ export const macHopperInstallDisclosure = { commands: [ "hdiutil attach -readonly -nobrowse -mountpoint ", "codesign --verify --deep --strict ", + `codesign --verify --strict '-R${HOPPER_PUBLISHER_REQUIREMENT}' `, "ditto ", "open ", ] as const, @@ -52,6 +81,7 @@ export type MacHopperInstallResult = | "integrity" | "mount" | "bundle" + | "publisher_verification_failed" | "destination_exists" | "copy" | "launcher_missing"; @@ -69,7 +99,7 @@ export interface MacHopperInstallHost { mount(packagePath: string, mountPath: string): Promise; unmount(mountPath: string): Promise; appBundle(mountPath: string): Promise; - validBundle(appPath: string): Promise; + validBundle(appPath: string): Promise; destinationExists(path: string): Promise; installBundle( source: string, @@ -124,8 +154,12 @@ export const installMacHopper = async ( return { status: "failed", reason: "mount" }; mounted = true; const source = await host.appBundle(mountPath); - if (source === undefined || !(await host.validBundle(source))) + if (source === undefined) return { status: "failed", reason: "bundle" }; + const verification = await host.validBundle(source); + if (verification === "invalid_signature") return { status: "failed", reason: "bundle" }; + if (verification === "unverified_publisher") + return { status: "failed", reason: "publisher_verification_failed" }; const stage = `${destination}.rea-stage`; if ( !(await host.installBundle( @@ -222,25 +256,21 @@ export const systemMacHopperInstallHost = ( environment, )) ) - return false; - try { - const identifier = ( - await execFileAsync( - "/usr/libexec/PlistBuddy", - [ - "-c", - "Print :CFBundleIdentifier", - join(appPath, "Contents/Info.plist"), - ], - { env: environment }, - ) - ).stdout.trim(); - return identifier === BUNDLE_IDENTIFIER; - } catch (cause: unknown) { - // best-effort cleanup: optional bundle probing; unreadable means invalid. - void cause; - return false; - } + return "invalid_signature"; + if ( + !(await commandSucceeds( + "codesign", + [ + "--verify", + "--strict", + `-R${HOPPER_PUBLISHER_REQUIREMENT}`, + appPath, + ], + environment, + )) + ) + return "unverified_publisher"; + return "verified"; }, async destinationExists(path) { try { diff --git a/src/application/MipsElfMetadata.ts b/src/application/MipsElfMetadata.ts index 8f2d97115..8fd9d0e89 100644 --- a/src/application/MipsElfMetadata.ts +++ b/src/application/MipsElfMetadata.ts @@ -3,6 +3,7 @@ import type { MipsAbiFlags, MipsElfMetadata, } from "../domain/binaryTargetTypes.js"; +import { readElfFixedHeader } from "../domain/elfFixedHeader.js"; import { err, ok, type Result } from "../domain/result.js"; import { readMipsElfSharedLoad, @@ -64,21 +65,22 @@ export const readMipsElfMetadata = async ( const header = await read(0, 52, "ELF32 header"); if (!header.ok) return header; const bytes = header.value; + const fixedHeader = readElfFixedHeader(bytes, fileSize); + if (!fixedHeader.ok) return fixedHeader; const little = metadata.byteOrder === "little"; const u16 = (data: Buffer, offset: number): number => little ? data.readUInt16LE(offset) : data.readUInt16BE(offset); const u32 = (data: Buffer, offset: number): number => little ? data.readUInt32LE(offset) : data.readUInt32BE(offset); if ( - bytes.toString("hex", 0, 4) !== "7f454c46" || - bytes[4] !== 1 || - bytes[5] !== (little ? 1 : 2) || + fixedHeader.value.elfClass !== 32 || + fixedHeader.value.byteOrder !== metadata.byteOrder || u16(bytes, 18) !== 8 || u16(bytes, 16) !== metadata.type || u32(bytes, 36) !== metadata.flags ) return err("MIPS ELF header no longer matches the resolved identity"); - if (bytes[6] !== 1 || u32(bytes, 20) !== 1 || u16(bytes, 40) !== 52) + if (fixedHeader.value.headerSize !== 52) return err("invalid MIPS ELF32 version or header size"); const tables = [ diff --git a/src/application/OptionalObservationProviders.ts b/src/application/OptionalObservationProviders.ts index d66554966..499925a7c 100644 --- a/src/application/OptionalObservationProviders.ts +++ b/src/application/OptionalObservationProviders.ts @@ -22,7 +22,10 @@ export interface OptionalProviderLoadFailure { export type OptionalProviderLoadFailures = Readonly< Partial< - Record + Record< + keyof OptionalObservationProviders | "fridaInstrumentation", + OptionalProviderLoadFailure + > > >; diff --git a/src/application/ProgressReporter.ts b/src/application/ProgressReporter.ts index cf5ed7b7f..bb5a98f0d 100644 --- a/src/application/ProgressReporter.ts +++ b/src/application/ProgressReporter.ts @@ -23,7 +23,7 @@ export const createProgressReporter = ( } = {}, ): ProgressReporter => { const minimumIntervalMs = options.minimumIntervalMs ?? 100; - const now = options.now ?? Date.now; + const now = options.now ?? (() => performance.now()); let lastCompleted = -1; let lastSentAt = Number.NEGATIVE_INFINITY; let sequence = 0; diff --git a/src/application/ReferenceSourceImportEntries.ts b/src/application/ReferenceSourceImportEntries.ts index c7432c68d..36dae9949 100644 --- a/src/application/ReferenceSourceImportEntries.ts +++ b/src/application/ReferenceSourceImportEntries.ts @@ -12,12 +12,14 @@ import { detectReferenceSourceLanguage, } from "../domain/referenceSourceClassification.js"; import type { HistoricalSourceGraphInput } from "../domain/referenceSourceGraph.js"; -import { parseReferenceSourceImports } from "../domain/referenceSourceImportParsing.js"; +import { + parseReferenceSourceImports, + PARSEABLE_REFERENCE_SOURCE_LANGUAGES, +} from "../domain/referenceSourceImportParsing.js"; import type { ReferenceSourceEntry, ReferenceSourceRead, } from "../reference/ReferenceSourceReaderTypes.js"; -import { PARSEABLE_REFERENCE_SOURCE_LANGUAGES } from "./ReferenceSourceImportTypes.js"; import { typescriptEmittedSourceCandidates } from "./TypeScriptEmittedSourceCandidates.js"; export interface ParsedReferenceSourceEntries { @@ -102,19 +104,29 @@ const resolveInternalSpecifier = ( ]); // Retain present runtime files first; substitute only a missing counterpart. // Counterparts cover explicit filenames, not directory/index resolution. - candidates.push(...typescriptEmittedSourceCandidates(fromPath, normalized)); + candidates.push( + ...typescriptEmittedSourceCandidates(fromPath, normalized).map( + ({ path }) => path, + ), + ); const match = lookupPath.resolveCandidates(candidates); return match === undefined ? { to: normalized, resolution: "unresolved" } : { to: match, resolution: "internal" }; }; +type ReadFile = Extract; + const appendFile = ( - entry: Extract, + entry: ReadFile, lookupPath: ReferenceSourcePathLookup, output: ParsedReferenceSourceEntries, ): void => { const language = detectReferenceSourceLanguage(entry.path); + const parsed = + language === null || !PARSEABLE_REFERENCE_SOURCE_LANGUAGES.has(language) + ? undefined + : parseReferenceSourceImports(entry.path, entry.bytes, language); output.entries.push({ path: entry.path, kind: "file", @@ -123,11 +135,9 @@ const appendFile = ( language, classifications: classifyReferenceSourcePath(entry.path), content_state: "hashed", - limitations: [], + limitations: [...(parsed?.limitations ?? [])], }); - if (language === null || !PARSEABLE_REFERENCE_SOURCE_LANGUAGES.has(language)) - return; - const parsed = parseReferenceSourceImports(entry.path, entry.bytes, language); + if (parsed === undefined) return; for (const relationship of parsed.relationships) { if (relationship.resolution !== "internal") { output.relationships.push(relationship); diff --git a/src/application/ReferenceSourceImportTypes.ts b/src/application/ReferenceSourceImportTypes.ts index 9395dc5c0..f8474315a 100644 --- a/src/application/ReferenceSourceImportTypes.ts +++ b/src/application/ReferenceSourceImportTypes.ts @@ -87,6 +87,3 @@ export const DEFAULT_REFERENCE_SOURCE_IGNORE_PATTERNS = [ ".coverage", "*.log", ] as const; - -export const PARSEABLE_REFERENCE_SOURCE_LANGUAGES: ReadonlySet = - new Set(["JavaScript", "TypeScript", "JSX", "TSX"]); diff --git a/src/application/ReferenceSourceVcsAdapter.ts b/src/application/ReferenceSourceVcsAdapter.ts index b2a21e2b5..346ae6ebe 100644 --- a/src/application/ReferenceSourceVcsAdapter.ts +++ b/src/application/ReferenceSourceVcsAdapter.ts @@ -1,6 +1,6 @@ import fs from "node:fs"; import { lstat } from "node:fs/promises"; -import { join, resolve } from "node:path"; +import { dirname, join, resolve } from "node:path"; import { err, ok, type Result } from "../domain/result.js"; import type { ArtifactResourceScope } from "../artifacts/ArtifactResourceScope.js"; import { ArtifactReaderFailure } from "../artifacts/ArtifactReader.js"; @@ -32,18 +32,24 @@ export const readReferenceSourceVcs = async ( ): Promise> => { try { return await resources.run(async () => { - if (isAborted(signal)) return ok(unknownVcs()); - try { - await lstat(join(root, ".git")); - } catch (cause: unknown) { - return ok( - errorCode(cause) === "ENOENT" - ? { kind: "none", head: null, dirty: null } - : unknownVcs(), - ); + // Like Git, a subdirectory belongs to its nearest enclosing repository; + // only a missing `.git` at every ancestor means no version control. + let repository = resolve(root); + for (;;) { + if (isAborted(signal)) return ok(unknownVcs()); + try { + await lstat(join(repository, ".git")); + break; + } catch (cause: unknown) { + if (errorCode(cause) !== "ENOENT") return ok(unknownVcs()); + } + const parent = dirname(repository); + if (parent === repository) + return ok({ kind: "none", head: null, dirty: null }); + repository = parent; } try { - const head = await resolveSourceHead(root, resources, signal); + const head = await resolveSourceHead(repository, resources, signal); if (isAborted(signal)) return ok(unknownVcs()); return ok({ kind: "git", head, dirty: null }); } catch (cause: unknown) { diff --git a/src/application/RegularFileRead.ts b/src/application/RegularFileRead.ts index 9183c9f8a..ee4d6170a 100644 --- a/src/application/RegularFileRead.ts +++ b/src/application/RegularFileRead.ts @@ -19,6 +19,17 @@ export interface RegularFileReadOptions { readonly resources?: ArtifactResourceScope; } +export class InvalidUtf8FileError extends TypeError { + readonly _tag = "InvalidUtf8FileError"; + constructor( + readonly path: string, + cause: unknown, + ) { + super(`File is not valid UTF-8: ${path}`, { cause }); + this.name = this._tag; + } +} + export type RegularFileReadOutcome = | { readonly kind: "completed"; readonly value: Value } | { readonly kind: "failed"; readonly cause: unknown }; @@ -95,7 +106,8 @@ const withRegularFileOwned = async ( cause.cleanupCause, ); if (options.resources === undefined) throw failure; - await retryRegularFileCleanup(failure, options.resources); + const retry = await retryRegularFileCleanup(failure, options.resources); + if (retry.cleanup !== undefined) throw failure; throw cause.cause; } const owner = new OwnedFileHandle(handle); @@ -128,9 +140,10 @@ const withRegularFileOwned = async ( cleanupCause, ); if (options.resources === undefined) throw failure; - const cleanup = await retryRegularFileCleanup(failure, options.resources); - if (cleanup.outcome.kind === "failed") throw cleanup.outcome.cause; - return cleanup.outcome.value; + const retry = await retryRegularFileCleanup(failure, options.resources); + if (retry.cleanup !== undefined) throw failure; + if (retry.outcome.kind === "failed") throw retry.outcome.cause; + return retry.outcome.value; } if (outcome.kind === "failed") throw outcome.cause; return outcome.value; @@ -140,7 +153,34 @@ const withRegularFileOwned = async ( export const readRegularFile = ( path: string, options: RegularFileReadOptions = {}, -): Promise => +): Promise => readRegularFileContent(path, (bytes) => bytes, options); + +/** Read valid UTF-8 without replacing source bytes or stripping an initial BOM. */ +export const readRegularFileText = ( + path: string, + options: RegularFileReadOptions = {}, +): Promise => + readRegularFileContent( + path, + (bytes) => { + try { + return new TextDecoder("utf-8", { + fatal: true, + ignoreBOM: true, + }).decode(bytes); + } catch (cause: unknown) { + if (!(cause instanceof TypeError)) throw cause; + throw new InvalidUtf8FileError(path, cause); + } + }, + options, + ); + +const readRegularFileContent = ( + path: string, + decode: (bytes: Buffer) => Value, + options: RegularFileReadOptions, +): Promise => withRegularFile( path, async (handle, stats) => { @@ -151,30 +191,7 @@ export const readRegularFile = ( ); if (bytes === undefined || bytes.length !== stats.size) throw new RegularFileChangedError(path); - return bytes; + return decode(bytes); }, options, ); - -/** Read one admitted regular file as UTF-8 without waiting on a pipe. */ -export const readRegularFileText = async ( - path: string, - options: RegularFileReadOptions = {}, -): Promise => { - try { - return (await readRegularFile(path, options)).toString("utf8"); - } catch (cause: unknown) { - if ( - cause instanceof RegularFileCleanupFailure && - cause.outcome.kind === "completed" && - Buffer.isBuffer(cause.outcome.value) - ) - throw new RegularFileCleanupFailure( - cause.path, - cause.owner, - { kind: "completed", value: cause.outcome.value.toString("utf8") }, - cause.cleanupCause, - ); - throw cause; - } -}; diff --git a/src/application/Setup.recovery.test.ts b/src/application/Setup.recovery.test.ts index 951ef3a54..f29c9d375 100644 --- a/src/application/Setup.recovery.test.ts +++ b/src/application/Setup.recovery.test.ts @@ -54,6 +54,40 @@ describe("setup workflow", () => { expect(result.remediation).toContain("could not be updated"); }); + it("reports a failed config rollback with its destination and recovery backup", async () => { + const host = new FakeSetupHost(); + host.hopper = "/Applications/Hopper"; + host.clients = [{ name: "codex", configPath: "/fixture/codex.json" }]; + host.clientResults.set("codex", { + status: "failed", + reason: "rollback", + backupPath: "/fixture/codex.json.rea.backup", + failure: { + kind: "restore", + path: "/fixture/codex.json", + detail: "permission denied", + }, + }); + + const result = await runSetup( + { ...options(true), clientIds: ["codex"] }, + host, + ); + + expect(result.clients.codex).toEqual({ + status: "failed", + reason: "rollback", + backupPath: "/fixture/codex.json.rea.backup", + failure: { + kind: "restore", + path: "/fixture/codex.json", + detail: "permission denied", + }, + }); + expect(result.remediation).toContain("permission denied"); + expect(result.remediation).toContain("/fixture/codex.json.rea.backup"); + }); + it("explains skill installation recovery", async () => { const host = new FakeSetupHost(); host.hopper = "/Applications/Hopper"; diff --git a/src/application/SetupClientConfiguration.ts b/src/application/SetupClientConfiguration.ts index a4f4e837e..981b829a4 100644 --- a/src/application/SetupClientConfiguration.ts +++ b/src/application/SetupClientConfiguration.ts @@ -1,5 +1,9 @@ import { readClientPolicyBlock } from "./GeminiClientSettings.js"; -import { readClientConfigurationFiles } from "./ClientConfigurationFiles.js"; +import { + readClientConfigurationFiles, + readConfigurationText, +} from "./ClientConfigurationFiles.js"; +import { err, ok, type Result } from "../domain/result.js"; import { clientRegistrationEntry, clientConfigurationValuesEqual, @@ -8,12 +12,14 @@ import { legacyClientServerPath, OMP_DISABLED_SERVERS_KEY, parseClientConfiguration, + parseZcodeFallbackConfiguration, serializeClientConfiguration, withClientServers, type ClientConfigurationDocument, } from "./ClientConfigurationDocument.js"; import { dshDocument, DshCordisDocument } from "./DshCordisPatch.js"; import { constants as fsConstants } from "node:fs"; +import { createHash } from "node:crypto"; import { copyFile, mkdir, rm, writeFile } from "node:fs/promises"; import { dirname } from "node:path"; import writeFileAtomic from "write-file-atomic"; @@ -24,6 +30,7 @@ import { npxRegistrationCommand } from "./ClientRegistrationIdentity.js"; import { MCP_STARTUP_POLICY } from "../mcpStartupPolicy.js"; import { resolveClientConfigTransactionPath } from "./ClientConfigPath.js"; import { + readRegularFile, readRegularFileText, RegularFileCleanupFailure, } from "./RegularFileRead.js"; @@ -35,6 +42,26 @@ import type { } from "./SetupTypes.js"; import type { SetupClient } from "./SupportedClients.js"; +export class ClientConfigurationCleanupRollbackFailure extends RegularFileCleanupFailure { + constructor( + failure: RegularFileCleanupFailure, + readonly configurationFailure: Extract< + ClientConfigurationResult, + { readonly status: "failed"; readonly reason: "rollback" } + >, + ) { + super( + failure.path, + failure.owner, + failure.outcome, + new AggregateError( + [failure.cleanupCause, new Error(configurationFailure.failure.detail)], + `Configuration readback cleanup and rollback failed: ${configurationFailure.failure.path}`, + ), + ); + } +} + /** Configure one supported client's native stdio MCP registration shape. */ export const configureClientConfiguration = ( client: SetupClient, @@ -120,12 +147,15 @@ const configureClientDocument = async ( void cause; return { status: "failed", reason: "readback" }; } - const desired = clientConfigurationDesired( - client, - environment, - command, - parsed, - ); + const fallback = await readZcodeFallbackServers(client, parsed); + if (!fallback.ok) { + throwCleanupFailure(fallback.error); + return { status: "failed", reason: "readback" }; + } + const desired = clientConfigurationDesired(client, environment, command, { + ...parsed, + servers: { ...fallback.value, ...parsed.servers }, + }); if (registrationCurrent(parsed, desired)) return { status: "unchanged" }; return persistClientConfiguration({ client, @@ -134,6 +164,7 @@ const configureClientDocument = async ( original, parsed, desired, + fallbackServers: fallback.value, }); }; @@ -144,6 +175,7 @@ interface ClientConfigurationUpdate { readonly original: string | undefined; readonly parsed: ClientConfigurationDocument; readonly desired: unknown; + readonly fallbackServers: Readonly>; } const persistClientConfiguration = async ({ @@ -153,14 +185,27 @@ const persistClientConfiguration = async ({ original, parsed, desired, + fallbackServers, }: ClientConfigurationUpdate): Promise => { const backupPath = original === undefined ? undefined : `${client.configPath}.rea.backup`; - if ( - backupPath !== undefined && - !(await preserveConfigBackup(transactionPath, backupPath)) - ) - return { status: "failed", reason: "backup" }; + let recoveryBackupPath: string | undefined; + if (backupPath !== undefined && original !== undefined) { + const selection = await selectCurrentRecoveryBackup(backupPath, original); + if (!selection.ok) return { status: "failed", reason: "backup" }; + if ( + !(await preserveConfigBackup(transactionPath, selection.value.backupPath)) + ) + return { status: "failed", reason: "backup" }; + const verified = await selectCurrentRecoveryBackup(backupPath, original); + if ( + !verified.ok || + verified.value.backupPath !== selection.value.backupPath || + !verified.value.present + ) + return { status: "failed", reason: "backup" }; + recoveryBackupPath = verified.value.backupPath; + } // A native OpenCode V2 entry replaces REA's legacy V1 entry, which would // otherwise conflict with it. const legacyPath = legacyClientServerPath( @@ -169,7 +214,11 @@ const persistClientConfiguration = async ({ ); const registered = withClientServers( parsed, - { ...parsed.servers, [PRODUCT_IDENTITY.mcpServerKey]: desired }, + { + ...fallbackServers, + ...parsed.servers, + [PRODUCT_IDENTITY.mcpServerKey]: desired, + }, PRODUCT_IDENTITY.mcpServerKey, ); // OMP's denylist would hide the registration; keep every other listed name. @@ -194,6 +243,9 @@ const persistClientConfiguration = async ({ await writeFileAtomic( transactionPath, serializeClientConfiguration(document, format, original, [ + ...Object.keys(fallbackServers) + .filter((name) => name !== PRODUCT_IDENTITY.mcpServerKey) + .map((name) => clientServerPath(parsed, name)), clientServerPath(parsed, PRODUCT_IDENTITY.mcpServerKey), ...(legacyPath === undefined ? [] : [legacyPath]), ...(enableOmp ? [[OMP_DISABLED_SERVERS_KEY]] : []), @@ -213,20 +265,47 @@ const persistClientConfiguration = async ({ await readRegularFileText(transactionPath), format, ); - if (!registrationCurrent(readback, desired)) { - await restoreConfig(transactionPath, original); - return { status: "failed", reason: "readback" }; + if ( + !registrationCurrent(readback, desired) || + Object.entries(fallbackServers).some( + ([name, entry]) => + name !== PRODUCT_IDENTITY.mcpServerKey && + !clientConfigurationValuesEqual(readback.servers[name], entry), + ) + ) { + return rollbackOrReadbackFailure( + transactionPath, + original, + recoveryBackupPath, + ); } } catch (cause: unknown) { - if (cause instanceof RegularFileCleanupFailure) throw cause; + if (cause instanceof RegularFileCleanupFailure) { + const rollback = await restoreConfig(transactionPath, original); + if (!rollback.ok) + throw new ClientConfigurationCleanupRollbackFailure(cause, { + status: "failed", + reason: "rollback", + ...(recoveryBackupPath === undefined + ? {} + : { backupPath: recoveryBackupPath }), + failure: rollback.error, + }); + throw cause; + } // Readback failure restores the transaction before reporting. void cause; - await restoreConfig(transactionPath, original); - return { status: "failed", reason: "readback" }; + return rollbackOrReadbackFailure( + transactionPath, + original, + recoveryBackupPath, + ); } return { status: "configured", - ...(backupPath === undefined ? {} : { backupPath }), + ...(recoveryBackupPath === undefined + ? {} + : { backupPath: recoveryBackupPath }), }; }; @@ -329,7 +408,14 @@ export const inspectClientConfiguration = async ( original = await readRegularFileText(transactionPath); } catch (cause: unknown) { if (cause instanceof RegularFileCleanupFailure) throw cause; - if (isMissing(cause)) return { status: "create" }; + if (isMissing(cause)) { + const fallback = await readZcodeFallbackServers(client); + if (!fallback.ok) { + throwCleanupFailure(fallback.error); + return { status: "invalid", remediation: fallback.error.detail }; + } + return { status: "create" }; + } return { status: "invalid", remediation: `The configuration file could not be read. Check its permissions before rerunning setup. ${cause instanceof Error ? cause.message : String(cause)}`, @@ -359,6 +445,11 @@ export const inspectClientConfiguration = async ( ); if (registrationCurrent(parsed, desired)) return { status: "already_current" }; + const fallback = await readZcodeFallbackServers(client, parsed); + if (!fallback.ok) { + throwCleanupFailure(fallback.error); + return { status: "invalid", remediation: fallback.error.detail }; + } } catch (cause: unknown) { if (cause instanceof RegularFileCleanupFailure) throw cause; // Malformed configuration is reported with the invalid remediation. @@ -369,9 +460,18 @@ export const inspectClientConfiguration = async ( "The existing configuration is malformed. Repair it before setup applies any other changes.", }; } + const backupSelection = await selectCurrentRecoveryBackup( + `${client.configPath}.rea.backup`, + original, + ); + if (!backupSelection.ok) + return { + status: "invalid", + remediation: backupSelection.error.detail, + }; return { status: "update", - backupPath: `${client.configPath}.rea.backup`, + backupPath: backupSelection.value.backupPath, }; }; @@ -382,6 +482,48 @@ const throwCleanupFailure = (error: ClientConfigurationFileError): void => { if (error.cleanupFailure !== undefined) throw error.cleanupFailure; }; +/** Admit the fallback only when the first native ZCode server would suppress it. */ +const readZcodeFallbackServers = async ( + client: SetupClient, + parsed?: ClientConfigurationDocument, +): Promise< + Result>, ClientConfigurationFileError> +> => { + if ( + client.format !== "zcode" || + (parsed !== undefined && Object.keys(parsed.servers).length > 0) + ) + return ok({}); + const path = client.zcodeFallbackPath; + const detail = `The ZCode fallback configuration ${path ?? "path"} is unresolved, malformed or unreadable. Repair it before rerunning setup: the first native server would suppress that fallback.`; + if (path === undefined) + return err({ kind: "unreadable", path: client.configPath, detail }); + const transactionPath = await resolveClientConfigTransactionPath(path); + if (transactionPath === undefined) + return err({ kind: "unreadable", path, detail }); + const source = await readConfigurationText(transactionPath); + if (!source.ok) + return err({ ...source.error, detail: `${detail} ${source.error.detail}` }); + if (source.value === undefined) return ok({}); + try { + const parsed = parseZcodeFallbackConfiguration(source.value); + const environment = clientRegistrationEnvironment(parsed); + if (!environment.ok) + return err({ + kind: "malformed", + path, + detail: `${detail} ${environment.error.settings.map(({ setting, constraint }) => `${setting}: ${constraint}`).join("; ")}`, + }); + return ok(parsed.servers); + } catch (cause: unknown) { + return err({ + kind: "malformed", + path, + detail: `${detail} ${cause instanceof Error ? cause.message : String(cause)}`, + }); + } +}; + const preserveConfigBackup = async ( source: string, destination: string, @@ -394,19 +536,101 @@ const preserveConfigBackup = async ( } }; +interface RecoveryBackupSelection { + readonly backupPath: string; + readonly present: boolean; +} + +interface RecoveryBackupSelectionFailure { + readonly kind: "unreadable" | "occupied"; + readonly path: string; + readonly detail: string; +} + +const selectCurrentRecoveryBackup = async ( + firstBackupPath: string, + original: string, +): Promise> => { + const expected = Buffer.from(original, "utf8"); + let firstBackup: Buffer | undefined; + try { + firstBackup = await readRegularFile(firstBackupPath, { + symlinks: "reject", + }); + } catch (cause: unknown) { + if (cause instanceof RegularFileCleanupFailure) throw cause; + if (!isMissing(cause)) + return err({ + kind: "unreadable", + path: firstBackupPath, + detail: `The recovery backup could not be checked: ${errorDetail(cause)}`, + }); + } + if (firstBackup === undefined) + return ok({ backupPath: firstBackupPath, present: false }); + if (firstBackup.equals(expected)) + return ok({ backupPath: firstBackupPath, present: true }); + + const digest = createHash("sha256").update(original, "utf8").digest("hex"); + const recoveryPath = `${firstBackupPath}.${digest}.recovery`; + let recovery: Buffer | undefined; + try { + recovery = await readRegularFile(recoveryPath, { symlinks: "reject" }); + } catch (cause: unknown) { + if (cause instanceof RegularFileCleanupFailure) throw cause; + if (!isMissing(cause)) + return err({ + kind: "unreadable", + path: recoveryPath, + detail: `The recovery backup could not be checked: ${errorDetail(cause)}`, + }); + } + if (recovery !== undefined && !recovery.equals(expected)) + return err({ + kind: "occupied", + path: recoveryPath, + detail: `The recovery path already contains different data: ${recoveryPath}`, + }); + return ok({ backupPath: recoveryPath, present: recovery !== undefined }); +}; + const restoreConfig = async ( path: string, original: string | undefined, -): Promise => { +): Promise< + Result< + void, + { readonly kind: "restore"; readonly path: string; readonly detail: string } + > +> => { try { if (original === undefined) await rm(path, { force: true }); else await writeFile(path, original, { encoding: "utf8", mode: 0o600 }); + return ok(undefined); } catch (cause: unknown) { - // The backup remains available for the remediation reported by setup. - void cause; + return err({ kind: "restore", path, detail: errorDetail(cause) }); } }; +const rollbackOrReadbackFailure = async ( + targetPath: string, + original: string | undefined, + backupPath: string | undefined, +): Promise => { + const rollback = await restoreConfig(targetPath, original); + return rollback.ok + ? { status: "failed", reason: "readback" } + : { + status: "failed", + reason: "rollback", + ...(backupPath === undefined ? {} : { backupPath }), + failure: rollback.error, + }; +}; + +const errorDetail = (cause: unknown): string => + cause instanceof Error ? cause.message : String(cause); + /** Whether REA's entry matches, no legacy entry remains, and no client disable list suppresses it. */ const registrationCurrent = ( parsed: ClientConfigurationDocument, diff --git a/src/application/SetupClients.ts b/src/application/SetupClients.ts index bbeeedf3f..d86d04b9e 100644 --- a/src/application/SetupClients.ts +++ b/src/application/SetupClients.ts @@ -6,15 +6,19 @@ import type { } from "./SetupTypes.js"; import type { SetupClient } from "./SupportedClients.js"; -const failedConfigurationMessage = ( - reason: "path" | "backup" | "write" | "readback", +export const failedConfigurationMessage = ( + result: Extract, ): string => { - if (reason === "path") + if (result.reason === "path") return "Agent configuration path could not be safely verified. Check its permissions and, if it is a symbolic link, verify that the link resolves to a regular file owned by the current user, then rerun setup."; - if (reason === "backup") + if (result.reason === "backup") return "Agent configuration could not be backed up, so no change was made. Check file permissions, then rerun setup."; - if (reason === "write") + if (result.reason === "write") return "Agent configuration could not be updated. Check file permissions, then rerun setup."; + if (result.reason === "rollback") + return result.backupPath === undefined + ? `Agent configuration rollback failed at ${result.failure.path}: ${result.failure.detail}; the failed first-run file may remain. Remove or repair it before rerunning setup.` + : `Agent configuration rollback failed at ${result.failure.path}: ${result.failure.detail}. Inspect the preserved backup at ${result.backupPath} and restore the intended configuration, then rerun setup.`; return "Agent configuration could not be verified after writing. Repair the configuration file or restore its `.rea.backup`, then rerun setup."; }; @@ -40,12 +44,12 @@ export const configureDetectedClients = async (options: { ); options.clients[client.name] = result; if (result.status === "failed") { - failure ??= failedConfigurationMessage(result.reason); + failure ??= failedConfigurationMessage(result); options.onProgress?.({ actionId, label, state: "failed", - detail: failedConfigurationMessage(result.reason), + detail: failedConfigurationMessage(result), }); } else if (result.status === "configured") { options.appliedActions.push(`configured_${client.name}`); diff --git a/src/application/SetupHost.ts b/src/application/SetupHost.ts index 9e2ae95f1..7ac6828fd 100644 --- a/src/application/SetupHost.ts +++ b/src/application/SetupHost.ts @@ -33,9 +33,11 @@ import { } from "./SetupSkill.js"; import { clientConfigurationAligned, + ClientConfigurationCleanupRollbackFailure, configureClientConfiguration, inspectClientConfiguration, } from "./SetupClientConfiguration.js"; +import { failedConfigurationMessage } from "./SetupClients.js"; import { setupInstallFailure } from "./SetupInstallFailure.js"; import { RegularFileCleanupFailure, @@ -275,8 +277,12 @@ const runClientConfigurationOperation = async ( cleanup.outcome.kind === "failed" ? cleanup.outcome.cause : cause.cleanupCause; + const rollbackMessage = + cause instanceof ClientConfigurationCleanupRollbackFailure + ? ` ${failedConfigurationMessage(cause.configurationFailure)}` + : ""; throw configurationCleanupError( - `Could not safely access client configuration at ${cause.path}: ${errorMessage(primary)}`, + `Could not safely access client configuration at ${cause.path}: ${errorMessage(primary)}.${rollbackMessage}`, cause, cleanup.cleanup, ); diff --git a/src/application/SetupInstallFailure.test.ts b/src/application/SetupInstallFailure.test.ts new file mode 100644 index 000000000..980e22151 --- /dev/null +++ b/src/application/SetupInstallFailure.test.ts @@ -0,0 +1,23 @@ +import { describe, expect, it } from "vitest"; + +import { HOPPER_PUBLISHER } from "./MacHopper.js"; +import { setupInstallFailure } from "./SetupInstallFailure.js"; + +describe("macOS Hopper setup failure projection", () => { + it("projects a publisher mismatch onto its own code and recovery", () => { + expect(setupInstallFailure("publisher_verification_failed")).toEqual({ + status: "failed", + code: "publisher_verification_failed", + remediation: `The mounted Hopper application is not signed by the publisher REA pins (${HOPPER_PUBLISHER.bundleIdentifier}, Apple team ${HOPPER_PUBLISHER.teamIdentifier}); nothing was copied or launched. Install Hopper yourself and set HOPPER_LAUNCHER_PATH to its launcher, then rerun rea setup.`, + }); + }); + + it("keeps a broken bundle distinct from a publisher mismatch", () => { + expect(setupInstallFailure("bundle")).toEqual({ + status: "failed", + code: "bundle_invalid", + remediation: + "The mounted package did not contain the expected Hopper application bundle. Retry setup; if it repeats, update REA before installing.", + }); + }); +}); diff --git a/src/application/SetupInstallFailure.ts b/src/application/SetupInstallFailure.ts index fe2a2739e..0b332fa25 100644 --- a/src/application/SetupInstallFailure.ts +++ b/src/application/SetupInstallFailure.ts @@ -1,3 +1,5 @@ +import { HOPPER_PUBLISHER } from "./MacHopper.js"; + export type SetupFailureCode = | "unsupported_host" | "download_failed" @@ -10,6 +12,7 @@ export type SetupFailureCode = | "destination_exists" | "mount_failed" | "bundle_invalid" + | "publisher_verification_failed" | "copy_failed" | "skill_install_failed" | "cleanup_failed"; @@ -39,6 +42,7 @@ export type HopperInstallFailureReason = | "destination_exists" | "mount" | "bundle" + | "publisher_verification_failed" | "copy"; /** Map provider installer failures to stable setup codes and safe recovery. */ @@ -115,6 +119,12 @@ export const setupInstallFailure = ( remediation: "The mounted package did not contain the expected Hopper application bundle. Retry setup; if it repeats, update REA before installing.", }; + case "publisher_verification_failed": + return { + status: "failed", + code: "publisher_verification_failed", + remediation: `The mounted Hopper application is not signed by the publisher REA pins (${HOPPER_PUBLISHER.bundleIdentifier}, Apple team ${HOPPER_PUBLISHER.teamIdentifier}); nothing was copied or launched. Install Hopper yourself and set HOPPER_LAUNCHER_PATH to its launcher, then rerun rea setup.`, + }; case "copy": return { status: "failed", diff --git a/src/application/SetupPlan.ts b/src/application/SetupPlan.ts index 83402d1a4..a78697c80 100644 --- a/src/application/SetupPlan.ts +++ b/src/application/SetupPlan.ts @@ -320,5 +320,5 @@ const clientConfigurationDetail = ( ? " If this plan installs Hopper, REA will add HOPPER_LAUNCHER_PATH using the launcher path reported by that installation." : " The HOPPER_LAUNCHER_PATH value shown above is the current fallback; if this plan installs Hopper, REA will replace it with the launcher path reported by that installation." : ""; - return `Add the REA MCP registration for ${client}; preserve unrelated configuration. Command: ${command.map((part) => JSON.stringify(part)).join(" ")}.${environmentDetail}${hopperDetail}`; + return `Add the REA MCP registration for ${client}; preserve unrelated configuration. The backup path reflects the configuration inspected for this plan; if that file changes before execution, setup will select a recovery path for its current contents. Command: ${command.map((part) => JSON.stringify(part)).join(" ")}.${environmentDetail}${hopperDetail}`; }; diff --git a/src/application/SetupTypes.ts b/src/application/SetupTypes.ts index da58abbff..241e0f6dd 100644 --- a/src/application/SetupTypes.ts +++ b/src/application/SetupTypes.ts @@ -26,6 +26,16 @@ export type ClientConfigurationResult = | { readonly status: "failed"; readonly reason: "path" | "backup" | "write" | "readback"; + } + | { + readonly status: "failed"; + readonly reason: "rollback"; + readonly backupPath?: string; + readonly failure: { + readonly kind: "restore"; + readonly path: string; + readonly detail: string; + }; }; /** Read-only state used to block unsafe setup plans before any mutation. */ diff --git a/src/application/SupportedClients.ts b/src/application/SupportedClients.ts index b44e5017a..488dda49d 100644 --- a/src/application/SupportedClients.ts +++ b/src/application/SupportedClients.ts @@ -26,6 +26,8 @@ export interface SetupClient { }; /** Unresolved path evidence only; consumers must not perform I/O on it. */ readonly configPathError?: string; + /** Same-scope fallback ZCode stops loading after its first native server. */ + readonly zcodeFallbackPath?: string; readonly markerPath?: string; readonly format?: | "json" @@ -38,6 +40,7 @@ export interface SetupClient { | "omp" | "pi" | "hermes" + | "zcode" | "dsh" | "unsupported"; } @@ -64,6 +67,7 @@ interface ClientDefinition { readonly configPath: ClientPath; readonly markerPath: ClientPath; readonly format: NonNullable; + readonly zcodeFallbackPath?: (context: ClientPathContext) => string; readonly skillPath?: ClientPath; readonly configPaths?: (context: ClientPathContext) => readonly string[]; readonly geminiSettings?: ( @@ -71,6 +75,10 @@ interface ClientDefinition { ) => NonNullable; } +/** XDG treats an empty config-home value as unset. */ +const xdgConfigHome = ({ home, env }: ClientPathContext): string => + env.XDG_CONFIG_HOME || join(home, ".config"); + const vscodeUserDirectory = ({ home, platform, @@ -84,7 +92,23 @@ const vscodeUserDirectory = ({ ); if (platform === "darwin") return join(home, "Library", "Application Support", "Code", "User"); - return join(env.XDG_CONFIG_HOME ?? join(home, ".config"), "Code", "User"); + return join(xdgConfigHome({ home, platform, env }), "Code", "User"); +}; + +const traeUserDirectory = ({ + home, + platform, + env, +}: ClientPathContext): string => { + if (platform === "win32") + return join( + env.APPDATA ?? join(home, "AppData", "Roaming"), + "Trae", + "User", + ); + if (platform === "darwin") + return join(home, "Library", "Application Support", "Trae", "User"); + return join(xdgConfigHome({ home, platform, env }), "Trae", "User"); }; const claudeDesktopDirectory = ({ @@ -95,7 +119,7 @@ const claudeDesktopDirectory = ({ if (platform === "win32") return join(env.APPDATA ?? join(home, "AppData", "Roaming"), "Claude"); if (platform === "linux") - return join(env.XDG_CONFIG_HOME ?? join(home, ".config"), "Claude"); + return join(xdgConfigHome({ home, platform, env }), "Claude"); return join(home, "Library", "Application Support", "Claude"); }; @@ -108,6 +132,9 @@ const claudeCodeMarkerDirectory = ({ home, env }: ClientPathContext): string => const codexDirectory = ({ home, env }: ClientPathContext): string => env.CODEX_HOME || join(home, ".codex"); +const qoderDirectory = ({ home, env }: ClientPathContext): string => + env.QODER_CONFIG_DIR || join(home, ".qoder"); + /** Match Qwen Code's home override, including tilde and cwd-relative paths. */ const qwenCodeDirectory = ({ home, env }: ClientPathContext): string => { const override = env.QWEN_HOME; @@ -245,19 +272,13 @@ const openCodeOverrideDirectory = ( const opencodeDirectory = (context: ClientPathContext): string => openCodeOverrideDirectory(context.env) ?? - join( - context.env.XDG_CONFIG_HOME ?? join(context.home, ".config"), - "opencode", - ); + join(xdgConfigHome(context), "opencode"); /** OpenCode loads global JSON before JSONC, then explicit file and directory overrides. */ const openCodeConfigurationPaths = ( context: ClientPathContext, ): readonly string[] => { - const directory = join( - context.env.XDG_CONFIG_HOME ?? join(context.home, ".config"), - "opencode", - ); + const directory = join(xdgConfigHome(context), "opencode"); const overrideDirectory = openCodeOverrideDirectory(context.env); const paths = [ join(directory, "config.json"), @@ -460,6 +481,15 @@ export const SUPPORTED_CLIENT_DEFINITIONS = [ markerPath: vscodeUserDirectory, format: "vscode", }, + { + name: "trae", + displayName: "Trae", + skillPath: [".trae", "skills"], + configPath: (context: ClientPathContext) => + join(traeUserDirectory(context), "mcp.json"), + markerPath: traeUserDirectory, + format: "json", + }, { name: "grok_build", displayName: "Grok Build", @@ -499,6 +529,26 @@ export const SUPPORTED_CLIENT_DEFINITIONS = [ markerPath: hermesDirectory, format: "hermes", }, + { + name: "qoder", + displayName: "Qoder", + skillPath: (context: ClientPathContext) => + join(qoderDirectory(context), "skills"), + configPath: (context: ClientPathContext) => + join(qoderDirectory(context), "settings.json"), + markerPath: qoderDirectory, + format: "json", + }, + { + name: "zcode", + zcodeFallbackPath: ({ home }: ClientPathContext) => + join(home, ".agents", "mcp.json"), + displayName: "ZCode", + configPath: [".zcode", "cli", "config.json"], + markerPath: [".zcode", "cli"], + skillPath: [".zcode", "skills"], + format: "zcode", + }, { name: "dsh", displayName: "DeepSeek Harness", @@ -590,6 +640,9 @@ export const supportedClients = ( ...new Set([...definition.configPaths(context), configPath]), ], }), + ...(definition.zcodeFallbackPath === undefined + ? {} + : { zcodeFallbackPath: definition.zcodeFallbackPath(context) }), markerPath: marker.value, format: definition.format, }; diff --git a/src/application/TypeScriptEmittedSourceCandidates.ts b/src/application/TypeScriptEmittedSourceCandidates.ts index 663c7dada..0e7adf41c 100644 --- a/src/application/TypeScriptEmittedSourceCandidates.ts +++ b/src/application/TypeScriptEmittedSourceCandidates.ts @@ -8,6 +8,11 @@ const EMITTED_SUFFIXES: ReadonlyArray< [".jsx", [".tsx", ".d.ts"]], ]; +export interface TypeScriptEmittedSourceCandidate { + readonly path: string; + readonly kind: "implementation" | "declaration"; +} + /** * Return TypeScript source counterparts for an explicit emitted filename. * Callers retain exact runtime-file precedence and must not use these for @@ -16,7 +21,7 @@ const EMITTED_SUFFIXES: ReadonlyArray< export const typescriptEmittedSourceCandidates = ( sourcePath: string, candidate: string, -): readonly string[] => { +): readonly TypeScriptEmittedSourceCandidate[] => { if (!/\.(?:ts|tsx|mts|cts)$/u.test(sourcePath)) return []; const emitted = EMITTED_SUFFIXES.find(([suffix]) => candidate.endsWith(suffix), @@ -25,5 +30,8 @@ export const typescriptEmittedSourceCandidates = ( // Strip the matched suffix by length. posix.extname would miss dotfile // names such as ".js", whose whole basename is the emitted suffix itself. const stem = candidate.slice(0, candidate.length - emitted[0].length); - return emitted[1].map((suffix) => `${stem}${suffix}`); + return emitted[1].map((suffix) => ({ + path: `${stem}${suffix}`, + kind: suffix.startsWith(".d.") ? "declaration" : "implementation", + })); }; diff --git a/src/application/Uninstall.ts b/src/application/Uninstall.ts index 9880c8cb9..a7f051a49 100644 --- a/src/application/Uninstall.ts +++ b/src/application/Uninstall.ts @@ -1,4 +1,5 @@ import { + ClientConfigurationShapeError, parseClientConfiguration, serializeClientConfiguration, clientServerPath, @@ -6,7 +7,7 @@ import { withClientServers, type ClientConfigurationDocument, } from "./ClientConfigurationDocument.js"; -import { copyFile, lstat, realpath, rm } from "node:fs/promises"; +import { copyFile, lstat, realpath, rm, rmdir } from "node:fs/promises"; import { constants as fsConstants } from "node:fs"; import { homeDirectoryFromEnvironment } from "../config/homeDirectory.js"; import { join } from "node:path"; @@ -24,7 +25,11 @@ import { import { isOwnedClientRegistrationCommand } from "./ClientRegistrationIdentity.js"; import { dshDocument } from "./DshCordisPatch.js"; import { resolveClientConfigTransactionPath } from "./ClientConfigPath.js"; -import { readRegularFileText } from "./RegularFileRead.js"; +import { + InvalidUtf8FileError, + RegularFileCleanupFailure, + readRegularFileText, +} from "./RegularFileRead.js"; import { ArtifactResourceScope } from "../artifacts/ArtifactResourceScope.js"; import { manualRegistrationRemediation, @@ -50,6 +55,8 @@ export interface UninstallFileSystem { stat(path: string): Promise; realpath?(path: string): Promise; remove(path: string, recursive?: boolean): Promise; + /** Remove a directory only if it is empty; a non-empty one is kept. */ + removeEmptyDirectory?(path: string): Promise; } const systemFileSystem = ( @@ -64,6 +71,7 @@ const systemFileSystem = ( stat: (path) => lstat(path), realpath: (path) => realpath(path), remove: (path, recursive = true) => rm(path, { recursive }), + removeEmptyDirectory: (path) => rmdir(path), }); /** One explicitly classified uninstall action. */ @@ -265,13 +273,17 @@ const readClientConfiguration = async ( try { original = await fileSystem.readText(transactionPath); } catch (cause: unknown) { + const readFailure = + cause instanceof RegularFileCleanupFailure ? cause.cause : cause; return itemRead( isMissing(cause) ? item(client.name, "skipped", "Configuration does not exist.") : item( client.name, "failed", - "Configuration could not be read. Check file permissions, then rerun uninstall.", + readFailure instanceof InvalidUtf8FileError + ? "Configuration is not valid UTF-8 and was not changed. Repair it, then rerun uninstall." + : "Configuration could not be read. Check file permissions, then rerun uninstall.", ), ); } @@ -279,12 +291,13 @@ const readClientConfiguration = async ( const parsed = parseClientConfiguration(original, client.format); return { kind: "configuration", transactionPath, original, parsed }; } catch (cause: unknown) { - void cause; return itemRead( item( client.name, "failed", - `Configuration is not valid ${client.format === "toml" || client.format === "grok" ? "TOML" : client.format === "opencode" ? "JSONC" : "JSON"} and was not changed. Repair it, then rerun uninstall.`, + cause instanceof ClientConfigurationShapeError + ? `Configuration was not changed: ${cause.message}. Repair it, then rerun uninstall.` + : `Configuration is not valid ${client.format === "toml" || client.format === "grok" ? "TOML" : client.format === "opencode" ? "JSONC" : client.format === "hermes" || client.format === "dsh" ? "YAML" : "JSON"} and was not changed. Repair it, then rerun uninstall.`, ), ); } @@ -504,14 +517,11 @@ const removeManagedSkills = async ( environment: Readonly, platform: NodeJS.Platform, ): Promise => { + // Every destination shares one summary item, so each result is labeled by + // the directory it refers to. const results = await Promise.all( - skillDestinations(home, undefined, environment, platform).map( - ({ client, path }) => - removeManagedSkill( - path, - client === "claude_code" ? "Claude Code skill" : "skill", - fileSystem, - ), + skillDestinations(home, undefined, environment, platform).map(({ path }) => + removeManagedSkill(path, path, fileSystem), ), ); const failed = results.find(({ status }) => status === "failed"); @@ -603,10 +613,20 @@ const removeManagedSkill = async ( "REA ownership manifest was retained because a managed file could not be safely removed.", ), ); - else - results.push( - await removeManagedSkillFile(path, manifestName, name, fileSystem), + else { + const manifest = await removeManagedSkillFile( + path, + manifestName, + name, + fileSystem, ); + results.push(manifest); + const directories = + manifest.status === "removed" + ? await removeEmptyManagedDirectories(path, name, fileSystem) + : undefined; + if (directories !== undefined) results.push(directories); + } const failed = results.find(({ status }) => status === "failed"); if (failed !== undefined) return item(name, "failed", results.map(({ detail }) => detail).join(" ")); @@ -618,6 +638,46 @@ const removeManagedSkill = async ( ); }; +/** Directories setup creates for managed files, deepest first, then the root. */ +const MANAGED_SKILL_DIRECTORIES = [ + ...new Set( + MANAGED_SKILL_FILES.map((relativePath) => + relativePath.split("/").slice(0, -1).join("/"), + ).filter((directory) => directory.length > 0), + ), +].sort((left, right) => right.split("/").length - left.split("/").length); + +/** Remove managed directories left empty; any remaining user file keeps them. */ +const removeEmptyManagedDirectories = async ( + root: string, + name: string, + fileSystem: UninstallFileSystem, +): Promise => { + if (fileSystem.removeEmptyDirectory === undefined) return undefined; + for (const directory of [ + ...MANAGED_SKILL_DIRECTORIES.map((relative) => join(root, relative)), + root, + ]) { + try { + await fileSystem.removeEmptyDirectory(directory); + } catch (cause: unknown) { + // User files, an absent directory, or a non-directory keep it as is. + if (!isKeptDirectory(cause)) + return item( + name, + "failed", + `Managed skill directory could not be removed: ${directory}.`, + ); + } + } + return undefined; +}; + +const isKeptDirectory = (cause: unknown): boolean => + cause instanceof Error && + "code" in cause && + ["ENOTEMPTY", "EEXIST", "ENOENT", "ENOTDIR"].includes(String(cause.code)); + const removeManagedSkillFile = async ( root: string, relativePath: string, diff --git a/src/application/UpdateMaintenance.ts b/src/application/UpdateMaintenance.ts index 06ac1b512..fd55c8f23 100644 --- a/src/application/UpdateMaintenance.ts +++ b/src/application/UpdateMaintenance.ts @@ -1,19 +1,10 @@ import { z } from "zod"; -import { PRODUCT_IDENTITY } from "../identity.js"; import { isOwnedClientRegistrationCommand } from "./ClientRegistrationIdentity.js"; -import { readClientRegistrationStatuses } from "./ClientRegistrationStatus.js"; -import { - clientServerForcedEnabled, - clientServerListedDisabled, - effectiveClientServer, - parseClientConfiguration, -} from "./ClientConfigurationDocument.js"; -import { supportedClients } from "./SupportedClients.js"; +import { readClientRegistrationInspections } from "./ClientRegistrationStatus.js"; import { existingSkillDestinations } from "./SetupSkill.js"; import type { SetupAction } from "./SetupTypes.js"; import type { Result } from "../domain/result.js"; -import { readRegularFileText } from "./RegularFileRead.js"; import type { ArtifactResourceScope } from "../artifacts/ArtifactResourceScope.js"; /** Existing REA integrations selected for maintenance, without discovering new targets. */ @@ -61,41 +52,23 @@ export const existingMaintenanceScope = async ( environment: Readonly, resources?: ArtifactResourceScope, ): Promise => { - const registrations = await readClientRegistrationStatuses(home, entryPoint, { - environment, - ...(resources === undefined ? {} : { resources }), - }); - const supported = supportedClients(home, process.platform, environment); + const registrations = await readClientRegistrationInspections( + home, + entryPoint, + { + environment, + ...(resources === undefined ? {} : { resources }), + }, + ); const clients: string[] = []; - for (const registration of registrations) { + for (const { status: registration, activation } of registrations) { if ( + activation !== "enabled" || (registration.state !== "aligned" && registration.state !== "stale") || !isOwnedClientRegistrationCommand(registration.command, entryPoint) ) continue; - const client = supported.find(({ name }) => name === registration.client); - if (client === undefined) continue; - const parsed = parseClientConfiguration( - await readRegularFileText( - client.configPath, - resources === undefined ? {} : { resources }, - ), - client.format, - ); - const enabled = z - .object({ - enabled: z.boolean().optional(), - disabled: z.boolean().optional(), - }) - .parse(effectiveClientServer(parsed, PRODUCT_IDENTITY.mcpServerKey)); - // Root disable lists override enabled entries and OMP's force-on allowlist. - if ( - (enabled.enabled !== false || - clientServerForcedEnabled(parsed, PRODUCT_IDENTITY.mcpServerKey)) && - enabled.disabled !== true && - !clientServerListedDisabled(parsed, PRODUCT_IDENTITY.mcpServerKey) - ) - clients.push(client.name); + clients.push(registration.client); } const skillDestinations = await existingSkillDestinations( home, diff --git a/src/application/WebModulePorts.ts b/src/application/WebModulePorts.ts index 81c94a161..2f03efce0 100644 --- a/src/application/WebModulePorts.ts +++ b/src/application/WebModulePorts.ts @@ -22,6 +22,7 @@ export interface WebModuleArtifacts extends SelectedWebScriptArtifacts { /** Read selected local artifacts without refetching website assets. */ export interface WebModuleArtifactPort { + close?(): Promise; load( input: WebModuleTraceInput, options?: ExecutionOptions, diff --git a/src/application/WebModuleTraceService.ts b/src/application/WebModuleTraceService.ts index f8aa0f8b9..be0936e1c 100644 --- a/src/application/WebModuleTraceService.ts +++ b/src/application/WebModuleTraceService.ts @@ -1,3 +1,4 @@ +import { closeOwnedWebResources } from "./closeOwnedWebResources.js"; import { isAbsolute } from "node:path"; import { z } from "zod"; import type { AnalysisError } from "../domain/analysisErrorBase.js"; @@ -70,7 +71,13 @@ export class WebModuleTraceService { ) {} close(): Promise { - return this.resolver.close?.() ?? Promise.resolve(); + return closeOwnedWebResources( + [ + this.artifacts.close?.bind(this.artifacts), + this.resolver.close?.bind(this.resolver), + ], + "Web module trace cleanup failed", + ); } async trace( diff --git a/src/application/WebNetworkCapturePort.ts b/src/application/WebNetworkCapturePort.ts index 5f9cd5545..2bd0f1968 100644 --- a/src/application/WebNetworkCapturePort.ts +++ b/src/application/WebNetworkCapturePort.ts @@ -12,4 +12,6 @@ export interface WebNetworkCapturePort { input: InspectWebNetworkCaptureInput, options?: ExecutionOptions, ): Promise>; + /** Retry retained reader/runtime cleanup when the owning service shuts down. */ + close?(): Promise; } diff --git a/src/application/WebNetworkCaptureService.ts b/src/application/WebNetworkCaptureService.ts index 326016a26..5a3d5cfea 100644 --- a/src/application/WebNetworkCaptureService.ts +++ b/src/application/WebNetworkCaptureService.ts @@ -10,12 +10,14 @@ import { AnalysisInputError, AnalysisOutputError, } from "../domain/analysisErrorCore.js"; +import { createAnalysisProfile } from "../domain/analysisProfile.js"; import { createEvidence, type Evidence } from "../domain/evidence.js"; import { analysisInputErrorFromIssues } from "../domain/inputIssueProjection.js"; import { jsonObjectSchema } from "../domain/jsonValue.js"; import { err, ok, type Result } from "../domain/result.js"; import { inspectWebNetworkCaptureInputSchema, + captureSensitiveValues, webNetworkCaptureSchema, } from "../domain/webNetworkCapture.js"; @@ -25,6 +27,11 @@ const OPERATION = "inspect_web_network_capture"; export class WebNetworkCaptureService { constructor(readonly port: WebNetworkCapturePort) {} + /** Release resources retained by the selected capture adapter. */ + close(): Promise { + return this.port.close?.() ?? Promise.resolve(); + } + /** Return selected complete records inline, without inventing live browser attribution. */ async inspect( rawInput: unknown, @@ -32,21 +39,8 @@ export class WebNetworkCaptureService { ): Promise> { if (options?.signal?.aborted) return err(new AnalysisCancelledError(OPERATION)); - const declarations = - inspectWebNetworkCaptureInputSchema.shape.sensitive_values.safeParse( - typeof rawInput === "object" && - rawInput !== null && - "sensitive_values" in rawInput - ? rawInput.sensitive_values - : undefined, - ); const failure = (error: AnalysisError): Result => - err( - redactExplicitFailure( - error, - declarations.success ? declarations.data : [], - ), - ); + err(redactExplicitFailure(error, captureSensitiveValues(rawInput))); const parsed = inspectWebNetworkCaptureInputSchema.safeParse(rawInput); if (!parsed.success) return failure( @@ -187,6 +181,15 @@ export class WebNetworkCaptureService { ? [...limitations, subjectUnavailableReason] : limitations, }, + ...(safeValue.format !== "qlog" + ? {} + : { + analysisProfile: createAnalysisProfile(value.decoder, { + qlog_profile: safeValue.qlog.profile, + clock: safeValue.qlog.clock, + scope: safeValue.qlog.scope, + }), + }), confidence: "observed", authority: "historical-reference", limitations, diff --git a/src/application/WebScriptArtifactPort.ts b/src/application/WebScriptArtifactPort.ts index 02214d006..77dcd9cfc 100644 --- a/src/application/WebScriptArtifactPort.ts +++ b/src/application/WebScriptArtifactPort.ts @@ -8,6 +8,7 @@ import type { ExecutionOptions } from "./AnalysisProvider.js"; /** Read the caller-selected capture export and verify the selected source identity. */ export interface WebScriptArtifactPort { + close?(): Promise; load( input: SelectedWebScriptInput, options?: ExecutionOptions, diff --git a/src/application/WebSourceLocationPorts.ts b/src/application/WebSourceLocationPorts.ts index 04fe1742c..1d21783cc 100644 --- a/src/application/WebSourceLocationPorts.ts +++ b/src/application/WebSourceLocationPorts.ts @@ -20,6 +20,7 @@ export interface WebSourceLocationArtifacts extends SelectedWebScriptArtifacts { /** Replaceable artifact acquisition boundary for a caller-selected pairing. */ export interface WebSourceLocationArtifactPort { + close?(): Promise; load( input: WebSourceLocationInput, options?: ExecutionOptions, diff --git a/src/application/WebSourceLocationService.ts b/src/application/WebSourceLocationService.ts index 7be901311..d084bff5a 100644 --- a/src/application/WebSourceLocationService.ts +++ b/src/application/WebSourceLocationService.ts @@ -1,3 +1,4 @@ +import { closeOwnedWebResources } from "./closeOwnedWebResources.js"; import { createHash } from "node:crypto"; import { isAbsolute } from "node:path"; import { z } from "zod"; @@ -71,7 +72,13 @@ export class WebSourceLocationService { ) {} close(): Promise { - return this.decoder.close?.() ?? Promise.resolve(); + return closeOwnedWebResources( + [ + this.artifacts.close?.bind(this.artifacts), + this.decoder.close?.bind(this.decoder), + ], + "Web source-location cleanup failed", + ); } /** Shared CLI/MCP workflow preserves raw declarations and every equal-position match. */ @@ -174,6 +181,7 @@ export class WebSourceLocationService { ); } } + const invalidOutput = (message: string): Result => err(new AnalysisOutputError(OPERATION, message)); const invalid = ( diff --git a/src/application/analysisView/AnalysisViewService.ts b/src/application/analysisView/AnalysisViewService.ts index bf7e52ff6..baaa6b7ca 100644 --- a/src/application/analysisView/AnalysisViewService.ts +++ b/src/application/analysisView/AnalysisViewService.ts @@ -47,14 +47,8 @@ export const inspectAnalysisViewValidated = ( input: InspectAnalysisViewInput, lookup?: EvidenceLookup, ): Result => { - const inline = input.source.kind === "inline" ? input.source.evidence : null; - const inlineCapture = - typeof inline === "object" && - inline !== null && - Object.getOwnPropertyDescriptor(inline, "operation")?.value === - "inspect_web_network_capture"; const accumulator = - input.view.kind === "api-surface" || inlineCapture + input.view.kind === "api-surface" ? new WebNetworkApiSurfaceAccumulator() : undefined; if (input.source.kind === "inline" && accumulator !== undefined) { @@ -69,6 +63,7 @@ export const inspectAnalysisViewValidated = ( evidenceId: parent.evidence_id, operation: parent.operation, normalizedResult: parent.normalized_result, + subject: parent.subject, limitations: parent.limitations, parameters: parent.parameters, artifact: @@ -101,6 +96,38 @@ export interface AnalysisViewRetention { readonly recordEvidence: EvidenceWriter["recordEvidence"] | undefined; } +/** Fail before analysis when selected delivery cannot keep its complete source. */ +export const requireAnalysisViewRetention = ( + operation: string, + retention: AnalysisViewRetention, +): Result< + { + readonly evidenceById: EvidenceLookup; + readonly recordEvidence: EvidenceWriter["recordEvidence"]; + }, + AnalysisError +> => { + if ( + retention.recordEvidence === undefined || + retention.evidenceById === undefined + ) + return err( + new AnalysisCapabilityUnavailableError( + ANALYSIS_VIEW_PROVIDER.id, + operation, + "summary detail requires a server session that retains Evidence for later views", + { + userMessage: + "This server does not retain Evidence. Select detail complete to receive the complete analysis inline.", + }, + ), + ); + return ok({ + evidenceById: retention.evidenceById, + recordEvidence: retention.recordEvidence, + }); +}; + /** * Retain complete analysis Evidence in the session, then project its summary * view from the retained record. Callers page or select the rest through @@ -110,29 +137,16 @@ export const summarizeRetainedAnalysis = ( evidence: Evidence, retention: AnalysisViewRetention, ): Result => { - if ( - retention.recordEvidence === undefined || - retention.evidenceById === undefined - ) - return err( - new AnalysisCapabilityUnavailableError( - ANALYSIS_VIEW_PROVIDER.id, - evidence.operation, - "summary detail requires a server session that retains Evidence for later views", - { - userMessage: - "This server does not retain Evidence. Select detail complete to receive the complete analysis inline.", - }, - ), - ); - const recorded = retention.recordEvidence(evidence); + const ready = requireAnalysisViewRetention(evidence.operation, retention); + if (!ready.ok) return ready; + const recorded = ready.value.recordEvidence(evidence); if (!recorded.ok) return recorded; return inspectAnalysisViewValidated( { source: { kind: "retained-evidence", evidence_id: evidence.evidence_id }, view: { kind: "summary" }, }, - retention.evidenceById, + ready.value.evidenceById, ); }; diff --git a/src/application/android/AndroidPackageInspection.ts b/src/application/android/AndroidPackageInspection.ts new file mode 100644 index 000000000..3fbaa2f1b --- /dev/null +++ b/src/application/android/AndroidPackageInspection.ts @@ -0,0 +1,43 @@ +import type { ExecutionOptions } from "../AnalysisProvider.js"; +import type { AndroidAnalysisService } from "./AndroidAnalysisService.js"; +import { + requireAnalysisViewRetention, + summarizeRetainedAnalysis, + type AnalysisViewRetention, +} from "../analysisView/AnalysisViewService.js"; +import type { AnalysisError } from "../../domain/analysisErrorBase.js"; +import { AnalysisCancelledError } from "../../domain/analysisErrorCore.js"; +import { androidPackageInspectionInputSchema } from "../../domain/android/androidAnalysis.js"; +import type { Evidence } from "../../domain/evidence.js"; +import { analysisInputErrorFromIssues } from "../../domain/inputIssueProjection.js"; +import { err, type Result } from "../../domain/result.js"; + +/** Preserve the complete provider request; select retained delivery explicitly. */ +export const inspectAndroidPackage = async ( + service: AndroidAnalysisService, + rawInput: unknown, + retention: AnalysisViewRetention, + options?: ExecutionOptions, +): Promise> => { + const operation = "inspect_android_package"; + if (options?.signal?.aborted === true) + return err(new AnalysisCancelledError(operation)); + const parsed = androidPackageInspectionInputSchema.safeParse(rawInput); + if (!parsed.success) + return err( + analysisInputErrorFromIssues(operation, parsed.error.issues, rawInput, { + cause: parsed.error, + }), + ); + if (parsed.data.detail === "summary") { + const ready = requireAnalysisViewRetention(operation, retention); + if (!ready.ok) return ready; + } + const executed = await service.execute( + operation, + { path: parsed.data.path }, + options, + ); + if (!executed.ok || parsed.data.detail !== "summary") return executed; + return summarizeRetainedAnalysis(executed.value, retention); +}; diff --git a/src/application/binary/AnalysisClientCleanup.test.ts b/src/application/binary/AnalysisClientCleanup.test.ts index e3dae7646..3ca21b06f 100644 --- a/src/application/binary/AnalysisClientCleanup.test.ts +++ b/src/application/binary/AnalysisClientCleanup.test.ts @@ -71,5 +71,9 @@ it("preserves the original explanation and collected output alongside cleanup un }, }, }); - expect(combined.cause).toBe(primary); + expect(combined.cause).toBeInstanceOf(AggregateError); + expect(combined.cause).toMatchObject({ + cause: primary, + errors: [primary, cleanup], + }); }); diff --git a/src/application/binary/AnalysisSnapshotCache.ts b/src/application/binary/AnalysisSnapshotCache.ts index 6440ccf6a..bdaa9f68d 100644 --- a/src/application/binary/AnalysisSnapshotCache.ts +++ b/src/application/binary/AnalysisSnapshotCache.ts @@ -8,6 +8,7 @@ import { } from "../../domain/evidenceErrors.js"; import { NoBinaryOpenError } from "../../domain/configurationErrors.js"; import type { AnalysisError } from "../../domain/analysisErrorBase.js"; +import type { AnalysisInputError } from "../../domain/analysisErrorCore.js"; import { rebindEvidenceSubjectTargetPath } from "../../domain/evidence.js"; import { err, ok, type Result } from "../../domain/result.js"; import { @@ -190,7 +191,7 @@ export class AnalysisSnapshotCache { | undefined, mergeEvidence: ( bundle: EvidenceBundle, - ) => Result, + ) => Result, ): Result { let validated: AnalysisSnapshot; try { diff --git a/src/application/binary/AnalysisSnapshotFiles.ts b/src/application/binary/AnalysisSnapshotFiles.ts index 174b58bfc..e4b69953a 100644 --- a/src/application/binary/AnalysisSnapshotFiles.ts +++ b/src/application/binary/AnalysisSnapshotFiles.ts @@ -15,6 +15,7 @@ import { err, ok, type Result } from "../../domain/result.js"; import type { AnalysisResourceConstraintError } from "../../domain/analysisErrorCore.js"; import { AnalysisCancelledError } from "../../domain/analysisErrorCore.js"; import { readJsonObjectMembersFile, writeTextFile } from "../JsonFiles.js"; +import { RegularFileCleanupFailure } from "../RegularFileRead.js"; import type { JsonObjectMemberReader } from "../JsonInputFile.js"; import type { ArtifactResourceScope } from "../../artifacts/ArtifactResourceScope.js"; @@ -24,6 +25,7 @@ type SnapshotFailure = EvidenceFileError | EvidenceIntegrityError; export const readAnalysisSnapshot = async ( path: string, signal?: AbortSignal, + resources?: ArtifactResourceScope, ): Promise< Result< AnalysisSnapshot, @@ -61,6 +63,7 @@ export const readAnalysisSnapshot = async ( metadata, ], signal, + resources, ); if (!loaded.ok) return loaded; signal?.throwIfAborted(); @@ -74,6 +77,7 @@ export const readAnalysisSnapshot = async ( signal?.throwIfAborted(); return ok(snapshot); } catch (cause: unknown) { + if (cause instanceof RegularFileCleanupFailure) throw cause; if (signal?.aborted === true) return err(new AnalysisCancelledError("read_evidence_file", { cause })); return err( diff --git a/src/application/binary/BinarySession.ts b/src/application/binary/BinarySession.ts index da8d8e679..f7b2d3529 100644 --- a/src/application/binary/BinarySession.ts +++ b/src/application/binary/BinarySession.ts @@ -81,7 +81,9 @@ export class BinarySession | undefined; #transition: Promise = Promise.resolve(); #transitionGeneration = 0; + #transitionPending = 0; readonly #calls = new Map, number>(); + readonly #promptCompletionControllers = new Set(); readonly #providerRouter: SessionProviderRouter; readonly #runtimeUnavailability = new Map< string, @@ -532,6 +534,38 @@ export class BinarySession return call.finally(() => this.#calls.delete(call)); } + /** Run a prompt lookup only against an already connected provider child. */ + executeIfProviderReady( + name: Parameters[0], + arguments_: Readonly>, + options?: Pick, + ): Promise | undefined> { + const active = this.#active; + if ( + this.#transitionPending > 0 || + active === undefined || + active.client.executeIfReady === undefined + ) + return Promise.resolve(undefined); + + const controller = new AbortController(); + this.#promptCompletionControllers.add(controller); + const signal = + options?.signal === undefined + ? controller.signal + : AbortSignal.any([controller.signal, options.signal]); + const generation = this.#transitionGeneration; + const call = active.client.executeIfReady(name, arguments_, { + ...options, + signal, + }); + this.#calls.set(call, generation); + return call.finally(() => { + this.#calls.delete(call); + this.#promptCompletionControllers.delete(controller); + }); + } + /** Admit one composed request until its result and session bookkeeping settle. */ withAdmittedAnalysis( operationName: string, @@ -588,6 +622,9 @@ export class BinarySession if (!prepared.ok) return prepared; const { active, capability, profile, cacheable, cached } = prepared.value; if (cached !== undefined) return ok(cached); + // A failed reply cannot prove that a dispatched metadata write rolled back. + // Stop replay before dispatch, including reads overlapping the write. + if (capability.effects.mutatesArtifact) this.invalidateSnapshot(); const call = active.client.execute(name, arguments_, options); const result = await call; const profiled = bindExecutionTarget( @@ -645,8 +682,6 @@ export class BinarySession parameters: arguments_, execution: execution.value, }); - } else if (profiled.ok && capability.effects.mutatesArtifact) { - this.invalidateSnapshot(); } return execution; } @@ -727,6 +762,9 @@ export class BinarySession #serialize( operation: (admittedThrough: number) => Promise, ): Promise { + for (const controller of this.#promptCompletionControllers) + controller.abort(); + this.#transitionPending += 1; // Later calls wait for this transition and must not be included in its drain. const admittedThrough = this.#transitionGeneration++; const result = this.#transition.then( @@ -737,6 +775,14 @@ export class BinarySession () => undefined, () => undefined, ); + void result.then( + () => { + this.#transitionPending -= 1; + }, + () => { + this.#transitionPending -= 1; + }, + ); return result; } diff --git a/src/application/binary/BinarySessionPort.ts b/src/application/binary/BinarySessionPort.ts index ee666f665..749e98b2f 100644 --- a/src/application/binary/BinarySessionPort.ts +++ b/src/application/binary/BinarySessionPort.ts @@ -14,6 +14,7 @@ import type { EvidenceIntegrityError } from "../../domain/evidenceErrors.js"; import type { WorkflowSnapshotRecordInput } from "./BinarySessionRecords.js"; import type { + AnalysisExecution, AnalysisOperation, AnalysisOperationPort, ExecutionOptions, @@ -35,6 +36,12 @@ export interface SavedAnalysisSnapshot { /** Target lifecycle used by CLI and MCP without exposing a concrete provider. */ export interface BinarySessionPort extends AnalysisOperationPort, InvestigationRecordPort { + /** Execute only against a positively ready, already-created provider client. */ + executeIfProviderReady( + operation: AnalysisOperation, + parameters: Readonly>, + options?: Pick, + ): Promise | undefined>; /** Hold the active target binding through a complete composed operation. */ withAdmittedAnalysis( operationName: string, diff --git a/src/application/binary/BinarySessionRecords.ts b/src/application/binary/BinarySessionRecords.ts index 182d5892f..456ca70ef 100644 --- a/src/application/binary/BinarySessionRecords.ts +++ b/src/application/binary/BinarySessionRecords.ts @@ -11,6 +11,7 @@ import { AnalysisSnapshotMismatchError, } from "../../domain/evidenceErrors.js"; import type { AnalysisError } from "../../domain/analysisErrorBase.js"; +import type { AnalysisInputError } from "../../domain/analysisErrorCore.js"; import type { UnknownRegistryError } from "../../domain/unknownRegistryError.js"; import type { RecordUnknownInput, @@ -18,6 +19,10 @@ import type { UnknownStatus, UpdateUnknownInput, } from "../../domain/residualUnknown.js"; +import type { + UnknownPage, + UnknownQuery, +} from "../investigation/InvestigationRecordPort.js"; import { err, ok, type Result } from "../../domain/result.js"; import type { AnalysisExecution, @@ -129,7 +134,7 @@ export abstract class BinarySessionRecords { importEvidenceBundle( bundle: unknown, - ): Result { + ): Result { const imported = this.#records.mergeEvidenceBundle(bundle); if (!imported.ok) return imported; if (imported.value.metadataChanged) this.invalidateSnapshot(); @@ -144,9 +149,9 @@ export abstract class BinarySessionRecords { if (this.#snapshotInvalidated) return err( new EvidenceIntegrityError( - "Analysis snapshots are unavailable after analysis metadata mutations", + "Analysis snapshots are unavailable because analysis metadata may have changed", { - userMessage: `Analysis snapshots are unavailable after analysis metadata mutations. ${SNAPSHOT_MUTATION_RECOVERY}`, + userMessage: `Analysis snapshots are unavailable because analysis metadata may have changed. ${SNAPSHOT_MUTATION_RECOVERY}`, }, ), ); @@ -177,9 +182,9 @@ export abstract class BinarySessionRecords { if (active !== undefined && this.#snapshotInvalidated) return err( new EvidenceIntegrityError( - "Analysis snapshots cannot be imported after analysis metadata mutations", + "Analysis snapshots cannot be imported because analysis metadata may have changed", { - userMessage: `Analysis snapshots cannot be imported after analysis metadata mutations. ${SNAPSHOT_MUTATION_RECOVERY}`, + userMessage: `Analysis snapshots cannot be imported because analysis metadata may have changed. ${SNAPSHOT_MUTATION_RECOVERY}`, }, ), ); @@ -349,6 +354,10 @@ export abstract class BinarySessionRecords { return this.#records.listUnknowns(filters); } + listUnknownsPage(query: UnknownQuery = {}): UnknownPage { + return this.#records.listUnknownsPage(query); + } + verifyUnknownResolution(unknownId: string): Result< { readonly valid: boolean; diff --git a/src/application/binary/BinarySessionStatus.ts b/src/application/binary/BinarySessionStatus.ts index 4794bed49..15e0cfd32 100644 --- a/src/application/binary/BinarySessionStatus.ts +++ b/src/application/binary/BinarySessionStatus.ts @@ -198,15 +198,19 @@ type CapabilityAvailabilityCode = Exclude< CapabilityDescriptor["availabilityCode"], undefined >; -type CapabilityProjection = Omit & - ( +// Wire capability projection also covers target-free operations outside binary routing. +type CapabilityProjection = Omit< + CapabilityDescriptor, + "operation" | "available" | "reason" +> & { readonly operation: string } & ( | { readonly available: true; readonly reason: null } | { readonly available: false; readonly reason: string } ); type ProviderCapabilityGroup = ProviderCapabilitySet["groups"][number]; /** Group inline capability facts without merging distinct providers or states. */ -const providerCapabilitySets = ( +/** Project provider descriptors once for binary and target-free status consumers. */ +export const providerCapabilitySets = ( descriptors: readonly CapabilityProjection[], ): ProviderCapabilitySet[] => { const providers = new Map< diff --git a/src/application/binary/CompositeProvider.ts b/src/application/binary/CompositeProvider.ts index b0a7e7c13..05184d279 100644 --- a/src/application/binary/CompositeProvider.ts +++ b/src/application/binary/CompositeProvider.ts @@ -94,6 +94,15 @@ export class CompositeProvider implements AnalysisProvider { return outcomes.find((outcome) => !outcome.ok) ?? ok(null); }; return { + executeIfReady: (operation, parameters, options) => { + const provider = this.#providerByOperation.get(operation); + const client = + provider === undefined ? undefined : clients.get(provider); + return ( + client?.executeIfReady?.(operation, parameters, options) ?? + Promise.resolve(undefined) + ); + }, execute: (operation, parameters, options) => { if (operation === "health") return Promise.resolve( diff --git a/src/application/binary/LazyAnalysisProvider.ts b/src/application/binary/LazyAnalysisProvider.ts index b9127e48b..a87e77445 100644 --- a/src/application/binary/LazyAnalysisProvider.ts +++ b/src/application/binary/LazyAnalysisProvider.ts @@ -79,6 +79,14 @@ class LazyAnalysisClient implements AnalysisClient { #loading: Promise | undefined; #closed = false; + executeIfReady: NonNullable = ( + operation, + parameters, + options, + ) => + this.#client?.executeIfReady?.(operation, parameters, options) ?? + Promise.resolve(undefined); + constructor(loadClient: () => Promise, providerId: string) { this.#loadClient = loadClient; this.#providerId = providerId; diff --git a/src/application/binaryDiagnostics/BinaryLayoutPort.ts b/src/application/binaryDiagnostics/BinaryLayoutPort.ts index a6936a60f..55fe16c8e 100644 --- a/src/application/binaryDiagnostics/BinaryLayoutPort.ts +++ b/src/application/binaryDiagnostics/BinaryLayoutPort.ts @@ -10,6 +10,11 @@ import type { ProviderIdentity } from "../AnalysisProvider.js"; /** Replaceable offline binary-layout provider; owns its parser and process protocol. */ export interface BinaryLayoutPort { readonly identity: ProviderIdentity; + inspectAndClose( + input: InspectBinaryLayoutInput, + options?: ExecutionOptions, + ): Promise>; + close?(): Promise; inspect( input: InspectBinaryLayoutInput, options?: ExecutionOptions, diff --git a/src/application/binaryDiagnostics/BinaryLayoutService.test.ts b/src/application/binaryDiagnostics/BinaryLayoutService.test.ts index e65da65f6..76a8d8551 100644 --- a/src/application/binaryDiagnostics/BinaryLayoutService.test.ts +++ b/src/application/binaryDiagnostics/BinaryLayoutService.test.ts @@ -17,6 +17,9 @@ it.each([ "rejects malformed selection before starting the provider: %j", async (input) => { const service = new BinaryLayoutService({ + inspectAndClose(input, options) { + return this.inspect(input, options); + }, identity: BINARY_LAYOUT_TEST_PROVIDER, inspect: () => { throw new Error("must not run"); @@ -32,6 +35,9 @@ it.each([ it("records the decoded layout once in its Evidence", async () => { const layout = binaryLayoutFixture(); const service = new BinaryLayoutService({ + inspectAndClose(input, options) { + return this.inspect(input, options); + }, identity: BINARY_LAYOUT_TEST_PROVIDER, inspect: () => Promise.resolve(ok(layout)), }); @@ -49,6 +55,9 @@ it("preserves a provider's actionable unsupported reason", async () => { "ELF core belongs to recorded-crash analysis.", ); const service = new BinaryLayoutService({ + inspectAndClose(input, options) { + return this.inspect(input, options); + }, identity: BINARY_LAYOUT_TEST_PROVIDER, inspect: () => Promise.resolve(err(failure)), }); @@ -58,6 +67,9 @@ it("preserves a provider's actionable unsupported reason", async () => { it("cancels before invocation and after an acquired observation", async () => { const controller = new AbortController(); const service = new BinaryLayoutService({ + inspectAndClose(input, options) { + return this.inspect(input, options); + }, identity: BINARY_LAYOUT_TEST_PROVIDER, inspect: () => { controller.abort(); @@ -77,6 +89,9 @@ it("cancels before invocation and after an acquired observation", async () => { }, }); const untouched = new BinaryLayoutService({ + inspectAndClose(input, options) { + return this.inspect(input, options); + }, identity: BINARY_LAYOUT_TEST_PROVIDER, inspect: () => { throw new Error("must not run"); @@ -112,6 +127,9 @@ it.each(["different-path", "invalid-digest", "outside-range"])( permissions: { read: true, write: false, execute: true }, }); const service = new BinaryLayoutService({ + inspectAndClose(input, options) { + return this.inspect(input, options); + }, identity: BINARY_LAYOUT_TEST_PROVIDER, inspect: () => Promise.resolve(ok(fixture)), }); diff --git a/src/application/binaryDiagnostics/BinaryLayoutService.ts b/src/application/binaryDiagnostics/BinaryLayoutService.ts index bdb07da56..68859b64a 100644 --- a/src/application/binaryDiagnostics/BinaryLayoutService.ts +++ b/src/application/binaryDiagnostics/BinaryLayoutService.ts @@ -21,10 +21,36 @@ const OPERATION = "inspect_binary_layout"; export class BinaryLayoutService { constructor(readonly provider: BinaryLayoutPort) {} + close(): Promise { + return this.provider.close?.() ?? Promise.resolve(); + } + /** Bind complete observations to the caller-selected artifact before creating Evidence. */ async inspect( rawInput: unknown, options?: ExecutionOptions, + ): Promise> { + return this.#inspect(rawInput, options, (input) => + this.provider.inspect(input, options), + ); + } + + /** Complete the owned one-shot lifecycle before validating and publishing Evidence. */ + inspectAndClose( + rawInput: unknown, + options?: ExecutionOptions, + ): Promise> { + return this.#inspect(rawInput, options, (input) => + this.provider.inspectAndClose(input, options), + ); + } + + async #inspect( + rawInput: unknown, + options: ExecutionOptions | undefined, + inspect: ( + input: Parameters[0], + ) => ReturnType, ): Promise> { if (options?.signal?.aborted) return err(new AnalysisCancelledError(OPERATION)); @@ -45,7 +71,7 @@ export class BinaryLayoutService { }, ]), ); - const inspected = await this.provider.inspect(input.data, options); + const inspected = await inspect(input.data); if (!inspected.ok) return inspected; const diagnostics = binaryLayoutSchema.shape.diagnostics.safeParse( inspected.value.diagnostics, diff --git a/src/application/binaryDiagnostics/PeResourcesPort.ts b/src/application/binaryDiagnostics/PeResourcesPort.ts index b1a7b53de..ee36d34f3 100644 --- a/src/application/binaryDiagnostics/PeResourcesPort.ts +++ b/src/application/binaryDiagnostics/PeResourcesPort.ts @@ -12,6 +12,7 @@ import type { Result } from "../../domain/result.js"; /** Stable read and PE decoding boundary, independent of an active disassembler session. */ export interface PeResourcesPort { readonly identity: ProviderIdentity; + close?(): Promise; inspect( input: InspectPeResourcesInput, options?: ExecutionOptions, diff --git a/src/application/binaryDiagnostics/PeResourcesService.ts b/src/application/binaryDiagnostics/PeResourcesService.ts index 3c8a53704..87de771a4 100644 --- a/src/application/binaryDiagnostics/PeResourcesService.ts +++ b/src/application/binaryDiagnostics/PeResourcesService.ts @@ -21,6 +21,10 @@ import { err, ok, type Result } from "../../domain/result.js"; export class PeResourcesService { constructor(readonly provider: PeResourcesPort) {} + close(): Promise { + return this.provider.close?.() ?? Promise.resolve(); + } + async inspect( rawInput: unknown, options?: ExecutionOptions, diff --git a/src/application/binaryDiagnostics/RecordedCrashPort.ts b/src/application/binaryDiagnostics/RecordedCrashPort.ts index 3f9551c67..aca32a0e4 100644 --- a/src/application/binaryDiagnostics/RecordedCrashPort.ts +++ b/src/application/binaryDiagnostics/RecordedCrashPort.ts @@ -12,6 +12,11 @@ import type { Result } from "../../domain/result.js"; /** Replaceable decoder of supplied recordings; historical PID is never live authority. */ export interface RecordedCrashPort { readonly identity: ProviderIdentity; + inspectAndClose( + input: InspectRecordedCrashInput, + options?: ExecutionOptions, + ): Promise>; + close?(): Promise; inspect( input: InspectRecordedCrashInput, options?: ExecutionOptions, diff --git a/src/application/binaryDiagnostics/RecordedCrashService.test.ts b/src/application/binaryDiagnostics/RecordedCrashService.test.ts index 0ab49ee1b..cdf7cbd8f 100644 --- a/src/application/binaryDiagnostics/RecordedCrashService.test.ts +++ b/src/application/binaryDiagnostics/RecordedCrashService.test.ts @@ -13,6 +13,9 @@ it("labels an envelope containing debugger-derived maps as derived", async () => const fixture = recordedCrashFixture(); fixture.debugger = recordedCrashDebuggerFixture(); const service = new RecordedCrashService({ + inspectAndClose(input, options) { + return this.inspect(input, options); + }, identity: RECORDED_CRASH_TEST_PROVIDER, inspect: () => Promise.resolve(ok(fixture)), }); @@ -36,6 +39,9 @@ it.each([ "rejects malformed selection before starting the provider: %j", async (input) => { const service = new RecordedCrashService({ + inspectAndClose(input, options) { + return this.inspect(input, options); + }, identity: RECORDED_CRASH_TEST_PROVIDER, inspect: () => { throw new Error("must not run"); @@ -55,6 +61,9 @@ it("preserves a provider's actionable unsupported reason", async () => { "ELF core belongs to recorded-crash analysis.", ); const service = new RecordedCrashService({ + inspectAndClose(input, options) { + return this.inspect(input, options); + }, identity: RECORDED_CRASH_TEST_PROVIDER, inspect: () => Promise.resolve(err(failure)), }); @@ -64,6 +73,9 @@ it("preserves a provider's actionable unsupported reason", async () => { it("cancels before invocation and after an acquired observation", async () => { const controller = new AbortController(); const service = new RecordedCrashService({ + inspectAndClose(input, options) { + return this.inspect(input, options); + }, identity: RECORDED_CRASH_TEST_PROVIDER, inspect: () => { controller.abort(); @@ -83,6 +95,9 @@ it("cancels before invocation and after an acquired observation", async () => { }, }); const untouched = new RecordedCrashService({ + inspectAndClose(input, options) { + return this.inspect(input, options); + }, identity: RECORDED_CRASH_TEST_PROVIDER, inspect: () => { throw new Error("must not run"); @@ -117,6 +132,9 @@ it.each(["different-path", "invalid-digest", "outside-range"])( flags: "0x5", }); const service = new RecordedCrashService({ + inspectAndClose(input, options) { + return this.inspect(input, options); + }, identity: RECORDED_CRASH_TEST_PROVIDER, inspect: () => Promise.resolve(ok(fixture)), }); diff --git a/src/application/binaryDiagnostics/RecordedCrashService.ts b/src/application/binaryDiagnostics/RecordedCrashService.ts index 5a4fff645..df137f83e 100644 --- a/src/application/binaryDiagnostics/RecordedCrashService.ts +++ b/src/application/binaryDiagnostics/RecordedCrashService.ts @@ -21,10 +21,36 @@ const OPERATION = "inspect_recorded_crash"; export class RecordedCrashService { constructor(readonly provider: RecordedCrashPort) {} + close(): Promise { + return this.provider.close?.() ?? Promise.resolve(); + } + /** Bind complete observations to the caller-selected artifact before creating Evidence. */ async inspect( rawInput: unknown, options?: ExecutionOptions, + ): Promise> { + return this.#inspect(rawInput, options, (input) => + this.provider.inspect(input, options), + ); + } + + /** Complete the owned one-shot lifecycle before validating and publishing Evidence. */ + inspectAndClose( + rawInput: unknown, + options?: ExecutionOptions, + ): Promise> { + return this.#inspect(rawInput, options, (input) => + this.provider.inspectAndClose(input, options), + ); + } + + async #inspect( + rawInput: unknown, + options: ExecutionOptions | undefined, + inspect: ( + input: Parameters[0], + ) => ReturnType, ): Promise> { if (options?.signal?.aborted) return err(new AnalysisCancelledError(OPERATION)); @@ -45,7 +71,7 @@ export class RecordedCrashService { }, ]), ); - const inspected = await this.provider.inspect(input.data, options); + const inspected = await inspect(input.data); if (!inspected.ok) return inspected; const diagnostics = recordedCrashSchema.shape.diagnostics.safeParse( inspected.value.diagnostics, diff --git a/src/application/captures/PacketCaptureService.ts b/src/application/captures/PacketCaptureService.ts new file mode 100644 index 000000000..e2877fa3f --- /dev/null +++ b/src/application/captures/PacketCaptureService.ts @@ -0,0 +1,147 @@ +import { + inspectPacketFieldsInputSchema, + packetFieldsCatalogSchema, + type InspectPacketFieldsInput, +} from "../../domain/captures/packetFields.js"; +import type { JsonValue } from "../../domain/jsonValue.js"; +import { isAbsolute } from "node:path"; +import type { + AnalysisExecution, + ExecutionOptions, +} from "../AnalysisProvider.js"; +import type { AnalysisError } from "../../domain/analysisErrorBase.js"; +import { + AnalysisCancelledError, + AnalysisInputError, + AnalysisOutputError, +} from "../../domain/analysisErrorCore.js"; +import { createEvidence, type Evidence } from "../../domain/evidence.js"; +import { analysisInputErrorFromIssues } from "../../domain/inputIssueProjection.js"; +import { + inspectPacketCaptureInputSchema, + packetCaptureSchema, + type InspectPacketCaptureInput, +} from "../../domain/captures/packetCapture.js"; +import { err, ok, type Result } from "../../domain/result.js"; + +export interface PacketCapturePort { + /** Release per-call resources before returning, or retain failed cleanup for close/retry. */ + inspect( + input: InspectPacketCaptureInput, + options?: ExecutionOptions, + ): Promise>; + inspectFields( + input: InspectPacketFieldsInput, + options?: ExecutionOptions, + ): Promise>; + close(): Promise; +} + +/** One shared validation and Evidence owner for CLI and MCP. */ +export class PacketCaptureService { + constructor(readonly provider: PacketCapturePort) {} + close(): Promise { + return this.provider.close(); + } + async inspect( + raw: unknown, + options?: ExecutionOptions, + ): Promise> { + const operation = "inspect_packet_capture"; + if (options?.signal?.aborted) + return err(new AnalysisCancelledError(operation)); + const input = inspectPacketCaptureInputSchema.safeParse(raw); + if (!input.success) + return err( + analysisInputErrorFromIssues(operation, input.error.issues, raw, { + cause: input.error, + }), + ); + if (!isAbsolute(input.data.path)) + return err( + new AnalysisInputError(operation, undefined, [ + { + path: ["path"], + reason: "invalid_format", + message: "Expected an absolute local path.", + }, + ]), + ); + const decoded = await this.provider.inspect(input.data, options); + if (!decoded.ok) return decoded; + const execution = decoded.value; + const report = packetCaptureSchema.safeParse(execution.result); + if ( + !report.success || + report.data.artifact.path !== input.data.path || + execution.subject?.path !== input.data.path || + execution.subject.sha256 !== report.data.artifact.sha256 || + JSON.stringify(report.data.selection) !== JSON.stringify(input.data) + ) + return err( + new AnalysisOutputError( + operation, + "Capture analyzer returned malformed data or changed the selected artifact identity/options.", + ), + ); + return this.#evidence(operation, input.data, execution, options); + } + async inspectFields( + raw: unknown, + options?: ExecutionOptions, + ): Promise> { + const operation = "inspect_packet_fields"; + if (options?.signal?.aborted) + return err(new AnalysisCancelledError(operation)); + const input = inspectPacketFieldsInputSchema.safeParse(raw); + if (!input.success) + return err( + analysisInputErrorFromIssues(operation, input.error.issues, raw, { + cause: input.error, + }), + ); + const decoded = await this.provider.inspectFields(input.data, options); + if (!decoded.ok) return decoded; + const execution = decoded.value; + const report = packetFieldsCatalogSchema.safeParse(execution.result); + if ( + !report.success || + JSON.stringify(report.data.selection) !== JSON.stringify(input.data) || + execution.subject?.path !== report.data.tool.path || + execution.subject.sha256 !== report.data.tool.sha256 + ) + return err( + new AnalysisOutputError( + operation, + "Field discovery returned malformed data or changed the selected installation/options.", + ), + ); + return this.#evidence(operation, input.data, execution, options); + } + #evidence( + operation: string, + parameters: Readonly>, + execution: AnalysisExecution, + options?: ExecutionOptions, + ): Result { + const evidence = createEvidence( + execution.subject ?? undefined, + execution.provider, + { + operation, + parameters, + result: execution.result, + confidence: "observed", + locations: execution.locations, + limitations: execution.limitations, + }, + ); + return options?.signal?.aborted + ? err( + new AnalysisCancelledError(operation, { + partialObservation: evidence, + }), + ) + : ok(evidence); + } +} diff --git a/src/application/closeOwnedWebResources.ts b/src/application/closeOwnedWebResources.ts new file mode 100644 index 000000000..51b3e6f69 --- /dev/null +++ b/src/application/closeOwnedWebResources.ts @@ -0,0 +1,15 @@ +/** Attempt every web workflow cleanup owner and report all failures. */ +export const closeOwnedWebResources = async ( + close: readonly ((() => Promise) | undefined)[], + message: string, +): Promise => { + const results = await Promise.allSettled( + close.flatMap((owner) => + owner === undefined ? [] : [Promise.resolve().then(owner)], + ), + ); + const failures = results.flatMap((result) => + result.status === "rejected" ? [result.reason] : [], + ); + if (failures.length > 0) throw new AggregateError(failures, message); +}; diff --git a/src/application/evm/EvmInterfacePort.ts b/src/application/evm/EvmInterfacePort.ts index e9e29b756..a297e092c 100644 --- a/src/application/evm/EvmInterfacePort.ts +++ b/src/application/evm/EvmInterfacePort.ts @@ -4,13 +4,19 @@ import type { } from "../AnalysisProvider.js"; import type { AnalysisError } from "../../domain/analysisErrorBase.js"; import type { InspectEvmInterfaceInput } from "../../domain/evm/evmInterface.js"; +import type { EvidenceSubjectTarget } from "../../domain/evidence.js"; import type { Result } from "../../domain/result.js"; +/** Successful EVM interface recovery must identify the selected local file. */ +export type EvmInterfaceExecution = Omit & { + readonly subject: EvidenceSubjectTarget & { readonly format: "file" }; +}; + /** Replaceable offline interface-recovery engine, independent of wallets and chain clients. */ export interface EvmInterfacePort { close?(): Promise; inspect( input: InspectEvmInterfaceInput, options?: ExecutionOptions, - ): Promise>; + ): Promise>; } diff --git a/src/application/evm/EvmInterfaceService.test.ts b/src/application/evm/EvmInterfaceService.test.ts index 08cf15487..03f501742 100644 --- a/src/application/evm/EvmInterfaceService.test.ts +++ b/src/application/evm/EvmInterfaceService.test.ts @@ -1,5 +1,6 @@ import { expect, it } from "vitest"; import { EvmInterfaceService } from "./EvmInterfaceService.js"; +import type { EvmInterfaceExecution } from "./EvmInterfacePort.js"; import { evmInterfaceExecution, evmInterfaceFixture, @@ -43,7 +44,8 @@ it.each(["carrier", "encoding", "digest", "no-subject"])( }, }; const service = new EvmInterfaceService({ - inspect: () => Promise.resolve(ok(execution)), + inspect: () => + Promise.resolve(ok(execution as unknown as EvmInterfaceExecution)), }); expect( await service.inspect({ diff --git a/src/application/evm/EvmInterfaceService.ts b/src/application/evm/EvmInterfaceService.ts index eac1986d3..86ac77865 100644 --- a/src/application/evm/EvmInterfaceService.ts +++ b/src/application/evm/EvmInterfaceService.ts @@ -67,6 +67,7 @@ export class EvmInterfaceService { !report.success || report.data.artifact.path !== input.data.path || report.data.artifact.encoding !== input.data.encoding || + execution.subject?.format !== "file" || execution.subject?.path !== input.data.path || execution.subject.sha256 !== report.data.artifact.sha256 ) diff --git a/src/application/flutter/DartAotInspection.ts b/src/application/flutter/DartAotInspection.ts new file mode 100644 index 000000000..c11bbe1f4 --- /dev/null +++ b/src/application/flutter/DartAotInspection.ts @@ -0,0 +1,40 @@ +import type { ExecutionOptions } from "../AnalysisProvider.js"; +import type { FlutterBuildAnalysisService } from "./FlutterBuildAnalysisService.js"; +import { + requireAnalysisViewRetention, + summarizeRetainedAnalysis, + type AnalysisViewRetention, +} from "../analysisView/AnalysisViewService.js"; +import type { AnalysisError } from "../../domain/analysisErrorBase.js"; +import { AnalysisCancelledError } from "../../domain/analysisErrorCore.js"; +import { dartAotInspectionInputSchema } from "../../domain/flutter/flutterBuildAnalysis.js"; +import type { Evidence } from "../../domain/evidence.js"; +import { analysisInputErrorFromIssues } from "../../domain/inputIssueProjection.js"; +import { err, type Result } from "../../domain/result.js"; + +/** Keep the caller's ABI choice and complete analysis; select only its delivery. */ +export const inspectDartAot = async ( + service: FlutterBuildAnalysisService, + rawInput: unknown, + retention: AnalysisViewRetention, + options?: ExecutionOptions, +): Promise> => { + const operation = "inspect_dart_aot"; + if (options?.signal?.aborted === true) + return err(new AnalysisCancelledError(operation)); + const parsed = dartAotInspectionInputSchema.safeParse(rawInput); + if (!parsed.success) + return err( + analysisInputErrorFromIssues(operation, parsed.error.issues, rawInput, { + cause: parsed.error, + }), + ); + if (parsed.data.detail === "summary") { + const ready = requireAnalysisViewRetention(operation, retention); + if (!ready.ok) return ready; + } + const { detail, ...providerInput } = parsed.data; + const executed = await service.execute(operation, providerInput, options); + if (!executed.ok || detail !== "summary") return executed; + return summarizeRetainedAnalysis(executed.value, retention); +}; diff --git a/src/application/flutter/FlutterBuildAnalysisPort.ts b/src/application/flutter/FlutterBuildAnalysisPort.ts new file mode 100644 index 000000000..2a52d060e --- /dev/null +++ b/src/application/flutter/FlutterBuildAnalysisPort.ts @@ -0,0 +1,23 @@ +import type { + AnalysisExecution, + ExecutionOptions, + ProviderAvailability, +} from "../AnalysisProvider.js"; +import type { FlutterRequest } from "../../domain/flutter/flutterBuildAnalysis.js"; +import type { AnalysisError } from "../../domain/analysisErrorBase.js"; +import type { Result } from "../../domain/result.js"; + +/** + * Flutter build-identification boundary by pure APK parsing. + * Implementation details belong to the provider adapter. + */ +export interface FlutterBuildAnalysisPort { + /** Pure parsing; always available. */ + inspectAvailability(signal?: AbortSignal): Promise; + /** The provider holds no long-lived resources; safe to call always. */ + close(): Promise; + execute( + request: FlutterRequest, + options?: ExecutionOptions, + ): Promise>; +} diff --git a/src/application/flutter/FlutterBuildAnalysisService.test.ts b/src/application/flutter/FlutterBuildAnalysisService.test.ts new file mode 100644 index 000000000..1ecf31483 --- /dev/null +++ b/src/application/flutter/FlutterBuildAnalysisService.test.ts @@ -0,0 +1,93 @@ +import { expect, it } from "vitest"; + +import { FlutterBuildAnalysisService } from "./FlutterBuildAnalysisService.js"; +import type { FlutterBuildAnalysisPort } from "./FlutterBuildAnalysisPort.js"; +import { createAnalysisExecution } from "../AnalysisProvider.js"; +import { AnalysisCancelledError } from "../../domain/analysisErrorCore.js"; +import { parseEvidence } from "../../domain/evidence.js"; +import { ok } from "../../domain/result.js"; + +const identity = { + id: "flutter", + name: "Flutter build identification", + version: null, +}; + +const execution = createAnalysisExecution( + { + target: { path: "/targets/app.apk", bytes: 10, sha256: "a".repeat(64) }, + flutter_detected: true, + abis: [], + coverage: "complete", + }, + identity, +); + +const refusing: FlutterBuildAnalysisPort = { + async inspectAvailability() { + throw new Error("must not probe"); + }, + async close() {}, + async execute() { + throw new Error("must not execute"); + }, +}; + +const malformedSelections: readonly unknown[] = [ + { path: "/targets/app.apk", extra: true }, + { path: 7 }, + {}, + { path: "/targets/app.apk", abi: "not a locale" }, +]; +it.each(malformedSelections)("refuses %j at admission", async (input) => { + const settled = await new FlutterBuildAnalysisService(refusing).execute( + "identify_flutter_build", + input, + ); + expect(settled.ok).toBe(false); + if (settled.ok) return; + expect(settled.error._tag).toBe("AnalysisInputError"); +}); + +it("passes the validated request to the provider and seals Evidence", async () => { + const seen: unknown[] = []; + const recording: FlutterBuildAnalysisPort = { + async inspectAvailability() { + return { status: "available", code: null, reason: null, diagnostics: {} }; + }, + async close() {}, + async execute(request) { + seen.push(request); + return ok(execution); + }, + }; + const result = await new FlutterBuildAnalysisService(recording).execute( + "identify_flutter_build", + { path: "/targets/app.apk" }, + ); + expect(seen).toEqual([ + { + operation: "identify_flutter_build", + input: { path: "/targets/app.apk" }, + }, + ]); + if (!result.ok) throw new Error(result.error.message); + const evidence = parseEvidence(result.value); + expect(evidence.provider).toEqual(identity); + expect(evidence.confidence).toBe("observed"); +}); + +it("settles an already-aborted call as cancellation before execution", async () => { + const controller = new AbortController(); + controller.abort(); + const settled = await new FlutterBuildAnalysisService(refusing).execute( + "identify_flutter_build", + { path: "/targets/app.apk" }, + { + signal: controller.signal, + }, + ); + expect(settled.ok).toBe(false); + if (settled.ok) return; + expect(settled.error).toBeInstanceOf(AnalysisCancelledError); +}); diff --git a/src/application/flutter/FlutterBuildAnalysisService.ts b/src/application/flutter/FlutterBuildAnalysisService.ts new file mode 100644 index 000000000..13ddfbba4 --- /dev/null +++ b/src/application/flutter/FlutterBuildAnalysisService.ts @@ -0,0 +1,31 @@ +import type { FlutterBuildAnalysisPort } from "./FlutterBuildAnalysisPort.js"; +import type { ExecutionOptions } from "../AnalysisProvider.js"; +import { + flutterRequestSchema, + type FlutterOperation, +} from "../../domain/flutter/flutterBuildAnalysis.js"; +import type { AnalysisError } from "../../domain/analysisErrorBase.js"; +import type { Evidence } from "../../domain/evidence.js"; +import { executeProviderOperation } from "../ProviderOperationExecution.js"; +import type { Result } from "../../domain/result.js"; + +/** Shared CLI/MCP admission, execution, and Evidence composition for Flutter. */ +export class FlutterBuildAnalysisService { + constructor(readonly provider: FlutterBuildAnalysisPort) {} + + /** Run one caller-selected Flutter request and retain target identity inline. */ + execute( + operation: FlutterOperation, + input: unknown, + options?: ExecutionOptions, + ): Promise> { + return executeProviderOperation( + operation, + input, + options, + flutterRequestSchema, + this.provider, + "observed", + ); + } +} diff --git a/src/application/frida/FridaInstrumentationManager.test.ts b/src/application/frida/FridaInstrumentationManager.test.ts new file mode 100644 index 000000000..7a527a807 --- /dev/null +++ b/src/application/frida/FridaInstrumentationManager.test.ts @@ -0,0 +1,1060 @@ +import { describe, expect, it } from "vitest"; + +import type { + Device, + DeviceManager, + FridaMessage, + Process, + Script, + Session, + Signal, +} from "frida"; +import { FridaInstrumentationManager } from "../../frida/FridaInstrumentationManager.js"; + +const signal = void>() => { + let connected: Handler | undefined; + const value: Signal & { + emit: (...args: Parameters) => void; + } = { + connect: (handler) => { + connected = handler; + }, + disconnect: (handler) => { + if (connected === handler) connected = undefined; + }, + emit: (...args) => connected?.(...args), + }; + return value; +}; + +class FakeScript implements Script { + readonly message = + signal<(message: FridaMessage, data: Buffer | null) => void>(); + isDestroyed = false; + loadFailure: Error | undefined; + unloadFailureCount = 0; + unloadCalls = 0; + + constructor( + readonly payload: unknown = { event: "loaded" }, + readonly beforeLoad: () => Promise = async () => {}, + readonly description = "script loaded", + readonly stack = "", + ) {} + + async load(): Promise { + await this.beforeLoad(); + if (this.loadFailure !== undefined) throw this.loadFailure; + this.message.emit( + { + type: "send", + payload: this.payload, + description: this.description, + stack: this.stack, + }, + null, + ); + } + + async unload(): Promise { + this.unloadCalls += 1; + if (this.unloadFailureCount > 0) { + this.unloadFailureCount -= 1; + throw new Error("script unload failed"); + } + if (this.isDestroyed) throw new Error("Script is destroyed"); + this.isDestroyed = true; + } +} + +class FakeSession implements Session { + readonly detached = signal<() => void>(); + readonly scripts: FakeScript[] = []; + nextPayload: unknown = { event: "loaded" }; + nextDescription = "script loaded"; + nextStack = ""; + nextLoadFailure: Error | undefined; + nextUnloadFailureCount = 0; + detachFailureCount = 0; + scriptLoadGate: Promise | undefined; + onScriptLoadStarted: (() => void) | undefined; + private detachedState = false; + readonly pid = 512; + + isDetached(): boolean { + return this.detachedState; + } + + async createScript(): Promise + @@ -115,14 +110,23 @@ >Reverse Engineer Anything
+
+

Model specialization
Essay

+
+

Game reconstruction
Essay

diff --git a/website/public/blog/reverse-engineering-models/index.html b/website/public/blog/reverse-engineering-models/index.html new file mode 100644 index 000000000..a92f9f84f --- /dev/null +++ b/website/public/blog/reverse-engineering-models/index.html @@ -0,0 +1,888 @@ + + + + + + Does reverse engineering need a bigger model? | REA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +

Essay

+

Does reverse engineering need a bigger model?

+

By N0zoM1z0 · 13 October 2026

+
+

Takeaway

+
    +
  • + Model capability changes the hypotheses an agent can + find. + Later sessions have solved problems that earlier work left + unresolved. +
  • +
  • + A familiar compiler gives specialization something concrete to + learn. + Some exact matches depend on narrow, reusable source patterns. +
  • +
  • + Give repository knowledge a fair comparison. + A smaller model with good retrieval may already know enough to + make progress. +
  • +
  • + Train the next useful experiment, and test its oracle. + The value of feedback depends on what the checker actually + verifies. +
  • +
  • + Measure accepted reconstruction against time and cost. + That is the result I want from the whole agent. +
  • +
+
+
+
+ +
+
+

What better models changed

+

+ Since August 2026, I have been exploring how much reverse + engineering an agent can carry out with access to a program and a + way to check its work. Most of my experience comes from + reconstructing games, especially Touhou. As I have changed models, + the repositories have kept a record of what each session managed + to recover. +

+

+ Much of that work aims at exact reconstruction: we compile the + maintained source under a pinned historical toolchain and check + whether it reproduces the target function. When a later model + succeeds where earlier work stalled, the source changes show what + made that progress possible. +

+

The temporary values had to stay alive together

+

+ Much of a TH09 attack function's logic had already been + reconstructed, but the compiler still stored temporary results + differently from the original. The remaining problem was how long + those results needed to stay alive and when their storage could be + reused. +

+

+ A + GPT-6-Sol checkpoint + recorded this mismatch after testing several ordinary source + arrangements. When + GPT-6.1-Sol returned to the problem, it found a useful hypothesis about how long those temporary + values needed to stay alive. +

+

+ The function produced temporary results and copied them into + animation positions. In C++, a temporary result stays alive until + the expression using it finishes. Grouping the real operations + into one expression kept those results alive together, so the + compiler could no longer reuse the same storage for all of them. +

+

+ One result still shared storage with a value used later for + collision checks. Giving that value its own lifetime resolved the + remaining overlap. After several targeted experiments, + a clean rebuild confirmed that the full function + matched. +

+

+ What interests me is how the discovery and the tests worked + together. The lifetime hypothesis gave the agent a new direction; + compiler feedback helped it refine that hypothesis into a source + arrangement that matched. +

+

A different control-flow graph

+

+ A second TH09 function shows why that new direction can matter. + Here, the obstacle was how several branches shared their final + work. + GPT-6.1-Sol's earlier work + got parts of the function to match, but the branches still joined + up differently from the original. +

+

+ GPT-6-Astra changed the surrounding control-flow graph. The main paths now led to a shared final update and return. In + that source structure, the compiler combined the branches in the + same way as the original. The complete function matched, and a + separate rebuild check confirmed it. +

+

+ Changing the representation opened a more productive search + space. + Both cases give me a reason to take general model capability + seriously: an agent can keep trying local variations for a long + time before finding a better way to express the surrounding work. +

+

+ At the same time, the later sessions started with earlier source + and recorded failures. That accumulated work was part of their + advantage. The history lets us inspect the discoveries and their + checks; a controlled comparison would help separate the effect of + the model from the experience it inherited. +

+

+ This is where the question becomes interesting to me. Some of the + progress came from finding a new representation, while much of the + remaining work involved testing source forms against a familiar + compiler. How much needs broad reasoning ability, and how much + could a model learn through repeated experience with that compiler + and code? +

+
+
+

Why might a specialist do well?

+

+ Touhou gives us a concrete reason to expect that experience to + help. Much of the game code comes from the same author, ZUN, so + recurring habits are a reasonable starting assumption. The + repositories back that up with useful examples: related loops and + helper arrangements have supplied hypotheses across games. +

+

+ Those source patterns become more specific when we include the + compiler. Under a particular version and set of options, small + changes in source can produce repeatable differences in machine + code. Some of those differences are surprisingly obscure. +

+

+ In TH095, for example, + even the name used for a local variable could change where + VC7.1 stored it. Moving the declaration alone did not solve the layout, but an + earlier background function had revealed a naming pattern that + affected the compiler's choice. That gave us a more promising + hypothesis for + the reconstruction of Supervisor::LoadDat. +

+

+ Reusing that pattern for the file-size variable produced the + required layout without adding storage. The full function then + matched. +

+

+ This is the sort of narrow detail a general model may not know + when it arrives. A specialist trained on this compiler could + encounter many such cases and learn which source variations are + worth testing first. +

+

+ The opportunity is especially clear in final matching problems + where we already understand the behavior. We are then asking which + ordinary source form this compiler turns into the observed + instructions. Specialization could help the model propose those + forms more efficiently, while the target still determines which + hypotheses survive. +

+

+ The useful patterns would have to retain their context, though. + TH08 uses an earlier Visual C++ version than TH095 and TH09. TH04 + uses a different DOS-era compiler, and its + player reconstruction + needed different hypotheses about source patterns and how the + compiled code was combined into an executable. Shared authorship + gives us a prior, but each target tells us whether it applies. + Distinguishing those contexts is part of what a specialist would + need to learn. +

+
+
+

Where should that experience live?

+

+ Before deciding to teach those patterns through model training, I + would look at the knowledge we already keep in the repository. In + the + previous essay, I wrote + about it becoming the project's working memory. That memory + includes compiler lessons, along with the source and failed + experiments that made them useful. +

+

+ By retrieving that record, an agent can start with a known result + and inspect how we reached it. It can also avoid alternatives that + have already failed in the same context. The starting point + improves without changing the model's weights. +

+

+ When reconstructing TH09's enemy-spawn function, a + GPT-6-Luna-max session + drew a hypothesis from TH08's corresponding source family. That + earlier source suggested how to structure the loop and handle + failures within it. TH09's own evidence supplied the game-specific + details, and clean rebuilds confirmed the complete match. +

+

+ "The model did not know that compiler quirk" and "the model + could not use it" are different problems. + Retrieval may solve the first, but turning that fact into a useful + candidate still takes work. And if the candidate fails, the model + must decide what the result means for its next attempt. Knowing + the relevant pattern is only the beginning of that process. +

+

+ For that reason, I would include a smaller general model with good + retrieval in any comparison. Giving it the same library of + experience would help us identify what training adds: better + candidate generation, better decisions after feedback, or both. +

+
+
+

Learning the next useful experiment

+

+ Those decisions after feedback are what I would most like to + study. In agentic reconstruction, the model proposes an + explanation and tests it against the program. Even when the + candidate fails, the result can narrow the remaining possibilities + and suggest a more useful next experiment. +

+

+ Consider the temporary-results example again. Its final source + shows the arrangement that worked, but the route to that source + contains more information. Each of the following experiments + helped identify what still needed to change. +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
ExperimentWhat its result taught us
Try a different way to copy the results + The copy code changes, but the function still differs. +
Use the returned values directly + Copying follows the original pattern, but temporary + storage still differs. +
Keep the temporary results alive together + They get separate storage, but one still overlaps a value + used later for collision checks. +
Keep the collision-check value separateA clean rebuild confirms the complete match.
+
+

+ Selected experiments from the attack-function reconstruction + above, grouped by what they taught us. +

+

+ A training record that keeps this sequence can teach more than the + final source alone. It connects each proposed change to an + observed result and the next decision. Keeping ineffective + variations matters too: they tell a later agent which hypotheses + have already been tested in that context. +

+

+ I would want the model to learn how to use feedback. + A neutral result is a reason to reconsider the variation; a + changed mismatch may point to another cause. When local edits stop + being informative, the agent should be able to revisit the source + representation or inspect the evidence again. +

+

+ Learning to make those choices requires autonomy. Sometimes the + useful next step is inspecting another caller rather than + compiling another edit. A rigid sequence of required rewrites + would remove that choice, along with part of the behavior we want + the model to learn. +

+
+
+

Why RE is interesting for reinforcement learning

+

+ Bounded reconstruction gives us a practical environment for + studying these choices. Once the target and compiler are pinned, + many source experiments produce quick, repeatable feedback. The + agent can compile a candidate, inspect the mismatch and use that + observation to choose its next step. +

+

+ Reinforcement learning could train that decision-making process + through the feedback it receives. A candidate accepted by a + defined check gives us a concrete outcome, while the sequence of + attempts lets us observe how much work it took to reach it. +

+

+ There is already research supporting this direction. + LLM4Decompile + studies models specialized for decompilation. + AutoDecompiler + trains multi-turn refinement using compiler and execution + feedback. Their studies focus on functional recovery. For this + work, I would use them as a starting point for the related task of + finding source that matches a historical compiler's output. +

+

+ To reach such a well-defined task, though, we may first need to + establish what a function owns or devise a new runtime + measurement. In TH08, for example, a + collision difference led back to how the original program + handled floating-point calculations. Before the agent could test a useful correction, it had to work + out what to measure. +

+

+ This suggests another role for a broadly capable model: helping + make the problem checkable in the first place. Once that check + exists, we can investigate how far a learned search policy can get + with it. +

+
+
+

When the oracle is wrong

+

+ Once we train against that check, its coverage becomes part of + what the model learns. I call the reference or checker an oracle. + Even if it gives a repeatable answer, we still need to understand + what that answer covers. +

+

+ TH08 showed how much can hide outside that coverage. Some + reconstructed functions passed their exact comparisons with wrong + floating constants. The comparator adjusted relocated addresses + before checking instructions, but it checked the values behind + those addresses only when they had been explicitly recorded for + verification. Other literal references could pass without their + values being examined. +

+

+ To close that gap, a + wider audit + found incorrect constants in functions that had already been + accepted. In one calculation, the reconstructed source added + 1.0f where the original added 32.0f. +

+

+ A learner rewarded by the old check could learn to produce the + wrong reconstruction. + We had not trained an RL model against this oracle; the observed + failure was in the check itself. But using that check as a reward + would have made the same blind spot part of the learning + environment. +

+

+ A functional test can have a similar blind spot. + Differential-fuzzing research on LLM decompilers + has found behavior differences beyond the supplied tests. Passing + those tests therefore needs to be read in terms of the cases they + exercise, just as an instruction match needs to be read in terms + of the bytes and data it checks. +

+

+ Before using either kind of check as a reward, I would test it + with deliberate failures. I would also keep final acceptance + outside the candidate's editable source, so the model has to + satisfy the check through its reconstruction. Otherwise, something + like a byte array copied from the target could satisfy a naive + score without recovering useful source. +

+

+ Improving the learner and improving its oracle belong to the + same research problem. + As the learner gets better at optimizing the feedback we give it, + understanding that feedback becomes more important too. +

+
+
+

A comparison worth running

+

+ With those checks in place, I would start the comparison on a + fixed VC7.1 task family. First, I would establish baselines for a + strong general model and a smaller one. Adding repository + knowledge to the smaller model would show what retrieval changes. + From there, supervised specialization and an RL-trained version + would let us examine what training adds. +

+

+ To make those comparisons informative, each model would receive + the same target evidence and tools. For the training-specific + comparisons, I would keep the base model and available knowledge + fixed as well. Repeated trials would help distinguish a reliable + search strategy from a lucky candidate. +

+

+ I would then separate two starting conditions: reconstructing a + function from its instructions, and closing the last few + differences in maintained source. A specialist might be excellent + at the second task while a general model does much of the work + needed to reach it. Measuring them separately would reveal that + division of work. +

+

+ Both tasks need genuinely held-out examples. Because related + Touhou games share engine code, holding out a game's name would + still allow nearly identical functions to appear in training. I + would instead hold out source families and keep their accepted + answers out of both training and retrieval. +

+

+ On those examples, the outcome would be complete, independently + validated matches. Giving each model the same candidate or compile + budget would help compare search quality. Measuring elapsed time + and total cost, including compilation, would tell us whether that + quality produces an efficient workflow. Training costs would need + their own accounting too. +

+

+ Both views matter because a cheaper proposal can become an + expensive workflow if it causes more uninformative compiles. + Conversely, a slower model may pay for itself by finding a useful + experiment sooner. The comparison should capture those costs. +

+

+ Counting accepted results also keeps intermediate progress in + perspective. One TH09 + replay-save candidate + looked promising because the compiled function had the expected + size, but a full comparison still found substantial differences. + Changes in how the compiler arranges instructions can also make a + candidate look closer without resolving the underlying problem. + Such diagnostics can guide the next experiment, but I would + validate any reward for "getting closer" against the full + acceptance check. +

+

+ I would be interested in the pattern across these results. If a + specialist does well within a familiar compiler family, does that + advantage survive a toolchain change? And once both models have + good retrieval, how much does training still add? The answers + would help us decide where each kind of model is most useful. +

+
+
+

What kind of agent does this suggest?

+

+ If the models turn out to help at different stages, a useful + arrangement might be a broad agent with access to a specialist. + Once a task becomes a familiar compiler search, it could ask the + specialist for candidates. If the results stop making sense, the + broader agent could return to the target evidence or investigate + the measurement itself. +

+

+ In that arrangement, specialization becomes a tool the agent can + choose as the investigation develops. The agent keeps the freedom + to change direction that made the earlier breakthroughs possible. +

+

+ This follows naturally from the industrial shift I described in + the previous essay. Being able to run many more experiments + changes how we organize the work. It also gives us a reason to ask + which decisions need broad judgment and which improve through + repeated experience with a particular craft. +

+

+ For now, the strongest general model has earned its place in my + workflow by opening problems I had left unresolved. Those + successes are what make me want to examine the work more closely: + how much depended on the model's breadth, and how much could be + handled by a model trained in this particular kind of + reconstruction? +

+

+ The repositories give us a way to test the question. + I would like to use that record to build the comparison and see + what we learn. +

+
+
+
+ Evidence and model attribution +

+ Detailed evidence notes + include the recorded comparisons and experiment context. +

+

+ The examples describe historical function-level comparisons + recorded in the linked commits. Whole-game runtime checks are + separate milestones. Source and matching records were reviewed + on 13 October 2026. +

+

+ The TH09 label gpt-dots identifies GPT-6-Astra. + gpt-web changed with the model used at the time, so + that label alone does not identify an individual run. Explicit + model names in the other cited commits establish their recorded + attribution; the histories do not contain uniform per-run cost + or effort measurements. +

+ +

+ The proposed specialist and RL comparisons are future + experiments. The project histories motivate them; no trained + specialist was evaluated for this essay. +

+
+
+
+
+
+ + + +

+ + Top + + + + diff --git a/website/public/blog/touhou-reconstruction/index.html b/website/public/blog/touhou-reconstruction/index.html index 5b1d47497..93de87e90 100644 --- a/website/public/blog/touhou-reconstruction/index.html +++ b/website/public/blog/touhou-reconstruction/index.html @@ -90,16 +90,11 @@ content="REA — Find out how software works. Reverse engineering with your coding agent." /> - - + + + + + @@ -115,14 +110,23 @@ >Reverse Engineer Anything
English
+ - - + + + + + @@ -116,14 +111,23 @@ >Reverse Engineer Anything
English
+ - - + + + + + @@ -115,14 +110,23 @@ >Reverse Engineer Anything
English
+ - - + + + + + @@ -115,14 +110,23 @@ >Reverse Engineer Anything
diff --git a/website/public/guides/index.html b/website/public/guides/index.html index 8806ddbaa..5c0ee4052 100644 --- a/website/public/guides/index.html +++ b/website/public/guides/index.html @@ -90,16 +90,11 @@ content="REA — Find out how software works. Reverse engineering with your coding agent." /> - - + + + + + @@ -115,14 +110,23 @@ >Reverse Engineer Anything
English
+ - - + + + + + @@ -115,14 +110,23 @@ >Reverse Engineer Anything
English
+ - - + + + + + @@ -115,14 +110,23 @@ >Reverse Engineer Anything
English
+ - - + + + + + @@ -117,14 +112,23 @@ >Reverse Engineer Anything
English
+

diff --git a/website/public/showcase/aegis/index.html b/website/public/showcase/aegis/index.html index faac483c4..7396c49b9 100644 --- a/website/public/showcase/aegis/index.html +++ b/website/public/showcase/aegis/index.html @@ -90,16 +90,11 @@ content="REA — Find out how software works. Reverse engineering with your coding agent." /> - - + + + + + @@ -116,14 +111,23 @@ >Reverse Engineer Anything

English
+ - - + + + + + @@ -115,14 +110,23 @@ >Reverse Engineer Anything
English
+ - - + + + + + @@ -115,14 +110,23 @@ >Reverse Engineer Anything
English
+ - - + + + + + @@ -115,14 +110,23 @@ >Reverse Engineer Anything