mycode-aiagent 0.4.1__tar.gz → 0.4.2__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.
Files changed (27) hide show
  1. {mycode_aiagent-0.4.1 → mycode_aiagent-0.4.2}/PKG-INFO +9 -12
  2. {mycode_aiagent-0.4.1 → mycode_aiagent-0.4.2}/README.md +8 -11
  3. {mycode_aiagent-0.4.1 → mycode_aiagent-0.4.2}/my_code/__init__.py +1 -2
  4. {mycode_aiagent-0.4.1 → mycode_aiagent-0.4.2}/my_code/backends/__init__.py +3 -7
  5. {mycode_aiagent-0.4.1 → mycode_aiagent-0.4.2}/my_code/cli.py +4 -9
  6. {mycode_aiagent-0.4.1 → mycode_aiagent-0.4.2}/mycode_aiagent.egg-info/PKG-INFO +9 -12
  7. {mycode_aiagent-0.4.1 → mycode_aiagent-0.4.2}/mycode_aiagent.egg-info/SOURCES.txt +0 -1
  8. {mycode_aiagent-0.4.1 → mycode_aiagent-0.4.2}/pyproject.toml +1 -1
  9. mycode_aiagent-0.4.1/my_code/backends/ricky_backend.py +0 -15
  10. {mycode_aiagent-0.4.1 → mycode_aiagent-0.4.2}/my_code/__main__.py +0 -0
  11. {mycode_aiagent-0.4.1 → mycode_aiagent-0.4.2}/my_code/analyzer.py +0 -0
  12. {mycode_aiagent-0.4.1 → mycode_aiagent-0.4.2}/my_code/backends/base.py +0 -0
  13. {mycode_aiagent-0.4.1 → mycode_aiagent-0.4.2}/my_code/backends/claude_backend.py +0 -0
  14. {mycode_aiagent-0.4.1 → mycode_aiagent-0.4.2}/my_code/backends/mcp_backend.py +0 -0
  15. {mycode_aiagent-0.4.1 → mycode_aiagent-0.4.2}/my_code/backends/openai_backend.py +0 -0
  16. {mycode_aiagent-0.4.1 → mycode_aiagent-0.4.2}/my_code/generator.py +0 -0
  17. {mycode_aiagent-0.4.1 → mycode_aiagent-0.4.2}/my_code/mcp_client.py +0 -0
  18. {mycode_aiagent-0.4.1 → mycode_aiagent-0.4.2}/my_code/server.py +0 -0
  19. {mycode_aiagent-0.4.1 → mycode_aiagent-0.4.2}/my_code/utils/__init__.py +0 -0
  20. {mycode_aiagent-0.4.1 → mycode_aiagent-0.4.2}/my_code/utils/prompts.py +0 -0
  21. {mycode_aiagent-0.4.1 → mycode_aiagent-0.4.2}/mycode_aiagent.egg-info/dependency_links.txt +0 -0
  22. {mycode_aiagent-0.4.1 → mycode_aiagent-0.4.2}/mycode_aiagent.egg-info/entry_points.txt +0 -0
  23. {mycode_aiagent-0.4.1 → mycode_aiagent-0.4.2}/mycode_aiagent.egg-info/requires.txt +0 -0
  24. {mycode_aiagent-0.4.1 → mycode_aiagent-0.4.2}/mycode_aiagent.egg-info/top_level.txt +0 -0
  25. {mycode_aiagent-0.4.1 → mycode_aiagent-0.4.2}/setup.cfg +0 -0
  26. {mycode_aiagent-0.4.1 → mycode_aiagent-0.4.2}/tests/test_library.py +0 -0
  27. {mycode_aiagent-0.4.1 → mycode_aiagent-0.4.2}/tests/test_server.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mycode-aiagent
3
- Version: 0.4.1
3
+ Version: 0.4.2
4
4
  Summary: Style-aware code generation — analyze any codebase and generate new code that matches its style
5
5
  License: MIT
6
6
  Project-URL: Homepage, https://github.com/RyanAbbottData/MyCode
@@ -90,16 +90,15 @@ MyCode delegates inference to a pluggable backend. Choose one based on what you
90
90
 
