input.ts
This file
Path
apps/cli/src/hook/input.ts
16 lines · 502 bytes · TypeScript
Last changed by
Merge build/comments-cli-protocol-checks into mainoscabrielbefore adoptionc86204f
History of this fileTake it
1234567891011121314151617import { Schema } from "effect";
export const HookInput = Schema.Struct({ cwd: Schema.String, hook_event_name: Schema.String, session_id: Schema.NonEmptyString, stop_hook_active: Schema.optionalKey(Schema.Boolean), tool_input: Schema.optionalKey(Schema.Record(Schema.String, Schema.Unknown)), tool_name: Schema.optionalKey(Schema.String),});
export type HookInput = typeof HookInput.Type;
export const decodeHookInput = Schema.decodeUnknownEffect( Schema.fromJsonString(HookInput));