Artifact class

A file reference within a revision in the Kumiho system.

Artifacts are the leaf nodes of the Kumiho hierarchy. They point to actual files on local disk, network storage, or cloud URIs. Kumiho tracks the path and metadata but does not upload or modify the files. Instead, the SDK keeps the revision graph, attributes, and default selection in sync with the control plane so downstream tools can resolve the correct asset without pulling in protobuf stubs.

Typical uses include:

  • Referencing published geometry, textures, caches, or documents.
  • Promoting one artifact to the default for a revision so callers can omit the name when resolving a kref.
  • Attaching rich metadata (format, scale, pipeline stages) that can be inspected from automation without needing the raw gRPC response.
final revision = await kumiho.getRevision('kref://project/models/hero.model?r=1');

// Create artifacts
final mesh = await revision.createArtifact('mesh', '/assets/hero.fbx');
final rig = await revision.createArtifact('rig', '/assets/hero_rig.fbx');
final textures = await revision.createArtifact('textures', 'smb://server/tex/hero/');

// Set metadata
await mesh.setMetadata({
  'triangles': '2.5M',
  'format': 'FBX 2020',
  'units': 'centimeters',
});

// Set as default artifact
await mesh.setDefault();
Inheritance

Constructors

Artifact(ArtifactResponse response, dynamic client)
Creates an Artifact from a protobuf response.

Properties

author String
The user ID who created the artifact.
latefinal
client → dynamic
The client instance for making API calls.
finalinherited
createdAt String?
ISO timestamp when the artifact was created.
latefinal
deprecated bool
Whether the artifact is deprecated.
latefinal
hashCode int
The hash code for this object.
no setterinherited
itemKref Kref?
Reference to the parent item.
latefinal
kref Kref
The unique reference URI for this artifact.
latefinal
location String
The file path or URI where the artifact is stored.
latefinal
metadata Map<String, String>
Custom metadata key-value pairs.
latefinal
name String
The name of the artifact (e.g., "mesh", "textures").
latefinal
revision Future
Gets the parent revision of this artifact.
no setter
revisionKref Kref
Reference to the parent revision.
latefinal
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
username String
Display name of the creator.
latefinal

Methods

delete() Future<void>
Deletes this artifact.
getItem() Future
Gets the parent item of this artifact.
getMetadataValue(String key) Future<String?>
Gets a metadata value by key.
getRevision() Future
Gets the parent revision of this artifact.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setDefault() Future<void>
Sets this artifact as the default for its revision.
setMetadata(Map<String, String> metadata) Future<void>
Sets metadata for this artifact.
toString() String
A string representation of this object.
override

Operators

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