pocketcoder-a1 0.1.0__tar.gz → 0.2.4__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.
- {pocketcoder_a1-0.1.0 → pocketcoder_a1-0.2.4}/PKG-INFO +2 -4
- {pocketcoder_a1-0.1.0 → pocketcoder_a1-0.2.4}/a1/__init__.py +1 -1
- {pocketcoder_a1-0.1.0 → pocketcoder_a1-0.2.4}/a1/checkpoint.py +27 -0
- {pocketcoder_a1-0.1.0 → pocketcoder_a1-0.2.4}/a1/cli.py +28 -9
- {pocketcoder_a1-0.1.0 → pocketcoder_a1-0.2.4}/a1/dashboard.py +1152 -250
- {pocketcoder_a1-0.1.0 → pocketcoder_a1-0.2.4}/a1/loop.py +96 -28
- {pocketcoder_a1-0.1.0 → pocketcoder_a1-0.2.4}/a1/tasks.py +33 -8
- {pocketcoder_a1-0.1.0 → pocketcoder_a1-0.2.4}/pocketcoder_a1.egg-info/PKG-INFO +2 -4
- {pocketcoder_a1-0.1.0 → pocketcoder_a1-0.2.4}/pyproject.toml +1 -2
- {pocketcoder_a1-0.1.0 → pocketcoder_a1-0.2.4}/LICENSE +0 -0
- {pocketcoder_a1-0.1.0 → pocketcoder_a1-0.2.4}/README.md +0 -0
- {pocketcoder_a1-0.1.0 → pocketcoder_a1-0.2.4}/a1/config.py +0 -0
- {pocketcoder_a1-0.1.0 → pocketcoder_a1-0.2.4}/a1/tester/__init__.py +0 -0
- {pocketcoder_a1-0.1.0 → pocketcoder_a1-0.2.4}/a1/tester/analyzer.py +0 -0
- {pocketcoder_a1-0.1.0 → pocketcoder_a1-0.2.4}/a1/tester/browser.py +0 -0
- {pocketcoder_a1-0.1.0 → pocketcoder_a1-0.2.4}/a1/tester/report.py +0 -0
- {pocketcoder_a1-0.1.0 → pocketcoder_a1-0.2.4}/a1/tester/runner.py +0 -0
- {pocketcoder_a1-0.1.0 → pocketcoder_a1-0.2.4}/a1/tester/scenarios.py +0 -0
- {pocketcoder_a1-0.1.0 → pocketcoder_a1-0.2.4}/a1/validator.py +0 -0
- {pocketcoder_a1-0.1.0 → pocketcoder_a1-0.2.4}/pocketcoder_a1.egg-info/SOURCES.txt +0 -0
- {pocketcoder_a1-0.1.0 → pocketcoder_a1-0.2.4}/pocketcoder_a1.egg-info/dependency_links.txt +0 -0
- {pocketcoder_a1-0.1.0 → pocketcoder_a1-0.2.4}/pocketcoder_a1.egg-info/entry_points.txt +0 -0
- {pocketcoder_a1-0.1.0 → pocketcoder_a1-0.2.4}/pocketcoder_a1.egg-info/requires.txt +0 -0
- {pocketcoder_a1-0.1.0 → pocketcoder_a1-0.2.4}/pocketcoder_a1.egg-info/top_level.txt +0 -0
- {pocketcoder_a1-0.1.0 → pocketcoder_a1-0.2.4}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
2
|
Name: pocketcoder-a1
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.4
|
|
4
4
|
Summary: Autonomous Coding Agent — The Autonomous Gnome
|
|
5
5
|
Author-email: Dmitry Chashchin <chashchin.dmitry@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -10,7 +10,6 @@ Keywords: ai,coding,agent,autonomous,claude,llm
|
|
|
10
10
|
Classifier: Development Status :: 3 - Alpha
|
|
11
11
|
Classifier: Environment :: Console
|
|
12
12
|
Classifier: Intended Audience :: Developers
|
|
13
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
14
13
|
Classifier: Operating System :: OS Independent
|
|
15
14
|
Classifier: Programming Language :: Python :: 3
|
|
16
15
|
Classifier: Programming Language :: Python :: 3.8
|
|
@@ -32,7 +31,6 @@ Provides-Extra: ollama
|
|
|
32
31
|
Requires-Dist: ollama>=0.1; extra == "ollama"
|
|
33
32
|
Provides-Extra: test
|
|
34
33
|
Requires-Dist: playwright>=1.40; extra == "test"
|
|
35
|
-
Dynamic: license-file
|
|
36
34
|
|
|
37
35
|
# PocketCoder-A1
|
|
38
36
|
|
|
@@ -143,4 +143,31 @@ class CheckpointManager:
|
|
|
143
143
|
for s in cp["next_steps"]:
|
|
144
144
|
lines.append(f" - {s}")
|
|
145
145
|
|
|
146
|
+
# Session history — what was done in previous sessions
|
|
147
|
+
# Include as many recent sessions as fit in ~8000 chars
|
|
148
|
+
history = cp.get("session_history", [])
|
|
149
|
+
if history:
|
|
150
|
+
lines.append("")
|
|
151
|
+
lines.append("## Previous Sessions (DO NOT repeat this work):")
|
|
152
|
+
history_lines = []
|
|
153
|
+
total_chars = 0
|
|
154
|
+
for h in reversed(history):
|
|
155
|
+
sn = h.get("session", "?")
|
|
156
|
+
edits = h.get("edits", [])
|
|
157
|
+
result = h.get("result", "")
|
|
158
|
+
tools = h.get("tools", 0)
|
|
159
|
+
dur = h.get("duration", 0)
|
|
160
|
+
entry = [f" Session #{sn} ({dur}s, {tools} tools):"]
|
|
161
|
+
if edits:
|
|
162
|
+
entry.append(f" Files edited: {', '.join(edits[:10])}")
|
|
163
|
+
if result:
|
|
164
|
+
entry.append(f" Result: {result[:200]}")
|
|
165
|
+
entry_text = "\n".join(entry)
|
|
166
|
+
if total_chars + len(entry_text) > 8000:
|
|
167
|
+
break
|
|
168
|
+
history_lines.insert(0, entry_text)
|
|
169
|
+
total_chars += len(entry_text)
|
|
170
|
+
for hl in history_lines:
|
|
171
|
+
lines.append(hl)
|
|
172
|
+
|
|
146
173
|
return "\n".join(lines)
|
|
@@ -93,15 +93,33 @@ def cmd_start(args):
|
|
|
93
93
|
print(f"[ERROR] A1 not initialized. Run: pca init {project_dir}")
|
|
94
94
|
return 1
|
|
95
95
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
96
|
+
single_task_id = getattr(args, "task", None)
|
|
97
|
+
|
|
98
|
+
# Validate single task if specified
|
|
99
|
+
if single_task_id:
|
|
100
|
+
tasks = TaskManager(project_dir)
|
|
101
|
+
all_tasks = tasks.get_tasks()
|
|
102
|
+
task_map = {t.id: t for t in all_tasks}
|
|
103
|
+
if single_task_id not in task_map:
|
|
104
|
+
print(f"[ERROR] Task '{single_task_id}' not found")
|
|
105
|
+
return 1
|
|
106
|
+
t = task_map[single_task_id]
|
|
107
|
+
if t.status == "done":
|
|
108
|
+
print(f"[ERROR] Task '{single_task_id}' is already done")
|
|
109
|
+
return 1
|
|
110
|
+
if t.status == "blocked":
|
|
111
|
+
print(f"[ERROR] Task '{single_task_id}' is blocked: {t.blocked_reason or 'unknown reason'}")
|
|
112
|
+
return 1
|
|
113
|
+
else:
|
|
114
|
+
# Проверяем есть ли задачи
|
|
115
|
+
tasks = TaskManager(project_dir)
|
|
116
|
+
pending = tasks.get_tasks(status="pending")
|
|
117
|
+
in_progress = tasks.get_tasks(status="in_progress")
|
|
100
118
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
119
|
+
if not pending and not in_progress:
|
|
120
|
+
print("[ERROR] No tasks to work on!")
|
|
121
|
+
print(" Add tasks with: pca think 'idea' or pca task add 'task'")
|
|
122
|
+
return 1
|
|
105
123
|
|
|
106
124
|
# Load config and merge with CLI args
|
|
107
125
|
config = Config(project_dir)
|
|
@@ -116,7 +134,7 @@ def cmd_start(args):
|
|
|
116
134
|
"session_delay": getattr(args, "session_delay", None),
|
|
117
135
|
})
|
|
118
136
|
|
|
119
|
-
loop = SessionLoop(project_dir=project_dir, **resolved)
|
|
137
|
+
loop = SessionLoop(project_dir=project_dir, single_task_id=single_task_id, **resolved)
|
|
120
138
|
loop.start()
|
|
121
139
|
|
|
122
140
|
return 0
|
|
@@ -320,6 +338,7 @@ def main():
|
|
|
320
338
|
p_start.add_argument("--ollama-model", help="Ollama model name")
|
|
321
339
|
p_start.add_argument("--max-turns", type=int, help="Max turns per session (default: 25)")
|
|
322
340
|
p_start.add_argument("--session-delay", type=int, help="Delay between sessions in seconds")
|
|
341
|
+
p_start.add_argument("--task", help="Run single task by ID (e.g. task_001)")
|
|
323
342
|
p_start.set_defaults(func=cmd_start)
|
|
324
343
|
|
|
325
344
|
# status
|