crates/sdk-macros/MACRO_STATUS.md
Date: October 11, 2025 Status: Field Attributes Supported
#[model] Macro - Enhanced!Handles all field attributes:
#[derive(Serialize, Deserialize, Clone)]
#[model(version = "1.0.0")]
struct Photo {
id: Uuid,
// These attributes are recognized and stripped
#[entry(filter = "*.jpg")]
file: Entry,
#[sidecar(kind = "faces", extension_owned)]
detected_faces: Vec<Face>,
#[metadata]
exif: Option<ExifData>,
#[custom_field]
place_id: Option<Uuid>,
#[user_metadata]
tags: Vec<Tag>,
#[computed]
has_faces: bool,
#[blob_data(compression = "zstd")]
embeddings: Vec<Vec<f32>>,
#[vectorized(strategy = "chunk")]
description: String,
#[sync(shared, conflict = "last_writer_wins")]
name: String,
}
What the macro does:
ExtensionModel trait implid or uuid field automaticallyMODEL_TYPE constantRecognized attributes:
#[entry] - References file/directory#[sidecar] - Extension-owned derivative data#[metadata] - Core-extracted metadata#[custom_field] - Custom field in UserMetadata#[user_metadata] - Tags from core#[computed] - Derived field (not stored)#[blob_data] - Large data in metadata_blobs#[vectorized] - Semantic embedding#[sync] - Sync strategy| Macro | Status | Notes |
|---|---|---|
#[extension] | Working | Generates plugin_init(), job registration |
#[job] | Working | FFI exports (proven in test-extension) |
#[model] | Enhanced | Handles field attributes! |
#[agent] | Pass-through | Needs impl block handling |
#[agent_memory] | Working | Generates AgentMemory trait |
#[task] | Pass-through | Needs implementation |
#[action] | Pass-through | Needs implementation |
#[query] | Pass-through | Needs implementation |
Developers can now write models with full field attributes and they compile!
#[derive(Serialize, Deserialize, Clone)]
#[model(version = "1.0.0")]
#[scope = "content"]
#[sync_strategy = "shared"]
struct PhotoAnalysis {
id: Uuid,
// All these attributes work!
#[sidecar(kind = "faces")]
detected_faces: Vec<Face>,
#[custom_field]
identified_people: Vec<Uuid>,
#[computed]
has_faces: bool,
}
The attributes:
Photos extension needs:
#[job] macro to support asyncProcess field attributes in macro:
Implement agent macro:
#[on_event], #[scheduled]Implement task/action/query macros:
The macro system now supports the design! Field attributes work.