Guide task-centered recovery from observed client, registration, PATH and provider blockers. Install the recovery reference, document exact JavaScript module selectors, and require clarification before searching for an unnamed app. Validate public setup in isolated Codex accounts and preserve failed or unrecognized tool outcomes in the existing evaluator. Refs: #1587 BREAKING CHANGE: Optional verify:agent reports now use schemaVersion 4. Consumers must accept expectedFirstTool: null and targetClarificationPassed for missing-target scenarios. Production CLI/MCP contracts are unchanged.
134 lines
6.8 KiB
Markdown
134 lines
6.8 KiB
Markdown
# JavaScript and Electron application artifacts
|
|
|
|
Use `analyze_javascript_application` directly on the operator-supplied ASAR or
|
|
extracted tree. When size is unknown or large and the connected schema advertises
|
|
`detail`, request `detail: "summary"`. This returns an `inspect_analysis_view`
|
|
Evidence record with a distinct ID and a `normalized_result.parent_evidence_id`
|
|
for the complete retained application analysis. Source-map contents are part of
|
|
that static analysis. Read findings, coverage, limitations and unknowns, then
|
|
follow a specific unanswered question. Older servers without `detail` return
|
|
the complete application Evidence inline when it fits.
|
|
|
|
## Read a module without repeating analysis
|
|
|
|
Use the actual returned parent ID, on the same connection, as `source.evidence_id`.
|
|
The following IDs are placeholders to replace with returned values. When the
|
|
module's node ID is not already known, page identities before selecting an item.
|
|
Pages return only node IDs, paths and roles; choose a useful page size and follow
|
|
`coverage.next_offset` when another page matters:
|
|
|
|
```json
|
|
{
|
|
"source": {
|
|
"kind": "retained-evidence",
|
|
"evidence_id": "ev_ACTUAL_PARENT_ID"
|
|
},
|
|
"view": { "kind": "page", "collection": "modules", "offset": 0, "limit": 16 }
|
|
}
|
|
```
|
|
|
|
Select the relevant page entry by its exact `node_id` and recorded role:
|
|
|
|
```json
|
|
{
|
|
"source": {
|
|
"kind": "retained-evidence",
|
|
"evidence_id": "ev_ACTUAL_PARENT_ID"
|
|
},
|
|
"view": {
|
|
"kind": "item",
|
|
"collection": "modules",
|
|
"selector": { "node_id": "jag_node_ACTUAL_NODE_ID" }
|
|
}
|
|
}
|
|
```
|
|
|
|
Module pages include asset, bundled and source module roles, so one path can
|
|
identify several entries. Use `selector.path` only when uniqueness is established;
|
|
the returned node ID avoids needing a complete inventory to prove uniqueness. On ambiguity,
|
|
select the matching node ID from the page or the error's candidates. Follow
|
|
`next_offset` when another page matters. An item exposes that module node's
|
|
recorded observations, identity, hashes, exports and source ranges; it does not
|
|
include every child syntax observation, related edge or original source file.
|
|
An absent item fact is not evidence of absence from the whole application.
|
|
|
|
## Trace only the remaining question
|
|
|
|
Use `trace_application_feature` on the parent application Evidence for one
|
|
literal node ID, route, string, API, IPC channel, module, or native export.
|
|
Select `incoming` for relationships leading to the seed, `outgoing` for those
|
|
leaving it, and `both` when the question needs both. Trace traversal includes
|
|
containment relationships, so even a narrow seed can expand many nodes; a
|
|
bidirectional trace can reach unrelated sibling modules. A module item or page
|
|
is preferable when its observations already answer the question. Do not treat
|
|
all reached nodes as participants in the feature.
|
|
|
|
Reuse retained parent Evidence when the server advertises it, or supply complete
|
|
Evidence inline. Include Hopper or Ghidra Evidence only when its artifact digest
|
|
matches exactly.
|
|
|
|
## Recover an oversized display
|
|
|
|
An oversized response reports `resource_constraint` and
|
|
`details.resource: "transport"`. Reuse
|
|
`details.reported_limits.evidence_reference` with `inspect_analysis_view` for a
|
|
summary, one module, or a stable page of module identities.
|
|
`export_evidence_bundle` writes the complete canonical session to a
|
|
caller-selected file. These workflows keep the original Evidence and coverage;
|
|
a broad follow-up can also exceed framing.
|
|
|
|
A client can truncate a successful result inside its text envelope without a
|
|
REA `resource_constraint`. Treat a truncation notice or incomplete JSON as a
|
|
display limitation; do not claim the full record was examined. Reuse the known
|
|
parent ID for smaller views, or export complete Evidence to a selected file
|
|
while the session remains open. If the parent ID was lost from the preview,
|
|
use the prior analysis summary or explicit ledger entries to recover it; do
|
|
not invent an ID or rerun analysis just to reproduce the same display.
|
|
|
|
BrowserWindow preferences, preload and contextBridge surfaces, IPC
|
|
registrations, utility processes, and native binding requests are static syntax
|
|
observations. Only a unique exact literal IPC channel match supports an inferred
|
|
pairing. Dynamic or ambiguous channels remain unresolved. A requested `.node`
|
|
member is not a verified native export. Never claim runtime reachability,
|
|
registration, defaults, or policy enforcement from static analysis.
|
|
|
|
For version comparison, analyze each version once, then call
|
|
`compare_application_versions`. Accept only its digest, source-map, structural
|
|
fingerprint, or non-module semantic matches. Module ordinals and minified names
|
|
are not persistent identity. Report added or removed only with complete
|
|
opposite-side coverage; otherwise report unknown.
|
|
|
|
When the question asks how one exact exported callable's returned object shape
|
|
changed, analyze each version once and then call
|
|
`compare_javascript_export_shapes` with explicit module paths and export names.
|
|
Use the returned IDs on the same connection, or complete inline Evidence
|
|
records, from both analysis calls. Accept variant
|
|
pairing only through the tool's unique exact literal discriminant. Read
|
|
`property_inventories` and each change's `presence` before treating `unknown` as
|
|
"the name was not observed": inventories list observed property names even when
|
|
values stay unknown, with a `source_range` for each paired or unpaired variant.
|
|
Array holes and mutation-invalidated slots are not observed properties.
|
|
Complete parent coverage reports presence-only
|
|
`added`/`removed` independently of unresolved values. Cite the
|
|
comparison Evidence and report JSON Pointer changes; dynamic values, ambiguous
|
|
variants, and incomplete parent-property coverage stay unknown. This is static
|
|
inference, not runtime behavior. When runtime semantics are needed, run
|
|
behavioral probes against the relevant application versions and capture them
|
|
through the available browser, Electron, or process workflows.
|
|
|
|
## Reusing application Evidence
|
|
|
|
When advertised by the connected server, application trace and compare tools
|
|
accept complete inline Evidence or
|
|
`{"kind":"retained-evidence","evidence_id":"ev_<64 lowercase hex characters>"}`
|
|
for their application input (`application`, or `left`/`right`). `inspect_analysis_view`
|
|
uses the same retained-reference form in `source`, or portable inline Evidence,
|
|
to project a summary, module page, or one module with its recorded observations. This notation is
|
|
a template: replace it with the actual returned ID. Versions before 4.1.0 accept only full
|
|
inline Evidence. Use the exact ID
|
|
returned by the producer on the same MCP connection. Resolution does not run
|
|
analysis or select a provider; findings remain inline. Native observation
|
|
arrays still take full Evidence. `close_binary` clears retained references;
|
|
export a bundle before closing, or supply portable inline Evidence in another
|
|
connection. A missing reference includes its ID and recovery guidance.
|