Repository navigation
refactor: split the AssemblyAI API client into its own library - #229
Merged
Merged
Conversation
Gets the iPhone app ready for TestFlight. - Bundle ids move from the dev.alex placeholders to com.assemblyai.blurt.ios (app, .keyboard, .core, .tests, .probe), the App Group to group.com.assemblyai.blurt.ios, and the term-pack type to com.assemblyai.blurt.terms. The Darwin notification names, log subsystem, queue labels and scripts follow. The Mac app keeps its dev.alex ids: changing them would orphan Sparkle updates and its granted Accessibility permission. - API-key entry is no longer debug-only. Sign in with AssemblyAI doesn't exist yet, so a TestFlight build had no way to add a key. The setup card and Settings now offer "Paste your key" and "Get a free key" in every build, as the Mac app does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
App Review 5.1.2(i) requires clearly disclosing where personal data goes, third-party AI included, and getting explicit permission first. The listening window now won't open until the user agrees, in a sheet that names AssemblyAI, lists what is sent (the voice while dictating, the text before the cursor, recent dictations, key terms with contact names) and links the privacy policy. Every path to the microphone goes through startListening(), so one gate covers the button, the keyboard's blurt://start and in-app dictation. Consent is versioned (AIConsent): sending something new means a new version, and everyone is asked again. Settings' About section links the privacy policy too. The debug -BlurtStartListening flag grants consent, since scripted runs can't tap through the sheet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The iPhone project pulled the app icon and the wordmark straight out of the Mac app's folder, so a Mac-side move or rename would have broken the iPhone build. Both now live in a top-level Design/brand that each project references directly; neither app's folder is a dependency of the other. The Mac project lists them explicitly (it used to get them by including its whole Blurt folder) and its project.pbxproj is regenerated. Both app bundles still carry the icon and logo. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The package gains a second library, AssemblyAI, that BlurtEngine is built on: the HTTPTransport seam and its streamed upload body, the dictation wire types and multipart framing, and APIKeyValidator. It holds no Blurt policy, so it can become a standalone Swift SDK; the engine keeps everything that is a Blurt decision (the prompts, the cleanup instruction and styles, key storage, logging, the User-Agent). A pure move: no request, header or response handling changes. The wire types un-nest from AssemblyAITranscriber and become public, the SDK gets its own logger and URL helper, and the validator takes its User-Agent as a parameter. APIKeyValidator.blurt() is where Blurt's agent joins it, and both apps now use it, so their key checks still send `Blurt/<version> (…)`. A new test pins that the SDK's validator sends only the agent it's given. SyncSTTLimits.pcmBytes(forSeconds:) goes: its one caller, the upload buffer, now lives in the SDK and states its own size. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 tasks done
he-james
requested review from
alexkroman and
nbisht-aai
and removed request for
nbisht-aai
October 2, 2026 22:39
he-james
marked this pull request as ready for review
October 2, 2026 22:40
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
he-james
force-pushed
the
jhe/assemblyai-sdk
branch
from
October 2, 2026 23:11
29ba1d3 to
c552cd0
Compare
nbisht-aai
approved these changes
Oct 14, 2026
Resolves App/BlurtiOS/project.yml: keeps this branch's AssemblyAI product link and main's per-target TARGETED_DEVICE_FAMILY "1", camera purpose string, build 2 (#245) and Design/brand paths (#228). main's new read-aloud code (#225) uses HTTPTransport, which this branch moves into the AssemblyAI module, so ReadAloudLLM.swift and the tests that reach it (ReadAloudLLMTests, AssemblyAISpeechSynthesizerTests, AssemblyAITranscriberTests, AsyncStreamFixtures) now import AssemblyAI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Starts the AssemblyAI Swift SDK: a second library in the package,
AssemblyAI, thatBlurtEngineis built on. It holds only the generic API client, so it can be pulled out later; the engine keeps every Blurt decision.AssemblyAI(new)BlurtEngine(unchanged role)HTTPTransport+ChunkedRequestBodySTTPrompt,KeytermsBoost),CleanupInstruction, stylesDictationMultipartUser-AgentAPIKeyValidatorAssemblyAITranscriber, which composes the twoA pure move: no request, header or response handling changes.
AssemblyAITranscriberand become public.User-Agentas a parameter;APIKeyValidator.blurt()adds Blurt's, and both apps use it, so desktop key checks still sendBlurt/<version> (…).SyncSTTLimits.pcmBytes(forSeconds:), whose only caller moved.Stacked on #228.
How it was tested
swift test: 710/710, including the suites that pin the multipart framing, wire keys, chunked upload andUser-Agent; one new test pins the SDK validator's agent handling.Mac app builds in Debug and Release (unsigned); periphery clean; iOS gates pass (134/134).
Engine coverage locally 88.05%, unchanged in practice (the gate reads lower on this machine than on CI, as on
main).I read AGENTS.md and this doesn't reintroduce anything deliberately removed
Docs updated (AGENTS.md map, engine README,
Sources/AssemblyAI/README.md)🤖 Generated with Claude Code