Skip to content

Claude Code Mod API Turn Prompt Types

xsyetopz edited this page Oct 19, 2026 · 1 revision

Mod API: Turn and Prompt Types

These are the types behind $.turn, $.prompt, and their events. They describe prompts, attachments, system prompt sections, and the prompt box. Example: const { text, cursor } = await $.prompt.read(). The types here run from AttributionTextInput to PromptFillResult.refusal.

Types

Mark Item What it is for Shape and limits Source
✅ AttributionTextInput The input of attribution.text: one text the engine asks the model to write into a commit or a pull request, at the moment it is composed. Object. Its fields (kind, text) have rows below. Used by attribution.text, $.attribution.text. d.ts line 757
✅ AttributionTextInput.kind Which text (commit, pr, exemption, remedy), the key a matcher narrows on. Type: AttributionTextKind. d.ts line 757
✅ AttributionTextInput.text As the engine composed it, the settings applied. Type: string. d.ts line 757
✅ AttributionTextKind Which git text attribution.text carries: the commit trailer, the PR footer, the mandate's or the commit gate's sentence naming the exemption. Alias of 'commit' | 'pr' | 'exemption' | 'remedy'. d.ts line 773
✅ AttributionTextResult What an attribution.text hook returns: the text the model reads in that place. Object. Its fields have rows below. Used by attribution.text, $.attribution.text. d.ts line 779
✅ AttributionTextResult.text A field of AttributionTextResult. Type: string. d.ts line 779
✅ DeclaredAttachmentInput One prompt.attachment input of a type PromptAttachmentDetailOf names: the attachment's text, and under detail the facts it was rendered from. Object. Its fields have rows below. A row the engine made holds them, unless its session keeps no plan file. That one, or one edited by hand, carries no detail key: read it as it may be. d.ts line 3721
✅ DeclaredAttachmentInput.type As the engine names the attachment's kind, one of the names that carry a detail, the key a matcher narrows on. Pinned. Type: K. d.ts line 3721
✅ DeclaredAttachmentInput.text What the model reads for this attachment, inside the engine's framing, rewritable with next({ ...e, text }). Type: string. The <system-reminder> wrapper (or the system channel that replaces it) goes around what the chain answers, never inside it. d.ts line 3721
✅ DeclaredAttachmentInput.origin Who authored the text (PromptAttachmentOrigin): the engine, a settings hook, or a plugin's chain context. Type: PromptAttachmentOrigin. Pinned: a different value is refused, one left out is kept. d.ts line 3721
✅ DeclaredAttachmentInput.agentId The loop whose request carries the attachment: a subagent's id, the id $.agent.list() gives it, absent on main. Type: string. Optional. Pinned: a different value is refused, one left out is kept. A loop forked from another carries the rows made for that one. d.ts line 3721
✅ DeclaredAttachmentInput.detail Facts of the row the engine computed as it rendered text, by type: what a hook with words of its own reads in place of the engine's. Type: PromptAttachmentDetailOf[K]. Optional. Pinned: a different value is refused. Absent on a row that does not hold its facts. d.ts line 3721
✅ PlanModeDetail What the engine knew as it made a plan-mode reminder: which of its two wordings the row carries, where the plan is kept, whether one is there. Object. Its fields have rows below. d.ts line 7720
✅ PlanModeDetail.reminder Which wording the row carries: full, the whole workflow, or sparse, the one line that restates it between two full ones. Type: 'full' | 'sparse'. A row made for a subagent reads the same under either. d.ts line 7720
✅ PlanModeDetail.planFilePath Where the plan is kept, as the text names it: the file the model writes its plan to, of the loop the row was made for. Type: string. d.ts line 7720
✅ PlanModeDetail.hasPlan True when the engine found that file as it made the row. Type: boolean. d.ts line 7720
✅ PlanModeExitDetail What the engine knew as it made the note that plan mode has ended: where the plan is kept, whether one is there. Object. Its fields have rows below. d.ts line 7743
✅ PlanModeExitDetail.planFilePath Where the plan is kept, the text names it only when hasPlan. Type: string. d.ts line 7743
✅ PlanModeExitDetail.hasPlan True when the engine found that file as it made the row. Type: boolean. d.ts line 7743
✅ PlanModeReentryDetail What the engine knew as it made the note that plan mode is entered again: where the plan of the earlier planning is kept. Object. Its fields have rows below. d.ts line 7758
✅ PlanModeReentryDetail.planFilePath Where the earlier plan is kept, as the text names it, the note is made only when the engine finds that file. Type: string. d.ts line 7758
✅ PromptAttachmentDetailOf The facts prompt.attachment pins under e.detail, by attachment type: what the engine computed for the row, as it rendered the row's text. Object. Its fields have rows below. Facts that the engine attaches to a row of some types. A type not named has no detail. d.ts line 8296
✅ PromptAttachmentDetailOf.plan_mode The reminder a request carries while plan mode is on: full the first of a planning session and after a compaction, sparse most others. Type: PlanModeDetail. Example: const isSparse = e.detail?.reminder === "sparse". d.ts line 8296
✅ PromptAttachmentDetailOf.plan_mode_reentry The note made when plan mode is entered again by the process that left it, the earlier plan still in its file, it precedes the reminder. Type: PlanModeReentryDetail. Example: const planFilePath = e.detail?.planFilePath. d.ts line 8296
✅ PromptAttachmentDetailOf.plan_mode_exit The note made once when plan mode has ended: the model may act again, and is told where its plan is when there is one. Type: PlanModeExitDetail. Example: const hasPlan = e.detail?.hasPlan === true. d.ts line 8296
✅ PromptAttachmentInput The input of prompt.attachment: one message the engine injects into the conversation for the model on its own, as a request is about to carry it. Object. Its fields have rows below. A union on type. Only an attachment that carries text for the model is raised. Used by prompt.attachment, $.prompt.attachment. d.ts line 8331
✅ PromptAttachmentInput.[K in keyof PromptAttachmentDetailOf] A field of PromptAttachmentInput. Type: DeclaredAttachmentInput<K>. d.ts line 8331
✅ PromptAttachmentOrigin Who authored the text an injected attachment carries, as the engine knows it from the attachment itself, a closed set, pinned on the event. Object. Its fields have rows below. e.origin.kind tells the engine's own text from a settings hook's output or another plugin's context. No hook sets it. d.ts line 8343
✅ PromptAttachmentOrigin.kind The engine's own prose or framing: a reminder, a mode transition, a listing, a notice, an announced context block. Type: 'engine'. A file the person mentioned, as the engine presents it, and a prompt or notification delivered into a running turn are the engine's too. d.ts line 8343
✅ PromptAttachmentOrigin.kind A settings hook's output the engine injects for the model: its additional context, a blocking error's note, a stopped continuation. Type: 'hook'. d.ts line 8343
✅ PromptAttachmentOrigin.event The settings hook event that produced it (SessionStart, UserPromptSubmit, PostToolUse, ...). Type: string. d.ts line 8343
✅ PromptAttachmentOrigin.kind Text a plugin's hook attached through a chain's context, as the model reads it. Type: 'plugin'. The chains that carry one: prompt.submit, prompt.mention, tool.call. d.ts line 8343
✅ PromptAttachmentOrigin.event The chain's event that attached it. Type: string. d.ts line 8343
✅ PromptAttachmentResult What a prompt.attachment hook returns: the text the model reads for that attachment, or null to leave the attachment out of the request. Object. Its fields have rows below. Used by prompt.attachment, $.prompt.attachment. d.ts line 8382
✅ PromptAttachmentResult.text A field of PromptAttachmentResult. Type: string | null. d.ts line 8382
✅ PromptAutocompleteInput The input of prompt.autocomplete: the prompt box as the person left it and the token at its cursor, which a taken suggestion replaces. Object. Its fields have rows below. All four are pinned, facts of the box: a rewrite that changes one is refused, one left out is kept. Offsets count UTF-16 code units. Used by prompt.autocomplete. d.ts line 8393
✅ PromptAutocompleteInput.text The whole draft in the prompt box. Type: string. d.ts line 8393
✅ PromptAutocompleteInput.cursor Where the person's caret stands in text, 0 to text.length. Type: number. d.ts line 8393
✅ PromptAutocompleteInput.token The run of characters that are not whitespace and that ends at the cursor: text.slice(start, cursor), never empty. Type: string. What a matcher names to answer one lead character only. Example: on("prompt.autocomplete", { token: /^#/ }, hook). d.ts line 8393
✅ PromptAutocompleteInput.start Where token begins in text. Type: number. d.ts line 8393
✅ PromptAutocompleteResult What a prompt.autocomplete hook returns and what next(e) resolves to: the rows the plugins add to the typeahead for the token. Object. Its fields have rows below. Used by prompt.autocomplete. d.ts line 8422
✅ PromptAutocompleteResult.suggestions The rows, in the order drawn beneath the engine's own, from core, none. Type: readonly PromptAutocompleteSuggestion[]. A hook puts its rows before or after what next(e) gave. The engine's own rows are not on this event. d.ts line 8422
✅ PromptAutocompleteSuggestion One row a prompt.autocomplete hook adds to the prompt box's typeahead: what taking it writes, what the row shows, and a dim line beside it. Object. Its fields have rows below. d.ts line 8439
✅ PromptAutocompleteSuggestion.text What taking the row writes in place of the token, the cursor after it, never empty. The box's new token is then asked again. Type: string. d.ts line 8439
✅ PromptAutocompleteSuggestion.label What the row shows, on one line, the text when absent. Type: string. Optional. d.ts line 8439
✅ PromptAutocompleteSuggestion.description The dim line drawn beside the label, cut to the row by the surface. Type: string. Optional. d.ts line 8439
✅ PromptBox The person's prompt box as it stands: the draft and where the cursor is in it, what $.prompt.read() resolves and $.prompt.fill hands back. Object. Its fields have rows below. No selection: the terminal's box has none of its own, and a surface that binds one adds it here. Used by $.prompt.read, prompt.read. d.ts line 8462
✅ PromptBox.text The draft as typed so far, '' where the session draws no box. Type: string. d.ts line 8462
✅ PromptBox.cursor Where the next typed character lands: an offset into text in UTF-16 code units, 0 at the start, text.length at the end. Type: number. d.ts line 8462
✅ PromptChangeInput The input of prompt.change (prompt-change/): the prompt box after a change of its text that no prompt.edit carried, and who made it. Object. Its fields have rows below. The change is already in the box. Every field is the engine's: a hook observes, and next(e) passes them on as received. Used by prompt.change. d.ts line 8481
✅ PromptChangeInput.text The draft as it stands when the event is raised, what $.prompt.read() answers then. Type: string. d.ts line 8481
✅ PromptChangeInput.cursor Where the caret stands in text then, 0 to text.length. Type: number. d.ts line 8481
✅ PromptChangeInput.origin Who changed the box (PromptChangeOrigin), set by the engine: the act that left the box as it stands. Type: PromptChangeOrigin. Example: ($, e, next) => next(e)). d.ts line 8481
✅ PromptChangeOrigin Who changed the prompt box at prompt.change, as the engine stamps it where the text is written, a matcher narrows on its kind. Object. Its fields have rows below. The set of kinds may grow: treat a kind you do not know as engine. next(e) passes it on as received, no hook sets one. d.ts line 8508
✅ PromptChangeOrigin.kind A recalled entry of the prompt history was put in the box: the up and down arrows, the history search, the history picker. Type: 'history'. Stepping back out of a recall is history too: the newest entry passed, the search cancelled, the person's own draft put back. d.ts line 8508
✅ PromptChangeOrigin.kind The box was emptied by something other than an edit or an undo: a submit took the draft, a clear, a stash. Type: 'clear'. text is the box when raised: a key typed since is in it. d.ts line 8508
✅ PromptChangeOrigin.kind The person took an edit back (chat:undo): the box holds an earlier text of theirs, which may be empty. Type: 'undo'. d.ts line 8508
✅ PromptChangeOrigin.kind A plugin's $.prompt.fill landed, as its prompt.fill chain left it and as the engine finished it (an over-long text collapsed). Type: 'plugin'. d.ts line 8508
✅ PromptChangeOrigin.name The filling plugin's name, a hook that fills tells its own fill by it. Type: string. d.ts line 8508
✅ PromptChangeOrigin.kind A remote surface's own Composer changed by the app's hand, reserved, nothing raises it as shipped. Type: 'app'. d.ts line 8508
✅ PromptChangeOrigin.kind Every other write: a draft put back, an accepted completion, dictation, a prefill, and an edit prompt.edit does not carry. Type: 'engine'. d.ts line 8508
✅ PromptChangeResult What a prompt.change hook returns and what next(e) resolves to: { text }, echoed by core, a hook's own value changes nothing. Object. Its fields have rows below. Used by prompt.change. d.ts line 8559
✅ PromptChangeResult.text A field of PromptChangeResult. Type: string. d.ts line 8559
✅ PromptComposeArgs What a plugin passes $.prompt.compose: the facts it wants composed for, each one it leaves out read off the session (its model, its tools). Alias of Partial<PromptComposeInput>. Used by $.prompt.compose. d.ts line 8567
✅ PromptComposeInput The input of prompt.compose: the facts a system prompt is composed from, each already resolved by the engine, at the moment it renders one. Object. Its fields have rows below. Used by prompt.compose. d.ts line 8573
✅ PromptComposeInput.model The id of the model the request is for, pinned, the field a matcher narrows on. Type: string. d.ts line 8573
✅ PromptComposeInput.promptModel The model whose prompt is rendered: model, unless the engine renders another model's prompt for it (a model it holds no prompt of its own for). Type: string. d.ts line 8573
✅ PromptComposeInput.surfaces Where the session draws at this render, as $.session.surfaces() answers: terminal first under the REPL, empty where nothing draws. Type: readonly RenderSurface[]. d.ts line 8573
✅ PromptComposeInput.tools The names of the tools the request offers the model, the engine's own composition reads them against the session's, an unknown name ignored. Type: readonly string[]. d.ts line 8573
✅ PromptComposeInput.outputStyle What the person chose in place of the default way of answering, and whether it keeps the coding instructions, null for the default style. Type: object. d.ts line 8573
✅ PromptComposeInput.traits A field of PromptComposeInput. Type: readonly PromptComposeTrait[]. d.ts line 8573
✅ PromptComposeResult What a prompt.compose hook returns: the sections of the system prompt, in order, every shared one ahead of every session one. Object. Its fields have rows below. A section left out is not sent. The engine places the cache boundary itself. Used by prompt.compose, $.prompt.compose. d.ts line 8613
✅ PromptComposeResult.sections A field of PromptComposeResult. Type: readonly PromptComposeSection[]. d.ts line 8613
✅ PromptComposeScope Which side of the prompt cache's boundary a section of the system prompt sits on: shared before it, session after it. Alias of 'shared' | 'session'. shared text is the same for everyone on this build and model, so the API may cache it. session text varies. d.ts line 8625
✅ PromptComposeSection One section of the system prompt as prompt.compose answers it: a stable id, the text the model reads, and the side of the cache boundary it is on. Object. Its fields have rows below. Example: const POLICY = { id: "acme:policy", text: "...", scope: "session" } as const. d.ts line 8634
✅ PromptComposeSection.id What a hook above finds the section by, to replace, move or drop it, never empty, and unique in one list. Type: string. A plugin's own id is <plugin>:<name>. A bare name is the engine's. The full prompt opens with intro, system, doing_tasks, actions, tools, and tone. d.ts line 8634
✅ PromptComposeSection.text The section's text, sent as written, sections on one side of the boundary are joined by a blank line, in the list's order. Type: string. d.ts line 8634
✅ PromptComposeSection.scope The side of the cache boundary the section is sent on, in one list every shared section comes before every session one. Type: PromptComposeScope. A section added at the end of what next(e) answered is session. d.ts line 8634
✅ PromptComposeTrait One branch the engine's own composition of the system prompt takes on the request or the session before it computes any section: a closed set. Alias of 'bare' | 'lean' | 'sdk-preset' | 'teammate' | 'analysis' | 'print' | 'skills' | 'send-user-message'. Each trait tells a hook how the prompt is composed. bare is the one-line prompt of --bare. d.ts line 8685
✅ PromptContextBlock One block of the context the first user message carries: a name the engine keys it by and the text under it. Object. Its fields have rows below. d.ts line 8691
✅ PromptContextBlock.name The key the block renders under (# name): claudeMd, userEmail, attachedProject, currentDate, or a plugin's own. Type: string. The field a matcher narrows on, unique among one context's blocks. d.ts line 8691
✅ PromptContextBlock.text The block's text, claudeMd's is the instruction files framed as the engine frames them, empty when it announces none. Type: string. d.ts line 8691
✅ PromptContextBlocks The context blocks of a conversation's first user message, in the order the engine renders them: what prompt.context takes and answers alike. Object. Its fields have rows below. d.ts line 8710
✅ PromptContextBlocks.blocks From core: claudeMd (when instruction files are loaded), userEmail, attachedProject, currentDate, each only when present. Type: readonly PromptContextBlock[]. d.ts line 8710
✅ PromptContextInput The input of prompt.context: the context blocks the engine prepends to a conversation's first user message, and the files behind claudeMd. Object. Its fields have rows below. Used by prompt.context, $.prompt.context. d.ts line 8722
✅ PromptContextInput.blocks From core: claudeMd (when instruction files are loaded), userEmail, attachedProject, currentDate, each only when present. Type: readonly PromptContextBlock[]. d.ts line 8722
✅ PromptContextInput.instructionFiles The files behind claudeMd, in the order it renders them, @ imports included, empty when it renders none. Type: readonly InstructionFile[]. Optional. Undefined when a hook above rewrote the claudeMd text: the files behind that text are then unknown, and a hook adds none of its own. d.ts line 8722
✅ PromptContextResult What a prompt.context hook returns: the blocks the conversation carries, in order, one left out is not sent. Object. Its fields have rows below. Names such as userEmail are sent again when the text differs, and the engine sends its own gitStatus and currentDate. Used by prompt.context, $.prompt.context. d.ts line 8749
✅ PromptContextResult.blocks What the conversation carries, in order. Type: readonly PromptContextBlock[]. A block whose name the engine does not route reaches the model once, when the conversation holds none. d.ts line 8749
✅ PromptContextResult.instructionFiles The files now behind claudeMd, left out, the ones from below stand. Type: readonly InstructionFile[]. Optional. Kept in step with the claudeMd text. A hook may add, drop, or rewrite any kind. d.ts line 8749
✅ PromptDecoration One styled run a surface paints over the prompt draft: [start, end) of a text, in UTF-16 code units like PromptBox cursor. Paint only. Object. Its fields have rows below. A range outside the text is clamped into it. An empty range with no virtualText is dropped. Later entries win for each style key. d.ts line 8781
✅ PromptDecoration.start The first code unit painted: an integer offset into the text the list travels beside, clamped into it. Type: number. d.ts line 8781
✅ PromptDecoration.end The code unit past the last one painted, a run with end <= start, once clamped, paints nothing. Type: number. d.ts line 8781
✅ PromptDecoration.bold Drawn in bold, a decoration takes no weight. Type: boolean. Optional. d.ts line 8781
✅ PromptDecoration.virtualText A text drawn before the character at start, in this entry's own style keys: never in the draft, counted by no offset, never holding the cursor. Type: string. Optional. Typed text at start lands before it. A tab draws as four spaces. It is not drawn in the empty box or on a remote host. d.ts line 8781
✅ PromptEditInput The input of prompt.edit (prompt-edit/): one edit the person makes in the prompt box, as the draft before it and the splice the editor made of it. Object. Its fields have rows below. Used by prompt.edit. d.ts line 8813
✅ PromptEditInput.origin Who edits (PromptEditOrigin): the person at the composer. Pinned: next(e) passes it on as received. Type: PromptEditOrigin. d.ts line 8813
✅ PromptEditInput.key The one key that made the edit, in Client onKey's shape, absent for a paste, a keybinding's newline and a burst of keys folded into one edit. Type: ClientKeyEvent. Optional. Pinned: which key the person pressed is a fact, not the hook's to change. d.ts line 8813
✅ PromptEditInput.text The draft before the edit. next({ ...e, text }) applies the edit to another draft instead. Type: string. d.ts line 8813
✅ PromptEditInput.cursor Where the person's caret stood in text before the edit, 0 to text.length. Type: number. d.ts line 8813
✅ PromptEditInput.start Where in text the edit begins: the start of the span it replaces, or where what was typed goes in, a bare cursor move begins where it lands. Type: number. d.ts line 8813
✅ PromptEditInput.end Where the replaced span of text ends: start for an insertion or a move, past it for a deletion (Backspace, a kill). Type: number. d.ts line 8813
✅ PromptEditInput.inputText What goes in between start and end: the typed or pasted text, '' for a deletion or a move. Type: string. next({ ...e, inputText }) puts in another, the cursor lands after it. d.ts line 8813
✅ PromptEditOrigin Who edits the prompt box at prompt.edit, as the engine stamps it where the edit starts, a closed set a matcher narrows on. Object. Its fields have rows below. next(e) passes it on as received, no hook sets one. d.ts line 8861
✅ PromptEditOrigin.kind The person, typing or pasting into the main prompt box. Type: 'composer'. d.ts line 8861
✅ PromptEditResult What a prompt.edit hook returns and what next(e) resolves to: the box after the edit (PromptBox), which the editor then shows. Object. Its fields have rows below. From core: e.text with the splice applied. Rewrite it to change what lands. Answer { text: e.text, cursor: e.cursor } without next to consume the key. d.ts line 8876
✅ PromptEditResult.decorations Runs to paint over this answer's own text (PromptDecoration), none when absent. Type: PromptDecoration[]. Optional. Kept on the same characters while the next edit's answer is pending. Then replaced by that answer's list. d.ts line 8876
✅ PromptFillArgs prompt.fill's input as a plugin's $.prompt.fill(args) takes it: no origin (the engine sets the calling plugin's), mode optional. Object. Its fields have rows below. Used by $.prompt.fill. d.ts line 8894
✅ PromptFillArgs.text What the box is to take (PromptFillInput text). Type: string. d.ts line 8894
✅ PromptFillArgs.mode Where it goes (PromptFillMode), replace when left out. Type: PromptFillMode. Optional. d.ts line 8894
✅ PromptFillArgs.decorations Runs to paint over text (PromptDecoration), offsets into text as given, the engine moves them to where it lands. None when absent. Type: PromptDecoration[]. Optional. Replaced by the next prompt.edit answer. Gone at the draft's next change. d.ts line 8894
✅ PromptFilled What $.prompt.fill resolves to: whether the box took the text, and the box afterwards (PromptBox) as the caller's own $.prompt.read() reads it. Object. Its fields have rows below. The box goes to a plugin whose module calls $.prompt.read. A plugin that never does gets the empty box. Used by $.prompt.fill. d.ts line 8923
✅ PromptFilled.isFilled True once the box holds the text, false where no box could take it or a hook kept it out (PromptFillResult). Type: boolean. d.ts line 8923
✅ PromptFilled.refusal Why the engine refused the text: no_composer (no box) or dialog (a dialog holds the keys). A hook's refusal carries no cause. Type: 'no_composer' | 'dialog'. Optional. d.ts line 8923
✅ PromptFilled.text The draft after the fill, unchanged when isFilled is false, '' where no box is drawn or the caller may not read it (see above). Type: string. d.ts line 8923
✅ PromptFilled.cursor Where the person types next: an offset into text, past the fill's text for insert, at the end for replace and append. Type: number. d.ts line 8923
✅ PromptFillInput The input of prompt.fill (prompt-fill/): a text about to be put in the prompt box as the person's draft, over it, after it, or at the cursor. Object. Its fields have rows below. Used by prompt.fill. d.ts line 8953
✅ PromptFillInput.text What the box takes, the person edits it or presses Enter. next({ ...e, text }) writes another. Type: string. The box takes it without the code points a terminal draws as nothing, as the composer removes them when a person sends, all else lands as written. d.ts line 8953
✅ PromptFillInput.mode Where the text goes (PromptFillMode): over the draft, after it, or in at the cursor. next({ ...e, mode }) moves it, left out of a rewrite, kept. Type: PromptFillMode. d.ts line 8953
✅ PromptFillInput.origin Who writes (PromptFillOrigin), set by the engine where the write starts. Pinned: next(e) passes it on as received. Type: PromptFillOrigin. d.ts line 8953
✅ PromptFillInput.decorations Runs to paint over text once it lands (PromptDecoration), offsets into text, absent when the call named none. Type: PromptDecoration[]. Optional. What the chain passes down is what paints: a hook strips them so. Example: next({ ...e, decorations: [] })). d.ts line 8953
✅ PromptFillMode Where a prompt.fill puts its text: over the whole draft, after it, or into it at the cursor. Alias of 'replace' | 'append' | 'insert'. replace empties the box first. append adds after the draft. insert splices the text in at the cursor. d.ts line 8993
✅ PromptFillOrigin Who writes the prompt box at prompt.fill, as the engine stamps it where the write starts, a closed set a matcher narrows on. Object. Its fields have rows below. next(e) passes it on as received, no hook sets one. d.ts line 9001
✅ PromptFillOrigin.kind The engine writing the box on its own account, reserved for its own sites, none of which raises prompt.fill as shipped. Type: 'engine'. d.ts line 9001
✅ PromptFillOrigin.kind A plugin's $.prompt.fill. Type: 'plugin'. d.ts line 9001
✅ PromptFillOrigin.name The filling plugin's name. Type: string. d.ts line 9001
✅ PromptFillResult What a prompt.fill hook returns and what next(e) resolves to: whether the text went into the prompt box. Object. Its fields have rows below. Used by prompt.fill, $.prompt.fill. d.ts line 9022
✅ PromptFillResult.isFilled True once the box holds the text, false where no box can take it (a dialog holds the keys, a headless session has none). Type: boolean. A hook answering { isFilled: false } without next keeps the text out. d.ts line 9022
✅ PromptFillResult.refusal Why the engine refused the text: no_composer (no prompt box) or dialog (a dialog holds the keys). A hook's own refusal carries none. Treat an absent cause as unknown. Type: 'no_composer' | 'dialog'. Optional. d.ts line 9022

See Also

Clone this wiki locally