Skip to content

docs: HITL Service API polish and 1.14 release follow-ups#756

Closed
RiskeyL wants to merge 16 commits into
mainfrom
docs/1.14-check
Closed

docs: HITL Service API polish and 1.14 release follow-ups#756
RiskeyL wants to merge 16 commits into
mainfrom
docs/1.14-check

Conversation

@RiskeyL
Copy link
Copy Markdown
Contributor

@RiskeyL RiskeyL commented Apr 27, 2026

Summary

  • HITL Service API documentation polish. Tighten the Get/Submit/Stream Human Input Form endpoint descriptions across the workflow and chatflow specs (EN/ZH/JA) so each one surfaces only the essentials and cross-references the rest of the flow. On the Human Input node help page, replace the standalone "Drive Human Input via the API" section with a single Info callout nested under the Web app delivery bullet, pointing to the Service API reference. Orchestration prose belongs in the API reference, not on a node configuration page.
  • Streaming response descriptions reorganized. Restructure the SSE description on every streaming endpoint (POST /workflows/run plus its versioned variant, POST /chat-messages, and GET /workflow/{task_id}/events) from one dense paragraph into three topical sections: Parsing, Stream lifecycle, and Human Input events. Drop the redundant lead sentence and the dead ChunkWorkflowEvent / ChunkChatEvent reference (Mintlify doesn't surface schema names from prose). Add workflow_paused to the workflow-spec lifecycle paragraph; verified against api/core/app/apps/workflow/generate_task_pipeline.py where the pipeline explicitly breaks on QueueWorkflowPausedEvent.
  • Schema constraint correctness. Move HITL UserAction id and title length/pattern constraints out of description parentheticals and into machine-readable schema fields (maxLength plus pattern on id, maxLength on title) across all six API spec files. Verified against graphon/nodes/human_input/entities.py.
  • API reference link convention. Amend writing-guides/formatting-guide.md Internal Links section to carve out an exception: /api-reference/<tag>/<endpoint> links omit the language prefix in all three languages (Mintlify auto-routes to the active locale; a prefix breaks the auto-routing).
  • Marketplace publish flow update. Drop the "1.14 beta only" callout from publish-to-marketplace.mdx and update the click path to "Publish > Publish Update > Publish to Marketplace" to match the current UI (EN/ZH/JA).

Copilot AI review requested due to automatic review settings April 27, 2026 06:41
@mintlify
Copy link
Copy Markdown
Contributor

mintlify Bot commented Apr 27, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
dify-core-product 🟢 Ready View Preview Apr 27, 2026, 6:43 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@dosubot dosubot Bot added size:XL This PR changes 500-999 lines, ignoring generated files. documentation Improvements or additions to documentation labels Apr 27, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR polishes Dify’s HITL (Human Input) Service API documentation and 1.14 follow-ups across EN/ZH/JA, including reorganized SSE streaming docs, more machine-readable schema constraints, updated Marketplace publish steps, and an env-doc verifier enhancement for intentionally ignored variables.

Changes:

  • Reworked SSE streaming descriptions (parsing, lifecycle, Human Input events) and added Human Input endpoints + schemas to workflow/chatflow OpenAPI specs.
  • Updated Human Input node docs to point readers to the Service API reference (instead of embedding orchestration prose), and refreshed Marketplace publish UI steps across locales.
  • Improved self-host env var docs (new Redis/Celery/VectorDB knobs) and enhanced the env-doc verifier with an ignore list mechanism.

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
zh/use-dify/publish/publish-to-marketplace.mdx Updates Marketplace publish click-path; removes 1.14 beta-only callout.
zh/use-dify/nodes/human-input.mdx Replaces embedded API orchestration section with an Info callout linking to API reference.
zh/self-host/configuration/environments.mdx Syncs/extends env var reference (Redis resilience, worker healthcheck, Baidu VDB, etc.) and formatting.
zh/api-reference/openapi_workflow.json Refines SSE prose; adds Human Input form endpoints + tag and schema constraint fields.
zh/api-reference/openapi_knowledge.json Marks fields nullable where applicable; expands datasource plugin listing schema.
zh/api-reference/openapi_chatflow.json Refines SSE prose; adds Human Input form endpoints + tag and schema constraint fields.
writing-guides/formatting-guide.md Adds explicit internal-link convention for API reference links (no locale prefix).
ja/use-dify/publish/publish-to-marketplace.mdx Updates Marketplace publish click-path; removes 1.14 beta-only callout.
ja/use-dify/nodes/human-input.mdx Adds Service API Info callout under Web app delivery; general copy/format tweaks.
ja/api-reference/openapi_workflow.json Refines SSE prose; adds Human Input form endpoints + tag and schema constraint fields.
ja/api-reference/openapi_knowledge.json Marks fields nullable where applicable; expands datasource plugin listing schema.
ja/api-reference/openapi_chatflow.json Refines SSE prose; adds Human Input form endpoints + tag and schema constraint fields.
en/use-dify/publish/publish-to-marketplace.mdx Updates Marketplace publish click-path; removes 1.14 beta-only callout.
en/use-dify/nodes/human-input.mdx Adds Service API Info callout under Web app delivery; whitespace cleanup.
en/self-host/configuration/environments.mdx Syncs/extends env var reference (Redis resilience, worker healthcheck, Baidu VDB, etc.) and formatting.
en/api-reference/openapi_workflow.json Refines SSE prose; adds Human Input form endpoints + tag and schema constraint fields.
en/api-reference/openapi_knowledge.json Marks fields nullable where applicable; expands datasource plugin listing schema.
en/api-reference/openapi_chatflow.json Refines SSE prose; adds Human Input form endpoints + tag and schema constraint fields.
.claude/skills/dify-docs-env-vars/verify-env-docs.py Adds --ignored support and ignores list for missing/extra var checks.
.claude/skills/dify-docs-env-vars/ignored-vars.md New curated list of variables intentionally excluded from env docs (with reasons/sources).
.claude/skills/dify-docs-env-vars/deep-dive.md Adds 1.14 env var deep-dive notes and traceability.
.claude/skills/dify-docs-env-vars/SKILL.md Documents the new ignored-vars workflow for the verifier.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread en/api-reference/openapi_workflow.json Outdated
Comment thread zh/api-reference/openapi_chatflow.json Outdated
Comment thread zh/api-reference/openapi_workflow.json Outdated
Comment thread ja/api-reference/openapi_chatflow.json Outdated
Comment thread ja/api-reference/openapi_workflow.json Outdated
Comment thread en/api-reference/openapi_chatflow.json Outdated
RiskeyL and others added 2 commits April 27, 2026 14:58
* docs: sync App Toolkit page with follow-up settings PR and UI labels

* fix: correct CJK format linter false positives

* chore: broaden post-writing audit scope to whole documents

* docs: address Copilot review on PR #754

Restore the Tab titles rule in formatting-zh.md, which had been trimmed
to a stub. Drop the First-Mention Rule entry from the terminology-check
skill's Output Format so the report sections match the Checks to
Perform sections (the corresponding check was removed earlier).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* docs: add workflow collaboration user guide

* docs: tighten style and formatting guides

* docs: avoid "please" in zh refer-to phrases

* fix: add CJK-Latin spacing in translation notice templates

* docs: add env var coordination to dify-docs-guides skill

* docs: document collaboration environment variables

* style: trim collaboration env var descriptions for consistency

* docs: add zoom menu tip for hiding comments and cursors

* docs: sync collaboration UI labels after upstream localization
RiskeyL added a commit that referenced this pull request Apr 27, 2026
The three HITL event schemas (StreamEventHumanInputRequired,
StreamEventHumanInputFormFilled, StreamEventHumanInputFormTimeout)
declared `workflow_run_id` inside `data.properties`, but
`HumanInputRequiredResponse` in `api/core/app/entities/task_entities.py`
defines `workflow_run_id` only as a top-level field on the response
(alongside `event` and `task_id`); its inner `Data` class doesn't carry
one. The OpenAPI spec already provides top-level `workflow_run_id` via
the `$ref: StreamEventBase` in the `allOf` composition, so the inline
duplicate was a phantom field that doesn't exist in the actual payload.

Remove the inline `workflow_run_id` from `data.properties` in all three
HITL event schemas across all six spec files. This relies on
`StreamEventBase` to provide `workflow_run_id` at the top level via
composition, matching how every other event schema in this spec handles
it (e.g., `StreamEventWorkflowStarted`).

Reported by Copilot on PR #756.
RiskeyL added a commit that referenced this pull request Apr 27, 2026
The three HITL event schemas (StreamEventHumanInputRequired,
StreamEventHumanInputFormFilled, StreamEventHumanInputFormTimeout)
declared `workflow_run_id` inside `data.properties`, but
`HumanInputRequiredResponse` in `api/core/app/entities/task_entities.py`
defines `workflow_run_id` only as a top-level field on the response
(alongside `event` and `task_id`); its inner `Data` class doesn't carry
one. The OpenAPI spec already provides top-level `workflow_run_id` via
the `$ref: StreamEventBase` in the `allOf` composition, so the inline
duplicate was a phantom field that doesn't exist in the actual payload.

Remove the inline `workflow_run_id` from `data.properties` in all three
HITL event schemas across all six spec files. This relies on
`StreamEventBase` to provide `workflow_run_id` at the top level via
composition, matching how every other event schema in this spec handles
it (e.g., `StreamEventWorkflowStarted`).

Reported by Copilot on PR #756.
Copilot AI review requested due to automatic review settings April 27, 2026 07:29
…759)

