Commit Graph

242 Commits

Author SHA1 Message Date
David Park
4ffcf3bf4c
Merge d022621bc9 into dfac3e524e 2026-08-14 14:49:43 +00:00
zyssyz123
dfac3e524e
fix: reclaim conversation resources on deletion (#40792)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-08-14 14:30:04 +00:00
Mahbub Souad
557fbec45f
refactor: add Mapped type annotations to model fields (#40373) (#40380) 2026-08-14 12:03:17 +00:00
L1nSn0w
ea6770c7a1
feat(oauth): drive silent authorization from oauth_provider_apps.auto_authorize (#40783)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-08-14 10:29:39 +00:00
Asuka Minato
b391dc56a0
chore: example to rm db.session (#40370) 2026-08-10 02:58:52 +00:00
dparkmit24
2c162109c5 test(agent): pin the colliding case and state why the rule is shaped this way
The occurrence selector tells a per-call list from a single call's list
value by length alone. One test pinned the side where that is
unambiguous -- a 3-element list against 2 calls, replayed whole. The side
that decides whether the rule is safe is the other one: a tool called n
times whose single stored value is a list of length n. That case was
decided by the rule and described by no test, so it read as an oversight
rather than a decision.

Pin it at both readers. The replay reader in base_agent_runner and the
display reader on MessageAgentThought each get a two-call record whose
one stored value is a two-element list, asserting that call 1 reads
element 0 and call 2 reads element 1 -- what the rule does today. The
name says what the case concedes rather than what it asserts.

The docstrings say why the asymmetry is tolerable. observation values
are always str: ToolEngine.agent_invoke is typed
-> tuple[str, list[str], ToolInvokeMeta] and both runners store element
0, so a list under a tool name is not a shape any writer produces and
the length check is defensive there. tool_input values are json.loads of
the model's arguments with no shape check, so a legacy list-valued input
is possible in principle, and that is the side the collision can reach.

The selector is defined twice, identically, because models/ importing
from core/agent/ is the worse layering trade and the reverse is odd.
Neither copy is in the wrong place, so each now names the other and says
the duplication is deliberate -- enough for a future editor to find both.

No behaviour change: the condition, the ordering and the fallback are
untouched.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-05 18:57:51 -07:00
dparkmit24
8b91f5bc1b refactor(agent): keep the occurrence selector where the review found it
The selector moved into models.model so the log reader and the replay
reader could share one definition. It moves back: the review thread on
this branch anchors to it in base_agent_runner, and relocating a symbol
mid-review costs the reviewer more than the duplicate saves.

base_agent_runner is byte-identical to what it was before the move.
models.model keeps its own local copy with the same logic, so a change
to how a per-call payload is recognised has to be made in both places --
noted here rather than fixed, because that recognition rule is an open
question on the review.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-05 09:59:03 -07:00
dparkmit24
c881abff0c fix(agent): show one log entry per call when a tool repeats in a turn
The console agent log builds one entry per name in the ";"-joined tool
column, then looks each name up in a dict keyed by tool name. A tool
called twice in one turn produced two entries reading the same key, so
both showed the same data -- the display the reproduction in #16220
describes.

Keeping every call's input and observation apart, as this branch already
did, changed what those two entries show without making them right: each
one showed both calls' data instead of one call's data twice.

Read the persisted payloads per call instead. MessageAgentThought now
exposes tool_inputs_per_call, tool_outputs_per_call and
tool_metas_per_call, one entry per entry in tools, in call order, and
get_agent_logs walks them alongside the names. A name whose stored value
is not one value per call gives the same value to each of its calls, so
every record written before those calls were kept apart renders exactly
as it renders today.

That makes tool_invoke_meta safe to group the same way, which it now is.
It carries the provider, the duration and the error the log shows for
each displayed call, so leaving it name-keyed would have left a repeated
tool showing the last call's provider and duration against both entries.
Its other reader, the tool trace, covers the tool rather than one call of
it and takes the last call's meta -- the only one it had before.

The occurrence selector moves to models.model so the reader that builds
the log and the reader that replays history share one definition. Its
behaviour is unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-05 09:47:17 -07:00
盐粒 Yanli
a048f35099
refactor: introduce agent working environment architecture (#39480)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-28 13:16:05 +00:00
Escape0707
a752f43b8e
test: use pristine file-backed SQLite fixtures (#39624)
Co-authored-by: Asuka Minato <i@asukaminato.eu.org>
2026-07-27 08:07:05 +00:00
FFXN
858b3b74dc
feat: add CE telemetry report (#39452)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-27 02:04:28 +00:00
Xiyuan Chen
b56ac4af4d
feat: gate agent management behind the agent.manage permission (#39330)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
Co-authored-by: yyh <92089059+lyzno1@users.noreply.github.com>
2026-07-23 07:34:07 +00:00
Byron.wang
ab3e4daa95
refactor: explicit DB session propagation across backend paths (#38559)
Co-authored-by: WH-2099 <wh2099@pm.me>
2026-07-15 06:48:28 +00:00
zyssyz123
f86bfb2a31
feat(agent): support new Agent DSL import and export (#38849)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-15 02:02:14 +00:00
盐粒 Yanli
52c106b532
feat(agent-v2): sync nightly updates to main (2026-06-25) (#37915)
Co-authored-by: Joel <iamjoel007@gmail.com>
Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
Co-authored-by: Yansong Zhang <916125788@qq.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-06-26 13:13:35 +00:00
Cyber
051f4b32e3
feat(web): add customizable input placeholder for Agent/Chatflow/Chatbot web app (#37790)
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: yyh <92089059+lyzno1@users.noreply.github.com>
Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
Co-authored-by: hjlarry <hjlarry@163.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-06-26 09:57:31 +00:00
非法操作
fe62177ba5
fix: add is_cloud_only for templates (#37846)
Co-authored-by: Joel <iamjoel007@gmail.com>
2026-06-24 08:29:54 +00:00
wangxiaolei
0cc27dd401
chore: not use request.scoped session (#37421)
Co-authored-by: WH-2099 <wh2099@pm.me>
2026-06-22 19:38:24 +00:00
-LAN-
8052c93133
refactor(api): type end user records with enum (#36945)
Co-authored-by: WH-2099 <wh2099@pm.me>
2026-06-19 01:02:01 +00:00
Wu Tianwei
33edf97f81
feat: RBAC (#37107)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: fatelei <fatelei@gmail.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: 盐粒 Yanli <yanli@dify.ai>
Co-authored-by: Charles Yao <chongbinyao33@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: yunlu.wen <yunlu.wen@dify.ai>
Co-authored-by: yyh <92089059+lyzno1@users.noreply.github.com>
Co-authored-by: Jingyi <jingyi.qi@dify.ai>
Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
Co-authored-by: Joel <iamjoel007@gmail.com>
Co-authored-by: hjlarry <hjlarry@163.com>
Co-authored-by: Asuka Minato <i@asukaminato.eu.org>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Xiyuan Chen <52963600+GareArc@users.noreply.github.com>
Co-authored-by: gigglewang <gigglewang@dify.ai>
Co-authored-by: chariri <w@chariri.moe>
Co-authored-by: Evan <2869018789@qq.com>
Co-authored-by: zyssyz123 <916125788@qq.com>
2026-06-18 16:35:29 +00:00
Asuka Minato
af99414fc1
chore: port isinstance to match case (#37271)
Co-authored-by: WH-2099 <wh2099@pm.me>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-06-18 00:18:03 +00:00
Jingyi
9b74df21d0
feat(web): refine onboarding UI (#37433)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
Co-authored-by: Joel <iamjoel007@gmail.com>
Co-authored-by: hjlarry <hjlarry@163.com>
Co-authored-by: fatelei <fatelei@gmail.com>
Co-authored-by: Asuka Minato <i@asukaminato.eu.org>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Xiyuan Chen <52963600+GareArc@users.noreply.github.com>
Co-authored-by: gigglewang <gigglewang@dify.ai>
Co-authored-by: Yunlu Wen <yunlu.wen@dify.ai>
Co-authored-by: chariri <w@chariri.moe>
Co-authored-by: Evan <2869018789@qq.com>
Co-authored-by: yyh <92089059+lyzno1@users.noreply.github.com>
2026-06-15 08:47:15 +00:00
jashwanth_reddy_gummula
0ca39c96db
refactor: replace if isinstance with match case (#37412) 2026-06-14 13:00:01 +00:00
Asuka Minato
f15a8f02ef
ci: add flag for linter (#37018)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-06-08 04:53:12 +00:00
Evan
76fb1b6ea8
refactor(api): remove redundant typing.cast calls (#37124) 2026-06-06 02:39:07 +00:00
FFXN
00ac937934
feat: snippet (#37046)
Co-authored-by: JzoNg <jzongcode@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-06-05 09:38:42 +00:00
zyssyz123
e35d23c3cb
feat(api): Agent App type S1 — AppMode.AGENT + create flow + binding (#36829)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-06-02 03:50:10 +00:00
-LAN-
8d99326fb3
feat(plugin): cache plugin model providers by tenant (#36449)
Co-authored-by: WH-2099 <wh2099@pm.me>
2026-05-23 09:12:09 +00:00
非法操作
927a17804b
feat: support configurable explore app categories (#35723) 2026-05-08 06:04:07 +00:00
Asuka Minato
1065a4840a
refactor: move SegmentAttachmentBinding and UploadFile to TypeBase (#30218)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-27 14:01:50 +00:00
Asuka Minato
7efc887e32
refactor: port MessageAnnotation (#31005)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-26 11:47:42 +00:00
非法操作
afec528f51
feat: improve follow-up settings (#35442)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-22 08:55:16 +00:00
dev-miro26
97bb338e7d
fix: prevent double /v1 in MCP server URL causing 404 authorization failure (#34596)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-20 02:42:59 +00:00
Yunlu Wen
3193e8a712
chore: reorg imports (#35308)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-16 08:50:02 +00:00
wdeveloper16
1bcc7f78c7
refactor: replace bare dict with dict[str, Any] in models, providers, extensions, libs, and test utilities (#35186) 2026-04-14 17:51:25 +00:00
sxxtony
98e74c8fde
refactor: migrate MessageAnnotation to TypeBase (#34807) 2026-04-13 06:22:43 +00:00
sxxtony
ea9f74b581
refactor: migrate RecommendedApp to TypeBase (#34808) 2026-04-13 05:19:49 +00:00
sxxtony
660c7e4a43
refactor: migrate TrialApp and AccountTrialAppRecord to TypeBase (#34897) 2026-04-10 05:13:06 +00:00
sxxtony
985e71ebf4
refactor: migrate TrialApp and AccountTrialAppRecord to TypeBase (#34806) 2026-04-09 15:41:29 +00:00
Jonathan Chang
0a6494abfb
refactor(api): deduplicate EnabledConfig property logic in AppModelConfig (#34793) 2026-04-09 14:24:39 +00:00
Jonathan Chang
d5ababfed0
refactor(api): deduplicate json serialization in AppModelConfig.from_model_config_dict (#34795) 2026-04-09 06:14:48 +00:00
dataCenter430
e6715a2dbe
refactor: convert FileTransferMethod if/elif to match/case (#30001) (#34769) 2026-04-08 23:27:10 +00:00
carlos4s
ae9fcc2969
refactor: use sessionmaker in controllers, events, models, and tasks 1 (#34693) 2026-04-07 23:47:20 +00:00
99
8f9dbf269e
chore(api): align Python support with 3.12 (#34419)
Co-authored-by: Asuka Minato <i@asukaminato.eu.org>
2026-04-02 05:07:32 +00:00
tmimmanuel
ec0f20de03
refactor: use EnumText for prompt_type and customize_token_strategy (#34204) 2026-03-27 22:29:38 +00:00
99
40591a7c50
refactor(api): use standalone graphon package (#34209)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-27 21:05:32 +00:00
99
52e7492cbc
refactor(api): rename dify_graph to graphon (#34095) 2026-03-25 21:58:56 +08:00
-LAN-
56593f20b0
refactor(api): continue decoupling dify_graph from API concerns (#33580)
Signed-off-by: -LAN- <laipz8200@outlook.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: WH-2099 <wh2099@pm.me>
2026-03-25 20:32:24 +08:00
Krishna Chaitanya
ad3899f864
fix: resolve SADeprecationWarning for callable default in remaining TypeBase models (#34049) 2026-03-25 12:51:36 +09:00
qianchongyang
e873cea99e
fix: SQLAlchemy deprecation warnings for default parameter (#33980)
Co-authored-by: Asuka Minato <i@asukaminato.eu.org>
2026-03-25 00:18:29 +09:00