Commit Graph
7 Commits
Author SHA1 Message Date
Ole André Vadla Ravnås 9606ec4930 Drop the driver concept; await host-claim ack
The driver seat became fully redundant with the host once session
interaction moved to owner gating: it was always equal to the host and
nothing read it for authorization. Remove it wholesale — the
claim-driver op, driverBySession, localUserIsDriver, Session.driver,
and the REPL "Driving" indicator.

Gate REPL submission on ownership (solo always). Claim hosting through
an acknowledged request and attach only once the server accepts,
instead of optimistically attaching before the claim is even sent.
2026-06-26 15:34:02 +02:00
Ole André Vadla Ravnås 0384896e9d core: Sync persisted module symbols via collab
New update-module-symbols SessionOp carries a batch of
(modulePath, offset, name) entries. persistSymbolicateResults
enqueues one op per symbolicate roundtrip; non-drivers upsert
into module_symbol on receive. Late-joiner snapshots ingest
the whole table.
2026-05-20 21:15:55 +02:00
Ole André Vadla Ravnås 12d5491c22 Sync disasm cache across collab
Identify a process instance by a deterministic identity returned
from the agent (per-OS, with a Process.mainModule + pid fallback)
and stash it on ProcessSession.processInfo. Rekey memory_page
into memory_page_module (module UUID + offset) so cached bytes
survive ASLR, and memory_page_anon (process identity + address)
for JIT / heap regions that only survive within one process
instance. Purge stale anon pages on every fresh attach.

Add updateProcessInfo, updateModuleAnalysis and updateInsight
SessionOps plus a side-channel publish-memory-page op and a
+fetch-memory-page request. The driver write-throughs every
page it fetches; non-drivers pull on miss and persist locally.
Module-analysis rows flow the same way so non-drivers can key
their cache by module UUID. The lab-join snapshot now carries
processInfo and module_analyses too.

Refresh actions on the insight detail view: Reread Bytes drops
the pages overlapping the visible range; Reanalyze Module drops
the module's analysis and pages, re-running r2 on next access.

The macOS detail view now reads the insight live from
insightsBySession via observation; GTK forwards .insightUpdated
into the detail and reschedules a refresh when the resolved
address changes.
2026-05-19 15:16:48 +02:00
Ole André Vadla Ravnås 6fd038520b core: Surface instrument load and reload failures
Catches around loadInstrumentOnNode, applyInstrumentConfig
and the custom-instrument reloader now set the runtime
status via InstrumentStatus.from(error:kind:) instead of
swallowing the error with print. Status changes are
broadcast both locally (so the host UI refreshes) and to
collaboration peers via a new runtime_status piggy-backed
on the existing add/update-instrument wire payload.
2026-05-16 02:55:45 +02:00
Ole André Vadla Ravnås 05380cd568 core: Add spawn gating
Engine drives device.enableSpawnGating() per armed-session intent;
matched spawns re-attach via the existing attach path and misses
resume immediately. Engagement intent is in-memory only so launches
don't auto-engage gating for sessions armed in a previous run.

ProcessSession gains armingState and lastArmPattern, mirrored in
the SQLite schema. RuntimeEvent.Source.spawnGating carries the
captured/released outcome with wire encoding.

Lab protocol adds update-arming as a SessionOp variant; armed-only
sessions announce themselves with pid 0 and phase detached so peers
can see them before any capture.

Engine.onUserNotification surfaces gating-enable failures using the
clean Frida.Error message.
2026-05-08 16:15:25 +02:00
Ole André Vadla Ravnås 91385e11a4 core: Wire ITrace, deltas, and UI state in engine
Engine subscribes to module/thread deltas and trace updates, drives
the unified ITrace lifecycle, paginates set-trace-data uploads with
lazy server-stat resume, and falls back to a paginated +fetch with
optional first-paint prefix and onProgress reporting. Server-driven
trace-data-progressed broadcasts feed back as cache invalidations.

ProjectStore picks up itrace, project_ui_state and session_ui_state
tables; the schema is created with if-not-exists, no migrations.
SessionOp carries upsertTrace, removeTrace, traceDataProgressed,
and the module/thread updates are now ModuleDelta/ThreadDelta.
2026-05-07 16:40:30 +02:00
Ole André Vadla Ravnås 9d02419562 Sync sessions across collaborative labs
Sessions in a lab are now collaborative artifacts. Any owner can
host (own the local Frida attachment) and any owner can drive
(issue REPL evals and instrument commands); a driver's actions
are relayed to the current host. Members watch read-only and see
an "Only lab owners can host sessions" CTA when they try the new
session button.

Re-host (Run on My Device…) lets an owner take over a running
session by attaching to their own equivalent process; the prior
host's Frida attachment detaches and the new host auto-loads the
session's instruments. Driver auto-reverts to host when the
current driver fully disconnects from the lab.
2026-04-30 23:28:15 +02:00