Files
Jack Chen deab8804dd feat(core): add runImage and native image model adapters (#610)
* feat(core): add runImage and native image model adapters

Applications that generate or edit images had to call image APIs outside the framework and rebuild the same reliability code each time: retries, fallback across providers, error classification, and a record of every call. runImage() does this once, on an ImageModelAdapter interface that core owns, so no third-party SDK sits between OMA and the provider response it has to classify.

runImage() tries an ordered chain of models, retries retryable failures with jittered backoff that honors Retry-After, moves to the next model on anything else, reads the output format and size from the bytes, runs an optional validate check, and reports every provider call through result.attempts and onAttempt. It resolves with status failed instead of throwing when the chain runs out.

OpenAIImageAdapter (OpenAI Images API and compatible endpoints) and SeedreamImageAdapter (Seedream on Volcengine Ark) call the HTTP APIs with fetch, classify safety rejections as content_policy, fail rather than drop input they cannot use, request base64 output only, and honor egressPolicy. ImageModelError carries the normalized type and retryable flag, and isRetryableError() returns that flag.

Refs #469

* fix(core): keep runImage independent of attempt sinks and caller signals

onAttempt is no longer awaited, so a stalled or rejecting sink cannot hold up retries, cancellation, or the result. A caller that aborts while validate is pending now gets its abort instead of a successful image. Each attempt removes its abort listener from the caller's signal when it ends, so a signal reused across many calls no longer accumulates listeners.
2026-09-23 22:33:38 +08:00

5.9 KiB

Documentation

Every page under docs/, grouped by what you are trying to do. Each line says which question the page answers, so you can pick one without opening five.

Start here

Page What it answers
Core package guide What are the three execution modes, and how do I get a team running?
Examples Which runnable script is closest to what I am building?
Glossary What does OMA mean by coordinator, task, run, span, gate, or budget?
Production checklist Which defaults are deliberately permissive, and what must I decide before going live?

Configure models and tools

Page What it answers
Providers Which providers are built in, what credentials do they need, and how do I point one at a local or OpenAI-compatible endpoint?
LLM egress policy Which network requests can OMA restrict before an adapter opens them, and which are outside that boundary?
Self-hosting and data residency What does the framework run, reach, and persist when it runs on my own infrastructure?
Tool configuration How are built-in, custom, and delegation tools granted, filtered, and gated per call?
Sandbox and shell execution Where can a filesystem tool reach, and where does a granted bash command actually run?
MCP tools What does connectMCPTools() do, and which OMA controls extend into the MCP child process?
Image generation and editing How do I generate or edit an image across a fallback chain of image models, and what does each attempt record?
Structured agent input How do I pass caller-owned conversation history, images, or files instead of a single prompt string?
External agents How do process and ACP backends put coding CLIs on the same task DAG, and what stops applying to them?

Control orchestration

Page What it answers
Coordinator What does the planning agent decide, what does it see, and how do I configure or replace it?
Task scheduling and dispatch In what order do tasks run, how do dependency payloads reach them, and what happens on retry, approval, or abort?
Execution routing Should an automatic runTeam() call use one agent or a coordinator-built team plan?
Model routing How do I send planning and leaf work to different models without changing the team?
Consensus How do judge agents verify an answer, and what does a quorum cost against the budget?
Plan preview and replay How do I freeze a coordinator plan as reviewable data and replay it without planning again?
Adaptive recovery When may a run revise the not-yet-executed part of its own graph?
Durable approval gates How does a run suspend at an approval boundary and resume from the same reviewed content after a restart?
Hooks and callbacks Which function-typed field fires when, in which run mode, and what can its return value change?
Shared memory How do agents read each other's findings, and which store backs that?
Streaming Which APIs return incremental output, what does each StreamEvent carry, and which paths never stream?
Budgets and limits Which ceilings bound a run, where are they checked, and what happens when one trips?

Operate

Page What it answers
Observability What do progress events, trace spans, and stores record, and what does telemetry cost?
Run Viewer How do I render one finished run as a self-contained page with a task DAG and span waterfall?
Run event journal What exactly did each agent see at the moment it was asked, and can that be verified offline?
Checkpoint and resume How does an interrupted run resume without repeating completed work?
Run store and execution leases Which worker owns a run, and what stops two of them from advancing it at once?
Context management How does a long conversation shrink as it grows, and what happens to reasoning blocks?
Evaluation How do EvalSets, scorers, and stores measure quality without changing the business result?
Evaluation in CI How do I turn an EvalSet into a pass/fail signal a CI job can act on?
Routing evaluation Which frozen EvalSets guard routing decisions, and what would let a routing regression through?
Migrating to Observability v2 How do I move an onTrace integration to the v2 path one layer at a time?
Errors Which error class is this, who raised it, and does a retry help?
CLI Which oma subcommands exist, what JSON do they print, and which exit codes do they use?

Partners

Page What it answers
Featured Partner program What does a featured placement in the project README include, and who qualifies?
Atlas Cloud setup guide How do I configure the Atlas Cloud provider sponsor's endpoint and credentials?
Atlas Cloud 接入指南 Chinese translation of the Atlas Cloud setup guide.

Internal records

internal/ holds engineering records kept for auditability, such as benchmark snapshots and release-readiness reviews. They describe a specific point in time on specific hardware and are not user documentation; nothing there is a supported contract.