πŸŽ‰ Anna 1.1.0-beta.191 β†’ beta.200 + @anna-ai/cli 0.1.60–0.1.61: Music generation for Apps, image async jobs & re-signing, Developer Playground, 8K output cap fixed, theme/locale for Apps

Hey Anna app developers! :waving_hand:

Last cycle gave your Apps a voice. This one gives them a soundtrack, a studio, and a lot more headroom :musical_note::framed_picture: β€” anna.music.* opens Suno-style music generation to Apps and Executas, anna.image.* gains async jobs + 7-day artifact re-signing, every TTS / image model now describes its own knobs so you can stop guessing parameters, and a brand-new Developer Console Playground lets you try every media model with your own App identity before writing a line of code. We also killed the infamous 8,192-token output cap on Agent Sessions, taught App windows to fit any screen, and made the Dashboard tell your App its theme and language. :last_quarter_moon::globe_showing_europe_africa:

Huge thanks to the developers who shaped this cycle: @HappyLight (#403 β€” the meticulous β€œalways ends at 8,188 tokens with completed” report that uncovered a real regression, and #414 β€” the QueuePool timeout trace from Anna Deck that led us straight to a connection-pool bug :magnifying_glass_tilted_left:), @martindelophy (#426 β€” the β€œscript β†’ storyboard β†’ image β†’ video β†’ music” pitch from Timeline Studio that became anna.music.*, plus the window-geometry notes from #376 that drove the viewport work :window:), @Yinghuo_Mars (#404 / #405 β€” TTS options and image.generate size control; both are now schema-driven, and your feature-comparison table literally became the Playground’s Compare view :bar_chart:), and @sadi (#385 β€” the sharp β€œworks in the App window, fails from chat” Executa report). Every detailed write-up moves the platform. :purple_heart:

Let’s dive in! :rocket:


:sparkles: New Features

  • :musical_note: Music generation for Apps & Executas β€” anna.music.* (beta.197, SDK 0.23.0, #426) β€” the last link in the short-film production chain. Async jobs (mjob_…) with the exact same shape as video: generate / getJob / cancelJob / listJobs, media_job events, pre-hold β†’ settle β†’ refund billing, presigned R2 URLs, and generateAwait() sugar. Six catalog entries across five families β€” MiniMax Music 2.6, Lyria 3 / 3 Pro, ElevenLabs Music, Stable Audio 2.5, ACE-Step β€” with per-minute pricing. Capability bits are explicit and never silently downgraded: lyrics, duration control, instrumental-only, reference image β€” if a model can’t do it, you get MUSIC_FEATURE_UNSUPPORTED (-32165) with error.data.alternatives listing models that can. :bullseye:

    const { models } = await anna.llm.catalog({ serviceType: "music_gen" });
    const m = models.find(x => x.isPlatformDefault);          // fal-ai/minimax-music/v2.6
    const song = await anna.music.generateAwait(
      { prompt: "melancholic cinematic piano, slow ~70 BPM, rainy night",
        lyrics: "[Verse 1]\n…\n[Chorus]\n…",                    // only when m.capabilities.lyrics
        model: m.modelName, clientTag: "scene-3-score",
        idempotencyKey: "canvas-node-8f3a-v2" },               // 24h replay β†’ same job, no re-charge
      { onProgress: (p) => bar.update(p) }
    );
    audio.src = song.result.url;
    

    Opt in with ui.host_api.music + the per-app media_grant.music. Executas get mirrored music/* reverse RPC via media_token.allow_music. New: idempotencyKey on both music.generate and video.generate β€” a 24 h replay returns the existing job instead of charging twice (and the per-invoke max_video_jobs gate is gone). :repeat_button:

  • :framed_picture: Image async jobs + artifact re-signing β€” anna.image.* (beta.199, SDK 0.25.0) β€” image.generate / image.edit stay synchronous and byte-for-byte unchanged. For 2K / 4K or quality: "high" renders (60–120 s), opt into the same job API as video / music: generateAsync / editAsync / getJob / cancelJob / listJobs + generateAwait / editAwait / onJobEvent. One job = n images, settled on the actual number produced (≀ estimatedCostCU), and getJob re-signs every result.images[].url. The one everyone asked for: anna.image.resign({ r2Keys }) β€” any already-paid artifact (sync r2_key or job r2Key) can be re-signed for 7 days, so a 30-minute URL TTL no longer means a lost image. :raising_hands: Executas get image/{generate_async, edit_async, get_job, cancel_job, resign} too. Image catalog converged to fal (Nano Banana 2, GPT Image 2 with 8 reference images, Seedream) β€” fewer surprises, one pricing source of truth.

  • :control_knobs: Model-aware options β€” TTS & image knobs are now schema-driven (beta.192, SDK 0.22.0, #404 / #405) β€” every TTS / image model publishes capabilities.options (schema v2: {type, min, max, step, values, default, scope}). Pass any of them in params; unsupported keys are dropped and echoed back in ignoredParams β€” never silently applied, never surcharged. Invalid values β†’ AUDIO_OPTION_INVALID (-32149). ElevenLabs TTS joins the catalog with stability / similarity_boost / style / speed. For images: explicit model, aspect_ratio, and a fit policy β€” "nearest" (default, keeps orientation) or "strict" (fails with IMAGE_SIZE_UNSUPPORTED + data.allowed instead of snapping) β€” with requestedSize / size / sizeAdjusted echoed in the response. No more 9:16 requests quietly coming back square. :triangular_ruler:

    const out = await anna.audio.speak({ text: "Welcome!", model: tts.modelName,
      voice: tts.capabilities.defaultVoice, params: { stability: 0.3, similarity_boost: 0.8 } });
    out.ignoredParams;   // e.g. ["similarity_boost"] on a model that only exposes stability
    

    Catalog entries also carry isPlatformDefault and isUserPreferred, and the shared ModelOptionsForm component (the same one /llm uses) renders any capabilities.options JSON into a form β€” reuse it in your App. :puzzle_piece:

  • :test_tube: Developer Console Playground (beta.193–195, #404 / #405) β€” /developer?view=playground: pick one of your Apps, and the Playground mints a dev app_session to call the real audio.speak, audio.transcribe (file / mic / URL), image.generate / edit (sync or β€œRun as job” with cancel + re-sign), video.generate and music.generate. Forms auto-render from each model’s options schema, CU is estimated before Run and billed-cost shown after, params / ignoredParams are echoed, and curl / SDK / HTTP snippets update live. Compare TTS / Compare Music tables and the Developer Hub’s read-only β€œTry it” are generated straight from the catalog β€” plus a public GET /developers/model-capabilities and a new Model Capabilities reference page. Rate-limited to 30 runs / hour. Your App’s media integration can now be designed in minutes, not afternoons. :high_voltage:

  • :last_quarter_moon: Theme & language propagation to Apps (beta.198, SDK 0.24.0) β€” the Dashboard now tells your iframe what the user actually picked. Initial values ride on the iframe URL (?theme=&themeMode=&lang=) and are read synchronously in connect() β€” correct before first paint β€” and live changes arrive as theme.changed / locale.changed broadcasts (no manifest grant needed; these are events, not RPC):

    anna.theme;       // 'light' | 'dark'
    anna.themeMode;   // 'light' | 'dark' | 'system'
    anna.locale;      // 'en' | 'zh-CN' | …
    anna.onThemeChange(({ theme }) => document.documentElement.dataset.theme = theme);
    anna.onLocaleChange(({ lang }) => i18n.setLocale(lang));
    

    Older hosts send neither β€” the SDK falls back to prefers-color-scheme / navigator.language. Keep a CSS fallback for standalone previews. :artist_palette:

  • :straight_ruler: agent.session.run gains maxTokens + truncation signals (beta.200, SDK 0.26.0, schema 0.30.0, #403) β€” alongside the bug fix below, runs are now transparent about output limits. run_meta.max_output_tokens discloses the effective per-call cap before the first token; task_complete carries stop_reason (endTurn | maxTokens | contentFilter | toolUse, same set as llm.complete), truncated, and max_output_tokens. Optional maxTokens (1..65536) can only lower the cap. All additive β€” older hosts simply omit the new fields.

    for await (const ev of sess.run({ content: prompt, maxTokens: 16384 })) {
      if (ev.event === "run_meta") console.log("cap:", ev.max_output_tokens);
      const tc = ev.choices?.[0]?.delta?.task_complete;
      if (tc?.truncated) { /* status is still "completed" β€” continue in the same session */ }
    }
    
  • :window: App windows adapt to any viewport (beta.200, #376) β€” windows are now clamped to the real work area (measured Sidebar edge + Dock edge), centered on first open, title bar always reachable, integer geometry (no more float rejections). 8-direction resize (edges + corners), a β€œFit screen” title-bar button, and double-click to maximize / restore; maximized windows re-fit automatically when the Sidebar or chat layout changes. Validator now warns (non-blocking) when min_size exceeds 1024Γ—600 or default_size exceeds 1440Γ—900 β€” a gentle nudge toward laptop-friendly defaults. :laptop:

  • :package: Pre-installed Apps v2 (beta.200) β€” onboarding reconciles the pre-install list on every start (dedup 20 s, failures isolated), deployment is handled by the Executa reconciler, and admins can mark Apps :locked: locked (removable: false β€” no uninstall entry in the grid, context menu, or folders). Window-ready probes wait for in-flight reconcile jobs, and the tooling overlay shows a single-line status while your Executa warms up. New users land on a complete desktop, every time. :compass:


:bug: Bug Fixes

  • :scissors: Agent Session output always truncated at 8,192 tokens with status: completed (beta.200, #403) β€” @HappyLight’s 12-slide HTML deck kept stopping at 8,188 output tokens. Root cause: since beta.179 the output-cap resolver fell back to a platform constant (DEFAULT_APP_OUTPUT_TOKENS = 8192) whenever no explicit value was passed β€” and the chat / agent paths had no way to pass one. The resolver’s default is now the model’s own output cap, the context-reserve ceiling was raised 16,384 β†’ 65,536, and the platform constant is deleted (limitedBy is now only request | model | transport). Net effect: 1M-context models can emit up to 65,536 tokens per call, 200K models ~20,000; ≀ 163,840-context models are unchanged. llm.complete is unaffected; llm.stream without maxTokens now defaults to min(model cap, 65536) instead of 8,192 (so worst-case pre-checks are higher β€” if you hit 429, lower maxTokens using data.requiredCu and retry). :tada:

  • :electric_plug: Executa mentioned from chat failed with -32001 / -32021, but worked in the App window (beta.191, #385) β€” @sadi nailed it: Executas installed alongside an App are chat_resident: false, so an explicit @/# mention didn’t make it into user_executas β€” the tool allow-list ignored its tools and the token minter couldn’t find its grants, so invokes shipped without sampling / storage tokens. Mentions of non-resident Executas are now resolved before tool assembly and temporarily merged into that turn’s set (nothing written to DB, chat_resident unchanged). Your Executa now behaves identically whether called from chat or from the App window. :white_check_mark:

  • :person_swimming: web.image_fetch pinned the DB connection pool under concurrency (beta.191, #414) β€” @HappyLight’s Anna Deck fired dozens of concurrent image_fetch calls; each one held a DB connection for the entire R2 upload (presign β†’ put β†’ finalize in one transaction), exhausting the 15-connection pool and turning unrelated RPCs into bare HTTP 500s after a 15 s wait. Split into two transactions: the connection is returned right after presign, no pool connection is held during upload, and finalize checks out lazily. Failed uploads now roll back the pending row + quota and surface a structured provider_error instead of handler crashed. :thread:

  • :fire_extinguisher: image.generate content rejections returned -32003 APP_PROVIDER_ERROR (beta.199) β€” provider safety rejections are now -32115 IMAGE_CONTENT_REJECTED on both sync and async paths, and HostRpcError.details.data (allowed / alternatives / index) is passed through to the iframe so you can actually branch on it.

  • :bar_chart: Install / update progress β€œfull but grey” (beta.191) β€” older Agents reported value: 1.0 during extracting / finalizing, so the ring filled in seconds and then sat at 100 % grey for ~25 s of unpack + cold-start. All four progress consumers (Dashboard, Store cards, Installed Apps, window manager) now cap non-terminal items at 95 %; only installed | failed | skipped reaches 100.

  • :wrench: Executa music / video jobs no longer need a per-invoke job quota (beta.197) β€” max_video_jobs is no longer minted or required on media_token; the hold/settle budget alone governs cost.


:toolbox: @anna-ai/cli 0.1.60 β†’ 0.1.61 β€” update now!

npm i -g @anna-ai/cli@latest
# or
pnpm add -g @anna-ai/cli@latest
  • :musical_note::framed_picture: Host bridges for music.* and async image.* (0.1.60) β€” the dev harness LlmBridge now routes host.music.{generate,getJob,cancelJob,listJobs} and host.image.{generateAsync,editAsync,getJob,cancelJob,listJobs,resign} to the platform with your dev token (same kind=complete token and jobId templating as video). Sync image.generate / edit behaviour is unchanged. In mock mode they answer from fixtures; without a bridge you get not_implemented β€” the same contract as runtime-local.
  • :last_quarter_moon: Theme & language switches in the dev dashboard (0.1.60) β€” the harness appends ?theme=&themeMode=&lang= to your iframe URL and the title bar gains :sun: / :crescent_moon: and EN / δΈ­ toggles that broadcast theme.changed / locale.changed to your App (logged and recorded). Test your dark mode and i18n without touching the Dashboard. :artist_palette:
  • :straight_ruler: agent.session.run maxTokens passes straight through (0.1.61) β€” zero CLI logic change; the harness forwards the full run params to /copilot/app/agent, so maxTokens and the new run_meta / task_complete fields work locally exactly as in production.
  • :package: Pins @anna-ai/app-runtime ^0.26.0 and @anna-ai/app-schema ^0.30.0 (dispatcher 0.30.0 β€” music.* Γ—4, image.* Γ—6 and maxTokens all validate locally); runtime-local 0.2.0a30 (anna-app-core β‰₯ 0.26.0, < 0.27 β€” host.image.* delegation included). Installed host_api/methods.json is byte-identical to matrix-nexus main. Verified against beta.200.

:puzzle_piece: Compatibility Notes

  • :green_circle: Everything is additive. music.*, async image.* + resign, params / fit / aspect_ratio, maxTokens, theme / locale, schema 0.28.0 β†’ 0.30.0 β€” all new. Apps that change nothing keep working. Sync image.generate / edit, audio.speak, video.* request shapes are untouched.
  • :yellow_circle: Output caps got bigger, not smaller. If your App relied on the implicit 8,192 cap in llm.stream or Agent runs for cost control, pass maxTokens explicitly. Watch task_complete.truncated instead of status to detect cut-offs β€” status was and still is completed in that case.
  • :yellow_circle: Feature-detect new namespaces: typeof anna.music?.generate === "function", typeof anna.image?.resign === "function". Older hosts / SDKs answer unknown_method / not_supported.
  • :yellow_circle: Music needs two gates: ui.host_api.music in the manifest and the user’s media_grant.music opt-in. Async image methods must be listed by name in ui.host_api.image; the existing image_grant (allowGenerate / allowEdit) covers them β€” editAsync counts as allowEdit.
  • :yellow_circle: fit defaults to "nearest" β€” identical to the old behaviour, but now echoed via sizeAdjusted. Switch to "strict" where exact dimensions matter.
  • :yellow_circle: Image catalog is fal-only. If you hard-coded a non-fal image model name, use anna.llm.catalog({ serviceType: "image_gen" }) and pick by isPlatformDefault / capabilities.
  • :yellow_circle: Error-code shifts: image content rejection -32003 β†’ -32115 IMAGE_CONTENT_REJECTED; new ranges -32113…-32117 (image jobs / resign), -32160…-32169 (music), -32149 AUDIO_OPTION_INVALID.
  • :green_circle: Window sizes: nothing breaks, but oversized min_size / default_size now emit validator warnings. Geometry must be integers (it always should have been β€” now the WM rounds for you).
  • :green_circle: Theme / locale arrive on hosts β‰₯ beta.198 only; keep the prefers-color-scheme CSS fallback.

:open_mailbox_with_raised_flag: Feedback Welcome!

Scoring a short film with anna.music, batching 4K posters as image jobs, or finally shipping that 40-page deck without a cut-off? We’d love to see it β€” and hear what’s missing. Voice settings, more voices, and reference-video inputs are still on the radar. :headphone:

Once again, community-powered: @HappyLight’s two reports fixed a regression and a pool leak, @martindelophy’s request became a whole new media family, @Yinghuo_Mars’s questions shaped the Playground, and @sadi’s diagnosis made Executas consistent everywhere. Detailed reproductions and real use cases are the fastest route from β€œrequest” to β€œshipped” β€” keep them coming! :flexed_biceps:

Happy building! :purple_heart::sparkles: