Metadata-Version: 2.4
Name: hadoku-crossposter-accounts
Version: 0.1.3
Summary: Browser-profile locking and preflight orchestration for account automation
License-Expression: ISC
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: hadoku-scrape-sdk<0.2,>=0.1.7
Provides-Extra: notice
Requires-Dist: jeepney<1.0,>=0.8; extra == "notice"
Dynamic: license-file

# hadoku-crossposter-accounts

Account access for browser-driven automation: one lock per browser profile, and
a preflight pattern that checks a session is healthy before its real run, puts a
failure in front of a person, and skips the run while the failure stands.

```sh
pip install hadoku-crossposter-accounts            # the lock, registry, runner, gate, store
pip install 'hadoku-crossposter-accounts[notice]'  # plus the desktop notification (D-Bus)
```

The preflight contract (`PreflightResult`, `Preflightable`) and the host-desktop
helpers come from [`hadoku-scrape-sdk`](https://pypi.org/project/hadoku-scrape-sdk/),
so a participant written against the SDK is a participant here. Importing this
package loads no web framework and no browser stack.

- `crossposter_accounts.lock`: `ProfileLock` / `profile_lock`, an `flock` beside
  the profile directory that the kernel releases when its holder dies.
- `crossposter_accounts.preflight`:
  - `PreflightRegistry`: the consumer registers each participant, its gated
    action and its `RecoveryTarget` (a URL or an argv).
    Set `loader="module:callable"` (a zero-argument function returning the
    registry) so a notice's "Fix" and "Re-check now" buttons can act: they
    run in a separate process that rebuilds the registry through it.
    `app_name`, `desktop_entry` and `crash_hint` customise the notice.
  - `runner.run_prechecks`: runs every preflight, records each outcome, and
    escalates failures.
  - `gate.gate_blocks_run`: what a run dispatcher asks before the real run.
  - `PrecheckStore`: the `precheck_state` table, on its own SQLite file or on a
    connection the consumer passes in (`PrecheckStore(conn=...)`).
  - `coverage`: finds classes with a `run_preflight()` that nobody registered.

Python 3.11+, Linux (the lock uses `fcntl`; the notice uses the session D-Bus).
