Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
826f969
Rewrite framework docs to showcase power and developer experience
claude Feb 28, 2026
e055f5b
Rewrite Docusaurus docs site to be compelling and developer-focused
claude Feb 28, 2026
2ab6415
Highlight tools-as-blocks, hybrid resources, ecosystem, and flows-as-…
claude Feb 28, 2026
3beeba8
Fix incorrect session state route — sessions endpoint has no kind seg…
claude Feb 28, 2026
a124c47
Stylize as flow-state.dev, fix branding, improve examples, add connec…
claude Feb 28, 2026
c93a5c7
Rewrite blog post to reflect framework vision: exploring new AI patterns
claude Feb 28, 2026
15967b8
Redesign landing page: dark theme, modern layout, mobile-friendly
claude Feb 28, 2026
01be582
Show component item model in landing page examples
claude Feb 28, 2026
ed2ee16
Showcase full sequencer DSL power in landing page and blocks docs
claude Feb 28, 2026
3854c7f
Replace analyze handler with sequencer that emits component via tap
claude Feb 28, 2026
59228a0
Fix API contract mismatches flagged in PR review comments
claude Feb 28, 2026
f8b34ec
Merge main into feature branch, resolve conflict in core README
claude Mar 1, 2026
eeebc57
Improve Define tab: imports, comments, inputSchema, sessionStateSchema
claude Mar 1, 2026
f8e67a7
Fix comment indentation on landing page, add state bubbling docs
claude Mar 1, 2026
482de34
Add Type System concept page, callout in state docs, fix comment indent
claude Mar 1, 2026
e9a6097
Reorder type-system in sidebar, fix naming, add type extraction docs
claude Mar 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Improve Define tab: imports, comments, inputSchema, sessionStateSchema
- Add imports for reusable blocks from ecosystem-style packages to
  show how blocks can come from anywhere (@research/blocks, @infra/blocks)
- Add inline comments on key DSL methods: parallel (fan out), doUntil
  (loop until threshold), work (async side work), tap (side effect)
- Add inputSchema to chat action definition
- Add sessionStateSchema to generator to show blocks declaring their
  own partial state needs

https://claude.ai/code/session_01F9D1j5EPAQseYvXfyeNuwh
  • Loading branch information
claude committed Mar 1, 2026
commit eeebc57d27d325b56e3853e48d2d2b321502c1f6
23 changes: 17 additions & 6 deletions apps/docs/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,33 @@ import styles from "./index.module.css";
/* ── Code examples ── */

const defineExample = `import { defineFlow, generator, sequencer } from "@flow-state-dev/core";
// Reusable blocks — yours, your team's, or from the ecosystem
import { searchWeb, searchInternalDocs, searchMemory } from "@research/blocks";
import { mergeAndRank, refineResults } from "@research/ranking";
import { gatherEvidence, scoreFindings } from "@research/analysis";
import { logAnalytics, fallbackSearch } from "@infra/blocks";

// A tool that's a full pipeline — parallel steps, loops, error recovery
// A tool that's a full pipeline — parallel search, iterative refinement, recovery
const deepResearch = sequencer({ name: "deep-research" })
.then(parseQuery)
.parallel({
.parallel({ // fan out to three sources at once
web: searchWeb,
docs: searchInternalDocs,
memory: searchMemory,
}, { maxConcurrency: 3 })
.then(mergeAndRank)
.doUntil(
.doUntil( // loop until quality threshold met
(result) => result.confidence > 0.9,
refineResults
)
.work(logAnalytics)
.work(logAnalytics) // async side work — doesn't block the pipeline
.rescue([{ when: [SearchError], block: fallbackSearch }]);

// Sequencer that analyzes and emits a component item to the UI
const analyze = sequencer({ name: "analyze" })
.then(gatherEvidence)
.then(scoreFindings)
.tap((report, ctx) => {
.tap((report, ctx) => { // side effect — emit without changing the payload
ctx.emitComponent("report-card", {
title: report.title,
findings: report.findings,
Expand All @@ -42,6 +47,8 @@ const agent = generator({
name: "agent",
model: "gpt-5-mini",
prompt: "You are a research assistant.",
// Blocks can declare only the state they need
sessionStateSchema: z.object({ researchCount: z.number().default(0) }),
history: (_input, ctx) => ctx.session.items.llm(),
user: (input) => input.message,
tools: [deepResearch, analyze, readDoc, writeDoc],
Expand All @@ -50,7 +57,11 @@ const agent = generator({
export default defineFlow({
kind: "research-assistant",
actions: {
chat: { block: agent, userMessage: (i) => i.message },
chat: {
inputSchema: z.object({ message: z.string() }),
block: agent,
userMessage: (i) => i.message,
},
},
session: {
stateSchema,
Expand Down