Skip to content

Add MCP events to the existing Tend work queue - #47

Draft
dshipper wants to merge 4 commits into
mainfrom
feat/mcp-events
Draft

dshipper wants to merge 4 commits into
mainfrom
feat/mcp-events

Conversation

@dshipper

@dshipper dshipper commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator

Queued user inputs in the existing Tend app can publish tend.work.ready through a private authenticated MCP endpoint. The subscribed feed's existing home conversation can claim the exact event reference and record ordinary instruction responses in the same work/card UI. Specialized work and external-action approval/verification retain the existing scoped workflow. No replacement app, UI, or database.

Adds signed callback verification, finite refreshable subscriptions, transactional durable publication, bounded retries with stable event IDs, interruption/duplicate handling, stale/canceled/rebound/lane-switched work guards, and removal of delivery secrets/grants from backups. Agent queue writes do not publish. The legacy dispatcher checks active subscriptions at tick and dispatch. Grant/revoke/attempt/settlement writes share the UI transaction owner, with callback networking outside the lock. Unsubscribe fences initial and final authorization waits.

Public IPv4 addresses are validated at DNS resolution and pinned to HTTPS sockets with original TLS hostname and certificate verification. The lookup callback honors scalar and all-address forms used by Node and Bun. Before correction, actual Node and Bun HTTPS requests reproduced ERR_INVALID_IP_ADDRESS and results.sort failures; the regression exercises the actual Bun lookup callback and aborts before any public request.

Validation of latest code: typecheck and lint; 529 tests passed, 1 optional local Supabase integration skipped; production build; compiled binary build/smoke/package. Frozen install and dependency audit passed, with no dependency changes. Includes 19 MCP-focused tests and deterministic concurrency, dispatcher, lane-switch, and actual transport regressions. Exact head ff80535 passed all three GitHub CI jobs (build/test/smoke, Supabase migration/bridge, native iPhone). Supabase startup initially hit a download rate-limit/502 error and passed on a targeted failed-job retry.

Live acceptance remains pending. Dan approved installation/live testing and bounded recovery from his original MacBook using existing Tailscale/SSH. The MacBook is online, but this Mac mini has no trusted/advertised MacBook SSH host key or loaded SSH identity. No SSH/Tailscale settings, credentials, user data, or live workers changed. No merge, deployment, or real-data import performed. Once trusted existing access is available, recover the original runtime consistently, verify actual feed bindings/policies, connect the private original MCP transport, and demonstrate one real UI queued instruction waking the actual parent/dot once and returning its response to the existing app. See docs/MCP_EVENTS.md.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant