Skip to content

✨ feat(flow): flow body, trampoline outcome values, authoring annotations - #183

Merged
roninjin10 merged 3 commits into
mainfrom
flow-body-values
Aug 13, 2026
Merged

✨ feat(flow): flow body, trampoline outcome values, authoring annotations#183
roninjin10 merged 3 commits into
mainfrom
flow-body-values

Conversation

@roninjin10

Copy link
Copy Markdown
Contributor

Summary

The composite half of the two-noun model (docs/specs/Concepts/Unified Flow Authoring.md) plus the trampoline vocabulary of Trampoline Loops.md, as pure data — engine semantics land in PR6.

  • Flow.make accepts body?: (payload) => Node — plan-time-only, typed against the decoded payload; JSDoc states it becomes required at the end of the migration (enforcement PR).
  • flow.call(payload): Node — records a FlowCall node, mirrors PR2's activity .call.
  • Trampoline outcome values in Flow/Outcome.ts: Flow.done(value) · flow.to(payload) (schema-encodable invocation record) · Flow.park(reason) over the existing Waiting reason vocabulary. Tagged union, schema round-trip tested.
  • Annotation keys: Capabilities (Reference, default []), EffectsDeclaration, Placement — shapes consistent with @smthrs/plan's NodeEffects.

Depends-on: #182

Verification

  • npm run check / lint / circular for @smthrs/flow — clean
  • New test/FlowAuthoring.test.ts; full package suite 14 files / 121 tests, 100% coverage enforced by the run (independently re-verified)

…Error

The authoring half of the plan: seven closure-free node variants (Succeed,
All, Map, AndThen, FlowCall, ActivityCall, Branch) with digested deferred
functions in out-of-band tables, the Planned<T> branded placeholder whose
proxy throws GraphBuildError on any computation (toPrimitive, valueOf,
toString, toJSON, application), and the GraphBuildError vocabulary.

Docs: docs/specs/Concepts/Unified Flow Authoring.md
(cherry picked from commit 64624ac)
Activity.make gains a string-first overload: a named, schema-typed atom
(payload/success/error/tier/idempotencyKey) whose implementation attaches
separately via .toLayer(execute) through the existing registration and
activity machinery, and whose .call(payload) records an ActivityCall node
for plans. The inline options form is unchanged.

Docs: docs/specs/Concepts/Unified Flow Authoring.md
(cherry picked from commit b883814)
…otations

Flow.make accepts an optional plan-time body (required once the migration
completes), Flow.prototype.call records a FlowCall node, the trampoline
outcome vocabulary lands as pure data (Flow.done / flow.to / Flow.park over
the existing Waiting reasons), and Capabilities / EffectsDeclaration /
Placement join the annotation keys.

Docs: docs/specs/Concepts/Unified Flow Authoring.md
Docs: docs/specs/Concepts/Trampoline Loops.md
(cherry picked from commit ad7df62)
@roninjin10

Copy link
Copy Markdown
Contributor Author

Review round 1 complete (sol + fable, independent). Findings for this PR were fixed and folded into its commit; the full ledger (15 fixes, 6 resolved-as-designed) lives in the stack's review notes. All 14 branches rebased and re-verified: whole-repo check green, all package suites at 100% coverage, rebuilt tip byte-identical to the verified fix tree.

@roninjin10
roninjin10 changed the base branch from flow-activity-declared to main August 13, 2026 01:13
@roninjin10
roninjin10 merged commit c7865ac into main Aug 13, 2026
0 of 2 checks passed
@roninjin10
roninjin10 deleted the flow-body-values branch August 13, 2026 01:35
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.

1 participant