* feat(materials): material library manifest and id-addressed generation images (#1153 part 2) * fix(materials): library-owned references and failure-path parity (#1153 part 2) * fix(generation): resolve-then-slice vision images and close allocation leaks (#1153 part 2) * fix(generation): bound vision resolution and make library writes leak-safe (#1153 part 2) Bound the resolve-with-refill phase with an aggregate 15s budget raced against every probe plus a 3-consecutive-failure fuse — either stop strips unresolved and unprobed ids from the mapping and proceeds (text-only at worst), never failing the request. Restore the original interleaved text ordering for non-vision runs with a mapping present. Guard the library's failed-entry-write release with an ambiguous-commit re-read: release only when the entry provably does not point at the new id, keep it when the write actually landed, and prefer a recoverable leak over a dangling entry when the re-read fails. Drop the unused package export. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore(generation): bump @openmaic/generation to 0.3.1 (#1153 part 2) The package's inputs changed (partitionImagesForVision, resolvedVisionImages option, non-vision ordering fix); the merge-time gate requires a version bump. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
@openmaic/generation
Pure generation pipeline contracts and packaged prompt assets for MAIC consumers.
AICallFn is the package's model seam: callers provide a function that accepts
system and user prompts and returns model output. The package does not select a
provider, read environment configuration, or own persistence.
Prompt templates and their referenced snippets ship as readable Markdown assets
under templates/ and snippets/. The loader resolves them relative to the
installed package, so it works from both source tests and compiled output.
Scene generation is available as independent content, action, and assembly
primitives. A caller can generate one outline, pass it to generateSceneContent
and generateSceneActions, then assemble the DSL value with
buildCompleteScene. Retrying consumers can supply sceneId to preserve scene
identity across replays.
PBL scenes use the same AICallFn seam for single-call planning. Hosts that
need an agentic fallback may inject pblLoopFallback; provider selection and
fallback execution remain caller-owned. The two planner templates ship under
prompts-pbl/ and resolve relative to the installed package.