Repository navigation
feat!: pin @corbits/mailbox 1.0 (native MailboxStore); chat sends mail; inbox route deleted (CL-8174, CL-8209) - #795
Merged
Merged
Conversation
Bumps every github:corbitsdev/corbits-mailbox pin to e85b81e4 (1.0.0, breaking): mountMailbox now takes resolvePrincipal/senderAddressFor/deliver instead of a vocabulary, routes live under /me/inbox*, and refs, triage, snooze, and batch writeMailboxMessages are gone in favor of a single-append NativeMailboxStore. - apps/hub: mailbox-persist.ts drops the retired resolveRefs seam; the mailbox mount's own deliver reuses the same dual-write persistMail path every outbound agent frame already goes through, and senderAddressFor resolves a human's `<principalId>@<tenant domain>`. The @corbits/inbox product-inbox routes are deleted (CL-8209): they sat on removed @corbits/mailbox APIs and no web surface reads them any more. - packages/chat: mailbox-fanout.ts writes one writeMailboxMessage append per recipient (outbound to Sent, inbound to INBOX) instead of a batch transaction, since the native store has no multi-row batch. - packages/chat-ui: mailbox-timeline.ts (the only mailbox reader UI-side) reads GET /me/inbox/threads instead of the retired /me/threads+refs API. A workbench is a plain tenant now, so a tenant's own mailbox is already its one room's mail — there is no ref to filter by any more. - packages/inbox: deletes the thread-client, routes, and every module built on removed @corbits/mailbox exports (vocabulary, group, bulk/bulk-run, cursor, project, walk); keeps only the @corbits/notify delivery adapter and this package's own migration ledger. Tests exercising retired behavior (batch-transaction atomicity, ref stamping, triage grouping) are deleted rather than adapted, per the hard-cutover rule.
Rebasing onto main's CL-8217 tools/workflows/agents/skills restructuring moved package paths the lockfile and report-error baseline both track.
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.
Summary
github:corbitsdev/corbits-mailboxpin toe85b81e4(1.0.0, breaking) acrossapps/hub,packages/chat,packages/inbox.apps/hub/src/index.ts: themountMailboxcall is rewritten for the newresolvePrincipal/senderAddressFor/delivermount contract —senderAddressForderives<principalId>@<tenant domain>, anddeliverreuses the same dual-writelookups.persistMail(createMailboxPersist) every outbound agent frame already goes through, so a human'sPOST /me/inbox/sendand an agent's own outbound mail share one delivery path (live run via the vendored session/mail routing, human recipients via the mailbox dual-write).apps/hub/src/mailbox-persist.tsdrops the retiredresolveRefsseam (refsno longer exists on the package).@corbits/inboxproduct-inbox routes (createInboxRoutes, mounted at${TENANT_PREFIX}/inbox) are deleted (CL-8209): they sat entirely on removed@corbits/mailboxAPIs (listUserMailbox, refs, classification), and no web surface reads them any more —/inboxin the web app only bounces old links home (CL-6151).packages/chat/src/mailbox-fanout.ts: writes onewriteMailboxMessageappend per recipient (outbound →Sent, inbound →INBOX) instead of the retired batchwriteMailboxMessagestransaction — the native store has no multi-row batch.refsstamping is gone.packages/chat-ui/src/mailbox-timeline.ts(the single browser-side mailbox adapter) now readsGET /me/inbox/threadsinstead of the retired/me/threads+refsAPI. Since a workbench is a plain tenant (CL-8083), a tenant's own mailbox already is that one room's mail, so there's no per-room ref filter to apply any more.packages/inboxis trimmed to just the@corbits/notify→@corbits/mailboxdelivery adapter (delivery.ts, rewritten againstdeliverInboxItems's new no-refsInboxItemshape) and its own migration ledger (migrations.ts). Deleted:routes.ts,thread-client.ts,client.ts,vocabulary.ts,group.ts,project.ts,bulk.ts,bulk-run.ts,cursor.ts,walk.ts, and their tests — all built on removed@corbits/mailboxexports.What's left on the old chat send path
The composer's send action (
useOptimisticSends→sendMessageinpackages/chat-ui/src/api.ts) still posts through the existing chat message route, notPOST /me/inbox/senddirectly — that route's server-side fan-out (writeChatMailboxFanout) already lands the mailbox copy via the rewrittenmailbox-fanout.tsabove. Wiring the composer to call/me/inbox/senddirectly (withinReplyToset to the thread root Message-ID) is follow-up work, not done here.Test plan
bun run typecheck— greenbun run lint/bun run fmt:check— greenbun run check:structural— greenbun test— green except 7 packages with pre-existing failures unrelated to this change (@intx/hub-agent,@corbits/workbench-digest-workflow,@corbits/workflows,@corbits/webhook-triggers,@workbench/onboarding,@corbits/chat'splatform-adapter.test.tslaunch/deploy fixtures,@corbits/chat-ui's act()/happy-dom teardown flakiness) — none reference mailbox/inbox and none touch files this PR changespackages/inbox/test/delivery.test.ts,apps/hub/test/mailbox-persist.test.ts,apps/hub/test/notify-delivery.test.ts) were rewritten for the new API but not run against live Postgres in this session (port 5432 was already bound by another worktree's compose); CI'sdb-suites/e2e-suitejobs will exercise them