FARM COMPANION FOR WINDOWS — automatic plugin updates

First installation
1. Install official RuneLite and make sure it launches through Jagex Launcher.
2. Extract this entire ZIP to a normal folder. Do not run from inside the ZIP.
3. Run Install.cmd. It shows the RuneLite folder it will configure. No administrator rights are normally needed for a per-user RuneLite installation.
4. Start RuneLite normally through Jagex Launcher. The installer never restarts or controls a game.
5. Enable Time Tracking if disabled. Log into your character and open the bank once. When available, open the seed vault once too.
6. Open Farm Run Companion > Configure runs. Defaults: Ranarr first, then descending herb level; limpwurt, snape grass and watermelon enabled; automatic graceful/lightness gear enabled. Levels, unlocks and owned supplies still apply.
7. Select a run. Background travel comparison may take a minute on the first login. The matching Inventory Setup opens when calculations finish. Start new run begins guidance; it never clicks or plays for you.

Each character has its own stock, settings and setup bindings. You do not need Boyenn's account, exports, dashboard, Python, Node, Java SDK or personal configuration. Copy settings / Paste settings in Configure runs shares crop/patch policy only. It does not copy bank contents, unlocks or items.

Custom install directory or preview
Open PowerShell in this folder:
  .\Install-FarmCompanion.ps1 -RuneLiteDir 'D:\Games\RuneLite' -WhatIf
  .\Install-FarmCompanion.ps1 -RuneLiteDir 'D:\Games\RuneLite'
If PowerShell's execution policy blocks the command, use Install.cmd with the same arguments. The .cmd uses a process-local policy override; it does not change your machine policy.

What changes
The installer adds one -javaagent entry to RuneLite's settings.json and selects FORK launch mode so that client JVM arguments are applied. It preserves other JVM/client arguments and settings, and backs up settings.json before each change. Official launcher and game files are untouched. Authentication stays inside the normal Jagex/RuneLite launch flow; this package never reads or stores tokens. Only these four custom plugins load: Farm Run Companion, Inventory Setups, Setup Picker, Shortest Path. Conflicting Plugin Hub copies are superseded by RuneLite's builtin-plugin mechanism. Your existing plugin enable/disable choices are preserved.

Updates
Install once, then launch RuneLite normally through Jagex Launcher. When an update feed is configured, the bootstrap checks it at each launch and downloads a bundle only when its SHA-256 changes. Four plugins update together: Farm Run Companion, Inventory Setups, Setup Picker and Shortest Path. Your account preferences and saved setups stay local.

Only a bundle explicitly published for the current RuneLite version can load. Downloads use HTTPS, have size/time limits and are checked before activation. Failed checks use the most recent verified compatible cache, the previous cached release, or the bundled release. If none matches, ordinary RuneLite starts without custom plugins. Existing running clients are never restarted or patched. The check has a 15-second network budget; most launches only download a small manifest.

Future fixes reach her when a tested bundle is published to the feed, not merely when source files are edited on the developer's machine. A bootstrap API change may eventually require reinstalling this small installer, but ordinary fixes to the four plugins and matching new RuneLite bundles do not.

IMPORTANT FOR AN UNPUBLISHED/LOCAL PACKAGE: if Install.cmd warns that no update host is configured, automatic downloads are NOT active. Bundled plugins still work. Once a public HTTPS host exists, rerun:
  .\Install-FarmCompanion.ps1 -UpdateBaseUrl 'https://your-download-host/path/'
Use the real published host; the address above is only an example. The normal published ZIP will already contain the correct URL, so she will not need to type it.

Check status
Run Check.cmd for a configuration check and the last bootstrap report, or read %USERPROFILE%\.runelite\farm-companion-bootstrap\status.properties.
state=loaded means the four plugin classes were registered; check their toggles in RuneLite if a panel is absent.
state=stock explains why ordinary RuneLite was used (version mismatch, missing bundle or another custom bootstrap).
No status file means the launcher did not use this settings.json, or the JVM did not load the agent. Check the configured RuneLite folder; don't delete account settings.

Uninstall
Run Uninstall.cmd. It removes only this package's managed JVM argument and restores the previous launch mode when unchanged. Existing inventory setups, farming preferences and account settings remain. Versioned plugin files are left on disk for recovery; they can be deleted from %LOCALAPPDATA%\FarmCompanion after uninstalling and closing the clients normally.

Validation boundary
The Java bootstrap is exercised on Linux against the actual RuneLite dependency jars, including the platform-parent classloader used by the official launcher, mismatch/failure fallback, and the matching plugin bundle. The updater also has real local HTTPS tests for new releases, offline fallback, corrupted downloads/caches and wrong-version manifests. Windows installer logic is tested with fixture directories. A real Windows/Jagex launch still needs first-machine verification; this is a private development package, not a Plugin Hub release.

Implementation references
https://github.com/runelite/launcher/blob/master/src/main/java/net/runelite/launcher/LauncherSettings.java
https://github.com/runelite/launcher/blob/master/src/main/java/net/runelite/launcher/ForkLauncher.java
https://github.com/runelite/runelite/blob/runelite-parent-1.13.6/runelite-client/src/main/java/net/runelite/client/externalplugins/ExternalPluginManager.java
