Expand description
RYO App - Application layer
This crate provides the application layer for RYO:
- Project: In-memory collection of AST files with I/O
- Intent/Goal: User intention representation
- Api: External interface for CLI/UI/Agent
- Storage trait: DI for persistent storage
§Architecture
┌───────────────────────────────────────────────────────────────────┐
│ Layer 3: Application (ryo-app) │
│ ┌───────────────────────────────────────────────────────────────┐│
│ │ Api ││
│ │ • executor: CoreExecutor (直接依存) ││
│ │ • storage: Box<dyn Storage> (DI) ││
│ └───────────────────────────────────────────────────────────────┘│
│ ┌───────────────────────────────────────────────────────────────┐│
│ │ Intent/Goal ││
│ │ • User intention representation ││
│ │ • JSON Schema for LLM integration ││
│ └───────────────────────────────────────────────────────────────┘│
│ ┌───────────────────────────────────────────────────────────────┐│
│ │ Project ││
│ │ • File collection + I/O ││
│ └───────────────────────────────────────────────────────────────┘│
└───────────────────────────────────────────────────────────────────┘§Usage
ⓘ
use ryo_app::{Api, Project, Goal, Intent, InMemoryStorage};
// Load project
let mut project = Project::from_dir("src/")?;
// Create API with storage
let storage = Box::new(InMemoryStorage::new());
let mut api = Api::new(storage);
// Execute a goal
let goal = Goal::new(Intent::RenameIdent {
from: Pattern::exact("old_name"),
to: "new_name".to_string(),
kind: IdentKind::Any,
});
let result = api.execute(&mut project, goal)?;Re-exports§
pub use api::Api;pub use api::ApiError;pub use api::ApiErrorKind;pub use api::ApiResult;pub use api::CascadeRequest;pub use api::CascadeResponse;pub use api::DesignChoiceInfo;pub use api::DiscoverRequest;pub use api::DiscoverResponse;pub use api::ExecuteOptions;pub use api::ExecutionResult;pub use api::ExecutionStatus;pub use api::GraphSummaryRequest;pub use api::GraphSummaryResponse;pub use api::HookResult;pub use api::LiteralSearchRequest;pub use api::LiteralSearchResponse;pub use api::OverviewRequest;pub use api::OverviewResponse;pub use api::PostExecutionHook;pub use api::RunRequest;pub use api::RunResponse;pub use api::RyoqlRequest;pub use api::SortOrder as ApiSortOrder;pub use api::StatusCode;pub use api::StatusDetail;pub use api::StatusResponse;pub use api::SuggestApplyRequest;pub use api::SuggestApplyResponse;pub use api::SuggestChoicesRequest;pub use api::SuggestChoicesResponse;pub use api::SuggestCompareRequest;pub use api::SuggestCompareResponse;pub use api::SuggestGenerateRequest;pub use api::SuggestGenerateResponse;pub use api::SuggestRequest;pub use api::SuggestResponse;pub use api::SuggestVerifyRequest;pub use api::SuggestVerifyResponse;pub use api::Suggestion;pub use api::SuggestionSummary;pub use api::VerifyLevel;
Modules§
- api
- Api - External interface for RYO operations.
- codec
- tarpc transport codec for RYO RPC communication.
- service
- tarpc Service Definition
- spec_
dsl - Spec DSL - Domain Specification Language for Large-Scale E2E Tests
- spec_
types
Structs§
- Analysis
Context - Unified context containing all analysis structures.
- Apply
Commands - Commands for applying a suggestion.
- Blueprint
Executor - Executor for ParallelBlueprint
- Blueprint
Result - Result of executing a blueprint
- Borrow
Check Result V2 - Borrow check result (V2).
- Borrow
Tracker V2 - Tracks active borrows for a set of variables (V2 - uses VarId).
- Cascade
Analyzer - Cascade分析エンジン
- Cascade
Result - Response DTO for cascade analysis.
- Choice
Id - Unique identifier for a design choice within a set.
- Code
Graph V2 - Symbol relationship graph with Data-Oriented Design.
- Code
Node - A code node returned from queries
- Conflict
- Conflict detected during blueprint planning
- Data
Flow Builder Workspace - Builder for constructing DataFlowGraphV2 using WorkspaceFilePath-keyed files.
- Data
Flow Graph V2 - Data flow graph with Data-Oriented Design.
- Data
Flow Service V2 - Service for dataflow analysis operations (V2 - String-free).
- Data
Flow Stats V2 - DataFlow graph statistics (V2).
- Design
Choice - A single design choice representing one possible implementation approach.
- Design
Choice Set - A set of design choices for a single suggestion.
- Discover
Service - Service for pattern-based symbol discovery operations.
- Discovered
Symbol - A discovered symbol with metadata.
- Discovery
Engine - Main discovery engine for pattern-based symbol search.
- Discovery
Query - Query specification for symbol discovery.
- Discovery
Result - Result of a discovery query.
- Enhanced
Suggestion - An enhanced suggestion with design choices and verification.
- Flow
Info V2 - Flow information (V2).
- Goal
- 抽出されたゴール
- Graph
Api - Graph API for code analysis
- Graph
Builder V2 - Builder for constructing CodeGraphV2.
- Graph
Stats - Graph statistics
- Import
Config - Import configuration
- InMemory
Storage - In-memory storage for testing.
- Lock
Analysis Result V2 - Lock analysis result (V2).
- Lock
Granularity Analyzer V2 - Lightweight lock granularity analyzer using LockTrackerV2 (V2 - uses VarId).
- Lock
Stats V2 - Statistics about lock usage (V2).
- Lock
Tracker V2 - Tracks lock acquisitions and critical sections (V2 - uses VarId).
- Module
Config - Module-specific configuration
- Mutation
Config - Mutation execution configuration
- Parallel
Blueprint - Parallel execution blueprint
- Planner
- Planner: Goal → Vec
- Project
- A project loaded entirely in memory as PureFile ASTs.
- Project
Config - Project metadata
- Pure
File - A complete Rust source file (pure, no spans).
- Query
Builder - Fluent query builder for CodeGraphV2.
- Query
Response - クエリレスポンス
- Relation
Graph - Graph of symbol relations.
- RyoConfig
- Project configuration loaded from
ryo.toml - Scope
Hint - 検索スコープのヒント
- Spec
Flow Data - Loaded SpecFlow data (DoD - no registry needed).
- Spec
Group Info - Information about a spec group.
- Spec
Info - Information about a single spec alias.
- Spec
Lint Issue - Lint issue found in specs.
- Spec
Lint Result - Lint result.
- Spec
Relation - Spec TypeAliasの依存関係
- Spec
Service - SpecFlow service for building and querying SpecFlowGraphV2.
- Spec
Show Response - SpecFlow query result.
- Spec
Stats - SpecFlow statistics.
- Suggest
Id - Unique identifier for a suggestion coupled to AnalysisContext lifecycle
- Suggest
Location - Location information for a suggestion
- Suggest
Opportunity - A detected opportunity for improvement
- Summary
Builder - Builder for generating graph summaries
- Summary
Options - Options for customizing summary output
- Symbol
Registry - Central registry for symbol management
- Trade
Offs - Trade-off analysis for a design choice.
- Transform
Example - 変換例(Custom用)
- VarInfo
V2 - Variable information (V2 - with VarId).
- VarNode
- Variable node with name and metadata.
- Verified
Candidate - A verified candidate representing a potential change.
Enums§
- Config
Error - Error loading configuration
- Conflict
Kind - Types of conflicts
- Conflict
Strategy - コンフリクト解決戦略
- Constraint
- 実行時制約
- Data
Flow Error V2 - Error type for DataFlow V2 operations.
- Discover
Error - Error type for Discover operations.
- Estimated
Scope - 推定影響範囲
- Extract
Error - Intent抽出エラー
- Format
- Supported serialization formats.
- Graph
Error - Graph API error
- Ident
Kind - 識別子の種類
- Intent
- 変換意図
- Item
Kind - Kind of AST item (shared vocabulary across crates).
- Lint
Severity - Lint issue severity.
- Mutation
Spec - Atomic mutation specification
- Node
Kind - Kind of code node
- Plan
Error - Planning error
- Project
Error - Project error types
- Rating
- Rating level for trade-off dimensions (1-3 stars).
- Relation
Kind - Kind of relation between symbols.
- Safety
Level - Safety classification for auto-application decisions
- Sort
Order - Sort order for discovery results.
- Spec
Error - SpecFlow service error.
- Spec
Relation Kind - Spec依存関係の種類
- Spec
Source Kind - Source of spec information.
- Stmt
Insert Position - 文の挿入位置
- Suggest
Category - Category for suggestion classification
- TxLog
Mode - Auto-save mode for transaction logs.
- VarKind
- Kind of variable.
- Verification
Status - Verification status for a candidate.
- View
Mode - 出力モード
- Visibility
- 可視性
Traits§
- Intent
Extractor - IntentExtractor: NLクエリ → Goal
- Storage
- Abstract storage trait for session persistence.
- ToSummary
- Generate AI-readable structured text summary