HanzoHIPs
Back to HIPs
HIP-1406DraftStandards TrackCore

Hanzo Creative — Shared Standard Library

Hanzo AI
Created: 2026-11-28
Requires: HIP-0119

HIP-1406: Hanzo Creative — Shared Standard Library

Abstract

The portable creative library owns common project, asset, command, adapter and conformance contracts. It is not an editor, catalog, graph scheduler or storage service. The designated public implementation repository is hanzoai/creative (planned; establish or reconcile it before implementation). This is the normative implementation target, not a claim of shipping.

Motivation

A typed operation should have identical semantics from an agent, editor, SDK, CLI or graph. Reusing a single contract avoids parallel project formats and tool implementations.

Specification

The key words MUST, MUST NOT, SHOULD, SHOULD NOT and MAY are to be interpreted as in RFC 2119.

Resources and media

Use the existing schema/base resource surface and authenticated principal. Resource names below are proposed schema identifiers, not pre-existing routes. Register the canonical types and expose their served projections through the platform operation registry. Do not invent an alternate CRUD API.

ResourceRequired content
creative_projectID, workspace, title, profile, current revision, manifest
creative_assetImmutable content ID, storage reference, MIME/format, size, source, rights, metadata
creative_documentNative editor snapshot reference and normalized editable structure
creative_timelineStable track/clip IDs, rational timebase, source ranges, effects, audio/caption tracks
creative_compositionLayer graph, property/keyframe data, assets and render settings
creative_templateVersioned parameter schema, project/graph reference, preview and required capabilities
creative_brandVersioned tokens, approved assets, fonts, rules and locale variants
creative_revisionParent revision(s), immutable manifest hash, operation receipt, native state refs
creative_operationActor, typed command, inputs, before/after revision, status and error
creative_reviewExact revision/output hash, reviewer, comments, disposition
creative_publicationDestination, authorized revision, status, external receipt
creative_licenseSource attribution, terms, consent and permitted use

Tenant ownership is resolved from IAM and MUST NOT be trusted from an input field. Personal and business workspaces are separate scopes under the same contract. Every reference MUST be checked against authorized scope. Unknown and foreign IDs MUST have indistinguishable not-found responses.

Original binaries are immutable objects; metadata references them rather than embedding them in database records. Use the canonical Hanzo VFS/S3 disk and journal architecture. The working set, proxy cache and temporary render output are distinct from durable originals and committed exports. Garbage collection MUST preserve referenced assets and active runs; caches MUST be bounded and regenerable. Save atomically, retain recoverable revisions, preserve native format data and unknown extensions. No silent flattening or lossy conversion.

Represent time as integer ticks or rational timestamps with an explicit timebase; never accumulate floating-point frame positions. Represent color space, transfer, alpha representation, sample rate, channel layout, pixel aspect and orientation explicitly. Assets record checksums, source range, provenance and rights. A project pins engine/adapter and schema versions, native snapshots, referenced assets and optional Flow revision. Interchange does not replace native state; unsupported fields MUST be reported and preserved where representable.

Studio owns persistence and the catalog; this library owns their interoperable types and native adapter contracts, not a database.

Commands and adapters

Rust SHOULD own portable performance-critical primitives. TypeScript/Go SDKs and Python bindings project the public contract; WASM and native bindings share semantic tests. Use the existing Hanzo SDK/package conventions and avoid publishing a package name until ownership is checked. A shared creative library MUST provide asset import/probe/search, project/session/revision management, image/layer commands, timeline commands, compositing, audio, color, preview, render, interchange, provenance and policy hooks. Implement adapters over the selected approved upstream engines before consolidating codecs or renderers.

Each command declares stable ID, version, typed input/output, target type, permissions, effects, reversibility, execution modes and resource requirements. Expose discovery plus curated high-level commands to agents; generate lower level schemas from the same registry. The UI, CLI, SDK, MCP and Flow nodes MUST dispatch the same command semantics, not separate simulated operations.

Example command envelope (illustrative wire shape, to be registered):

{
  "project_id": "p_01",
  "target_id": "timeline_01",
  "command": "creative.timeline.clip.trim",
  "version": 1,
  "expected_revision": "rev_42",
  "idempotency_key": "op_01",
  "parameters": {"clip_id": "c_12", "source_in": 24, "source_out": 96, "timebase": {"num": 1, "den": 24}}
}

The dispatcher validates permissions, input, revision, policy and capability; invokes the adapter; verifies the result; atomically commits the revision and receipt. Concurrent edits MUST either merge with proven structured semantics or return a conflict; no last-writer-wins overwrites of native documents. Agent turns support preview, grouped undo and rollback where reversible. Irreversible side effects use separate activities and policy gates. Receipts include actor, operation, revisions, engine/version, asset hashes, run/activity ID when applicable, charges and error details. A retry MUST NOT apply the edit twice.

Tool discovery MUST distinguish headless engine commands, interactive UI commands and unsupported commands; no promise that every UI action is headless. Preview APIs MUST expose frames, regions, contact sheets, audio waveforms and structured edit diffs where supported. Agents MUST inspect rendered results when validating visual edits. Undo history and project recovery are first-class. Interactive editor shells, inspectors, dialogs and settings built over this library MUST conform to HIP-0504 — Unified Cross-Platform Design System (@hanzo/ui, @hanzo/gui, @hanzo/design, unified Hanzo Settings), and agent-generated control panels MUST project through @hanzo/ui/a2ui per HIP-1415 — Generative UI Protocol (A2UI 1.0), dispatching the same typed command registry without blocking real-time render or audio threads.

Each adapter MUST publish its capability matrix, supported native snapshots, interchange loss reports, runtime requirements and version. Use approved permissive upstream implementations, retain legal notices, remove protected branding from derivatives, and audit codecs, patents, fonts, model weights and transitive dependencies. Do not copy code from excluded copyleft editors. Use reproducible pinned builds, fuzz parsers and validate native/WASM/headless parity where applicable. All graph components use the same command registry; Flow owns graph definitions and Tasks owns durable histories and queues.

Conformance

Publish a capability matrix per engine/version/platform: interactive, headless, browser, local and cloud; each entry is supported, partial or unavailable, with test evidence. A feature MUST NOT be declared shipped until a real operation and persisted output are verified. Use reference projects and golden frames, rational timeline fixtures, round-trip loss reports, crash/retry/replay tests and malformed input corpora.

Initial acceptance targets (not measurements): exact frame/sample timing on supported fixtures; 100% expected serialization and supported export validity; zero silent unsupported-data loss; zero cross-tenant reads; zero duplicate committed side effects in retry/failure tests; p95 under 100 ms for lightweight warm commands on declared reference hardware; 30 FPS cached 1080p proxy playback on declared reference hardware; at least 95% successful completion on a versioned scoped agent benchmark. Measure and publish fixture, hardware, engine/model version, command and date. GPU generation and encoding performance have separate budgets. Fail rather than claim unmeasured parity.

Audio-specific DSP, timing and live synchronization are specified in HIP-1413 — Hanzo Audio — Real-Time DSP and Synchronization. No independent model gateway, queue or storage engine.

Security Considerations

Validate all asset and project references against IAM, isolate untrusted media and code, bound CPU/memory/disk/time/network, pin dependencies and model licenses, and reject unsupported or unauthorized operations. No ambient credentials, silent cloud fallback or cross-tenant data leakage.

References

Copyright

Released under CC0 1.0 Universal Public Domain Dedication.