Commit Graph

11073 Commits

Author SHA1 Message Date
GareArc
83f287ef48
Merge branch 'feat/openapi-error-contract' into deploy/enterprise 2026-06-11 00:53:34 -07:00
zyssyz123
fb39df49c8
feat(agent): support cli tool scoped env (#37324)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-06-11 07:14:39 +00:00
呆萌闷油瓶
c4a8d79be9
perf(api): reduce workflow startup latency for chatflow (#36773)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-06-11 07:05:35 +00:00
KVOJJJin
632df88228
fix(web): correct icon of tag (#37326) 2026-06-11 07:01:46 +00:00
KVOJJJin
e26214c02d
fix(web): typo of creator filter (#37321) 2026-06-11 06:26:41 +00:00
autofix-ci[bot]
4b836b56a9
[autofix.ci] apply automated fixes 2026-06-11 06:06:40 +00:00
GareArc
701b9699b3
chore(contracts): regenerate with OpenApiErrorCode enum definition 2026-06-10 22:54:51 -07:00
GareArc
9e0e23a339
feat(api): expose OpenApiErrorCode enum as standalone swagger definition 2026-06-10 22:49:50 -07:00
盐粒 Yanli
d3977cea77
fix(api): handle agent deferred tool events (#37319) 2026-06-11 05:18:43 +00:00
Jingyi
49c97a3f61
fix(web): show plugin auth permission hint (#37310) 2026-06-11 03:24:39 +00:00
盐粒 Yanli
117a25b32a
feat(dify-agent): sync ask-human updates (#37286)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-06-11 02:44:26 +00:00
Yunlu Wen
84490179b0
feat: trace document retrieval (#37283) 2026-06-11 02:39:59 +00:00
GareArc
5b75aae20d
test: dedupe error-path test helpers in cli and api 2026-06-10 19:06:59 -07:00
GareArc
673eb6bff9
refactor(cli): table-drive status classification in error mapper
Also narrows classifyResponse return type to HttpClientError (type-level
only; the body always returned it).
2026-06-10 18:52:48 -07:00
chariri
2a46a7d91d
refactor(api): migrate remaining console APIs to use injected user/tenant (#37288) 2026-06-11 01:30:31 +00:00
Stephen Zhou
5ed663e7fd
refactor: use foxact package for copied hooks (#37308) 2026-06-11 01:05:08 +00:00
Rohit Gahlawat
08f1bf20ab
refactor(web): mark Props of app/annotation components as read-only (#25219) (#37299) 2026-06-11 00:19:51 +00:00
Rohit Gahlawat
86ffa119ff
refactor(web): mark Props of workflow/ components as read-only (#25219) (#37304) 2026-06-11 00:18:51 +00:00
Rohit Gahlawat
e07c50c83f
refactor(web): mark Props of plugins/ components as read-only (#25219) (#37303) 2026-06-11 00:18:00 +00:00
Rohit Gahlawat
ffeccfff0c
refactor(web): mark Props of base/ components as read-only (#25219) (#37302) 2026-06-11 00:17:17 +00:00
Rohit Gahlawat
56b82449fc
refactor(web): mark Props of datasets/ components as read-only (#25219) (#37300) 2026-06-11 00:16:21 +00:00
Rohit Gahlawat
9c6577804c
refactor(web): mark Props of app/ components as read-only (#25219) (#37301)
Co-authored-by: Asuka Minato <i@asukaminato.eu.org>
2026-06-11 00:15:31 +00:00
Rohit Gahlawat
b4205af9b9
refactor(web): mark Props of explore/ components as read-only (#25219) (#37290) 2026-06-10 18:21:00 +00:00
Rohit Gahlawat
162c478368
refactor(web): mark Props of (commonLayout) components as read-only (#25219) (#37291) 2026-06-10 18:20:30 +00:00
Rohit Gahlawat
be2034f681
refactor(web): mark Props of share/ components as read-only (#25219) (#37292) 2026-06-10 18:19:37 +00:00
Rohit Gahlawat
beec13ed61
refactor(web): mark Props of header/account-setting components as read-only (#25219) (#37293) 2026-06-10 18:18:43 +00:00
Rohit Gahlawat
62a1476a95
refactor(web): mark Props of misc components as read-only (#25219) (#37294) 2026-06-10 18:18:02 +00:00
GareArc
67229339cb
refactor(openapi): own FilenameNotExists error instead of touching the shared class
controllers/common/errors.py is consumed by other controllers; keep it
untouched and declare the openapi-surface error as an OpenApiError
subclass. Wire output is identical.
2026-06-10 04:34:46 -07:00
GareArc
57fb121f8a
fix(api): add override decorators and refresh generated contract after main merge 2026-06-10 04:24:38 -07:00
GareArc
0c661ac06b
Merge remote-tracking branch 'origin/main' into feat/openapi-error-contract 2026-06-10 04:17:37 -07:00
GareArc
525d706bad
fix(openapi): harden formatter against malformed details and document bypass paths
Review follow-ups:
- finalize() now falls back to a minimal status-derived body instead of
  letting a ValidationError escape the framework error handler when an
  already-rewritten e.data carries malformed canonical details
- document that a pre-built e.response bypasses the body formatter
- note the promote-to-libs seam for transport-generic codes in the module
  docstring
- CLI: skip the loc prefix when a server error detail has an empty loc
2026-06-10 04:04:17 -07:00
yyh
a83118c0f4
refactor(web): compose tab header with dify-ui tabs (#37280) 2026-06-10 10:45:22 +00:00
GareArc
50573c78b9
docs(openapi): state the ErrorBody field table in the contract module docstring 2026-06-10 03:42:48 -07:00
zyssyz123
2c5c8e82c3
feat: agent slash menu backend (#37268)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-06-10 10:40:03 +00:00
GareArc
32809403d6
feat(cli): render server error details and semantic code without -v
Surfaces server semantic code (server.code ?? e.code), per-field validation
details, and the winning hint (server.hint ?? e.hint) in human output so a
422 user sees actionable context without needing --verbose.
2026-06-10 03:32:51 -07:00
GareArc
f3dde631dd
feat(cli): strict ErrorBody parse composed onto HttpClientError
Replaces the tolerant WireFields/WireEnvelope parse in error-mapper with a strict
zErrorBody.safeParse; non-conforming bodies yield no serverError and a generic
message. The parsed body attaches whole as serverError?: ErrorBody on HttpClientError,
with classification driven purely by HTTP status.
2026-06-10 03:25:54 -07:00
非法操作
6658a7c5e7
fix: block frozen deleted accounts during invite activation (#37281) 2026-06-10 10:21:05 +00:00
GareArc
57f527405d
chore(contracts): regenerate openapi contract with canonical ErrorBody 2026-06-10 03:20:22 -07:00
GareArc
27bbbbcf4b
feat(openapi): document canonical error schema in swagger via contract decorators
@accepts(query/body) now emits a 422 response with ErrorBody; @returns emits a
default error response with ErrorBody. ErrorBody (and auto-promoted ErrorDetail)
are registered in openapi_ns so they appear in definitions and are reachable from
both error response entries.
2026-06-10 03:15:45 -07:00
GareArc
40df3c26c6
test(openapi): pin error-path matrix to canonical wire codes
Adds TestErrorMatrix (23 parametrized rows) covering every exception class
raised or mapped in files.py and app_run.py, asserting the exact wire code
each path emits and that every emitted code is an OpenApiErrorCode member.
Also adds error_code = "filename_not_exists" to FilenameNotExistsError, which
had no explicit code and was falling through to the status-map (bad_request).
2026-06-10 03:04:43 -07:00
GareArc
8cf49238af
refactor(openapi): route member-quota errors through the canonical formatter
Replaces the _quota_error/.response hack in workspaces.py with two
throwable OpenApiError subclasses (MemberLimitExceeded,
MemberLicenseExceeded) so all 403 quota responses flow through
OpenApiErrorFormatter rather than bypassing it via the early-return
in external_api.py. Wire codes rename to member_limit_exceeded and
member_license_exceeded.
2026-06-10 02:54:28 -07:00
Yunlu Wen
0a051b598f
feat: support import / export dsl in CLI (#37232)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: yyh <92089059+lyzno1@users.noreply.github.com>
Co-authored-by: cheatofrom <85830867+cheatofrom@users.noreply.github.com>
Co-authored-by: Escape0707 <tothesong@gmail.com>
Co-authored-by: Rohit Gahlawat <personal.rg56@gmail.com>
Co-authored-by: L1nSn0w <l1nsn0w@qq.com>
Co-authored-by: 盐粒 Yanli <yanli@dify.ai>
2026-06-10 09:51:40 +00:00
GareArc
f5c5dbaed5
feat(openapi): emit canonical ErrorBody on every /openapi/v1 error path
Install OpenApiErrorFormatter on the openapi blueprint's ExternalApi so
all non-2xx responses from /openapi/v1 carry the canonical ErrorBody shape
(code, message, status, optional details/hint). RFC 8628 device-flow
endpoints are unaffected — their flat {error: ...} shape is passed through
unchanged.

Also: set catch_all_404s=True when a formatter is present so unknown
routes return canonical JSON 404s (not Flask's default HTML 404).
Override _help_on_404 to suppress route suggestions, which would corrupt
the JSON contract and enumerate routes to unauthenticated callers.

Both behaviours are scoped by formatter presence — other blueprints that
construct ExternalApi without error_body_formatter are byte-identical.

Wire-level tests added to TestWireContract (3 tests, 18 total):
- 422 from @accepts validation carries code/status/details
- unknown-route 404 is canonical JSON without route suggestions
- device token POST returns RFC 8628 flat shape untouched by formatter
2026-06-10 02:48:38 -07:00
GareArc
41f827b609
feat(openapi): add OpenApiErrorFormatter normalizing all error paths to ErrorBody 2026-06-10 02:26:19 -07:00
gigglewang
534dd50d14
fix(e2e): replace non-UUID workspace IDs in auth/use.e2e.ts and global-flags.e2e.ts (#37266) 2026-06-10 09:14:19 +00:00
GareArc
24b6e6f983
chore(openapi): neutral wording for domain-code comments 2026-06-10 02:08:47 -07:00
GareArc
5c657885a9
refactor(api): inject error-body formatter seam into ExternalApi handlers 2026-06-10 02:07:12 -07:00
GareArc
3f53fa605e
feat(openapi): add canonical ErrorBody model and error-code enum 2026-06-10 02:03:59 -07:00
yyh
0d8f7c41de
feat: add dify-ui collapsible primitive and refactor workflow collapse usage (#37276)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-06-10 08:59:33 +00:00
github-actions[bot]
fb70ebb8f8
chore(i18n): sync translations with en-US (#37269)
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: yyh <92089059+lyzno1@users.noreply.github.com>
2026-06-10 08:44:14 +00:00