/** * Base envelope fields shared by every Claude Code hook event. * * `envelopeFields` is the reusable field record each event spreads into * its own input schema. `HookEnvelope` is the named `Schema.Class` that * decodes the base shape alone (useful for tooling and tests that only * care about the envelope). * * @since 0.1.0 */ import * as Schema from 'effect/Schema'; /** * The field record for the hook envelope, reusable via spread: * * ```ts * class PreToolUseInput extends Schema.Class('PreToolUseInput')({ * ...envelopeFields, * hook_event_name: Schema.Literal('PreToolUse'), * tool_name: Schema.String, * tool_input: Schema.Record(Schema.String, Schema.Unknown) * }) {} * ``` * * `permission_mode` is `optionalKey` because a number of events omit it * entirely (SessionStart, SessionEnd, PreCompact, CwdChanged, FileChanged, * InstructionsLoaded, etc.). * * `hook_event_name` is `Schema.String` here; individual event schemas * re-declare it as `Schema.Literal(...)` by spreading and overriding. * * @category Schemas * @since 0.1.0 */ export declare const EffortLevel: Schema.Literals; declare const HookEffort_base: Schema.Class; }>, {}>; export declare class HookEffort extends HookEffort_base { } export declare const envelopeFields: { readonly session_id: Schema.String; readonly transcript_path: Schema.String; readonly cwd: Schema.String; readonly hook_event_name: Schema.String; readonly permission_mode: Schema.optionalKey; readonly effort: Schema.optionalKey; readonly agent_id: Schema.optionalKey; readonly agent_type: Schema.optionalKey; }; declare const HookEnvelope_base: Schema.Class; readonly effort: Schema.optionalKey; readonly agent_id: Schema.optionalKey; readonly agent_type: Schema.optionalKey; }>, {}>; /** * The base envelope as a named, decodable class. Every hook event input * is a superset of these fields. * * @category Schemas * @since 0.1.0 */ export declare class HookEnvelope extends HookEnvelope_base { } export {}; //# sourceMappingURL=Envelope.d.ts.map