SwiftPM re-reads every manifest when the environment changes, and
both it and Xcode key link and plugin tasks on PATH. An agent's shell
has a different PATH than the terminal's, so a build that was a no-op
in one relinks everything and regenerates the GTK bindings in the
other.
Run swift and xcodebuild from an allowlisted environment, with PATH
reduced to the directories that exist, each named once.
Drop the Monaco webview. Edit in a GtkSourceView on GTK and in a
native text view on Apple, both speaking to Frida.Compiler's
in-process language server for completions, signature help,
hovers and diagnostics.
Color, complete and indent code natively, matching the GitHub
theme in light and dark.
Xcode enumerates a package target's resources when it loads the
package graph, before any build phase runs. An image staged from a
script phase is missing from that build's LumaCore, and the playground
crashes on the unwrap in boot().
Move the staging into scripts/stage-pharo-image.sh, called from
generate-sources.sh and both Makefiles.
Xcode enumerates a package target's sources when it loads the package
graph, before any build phase or scheme pre-action runs, so generated
Swift that appears during a build is missing from that build.
Move generation into scripts/generate-sources.sh, run it from the
Makefile, CI and the Luma scheme's pre-action, and drop the
AgentBundle target. Say what to run when the files are not there yet.
A comment is a last resort, and these were not one: section banners,
doc headers naming what the declaration below already names, and
notes saying in prose what the next line says in code.
What is left is what the code cannot show -- an ordering that matters,
a platform quirk, why the obvious way fails.
Xcode stages it from a script phase, which a SwiftPM build never runs:
the catalogue read booted an image that was not there. Take the release
the app takes while here.
The playground, the notebook cells, the source editor with its
marks, the inspector columns and the canvas are written once for
both Apple platforms, with a file naming what the two frameworks
call differently. The editor is where they really part company.
The engine owns the image and its start-up, so a mission reaches
the whole of Pharo.
The example catalogue is Smalltalk inside Swift string literals,
which no compiler reads: parse each one in the image and report the
syntax errors, the names nothing defines and the selectors nothing
implements. Play every patch offline. Draw the effects and a
lettered scene offscreen and write a PNG of each, since what goes
wrong in drawing is blank frames and mirrored glyphs.
Play a snippet in a canvas for a while and report what the process
holds as it goes, and let go of what the image lets go of.
glslang and SPIRV-Cross build under neither SwiftPM nor Xcode, so
CI makes them into an xcframework and publishes it against a tag.
The manifest names that artifact; a build downloads it and needs
nothing local.
Write each effect body-only against a preamble the host supplies,
and let the build systems generate what each renderer needs -- a
Swift catalog for OpenGL, a Metal fragment function through glslang
and spirv-cross. Effects react to arriving events.
- Build: top-level Makefile routes gtk targets through
LumaGtk/Makefile, which now compiles the agent bundle via
luma-bundle-compiler before swift build and forwards the
system pkg-config search paths so SwiftPM's bundled .pc
finder can locate frida-core/r2 on Fedora.
- Application identity: g_set_prgname so the alt-tab name
resolves correctly under Wayland/X11.
- Sidebar / target picker icons: new IconPixbuf adapter that
turns Frida.Icon (.rgba/.png) into a Gtk.Image, used by
TargetPicker rows and MainWindow's session header.
- REPL pane:
* Strong-held REPLPane (was weak; closures saw nil self).
* Banner + input state observed via parent push from
renderSessions, no rebuild on state change.
* Cells anchored bottom (chat-like), monospace, ← arrow.
* JSInspectValueWidget rewritten as a class wrapper:
Pango syntax colours, Gtk.Expander collapsibility,
embedded HexView for byte-array values, NativePointer
right-click → Open Memory / Open Disassembly.
* Tab + auto debounced inline completion: popover under
the caret via pango layout measurement, suppress flag
breaks the accept→retrigger loop, selectRegion(-1,-1)
clears the all-selected trap after replaceInput.
* Clear button removed (was a no-op).
- HexView: recompute size after first metrics pass so the
ASCII column isn't clipped, embedded mode uses natural
height instead of an arbitrary 220px hint.
- Event stream pane:
* Resizable via Gtk.Paned when expanded, collapsed swap
to a plain Box (no draggable handle).
* CSS border-top on .event-stream-pane gives a stable
separator across both states.
* Source-filter menu built once in init (was rebuilt
per event batch, swapping the popover from under the
user — checkboxes did nothing).
* Search predicate uses prettyDescription so nested JS
values match.
* Row label resolves descriptor.displayName instead of
raw sourceIdentifier (\"builtin.tracer\").
* Context menus anchor to the stable pane widget so a
new event arriving doesn't unparent them.
- Tracer:
* New TracerConfigEditor mirrors SwiftUI layout (editor
pane + hooks list, Save toolbar, switches).
* Inline EmptyStateSearch with debounced resolveApis,
adds hooks straight from search results.
* Monaco editor wired with MonacoTypings.fridaCompiler-
Options + frida-gum + tracer ambient typings; lib set
to es2022 only so DOM globals stop polluting the
completion list.
- Instrument detail:
* New InstrumentDetailPane embeds the config editor
directly (no heading / Disable / Remove chrome). Held
strongly on MainWindow, observes session via parent
push.
* Sidebar context menus offer Disable / Remove (with
the lifetime fix applied to all four MainWindow
context menus — same [weak anchor] trap as the
Notebook one fixed earlier).
- Add Instrument dialog:
* Inline kind list + live config editor on the right.
* pendingConfigJSON updated as the user edits.
* CodeShare branch uses Monaco (frida-gum typings),
900x600 default size so the action button is visible.
* Dedupe: descriptors already added to the session show
as disabled rows with an \"Already added\" caption.
* Browse CodeShare anchored to the parent MainWindow,
not the dialog about to close.
- Address insight: new InsightDetailView replaces
AddressDetailsPanel. Resolves anchor via node.resolve,
branches on insight.kind (HexView vs disassembly list),
persists lastResolvedAddress. AddressActionMenu navigator
refreshes instruments before selecting so the new insight
row appears nested under the session.
- Install Package: search-as-you-type with 300ms debounce,
bypasses frida-core's broken json-glib parser by hitting
npm registry directly via URLSession + JSONSerialization.
Right edge of search row aligned with results scroll.
- Popover positioning: new PopoverPointing extension makes
every click-driven context menu open at the cursor via
gtk_popover_set_pointing_to instead of the widget centre.
- Popover menu styling: bespoke .luma-menu CSS (padding,
border-radius, hover, destructive colour) bound to the
inner box so hover lights up for all menu items, not just
the .destructive-action ones (which previously rendered
white-on-white due to Adwaita's flat+destructive trap).
- MonacoEditor: webview hexpand/vexpand set in init so all
hosts get a correctly-expanding editor by default.
Fallback typings loader handles SwiftPM resource bundle
flattening on Linux so frida-gum.d.ts is found.
- LumaState: persists the event stream sash position.
- Generated/LumaAgent.swift refreshed to pick up new repl
RPC methods (evaluate, complete).
Lay the groundwork for a GTK/Adwaita frontend by extracting
shared infrastructure into a LumaCore Swift package. Agent
sources and LumaBundleCompiler move to top-level locations
so both the Xcode project and SPM can reference them.
New structure:
- Package.swift: root manifest with LumaCore lib + compiler
- Sources/LumaCore/: engine, persistence, models, and
platform-abstracted token store
- Sources/LumaBundleCompiler/: moved from LumaBundleCompiler/
- Agent/: moved from Luma/Agent/
- LumaGtk/: skeleton GTK app package
- Switch `frida-swift` to Swift Package Manager dependency
- Use remote dependency for `SwiftyMonaco` instead of local checkout
- Add `Makefile` for convenient command-line builds