PromptSpec class final
Everything lang-core's generatePrompt reads.
Constructors
-
PromptSpec({required String root, required Map<
String, PromptEntry> components, List<PromptGroup> groups = const [], Map<String, PromptEntry> functions = const {}, Map<String, PromptEntry> actions = const {}, List<String> ? builtinFunctionLines, Map<String, PromptEntry> ? builtinSteps, String? preamble, bool? bindings, bool? toolCalls, bool? builtinFunctions, List<PromptTool> tools = const [], List<String> toolNames = const [], List<String> examples = const [], List<String> toolExamples = const [], List<String> additionalRules = const [], bool editMode = false, bool inlineMode = false, List<BoundRecord> records = const [], Map<String, Object?> state = const {}, Set<String> ? allowedActions}) -
const
Properties
-
actions
→ Map<
String, PromptEntry> -
final
-
additionalRules
→ List<
String> -
final
-
allowedActions
→ Set<
String> ? -
Built-in steps and actions the prompt may name; null allows all.
final
- bindings → bool?
-
final
-
builtinFunctionLines
→ List<
String> ? -
@Count(array: any[]) → number — Returns array length, in order. Null lists the built-in functions.final - builtinFunctions → bool?
-
final
-
builtinSteps
→ Map<
String, PromptEntry> ? -
Built-in steps in prompt order (Run, ToAssistant, OpenUrl, Set, Reset).
Null lists the built-in steps.
final
-
components
→ Map<
String, PromptEntry> -
final
- editMode → bool
-
final
-
examples
→ List<
String> -
final
-
functions
→ Map<
String, PromptEntry> -
final
-
groups
→ List<
PromptGroup> -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- inlineMode → bool
-
final
- preamble → String?
-
final
-
records
→ List<
BoundRecord> -
Host-bound read-only
$variables, listed in a "Bound Data" section.final - root → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
state
→ Map<
String, Object?> -
Seeded
$variableswith their values, listed in a "Current State" section. Other keys are ignored.final - toolCalls → bool?
-
final
-
toolExamples
→ List<
String> -
final
-
toolNames
→ List<
String> -
Tools listed by name only, without a signature.
final
-
tools
→ List<
PromptTool> -
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited