Skip to main content

Type Alias: HookEntry

HookEntry = { command: string; id: string; type: "run"; } | { id: string; text: string; type: "instruction"; } | { config: Record<string, unknown>; externalType: string; id: string; type: "external"; }

Defined in: packages/core/src/domain/value-objects/workflow-step.ts:8

A single hook entry within a workflow step's pre or post array.

run: hooks execute a shell command deterministically. instruction: hooks inject text into the compiled agent instruction block. external: hooks dispatch opaque config to a registered external runner.

Union Members

Type Literal

{ command: string; id: string; type: "run"; }

command

readonly command: string

The shell command to execute. May contain template variables: {{change.name}}, {{change.workspace}}, {{change.path}}, {{project.root}}.

id

readonly id: string

Unique identifier for this hook entry within its array.

type

readonly type: "run"

Discriminant: this is a shell execution hook.


Type Literal

{ id: string; text: string; type: "instruction"; }

id

readonly id: string

Unique identifier for this hook entry within its array.

text

readonly text: string

The instruction text to inject into the compiled context block.

type

readonly type: "instruction"

Discriminant: this is an agent instruction injection hook.


Type Literal

{ config: Record<string, unknown>; externalType: string; id: string; type: "external"; }

config

readonly config: Record<string, unknown>

Runner-owned opaque config payload declared in workflow YAML.

externalType

readonly externalType: string

Registered external hook type name used for runtime dispatch.

id

readonly id: string

Unique identifier for this hook entry within its array.

type

readonly type: "external"

Discriminant: this is an explicit external hook.