Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
One-time setup that gathers your project's design context and saves it to CLAUDE.md for future sessions.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
scripts/live-status.mjs
1#!/usr/bin/env node2/**3* Print durable recovery status for Impeccable live sessions.4*/56import { createLiveSessionStore } from './live-session-store.mjs';7import { readLiveServerInfo } from './impeccable-paths.mjs';89function readServerInfo() {10return readLiveServerInfo(process.cwd())?.info || null;11}1213async function fetchServerStatus(info) {14if (!info) return null;15try {16const res = await fetch(`http://localhost:${info.port}/status?token=${info.token}`);17if (!res.ok) return null;18return await res.json();19} catch {20return null;21}22}2324export async function statusCli() {25const info = readServerInfo();26const server = await fetchServerStatus(info);27const store = createLiveSessionStore({ cwd: process.cwd() });28const activeSessions = store.listActiveSessions();29const payload = {30liveServer: server ? {31status: server.status,32port: server.port,33connectedClients: server.connectedClients,34pendingEvents: server.pendingEvents,35} : null,36activeSessions: server?.activeSessions || activeSessions,37recoveryHint: server38? 'Run live-poll.mjs to continue pending work, or live-complete.mjs --id <session> after manual cleanup.'39: 'Start live-server.mjs to requeue pending durable events, then run live-poll.mjs.',40};41console.log(JSON.stringify(payload, null, 2));42}4344const _running = process.argv[1];45if (_running?.endsWith('live-status.mjs') || _running?.endsWith('live-status.mjs/')) {46statusCli();47}48