/** * `glen session-start [--agent ]` — called by the agent's SessionStart hook. * * Behavior: * 1. Read stdin (SessionStart event JSON, parsed defensively — tolerate garbage). * Machine-spawned ephemeral sessions (see _utils/ephemeral-session.ts) exit * here with NO output and no side effects. * 2. Spawn a detached `glen doctor --auto` (background maintenance; never blocks). * 3. Read local credentials + session state. * 4. Write ONE JSON object to stdout: * - For claude/codex: `hookSpecificOutput.additionalContext = formatStateLine(state)` * + systemMessage at top level when incognito is ON. * - For `--agent cursor`: flat `{ additional_context }` shape — Cursor's * SessionStart consumes this format; notices (incognito, no-creds, etc.) are * folded into the text rather than a separate systemMessage field. * - no creds → "[glen] not set up on this machine — ask the user whether * to set up glen, then use the setup skill." * - creds, no org → "[glen] no org selected — ask the user whether to set up * glen, then use the setup skill." * 5. Always exit 0 — this hook must never block a session. */ declare const sessionStart: (agent?: string) => Promise; export { sessionStart };