id
int64
0
328k
repository_name
stringlengths
7
58
file_path
stringlengths
9
302
class_name
stringlengths
5
256
human_written_code
stringlengths
16
2.16M
class_skeleton
stringlengths
18
1.49M
total_program_units
int64
1
1.76k
total_doc_str
int64
0
771
AvgCountLine
float64
0
7.89k
AvgCountLineBlank
float64
0
297
AvgCountLineCode
float64
0
7.89k
AvgCountLineComment
float64
0
7.89k
AvgCyclomatic
float64
0
130
CommentToCodeRatio
float64
0
168
CountClassBase
float64
0
40
CountClassCoupled
float64
0
583
CountClassCoupledModified
float64
0
575
CountClassDerived
float64
0
5.35k
CountDeclInstanceMethod
float64
0
529
CountDeclInstanceVariable
float64
0
296
CountDeclMethod
float64
0
599
CountDeclMethodAll
float64
0
1.12k
CountLine
float64
1
40.4k
CountLineBlank
float64
0
8.16k
CountLineCode
float64
1
25.7k
CountLineCodeDecl
float64
1
8.15k
CountLineCodeExe
float64
0
24.2k
CountLineComment
float64
0
16.5k
CountStmt
float64
1
9.71k
CountStmtDecl
float64
1
8.15k
CountStmtExe
float64
0
9.69k
MaxCyclomatic
float64
0
759
MaxInheritanceTree
float64
0
16
MaxNesting
float64
0
34
SumCyclomatic
float64
0
2.9k
325,000
AllDotPy/EasySwitch
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/AllDotPy_EasySwitch/easyswitch/conf/sources/yaml.py
yaml.YamlConfigSource
from typing import Any, Dict from easyswitch.conf import register_source from pathlib import Path import yaml from easyswitch.conf.base import BaseConfigSource @register_source('yaml') class YamlConfigSource(BaseConfigSource): """Loads EasySwitch configurations from a YAML file.""" def __init__(self, file_pat...
@register_source('yaml') class YamlConfigSource(BaseConfigSource): '''Loads EasySwitch configurations from a YAML file.''' def __init__(self, file_path: str): pass def load(self) -> Dict[str, Any]: '''Load the yaml file.''' pass def is_valid(self) -> bool: '''Check tha...
5
3
6
1
5
1
2
0.2
1
5
0
0
3
1
3
25
23
5
15
7
11
3
15
5
11
3
5
2
5
325,001
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/scripts/profile_startup.py
scripts.profile_startup.StartupProfiler
import time class StartupProfiler: """Detailed startup profiling with bottleneck identification.""" def __init__(self): """Initialize the profiler.""" self.profile_data: list[tuple[str, float]] = [] self.start_time = time.perf_counter() def checkpoint(self, name: str): """...
class StartupProfiler: '''Detailed startup profiling with bottleneck identification.''' def __init__(self): '''Initialize the profiler.''' pass def checkpoint(self, name: str): '''Record a timing checkpoint.''' pass def get_report(self) -> dict[str, float]: ''...
5
5
21
2
17
3
3
0.2
0
5
0
0
4
2
4
4
90
11
70
19
65
14
41
19
36
7
0
1
11
325,002
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/agents/agent_manager.py
streetrace.agents.agent_manager.AgentManager
from streetrace.agents.yaml_agent_loader import YamlAgentLoader from streetrace.agents.base_agent_loader import AgentInfo from pathlib import Path from streetrace.system_context import SystemContext from streetrace.agents.py_agent_loader import PythonAgentLoader from streetrace.tools.tool_provider import ToolProvider f...
class AgentManager: '''Manages agent discovery, validation, and creation. The AgentManager is responsible for: 1. Discovering agents in standard locations 2. Validating that agents implement the required interface 3. Creating agent instances with necessary dependencies 4. Managing the lifecycle...
5
4
26
5
15
7
2
0.59
0
12
7
0
3
6
3
3
91
18
46
21
35
27
28
14
24
5
0
2
7
325,003
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/agents/base_agent_loader.py
streetrace.agents.base_agent_loader.AgentCycleError
class AgentCycleError(AgentValidationError): """Raised when circular references are detected."""
class AgentCycleError(AgentValidationError): '''Raised when circular references are detected.''' pass
1
1
0
0
0
0
0
1
1
0
0
0
0
0
0
11
2
0
1
1
0
1
1
1
0
0
4
0
0
325,004
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/agents/base_agent_loader.py
streetrace.agents.base_agent_loader.AgentInfo
from typing import TYPE_CHECKING, Literal from pathlib import Path class AgentInfo: """Agent information container supporting both Python and YAML agents.""" def __init__(self, name: str, description: str, file_path: Path | None=None, module: 'ModuleType | None'=None, yaml_document: 'YamlAgentDocument | None'...
class AgentInfo: '''Agent information container supporting both Python and YAML agents.''' def __init__(self, name: str, description: str, file_path: Path | None=None, module: 'ModuleType | None'=None, yaml_document: 'YamlAgentDocument | None'=None) -> None: '''Initialize agent info. Args: ...
6
4
13
1
9
3
2
0.37
0
3
0
0
3
5
3
3
46
5
30
20
17
11
21
11
17
3
0
1
7
325,005
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/agents/base_agent_loader.py
streetrace.agents.base_agent_loader.AgentLoader
from pathlib import Path from abc import ABC, abstractmethod class AgentLoader(ABC): """Abstract base class for agent loaders.""" @abstractmethod def discover(self) -> list[AgentInfo]: """Discover known agents. Returns: List of discovered agents """ @abstractmeth...
class AgentLoader(ABC): '''Abstract base class for agent loaders.''' @abstractmethod def discover(self) -> list[AgentInfo]: '''Discover known agents. Returns: List of discovered agents ''' pass @abstractmethod def load_agent(self, agent: str | Path | Agen...
5
3
10
3
1
6
1
2.6
1
4
1
2
2
0
2
22
26
8
5
5
0
13
3
3
0
1
4
0
2
325,006
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/agents/base_agent_loader.py
streetrace.agents.base_agent_loader.AgentValidationError
from pathlib import Path class AgentValidationError(Exception): """Raised when agent validation fails.""" def __init__(self, message: str, file_path: Path | None=None, cause: Exception | None=None) -> None: """Initialize the Agent Validation Error.""" self.file_path = file_path self.ca...
class AgentValidationError(Exception): '''Raised when agent validation fails.''' def __init__(self, message: str, file_path: Path | None=None, cause: Exception | None=None) -> None: '''Initialize the Agent Validation Error.''' pass
2
2
10
0
9
1
1
0.2
1
3
0
1
1
2
1
11
13
1
10
9
3
2
5
4
3
1
3
0
1
325,007
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/agents/code_reviewer/agent.py
streetrace.agents.code_reviewer.agent.CodeReviewerAgent
from a2a.types import AgentCapabilities, AgentSkill from typing import override from streetrace.agents.street_race_agent_card import StreetRaceAgentCard from streetrace.tools.tool_provider import AnyTool, ToolProvider from google.adk.agents import Agent, BaseAgent from streetrace.tools.tool_refs import McpToolRef, Stre...
class CodeReviewerAgent(StreetRaceAgent): '''StreetRace Code Reviewer agent implementation.''' @override def get_agent_card(self) -> StreetRaceAgentCard: '''Provide an A2A AgentCard.''' pass @override async def get_required_tools(self) -> list[AnyTool]: '''Provide a list of ...
7
4
25
1
20
4
1
0.2
1
8
7
0
3
0
3
30
84
7
64
14
52
13
9
6
5
1
5
0
3
325,008
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/agents/coder/agent.py
streetrace.agents.coder.agent.CoderAgent
from google.adk.agents import Agent, BaseAgent from streetrace.agents.street_race_agent_card import StreetRaceAgentCard from streetrace.system_context import SystemContext from typing import TYPE_CHECKING, override from streetrace.tools.tool_provider import AnyTool, ToolProvider from streetrace.agents.street_race_agent...
class CoderAgent(StreetRaceAgent): '''StreetRace Coder agent implementation.''' @override def get_agent_card(self) -> StreetRaceAgentCard: '''Provide an A2A AgentCard.''' pass @override async def get_required_tools(self) -> list[AnyTool]: '''Provide a list of required tool r...
7
4
31
2
24
5
1
0.21
1
10
8
0
3
0
3
30
101
8
77
15
65
16
10
7
6
1
5
0
3
325,009
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/agents/example/agent.py
streetrace.agents.example.agent.GenericAgent
from streetrace.tools.tool_provider import AnyTool, ToolProvider from a2a.types import AgentCapabilities, AgentSkill from streetrace.agents.street_race_agent import StreetRaceAgent from streetrace.tools.mcp_transport import HttpTransport, StdioTransport from typing import TYPE_CHECKING, override from streetrace.llm.mod...
class GenericAgent(StreetRaceAgent): '''StreetRace Coder agent implementation.''' @override def get_agent_card(self) -> StreetRaceAgentCard: '''Provide an A2A AgentCard.''' pass @override async def get_required_tools(self) -> list[AnyTool]: '''Provide a list of required tool...
7
4
31
2
25
5
1
0.21
1
10
8
0
3
0
3
30
102
8
78
15
66
16
10
7
6
1
5
0
3
325,010
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/agents/py_agent_loader.py
streetrace.agents.py_agent_loader.PythonAgentLoader
from streetrace.utils.file_discovery import find_files from streetrace.agents.base_agent_loader import AgentInfo, AgentLoader from pathlib import Path from typing import TYPE_CHECKING, Any, cast class PythonAgentLoader(AgentLoader): """Python agent loader implementing the AgentLoader interface.""" def __init_...
class PythonAgentLoader(AgentLoader): '''Python agent loader implementing the AgentLoader interface.''' def __init__(self, base_paths: list[Path | str] | list[Path] | list[str]) -> None: '''Initialize the PythonAgentLoader. Args: base_paths: List of base paths to search for agents ...
4
4
27
5
16
6
5
0.37
1
9
1
0
3
1
3
25
86
19
49
14
45
18
37
14
33
8
5
2
14
325,011
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/agents/street_race_agent.py
streetrace.agents.street_race_agent.StreetRaceAgent
from abc import ABC, abstractmethod class StreetRaceAgent(ABC): """Base class for StreetRace agents. The main goal for this class is to provide agent declaration. It also exposes a way to instantiate (create_agent) and deallocate (close) the agent, which perhaps can be deprecated as some point in favo...
class StreetRaceAgent(ABC): '''Base class for StreetRace agents. The main goal for this class is to provide agent declaration. It also exposes a way to instantiate (create_agent) and deallocate (close) the agent, which perhaps can be deprecated as some point in favor of agent management infrastructure ...
10
8
8
1
4
3
1
1.07
1
2
0
9
7
0
7
27
70
14
28
21
13
30
21
14
13
1
4
0
7
325,012
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/agents/street_race_agent_card.py
streetrace.agents.street_race_agent_card.StreetRaceAgentCard
from pydantic import BaseModel class StreetRaceAgentCard(BaseModel): """Key agent information to be published to the A2A network. This is a proxy for A2A AgentCard that allows specifying Agent info without infra details. Infra details are provided by the infrastructure code. """ capabilities: 'Age...
class StreetRaceAgentCard(BaseModel): '''Key agent information to be published to the A2A network. This is a proxy for A2A AgentCard that allows specifying Agent info without infra details. Infra details are provided by the infrastructure code. ''' pass
1
1
0
0
0
0
0
3.38
1
0
0
0
0
0
0
82
59
2
13
6
12
44
13
6
12
0
5
0
0
325,013
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/agents/yaml_agent.py
streetrace.agents.yaml_agent.YamlAgent
from streetrace.llm.model_factory import ModelFactory from streetrace.agents.street_race_agent import StreetRaceAgent from streetrace.agents.yaml_agent_builder import YamlAgentBuilder from streetrace.system_context import SystemContext from streetrace.tools.tool_provider import AnyTool, ToolProvider from typing import ...
class YamlAgent(StreetRaceAgent): '''StreetRace agent implementation based on YAML specification.''' def __init__(self, agent_doc: YamlAgentDocument) -> None: '''Initialize with agent document. Args: agent_doc: Agent document containing YAML specification ''' pass ...
9
6
17
3
10
5
1
0.45
1
7
6
0
5
2
5
32
94
18
53
25
33
24
19
12
12
2
5
1
6
325,014
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/agents/yaml_agent_builder.py
streetrace.agents.yaml_agent_builder.YamlAgentBuilder
from streetrace.agents.yaml_models import AgentRef, HttpServerConfig, InlineAgentSpec, McpToolSpec, StdioServerConfig, StreetraceToolSpec, ToolSpec, YamlAgentDocument, YamlAgentSpec from streetrace.tools.tool_provider import AdkTool, AnyTool, ToolProvider from streetrace.tools.tool_refs import McpToolRef, StreetraceToo...
class YamlAgentBuilder: '''Builds ADK agents from YAML agent specifications.''' def __init__(self, model_factory: ModelFactory, tool_provider: ToolProvider, system_context: SystemContext) -> None: '''Initialize the builder.''' pass def _create_transport_from_server_config(self, server_con...
12
9
22
3
15
4
4
0.28
0
25
16
0
11
3
11
11
255
40
168
67
129
47
108
43
93
9
0
3
43
325,015
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/agents/yaml_agent_loader.py
streetrace.agents.yaml_agent_loader.YamlAgentLoader
from pathlib import Path from streetrace.utils.file_discovery import find_files from streetrace.agents.base_agent_loader import AgentCycleError, AgentInfo, AgentLoader, AgentValidationError from streetrace.agents.yaml_models import AgentRef, InlineAgentSpec, ToolSpec, YamlAgentDocument, YamlAgentSpec class YamlAgentLo...
class YamlAgentLoader(AgentLoader): '''YAML agent loader implementing the AgentLoader interface.''' def __init__(self, base_paths: list[Path | str] | list[Path] | list[str]) -> None: '''Initialize the YAML agent loader. Args: base_paths: List of base paths to search for agents ...
4
4
29
5
16
7
4
0.47
1
8
4
0
3
1
3
25
91
19
49
18
43
23
41
16
35
8
5
2
13
325,016
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/agents/yaml_models.py
streetrace.agents.yaml_models.AdkConfig
from pydantic import BaseModel, Field, field_validator, model_validator from typing import Any, Literal class AdkConfig(BaseModel): """ADK-specific configuration passed through to Agent constructor.""" generate_content_config: dict[str, Any] = Field(default_factory=dict) disallow_transfer_to_parent: bool =...
class AdkConfig(BaseModel): '''ADK-specific configuration passed through to Agent constructor.''' pass
1
1
0
0
0
0
0
0.1
1
0
0
0
0
0
0
82
12
1
10
10
9
1
10
10
9
0
5
0
0
325,017
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/agents/yaml_models.py
streetrace.agents.yaml_models.AgentRef
from pydantic import BaseModel, Field, field_validator, model_validator class AgentRef(BaseModel): """Reference to another agent file.""" ref: str = Field(alias='$ref') @field_validator('ref') @classmethod def validate_ref_path(cls, v: str) -> str: """Validate that ref is a reasonable file...
class AgentRef(BaseModel): '''Reference to another agent file.''' @field_validator('ref') @classmethod def validate_ref_path(cls, v: str) -> str: '''Validate that ref is a reasonable file path.''' pass
4
2
6
0
5
1
2
0.22
1
2
0
0
0
0
1
83
13
2
9
5
5
2
7
4
5
2
5
1
2
325,018
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/agents/yaml_models.py
streetrace.agents.yaml_models.HttpServerConfig
from pydantic import BaseModel, Field, field_validator, model_validator from typing import Any, Literal class HttpServerConfig(BaseModel): """Configuration for HTTP/SSE MCP server.""" type: Literal[TransportType.HTTP, TransportType.SSE] url: str headers: dict[str, str] = Field(default_factory=dict) ...
class HttpServerConfig(BaseModel): '''Configuration for HTTP/SSE MCP server.''' @field_validator('url', mode='before') @classmethod def expand_url_env_vars(cls, v: object) -> object: '''Expand environment variables in URL.''' pass @field_validator('headers', mode='before') @clas...
7
3
6
0
5
1
3
0.17
1
2
0
0
0
0
2
84
24
3
18
7
11
3
11
5
8
3
5
1
5
325,019
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/agents/yaml_models.py
streetrace.agents.yaml_models.InlineAgentSpec
from pydantic import BaseModel, Field, field_validator, model_validator class InlineAgentSpec(BaseModel): """Inline agent specification.""" agent: 'YamlAgentSpec'
class InlineAgentSpec(BaseModel): '''Inline agent specification.''' pass
1
1
0
0
0
0
0
0.5
1
0
0
0
0
0
0
82
4
1
2
1
1
1
2
1
1
0
5
0
0
325,020
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/agents/yaml_models.py
streetrace.agents.yaml_models.McpToolSpec
from pydantic import BaseModel, Field, field_validator, model_validator class McpToolSpec(BaseModel): """Specification for MCP tool.""" name: str server: ServerConfig tools: list[str] = Field(default_factory=list)
class McpToolSpec(BaseModel): '''Specification for MCP tool.''' pass
1
1
0
0
0
0
0
0.25
1
0
0
0
0
0
0
82
6
1
4
2
3
1
4
2
3
0
5
0
0
325,021
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/agents/yaml_models.py
streetrace.agents.yaml_models.StdioServerConfig
from pydantic import BaseModel, Field, field_validator, model_validator from typing import Any, Literal class StdioServerConfig(BaseModel): """Configuration for stdio MCP server.""" type: Literal[TransportType.STDIO] = TransportType.STDIO command: str args: list[str] = Field(default_factory=list) e...
class StdioServerConfig(BaseModel): '''Configuration for stdio MCP server.''' @field_validator('command', 'args', mode='before') @classmethod def expand_command_env_vars(cls, v: object) -> object: '''Expand environment variables in command and args.''' pass @field_validator('env', m...
7
3
9
0
8
1
4
0.13
1
3
0
0
0
0
2
84
30
3
24
8
17
3
15
6
12
4
5
1
7
325,022
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/agents/yaml_models.py
streetrace.agents.yaml_models.StreetraceToolSpec
from pydantic import BaseModel, Field, field_validator, model_validator class StreetraceToolSpec(BaseModel): """Specification for StreetRace internal tool.""" module: str function: str
class StreetraceToolSpec(BaseModel): '''Specification for StreetRace internal tool.''' pass
1
1
0
0
0
0
0
0.33
1
0
0
0
0
0
0
82
5
1
3
1
2
1
3
1
2
0
5
0
0
325,023
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/agents/yaml_models.py
streetrace.agents.yaml_models.ToolSpec
from pydantic import BaseModel, Field, field_validator, model_validator class ToolSpec(BaseModel): """Tool specification - either streetrace or mcp.""" streetrace: StreetraceToolSpec | None = None mcp: McpToolSpec | None = None @model_validator(mode='after') def validate_tool_spec(self) -> 'ToolSp...
class ToolSpec(BaseModel): '''Tool specification - either streetrace or mcp.''' @model_validator(mode='after') def validate_tool_spec(self) -> 'ToolSpec': '''Ensure exactly one tool type is specified.''' pass
3
2
9
0
8
1
3
0.17
1
1
0
0
1
0
1
83
16
2
12
6
9
2
11
5
9
3
5
1
3
325,024
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/agents/yaml_models.py
streetrace.agents.yaml_models.TransportType
from enum import Enum class TransportType(str, Enum): """Supported MCP transport types.""" STDIO = 'stdio' HTTP = 'http' SSE = 'sse'
class TransportType(str, Enum): '''Supported MCP transport types.''' pass
1
1
0
0
0
0
0
0.25
2
0
0
0
0
0
0
115
6
1
4
4
3
1
4
4
3
0
4
0
0
325,025
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/agents/yaml_models.py
streetrace.agents.yaml_models.YamlAgentDocument
from pathlib import Path from pydantic import BaseModel, Field, field_validator, model_validator class YamlAgentDocument(BaseModel): """Root agent document with resolved references.""" spec: YamlAgentSpec file_path: Path | None = None def get_name(self) -> str: """Get the agent name.""" ...
class YamlAgentDocument(BaseModel): '''Root agent document with resolved references.''' def get_name(self) -> str: '''Get the agent name.''' pass def get_description(self) -> str: '''Get the agent description.''' pass
3
3
3
0
2
1
1
0.57
1
1
0
0
2
0
2
84
13
3
7
4
4
4
7
4
4
1
5
0
2
325,026
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/agents/yaml_models.py
streetrace.agents.yaml_models.YamlAgentSpec
import re from typing import Any, Literal from pydantic import BaseModel, Field, field_validator, model_validator class YamlAgentSpec(BaseModel): """YAML agent specification model.""" version: Literal[1] = 1 kind: Literal['agent'] = 'agent' name: str description: str model: str | None = None ...
class YamlAgentSpec(BaseModel): '''YAML agent specification model.''' @field_validator('name') @classmethod def validate_name(cls, v: str) -> str: '''Validate agent name follows Python identifier rules.''' pass @field_validator('instruction', 'global_instruction', mode='before') ...
11
5
6
0
4
2
2
0.21
1
2
0
0
2
0
4
86
46
5
34
19
23
7
25
15
20
2
5
1
7
325,027
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/app.py
streetrace.app.Application
from streetrace.log import get_logger, lazy_setup_litellm_logging from streetrace.ui.console_ui import ConsoleUI from streetrace.costs import UsageAndCost from streetrace.input_handler import InputContext, InputHandler from streetrace.ui.ui_bus import UiBus from streetrace.preload_deps import preload_dependencies from ...
class Application: '''Orchestrates the StreetRace application flow.''' def __init__(self, args: Args, state: AppState, ui: ConsoleUI, ui_bus: UiBus, input_handling_pipeline: list[InputHandler], session_manager: 'SessionManager') -> None: '''Initialize the Application with necessary components and conf...
8
6
20
2
16
3
3
0.19
0
15
10
0
7
6
7
7
152
18
114
34
98
22
73
24
65
6
0
3
21
325,028
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/app_state.py
streetrace.app_state.AppState
from streetrace.costs import TotalUsageAndCost from pydantic import BaseModel, Field class AppState(BaseModel): """App state values.""" current_model: str | None = None usage_and_cost: TotalUsageAndCost = Field(default_factory=TotalUsageAndCost)
class AppState(BaseModel): '''App state values.''' pass
1
1
0
0
0
0
0
0.33
1
0
0
0
0
0
0
82
5
1
3
3
2
1
3
3
2
0
5
0
0
325,029
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/args.py
streetrace.args.Args
from pathlib import Path from streetrace.utils.uid import get_user_identity import typed_argparse as tap class Args(tap.TypedArgs): """App args.""" path: Path | None = tap.arg(help='Working directory', default=None) model: str | None = tap.arg(help='Model to use, see https://docs.litellm.ai/docs/set_keys. ...
class Args(tap.TypedArgs): '''App args.''' @property def non_interactive_prompt(self) -> tuple[str | None, bool]: '''Get non-interactive prompt provided in arguments. If --prompt argument was provided, returns that. If there were positional arguments, returns them as a prompt. ...
9
5
16
3
8
5
3
0.34
1
5
0
0
4
0
4
4
103
17
64
24
55
22
38
20
33
4
1
2
11
325,030
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/bash_handler.py
streetrace.bash_handler.BashHandler
from streetrace.terminal_session import SessionData, SessionEvent, TerminalSession from subprocess import SubprocessError from typing import override from streetrace.input_handler import HANDLED_CONT, SKIP, HandlerResult, InputContext, InputHandler from pathlib import Path class BashHandler(InputHandler): """Comma...
class BashHandler(InputHandler): '''Command to run a bash command in a virtual terminal. Handles special command syntax: any user input starting from ! is treated as a bash command. ''' def __init__(self, work_dir: Path | None=None) -> None: '''Initialize the BashCommand. Args: ...
6
4
30
6
16
7
3
0.52
1
11
5
0
3
1
3
24
124
28
63
20
50
33
37
12
31
4
5
1
11
325,031
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/commands/base_command.py
streetrace.commands.base_command.Command
from abc import ABC, abstractmethod class Command(ABC): """Abstract Base Class for all application commands. Each command must define its invocation names, description, and execution logic. """ @property @abstractmethod def names(self) -> list[str]: """A list of names (without the lea...
class Command(ABC): '''Abstract Base Class for all application commands. Each command must define its invocation names, description, and execution logic. ''' @property @abstractmethod def names(self) -> list[str]: '''A list of names (without the leading '/') that can invoke this com...
9
4
3
0
1
2
1
1
1
2
0
6
3
0
3
23
23
5
9
7
0
9
4
4
0
1
4
0
3
325,032
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/commands/command_executor.py
streetrace.commands.command_executor.CommandExecutor
from collections.abc import Sequence from .base_command import Command from streetrace.input_handler import HANDLED_STOP, SKIP, HandlerResult, InputContext, InputHandler class CommandExecutor(InputHandler): """Manage and execute commands derived from the Command base class. Handles registration of Command obj...
class CommandExecutor(InputHandler): '''Manage and execute commands derived from the Command base class. Handles registration of Command objects and executes them based on user input, passing the Application instance to the command's execute method. Handles case-insensitivity and basic error management...
7
6
22
3
13
6
3
0.5
1
9
3
0
5
1
5
26
125
23
68
16
58
34
39
11
33
5
5
2
13
325,033
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/commands/definitions/compact_command.py
streetrace.commands.definitions.compact_command.CompactCommand
from typing import TYPE_CHECKING, override from streetrace.llm.model_factory import ModelFactory from streetrace.messages import COMPACT from streetrace.commands.base_command import Command from streetrace.ui import ui_events from streetrace.ui.ui_bus import UiBus from streetrace.system_context import SystemContext fro...
class CompactCommand(Command): '''Command to compact/summarize the conversation history to reduce token usage.''' def __init__(self, ui_bus: UiBus, args: Args, session_manager: 'SessionManager', system_context: SystemContext, model_factory: ModelFactory) -> None: '''Initialize a new instance of ResetS...
9
5
25
2
22
1
3
0.06
1
10
7
0
5
5
5
28
137
14
116
40
92
7
60
27
49
8
5
4
16
325,034
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/commands/definitions/exit_command.py
streetrace.commands.definitions.exit_command.ExitCommand
from typing import override from streetrace.commands.base_command import Command class ExitCommand(Command): """Command to signal the application to exit the interactive session. Handles both /exit and /quit. """ @property def names(self) -> list[str]: """Command invocation names.""" ...
class ExitCommand(Command): '''Command to signal the application to exit the interactive session. Handles both /exit and /quit. ''' @property def names(self) -> list[str]: '''Command invocation names.''' pass @property def description(self) -> str: '''Command descrip...
7
4
5
1
2
2
1
0.82
1
3
0
0
3
0
3
26
26
6
11
7
4
9
8
4
4
1
5
0
3
325,035
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/commands/definitions/help_command.py
streetrace.commands.definitions.help_command.HelpCommand
from typing import override from streetrace.commands.command_executor import CommandExecutor from streetrace.ui.ui_bus import UiBus from streetrace.commands.base_command import Command from streetrace.ui import ui_events class HelpCommand(Command): """Displays a list of all available commands with their descriptio...
class HelpCommand(Command): '''Displays a list of all available commands with their descriptions.''' def __init__(self, ui_bus: UiBus, cmd_executor: CommandExecutor) -> None: '''Initialize the HelpCommand. Args: ui_bus: UI event bus to display command information. cmd_e...
8
5
10
2
4
4
1
0.89
1
5
3
0
4
2
4
27
49
13
19
13
11
17
16
10
11
2
5
1
5
325,036
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/commands/definitions/history_command.py
streetrace.commands.definitions.history_command.HistoryCommand
from streetrace.ui import ui_events from streetrace.commands.base_command import Command from typing import TYPE_CHECKING, override class HistoryCommand(Command): """Command to display the conversation history.""" def __init__(self, ui_bus: 'UiBus', system_context: 'SystemContext', session_manager: 'SessionMa...
class HistoryCommand(Command): '''Command to display the conversation history.''' def __init__(self, ui_bus: 'UiBus', system_context: 'SystemContext', session_manager: 'SessionManager') -> None: '''Initialize a new instance of HistoryCommand.''' pass @property def names(self) -> list[s...
8
5
8
0
7
1
1
0.16
1
4
2
0
4
3
4
27
41
4
32
19
19
5
17
11
12
2
5
1
5
325,037
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/commands/definitions/history_command.py
streetrace.commands.definitions.history_command._DisplayHistory
from pydantic import BaseModel from collections.abc import Sequence class _DisplayHistory(BaseModel): system_message: str | None context: Sequence[str] | None session: 'Session | None'
class _DisplayHistory(BaseModel): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
82
4
0
4
1
3
0
4
1
3
0
5
0
0
325,038
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/commands/definitions/reset_command.py
streetrace.commands.definitions.reset_command.ResetSessionCommand
from typing import TYPE_CHECKING, override from streetrace.ui import ui_events from streetrace.commands.base_command import Command class ResetSessionCommand(Command): """Command to clear the conversation history, resetting it to the initial state.""" def __init__(self, ui_bus: 'UiBus', session_manager: 'Sess...
class ResetSessionCommand(Command): '''Command to clear the conversation history, resetting it to the initial state.''' def __init__(self, ui_bus: 'UiBus', session_manager: 'SessionManager') -> None: '''Initialize a new instance of ResetSessionCommand.''' pass @property def names(self)...
8
5
6
0
5
1
1
0.27
1
3
1
0
4
2
4
27
32
4
22
10
14
6
12
7
7
1
5
0
4
325,039
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/costs.py
streetrace.costs.TotalUsageAndCost
from pydantic import BaseModel, Field class TotalUsageAndCost(BaseModel): """Token and dollar data for the current app run.""" turn_usage: UsageAndCost = Field(default_factory=UsageAndCost) app_run_usage: UsageAndCost = Field(default_factory=UsageAndCost) def add_usage(self, change: UsageAndCost) -> N...
class TotalUsageAndCost(BaseModel): '''Token and dollar data for the current app run.''' def add_usage(self, change: UsageAndCost) -> None: '''Add costs to stats.''' pass def reset_turn(self) -> None: '''Reset current turn to zero in the beginning of a new turn.''' pass
3
3
4
0
3
1
1
0.38
1
1
1
0
2
0
2
84
14
3
8
5
5
3
8
5
5
1
5
0
2
325,040
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/costs.py
streetrace.costs.UsageAndCost
from typing import TypeVar from pydantic import BaseModel, Field class UsageAndCost(BaseModel): """Token usage and cost as reported by the model.""" completion_tokens: int | None = None prompt_tokens: int | None = None cost: float | None = None @property def cost_str(self) -> str: """2...
class UsageAndCost(BaseModel): '''Token usage and cost as reported by the model.''' @property def cost_str(self) -> str: '''2 decimal str representation of cost, or '-.--' if None.''' pass @property def completion_tokens_str(self) -> str: '''Str representation of completion_...
9
5
7
1
6
1
2
0.19
1
4
0
0
4
0
4
86
46
8
32
13
23
6
25
10
19
2
5
1
10
325,041
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/input_handler.py
streetrace.input_handler.HandlerResult
from typing import NamedTuple class HandlerResult(NamedTuple): """Result of input handler.""" handled: bool continue_: bool
class HandlerResult(NamedTuple): '''Result of input handler.''' pass
1
1
0
0
0
0
0
0.33
1
0
0
0
0
0
0
0
5
1
3
1
2
1
3
1
2
0
1
0
0
325,042
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/input_handler.py
streetrace.input_handler.InputContext
from collections.abc import Iterator from dataclasses import dataclass, field @dataclass class InputContext: """State of input handler.""" user_input: str | None = None bash_output: str | None = None enrich_input: dict[str, str] = field(default_factory=dict) error: str | None = None agent_name:...
@dataclass class InputContext: '''State of input handler.''' def __iter__(self) -> Iterator[str]: '''Iterate over the input context.''' pass
3
2
11
0
10
1
5
0.13
0
2
0
0
1
0
1
1
20
2
16
9
14
2
16
9
14
5
0
1
5
325,043
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/input_handler.py
streetrace.input_handler.InputHandler
from abc import ABC, abstractmethod class InputHandler(ABC): """Base handler for Chain-of-Responsibility.""" long_running: bool = False 'Whether the handler is long running.' @abstractmethod async def handle(self, ctx: InputContext) -> HandlerResult: """Handle user input. Args: ...
class InputHandler(ABC): '''Base handler for Chain-of-Responsibility.''' @abstractmethod async def handle(self, ctx: InputContext) -> HandlerResult: '''Handle user input. Args: ctx: User input processing context. Returns: HandlerResult indicating handing resu...
3
2
13
3
4
6
1
1.14
1
2
2
4
1
0
1
21
20
5
7
7
1
8
3
3
1
1
4
0
1
325,044
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/list_agents.py
streetrace.list_agents.AgentInfoList
from streetrace.agents.base_agent_loader import AgentInfo class AgentInfoList(list[AgentInfo]): """A list of AgentInfo objects."""
class AgentInfoList(list[AgentInfo]): '''A list of AgentInfo objects.''' pass
1
1
0
0
0
0
0
1
1
0
0
0
0
0
0
33
2
0
1
1
0
1
1
1
0
0
2
0
0
325,045
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/llm/lite_llm_client.py
streetrace.llm.lite_llm_client.LiteLLMClientWithUsage
from streetrace.costs import UsageAndCost from litellm.litellm_core_utils.streaming_handler import CustomStreamWrapper from google.adk.models.lite_llm import LiteLlm, LiteLLMClient from streetrace.ui.ui_bus import UiBus from litellm.types.utils import ModelResponse, Usage from streetrace.ui import ui_events class Lite...
class LiteLLMClientWithUsage(LiteLLMClient): '''Provides acompletion method (for better testability).''' def __init__(self, ui_bus: UiBus) -> None: '''Initialize a new instance.''' pass def _process_usage_and_cost(self, model: str, messages: object, completion_response: object) -> None: ...
5
4
22
2
15
8
3
0.51
1
8
3
0
4
1
4
4
94
12
61
30
38
31
29
12
24
6
1
2
10
325,046
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/llm/lite_llm_client.py
streetrace.llm.lite_llm_client.RetryingLiteLlm
from tenacity import AsyncRetrying, TryAgain, stop_after_attempt, wait_incrementing from google.adk.models.llm_response import LlmResponse from typing import Any, override from litellm.exceptions import InternalServerError, RateLimitError from collections.abc import AsyncGenerator, Iterable from streetrace.ui import ui...
class RetryingLiteLlm(LiteLlm): '''LiteLlm with built-in retry capabilities for generate_content_async. This implementation adds tenacity-based retries to the original LiteLlm implementation to handle transient errors like rate limits and server errors. ''' def __init__(self, model: str, ui_bus: U...
4
3
53
7
32
15
5
0.52
1
12
5
0
2
2
2
2
114
16
65
17
57
34
36
9
33
9
1
4
10
325,047
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/llm/llm_interface.py
streetrace.llm.llm_interface.AdkLiteLlmInterface
from streetrace.ui import ui_events from streetrace.ui.ui_bus import UiBus from typing import TYPE_CHECKING, Any, cast, override class AdkLiteLlmInterface(LlmInterface): """LiteLLM interface for ADK using RetryingLiteLlm. This implementation uses the RetryingLiteLlm class which has built-in retry function...
class AdkLiteLlmInterface(LlmInterface): '''LiteLLM interface for ADK using RetryingLiteLlm. This implementation uses the RetryingLiteLlm class which has built-in retry functionality for handling transient errors like rate limits and server errors. ''' def __init__(self, model: str, ui_bus: UiBus)...
7
5
17
2
10
6
1
0.76
1
8
3
0
4
3
4
26
83
12
41
23
25
31
23
13
16
2
5
1
5
325,048
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/llm/llm_interface.py
streetrace.llm.llm_interface.LlmInterface
from typing import TYPE_CHECKING, Any, cast, override from abc import ABC, abstractmethod class LlmInterface(ABC): """A generic LLM interface. Provides a way to call an LLM using StreetRace🚗💨 internal types for ease of use. StreetRace🚗💨 uses: streetrace.history.History for conversation histor...
class LlmInterface(ABC): '''A generic LLM interface. Provides a way to call an LLM using StreetRace🚗💨 internal types for ease of use. StreetRace🚗💨 uses: streetrace.history.History for conversation history; list[dict] for tools; litellm.types.utils.ModelResponse for response. ...
5
3
5
0
4
1
1
1.1
1
5
0
1
2
0
2
22
27
6
10
9
1
11
4
3
1
1
4
0
2
325,049
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/llm/model_factory.py
streetrace.llm.model_factory.ModelFactory
from streetrace.llm.llm_interface import AdkLiteLlmInterface, LlmInterface from streetrace.ui.ui_bus import UiBus class ModelFactory: """Factory class to create and manage models for the StreetRace application. This class is responsible for: 1. Managing model configurations 2. Creating and caching Llm...
class ModelFactory: '''Factory class to create and manage models for the StreetRace application. This class is responsible for: 1. Managing model configurations 2. Creating and caching LlmInterface instances 3. Providing access to underlying BaseLlm instances for agents ''' def __init__(se...
5
5
13
2
7
5
2
0.86
0
8
3
0
4
1
4
4
66
14
28
16
17
24
23
10
17
3
0
1
8
325,050
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/prompt_processor.py
streetrace.prompt_processor.PromptProcessor
from streetrace.ui import ui_events from streetrace.input_handler import HANDLED_CONT, SKIP, HandlerResult, InputContext, InputHandler from streetrace.ui.ui_bus import UiBus from pathlib import Path import re from streetrace.args import Args import os class PromptProcessor(InputHandler): """Enrich user's prompt if...
class PromptProcessor(InputHandler): '''Enrich user's prompt if necessary.''' def __init__(self, ui_bus: UiBus, args: Args) -> None: '''Initialize the PromptProcessor. Args: ui_bus: UI event bus to exchange messages with the UI. args: App args. ''' pass ...
4
4
41
7
28
6
4
0.21
1
13
7
0
3
2
3
24
128
24
86
32
76
18
60
25
56
10
5
4
13
325,051
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/session/json_serializer.py
streetrace.session.json_serializer.JSONSessionSerializer
from pathlib import Path class JSONSessionSerializer: """Serialize and deserialize ADK Session to/from JSON. Notes: this is not a complete serializer. It saves and reads only a necessary subset of fields. """ def __init__(self, storage_path: Path) -> None: """Initialize a new instance of ...
class JSONSessionSerializer: '''Serialize and deserialize ADK Session to/from JSON. Notes: this is not a complete serializer. It saves and reads only a necessary subset of fields. ''' def __init__(self, storage_path: Path) -> None: '''Initialize a new instance of JSONSessionSerializer.''' ...
7
7
21
1
19
1
3
0.1
0
5
0
0
6
1
6
6
138
11
115
43
81
12
60
18
51
6
0
3
19
325,052
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/session/session_manager.py
streetrace.session.session_manager.DisplaySessionsList
from dataclasses import dataclass @dataclass class DisplaySessionsList: """Internal container that holds data solely to render a list of sessions.""" app_name: str user_id: str list_sessions: 'ListSessionsResponse'
@dataclass class DisplaySessionsList: '''Internal container that holds data solely to render a list of sessions.''' pass
2
1
0
0
0
0
0
0.25
0
0
0
0
0
0
0
0
6
1
4
1
3
1
4
1
3
0
0
0
0
325,053
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/session/session_manager.py
streetrace.session.session_manager.SessionManager
class SessionManager: """Manages conversation sessions.""" MAX_TOOL_CALLS_IN_SESSION = 20 current_session: 'Session | None' = None _session_service: 'JSONSessionService | None' = None def __init__(self, args: 'Args', system_context: 'SystemContext', ui_bus: 'UiBus') -> None: """Initialize a...
class SessionManager: '''Manages conversation sessions.''' def __init__(self, args: 'Args', system_context: 'SystemContext', ui_bus: 'UiBus') -> None: '''Initialize a new instance of SessionManager.''' pass @property def session_service(self) -> 'JSONSessionService': '''Get the ...
18
15
26
3
19
5
3
0.26
0
9
3
0
14
4
14
14
391
56
267
83
228
70
149
63
130
15
0
4
48
325,054
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/session/session_service.py
streetrace.session.session_service.JSONSessionService
from typing import TYPE_CHECKING, Any import copy from google.adk.sessions.in_memory_session_service import InMemorySessionService class JSONSessionService(InMemorySessionService): """ADK Session Service that combines in-memory and json storage.""" def __init__(self, serializer: 'JSONSessionSerializer') -> No...
class JSONSessionService(InMemorySessionService): '''ADK Session Service that combines in-memory and json storage.''' def __init__(self, serializer: 'JSONSessionSerializer') -> None: '''Initialize a new instance of JSONSessionService.''' pass async def get_session(self, *, app_name: str, ...
8
8
28
2
24
3
2
0.13
1
9
0
0
7
1
7
7
208
20
167
59
120
22
58
21
49
6
1
1
16
325,055
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/session_md.py
streetrace.session_md.MDSessionWriter
from marko import Markdown from pathlib import Path from google.genai import types as genai_types import json from types import TracebackType from marko.md_renderer import MarkdownRenderer from google.adk.events import Event from datetime import UTC, datetime from google.adk.sessions import Session class MDSessionWrit...
class MDSessionWriter: '''Markdown Session writer implementation.''' def __init__(self, path: Path) -> None: '''Initialize a new instance of MDSessionWriter writing to the provided path.''' pass def __enter__(self) -> 'MDSessionWriter': pass def __exit__(self, exc_type: type[...
16
6
14
0
13
1
3
0.07
0
10
1
0
15
4
15
15
231
22
203
63
182
14
133
58
117
9
0
4
44
325,056
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/session_md.py
streetrace.session_md.UnexpectedSessionDataError
from google.adk.sessions import Session class UnexpectedSessionDataError(Exception): """Any unextected condition seen in the session document.""" def __init__(self, note: str, session: Session, arg: str) -> None: """Session and any other str to allow debugging.""" self._note = note sel...
class UnexpectedSessionDataError(Exception): '''Any unextected condition seen in the session document.''' def __init__(self, note: str, session: Session, arg: str) -> None: '''Session and any other str to allow debugging.''' pass
2
2
5
0
4
1
1
0.4
1
1
0
0
1
3
1
11
8
1
5
5
3
2
5
5
3
1
3
0
1
325,057
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/system_context.py
streetrace.system_context.SystemContext
from collections.abc import Sequence from pathlib import Path from streetrace.ui import ui_events from tzlocal import get_localzone from streetrace import messages from streetrace.ui.ui_bus import UiBus from datetime import datetime class SystemContext: """Handle loading and providing system and project context fo...
class SystemContext: '''Handle loading and providing system and project context for AI interactions. Responsible for reading the system message and project context files from the configuration directory. ''' def __init__(self, ui_bus: UiBus, context_dir: Path) -> None: '''Initialize the Sy...
5
5
28
3
20
5
3
0.28
0
9
3
0
4
2
4
4
121
18
81
23
72
23
51
16
46
7
0
2
12
325,058
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/terminal_session.py
streetrace.terminal_session.SessionData
from dataclasses import dataclass, field from datetime import UTC, datetime @dataclass class SessionData: """Data entry for a terminal session.""" timestamp: datetime source: str content: str
@dataclass class SessionData: '''Data entry for a terminal session.''' pass
2
1
0
0
0
0
0
0.5
0
0
0
0
0
0
0
0
6
1
4
1
3
2
4
1
3
0
0
0
0
325,059
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/terminal_session.py
streetrace.terminal_session.SessionEvent
from dataclasses import dataclass, field @dataclass class SessionEvent: """Event containing session state and data.""" command: str status: SessionStatus return_code: int | None = None session_data: list[SessionData] = field(default_factory=list) error_message: str | None = None execution_t...
@dataclass class SessionEvent: '''Event containing session state and data.''' pass
2
1
0
0
0
0
0
0.14
0
0
0
0
0
0
0
0
9
1
7
5
6
1
7
5
6
0
0
0
0
325,060
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/terminal_session.py
streetrace.terminal_session.SessionStatus
from enum import Enum class SessionStatus(Enum): """Status of a terminal session.""" IDLE = 'idle' RUNNING = 'running' COMPLETED = 'completed' ERROR = 'error'
class SessionStatus(Enum): '''Status of a terminal session.''' pass
1
1
0
0
0
0
0
0.2
1
0
0
0
0
0
0
49
7
1
5
5
4
1
5
5
4
0
4
0
0
325,061
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/terminal_session.py
streetrace.terminal_session.TerminalSession
from collections.abc import Callable import termios import struct import select import sys import tty from datetime import UTC, datetime from pathlib import Path from typing import Any import threading import signal import pty import fcntl from types import FrameType from streetrace.log import get_logger import context...
class TerminalSession: '''Manages a terminal session with command execution and event callbacks.''' def __init__(self, on_session_update: Callable[[SessionEvent], None] | None=None, on_session_complete: Callable[[SessionEvent], None] | None=None, work_dir: Path | None=None, *, terminal_width: int | None=None,...
20
20
30
4
20
7
4
0.36
0
20
3
0
19
19
19
19
600
89
380
85
347
137
273
71
253
12
0
6
77
325,062
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/tools/cli_safety.py
streetrace.tools.cli_safety.SafetyCategory
from enum import Enum class SafetyCategory(str, Enum): """Safety categories for CLI commands.""" SAFE = 'safe' AMBIGUOUS = 'ambiguous' RISKY = 'risky'
class SafetyCategory(str, Enum): '''Safety categories for CLI commands.''' pass
1
1
0
0
0
0
0
0.25
2
0
0
0
0
0
0
115
6
1
4
4
3
1
4
4
3
0
4
0
0
325,063
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/tools/definitions/find_in_files.py
streetrace.tools.definitions.find_in_files.FindInFilesResult
from streetrace.tools.definitions.result import OpResult, OpResultCode class FindInFilesResult(OpResult): """Tool result to send to LLM.""" output: list[SearchResult] | None
class FindInFilesResult(OpResult): '''Tool result to send to LLM.''' pass
1
1
0
0
0
0
0
1
1
0
0
0
0
0
0
0
4
1
2
1
1
2
2
1
1
0
3
0
0
325,064
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/tools/definitions/find_in_files.py
streetrace.tools.definitions.find_in_files.SearchResult
from typing import TypedDict class SearchResult(TypedDict): """A single search result.""" filepath: str line_number: int snippet: str
class SearchResult(TypedDict): '''A single search result.''' pass
1
1
0
0
0
0
0
0.25
1
0
0
0
0
0
0
0
6
1
4
1
3
1
4
1
3
0
1
0
0
325,065
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/tools/definitions/list_agents.py
streetrace.tools.definitions.list_agents.AgentInfo
from typing import Literal, TypedDict class AgentInfo(TypedDict): """Information about a discovered agent.""" name: str description: str | None definition_type: Literal['yaml', 'python'] definition_path: str
class AgentInfo(TypedDict): '''Information about a discovered agent.''' pass
1
1
0
0
0
0
0
0.2
1
0
0
0
0
0
0
0
7
1
5
1
4
1
5
1
4
0
1
0
0
325,066
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/tools/definitions/list_agents.py
streetrace.tools.definitions.list_agents.AgentListResult
from streetrace.tools.definitions.result import OpResult, OpResultCode class AgentListResult(OpResult): """Result containing the list of available agents.""" output: list[AgentInfo]
class AgentListResult(OpResult): '''Result containing the list of available agents.''' pass
1
1
0
0
0
0
0
1
1
0
0
0
0
0
0
0
4
1
2
1
1
2
2
1
1
0
3
0
0
325,067
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/tools/definitions/list_directory.py
streetrace.tools.definitions.list_directory.ListDirItems
from typing import TypedDict class ListDirItems(TypedDict): """Dir listing result to sent to LLM.""" dirs: list[str] | None files: list[str] | None
class ListDirItems(TypedDict): '''Dir listing result to sent to LLM.''' pass
1
1
0
0
0
0
0
0.33
1
0
0
0
0
0
0
0
5
1
3
1
2
1
3
1
2
0
1
0
0
325,068
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/tools/definitions/list_directory.py
streetrace.tools.definitions.list_directory.ListDirResult
from streetrace.tools.definitions.result import OpResult, OpResultCode class ListDirResult(OpResult): """Dir listing result to sent to LLM.""" output: ListDirItems | None
class ListDirResult(OpResult): '''Dir listing result to sent to LLM.''' pass
1
1
0
0
0
0
0
1
1
0
0
0
0
0
0
0
4
1
2
1
1
2
2
1
1
0
3
0
0
325,069
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/tools/definitions/list_tools.py
streetrace.tools.definitions.list_tools.ToolInfo
from typing import Any, TypedDict class ToolInfo(TypedDict): """Information about an available tool.""" name: str
class ToolInfo(TypedDict): '''Information about an available tool.''' pass
1
1
0
0
0
0
0
0.5
1
0
0
0
0
0
0
0
4
1
2
1
1
1
2
1
1
0
1
0
0
325,070
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/tools/definitions/list_tools.py
streetrace.tools.definitions.list_tools.ToolListResult
from streetrace.tools.definitions.result import OpResult, OpResultCode class ToolListResult(OpResult): """Result containing the list of available tools.""" output: list[ToolInfo] | None
class ToolListResult(OpResult): '''Result containing the list of available tools.''' pass
1
1
0
0
0
0
0
1
1
0
0
0
0
0
0
0
4
1
2
1
1
2
2
1
1
0
3
0
0
325,071
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/tools/definitions/result.py
streetrace.tools.definitions.result.BaseResult
from typing import TypedDict class BaseResult(TypedDict): """Result object to send to LLM.""" tool_name: str result: OpResultCode
class BaseResult(TypedDict): '''Result object to send to LLM.''' pass
1
1
0
0
0
0
0
0.33
1
0
0
2
0
0
0
0
5
1
3
1
2
1
3
1
2
0
1
0
0
325,072
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/tools/definitions/result.py
streetrace.tools.definitions.result.CliResult
class CliResult(BaseResult): """CLI command result to send to LLM.""" stdout: str | None stderr: str | None
class CliResult(BaseResult): '''CLI command result to send to LLM.''' pass
1
1
0
0
0
0
0
0.33
1
0
0
0
0
0
0
0
5
1
3
1
2
1
3
1
2
0
2
0
0
325,073
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/tools/definitions/result.py
streetrace.tools.definitions.result.OpResult
class OpResult(BaseResult): """Tool result to send to LLM.""" output: str | None error: str | None
class OpResult(BaseResult): '''Tool result to send to LLM.''' pass
1
1
0
0
0
0
0
0.33
1
0
0
4
0
0
0
0
5
1
3
1
2
1
3
1
2
0
2
0
0
325,074
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/tools/definitions/result.py
streetrace.tools.definitions.result.OpResultCode
from enum import Enum class OpResultCode(str, Enum): """Success or Failure to be sent to LLM as tool result.""" SUCCESS = 'success' FAILURE = 'failure'
class OpResultCode(str, Enum): '''Success or Failure to be sent to LLM as tool result.''' pass
1
1
0
0
0
0
0
0.33
2
0
0
0
0
0
0
115
5
1
3
3
2
1
3
3
2
0
4
0
0
325,075
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/tools/mcp_transport.py
streetrace.tools.mcp_transport.HttpTransport
from pydantic import BaseModel, Field from typing import Any, Literal class HttpTransport(BaseModel): """Configuration for HTTP-based MCP connections.""" type: Literal['http'] = 'http' url: str headers: dict[str, str] | None = None timeout: float | None = None
class HttpTransport(BaseModel): '''Configuration for HTTP-based MCP connections.''' pass
1
1
0
0
0
0
0
0.2
1
0
0
0
0
0
0
82
7
1
5
4
4
1
5
4
4
0
5
0
0
325,076
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/tools/mcp_transport.py
streetrace.tools.mcp_transport.SseTransport
from typing import Any, Literal from pydantic import BaseModel, Field class SseTransport(BaseModel): """Configuration for Server-Sent Events (SSE) based MCP connections.""" type: Literal['sse'] = 'sse' url: str headers: dict[str, str] | None = None timeout: float | None = None
class SseTransport(BaseModel): '''Configuration for Server-Sent Events (SSE) based MCP connections.''' pass
1
1
0
0
0
0
0
0.2
1
0
0
0
0
0
0
82
7
1
5
4
4
1
5
4
4
0
5
0
0
325,077
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/tools/mcp_transport.py
streetrace.tools.mcp_transport.StdioTransport
from pydantic import BaseModel, Field from typing import Any, Literal class StdioTransport(BaseModel): """Configuration for STDIO-based MCP connections.""" type: Literal['stdio'] = 'stdio' command: str args: list[str] = Field(default_factory=list) cwd: str | None = Field(default=None, description='...
class StdioTransport(BaseModel): '''Configuration for STDIO-based MCP connections.''' pass
1
1
0
0
0
0
0
0.11
1
0
0
0
0
0
0
82
11
1
9
5
8
1
6
5
5
0
5
0
0
325,078
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/tools/tool_refs.py
streetrace.tools.tool_refs.CallableToolRef
from typing import Literal from pydantic import BaseModel, Field class CallableToolRef(BaseModel): """Reference to directly callable functions.""" kind: Literal['callable'] = 'callable' import_path: str
class CallableToolRef(BaseModel): '''Reference to directly callable functions.''' pass
1
1
0
0
0
0
0
0.67
1
0
0
0
0
0
0
82
5
1
3
2
2
2
3
2
2
0
5
0
0
325,079
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/tools/tool_refs.py
streetrace.tools.tool_refs.McpToolRef
from pydantic import BaseModel, Field from typing import Literal from streetrace.tools.mcp_transport import Transport class McpToolRef(BaseModel): """Reference to MCP (Model Context Protocol) tools.""" kind: Literal['mcp'] = 'mcp' name: str server: Transport tools: list[str] = Field(default_factory...
class McpToolRef(BaseModel): '''Reference to MCP (Model Context Protocol) tools.''' pass
1
1
0
0
0
0
0
0.8
1
0
0
0
0
0
0
82
7
1
5
3
4
4
5
3
4
0
5
0
0
325,080
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/tools/tool_refs.py
streetrace.tools.tool_refs.StreetraceToolRef
from typing import Literal from pydantic import BaseModel, Field class StreetraceToolRef(BaseModel): """Reference to StreetRace internal tools.""" kind: Literal['streetrace'] = 'streetrace' module: str function: str
class StreetraceToolRef(BaseModel): '''Reference to StreetRace internal tools.''' pass
1
1
0
0
0
0
0
0.75
1
0
0
0
0
0
0
82
6
1
4
2
3
3
4
2
3
0
5
0
0
325,081
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/ui/adk_event_renderer.py
streetrace.ui.adk_event_renderer.Event
from dataclasses import dataclass @dataclass class Event: """Wrapper for ADK Event. This class is used to allow lazy-loading of ADK Event while having strict typing of the Event type. """ event: 'AdkEvent'
null
2
1
0
0
0
0
0
2
0
0
0
0
0
0
0
0
8
2
2
1
1
4
2
1
1
0
0
0
0
325,082
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/ui/adk_event_renderer.py
streetrace.ui.adk_event_renderer.EventRenderer
from typing import TYPE_CHECKING, Any from streetrace.ui.colors import Styles class EventRenderer: """Stateful renderer that groups function calls with their responses.""" def __init__(self) -> None: """Initialize the event renderer.""" self.pending_function_call: tuple[str, FunctionCall] | No...
class EventRenderer: '''Stateful renderer that groups function calls with their responses.''' def __init__(self) -> None: '''Initialize the event renderer.''' pass def render_event(self, obj: 'Event', console: 'Console') -> None: '''Render the provided google.adk.events.Event to r...
5
5
25
3
20
3
3
0.16
0
7
1
0
4
1
4
4
107
16
79
21
65
13
34
16
25
8
0
4
12
325,083
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/ui/colors.py
streetrace.ui.colors.Styles
from typing import ClassVar class Styles: """Style definitions for UI components in StreetRace. Contains style configurations for prompt_toolkit and rich library components, including prompts, model responses, tool calls, history display, and various message types (info, warning, error). """ P...
class Styles: '''Style definitions for UI components in StreetRace. Contains style configurations for prompt_toolkit and rich library components, including prompts, model responses, tool calls, history display, and various message types (info, warning, error). ''' pass
1
1
0
0
0
0
0
0.59
0
0
0
0
0
0
0
0
28
4
17
11
16
10
11
11
10
0
0
0
0
325,084
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/ui/completer.py
streetrace.ui.completer.CommandCompleter
import re from prompt_toolkit.completion import CompleteEvent, Completer, Completion from collections.abc import Iterable from streetrace.commands.command_executor import CommandExecutor class CommandCompleter(Completer): """A prompt_toolkit /command completer. Suggests predefined commands when the user types...
class CommandCompleter(Completer): '''A prompt_toolkit /command completer. Suggests predefined commands when the user types '/'. Only activates if the entire input consists only of the command being typed (allowing for leading/trailing whitespace). ''' def __init__(self, command_executor: Comm...
3
3
24
4
15
6
2
0.55
1
4
1
0
2
1
2
24
56
10
31
16
24
17
14
11
11
2
4
1
3
325,085
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/ui/completer.py
streetrace.ui.completer.PathCompleter
from pathlib import Path from collections.abc import Iterable import re from prompt_toolkit.completion import CompleteEvent, Completer, Completion import os class PathCompleter(Completer): """A prompt_toolkit @path completer. Suggests file and directory paths relative to a working directory when the user ...
class PathCompleter(Completer): '''A prompt_toolkit @path completer. Suggests file and directory paths relative to a working directory when the user types '@'. Only activates if the cursor is adjacent to or within a valid @-mention path. ''' def __init__(self, working_dir: Path) -> None: ...
3
3
56
10
36
13
8
0.41
1
7
0
0
2
1
2
24
121
22
73
27
66
30
51
23
48
13
4
4
15
325,086
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/ui/completer.py
streetrace.ui.completer.PromptCompleter
from collections.abc import Iterable from prompt_toolkit.completion import CompleteEvent, Completer, Completion class PromptCompleter(Completer): """A composite completer that combines all other completers. Simply aggregates completions from all registered completers. """ def __init__(self, completer...
class PromptCompleter(Completer): '''A composite completer that combines all other completers. Simply aggregates completions from all registered completers. ''' def __init__(self, completers: Iterable[Completer]) -> None: '''Initialize the PromptCompleter. Args: completers:...
3
3
10
2
5
4
2
1
1
4
0
0
2
1
2
24
26
6
10
9
3
10
6
5
3
2
4
1
3
325,087
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/ui/console_ui.py
streetrace.ui.console_ui.ConsoleUI
from prompt_toolkit.validation import Validator from streetrace.app_state import AppState from prompt_toolkit import HTML, PromptSession from prompt_toolkit.patch_stdout import patch_stdout from prompt_toolkit.formatted_text import StyleAndTextTuples from streetrace.ui.ui_bus import UiBus from prompt_toolkit.key_bindin...
class ConsoleUI: '''Handles all console input and output for the StreetRace application. Encapsulates print statements and ANSI color codes for consistent UI. Leverages a completer for interactive input suggestions. ''' def __init__(self, app_state: AppState, completer: Completer, ui_bus: UiBus) -...
16
9
12
1
8
4
1
0.53
0
19
4
0
7
6
7
7
143
25
87
35
61
46
55
23
40
4
0
2
18
325,088
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/ui/console_ui.py
streetrace.ui.console_ui.StatusSpinner
from streetrace.app_state import AppState from rich.console import Console from types import TracebackType class StatusSpinner: """Console Status, encapsulates rich.status.""" _ICON = 'hamburger' _EMPTY_MESSAGE = 'Working...' def __init__(self, app_state: AppState, console: Console) -> None: "...
class StatusSpinner: '''Console Status, encapsulates rich.status.''' def __init__(self, app_state: AppState, console: Console) -> None: '''Initialize the instance and instantiate rich.status. Args: app_state: App State container. console: The console instance to attach ...
5
5
12
2
6
4
2
0.63
0
5
1
0
4
3
4
4
55
11
27
15
17
17
17
10
12
2
0
1
6
325,089
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/ui/ui_bus.py
streetrace.ui.ui_bus.UiBus
from pubsub.core import Publisher from streetrace.costs import UsageAndCost from collections.abc import Callable from typing import Any class UiBus: """UI event bus that helps exchange messages between UI and App logic.""" _publisher: Publisher def __init__(self) -> None: """Initialize a new insta...
class UiBus: '''UI event bus that helps exchange messages between UI and App logic.''' def __init__(self) -> None: '''Initialize a new instance of UiBus with a separate pubsub Publisher.''' pass def dispatch_ui_update(self, event: Any) -> None: '''Send a new renderable to the UI. ...
10
10
11
3
3
6
1
2
0
5
1
0
9
0
9
9
114
37
26
10
16
52
20
10
10
1
0
0
9
325,090
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/ui/ui_events.py
streetrace.ui.ui_events.Error
class Error(_Str): pass
class Error(_Str): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
66
2
0
2
1
1
0
2
1
1
0
3
0
0
325,091
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/ui/ui_events.py
streetrace.ui.ui_events.Info
class Info(_Str): pass
class Info(_Str): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
66
2
0
2
1
1
0
2
1
1
0
3
0
0
325,092
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/ui/ui_events.py
streetrace.ui.ui_events.Markdown
class Markdown(_Str): pass
class Markdown(_Str): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
66
2
0
2
1
1
0
2
1
1
0
3
0
0
325,093
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/ui/ui_events.py
streetrace.ui.ui_events.UserInput
class UserInput(_Str): pass
class UserInput(_Str): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
66
2
0
2
1
1
0
2
1
1
0
3
0
0
325,094
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/ui/ui_events.py
streetrace.ui.ui_events.Warn
class Warn(_Str): pass
class Warn(_Str): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
66
2
0
2
1
1
0
2
1
1
0
3
0
0
325,095
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/ui/ui_events.py
streetrace.ui.ui_events._Str
class _Str(str): __slots__ = ()
class _Str(str): pass
1
0
0
0
0
0
0
0
1
0
0
5
0
0
0
66
2
0
2
2
1
0
2
2
1
0
2
0
0
325,096
krmrn42/street-race
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krmrn42_street-race/src/streetrace/workflow/supervisor.py
streetrace.workflow.supervisor.Supervisor
from streetrace.ui.ui_bus import UiBus from streetrace.ui.adk_event_renderer import Event from streetrace.ui import ui_events from typing import TYPE_CHECKING, override from streetrace.input_handler import HANDLED_CONT, HandlerResult, InputContext, InputHandler class Supervisor(InputHandler): """Workflow superviso...
class Supervisor(InputHandler): '''Workflow supervisor manages and executes available workflows.''' def __init__(self, agent_manager: 'AgentManager', session_manager: 'SessionManager', ui_bus: UiBus) -> None: '''Initialize a new instance of workflow supervisor. Args: agent_manager:...
4
3
52
7
28
19
5
0.66
1
5
4
0
2
4
2
23
108
15
58
24
47
38
34
17
29
8
5
5
9
325,097
neo4j-contrib/gds-agent
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/neo4j-contrib_gds-agent/mcp_server/src/mcp_server_neo4j_gds/algorithm_handler.py
mcp_server_neo4j_gds.algorithm_handler.AlgorithmHandler
from typing import Dict, Any from graphdatascience import GraphDataScience from abc import ABC, abstractmethod class AlgorithmHandler(ABC): def __init__(self, gds: GraphDataScience): self.gds = gds @abstractmethod def execute(self, arguments: Dict[str, Any]) -> Any: pass
class AlgorithmHandler(ABC): def __init__(self, gds: GraphDataScience): pass @abstractmethod def execute(self, arguments: Dict[str, Any]) -> Any: pass
4
0
2
0
2
0
1
0
1
2
0
43
2
1
2
22
7
1
6
5
2
0
5
4
2
1
4
0
2
325,098
neo4j-contrib/gds-agent
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/neo4j-contrib_gds-agent/mcp_server/src/mcp_server_neo4j_gds/centrality_algorithm_handlers.py
mcp_server_neo4j_gds.centrality_algorithm_handlers.ArticleRankHandler
from .node_translator import filter_identifiers, translate_ids_to_identifiers, translate_identifiers_to_ids from .algorithm_handler import AlgorithmHandler from .gds import projected_graph from typing import Any, Dict class ArticleRankHandler(AlgorithmHandler): def article_rank(self, **kwargs): with proje...
class ArticleRankHandler(AlgorithmHandler): def article_rank(self, **kwargs): pass def execute(self, arguments: Dict[str, Any]) -> Any: pass
3
0
20
3
17
1
1
0.06
1
2
0
0
2
0
2
24
42
6
34
10
31
2
17
9
14
1
5
1
2
325,099
neo4j-contrib/gds-agent
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/neo4j-contrib_gds-agent/mcp_server/src/mcp_server_neo4j_gds/centrality_algorithm_handlers.py
mcp_server_neo4j_gds.centrality_algorithm_handlers.ArticulationPointsHandler
from .node_translator import filter_identifiers, translate_ids_to_identifiers, translate_identifiers_to_ids from typing import Any, Dict from .algorithm_handler import AlgorithmHandler from .gds import projected_graph class ArticulationPointsHandler(AlgorithmHandler): def articulation_points(self, **kwargs): ...
class ArticulationPointsHandler(AlgorithmHandler): def articulation_points(self, **kwargs): pass def execute(self, arguments: Dict[str, Any]) -> Any: pass
3
0
7
1
6
1
1
0.08
1
2
0
0
2
1
2
24
16
2
13
6
10
1
9
5
6
1
5
1
2