Bootstrap helper for processes that may run in Gist persistence mode.
Peeks at the state file to check if Gist mode is configured. If so and a valid token is provided, pre-sets the singleton via getStateManagerAsync so subsequent synchronous getStateManager calls return the Gist-backed instance. No-op when the state file is absent, unparseable, or not in Gist mode.
Consolidates identical filesystem-peek + getStateManagerAsync logic that
was duplicated between the CLI bootstrap (cli.ts) and MCP tool bootstrap
(mcp-server/src/tools.ts) — #1000.
GitHub token with gist scope, or null to skip activation
Core module exports Re-exports all core functionality for convenient imports