devs-common 2.0.7__tar.gz → 2.0.9__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 (42) hide show
  1. {devs_common-2.0.7 → devs_common-2.0.9}/PKG-INFO +1 -1
  2. {devs_common-2.0.7 → devs_common-2.0.9}/devs_common/config.py +14 -2
  3. {devs_common-2.0.7 → devs_common-2.0.9}/devs_common/core/container.py +5 -5
  4. {devs_common-2.0.7 → devs_common-2.0.9}/devs_common/templates/Dockerfile +2 -3
  5. {devs_common-2.0.7 → devs_common-2.0.9}/devs_common/templates/devcontainer.json +2 -4
  6. {devs_common-2.0.7 → devs_common-2.0.9}/devs_common.egg-info/PKG-INFO +1 -1
  7. {devs_common-2.0.7 → devs_common-2.0.9}/pyproject.toml +1 -1
  8. {devs_common-2.0.7 → devs_common-2.0.9}/LICENSE +0 -0
  9. {devs_common-2.0.7 → devs_common-2.0.9}/README.md +0 -0
  10. {devs_common-2.0.7 → devs_common-2.0.9}/devs_common/__init__.py +0 -0
  11. {devs_common-2.0.7 → devs_common-2.0.9}/devs_common/core/__init__.py +0 -0
  12. {devs_common-2.0.7 → devs_common-2.0.9}/devs_common/core/project.py +0 -0
  13. {devs_common-2.0.7 → devs_common-2.0.9}/devs_common/core/workspace.py +0 -0
  14. {devs_common-2.0.7 → devs_common-2.0.9}/devs_common/devs_config.py +0 -0
  15. {devs_common-2.0.7 → devs_common-2.0.9}/devs_common/exceptions.py +0 -0
  16. {devs_common-2.0.7 → devs_common-2.0.9}/devs_common/templates/scripts/copy-ssh.sh +0 -0
  17. {devs_common-2.0.7 → devs_common-2.0.9}/devs_common/templates/scripts/post-create-wrapper.sh +0 -0
  18. {devs_common-2.0.7 → devs_common-2.0.9}/devs_common/templates/scripts/python-venv-integration.sh +0 -0
  19. {devs_common-2.0.7 → devs_common-2.0.9}/devs_common/templates/scripts/screenshot-webapp.sh +0 -0
  20. {devs_common-2.0.7 → devs_common-2.0.9}/devs_common/templates/scripts/setup-workspace.sh +0 -0
  21. {devs_common-2.0.7 → devs_common-2.0.9}/devs_common/templates/scripts/start-tunnel.sh +0 -0
  22. {devs_common-2.0.7 → devs_common-2.0.9}/devs_common/templates/scripts/tunnel-status.sh +0 -0
  23. {devs_common-2.0.7 → devs_common-2.0.9}/devs_common/templates/scripts/webapp-screenshot.py +0 -0
  24. {devs_common-2.0.7 → devs_common-2.0.9}/devs_common/templates/sudo-scripts/init-firewall.sh +0 -0
  25. {devs_common-2.0.7 → devs_common-2.0.9}/devs_common/templates/sudo-scripts/setup-devs-env.sh +0 -0
  26. {devs_common-2.0.7 → devs_common-2.0.9}/devs_common/templates/sudo-scripts/setup-vscode-cache.sh +0 -0
  27. {devs_common-2.0.7 → devs_common-2.0.9}/devs_common/templates/sudo-scripts/start-services.sh +0 -0
  28. {devs_common-2.0.7 → devs_common-2.0.9}/devs_common/templates/vscode-settings-reference.md +0 -0
  29. {devs_common-2.0.7 → devs_common-2.0.9}/devs_common/utils/__init__.py +0 -0
  30. {devs_common-2.0.7 → devs_common-2.0.9}/devs_common/utils/config_hash.py +0 -0
  31. {devs_common-2.0.7 → devs_common-2.0.9}/devs_common/utils/console.py +0 -0
  32. {devs_common-2.0.7 → devs_common-2.0.9}/devs_common/utils/devcontainer.py +0 -0
  33. {devs_common-2.0.7 → devs_common-2.0.9}/devs_common/utils/devcontainer_template.py +0 -0
  34. {devs_common-2.0.7 → devs_common-2.0.9}/devs_common/utils/docker_client.py +0 -0
  35. {devs_common-2.0.7 → devs_common-2.0.9}/devs_common/utils/file_utils.py +0 -0
  36. {devs_common-2.0.7 → devs_common-2.0.9}/devs_common/utils/git_utils.py +0 -0
  37. {devs_common-2.0.7 → devs_common-2.0.9}/devs_common/utils/repo_cache.py +0 -0
  38. {devs_common-2.0.7 → devs_common-2.0.9}/devs_common.egg-info/SOURCES.txt +0 -0
  39. {devs_common-2.0.7 → devs_common-2.0.9}/devs_common.egg-info/dependency_links.txt +0 -0
  40. {devs_common-2.0.7 → devs_common-2.0.9}/devs_common.egg-info/requires.txt +0 -0
  41. {devs_common-2.0.7 → devs_common-2.0.9}/devs_common.egg-info/top_level.txt +0 -0
  42. {devs_common-2.0.7 → devs_common-2.0.9}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: devs-common
3
- Version: 2.0.7
3
+ Version: 2.0.9
4
4
  Summary: Shared utilities for devs package ecosystem
5
5
  Author: Dan Lester
6
6
  License-Expression: MIT
@@ -9,12 +9,22 @@ from abc import ABC, abstractmethod
9
9
  class BaseConfig(ABC):
10
10
  """Base configuration class for devs ecosystem packages."""
11
11
 
12
+ # Default directories shared across CLI and webhook
13
+ CLAUDE_CONFIG_DIR = Path.home() / ".devs" / "claudeconfig"
14
+ CODEX_CONFIG_DIR = Path.home() / ".devs" / "codexconfig"
15
+
12
16
  def __init__(self) -> None:
13
17
  """Initialize base configuration."""
14
18
  self._workspaces_dir: Optional[Path] = None
15
19
  self._bridge_dir: Optional[Path] = None
16
20
  self._project_prefix: Optional[str] = None
17
-
21
+
22
+ claude_config_env = os.getenv("DEVS_CLAUDE_CONFIG_DIR")
23
+ self.claude_config_dir = Path(claude_config_env) if claude_config_env else self.CLAUDE_CONFIG_DIR
24
+
25
+ codex_config_env = os.getenv("DEVS_CODEX_CONFIG_DIR")
26
+ self.codex_config_dir = Path(codex_config_env) if codex_config_env else self.CODEX_CONFIG_DIR
27
+
18
28
  @property
19
29
  def workspaces_dir(self) -> Path:
20
30
  """Get workspaces directory."""
@@ -87,4 +97,6 @@ class BaseConfig(ABC):
87
97
  def ensure_directories(self) -> None:
88
98
  """Ensure required directories exist."""
89
99
  self.workspaces_dir.mkdir(parents=True, exist_ok=True)
90
- self.bridge_dir.mkdir(parents=True, exist_ok=True)
100
+ self.bridge_dir.mkdir(parents=True, exist_ok=True)
101
+ self.claude_config_dir.mkdir(parents=True, exist_ok=True)
102
+ self.codex_config_dir.mkdir(parents=True, exist_ok=True)
@@ -878,11 +878,11 @@ class ContainerManager:
878
878
  return tunnel_name
879
879
 
880
880
  def tunnel_auth(self, dev_name: str, workspace_dir: Path, debug: bool = False, live: bool = False, extra_env: Optional[Dict[str, str]] = None) -> None:
881
- """Authenticate VS Code tunnel (interactive, one-time setup).
881
+ """Authenticate VS Code tunnel (interactive, per-container setup).
882
882
 
883
883
  Runs the device code flow interactively inside the container. Auth is
884
- stored in a bind-mounted directory (~/.devs/vscode-cli/) so it persists
885
- across container recreations and is shared across all containers.
884
+ stored in the container's filesystem and persists across stop/restart
885
+ cycles (but not container removal/recreation).
886
886
 
887
887
  Args:
888
888
  dev_name: Development environment name
@@ -925,7 +925,7 @@ class ContainerManager:
925
925
  if result.returncode == 0:
926
926
  console.print("")
927
927
  console.print("[bold green]Authentication successful![/bold green]")
928
- console.print(" Auth is shared across all containers on this machine.")
928
+ console.print(" Auth persists across container stop/restart cycles.")
929
929
  console.print("")
930
930
  console.print(f" Start a tunnel: devs tunnel {dev_name}")
931
931
  console.print(f" Then connect: code --remote tunnel+{tunnel_name} {container_workspace_dir}")
@@ -972,7 +972,7 @@ class ContainerManager:
972
972
  'docker', 'exec', '-d',
973
973
  container_name,
974
974
  '/bin/sh', '-c',
975
- f'VSCODE_CLI_DATA_DIR=/home/node/.vscode/cli {tunnel_cmd} > {log_file} 2>&1'
975
+ f'{tunnel_cmd} > {log_file} 2>&1'
976
976
  ]
