Testing and Debugging
Run the same checks before every handoff:
npm run typechecknpm run buildcargo fmt --checkcargo checknpx --yes @haloforge/plugin-pack@0.2.13 check .npx --yes @haloforge/plugin-pack@0.2.13 pack . --out dist/packageLocal Install
Section titled “Local Install”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.
cd /path/to/HaloForgenpm run hf -- plugin install local /path/to/plugin/dist/package/<plugin-id>-<version>.hfpkg --jsonnpm run hf -- plugin list --jsonThe installed plugin should show:
enabled: truestate: "active"error_message: null
See Command Line for launch profile and catalog admin commands.
Runtime Logs
Section titled “Runtime Logs”HaloForge writes application, frontend bridge, and plugin logs to a daily file:
tail -f ~/.haloforge/logs/haloforge.log.$(date +%F)In development, raise Rust tracing with:
RUST_LOG=debug npm run tauri devFrontend 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.
Package Inspection
Section titled “Package Inspection”Inspect a package before installing:
unzip -l dist/package/dev.example.my-plugin-0.1.0.hfpkgFor a UI plugin, confirm the package contains:
manifest.json- frontend bundle
- frontend stylesheet if declared
- native library when
entry.nativeis declared - icon/assets referenced by the manifest
Plugin panel not loaded
Section titled “Plugin panel not loaded”Check these first:
registerPlugin()uses the exact same ID asmanifest.json.entry.frontendpoints to the built JavaScript file inside the package.integration.*.panel_entrypoints to the panel bundle.- The package contains the frontend bundle and CSS.
- The bundle executed without a JavaScript error.
- The Rust backend loaded and registered commands.
- 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.