dify/api/core/workflow
GareArc f533e992d4
fix(hitl): scope OpenAPI/Service-API resume to author-configured webapp forms
Pause-time token emission now draws only from the recipient set each API
surface is allowed to act on (emit ⊆ validate), so the CLI/OpenAPI caller is
never handed a token the resume endpoint would reject as 404 (WTA-867).

A form's recipients are partitioned once, per surface, into a single
FormDisposition: the surface-actionable recipient yields `form_token`, while
the rest are reported as `approval_channels` (e.g. ["email", "console"]) so the
caller is told where approval actually happens. Token and channels are two
projections of one decision (disposition_for_surface) loaded by one recipient
query (load_form_dispositions_by_form_id); the live pause path and the
reconnect snapshot path consume the same FormDisposition so they cannot drift.

RecipientType carries its user-facing approval-channel label as an enum tuple
value, set in __new__, so a new recipient type cannot be declared without one.

Tests: consolidate recipient/disposition/enrich tests into parametrized
matrices, add CONSOLE-surface and empty-token coverage, extract a shared fake
session for the pause-event tests.
2026-06-16 16:11:29 -07:00
..
generator feat: harden /create and /refine workflow generation for edge cases (#37336) 2026-06-12 02:41:17 +00:00
nodes feat(api): Agent ask_human HITL (phase-1) — workflow node + Agent v2 chat — ENG-635 (#37437) 2026-06-16 03:43:40 +00:00
__init__.py refactor(api): move workflow knowledge nodes and trigger nodes (#33445) 2026-03-15 15:24:59 +08:00
file_reference.py feat(dify-agent): sync shell and back proxy updates (#37159) 2026-06-10 03:04:32 +00:00
graph_topology.py feat: agent slash menu backend (#37268) 2026-06-10 10:40:03 +00:00
human_input_adapter.py ci: add flag for linter (#37018) 2026-06-08 04:53:12 +00:00
human_input_forms.py fix(hitl): scope OpenAPI/Service-API resume to author-configured webapp forms 2026-06-16 16:11:29 -07:00
human_input_policy.py fix(hitl): scope OpenAPI/Service-API resume to author-configured webapp forms 2026-06-16 16:11:29 -07:00
node_factory.py feat(api): Agent ask_human HITL (phase-1) — workflow node + Agent v2 chat — ENG-635 (#37437) 2026-06-16 03:43:40 +00:00
node_runtime.py feat(api): Agent ask_human HITL (phase-1) — workflow node + Agent v2 chat — ENG-635 (#37437) 2026-06-16 03:43:40 +00:00
snippet_start.py feat: snippet (#37046) 2026-06-05 09:38:42 +00:00
system_variables.py chore(api): upgrade graphon to v0.3.0 (#35469) 2026-05-09 07:30:03 +00:00
template_rendering.py ci: add flag for linter (#37018) 2026-06-08 04:53:12 +00:00
variable_pool_initializer.py feat: snippet (#37046) 2026-06-05 09:38:42 +00:00
variable_prefixes.py refactor(api): continue decoupling dify_graph from API concerns (#33580) 2026-03-25 20:32:24 +08:00
workflow_entry.py chore(api): Upgrade graphon to v0.5.1 (#37168) 2026-06-11 07:37:27 +00:00
workflow_run_outputs.py refactor(api): rename dify_graph to graphon (#34095) 2026-03-25 21:58:56 +08:00