feat: add update methods for artifacts to support mid-flow updates
This adds the ability to update existing artifacts during a flow run,
addressing the use case where users have long-running flows and want
to update artifact data progressively rather than creating new versions.
Changes:
- Add `update()` and `aupdate()` methods to the `Artifact` base class
- Add convenience functions for updating specific artifact types:
- `update_markdown_artifact` / `aupdate_markdown_artifact`
- `update_table_artifact` / `aupdate_table_artifact`
- `update_link_artifact` / `aupdate_link_artifact`
- `update_image_artifact` / `aupdate_image_artifact`
These complement the existing `update_progress_artifact` function.
Closes #10955
Signed-off-by: majiayu000 <1835304752@qq.com>
fix: preserve symlinks in get_directory instead of following them
This fixes an issue where symlinks were being resolved and their target
files copied during get_directory operations, which could potentially
expose sensitive files that were symlinked (e.g., credential files).
The fix adds symlinks=True to shutil.copytree calls in:
- LocalFileSystem.get_directory (both sync and async versions)
- GitHubRepository.get_directory
With this change, symlinks are preserved as symlinks in the destination
directory rather than being followed and their contents copied.
Closes #7868
Signed-off-by: majiayu000 <1835304752@qq.com>