Commit Graph

5923 Commits

Author SHA1 Message Date
cccff6768a Merge commit '9c339239' into sandboxed-agent-rebase
Made-with: Cursor

# Conflicts:
#	api/README.md
#	api/controllers/console/app/workflow_draft_variable.py
#	api/core/agent/cot_agent_runner.py
#	api/core/agent/fc_agent_runner.py
#	api/core/app/apps/advanced_chat/app_runner.py
#	api/core/plugin/backwards_invocation/model.py
#	api/core/prompt/advanced_prompt_transform.py
#	api/core/workflow/nodes/base/node.py
#	api/core/workflow/nodes/llm/llm_utils.py
#	api/core/workflow/nodes/llm/node.py
#	api/core/workflow/nodes/parameter_extractor/parameter_extractor_node.py
#	api/core/workflow/nodes/question_classifier/question_classifier_node.py
#	api/core/workflow/runtime/graph_runtime_state.py
#	api/extensions/storage/base_storage.py
#	api/factories/variable_factory.py
#	api/pyproject.toml
#	api/services/variable_truncator.py
#	api/uv.lock
#	web/app/account/oauth/authorize/page.tsx
#	web/app/components/app/configuration/config-var/config-modal/field.tsx
#	web/app/components/base/alert.tsx
#	web/app/components/base/chat/chat/answer/human-input-content/executed-action.tsx
#	web/app/components/base/chat/chat/answer/more.tsx
#	web/app/components/base/chat/chat/answer/operation.tsx
#	web/app/components/base/chat/chat/answer/workflow-process.tsx
#	web/app/components/base/chat/chat/citation/index.tsx
#	web/app/components/base/chat/chat/citation/popup.tsx
#	web/app/components/base/chat/chat/citation/progress-tooltip.tsx
#	web/app/components/base/chat/chat/citation/tooltip.tsx
#	web/app/components/base/chat/chat/question.tsx
#	web/app/components/base/chat/embedded-chatbot/inputs-form/index.tsx
#	web/app/components/base/chat/embedded-chatbot/inputs-form/view-form-dropdown.tsx
#	web/app/components/base/markdown-blocks/form.tsx
#	web/app/components/base/prompt-editor/plugins/hitl-input-block/component-ui.tsx
#	web/app/components/base/tag-management/panel.tsx
#	web/app/components/base/tag-management/trigger.tsx
#	web/app/components/header/account-setting/index.tsx
#	web/app/components/header/account-setting/members-page/transfer-ownership-modal/index.tsx
#	web/app/components/header/account-setting/model-provider-page/provider-added-card/index.tsx
#	web/app/signin/utils/post-login-redirect.ts
#	web/eslint-suppressions.json
#	web/package.json
#	web/pnpm-lock.yaml
2026-03-23 09:00:45 +08:00
51c418f497 fix: update remaining core.file imports missed in previous commit
Made-with: Cursor
2026-03-23 08:39:48 +08:00
a883b74272 fix: update core.file imports to core.workflow.file after merge
The File class and related modules were moved from core.file to
core.workflow.file in the sandboxed-agent branch. This commit
updates all remaining references including test mock/patch paths,
Switch component defaultValue→value changes, and account setting
tab constant updates.

Made-with: Cursor
2026-03-19 18:05:55 +08:00
89b76d6c33 Merge commit '657eeb65' into sandboxed-agent-rebase
Made-with: Cursor

