UNPKG

@code-yeongyu/senpi

Version:

Coding agent CLI with read, bash, edit, write tools and session management

17 lines • 939 B
import Type from "typebox"; import { Check } from "typebox/value"; /** S14/RULING-84: one wire schema shared by producer and client policy; no prompt or current-root action exists. */ export const RecoveryRepairAdviceSchema = Type.Object({ state: Type.Union([Type.Literal("ok"), Type.Literal("repair_needed"), Type.Literal("storage_unavailable")]), healthRevision: Type.Union([Type.String({ pattern: "^(0|[1-9][0-9]*)$" }), Type.Null()]), source: Type.Union([ Type.Object({ sessionEpoch: Type.String({ minLength: 1 }), sequence: Type.Integer({ minimum: 0 }) }, { additionalProperties: false }), Type.Null(), ]), hint: Type.Literal("restart_from_catalog"), retryAfterMs: Type.Integer({ minimum: 0, maximum: 2_000 }), }, { additionalProperties: false }); export function isRecoveryRepairAdvice(value) { return Check(RecoveryRepairAdviceSchema, value); } //# sourceMappingURL=recovery-repair.js.map