Commit Graph
10 Commits
Author SHA1 Message Date
Soulter 3ef71bcf30 refactor: unify native agents behind runtime sessions (#10973)
* refactor: code structure and agent runtime

* feat: enhance plugin SDK with public agent contexts, message types, and utility functions

* docs: update import statements to reflect changes before AstrBot v4.30.0

* feat: expose conversation agent SDK with turn controls

* refactor: introduce AgentConfig and profile-scoped subagent management

* fix: complete AgentConfig backup and CI integration
2026-11-04 16:28:02 +08:00
Soulter 8c99c2ce92 fix: restore Windows workspace files and simplify Local permissions (#10584)
* fix: fall back to legacy local permissions without isolation

* fix: support Windows workspace files and unify local defaults

* test: align local permission coverage and documentation

* fix: align effective local permissions across UI and tools

* fix: explicitly handle sandbox probe timeouts

* fix: fail closed when required local isolation is unavailable

* test: assert isolation denial details in execution tools

* fix: migrate Windows member defaults to workspace access

* docs: revert Chinese permission migration paragraph

* docs: remove redundant welcome setup explanation

* docs: restore original Chinese isolation guidance

* docs: restore original Chinese Windows guidance

* fix: remove persistent local isolation notice

* fix: explain available ways to grant local execution

* fix: include role in local execution permission errors

* fix: show saved execution permissions with inactive status

* fix: simplify inactive execution help text

* fix: clarify user ID in administrator access guidance

* fix: allow Windows drive mappings in restricted file access

* fix: offer optional remedies for unavailable local isolation

* fix: explain local isolation requirements and policy choices

* fix: shorten local isolation permission guidance

* fix: return local isolation denials only through tools

* test: update local isolation denial assertions
2026-10-17 13:41:20 +08:00
Soulter 6914bc3aa6 fix: move local network policy notice into system prompts (#10134)
* fix: move local network policy notice into system prompts

* fix: skip network policy notices for inactive tools
2026-09-20 11:46:12 +08:00
Ruochen Pan fce1bbc97a Fix:local sandbox policy feedback (#10096)
* docs(webui): clarify local file access scopes

* fix: report network restrictions in local tool results

* test: simplify local network policy feedback coverage
2026-09-15 17:05:41 +08:00
SoulterandRuochenPan 06261c532a feat: add role-based Local computer permissions (#9472)
* feat: sandbox local member execution on Linux

* feat: add macOS Seatbelt local sandbox

* feat: Implement race-resistant file access for local tools

- Added `open_file_in_allowed_roots` function in `local_file_security.py` to securely open files within specified directories, preventing path traversal attacks.
- Updated file reading functions in `file_read_utils.py` to accept file descriptors, allowing for safer file operations.
- Enhanced `FileReadTool`, `FileWriteTool`, and `FileEditTool` to utilize the new secure file access method.
- Added tests to ensure restricted access works correctly, including scenarios with symlinked directories and ancestor swaps.
- Improved error handling for file operations to provide clearer feedback on permission issues.

* feat: add role-based Local computer permissions

* fix: clarify Windows Local permission behavior

* style: use neutral permission matrix border

* fix: clarify Local runtime permission labels

* fix: localize computer runtime options

* fix: tighten default Local permission policy

* fix: allow macOS sandboxed shell forks

* refactor: extract platform process sandboxes

* refactor: expose cross-platform sandbox limits

* refactor: unify sandbox process lifecycle

* refactor: seal local sandbox abstractions

* test: align local sandbox tests with Windows support

* fix: improve local permission settings layout

* fix: initialize workspace for restricted file writes

* feat: expose runtime and sandbox dependency information

* feat: add disabled local access and platform-aware permission controls

* feat: display runtime information in local permission controls

* fix: validate local permission support before saving config

* fix: use supported local permission defaults on Windows

* fix: restrict local file sending and align Windows permission tests

* chore: remove redundant local permission hint

* fix: restore local sandbox DNS and approved file access

* ci: enable bubblewrap user namespaces on Ubuntu runners

* fix: report local sandbox startup failures

* fix: use a portable sandbox startup probe

* fix: preserve read-only Python virtualenv access in local sandboxes

* fix: revoke local shell sessions when permissions change

* fix: block shared-path attacks on local runtime file exchange

Sandboxed processes can write to shared temp roots, so a named session
log there could be replaced with a symlink to a host file that host-side
reads and appends would follow. Keep managed shell output on an anonymous
temporary file handle instead of a named path.

Also stop _resolve_path_from_sandbox from consulting a booter under the
local runtime: workspace and local-file checks already enforce caller
permissions, and the fallback branch probed the host shell without them.
Reject such paths with FileNotFoundError instead.

* fix: revoke local shell sessions when admin access is removed

* fix: skip missing default roots in local grep

* test: check sandbox file readability across platforms

* test: wait for watchdog retry without fixed sleeps

* test: synchronize watchdog log rotation assertions

---------

Co-authored-by: RuochenPan <badbatch0x01@gmail.com>
2026-09-15 15:48:01 +08:00
Soulter ff86d3276c fix: honor computer runtime settings in proactive agents (#9971)
* fix: honor computer runtime settings in proactive agents

* fix: default missing computer runtimes to none
2026-09-07 21:33:57 +08:00
Weilong Liao e7d5be632f feat: add ChatUI project workspaces (#9066)
* feat: add ChatUI project workspaces

* feat: refine chatui layout

* feat: enhance chat input and project view styles for attachment handling

* feat: adjust chat sidebar brand logo positioning

* feat: enhance project dialog with error handling and loading state
2026-07-03 21:54:20 +08:00
エイカク dd828c99f4 fix: run local python in session workspace (#8792) 2026-06-15 20:52:00 +08:00
Soulter 2472a12671 feat: filesystem grep, read, write, edit file and workspace support (#7402)
* feat: filesystem grep, read, edit file

* feat: add file write tool and enhance file read functionality

* feat: enhance tool prompt formatting and add escaped text decoding for file editing

* feat: remove redundant safe path tests from security restrictions

* feat: implement file read tool with support for text and image files, including validation for large files

* feat: add file read utilities and integrate with filesystem tools

* refactor: move computer tools to builtin tools registry

* refactor: remove unused plugin_context parameter from _apply_sandbox_tools

* feat: supports to display enabled builtin tools in configs

* feat: add tooltip for disabled builtin tools and update localization strings

* feat: add workspace extra prompt handling in message processing

* feat: add ripgrep installation to Dockerfile

* perf: shell executed in workspace dir in local env

* feat: enhance file reading capabilities to support PDF and DOCX parsing, including workspace storage for long documents

* feat: update converted text notice to suggest using grep for large files

* feat: implement handling for large tool results with overflow file writing and read tool integration

* fix: test

* feat: enhance onboarding steps to include computer access configuration and related help information

* feat: add support for additional temporary path in restricted environment checks

* feat: update computer access hints and add detailed configuration instructions
2026-04-11 17:01:54 +08:00
miaoxutao123 92ee534a2c feat: add OS information to tool descriptions and implement unit tests (#5677)
* feat: add OS information to tool descriptions and implement unit tests

* refactor: use module-level constant for OS name as suggested in PR review
2026-03-03 15:16:38 +08:00