Replace the requiresActiveTarget boolean with an "active-target" value of the
availability declaration. 18 contracts that read a required caller path, all
declared standalone or host-restricted or named inventory rules, no longer
claim to need an open target.
Managed tools kept the last explicit path for the server's lifetime and
preferred it over the open target, so close_binary, reset_investigation and
target switches left an earlier file in effect and later calls silently
analyzed the wrong assembly.
The router now keeps no selection. An omitted path reads the active target
when it is a managed PE; otherwise the call is refused, conforming to the
input contract, with remediation naming both ways to supply a target.
Fixes#15314
BREAKING CHANGE: inspect_managed_* tools no longer reuse a path from an
earlier call. Pass path on each call, or open the managed PE with open_binary.
* fix(setup): own REA scripts when the registered Node path is gone
When a saved node/script/mcp launcher pointed at a missing interpreter,
ownership stayed unknown and setup refused to refresh after nvm/fnm moved
Node. Check the script whenever a current entrypoint is available, not only
when the interpreter path still resolves as a foreign binary.
Fixes#15024
* fix(setup): own vanished Node only for verified rea-agents scripts
Narrow the missing-interpreter path: keep a disappeared runtime unknown
unless its basename is node/bun and the script verifies as an installed
rea-agents package. Preserve the existing foreign-runtime script check
and the maintainer invariant that a matching non-package script stays
unknown after the executable vanishes.
Merge upstream/main for ownedPackageCommand OpenCode fixtures.
* feat(evidence): page retained procedure aliases
Bound alias pages by the serialized byte budget and advertise the native-inventory-aliases selector, including source_index.
* use the shared analysis-view page refusal for alias pages
the 1 MiB page budget already has a typed refusal, so this page does not declare a separate fixed ceiling.
* test(evidence): verify alias page recovery and portability
---------
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
* fix(analysis-view): fit Android JNI row pages to the byte budget
* fix(views): preserve indexed selection in byte-bounded pages
---------
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
Use a shared package-owned launcher in setup and uninstall fixtures.
Exercise publication, recovery, and policy under an isolated PATH.
Follow-up to #15046.
Assisted-by: Kogasa (gensokyo-skills:kogasa-surprise-testing)
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
Creating a destination whose name holds `*`, `?`, `"`, `<`, `>` or `|`
fails inside Win32 with ENOENT, so the write surfaced "Could not
exclusively create extraction path: Report*.txt" with a raw cause. That
reads as a missing path, not as a name the destination cannot hold.
I refuse those names before any extraction path is created and raise the
DestinationPathUnrepresentableFailure that already reports ENAMETOOLONG,
so the refusal names the destination filesystem as the owner. The
character set stays in portablePathSegment.ts, which isPortablePathSegment
already applies to bundle and ROM names.
Device names and trailing dots or spaces stay accepted: the host
materializes NUL, CON and name. as ordinary files, so there is no Win32
redirection to refuse.
Give Hermes YAML preservation and policy fixtures a launcher with
explicit REA ownership. Cover setup on CI runners without an installed
bare rea command on PATH.
Follow-up to #15046.
Assisted-by: Kogasa (gensokyo-skills:kogasa-surprise-testing)
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
Exercise owned Copilot CLI removal and backup in the shared project
MCP file. Assert the winning Mastra Code registration in doctor when
multiple clients report the same shared file.
Follow-up to #15230.
Assisted-by: Kogasa (gensokyo-skills:kogasa-surprise-testing)
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
Resolve bare REA launchers using the registration's effective PATH and
verify the resulting installation before setup or uninstall changes an
entry. Share the parsed environment through registration workflows and
keep unproven launchers unknown. Cover npm shim lookup on Windows and
use deterministic ownership fixtures for layered removal.
Fixes#15026.
Co-authored-by: N0zoM1z0 <161784452+N0zoM1z0@users.noreply.github.com>
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* perf(analysis-view): bound JavaScript fact group sorting for small pages
* test(analysis-view): verify fact group page ordering and counts
---------
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
The FAQ now leads with npx rea-agents@latest setup, explains that rerunning setup points the agent at the new release, and says people can ask their agent to update REA, as does Get Started. Translations for the changed sentences are included for all 23 languages, and the catalogs are re-extracted so the translation check passes. The header X link is updated.
Discover the OpenCode system and managed layers and honor their effective
MCP policy when planning, publishing, diagnosing, or removing registrations.
Preserve the writable layer's dialect and verify effective registration
and policy after publication.
Fixes#15036.
Assisted-by: Kogasa (gensokyo-skills:kogasa-surprise-testing)
Co-authored-by: N0zoM1z0 <161784452+N0zoM1z0@users.noreply.github.com>
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
Inventory FWS and CWS files through the shared artifact reader. Preserve the
carrier and normalized identities, top-level tag counts, and individual
DefineBinaryData occurrences. Use the existing selected-extraction pipeline and
per-call artifact admission controls.
Refs #3614
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
Report both device-tree nodes that declare the same phandle. Keep
the reference unresolved and charge both paths before building the
diagnostic. Exercise the byte limit against a matching control.
Fixes#14118.
Assisted-by: Kogasa (gensokyo-skills:kogasa-surprise-testing)
Co-authored-by: N0zoM1z0 <161784452+N0zoM1z0@users.noreply.github.com>
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* fix(javascript): scope the missing-listener rule to proven Node emitters
A listener method called without a listener argument passes `undefined` to
Node's `checkListener`, which throws before anything is registered or
removed, so no event operation exists. That rule currently applies to every
receiver, including objects that only look like an emitter.
Restrict it to a receiver whose stable initializer is `new EventEmitter()`
resolved through a proven `events` load, or a call Node's own
`child_process` factories answer with a `ChildProcess`. The proof is
withdrawn when `Function.prototype.call` was replaced, when the class
reference or its prototype object escaped to a call, when any member of the
shared `events` module was written, or when the selected method, the
receiver's own prototype or an earlier escape of the instance may have
replaced it. An effect that runs after the call cannot change whether it
threw.
Any other receiver keeps its operation as an unresolved candidate, as it did
before the missing argument was considered. Those include EventEmitter-style
APIs that define a one-argument form, such as Socket.IO's `socket.off("x")`,
which removes every listener for the event.
* fix(javascript): verify native emitter constructor and prototype ownership
* fix(javascript): retain escaped prototype constructor aliases
* fix(javascript): track acquired builtin module mutations
* fix(javascript): charge module acquisition to phase allowance
* fix(javascript): recognize computed builtin getter keys
---------
Co-authored-by: gongfpp <22683417+gongfpp@users.noreply.github.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
* fix(javascript): keep parameter members a function overwrites unresolved
Wrapper tracing binds a traced function's parameters to the call-site
arguments. JavaScriptSymbolicBindings#identifier returned that bound value
before consulting the binding's recorded member writes, so a member the
function writes, deletes or redefines was still read from the argument. A
wrapper that rewrites def.channel before ipcMain.handle(def.channel, ...)
produced an exact wrapper-substituted channel from the stale argument
member, and a preload wrapper that replaces api.ping before exposing api
produced a call path through the replaced function.
Apply the binding's existing write facts to the bound value per member. A
written member reads as "overwritten object members" wherever the value
flows (aliases, destructuring, spreads, returns, forwarded arguments), and
members() lists it, so spreads and exposed-API inventories do not fall back
to an earlier value. Unwritten members, and loader calls through a
parameter whose properties a module sets, keep their values.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(javascript): share parameter member-write views across reads
#withMemberWrites rescanned a binding's writes and copied the bound value
on every read, so W writes and R reads of one parameter did W x R work
outside the symbolic evaluation budget and left R copies in the
evaluation cache.
Collect each binding's written top-level members once, and keep one view
per bound value and binding that every read returns. Building a view is
charged against the evaluation budget before its copies and merged
member sets are allocated, as added conditions already are.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(javascript): apply rest parameter writes to spread elements
A rest parameter's view recorded its written members, but a call spread
expanded the array's elements unchanged, so a wrapper that rewrites
args[0] before ipcMain.handle(...args) still supplied the caller's
channel. An index read after a written length also returned an element
the write may have removed.
Rewrite the array's elements when building the parameter's view: a
written index becomes unknown, and a written length or an index past the
end leaves one unknown element for the rest, as for any dynamic spread.
Unwritten elements before that point keep their values.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(javascript): state how rest parameter writes resolve
The wrapper-substitution passage said that an argument's unwritten members
keep their values. For a rest parameter, a written length leaves every
element unresolved, and an index written past the end leaves the elements
after the known ones unresolved.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(javascript): leave arguments after an unknown-length spread unplaced
arguments() expanded a spread of unknown length as exactly one unknown
element, so the arguments after it kept fixed positions. With
function f(...a){a.length=2; return g(...a, "fallback")}, g's second
parameter read "fallback", although at runtime it is the original second
argument; a helper that picks an argument this way supplied a false
wrapper-substituted IPC channel. The same held for any spread whose value
is not a known array.
Mark the element that stands for an unknown number of further elements
(unknownCount), and stop the argument list after it, so later parameters
read as unknown. A rest parameter bound past that point is the same
open-ended unknown, and a rest array's written length or index past its
known elements produces the marker instead of a fixed-length element.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(javascript): pass one element of an unknown-length list as one argument
A fixed parameter bound from a spread of unknown length, and an index
read of a rest array whose length the function writes, kept the
unknown-count marker that stands for the rest of a list. Passed on as an
ordinary argument, that one value made the callee's argument list look
open, so a later rest parameter took the marker and a spread of it
dropped the arguments after it. With function first(x){return x} and
function h(x,...rest){return k(...rest,"app:ping")}, h(first(...xs))
lost "app:ping", although rest is always empty there.
A value selected from one position of an argument list or array is now a
plain unknown, so it supplies exactly one argument wherever it goes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(javascript): resolve a channel after a rest list left empty by one value
The symbolic tests for one value selected from a list of unknown length
check the resolver, but the loss shows at the wrapper boundary. A rest
parameter that one selected value leaves empty looked open, so a channel
placed after it in a helper call went unresolved and the wrapper's
app:ping registration disappeared.
Add two wrapper rows to electronWrappedCallPaths.test.ts. In the first,
register(first(...extraArguments)) supplies one argument, so the rest
parameter of register is empty and choose(...extra, "app:ping") picks
app:ping. In the second, forward(args[0]) after args.length = 0 supplies
one argument, so choose(...rest, "app:ping") picks app:ping. Node with a
stub electron module registers app:ping in both cases for every
extraArguments list tried ([], ["x"], ["x", "y"]).
Validation: with the source of the previous commit reverted, these two
rows and the two symbolic rows fail (4 of 322 tests in
javascriptSymbolicBindings.test.ts and electronWrappedCallPaths.test.ts,
the app:ping row is missing) and every other test passes. With the source
as committed, all 322 pass.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* docs(javascript): state that one value read from a list is one argument
The guide says arguments after a spread of unknown length stay
unresolved because their positions are unknown. A reader can take that to
cover a value read from such a list, but a value read from one position of
a spread or of a rest array supplies exactly one argument, so a rest
parameter after it is empty and a channel placed after that rest list
still resolves.
State the rule beside the spread rule it qualifies. The behavior comes
from the selected-element rule of "pass one element of an unknown-length
list as one argument". The symbolic rows of that commit and the wrapper
rows of the test commit after it assert it.
Validation: npx oxfmt --check on the guide passes. node
scripts/check-doc-facts.mjs needs a built dist/ and did not run.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* fix(javascript): do not grow a rest array for an out-of-range delete
`function f(...args) { delete args[2]; return pick(...args, "fallback") }`
with two known rest arguments always passes `fallback` third: `delete`
neither creates the element nor changes the length. The written member
set lost the operation, so the index past the end appended an
unknown-count element and the fixed-position argument was dropped.
Only members that a write other than `delete` reaches can now grow the
array. A delete inside the known elements still makes that element
unknown, and a delete plus an assignment of the same index still grows.
Validation: the two delete rows fail on the previous head and pass now;
the delete-then-assign control stays unknown. vitest on
electronWrappedCallPaths.test.ts and javascriptSymbolicBindings.test.ts:
365 passed (365). tsc --noEmit is clean.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(javascript): separate member enumeration from value invalidation
* fix(javascript): preserve rest-array enumeration and snapshot order
* fix(javascript): preserve conditional writes and pre-mutation array membership
* fix(javascript): invalidate added array indices after length writes
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
* feat(artifacts): extract stored Unix ar members
* test(artifacts): assert structured thin ar extraction refusal
---------
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
* fix(setup): recognize path-qualified cmd.exe and npm rea.cmd shims
Unwrap C:\Windows\System32\cmd.exe /d /c package runners, and read the
script an npm rea.cmd shim launches so those registrations stay owned.
* fix(setup): parse npm rea.cmd launch statements with a bounded read
Own only the script argument of the npm cmd-shim launch line, skip rem
comments, refuse oversized files before allocating, and join with host
path rules so UNC roots stay intact.
* fix(setup): ignore echoed npm launch text in rea.cmd shims
Skip echo lines and refuse ownership when a later "%_prog%" launch names
a non-package script, so printed paths cannot prove an unrelated row.
* fix(setup): require executed npm rea.cmd launch statements
Anchor "%_prog%" matching to a real launch command, skip @rem comments,
and ignore conditional echo lines so ownership cannot follow text that
is never executed.
* fix(setup): require strict npm cmd-shim structure for rea.cmd ownership
* fix(setup): match exact npm cmd-shim template for rea.cmd ownership
* fix(client-identity): reject batch variables and support local node_modules/.bin rea.cmd shims
* fix(setup): recognize current npm command shims
* fix(ci): route CMD shim tests to the Windows package lane
---------
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
* fix(cli): suggest npx rea-agents@latest setup in the update notice under npx
A package-runner launch has no installed rea to run --update on, and its agent registrations point at that run's cache, so the notice now suggests rerunning setup at @latest through the same runner.
* fix(update): tell npx users how to update REA in plain words
rea update cannot upgrade a copy it did not install. Its message now tells npx users to run npx rea-agents@latest setup and that they can ask their agent to do it. The skill tells agents which update command to run, and the README mentions asking the agent.