-
Notifications
You must be signed in to change notification settings - Fork 0
Stabilize provider routing and quality checks #110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 4 commits
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
4ec47a0
chore(deps): patch brace-expansion audit finding
F0RLE f72ac9e
test: lock provider routing and console filters
F0RLE e355a9a
refactor: split console log target helpers
F0RLE 41c4a40
ci: add informational cross-platform checks
F0RLE 808f191
fix: address review hardening feedback
F0RLE 9b0c17c
refactor: split release target classification
F0RLE 4c1a629
refactor: split local session context planning
F0RLE b209c50
fix: gate window transparency on macos
F0RLE 1747edb
refactor: split streaming chunk parser
F0RLE 0075284
fix: clean cross-platform warning paths
F0RLE cc8e3f7
fix: quiet cross-platform probe warnings
F0RLE 2055e33
refactor: split console overview builder
F0RLE 616f099
refactor: split engine id normalization
F0RLE 987f1eb
refactor: split AI provider resolution
F0RLE 2a47b44
refactor: split AI key validation
F0RLE 28be161
fix: honor JS module package manager
F0RLE bc13584
docs: refresh project roadmap and integration state
F0RLE 6be1493
feat: expose backend catalog snapshot
F0RLE f8322f7
refactor: consume backend provider catalog in frontend
F0RLE 2bccb2b
fix: harden AI provider sessions and streaming
F0RLE a98169f
fix: stabilize console log filtering and cleanup
F0RLE ba9e985
feat: add read-only agent launcher state endpoint
F0RLE 3e721a7
feat: expose read-only agent console logs
F0RLE 4940440
fix: address provider and validation review issues
F0RLE ee46faf
feat: allow explicit local agent API token
F0RLE 1c29d2d
fix: refresh selected module runtime marker
F0RLE 3efbbf6
fix: sync agent-started module selection
F0RLE baf94b5
feat: add trusted local agent control api
F0RLE 8b462ac
feat: add agent control settings panel
F0RLE 26aa587
fix: route agent profile tokens through api auth
F0RLE a809fe6
fix: hide revoke action for revoked agents
F0RLE 0851b6c
fix: keep settings content within scroll bounds
F0RLE 433c958
fix: hide and delete agent tokens
F0RLE 352d6d8
fix: refresh agent control on api approvals
F0RLE 6f18a6e
fix(ai): handle provider policy edge cases
F0RLE 3f6136a
feat(agent): harden local control api
F0RLE bdd41aa
feat(agent): add launcher control ui
F0RLE a9c56ef
docs(agent): document launcher control api
F0RLE 57461eb
fix(agent): keep token copy and stop waits safe
F0RLE fae0a50
fix(console): localize agent logs and polish controls
F0RLE 34142d0
fix(settings): clarify external agent control copy
F0RLE 8fc5652
fix(settings): link external agent api docs
F0RLE ee7c14a
fix(settings): match agent docs badge style
F0RLE 35b3acb
fix(settings): move agent docs badge away from toggle
F0RLE fa9406b
fix(agent): consume one-time tokens atomically
F0RLE b9c1885
feat(settings): add section jump indicator
F0RLE e0103e0
fix(settings): soften section jump indicator
F0RLE fa4ad00
fix(agent-api): harden settings access
F0RLE f97359b
feat(agent-control): polish settings experience
F0RLE 18c4b22
docs(agent-api): align automation contract
F0RLE fd8259b
fix(agent-control): preserve token copy safety
F0RLE cdab42c
fix(settings): satisfy css keyword casing
F0RLE 735bb90
fix(agent-api): tighten approval and draft safeguards
F0RLE 1d14551
fix(review): address coderabbit stabilization findings
F0RLE File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,102 @@ | ||
| use crate::domain::engine::manager::canonical_engine_id; | ||
| use crate::errors::AppError; | ||
| use std::fs; | ||
| use std::path::{Path, PathBuf}; | ||
|
|
||
| pub(super) fn resolve_console_log_target(view_id: &str) -> Result<PathBuf, AppError> { | ||
| if let Some(engine_id) = view_id.strip_prefix("engine:") { | ||
| let engine_id = canonical_engine_id(engine_id); | ||
| validate_console_log_segment(&engine_id, "Engine ID")?; | ||
| return Ok(crate::utils::paths::ENGINE_LOGS_DIR.join(engine_id)); | ||
| } | ||
|
|
||
| if let Some(module_id) = view_id.strip_prefix("module:") { | ||
| crate::domain::modules::downloader::validate_module_id(module_id)?; | ||
| return Ok(crate::utils::paths::INTEGRATION_LOGS_DIR.join(module_id)); | ||
| } | ||
|
|
||
| Ok(crate::utils::paths::LOG_DIR.clone()) | ||
|
coderabbitai[bot] marked this conversation as resolved.
Outdated
|
||
| } | ||
|
|
||
| fn validate_console_log_segment(value: &str, label: &str) -> Result<(), AppError> { | ||
| if value.is_empty() { | ||
| return Err(AppError::Validation(format!("{label} cannot be empty"))); | ||
| } | ||
|
|
||
| if !value | ||
| .chars() | ||
| .all(|character| character.is_ascii_alphanumeric() || character == '-') | ||
| { | ||
| return Err(AppError::Validation(format!( | ||
| "{label} contains invalid characters" | ||
| ))); | ||
| } | ||
|
|
||
| Ok(()) | ||
| } | ||
|
|
||
| pub(super) fn canonical_console_view_id(view_id: &str) -> String { | ||
| if let Some(engine_id) = view_id.strip_prefix("engine:") { | ||
| return format!("engine:{}", canonical_engine_id(engine_id)); | ||
| } | ||
|
|
||
| view_id.trim().to_string() | ||
| } | ||
|
|
||
| pub(super) fn clear_console_log_target(view_id: &str, target: &Path) -> Result<(), AppError> { | ||
| if view_id == "general" { | ||
| clear_log_file(&target.join("axelate.log"))?; | ||
| return Ok(()); | ||
| } | ||
|
|
||
| if !target.exists() { | ||
| return Ok(()); | ||
| } | ||
|
|
||
| for entry in fs::read_dir(target)? { | ||
| let path = entry?.path(); | ||
| if path | ||
| .extension() | ||
| .is_some_and(|extension| extension.eq_ignore_ascii_case("log")) | ||
| { | ||
| clear_log_file(&path)?; | ||
| } | ||
| } | ||
|
|
||
| Ok(()) | ||
| } | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
|
|
||
| fn clear_log_file(path: &Path) -> Result<(), AppError> { | ||
| if !path.exists() { | ||
| return Ok(()); | ||
| } | ||
|
|
||
| fs::OpenOptions::new() | ||
| .write(true) | ||
| .truncate(true) | ||
| .open(path)?; | ||
| Ok(()) | ||
| } | ||
|
|
||
| pub(super) fn clear_all_console_log_files(root: &Path) -> Result<(), AppError> { | ||
| if !root.exists() { | ||
| return Ok(()); | ||
| } | ||
|
|
||
| for entry in fs::read_dir(root)? { | ||
| let path = entry?.path(); | ||
| if path.is_dir() { | ||
| clear_all_console_log_files(&path)?; | ||
| continue; | ||
| } | ||
|
|
||
| if path | ||
| .extension() | ||
| .is_some_and(|extension| extension.eq_ignore_ascii_case("log")) | ||
| { | ||
| clear_log_file(&path)?; | ||
| } | ||
| } | ||
|
|
||
| Ok(()) | ||
| } | ||
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.