977
977
 
978
978
  if debug:
@@ -87,9 +87,9 @@ RUN SNIPPET="export PROMPT_COMMAND='history -a' && export HISTFILE=/commandhisto
87
87
  ENV DEVCONTAINER=true
88
88
 
89
89
  # Create workspace and config directories and set permissions
90
- RUN mkdir -p /workspaces /home/node/claudeconfig /home/node/codexconfig /home/node/.vscode-server/extensions /home/node/.vscode/cli && \
90
+ RUN mkdir -p /workspaces /home/node/claudeconfig /home/node/codexconfig /home/node/.vscode-server/extensions && \
91
91
  echo '[]' > /home/node/.vscode-server/extensions/extensions.json && \
92
- chown -R node:node /workspaces /home/node /home/node/.vscode-server /home/node/.vscode && \
92
+ chown -R node:node /workspaces /home/node /home/node/.vscode-server && \
93
93
  chmod 755 /workspaces
94
94
 
95
95
  WORKDIR /workspaces
@@ -142,7 +142,6 @@ RUN ARCH=$(dpkg --print-architecture) && \
142
142
  RUN for shell_rc in /home/node/.zshrc /home/node/.bashrc; do \
143
143
  echo "export CLAUDE_CONFIG_DIR=\"/home/node/claudeconfig\"" >> "$shell_rc" && \
144
144
  echo "export CODEX_CONFIG_HOME=\"/home/node/codexconfig\"" >> "$shell_rc" && \
145
- echo "export VSCODE_CLI_DATA_DIR=\"/home/node/.vscode/cli\"" >> "$shell_rc" && \
146
145
  echo "export PATH=\"/home/node/.local/bin:\$PATH\"" >> "$shell_rc" && \
147
146
  echo "alias claude=\"claude --dangerously-skip-permissions\"" >> "$shell_rc" && \
148
147
  echo "alias codex=\"/usr/local/share/npm-global/bin/codex --full-auto\"" >> "$shell_rc" && \
@@ -83,8 +83,7 @@
83
83
  // "source=${localEnv:WORKSPACE_FOLDER_NAME}-vscode-extensions,target=/home/node/.vscode-server/extensions,type=volume",
84
84
  // .vscode-server includes extension state which we don't want to keep
85
85
  // "source=${localEnv:WORKSPACE_FOLDER_NAME}-vscode-data,target=/home/node/.vscode-server,type=volume",
86
- "source=${localEnv:WORKSPACE_FOLDER_NAME}-vscode-downloads,target=/home/node/.vscode-extensions-cache-volume,type=volume",
87
- "source=${localEnv:HOME}/.devs/vscode-cli,target=/home/node/.vscode/cli,type=bind"
86
+ "source=${localEnv:WORKSPACE_FOLDER_NAME}-vscode-downloads,target=/home/node/.vscode-extensions-cache-volume,type=volume"
88
87
  ],
89
88
  "remoteEnv": {
90
89
  "NODE_OPTIONS": "--max-old-space-size=4096",
@@ -96,8 +95,7 @@
96
95
  "DEVS_DEBUG": "${localEnv:DEVS_DEBUG}",
97
96
  "DEVS_LIVE_MODE": "${localEnv:DEVS_LIVE_MODE}",
98
97
  "DEVS_ENV_MOUNT_PATH": "${localEnv:DEVS_ENV_MOUNT_PATH}",
99
- "DEVS_BRIDGE_MOUNT_PATH": "${localEnv:DEVS_BRIDGE_MOUNT_PATH}",
100
- "VSCODE_CLI_DATA_DIR": "/home/node/.vscode/cli"
98
+ "DEVS_BRIDGE_MOUNT_PATH": "${localEnv:DEVS_BRIDGE_MOUNT_PATH}"
101
99
  },
102
100
  "workspaceFolder": "/workspaces/${localEnv:WORKSPACE_FOLDER_NAME}",
103
101
  "postCreateCommand": "/usr/local/bin/post-create-wrapper.sh",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: devs-common
3
- Version: 2.0.7
3
+ Version: 2.0.9
4
4
  Summary: Shared utilities for devs package ecosystem
5
5
  Author: Dan Lester
6
6
  License-Expression: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "devs-common"
7
- version = "2.0.7"
7
+ version = "2.0.9"
8
8
  description = "Shared utilities for devs package ecosystem"
9
9
  authors = [
10
10
  {name = "Dan Lester"},
File without changes
File without changes
File without changes