91
91
  | Backend | Flag | Requirement |
92
92
  |---|---|---|
93
- | Local LLM | `--backend llama` (default) | MCP server running at `localhost:8000` |
94
- | Anthropic Claude | `--backend claude` | `ANTHROPIC_API_KEY` env var or `--api-key` |
93
+ | Anthropic Claude | `--backend claude` (default) | `ANTHROPIC_API_KEY` env var or `--api-key` |
95
94
  | OpenAI | `--backend openai` | `OPENAI_API_KEY` env var or `--api-key` |
96
- | MyCode server | `--backend mcp` | A running MyCode MCP server at `--mcp-url` |
95
+ | Any MCP server | `--backend mcp` | An MCP server at `--mcp-url` (MyCode server or local LLM wrapper) |
97
96
 
98
97
  When `--backend mcp` is used with `analyze` or `generate`, the CLI delegates the entire operation to the running MyCode server — it calls the server's `analyze_codebase` or `generate_code` tool directly instead of running the pipeline locally. This is the recommended way to use MyCode in a multi-project or agentic setup.
99
98
 
100
99
  ### Setting up a local LLM
101
100
 
102
- The `llama` backend expects an MCP server at `http://localhost:8000/mcp` that exposes two tools: one for code generation and one for analysis. Any MCP-compatible wrapper around a local model will work. Here is a recommended setup using [llama.cpp](https://github.com/ggerganov/llama.cpp):
101
+ The `mcp` backend can connect to any MCP server, including a local LLM wrapper. The server must expose two tools: one for code generation and one for analysis (tool name must contain `"analyze"`). Here is a recommended setup using [llama.cpp](https://github.com/ggerganov/llama.cpp):
103
102
 
104
103
  **1. Download a model**
105
104
 
@@ -126,7 +125,7 @@ python -m llama_cpp.server \
126
125
 
127
126
  **3. Wrap it with an MCP server**
128
127
 
129
- The `llama` backend communicates over MCP, not directly with the llama.cpp HTTP API. You need a thin MCP wrapper that exposes two tools:
128
+ The `mcp` backend communicates over MCP, not directly with the llama.cpp HTTP API. You need a thin MCP wrapper that exposes two tools:
130
129
  - A **code generation tool** (name must not contain `"analyze"`)
131
130
  - An **analysis tool** (name must contain `"analyze"`)
132
131
 
@@ -168,13 +167,13 @@ python llm_mcp_server.py
168
167
  **4. Point MyCode at it**
169
168
 
170
169
  ```bash
171
- my-code --backend llama --ricky-url http://localhost:8000/mcp analyze .
170
+ my-code --backend mcp --mcp-url http://localhost:8000/mcp analyze .
172
171
  ```
173
172
 
174
173
  Or set a custom URL if your server runs on a different port:
175
174
 
176
175
  ```bash
177
- my-code --backend llama --ricky-url http://localhost:9000/mcp analyze .
176
+ my-code --backend mcp --mcp-url http://localhost:9000/mcp analyze .
178
177
  ```
179
178
 
180
179
  ---
@@ -240,11 +239,10 @@ my-code --backend mcp --mcp-url http://localhost:8000/mcp generate "write a rate
240
239
  my-code [OPTIONS] COMMAND
241
240
 
242
241
  Options:
243
- --backend {llama,claude,openai,mcp} AI backend to use (default: llama)
242
+ --backend {claude,openai,mcp} AI backend to use (default: claude)
244
243
  --api-key TEXT API key for claude/openai backends
245
244
  --model TEXT Override the default model
246
- --ricky-url TEXT Local LLM MCP server URL (default: http://localhost:8000/mcp)
247
- --mcp-url TEXT Custom MCP server URL (default: http://localhost:8001/mcp)
245
+ --mcp-url TEXT MCP server URL (default: http://localhost:8001/mcp)
248
246
  --profile TEXT Path to style profile JSON (default: style_profile.json)
249
247
 
250
248
  Commands:
@@ -476,7 +474,6 @@ my_code/
476
474
  ├── cli.py # CLI entry point (my-code command)
477
475
  ├── backends/
478
476
  │ ├── base.py # AIBackend abstract base class
479
- │ ├── ricky_backend.py # Local LLM backend (connects via MCP)
480
477
  │ ├── claude_backend.py
481
478
  │ ├── openai_backend.py
482
479
  │ └── mcp_backend.py # Generic MCP server backend
@@ -61,16 +61,15 @@ MyCode delegates inference to a pluggable backend. Choose one based on what you
61
61
 
62
62
  | Backend | Flag | Requirement |
63
63
  |---|---|---|
64
- | Local LLM | `--backend llama` (default) | MCP server running at `localhost:8000` |
65
- | Anthropic Claude | `--backend claude` | `ANTHROPIC_API_KEY` env var or `--api-key` |
64
+ | Anthropic Claude | `--backend claude` (default) | `ANTHROPIC_API_KEY` env var or `--api-key` |
66
65
  | OpenAI | `--backend openai` | `OPENAI_API_KEY` env var or `--api-key` |
67
- | MyCode server | `--backend mcp` | A running MyCode MCP server at `--mcp-url` |
66
+ | Any MCP server | `--backend mcp` | An MCP server at `--mcp-url` (MyCode server or local LLM wrapper) |
68
67
 
69
68
  When `--backend mcp` is used with `analyze` or `generate`, the CLI delegates the entire operation to the running MyCode server — it calls the server's `analyze_codebase` or `generate_code` tool directly instead of running the pipeline locally. This is the recommended way to use MyCode in a multi-project or agentic setup.
70
69
 
71
70
  ### Setting up a local LLM
72
71
 
73
- The `llama` backend expects an MCP server at `http://localhost:8000/mcp` that exposes two tools: one for code generation and one for analysis. Any MCP-compatible wrapper around a local model will work. Here is a recommended setup using [llama.cpp](https://github.com/ggerganov/llama.cpp):
72
+ The `mcp` backend can connect to any MCP server, including a local LLM wrapper. The server must expose two tools: one for code generation and one for analysis (tool name must contain `"analyze"`). Here is a recommended setup using [llama.cpp](https://github.com/ggerganov/llama.cpp):
74
73
 
75
74
  **1. Download a model**
76
75
 
@@ -97,7 +96,7 @@ python -m llama_cpp.server \
97
96
 
98
97
  **3. Wrap it with an MCP server**
99
98
 
100
- The `llama` backend communicates over MCP, not directly with the llama.cpp HTTP API. You need a thin MCP wrapper that exposes two tools:
99
+ The `mcp` backend communicates over MCP, not directly with the llama.cpp HTTP API. You need a thin MCP wrapper that exposes two tools:
101
100
  - A **code generation tool** (name must not contain `"analyze"`)
102
101
  - An **analysis tool** (name must contain `"analyze"`)
103
102
 
@@ -139,13 +138,13 @@ python llm_mcp_server.py
139
138
  **4. Point MyCode at it**
140
139
 
141
140
  ```bash
142
- my-code --backend llama --ricky-url http://localhost:8000/mcp analyze .
141
+ my-code --backend mcp --mcp-url http://localhost:8000/mcp analyze .
143
142
  ```
144
143
 
145
144
  Or set a custom URL if your server runs on a different port:
146
145
 
147
146
  ```bash
148
- my-code --backend llama --ricky-url http://localhost:9000/mcp analyze .
147
+ my-code --backend mcp --mcp-url http://localhost:9000/mcp analyze .
149
148
  ```
150
149
 
151
150
  ---
@@ -211,11 +210,10 @@ my-code --backend mcp --mcp-url http://localhost:8000/mcp generate "write a rate
211
210
  my-code [OPTIONS] COMMAND
212
211
 
213
212
  Options:
214
- --backend {llama,claude,openai,mcp} AI backend to use (default: llama)
213
+ --backend {claude,openai,mcp} AI backend to use (default: claude)
215
214
  --api-key TEXT API key for claude/openai backends
216
215
  --model TEXT Override the default model
217
- --ricky-url TEXT Local LLM MCP server URL (default: http://localhost:8000/mcp)
218
- --mcp-url TEXT Custom MCP server URL (default: http://localhost:8001/mcp)
216
+ --mcp-url TEXT MCP server URL (default: http://localhost:8001/mcp)
219
217
  --profile TEXT Path to style profile JSON (default: style_profile.json)
220
218
 
221
219
  Commands:
@@ -447,7 +445,6 @@ my_code/
447
445
  ├── cli.py # CLI entry point (my-code command)
448
446
  ├── backends/
449
447
  │ ├── base.py # AIBackend abstract base class
450
- │ ├── ricky_backend.py # Local LLM backend (connects via MCP)
451
448
  │ ├── claude_backend.py
452
449
  │ ├── openai_backend.py
453
450
  │ └── mcp_backend.py # Generic MCP server backend
@@ -2,7 +2,7 @@ __version__ = "0.3.0"
2
2
 
3
3
  from .analyzer import StyleAnalyzer
4
4
  from .generator import generate_code
5
- from .backends import AIBackend, ClaudeBackend, OpenAIBackend, RickyBackend, MCPBackend, make_backend
5
+ from .backends import AIBackend, ClaudeBackend, OpenAIBackend, MCPBackend, make_backend
6
6
  from .server import MCPServer
7
7
 
8
8
 
@@ -17,7 +17,6 @@ __all__ = [
17
17
  "AIBackend",
18
18
  "ClaudeBackend",
19
19
  "OpenAIBackend",
20
- "RickyBackend",
21
20
  "MCPBackend",
22
21
  "make_backend",
23
22
  "MCPServer",
@@ -3,16 +3,14 @@ import os
3
3
  from .base import AIBackend
4
4
  from .claude_backend import ClaudeBackend
5
5
  from .openai_backend import OpenAIBackend
6
- from .ricky_backend import RickyBackend
7
6
  from .mcp_backend import MCPBackend
8
7
 
9
- __all__ = ["AIBackend", "ClaudeBackend", "OpenAIBackend", "RickyBackend", "MCPBackend", "make_backend"]
8
+ __all__ = ["AIBackend", "ClaudeBackend", "OpenAIBackend", "MCPBackend", "make_backend"]
10
9
 
11
10
 
12
11
  def make_backend(
13
- backend: str = "llama",
12
+ backend: str = "claude",
14
13
  api_key: str | None = None,
15
- ricky_url: str = "http://localhost:8000/mcp",
16
14
  mcp_url: str = "http://localhost:8001/mcp",
17
15
  model: str | None = None,
18
16
  timeout: int = 120,
@@ -29,6 +27,4 @@ def make_backend(
29
27
  return OpenAIBackend(api_key=key, **{"model": model} if model else {})
30
28
  if backend == "mcp":
31
29
  return MCPBackend(url=mcp_url, timeout=timeout)
32
- if backend == "llama":
33
- return RickyBackend(url=ricky_url, timeout=timeout)
34
- raise ValueError(f"Unknown backend {backend!r}. Choose: llama, claude, openai, mcp")
30
+ raise ValueError(f"Unknown backend {backend!r}. Choose: claude, openai, mcp")
@@ -2,8 +2,8 @@
2
2
  Style-aware code generation agent.
3
3
 
4
4
  Usage:
5
- my-code [--backend llama|claude|openai] analyze <dir>
6
- my-code [--backend llama|claude|openai] --api-key <key> generate "<task>"
5
+ my-code [--backend claude|openai|mcp] analyze <dir>
6
+ my-code [--backend claude|openai|mcp] --api-key <key> generate "<task>"
7
7
  """
8
8
 
9
9
  import argparse
@@ -38,7 +38,6 @@ def cmd_analyze(args):
38
38
  backend = make_backend(
39
39
  backend=args.backend,
40
40
  api_key=args.api_key,
41
- ricky_url=args.ricky_url,
42
41
  mcp_url=args.mcp_url,
43
42
  model=args.model,
44
43
  timeout=args.timeout,
@@ -70,7 +69,6 @@ def cmd_generate(args):
70
69
  backend = make_backend(
71
70
  backend=args.backend,
72
71
  api_key=args.api_key,
73
- ricky_url=args.ricky_url,
74
72
  mcp_url=args.mcp_url,
75
73
  model=args.model,
76
74
  timeout=args.timeout,
@@ -87,7 +85,6 @@ def _spawn_daemon(args):
87
85
  cmd = [
88
86
  sys.executable, "-m", "my_code",
89
87
  "--backend", args.backend,
90
- "--ricky-url", args.ricky_url,
91
88
  "--mcp-url", args.mcp_url,
92
89
  "--timeout", str(args.timeout),
93
90
  "--profile", args.profile,
@@ -127,7 +124,6 @@ def cmd_serve(args):
127
124
  backend = make_backend(
128
125
  backend=args.backend,
129
126
  api_key=args.api_key,
130
- ricky_url=args.ricky_url,
131
127
  mcp_url=args.mcp_url,
132
128
  model=args.model,
133
129
  timeout=args.timeout,
@@ -138,12 +134,11 @@ def cmd_serve(args):
138
134
  def main():
139
135
  parser = argparse.ArgumentParser(description="Style-aware code agent")
140
136
  parser.add_argument(
141
- "--backend", default="llama", choices=["llama", "claude", "openai", "mcp"],
142
- help="AI backend to use (default: llama)",
137
+ "--backend", default="claude", choices=["claude", "openai", "mcp"],
138
+ help="AI backend to use (default: claude)",
143
139
  )
144
140
  parser.add_argument("--api-key", default=None, help="API key (claude/openai); falls back to env var")
145
141
  parser.add_argument("--model", default=None, help="Override default model for claude/openai backends")
146
- parser.add_argument("--ricky-url", default="http://localhost:8000/mcp", help="Ricky MCP server URL (llama backend)")
147
142
  parser.add_argument("--mcp-url", default="http://localhost:8001/mcp", help="MCP server URL (mcp backend)")
148
143
  parser.add_argument("--timeout", type=int, default=120, help="Request timeout in seconds (default: 120)")
149
144
  parser.add_argument("--profile", default=str(DEFAULT_PROFILE))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mycode-aiagent
3
- Version: 0.4.1
3
+ Version: 0.4.2
4
4
  Summary: Style-aware code generation — analyze any codebase and generate new code that matches its style
5
5
  License: MIT
6
6
  Project-URL: Homepage, https://github.com/RyanAbbottData/MyCode
@@ -90,16 +90,15 @@ MyCode delegates inference to a pluggable backend. Choose one based on what you
90
90
 
91
91
  | Backend | Flag | Requirement |
92
92
  |---|---|---|
93
- | Local LLM | `--backend llama` (default) | MCP server running at `localhost:8000` |
94
- | Anthropic Claude | `--backend claude` | `ANTHROPIC_API_KEY` env var or `--api-key` |
93
+ | Anthropic Claude | `--backend claude` (default) | `ANTHROPIC_API_KEY` env var or `--api-key` |
95
94
  | OpenAI | `--backend openai` | `OPENAI_API_KEY` env var or `--api-key` |
96
- | MyCode server | `--backend mcp` | A running MyCode MCP server at `--mcp-url` |
95
+ | Any MCP server | `--backend mcp` | An MCP server at `--mcp-url` (MyCode server or local LLM wrapper) |
97
96
 
98
97
  When `--backend mcp` is used with `analyze` or `generate`, the CLI delegates the entire operation to the running MyCode server — it calls the server's `analyze_codebase` or `generate_code` tool directly instead of running the pipeline locally. This is the recommended way to use MyCode in a multi-project or agentic setup.
99
98
 
100
99
  ### Setting up a local LLM
101
100
 
102
- The `llama` backend expects an MCP server at `http://localhost:8000/mcp` that exposes two tools: one for code generation and one for analysis. Any MCP-compatible wrapper around a local model will work. Here is a recommended setup using [llama.cpp](https://github.com/ggerganov/llama.cpp):
101
+ The `mcp` backend can connect to any MCP server, including a local LLM wrapper. The server must expose two tools: one for code generation and one for analysis (tool name must contain `"analyze"`). Here is a recommended setup using [llama.cpp](https://github.com/ggerganov/llama.cpp):
103
102
 
104
103
  **1. Download a model**
105
104
 
@@ -126,7 +125,7 @@ python -m llama_cpp.server \
126
125
 
127
126
  **3. Wrap it with an MCP server**
128
127
 
129
- The `llama` backend communicates over MCP, not directly with the llama.cpp HTTP API. You need a thin MCP wrapper that exposes two tools:
128
+ The `mcp` backend communicates over MCP, not directly with the llama.cpp HTTP API. You need a thin MCP wrapper that exposes two tools:
130
129
  - A **code generation tool** (name must not contain `"analyze"`)
131
130
  - An **analysis tool** (name must contain `"analyze"`)
132
131
 
@@ -168,13 +167,13 @@ python llm_mcp_server.py
168
167
  **4. Point MyCode at it**
169
168
 
170
169
  ```bash
171
- my-code --backend llama --ricky-url http://localhost:8000/mcp analyze .
170
+ my-code --backend mcp --mcp-url http://localhost:8000/mcp analyze .
172
171
  ```
173
172
 
174
173
  Or set a custom URL if your server runs on a different port:
175
174
 
176
175
  ```bash
177
- my-code --backend llama --ricky-url http://localhost:9000/mcp analyze .
176
+ my-code --backend mcp --mcp-url http://localhost:9000/mcp analyze .
178
177
  ```
179
178
 
180
179
  ---
@@ -240,11 +239,10 @@ my-code --backend mcp --mcp-url http://localhost:8000/mcp generate "write a rate
240
239
  my-code [OPTIONS] COMMAND
241
240
 
242
241
  Options:
243
- --backend {llama,claude,openai,mcp} AI backend to use (default: llama)
242
+ --backend {claude,openai,mcp} AI backend to use (default: claude)
244
243
  --api-key TEXT API key for claude/openai backends
245
244
  --model TEXT Override the default model
246
- --ricky-url TEXT Local LLM MCP server URL (default: http://localhost:8000/mcp)
247
- --mcp-url TEXT Custom MCP server URL (default: http://localhost:8001/mcp)
245
+ --mcp-url TEXT MCP server URL (default: http://localhost:8001/mcp)
248
246
  --profile TEXT Path to style profile JSON (default: style_profile.json)
249
247
 
250
248
  Commands:
@@ -476,7 +474,6 @@ my_code/
476
474
  ├── cli.py # CLI entry point (my-code command)
477
475
  ├── backends/
478
476
  │ ├── base.py # AIBackend abstract base class
479
- │ ├── ricky_backend.py # Local LLM backend (connects via MCP)
480
477
  │ ├── claude_backend.py
481
478
  │ ├── openai_backend.py
482
479
  │ └── mcp_backend.py # Generic MCP server backend
@@ -12,7 +12,6 @@ my_code/backends/base.py
12
12
  my_code/backends/claude_backend.py
13
13
  my_code/backends/mcp_backend.py
14
14
  my_code/backends/openai_backend.py
15
- my_code/backends/ricky_backend.py
16
15
  my_code/utils/__init__.py
17
16
  my_code/utils/prompts.py
18
17
  mycode_aiagent.egg-info/PKG-INFO
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "mycode-aiagent"
7
- version = "0.4.1"
7
+ version = "0.4.2"
8
8
  description = "Style-aware code generation — analyze any codebase and generate new code that matches its style"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -1,15 +0,0 @@
1
- from .base import AIBackend
2
- from ..mcp_client import MCPClient
3
-
4
-
5
- class RickyBackend(AIBackend):
6
- max_file_chars: int = 1500
7
-
8
- def __init__(self, url: str = "http://localhost:8000/mcp", timeout: int = 120):
9
- self._client = MCPClient(url=url, timeout=timeout)
10
-
11
- def ask_for_code(self, prompt: str) -> str:
12
- return self._client.ask_for_code(prompt)
13
-
14
- def ask_to_analyze(self, prompt: str) -> str:
15
- return self._client.ask_to_analyze(prompt)
File without changes