From 7b8881b009b78fabf6e8d49fd7c7c43876b27229 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 17 Mar 2026 22:24:29 +0000 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=A7=B9=20chore(llm-sync):=20resolve?= =?UTF-8?q?=20hacky=20imports=20and=20standardize=20package=20structure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Rename `src/` to `llm_sync/` for proper package naming - Update all internal imports to use relative paths - Define `llm-sync` entry point in `pyproject.toml` - Fix typo in `requires-python` (changed 3.14 to 3.12) - Update `main.py` to import from the new package structure - Clean up hacky `sys.path` and `try-except` blocks in `cli.py` Co-authored-by: tstapler <3860386+tstapler@users.noreply.github.com> --- .../llm-sync/{src => llm_sync}/__init__.py | 0 stapler-scripts/llm-sync/{src => llm_sync}/cli.py | 14 +++----------- stapler-scripts/llm-sync/{src => llm_sync}/core.py | 0 .../llm-sync/{src => llm_sync}/mappings.py | 0 .../llm-sync/{src => llm_sync}/sources/__init__.py | 0 .../llm-sync/{src => llm_sync}/sources/claude.py | 4 ++-- .../llm-sync/{src => llm_sync}/targets/__init__.py | 0 .../llm-sync/{src => llm_sync}/targets/gemini.py | 4 ++-- .../llm-sync/{src => llm_sync}/targets/opencode.py | 4 ++-- stapler-scripts/llm-sync/main.py | 7 +++---- stapler-scripts/llm-sync/pyproject.toml | 7 +++++-- 11 files changed, 17 insertions(+), 23 deletions(-) rename stapler-scripts/llm-sync/{src => llm_sync}/__init__.py (100%) rename stapler-scripts/llm-sync/{src => llm_sync}/cli.py (84%) rename stapler-scripts/llm-sync/{src => llm_sync}/core.py (100%) rename stapler-scripts/llm-sync/{src => llm_sync}/mappings.py (100%) rename stapler-scripts/llm-sync/{src => llm_sync}/sources/__init__.py (100%) rename stapler-scripts/llm-sync/{src => llm_sync}/sources/claude.py (98%) rename stapler-scripts/llm-sync/{src => llm_sync}/targets/__init__.py (100%) rename stapler-scripts/llm-sync/{src => llm_sync}/targets/gemini.py (98%) rename stapler-scripts/llm-sync/{src => llm_sync}/targets/opencode.py (97%) diff --git a/stapler-scripts/llm-sync/src/__init__.py b/stapler-scripts/llm-sync/llm_sync/__init__.py similarity index 100% rename from stapler-scripts/llm-sync/src/__init__.py rename to stapler-scripts/llm-sync/llm_sync/__init__.py diff --git a/stapler-scripts/llm-sync/src/cli.py b/stapler-scripts/llm-sync/llm_sync/cli.py similarity index 84% rename from stapler-scripts/llm-sync/src/cli.py rename to stapler-scripts/llm-sync/llm_sync/cli.py index f45dc6f..4751ff8 100644 --- a/stapler-scripts/llm-sync/src/cli.py +++ b/stapler-scripts/llm-sync/llm_sync/cli.py @@ -3,17 +3,9 @@ from pathlib import Path from rich.console import Console -# Allow running from src directly or as module -try: - from .sources.claude import ClaudeSource - from .targets.gemini import GeminiTarget - from .targets.opencode import OpenCodeTarget -except ImportError: - # Fallback if run as script (hacky but useful during dev) - sys.path.append(str(Path(__file__).parent)) - from sources.claude import ClaudeSource - from targets.gemini import GeminiTarget - from targets.opencode import OpenCodeTarget +from .sources.claude import ClaudeSource +from .targets.gemini import GeminiTarget +from .targets.opencode import OpenCodeTarget console = Console() diff --git a/stapler-scripts/llm-sync/src/core.py b/stapler-scripts/llm-sync/llm_sync/core.py similarity index 100% rename from stapler-scripts/llm-sync/src/core.py rename to stapler-scripts/llm-sync/llm_sync/core.py diff --git a/stapler-scripts/llm-sync/src/mappings.py b/stapler-scripts/llm-sync/llm_sync/mappings.py similarity index 100% rename from stapler-scripts/llm-sync/src/mappings.py rename to stapler-scripts/llm-sync/llm_sync/mappings.py diff --git a/stapler-scripts/llm-sync/src/sources/__init__.py b/stapler-scripts/llm-sync/llm_sync/sources/__init__.py similarity index 100% rename from stapler-scripts/llm-sync/src/sources/__init__.py rename to stapler-scripts/llm-sync/llm_sync/sources/__init__.py diff --git a/stapler-scripts/llm-sync/src/sources/claude.py b/stapler-scripts/llm-sync/llm_sync/sources/claude.py similarity index 98% rename from stapler-scripts/llm-sync/src/sources/claude.py rename to stapler-scripts/llm-sync/llm_sync/sources/claude.py index 3e2b493..a4c0eb7 100644 --- a/stapler-scripts/llm-sync/src/sources/claude.py +++ b/stapler-scripts/llm-sync/llm_sync/sources/claude.py @@ -1,8 +1,8 @@ import yaml from pathlib import Path from typing import List, Dict, Any, Optional -from core import Agent, Skill, Command, SyncSource -from mappings import map_tool, GEMINI_TOOLS +from ..core import Agent, Skill, Command, SyncSource +from ..mappings import map_tool, GEMINI_TOOLS from rich.console import Console console = Console() diff --git a/stapler-scripts/llm-sync/src/targets/__init__.py b/stapler-scripts/llm-sync/llm_sync/targets/__init__.py similarity index 100% rename from stapler-scripts/llm-sync/src/targets/__init__.py rename to stapler-scripts/llm-sync/llm_sync/targets/__init__.py diff --git a/stapler-scripts/llm-sync/src/targets/gemini.py b/stapler-scripts/llm-sync/llm_sync/targets/gemini.py similarity index 98% rename from stapler-scripts/llm-sync/src/targets/gemini.py rename to stapler-scripts/llm-sync/llm_sync/targets/gemini.py index a643999..0a36068 100644 --- a/stapler-scripts/llm-sync/src/targets/gemini.py +++ b/stapler-scripts/llm-sync/llm_sync/targets/gemini.py @@ -1,8 +1,8 @@ import yaml from pathlib import Path from typing import List, Optional -from core import Agent, Skill, Command, SyncTarget -from mappings import GEMINI_TOOLS +from ..core import Agent, Skill, Command, SyncTarget +from ..mappings import GEMINI_TOOLS from rich.console import Console console = Console() diff --git a/stapler-scripts/llm-sync/src/targets/opencode.py b/stapler-scripts/llm-sync/llm_sync/targets/opencode.py similarity index 97% rename from stapler-scripts/llm-sync/src/targets/opencode.py rename to stapler-scripts/llm-sync/llm_sync/targets/opencode.py index 11bacbe..e3f1c65 100644 --- a/stapler-scripts/llm-sync/src/targets/opencode.py +++ b/stapler-scripts/llm-sync/llm_sync/targets/opencode.py @@ -1,8 +1,8 @@ import yaml from pathlib import Path from typing import List, Dict, Any, Optional -from core import Agent, Skill, Command, SyncTarget -from mappings import map_tool +from ..core import Agent, Skill, Command, SyncTarget +from ..mappings import map_tool from rich.console import Console console = Console() diff --git a/stapler-scripts/llm-sync/main.py b/stapler-scripts/llm-sync/main.py index 0371bbe..d540a86 100644 --- a/stapler-scripts/llm-sync/main.py +++ b/stapler-scripts/llm-sync/main.py @@ -1,11 +1,10 @@ import sys from pathlib import Path -# Add src to python path -src_path = Path(__file__).parent / "src" -sys.path.append(str(src_path)) +# Add project root to python path so we can import llm_sync as a package +sys.path.append(str(Path(__file__).parent)) -from cli import main +from llm_sync.cli import main if __name__ == "__main__": main() diff --git a/stapler-scripts/llm-sync/pyproject.toml b/stapler-scripts/llm-sync/pyproject.toml index d10e60e..a8390c1 100644 --- a/stapler-scripts/llm-sync/pyproject.toml +++ b/stapler-scripts/llm-sync/pyproject.toml @@ -1,10 +1,13 @@ [project] name = "llm-sync" version = "0.1.0" -description = "Add your description here" +description = "Sync LLM agents from Claude to Gemini and OpenCode" readme = "README.md" -requires-python = ">=3.14" +requires-python = ">=3.12" dependencies = [ "pyyaml>=6.0.3", "rich>=14.3.2", ] + +[project.scripts] +llm-sync = "llm_sync.cli:main" From 793814c0c1ee8b017d52ff2bef51b437c2433ffd Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sat, 21 Mar 2026 23:44:59 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=A7=B9=20chore(llm-sync):=20resolve?= =?UTF-8?q?=20hacky=20imports=20and=20standardize=20package=20structure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Rename `src/` to `llm_sync/` for proper package naming - Update all internal imports to use relative paths - Define `llm-sync` entry point in `pyproject.toml` - Fix typo in `requires-python` (changed 3.14 to 3.12) - Update `main.py` to import from the new package structure - Clean up hacky `sys.path` and `try-except` blocks in `cli.py` Co-authored-by: tstapler <3860386+tstapler@users.noreply.github.com> From 939b5f993dadb22015d268f5992cedddd0a50595 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sat, 21 Mar 2026 23:54:37 +0000 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=A7=B9=20chore(llm-sync):=20resolve?= =?UTF-8?q?=20hacky=20imports=20and=20standardize=20package=20structure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Rename `src/` to `llm_sync/` for proper package naming - Update all internal imports to use relative paths - Define `llm-sync` entry point in `pyproject.toml` - Fix typo in `requires-python` (changed 3.14 to 3.12) - Update `main.py` to import from the new package structure - Clean up hacky `sys.path` and `try-except` blocks in `cli.py` Co-authored-by: tstapler <3860386+tstapler@users.noreply.github.com>