refactor: harden orcs-lua module visibility and add safety assertions#30
Merged
refactor: harden orcs-lua module visibility and add safety assertions#30
Conversation
Add orcs-acp crate implementing the ACP Agent trait from agent-client-protocol v0.9. Enables ORCS to run as an ACP-compatible agent over stdio, registerable in ACP-aware editors (Zed, JetBrains). P1 implementation: initialize, authenticate, new_session, prompt, cancel handlers with echo response. Engine integration planned for P2. CLI: `orcs --acp` starts the ACP server mode.
Replace echo-based engine_worker with real ORCS engine integration. The ACP server now sends user prompts through IOInputHandle and streams engine output back as ACP SessionUpdate notifications, using the same idle-timeout pattern as run_command().
Track pending approval IDs from ShowApprovalRequest and attach them as InputContext when the next prompt is a HIL response (y/n), enabling the engine's IOBridge to dispatch correct approve/reject signals. Add comprehensive tests for convert and server modules.
- Add Send/Sync static assertion tests for LuaComponent - Add AUDIT NOTE to git_info documenting intentional sandbox bypass - Narrow 8 modules from pub to pub(crate): http_command, llm_adapter, llm_command, orcs_helpers, sandbox_eval, sanitize, tool_registry, tools - Retain pub use re-exports for symbols used by downstream crates
Code Metrics
Domain breakdown
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
LuaComponentimplements Send + Sync (component/tests.rs)orcs_helpers::git_infocallingCommand::new("git")directly without ChildContext (read-only, hardcoded literals, scoped to sandbox root)pub modtopub(crate) mod(http_command,llm_adapter,llm_command,orcs_helpers,sandbox_eval,sanitize,tool_registry,tools). Allpub usere-exports consumed by downstream crates are preservedTest plan
cargo checkpassescargo clippy -p orcs-lua -- -D warningspassescargo test -p orcs-lua— all 73 tests pass