koder 0.1.0__tar.gz → 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {koder-0.1.0 → koder-0.3.0}/PKG-INFO +26 -13
- {koder-0.1.0 → koder-0.3.0}/README.md +25 -12
- {koder-0.1.0 → koder-0.3.0}/koder_agent/__init__.py +1 -1
- {koder-0.1.0 → koder-0.3.0}/koder_agent/agentic/agent.py +14 -14
- {koder-0.1.0 → koder-0.3.0}/koder_agent/cli.py +6 -13
- {koder-0.1.0 → koder-0.3.0}/koder_agent/core/commands.py +2 -2
- {koder-0.1.0 → koder-0.3.0}/koder_agent/core/interactive.py +24 -19
- koder-0.3.0/koder_agent/core/scheduler.py +355 -0
- koder-0.3.0/koder_agent/core/streaming_display.py +491 -0
- {koder-0.1.0 → koder-0.3.0}/koder_agent/mcp/cli_handler.py +2 -2
- {koder-0.1.0 → koder-0.3.0}/koder_agent/tools/__init__.py +0 -2
- {koder-0.1.0 → koder-0.3.0}/koder_agent/tools/engine.py +1 -1
- {koder-0.1.0 → koder-0.3.0}/koder_agent/tools/task_ops.py +13 -0
- {koder-0.1.0 → koder-0.3.0}/koder_agent/utils/client.py +3 -3
- {koder-0.1.0 → koder-0.3.0}/pyproject.toml +1 -1
- {koder-0.1.0 → koder-0.3.0}/uv.lock +1 -1
- koder-0.1.0/koder_agent/core/scheduler.py +0 -349
- {koder-0.1.0 → koder-0.3.0}/.claude/settings.local.json +0 -0
- {koder-0.1.0 → koder-0.3.0}/.github/dependabot.yml +0 -0
- {koder-0.1.0 → koder-0.3.0}/.gitignore +0 -0
- {koder-0.1.0 → koder-0.3.0}/CLAUDE.md +0 -0
- {koder-0.1.0 → koder-0.3.0}/KODER.md +0 -0
- {koder-0.1.0 → koder-0.3.0}/LICENSE +0 -0
- {koder-0.1.0 → koder-0.3.0}/koder_agent/agentic/__init__.py +0 -0
- {koder-0.1.0 → koder-0.3.0}/koder_agent/agentic/hooks.py +0 -0
- {koder-0.1.0 → koder-0.3.0}/koder_agent/core/__init__.py +0 -0
- {koder-0.1.0 → koder-0.3.0}/koder_agent/core/context.py +0 -0
- {koder-0.1.0 → koder-0.3.0}/koder_agent/core/security.py +0 -0
- {koder-0.1.0 → koder-0.3.0}/koder_agent/mcp/__init__.py +0 -0
- {koder-0.1.0 → koder-0.3.0}/koder_agent/mcp/server_config.py +0 -0
- {koder-0.1.0 → koder-0.3.0}/koder_agent/mcp/server_factory.py +0 -0
- {koder-0.1.0 → koder-0.3.0}/koder_agent/mcp/server_manager.py +0 -0
- {koder-0.1.0 → koder-0.3.0}/koder_agent/tools/file_ops.py +0 -0
- {koder-0.1.0 → koder-0.3.0}/koder_agent/tools/search_ops.py +0 -0
- {koder-0.1.0 → koder-0.3.0}/koder_agent/tools/shell_ops.py +0 -0
- {koder-0.1.0 → koder-0.3.0}/koder_agent/tools/todo_ops.py +0 -0
- {koder-0.1.0 → koder-0.3.0}/koder_agent/tools/web_ops.py +0 -0
- {koder-0.1.0 → koder-0.3.0}/koder_agent/utils/__init__.py +0 -0
- {koder-0.1.0 → koder-0.3.0}/koder_agent/utils/prompts.py +0 -0
- {koder-0.1.0 → koder-0.3.0}/koder_agent/utils/queue.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: koder
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: An intuitive AI coding assistant and interactive CLI tool that boosts developer productivity with intelligent automation and context-aware support.
|
|
5
5
|
Author: Pengfei Ni
|
|
6
6
|
License-File: LICENSE
|
|
@@ -21,10 +21,7 @@ Description-Content-Type: text/markdown
|
|
|
21
21
|
|
|
22
22
|
# Koder
|
|
23
23
|
|
|
24
|
-
[](https://www.python.org/downloads/)
|
|
25
|
-
[](LICENSE)
|
|
26
|
-
[](https://github.com/psf/black)
|
|
27
|
-
[](https://github.com/astral-sh/ruff)
|
|
24
|
+
[](https://www.python.org/downloads/) [](LICENSE) [](https://github.com/psf/black) [](https://github.com/astral-sh/ruff) [](https://pepy.tech/projects/koder)
|
|
28
25
|
|
|
29
26
|
An intuitive AI coding assistant and interactive CLI tool that boosts developer productivity with intelligent automation and context-aware support.
|
|
30
27
|
|
|
@@ -111,6 +108,30 @@ export KODER_MODEL="gemini/gemini-2.5-pro"
|
|
|
111
108
|
|
|
112
109
|
<details>
|
|
113
110
|
|
|
111
|
+
<summary>Anthropic Claude</summary>
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
# Anthropic Claude Opus
|
|
115
|
+
export ANTHROPIC_API_KEY="your-anthropic-key"
|
|
116
|
+
export KODER_MODEL="claude-opus-4-20250514"
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
</details>
|
|
120
|
+
|
|
121
|
+
<details>
|
|
122
|
+
|
|
123
|
+
<summary>Github Copilot</summary>
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
export KODER_MODEL="github_copilot/claude-sonnet-4"
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Visit <https://github.com/login/device> and enter code XXXX-XXXXX shown in your first chat to authenticate.
|
|
130
|
+
|
|
131
|
+
</details>
|
|
132
|
+
|
|
133
|
+
<details>
|
|
134
|
+
|
|
114
135
|
<summary>Azure OpenAI</summary>
|
|
115
136
|
|
|
116
137
|
```bash
|
|
@@ -133,10 +154,6 @@ export AZURE_OPENAI_API_VERSION="2025-04-01-preview" # Default version
|
|
|
133
154
|
[LiteLLM](https://docs.litellm.ai/docs/providers) supports 100+ providers including Anthropic, Google, Cohere, Hugging Face, and more:
|
|
134
155
|
|
|
135
156
|
```bash
|
|
136
|
-
# Anthropic Claude
|
|
137
|
-
export ANTHROPIC_API_KEY="your-anthropic-key"
|
|
138
|
-
export KODER_MODEL="claude-opus-4-20250514"
|
|
139
|
-
|
|
140
157
|
# Google Vertex AI
|
|
141
158
|
export GOOGLE_APPLICATION_CREDENTIALS="your-sa-path.json"
|
|
142
159
|
export VERTEXAI_LOCATION="<your-region>"
|
|
@@ -150,8 +167,6 @@ export KODER_MODEL="openai/<your-model-name>"
|
|
|
150
167
|
|
|
151
168
|
</details>
|
|
152
169
|
|
|
153
|
-
|
|
154
|
-
|
|
155
170
|
## ⚡ Quick Start
|
|
156
171
|
|
|
157
172
|
### Basic Usage
|
|
@@ -170,8 +185,6 @@ koder --session my-project "Your prompt here"
|
|
|
170
185
|
koder --stream "Your prompt here"
|
|
171
186
|
```
|
|
172
187
|
|
|
173
|
-
|
|
174
|
-
|
|
175
188
|
## 🧪 Development
|
|
176
189
|
|
|
177
190
|
### Setup Development Environment
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
# Koder
|
|
2
2
|
|
|
3
|
-
[](https://www.python.org/downloads/)
|
|
4
|
-
[](LICENSE)
|
|
5
|
-
[](https://github.com/psf/black)
|
|
6
|
-
[](https://github.com/astral-sh/ruff)
|
|
3
|
+
[](https://www.python.org/downloads/) [](LICENSE) [](https://github.com/psf/black) [](https://github.com/astral-sh/ruff) [](https://pepy.tech/projects/koder)
|
|
7
4
|
|
|
8
5
|
An intuitive AI coding assistant and interactive CLI tool that boosts developer productivity with intelligent automation and context-aware support.
|
|
9
6
|
|
|
@@ -90,6 +87,30 @@ export KODER_MODEL="gemini/gemini-2.5-pro"
|
|
|
90
87
|
|
|
91
88
|
<details>
|
|
92
89
|
|
|
90
|
+
<summary>Anthropic Claude</summary>
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# Anthropic Claude Opus
|
|
94
|
+
export ANTHROPIC_API_KEY="your-anthropic-key"
|
|
95
|
+
export KODER_MODEL="claude-opus-4-20250514"
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
</details>
|
|
99
|
+
|
|
100
|
+
<details>
|
|
101
|
+
|
|
102
|
+
<summary>Github Copilot</summary>
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
export KODER_MODEL="github_copilot/claude-sonnet-4"
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Visit <https://github.com/login/device> and enter code XXXX-XXXXX shown in your first chat to authenticate.
|
|
109
|
+
|
|
110
|
+
</details>
|
|
111
|
+
|
|
112
|
+
<details>
|
|
113
|
+
|
|
93
114
|
<summary>Azure OpenAI</summary>
|
|
94
115
|
|
|
95
116
|
```bash
|
|
@@ -112,10 +133,6 @@ export AZURE_OPENAI_API_VERSION="2025-04-01-preview" # Default version
|
|
|
112
133
|
[LiteLLM](https://docs.litellm.ai/docs/providers) supports 100+ providers including Anthropic, Google, Cohere, Hugging Face, and more:
|
|
113
134
|
|
|
114
135
|
```bash
|
|
115
|
-
# Anthropic Claude
|
|
116
|
-
export ANTHROPIC_API_KEY="your-anthropic-key"
|
|
117
|
-
export KODER_MODEL="claude-opus-4-20250514"
|
|
118
|
-
|
|
119
136
|
# Google Vertex AI
|
|
120
137
|
export GOOGLE_APPLICATION_CREDENTIALS="your-sa-path.json"
|
|
121
138
|
export VERTEXAI_LOCATION="<your-region>"
|
|
@@ -129,8 +146,6 @@ export KODER_MODEL="openai/<your-model-name>"
|
|
|
129
146
|
|
|
130
147
|
</details>
|
|
131
148
|
|
|
132
|
-
|
|
133
|
-
|
|
134
149
|
## ⚡ Quick Start
|
|
135
150
|
|
|
136
151
|
### Basic Usage
|
|
@@ -149,8 +164,6 @@ koder --session my-project "Your prompt here"
|
|
|
149
164
|
koder --stream "Your prompt here"
|
|
150
165
|
```
|
|
151
166
|
|
|
152
|
-
|
|
153
|
-
|
|
154
167
|
## 🧪 Development
|
|
155
168
|
|
|
156
169
|
### Setup Development Environment
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"""Agent definitions and hooks for Koder."""
|
|
2
2
|
|
|
3
3
|
import logging
|
|
4
|
+
import uuid
|
|
4
5
|
|
|
5
6
|
from agents import Agent
|
|
6
7
|
from rich.console import Console
|
|
@@ -13,32 +14,31 @@ console = Console()
|
|
|
13
14
|
logger = logging.getLogger(__name__)
|
|
14
15
|
|
|
15
16
|
|
|
16
|
-
# def create_planner_agent(model, tools, mcp_servers) -> Agent:
|
|
17
|
-
# """Create the planner agent."""
|
|
18
|
-
# return Agent(
|
|
19
|
-
# name="Planner",
|
|
20
|
-
# instructions=f"{KODER_SYSTEM_PROMPT}\nReturn numbered list or 'no planning needed'.",
|
|
21
|
-
# tools=tools,
|
|
22
|
-
# mcp_servers=mcp_servers,
|
|
23
|
-
# model=model,
|
|
24
|
-
# handoffs=[],
|
|
25
|
-
# )
|
|
26
|
-
|
|
27
|
-
|
|
28
17
|
async def create_dev_agent(tools) -> Agent:
|
|
29
18
|
"""Create the main development agent with MCP servers."""
|
|
30
19
|
# Get the appropriate model based on environment
|
|
31
20
|
model = get_model_name()
|
|
32
21
|
mcp_servers = await load_mcp_servers()
|
|
33
|
-
# planner = create_planner_agent(model, tools, mcp_servers)
|
|
34
22
|
|
|
35
23
|
dev_agent = Agent(
|
|
36
24
|
name="Koder",
|
|
37
25
|
model=model,
|
|
38
26
|
instructions=KODER_SYSTEM_PROMPT,
|
|
39
27
|
tools=tools,
|
|
40
|
-
# handoffs=[planner],
|
|
41
28
|
mcp_servers=mcp_servers,
|
|
42
29
|
)
|
|
30
|
+
|
|
31
|
+
if "github_copilot" in model:
|
|
32
|
+
dev_agent.model_settings.extra_headers = {
|
|
33
|
+
"copilot-integration-id": "vscode-chat",
|
|
34
|
+
"editor-version": "vscode/1.98.1",
|
|
35
|
+
"editor-plugin-version": "copilot-chat/0.26.7",
|
|
36
|
+
"user-agent": "GitHubCopilotChat/0.26.7",
|
|
37
|
+
"openai-intent": "conversation-panel",
|
|
38
|
+
"x-github-api-version": "2025-04-01",
|
|
39
|
+
"x-request-id": str(uuid.uuid4()),
|
|
40
|
+
"x-vscode-user-agent-library-version": "electron-fetch",
|
|
41
|
+
}
|
|
42
|
+
|
|
43
43
|
# planner.handoffs.append(dev_agent)
|
|
44
44
|
return dev_agent
|
|
@@ -51,9 +51,7 @@ async def main():
|
|
|
51
51
|
|
|
52
52
|
# Add root-level options (from old chat command)
|
|
53
53
|
parser.add_argument("--session", "-s", default="default", help="Session ID for context")
|
|
54
|
-
parser.add_argument(
|
|
55
|
-
"--stream", action="store_true", help="Enable streaming mode for real-time output"
|
|
56
|
-
)
|
|
54
|
+
parser.add_argument("--no-stream", action="store_true", help="Disable streaming mode")
|
|
57
55
|
|
|
58
56
|
# Create subparsers for specific commands
|
|
59
57
|
subparsers = parser.add_subparsers(dest="command", help="Available commands")
|
|
@@ -133,18 +131,13 @@ async def main():
|
|
|
133
131
|
|
|
134
132
|
# Load context for chat mode
|
|
135
133
|
context = await load_context()
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
"[dim]Type 'exit' or 'quit' to stop, Ctrl+C to interrupt[/dim]",
|
|
141
|
-
title="Koder",
|
|
142
|
-
border_style="cyan",
|
|
143
|
-
)
|
|
144
|
-
)
|
|
134
|
+
# Simple startup message
|
|
135
|
+
console.print(f"[dim]koder session: {args.session}[/dim]")
|
|
136
|
+
console.print(f"[dim]working in: {os.getcwd()}[/dim]")
|
|
137
|
+
print()
|
|
145
138
|
|
|
146
139
|
# Create scheduler
|
|
147
|
-
scheduler = AgentScheduler(session_id=args.session, streaming=args.
|
|
140
|
+
scheduler = AgentScheduler(session_id=args.session, streaming=not args.no_stream)
|
|
148
141
|
|
|
149
142
|
try:
|
|
150
143
|
# Create interactive prompt with slash commands
|
|
@@ -94,7 +94,7 @@ class StatusCommand(SlashCommand):
|
|
|
94
94
|
tool_count = len(tools)
|
|
95
95
|
|
|
96
96
|
# Create status table
|
|
97
|
-
table = Table(title="
|
|
97
|
+
table = Table(title="Koder Status", show_header=True, header_style="bold cyan")
|
|
98
98
|
table.add_column("Setting", style="cyan", width=20)
|
|
99
99
|
table.add_column("Value", style="green")
|
|
100
100
|
|
|
@@ -150,7 +150,7 @@ class McpCommand(SlashCommand):
|
|
|
150
150
|
return "No MCP servers configured. Use 'koder mcp add' to add servers."
|
|
151
151
|
|
|
152
152
|
# Create simple table for display
|
|
153
|
-
table = Table(title="
|
|
153
|
+
table = Table(title="MCP Servers", show_header=True, header_style="bold cyan")
|
|
154
154
|
table.add_column("Name", style="cyan", width=20)
|
|
155
155
|
table.add_column("Type", style="green", width=10)
|
|
156
156
|
table.add_column("Configuration", style="white")
|
|
@@ -109,17 +109,18 @@ class InteractivePrompt:
|
|
|
109
109
|
input_processors=[BeforeInput("> ")],
|
|
110
110
|
)
|
|
111
111
|
|
|
112
|
-
# Create input window
|
|
112
|
+
# Create input window with dynamic height
|
|
113
113
|
input_window = Window(
|
|
114
114
|
content=buffer_control,
|
|
115
|
-
height=1,
|
|
116
|
-
wrap_lines=False,
|
|
115
|
+
height=Dimension(min=1, max=10), # Allow 1-10 lines, auto-expand
|
|
116
|
+
wrap_lines=False, # Keep single line behavior, expand vertically instead
|
|
117
|
+
dont_extend_height=True,
|
|
117
118
|
)
|
|
118
119
|
|
|
119
|
-
# Create frame
|
|
120
|
+
# Create simple frame without heavy styling
|
|
120
121
|
framed_input = Frame(
|
|
121
122
|
body=input_window,
|
|
122
|
-
title=f"
|
|
123
|
+
title=f"{prompt_text}",
|
|
123
124
|
)
|
|
124
125
|
|
|
125
126
|
# Key bindings
|
|
@@ -127,19 +128,23 @@ class InteractivePrompt:
|
|
|
127
128
|
|
|
128
129
|
@kb.add("enter")
|
|
129
130
|
def accept_input(event):
|
|
131
|
+
# Submit the input
|
|
130
132
|
event.app.exit(result=buffer.text)
|
|
131
133
|
|
|
134
|
+
@kb.add("c-j") # For Ctrl+Enter in many terminals
|
|
135
|
+
@kb.add("escape", "enter") # For Alt+Enter as a more compatible option
|
|
136
|
+
def insert_newline(event):
|
|
137
|
+
# Insert a newline for multi-line input
|
|
138
|
+
event.app.current_buffer.insert_text("\n")
|
|
139
|
+
|
|
132
140
|
@kb.add("c-c")
|
|
133
141
|
def cancel_input(event):
|
|
134
142
|
event.app.exit(exception=KeyboardInterrupt())
|
|
135
143
|
|
|
136
144
|
@kb.add("c-d")
|
|
137
|
-
def
|
|
138
|
-
#
|
|
139
|
-
|
|
140
|
-
event.app.exit(exception=EOFError())
|
|
141
|
-
else:
|
|
142
|
-
event.app.exit(result=buffer.text)
|
|
145
|
+
def clear_input(event):
|
|
146
|
+
# Clear the input content
|
|
147
|
+
event.app.current_buffer.text = ""
|
|
143
148
|
|
|
144
149
|
# Add Tab key for completion navigation
|
|
145
150
|
@kb.add("tab")
|
|
@@ -200,16 +205,16 @@ class InteractivePrompt:
|
|
|
200
205
|
)
|
|
201
206
|
)
|
|
202
207
|
|
|
203
|
-
#
|
|
208
|
+
# Minimal style for clean terminal look
|
|
204
209
|
style = Style.from_dict(
|
|
205
210
|
{
|
|
206
|
-
"frame.border": "#
|
|
207
|
-
"frame.title": "#
|
|
208
|
-
"": "#
|
|
209
|
-
"completion-menu.completion": "#ffffff bg:#
|
|
210
|
-
"completion-menu.completion.current": "#ffffff bg:#
|
|
211
|
-
"completion-menu.meta.completion": "#aaaaaa bg:#
|
|
212
|
-
"completion-menu.meta.completion.current": "#ffffff bg:#
|
|
211
|
+
"frame.border": "#555555", # Subtle gray border
|
|
212
|
+
"frame.title": "#888888", # Muted title
|
|
213
|
+
"": "#ffffff", # Normal white text for input
|
|
214
|
+
"completion-menu.completion": "#ffffff bg:#333333", # Clean completion items
|
|
215
|
+
"completion-menu.completion.current": "#ffffff bg:#555555", # Selected completion
|
|
216
|
+
"completion-menu.meta.completion": "#aaaaaa bg:#222222", # Muted description
|
|
217
|
+
"completion-menu.meta.completion.current": "#ffffff bg:#444444", # Selected desc
|
|
213
218
|
}
|
|
214
219
|
)
|
|
215
220
|
|