Commit Graph

3482 Commits

Author SHA1 Message Date
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
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
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
a0d1816a6e feat: add mergeable skill bundles with incremental compilation
Refactor skill compilation around mergeable bundle patches so dynamic skill updates no longer require full rebuilds. Keep dependency closures accurate by recomputing affected nodes from direct dependency data.
2026-02-28 14:35:29 +08:00
a1d3acdc2d fix: update files_url to use FILES_API_URL in DifyCliConfig 2026-02-15 17:19:08 +08:00
cb6445a977 feat: fallback handle for skill exception when draft not sync yet 2026-02-15 02:00:27 +08:00
dd8385abf1 feat: centralize command execution timeout constant for sandbox providers 2026-02-14 16:01:27 +08:00
292bfceae6 feat(api): implement tool argument validation in Function Call strategy 2026-02-14 14:28:46 +08:00
5432bba0ca fix: increase COMMAND_TIMEOUT_SECONDS to 2 hours for better command execution handling 2026-02-14 10:55:29 +08:00
cc1085ebd4 fix(session): enable all tools by default in SandboxBashSession 2026-02-13 17:53:55 +08:00
yyh
e730124740 Merge remote-tracking branch 'origin/main' into feat/support-agent-sandbox
# Conflicts:
#	api/uv.lock
#	web/app/components/apps/__tests__/app-card.spec.tsx
#	web/app/components/apps/__tests__/list.spec.tsx
#	web/app/components/datasets/create/__tests__/index.spec.tsx
#	web/app/components/datasets/metadata/metadata-dataset/__tests__/dataset-metadata-drawer.spec.tsx
#	web/app/components/plugins/readme-panel/__tests__/index.spec.tsx
#	web/app/components/rag-pipeline/__tests__/index.spec.tsx
#	web/app/components/rag-pipeline/hooks/__tests__/index.spec.ts
#	web/eslint-suppressions.json
2026-02-13 15:17:52 +08:00
16df9851a2 feat(api): optimize OceanBase vector store performance and configurability (#32263)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-02-13 09:48:55 +08:00
c0ffb6db2a feat: support config max size of plugin generated files (#30887)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-13 09:48:27 +08:00
c0b47bd318 fix: update final turn reminder to specify output file location 2026-02-12 14:22:15 +08:00
d953982536 refactor: streamline output building in LLMNode with new _build_outputs method 2026-02-12 11:28:53 +08:00
2bf767d5f7 feat: add Creators Platform helper for DSL upload and OAuth redirect (Vibe Kanban) (#32232)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 21:10:48 +08:00
ccf27adaa3 feat(llm): enhance structured output prompts 2026-02-11 17:48:43 +08:00
yyh
d3b59abeb2 fix: apply ruff 2026-02-11 12:44:31 +08:00
yyh
29406dbc46 Merge remote-tracking branch 'origin/main' into feat/support-agent-sandbox
# Conflicts:
#	api/core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py
2026-02-11 12:44:05 +08:00
0310f631ee fix: fix get_message_event_type return wrong message type (#32019)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-02-11 10:57:27 +08:00
704ee40caa fix(api): excessive high CPU usage caused by RedisClientWrapper (#32212)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-02-11 09:49:29 +08:00
aca1ac5714 fix: update user_id assignment in SandboxService calls for consistency 2026-02-10 21:26:06 +08:00
2da770cdbd feat: add File Upload node functionality and related components
- Implemented File Upload node with support for uploading files to the sandbox.
- Added necessary UI components including node panel and default configurations.
- Enhanced workflow constants and enums to include File Upload.
- Updated error handling for file upload operations.
- Integrated File Upload into existing workflow structure, ensuring compatibility with variable handling and output management.
- Added translations for new File Upload features in workflow.json.
2026-02-10 20:51:31 +08:00
a5271baea0 fix: enhance error messages for missing bash command and SSH configuration validation 2026-02-10 20:51:31 +08:00
56fd571acc fix(llm): improve handling of tool arguments in LLMNode to ensure default values are used 2026-02-10 20:07:21 +08:00
aba1752e6c fix(prompts): fix default argument handling in tool calls 2026-02-10 18:31:34 +08:00
yyh
2ab0b334a8 Merge remote-tracking branch 'origin/main' into feat/support-agent-sandbox
# Conflicts:
#	web/app/components/rag-pipeline/components/update-dsl-modal.tsx
#	web/app/components/workflow-app/hooks/use-nodes-sync-draft.ts
#	web/app/components/workflow/variable-inspect/utils.tsx
#	web/app/layout.tsx
#	web/context/event-emitter.tsx
#	web/eslint-suppressions.json
#	web/next.config.ts
#	web/package.json
#	web/pnpm-lock.yaml
#	web/types/feature.ts
2026-02-10 18:12:41 +08:00
acbcca0322 refactor(api): enhance message building in LLM trace processing 2026-02-10 17:18:53 +08:00
14251b249d fix(api): include file marker for workflow tool file outputs (#32114) 2026-02-10 16:51:12 +08:00
e86802ad27 chore(api): improve structured output tool call prompt and update handling in LLMNode 2026-02-10 15:25:56 +08:00
9614fe8e6e feat: agent sandbox support HITL 2026-02-09 22:20:41 +08:00
5eeb6c56f0 feat: implement sandbox layer integration in app generators 2026-02-09 22:20:41 +08:00
92e58aa624 fix: update SSH worker command and add timeout handling 2026-02-09 19:52:42 +08:00
8a057ac242 fix: apply ruff 2026-02-09 17:01:07 +08:00