Skip to content

Latest commit

 

History

History
78 lines (58 loc) · 2.81 KB

File metadata and controls

78 lines (58 loc) · 2.81 KB

mobile-harness update

Use this file to keep an installed mobile-harness clone current. For first-time setup, read install.md.

<harness-root> below is the directory containing this repository's AGENTS.md. When the harness is loaded through a CLAUDE.md import or a skill symlink, resolve the real repository path first.

Soft Update (default)

Run once per session, before platform work. First check that <harness-root>/.git exists. If it does not (for example a copy installed with the skills CLI), do not run the pull — git -C would operate on an enclosing repository — and run npx skills update from the project where the skill was installed instead.

git -C <harness-root> pull --ff-only

Handle the result:

  • Updated or already up to date: continue.
  • Offline or network failure: continue with the current version. Do not retry in a loop and do not report it as an error.
  • Not possible to fast-forward, diverged history, or local-changes errors: the clone needs repair. See Force Update.

The soft update never overwrites local changes.

Force Update (repair)

Force update resets the clone to the remote state and discards local modifications to tracked files:

git -C <harness-root> fetch origin
git -C <harness-root> reset --hard origin/main

Rules:

  • Ask the user before running it. Tell them what the soft update refused (dirty files, diverged history) and that local edits to tracked harness files will be lost.
  • Never run git clean -x, git clean -fdx, or delete untracked files. local/ and .venv/ live inside this repository as ignored directories. reset --hard leaves them alone; git clean -x destroys them.
  • Do not repair a development checkout. If the user says the clone is where they edit the harness itself, stop and let them resolve it.

Update Python Dependencies

The git pull only refreshes the Markdown harness; the control libraries in .venv/ are versioned separately on PyPI. Upgrade them in the same pass:

<harness-root>/.venv/bin/python -m pip install -U "mobilerun-core[local]" mobilerun-core-local mobilerun-sdk
<harness-root>/.venv/bin/python -c "from mobilerun_core import Mobilerun"

The explicit mobilerun-core-local and mobilerun-sdk entries are intentional: they force already-installed transitive runtime packages to upgrade in the session venv. Normal agent code should still import only mobilerun_core.

If offline, continue with the current version; skip the upgrade if a version is pinned.

After Updating

  • Files read earlier in this session may be stale. Re-read a guide before relying on it.
  • If the update changed AGENTS.md, re-read it before continuing.
  • If from mobilerun_core import Mobilerun still fails after the dependency upgrade above, read install.md and reinstall mobilerun-core[local] into .venv/.