gemcode 0.3.43__tar.gz → 0.3.44__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.
- {gemcode-0.3.43/src/gemcode.egg-info → gemcode-0.3.44}/PKG-INFO +1 -1
- {gemcode-0.3.43 → gemcode-0.3.44}/pyproject.toml +1 -1
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/agent.py +4 -1
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/session_runtime.py +73 -1
- {gemcode-0.3.43 → gemcode-0.3.44/src/gemcode.egg-info}/PKG-INFO +1 -1
- {gemcode-0.3.43 → gemcode-0.3.44}/LICENSE +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/MANIFEST.in +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/README.md +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/setup.cfg +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/__init__.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/__main__.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/audit.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/autocompact.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/callbacks.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/capability_routing.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/cli.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/compaction.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/computer_use/__init__.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/computer_use/browser_computer.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/config.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/context_budget.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/context_warning.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/credentials.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/hitl_session.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/hooks.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/intent_classifier.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/interactions.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/invoke.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/kairos_daemon.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/limits.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/live_audio_engine.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/logging_config.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/mcp_loader.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/memory/__init__.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/memory/embedding_memory_service.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/memory/file_memory_service.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/modality_tools.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/model_errors.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/model_routing.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/openapi_loader.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/paths.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/permissions.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/plugins/__init__.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/plugins/terminal_hooks_plugin.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/plugins/tool_recovery_plugin.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/pricing.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/prompt_suggestions.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/query/__init__.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/query/config.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/query/deps.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/query/engine.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/query/stop_hooks.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/query/token_budget.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/query/transitions.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/refine.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/repl_commands.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/repl_slash.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/review_agent.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/session_store.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/slash_commands.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/thinking.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/tool_prompt_manifest.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/tool_registry.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/tools/__init__.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/tools/bash.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/tools/browser.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/tools/edit.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/tools/filesystem.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/tools/notes.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/tools/search.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/tools/shell.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/tools/shell_gate.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/tools/subtask.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/tools/think.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/tools/todo.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/tools/web.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/tools_inspector.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/trust.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/tui/input_handler.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/tui/scrollback.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/tui/spinner.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/tui/welcome_banner.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/tui/welcome_rich.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/version.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/vertex.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/web/__init__.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/web/claude_sse_adapter.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/web/terminal_repl.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode/workspace_hints.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode.egg-info/SOURCES.txt +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode.egg-info/dependency_links.txt +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode.egg-info/entry_points.txt +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode.egg-info/requires.txt +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/src/gemcode.egg-info/top_level.txt +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/tests/test_agent_instruction.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/tests/test_autocompact.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/tests/test_capability_routing.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/tests/test_claude_web_adapter_sse.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/tests/test_cli_init.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/tests/test_computer_use_permissions.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/tests/test_context_budget.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/tests/test_context_warning.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/tests/test_credentials.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/tests/test_interactive_permission_ask.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/tests/test_kairos_scheduler.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/tests/test_modality_tools.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/tests/test_model_error_retry.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/tests/test_model_errors.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/tests/test_model_routing.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/tests/test_paths.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/tests/test_permissions.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/tests/test_prompt_suggestions.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/tests/test_repl_commands.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/tests/test_repl_slash.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/tests/test_slash_commands.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/tests/test_thinking_config.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/tests/test_token_budget.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/tests/test_tool_context_circulation.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/tests/test_tools.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/tests/test_tools_inspector.py +0 -0
- {gemcode-0.3.43 → gemcode-0.3.44}/tests/test_workspace_hints.py +0 -0
|
@@ -603,10 +603,13 @@ For tasks where quality matters:
|
|
|
603
603
|
4. Report done only when verified
|
|
604
604
|
|
|
605
605
|
## Error recovery
|
|
606
|
-
- **Test/build failures**: read the full error, identify the exact line, fix, re-run.
|
|
606
|
+
- **Test/build failures**: read the full error, identify the exact line, fix, re-run. Do NOT give up after one attempt.
|
|
607
|
+
- **Frontend / Next.js build errors**: read `src/app/page.tsx` (or the file in the error trace), fix the import/export precisely, then re-run the dev server.
|
|
608
|
+
- **lucide-react icon errors** (`Export X was not found`): The correct icon API for lucide-react ≥0.460 uses `Github` → `Github` is removed; use `GithubIcon` or find the right name by checking `node_modules/lucide-react/dist/esm/lucide-react.js` with `grep_content`. Always verify icon names before writing code.
|
|
607
609
|
- **Tool errors**: diagnose why it failed before retrying — don't repeat the exact same call.
|
|
608
610
|
- **After 2 failed attempts on the same problem**: stop and explain the blocker clearly.
|
|
609
611
|
- **Unexpected file content**: re-read the actual file rather than assuming your mental model is correct.
|
|
612
|
+
- **Compiler / linter errors pasted by the user**: extract the file path and line from the error, read that file, apply the minimal fix, and re-run the check. Never explain without fixing.
|
|
610
613
|
|
|
611
614
|
## Risk and permissions
|
|
612
615
|
- State destructive operations clearly before doing them (deletes, force-push, data truncation).
|
|
@@ -30,6 +30,78 @@ def session_db_path(cfg: GemCodeConfig) -> Path:
|
|
|
30
30
|
return cfg.project_root / ".gemcode" / "sessions.sqlite"
|
|
31
31
|
|
|
32
32
|
|
|
33
|
+
class _SafeComputerUseToolset:
|
|
34
|
+
"""
|
|
35
|
+
Drop-in wrapper around ComputerUseToolset that catches Playwright startup
|
|
36
|
+
failures (e.g. missing browser binary) and disables computer-use gracefully
|
|
37
|
+
for the current session instead of crashing every turn with an unhandled error.
|
|
38
|
+
|
|
39
|
+
When the underlying toolset fails for the *first* time a one-time warning is
|
|
40
|
+
printed to stderr so the user knows they need to run ``playwright install``.
|
|
41
|
+
Subsequent calls are silently no-ops so the session keeps working without
|
|
42
|
+
browser tools — the agent can still use all other tools normally.
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
def __init__(self, computer) -> None:
|
|
46
|
+
try:
|
|
47
|
+
from google.adk.tools.computer_use.computer_use_toolset import ComputerUseToolset
|
|
48
|
+
self._inner = ComputerUseToolset(computer=computer)
|
|
49
|
+
except Exception:
|
|
50
|
+
self._inner = None
|
|
51
|
+
self._broken = False
|
|
52
|
+
self._warned = False
|
|
53
|
+
|
|
54
|
+
def _warn_once(self, error: Exception) -> None:
|
|
55
|
+
if self._warned:
|
|
56
|
+
return
|
|
57
|
+
self._warned = True
|
|
58
|
+
import sys
|
|
59
|
+
msg = str(error)
|
|
60
|
+
if "playwright install" in msg.lower() or "executable doesn't exist" in msg.lower():
|
|
61
|
+
print(
|
|
62
|
+
"\n[gemcode] Browser (computer-use) is unavailable — Playwright browsers are not installed.\n"
|
|
63
|
+
" Run: playwright install chromium\n"
|
|
64
|
+
" Then restart GemCode with /computer on (or --computer flag).\n"
|
|
65
|
+
" Continuing without browser tools for this session.\n",
|
|
66
|
+
file=sys.stderr,
|
|
67
|
+
)
|
|
68
|
+
else:
|
|
69
|
+
print(
|
|
70
|
+
f"\n[gemcode] Browser (computer-use) failed to start: {msg!s:.200}\n"
|
|
71
|
+
" Continuing without browser tools for this session.\n",
|
|
72
|
+
file=sys.stderr,
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
# ── ADK toolset protocol ────────────────────────────────────────────────────
|
|
76
|
+
|
|
77
|
+
async def process_llm_request(self, *, tool_context, llm_request) -> None:
|
|
78
|
+
if self._broken or self._inner is None:
|
|
79
|
+
return
|
|
80
|
+
try:
|
|
81
|
+
await self._inner.process_llm_request(
|
|
82
|
+
tool_context=tool_context, llm_request=llm_request
|
|
83
|
+
)
|
|
84
|
+
except Exception as exc:
|
|
85
|
+
self._broken = True
|
|
86
|
+
self._warn_once(exc)
|
|
87
|
+
|
|
88
|
+
async def get_tools(self, readonly_context=None):
|
|
89
|
+
if self._broken or self._inner is None:
|
|
90
|
+
return []
|
|
91
|
+
try:
|
|
92
|
+
return await self._inner.get_tools(readonly_context)
|
|
93
|
+
except Exception as exc:
|
|
94
|
+
self._broken = True
|
|
95
|
+
self._warn_once(exc)
|
|
96
|
+
return []
|
|
97
|
+
|
|
98
|
+
def __getattr__(self, name: str):
|
|
99
|
+
"""Proxy all other attribute accesses to the inner toolset."""
|
|
100
|
+
if self._inner is not None:
|
|
101
|
+
return getattr(self._inner, name)
|
|
102
|
+
raise AttributeError(name)
|
|
103
|
+
|
|
104
|
+
|
|
33
105
|
def _build_artifact_service(cfg: GemCodeConfig):
|
|
34
106
|
"""
|
|
35
107
|
Return an ADK ArtifactService for this session, or None if disabled.
|
|
@@ -92,7 +164,7 @@ def create_runner(cfg: GemCodeConfig, extra_tools: list | None = None) -> Runner
|
|
|
92
164
|
headless=headless,
|
|
93
165
|
viewport_size=(viewport_w, viewport_h),
|
|
94
166
|
)
|
|
95
|
-
computer_toolset =
|
|
167
|
+
computer_toolset = _SafeComputerUseToolset(computer=computer)
|
|
96
168
|
merged_extra_tools = list(merged_extra_tools or [])
|
|
97
169
|
merged_extra_tools.append(computer_toolset)
|
|
98
170
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|