TPromptable class abstract

Base class for all promptable models in the workspace.

Provides a name, optional metaData (frontmatter), and optional config for controlling serialization and body rendering. Subclasses represent domain concepts (roles, agents, workflows, etc.) that can be serialized to Markdown, YAML, XML, or JSON via the turbo_serializable infrastructure.

Inheritance
  • Object
  • TWriteable
  • TSerializable
  • TPromptable
Implementers
Annotations
  • @JsonSerializable.new(createFactory: false, createToJson: false)

Constructors

TPromptable({required String name, TConfig? config, TMetaData? metaData})
const

Properties

config TConfig?
final
fileName String
no setter
hashCode int
The hash code for this object.
no setterinherited
jsonKey String
no setter
mdFactory → TMdFactory<TWriteable>
Returns a function that builds a Markdown string from a JSON map.
no setteroverride
metaData TMetaData?
final
name String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
xmlBuilder String Function(TWriteable writeable, bool includeMeta)?
Returns a function that builds an XML string from a JSON map.
finalinherited
xmlKey String
no setter
yamlBuilder String Function(TWriteable writeable, bool includeMetaData)?
Returns a function that builds a YAML string from a JSON map.
finalinherited
yamlKey String
no setter

Methods

mdBody() String?
mdFrontMatter() Map<String, dynamic>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts the object to a Firestore-compatible map.
inherited
toMd({TMdFactory<TWriteable>? mdFactory, bool includeMetaData = true}) String
Converts this object to a Markdown string.
inherited
toString() String
A string representation of this object.
inherited
toXml({bool includeMetaData = true}) String
Converts this object to an XML string.
inherited
toYaml({bool includeMetaData = true}) String
Converts this object to a YAML string.
inherited
validate<T>() → TurboResponse<T>?
Validates the object's data before writing to Firestore.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited