import { type DynamicResolveContext, type DynamicSentinel } from "#dynamic/definition.js"; import type { ExactDefinition } from "#public/definitions/exact.js"; import { type PublicInstructionsDefinition } from "#shared/instructions-definition.js"; export type InstructionsDefinition = Readonly; /** * Defines instructions in TypeScript from a `{ content, role? }` * definition. Omitted `role` defaults to `"system"`. * * Use it to return instructions from a `defineDynamic` resolver in * `agent/instructions/`. For a fixed prompt with no resolver, * author `instructions.md` instead. The result is branded so the dynamic * instruction lifecycle can validate that a resolver return came through * this helper. */ export declare function defineInstructions(definition: ExactDefinition): TInstructions; export type DynamicInstructionsResult = InstructionsDefinition | null; export type DynamicInstructionsEvents = { readonly [K in "session.started" | "turn.started"]?: (event: unknown, ctx: DynamicResolveContext) => DynamicInstructionsResult | Promise; }; /** * Defines a runtime instructions resolver for session and turn boundaries. */ export declare function defineDynamic(definition: { readonly events: ExactDefinition; }): DynamicSentinel;