Repository navigation
feat(workflows): graph nodes that publish to feeds and make episodes - #547
Merged
Merged
Conversation
Select assets and Select activities pick what came in since the routine last ran (or in a period) in its namespaces; Publish to feed adds it to a feed and Podcast episode makes an episode about it, added to a feed once made. A feed must be in a namespace the run covers, items stay bounded by the feed's readers, and an episode drops sources its namespace couldn't read. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CDEiKGoyQX8Vmnv9bi5JpD
21 of 23 tasks
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.
Description
Before: a feed was filled by hand, through
POST /api/v1/feeds/{id}/itemsor thepublish_to_feedMCP tool, and a podcast episode was asked for one at a time. Nothing ran on a schedule.After: a graph workflow picks part of the graph and publishes it, so a routine fills a feed or makes an episode every day or week. Four nodes: Select assets passes on the resources in the routine's namespaces (or the namespaces named) that came in since the routine last ran, or in the past day, week or month, or all of them, matching words, topics, entities and status, newest first and at most a limit (podcast episodes left out unless asked, so an episode is never a source for the next one); Select activities does the same for the timeline's activities, by kind and a
wherematch, and only what everyone who reads the namespace sees; Publish to feed adds what comes in (resources, episodes, activities, or a template node's text) to a feed, skipping what is there already and refusing what the feed's readers couldn't read; Podcast episode makes an episode about the resources that come in, placed where its readers may read every source, and lists it in the feed once it's made. Try on the canvas says what each node would do without publishing. A run's result counts what was published and the episodes made, and its log says what each node did.The catalog marks the two new nodes as ones that keep their output, so a graph workflow with one of them is whole without Apply changes. This is the second of three pull requests for the ask; the Feeds page and the canvas nodes in the web app follow.
How:
domain/feed_nodes.pyholds the nodes' kits (config checks, the queries, the run),workflows.pyregisters them in the graph scope and inTERMINAL, andpodcasts.createtakes aspaceargument andpodcasts.fitsanswers where an episode may go, so the node reuses the podcast feature as it is.Motivation and Context
Adeel's ask in the project: RSS and iTunes podcast endpoints from routines, so a routine can pick part of the graph or all of it and publish a podcast, or timeline events, through a feed. #534 (merged) made the feeds; this makes routines fill them.
Screenshots (if appropriate):
n/a (workflow nodes; the canvas comes in the third PR)
Steps to reproduce (if appropriate):
Make a graph workflow
select_assets → podcast_episode(feed: a podcast feed's id, length 10) withPOST /api/v1/workflows, try it withPOST /api/v1/workflows/test, put it on a routine that runs every Monday (POST /api/v1/routines), and follow the feed in a podcast app. Orselect_activities(kindsasset.added)→ publish_feedfor the timeline in a feed reader.Types of changes
!in the title)Checklist:
make hookschecks it on commit).tests/api/test_feed_nodes.py, 4 tests: a routine publishes new resources to a feed; publishes the timeline and text; makes an episode and the feed lists it once made; Try says what it would do and bad settings are refused).docs/accordingly (docs/processing.md"Publishing from the graph",docs/feeds.md"From a routine",docs/podcasts.md,docs/requirements.md, README).## UnreleasedinCHANGELOG.md.Done questions (AGENTS.md)
POST /api/v1/workflows, tries it withPOST /api/v1/workflows/testand schedules it withPOST /api/v1/routines; the catalog (GET /api/v1/workflows) lists the nodes with their settings. Routines have no MCP tool yet (the feeds themselves do): filed as MCP tools for routines and graph workflows #548..envor step.podcasts.fits). Threat model: P-FEEDS' voided-by names routines.make openapiunchanged (no API change).docs/podcasts.md.flow.Kit,events.check_filter/events.visible,library.STATUSES,syndication.publish,podcasts.create/fits, the routine run'sstarted_atfor "since the last run".🤖 Generated with Claude Code
https://claude.ai/code/session_01CDEiKGoyQX8Vmnv9bi5JpD