# Conflicts:
#	api/core/agent/cot_chat_agent_runner.py
#	api/core/agent/fc_agent_runner.py
#	api/core/memory/token_buffer_memory.py
#	api/core/variables/segments.py
#	api/core/workflow/file/file_manager.py
#	api/core/workflow/nodes/agent/agent_node.py
#	api/core/workflow/nodes/llm/llm_utils.py
#	api/core/workflow/nodes/parameter_extractor/parameter_extractor_node.py
#	api/core/workflow/workflow_entry.py
#	api/factories/variable_factory.py
#	api/pyproject.toml
#	api/services/variable_truncator.py
#	api/uv.lock
#	web/app/components/app/app-publisher/index.tsx
#	web/app/components/app/overview/settings/index.tsx
#	web/app/components/apps/app-card.tsx
#	web/app/components/apps/index.tsx
#	web/app/components/apps/list.tsx
#	web/app/components/base/chat/chat-with-history/header-in-mobile.tsx
#	web/app/components/base/features/new-feature-panel/conversation-opener/modal.tsx
#	web/app/components/base/features/new-feature-panel/file-upload/setting-content.tsx
#	web/app/components/base/features/new-feature-panel/moderation/moderation-setting-modal.tsx
#	web/app/components/base/features/new-feature-panel/text-to-speech/param-config-content.tsx
#	web/app/components/base/message-log-modal/index.tsx
#	web/app/components/base/switch/index.tsx
#	web/app/components/base/tab-slider-plain/index.tsx
#	web/app/components/explore/try-app/app-info/index.tsx
#	web/app/components/plugins/plugin-detail-panel/tool-selector/components/reasoning-config-form.tsx
#	web/app/components/workflow/nodes/llm/components/json-schema-config-modal/visual-editor/edit-card/required-switch.tsx
#	web/app/components/workflow/nodes/llm/panel.tsx
#	web/contract/router.ts
#	web/eslint-suppressions.json
#	web/i18n/fa-IR/workflow.json
2026-03-19 17:38:56 +08:00
2ce7919e6d test: update unit tests for system message handling and workflow collaboration serices 2026-03-19 17:19:56 +08:00
fefbd84c67 chore: remove obsolete variable extraction design documentation 2026-03-19 10:07:47 +08:00
56ca40ab19 fix: enhance container architecture detection in DockerDaemonEnvironment 2026-03-18 15:30:18 +08:00
2e05068647 fix: update NoopSandboxStorage to return True for mount and unmount methods 2026-03-17 16:50:55 +08:00
40b0d7c898 feat: implement app runtime upgrade feature to clone and convert classic runtime apps to sandboxed mode 2026-03-17 13:54:16 +08:00
f0c6c0159c refactor: a lot of optimization and enhancement 2026-03-12 18:23:16 +08:00
7bd6dd588e refactor: remove keepalive thread and utilize E2B's native timeout management 2026-03-12 17:22:12 +08:00
e1510a64c9 fix: harden sandbox builder cleanup 2026-03-12 17:03:38 +08:00
0a4a85ada2 fix: remove early return in DraftAppAssetsInitializer if file tree is empty 2026-03-12 17:03:38 +08:00
d5a921e4df fix: log storage key details when skill bundle is not found 2026-03-12 16:31:53 +08:00
2aff0ada8f fix: centralize sandbox temp path management 2026-03-12 16:03:01 +08:00
1d1f09dc92 feat: add directory creation step for assets temp directory in AppAssetsInitializer 2026-03-12 15:56:24 +08:00
76c02db094 fix: namespace sandbox temp paths by sandbox ID to prevent cross-session collisions
DifyCli and AppAssets used hardcoded absolute paths under /tmp/.dify/,
causing concurrent sandbox sessions on the same host (e.g. SSH provider)
to overwrite each other's config files and CLI binaries.

- Add Sandbox.id property (uuid4 hex) as a stable, path-safe identifier
  independent of provider-specific environment IDs
- Convert DifyCli/AppAssets from static constants to per-sandbox instances
  namespaced under /tmp/.dify/{sandbox.id}/
- Replace all vm.metadata.id references with sandbox.id
- Replace upload_file with heredoc-based pipeline step in session.py to
  reduce round-trips
2026-03-11 19:19:17 +08:00
6fe221518e feat: enhance tool access management with ToolAccessDescription and update ToolAccessPolicy 2026-03-11 18:45:56 +08:00
8513fa2897 feat: add support for file outputs in LLMNode, including auto-collection and deduplication 2026-03-11 16:30:54 +08:00
f0c82f28cb fix: improve file preview in chat messages by yielding events in task pipeline 2026-03-11 16:30:54 +08:00
dbc87dbd3b feat: update LLM node skills API to extract tool dependencies and change endpoint to POST 2026-03-11 14:41:33 +08:00
0776e16fdc refactor: async skill compile and context sharing 2026-03-11 14:41:33 +08:00
65e89520c0 refactor: unify download item types and eliminate extension-based branching
Merge AssetDownloadItem, AssetInlineItem into SandboxDownloadItem with
optional 'content' field. All consumers now follow a clean pipeline:
  get items → accessor.resolve_items() → AppAssetService.to_download_items() → download

Key changes:
- SandboxDownloadItem gains content: bytes | None (entities.py)
- ZipSandbox.download_items() handles both inline (base64 heredoc) and
  remote (curl) via a single pipeline — no structural branching
- AssetDownloadService.build_download_script() takes unified list
- CachedContentAccessor.resolve_items() batch-enriches items from DB
  (extension-agnostic, no 'if md' checks needed)
