docs(relayflows): f.human is shipped — local answer/resume, Cloud delivery to Slack and GitHub - #99
Merged
Merged
Conversation
…ivery to Slack and GitHub
relayflows 2.0.18 lowers `f.human(question, { to })` onto the kernel's durable
`wait.human`; the docs still said it threw `unsupported_verb` and pointed at
`f.done('needs_human')` as the only human gate. Every claim below was read
from flows origin/main (docs/SURFACE.md §5 "Human gates", docs/CLOUD.md,
packages/sdk/src/human-to.ts, packages/sdk/src/cli/answer.ts) and cloud
origin/main (lib/flows/human-gate-delivery.ts, human-gate-runtime.ts,
human-gate-resume.ts, the runs/[runId]/answer route). The three new
TypeScript samples pass `tsc` and `flows check` against the published
2.0.19 surface.
- introduction: rung 4 of the ladder now describes a shipped `f.human`;
only `dispatch` is still refused.
- build: `Ctx.human` returns `Step<boolean>` (so `.gate()` attaches); the
"neither runs" Note is now dispatch-only; new "Human gates" section —
content-pipeline sample with `to: 'slack:#marketing'`, the PARKED output,
`flows answer` / `flows resume`, the `human-N` journal step and its
attribution, the four `to` forms, `human_to_invalid` (flows' current
main, release after 2.0.19), and what's not enforced yet (`timeout`).
- cloud: new "Human approval on Cloud" section — a `pull_request`-triggered
release-notes sample with `to: 'github:@khaliqgant'`, delivery table,
how to answer (thread reply, ✅/❌, `@relay yes <code>`), the bot's
acknowledgements, REQUIRES / connect prompting, the answer route and
resume, and what's not yet (`flows answer --cloud`, reaction retraction).
The listener Note no longer calls pull_request events and hosted
schedules unshipped: `--on github:events=pull_request` is 2.0.17+,
`flows schedule` is 2.0.18+.
- cli: usage block is 2.0.18's (adds `answer`, `schedule`/`schedules`/
`unschedule`, `--no-connect`); new "Answer a human gate" section.
- reliability: exit 3 and the completion paragraph mention the f.human wait.
- multi-agent: the ship-feature sample is a shipped `f.human` with a still
unshipped `f.dispatch`, and the Note says only that.
- flows gallery (web/app/flows/flow-examples.ts): the five samples that
carried "f.human is declared but not yet executed (flows#400)" drop that
comment.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Contributor
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (7)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Contributor
|
Preview deployed!
This is a Cloudflare Workers preview version of this PR's build. |
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.
What
The relayflows docs still described
f.humanas unshipped (unsupported_verb, "lands in the release after 2.0.17", "usef.done('needs_human')instead"). It shipped in relayflows 2.0.18, and Cloud delivers the question to Slack / GitHub and takes the answer there as of today. This PR documents the shipped surface and drops every "not yet" that no longer holds. Follows the convention #96 set: TypeScript samples first (f.human has no YAML form, so no Language dropdown is needed).Pages
f.humanparks the run until a person answers; onlydispatchis still refused.Ctx.humanisStep<boolean>(a postfix.gate()attaches); the "neither runs" Note is now aboutdispatchonly; new Human gates section: content-pipeline sample withto: 'slack:#marketing', thePARKEDoutput,flows answer→flows resume, thehuman-Njournal step (answeredBy, kernelat_ms,attribution: client_asserted), the fourtoforms,human_to_invalid(flows' current main, release after 2.0.19), and what is not enforced yet (timeout; local runs deliver nothing).pull_request-triggered release-notes sample withto: 'github:@khaliqgant'and itsflows deploy, theneeds_human/humanWaitrecord, delivery table, how to answer (thread reply, ✅/❌, DM flat reply,@relay yes <code>), the bot's acknowledgements and refusals,REQUIRES/ connect prompting,GET/POST …/runs/<runId>/answerand resume, and what is not yet (flows answer --cloud, reaction retraction). The listener Note no longer callspull_requestevents and hosted schedules unshipped (--on github:events=pull_requestis 2.0.17+,flows scheduleis 2.0.18+).answer,schedule/schedules/unschedule,--no-connect); new Answer a human gate section;--jsonlist updated.3and the completion paragraph mention thef.humanwait.f.humanwith a still-unshippedf.dispatch; the Note says only that.web/app/flows/flow-examples.ts) — the five samples carrying "f.human is declared but not yet executed (flows#400)" drop that comment.Verified against
origin/main:docs/SURFACE.md§5 Human gates,docs/CLOUD.md,packages/sdk/src/human-to.ts,packages/sdk/src/cli/answer.ts,authored-flow-executor.ts(f.dispatchstillunsupportedVerb); tags:flows answerand thef.humanlowering are in v2.0.18, thetoforms /human_to_invalid(#472) are after v2.0.19.origin/main:lib/flows/human-gate-delivery.ts,human-gate-runtime.ts,human-gate-resume.ts,app/api/v1/workflows/runs/[runId]/answer/route.ts.tsc --strictandflows checkagainst the published@relayflows/surface@2.0.19/relayflows@2.0.19(RELAYFLOWS_SLACK_MOCK=1/RELAYFLOWS_GITHUB_MOCK=1for the helper mounts, as the docs already describe).next build --webpacksucceeds; every cross-link anchor (#human-gates,#human-approval-on-cloud,#answer-a-human-gate) resolves in the built HTML.vitestis unchanged: 145 pass, and the one failure (flow-workflowslockfile/bun test) fails identically onmainin this environment.🤖 Generated with Claude Code
Note
Low Risk
Documentation and embedded example strings only; no runtime or auth logic changes.
Overview
Updates Relayflows docs and gallery samples to match 2.0.18, where
f.humanis runnable instead ofunsupported_verb/ “usef.done('needs_human')” workarounds.Docs:
Ctx.humanis documented asStep<boolean>with a new Human gates section (flows answer→flows resume,human-Nwaits,toforms). CLI reflects 2.0.18 (flows answer,flows schedule,--no-connect) and adds Answer a human gate. Cloud adds Human approval on Cloud (Slack/GitHub delivery, answering, HTTP answer route) and notes PR listeners and hosted schedules. Introduction, multi-agent, and reliability now treat human approval as shipped;f.dispatchstays unshipped.Gallery: Five
flow-examples.tssnippets drop the “not yet executed (flows#400)” comment onf.humancalls.Reviewed by Cursor Bugbot for commit 80b87b5. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by cubic
Updates the relayflows docs to describe
f.humanas shipped: previously listed as an unshipped verb (unsupported_verb), it now parks a run until a person answers, withflows answer/flows resumecontinuing locally and Cloud delivering the question to Slack or GitHub.f.dispatchremains unshipped and still fails closed withunsupported_verb.Ctx.humannow returnsStep<boolean>instead ofPromise<boolean>, and documents thehuman-Njournal step and the fourtoforms.@relay yes <code>), and theruns/<runId>/answerHTTP route.answer,schedule/schedules/unschedule,--no-connect).--on github:events=pull_requestis 2.0.17+,flows scheduleis 2.0.18+, andhuman_to_invalidlands in the release after 2.0.19.Written for commit 80b87b5. Summary will update on new commits.