@hadialmarzooq/agent-media-core
v0.3.1
Published
Versioned media planning and structured verification primitives for software agents.
Maintainers
Readme
@hadialmarzooq/agent-media-core
Versioned media planning and structured verification primitives for software agents.
What it does
Core package for Agent Media — a deterministic media transformation runtime. This package provides:
- Media IR v1 — a versioned, serializable, validated semantic plan schema
- planMedia() — turns semantic goals into inspectable, portable plans with reasons
- verifyMedia() — structured verification of output metadata against plan expectations
- serializePlan() / parsePlan() — portable JSON serialization with full validation at every boundary
- MediaError — stable, machine-readable error codes with context and recovery suggestions
- inspectPlanIssues() / repairPlan() — detect and mechanically repair stale plans, reporting every change
- buildReceipt() / parseReceipt() — durable, versioned records of an execution and its verification
- Media IR JSON Schema — generated from the Zod models, also shipped as the
./schema.jsonexport
Install
npm install @hadialmarzooq/agent-media-coreQuick start
import { planMedia, serializePlan, verifyMedia } from '@hadialmarzooq/agent-media-core';
const plan = planMedia({
source: metadata,
goals: { aspectRatio: '9:16', compatibility: 'high', maxSizeMB: 25 },
});
const serialized = serializePlan(plan); // portable JSON — save it, send it, replay it
const report = verifyMedia(outputMetadata, plan.expectations);
// { passed: true, checks: { ... }, failures: [] }The contract
inspect → plan → versioned Media IR → execute → inspect again → verifyPlans are inspectable before execution, serializable across process boundaries, and outputs are verified against fresh metadata — not just "FFmpeg exited 0."
Documentation
License
MIT
