Automation surface: API, CLI, MCP server, Shortcuts (one action registry) #478

Open
opened 2026-10-16 07:22:08 +00:00 by kayg · 1 comment
Owner

kayg (2026-10-16), from the voice grill (VO5): every capture path must also be automatable outside the app, so people without Apple devices, and their agents, can automate Calternal.

Surfaces:

  • a public HTTP API (the action pipeline, token auth);
  • a CLI;
  • an MCP server;
  • Apple Shortcuts / App Intents in the native apps.

All of them reuse the same action registry, with no separate logic. Grill first.

kayg (2026-10-16), from the voice grill (VO5): every capture path must also be automatable outside the app, so people without Apple devices, and their agents, can automate Calternal. Surfaces: - a public HTTP API (the action pipeline, token auth); - a CLI; - an MCP server; - Apple Shortcuts / App Intents in the native apps. All of them reuse the same action registry, with no separate logic. Grill first.
Author
Owner

kayg (2026-10-16): the CLI, API and MCP must be extremely fast, and every surface uses ONE event route, the Apple apps included.

MCP Events. Support MCP Events (protocol 2026-07-28, https://developers.openai.com/plugins/build/mcp-events) while staying backward compatible:

  • Capability: capabilities.events: {} in server/discover.
  • Methods: events/list (with inputSchema/payloadSchema), events/subscribe (name, arguments, delivery {mode,url,secret}, cursor, with id/refreshBefore/cursor/truncated returned), and events/unsubscribe.
  • Delivery: an HTTPS webhook POST of {eventId,name,timestamp,data,cursor}, signed with Standard Webhooks headers plus X-MCP-Subscription-Id. Bodies are capped at 256 KiB, the callback is verified with a signed challenge, and failures return error -32015.
  • Subscriptions: idempotent, persistent, refreshed before expiry; replayable with cursors.
  • Older clients (no events capability) keep working with the existing tools, plus resource subscriptions and update notifications where the client supports them.

One event route. The server's change journal is the single source of events:

  • its position is the cursor;
  • it's replayable;
  • it's filtered per user and per subscription, server-side.

Every consumer reads that same stream:

  • the web app (WebSocket);
  • the Rust client in the Apple apps (crates/client);
  • calternal watch in the CLI;
  • the public API (a streaming endpoint);
  • MCP Events webhooks.

None of them gets its own event logic. MCP event cursors map directly to journal positions.

**kayg (2026-10-16): the CLI, API and MCP must be extremely fast, and every surface uses ONE event route, the Apple apps included.** **MCP Events.** Support MCP Events (protocol 2026-07-28, https://developers.openai.com/plugins/build/mcp-events) while staying backward compatible: - **Capability:** `capabilities.events: {}` in `server/discover`. - **Methods:** `events/list` (with `inputSchema`/`payloadSchema`), `events/subscribe` (`name`, `arguments`, `delivery {mode,url,secret}`, `cursor`, with `id`/`refreshBefore`/`cursor`/`truncated` returned), and `events/unsubscribe`. - **Delivery:** an HTTPS webhook POST of `{eventId,name,timestamp,data,cursor}`, signed with Standard Webhooks headers plus `X-MCP-Subscription-Id`. Bodies are capped at 256 KiB, the callback is verified with a signed challenge, and failures return error -32015. - **Subscriptions:** idempotent, persistent, refreshed before expiry; replayable with cursors. - **Older clients** (no events capability) keep working with the existing tools, plus resource subscriptions and update notifications where the client supports them. **One event route.** The server's change journal is the single source of events: - its position is the cursor; - it's replayable; - it's filtered per user and per subscription, server-side. Every consumer reads that same stream: - the web app (WebSocket); - the Rust client in the Apple apps (`crates/client`); - `calternal watch` in the CLI; - the public API (a streaming endpoint); - MCP Events webhooks. None of them gets its own event logic. MCP event cursors map directly to journal positions.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal#478
No description provided.