Commit Graph
13156 Commits
Author SHA1 Message Date
Charles YaoandClaude Opus 4.8 52d241d754 feat(dify-builder): streaming create_fix/build/edit_session with subscribe-before-dispatch
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-31 22:18:42 -07:00
Charles YaoandClaude Opus 4.8 6888282e95 feat(dify-builder): subscribe-before-dispatch streaming submit_action/message
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-31 22:18:42 -07:00
Charles YaoandClaude Opus 4.8 fa4921eff0 feat(dify-builder): stream_advance_frames terminal-aware SSE generator
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-31 22:18:42 -07:00
Charles YaoandClaude Opus 4.8 390eea61fb feat(dify-builder): terminal state frame carries the full SessionView
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-31 22:18:42 -07:00
twwu e3cbd7b90b fix(api): linearize Dify Builder migrations 2026-09-01 11:25:21 +08:00
twwu 22be55af5f feat: redesign app builder fix flow 2026-08-31 18:18:30 +08:00
twwu c200902173 refactor(web): move app builder button to canvas header 2026-08-31 18:18:30 +08:00
twwu cb53f02905 Merge branch 'main' into feat/dify-builder 2026-08-31 13:31:50 +08:00
d25e2b51fc refactor(api): decouple onboarding and notification services (#40759)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: hjlarry <hjlarry@163.com>
2026-08-31 04:37:07 +00:00
Coding On StarandCodingOnStar c6ca395042 fix(web): make registration tracking consent-safe and retryable (#41365)
Co-authored-by: CodingOnStar <hanxujiang@dify.com>
2026-08-31 03:39:37 +00:00
Wu Tianwei 7167d7d662 fix(rbac): grant agent access to all legacy roles (#41511) 2026-08-31 03:33:09 +00:00
Byron.wangandhjlarry 9e07c2dac6 refactor(api): extract email registration application service (#41108)
Co-authored-by: hjlarry <hjlarry@163.com>
2026-08-31 03:22:01 +00:00
wangxiaoleiandtwwu 6a00c23e49 feat: use app.acl.access_point_manage to control access point page access (#41462)
Co-authored-by: twwu <twwu@dify.ai>
2026-08-31 03:05:19 +00:00
Xiyuan Chen 750810ea81 fix(api): keep workspace owner consistent on ownership transfer (#41267) 2026-08-31 02:51:19 +00:00
非法操作 b70ad7d424 fix(web): show DSL import warning details (#41502) 2026-08-31 02:36:32 +00:00
zyssyz123 ad86351cc1 fix(agent): reject incompatible session snapshots (#41447) 2026-08-31 02:26:07 +00:00
dependabot[bot] 8b8031710b chore(deps): bump anthropics/claude-code-action from 1.0.199 to 1.0.210 in the github-actions-dependencies group (#41504)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-31 01:25:59 +00:00
yyh 94dff4dddc fix(web): unify tool plugin selection state (#41470) 2026-08-31 01:24:49 +00:00
yyh 17ae89ff22 fix(e2e): target agent roster list items (#41453) 2026-08-31 01:24:04 +00:00
yyh fce29e6f6a fix(web): refine agent dialog form sessions (#41492) 2026-08-31 01:24:03 +00:00
Eddy ZHANG 6130f081e0 refactor(console): dep-inject account payloads with @model_validate (#41500) 2026-08-31 00:52:10 +00:00
Eddy ZHANG 8894b09c3b refactor(web): dep-inject payloads with @model_validate (#41501) 2026-08-31 00:50:12 +00:00
Charles YaoandClaude Opus 4.8 ba7692e2e9 feat(dify-builder): log build_nodes empty/failed generation and starved resource sources
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-30 10:03:48 -07:00
Charles YaoandClaude Opus 4.8 6f27a709ba feat(dify-builder): log llm-agent model-resolution failure once per advance
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-30 10:03:48 -07:00
Charles YaoandClaude Opus 4.8 133e8fdc0c refactor(dify-builder): remove unused propose_build_repair from agent Protocol
It was stubbed to [] in LlmBuilderAgent, canned in PlaceholderAgent, and never
called by any handler — the Build failure path reuses Fix cognition (diagnose +
propose_repair). Removed from the DifyBuilderAgent Protocol, both implementations,
and all test doubles.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-30 10:03:48 -07:00
Charles YaoandClaude Opus 4.8 d2cfaf7f72 fix(dify_builder): narrow input-failure signals, fix build delete/create id collision
Final-review fix wave for the testdata-gate + start-selector slice:

- I1 (Important): is_input_failure's signal list included the bare
  "required" (and generic "variable not found"), which also fire on
  config/runtime faults unrelated to test inputs -- misrouting those
  failures to the *_AWAIT_TESTDATA gate, where the diagnosed auto-repair
  is never offered and re-running just loops at the gate. Narrowed
  _INPUT_FAILURE_SIGNALS to ("file variable", "not provided", "missing
  input"), favoring precision per the spec's ambiguous-failure ->
  config-repair safe default. The real file-input E2E error ("File
  variable not found for selector: [...]") still matches via "file
  variable".

- M2 (Minor, latent): handle_plan_approval's from-scratch delete-then-
  create-filter path could drop a generator create_node/connect that
  reuses a just-deleted placeholder start's id, since _already_present
  compared against the PRE-delete existing_node_ids/existing_edges --
  delete with no re-create, silently vanishing the node. Deleted ids are
  now excluded from that comparison set; the loop-back path (no deletes)
  is unaffected.

- Cleanups: state.py's Build/Edit state-count comments (14->15, 9->10,
  verified against the actual enum members), FormCard's docstring now
  lists the "testdata" variant, and handle_plan_approval binds
  current_graph's nodes to one local instead of calling .get() 3x and
  documents the delete-placeholder branch.

Tests: extended test_is_input_failure_matches_input_signals's sibling
with a config "required" case (red before the signal-list fix, green
after), and added a plan_approval test where the generator's create_node
reuses the deleted placeholder start's id (red before the id-exclusion
fix -- a dangling connect ValueError -- green after).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-30 10:03:48 -07:00
Charles YaoandClaude Opus 4.8 db150d1a43 feat(dify-builder): Edit live test reuses prepared input, routes input-failures to testdata gate
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-30 10:03:47 -07:00
Charles YaoandClaude Opus 4.8 ef88f6532c feat(dify-builder): EDIT_AWAIT_TESTDATA gate + run_affected_tests routing
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-30 10:03:47 -07:00
Charles YaoandClaude Opus 4.8 cea65957bb feat(dify-builder): Build live test reuses prepared input, routes input-failures to testdata gate
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-30 10:03:47 -07:00
Charles YaoandClaude Opus 4.8 4f6a5f07b7 feat(dify-builder): BUILD_AWAIT_TESTDATA gate + run_test routing
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-30 10:03:47 -07:00
Charles YaoandClaude Opus 4.8 1dda1d3326 feat(dify-builder): is_input_failure + testdata_form_fields core helpers
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-30 10:03:47 -07:00
Charles YaoandClaude Opus 4.8 20d932177c fix(dify-builder): drop draft placeholder start on from-scratch build
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-30 10:03:47 -07:00
Charles YaoandClaude Opus 4.8 86341638df fix(dify-builder): keep generator node ids in graph_translate (no start rename)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-30 10:03:47 -07:00
yyh bf64390d7c revert(web): revert dataset button a11y changes (#41493) 2026-08-30 16:00:14 +00:00
Eddy ZHANG 884ece570e refactor(service_api): dep-inject dataset payloads with @model_validate (#41490) 2026-08-30 15:06:36 +00:00
LuckTerence 9d396524b9 fix(web): improve a11y of dataset clickable divs with native buttons (#41319) 2026-08-30 13:00:42 +00:00
Eddy ZHANG 8b3c2ee274 refactor(service_api): dep-inject app payloads with @model_validate (#41491) 2026-08-30 12:51:50 +00:00
twwu 433046e0de Merge branch 'main' into feat/dify-builder 2026-08-30 14:25:22 +08:00
Charles YaoandClaude Opus 4.8 8b640e44de Fix Dify Builder live-test escape paths to reset stale test inputs
Clear fc.test_input_ref and fc.verify_run_id on the four re-plan/revert
escape branches in Build and Edit (handle_review's continue_adjusting
and handle_reverted's retry_after_revert) so a rebuild+retest
regenerates fresh schema-shaped mock inputs instead of reusing the
first build's stale ones -- the approve_repair retest path is left
untouched since it must fairly retest against the same failing case.
Also corrects three doc/comment mismatches (llm_agent's 12->13 method
count, an await_repair docstring describing a branch that doesn't
exist, and state.py's Build state-count banner), and adds tests for
the run_draft-raises degrade path and Build/Edit pass-path canvas
event symmetry.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-29 19:26:48 -07:00
Charles YaoandClaude Opus 4.8 53f805dbf7 test(dify-builder): restore canvas + summary-variant assertions on Edit test pass path
Task B2 review found that removing the old canned test_test_affected_paths_
emits_result_and_reaches_review test dropped two pass-path assertions that
none of the 4 replacement tests reproduced: that the success path fires both
the mark_test_success and mark_review_ready canvas events, and that the
emitted SummaryCard's variant is "review". Restore both onto
test_edit_test_pass_goes_to_review_with_real_run so a regression on either
point is caught again.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-29 19:11:20 -07:00
Charles YaoandClaude Opus 4.8 b3e9f1df3d feat(dify-builder): live Edit test via run_draft, fail routes to repair gate
Rewrite handle_test_affected_paths from a canned always-success stub to a
live handler mirroring Build's handle_test_and_repair (A5): derive mock
inputs once via start_schema/generate_mock_inputs and persist a TestInput
(reused on retest), run run_draft (degrading to a synthesized failed Run on
exception), and mint a real immutable Run. Pass -> edit.review with a green
TestResultCard + summary. Fail -> real diagnose/propose_repair, stage
fc.diagnosis/staged_repair/risk, emit a red TestResultCard + ErrorCard (+
ChangeSetCard when intents are proposed) -> edit.await_repair (the B1 gate).
No auto-apply; apply_repair still runs only inside handle_await_repair's
approve_repair branch.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-29 19:04:29 -07:00
Charles YaoandClaude Opus 4.8 ac5f48a765 feat(dify-builder): EDIT_AWAIT_REPAIR gate + handler
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-29 18:53:09 -07:00
Charles YaoandClaude Opus 4.8 f6d822a2db test(dify-builder): cover fail-path card assembly and no-repair branch
Extends the fail-routes-to-await-repair test to assert card content
(error tone, diagnosis body/node_id, change_set presence, mark_test_error
canvas event) and adds a dedicated test for the no-proposed-intents fail
branch, plus a light card-shape check on the pass path. Closes the
test-coverage gaps left by removing the old canned-arc tests in the A5
live-test rewrite.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-29 18:43:12 -07:00
Charles YaoandClaude Opus 4.8 badb67c720 feat(dify-builder): live Build test via run_draft, fail routes to repair gate
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-29 18:33:32 -07:00
Charles YaoandClaude Opus 4.8 26fdde78c2 feat(dify-builder): BUILD_AWAIT_REPAIR gate + handler
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-29 18:20:29 -07:00
Charles YaoandClaude Opus 4.8 d3584d3e12 test(dify-builder): live-run FakeBuildDifyPort.run_draft (pass/fail toggle)
Upgrade FakeBuildDifyPort.run_draft from canned stub to real fail-then-pass fake. Add mutable verify_pass flag (default True) and run_draft_inputs tracking, mirroring FakeDifyPort behavior. Emits node events and returns Run with per_node (succeeded when verify_pass, else failed node with error). FakeEditDifyPort inherits the live behavior automatically since it only overrides __init__.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-29 18:08:32 -07:00
Charles YaoandClaude Opus 4.8 bbbf2ff457 feat(dify-builder): real schema-shaped generate_mock_inputs
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-29 18:01:16 -07:00
Charles YaoandClaude Opus 4.8 e2b9e3aba3 feat(dify-builder): start_schema core helper (start node variables)
Implement start_schema(graph: Graph) -> StartSchema that reads the start
node's declared input variables from graph.nodes[].data.variables into
{"variables": [...]}. Pure dict access — stays in core without importing
services. Returns {"variables": []} when there is no start node or it
declares no variables.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-29 17:52:36 -07:00
Weike Zhang 02f9b3ca7c refactor: pass db.session explicitly in instruction_modify_workflow (#37403) (#40827) 2026-08-30 00:48:00 +00:00
Charles YaoandClaude Opus 4.8 cd5fb6bbf0 fix(dify-builder): ground model on all model-bearing nodes, carry branch handles, clean test lint
Final consolidated fix wave from whole-branch review of the Real Build +
Edit Cognition slice:

- _ground now overwrites the model dict on ANY create_node whose config
  carries a model dict (llm, question-classifier, parameter-extractor),
  not just "llm", so a drifted/hallucinated provider/name on those other
  node types no longer flows through ungrounded.
- to_intents now carries a generator edge's sourceHandle/targetHandle
  into the connect intent's args (source_handle/target_handle) so
  branching nodes (if-else, question-classifier) wire onto the correct
  port instead of collapsing onto the default handle; edges without
  handles still produce bare {from_node, to_node} args.
- Cleared the 17 ruff errors (PT018/E302/E306/E501) across the slice's
  test files by splitting composite asserts, adding missing blank
  lines, and wrapping long lines -- no assertions weakened, no noqa.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-29 14:22:19 -07:00