Add the MessagesCore library product with the reads a mirror needs (#1) #3
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
needs-info
needs-triage
question
ready-for-agent
ready-for-human
svd:go
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dev/apple-messages-blade-mcp!3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue-1-messagescore"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #1
What this change does
It splits the package into two library products and adds the read-only reads that a mirror of the history needs.
MessagesCoreholds the read-only store, the schema, the models, the typedstream decoder, the config and the errors. It depends on SQLite only and links no MCP package.AppleMessagesBladedepends onMessagesCore, re-exports it, and keeps the nine tools and the attachment byte reader.The two commits
641923f60b3de5Acceptance criteria
MessagesCorebuilds with no MCP dependencyMessagesCoretarget depends on theSQLiteproduct only.testCoreHasNoMCPDependencyproves it.Tests/AppleMessagesBladeTestshas no diff. 28 tests run, 3 live smoke tests skip, 0 fail.MessagesCoreTests: 34 tests, 0 failures. They cover each case that the issue names.Connection(, opened withreadonly: true. Every statement is aSELECT.testPackageSourcesContainNoWriteSQLguards both.v0.2.0tagCHANGELOG.md[Unreleased]is complete.Version.swiftis not changed; the owner bumps it in the tag commit.Fixes from the review
try!inside SQLite.swift. It now throws. This defect was in the code before this change, and the fix holds for the nine tools too.testStepErrorThrowsAndDoesNotTraptraps the test process when the old loop is restored.INlist binds at most 500 values.The seven additions in
60b3de5messages(withGUIDs:): the rows of a list of guids.ChatWithMembers.styleandisGroup: the storedchat.stylevalue.highestIssuedMessageRowID(): it does not fall when the newest row is deleted.messagesByDateDescending(before:limit:inChatOnly:): a newest-first page by the stored date.MirrorMessage.chatIDs: every chat that holds the row.RecentlyDeletedRecord.chatIDs,isFromMe,senderHandleIDandsenderHandle.TapbackKind.other: a Tapback code that the package does not know still gives its target.What a reviewer should know
README.mdchanged. It has a new "Products" section. It states whatMessagesCorepromises to a consumer, and what it leaves to that consumer: the deny list, the redaction and the access control. The section "No external exposure" now binds theAppleMessagesBladetools only.chat.style43 and 45,date_edited, the unit ofchat_recoverable_message_join.delete_date, the Tapback codes 2006 and 2007, and thedeleted_messagestable.schemaReport()on a real history is the check. The owner runs it.swift teston macOS.swift-formatis not installed on the build host.v0.2.0tag and theVersion.swiftbump. The owner does both.🤖 Generated with Claude Code
MessagesCorewith one private-network address #9MessagesCorewith one private-network address #9