# 0.1.2 — Current PI WEB / Pi compatibility and chat management

## Compatibility

This release targets the published PI WEB `1.202610.3` and is developed against Pi coding agent `1.2.0`.

- PI WEB peer: `^1.202610.3` (browser API v4, server API v3).
- Pi coding agent peer: `^1.0.0`; Pi 0.x and 2.x are outside the supported range.
- Node.js: 22.19 or newer, unchanged.

The companion narrows `before_agent_start` before reading `prompt`: Pi 1.2 also starts runs from custom messages, which have no user prompt. Unrelated custom-message starts end automation attribution as `unknown`; later completion or cancellation must not claim or abort the other work. Regression coverage includes legacy user events, Pi 1.2 discriminated user events, and custom-message interference both before and after automation startup.

Browser test contexts now include the required public `navigate` helper. Development dependencies and the lockfile have been updated; package metadata tests assert the new version and compatibility ranges.

The host's `pi-sessions@1`, `pi-session-events@1`, and `workspaces@1` capability contracts are unchanged. No new host API, panel alias, or shortened session ID is used. The peer-free server bundle and managed-install packaging fix from [0.1.1](0.1.1.md) are retained.

## Also included since 0.1.1

The bundled companion now exposes the `automations` chat tool without skill loading or database discovery:

- List across accessible workspaces on the session-selected machine; inspect by exact automation ID.
- Create disabled drafts and update saved requirements with optimistic revision checks.
- Run/test, enable/pause, archive/delete, and request cooperative cancellation using exact IDs.
- Automatically bind ordinary workspace chat while its workspace label is mounted, without opening the Automations tab.
- Resolve exact-ID actions against the automation's stored target workspace, and prevent duplicate backend bindings across workspace aliases.

Missing companions, unavailable backends, inaccessible targets, and revision conflicts report errors without local fallback. Lost replies can mean a mutation already happened; inspect/list before retrying. See [Manage automations from chat](../../README.md#manage-automations-from-chat) for inputs, authorization, and safety details.

## Update

Before installing `@compn3rd/pi-web-automations@0.1.2`, ensure the selected machine and gateway have compatible PI WEB and Pi 1.x installations. Older Automations releases' Pi 0.87 baseline is not the target of this release.

When upgrading PI WEB/Pi, update them together. Restart the updated web/API process and wait for readiness before restarting the session daemon; leave the daemon untouched if web startup fails. A daemon restart interrupts active sessions and terminals, so inspect active work and arrange the operation outside sessions that must survive.

Install the package through the target machine's **Settings → Pi packages**, keep the companion extension trusted/enabled, and enable the `automations` plugin. Once safe, restart the target session daemon, then reload the browser. Updating package files or reloading the web page alone does not activate server changes. For release preparation before npm publication, install a verified built checkout as a local Pi package instead.

No database migration, state copy, automatic service restart, exclusive session ownership, or force-stop cancellation is added. Existing schedules and retained history remain in the host-supplied plugin data directory. See the [migration report](../migration.md) for storage and unknown-run handling.

## Validation and release gate

Local Windows / Node 24.20.0 verification against PI WEB `1.202610.3` and Pi `1.2.0` passed `npm run verify`: typecheck, lint, all 125 tests, clean build, distribution validation, tarball allowlist validation, and a managed-style production-only tarball install without host peers. Verification was repeated after a clean lockfile install with lifecycle scripts disabled. `npm audit --omit=dev` reported no known runtime vulnerabilities.

The same local verification also passed with Pi `1.0.0`, the declared minimum peer, without changing release metadata or the lockfile. CI covers Windows and Linux on Node 22.19.0 and 24, and verifies both the locked Pi baseline and the minimum Pi peer. Consult the release commit's CI results before publishing; local verification is not evidence that the full CI matrix has completed.

Before publication, perform an operator-controlled hosted smoke test with the current host pair: create a disabled draft, run/test it, inspect its visible session and partial usage, enable/pause it, exercise run cancellation, and verify chat list/inspect/save/actions. Include interference or connection-loss handling and confirm that delayed cancellation does not abort later user work. Remote federation and the user's paid-provider/extension profile remain unverified by the compatibility tests. No live-host deployment, daemon restart, or npm publication is performed by release preparation.
