Repository navigation
Releases
Mayura v1.4.1
Mayura 1.4.1
- Fix the Hono Cloudflare Workers starter so chat, approvals and observation use request-local server state with durable D1 storage.
- Publish the Mayura SDK and CLI through an independent release plan. Generated starters use the compatible versions of their optional adapters.
- Refresh the website, starter guides and integration comparisons for Mayura 1.4.
Mayura 1.4.0
- Add
AgentWorkspacefor React 19 and shadcn. Use a caller-owned transport to connect chat, thread history,
run activity, exact approval review, citations, and artifacts. Replace the sidebar, composer, or message renderer. - Reattach to an existing run after a refresh or dropped stream. AG-UI observation restores the saved transcript
and pending approval without replaying prompts, decisions, or tool calls. Mayura hosts opt in with
ag-ui:observe. The AG-UI adapter remains experimental. - Stream reply cards for tables, allowlisted downloads, and confirmations. Hosts register custom renderers
and retain responsibility for authorizing any action that writes. - Install editable Tailwind sources with
shadcn add @mayura/chat-workspaceor@mayura/reply-cards.
Tailwind v4 apps using npm can import@mayurajs/ui/tailwind.cssin their global stylesheet. The compiled
styles.cssexport andmayura add uicopy-in command remain available. - Explore the component gallery and run
examples/nextjs-agent-workspacelocally to try thread recovery,
exact citations, and approval with a credential-free agent.
Mayura 1.3.0
-
Add
@mayurajs/ui, a standalone React 19 library for agent chat, approvals and change review,
thread history, run activity, citations, and artifacts. The AG-UI hook accepts a caller-owned transport. -
Publish the
@mayurashadcn registry at mayurajs.com and add a runnable AG-UI example.
The existingmayura add uicommand remains available. -
Reverify identity and run access before native event-stream disclosures. Close a revoked observation and preserve
its refusal in the client while the underlying run continues. -
Recheck streamed API-key grants without charging credits or consuming the built-in key manager's request limit.
-
Pin the support starter's local API forwarding to the configured server origin.
-
Parse file media-type parameters in order and bound release slug suffix normalization.
-
Audit locked optional runtime profiles and embedded inspector dependencies. Mark the Stagehand and
CodeSandbox SDK profiles unqualified for production while their advisories remain unresolved.
Mayura 1.2.2
- Add the
rag-modal-pineconestarter with a credential-free demo, durable Markdown ingestion and cited answers. - Upgrade Zod to 4.6.7, Hono to 4.13.20, and the Hono Node adapter to 2.1.11. Cover request boundaries and upgrade disconnects with defensive tests.
- Gate qualification on npm production dependency advisories across
mayuraand every published extension. Moderate findings require a reviewed exception with a UTC expiry. - Add a runnable RAG quickstart covering exact citations and deletion, and document the qualification matrix with measured recall and latency.
- Exercise RAG ingestion, recovery, retrieval, citation grounding, scope and provider failures from the npm-installed archive.
- Set an npm archive size budget, share identical starter assets, and verify registry signatures and clean installs before announcing a release.
Mayura 1.2.1
Workflow graphs
- Configure the per-graph node limit across definition, client admission, storage and recovery. The
default remains 128. A trusted host can opt out of that individual limit with the documented
environment helper. Independent byte, concurrency and workflow-tree bounds still apply.
Retrieval
- Qualify the registered Modal + Pinecone Loki v28 profile for production. The source-reviewed
40-case evaluation, Nomic120, full native600, recovery, scope security and campaign cleanup passed.
The versioned verifier preserves the original audit and reuses provider receipts. Other RAG
configurations remain experimental. - Add opt-in document-level fusion and candidate scoring, BM25 and publication-checked parent context.
The default retrieval ranking remains chunk-based.
Mayura 1.2.0
Release engineering
- Release workflows retain the explicitly selected archives, receipts, SBOM and notes under
.artifacts;
rehearsals fail if no evidence files are found instead of silently succeeding without a downloadable artifact. - Full releases publish the coordinated version already committed through a reviewed, qualified PR. The publisher
no longer commits, rebases or pushes protected main; only verified publication can create its version tag and
GitHub Release. Explicitdry_runrehearsals work while publishing is enabled. - Full-set OIDC publication validates every archive and dependency before writes, requires exact-main push
qualification, preserves the non-target distribution channel and checks registry integrity/provenance. Frozen
same-run recovery receipts prevent replaying accepted or uncertain uploads after failures or scanning delays. - Release readiness records the green 39-job main qualification and successful 22-package
1.2.0-rc.1trusted
publication, while retaining the remaining 84-package OIDC qualification and experimental interoperability limits.
Changed
-
The protected release workflow can publish the fixed 22-package RC set through OIDC with provenance, exact-main
qualification, immutable recovery receipts and checks that preserve all existinglatesttags. -
Frontend journal fixtures use an explicit logical clock while native SQLite I/O and claim races remain real,
avoiding accidental one-second claim expiry on slow runners while preserving expiry and retention assertions. -
Cross-platform qualification separates consumers from two Vitest and two bundle shards per OS/Node combination.
Shared checks run once, PR branch pushes no longer duplicate the full matrix, and an aggregate qualification gate
requires all lanes to succeed, including database, runtime and container coverage. -
The paid-summary recovery fixture allows slow Windows CI disk I/O across its seeded turns, denied publication
and receipt-only retry while still asserting exactly one model call. -
libSQL conformance cleanup yields to native statement finalizers and repeats garbage collection on bounded
Windows file-lock retries; persistent locks still fail the suite. -
Key-rotation conformance checks the persisted overlap deadline and explicitly expires the predecessor, avoiding
short wall-clock waits that fail when durable storage is slow on Windows CI. -
Code Mode crash fixtures allow slow Windows SQLite I/O before the deliberate process kill, then wait for the
matching lease expiry before checking recovery without replay. -
The libSQL caller-owned client check uses an in-memory database, keeping its lifecycle assertion independent
of native file cleanup while the file durability and lock conformance suites remain covered. -
Scheduler crash fixtures use a matching Windows lease and post-kill expiry wait, while the live-renewal check
has time to reach renewal before expiry. Explicit stale-claim checks keep their short leases. -
Long-running workflow renewal conformance outlives the configured Windows lease with matching tool and case
deadlines, retaining its single-effect and unchanged-fence assertions. -
Coordinator conformance fixtures allow slow document-store I/O without accidentally expiring their leases;
explicit uncertainty cases retain their shorter lease settings. -
Durable-budget fixture cleanup retries transient Windows file locks after libSQL closes its native handles.
-
Release automation uses npm trusted publishing through GitHub OIDC without an npm token secret. Added a resumable
package-trust setup helper, including prerelease-only packages without alatesttag, and documented
first-publication requirements for new extensions.
Validation status (2026-10-21)
- Full release-branch CI passed: all 13 jobs in qualification run 39576846216
succeeded atf443c76e822eef27b143d318d748ed513599e00c, covering six Linux/macOS/Windows Node 22/24 consumers,
four database shards, runtime compatibility and both container jobs. The documentation follow-up, newermain
changes and pull-request merge commit require their own green checks before release. - Local Windows qualification: 5,296 unit tests passed; six conditional PostgreSQL cases skipped by the unit run
were exercised in the separate PostgreSQL journal profile (12 passed). - Integration qualification: 2,338 latest executed cases passed, with no unresolved failures after targeted serial
reruns. The original all-service run failed 54 cases and skipped 313; later executions clear the failures. This
result does not claim a clean first-pass full suite or qualification of skipped external profiles. - Builds, types, 451 documentation snippets, API compatibility reports, edge/runtime checks, offline consumers,
75 public package entry points, 105 extensions, 106 release archives, 11 starters, eight templates, 18 offline
examples, the website, secret scan and license/SBOM checks passed locally. - Paid provider/gateway checks, real authorization/vector service interoperability, the AG-UI reference-client/browser
flow and live deployments remain outstanding. AG-UI and RAG
retain their documented experimental status. No version bump, publication or release tag has been performed. - See release validation status for evidence scope and remaining release gates.
Fixed
-
Workflow draining fences dependent nodes that resume a delayed storage read or policy evaluation after shutdown
begins, while allowing already-claimed effects and their receipts to settle without replay. -
Make the Mistral conformance transport reject requests whose signals aborted before listener registration,
matching real fetch cancellation; cover the delayed-subscription path deterministically through the adapter. -
Control the checkpoint host-expiry test clock at the deadline boundary so slow persistence cannot expire
the approval before the not-due assertion; retain the real checkpoint store and execution assertions. -
Give the coordinator reopen conformance fixture a bounded ten-second lease so delayed claim delivery
does not unintentionally test expiry; preserve immutable resource plans and exactly-once execution checks. -
Retry scheduled-workflow fixture removal within a bounded window after closing native database handles,
allowing Windows WAL/SHM locks to settle while continuing to fail persistent cleanup errors. -
Admit the workflow-tree capacity fixture through real SQLite before its handler timeout, and observe
actual capacity release after settlement while retaining exclusion and exactly-once execution assertions. -
Resolve the website gallery's shared UI source against the site's own React installation and declarations,
so clean site-only installs type-check and build without workspace dependencies or duplicate React runtimes. -
The server starters' production flow works out of the box again.
docker compose upfailed inmigrate, andnpm run devfailed at startup once.env.examplewas copied to.env, with "Environment values must satisfy configured bounds." because each.env.example(approval-workflow, event-automation, research-team, support-agent) shipped an emptyMAYURA_ALLOWED_ORIGINS=line, and an empty variable is refused. The optional line is now commented out, so the only empty lines are the values the README asks you to fill in; each starter's tests load its.env.examplewith just those filled in and check that production configuration succeeds. The event-automation compose file also says to fill inTRACKER_MCP_TOKEN, which it requires. -
validatedEnvironmentfrommayura/helpersnames the empty or oversized variables it refuses (Empty environment variable: MAYURA_ALLOWED_ORIGINS. Set a value or leave it unset.), never their values, as its schema errors already did. The error code staysINVALID_CONFIG. -
Allow durable adapter round trips within the key-manager rate-limit conformance window, then wait for the returned
retry deadline before checking that requests resume; refusal and window-reset assertions remain unchanged. -
Observe real adapter commit acknowledgements through bounded barriers in concurrency and late-evidence fixtures,
avoiding polling contention while retaining persisted execution, exclusion and accounting assertions. Keep slow-runner
fixture admission windows long enough to test approval expiry after preparation rather than before it, and retain
explicit short leases only in lease-expiry/renewal scenarios on Windows CI. -
Give process-crash recovery fixtures transaction headroom on Windows CI while retaining actual lease-expiry waits,
terminal-state checks and exactly-once effect assertions. -
Assert headless disposal against the actual transport signal and drain cancellation fixtures on assertion failures.
-
Pin database CI to Ubuntu 22.04 while the pinned MongoDB build is incompatible with newer runner kernels; fail
immediately when MongoDB exits or readiness expires, retaining bounded container diagnostics. -
Accept the complete bounded server capability catalog during identity admission, preserving capability and policy
enforcement for threads, approvals and compaction. -
Snapshot workflow submission input before asynchronous authorization, so concurrent caller edits cannot change the
request bound to its idempotency key. -
Preserve native memory validity when indexing and deleting RAG chunks, and keep memory export lookahead pages within
the storage contract's bounds. -
Restore run-qualified execution receipts when inspecting saved approval and frontend-tool checkpoints after restart.
-
Keep SQLite worker modules external in framework production builds; update SvelteKit configuration, React Router
dependencies and CSS types, and the static UI gallery link. -
Protect active qualification work directories from ...
Mayura 1.1.0
Added
- A model registry.
createModels({ providers, maxCallCostMicros, prices })frommayuragives every model an id of the form<provider>/<model>(openai/gpt-5.1), granted asmodel:<id>. A model needs a price, frompricesor, only withprices: 'catalog', from its provider's dated catalog; and every call has a bound.registry.model(id, { retry })calls the same model again after a rate limit, an outage or a timeout (never after the caller cancels or once streamed text was released), charging every attempt.registry.chain(id, models)builds acreateModelRouterover registry models under an id you choose.registry.list()shows each model with its price source and catalog date. Providers implementModelProvider; the typesModelPricing,ProviderModelSettings,ModelCatalog,CatalogModel,ModelsOptions,ModelOptions,ModelChainOptions,ModelRegistryandRegisteredModelare exported. @mayurajs/provider-openai, the first@mayurajspackage: OpenAI models for a model registry (openai({ apiKey }), modelsopenai/<model>), through the officialopenaiSDK and the Responses API. It reads nothing from the environment, turns off the SDK's retries, bounds response sizes, uses strict JSON Schemas, streams output text, and passes the model adapter conformance suite. It exportscatalog, OpenAI's list prices with their date, used only withprices: 'catalog'. Documented in the new Model registry guide.@mayurajs/provider-anthropic: Anthropic Claude models for a model registry (anthropic({ apiKey }), modelsanthropic/<model>), through the official@anthropic-ai/sdkand the Messages API. It reads nothing from the environment (notANTHROPIC_API_KEY,ANTHROPIC_AUTH_TOKENorANTHROPIC_BASE_URL), turns off the SDK's retries, bounds response sizes, uses strict JSON Schemas, streams output text, and keeps the model's thinking for the next call of a run without ever releasing it. Prompt-cache writes are charged at twice the input rate and cache reads at the full input rate, so a budget never undercounts. Itscataloglists Claude Fable 5.1, Opus 5.5, Sonnet 5.5 and Haiku 4.5 at their September 29, 2026 list prices. It passes the model adapter conformance suite.@mayurajs/provider-google: Google Gemini models for a model registry (google({ apiKey }), modelsgoogle/<model>), through the official@google/genaiSDK and the Gemini API. It reads nothing from the environment (not the Gemini or Google API keys,GOOGLE_GEMINI_BASE_URLor the Vertex AI settings), turns off the SDK's retries, bounds response sizes, uses strict JSON Schemas, streams output text, and keeps thoughts and thought signatures for the next call of a run without releasing them. Thinking tokens are charged as output and cached input at the full rate. Itscataloglists Gemini 3.8 Flash (at the price announced from January 1, 2027, twice today's), 3.5 Flash and Flash-Lite, 3.1 Flash-Lite, 3.1 Pro Preview and 2.5 Pro, with Google's long-context rates above 200K tokens where they apply. It passes the model adapter conformance suite. Two of its packages run installation scripts: the SDK'spreinstallonly prints a line, andprotobufjs'spostinstallonly readspackage.jsonfiles to print a version warning. The release checks allow each only while its command, and the SHA-256 of the file it runs, are exactly what was reviewed.@mayurajs/provider-bedrock: Amazon Bedrock models for a model registry (bedrock({ region, credentials })orbedrock({ region, apiKey }), modelsbedrock/<model or inference profile id>), through the official@aws-sdk/client-bedrock-runtimeand the Converse API. The region and credentials are options: nothing is read from the environment, AWS config files or instance metadata (a test sets hostileAWS_*variables and checks the request is signed with the given credentials, in the given region, at the given endpoint, once). Requests go through a fetch-based handler with bounded response sizes; strict JSON Schemas, streaming, and reasoning kept for the next call of a run but never released. Cache writes are charged at twice the input rate. Itscataloglists 18 Claude, Nova, Llama and Mistral models and inference profiles at their us-east-1 list prices, offered only by a provider in us-east-1. It passes the model adapter conformance suite.@mayurajs/provider-azure: Azure OpenAI models for a model registry (azure({ resource, apiKey })orazure({ baseURL, token })with a Microsoft Entra ID token source called for every request), modelsazure/<deployment>, through the officialopenaiSDK and Azure's v1 API. Catalog prices apply only to Global deployments you map to a model (deployments: { 'prod-chat': { model: 'gpt-5.5', type: 'global' } }), since deployment names are yours and Data Zone and Regional deployments cost more; the catalog leaves out models whose Azure prices were not yet published. A failing token source reportsauthenticationwithout its error text. It passes the model adapter conformance suite.@mayurajs/provider-mistral: Mistral models for a model registry (mistral({ apiKey }), modelsmistral/<model>;baseURL: 'https://api.eu.mistral.ai'keeps requests in the EU), through the official@mistralai/mistralaiSDK and the Chat Completions API. It reads nothing from the environment (notMISTRAL_API_KEYorMISTRAL_DEBUG, which would make the SDK log every request with its key), turns off the SDK's retries, bounds response sizes, uses strict JSON Schemas, streams output text, and keeps the model's thinking for the next call of a run without releasing it. The SDK's own telemetry, whichMISTRAL_SDK_TELEMETRYandMISTRAL_OTLP_TRACES_ENDPOINTcan switch on to export spans of every call, is removed from each client, and the provider refuses to start if a future SDK moves it. Call ids from other providers are renamed to the nine letters and digits Mistral accepts. Itscataloglists Mistral Medium 3.5, Large 2512, Small 2603 and Ministral 8B 2512 at their September 29, 2026 list prices;-latestaliases are left out, since they move to newer models. It passes the model adapter conformance suite.@mayurajs/provider-groq: Groq models for a model registry (groq({ apiKey }), modelsgroq/<model>such asgroq/openai/gpt-oss-120b), through the officialgroq-sdkand Groq's Chat Completions API. It reads nothing from the environment: the SDK mergesGROQ_CUSTOM_HEADERSinto every request's headers, so the provider puts back exactly the headers it was given, and refuses to start if a later SDK changes how it stores them. It turns off the SDK's retries and logging, bounds response sizes, uses strict JSON Schemas, streams output text, and keeps the model's reasoning for the next call of a run without releasing it. Groq refuses a response format beside tools, so with tools the model first answers freely and, once it calls no more tools, one more call without tools asks for the answer in the strict format; the free reply is never streamed, and both calls are charged (found in a live run, where GPT-OSS 20B then passed every tool check). A refusal reportsrefused; a 498 (a flex-tier model over capacity) reportsunavailable; a tool call or answer the model wrote unparseably (Groq's 400tool_use_failedoroutput_parse_failed) reportsinvalid_response, notrejected. Models see images only whenmediasays so; images from tool results follow them in one user message. Itscataloglists GPT-OSS 120B and 20B and Qwen 3.8 27B at their September 29, 2026 on-demand prices; models sold only through Groq's sales team are left out. It passes the model adapter conformance suite.@mayurajs/provider-ollama: Ollama models for a model registry (ollama()for a local server at http://127.0.0.1:11434, orollama({ host: 'https://ollama.com', apiKey })for Ollama's cloud; modelsollama/<model>such asollama/gpt-oss:20b), through the officialollamaSDK.hostis http only on a loopback address and https anywhere else. Nothing is read from the environment or the file system: the provider uses the SDK's browser entry point, whose Node counterpart reads a local file for an image string that names one, and requires an explicit key for ollama.com, where the SDK would otherwise fall back toOLLAMA_API_KEY. Each call gets its own client whose transport carries the call's signal, since the SDK passes none for a non-streamed call; error statuses are reported without reading their bodies. JSON Schema structured output and tools: a format constrains every reply to the answer, which leaves no way to call a tool, so with tools the model first answers freely and, once it calls no more tools, one more call without tools asks for the answer in the format (the free reply is never streamed; both calls are charged). Ollama's cloud accepts a format without enforcing it, so a request with one also gives the schema in its instructions. Checked live on a local 2B vision model, which then passed structured output, tools, streaming and vision, including an image returned by a tool, and on Ollama's cloud with gpt-oss:20b and gpt-oss:120b (structured output and tools). Streaming, andthinkfor thinking models, whose thinking is kept for the next call of a run and never released. Tool calls get ids unique within the run, since Ollama gives none. Models see PNG or JPEG images only whenmediasays so. There is no catalog: local models cost nothing, so each model's price is given, zero or your own. The default time limit is 120 seconds, as a local model may need loading first. It passes the model adapter conformance suite.@mayurajs/storage-libsql, the first@mayurajsstorage package: the Mayura store on libSQL (createLibsqlStore({ url, authToken })for Turso, asqldserver or a localfile:, orcreateLibsqlStore({ client })with a@libsql/clientclient you own, which the store ...
Mayura 1.0.0
Released
- Mayura 1.0.0, the first stable release. It is 1.0.0-rc.2 with no code changes. From this version, every entry point is stable under the promises in Versioning and stability: incompatible changes only in a new major version, storage changes only through explicit migrations, and every release checked to resume the runs the previous one started.
Mayura 1.0.0-rc.2
Added
- Serverless functions are supported on Vercel, and experimental on AWS Lambda and Google Cloud Run (Node.js 22 and 24); Vercel Cron and the Next.js route files are experimental too. The core is request-bound runs, workflows advanced by a scheduled
runOnce, one-connection PostgreSQL pools and migrations from the pipeline. The Deployment guide has a section for each platform, and Supported platforms says so; edge runtimes are planned for 1.1. A new test runs every invocation as a fresh process stopped as soon as it answers: a request-bound run is readable by the next invocation, a background run cut off that way endsoutcome_unknown, workflows finish through scheduled one-shot invocations with each effect once, and a step killed mid-effect is recovered without running it again. The same was checked live on a Vercel preview with Neon PostgreSQL through its pooled connection. - Request-bound agent runs.
createAgentServer({ runExecution: 'request', runRecords })(and the Node hosts) finishes each run, and records its outcome, beforePOST /v1/runsanswers 202, so nothing runs after the response: for platforms that stop or freeze the process once it responds, such as serverless functions. The response and protocol are unchanged. The submission waits up to the agent'slimits.maxDurationMsplusrequestTimeoutMs; other routes keeprequestTimeoutMs. It requiresrunRecords(INVALID_CONFIGotherwise). - PostgreSQL pool options.
createPostgresStore({ pool: { max, connectionTimeoutMs, idleTimeoutMs } }), with the previous values as defaults (8 connections, 5 s, 10 s), so serverless functions can use one or two connections per instance.PostgresPoolOptionsis exported frommayura/storage-postgresandmayura/storage. - Run a worker once.
mayura worker --once [--budget-ms <ms>]advances everything due and exits, for scheduled jobs and functions;WorkflowWorker.runOnce({ budgetMs })does the same from code. It takes the leadership lease once (a standby returns at once), runs passes until every unit has completed a sweep or the budget ends, renews the lease between passes and stops if it is lost, then releases it. It reportsleader,completedSweep,held,passesandfailures; the CLI maps them tosucceeded,incomplete,standby,heldorfailed(exit code 1). Units gain an optionalrunOnce(): lifecycle and composite hosts had it, andcoordinatorUnitnow has it.runWorkerOnceandMayuraWorkerOnceReportare exported frommayura/cli. - Lifecycle and composite hosts keep their sweep position in storage, so a restarted worker, or the next
--oncerun, continues the sweep where the last one stopped instead of revisiting the same runs first. A position that cannot be used starts the sweep over. zfrommayura. The root import exportsz(Zod 4), so a project needs no separate schema library:npm install mayuraandimport { defineTool, z } from 'mayura'. Zod 4.6.5 (MIT, no dependencies, no install scripts) is now a dependency of the package, reviewed like Hono and Clack. Any other Standard Schema validator still works, including a project's own copy of Zod; Mayura never checks where a schema comes from.zstays on Zod 4 for all of 1.x (see Versioning). The documentation, README, templates, starters and examples importzfrommayura, templates and starters no longer installzod, and the assistant rules inllms.txtand generatedAGENTS.mdfiles say not to add it.- Documentation: the Deployment guide covers every supported target, not only containers: a table to choose one, then Kubernetes manifests (migration Job, server and worker Deployments, probes, drain), managed container platforms (ECS on Fargate, Cloud Run, Azure Container Apps, Fly.io), process platforms (Heroku, Render, Railway), virtual machines with systemd, and mounting
createAgentServerinside an existing Node.js app such as Next.js. It says plainly that serverless and edge runtimes are not supported yet, and why. A new example,examples/embedded-handler.mjs, runs the mounted handler end to end in CI. - Documentation: a Credits page (
docs/project/credits.md) naming the open-source projects and open standards Mayura is built on, what each one does in Mayura, and its license.
Fixed
- Durable workflows settle a tool step abandoned by a stopped process on their own. A step that was
dispatchingwhen its process died (killed, evicted, or frozen past its limit) used to wait for someone to callrecoverAbandoned. Now, once the tool'stimeoutMsand a further minute have passed since the step's dispatch was recorded, the next process that advances the run settles it exactly asrecoverAbandonedwould:unknown, orblockedwhen its receipt shows the tool finished. It is never run again, and a step that a live process is still running is never touched. This covers lifecycle and format-2 workflows (andagentStep), records alifecycle.step.abandonedorstep.abandonedevent, and needs no change to stored data.recoverAbandonedstill does it at once. - Release workflow: a release that stopped part-way, or one committed and tagged by hand, can be run again with its version, and every step skips what is already done (the version commit, the tag, the npm publish, the GitHub Release).
version.mjs setdoes nothing when the code is already at that version. The commit's author and committer can differ (RELEASE_GIT_AUTHOR_*,RELEASE_GIT_COMMITTER_*).
Mayura 1.0.0-rc.1
Added
-
The native adapters behind a gateway.
openAIResponsesandanthropicMessagestakeendpoint, a full https URL ending in/responsesor/messages(such as Cloudflare AI Gateway's provider endpoints), andheaders, such as the gateway'scf-aig-authorization. With both,apiKeyis optional when the gateway holds the provider key. The rules matchopenAICompatibleChat: https only, no credentials, query or fragment in the URL, and extra headers cannot replace the adapter's own.mayura initoffers them under Cloudflare AI Gateway (OpenAI Responses API or Anthropic Messages API, next to the unified API), and the starters readMAYURA_MODEL_ENDPOINTandMAYURA_MODEL_GATEWAY_TOKENforopenaiandanthropictoo. The live-provider check takesMAYURA_LIVE_OPENAI_URL/_GATEWAY_TOKENand the Anthropic equivalents; both adapters pass every check through Cloudflare AI Gateway (gpt-6-luna,claude-sonnet-5). -
Vision: agents that see images and PDFs.
runtime.submit(agent, { input, media })sends PNG, JPEG, WebP, GIF or PDF files with an agent's input; tools return them withwithMedia(output, [...]), for example a screenshot. Media is its own channel, never base64 inside JSON input.media(),mediaUrl()andmediaFromBase64()create media; its type is read from the file's own leading bytes, so a mislabelled file is refused before any provider sees it.mediaFromArtifact(mayura/artifacts) reads a stored file for a scope.- Nothing is accepted unless declared:
defineAgent({ media: { accept, maxItems, maxBytes, urls } })for input,defineTool({ media })for what a tool returns. URLs are accepted only under listed https prefixes, and are fetched by the provider, never by Mayura. The runtime limitmaxMediaBytes(20 MiB) bounds a run's media apart from its JSON limits. - Adapters declare
capabilities.media, anddefineAgentrefuses an agent whose model cannot see what it accepts, naming the types; a router sees what every route sees.openAIResponsesandanthropicMessagessee every type and URLs (optionmedia);openAICompatibleChatsees what its newmediaoption lists. Each sends media in its provider's own format; tool media goes inside Anthropic tool results and in a user turn after OpenAI tool results; continuations never store media bytes. - Hooks see a summary (type, size, name), never bytes:
beforeExecution.mediaandbeforeModelCall.request.media. Events carry counts. - The server accepts
mediainPOST /v1/runs(base64, allowed URLs, or artifact references through the newmediaArtifactsoption), checks it before starting the run with a precise400 INVALID_MEDIA, includes it in the idempotency key, and allowsmaxMediaBodyBytes(16 MiB) for run submissions when an agent accepts media.client.submitsends media. agentSteptakesmedia, resolved when the step runs, so workflow state keeps only references.runAgentCommandtakes--attach <file>for agents that accept media; the cli-agent starter uses it with a model that can see (MAYURA_MODEL_MEDIAfor compatible providers).scriptedModelsees media, andtestImage()andtestPdf()return small valid files. The live-provider check gainsvisionandvision_tools, which read a random number drawn in a PNG; Cloudflare AI Gateway (openai/gpt-6-luna) passes both.
-
Production operations.
- A TLS/proxy production host with liveness and readiness probes, canonical-origin enforcement and HSTS.
- A durable submission journal.
- A leadership lease and worker supervisor with bounded drain.
- CLI
serve,workerandmigratecommands. - An offline-built server/worker container image and compose profile.
- SQLite online backup and verified restore, and a PostgreSQL dump/restore drill.
-
Workflow control.
- Operator pause across workflow formats 2–5.
- Durable fleet hold with sweep.
- Authenticated pause and fleet routes, with client, CLI and React bindings.
- A cross-format definition-version inventory and deploy gate (
inventoryWorkflowVersions,assertWorkflowVersionsRetained).
-
In-place migration of in-flight runs for every workflow format (aggregate, scheduled, graphs, trees, lifecycle, sagas and loops) on SQLite and PostgreSQL.
defineWorkflowMigrationdeclarations and a planner that decides what happens to each step from the run's real state.- A
migratemethod (withdryRun) on every format runtime. Storage re-verifies every migration inside its transaction. - Operator pause and resume for sagas, loops and scheduled workflows.
createWorkflowMigrationCatalog,createWorkflowMigrationServiceandpinnedDefinitionHashfor hosts.- Server migration routes behind a new
workflows:migratecapability, and the client methodsworkflowMigrations,planWorkflowMigrationandmigrateWorkflow. compositeFleetTargetfor fleet sweeps over sagas and loops.
-
Production operator API.
createWorkflowOperatorTransports, withlifecycleOperatorTarget,graphOperatorTargetandtreeOperatorTarget, implements the server's workflow transports over the real runtimes. It provides:- a durable, leased command journal (
createWorkflowCommandJournal), so a command id applies at most once across retries, replicas and restarts; - revision checks;
- views on each run's pinned version;
- index paging;
- fleet sweeps and migrations;
- scope isolation.
The reference deployment and the console demo use it. Graph and tree discovery gaincursorAfter.
- a durable, leased command journal (
-
Property tests for migration. They cover generated planner cases, plus generated lifecycle and scheduled runs migrated on SQLite, using a seeded in-house generator with no new dependency.
-
Lifecycle hook catalog. All 25 plan lifecycle points are served:
defineHookaccepts 16 agent stages, including observers withmandatoryfail-closed semantics.- New
step.*anddelegate.*run events. - Fail-closed context-build, memory-write and
onRetryhooks. createWorkflowHookRelaygives durable at-least-once workflow callbacks.
-
Native memory.
createNativeMemoryover a newmemorystorage capability on SQLite and PostgreSQL.- In-database BM25, exact/IVF semantic and hybrid search.
- Graph edges and traversal, and supersession.
- Streamed import/export, with the compact-profile migration path.
- A content-free change feed.
hashingEmbedder(local) andopenAIEmbeddings(hosted, sensitivity-gated).
-
Context and speculation.
createContextCache, with admission-key caching, invalidation, change-feed following and prefetch.runtime.speculate, for verified isolated branches under the shared budget.
-
One package:
mayura. The@mayuranpm scope belongs to someone else, so Mayura is published as a single unscoped package built from the workspace packages (scripts/bundle-package.mjs).mayurais the SDK;mayura/workflows,mayura/workflows/lifecycle,mayura/server-nodeand the other entry points mirror the workspace packages;mayurais the CLI command. Native SQLite, PostgreSQL, QuickJS and React are optional peers.pnpm test:bundle(in CI) installs it offline with and without those peers, loads every entry point, type-checks a strict consumer and runs the CLI, and the release check verifies the single archive. -
Automated releases from main. After a green qualification of a push to
main, the release workflow works out the next version from Conventional Commits since the last tag (or takes an explicit one from a manual run), sets it everywhere, verifies the archives and SBOM, publishes to npm with provenance, commits and tags the version and creates the GitHub Release. Publishing stays a dry run until the repository variableMAYURA_RELEASEisenabled.scripts/version.mjskeeps every package and every file that names the version in step (checkruns in CI). -
OpenAI-compatible providers in the starters and
mayura init. The starters acceptMAYURA_MODEL_PROVIDER=compatiblewithMAYURA_MODEL_ENDPOINT,MAYURA_MODEL_PROVIDER_ID,MAYURA_MODEL_AUTHandMAYURA_MODEL_API_KEY, and useopenAICompatibleChatwith a per-provider adapter id (openai-compatible.<id>). The init wizard offers Groq, Google Gemini, Mistral, DeepSeek, xAI, OpenRouter, Together, Fireworks, Azure OpenAI (built from resource, deployment and API version) and any other HTTPS chat-completions endpoint, checked with the adapter's own endpoint rules. -
mayura devand provider setup inmayura init.mayura devbuilds a project, runs it (its dev entry, ormigrate,serveandworker), loads.envwithout printing values, and rebuilds and restarts on each saved change; a failed build keeps the last good version running. The starters'npm run devnow runs it, and their dev tokens are kept in.data/dev-secrets.jsonso an open console stays signed in across restarts. For a starter, themayura initwizard asks for a model provider (Offline, OpenAI or Anthropic) and, for a real one, the model, a masked API key, prices and spending caps, and writes them to the project's git-ignored, owner-only.env. -
Try starters before publishing.
pnpm local:init(interactive, or--starter/--templatewith--directory) creates a project from this repository and installs this workspace's packages, plus the third-party packages they use from the local installation, offline into it, sonpm run devworks before anything is on npm. The starter check andlocal:initnow share one packer (scripts/local-packages.mjs), which also skips optional packages for other platforms. -
Terminal front ends (
mayura/terminal).runTerminalChatruns an interactive chat with any agent: streamed replies, tool use as it happens, per-turn cost, and/help,/clear,/cost,/exit.runAgentCommandruns an agent once from the command line, with flags from the input's JSON Schema, generated `--h...