mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-23 21:59:14 +09:00
11 lines
505 B
TypeScript
11 lines
505 B
TypeScript
/** Counters the mod keeps for the session and writes to `.claude-flow/docs-mod/status.json`. */
|
|
export type Stats = { blocked: number }
|
|
|
|
export const newStats = (): Stats => ({ blocked: 0 })
|
|
|
|
export const STATUS_PATH = '.claude-flow/docs-mod/status.json'
|
|
|
|
/** The file's text; `version` lets a reader refuse a shape it does not know. */
|
|
export const statusText = (stats: Stats, guard: boolean, nowMs: number): string =>
|
|
`${JSON.stringify({ version: 1, updatedMs: nowMs, guard, ...stats }, null, 2)}\n`
|