Skip to content

Testing and Debugging

Run the same checks before every handoff:

Terminal window
npm run typecheck
npm run build
cargo fmt --check
cargo check
npx --yes @haloforge/plugin-pack@0.2.13 check .
npx --yes @haloforge/plugin-pack@0.2.13 pack . --out dist/package

hf operates on the local HaloForge workspace. In source checkout examples use npm run hf -- ...; installed Windows builds can use hf ... directly after opening a new terminal. On macOS, run command -v hf first because automatic PATH linking is not implemented yet.

Terminal window
cd /path/to/HaloForge
npm run hf -- plugin install local /path/to/plugin/dist/package/<plugin-id>-<version>.hfpkg --json
npm run hf -- plugin list --json

The installed plugin should show:

  • enabled: true
  • state: "active"
  • error_message: null

See Command Line for launch profile and catalog admin commands.

HaloForge writes application, frontend bridge, and plugin logs to a daily file:

Terminal window
tail -f ~/.haloforge/logs/haloforge.log.$(date +%F)

In development, raise Rust tracing with:

Terminal window
RUST_LOG=debug npm run tauri dev

Frontend plugins should use createPluginLogger() from @haloforge/plugin-sdk; Rust backends should use ctx.log(...). For image generation and other gateway flows, log request start, success, and failure with request ID, model, size, status, elapsed time, output count, and a short error summary. Do not log API keys, bearer tokens, full prompts, or raw image/base64 payloads.

Inspect a package before installing:

Terminal window
unzip -l dist/package/dev.example.my-plugin-0.1.0.hfpkg

For a UI plugin, confirm the package contains:

  • manifest.json
  • frontend bundle
  • frontend stylesheet if declared
  • native library when entry.native is declared
  • icon/assets referenced by the manifest

Check these first:

  1. registerPlugin() uses the exact same ID as manifest.json.
  2. entry.frontend points to the built JavaScript file inside the package.
  3. integration.*.panel_entry points to the panel bundle.
  4. The package contains the frontend bundle and CSS.
  5. The bundle executed without a JavaScript error.
  6. The Rust backend loaded and registered commands.
  7. Required host capabilities and permissions were declared.

If the bundle executed but did not register a panel, HaloForge should report that clearly in the plugin slot error area.