Skip to main content

amba 4.0.4 copy "amba: ^4.0.4" to clipboard
amba: ^4.0.4 copied to clipboard

amba SDK for Flutter — the full 4.0 surface (auth, users, sessions, sync, leagues + 29 more namespaces) for the agent-native backend-as-a-service.

Changelog #

All notable changes to the amba Flutter SDK are documented here. Format follows Keep a Changelog; versions follow SemVer.

4.0.4 — 2026-10-15 #

Changed #

  • inventory.purchase returns InventoryPurchase (purchased, currencyCode, price, balanceAfter). It was typed as an InventoryItem, which the route never returned; read the bought item with inventory.items().
  • ReferralClaim.referrerId is nullable: a code no user owns has no referrer.

Server behavior #

These ship with the API, so apps on earlier versions get them without an upgrade.

  • config.fetch() evaluates each key's segment and percentage conditions for the signed-in user. Before sign-in, or with an expired session token, it returns each key's default value as before.
  • Deep links, inventory, content items, friendships and referral codes come back with the fields the SDK types declare, so deepLinks.get, inventory.getItems / getItem / consume, content.library / item / createItem / updateItem, every friends method and referrals.getReferralCode / claimReferral return their typed results. Earlier these calls failed reading the response, after the server had already made the change. Claiming a code no user owns needs this version.
  • inventory.consume({ item_id }) takes the catalog item id or the id of a row from inventory.getItems().
  • A single-item inventory.purchase response also carries the inventory row it added to, so earlier versions read it without failing; a bundle purchase needs this version.
  • Each Apple or Google sign-in nonce is accepted once; sending a sign-in or link request again with the same nonce returns 401 NONCE_REUSED.
  • DELETE /v1/client/users/me/push-token deactivates only the signed-in user's own tokens.

4.0.3 — 2026-10-14 #

Security #

  • Ids, keys, short codes and names placed in a request path are percent-encoded, so /, ? and # stay part of the value and the request keeps its route. An id of ., .. or the empty string fails with VALIDATION_ERROR before any request is sent.

Server behavior #

  • New free-tier projects can receive 402 FREE_TIER_LIMIT_REACHED from the sign-in request calls (magic link, email OTP, SMS OTP) once the project's daily sign-in budget is spent, and from email sends, which are a paid feature on those projects. The error's details.limit names the limit and details.upgrade carries the one-call upgrade. Projects created before the free-tier limits keep their previous behavior, and no SDK upgrade is needed.
  • A free project owned by an agent sandbox account that nobody has claimed answers writes with 403 SANDBOX_CLAIM_REQUIRED once it has spent 14 days in that account, until the account is claimed.

Added #

  • Amba.offerings([offeringId]) / AmbaClient.offerings — subscription offerings (the packages your paywall renders, provider-neutral). Pass an offering id for one offering; omit it for all. Parity with Web/Node and the iOS/Android 4.1.0 SDKs.
  • Amba.entitlements.restore() — Restore Purchases: re-syncs the user's owned entitlements server-side and returns the active set (the App Store 3.1.1 requirement). Fails without changing access when the validation engine is unreachable.

Both methods are generated from the same single-source surface manifest that drives every other Amba SDK, so the Flutter surface can no longer silently lag the rest of the family.

4.0.2 — 2026-05-27 #

Version-alignment release across every published Amba package. Brings the infra-tier packages (@layers/amba, @layers/amba-shared, @layers/amba-mcp — previously on 1.x) onto the same 4.x track as the SDKs so customers can pin a single version everywhere. No surface or behavior changes in this SDK.

Removed from the package family in this release: the deprecated @layers/amba-functions and @layers/amba-client packages were unpublished from npm. Amba functions are plain ES modules with the standard export default { async fetch(req, env, ctx) } shape — no wrapper. See docs.amba.dev/functions/runtime for the full contract.

4.0.1 — 2026-05-26 #

Version-alignment release across every Amba SDK. No surface or behavior changes — bumps every SDK (web, node, react, react-native, expo, core, kotlin, swift, flutter, unity) to 4.0.1 so customers can pin to a single version across stacks. See sdks/CANONICAL_API.md for the 4.0 surface.

4.0.0 — 2026-05-25 #

Coordinated 4.0 release across every Amba SDK. All 9 SDKs ship the same surface on the same day; see the canonical spec at sdks/CANONICAL_API.md for the per-method contract.

Breaking #

  • Amba.messaging.getMessage(messageId) now takes (conversationId, messageId) and returns Message? (null when the message can't be found). The pre-4.0 single-arg form called a non-existent FFI symbol — every call threw ArgumentError at dispatch, so no working customer code can be affected.

Added — net-new namespaces #

  • Amba.users — get(userId?), update(patch, {userId?}).
  • Amba.sessions — list(), revoke(sessionId). List/revoke the customer-defined app sessions; distinct from the auth JWT envelope.
  • Amba.sync — pushChanges([SyncChange]), pullChanges(entityType, checkpointToken?). Offline change replay with server-wins conflicts.
  • Amba.leagues — me(), cohort(). Tiered weekly leaderboard cohorts; cohort listings are anonymised (display name only, no user ids).

Added — net-new methods on existing namespaces #

  • Amba.auth.requestMagicLink(email), verifyMagicLink(token), linkAccount(provider, credential).
  • Amba.collections.findNearest(name, vectorField:, queryVector:, k:, filter?) and count(name, filter?).
  • Amba.storage.list(prefix?), delete(assetId), download(assetId) (returns Uint8List — the native core base64-encodes inside a {data:"…"} envelope to keep the FFI ABI string-only; the wrapper decodes on the platform side).
  • Amba.messaging.createConversation({participants, conversationType?, name?}), listMessages(conversationId, {limit?, offset?}), markRead(conversationId).
  • Amba.friends.sendRequest(userId), acceptRequest(friendshipId), declineRequest(friendshipId).
  • Amba.catalog.get(id).

Fixed #

  • Amba.messaging.getMessage — the native core added the long-missing amba_messaging_get_message(conv_id, msg_id) symbol; the wrapper now actually dispatches instead of ArgumentError'ing out. Returns null when the message isn't in the first 5,000 entries of the conversation (the helper paginates list_messages internally since the server has no GET-by-id route).

Test coverage #

  • New tests for every method added above, including the OTP path (zero coverage pre-4.0).

1.0.2 — 2026-05-20 #

Added #

  • Amba.diagnostics.ping() — wire-verify primitive. Call once after Amba.configure(...) to confirm the SDK is talking to the right project with the right API key in the right environment. Returns a PingResult whose fields (serverProjectId, environment, keyFingerprint, latencyMs) are all server-decided, so comparing serverProjectId against the configured project id catches "wrong key in .env" silent failures on the spot. Mirrors the TypeScript SDKs' Amba.diagnostics.ping() shape (added in 1.0.0).
  • dart:developer log() calls from the SDK now use name: "amba-sdk", so Flutter DevTools / flutter logs filtering on that name surfaces amba's own diagnostics without dragging in app-side log noise. The SDK never calls print().

Known limitations #

  • The published xcframework still ships the iOS device slice only (arm64) — unchanged from 1.0.1. Running on an iOS simulator requires building a simulator slice locally. iOS device builds, App Store archives, and Android (all four ABIs) are fully supported out-of-box. The simulator-slice download follow-up tracked in 1.0.1 is still pending.

1.0.1 — 2026-05-20 #

Fixed #

  • Bundled prebuilt native binaries for Android (arm64-v8a, armeabi-v7a, x86_64, x86) and iOS device (arm64) so flutter build apk and flutter build ipa succeed without any local build step.
  • Added android/src/main/kotlin/com/layers/amba/AmbaPlugin.kt and ios/Classes/AmbaPlugin.swift plugin stubs required by Flutter's plugin registration mechanism.
  • Added android/build.gradle, android/src/main/AndroidManifest.xml, and ios/amba.podspec needed for Flutter to discover and link the plugin.
  • Fixed Amba.version constant to match the published package version.

Known limitations #

  • The published xcframework ships the iOS device slice only (arm64). Running on an iOS simulator requires building a simulator slice locally — a follow-up release will add an automated podspec prepare_command that downloads the matching slice on pod install. iOS device builds, App Store archives, and Android (all four ABIs) are fully supported out-of-box.

1.0.0 — 2026-05-16 #

Initial public release of the amba Flutter SDK on pub.dev.

Added #

  • Amba client class wrapping the Amba backend API for Flutter apps: configure with project id + client key; track events; anonymous sign-in; authenticated sign-in via magic link; collection CRUD; AI prompt invocation.
  • Smoke test fixtures under test/integration/ exercising the public surface against a live tenant.
0
likes
0
points
238
downloads

Publisher

unverified uploader

Weekly Downloads

amba SDK for Flutter — the full 4.0 surface (auth, users, sessions, sync, leagues + 29 more namespaces) for the agent-native backend-as-a-service.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

ffi, flutter, plugin_platform_interface

More

Packages that depend on amba

Packages that implement amba