---
title: "How Podstead works"
description: "Where requests, media, and podcast state go."
---

> Documentation Index
> Fetch the complete documentation index at: https://podstead.wking.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# How Podstead works

There are two paths: managing the podcast and listening to it.

## Managing the podcast

```text
Agent, CLI, or task view
          ↓
Cloudflare Worker: authentication and operation routing
          ↓
Directory Durable Object: shows and agent grants
Podcast Durable Object: one per show, with SQLite storage
          ↓
R2: private uploads and published files
```

MCP, HTTP, CLI, SDK, and task views use the same operation contracts. They do not each have a separate publishing implementation.

The Directory records shows and permission grants. Each podcast gets its own Durable Object to coordinate revisions, release jobs, and publishing. OAuth protocol state lives in KV.

## Listening

```text
Podcast app or listener
          ↓
Your public media hostname
          ↓
R2: RSS, audio, artwork, chapters, optional show page
```

Public downloads bypass the podcast Durable Object. The podcast does not need an always-on server to serve each listener.

## Working content and released content

A save creates a private revision. A release selects exact show and episode revisions. The publisher uses that selection, not whatever draft happens to be newest when it runs.

A manifest is the stored list of revisions that make up the released show. It keeps original episode publication dates and the references needed to rebuild the feed consistently.

## Publishing safely

The publisher freezes a generation, makes media available, writes chapters and the optional page, then writes RSS last. It commits the released manifest after the public writes complete.

R2 and SQLite cannot commit as one transaction. During a retry, a public file can already show the accepted generation while the release still says `publishing`. Retrying uses the same frozen content. Only `completed` confirms the full job finished.

Cloudflare alarms wake scheduled and retrying jobs. The object sleeps when it has no work. There are no queue services, cron scans, or always-on application servers in this stack.

[Release states](https://podstead.wking.dev/docs/architecture/releases/)

## Code map

| Location | Responsibility |
| --- | --- |
| `packages/contracts` | Inputs, outputs, operations, and capabilities |
| `packages/core` | Revisions, release policy, state transitions, and publishing |
| `apps/worker/storage` | SQLite tables, indexes, and migrations |
| `src` | Cloudflare adapters, HTTP, MCP, OAuth, distribution, and feed rendering |
| `packages/sdk` | Effect client and upload transport |
| `packages/cli` | Commands, local file access, stdio MCP, and installation |
| `packages/ui` and `apps/task-ui` | Kumo components, task views, and host adapters |
| `infra` | Alchemy installation stack |
| `sites/docs` | These Nimbus docs |

[Detailed architecture](https://github.com/wking-io/podstead/blob/main/docs/architecture.md) · [State-machine map](https://github.com/wking-io/podstead/blob/main/docs/state-machines.md)

Source: https://podstead.wking.dev/docs/architecture/index.mdx
