mirror of
https://github.com/morluto/rea.git
synced 2026-11-18 04:34:13 +00:00
015f726a9ef9ef2cd18a513c30240c072c4ab5d8
58
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
05be423acb |
feat(artifacts): inspect Maven POM and Gradle module metadata
Inspect local Maven/Gradle metadata as Evidence with bounded report/XML admission, preserved caller choices and owned cleanup. Refs #8828; broader comparison and resolution work remains outside this change. Assisted-by: Suika (gensokyo-skills:suika-scatter-gather-planning) Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com> |
||
|
|
51459cf203 | feat(artifacts): inventory Android OTA update payloads offline (#11378) | ||
|
|
43b9fa87fb |
feat(artifacts): inspect NuGet package metadata and dependencies
Inspect supplied NuGet packages as local Evidence with bounded ZIP parsing, preserved caller choices and credential-safe metadata. Fixes #8144 Assisted-by: Suika (gensokyo-skills:suika-scatter-gather-planning) Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com> |
||
|
|
a88c0a5554 |
feat(artifacts): inspect Android boot image components
Inventory Android boot and vendor_boot images through shared artifact workflows. Preserve parser failure kinds and bounded stored-component extraction. Assisted-by: Suika (gensokyo-skills:suika-scatter-gather-planning) Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com> |
||
|
|
237b1ea5b3 |
feat(evidence): project Go and Rust dependencies as CycloneDX
Project retained Go and Rust dependency metadata as deterministic, bounded CycloneDX documents with parent provenance and explicit unknowns. Share current Evidence identity admission and canonical document-ceiling recovery. Assisted-by: Suika (gensokyo-skills:suika-scatter-gather-planning) Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com> |
||
|
|
637e4cb60c |
feat(native): inspect DWARF compile units offline
Add bounded offline DWARF compilation-unit inspection with source provenance, explicit coverage, caller-selected controls and shared ELF compression framing. Assisted-by: Suika (gensokyo-skills:suika-scatter-gather-planning) Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com> |
||
|
|
54e3918d1c |
feat(elf): report separate debug-file linkage and verify a candidate debug file
Add offline ELF separate-debug linkage inspection with explicit candidate verification, bounded streaming, canonical parser limits and preserved complete/partial Evidence provenance. Assisted-by: Suika (gensokyo-skills:suika-scatter-gather-planning) Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com> |
||
|
|
e9c72dbd1f |
feat(elf): inspect dynamic dependencies and required symbol versions
Add offline ELF dependency, search-path, symbol-version and import inspection with retained Evidence summaries and pages. Bound GNU-hash work and preserve cancellation, stable identity and caller-selected parameters across CLI/MCP. Assisted-by: Suika (gensokyo-skills:suika-scatter-gather-planning) Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com> |
||
|
|
62014b566d |
refactor(cli)!: dispatch commands through REA-owned execution
Run ordinary CLI commands through REA's registry, argv parser and result owner. Remove Incur, the second admission parse, SDK error middleware, output capture and redundant command traversal. Preserve explicit redaction, publication receipts, incremental output, terminal notice eligibility and drain ownership. Migrate fixtures to real registrations and retain the derived-source notices. Validation includes unchanged public parity goldens, public and lifecycle regressions, repaired fixture consumers, real TTY base comparisons, exports beyond the engine string limit, four schema catalogs and final static/docs checks. Native provider and optional validator coverage limits are in the PR. Fixes #11654. Fixes #10583. Refs #11682, #11476 and #10511. BREAKING CHANGE: Markdown argument diagnostics use REA's literal escaping, table widths and token counts. Flag-shaped unknown MCP subcommands honor the selected format. Completion --schema/--version routes use the canonical REA-owned hook rather than the retired SDK generator. Refresh affected literal snapshots and regenerate completion hooks with rea completions <shell>. Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com> |
||
|
|
7d502ddb0d |
refactor(cli)!: own builtin refusals and retire per-command MCP
Own builtin refusal paths and Markdown schemas in REA. Reject retired per-command MCP before loading command registrars, preserve invoked identity, and apply token controls to the complete selected failure document. BREAKING CHANGE: rea <command> --mcp is removed. Start REA's MCP server with rea mcp or rea --mcp. Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com> |
||
|
|
230db70fb4 |
feat(gdb): bind sessions to an optional executable
Hash and load an optional initial executable before GDB readiness, without running it. Preserve initial identity and completed hash diagnostics through cancellation and cleanup retry; share the file owner with Rizin. Fixes #11581. Refs #11682. Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com> |
||
|
|
897784042a |
fix(native)!: report a target-selected plist against the target, not the unsent path input (#10798)
* fix(native): report a target-selected plist against the target, not the unsent path input inspect_plist resolved a plist that the open target itself selects with the same origin as a caller's path input, so an unreadable target plist was reported as an input issue on path even when the caller never sent path. The selection now records a target origin, and unreadablePlist reports it as a BinaryTargetError for the target. The inspect-plist CLI command is projected from its contract, so its --relative-path issues are named by the CLI key. * refactor(cli)!: route analyze to the contract its target selects (#10808) * refactor(cli): route analyze to the contract its target selects analyze hand-declared both lanes: native open options for binary_overview and the JavaScript integrity policy and source selection for analyze_javascript_application, with its own routing and refusals. registerTargetRoutedCommand now projects each route from its contract, takes the union of their options, runs the first route that owns every given option and takes the target, and refuses options the chosen route does not own by their CLI key. Omitted union fields, including a root discriminator, no longer need an argv projection. * fix(cli): give a routed command's chosen route its CLI-only option defaults Routing strips option defaults so an omitted option routes no target. Contract fields regain theirs on admission, but CLI-only options have no later parse, so a defaulted one reached the handler as undefined. The chosen route's omitted CLI-only options now receive their defaults before the handler runs. * refactor(cli): deliver decompile and inspect-macho Evidence by the contract's detail (#10813) * refactor(cli): deliver decompile and inspect-macho Evidence by the contract's detail decompile and inspect-macho omitted the contract's detail field and always printed complete Evidence. Both now declare evidenceDelivery, adding --detail and --evidence_output from the contract. Publishing a result never used the provider id it required, so publication takes no provider and runOnSessionTarget no longer needs one to deliver. * refactor(cli): project managed artifact and native-boundary inspectors from their contracts (#10816) inspect-managed-artifact and inspect-managed-native-boundaries re-declared the managed budget fields by hand. Both now register from their contracts on a session target, and inspect-managed-artifact gains --detail and --evidence_output from its detail field. * fix(cli): name every contract command's input issues by their CLI key Commands applied their CLI field binding only where a session-target or direct handler returned an undelivered result. With evidenceDelivery, decompile publishes through the shared delivery, which returned a provider failure unprojected, so an issue about the procedure would be reported at ["procedure"] instead of the advertised positional "address". Handlers that run a service or publish themselves never applied it: inspect-il2cpp-metadata reported ["generic_instances"], inspect-go-binary ["max_string_literals"] and inspect-apple-ips ["join_path"] rather than the CLI keys other commands report. The contract command now projects whatever its handler returns through the binding it owns, for plain and target-routed commands alike, and the handler context no longer carries the binding. * fix(analysis-view): summarize pseudocode that selected an independent fresh decompile The pseudocode view parsed its parent's parameters with a selection schema that admitted only procedure and document. A procedure_pseudo_code observation made with analysis independent_fresh records that field, so its summary view refused the parent. Through the CLI's new summary delivery, `decompile --analysis independent_fresh --detail summary --evidence_output <file>` would fail after a successful decompile and never save the bundle; an inline inspect_analysis_view of such Evidence failed the same way. The selection schema now admits the analysis the contract offers, and the contract reads that enum from the same owner. * test(cli): restore the worker's exit status after synthetic contract command runs logCliCommand sets process.exitCode on a refused or failed command. The synthetic routed and input-field harnesses ran in the cli-boundary project's shared workers (isolate: false) and left that status for later tests. Each invocation now restores the previous status. * refactor(cli)!: deliver inspect-managed-members Evidence through the shared --evidence_output (#10845) inspect-managed-members was the last command with its own Evidence delivery: a hand-written registration passed --detail and --evidence-bundle to runProviderAnalysis, whose members-only delivery variant re-checked heap headroom and published through deliverAnalysisEvidence. Every other producer writes its bundle with --evidence_output through publishCliAnalysisEvidence, and elsewhere on the CLI --evidence-bundle names an input bundle to read. The command now registers from the inspect_managed_members contract on a session target with evidenceDelivery, like inspect-managed-artifact; --type is the contract's type_names. runProviderAnalysis loses its delivery parameter and its two refusals, and deliverAnalysisEvidence, now unused, is deleted. Its lifecycle tests drive publishEvidenceDelivery directly or the CLI delivery; the managed-only headroom pre-check tests are removed, since the shared delivery deliberately does not re-authenticate immutable Evidence and keeps the writer's check for mutable sources. BREAKING CHANGE: `rea inspect-managed-members --evidence-bundle <path>` is now `--evidence_output <path>`; the old flag is refused as an unknown flag. With `--detail summary`, stdout is now `{"summary": <summary Evidence>, "evidence_bundle": {"path", "bytes"}}` instead of the summary Evidence alone, and a publication failure is the shared delivery's error projection without the `error` label or `input_path`. A summary without a destination names `evidence_output` in its issue path. Migrate by renaming the flag and reading `.summary`. Compatibility is not kept: one spelling cannot mean "read this bundle" on view and workflow commands and "write this bundle" on one producer. * refactor(cli): project analyze-javascript-application and analyze's JavaScript route from one contract projection analyze-javascript-application declared its options by hand, mapped about twelve option names to contract fields itself, parsed its delivery separately and resolved its own caller path. analyze's JavaScript route, projected from the same contract, omitted every field but the path, source selection and integrity policy, so the two commands for one contract offered different options. Both now use javaScriptApplicationCliProjection and runJavaScriptApplicationCommand: the path positional, --artifact-format, --source-path, and the two options that accept a JSON file (--source-paths-json, --semantic-precision), with contract delivery. analyze therefore takes the JavaScript budgets, --artifact-format, --semantic-precision and --detail/--evidence_output/--view for JavaScript targets, and refuses them by CLI key for native targets. javascriptApplicationOptions is deleted. The command's missing-target refusal now names its CLI key, "path", as every contract command does. * refactor(cli): project the apktool commands from their contracts (#10878) * refactor(cli): project the apktool commands from their contracts * refactor(cli): project the Flutter commands from their contracts (#10882) * refactor(cli): project the Flutter commands from their contracts * refactor(cli): project the JEB commands from their contracts (#10888) * refactor(cli): project the JEB commands from their contracts * refactor(cli): project the Android package, class, method and reference commands from their contracts (#10893) * refactor(cli): compose compare-managed-members from its contract over two inspected targets (#10914) * refactor(cli): compose compare-managed-members from its contract over two inspected targets The contract command builder takes Evidence targets: required contract fields that each take the Evidence a source contract produces for one positional target, with the source's options admitted for every target. compare-managed-members now inspects each path through the typed managed runner, as inspect-managed-members does, and compares the records as MCP compare_managed_members does. A failing candidate names its argument and retains the baseline's Evidence; a cancellation as the comparison settles retains the comparison. The path-only comparison service is removed. * fix(cli): drain queued interrupts before a composed command settles Select snapshot faults by file identity, guard real permission denial to hosts that enforce it, and release retained owners when a test fails. * refactor(cli): project the ADB commands from their contracts (#10934) Each ADB command is registered from its ADB_TOOL_CONTRACTS entry through registerContractCommand, keeping its positionals, flags and kebab-case path keys. start-adb-activity keeps its repeatable --extra type:key:value option, which supplies the contract's extras. * refactor(cli): project Frida discovery from its contracts and share Frida request mapping with MCP (#10951) list-frida-devices and list-frida-processes are registered from their contracts, with each remote member as its own option, and admit the request MCP would send. instrument-with-frida keeps its argv but builds and admits the instrument_with_frida contract input. One application owner maps Frida contract inputs to service requests for both adapters. * refactor(cli): finalize the Evidence-target composition through runOwned runOnEvidenceTargets turned a completed comparison into a cancellation by reading the abort signal by hand, which main's architecture guard now refuses outside runOwned. The composition now finalizes through runOwned: its close drains queued interrupts (it owns no resource), and a cancellation observed as it settles keeps the completed Evidence as the partial observation, as before. * fix(errors)!: keep every completed argument's observation beside a composite failure's own partial (#10961) * fix(errors): keep every completed argument's observation beside a composite failure's own partial * test(errors): cover argument observations through cleanup composition and the partial-free fallback * test(errors): settle the cleanup through its owner's release in the argument-observation case * refactor(cli): project instrument-with-frida through the contract builder (#10962) * refactor(cli): project instrument-with-frida through the contract builder with CLI-only positionals and handler-filled fields * fix(cli): keep omitted flattened members omitted so partial capture limits keep their Evidence * refactor(cli): project the CDP page-target browser commands from their contracts (#10976) * refactor(cli): project the CDP page-target browser commands from their contracts * refactor(cli): project inspect-web-page from its contract with a branch-selecting flag * test(cli): enroll the browser commands in the parity registration check and refuse unenrolled argv fixtures * refactor(cli): project the V8 Inspector and Electron commands from their contracts (#10977) * refactor(cli): project the V8 Inspector runtime commands from their contracts * test(cli): enroll the V8 Inspector runtime commands in the parity registration check * refactor(cli): project the Electron page observation commands from their contracts (#10987) * refactor(cli): project the Electron page observation commands from their contracts * test(cli): enroll the Electron page observation commands in the parity registration check * refactor(cli): project inspect-electron-fuses from its contract with the shared caller-path rule The command now registers through registerContractCommand with `path` as a caller path, so the builder's absoluteCallerPath owns relative-path anchoring and the command's own absoluteElectronFusePath copy is removed. inspectWithService records the caller's spelling as caller_input_path. The named file is unchanged: every `..` is kept for the filesystem, and Win32 resolves as before. The recorded selected_path drops `.` segments and repeated separators (`App.app/./` -> `App.app/`), and an empty path is now refused at argv parsing (VALIDATION_ERROR) like every other caller-path command. * test(cli): derive contract-built commands from the builder registries instead of a hand list Every command named after a public tool contract must register through a contract builder unless it is in a shrinking list of hand registrations, and the renamed contract commands are listed exactly, so an earlier migration that reverts fails instead of dropping out of the parity cases. The JSON-document command hand list is covered by the same check and removed. * test(cli): drop the empty inspect-electron-fuses path mismatch the CLI now refuses * refactor(cli): project compare-web-screenshots and analyze-web-bundle from their contracts with builder JSON inputs (#11012) * refactor(cli): project compare-web-screenshots from its contract with builder JSON inputs read from inline text or a file The contract command builder gains jsonInputs: structured fields taken as inline JSON or a JSON file path (- reads stdin), read when the command runs and admitted with the contract input before any target is opened. Inline text that is not JSON is refused under its CLI key; a file that cannot be read keeps its own failure. compare-web-screenshots takes both artifacts this way, replacing its hand-written JSON argument parsing. * refactor(cli): project analyze-web-bundle from its contract analyze-web-bundle now registers through registerContractCommand with Evidence and view delivery, semantic_precision as a builder JSON input, and source_map_limits flattened onto the existing --source-map-* flags. Page-inspection extras stay omitted, and script sources stay on as the contract default. The superseded javascriptRouteDelivery options, passive browser scope options, observation duration helper and fetched source-map option set are removed. * refactor(cli): take semantic_precision of JavaScript application analysis as a builder JSON input analyze-javascript-application and the analyze route read --semantic-precision through the contract builder's jsonInputs instead of a CLI-only option decoded in the handler, so the decoded budgets are admitted with the contract input before analysis. * refactor(cli): route compare-web-captures to the contract input shape its documents select (#11027) * refactor(cli): route compare-web-captures to the contract input shape its documents select * fix(cli): keep routed defaults advertised and reuse the admitted capture parse * fix(cli): keep explicit routed options distinct from advertised defaults * refactor(cli): project inspect-ntfs-journal from its contract (#11043) * refactor(cli): project inspect-ntfs-journal from its contract * refactor(cli): project the pcap commands from their contracts (#11045) * refactor(cli): project the pcap commands from their contracts * refactor(cli): project inspect-playwright-trace, the Cutter commands and execute-rizin-command from their contracts (#11046) * refactor(cli): project inspect-playwright-trace from its contract * refactor(cli): project the Cutter commands from their contracts (#11047) * refactor(cli): project the Cutter commands from their contracts * refactor(cli): project execute-rizin-command from its contract (#11048) * fix(cli): refuse a selected page without summary delivery before opening the target * refactor(cli): project export-web-scripts and trace-web-module-imports from their contracts (#11053) * refactor(cli): project export-web-scripts and trace-web-module-imports from their contracts * fix(cli): describe export-web-scripts paths as resolved against the working directory * refactor(cli): project the web runtime and JavaScript recovery commands from their contracts (#11084) * refactor(cli): project the web runtime commands from their contracts * refactor(cli): project recover-javascript-sources from its contract * refactor(cli): select a contract input branch by its literal field and project guided-workflows (#11085) * refactor(cli): select a contract input branch by its literal field and project guided-workflows * fix(cli): refuse delivery options before reading JSON inputs * fix(cli): keep branch-only defaults to their branch and name admission issues by CLI key A branch-only field no longer carries its default into the shared options, so another branch never receives it; the selected branch applies the default on parse. Contract admission failures are projected to CLI keys like handler failures. CLI defaults are typed only on top-level fields, the one place that applies them. * refactor(cli): project compare-process-captures from its contract, checking each capture before reading the next (#11114) * refactor(cli): project compare-process-captures from its contract, checking each capture before reading the next The contract builder gains jsonInputChecks: each check runs on a decoded JSON input as soon as it is read, in argv order, so a refused input stops the command before the next is read; the handler receives what each check admitted. compare-process-captures authenticates the left capture before reading the right and the right before the trace specification, then compares the authenticated facts. It now also takes inline JSON, stdin and --max-capture-age-ms like MCP. Empty JSON input text is refused at argv. A JSON input whose final file close fails is reported as cleanup_incomplete naming the file instead of an unclassified failure. compareProcessEvidenceFiles and its trace-spec parser are removed. * fix(cli): retry a refused JSON input close and keep the read's refusal beside incomplete cleanup parseCliJsonInput gives the file's owner a resource scope, so a transient close refusal is retried before the command fails. A close that still fails reports cleanup_incomplete composed with the read's own refusal. Routed commands refuse routes that check a shared JSON input differently, since it is checked before the route is chosen. * refactor(cli): project inspect-web-network-capture from its contract with nested protobuf options The contract builder flattens a nested optional object member in turn (protobuf.schema), resolves a flattened caller-path member and reports it as spelled under its dotted path in callerInputs, keeps a flattened member's contract default out of argv so an omitted member stays omitted, and takes an array of numbers as repeated decimal tokens within its bounds. inspect-web-network-capture registers from its contract with the same option names; Evidence keeps the capture and descriptor paths as the caller spelled them. CLI input issues name the capturePath argument. * fix(cli): name a selector field by its own option in admission issues A selector parameter's positional may share another key (decompile's procedure positional is address), so mapping the field to its positional key renamed selection issues that already name the option, such as a missing or conflicting --procedure. Map a selector field to its option. * fix(cli): retain a JSON input file whose close fails and keep why its read stopped parseCliJsonInput dropped its per-read scope after the owner's close retry failed, so the handle lost its owner, and a read or cancellation failure recorded before the close was replaced by the cleanup failure. The read's scope now stays with the CLI process until final CLI cleanup retries it, and the recorded outcome is translated once into the primary failure with the cleanup attached. The module moves into src/cli so it can register with the CLI process owner without a layer cycle. * refactor(cli): project inspect-with-objdump and inspect-api-contract from their contracts (#11142) * refactor(cli): project inspect-with-objdump, list-objdump-architectures and inspect-api-contract from their contracts The contract builder selects input branches by a field that is a literal in one branch and an enum in another, takes the default of the one branch that admits omission, and lets a command take a subset of a union's branches by their discriminating values, fixing the field when one value is selected. * refactor(cli): project trace-web-source-location from its contract with flattened positional objects (#11167) * refactor(cli): project trace-web-source-location from its contract with flattened positional objects The contract builder flattens required objects as well as optional ones; a flattened field listed in positionals takes its members as positionals in member order. The hand-written source-map limit options and the separate CLI delivery schema are removed. * fix(cli): refuse to flatten a required object without a required member * fix(cli): refuse a malformed Evidence-input document before reading the selected bundle runEvidenceInputCommand admits the document with its transport frame before it reads --evidence-bundle, so every Evidence-input command refuses a malformed document first, as compare-static-and-observed-endpoints already did by hand. * test(cli): expect a selector field to be named by its option in input issues * fix(cli): report a refused view before the delivery rule it would trip Refusing delivery options before JSON inputs are read checked --evidence_output before the view's own schema, so a summary view naming an unknown field reported only the missing bundle. Admit the view with the contract's view field first, as full admission does. * refactor(cli): project inspect-android-jni-bindings from its contract with a grouped --query option (#11196) * refactor(cli): project inspect-android-jni-bindings from its contract with a grouped --query option A projection's fieldGroups take several optional top-level contract fields as the members of one JSON object option. The text is decoded when the command runs, refused with the group's message when it is not a JSON object, a member that is not one of the group's fields is refused by its path, and the contract admits each member as its field. inspect-android-jni-bindings keeps its --query selection through a group and now registers through the contract builder, so the hand-registered contract command list is empty; the superseded parseCliAnalysisEvidenceDelivery and androidJniDeliverySchema are removed. * fix(cli): refuse an object rule that names a grouped field A grouped field is a JSON member, not an option, so a contract rule such as dependentRequired naming it would be advertised over an option that does not exist. Registration now refuses that combination. * fix(cli): describe the --view and --maxCaptureAgeMs options of projected commands A projected view field kept no help because the contract's own description was skipped and none replaced it, and compare-process-captures exposed max_capture_age_ms without help. The canonical CLI catalog test refused both. The view option now takes the same help in both builders. * refactor(cli): derive the CLI command inventory from the contract registry (#11248) A contract now declares `cli: true` when the CLI exposes it as the command named by its kebab-case name. The primary CLI inventory (CLI_COMMAND_NAMES, now owned by catalogIdentity.ts) is derived from those declarations plus the commands no contract names, and a contract projection omits `command`: the builder names the command from the contract and refuses a contract that does not declare one. CLI_COMMANDS keeps only the 32 commands no contract names; the 164 contract-named entries and the copied MCP-only list in cliToolCoverage.test.ts are removed. * fix(managed): keep decoded members when only their loaded literals exceed capacity A capacity failure while decoding #US literals discarded the member facts already decoded, because the shared representation budget threw through the whole inspection. Literals carry their own coverage, so the inspection is retried without them and reports user_strings as partial with the capacity issue. compare-managed-members, which now runs full inspections, keeps comparing members it used to read with literals disabled. * test(cli): expect builder-admitted issues by CLI key and option help with its default Builder admission of compare-web-captures, compare-web-screenshots and analyze-web-bundle names input issues by the CLI key (beforeJson, afterJson, normalizationJson, endpoint), and --integrity-policy help states its default. Four test files still expected the contract field names and the old help, so they failed on the stack. * test(cli): read each refused browser input's CLI path directly now that every case names one Every invalid browser input now carries its CLI key, so the fallback branch narrowed to never and failed the TypeScript compiler's typecheck. * chore(verify): carry the moved cliJsonInput baseline entry into its per-guard file Rebased on main after #11316 split the guard baselines and #11181 threaded the launch environment into the web bundle command; the contract-built analyze-web-bundle command now passes that environment to the browser provider. * refactor(cli): hand whole-input contract handlers the admitted parse instead of parsing again (#11301) * refactor(cli): hand whole-input contract handlers the admitted parse instead of parsing again * refactor(cli): parse an argv whole input only when the handler reads it Admission parsed every argv whole-input command eagerly, so handlers that hand the raw input to a service (inspectWithService) parsed it twice. parseWholeInput now parses on the first admittedContractInput call and reuses the result; run-time JSON and view delivery still parse at admission. The test counts whole-schema evaluations. * refactor(cli): hand JSON-document handlers the admitted parse of their document (#11332) observe-native-calls, capture-electron-scenario and match-native-functions parsed their resolved document against the contract schema in the handler. registerContractDocumentCommand now gives each document handler parseWholeInput, a memoized parse of the resolved document as the whole contract input whose refusal names the caller's spelling, so admittedContractInput serves argv and document commands alike. A handler whose document is not the whole input never calls it, so it adds no parse. * fix(cli): admit checked JSON inputs through their checks only compare-process-captures walked and copied both capture records again in the whole-input parse after their checks had admitted them. Admission now parses the remaining fields with the contract and hands the handler the checked documents uncopied. The managed summary example names --evidence_output. |
||
|
|
5c53bcaed8 |
feat(mcp)!: retire the full schema profiles and declare schema facts as typed annotations (#10693)
* test(mcp): check advertised schemas against a portable dialect in every profile * fix(mcp): re-emit advertised patterns in a portable regex grammar * fix(mcp): present discover_tools input through the selected profile The hot-cold catalog registered discover_tools directly with the SDK, so the default compact input profile still advertised its canonical schema, including page-size defaults clients apply on their own (#5322). Route every listed input schema, transport discovery included, through one server-owned presentation, and pass the selected presentation to the deferred server, which serves recorded tool schemas but not discovery. * fix(mcp): keep the Evidence union on described borrowed inputs borrowEvidenceInput installed its advertised projection on one schema instance. A call site's .describe() rebuilds the schema from its definition, so match_native_functions advertised left and right as unconstrained values in every input profile. Install the projection in the borrowed parser's constructor so derived schemas keep it, for both borrowed inputs and borrowed arrays. * fix(mcp): validate advertised dialect by selected profile * fix(mcp): preserve schema widening through references * feat(mcp): project compact input schemas into the portable advertised dialect One projection (advertisedDialectProjection.ts) owns the compact input advertisement: one type per node, items on every array, string literals as enums, oneOf widened to anyOf, allOf merged, tuples as element unions, exclusive bounds made inclusive, and every keyword outside the dialect dropped. Each rewrite is exact or widening; server validation is unchanged. The root description and sentences for dropped cross-field constraints move to the tool description, which Codex and Zed keep. The compact baseline falls to nullable values only (29), which the dialect cannot express without narrowing an input. The gateway shape repairs (typeArrayItemUnions, hasGatewayIncompatibleShape), the second dependentRequired-to-prose copy and the strict-gateway test denylist are removed; the dialect checker gates the inline presentation instead. * feat(mcp): omit output schemas from tools/list by default No surveyed model API reads an output schema, MCP client validators repeat REA's own result validation, and complete output schemas were about 92% of the default tools/list. REA_MCP_OUTPUT_SCHEMA_PROFILE now resolves to off through one owner (resolveMcpOutputSchemaProfile); compact and full remain selectable. structuredContent is still delivered, and the deferred server serves both off and full from the recorded catalog with the matching recorded identity. Tests and artifact verifiers that validate results against complete advertised output contracts select full explicitly. * docs: describe omitted output schemas as the default in README translations * fix(mcp): select schemas in verification workflows * fix(mcp): refuse zero-padded repeat bounds and record host-specific path patterns * fix(mcp): keep projected schemas permissive * fix(mcp): keep references valid when presentation widens their targets * fix(mcp): keep a single union branch's closure scoped to its properties * fix(mcp): select complete output schemas in the Electron verifier * fix(mcp): select complete output schemas in standalone verifier probes * fix(mcp): keep an allOf member's tuple tail with its own positions * fix(mcp): relax references into negations and conditionals presentation may remove * refactor(contracts): declare root discriminators as typed schema annotations * test(mcp): select the borrowed Evidence contract from its family * fix(mcp): keep astral literals and dynamic references widening in every mode * fix(mcp): omit astral literals and relax untracked references when presentation widens * fix(mcp): select complete output schemas in every verifier transport * fix(mcp): read reference pointers by schema position, not segment spelling * fix(mcp): protect references into collapsing boolean unions and keep referencing branches out of the collapse * fix(mcp): keep reduced schemas open when their root admits names by pattern * test(mcp): keep the reduced-schema pattern case outside the size-limited block * fix(mcp): omit patterns whose classes name astral characters * fix(mcp): decide union collapse and pointer protection from canonical branches * docs(mcp): document non-u astral matching and pin BMP agreement across V8 modes * fix(mcp): keep prototype-named properties as own properties in the dialect projection * test(mcp): select full output schemas in packet and signal schema checks * test(mcp): expect the advertised base64 schema to omit the unbounded pad-bit probe * fix(mcp): protect references into unevaluated keywords lost evaluation removes * fix(mcp): validate the doctor probe reply against the canonical output contract (#10655) * fix(mcp): validate the doctor probe reply against the canonical output contract * test(mcp): replay doctor probe validation under every output profile * test(mcp): accept typed-branch nullable unions in the advertised dialect (#10649) * test(mcp): select full output schemas in HTTP session workflows * fix(mcp): emit stack-safe classes with non-ASCII members and protect draft-07 reference siblings * fix(mcp): protect references into literal siblings of relaxed draft-07 references * feat(mcp): omit output schemas from tools/list by default (#10646) * feat(mcp): omit output schemas from tools/list by default No surveyed model API reads an output schema, MCP client validators repeat REA's own result validation, and complete output schemas were about 92% of the default tools/list. REA_MCP_OUTPUT_SCHEMA_PROFILE now resolves to off through one owner (resolveMcpOutputSchemaProfile); compact and full remain selectable. structuredContent is still delivered, and the deferred server serves both off and full from the recorded catalog with the matching recorded identity. Tests and artifact verifiers that validate results against complete advertised output contracts select full explicitly. * fix(mcp): select schemas in verification workflows * fix(mcp): select complete output schemas in the Electron verifier * fix(mcp): select complete output schemas in standalone verifier probes * fix(mcp): select complete output schemas in every verifier transport * test(mcp): select full output schemas in packet and signal schema checks * fix(mcp): validate the doctor probe reply against the canonical output contract (#10655) * fix(mcp): validate the doctor probe reply against the canonical output contract * test(mcp): replay doctor probe validation under every output profile * test(mcp): accept typed-branch nullable unions in the advertised dialect (#10649) * test(mcp): select full output schemas in HTTP session workflows * fix(mcp): keep the Evidence union on described borrowed inputs (#10597) * fix(mcp): keep the Evidence union on described borrowed inputs borrowEvidenceInput installed its advertised projection on one schema instance. A call site's .describe() rebuilds the schema from its definition, so match_native_functions advertised left and right as unconstrained values in every input profile. Install the projection in the borrowed parser's constructor so derived schemas keep it, for both borrowed inputs and borrowed arrays. * test(mcp): select the borrowed Evidence contract from its family * docs(mcp): admit baseline growth only for restored contract declarations * fix(mcp): state reduced multi-type properties as typed branches, not type lists The reduced fallback derived a property's types and emitted them as a type list, which Gemini, Moonshot and Ark reject. A property whose canonical schema is anyOf string and number therefore traded a typed union for a rejected construct when the inline projection fell back. Emit one type, or anyOf typed branches, so [T, null] becomes the dialect's nullable union. * feat(mcp)!: retire the full schema profiles and declare complete observations as a typed annotation (#10718) * refactor(mcp): declare complete observations as a typed annotation applied only on the wire * test(mcp): compare complete-observation declarations with their owning text * refactor(schema): couple Zod checks with their JSON Schema constraint keywords (#10725) * refactor(schema): couple Zod checks with their JSON Schema constraint keywords * refactor(schema): declare pattern approximations and object output roots as typed annotations (#10754) * refactor(schema): declare pattern approximations and object output roots as typed annotations * fix(schema): refuse pattern declarations JSON Schema cannot state * test(schema): select guided_workflows from its contract family * feat(mcp)!: retire the full input and output schema profiles (#10841) * feat(mcp)!: retire the full input and output schema profiles The compact input presentation is now the only advertised input schema, and output schemas are either omitted (`off`, the default) or bounded (`compact`). Catalog identity, the build-recorded digests and the recorded startup catalog collapse to those presentations: two digest profiles instead of six, one recorded catalog instead of two, and no input dialect baseline. Tests and verifiers that validated replies against listed full output schemas now validate against the canonical output contract, which REA already enforces server-side; tests that asserted canonical input restrictions read the canonical input schema instead of a full listing. BREAKING CHANGE: `REA_MCP_INPUT_SCHEMA_PROFILE=full` and `REA_MCP_OUTPUT_SCHEMA_PROFILE=full` are refused at startup and by `rea setup` with a configuration error naming the setting. Remove the setting from the client registration (or rerun setup with `REA_MCP_INPUT_SCHEMA_PROFILE=compact` / `REA_MCP_OUTPUT_SCHEMA_PROFILE=compact`). `REA_MCP_INPUT_SCHEMA_PROFILE` still accepts `compact`. Server-side validation is unchanged. * test(mcp): validate replies against canonical output contracts at every listed-schema reader tools/list omits output schemas by default, so fixtures, verifiers and the Android analysis runners that read a listed outputSchema now bind the canonical contract instead. connectLocalToolsMcp and advertisedMcpToolSchemas hand the SDK a definition carrying the canonical output schema, so the SDK client and caller-supplied validators check every successful reply. * test(mcp): resolve Android runners' output contracts from the selected repository The Android efficiency runners imported the canonical output-schema helper from the harness checkout while --repository selects the revision under test. Import it from the selected repository, as the runners already do for the SDK and Ajv. * test(mcp): let Android runners compare revisions before the canonical output helper A selected revision without scripts/lib/canonical-output-schema.mjs could not start the Android runners. Choose the output contracts in one harness helper: the selected revision's canonical contracts when it has them, otherwise its listed schemas under the full output profile it still supports. * fix(scripts): keep caller launch settings when the real Hopper verifier builds its server environment The verifier deleted REA_VERIFY_SERVER_COMMAND and REA_VERIFY_SERVER_ARGS_JSON from process.env itself before reading them, so a caller selecting an installed REA command silently ran the checkout's dist/main.js. Copy the environment, as main does, so only the child's environment changes. * test(mcp): validate whole replies against canonical output contracts wherever a listed definition is held tools/list omits output schemas by default and the full output profile is gone, so tests that handed the SDK a listed definition no longer checked complete replies. Attach the canonical output schema with withCanonicalOutputSchema at every held REA tool definition. Environment-served tools (not REA contracts), and the deferred-runtime and doctor tests that exercise per-profile listings, keep their listed definitions. * test(mcp): record the advertised catalog summary without the retired full profiles Retiring the full input and output profiles leaves only the compact input and compact output listings, so the summary drops the full-profile digests and every pattern only the full listings carried. Regenerated with npm run verify:advertised-schemas -- --update-summary. |
||
|
|
fd2eabb12a |
feat(setup): manage fx, Junie, Goose and Kilo registrations through the client table (#10709)
* feat(setup): manage fx registrations with its private profile modes fx becomes a client-table row, so doctor, update and uninstall see the registration rea mcp add wrote, and setup offers fx when ~/.fx or FX_HOME exists. Setup now publishes a private profile through the same owner as mcp add (folder 0700, file 0600) and repairs those modes when the row is otherwise current. Doctor parses fx's array launcher instead of reporting it invalid. * fix(setup): judge fx's private profile by its targets and keep its cleanup owner Address review: privateProfileModesCurrent reads the modes of the canonical file and folder, so a linked profile becomes current; clientConfigurationAligned applies the same modes rule as plan and apply; a private-folder close failure reaches the caller with its cleanup owner instead of becoming a write failure; and the setup plan names the folder and file modes it sets. * fix(setup): keep fx's recovery backups owner-only beside a linked profile Setup and uninstall copied a private profile's original bytes with copyFile, so a backup beside a linked ~/.fx/mcp.json kept the target's readable mode outside the folder setup secures. Both now use the owner-only backup owner that mcp add already used. * feat(setup): manage Junie registrations and apply its location policy (#10712) * feat(setup): manage Junie registrations and apply its location policy Junie becomes a client-table row, so doctor, update and uninstall see the registration rea mcp add wrote, and setup offers Junie when its home exists. Whether Junie loads its default user MCP file now has one owner, read through the client policy block that setup, doctor and mcp add already consult: setup and mcp add refuse, and doctor reports, a registration Junie would not load. * fix(setup): read Junie's user configuration as strict JSON Address review: Junie loads config.json as strict JSON, so comments, trailing commas or an empty file leave its MCP location choice unknown, as before the move into the row. Filesystem tests also clear JUNIE_*, FX_HOME and MCPORTER_CONFIG so a developer's own client locations cannot be inspected or removed. * test(setup): keep the detected client order out of the lifecycle suite body The expected detection order grew with each folded client until the suite callback exceeded the max-lines-per-function lint limit. * fix(update): report a client whose policy setup refuses instead of failing maintenance Junie's disabled default locations (and Gemini's settings policy) make doctor report the registration stale, but setup refuses that client, so selecting it failed every other client's maintenance. The registration inspection now carries the setup blocker, and maintenance lists that client with its reason instead of selecting it. * refactor(setup): read fx's private-profile host through HOST_PLATFORM The fx private-profile mode checks and permissions describe the host REA runs on, so they take it from the host-platform owner instead of reading process.platform (refused by the ratchet from #10911). * feat(setup): manage Goose registrations across its configuration layers (#10715) * feat(setup): manage Goose registrations across its configuration layers Goose becomes a client-table row, so doctor, update and uninstall see the registration rea mcp add wrote, and setup offers Goose when its user file or system file exists. Goose loads its system file and GOOSE_ADDITIONAL_CONFIG_FILES beneath the user file and overlays each extension one field deep; doctor now reports that effective registration, while setup, update and uninstall change only the user file. Doctor also parses Goose's cmd launcher instead of reporting it invalid. * fix(setup): keep Goose's layered environment and load order through setup and uninstall Address review: read Goose's env alias and apply requested settings over envs; keep an inherited lower envs map instead of masking it with an empty default; keep each layer's last load so a repeated user file keeps its precedence; split GOOSE_ADDITIONAL_CONFIG_FILES with Windows quoting; validate only the effective environment across read-only layers; refuse uninstall while a read-only layer keeps REA enabled; and clear Goose's location variables in tests. * fix(setup): apply requested Goose settings over the inherited environment * fix(setup): leave lower-layer Goose settings in force and read admin layers read-only Setup no longer writes its default timeout, enabled, name or description into Goose's user entry when only a lower layer declares that setting, so the inherited value keeps applying and a repeat setup stays current. Uninstall reads Goose's read-only lower layers where Goose reads them, without the write target's ownership check, so an administrator-owned system file no longer blocks removal. The client table accepts an injected Goose system-config path so tests no longer read or skip on the host's /etc/goose/config.yaml; adds a shadowed-invalid-lower-layer regression. * fix(setup): keep an inherited Goose env alias's spelling when writing the user entry Goose overlays each extension field separately, so writing envs into the user file beside a lower layer's env alias left both in force, which readers reject as ambiguous. Setup now writes the user map under the alias a lower layer declares, and mcp add neither adds a default envs map beside an inherited alias nor renames a user alias the lower layer shares. * test(setup): inject Goose's system layer into mcp add selection resolveMcpRegistrationClients accepts the caller's system configuration paths, so the Goose layers test no longer reads the host's /etc/goose/config.yaml. * fix(setup): report REA's Goose registration that only a read-only layer defines * test(setup): pass an isolated Goose system path through update maintenance and the mcp add table * fix(setup): judge Goose uninstall by the merged entry and stop on an unreadable lower layer * fix(setup): select Goose's env alias by presence so a null alias stays malformed * fix(setup): use the shared record predicate for Goose's layered merge after #10588 * feat(setup): give Kilo a client-table row with an async layered location (#10823) * feat(setup): give Kilo a client-table row with an async layered location The client table gains a layeredLocation hook and resolveSupportedClients, which awaits it. Kilo's row resolves its user-scope layers through the same owner rea mcp add uses (KiloClientLocation), so both pick the same write target; the synchronous row keeps kilo.json in Kilo's config root with every candidate layer. The table refuses a relative KILO_CONFIG, KILO_CONFIG_DIR or XDG_CONFIG_HOME because Kilo's working directory is unknown. Refs #7181 * fix(setup): treat every folder Kilo reads as evidence that it is installed * fix(setup): normalize Kilo's absolute table paths and parse its command array * feat(setup): resolve the client table's layered locations in setup, doctor, update and uninstall (#10832) SetupHost (detection and the selectable table), ClientRegistrationStatus, uninstall, doctor's selected-registration environment and the mcp add catalog now read resolveSupportedClients, so each sees the Kilo layer Kilo writes rather than the synchronous default. Refs #7181 * docs(adr): record the one-client-table decision for setup and mcp add * fix(setup): refuse to read a client row whose location is unresolved Doctor's selected-client settings read a Kilo row whose relative KILO_CONFIG left only path evidence, so it inspected a file relative to REA's folder. The shared configuration reader now refuses such a row, so every reader reports the registration as unreadable. * docs(adr): name the row's layeredLocation hook * feat(setup): read KILO_CONFIG_CONTENT as Kilo's top read-only layer (#10851) * feat(setup): read KILO_CONFIG_CONTENT as Kilo's top read-only layer * fix(setup): refuse a Kilo uninstall that would expose or keep another layer's rea entry (#10852) * fix(setup): recheck KILO_CONFIG_CONTENT at write time and name it in doctor's recovery * refactor(mcp): register Kilo through its table row and remove the registration-only catalog kind (#10862) * refactor(mcp): register Kilo through its table row and remove the registration-only catalog kind * refactor(mcp): resolve user-scope targets in the catalog so location modules never import the client table * test(setup): cover Kilo's KILO_CONFIG, home-folder and inline-only layers * fix(setup): report REA's Kilo entry that only KILO_CONFIG_CONTENT sets during uninstall Doctor reports a registration that KILO_CONFIG_CONTENT alone defines, but uninstall found no file entry and reported Kilo as skipped. Uninstall now reports it once as failed and names the variable to edit. * docs(adr): record Kilo's inline layer in the client-table decision * fix(setup): compare Windows environment names without case when a higher layer overrides REA's entry Kilo's inline-layer check and Gemini's system-override check compared environment maps by exact key, so an equal Path beside PATH on Windows was reported as an override and setup refused the client. Both compare the entry as the client launches it. * fix(update): leave a stale Kilo registration KILO_CONFIG_CONTENT sets out of maintenance Setup refuses a refresh the inline layer would override, and one refused client failed every other client's maintenance. The registration inspection now names the inline layer as the setup blocker of a stale entry, and maintenance reports Kilo with that recovery instead of selecting it. * fix(setup): refuse relative JUNIE_HOME and Cline CLI overrides like the other client roots (#10909) * fix(setup): refuse relative JUNIE_HOME and Cline CLI overrides like the other client roots * fix(setup): refuse Windows client paths without a drive that follow the client's current drive * fix(update): select maintenance clients through setup's own refresh refusal check Maintenance predicted setup's refusal with its own rule: any inline rea entry blocked a stale registration, while an aligned one was never checked. A harmless KILO_CONFIG_CONTENT entry (enabled: true) kept a stale Kilo launcher pinned, and an inline value setup would not write (an extra environment variable) let an aligned Kilo registration block every client's maintenance. Setup's refusal checks (client policy, then the inline override comparison of the entry it would write) now live in one reader that setup's alignment check and maintenance share. Maintenance asks it for every owned enabled candidate and reports a refused client with setup's remediation and its real state. * fix(update): keep failed refresh-check reads owned by the supplied maintenance scope clientRefreshRefusal read the client's layers, target file and policy without the caller's resource scope, so a close that failed during those reads threw a cleanup failure no scope retained; maintenance then reported it as text and the scope's close could not retry the descriptor. The refresh reader now takes the scope and passes it to every read. * fix(setup): take the Kilo layer readers' default host from HOST_PLATFORM and the shared record predicate After rebasing on main (#10911, #10588): the new inlineRegistrationOverride and resolveSupportedClients defaults read the running host through the host-platform owner, and the layered launcher merge uses isRecord. * fix(update): keep an unreadable layer's reason in the refresh refusal check readClientRefresh returned undefined for an unreadable or malformed layer, so clientRefreshRefusal reported no refusal and maintenance selected a client whose setup preflight then failed. The reader returns the typed file failure, and the refusal check reports its detail like setup's preflight does. * fix(setup): count REA's entry in KILO_CONFIG_CONTENT as Kilo lifecycle evidence Doctor, update and uninstall inspected a client only when one of its folders existed, so a registration set only by KILO_CONFIG_CONTENT was skipped. A read-only inline layer that sets REA's entry is now evidence on its own. * fix(update): report a client whose only conflict is a discovered provider path as needing setup * fix(update): match discovered settings by the platform's environment identity * fix(update): preflight maintenance with setup's write-target checks and treat discovered inline paths as unknown |
||
|
|
15de1d4dce |
feat(evidence)!: require JavaScript, browser, managed and reference-source facts their producers always write (#10990)
* feat(javascript)!: require the runtime parse-failure count and active Electron execution paths The V8 Inspector projection always writes scripts.parse_failed_total and the active Electron service always commits parameters.resolved_paths, so both are now required. Runtime reconciliation reads the admitted execution paths only and no longer falls back to request-spelled paths in parameters, and checks the observed executable path against them on every capture. JavaScriptStaticAnalysis.routes and module_runtime keep their omission, which current producers still make (a checkpoint that cannot retain route facts; no recovered factory runtime); their comments now say so instead of naming historical analyses. BREAKING CHANGE: JavaScript runtime observations without scripts.parse_failed_total, and active Electron Evidence without parameters.resolved_paths, are refused as malformed; recreate the observation. * test(javascript): give the shared Node reconciliation fixture the required parse-failure count * feat(browser)!: require browser observation facts their producers always write (#10991) * feat(browser)!: require browser observation facts their producers always write The source-map fetcher always writes effective_url (string or null), the web bundle analyzer always writes schema_property_names_coverage, and the CDP storage fingerprinter always marks IndexedDB schema fingerprints with projection_version 2. Each is now required. The IndexedDB marker is tied to its scope by a discriminated union and derived from the scope in the producer, so compare_web_captures no longer carries the store-only projection branch. response_identity and the WebMCP consequential hint keep their omission, which current producers still make (a body not fully read; an invalid annotation); the guide no longer attributes it to historical captures. BREAKING CHANGE: source-map items without effective_url, WebMCP declarations without schema_property_names_coverage, and IndexedDB schema fingerprints without projection_version are refused as malformed; recreate the capture. * feat(managed)!: refuse members beside a null signature resolution (#10992) * feat(managed)!: refuse members beside a null signature resolution signature_resolution is null only when member decoding exceeded capacity, and the capacity-recovery producer then examines no members. The managed member inspection schema now enforces that: a null resolution with any field, method, member reference, call edge or field access is malformed. With that rule, every admitted inspection with members attests type-name resolution, so the raw-digest fallback is unreachable and is deleted: comparableSides, hasSignatureResolution, the comparison's signatureResolutionExamined flag and the "does not attest" limitation. The shared workflow example that carried resolved digests beside a null attestation now attests resolution. BREAKING CHANGE: managed member Evidence with a null signature_resolution and any examined member is refused as malformed; recreate the observation. * docs: describe historical Evidence by what the format revision now refuses (#10993) SQLite worker_timeout_ms is required, so the SQLite guide no longer reads a missing value as unknown settings. The IL2CPP, ESP image and process capture guides now say that bundles exported without evidence_format are refused, while a standalone record from an earlier release is still read with the stated omission semantics (records carry no format marker yet). The route inventory guide describes a parent without route_inventory by its meaning rather than by its age. * refactor(javascript): require static analysis coverage from the JavaScript worker (#11001) * refactor(javascript): require static analysis coverage from the JavaScript worker Both JavaScript static producers always write analysis_coverage: the analyzer measures it on every parsed source and the failed-parse result carries an unexamined coverage. The worker schema and the static analysis type therefore require it, the preload-discovery checkpoint copies it unconditionally, and ElectronBoundaryAnalysis reads Electron applicability and examination limits from it alone. The fallback that re-derived Electron use from semantic module links and retained references for analyses without coverage is deleted, as are the graph and builder branches for a missing coverage. Retained Evidence graph observations are unchanged: the analysis view still counts a stored JavaScript observation without analysis_coverage as unmeasured, since standalone records carry no format marker yet. The worker runs from the same build as its parent, so no external caller sees the stricter reply schema. * feat(browser)!: require storage fingerprint, Link context, mapping index and invalid-map identity facts (#11002) * feat(browser)!: require storage fingerprint, Link context, mapping index and invalid-map identity facts Each field is written by its only producer on every capture: - The CDP storage capture always writes content_fingerprints, fingerprint_algorithm and fingerprints_complete, so their schema defaults are removed. - The CDP Link header projection always writes context_url and context_scope, so they are required. - The source-map fetcher writes source_index and declaration_index on every mapping row, so they are required. - The fetcher judges a map invalid only after reading its complete body. A separate invalidSourceMapItem builder now takes the response identity as a required argument, and the schema's invalid member requires response_identity; fetch_failed keeps it optional because those rows can come from a body that was not fully read. The browser and source-location guides no longer describe these fields as optional for older saved captures. BREAKING CHANGE: page inspections without the storage fingerprint fields or Link context fields, source-map mapping rows without their indexes, and invalid source-map items without response_identity are refused as malformed; recreate the capture. * test(browser): keep source-omission coverage on a still-defaulted field and refuse a missing fingerprint algorithm * feat(browser)!: require web-bundle target origin, inspection producer facts, scenario redirect state and exclusion kind (#11014) feat(browser)!: require web-bundle target origin, page inspection producer facts, scenario redirect state and exclusion kind Each field is written by its only producer on every record: - buildCaptureObservation always writes capture.target_origin (the validated origin or null), so analyze_web_bundle Evidence and both web-bundle view results require it; the view's conditional spread is gone. - The CDP page capture always writes accessibility node states, script frame_id (null when unattributed) and worker opener_target_id and parent_frame_id, so their schema defaults are removed. - PlaywrightScenarioNetwork writes redirected_from_transaction_state exactly when the predecessor ID is null, so request events now require it there and still refuse it on linked events. - The reference-source importer writes entry_kind on every exclusion (unknown when the kind was not observed), so it is required. The browser scenario contract and CLI guide no longer describe older captures or exclusions without these fields. BREAKING CHANGE: web-bundle analyses without capture.target_origin, page inspections without these script, accessibility or worker fields, scenario network events with a null predecessor and no redirect state, and reference source graphs whose exclusions lack entry_kind are refused as malformed; recreate the capture or re-import the source. |
||
|
|
08420be3bd |
fix(ghidra): explain Program reuse after startup timeouts
Explain Program reuse in cold-start timeout recovery and distinguish query snapshots from saved Ghidra analysis. Preserve explicit startup-mode selection, first-analysis requirements, and custom-analyzer choices. Refs #10365 Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com> |
||
|
|
4126698407 |
feat(mcp): project compact input schemas into the portable advertised dialect (#10632)
* test(mcp): check advertised schemas against a portable dialect in every profile * fix(mcp): re-emit advertised patterns in a portable regex grammar * fix(mcp): present discover_tools input through the selected profile The hot-cold catalog registered discover_tools directly with the SDK, so the default compact input profile still advertised its canonical schema, including page-size defaults clients apply on their own (#5322). Route every listed input schema, transport discovery included, through one server-owned presentation, and pass the selected presentation to the deferred server, which serves recorded tool schemas but not discovery. * fix(mcp): keep the Evidence union on described borrowed inputs borrowEvidenceInput installed its advertised projection on one schema instance. A call site's .describe() rebuilds the schema from its definition, so match_native_functions advertised left and right as unconstrained values in every input profile. Install the projection in the borrowed parser's constructor so derived schemas keep it, for both borrowed inputs and borrowed arrays. * fix(mcp): validate advertised dialect by selected profile * fix(mcp): preserve schema widening through references * feat(mcp): project compact input schemas into the portable advertised dialect One projection (advertisedDialectProjection.ts) owns the compact input advertisement: one type per node, items on every array, string literals as enums, oneOf widened to anyOf, allOf merged, tuples as element unions, exclusive bounds made inclusive, and every keyword outside the dialect dropped. Each rewrite is exact or widening; server validation is unchanged. The root description and sentences for dropped cross-field constraints move to the tool description, which Codex and Zed keep. The compact baseline falls to nullable values only (29), which the dialect cannot express without narrowing an input. The gateway shape repairs (typeArrayItemUnions, hasGatewayIncompatibleShape), the second dependentRequired-to-prose copy and the strict-gateway test denylist are removed; the dialect checker gates the inline presentation instead. * fix(mcp): refuse zero-padded repeat bounds and record host-specific path patterns * fix(mcp): keep projected schemas permissive * fix(mcp): keep references valid when presentation widens their targets * fix(mcp): keep a single union branch's closure scoped to its properties * fix(mcp): keep an allOf member's tuple tail with its own positions * fix(mcp): relax references into negations and conditionals presentation may remove * test(mcp): select the borrowed Evidence contract from its family * fix(mcp): keep astral literals and dynamic references widening in every mode * fix(mcp): omit astral literals and relax untracked references when presentation widens * fix(mcp): read reference pointers by schema position, not segment spelling * fix(mcp): protect references into collapsing boolean unions and keep referencing branches out of the collapse * fix(mcp): keep reduced schemas open when their root admits names by pattern * test(mcp): keep the reduced-schema pattern case outside the size-limited block * fix(mcp): omit patterns whose classes name astral characters * fix(mcp): decide union collapse and pointer protection from canonical branches * docs(mcp): document non-u astral matching and pin BMP agreement across V8 modes * fix(mcp): keep prototype-named properties as own properties in the dialect projection * test(mcp): expect the advertised base64 schema to omit the unbounded pad-bit probe * fix(mcp): protect references into unevaluated keywords lost evaluation removes * fix(mcp): emit stack-safe classes with non-ASCII members and protect draft-07 reference siblings * fix(mcp): protect references into literal siblings of relaxed draft-07 references * feat(mcp): omit output schemas from tools/list by default (#10646) * feat(mcp): omit output schemas from tools/list by default No surveyed model API reads an output schema, MCP client validators repeat REA's own result validation, and complete output schemas were about 92% of the default tools/list. REA_MCP_OUTPUT_SCHEMA_PROFILE now resolves to off through one owner (resolveMcpOutputSchemaProfile); compact and full remain selectable. structuredContent is still delivered, and the deferred server serves both off and full from the recorded catalog with the matching recorded identity. Tests and artifact verifiers that validate results against complete advertised output contracts select full explicitly. * fix(mcp): select schemas in verification workflows * fix(mcp): select complete output schemas in the Electron verifier * fix(mcp): select complete output schemas in standalone verifier probes * fix(mcp): select complete output schemas in every verifier transport * test(mcp): select full output schemas in packet and signal schema checks * fix(mcp): validate the doctor probe reply against the canonical output contract (#10655) * fix(mcp): validate the doctor probe reply against the canonical output contract * test(mcp): replay doctor probe validation under every output profile * test(mcp): accept typed-branch nullable unions in the advertised dialect (#10649) * test(mcp): select full output schemas in HTTP session workflows * fix(mcp): keep the Evidence union on described borrowed inputs (#10597) * fix(mcp): keep the Evidence union on described borrowed inputs borrowEvidenceInput installed its advertised projection on one schema instance. A call site's .describe() rebuilds the schema from its definition, so match_native_functions advertised left and right as unconstrained values in every input profile. Install the projection in the borrowed parser's constructor so derived schemas keep it, for both borrowed inputs and borrowed arrays. * test(mcp): select the borrowed Evidence contract from its family * docs(mcp): admit baseline growth only for restored contract declarations * fix(mcp): state reduced multi-type properties as typed branches, not type lists The reduced fallback derived a property's types and emitted them as a type list, which Gemini, Moonshot and Ark reject. A property whose canonical schema is anyOf string and number therefore traded a typed union for a rejected construct when the inline projection fell back. Emit one type, or anyOf typed branches, so [T, null] becomes the dialect's nullable union. |
||
|
|
da8f366596 |
fix(mcp): register fx and MCPorter where they read their configuration (#10698)
* fix(mcp): register fx and MCPorter where they read their configuration fx reads $FX_HOME/mcp.json when FX_HOME is set, and MCPorter reads MCPORTER_CONFIG exclusively or prefers an absolute XDG_CONFIG_HOME file. rea mcp add always wrote ~/.fx/mcp.json and ~/.mcporter/mcporter.json, which those clients then ignored. Resolve both from the clients' own rules, and refuse an FX_HOME fx itself refuses. * fix(mcp): detect MCPorter by its selected file and refuse FX_HOME aliases Address review findings: MCPORTER_CONFIG now also names the detection marker, so default registration includes MCPorter when only that file exists, and is resolved with path.resolve as MCPorter does. FX_HOME with . or .. segments is refused, so the private profile mode cannot reach the home folder through an alias. Override tests use the host's path rules for real temporary paths. * fix(mcp): never apply fx's private folder mode to the home folder A linked parent in FX_HOME can name the caller's home folder after the textual root and home checks pass. The private profile writer now compares the opened folder's identity with the caller's home folder and refuses before changing modes or publishing. * feat(setup): let doctor, update and uninstall see MCPorter registrations (#10702) * feat(setup): let doctor, update and uninstall see MCPorter registrations MCPorter becomes a client-table row, so a registration rea mcp add or rea setup --client mcporter wrote is inspected, refreshed and removed like other clients. MCPorter already imports setup-managed clients' registrations, so the row is applicable only through REA's own registration: setup never selects it from detection and doctor reports it only when its file holds a rea row or the caller selects it. A relative MCPORTER_CONFIG is refused because MCPorter resolves it per command directory. * fix(setup): detect MCPorter by the folder of the file it loads With an absolute XDG_CONFIG_HOME and only a legacy ~/.mcporter file, the row returned the legacy file but the absent XDG folder as its detection evidence, so default registration and setup skipped MCPorter. * fix(setup): keep an unresolved client unknown without blocking others' maintenance A client whose configuration location cannot be resolved (for example a relative MCPORTER_CONFIG) is reported as unknown, never missing or absent. Update maintenance leaves each unresolved client out of its scope and names it with its own recovery, while still maintaining the other clients; uninstall still stops, because it cannot tell whether that client's file holds REA's row. * docs(setup): restore MCPorter's release note and client-table row after rebase * fix(update): keep unknown clients in every failed maintenance plan |
||
|
|
b572dbaf25 | feat(setup): mark a shared enable:false registration as a manual conflict in doctor status (#11019) | ||
|
|
d044f44d91 |
feat(setup): inspect, refresh and remove five mcp-add-only clients (#10694)
* feat(setup): give five mcp-add clients one client-table row Cline VS Code extension, Kiro, Mastra Code, Zed and Amp move from registration-only catalog entries to rows in the client table. rea mcp add projects those rows, so doctor, update and uninstall now inspect, refresh and remove what it wrote, and setup offers each client when detected. Refs #7181 * refactor(setup): keep FreeBuff's comment on its declaration The client helpers added for the folded mcp-add clients were inserted between FreeBuff's profile-directory comment and its declaration. Move them above it, and drop an import the folded locations no longer use. * test(setup): refresh an older mcp-add registration through setup Address review: seed each folded client with an older REA-owned package runner launcher, then check that doctor reports it stale, update selects it, setup plans and applies the update, and doctor then reads the current launcher. * fix(setup): register Amp in settings.jsonc when that is its settings file (#10717) Amp reads ~/.config/amp/settings.json or settings.jsonc. REA always used settings.json, creating a second file beside an existing settings.jsonc. Use settings.jsonc when it is the only file, and refuse when both exist because Amp does not document which one it reads. * feat(setup): manage Cline in VS Code Insiders, VSCodium, Cursor and Windsurf (#10729) * feat(setup): manage Cline in VS Code Insiders, VSCodium, Cursor and Windsurf The Cline extension keeps its MCP settings in the global storage of whichever editor runs it. REA resolved only VS Code's, so a Cline in another editor was never configured, inspected or cleaned. Add one client-table row per editor, resolved through the shared Code-OSS user data rule, and detected where that editor's Cline settings exist. * test(setup): cover VSCODE_PORTABLE for Cline's editor hosts Address review: VSCODE_PORTABLE moves only VS Code's own storage, so the other editors keep their settings path; and the older-release note now says which hosts mcp add could register before. * fix(setup): find a Linux Flatpak Zed's configuration (#10721) * fix(setup): find a Linux Flatpak Zed's configuration Zed's config_dir honors FLATPAK_XDG_CONFIG_HOME first, and a Flathub Zed reads ~/.var/app/dev.zed.Zed/config/zed inside its sandbox. REA always wrote ~/.config/zed, which that Zed never reads. Honor the override, use the sandbox folder when it is the only one, and refuse when both a native and a Flatpak configuration exist. * fix(setup): treat an XDG_CONFIG_HOME naming the Flatpak folder as one Zed folder * fix(setup): treat linked native and Flatpak Zed folders as one configuration * test(setup): expect doctor to report the Amp registration mcp add wrote |
||
|
|
17a5f14f98 |
fix(process): run ps from fixed system locations, not REA's PATH (#10755)
* fix(process): run macOS ps from /bin/ps, not REA's PATH Owned process cleanup and process sampling ran "ps" through REA's PATH, so an unusable PATH turned a confirmable cleanup into an incomplete one (spawn ps ENOENT). macOS ships ps at /bin/ps on the sealed system volume. Linux keeps the documented procps-on-REA's-PATH contract. * test(process): stop the ps fixture only after its descendant spawned * fix(process): run Linux ps from fixed system locations before REA's PATH Linux process ownership now runs the first executable of /bin/ps, /usr/bin/ps and /run/current-system/sw/bin/ps, searching REA's PATH only when none exists. Admission refusals name the ps that ran in their reason and ps_command/ps_source diagnostics; cleanup failure reasons keep the executed command. Doctor and remediation text follow the same selection. The macOS cleanup test now releases its fixture group even when the descendant wait fails. * fix(application): keep which ps ran in provider availability ownedProcessPrerequisiteAvailability copied only the admission and system codes from a Linux ps refusal, so Ghidra, JADX and Apktool status lost ps_command and ps_source. Copy the refusal's prerequisite facts from one key list. |
||
|
|
b0e32578ae |
feat(cli): warn after mcp add writes Claude Desktop's configuration (#10696)
* feat(cli): warn after mcp add writes Claude Desktop's configuration rea mcp add resolves Claude Desktop from the client table, whose row says a running app can rewrite its configuration from memory, but the command never told the caller. Print that notice on stderr when it writes the file. Backup notices now use the client's display name instead of special-casing Amp. * fix(cli): warn about Claude Desktop whenever mcp add wrote its file Address review findings: a registration that failed after publication, such as cancellation during verification, still left the file written, so the running-app notice now follows the registration owner's written fact instead of overall success. The CLI test compares the delivered notice with its owner instead of freezing the sentence. |
||
|
|
6c062c9c2a |
fix(setup): stop writing the default compact input profile for Kimi and LM Studio (#10559)
* fix(setup): stop writing the default compact input profile for Kimi and LM Studio The server already advertises compact input schemas when REA_MCP_INPUT_SCHEMA_PROFILE is unset, so setup no longer adds that value to Kimi Code and LM Studio registrations, and doctor/status no longer report a registration without it as stale. Explicit stored or setup-environment profiles are still preserved. Refs #10514 * fix(setup): validate LM Studio registration environment * test(hopper): retry cleanup after confirmed application exit |
||
|
|
959af004df |
docs: refuse literal tool counts in living prose (#10585)
* docs: refuse literal tool counts in living prose docs:check now refuses a count of ten or more tools in README, AGENTS, CONTRIBUTING, docs/ (except dated releases, specs, verification and ADR records), the authored skill and the public website. The catalog owns that number and every hand-written copy goes stale when a tool is added. The three current statements (240, 172 and 254 tools, all measured on earlier builds) now refer to the catalog of the measured build instead. * fix(docs): exclude generated pages from prose checks * fix(docs): rerun the tool-count check when any scanned prose changes The docs:check:built cache inputs and the CI docs lane did not cover AGENTS.md, CONTRIBUTING.md, every .agents/skills tree or website/public, so an edit there could reuse a cached pass or skip the docs job. The scanner now owns one isLivingProsePath predicate; the CI plan selects the docs lane with it, and a test binds the turbo inputs to the scanned roots. |
||
|
|
b342254f9a |
refactor(macho): read universal Mach-O slices only where admission selected them (#10642)
Hopper and native dispatch metadata re-ranked FAT slices from the target's architecture name instead of reading the admitted universalSlice. Both now consume the admitted range and refuse when it is missing or undeclared. Mach-O load-command codes move to one table with an architecture guard. |
||
|
|
57150091d2 |
fix(ghidra): name the declared-seed recovery when no function covers an address (#10623)
Problem: code that Ghidra auto-analysis never reaches, such as DOS MZ handlers stored only in runtime-filled dispatch tables, has no Ghidra function. procedure_* lookups then returned a plain procedure_not_found whose remediation pointed only at list_procedures, and resolve_containing_procedure returned not_in_procedure with no caveat. Neither outcome named the supported recovery: declaring the entry as a function seed in REA_GHIDRA_SEED_FILE. Fix: one Ghidra-owned recovery, ghidraFunctionSeedRecovery(source), names the seed mechanism without claiming that the address holds code. It follows the session source, because seeds apply only to a fresh import: selected projects and owned checkpoints name the setting to unset first. The procedure_not_found remediation appends it. A not_in_procedure resolution now carries ghidraNotInProcedureLimitation, attached through the same absence-caveat path as the empty-reference caveats and read from the domain containing-procedure parser. outside_segments and found results are unchanged. The installation guide's seed section says where the recovery appears. Validation: src/ghidra/GhidraProvider.behavior.test.ts fails on the base (4 failed, 291 passed: both procedure_not_found rows lack the setting, the selected-project row lacks the fresh-import seed recovery, and not_in_procedure has no seed limitation) and passes after the fix (295 passed). npm run check:fast passes. Real Ghidra, including seeding real-mode DOS linear addresses, was not exercised. Refs morluto/rea#3767 |
||
|
|
81c115b4c3 |
fix(setup): register mcp add clients from the shared client table (#10591)
Table-backed add-mcp agents now project their client-table row instead of redeclaring format, display name and profile in a second table. The row also carries add-mcp aliases and project documents. mcp add now applies the read-scope rules setup already enforced: Gemini settings policy blocks, the Claude Desktop MSIX write blocker and MSIX AppData redirection. |
||
|
|
5732aad077 |
docs(client-configuration): state how doctor reads a Command Code transport
Doctor reads transport, falling back to type, and reports a remote http/sse or url-only entry as unknown rather than invalid; only a non-text tag is invalid. Refs #7650 Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com> |
||
|
|
cc854f1ca1 |
docs(client-configuration): document Cursor, Windsurf, and Command Code targets
The client configuration reference had no entries for three clients that the installation guide lists as supported and sends readers here for. Add a section for each naming the configuration file setup writes, the mcpServers.rea entry key, the entry fields, and the shared skill root, as defined in src/application/SupportedClients.ts and src/application/ClientConfigurationDocument.ts. Fixes #7650 Supersedes #7750 Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com> |
||
|
|
4d02bc82b3 |
fix(setup): disclose manual connector steps before approval
Fixes #7692 Supersedes #7792 Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com> |
||
|
|
213fcc8ce1 |
fix(snapshot): retain schema diagnostics in file failures
Refs morluto/rea#7442 Fixes #7442 Supersedes #7875 Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com> |
||
|
|
fd97d0926c |
fix(hopper): type the Apple Events authorization denial
A hardened-runtime client without the Apple Events automation entitlement got generic Automation advice, and the projection kept retryable: true, so agents retried from the same unauthorized client. The denial is now a typed launch rejection whose message and recovery name the entitlement and the Automation setting, with retry turned off. Fixes #9879 Squashed from #9916 and rebased onto main. Co-Authored-By: morluto <76467478+morluto@users.noreply.github.com> Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com> |
||
|
|
1d08253ff2 |
feat(python): decode CPython 3.14 and 3.15 pyc code objects
Decode marshal slice constants from magic 3608 onward and pin the 3.11 code layout and inline-cache tables for the 3.14 and 3.15 magics. Refs #8206 |
||
|
|
5b158b2d1d |
fix(setup): stop treating Antigravity's .gemini storage as Gemini CLI
Antigravity keeps its MCP configuration and skills under ~/.gemini/config, and Gemini CLI was detected by the bare ~/.gemini directory. Setting up Antigravity therefore made broad setup select Gemini CLI and write a registration nobody asked for. Gemini CLI's applicability now follows its own evidence: settings.json, its trusted-folder records (honoring GEMINI_CLI_TRUSTED_FOLDERS_PATH) and its .gemini/tmp session state, through the existing discoveryPaths owner that detection, status and uninstall share. Selecting --client gemini_cli explicitly is unchanged. Fixes #7567 Co-Authored-By: gensokyo-dev <gensokyo-dev@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
d412569293 |
fix(mcp-doctor): close only through the owned transport
The owned transport is the doctor's only cleanup owner, and Client.close only delegates to it. Close it once and report its typed failure instead of aggregating a duplicate SDK close and clearing that failure after a retry. Pass the filtered caller environment as the launcher's base only, and name the doctor operation in transport cleanup errors. Cover a descendant in its own session, which only the token sweep can reach, and a late cleanup denial that keeps the startup diagnostic and reports the retained run. Bound the fixture descendant's lifetime so a failing run cannot leak it. Document the doctor's process-family ownership and output bound. Co-Authored-By: gensokyo-dev <gensokyo-dev@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
edc9304669 | feat(setup): expose explicit MCP catalog profile selection (#9354) | ||
|
|
d74549e495 |
chore(main): release rea-agents 6.9.0 (#7104)
* chore(main): release rea-agents 6.9.0 * docs(release): curate 6.9.0 notes and contribution provenance * docs(release): explain reviewed result and recovery migrations * docs(release): refresh 6.9.0 provenance through capture parser fix * docs(release): include worker admission CI fix and refresh provenance * docs(release): refresh candidate with lifecycle CI fixes * docs(release): include ReFS support in 6.9.0 notes * docs(release): include UnityFS boundary repair in 6.9.0 --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: morluto <76467478+morluto@users.noreply.github.com> |
||
|
|
a01674377f |
feat(native): support ReFS filesystem authority (#10086)
* docs(native): specify Windows ReFS filesystem authority * docs(native): plan ReFS filesystem support * feat(native): admit ReFS filesystem identities * feat(native): support ReFS filesystem authority * feat(native): advertise ReFS Windows support * docs(native): format ReFS support documents * docs(native): record ReFS verification tasks * docs(native): record ReFS draft pull request * docs(website): correct remaining ReFS translations * fix(docs): correct Windows native guide link in ReFS plan --------- Co-authored-by: morluto <76467478+morluto@users.noreply.github.com> |
||
|
|
dae1551403 |
feat(setup): support Cline as a client (#10128)
* feat(setup): support Cline as a client * test(setup): cover Cline doctor and uninstall ownership * docs(setup): document Cline support * test(setup): verify Cline against an installed client * test(setup): include Cline in the exhaustive client detection list * docs(setup): note that a hand-written rea entry blocks Cline setup * fix(setup): isolate Cline verification and await MCP discovery * fix(verification): own and isolate Cline discovery * fix(setup): preserve native Cline transport settings --------- Co-authored-by: morluto <76467478+morluto@users.noreply.github.com> |
||
|
|
7aca4cef64 |
feat(audit): report what a shipped app exposes to static analysis (#8525)
* feat(audit): report what a shipped app exposes to static analysis Adds `audit_release_exposure` and `rea audit-release-exposure` to report source maps, Electron fuse implications, extractable payloads, debug information, build metadata, and credential markers. Checks carry stable IDs, observations, statuses, and fixed remediation, while incomplete and unassessed checks remain visible without implying a security verdict. Credential findings include only rule IDs and locations. The CLI supports `--fail_on` severity thresholds and exits 3 when an exposed check meets the threshold. * fix(audit): keep incomplete coverage unknown across text, fuses, Go flags and cancellation Probe files with unrecognized names as text, keep undecided fuse slices unknown, forward opaque container coverage, read paths from Go build flags, and compare inventoried digests before accepting owner facts. Keep typed cleanup failures and attach the partial report when a later owner is cancelled. Pin the verifier's @electron/fuses version and move the tests to the named contract family. * fix(audit): match package members by source spelling and close remaining coverage gaps Reopen package members by their source spelling and keep caller path traversal in directory reads. Parse quoted and attached Go build flags, bind a native image fuse read to its own digest, and keep reader resources and the audit's partial report when cleanup or cancellation combine failures. * fix(release-exposure): bind package members by ordinal and follow named map references Package members were matched to container entries by sourcePath, which is not unique in a PyInstaller executable, through a queue that only moved when a member was reopened. Bind by container-relative path and duplicate ordinal, the numbering inventory uses, so read order cannot change which bytes a member gets. A sourceMappingURL naming a file without a map extension was ignored. Local targets are now examined as maps whatever their name, and a target already scanned as plain text leaves coverage unknown. * fix(release-exposure): match data: source map scheme case-insensitively URL schemes are case-insensitive, so an inline declaration such as //# sourceMappingURL=DATA:application/json;base64,... was routed to the local-reference path, which ignores scheme URLs. Its embedded sources were silently dropped and source_map_sources reported not_observed. * fix(release-exposure): normalize declared map targets and count unreached ones A sourceMappingURL that decodes to a decomposed name (cafe%CC%81.json) never matched the inventoried member, whose logical path is NFC, so the map was scanned as ordinary text and its sourcesContent went uncounted. Map-target lookups now use an NFC key on both the record and lookup side; the declared URL is left as written. A declared map target that is never reached is now counted as a skipped map, so the source-map checks read as unknown coverage instead of not_observed. * fix(release-exposure): recover indexed leaves after any map format failure An indexed map whose one leaf has malformed mappings (such as AA) threw a format failure that only recovered leaves for unsupported sections, so a valid sibling leaf with sourcesContent was dropped and javascript.source_map_sources read unknown instead of exposed. Leaves are now recovered for any format failure, with the envelope parse guarded so invalid JSON still falls through to the unparsed count. A nested package that inventory recognized but did not expand was probed as a plain binary and left the source-map checks at not_observed. It now marks coverage unknown and records a limitation. Reader tests assert the javascript.source_map_sources status for the NFC map-name cases as well. * fix(release-exposure): count an unexpanded nested package as a readable member An unencrypted nested package that inventory recognized but did not expand is still a member its parent package already read. Count it as readable so packaging.extractable_payload reports exposed, while its own contents keep coverage unknown. * fix(release-exposure): bound the indexed leaf fallback by decoder limits The fallback walk after a map format failure expanded every section and built a full ancestor path per leaf, so a map refused for nesting depth could still allocate far past the decoder budgets. Walk only to the 64-level section depth and the shared record budget, keeping leaf maps without materializing section paths. * fix(release-exposure): collect UNC roots from Go flag paths A flag such as -I\\buildhost\sdk\include matched none of the path roots in GO_FLAG_PATH, so a network path that was the only one in complete build info left go.build_paths at not_observed. Accept \\host\share roots alongside the slash-rooted, dot-relative and drive-letter forms. * fix(release-exposure): keep Electron undecided without positive proof The desktop owner names Electron only from an ASAR layout, so an asar: false build has no candidate. A complete scan with no candidate was reported as not_electron, which outranks unresolved and safe fuse outcomes and hid them as not_applicable. Leave the family unknown unless the fuse holder rules Electron out: an app bundle with no Electron Framework, or a directory with complete coverage whose native images were all read and hold no sentinel. A directory with no native image is not proof, so its fuse checks now report unknown. * fix(release-exposure): decode wide text members before scanning A member's kind bypassed the NUL guard, so a UTF-16 plist was decoded as UTF-8, matched nothing and still counted as scanned. A directory holding only that member reported text.credential_markers as not_observed. Decode by byte order mark at one boundary instead. UTF-16 is scanned in either byte order, and inline maps read the same text. UTF-32 and NULs no mark explains count as skipped, whatever the member's kind. A binary plist keeps its raw scan. Unnamed members with a mark now reach the scanner, and the plist decoder shares the same mark detection. * fix(release-exposure): follow file: URL source map declarations The scheme guard in noteLocalMapReference returned on every URL scheme, so a declaration such as file:///release/debug.json was dropped with the remote ones. A member without a .map name was then scanned as ordinary text and javascript.source_map_sources reported not_observed. Convert file: URLs with fileURLToPath and record them in mapTargets through the same step as relative declarations. A target that is never reached, or that was already scanned as text, counts as skipped, and so does a malformed file: URL. A file: URL names one absolute location, so a .map target outside the inventory stays unassessed rather than being trusted by its name. Remote schemes stay ignored. * fix(release-exposure): match backslash-relative Go flag paths GO_FLAG_PATH accepted dot-relative roots only with a forward slash, so `-I..\sdk\include` and `-I.\sdk` produced no path and go.build_paths came back not_observed. Accept either separator after the dots. The CLI acceptance test now expects unknown for electron.run_as_node on a directory with no native images, matching the service. * fix(release-exposure): keep fuses unknown on incomplete inventory A directory inventory that stops at an acquisition limit never reports the images it did not reach, so the native image sample has no omission and safe fuses on an included helper settled to not_observed even though scan coverage was unknown. Treat unknown coverage like a truncated sample until the Electron executable is accounted for. A selected native file is that executable, so it keeps its decided fuse result. * fix(release-exposure): decode binary plists before scanning A binary plist stores each string as ASCII or UTF-16BE. Scanning the raw bytes as UTF-8 missed any string the encoder kept in UTF-16, such as one with a non-ASCII character, and still counted the member as fully scanned, so text.credential_markers read not_observed. Decode through the plist owner and scan its strings, dictionary keys and data. A plist that cannot be decoded keeps its raw bytes in the scan and counts as skipped, so coverage stays unknown. * fix(release-exposure): keep UTF-8 members that hold a NUL Any NUL in a member's first 512 bytes made the decoder give up, so a script with a literal NUL in a string never reached the credential or inline-map checks. An exposed marker in it read as unknown, and --fail_on high exited 0. Validity alone cannot tell wide text from UTF-8, since ASCII in UTF-16 is valid UTF-8. Treat a header that is an eighth or more NUL bytes as wide text and anything not UTF-8 as undecoded, and scan the rest. The docs now separate BOM-marked UTF-16, which is scanned, from wide text with no byte order mark, which is not. * fix(audit): scan every string a binary plist stores The plist scan read only the decoded value, which drops objects the root no longer references and entries a later duplicate key replaced. Those bytes still ship, but the audit marked the scan complete, so a credential stored there read as not observed and --fail_on high exited 0. Read strings, keys and data from the object table instead. A stored object that cannot be read leaves the member unassessed, and a total byte budget bounds table entries that overlap to repeat the same text. * fix(audit): keep packaged native images from ruling out Electron The applicability check only looked at the "native images" omission. An Electron executable inside a compressed .NET or PyInstaller member is recorded under "packaged native images", so a directory whose on-disk hosts had no fuse sentinel read as not Electron and all four fuse checks as not applicable. Treat that omission as an unread image too. * fix(audit): keep readable plist text when one object is unreadable Throwing on one unreadable stored object discarded every string already decoded, so a UTF-16BE credential beside a truncated unused object was lost: the raw bytes that replaced it cannot match NUL-separated text. Return the decoded text with complete false instead, and keep the raw bytes in the scan beside it so ASCII in the unread object is still seen. The member stays unassessed. Text past the budget ends the same way. * fix(audit): read escaped inline maps and extensionless SEA entries A data URL may percent-escape its base64 payload, so a map such as one padded with %3D did not decode and the audit counted no embedded source map. Decode the escapes before reading the base64. A directory walk classed a SEA entry by its code path, so a main script whose code path names no script was never scanned as JavaScript and its inline map went unseen. Class it by the role the SEA metadata gives it. * fix(audit): check plist text against the budget before decoding it decodeBinaryPlistText decoded each stored object before comparing its size with the remaining budget, and it keeps going after an object is rejected so later text is still read. A plist under the input limit could repeat a large range through overlapping table entries and force gigabytes of decoding that the audit then discarded. Separate finding a stored payload from decoding it, so a range past the remaining budget is rejected without allocating its text. Earlier text and the incomplete result stay as they were. * fix(audit): count a packaged PE with an unread header as a native image A package member whose PE signature lies beyond the 4 KiB probe recorded only a PDB failure. The image was neither read nor listed under packaged native images, so a directory whose on-disk hosts had no fuse sentinel read as not Electron and all four fuse checks as not applicable. Count it as a packaged native image, the omission that keeps the question open, and keep probing it for text as before. * fix(audit): keep cleanup-incomplete errors from composed readers A desktop, fuse, Go or Rust failure became a string on that check, so an error with unfinished cleanup lost its resources and live bindings while the audit reported success, and the MCP handler does not close the service after each request. Treat unfinished cleanup like cancellation: stop the remaining owners and return the error with the partial audit. When the owner attached its own partial, keep the error and replace the partial, so cleanup stays attributed. * fix(audit): keep safe fuses unknown past a packaged native image The fuse check counted sampled-out images as possibly unread but not native images inside a package. A complete directory scan with a safe-fuse image on disk, no ASAR hint, and an unopened packaged image reported the four Electron checks as not_observed, although the Electron executable could be that image. The fuse check, the Go and Rust checks, and the Electron rule-out each decided this for themselves and had drifted apart. Move the decision to one domain predicate, nativeImagesMayBeUnread, and use it in all three. A hinted executable that was read still settles the check. * fix(audit): settle fuses only on an identified host, and read Bun and HTML maps A retained helper set electron_executable_included because the rank marks every .exe or extensionless sibling of resources/app.asar. With more than four siblings, or an inventory that stopped early, safe fuses on a helper reported not_observed while the host went unread. Rank stays a sampling hint. The check now settles only on an executable named as the host, or when inventory was complete and every executable that could be the host was sampled. A Bun sourcemap region is named .bunmap, so its role was lost and a complete audit reported no source maps. Carry the region role from the reader's metadata into the member view, in the expanded and unexpanded paths, and treat it as a JavaScript map so an unparsable region stays unresolved, not a debug companion. An HTML member was scanned as text but its inline scripts were never checked for source maps. The HTML owner now returns each body, the reader examines it like a script file, and bodies past the owner's limit count as skipped. * fix(audit): charge map reads to the count before opening the member An oversized or unreadable .map returned before readSourceMap counted it, so the allowance of 32 never ran out. An unexpanded .NET or PyInstaller package could then decompress every listed map member, about 1 MiB each, up to the 4,096 entry cap. The count bounds reads, so examineMap now reserves the slot before it opens the member. A map past the count is skipped unopened, and a linker map past it is still settled from its bounded prefix. An inline data: map is already in memory and keeps its charge at the point it is parsed. * fix(audit): examine scripts HTML loads whatever they are called isJavaScriptMember knows a script by its suffix or an assigned kind, and the reader dropped the script references the HTML owner parses. An extensionless main loaded by <script src="main"> was scanned as ordinary text, so a complete inventory reported javascript.source_map_sources not_observed with shipped sources in its inline map. The reader now resolves each JavaScript script reference against the page and its base href, and a local target without a JavaScript name is examined as a script when reached. A target read before its HTML file, never reached, or not placeable on disk counts as a skipped map, so the check stays unknown. * fix(audit): charge sibling map reads to the map count Every generic .map beside a selected file got a full 1 MiB read and a parse, with no cumulative bound, so the 4,096-entry listing allowed about 4 GiB of reading for one small selection. Move the slot rule into chargeMapRead, which examineMap and sibling classification now share. Past the count a sibling reads only the header: a linker map is still identified, and one that may be a source map stays a skipped companion. * fix(audit): report cleanup failures raised by member reads A close failure during an embedded-package probe, member read or inventory reaches the shared read filter as an ordinary reader failure. The filter kept only cancellation and integrity, so the member became a skipped read, inspect succeeded, and the retained descriptor was reported nowhere. MCP does not close the service after each request, so no caller saw it. Propagate any failure that carries cleanup, whatever its reason, so it reaches releaseExposureFailure and the audit reports its retained resources. * fix(audit): charge unsuccessful text reads to the byte allowance An oversized, undecodable, or failed text read left textBytes unchanged, so every member got the full per-member budget and the cumulative allowance did not bound what a package decompressed. Count the bytes member reads produce and charge them whatever the read yields. An oversized file on disk still costs only its probe. * fix(audit): bound the paths kept for HTML script targets A base href is copied into every script target it resolves, so a page under the text member allowance could retain hundreds of megabytes of paths. Charge each new target's resolved path to a byte allowance and leave targets past it unassessed. * fix(audit): keep examining a page loaded as a script as HTML A script element naming an .html member promoted that member to a script, and the text pass then chose one reading. The page's own script elements were never read, so an inline map in it was lost and a shipped sourcesContent went unreported. Run the script reading and the HTML reading independently, and list the script target allowance among the cases that leave source map coverage undecided. * fix(audit): detect credential markers that end in a hyphen The Google, GitLab, and Slack rules allow a hyphen in the token but ended on a word boundary, so a token ending in a hyphen at the rule's minimum length was missed and the audit reported the check as not observed. Open-ended rules now take the whole token, and the fixed-length Google rule checks the full token alphabet after its last character. * fix(audit): confirm FAT identity for probed package members The package probe treated a decoded FAT table as a universal Mach-O. A JVM class past the 4 KiB probe shares the FAT magic, so its truncated prefix decoded as a table, the member counted as an unread native image, and Electron could not be ruled out of a complete scan. Pass the member's declared size to the sniff and take identity from classifyFatContainerEvidence. A member with no usable size, or with slices past the probe, stays counted as possibly native. * fix(audit): admit binary plists in package member probes A package member's probe judged text by its own NUL test, which accepted byte order marks but not the binary plist signature decodeMemberText also reads. A PyInstaller executable shipping a binary Localizable.strings was rejected without a scan or a skipped count, so a UTF-16BE private key marker inside it could report not_observed. Name the encodings that explain their own NULs in one predicate, and move the plist fixture builders to module scope. * fix(audit): locate Go findings only in images that retain build paths The exposed decision required non-empty paths, but the locations took every image whose build info read. An image with no paths was named as a source of the leak beside the one that had them. One predicate now decides both. * fix(audit): keep completed findings when member cleanup fails A descriptor close failure aborts the member scan, and the scan's state was dropped with it, so the caller got a typed cleanup failure and no report. Source maps already counted and credential hits already collected were lost. The reader now hands the service what it assembled, with coverage unknown and a limitation saying so, alongside the failure. The service runs that scan through its existing stopped-audit path: no later owner runs, and the report goes on the error as its partial observation. * fix(audit): keep coverage unknown for nested ASARs in package hosts A member of a PyInstaller or .NET host reaches the binary probe as a plain file. An ASAR among them has a NUL-bearing header, so the probe dropped it with no traversal and no omission, and source map checks could read not_observed with complete coverage. Ask the ASAR owner's signature probe, and record a match as a nested package that was not expanded, as inventory-classified ones already are. * fix(audit): let native format facts outrank member names examineMember tried the name-based text and map routes first, so a PE an owner identified inside an ASAR, named payload.json, was read as text. Its CodeView path and the packaged-native omission were both lost, and native.pdb_path read not_applicable. Route an owner-established native format to the native probe first, and count an encrypted one as a packaged native image for the same reason. * fix(audit): report relative paths given to compiler path flags go.build_paths only kept rooted paths, so retained build settings like CGO_CFLAGS=-Iprivate-sdk read not_observed even though the setting names a directory. Take the relative argument of a C compiler path flag, attached or in the next field. Scope this to compiler settings, because Go's own tools use the same letters for non-paths such as -B gobuildid and -T 0x1000. * test(javascript): expect retained text on SVG inline scripts The SVG test from main predates this branch's inlineScripts text field, so each side passed alone and only their merge failed. * fix(audit): keep an unresolved Electron host's fuses unknown fuseCheck decided from whatever outcomes the images reported, so a host with no fuse answer read not_observed as soon as any other image in the directory reported safe fuses. Pass the images named as the host into the report and leave a check unknown when one of them has no answer for it. Other images stay free to have no fuses, because helpers in a real Electron install have none. * fix(audit): bound the paths kept for local source map targets noteMapTarget kept every declared target resolved against its member's directory, so a short URL under a long directory could retain far more than the script's own size, with no cumulative limit. Add the allowance noteScriptTarget already has. A target past it stays unassessed and counts as a skipped map, and is never read. * fix(audit): borrow the audit's scope admission for inventory inspect holds resources.run for the whole audit, and inventoryArtifact entered the same scope again. With failed cleanup pending from another audit, the inner run waits for a drain that waits for the outer run. Add inventoryArtifactInScope, which takes the caller's admission. * fix(audit): run the exposure verifier's commands under supervision The verifier launched npm and the CLI with raw execFile and then removed its temporary tree, so a timed-out child could outlive the tree it was using. Use the shared verifier commands and close them before removing the tree. Their exit error carries stdout on its snapshot, so the audit's exit-code branch reads it from there. * fix(audit): read relative -L paths and split flag arguments The relative-path reader handled C compiler settings only, so a directory kept through Go's own linker flag, such as -ldflags='-L private-sdk -s -w', reported go.build_paths as not_observed. A quoted flag and argument also reached it as one field. The separating space stayed on the argument, which reported rooted paths twice and kept a leading space on relative ones. Give -ldflags its own pattern that matches only -L, so -B gobuildid and -T 0x1000 stay ignored, and consume the separator in the flag patterns. * fix(audit): keep embedded leaves beside schema-invalid map fields The reader recovers independent indexed leaves only after a SourceMapFormatFailure, but inspectSourceMap let the schema's ZodError through. A sibling with mappings "!", a section with a bad offset or a root with a bad field skipped recovery, so a valid leaf with sourcesContent reported javascript.source_map_sources as unknown. Normalize schema rejection in SourceMapFormat, which owns these parses, so every structural failure reaches consumers as a format failure. The message is unchanged, and the codec and web fetcher already map both cases to the same result. * fix(audit): keep packaged executables' own packages unknown examinePackagedBinary counted a native image inside a package and moved on, while only on-disk images reached the embedded-package probes. An ASAR carrying a PyInstaller, Bun, Node SEA or .NET executable with a source map therefore scanned complete and reported javascript.source_map_sources as not_observed. Run the same classifier on packaged images. The probes read carrier offsets from a file, so the member's bytes stay in a temporary file for the probe alone. A detected package keeps member coverage unknown, as a nested ASAR does, and an image past one file's total byte allowance stays unprobed and unknown. A plain native member leaves coverage intact. * fix(audit): read an app's sampled images for fuses A .app target sent only the bundle candidate to the fuse reader, which resolves to the outer Electron Framework. A sidecar with RunAsNode enabled was never read, so the check reported not_observed in the app view while the directory view reported exposed. Send the bundle candidate first and then the sampled native images. An image whose digest matches the bundle's read is skipped, so the framework is not read twice. A sidecar's safe fuses cannot settle the outer framework, so a bundle read with no answer for a fuse keeps that check unknown. * fix(audit): read a Node shebang as script identity The path classifier gives an extensionless executable a resource kind, so a script such as bin/runner with a `#!/usr/bin/env node` header was scanned as text without its inline maps being examined or counted. A complete inventory then reported no shipped sources for it. The probe holds the first bytes a member reader sees, so establish the identity there. The script keeps the usual outcomes: a map that is read counts, and one past an allowance or undecodable stays unknown. * fix(audit): keep linker strings out of Go build paths Reading `-X 'main.usage=-L level'` as a library directory made go.build_paths report `level`, so a plain string could fail an audit under --fail_on low. Read the optional package selector once, before the setting's first flag, and keep the argument of -X attached to it, so a string it sets is never scanned as another option. * fix(audit): keep a failed probe directory removal owned A packaged image's probe copies the member's full bytes into a temporary directory. When removing it failed, the error became an ordinary unreadable probe: the audit could still succeed, nothing could retry the removal, and the client heard nothing about the leftover bytes. Hold the directory in the reader's resource scope, so close retries it, and report the unfinished cleanup without replacing a primary failure. * fix(audit): keep a declared .map from reading as a linker map A script's sourceMappingURL=assets.map was dropped because the name already looked like a map. A malformed assets.map then settled as a linker map, so both source-map checks read not_observed and native.debug_companions reported an exposure the release does not ship. Keep a generic .map name as a declared target and read it as a JavaScript map, in either scan order, so it stays unresolved. * test(audit): rethrow typed errors from release exposure checks A failed Result was rewrapped in a plain Error, which dropped its type, cause and cleanup details from the test output. * fix(audit): match companions by member identity, not spelling An ASAR member's location is relative, and a declared map target is absolute, so a malformed assets.map read before z.js stayed a linker companion. The examined-map lookup, which is normalized, then returned early, leaving both source-map checks not_observed. Index companions by memberLocationKey and keep each reported spelling under it. Spellings stay distinct because symlinks can make them differ. * fix(audit): retract only guessed linker maps on a declaration A script declaring sourceMappingURL=symbols.pdb after the scan reached symbols.pdb removed the shipped PDB from the companion list, because a late declaration retracted any companion. native.debug_companions could then read not_observed. Keep name-identified companions in their own set, and retract only maps that were read as non-JSON and guessed to be linker maps. * fix(audit): record an unfollowed map link as skipped The directory and ASAR readers do not follow links, so a symlinked app.js.map dropped out before any map counter moved. Its target was scanned as plain text, and both source-map checks read not_observed. Count a link that names a map as skipped wherever entries reach the audit, and mark it examined so a declaration does not count it twice. * fix(audit): read relative paths in Go compiler and assembler flags A binary built with -gcflags=-I private-sdk keeps that setting, but relative parsing covered only C compiler settings and -ldflags, so the directory dropped out of go.build_paths. Give -gcflags and -asmflags their own path options, taken from what go tool compile and go tool asm document, and strip the package selector as -ldflags does. The assembler's -D defines a symbol, so it is not one. * docs(audit): state the packaged image read allowance Packaged ELF, Mach-O and PE images are read in full and copied to a temporary file, sharing one max_file_bytes allowance, but the docs and coverage.allowances still said only a PE gets more than a header read. Name the allowance and the copies in docs/release-exposure.md, RELEASE_EXPOSURE_ALLOWANCES and the max_file_bytes description. * docs(audit): say how go.build_paths treats rooted -X values A rooted -X value cannot be told from a file path, so the audit reports it. State that, and why, so the rule is a contract rather than a side effect of how flags are scanned. * fix(audit): keep a declared sibling map out of the linker guess When the selected file declared a sibling map, the sibling classifier never consulted the declaration. A malformed assets.map then read as a linker map and raised native.debug_companions. Leave a declared sibling to the unreached-target accounting, as members already are, so it stays an unresolved source map. * fix(audit): keep undecodable Go and Rust metadata unknown Unsupported meant two things: a container this reader does not handle, and metadata the image holds in a form the reader cannot decode, such as a compressed .dep-v0 section. Both read as not_applicable, so an image that carries metadata reported that the check did not apply. Mark the second case on the format failure and carry it on AnalysisUnsupportedTargetError, so the audit records a failed read and stays unknown. The tools' own errors and messages do not change. * fix(audit): keep coverage unknown for a PE header past the probe A packaged member whose PE signature lies beyond the probe prefix stayed unclassified, so the embedded-package probe never ran and coverage stayed complete. A map inside such an image then read as not_observed. Record the member as an unexamined package where it is already marked as a possible native image. * fix(audit): read the scripts of a standalone SVG An SVG can carry a script with an inline source map, but only .html and .htm members reached the script owner, so such a file left every map counter at zero and javascript.source_map_sources read not_observed. Treat .svg as a script-bearing page. htmlArtifactReferences already reads SVG script elements, so this adds no parsing. * fix(audit): keep every possible host when no name picks one out With no named Electron host, every sibling ranks alike and electron_host_paths stayed empty, so one image's safe fuses settled the checks even when another possible host reported none. Keep all sampled candidates as hosts in that case, so a candidate without fuses leaves the checks unknown. * fix(audit): read a text-named native member by its bytes A PE member called payload.json took the text route, so it reached no native probe, and its CodeView path and packaged-native uncertainty were lost. Decide from the bytes the text read already loaded, so real text costs no extra read and the map and text allowances stay as they were. * fix(audit): let a map or script read identify a native member A package lists names without formats, so a PE called payload.js.map took the map route and never reached a native probe. Its CodeView path was lost, and with nothing counted as failed, native.pdb_path could read not_applicable. A PE at a declared script or map target was lost the same way, because declaration overrode the route. Decide from the bytes the route already read, in the map route as in the text route, and keep the listed kind for a promoted script target. Real text and maps cost no extra read, so those allowances are unchanged. * fix(audit): name a symlinked sibling debug companion Selecting an executable skipped every symlink beside it before the name check, so an app.pdb link left no companion path and no skip count, and native.debug_companions read not_observed. Selecting the directory reports the same link. Check the name first. The map branch already needs a regular file, so no link is followed. * fix(audit): keep map coverage unknown for a linked script A link named app.js to an extensionless payload was skipped as a link, and its target was read as plain text with no map directives parsed. An inline map there left no parsed or skipped count, so javascript.source_map_sources read not_observed. Only links with a map name were counted. Count a link under any name that can declare a map, the set an unread member already uses. It stays one omission when a page or a directive also names it. The target is still not followed. * fix(audit): keep a declared JavaScript map beside a selected file unknown A local sourceMappingURL with a JavaScript map name such as app.js.map was dropped on the assumption that it would be examined as a member. When the selection is a file, sibling .js.map files are never read, so the declared map left javascript.source_map_sources not_observed while the same target spelled as a file: URL left it unknown. Record every local target so an unreached one counts as skipped. * fix(audit): read paths a C compiler forwards to the linker CGO flags can hand linker options through -Wl,a,b or -Xlinker a. The compiler flag parser saw -Wl,-L,private-sdk as one field and missed the relative library directory, so go.build_paths reported not_observed. Split forwarded options out before reading paths and read them with the linker's own path options (-L, -T, --library-path, --script). This also stops -Xlinker -Bsymbolic from being read as the compiler's -B prefix. * fix(audit): read forwarded linker options by their linker meaning The forwarded linker flag pattern read -Ttext=0x400000 as a script path named text=0x400000, and it ignored -I, so -Xlinker -Ilib/ld-custom.so lost the interpreter path the compiler flag pattern found before the split. Exclude the -T section and segment address options (bss, data, text, text-segment, rodata-segment, ldata-segment) and read -I and --dynamic-linker as paths. * fix(audit): split Go flags as Go does and read external linker flags Go splits a flag value with quoted.Split: a field that starts with a quote runs to the matching quote, and any other quote is a literal character. The reader stripped every quote, so CGO_CFLAGS -I"/home/O'Neil/include" reported /home/ONeil/include, while cc was given the directory "/home/O'Neil/include", quotes included. -ldflags kept -extldflags values with the Go linker flags, where only -L counts, so -extldflags=-Lprivate-sdk reported no path. The values are now read as the C compiler driver reads them, including -Wl, and -Xlinker forwarding. A package member named payload.json or payload.js.map that holds an ASAR took the text or map route, which checked only native signatures, so the nested archive was scanned as text and coverage read complete. The route's own read now recognizes the ASAR signature as well, and the nested package leaves coverage unknown. * fix(audit): keep a named script beside a selected HTML file unknown A script element whose target had a JavaScript name such as app.js was dropped on the assumption that it would be examined as a member. When the selection is an HTML file, sibling scripts are never read, so a sibling holding an inline map left javascript.source_map_sources not_observed while the same target named app left it unknown. Record every local script target so an unreached one counts as skipped. * fix(audit): read a retained -pgo setting as one profile path `-pgo file` names a single profile, and under -trimpath Go keeps only its file name, so the flag readers dropped values such as `private-training.pgo` and split paths with spaces or commas. Report the value whole, skipping `auto` and `off`. * fix(audit): read -extldflags paths as the external linker splits them With -ldflags set to -extldflags '-L "/srv/private sdk"', the outer flag reader could not match the path behind the inner quote, and the external reader kept only relative paths, so go.build_paths read not_observed. Read each -extldflags value once, as go tool link splits it with quoted.Split, and collect rooted and relative paths from those same arguments. The rest of the setting is read as before. * fix(audit): read the Go linker's other path options go.build_paths read only -L as a Go linker path option, so a retained -ldflags='-tmpdir=private-obj -s -w' reported no path and --fail_on low missed the directory. Read every option `go tool link -h` documents as taking a directory, path or file: -I, -L, -benchmarkprofile, -capturehostobjs, -cpuprofile, -fipso, -importcfg, -memprofile, -o, -r and -tmpdir. -extld, -extar and -libgcc name a program or `none`, so only their rooted values count. * fix(audit): keep a quoted Go argument whole goFields already reads -L "/tmp/private - sdk" as two arguments, but each field was then split again before every whitespace-led dash, so go.build_paths reported /tmp/private instead of the retained directory. Split again only a field that begins with a flag, after any package selector, as a quoted "-L dir -s -w" does. Any other field is one argument and is kept whole, in -ldflags, -extldflags and CGO flags. * fix(audit): keep coverage unknown for an unread packaged image When a listed package member is a native image but its first read fails, examinePackagedBinary returned before probePackagedImage could mark its possible embedded package unexamined. Coverage stayed complete and javascript.source_map_sources could report not_observed for a payload nobody read. Mark member coverage unknown wherever a native member goes unread, including an encrypted one, as an image the probe could not read already does, and say so in the limitations. * fix(audit): read rooted Go tool path arguments whole `-L "/tmp/private,sdk"` and `-L=/tmp/a=b` name one directory, so a `,` or `=` in a documented path flag's argument is literal. `-trimpath` keeps its prefix=replacement structure. * fix(audit): count an unread packaged member once * fix(audit): keep trimpath rewrites and directory fields apart from selectors * fix(audit): keep a .map unsettled once a declaration was discarded * fix(audit): skip env option arguments when reading a Node shebang * fix(audit): keep companion coverage unresolved for a generic .map link * fix(audit): count a dropped linker-map guess as a skipped companion * fix(audit): read env settings after -- in a Node shebang * fix(audit): route a selected native image named .map by its format A directly selected or listed native image has no package format, so examineMember skipped its native-first branch and sent a file such as release.map through map routing. Its bytes then became a linker-map guess and marked native.debug_companions exposed. Native format now outranks the name for every member, packaged or not. * fix(audit): read forwarded -rpath and -rpath-link as linker paths A cgo build with CGO_LDFLAGS=-Wl,-rpath,private-runtime kept the relative directory, but the forwarded linker parser only knew -L, -T, -I, --library-path, --dynamic-linker and --script, so go.build_paths reported not_observed. Add -rpath and -rpath-link to the same parser, in the attached, = and next-field forms. Loader-expanded values such as $ORIGIN/../lib and @loader_path/Frameworks name no build-host directory and stay unreported. * fix(audit): read each entry of a forwarded linker search list -rpath and -rpath-link take a colon-separated search list. The loader token filter tested the whole list, so -Wl,-rpath,$ORIGIN:/opt/private-runtime dropped /opt/private-runtime along with $ORIGIN, and the rooted-path pass cannot see an entry that follows a colon. Split each search list into its entries and drop only the loader-expanded ones. * fix(audit): expand loader tokens only in a linker search list The runtime loader expands $ORIGIN and @loader_path only in a -rpath or -rpath-link search list. The token filter also ran on the argument of -T, -L and -I, so -Wl,-T,$ORIGIN.ld dropped a literal linker script path and a complete read could report go.build_paths as not observed. Search list entries keep the filter; every other linker path argument is kept as is. * fix(audit): count a .map link beside a selected file as a skipped companion The sibling scan skipped any .map entry that was not a regular file, so a symlink such as symbols.map -> payload beside a selected executable left debug companion coverage at not observed. The reader never follows links, so the linker map such a link may name is unread, not absent. Count a generic .map sibling link as a skipped companion without following it, as noteUnfollowedMapLink already does inside a selected directory. * fix(audit): split a linker search list only for an ELF image Only the ELF linker reads a -rpath or -rpath-link argument as a colon-separated list. The Mach-O linker stores each -rpath argument as one directory, so -Wl,-rpath,@loader_path/lib:extra is a single loader-relative entry, yet it was split and extra was reported as a build path. Carry the native image format into the Go flag reader and split search lists only for ELF; other formats read the whole argument as one entry. * fix(audit): expand only the image loader's runtime tokens A runtime search path token is expanded only by the loader of the image's format. The ELF loader expands $ORIGIN, $LIB and $PLATFORM; dyld expands @executable_path, @loader_path and @rpath. Each is literal text to the other loader, so -Wl,-rpath,$ORIGIN:/opt/private-runtime on a Mach-O image names a literal directory, yet it was dropped and go.build_paths reported not_observed. Pick the token set from the native image format; the PE loader reads no search list, so it expands none. * fix(audit): keep a declared .map link beside a selected script a source map The sibling scan counted any .map symlink as a skipped debug companion before checking whether the selected script declared it as its source map. classifySiblingMap already excludes a declared target that is a regular file, so a declared symbols.map link added a false unknown to debug_companions. Apply the declared-target check before either file-type branch; noteUnreachedTargets still counts the unread map as skipped. * fix(audit): byte-check members whose kind is only an inventory path role Inventory gives a packaged member a role from its name, such as resource for payload.json or source-map for payload.map. The packaged-format guard treated any kind other than "file" as owner-stated, so a nested ASAR an ASAR lists under one of those names skipped signature recognition and cleared coverage. Track whether the package owner stated the kind (Bun sourcemap region, SEA main script) and only skip the byte check then. * fix(audit): read Go's linker -r setting as a runtime search list go tool link -r sets the ELF dynamic linker search path, dir1:dir2:..., which the linker writes to RUNPATH. It was read as one whole path, so a release built with -ldflags='-r=$ORIGIN/../lib' reported the loader-relative entry as a build path and go.build_paths as exposed. Read -r entry by entry with the same image-loader-aware split and token filter a forwarded -rpath uses: ELF splits at ':' and drops $ORIGIN entries; Mach-O keeps the argument as one directory. * fix(audit): keep a selected package executable's native carrier format A directly selected PyInstaller executable named release.map recorded the package format as its member format, even though its ELF or PE carrier was already recognized. examineMember then missed the native-first branch and treated the executable as a linker map, reporting a debug companion. Forward the native carrier format for the selected file, as listed members already do. * fix(audit): keep coverage unknown for an unread unclassified member A packaged member with no format of its own, such as a PyInstaller payload.bin, recorded only a skipped text member when its read failed before the header. Member coverage then stayed complete, though the member could be a native image or carry a nested package. Leave coverage unknown and say which member could not be read, as an unread native member already does. * fix(audit): keep ASAR header admission distinct from max_file_bytes A directory holding an ASAR whose header exceeds the header admission was reported as a file-size refusal with max_file_bytes advice, which cannot fix it. Report the header admission as its own bound instead. * fix(audit): thread the shared ASAR header admission into release exposure createReleaseExposureService built ReleaseExposureReader with no admission, so its inventory and every reopened ASAR reader stayed on the 16 MiB default and ignored REA_ASAR_MAX_HEADER_BYTES and asar.max_header_bytes. Resolve the admission in the composition with runtimeAsarHeaderAdmission, as the Electron and V8 observation providers do, and pass it to both inventoryArtifactInScope calls, the reopened container readers, and the nested ASAR signature probe. The refusal now names the setting that can raise it instead of claiming there is no runtime override. * fix(audit): keep a nested ASAR probe stopped at the admission undecided The release exposure reader treated an ASAR signature probe that stopped at the header admission as "not an ASAR". A packaged member such as payload.json holding an ASAR whose JSON starts past asar.max_header_bytes was then read as plain text, its inner maps went unread, and javascript.source_map_sources could stay not_observed. A probe that reaches the admission limit, or runs out of a prefix read after its extents parse, now marks package coverage unknown and records a limitation, while the member is still examined as text. * fix(cli): parse audit-release-exposure --max-file-bytes as a decimal token Main now requires every numeric CLI option to admit decimal tokens and reject 0x10 and 1e3 (tests/boundary/cli/cliDecimalArguments.test.ts). Wrap the release exposure maxFileBytes option in cliDecimalField like the other maxFileBytes options, so the domain field keeps its bounds and default. * docs(specs): add the release exposure audit specification Add spec.md, plan.md and tasks.md under docs/specs/artifacts/release-exposure/ as docs/development/documentation.md requires for a new feature, and list them in docs/specs/README.md. The existing guide at docs/release-exposure.md keeps describing current behavior and its route is unchanged. * fix(audit): bind unpacked ASAR member reads to their inventoried digests A selected ASAR is captured and checked against its inventoried digest, which binds packed members. An unpacked member is read from its .unpacked companion on disk instead, and readContainerMember and readEntryBytes never compared those bytes with the member digest inventory recorded, so a companion replaced between inventory and the scan was accepted. readContainerMember now passes the member's inventoried digest for unpacked entries, and readStreamBounded hashes the full stream, draining past the read allowance when needed, and fails with "ASAR member changed before interpretation", which surfaces as an artifact_changed error like the container check. A regression test replaces a companion after inventory. The guide, spec, plan and tasks describe the binding. * fix(audit): let stated JavaScript roles outrank a .map name isDeclaredMap() routed any member whose name ended in .map to map handling before the owner's stated role or a page's script declaration was considered. A Node SEA main script at boot.map, which the SEA reader marks as javascript, and a .map script an HTML file loads both became linker-map guesses, so their inline maps were never read and native.debug_companions was reported exposed. An owner-stated source-map role or a declared map target still makes a member a map. Otherwise a stated javascript kind or a script target now wins, and only then does the .map suffix, or the inventory path role that repeats it, decide. Regression tests cover both cases, and the guide notes that a SEA main script is read as a script whatever it is called. * fix(audit): keep coverage unknown when a packaged text member fails to read A compressed member named as text, such as payload.json in an unexpanded PyInstaller host, can fail inflation before any header is returned. The .bin case already leaves member coverage unknown because an unread header may hide a nested image or package, but examineTextMember() only counted the member as skipped text, so otherwise complete coverage stayed complete and package-dependent checks could settle. An unread packaged member whose kind its package did not state now goes through noteUnreadBinary(), which counts it as skipped text, marks coverage unknown, and records the limitation. A regression test corrupts the zlib stream of payload.json in a CArchive host and checks the intact member keeps coverage complete. The guide describes the rule. * fix(audit): keep the unpacked ASAR digest check inside the read allowance |
||
|
|
69630c0362 |
fix(cli)!: own MCP client registration boundaries (#10102)
* fix(cli)!: own MCP client registration boundaries * fix(cli): bind registration to native connection facts * test(cli): isolate registration failure and fixture controls * test(cli): distinguish native syntax and launcher alignment * fix(cli): preserve registration selection and cancellation * fix(cli): honor Goose and Zed native settings paths * fix(cli): honor registration output controls * fix(cli): reject disabled Junie global locations |
||
|
|
a7ec7271d6 |
fix(setup): preserve client configuration and ownership (#9894)
* fix(config): preserve client settings during launcher refresh * fix(setup): retain parsed client launcher ownership * fix(uninstall): retain resource cleanup diagnostics * test(setup): keep temporary paths inside the workspace root Resolve setup fixtures through the test workspace path helper so joined paths stay under the temporary root. * test(setup): validate temporary paths before filesystem calls Contain workspace children and the symlink target before creating the launcher alias so a temporary path cannot leave its root. * test(setup): expect owned command identity in BOM registration status Aligned client registration status includes command_identity. The BOM read-back compared the status without that field, so an owned launcher failed the equality check. --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> |
||
|
|
5c2917266d |
fix(inputs): validate command admission and preserve valid MCP requests (#9901)
* fix(cli): validate named inputs before target admission * fix(mcp): preserve valid inputs when advertised schema references widen * test(inputs): reach session behavior with admitted inputs One-shot admission now rejects incomplete requests before a session exists. Lifecycle tests supply the required fields, and unknown arguments are rejected before provider issues are retained. * fix(cli): preserve Electron fuse path spelling Anchor relative fuse paths without stripping dot segments, and let an empty path reach the operation so it still reports invalid_request. * fix(cli): reject outline-depth unless detail is summary The advertised schema already required detail summary whenever outline-depth was present. The parser still applied the full default and accepted that combination, so its output failed the same schema. Parsing now rejects it before the command runs. --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> |
||
|
|
a54e848302 |
feat(cursor): ship a Marketplace plugin with the skill and pinned MCP server (#9878)
Cursor Marketplace installs are Git checkouts, so the plugin manifest points at a synced copy of the authored skill and starts npx -y rea-agents@<release> mcp. Release Please and the release checkpoint keep that pin aligned with the package version. The manifest, skill, and icon checks follow the local plugin bundle contract from #7619, adapted for a checkout that has no dist/. Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: GamerDubz <105694977+GamerDubz@users.noreply.github.com> |
||
|
|
dc7594e85f | fix(cli): verify partial Evidence closure before publication | ||
|
|
005435ca78 |
fix(cli): publish partial Evidence to --evidence_output on failure (#7797)
* fix(cli): publish partial Evidence to --evidence_output on failure publishCliAnalysisEvidence returned a failed result unchanged before any --evidence_output handling. When a source reached its deadline, or another failure carried partial Evidence, the requested file was not written and --detail summary still printed the complete partial Evidence inline, which reached more than 64 MB on a large build. A failure whose details.partial_observation is authenticated Evidence now publishes it through the same projection and new-file publication as a successful result. The failure keeps its code, message and remediation. With --detail summary, details.partial_observation holds the summary view, and details.diagnostics.evidence_bundle reports the path and bytes. A refused publication keeps the complete partial Evidence inline and adds details.diagnostics.evidence_bundle_error with the refusal and a limitation. Without --evidence_output, for cancellation, and for raw provider observations the failure output is unchanged. Fixes #7787 * fix(cli): keep committed partial Evidence receipts on refused publication When publishing the partial Evidence of a failed analysis, a refusal can follow a commit. Staging cleanup that stays incomplete after its retry returns cleanup_incomplete with published_path and bytes, and a cancellation after commit returns cancelled with diagnostics.evidence_bundle. The failure path read only the second form, so a committed file with incomplete cleanup was reported as not published, without its receipt or the cleanup resources, and the full partial Evidence went back inline. Keep the original analysis failure and record the receipt from either form in details.diagnostics.evidence_bundle. Incomplete publication cleanup adds published, published_path, bytes, cleanup and resources to details, the shape a successful run's cleanup_incomplete reports; resources join any the analysis failure already reports, and its own cleanup reason is kept. Once the file is committed, the delivered view (the summary with --detail summary) replaces the inline partial Evidence. Receipts omit a path that holds an excluded sensitive value, as on success. Tests drive the real staged publication through its commit point: cleanup that stays incomplete, cleanup confirmed by retry, and SIGINT after commit. A composition test checks receipt redaction on the failure path. * fix(cli): report incomplete partial publication cleanup --------- Co-authored-by: morluto <76467478+morluto@users.noreply.github.com> |
||
|
|
240f08d406 |
feat(desktop): set up and check a desktop build host in one command (#9199)
* fix(desktop): keep an empty env value empty An empty assignment is not a path. Resolving it named the working directory and rewrote the value when that directory's spelling moved. * fix(desktop): keep a run's font on the run, not the frame's text A formatting attribute such as Scribus FONT is not the document's words. Joining it across runs made a frame-wide text check of ItalicBold that failed when a run was split. The font stays a value check on its own run. * fix(desktop): do not pair JSON records by a selector-shaped field A field named @record_id matched the id suffix and became [@record_id=one], which reads an XML attribute. Records paired while their pointers matched nothing. Names that start with @ or > are not id fields. * fix(desktop): count a save-numbered id once when pairing members xml:id and draw:id values such as id123456 were both generated and numbered, so the same selector was counted twice and refused. A text edit of two elements keyed only by those ids now keeps its check. * fix(desktop): count members of root JSON arrays * fix(desktop): preserve selected state directory aliases * docs(desktop): explain tool and skill refresh prerequisites * fix(desktop): align nested state selections with aliases * fix(desktop): check build runtime export capability * fix(desktop): provide complete runtime repack command * fix(desktop): retain runtime probe failures * test(desktop): identify capture independently of schema preflight * fix(desktop): preserve document URLs and value formats * fix(desktop): bound added checks and omit noisy text guards * fix(desktop): exclude unseeded locks from task checks * fix(desktop): preserve draft bounds and launch URLs * fix(desktop): render draft values using their source format * fix(desktop): preserve launch URLs and JSON draft values * fix(desktop): recognize captured file URL documents * fix(desktop): render captured file URLs for runtime home * fix(desktop): distinguish phone numbers from save metadata * fix(desktop): preserve launch URLs and user text * fix(desktop): preserve captured URLs and user text * fix(desktop): preserve local file URL authority * fix(desktop): preserve local file URL authority * fix(desktop): preserve local file URL authority * fix(desktop): render captured file URLs at launch * fix(desktop): classify numeric timestamps using field context * fix(desktop): classify numeric timestamps using field context * fix(desktop): classify numeric timestamps using field context * fix(desktop): retain context for generated draft values * fix(desktop): retain context for generated draft values * fix(desktop): retain context for generated draft values * test(desktop): cover generated IDs in text guards * test(desktop): cover generated IDs in text guards * test(desktop): cover generated IDs in text guards * fix(desktop): isolate launcher URL encoding * fix(desktop): isolate launcher URL encoding * fix(desktop): isolate launcher URL encoding * fix(desktop): isolate launcher URL encoding * fix(desktop): retain clean text in noisy record fields * fix(desktop): classify added line values in one pass * fix(desktop): apply XML quote rules to text drafts * fix(desktop): distinguish XML attributes from quoted text * fix(desktop): preserve parsed XML line context * Format appTaskChecks.ts with the pinned oxfmt Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(desktop): retain partial XML syntax facts * fix(desktop): recognize markdown autolinks in drafts * fix(desktop): reuse export exclusions in task drafts * fix(desktop): report unchecked client build paths * docs(desktop): clarify gzip scrub limits * fix(desktop): reuse export exclusions in task drafts * docs(desktop): clarify gzip scrub limits * fix(setup): own desktop build process cleanup * fix(doctor): compare desktop settings with resolved defaults * style(desktop): format the noisy-record draft files with the pinned oxfmt Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(desktop): give the root-array draft test its own describe The records describe grew past the 150-line lint limit with it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(doctor): inspect client-recorded desktop runners * fix(doctor): reuse matching runner probes * fix(setup): propagate cancellation to desktop actions * fix(setup): stop Hopper on cancel, never report a cancelled setup ready, and keep a failed action's client setting - The Hopper install gets setup's signal: Linux already honoured it, and the macOS installer now stops its downloads and stops before mounting or copying. - runSetup checks the signal after the final doctor and close, so a cancellation there raises instead of returning ready. - A failed pack or agentenv install no longer writes its archive or runner to client configs, so the setting the client already had stays. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(setup): keep the completed setup result in a cancellation after cleanup A cancellation during the final doctor or host close carried only the applied actions, dropping each client's result and backup path and the doctor report. It now carries the whole result as setup_result, as doctor's cancellation carries its report. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(desktop): move launch execution to boundary suite * fix(desktop): redact build schema failure output * refactor(desktop): normalize schema failure once * fix(desktop): omit unsafe schema parser snippets * fix(desktop): preserve draft change and selected path evidence * test(desktop): group retained dconf note regressions * fix(desktop): respect archive entry format in draft checks * test(desktop): separate unowned-file draft note cases * fix(desktop): preserve explicitly selected journal documents * fix(xml): avoid scanning selected ancestors per tag * fix(desktop): exclude covered text runs from draft counts * fix: preserve text when drafting desktop checks * fix: restore nested desktop state aliases * refactor: share UUID recognition across draft checks * fix: retain multiline XML attribute context * fix: retain relationship identifiers in task drafts * docs: clarify desktop draft identifier handling * test(desktop): type formatting run cases as pairs * fix(desktop): carry document format into selector evaluation * test(desktop): separate markup boundary regression group * fix(desktop): propagate formats through draft selectors * fix(desktop): switch selector format within archive entries * test(desktop): remove duplicate seed filename case * fix(setup): retain diagnostics when cancellation overlaps failure * refactor(setup): keep command cancellation at its owner * test(setup): verify cancellation at the application boundary * test(desktop): pass JSON format in exported index parity * docs(desktop): clarify task checks before scratch export * fix(desktop): respell selected paths in file URLs * test(desktop): group captured document spelling cases * fix(desktop): bound draft preview serialization * fix(desktop): restore selected state aliases * fix(desktop): respect entry format in draft noise * test(desktop): match exported alias evidence at its JSON boundary * fix(desktop): retain app state logs in exported seeds * fix: align desktop numeric seed comparisons * test(desktop): keep one draft exclusion fixture import * test(desktop): retain log eligibility across draft test groups * fix(doctor): resolve empty registered desktop runner * style: fix desktop launch test formatting * style: format native command path schema * fix(desktop): map selected external launch paths * style(desktop): format seed document regressions * test(desktop): group launch URL regressions * fix(desktop): omit redundant nested state aliases * fix(desktop): compare added free text as a whole * fix(desktop): check recompressed seeds as shipped * docs(desktop): clarify recovered seed format * test(desktop): group shipped gzip seed checks * fix: retain quoted identifier text in task drafts * fix: recognize Unicode XML in desktop state readers * fix(desktop): bound nested draft checks * fix(desktop): explain missing arrays in truncated views * fix(desktop): find XML type references in archives * test(desktop): remove duplicated capture assertions * fix(desktop): retain nested omitted text boundaries * style(desktop): format draft value imports * test(desktop): group model and draft value checks * fix(desktop): map captured launch paths once * refactor: remove unused whole-text guard state * refactor: stop passing unused text children * test: align free-text checks with whole-note policy * fix: validate recompressed desktop archive seeds * style(desktop): format archive seed regression * fix(desktop): retain placed-item sibling guards * fix(desktop): preserve archive paths and bound doctor reads * fix(doctor): refuse non-files before descriptor admission * fix(setup): track remaining cleanup resources across retries * test(desktop): specify XML format in heap pairing fixture * fix(doctor): query agentenv for model endpoint * fix(doctor): preserve uncertainty for empty endpoint override * fix(desktop): redact runtime schema errors * fix(desktop): normalize captured file URLs * fix(desktop): report seeded files by capture path * fix(desktop): retain startup readiness failure stage * fix(desktop): retain JSON date checks * fix(desktop): preserve archive formatting checks * fix(desktop): preserve explicitly selected journal files * fix(desktop): report build command transport limits * docs(desktop): clarify unreadable dconf versions * test(desktop): remove duplicate history regression * fix(desktop): align XML names with exported reader * fix(desktop): create selected state alias targets * fix(desktop): inspect supported runtime archives * fix(desktop): retain record identity in draft checks * fix(desktop): scrub XML independently of reader compatibility * fix(desktop): preserve file aliases and reader diagnostics * style(desktop): format review fixes * style(desktop): format capture review fixes --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: morluto <76467478+morluto@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
fd39977c32 |
docs(desktop): set up a desktop build host from a fresh Linux machine (#9184)
* fix(desktop): keep a program word and a directory's neighbor The program after env stays the program even when a captured file sits in a folder of that name. A selected directory is not a database, so a neighboring file keeps the parent folder's spelling. * fix(desktop): record whether a selected path is a directory Capture stores the walked path's kind. A neighboring file of a selected directory keeps the parent folder's spelling even when that directory never changes and its children are not content roots. * fix(desktop): mark containing paths without a pairwise scan A recorded path marks its known ancestors as directories in one walk up the path, instead of comparing every recorded path with every other. * fix(desktop): keep a selected folder that is named like a database log A folder the caller selected stays a selected root when its name ends in -journal or -wal. A generated log beside a database file still does not. * fix(desktop): refuse a build command that exceeds the argument vector Splitting one argument still leaves the whole command under Linux's E2BIG limit. A request past that budget is refused before the process starts. * fix(desktop): remap a captured path in an env assignment The program word stays the program. A NAME=value assignment keeps its name and follows a captured path value when that path's spelling moves. * fix(desktop): keep oversized text out of draft guards A value or line longer than the draft's text bound is not copied into a guard, so one large frame cannot fill the task by itself. * docs(desktop): correct dconf and check-preview guidance A dconf version kept without its bytes is unreadable, not an empty key list. A values preview is copied into a check only when it is an uncut scalar. * fix(desktop): keep an empty env value empty An empty assignment is not a path. Resolving it named the working directory and rewrote the value when that directory's spelling moved. * fix(desktop): keep a run's font on the run, not the frame's text A formatting attribute such as Scribus FONT is not the document's words. Joining it across runs made a frame-wide text check of ItalicBold that failed when a run was split. The font stays a value check on its own run. * fix(desktop): do not pair JSON records by a selector-shaped field A field named @record_id matched the id suffix and became [@record_id=one], which reads an XML attribute. Records paired while their pointers matched nothing. Names that start with @ or > are not id fields. * fix(desktop): count a save-numbered id once when pairing members xml:id and draw:id values such as id123456 were both generated and numbered, so the same selector was counted twice and refused. A text edit of two elements keyed only by those ids now keeps its check. * fix(desktop): preserve selected state directory aliases * docs(desktop): explain tool and skill refresh prerequisites * fix(desktop): align nested state selections with aliases * fix(desktop): check build runtime export capability * fix(desktop): provide complete runtime repack command * fix(desktop): retain runtime probe failures * test(desktop): identify capture independently of schema preflight * fix(desktop): preserve document URLs and value formats * fix(desktop): bound added checks and omit noisy text guards * fix(desktop): exclude unseeded locks from task checks * fix(desktop): preserve draft bounds and launch URLs * fix(desktop): render draft values using their source format * fix(desktop): preserve launch URLs and JSON draft values * fix(desktop): recognize captured file URL documents * fix(desktop): render captured file URLs for runtime home * fix(desktop): distinguish phone numbers from save metadata * fix(desktop): preserve launch URLs and user text * fix(desktop): preserve captured URLs and user text * fix(desktop): preserve local file URL authority * fix(desktop): preserve local file URL authority * fix(desktop): preserve local file URL authority * fix(desktop): render captured file URLs at launch * fix(desktop): classify numeric timestamps using field context * fix(desktop): classify numeric timestamps using field context * fix(desktop): classify numeric timestamps using field context * fix(desktop): retain context for generated draft values * fix(desktop): retain context for generated draft values * fix(desktop): retain context for generated draft values * test(desktop): cover generated IDs in text guards * test(desktop): cover generated IDs in text guards * test(desktop): cover generated IDs in text guards * fix(desktop): isolate launcher URL encoding * fix(desktop): isolate launcher URL encoding * fix(desktop): isolate launcher URL encoding * fix(desktop): isolate launcher URL encoding * fix(desktop): retain clean text in noisy record fields * fix(desktop): classify added line values in one pass * fix(desktop): apply XML quote rules to text drafts * fix(desktop): distinguish XML attributes from quoted text * fix(desktop): preserve parsed XML line context * fix(desktop): retain partial XML syntax facts * fix(desktop): recognize markdown autolinks in drafts * fix(desktop): reuse export exclusions in task drafts * docs(desktop): clarify gzip scrub limits * style(desktop): format the noisy-record draft files with the pinned oxfmt Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(desktop): move launch execution to boundary suite * fix(desktop): redact build schema failure output * refactor(desktop): normalize schema failure once * fix(desktop): omit unsafe schema parser snippets * fix(desktop): preserve draft change and selected path evidence * test(desktop): group retained dconf note regressions * fix(desktop): respect archive entry format in draft checks * test(desktop): separate unowned-file draft note cases * fix(desktop): preserve explicitly selected journal documents * fix(xml): avoid scanning selected ancestors per tag * fix(desktop): exclude covered text runs from draft counts * fix: preserve text when drafting desktop checks * fix: restore nested desktop state aliases * refactor: share UUID recognition across draft checks * fix: retain multiline XML attribute context * fix: retain relationship identifiers in task drafts * docs: clarify desktop draft identifier handling * test(desktop): type formatting run cases as pairs * test(desktop): separate markup boundary regression group * test(desktop): remove duplicate seed filename case * docs(desktop): clarify task checks before scratch export * fix(desktop): respell selected paths in file URLs * test(desktop): group captured document spelling cases * fix(desktop): bound draft preview serialization * fix(desktop): restore selected state aliases * fix(desktop): respect entry format in draft noise * test(desktop): match exported alias evidence at its JSON boundary * fix(desktop): retain app state logs in exported seeds * fix: align desktop numeric seed comparisons * test(desktop): keep one draft exclusion fixture import * test(desktop): retain log eligibility across draft test groups * style: fix desktop launch test formatting * style: format native command path schema * fix(desktop): map selected external launch paths * style(desktop): format seed document regressions * test(desktop): group launch URL regressions * fix(desktop): omit redundant nested state aliases * fix(desktop): compare added free text as a whole * fix(desktop): check recompressed seeds as shipped * docs(desktop): clarify recovered seed format * test(desktop): group shipped gzip seed checks * fix: retain quoted identifier text in task drafts * fix: recognize Unicode XML in desktop state readers * fix(desktop): bound nested draft checks * fix(desktop): explain missing arrays in truncated views * fix(desktop): find XML type references in archives * test(desktop): remove duplicated capture assertions * fix(desktop): retain nested omitted text boundaries * style(desktop): format draft value imports * test(desktop): group model and draft value checks * fix(desktop): map captured launch paths once * refactor: remove unused whole-text guard state * refactor: stop passing unused text children * test: align free-text checks with whole-note policy * fix: validate recompressed desktop archive seeds * style(desktop): format archive seed regression * fix(desktop): retain placed-item sibling guards * fix(desktop): redact runtime schema errors * fix(desktop): normalize captured file URLs * fix(desktop): report seeded files by capture path * fix(desktop): retain startup readiness failure stage * fix(desktop): retain JSON date checks * fix(desktop): preserve archive formatting checks * fix(desktop): preserve explicitly selected journal files * fix(desktop): report build command transport limits * docs(desktop): clarify unreadable dconf versions * test(desktop): remove duplicate history regression * fix(desktop): align XML names with exported reader * fix(desktop): scrub XML independently of reader compatibility * style(desktop): format review fixes * style(desktop): format capture review fixes --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: morluto <76467478+morluto@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
8bc01b48b4 |
feat(native): list ELF and Mach-O initializer and finalizer functions (#9574)
* feat(native): list ELF and Mach-O initializer and finalizer functions inspect_native_initializers and inspect-native-initializers list the functions an ELF or Mach-O image runs before and after main: ELF DT_INIT, DT_FINI, preinit, init and fini arrays and .ctors/.dtors, and Mach-O __mod_init_func, __mod_term_func and __init_offsets, with slot addresses, resolved targets, symbols where available and relocation facts for relocatable objects. Nothing is executed. Slot, symbol, relocation and note budgets are shared across tables, sentinels are matched at the image width, and target-derived names are bounded and marked untrusted. * fix(native): keep ELF initializer slots unresolved when relocation coverage is partial A skipped, unreadable or over-budget section relocation table now keeps every slot it could reach unresolved instead of reading the stored word as raw or dropping a .ctors slot as a sentinel. Dynamic writes that only partly overlap a slot, or write it twice, leave it unresolved. Linked images no longer reapply retained non-SHF_ALLOC link-time records. The dynamic relocation walk now pauses at the shared reader's step boundaries and observes cancellation there, resolved targets need only their first byte mapped, and unreadable symbol names make the report incomplete. * fix(native): stop reporting unchecked Mach-O initializer words as resolved Object files now apply their own section relocations: an UNSIGNED entry against a defined symbol gives symbol_addend, one against an undefined symbol gives unresolved_import, and any other entry leaves the slot unresolved. Linked images without a fixup decoder, such as 32-bit ones, keep pointer slots unresolved when an LC_DYLD_INFO bind stream or LC_DYSYMTAB external relocations could replace the stored word. LC_DYLD_INFO rebases now report dyld_info_rebase instead of chained_fixup, and unreadable symbol names make the report incomplete. Section headers keep their declared reloff and nreloc for this. * docs(native): move initializer guide under docs/guides/native The documentation guide assigns analyst workflows to docs/guides/<domain>/. Move the guide there, place its navigation and directory entries in the Native binaries group, and update links from the docs index, CLI guide, spec and authored skill. The public /native-initializers route is unchanged. The guide and spec also describe per-slot relocation coverage, retained link-time records, Mach-O object relocations, undecoded bind streams, the dyld_info_rebase resolution and unreadable names. * fix(native): keep IFUNC and partly relocated ELF initializer slots unresolved An absolute relocation against an STT_GNU_IFUNC symbol no longer reports the resolver address as the target. Section relocation records now use their real write width, so a record that writes only part of a slot, starts inside it or repeats it leaves the slot unresolved instead of reading a raw zero or dropping a .ctors slot as a sentinel. On 32-bit ARM the Thumb bit is cleared when locating a target's section and file offset, while value_va keeps the stored callable value. * fix(native): locate Thumb Mach-O initializer targets and reject arm64_32 with a 64-bit header On CPU_TYPE_ARM the Thumb bit is cleared when locating and naming a target, since nlist values do not carry it. An arm64_32 image that declares a 64-bit header is rejected as malformed rather than read with 8-byte slots. The guide and spec describe IFUNC relocations, partly relocated section slots, Thumb targets and this rejection. * fix(native): index initializer address lookups and keep ambiguous mappings unknown ELF and Mach-O initializer lookups now build the shared file mapping index once per image, so each slot and target lookup is logarithmic in the number of load segments rather than a scan of every mapping. An address that load segments map ambiguously no longer falls back to a section header offset. Its file offset is reported as unknown and the report is incomplete; only genuinely unmapped spans use the section fallback. * fix(native): report Mach-O bind names over the name budget A bound import name longer than the 1024-byte name budget was dropped without a trace, although it is the only identity of an unresolved initializer target. It now counts toward the over-long name limitation and makes the report incomplete. * test(native): count mapping lookups instead of timing the load index regression The load-mapping regression asserted a wall-clock bound, which is sensitive to machine load. It now spies on the shared mapping module and requires the same number of mapping scans and index builds for 8 and 64 slots, so a per-slot scan of every load segment fails deterministically on a small fixture. * fix(native): yield while decoding legacy rebase runs * fix(native): preserve initializer mapping and coverage * fix(native): index legacy fixup spans * fix(native): preserve relocation uncertainty and bound bind lookup work * fix(native): validate ELF slot mappings and yield section relocation scans --------- Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com> Co-authored-by: morluto <76467478+morluto@users.noreply.github.com> |
||
|
|
22f28644fe |
feat(artifacts): inventory and extract Deno compile executables (#8527)
* feat(artifacts): inventory and extract Deno compile executables Adds Deno standalone artifact support for Mach-O, ELF, and PE carriers, exposing virtual files, entry points, recorded options, and file digests without running the executable. Extraction uses the existing safe output tree, preserves symlink targets as metadata, and assigns indexed paths to unsafe or oversized names. Environment-file values and certificate bytes remain in local Evidence; npm snapshots are reported by length without decoding. The documentation describes supported layouts, parsing limits, and refusal behavior. * fix(artifacts): resolve nested Intel Deno carriers to the enclosing app The backward trailer search stopped at the first confirmed sentinel, so an Intel app storing another Intel Deno executable as a virtual file reported the inner app. Search to the slice start, drop sentinels inside a confirmed payload, and fail closed on side-by-side trailers that differ. Correct the docs on retained environment values and generated regions. * fix(artifacts): keep Deno coverage, remote paths and PE resources truthful Report unknown coverage when the virtual filesystem cannot be listed, keep resolved specifiers when another remote ID is missing, and percent-encode characters in remote paths that a Windows destination would refuse. Reject a directory at the PE resource language level, and correct the guide's description of colliding generated regions. * fix(artifacts): normalize Deno remote escapes so hex case cannot collide Uppercase every percent escape in a generated remote path, so specifiers that differ only in escape case reach the path registry as one name and the second gets an indexed path instead of colliding on a case-insensitive disk. * fix(artifacts): fail closed on truncated enclosing Deno trailers and encode reserved remote path characters The Intel trailer scan rejected an overlong sentinel before reading its marker, so a truncated enclosing app vanished and the nested app was reported. Read the marker first and fail closed when a confirmed overlong trailer encloses another trailer. encodeURIComponent leaves `*` alone and the sanitizer covered only part of the Windows reserved set. remoteDestination now encodes the whole set once as uppercase percent hex; source_path keeps the original. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KuWHGvzJkrhCqjtEHUwqyH * fix(artifacts): defer truncated Intel Deno trailer failure until enclosing trailers resolve A damaged Intel asset stored before a valid one inside a valid app made the backward trailer search fail before it reached the outer trailer. Hold that failure until the search ends and drop it when a confirmed enclosing trailer holds the sentinel as data. * fix(pe): fail closed when a resource type branch is unreadable beside a found name namedResourceTargets skipped a type branch whose names directory, or a name entry whose string, could not be read. A duplicate RT_RCDATA entry pointing out of bounds therefore vanished once another branch matched, and locatePeResourcePayloads returned only the readable ranges while parsePeResources rejected the same tree. The walk now records unresolved branches. hasPeResourceName still reports false for a tree that never reaches the name, but once locatePeResourcePayloads finds the name it raises a format failure if any branch was left unresolved. * fix(artifacts): skip Intel Deno sentinels that a native segment maps A non-Deno x86_64 Mach-O that stores an Intel Deno executable in __DATA had the asset's trailer promoted to the root application, because the backward sentinel search never checked who owned the bytes it scanned. locateMachOSlice now records the file ranges of every segment other than __SUI and __LINKEDIT (libsui extends __LINKEDIT over the trailer), and the Intel search skips any sentinel inside one of them. A slice whose load commands do not frame stays with native inventory, since ownership cannot be shown there. * fix(artifacts): reject a universal Deno image with an unreadable sibling slice The universal Mach-O locator skipped any slice whose load commands could not be read or framed, and any slice with a FAT range issue. When another slice confirmed Deno, that slice was reported as the whole image, so a sibling declaring a different Deno application went unexamined. locateMachOSlice now reports why part of a slice was not examined (unreadable or unframed load commands, a truncated slice, or the Intel sentinel allowance). locateMachO collects those reasons for every declared and hidden slice and fails closed once any slice confirms a Deno section. With none confirmed, the image stays with native inventory as before. * fix(scripts): supervise the Deno verifier version check Run `deno --version` through the verifier command owner with a deadline instead of raw execFile, and close the owner when the version is refused. * fix(artifacts): keep unconfirmed Deno carriers native and fail truncated Intel trailers An ELF SUI note whose descriptor is too short for the full d3n0l4nd name now stays unconfirmed instead of failing closed; failures after the name matches still fail closed. Every marker-confirmed Intel trailer whose payload runs past the slice is now kept until the backward search ends and fails unless an enclosing payload contains it, so an Intel Deno app missing its last byte reports a Deno failure instead of native inventory. The Deno MCP boundary test now calls open_binary and inspect_artifact through artifactMcpCall, as docs/testing.md requires. * test(deno): drop source-text checks from verifier pin test Keep the wrong-version subprocess check, which covers the pinned release through behavior, and stop asserting on the verifier script's source spelling. * test(deno): close readers in finally in symlink and cancellation tests A failed assertion or read error in either test skipped reader.close(), leaving the file open while temp-directory cleanup ran. Both tests now close the reader in finally, as CONTRIBUTING.md requires. The closed-reader assertion in the symlink test stays after the finally. * docs(specs): add deno-standalone spec, plan and tasks Add docs/specs/artifacts/deno-standalone/ with spec.md, plan.md and tasks.md for the Deno compile executable reader, as AGENTS.md requires for a feature, and list them in the specifications index. * docs: list the Deno compile guide in the documentation sidebar * fix(deno): confirm the d3n0l4nd section before claiming Mach-O damage A __SUI segment alone no longer makes later load-command damage Deno's. A Mach-O whose __SUI segment holds only a differently named section now stays absent and keeps native inventory, while damage seen before or beside a confirmed d3n0l4nd section still fails closed. * fix(deno): keep a slice with an unparsed segment command unread A Mach-O segment command that frames but cannot be parsed may be the __SUI segment, so the slice is no longer treated as fully examined. A universal image whose other slice confirms Deno now fails closed instead of letting that sibling supply the whole inventory, and with no confirmed sibling the image still keeps native inventory. * fix(deno): confirm an ELF SUI note before rejecting its length A SUI note whose descsz runs past its note table was recorded as plain damage before its descriptor name was read, so a malformed Deno carrier fell back to native inventory. The owner and the d3n0l4nd name prefix are now read within the table apart from the claimed extent, and a confirmed note with an oversized extent fails closed. * fix(deno): confirm a truncated __SUI section record by its name A section record cut short after its 16-byte name was skipped, so a damaged Deno carrier fell back to native inventory. The name is now read apart from the rest of the record, and a truncated record that names d3n0l4nd fails closed. The range checks for a confirmed record move into their own helper. * fix(deno): reject nonzero bytes after the last ELF note When fewer than 12 bytes remained in a note table after its last note, the walk stopped without looking at them, so a Deno note was selected with complete coverage beside unaccounted data. The remainder is now read: zero padding is accepted, and nonzero bytes are recorded as damage, which fails closed once a SUI note is confirmed and otherwise leaves the ELF to native inventory, matching the native note parser. * fix(deno): validate FAT slice identity before choosing the search The locator took a universal slice's CPU type from its FAT row, so a row that called an x86_64 slice arm64 skipped that slice's Intel trailer and let the arm64 payload stand for the whole image. Each slice's header is now checked against its row with validateFatSliceIdentity. A mismatch leaves the slice unread, so a universal image whose other slice confirms Deno fails closed. The Intel fixture header now states CPU_SUBTYPE_X86_64_ALL so its FAT rows can match it exactly. * fix(deno): check the Intel trailer marker before judging its length A trailer length word of 2^53 or more was dropped before its d3n0l4nd marker was read, so an enclosing app with that length was skipped and a nested app's range stood for the whole image. The marker is now read first, and a marker-confirmed trailer whose length runs past the slice, safe or not, joins the deferred truncated candidates and fails closed unless an enclosing trailer holds it as data. * fix(deno): count short ELF note tables against the note allowance A note table shorter than one note header made a read of its trailing bytes but counted no note, so many distinct tiny tables could force one sequential read each past the 256-note allowance. Every nonempty table now counts at least one entry, both in the up-front estimate and while scanning, so an image past the allowance records the limit instead of reading every table. The trailing-byte check moves into its own helper. * fix(deno): fail closed on ELF extended section numbering beside a SUI note A zero e_shnum with a nonzero e_shoff moves the section count into section zero, so the section table was skipped and its SHT_NOTE tables were never compared. Record it as damage, as PN_XNUM already is, so a confirmed SUI note fails closed instead of reporting full coverage. * fix(deno): keep undersized Intel trailers until enclosing ownership is known A trailer length word below 8 was dropped before its d3n0l4nd marker was read, so an enclosing app with a length of 0 to 7 was skipped and a nested app's trailer was selected as the root. The marker is now read first, and a marker-confirmed trailer too short to hold it is kept as malformed and fails closed unless an enclosing trailer holds it as data. * fix(pe): treat non-directory RT_RCDATA branches as unresolved A duplicate typeId root entry whose target is a data entry was skipped without marking the walk unresolved, so locatePeResourcePayloads returned the readable named resource as complete. Route non-directory type branches through the same unresolved path as unreadable names directories so the Deno reader fails closed. * fix(deno): fail closed on a zero-fill d3n0l4nd Mach-O section denoSectionRange admitted the declared offset and size of a confirmed __SUI,d3n0l4nd record without checking its section type, so a S_ZEROFILL, S_GB_ZEROFILL or S_THREAD_LOCAL_ZEROFILL section could be read as a file payload while MachoImage reports it as not file backed. Reject zero-fill types with the shared isMachoZeroFillSection predicate before assigning a physical range. * fix(deno): bound the d3n0l4nd Mach-O section by its segment file extent denoSectionRange checked a confirmed __SUI,d3n0l4nd record only against the slice and file bounds, so a section reaching past its segment's fileoff/filesize was still read as a complete payload while MachoImage reports the same section as not file backed. Reject a section outside its enclosing segment's file extent before admitting the physical range. * style(deno): apply oxfmt to the DenoStandaloneLocation embedding union * fix(artifacts): preserve Deno carrier ownership * fix(artifacts): admit Deno parent segments * fix(deno): preserve native segment ownership * test(deno): cover mismatched Mach-O segment widths --------- Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: morluto <76467478+morluto@users.noreply.github.com> |