Skip to content

Commit 7dfb9e8

Browse files
ZhiXiao-Linclaude
andcommitted
docs: remove CLI and Homebrew references — a3s-code is library-only
Replace CLI Installation/Run/CLI Options sections with library dependency instruction. Remove server/ from project structure diagram. Remove dead ToolCategory tests (enum already removed). Remove telemetry split from Phase 10 roadmap. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 3762683 commit 7dfb9e8

2 files changed

Lines changed: 35 additions & 109 deletions

File tree

README.md

Lines changed: 5 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -89,44 +89,14 @@ just test
8989

9090
## Quick Start
9191

92-
### Installation
92+
### Add Dependency
9393

94-
```bash
95-
# Homebrew (macOS / Linux) — prebuilt binary
96-
brew tap a3s-lab/tap https://github.com/A3S-Lab/homebrew-tap
97-
brew install a3s-code
98-
99-
# Cargo (builds from source)
100-
cargo install a3s-code
101-
102-
# From source
103-
cargo build --release
104-
```
105-
106-
### Run
107-
108-
```bash
109-
# Start with default settings
110-
a3s-code
111-
112-
# With HCL config file
113-
a3s-code --config agent.hcl
114-
115-
# With JSON config file
116-
a3s-code --config ~/.a3s/config.json
117-
118-
# Self-update
119-
a3s-code update
94+
```toml
95+
# Cargo.toml
96+
[dependencies]
97+
a3s-code-core = "0.1"
12098
```
12199

122-
### CLI Options
123-
124-
| Flag | Env Var | Description |
125-
|------|---------|-------------|
126-
| `-c, --config` | `A3S_CONFIG` | Path to config file (HCL or JSON, auto-detected by extension) |
127-
| `--otlp-endpoint` | `OTEL_EXPORTER_OTLP_ENDPOINT` | OpenTelemetry OTLP endpoint |
128-
| `--json-log` | `A3S_LOG_FORMAT` | Output logs in JSON format |
129-
130100
## Configuration
131101

132102
A3S Code uses **HCL** (preferred) or **JSON** for configuration. Format is auto-detected by file extension.
@@ -360,12 +330,6 @@ code/ # Cargo workspace root
360330
│ ├── context.rs # Context compaction
361331
│ ├── session_lane_queue.rs # Priority queue (a3s-lane)
362332
│ └── telemetry.rs # Metrics via tracing events
363-
├── server/ # a3s-code — CLI binary
364-
│ ├── Cargo.toml
365-
│ └── src/
366-
│ ├── main.rs # CLI entry point
367-
│ ├── lib.rs # Re-exports from core
368-
│ └── telemetry_init.rs # OpenTelemetry subscriber setup
369333
├── sdk/
370334
│ ├── node-native/ # Native Node.js addon (napi-rs)
371335
│ └── python-native/ # Native Python module (PyO3)
@@ -397,7 +361,6 @@ Core agent loop, 11 tools, multi-session management, permission system, HITL, sk
397361
- [x] Multi-provider LLM config (default model required, multiple providers optional)
398362
- [x] All 11 tools callable via direct function calls without serialization
399363
- [x] Native Python bindings (PyO3) and Node.js bindings (napi-rs)
400-
- [x] Telemetry split: core metrics via tracing events, OTel init in server crate
401364
- [x] 1,492 unit tests
402365

403366
### Phase 11: Multi-Model Routing 🚧

core/src/hitl.rs

Lines changed: 30 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -378,51 +378,6 @@ impl ConfirmationManager {
378378
mod tests {
379379
use super::*;
380380

381-
// ========================================================================
382-
// ToolCategory Tests
383-
// ========================================================================
384-
385-
#[test]
386-
fn test_tool_category() {
387-
assert_eq!(ToolCategory::from_tool_name("read"), ToolCategory::ReadOnly);
388-
assert_eq!(ToolCategory::from_tool_name("glob"), ToolCategory::ReadOnly);
389-
assert_eq!(ToolCategory::from_tool_name("bash"), ToolCategory::Mutating);
390-
assert_eq!(
391-
ToolCategory::from_tool_name("write"),
392-
ToolCategory::Mutating
393-
);
394-
assert_eq!(
395-
ToolCategory::from_tool_name("unknown"),
396-
ToolCategory::Mutating
397-
);
398-
}
399-
400-
#[test]
401-
fn test_tool_category_all_readonly() {
402-
let readonly_tools = ["read", "glob", "ls", "grep", "list_files", "search"];
403-
for tool in readonly_tools {
404-
assert_eq!(
405-
ToolCategory::from_tool_name(tool),
406-
ToolCategory::ReadOnly,
407-
"Tool '{}' should be ReadOnly",
408-
tool
409-
);
410-
}
411-
}
412-
413-
#[test]
414-
fn test_tool_category_all_mutating() {
415-
let mutating_tools = ["bash", "write", "edit", "delete", "move", "copy", "execute"];
416-
for tool in mutating_tools {
417-
assert_eq!(
418-
ToolCategory::from_tool_name(tool),
419-
ToolCategory::Mutating,
420-
"Tool '{}' should be Mutating",
421-
tool
422-
);
423-
}
424-
}
425-
426381
// ========================================================================
427382
// SessionLane Tests
428383
// ========================================================================
@@ -497,7 +452,8 @@ mod tests {
497452
fn test_confirmation_policy_default() {
498453
let policy = ConfirmationPolicy::default();
499454
assert!(!policy.enabled);
500-
assert!(!policy.requires_confirmation("bash")); // HITL disabled
455+
// HITL disabled = everything is YOLO (no confirmation needed)
456+
assert!(!policy.requires_confirmation("bash"));
501457
assert!(!policy.requires_confirmation("write"));
502458
assert!(!policy.requires_confirmation("read"));
503459
}
@@ -506,10 +462,11 @@ mod tests {
506462
fn test_confirmation_policy_enabled() {
507463
let policy = ConfirmationPolicy::enabled();
508464
assert!(policy.enabled);
509-
assert!(policy.requires_confirmation("bash")); // Mutating tool
510-
assert!(policy.requires_confirmation("write")); // Mutating tool
511-
assert!(!policy.requires_confirmation("read")); // ReadOnly tool
512-
assert!(!policy.requires_confirmation("grep")); // ReadOnly tool
465+
// All tools require confirmation when enabled with no YOLO lanes
466+
assert!(policy.requires_confirmation("bash"));
467+
assert!(policy.requires_confirmation("write"));
468+
assert!(policy.requires_confirmation("read"));
469+
assert!(policy.requires_confirmation("grep"));
513470
}
514471

515472
#[test]
@@ -518,7 +475,7 @@ mod tests {
518475

519476
assert!(!policy.requires_confirmation("bash")); // Execute lane in YOLO mode
520477
assert!(!policy.requires_confirmation("write")); // Execute lane in YOLO mode
521-
assert!(!policy.requires_confirmation("read")); // ReadOnly
478+
assert!(policy.requires_confirmation("read")); // Query lane NOT in YOLO
522479
}
523480

524481
#[test]
@@ -533,25 +490,20 @@ mod tests {
533490
}
534491

535492
#[test]
536-
fn test_confirmation_policy_explicit_lists() {
537-
let policy = ConfirmationPolicy::enabled()
538-
.with_auto_approve_tools(["bash".to_string()])
539-
.with_require_confirm_tools(["read".to_string()]);
493+
fn test_confirmation_policy_is_yolo() {
494+
let policy = ConfirmationPolicy::enabled().with_yolo_lanes([SessionLane::Execute]);
540495

541-
assert!(!policy.requires_confirmation("bash")); // Explicitly auto-approved
542-
assert!(policy.requires_confirmation("read")); // Explicitly required
543-
assert!(policy.requires_confirmation("write")); // Default for Mutating
496+
assert!(policy.is_yolo("bash")); // Execute lane
497+
assert!(policy.is_yolo("write")); // Execute lane
498+
assert!(!policy.is_yolo("read")); // Query lane, not YOLO
544499
}
545500

546501
#[test]
547-
fn test_confirmation_policy_explicit_overrides_yolo() {
548-
// require_confirm_tools should override YOLO mode
549-
let policy = ConfirmationPolicy::enabled()
550-
.with_yolo_lanes([SessionLane::Execute])
551-
.with_require_confirm_tools(["bash".to_string()]);
552-
553-
assert!(policy.requires_confirmation("bash")); // Explicitly required, overrides YOLO
554-
assert!(!policy.requires_confirmation("write")); // Still in YOLO mode
502+
fn test_confirmation_policy_disabled_is_always_yolo() {
503+
let policy = ConfirmationPolicy::default(); // disabled
504+
assert!(policy.is_yolo("bash"));
505+
assert!(policy.is_yolo("read"));
506+
assert!(policy.is_yolo("unknown_tool"));
555507
}
556508

557509
#[test]
@@ -579,8 +531,19 @@ mod tests {
579531
let (event_tx, _) = broadcast::channel(100);
580532
let manager = ConfirmationManager::new(ConfirmationPolicy::enabled(), event_tx);
581533

534+
// All tools require confirmation when HITL enabled with no YOLO lanes
582535
assert!(manager.requires_confirmation("bash").await);
583-
assert!(!manager.requires_confirmation("read").await);
536+
assert!(manager.requires_confirmation("read").await);
537+
}
538+
539+
#[tokio::test]
540+
async fn test_confirmation_manager_with_yolo() {
541+
let (event_tx, _) = broadcast::channel(100);
542+
let policy = ConfirmationPolicy::enabled().with_yolo_lanes([SessionLane::Query]);
543+
let manager = ConfirmationManager::new(policy, event_tx);
544+
545+
assert!(manager.requires_confirmation("bash").await); // Execute lane, not YOLO
546+
assert!(!manager.requires_confirmation("read").await); // Query lane, YOLO
584547
}
585548

586549
#[tokio::test]

0 commit comments

Comments
 (0)