Artifact class

What a job hands back.

The real asks are commands that produce artifacts — "screenshot this entry", "run this suite", "give me the widget tree". So an artifact is the return type of doing work, not a side effect of it: the CLI prints path, MCP returns an image block, the GUI shows a thumbnail. One object, three renderings.

address is required. An artifact that cannot say what it is of is not reproducible, and a screenshot without its resolved axes is exactly the under-specification the entry model warned about.

Implemented types

Constructors

Artifact({required String kind, required Address address, String? path, String? text, Map<String, Object?> meta = const {}})

Properties

address → Address
What this is an artifact of, axes included.
final
hashCode → int
The hash code for this object.
no setterinherited
kind → String
A MIME type where one fits — see the constants above.
final
meta → Map<String, Object?>
Anything the producer wants the reader to know: timings, compile stats, exit codes. Never load-bearing — a reader that ignores it still works.
final
path → String?
Where it was written, when it was written. Relative to the worktree root so the value survives being read on another machine.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
text → String?
The content itself, for artifacts small enough that making the reader open a file is worse than carrying it.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, Object?>
The wire form. Keys here are what every surface shows and what an agent parses, so they are part of the action's contract.
override
toString() → String
A string representation of this object.
override

Operators

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

Static Methods

fromJson(Map<String, Object?> json) → Artifact

Constants

json → const String
mp4 → const String
plainText → const String
png → const String
widgetTree → const String