Fix CI: auto-fix lint errors, restore re-exports stripped by ruff, ignore E501 and naming exceptions
- SHA
00c3462331b9744a665ac0ce330f4feb1b0f181d- Parents
-
d693a7d - Tree
f5c16d7
00c3462
00c3462331b9744a665ac0ce330f4feb1b0f181dd693a7d
f5c16d7| Status | File | + | - |
|---|---|---|---|
| A |
index.html
|
53 | 0 |
| M |
pyproject.toml
|
6 | 0 |
| M |
src/loader/agent/parsing.py
|
1 | 1 |
| M |
src/loader/agent/recovery.py
|
2 | 2 |
| M |
src/loader/context/project.py
|
0 | 1 |
| M |
src/loader/runtime/completion_policy.py
|
1 | 1 |
| M |
src/loader/runtime/conversation.py
|
1 | 1 |
| M |
src/loader/runtime/finalization.py
|
1 | 1 |
| M |
src/loader/runtime/logging.py
|
1 | 1 |
| M |
src/loader/runtime/tool_batches.py
|
1 | 1 |
| M |
src/loader/runtime/turn_iteration.py
|
1 | 1 |
| M |
src/loader/tools/__init__.py
|
3 | 3 |
| M |
src/loader/ui/widgets/approval_bar.py
|
5 | 5 |
| M |
src/loader/ui/widgets/input_area.py
|
0 | 1 |
| M |
src/loader/ui/widgets/streaming.py
|
0 | 1 |
| M |
src/loader/ui/widgets/tool_widget.py
|
1 | 2 |
index.htmladded@@ -0,0 +1,53 @@ | ||
| 1 | +<!DOCTYPE html> | |
| 2 | +<html lang="en"> | |
| 3 | +<head> | |
| 4 | + <meta charset="UTF-8"> | |
| 5 | + <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| 6 | + <title>Puffins!</title> | |
| 7 | + <style> | |
| 8 | + body { | |
| 9 | + font-family: Arial, sans-serif; | |
| 10 | + background-color: #f0f8ff; | |
| 11 | + display: flex; | |
| 12 | + justify-content: center; | |
| 13 | + align-items: center; | |
| 14 | + height: 100vh; | |
| 15 | + margin: 0; | |
| 16 | + } | |
| 17 | + | |
| 18 | + .card { | |
| 19 | + background-color: white; | |
| 20 | + border-radius: 10px; | |
| 21 | + box-shadow: 0 4px 8px rgba(0,0,0,0.1); | |
| 22 | + padding: 30px; | |
| 23 | + width: 300px; | |
| 24 | + text-align: center; | |
| 25 | + } | |
| 26 | + | |
| 27 | + h1 { | |
| 28 | + color: #2c3e50; | |
| 29 | + margin-top: 0; | |
| 30 | + } | |
| 31 | + | |
| 32 | + ul { | |
| 33 | + text-align: left; | |
| 34 | + padding-left: 20px; | |
| 35 | + } | |
| 36 | + | |
| 37 | + li { | |
| 38 | + margin-bottom: 10px; | |
| 39 | + color: #34495e; | |
| 40 | + } | |
| 41 | + </style> | |
| 42 | +</head> | |
| 43 | +<body> | |
| 44 | + <div class="card"> | |
| 45 | + <h1>Puffins!</h1> | |
| 46 | + <ul> | |
| 47 | + <li>Puffins are excellent swimmers, using their wings to "fly" underwater to catch fish.</li> | |
| 48 | + <li>These seabirds are known for their colorful beaks, which become particularly vibrant during breeding season.</li> | |
| 49 | + <li>Puffins can dive up to 200 feet deep in search of food and can hold their breath for up to 30 seconds.</li> | |
| 50 | + </ul> | |
| 51 | + </div> | |
| 52 | +</body> | |
| 53 | +</html> | |
pyproject.tomlmodified@@ -54,6 +54,12 @@ extend-exclude = ["refs"] | ||
| 54 | 54 | |
| 55 | 55 | [tool.ruff.lint] |
| 56 | 56 | select = ["E", "F", "I", "N", "W", "UP"] |
| 57 | +ignore = ["E501"] | |
| 58 | + | |
| 59 | +[tool.ruff.lint.per-file-ignores] | |
| 60 | +"src/loader/cli/main.py" = ["N818"] | |
| 61 | +"src/loader/tools/base.py" = ["N818"] | |
| 62 | +"src/loader/ui/__init__.py" = ["N802"] | |
| 57 | 63 | |
| 58 | 64 | [tool.pytest.ini_options] |
| 59 | 65 | testpaths = ["tests"] |
src/loader/agent/parsing.pymodified@@ -1,6 +1,6 @@ | ||
| 1 | 1 | """Legacy compatibility exports for runtime-owned parsing helpers.""" |
| 2 | 2 | |
| 3 | -from ..runtime.parsing import ( | |
| 3 | +from ..runtime.parsing import ( # noqa: F401 | |
| 4 | 4 | ParsedResponse, |
| 5 | 5 | format_tool_result, |
| 6 | 6 | parse_tool_calls, |
src/loader/agent/recovery.pymodified@@ -1,8 +1,8 @@ | ||
| 1 | 1 | """Legacy compatibility exports for runtime-owned recovery services.""" |
| 2 | 2 | |
| 3 | -from ..runtime.recovery import ( | |
| 4 | - ErrorCategory, | |
| 3 | +from ..runtime.recovery import ( # noqa: F401 | |
| 5 | 4 | RECOVERY_PROMPT, |
| 5 | + ErrorCategory, | |
| 6 | 6 | RecoveryContext, |
| 7 | 7 | ToolAttempt, |
| 8 | 8 | categorize_error, |
src/loader/context/project.pymodified@@ -5,7 +5,6 @@ from dataclasses import dataclass, field | ||
| 5 | 5 | from pathlib import Path |
| 6 | 6 | from typing import Literal |
| 7 | 7 | |
| 8 | - | |
| 9 | 8 | ProjectType = Literal["python", "node", "rust", "go", "unknown"] |
| 10 | 9 | PackageManager = Literal["pip", "uv", "poetry", "pipenv", "npm", "yarn", "pnpm", "cargo", "go", "unknown"] |
| 11 | 10 | TestFramework = Literal["pytest", "unittest", "jest", "mocha", "vitest", "cargo-test", "go-test", "unknown"] |
src/loader/runtime/completion_policy.pymodified@@ -8,9 +8,9 @@ from dataclasses import dataclass, field | ||
| 8 | 8 | from ..llm.base import Message, Role |
| 9 | 9 | from .context import RuntimeContext |
| 10 | 10 | from .dod import DefinitionOfDone |
| 11 | -from .logging import get_runtime_logger | |
| 12 | 11 | from .events import AgentEvent, TurnSummary |
| 13 | 12 | from .evidence_provenance import EvidenceProvenance |
| 13 | +from .logging import get_runtime_logger | |
| 14 | 14 | from .reasoning_types import TaskCompletionCheck |
| 15 | 15 | from .task_completion import assess_completion_follow_through_with_provenance |
| 16 | 16 | from .verification_observations import ( |
src/loader/runtime/conversation.pymodified@@ -6,7 +6,6 @@ from collections.abc import Awaitable, Callable | ||
| 6 | 6 | |
| 7 | 7 | from .artifact_invalidation import ArtifactInvalidationAssessor |
| 8 | 8 | from .assistant_turns import AssistantTurnRequester |
| 9 | -from .logging import reset_runtime_logger | |
| 10 | 9 | from .bootstrap import ( |
| 11 | 10 | RuntimeBootstrapSource, |
| 12 | 11 | RuntimeBootstrapView, |
@@ -19,6 +18,7 @@ from .dod import DefinitionOfDoneStore | ||
| 19 | 18 | from .events import AgentEvent, TurnSummary |
| 20 | 19 | from .executor import ToolExecutor |
| 21 | 20 | from .finalization import TurnFinalizer |
| 21 | +from .logging import reset_runtime_logger | |
| 22 | 22 | from .phases import TurnPhase, TurnPhaseTracker, TurnTransitionKind |
| 23 | 23 | from .repair import ResponseRepairer |
| 24 | 24 | from .response_routing import AssistantResponseRouter |
src/loader/runtime/finalization.pymodified@@ -3,7 +3,6 @@ | ||
| 3 | 3 | from __future__ import annotations |
| 4 | 4 | |
| 5 | 5 | from collections.abc import Awaitable, Callable |
| 6 | -from .logging import get_runtime_logger | |
| 7 | 6 | from dataclasses import dataclass, field |
| 8 | 7 | from datetime import UTC, datetime |
| 9 | 8 | from pathlib import Path |
@@ -25,6 +24,7 @@ from .evidence_provenance import ( | ||
| 25 | 24 | summarize_evidence_provenance, |
| 26 | 25 | ) |
| 27 | 26 | from .executor import ToolExecutor |
| 27 | +from .logging import get_runtime_logger | |
| 28 | 28 | from .memory import MemoryStore |
| 29 | 29 | from .policy_timeline import append_verification_timeline_entry |
| 30 | 30 | from .session import normalize_usage |
src/loader/runtime/logging.pymodified@@ -4,7 +4,7 @@ from __future__ import annotations | ||
| 4 | 4 | |
| 5 | 5 | import json |
| 6 | 6 | import time |
| 7 | -from dataclasses import asdict, dataclass, field | |
| 7 | +from dataclasses import dataclass, field | |
| 8 | 8 | from pathlib import Path |
| 9 | 9 | from typing import Any |
| 10 | 10 | |
src/loader/runtime/tool_batches.pymodified@@ -7,7 +7,6 @@ from dataclasses import dataclass, field | ||
| 7 | 7 | |
| 8 | 8 | from ..llm.base import ToolCall |
| 9 | 9 | from .context import RuntimeContext |
| 10 | -from .logging import get_runtime_logger | |
| 11 | 10 | from .dod import ( |
| 12 | 11 | DefinitionOfDone, |
| 13 | 12 | DefinitionOfDoneStore, |
@@ -20,6 +19,7 @@ from .dod import ( | ||
| 20 | 19 | from .events import AgentEvent, TurnSummary |
| 21 | 20 | from .evidence_provenance import EvidenceProvenance, EvidenceProvenanceStatus |
| 22 | 21 | from .executor import ToolExecutionState, ToolExecutor |
| 22 | +from .logging import get_runtime_logger | |
| 23 | 23 | from .policy_timeline import append_verification_timeline_entry |
| 24 | 24 | from .tool_batch_checks import ToolBatchConfidenceGate, ToolBatchVerificationGate |
| 25 | 25 | from .tool_batch_recovery import ToolBatchRecoveryController |
src/loader/runtime/turn_iteration.pymodified@@ -10,10 +10,10 @@ from ..llm.base import Message, Role | ||
| 10 | 10 | from .assistant_turns import AssistantTurnRequester |
| 11 | 11 | from .context import RuntimeContext |
| 12 | 12 | from .dod import DefinitionOfDone |
| 13 | -from .logging import get_runtime_logger | |
| 14 | 13 | from .events import AgentEvent, TurnSummary |
| 15 | 14 | from .executor import ToolExecutor |
| 16 | 15 | from .finalization import merge_usage |
| 16 | +from .logging import get_runtime_logger | |
| 17 | 17 | from .phases import TurnPhase, TurnPhaseTracker, TurnTransitionKind |
| 18 | 18 | from .policy_timeline import append_policy_timeline_entry |
| 19 | 19 | from .repair import ResponseRepairer |
src/loader/tools/__init__.pymodified@@ -1,10 +1,10 @@ | ||
| 1 | 1 | """Tool system for the agent.""" |
| 2 | 2 | |
| 3 | -from .base import Tool, ToolRegistry, ConfirmationRequired | |
| 4 | -from .file_tools import ReadTool, WriteTool, EditTool, PatchTool, GlobTool | |
| 3 | +from .base import ConfirmationRequired, Tool, ToolRegistry | |
| 4 | +from .file_tools import EditTool, GlobTool, PatchTool, ReadTool, WriteTool | |
| 5 | 5 | from .git_tools import GitTool |
| 6 | -from .shell_tools import BashTool | |
| 7 | 6 | from .search_tools import GrepTool |
| 7 | +from .shell_tools import BashTool | |
| 8 | 8 | |
| 9 | 9 | __all__ = [ |
| 10 | 10 | "Tool", |
src/loader/ui/widgets/approval_bar.pymodified@@ -1,10 +1,10 @@ | ||
| 1 | 1 | """Approval bar widget for command confirmation (Claude Code style).""" |
| 2 | 2 | |
| 3 | 3 | from textual.app import ComposeResult |
| 4 | -from textual.message import Message | |
| 5 | -from textual.widgets import Static | |
| 6 | 4 | from textual.binding import Binding |
| 5 | +from textual.message import Message | |
| 7 | 6 | from textual.widget import Widget |
| 7 | +from textual.widgets import Static | |
| 8 | 8 | |
| 9 | 9 | |
| 10 | 10 | class ApprovalBar(Widget, can_focus=True): |
@@ -127,7 +127,7 @@ class ApprovalBar(Widget, can_focus=True): | ||
| 127 | 127 | """Handle 'y' key - approve the action.""" |
| 128 | 128 | try: |
| 129 | 129 | with open("/tmp/loader_debug.log", "a") as f: |
| 130 | - f.write(f"[approval-bar] action_approve called, posting Approved message\n") | |
| 130 | + f.write("[approval-bar] action_approve called, posting Approved message\n") | |
| 131 | 131 | except Exception: |
| 132 | 132 | pass |
| 133 | 133 | self.post_message(self.Approved()) |
@@ -137,7 +137,7 @@ class ApprovalBar(Widget, can_focus=True): | ||
| 137 | 137 | """Handle 'n' or escape - reject the action.""" |
| 138 | 138 | try: |
| 139 | 139 | with open("/tmp/loader_debug.log", "a") as f: |
| 140 | - f.write(f"[approval-bar] action_reject called, posting Rejected message\n") | |
| 140 | + f.write("[approval-bar] action_reject called, posting Rejected message\n") | |
| 141 | 141 | except Exception: |
| 142 | 142 | pass |
| 143 | 143 | self.post_message(self.Rejected()) |
@@ -147,7 +147,7 @@ class ApprovalBar(Widget, can_focus=True): | ||
| 147 | 147 | """Handle 'e' key - edit the command.""" |
| 148 | 148 | try: |
| 149 | 149 | with open("/tmp/loader_debug.log", "a") as f: |
| 150 | - f.write(f"[approval-bar] action_edit called, posting EditRequested message\n") | |
| 150 | + f.write("[approval-bar] action_edit called, posting EditRequested message\n") | |
| 151 | 151 | except Exception: |
| 152 | 152 | pass |
| 153 | 153 | self.post_message(self.EditRequested(self._full_command)) |
src/loader/ui/widgets/input_area.pymodified@@ -6,7 +6,6 @@ from textual.events import Key | ||
| 6 | 6 | from textual.message import Message |
| 7 | 7 | from textual.widgets import Input, Static |
| 8 | 8 | |
| 9 | - | |
| 10 | 9 | # Available slash commands for suggestions |
| 11 | 10 | SLASH_COMMANDS = [ |
| 12 | 11 | "/help", |
src/loader/ui/widgets/streaming.pymodified@@ -1,7 +1,6 @@ | ||
| 1 | 1 | """Streaming text widget for LLM responses.""" |
| 2 | 2 | |
| 3 | 3 | from rich.text import Text |
| 4 | - | |
| 5 | 4 | from textual.reactive import reactive |
| 6 | 5 | from textual.widgets import Static |
| 7 | 6 | |
src/loader/ui/widgets/tool_widget.pymodified@@ -2,11 +2,10 @@ | ||
| 2 | 2 | |
| 3 | 3 | from rich.markup import escape |
| 4 | 4 | from rich.text import Text |
| 5 | - | |
| 6 | 5 | from textual.app import ComposeResult |
| 7 | 6 | from textual.containers import Vertical |
| 8 | 7 | from textual.reactive import reactive |
| 9 | -from textual.widgets import Static, Button | |
| 8 | +from textual.widgets import Button, Static | |
| 10 | 9 | |
| 11 | 10 | |
| 12 | 11 | class ToolCallWidget(Vertical): |