* docs: rewrite orchestration logic and extend workflow-chatflow overview

* translate: update zh and ja for orchestration logic and overview

* docs: refine orchestration logic node reuse section

* docs: clarify MAX_TREE_DEPTH env var description

* fix: align zh title and body references with the glossary UI label

* fix: align EN node reuse text with zh/ja translations (User Input exception)

Agent-Logs-Url: https://github.com/langgenius/dify-docs/sessions/00e54676-8a43-4b6f-99f8-fef2495b054f

Co-authored-by: RiskeyL <36894937+RiskeyL@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 39 out of 41 changed files in this pull request and generated 7 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread zh/api-reference/openapi_knowledge.json
Comment thread ja/api-reference/openapi_knowledge.json
Comment thread zh/use-dify/build/workflow-collaboration.mdx
Comment thread ja/use-dify/build/workflow-collaboration.mdx
Comment thread ja/use-dify/nodes/human-input.mdx
Comment thread tools/translate/config.json
Comment thread en/api-reference/openapi_knowledge.json
RiskeyL added 7 commits April 27, 2026 15:37
The three HITL event schemas (StreamEventHumanInputRequired,
StreamEventHumanInputFormFilled, StreamEventHumanInputFormTimeout)
declared `workflow_run_id` inside `data.properties`, but
`HumanInputRequiredResponse` in `api/core/app/entities/task_entities.py`
defines `workflow_run_id` only as a top-level field on the response
(alongside `event` and `task_id`); its inner `Data` class doesn't carry
one. The OpenAPI spec already provides top-level `workflow_run_id` via
the `$ref: StreamEventBase` in the `allOf` composition, so the inline
duplicate was a phantom field that doesn't exist in the actual payload.

