Skip to content

v0.1.6

Choose a tag to compare

@ruslanmv ruslanmv released this 07 Sep 15:05
· 14 commits to master since this release

Matrix CLI v0.1.6

Release date: 2025-09-07

This release makes matrix-cli fully compatible with the refactored matrix-python-sdk v0.1.9, delivering a sturdier local installer, clearer logs, and better cross‑platform behavior—without changing any CLI flags.


Highlights

  • SDK 0.1.9 compatibility: CLI now targets the new installer package layout (matrix_sdk/installer/…). Fixes the common
    ModuleNotFoundError: No module named 'matrix_sdk.installer' when older SDKs were present.

  • Robust local installs: The installer regains legacy behavior and expands runner discovery:

    • Supports plan.runner_b64, plan.runner_url, plan.runner objects.
    • Reads embedded manifest v2 runners; synthesizes connector from v1 manifests.
    • Uses on‑disk runner.json (or runner_file) when present.
    • Shallow BFS for runner.json (configurable depth).
    • Manifest URL synthesis (opt‑in allowlist) and last‑resort structural inference (server.py, package.json).
  • Better env prep:

    • Python: creates/updates venv, upgrades pip/setuptools/wheel, installs deps from runner.python.requirements, requirements.txt, or pyproject.toml/setup.py (editable install opt‑in).
    • Node: detects pnpm>yarn>npm via lockfiles and runs install with captured logs.
  • Idempotent installs remain simple: matrix install <id> --alias <alias> --force --no-prompt re‑runs cleanly.

  • Clearer diagnostics: Enable MATRIX_SDK_DEBUG=1 for verbose step‑by‑step logs.


New & Improved (via SDK 0.1.9)

  • Installer APIs restored (compat with older callers):

    • LocalInstaller.plan() / .materialize() / .prepare_env() / .build()
    • Dataclasses: BuildReport, EnvReport, BuildResult
  • File & artifact handling:

    • Writes from plan.files, outcome.files, and results[].files.
    • Supports content (text) and content_b64 (binary).
    • Artifact fetchers: git (spec or legacy command) and http/archives, with errors surfaced as ManifestResolutionError.
  • Runner discovery helpers (pure functions, re‑exported for downstreams):

    • _is_valid_runner_schema, _ensure_sse_url, _url_from_manifest, _extract_mcp_sse_url, _coerce_runner_to_legacy_process.

Environment toggles

These environment variables are honored by the installer that matrix-cli drives:

  • MATRIX_SDK_DEBUG — verbose logging
  • MATRIX_INSTALL_SEND_ABS_TARGET — send absolute install path to Hub (default: disabled; sends server‑safe label)
  • MATRIX_SDK_PIP_INDEX_URL, MATRIX_SDK_PIP_EXTRA_INDEX_URL — custom Python package indexes
  • MATRIX_SDK_PIP_EDITABLE — install local project in editable mode (default: true)
  • MATRIX_SDK_ALLOW_MANIFEST_FETCH — allow fetching remote manifests for runner synthesis (default: true)
  • MATRIX_SDK_MANIFEST_DOMAINS — CSV allowlist for remote manifest hosts
  • MATRIX_SDK_ENABLE_CONNECTOR — allow connector synthesis from URL hints (default: true)
  • MATRIX_SDK_HTTP_TIMEOUT — HTTP timeout (seconds; default: 15)
  • MATRIX_SDK_RUNNER_SEARCH_DEPTH — shallow search depth for runner.json (default: 2)

Compatibility

  • Python: 3.11+
  • OS: Windows/macOS/Linux
  • SDK pin: matrix-python-sdk >= 0.1.9 (declared dependency)

No breaking CLI flag changes.


Upgrade

pip install -U matrix-cli
# ensures SDK 0.1.9+

If you vendor wheels or operate offline, ensure the wheelhouse contains matrix-python-sdk==0.1.9+.


Example (idempotent install)

matrix install hello-sse-server \
  --alias hello-sse-server \
  --force \
  --no-prompt

Notable fixes

  • Resolved import failures caused by the legacy single‑module installer.
  • Eliminated spurious newline arguments that could break process invocation on some shells.
  • Safer path joins and traversal checks when writing files/materializing artifacts.

Thanks

Big thanks to everyone filing issues and testing prereleases. Your reports directly shaped this stabilization.