feat(artifacts): config-driven custom artifact kinds with schema validation
Users declare artifact kinds in [[artifacts]] (id + schema_path to a JSON-schema file + llm_emitted); ConfigArtifactKind registers them at startup via createWorkflowLoader(extraKinds). New JsonSchemaValidator validates any non-built-in kind generically against its declared deriveJsonSchema(), so an LLM-emitted custom kind is checked against its shape, never trusted. Removed the dead payloadSerializer from the ArtifactKind contract. Schema source is path-to-file (not inline TOML — the hand-rolled parser can't nest).
This commit is contained in:
@@ -87,3 +87,13 @@ backend = "in_memory" # or "turbovec"
|
||||
# script_path = "~/.config/correx/python/turbovec_sidecar.py"
|
||||
# dim = 1536
|
||||
# bit_width = 4
|
||||
|
||||
# Custom artifact kinds. Each entry points to a JSON file holding the kind's JSON
|
||||
# schema (object type, typed properties, required, additionalProperties). Workflows
|
||||
# may then declare `produces` slots of this kind; LLM-emitted kinds are validated
|
||||
# against the declared schema. schema_path is absolute, ~-relative, or relative to
|
||||
# this config file's directory.
|
||||
# [[artifacts]]
|
||||
# id = "review_report"
|
||||
# schema_path = "schemas/review_report.json"
|
||||
# llm_emitted = true
|
||||
|
||||
Reference in New Issue
Block a user