Remove the inline `workflow_run_id` from `data.properties` in all three
HITL event schemas across all six spec files. This relies on
`StreamEventBase` to provide `workflow_run_id` at the top level via
composition, matching how every other event schema in this spec handles
it (e.g., `StreamEventWorkflowStarted`).

Reported by Copilot on PR #756.
Copilot AI review requested due to automatic review settings April 27, 2026 08:07
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 46 out of 49 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ja/api-reference/openapi_chatflow.json Outdated
Comment on lines +3125 to +3129
"description": "元のワークフロー実行リクエストで返されたワークフロー実行 ID。"
},
{
"name": "user",
"in": "query",
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chatflow 仕様の /workflow/{task_id}/events で、task_id が「元のワークフロー実行リクエストで返されたワークフロー実行 ID」と説明されていますが、この仕様全体では task_id はチャット系エンドポイントが発行する ID です。呼び出し元が渡すべき ID の出所を、チャット側のリクエストに合わせて表現を修正してください。

Copilot uses AI. Check for mistakes.
Comment thread en/api-reference/openapi_knowledge.json
Comment thread zh/api-reference/openapi_knowledge.json
Comment thread ja/api-reference/openapi_knowledge.json
Comment thread en/api-reference/openapi_chatflow.json Outdated
Comment on lines +3125 to +3129
"description": "Workflow run ID returned by the original workflow run request."
},
{
"name": "user",
"in": "query",
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the Chatflow spec, the task_id path parameter is described as a workflow run ID “returned by the original workflow run request”, which doesn’t match the rest of this spec (where task_id is issued by chat endpoints). Please reword these parameter descriptions to reference the originating chat request and clarify exactly which ID callers should pass here.

Copilot uses AI. Check for mistakes.
Comment thread zh/api-reference/openapi_chatflow.json Outdated
Comment on lines +3125 to +3129
"description": "原始工作流运行请求返回的工作流运行 ID。"
},
{
"name": "user",
"in": "query",
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

在 Chatflow 规范里,/workflow/{task_id}/eventstask_id 参数描述为“原始工作流运行请求返回的工作流运行 ID”,但该文件上下文里 task_id 通常来自对话接口。建议统一表述:明确这里应传入哪个请求返回的 ID,并避免将其描述为“工作流运行请求”。

Copilot uses AI. Check for mistakes.
RiskeyL added 4 commits April 27, 2026 16:42
The /api-reference/... URL convention (no language prefix, derived
from OpenAPI tag/summary) generates pages that Mintlify auto-builds
rather than from filesystem MDX files, so the existing filesystem
resolution logic flags every such link as broken.

Skip both filesystem-existence and anchor validation for any URL
containing /api-reference/, mirroring the existing
anchor_check_skipped behaviour. The convention is documented in
writing-guides/formatting-guide.md.

Caveat: typos in tag or summary slugs will now pass silently. A
follow-up could parse the OpenAPI specs to validate against the
real tag/summary kebab pairs if hand-written api-reference links
become common enough to warrant it.
Inline link [CORS設定](#cors 設定) used a literal space, but the
heading "CORS 設定" slugifies to "cors-設定" (whitespace replaced
with hyphen). Update the anchor to #cors-設定.
@RiskeyL RiskeyL closed this Apr 27, 2026
RiskeyL added a commit that referenced this pull request Apr 29, 2026
* feat: add env var ignore-list consumed by the verifier

* docs: add 1.14 env vars and correct drifted defaults

* fix: correct knowledge pipeline datasource-plugins response in api references

* chore: record 1.14 env var traces in deep-dive

* docs: update HITL Service API documentation

* docs: clarify /api-reference/ link convention in formatting guide

* docs: update marketplace publish flow

* fix: drop duplicate workflow_run_id from HITL event data schemas

The three HITL event schemas (StreamEventHumanInputRequired,
StreamEventHumanInputFormFilled, StreamEventHumanInputFormTimeout)
declared `workflow_run_id` inside `data.properties`, but
`HumanInputRequiredResponse` in `api/core/app/entities/task_entities.py`
defines `workflow_run_id` only as a top-level field on the response
(alongside `event` and `task_id`); its inner `Data` class doesn't carry
one. The OpenAPI spec already provides top-level `workflow_run_id` via
the `$ref: StreamEventBase` in the `allOf` composition, so the inline
duplicate was a phantom field that doesn't exist in the actual payload.

Remove the inline `workflow_run_id` from `data.properties` in all three
HITL event schemas across all six spec files. This relies on
`StreamEventBase` to provide `workflow_run_id` at the top level via
composition, matching how every other event schema in this spec handles
it (e.g., `StreamEventWorkflowStarted`).

Reported by Copilot on PR #756.

* fix: address Copilot's review comments

* feat: skip api-reference paths in internal link checker

The /api-reference/... URL convention (no language prefix, derived
from OpenAPI tag/summary) generates pages that Mintlify auto-builds
rather than from filesystem MDX files, so the existing filesystem
resolution logic flags every such link as broken.

Skip both filesystem-existence and anchor validation for any URL
containing /api-reference/, mirroring the existing
anchor_check_skipped behaviour. The convention is documented in
writing-guides/formatting-guide.md.

Caveat: typos in tag or summary slugs will now pass silently. A
follow-up could parse the OpenAPI specs to validate against the
real tag/summary kebab pairs if hand-written api-reference links
become common enough to warrant it.

* fix: correct CORS anchor in ja environments page

Inline link [CORS設定](#cors 設定) used a literal space, but the
heading "CORS 設定" slugifies to "cors-設定" (whitespace replaced
with hyphen). Update the anchor to #cors-設定.

* fix: align datasource-plugins is_published and 200 description with node framing

* fix: clarify chatflow stream workflow events task_id origin

* docs: address HITL Service API reader-test feedback
RiskeyL added a commit that referenced this pull request Apr 29, 2026
* docs: sync App Toolkit with dify#35442 follow-up settings (#757)

* docs: sync App Toolkit page with follow-up settings PR and UI labels

* fix: correct CJK format linter false positives

* chore: broaden post-writing audit scope to whole documents

* docs: address Copilot review on PR #754

Restore the Tab titles rule in formatting-zh.md, which had been trimmed
to a stub. Drop the First-Mention Rule entry from the terminology-check
skill's Output Format so the report sections match the Checks to
Perform sections (the corresponding check was removed earlier).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs: document workflow collaboration feature (#758)

* docs: add workflow collaboration user guide

* docs: tighten style and formatting guides

* docs: avoid "please" in zh refer-to phrases

* fix: add CJK-Latin spacing in translation notice templates

* docs: add env var coordination to dify-docs-guides skill

* docs: document collaboration environment variables

* style: trim collaboration env var descriptions for consistency

* docs: add zoom menu tip for hiding comments and cursors

* docs: sync collaboration UI labels after upstream localization

* docs: rewrite orchestration logic for cross-workflow node copy-paste (#759)

* docs: rewrite orchestration logic and extend workflow-chatflow overview

* translate: update zh and ja for orchestration logic and overview

* docs: refine orchestration logic node reuse section

* docs: clarify MAX_TREE_DEPTH env var description

* fix: align zh title and body references with the glossary UI label

* fix: align EN node reuse text with zh/ja translations (User Input exception)

Agent-Logs-Url: https://github.com/langgenius/dify-docs/sessions/00e54676-8a43-4b6f-99f8-fef2495b054f

Co-authored-by: RiskeyL <36894937+RiskeyL@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>

* docs: note HTTPS requirement for cross-workflow node paste (#761)

* docs: HITL Service API polish and 1.14 release follow-ups (#760)

* feat: add env var ignore-list consumed by the verifier

* docs: add 1.14 env vars and correct drifted defaults

* fix: correct knowledge pipeline datasource-plugins response in api references

* chore: record 1.14 env var traces in deep-dive

* docs: update HITL Service API documentation

* docs: clarify /api-reference/ link convention in formatting guide

* docs: update marketplace publish flow

* fix: drop duplicate workflow_run_id from HITL event data schemas

The three HITL event schemas (StreamEventHumanInputRequired,
StreamEventHumanInputFormFilled, StreamEventHumanInputFormTimeout)
declared `workflow_run_id` inside `data.properties`, but
`HumanInputRequiredResponse` in `api/core/app/entities/task_entities.py`
defines `workflow_run_id` only as a top-level field on the response
(alongside `event` and `task_id`); its inner `Data` class doesn't carry
one. The OpenAPI spec already provides top-level `workflow_run_id` via
the `$ref: StreamEventBase` in the `allOf` composition, so the inline
duplicate was a phantom field that doesn't exist in the actual payload.

Remove the inline `workflow_run_id` from `data.properties` in all three
HITL event schemas across all six spec files. This relies on
`StreamEventBase` to provide `workflow_run_id` at the top level via
composition, matching how every other event schema in this spec handles
it (e.g., `StreamEventWorkflowStarted`).

Reported by Copilot on PR #756.

* fix: address Copilot's review comments

* feat: skip api-reference paths in internal link checker

The /api-reference/... URL convention (no language prefix, derived
from OpenAPI tag/summary) generates pages that Mintlify auto-builds
rather than from filesystem MDX files, so the existing filesystem
resolution logic flags every such link as broken.

Skip both filesystem-existence and anchor validation for any URL
containing /api-reference/, mirroring the existing
anchor_check_skipped behaviour. The convention is documented in
writing-guides/formatting-guide.md.

Caveat: typos in tag or summary slugs will now pass silently. A
follow-up could parse the OpenAPI specs to validate against the
real tag/summary kebab pairs if hand-written api-reference links
become common enough to warrant it.

* fix: correct CORS anchor in ja environments page

Inline link [CORS設定](#cors 設定) used a literal space, but the
heading "CORS 設定" slugifies to "cors-設定" (whitespace replaced
with hyphen). Update the anchor to #cors-設定.

* fix: align datasource-plugins is_published and 200 description with node framing

* fix: clarify chatflow stream workflow events task_id origin

* docs: address HITL Service API reader-test feedback

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants