Skip to content

feat: Cap App Store on web and desktop - #4264

Open
richiemcilroy wants to merge 52 commits into
mainfrom
feat/app-store
Open

richiemcilroy wants to merge 52 commits into
mainfrom
feat/app-store

Conversation

@richiemcilroy

@richiemcilroy richiemcilroy commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

Cap gets an App Store, on the web and in Cap Desktop at the same time. Anyone can build an app by adding a folder to app-store/apps and opening a pull request. Apps declare what they add, and Cap draws every pixel itself, so apps look native, stay fast and keep working when Cap's design changes.

One store, one kind of app

There is one catalog and one noun. An app lists what it contributes, Cap works out where it runs from that, and an install belongs to the account, so installing once makes it work everywhere.

flowchart LR
  repo["app-store/apps/&lt;id&gt;<br/>manifest.json, icon, README, images"] -->|bun app-store validate| ci[CI guards]
  repo -->|bun app-store build| catalog["catalog.json + content-addressed assets<br/>(served by the web app, cached immutably)"]
  catalog --> web["Web<br/>/dashboard/apps"]
  catalog --> desktop["Cap Desktop<br/>Settings, Apps"]
  web --> installs[("app_store_installations<br/>per user or per organization")]
  desktop --> installs
  installs --> events["Cap events<br/>cap.ready, transcript, summary, comment"]
  events -->|"signed Ed25519 POST"| server["App's own server"]
Loading
What an app adds Where it shows up Code?
backgrounds (image, gradient, color) Editor background picker, new Apps tab None
captionStyles Editor caption presets, "From your apps" None
colorLooks Editor Color tab, "From your apps" None
connection.settings A form Cap renders at install, on web and desktop None
connection.actions Cap menu on the web, recording cards on desktop Author's server
connection.events Signed deliveries with retries Author's server

A manifest

{
  "$schema": "../../manifest.schema.json",
  "apiVersion": 1,
  "id": "discord",
  "name": "Discord",
  "version": "1.0.0",
  "description": "Post new Caps to a Discord channel automatically, or share any Cap to Discord in one click.",
  "author": { "name": "Cap", "github": "CapSoftware" },
  "license": "MIT",
  "categories": ["communication"],
  "privacyPolicy": "https://cap.so/privacy",
  "connection": {
    "url": "/api/app-store/first-party/discord",
    "events": ["cap.ready"],
    "settings": [
      { "key": "webhookUrl", "type": "secret", "label": "Channel webhook URL", "required": true },
      { "key": "postNewCaps", "type": "toggle", "label": "Post every new Cap", "default": false }
    ],
    "actions": [{ "id": "post", "title": "Post to Discord", "target": "cap" }]
  }
}

The schema lives once, as Effect Schema in packages/app-store/src/manifest.ts. The validator, the catalog builder, the web app and the generated app-store/manifest.schema.json (editor autocomplete) all come from it. The desktop app parses a catalog built by the TypeScript side (packages/app-store/test/fixtures/catalog.golden.json) in its Rust tests, so the two cannot drift silently.

Connections

Cap calls the app's server and never the other way round. Every request is signed with Ed25519 (derived from the server secret via HKDF, public key at /.well-known/cap-app-store-keys.json), so no secret has to reach an author before the first request.

sequenceDiagram
  participant U as Person
  participant C as Cap
  participant A as App server
  U->>C: Install, fill settings (secrets encrypted at rest)
  C->>A: POST {url}/lifecycle  installed
  Note over C: Cap finishes uploading
  C->>A: POST {url}/events  cap.ready (workflow, retries about a day)
  U->>C: Cap menu, "Send to My App"
  C->>A: POST {url}/actions/send
  A-->>C: { "type": "toast", "message": "Sent" }
  C-->>U: Toast, or opens an https URL
Loading
const result = verifyCapRequest({ headers: request.headers, body, keys });
if (!result.ok) return new Response("Unauthorized", { status: 401 });
  • Payloads carry only what was granted: the basics always, plus transcript, AI summary or comments per permission (apps/web/lib/app-store/payload.ts).
  • New permissions in an update are not applied until someone accepts them on the app's page.
  • Delivery reuses the Infra webhook rules: https only, public addresses only, no redirects, a 10 second limit, the same retry schedule, and auto-pause after sustained failures (apps/web/lib/app-store/delivery.ts).
  • First-party connections use the same protocol, dispatched in process from a relative URL, so self-hosted Cap serves its own (apps/web/lib/app-store/first-party/).
  • cap.ready skips Loom imports and Caps older than seven days, and every event is deduplicated through app_store_events, so a recovery path can never repost old Caps.

Guards for builders

bun app-store validate runs in CI on every PR (.github/workflows/ci.yml). It checks:

  • The manifest matches the schema exactly.
  • The id matches the folder, is kebab-case and avoids reserved words.
  • The version goes up whenever the folder changes compared with main.
  • The icon is 512x512 and under 256 KB.
  • Images are real PNG, JPEG or WebP within size limits; there are no unreferenced files, hidden files, symlinks or executables; the folder is at most 25 MB.
  • Connections use public https URLs, link a privacy policy, and ask for every permission their events need.
  • Only Cap can publish built-in apps.

Everything a person checks is in app-store/GUIDELINES.md. app-store/blocked.json is the kill switch.

Shipping with

Aurora (8 generated mesh backgrounds plus 2 gradients), Studio Captions (5 styles), Film Looks (6 looks), Discord, and Slack, Amazon S3 and Google Drive as built-in apps that open their existing setup.

Web

Browse App page
Browse Aurora
Captions Discord installed
Cap menu actions Action result
Menu Toast

Desktop

Settings, Apps

  • apps/desktop-gpui/src/app_store/: catalog sync with an on-disk cache, installs synced with the account (local installs while signed out, adopted on sign-in), content-addressed asset downloads verified by SHA-256 before use.
  • Editor: Apps sub-tab in the background picker (editor_sidebar/app_backgrounds.rs), app caption styles and color looks next to the built-ins.
  • Recording cards: one button per installed action, with the result shown in place.
  • All new strings in all seven locales.

Reserved for later API versions

The manifest has apiVersion, and each client only receives apps it understands. Later versions can add WGSL shader transitions, WebAssembly device code (frozen WIT per version, as Zed does) and scoped API tokens without touching apps written for version 1.

Before merge

  • packages/database/migrations/0062_app_store.sql adds app_store_installations and app_store_events, so it needs a PlanetScale deploy request.

RetriggerView in GreptileConfidence Score: 5/5

The latest changes appear safe to merge.

Summary

Adds one App Store for the web and desktop, with account-owned installs, editor content, and signed requests to app servers.

  • App folders now build into one checked catalog for Cap clients.
  • People can browse apps and manage installs for themselves or an organization.
  • Cap sends permission-based events and actions to signed app connections.
  • Cap Desktop can sync the shared catalog and manage account app installs.
  • Installed apps add backgrounds, caption styles, and color looks to the editor.
  • Recording cards can run actions from installed apps.
  • Cap cards can run installed app actions from the web menu.

Reviews (3) · Last reviewed commit: "fix(desktop): show Cap actions as soon a..." · Reviewed by Greptile

@vercel

vercel Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
cap-status Skipped Skipped Nov 16, 2026 9:35pm UTC

Comment thread apps/web/lib/app-store/events.ts Fixed
@sandchest-com

sandchest-com Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Sandchest

Sandchest reviewed 363fc9e: nothing exploitable found in this change.

Sandchest reviews every change for vulnerabilities an attacker could use · 25 credits · Review details

Comment thread apps/web/lib/app-store/delivery.ts Resolved
Comment thread apps/web/lib/app-store/events.ts Resolved
Comment thread apps/desktop-gpui/src/app_store/mod.rs Resolved
Comment thread apps/web/lib/app-store/connection.ts Resolved
Comment thread apps/desktop-gpui/src/editor_color.rs Resolved
Comment thread apps/desktop-gpui/src/app_store/mod.rs Resolved
Comment thread .github/workflows/ci.yml Resolved

@capy-ai capy-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capy found 6 potential issues (2 high, 4 medium).

View 2 other findings in Capy.

Open in Capy

Comment thread apps/web/lib/app-store/delivery.ts Resolved
Comment thread apps/web/lib/app-store/settings.ts Resolved
Comment thread apps/web/lib/app-store/events.ts Resolved
Comment thread turbo.json Resolved
Comment thread apps/desktop-gpui/src/app_store/mod.rs Resolved
Comment thread apps/desktop-gpui/src/app_store/mod.rs Resolved
@vercel
vercel Bot temporarily deployed to Preview – cap-status November 14, 2026 07:15 Inactive

@capy-ai capy-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capy found no issues.

View 1 other finding in Capy.

Open in Capy

# Conflicts:
#	apps/web/app/(org)/dashboard/_components/Navbar/Top.tsx
@vercel
vercel Bot temporarily deployed to Preview – cap-status November 16, 2026 21:35 Inactive

@capy-ai capy-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capy found no issues.

View 2 other findings in Capy.

Open in Capy

This branch was successfully deployed

1 active and 1 inactive deployments
Preview – cap-web — 363fc9e5 Deployed Nov 16, 2026 by vercel[bot]
Preview – cap-status — 363fc9e5 Deployed Nov 16, 2026 by vercel[bot]
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.

2 participants