@chibitek/chibi 0.1.205 → 0.1.207

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/dist/assets/{TerminalPanel-D1wGUjRa.js → TerminalPanel-Cqjxle8G.js} +1 -1
  2. package/dist/assets/{abnfDiagram-O67JEVCF-DbeVBipN.js → abnfDiagram-O67JEVCF-XB80WX43.js} +1 -1
  3. package/dist/assets/{arc-D1akvHh4.js → arc-BERcgYDi.js} +1 -1
  4. package/dist/assets/{architectureDiagram-NJMV4G6O-DMqZ2Zb2.js → architectureDiagram-NJMV4G6O-Dnc9s6SQ.js} +1 -1
  5. package/dist/assets/{blockDiagram-BEXU5L5S-C2zhO-SN.js → blockDiagram-BEXU5L5S-Cxc21eYL.js} +1 -1
  6. package/dist/assets/{c4Diagram-YGBWAQC7-BvoSvm-3.js → c4Diagram-YGBWAQC7-CW-3gUcf.js} +1 -1
  7. package/dist/assets/channel-DaeKCO76.js +1 -0
  8. package/dist/assets/{chunk-2Q5K7J3B-CnbuWhvy.js → chunk-2Q5K7J3B-Bs484eiW.js} +1 -1
  9. package/dist/assets/{chunk-3FUC2YCW-DahSA7ym.js → chunk-3FUC2YCW-qhnBgRDy.js} +2 -2
  10. package/dist/assets/{chunk-5VM5RSS4-4DVZPQ68.js → chunk-5VM5RSS4-CsCqAEkH.js} +1 -1
  11. package/dist/assets/{chunk-GTNCS2PH-F_r0v8yd.js → chunk-GTNCS2PH-ChBgFjPw.js} +1 -1
  12. package/dist/assets/{chunk-GWA4HPMP-DRP-mB8u.js → chunk-GWA4HPMP-Df5-WClq.js} +1 -1
  13. package/dist/assets/{chunk-JWPE2WC7-CudGEr4i.js → chunk-JWPE2WC7-BdMXRJhO.js} +1 -1
  14. package/dist/assets/{chunk-NETBCI7D-54zUjRUj.js → chunk-NETBCI7D-rmAqJ9nY.js} +1 -1
  15. package/dist/assets/{chunk-WEXAMYUT-Cf3WOSP2.js → chunk-WEXAMYUT-DYmTw4lw.js} +1 -1
  16. package/dist/assets/{chunk-XXDRQBXY-Cx685pqX.js → chunk-XXDRQBXY-C4o5SHm0.js} +1 -1
  17. package/dist/assets/{classDiagram-v2-NBCMYWYE-CJzSmUjW.js → classDiagram-v2-NBCMYWYE-Bm-ZzDk5.js} +1 -1
  18. package/dist/assets/{cose-bilkent-JH36ORCC-B7BGVTVs.js → cose-bilkent-JH36ORCC-CFMRSfMu.js} +1 -1
  19. package/dist/assets/{cynefin-OW5HDTMX-BWmECHiA.js → cynefin-OW5HDTMX-BDedZ5yW.js} +1 -1
  20. package/dist/assets/{cynefinDiagram-VND7K2PF-DHXO0SU2.js → cynefinDiagram-VND7K2PF-i7KARSqF.js} +1 -1
  21. package/dist/assets/{dagre-6A5THRUB-C3D5zoFM.js → dagre-6A5THRUB-CwWpV0i_.js} +1 -1
  22. package/dist/assets/{diagram-22UHCM2B-BGORY_N5.js → diagram-22UHCM2B-CWIMT3-K.js} +1 -1
  23. package/dist/assets/{diagram-3UASUU5V-Cwn-Zojz.js → diagram-3UASUU5V-C7HGc_ap.js} +1 -1
  24. package/dist/assets/{diagram-ATOU4E4O-BbzoyPGD.js → diagram-ATOU4E4O-BeLM7ihN.js} +1 -1
  25. package/dist/assets/{diagram-CDSNMT55-DNWK_SlS.js → diagram-CDSNMT55-CN1rVM-W.js} +1 -1
  26. package/dist/assets/{diagram-MLGK6HIB-BmmP-hmh.js → diagram-MLGK6HIB-CuLcsx4e.js} +1 -1
  27. package/dist/assets/{diagram-MPIPVDR6-xqxM2yWT.js → diagram-MPIPVDR6-Bie61r-h.js} +1 -1
  28. package/dist/assets/{ebnfDiagram-ZINNZB2B-B0GaVIQn.js → ebnfDiagram-ZINNZB2B-ChMg86y3.js} +1 -1
  29. package/dist/assets/{elk-276RUBZZ-BTkrwlOJ.js → elk-276RUBZZ-DG9xXwoW.js} +1 -1
  30. package/dist/assets/{erDiagram-OPXOYQCR-Dw8FpKKd.js → erDiagram-OPXOYQCR-C9bl-nWK.js} +1 -1
  31. package/dist/assets/{flowDiagram-KWPJA3E3-DcWQfIK9.js → flowDiagram-KWPJA3E3-DvdWxFI8.js} +1 -1
  32. package/dist/assets/{ganttDiagram-FUAMR5RP-CIAZE9bZ.js → ganttDiagram-FUAMR5RP-DDCNSEYc.js} +1 -1
  33. package/dist/assets/{gitGraphDiagram-X574FWY7-D1aB6PDc.js → gitGraphDiagram-X574FWY7-PFvmOSMd.js} +1 -1
  34. package/dist/assets/{index-DfkFSy12.js → index-Ci2mINhA.js} +160 -160
  35. package/dist/assets/{index-C8GkjyYq.js → index-DnniNB7N.js} +1 -1
  36. package/dist/assets/{infoDiagram-VRGFBTTK-CUPJD6fR.js → infoDiagram-VRGFBTTK-HEZh-PnK.js} +1 -1
  37. package/dist/assets/{ishikawaDiagram-OU5B5YK6-Qt4T-A1k.js → ishikawaDiagram-OU5B5YK6-P3mmCGAU.js} +1 -1
  38. package/dist/assets/{journeyDiagram-ZHPQQLJL-Br8kwdWE.js → journeyDiagram-ZHPQQLJL-dKG4AQu2.js} +1 -1
  39. package/dist/assets/{kanban-definition-PNTS6WVX-B7BRfQOT.js → kanban-definition-PNTS6WVX-BeIHeQTt.js} +1 -1
  40. package/dist/assets/{linear-snu1EH2X.js → linear-DnEqDr6r.js} +1 -1
  41. package/dist/assets/{mermaid.core-ImU9bwtO.js → mermaid.core-D7hz6n4u.js} +5 -5
  42. package/dist/assets/{mindmap-definition-NLK3R4M7-xKUVLPlR.js → mindmap-definition-NLK3R4M7-BxJ8p-DN.js} +1 -1
  43. package/dist/assets/{pegDiagram-GJSIUBJH-B9BidmhC.js → pegDiagram-GJSIUBJH-CkQT2dHJ.js} +1 -1
  44. package/dist/assets/{pieDiagram-5QR66LMP-Ch8Kv8t8.js → pieDiagram-5QR66LMP-DmVVhYaY.js} +1 -1
  45. package/dist/assets/{quadrantDiagram-O4NWA36T-Dunnqt7g.js → quadrantDiagram-O4NWA36T-DsOz-qCY.js} +1 -1
  46. package/dist/assets/{railroadDiagram-XR7U4H2S-DnOaSZzz.js → railroadDiagram-XR7U4H2S-CeYfvaki.js} +1 -1
  47. package/dist/assets/{requirementDiagram-PLB6GJNP-D0BmDdKg.js → requirementDiagram-PLB6GJNP-BCtM-2uN.js} +1 -1
  48. package/dist/assets/{sankeyDiagram-IPEJSGJF-CWtfZ9Pz.js → sankeyDiagram-IPEJSGJF-Cu8ki35x.js} +1 -1
  49. package/dist/assets/{sequenceDiagram-PO4LG4MO-DlMxxz_s.js → sequenceDiagram-PO4LG4MO-DKbS5Gcs.js} +1 -1
  50. package/dist/assets/{sizeCapture-INFHLROL-CBK9A--M.js → sizeCapture-INFHLROL-Ceut6PrE.js} +1 -1
  51. package/dist/assets/{stateDiagram-v2-GCMORJYK-C7yP85Rg.js → stateDiagram-v2-GCMORJYK-Bl5uMY2f.js} +1 -1
  52. package/dist/assets/{swimlanes-2SLR337P-CPWaiwCv.js → swimlanes-2SLR337P-CoMPbJ2k.js} +1 -1
  53. package/dist/assets/swimlanesDiagram-TC7HE7FX-DLJq0mAR.js +8 -0
  54. package/dist/assets/{timeline-definition-EJHVYXUP-C1i2k1l3.js → timeline-definition-EJHVYXUP-D0xkKp46.js} +1 -1
  55. package/dist/assets/{usecaseDiagram-POWQR4AR-DZMn9spA.js → usecaseDiagram-POWQR4AR-BCCL6QIf.js} +1 -1
  56. package/dist/assets/{vennDiagram-UO4OBE2U-CQTd7MTx.js → vennDiagram-UO4OBE2U-B7g3jK72.js} +1 -1
  57. package/dist/assets/{wardleyDiagram-VNRHLVJA-zuVyHyHg.js → wardleyDiagram-VNRHLVJA-DFhnqQKP.js} +1 -1
  58. package/dist/assets/{xychartDiagram-PMCCYNJV-D6HRPUA0.js → xychartDiagram-PMCCYNJV-mIXMscRS.js} +1 -1
  59. package/dist/index.html +1 -1
  60. package/dist-server/accounts-proxy.js +12 -2
  61. package/dist-server/browser-proxy.js +15 -2
  62. package/dist-server/companion/src/routes.js +10 -0
  63. package/dist-server/container-mcp.js +81 -81
  64. package/dist-server/drivers/agents-proxy.js +81 -81
  65. package/dist-server/drivers/phone-proxy.js +13 -4
  66. package/dist-server/index.js +1031 -890
  67. package/dist-server/openmausbot.js +581 -569
  68. package/dist-server/pair-cli.js +581 -569
  69. package/dist-server/server/accounts-proxy.js +17 -2
  70. package/dist-server/server/agents-token-file.js +10 -7
  71. package/dist-server/server/bot-package.js +3 -2
  72. package/dist-server/server/browser-proxy.js +18 -2
  73. package/dist-server/server/connection-cap-failover.js +3 -1
  74. package/dist-server/server/drivers/phone-proxy.js +18 -4
  75. package/dist-server/server/engine-failover.js +5 -0
  76. package/dist-server/server/engine-failure.js +3 -3
  77. package/dist-server/server/engine-rest.js +1 -0
  78. package/dist-server/server/harness/bus.js +7 -2
  79. package/dist-server/server/harness-import/adapters.js +13 -1
  80. package/dist-server/server/harness-import/apply.js +21 -41
  81. package/dist-server/server/harness-import/cli-skills.js +124 -0
  82. package/dist-server/server/harness-import/convert.js +2 -2
  83. package/dist-server/server/harness-import/grokbot.js +36 -0
  84. package/dist-server/server/harness-import/hermes.js +3 -2
  85. package/dist-server/server/index.js +13 -13
  86. package/dist-server/server/model-evidence-context.js +7 -0
  87. package/dist-server/server/model-evidence.js +6 -1
  88. package/dist-server/server/system-prompt.js +1 -1
  89. package/dist-server/shared/model-evidence.js +13 -0
  90. package/dist-server/vps-container-mcp.js +81 -81
  91. package/package.json +1 -1
  92. package/skills/reverse-engineer-anything/LICENSE-rea-agents.txt +21 -0
  93. package/skills/reverse-engineer-anything/SKILL.md +356 -0
  94. package/skills/reverse-engineer-anything/VENDORED.md +46 -0
  95. package/skills/reverse-engineer-anything/manifest.json +21 -0
  96. package/skills/reverse-engineer-anything/references/android-applications.md +36 -0
  97. package/skills/reverse-engineer-anything/references/connection-and-recovery.md +127 -0
  98. package/skills/reverse-engineer-anything/references/evidence-workflows.md +71 -0
  99. package/skills/reverse-engineer-anything/references/javascript-applications.md +218 -0
  100. package/skills/reverse-engineer-anything/references/native-and-artifacts.md +297 -0
  101. package/skills/reverse-engineer-anything/references/runtime-observation.md +78 -0
  102. package/dist/assets/channel-Ber8y2Xi.js +0 -1
  103. package/dist/assets/swimlanesDiagram-TC7HE7FX-BxCTRDZa.js +0 -8
@@ -0,0 +1,71 @@
1
+ # Evidence, comparison, and verification workflows
2
+
3
+ Evidence-producing tools return the complete Evidence record directly in MCP
4
+ `structuredContent` and CLI JSON. Read `normalized_result` for operation data,
5
+ and cite `evidence_id` when another tool or your explanation needs a stable
6
+ reference. Preserve authority, limitations, coverage, and residual unknowns. If a result
7
+ is incomplete or paginated, continue only when the remaining data matters to
8
+ the task; do not fetch a bundle or resource merely to read a result already
9
+ returned inline. When complete `inspect_binary_layout` or
10
+ `analyze_javascript_application` Evidence is already retained, call
11
+ `inspect_analysis_view` for a summary, one section/symbol/module, or a stable
12
+ page instead of repeating the producer.
13
+
14
+ Completed `inspect_artifact` inventory also supports a summary and
15
+ `view: {kind: "inventory", collection: "occurrences", logical_paths: ["package.json", "main.js"]}`.
16
+ Omit `logical_paths` to page all available occurrences; `[]` selects none.
17
+ Other inventory collections are `nodes`, `edges` and
18
+ `integrity_contradictions`. Keep `source_complete` separate from page exhaustion:
19
+ a missing match in partial source Evidence does not establish absence. Use the
20
+ returned parent Evidence ID for subsequent views and export before closing the
21
+ session when the source must survive it.
22
+ When `tools/list` advertises `inspect_artifact.detail`, request `"summary"` to
23
+ retain its complete source and receive that view immediately. Without that
24
+ advertised choice, keep the existing complete call. CLI inspection returns
25
+ portable complete Evidence; save it before projecting a selected inline view.
26
+
27
+ Use `record_unknown` to track unresolved questions in the user's investigation
28
+ and name the authority or environment still required. Supply supporting and
29
+ contradicting evidence IDs. It updates the session registry directly.
30
+ Use `update_unknown` with the current revision; reread after a stale revision
31
+ instead of retrying blindly. Only qualifying observed evidence can verify a
32
+ resolution.
33
+
34
+ Use comparisons with complete, compatible page sets when claiming equivalence
35
+ or absence:
36
+
37
+ - `compare_artifacts` compares inventory pages by occurrence path, content,
38
+ metadata, and graph relations.
39
+ - `compare_functions` compares explicit function Evidence, not fuzzy
40
+ whole-binary matches.
41
+ - `compare_bundles` compares canonical bundle membership and unknown history.
42
+ - `find_changed_behavior` combines existing comparisons; static differences
43
+ remain candidates, not causal proof.
44
+ - `build_call_path` needs explicit function dossiers from one artifact/provider;
45
+ an incomplete frontier makes absence unknown.
46
+ - `correlate_static_and_runtime` uses explicit mappings; matching patterns are
47
+ hypotheses, not causality.
48
+ - `verify_reconstruction` evaluates a finite typed specification. A pass covers
49
+ only declared comparable claims, not global equivalence.
50
+
51
+ Process captures are opt-in behavioral evidence, not a security sandbox. V3
52
+ captures cannot be upgraded to V4; rerun the original scenario. Distinguish root
53
+ exit from descendant settlement and require freshness when the task needs it.
54
+ A timed-out target that must write a final report needs `finalization_ms`: REA
55
+ sends SIGTERM to the captured root, keeps observing, and sends SIGKILL once
56
+ only if the target has not exited by the end of the interval.
57
+ `exit.finalization.signals` lists each attempt with its delivery result; the
58
+ observed exit signal stays in `exit.signal`, `exit.code` is null for every
59
+ deadline exit, and the code of a finalizer that exited on its own is in
60
+ `exit.finalization.exit_code` (null on a signal exit or when no exit was
61
+ observed).
62
+
63
+ Use `inspect_analysis_view` with `view: {kind: "api-surface"}` on retained
64
+ `inspect_web_network_capture` HAR Evidence to group observed request lines by
65
+ method, origin and path template. Format matches are inferences, not handler
66
+ identity or schemas. Group pages cite parent record ordinals; consult record
67
+ coverage and exclusions before claiming completeness. No requests are replayed.
68
+ When the connected schema advertises `include_query_parameter_names`, select
69
+ it in the view for distinct observed names with original record ordinals. Query
70
+ values are omitted; the names establish neither required parameters nor a
71
+ complete server schema. Keep the original parent Evidence for exact URLs.
@@ -0,0 +1,218 @@
1
+ # JavaScript and Electron application artifacts
2
+
3
+ For captured or bundled JavaScript that needs readable source recovery, use
4
+ `recover_javascript_sources` with an absolute `path` and absent
5
+ `output_directory`. Supply related runtime/shared/lazy files in
6
+ `additional_paths` when advertised, then analyze the returned `analysis_input`
7
+ directory together. Each input retains its own snapshot, digest and byte-range
8
+ provenance; inputs and recovered code are never executed. Recovery requires a
9
+ caller-supplied Wakaru on Linux x64; see [the recovery guide](https://github.com/morluto/rea/blob/main/docs/javascript-recovery.md).
10
+
11
+ Use `analyze_javascript_application` directly on the operator-supplied ASAR or
12
+ extracted tree. When the question concerns known source paths and the connected
13
+ schema advertises `source_paths`, select exact inventoried paths such as
14
+ `["package.json", "main.js", "preload.js"]`. Include supporting manifests or
15
+ source maps explicitly; dependencies are not implicitly analyzed. REA retains
16
+ the complete artifact inventory and identity but reads source text and analyzes
17
+ only selected files. The result and summary record `source_selection`; files
18
+ outside scope and their relationships remain unknown, so partial application
19
+ coverage does not mean the selected source failed. Use repeated `--source-path`
20
+ on either static application CLI route. Omit the selection when the question
21
+ requires complete application analysis. `detail: "summary"` reduces delivery
22
+ and does not by itself reduce analysis work.
23
+
24
+ Exact `#alias` specifiers resolve through the importer's
25
+ enclosing package `imports` map to package-local files; nested `node_modules`
26
+ packages use their own map. Wildcard, recursive, and external-package import
27
+ targets stay unresolved with that limitation. When size is unknown or large and the connected schema advertises
28
+ `detail`, request `detail: "summary"`. This returns an `inspect_analysis_view`
29
+ Evidence record with a distinct ID and a `normalized_result.parent_evidence_id`
30
+ for the complete retained application analysis. Source-map contents are part of
31
+ that static analysis. Read findings, coverage, limitations and unknowns, then
32
+ follow a specific unanswered question. Older servers without `detail` return
33
+ the complete application Evidence inline when it fits.
34
+
35
+ When the connected schema advertises `max_heap_mb` and `analysis_timeout_ms`,
36
+ these select the isolated source analyzer's old-space heap and per-source
37
+ deadline. Defaults are 1024 MiB and 300000 ms. They do not change the MCP
38
+ process heap. A Bun-hosted REA does not enforce the heap choice; on Windows it
39
+ instead limits the analyzer's committed memory to that choice plus a 512 MiB
40
+ runtime reserve.
41
+ Resource-limited analyses preserve completed static facts and
42
+ report partial semantic coverage with specific unknown scopes; this does not
43
+ mean the source is malformed. Inspect those limits before retrying a source.
44
+ When expanded relationships exceed the parent's available memory, inspect the
45
+ file's modules item view for retained `static_analysis` and
46
+ `semantic_module_analysis`. Their facts remain available even when graph links
47
+ are unknown. Cumulative result exhaustion can stop analysis before every file
48
+ is examined; the inventory and remaining unknown scopes distinguish that case.
49
+ Timeout or cancellation after source analysis begins retains partial Evidence
50
+ in the same session. A returned `error.details.partial_observation` reference
51
+ can be supplied directly to `inspect_analysis_view`. If the SDK cancels locally, retrieve its recorded ID from
52
+ the Evidence bundle before inspecting the partial analysis.
53
+
54
+ ## Read a module without repeating analysis
55
+
56
+ Use the actual returned parent ID, on the same connection, as `source.evidence_id`.
57
+ The following IDs are placeholders to replace with returned values. When the
58
+ module's node ID is not already known, page identities before selecting an item.
59
+ Pages return only node IDs, paths and roles; choose a useful page size and follow
60
+ `coverage.next_offset` when another page matters:
61
+
62
+ ```json
63
+ {
64
+ "source": {
65
+ "kind": "retained-evidence",
66
+ "evidence_id": "ev_ACTUAL_PARENT_ID"
67
+ },
68
+ "view": { "kind": "page", "collection": "modules", "offset": 0, "limit": 16 }
69
+ }
70
+ ```
71
+
72
+ Select the relevant page entry by its exact `node_id` and recorded role:
73
+
74
+ ```json
75
+ {
76
+ "source": {
77
+ "kind": "retained-evidence",
78
+ "evidence_id": "ev_ACTUAL_PARENT_ID"
79
+ },
80
+ "view": {
81
+ "kind": "item",
82
+ "collection": "modules",
83
+ "selector": { "node_id": "jag_node_ACTUAL_NODE_ID" }
84
+ }
85
+ }
86
+ ```
87
+
88
+ Module pages include asset, bundled and source module roles, so one path can
89
+ identify several entries. Use `selector.path` only when uniqueness is established;
90
+ the returned node ID avoids needing a complete inventory to prove uniqueness. On ambiguity,
91
+ select the matching node ID from the page or the error's candidates. Follow
92
+ `next_offset` when another page matters. An item exposes that module node's
93
+ recorded observations, identity, hashes, exports and source ranges; it does not
94
+ include every child syntax observation, related edge or original source file.
95
+ An absent item fact is not evidence of absence from the whole application.
96
+
97
+ For canonical identities and retained source-range counts, use a typed reference
98
+ page instead of reading every full item:
99
+
100
+ ```json
101
+ {
102
+ "source": {
103
+ "kind": "retained-evidence",
104
+ "evidence_id": "ev_ACTUAL_PARENT_ID"
105
+ },
106
+ "view": {
107
+ "kind": "javascript",
108
+ "collection": "modules",
109
+ "projection": "references",
110
+ "where": { "path": "main.js", "kind": "javascript-module" },
111
+ "offset": 0,
112
+ "limit": 16
113
+ }
114
+ }
115
+ ```
116
+
117
+ Filters match exact retained strings; omit a filter to include all values, use
118
+ `path: null` for unavailable paths, and `path: ""` for a recorded empty path.
119
+ Rows preserve canonical `identity` and distinct observation support states in
120
+ `basis`. `retained_source_range_count` counts retained source-range observations,
121
+ not runtime imports or unique reference sites. Use a row's `node_id` with the item
122
+ view above for exact locations and full supporting observations. Follow
123
+ `coverage.next_offset`; page exhaustion describes matching retained rows only.
124
+ Check `source_coverage` for source selection, partial/unknown graph coverage and
125
+ unknown counts before drawing a negative conclusion.
126
+
127
+ ## Trace only the remaining question
128
+
129
+ Use `trace_application_feature` on the parent application Evidence for one
130
+ literal node ID, route, string, API, IPC channel, module, or native export.
131
+ Select `incoming` for relationships leading to the seed, `outgoing` for those
132
+ leaving it, and `both` when the question needs both. Trace traversal includes
133
+ containment relationships, so even a narrow seed can expand many nodes; a
134
+ bidirectional trace can reach unrelated sibling modules. A module item or page
135
+ is preferable when its observations already answer the question. Do not treat
136
+ all reached nodes as participants in the feature.
137
+
138
+ Reuse retained parent Evidence when the server advertises it, or supply complete
139
+ Evidence inline. Include Hopper or Ghidra Evidence only when its artifact digest
140
+ matches exactly.
141
+
142
+ ## Recover an oversized display
143
+
144
+ An oversized response reports `resource_constraint` and
145
+ `details.resource: "transport"`. Reuse
146
+ `details.reported_limits.evidence_reference` with `inspect_analysis_view` for a
147
+ summary, one module, or a stable page of module identities.
148
+ `export_evidence_bundle` writes the complete canonical session to a
149
+ caller-selected file. These workflows keep the original Evidence and coverage;
150
+ a broad follow-up can also exceed framing.
151
+
152
+ A client can truncate a successful result inside its text envelope without a
153
+ REA `resource_constraint`. Treat a truncation notice or incomplete JSON as a
154
+ display limitation; do not claim the full record was examined. Reuse the known
155
+ parent ID for smaller views, or export complete Evidence to a selected file
156
+ while the session remains open. If the parent ID was lost from the preview,
157
+ use the prior analysis summary or explicit ledger entries to recover it; do
158
+ not invent an ID or rerun analysis just to reproduce the same display.
159
+
160
+ BrowserWindow preferences, preload and contextBridge surfaces, IPC
161
+ registrations, utility processes, and native binding requests are static syntax
162
+ observations. Only a unique exact literal IPC channel match supports an inferred
163
+ pairing. Dynamic or ambiguous channels remain unresolved. A requested `.node`
164
+ member is not a verified native export. Never claim runtime reachability,
165
+ registration, defaults, or policy enforcement from static analysis.
166
+
167
+ For version comparison, analyze each version once, then call
168
+ `compare_application_versions`. Accept only its digest, source-map, structural
169
+ fingerprint, or non-module semantic matches. Module ordinals and minified names
170
+ are not persistent identity. Report added or removed only with complete
171
+ opposite-side coverage; otherwise report unknown.
172
+
173
+ When the question asks how one exact exported callable's returned object shape
174
+ changed, analyze each version once and then call
175
+ `compare_javascript_export_shapes` with explicit module paths and export names.
176
+ Use the returned IDs on the same connection, or complete inline Evidence
177
+ records, from both analysis calls. Accept variant
178
+ pairing only through the tool's unique exact literal discriminant. Read
179
+ `property_inventories` and each change's `presence` before treating `unknown` as
180
+ "the name was not observed": inventories list observed property names even when
181
+ values stay unknown, with a `source_range` for each paired or unpaired variant.
182
+ Array holes and mutation-invalidated slots are not observed properties.
183
+ Complete parent coverage reports presence-only
184
+ `added`/`removed` independently of unresolved values. Cite the
185
+ comparison Evidence and report JSON Pointer changes; dynamic values, ambiguous
186
+ variants, and incomplete parent-property coverage stay unknown. This is static
187
+ inference, not runtime behavior. When runtime semantics are needed, run
188
+ behavioral probes against the relevant application versions and capture them
189
+ through the available browser, Electron, or process workflows.
190
+
191
+ ## Reusing application Evidence
192
+
193
+ When advertised by the connected server, application trace and compare tools
194
+ accept complete inline Evidence or
195
+ `{"kind":"retained-evidence","evidence_id":"ev_<64 lowercase hex characters>"}`
196
+ for their application input (`application`, or `left`/`right`). `inspect_analysis_view`
197
+ uses the same retained-reference form in `source`, or portable inline Evidence,
198
+ to project a summary, module page, or one module with its recorded observations.
199
+ This notation is
200
+ a template: replace it with the actual returned ID. Versions before 4.1.0 accept only full
201
+ inline Evidence. Use the exact ID
202
+ returned by the producer on the same MCP connection. Resolution does not run
203
+ analysis or select a provider; findings remain inline. Native observation
204
+ arrays still take full Evidence. `close_binary` clears retained references;
205
+ export a bundle before closing, or supply portable inline Evidence in another
206
+ connection. A missing reference includes its ID and recovery guidance.
207
+
208
+ For exact file/native metadata or processing gaps, use
209
+ `view: {kind: "javascript-facts", where: {paths: ["package.json"]}, property_keys: ["name", "operation", "analysis_status"], limit: 32}`.
210
+ Rows retain canonical node/observation identity and original Evidence. Paths
211
+ match Evidence artifact-path/source-range locations; missing properties remain
212
+ omitted and source coverage stays separate from page exhaustion. Batch paths and
213
+ select only needed property keys; complete Evidence remains accessible by export.
214
+ If names are unknown, opt into `include_available_property_keys: true`; it lists
215
+ the original keys per returned observation without unselected values. Keep each
216
+ row's node/observation identity paired when composing facts.
217
+ These rows select application-graph observations; semantic relationships and
218
+ semantic unknown records remain in the complete parent Evidence and trace tools.
@@ -0,0 +1,297 @@
1
+ # Native, managed, and packaged artifacts
2
+
3
+ ## Go build metadata
4
+
5
+ Use `inspect_go_binary` for an explicit local ELF, PE or thin Mach-O when the
6
+ question concerns the embedded compiler version, module/dependency versions,
7
+ local replacements or build settings. No `open_binary`, Go installation or
8
+ target execution is required. The CLI equivalent is `inspect-go-binary PATH`.
9
+ Preserve artifact SHA-256, original file ranges, framed module bytes and every
10
+ unparsed module-text line. A missing record is an unknown, not proof of a
11
+ non-Go binary; observed metadata does not authenticate its claims. Function,
12
+ source and type recovery remain a separate native-analysis question.
13
+
14
+ ## Rust dependency metadata
15
+
16
+ Use `inspect_rust_binary` for an explicit local ELF, PE, or thin Mach-O when
17
+ the question concerns the cargo-auditable crate list embedded in `.dep-v0`
18
+ (Mach-O: `__DATA,.dep-v0`). No `open_binary`, Rust installation, or target
19
+ execution is required. The CLI equivalent is `inspect-rust-binary PATH`.
20
+ Preserve artifact SHA-256, package order, dependency indices, and the section
21
+ file range. A missing section is null metadata, not proof the binary has no
22
+ dependencies. An omitted package kind stays null. A rustc commit hash is
23
+ inferred from a read-only `/rustc/<40-hex>/` path and does not by itself
24
+ identify the compiler. See [Rust binaries](https://github.com/morluto/rea/blob/main/docs/rust-binaries.md).
25
+
26
+ ## SQLite snapshots
27
+
28
+ Use `inspect_sqlite_database` with an explicit local database snapshot for its
29
+ schema and optional rows from one exact ordinary table. It requires Node.js
30
+ 24.x >=24.15 or 26+ with the native `DatabaseSync.limits` API. It also consumes the
31
+ existing sibling `-wal`; retain both original digests when citing its result.
32
+ Default output is a compact inventory; a selected table expands only its own
33
+ schema and samples 20 rows. Select `columns` to avoid irrelevant or large cells,
34
+ and request `schema_scope: "database"` only for complete schema details.
35
+ Choose `row_limit` when a finite sample is useful and keep truncation and
36
+ unspecified row order explicit. Virtual tables, shadow tables and views are
37
+ schema facts, not row-read targets. REA inspects private copies and leaves
38
+ the source files untouched; obtain a coherent quiescent database/WAL snapshot
39
+ before inspection. See [SQLite snapshots](https://github.com/morluto/rea/blob/main/docs/sqlite-databases.md).
40
+
41
+ ## Recorded Linux crashes
42
+
43
+ Use `inspect_recorded_crash` with an explicit Linux x86-64 ELF core path to
44
+ inspect historical thread registers, signals, raw notes and original file
45
+ ranges. It is independent of the active disassembler target. Source-bound
46
+ register values and note bytes are observations; missing notes, signal-thread
47
+ association and current executable/library identity remain unknown. PIDs are
48
+ historical metadata and never authorize live attach or control.
49
+
50
+ The optional `include_debugger_context` facet adds mapping candidates through
51
+ caller-supplied GDB/pwndbg in an owned core-only session. Display names do not
52
+ establish current file identity; zero reported flags leave permissions unknown.
53
+ Requested unavailable context fails with setup guidance. See
54
+ [recorded crashes](https://github.com/morluto/rea/blob/main/docs/recorded-crashes.md)
55
+ for exact upstream profiles, bounds and verification coverage.
56
+
57
+ ## Offline ELF layout
58
+
59
+ Use `inspect_binary_layout` with an explicit local ELF path for file-backed
60
+ sections, symbols, relocations, linkage names, and static mitigation inferences
61
+ without opening a disassembler target. When that complete record is already
62
+ retained, call `inspect_analysis_view` for a summary, mitigations or linkage
63
+ facet, one section or symbol, or a stable page. Do not re-run the decoder to
64
+ read a single object.
65
+
66
+ ## Offline WASM
67
+
68
+ Use `inspect_wasm_artifact` with caller-supplied WABT for selected local bytes.
69
+ For counts, validation and WAT identity, select `detail: "summary"` on the first
70
+ MCP call. The complete original Evidence stays retained; use
71
+ `normalized_result.parent_evidence_id` for exact exports or text pages. Omitted
72
+ or complete detail keeps the existing complete result.
73
+ For a completed result, use `inspect_analysis_view` with its reported retained
74
+ reference for a summary or `view: {kind: "wasm", facet: "exports", offset: 0, limit: 32}`.
75
+ Facets also include sections, imports, candidates, glue, WAT, headers, details
76
+ and tool profile. Text offsets count UTF-16 code units; follow `next_offset`.
77
+ The complete source remains retained after an oversized MCP reply. No target
78
+ execution or network acquisition is implied, and WAT is decoded representation.
79
+
80
+ ## Native targets
81
+
82
+ After `open_binary`, use focused search, procedure, or function tools directly.
83
+ Use `binary_overview` when target metadata or inventory context helps answer the
84
+ question. Prefer literal search, names, decompilation, callers, callees, and
85
+ cross-references. Addresses and recovered pseudocode are analysis observations,
86
+ not original source. Provider unavailability and unsupported metadata remain
87
+ unknown rather than false.
88
+
89
+ For a completed `analyze_function` dossier, use `inspect_analysis_view` with
90
+ `view: {kind: "native", facet: "value_flow_operations", offset: 0, limit: 32}`
91
+ and the exact retained Evidence ID to read selected facts without reanalysis.
92
+ Native facets also include procedure, pseudocode, assembly, basic blocks,
93
+ comments, callers/callees, references, unresolved calls, referenced strings and
94
+ names, the native API record, and value-flow summaries. Pseudocode offsets and limits count UTF-16
95
+ code units; use the returned `next_offset` for continuation. Provider limitations
96
+ and unavailable facts remain explicit; the complete parent Evidence is retained.
97
+
98
+ `inspect_macho` on a large framework returns megabytes of imports and exports.
99
+ Select `detail: "summary"` for slice identity, UUID and per-collection counts,
100
+ then page rows with `view: {kind: "macho", facet: "exports", offset: 0, limit: 64}`
101
+ and `normalized_result.parent_evidence_id`. Facets are entrypoints,
102
+ architectures, build_metadata, load_commands, dependencies, imports, exports,
103
+ segments and provenance. `source_exhaustive: false` means unreturned symbols
104
+ may exist.
105
+
106
+ To see which functions or Objective-C methods a Mach-O actually calls in one
107
+ run, use `observe_native_calls` with explicit breakpoints and a bounded
108
+ `duration_ms`/`max_events`. It launches a new process under LLDB, so the target
109
+ runs and may change files or use the network. Hardened-runtime targets need the
110
+ `get-task-allow` entitlement.
111
+
112
+ Use `binary_session` with no arguments to check the open target, selected
113
+ provider, and alignment. Its default `result.tool_availability` carries a
114
+ complete inventory grouped by shared facts. Expand each group's `names` and
115
+ inherit the inventory-level client requirements unless a group overrides them;
116
+ availability, reasons, remediation, modes, and flags remain inline. The
117
+ `effects` and `annotations` arrays name true flags from fixed vocabularies, so an
118
+ omitted known flag is false. `tools/list` remains the canonical source for full
119
+ tool schemas when target or provider state changes.
120
+
121
+ Provider capability groups carry provider identity and ordered limitations.
122
+ Prepend each set's `shared_limitations` to a group's `limitations` to recover the
123
+ operation's full ordered list. Candidate capabilities describe possible
124
+ providers. Top-level session capabilities describe the current route, and
125
+ `analysis_provider_binding` identifies the selected provider.
126
+
127
+ ## Static memory and original file bytes
128
+
129
+ For Ghidra, `read_bytes` reads initialized analysis memory, including loader
130
+ fixups; it does not read a running process. Check `returned_bytes` and `complete`
131
+ before decoding a table. An incomplete read is missing coverage, not a zero-filled
132
+ tail. Use `list_segments` to inspect the selected block's initialization and address-space
133
+ facts, and retain unavailable facts as unknown.
134
+
135
+ Use `address_to_file_offset` to anchor one observed address to original file
136
+ bytes. A mapping for the first address does not establish a contiguous mapping
137
+ for an entire table, and loader fixups can make analysis bytes differ from source
138
+ bytes. Keep source ranges and analysis-memory observations separate.
139
+
140
+ A pointer table can refer to writable slots populated by a constructor rather
141
+ than directly to immutable resources. An uninitialized block or an observed zero
142
+ does not establish the slot's later runtime value. Follow `xrefs` and the relevant
143
+ writer's assembly or pseudocode; distinguish recorded assignments from inferred
144
+ execution order. Do not replace unreadable bytes with zeros or conclude that a
145
+ resource is absent without the necessary initialization evidence.
146
+
147
+ ## DOS MZ with Ghidra
148
+
149
+ For an admitted DOS MZ target, use `inspect_native_load_image` to check measured
150
+ loaded bytes, file mappings, relocations and the entry against the immutable
151
+ snapshot. Keep `mismatch` and `unsupported` explicit. Verified import covers the
152
+ reported static image, not runtime DOS or PC-98 hardware behavior.
153
+
154
+ For Ghidra decompilation, `procedure_pseudo_code` also accepts `procedure: "file-offset:0x..."`; CLI `rea decompile <path> --file-offset=0x... --provider ghidra` resolves the source byte offset internally. An unresolved 0x-prefixed numeric procedure selector also falls back to a unique file mapping. Existing symbols and analysis addresses win; multiple mappings fail as ambiguous. Preserve the returned file-offset and address locations and raw selection observations. ELF virtual addresses are distinct from file offsets; never assume an arbitrary offset plus image base is an analysis address.
155
+
156
+ Complete function body ranges use inclusive ends and can contain gaps. Do not
157
+ treat the enclosing span as code.
158
+ For packed targets, retain the original and separately derived artifact identities;
159
+ decompiling an unpacking stub does not recover the unpacked program.
160
+
161
+ When reading Objective-C dispatch metadata, distinguish class implementation
162
+ methods from protocol requirements: class methods report null requirement
163
+ flags, while decoded protocol declarations retain required and optional facts.
164
+ Property attributes remain raw name/value tokens; use the property's
165
+ `atomicity` field for the decoded `N` marker or the default atomic behavior.
166
+ Null class/meta flags, ivar counts, atomicity, or read-only values mean the
167
+ selected provider did not establish that fact. Symbol names alone do not prove
168
+ that a class is a root class or has no ivars.
169
+
170
+ ## Managed PE/CLI
171
+
172
+ Start with `inspect_managed_artifact`. REA's canonical managed inspection is
173
+ execution-free: do not claim it loaded, reflected, executed, or resolved the
174
+ assembly. Keep managed/native boundaries and unavailable reconstruction facts
175
+ explicit. A bring-your-own reconstruction oracle is separate from the canonical
176
+ parser and must not become an implicit setup dependency.
177
+
178
+ For identity/classification questions, `inspect_managed_artifact` can explicitly
179
+ select `detail: "summary"` on the first MCP call. It retains complete metadata
180
+ and returns a linked overview with full classification/evidence, nullable
181
+ module/MVID, frameworks, metadata coverage/issues/limitations and returned-row
182
+ counts. Default complete requests remain unchanged. Read original rows with
183
+ `inspect_analysis_view`, source `normalized_result.parent_evidence_id`, and
184
+ `view: {kind: "managed", collection: "attributes", offset: 0, limit: 16}`.
185
+ Collections are `references`, `resources` and `attributes`. Paging does not
186
+ repeat parsing. Returned-row exhaustion
187
+ does not prove complete metadata or absence under partial/unavailable coverage;
188
+ preserve build-local tokens and their artifact/MVID scope.
189
+
190
+ `inspect_managed_members` always returns the assembly-wide `member_refs`, even
191
+ for one selected type. For questions about a selected type, select
192
+ `detail: "summary"` with `type_names`; it returns the selection (with unmatched
193
+ names), coverage and per-collection counts. Page rows with
194
+ `view: {kind: "managed-members", collection: "call_edges", offset: 0, limit: 64}`
195
+ over `types`, `exported_types`, `fields`, `methods`, `member_refs`, `call_edges`,
196
+ `field_accesses` or `user_strings`.
197
+
198
+ ### .NET NativeAOT
199
+
200
+ NativeAOT binaries contain native machine code, so ordinary CIL decompilers
201
+ cannot recover the original method bodies. When managed metadata/CIL is absent,
202
+ classify that as a native-analysis route rather than claiming source recovery.
203
+ Open the native image with the selected deep provider and inspect functions,
204
+ strings, calls, and references; describe decompiler output as pseudocode and
205
+ inference.
206
+
207
+ NativeAOT images can be PE/COFF, ELF, or Mach-O executables and shared
208
+ libraries. Use file bytes and loader metadata rather than suffixes to identify
209
+ them. For packaged apps, inventory/extract with REA's artifact tools and retain
210
+ the exact contained image identity. PDB, ELF debug, or dSYM sidecars are
211
+ additional evidence only when the provider accepts and matches them.
212
+
213
+ REA has a built-in read-only snapshot parser for x64 PE targets with .NET 8 RTR
214
+ 9.1 metadata. An optional headless Ghidra adapter adds database annotations and
215
+ broader metadata recovery on Linux; it requires an explicitly configured
216
+ NativeAOT JAR. These are separate routes. The built-in parser also runs on
217
+ Windows Ghidra P0; read frozen literals from its report, because
218
+ `search_strings` does not include them. See the
219
+ [NativeAOT guide](https://github.com/morluto/rea/blob/main/docs/ghidra-nativeaot.md)
220
+ for setup, supported layouts, and host restrictions. Preserve binary identity
221
+ and distinguish derived metadata from Ghidra database observations. Recovered
222
+ types and native pseudocode are not original C# source. Windows Ghidra P0 has
223
+ no database mutation authority.
224
+
225
+ ## Packages and extraction
226
+
227
+ Use `inspect_artifact` for application bundles, archives, ZIP/APK/IPA/MSIX/AppX,
228
+ ASAR, or DMG inputs when the artifact graph and findings help answer the
229
+ question. It returns the complete artifact graph inline. Cite graph manifest
230
+ IDs when using them.
231
+
232
+ For an IPA or a macOS `.app`, ZIP, or DMG, pass the inventory Evidence to
233
+ `project_apple_application_graph`. It reports application roots and nested
234
+ bundles by path convention: app extensions, XPC services, frameworks, login
235
+ items, system and driver extensions, and plug-ins. It also lists privileged
236
+ helpers, launchd plists, symlinks, and each bundle's `info_plist_path` and
237
+ executable candidates. Roles are path conventions, not parsed plists; read the
238
+ listed plists with `inspect_plist`.
239
+
240
+ After `open_binary` on a `.app` or Mach-O, use `trace_dylib_resolution` to see
241
+ which file each `@rpath`, `@loader_path` and `@executable_path` load reaches for
242
+ every executable in the bundle. It also lists missing or weak loads and earlier
243
+ `@rpath` candidates that are absent. Narrow large bundles with `roots` or
244
+ `architecture`. System paths stay undetermined because the dyld shared cache
245
+ provides them.
246
+
247
+ Use `extract_artifact` when materialized files are needed. It extracts the active
248
+ target and accepts optional `integrity_policy`; see the [MCP contracts](https://github.com/morluto/rea/blob/main/docs/mcp-contracts.md).
249
+ It materializes all regular files into a fresh temporary directory chosen by
250
+ REA. Symlinks and encrypted entries are inventory facts, not extractable files.
251
+ The result reports the materialized directory; callers do not choose the
252
+ destination. No separate permission grant is needed.
253
+
254
+ Native DMG traversal automatically uses a read-only mount on supported macOS
255
+ hosts, with an owned temporary mount directory and cleanup. It needs no approval
256
+ flag. Unsupported hosts or mount failures remain explicit limitations; do not
257
+ claim child inventory when only root identity is available. Extraction is a
258
+ separate filesystem-writing operation.
259
+
260
+ For headerless DOS COM, explicitly open with `format: "dos-com"` (CLI
261
+ `--target-format dos-com`). Inspect the load image before trusting function
262
+ analysis: the entry is `0x10100`, file offset zero, with imposed real-mode segment
263
+ context. PSP/stack/device state remains unmodeled. See [DOS guide](https://github.com/morluto/rea/blob/main/docs/ghidra-dos.md).
264
+
265
+ For other headerless images (embedded firmware without ELF/Mach-O/PE/MZ
266
+ headers), open with `format: "raw-binary"`, `architecture` (`x86`, `x86_64`,
267
+ `arm`, `arm64`, `6502`, or `m68k`), and `entry_point` (`0x` hex). File offset 0 is mapped at
268
+ that address. Hopper and IDA refuse this interpretation; Ghidra uses
269
+ `BinaryLoader` with a generic language: big-endian for `m68k`, little-endian
270
+ otherwise. Big-endian ARM, Thumb-only, and Cortex-M variants are unsupported.
271
+ `6502` selects NMOS 6502; the entry and complete file mapping must fit within
272
+ `0x0000..0xffff`. 65C02, 65816, cartridge containers, bank switching, and mapper
273
+ semantics are unsupported. `m68k` requires an even entry and decodes the 68040
274
+ superset of the 68000 family; Amiga/Atari containers and vector-table entry
275
+ discovery are unsupported. Windows Ghidra P0 admits raw images only for `6502`. See [raw binary guide](https://github.com/morluto/rea/blob/main/docs/raw-binary.md).
276
+
277
+ ### Function annotations in Ghidra
278
+
279
+ Use `annotate_native_function` for one function name and/or entry comments, with at least one explicit change. Review its annotation readback and refreshed dossier inline. Changes are atomic and session-scoped; empty comments clear them, omitted fields preserve them. Later MCP calls observe edits until close. CLI `annotate-native-function` returns the updated analysis before discarding the session. Original executable bytes are unchanged; edits invalidate immutable snapshots. Windows P0 does not admit database mutations. For naming only, `set_address_name` / `set_addresses_names` also work with Ghidra: they name function entries or data addresses (primary labels) and return compact per-address success booleans instead of a dossier.
280
+
281
+ ## Offline PE resource inventory
282
+
283
+ Use `inspect_pe_resources` with an absolute `path`, or
284
+ `rea inspect-pe-resources ./selected.exe --json`, for portable PE32/PE32+
285
+ resource inspection without opening a native target. Preserve returned Evidence:
286
+ type/name/language IDs and UTF-16 names, original directory/data/payload ranges,
287
+ code pages, payload hashes and static icon-group references. Same-language icon
288
+ resolution is explicit; missing references and size mismatch remain visible.
289
+ Other payloads are opaque, and this operation does not decode images or simulate
290
+ Windows resource loading. Consult the budgets and supported tree profile in
291
+ [offline binary diagnostics](https://github.com/morluto/rea/blob/main/docs/binary-diagnostics.md).
292
+
293
+ For exact core-module import/export differences, use `compare_wasm_interfaces`
294
+ with two complete inspection Evidence records (or current-session retained
295
+ references) and explicit scope. Preserve unknown types/duplicate names; static
296
+ interface equality is not runtime compatibility. CLI accepts complete inline
297
+ Evidence in `rea compare-wasm-interfaces input.json --json`.