- AppAssetService.to_download_items() converts AssetItem → SandboxDownloadItem
- DraftAppAssetsInitializer, package_and_upload, export_bundle simplified
- file_upload/node.py switched to SandboxDownloadItem
- Deleted AssetDownloadItem and AssetInlineItem classes
2026-03-10 17:12:15 +08:00
6ac730ec2e fix: ruff 2026-03-10 17:12:15 +08:00
9afdb490ff fix: update down_revision in migration and correct import statement in app_asset model 2026-03-10 17:12:15 +08:00
e9be6bf2ab feat: add AWS Code Interpreter sandbox provider and update sandbox type 2026-03-10 17:12:15 +08:00
a8074f4f4a feat: add DB inline content cache for app asset draft files
Introduce app_asset_contents table as a read-through cache over S3 for
text-like asset files (e.g. .md skill documents). This eliminates N
individual S3 fetches during SkillBuilder builds — bulk_load pulls all
content in a single SQL query with S3 fallback on miss.

Key components:
- CachedContentAccessor: DB-first read / dual-write / S3 fallback
- AssetContentService: static DB operations (get, get_many, upsert, delete)
- should_mirror(): single source of truth for extension-based policy
- Alembic migration for app_asset_contents table

Modified callers:
- SkillBuilder uses accessor.bulk_load() instead of per-node S3 reads
- AppAssetService.get/update_file_content route through accessor
- delete_node cleans both DB cache and S3
- draft_app_assets_initializer uses should_mirror() instead of hardcoded .md
2026-03-10 17:12:14 +08:00
53f76a20c2 refactor: redesign skill compilation and document assembly process 2026-03-10 17:12:14 +08:00
e0794020f7 feat: extend NodeRunStreamChunkEvent with additional model metadata fields 2026-03-06 17:21:55 +08:00
1cb5ee918f feat: enhance model event handling with new identity and metrics fields 2026-03-05 14:08:37 +08:00
14755d0474 fix: pass parameters correctly for LLMNode.invoke_llm (#32902) 2026-03-03 16:32:00 +08:00
707bf20c29 refactor: knowledge index node decouples business logic (#32274) 2026-03-02 17:54:33 +08:00
68647391e7 fix(api): add return type annotation to filter_none_values() (#32774) 2026-03-02 17:51:21 +09:00
5c7a293ba7 feat: ensure document id is not missing (#32765) 2026-03-02 16:28:31 +08:00
8a7ba87349 fix: upgrade OpenTelemetry to 0.49b0 to fix context detach error (#32825) 2026-03-02 16:03:37 +09:00
9ddbc1c0fb fix: map all NodeType values to span kinds in Arize Phoenix tracing (#32059)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Crazywoola <100913391+crazywoola@users.noreply.github.com>
2026-03-02 14:54:26 +08:00
42a8d962a0 refactor: remove tests and core/rag from pyrefly excludes (#32801)
Co-authored-by: Stable Genius <259448942+stablegenius49@users.noreply.github.com>
2026-03-02 15:31:29 +09:00
cc127f5b62 fix: fix chat assistant response mode blocking is not work (#32394)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-02 14:05:04 +08:00
aca3d1900e chore(deps-dev): update types-aiofiles requirement from ~=24.1.0 to ~=25.1.0 in /api (#32803)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-02 13:59:53 +09:00
ddc47c2f39 chore(deps): update pyjwt requirement from ~=2.10.1 to ~=2.11.0 in /api (#32804)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-02 13:59:06 +09:00
8cc775d9f2 fix: optimize workflow_run iter query (#32815) 2026-03-02 11:01:11 +08:00
00dbaef04f fix: use declared_attr.directive for WorkflowNodeExecutionModel.__table_args__ (#32656)
Signed-off-by: edvatar <88481784+toroleapinc@users.noreply.github.com>
Co-authored-by: Asuka Minato <i@asukaminato.eu.org>
2026-03-02 10:15:06 +08:00
248202c220 fix: remove references to non-existent Document attributes in test (#32654)
Signed-off-by: edvatar <88481784+toroleapinc@users.noreply.github.com>
Co-authored-by: Asuka Minato <i@asukaminato.eu.org>
2026-03-02 10:14:56 +08:00
691c9911c7 fix(ci): make pyrefly diff comments focus on diagnostics (#32778) 2026-03-02 10:11:23 +08:00
baeea77c5b fix: typo in WebScraper plugin description: "Scrapper" → "Scraper" (#32790)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com>
2026-03-02 10:10:28 +08:00
9da98e6c6c fix: fix import error (#32800) 2026-03-02 08:59:53 +08:00
99
a01de98721 refactor(workflow): decouple start node external dependencies (#32793) 2026-03-02 02:01:41 +08:00
17c1538e03 refactor(workflow): move PromptMessageMemory to model_runtime.memory (#32796)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-02 01:58:02 +08:00
69b3e94630 refactor: inject workflow node memory via protocol (#32784) 2026-03-02 01:55:49 +08:00
ef2b5d6107 refactor(api): move llm quota deduction to app graph layer (#32786) 2026-03-01 23:25:36 +08:00