shotgun-sh 0.2.3.dev1__py3-none-any.whl → 0.2.3.dev2__py3-none-any.whl

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.

Potentially problematic release.


This version of shotgun-sh might be problematic. Click here for more details.

@@ -81,6 +81,26 @@ class ConfigManager:
81
81
  "Migrated config v2->v3: renamed user_id to shotgun_instance_id"
82
82
  )
83
83
 
84
+ # Migration: Set shown_welcome_screen for existing BYOK users
85
+ # If shown_welcome_screen doesn't exist AND any BYOK provider has a key,
86
+ # set it to False so they see the welcome screen once
87
+ if "shown_welcome_screen" not in data:
88
+ has_byok_key = False
89
+ for section in ["openai", "anthropic", "google"]:
90
+ if (
91
+ section in data
92
+ and isinstance(data[section], dict)
93
+ and data[section].get("api_key")
94
+ ):
95
+ has_byok_key = True
96
+ break
97
+
98
+ if has_byok_key:
99
+ data["shown_welcome_screen"] = False
100
+ logger.info(
101
+ "Existing BYOK user detected: set shown_welcome_screen=False to show welcome screen"
102
+ )
103
+
84
104
  # Convert plain text secrets to SecretStr objects
85
105
  self._convert_secrets_to_secretstr(data)
86
106
 
@@ -0,0 +1,11 @@
1
+ """Shotgun backend service API endpoints and URLs."""
2
+
3
+ # Shotgun Web API base URL (for authentication/subscription)
4
+ # Can be overridden with environment variable
5
+ SHOTGUN_WEB_BASE_URL = "https://api-219702594231.us-east4.run.app"
6
+ # Shotgun's LiteLLM proxy base URL (for AI model requests)
7
+ LITELLM_PROXY_BASE_URL = "https://litellm-219702594231.us-east4.run.app"
8
+
9
+ # Provider-specific LiteLLM proxy endpoints
10
+ LITELLM_PROXY_ANTHROPIC_BASE = f"{LITELLM_PROXY_BASE_URL}/anthropic"
11
+ LITELLM_PROXY_OPENAI_BASE = LITELLM_PROXY_BASE_URL
@@ -1,8 +1,15 @@
1
1
  """LiteLLM proxy constants and configuration."""
2
2
 
3
- # Shotgun's LiteLLM proxy base URL
4
- LITELLM_PROXY_BASE_URL = "https://litellm-701197220809.us-east1.run.app"
3
+ # Import from centralized API endpoints module
4
+ from shotgun.api_endpoints import (
5
+ LITELLM_PROXY_ANTHROPIC_BASE,
6
+ LITELLM_PROXY_BASE_URL,
7
+ LITELLM_PROXY_OPENAI_BASE,
8
+ )
5
9
 
6
- # Provider-specific endpoints
7
- LITELLM_PROXY_ANTHROPIC_BASE = f"{LITELLM_PROXY_BASE_URL}/anthropic"
8
- LITELLM_PROXY_OPENAI_BASE = LITELLM_PROXY_BASE_URL
10
+ # Re-export for backward compatibility
11
+ __all__ = [
12
+ "LITELLM_PROXY_BASE_URL",
13
+ "LITELLM_PROXY_ANTHROPIC_BASE",
14
+ "LITELLM_PROXY_OPENAI_BASE",
15
+ ]
@@ -1,12 +1,7 @@
1
1
  """Constants for Shotgun Web API."""
2
2
 
3
- import os
4
-
5
- # Shotgun Web API base URL
6
- # Default to production URL, can be overridden with environment variable
7
- SHOTGUN_WEB_BASE_URL = os.environ.get(
8
- "SHOTGUN_WEB_BASE_URL", "https://api-701197220809.us-east1.run.app"
9
- )
3
+ # Import from centralized API endpoints module
4
+ from shotgun.api_endpoints import SHOTGUN_WEB_BASE_URL
10
5
 
11
6
  # API endpoints
12
7
  UNIFICATION_TOKEN_CREATE_PATH = "/api/unification/token/create" # noqa: S105
@@ -15,3 +10,12 @@ UNIFICATION_TOKEN_STATUS_PATH = "/api/unification/token/{token}/status" # noqa:
15
10
  # Polling configuration
16
11
  DEFAULT_POLL_INTERVAL_SECONDS = 3
17
12
  DEFAULT_TOKEN_TIMEOUT_SECONDS = 1800 # 30 minutes
13
+
14
+ # Re-export for backward compatibility
15
+ __all__ = [
16
+ "SHOTGUN_WEB_BASE_URL",
17
+ "UNIFICATION_TOKEN_CREATE_PATH",
18
+ "UNIFICATION_TOKEN_STATUS_PATH",
19
+ "DEFAULT_POLL_INTERVAL_SECONDS",
20
+ "DEFAULT_TOKEN_TIMEOUT_SECONDS",
21
+ ]
shotgun/tui/app.py CHANGED
@@ -8,7 +8,6 @@ from textual.screen import Screen
8
8
  from shotgun.agents.config import ConfigManager, get_config_manager
9
9
  from shotgun.logging_config import get_logger
10
10
  from shotgun.tui.screens.splash import SplashScreen
11
- from shotgun.utils.env_utils import is_shotgun_account_enabled
12
11
  from shotgun.utils.file_system_utils import get_shotgun_base_path
13
12
  from shotgun.utils.update_checker import perform_auto_update_async
14
13
 
@@ -61,28 +60,21 @@ class ShotgunApp(App[None]):
61
60
 
62
61
  def refresh_startup_screen(self) -> None:
63
62
  """Push the appropriate screen based on configured providers."""
64
- if not self.config_manager.has_any_provider_key():
65
- # If Shotgun Account is enabled, show welcome screen with choice
66
- # Otherwise, go directly to provider config (BYOK only)
67
- if is_shotgun_account_enabled():
68
- if isinstance(self.screen, WelcomeScreen):
69
- return
70
-
71
- self.push_screen(
72
- WelcomeScreen(),
73
- callback=lambda _arg: self.refresh_startup_screen(),
74
- )
75
- return
76
- else:
77
- if isinstance(self.screen, ProviderConfigScreen):
78
- return
79
-
80
- self.push_screen(
81
- ProviderConfigScreen(),
82
- callback=lambda _arg: self.refresh_startup_screen(),
83
- )
63
+ # Show welcome screen if no providers are configured OR if user hasn't seen it yet
64
+ config = self.config_manager.load()
65
+ if (
66
+ not self.config_manager.has_any_provider_key()
67
+ or not config.shown_welcome_screen
68
+ ):
69
+ if isinstance(self.screen, WelcomeScreen):
84
70
  return
85
71
 
72
+ self.push_screen(
73
+ WelcomeScreen(),
74
+ callback=lambda _arg: self.refresh_startup_screen(),
75
+ )
76
+ return
77
+
86
78
  if not self.check_local_shotgun_directory_exists():
87
79
  if isinstance(self.screen, DirectorySetupScreen):
88
80
  return
@@ -12,23 +12,19 @@ from textual.screen import Screen
12
12
  from textual.widgets import Button, Input, Label, ListItem, ListView, Markdown, Static
13
13
 
14
14
  from shotgun.agents.config import ConfigManager, ProviderType
15
- from shotgun.utils.env_utils import is_shotgun_account_enabled
16
15
 
17
16
  if TYPE_CHECKING:
18
17
  from ..app import ShotgunApp
19
18
 
20
19
 
21
20
  def get_configurable_providers() -> list[str]:
22
- """Get list of configurable providers based on feature flags.
21
+ """Get list of configurable providers.
23
22
 
24
23
  Returns:
25
24
  List of provider identifiers that can be configured.
26
- Includes shotgun only if SHOTGUN_ACCOUNT_ENABLED is set.
25
+ Includes all providers: openai, anthropic, google, and shotgun.
27
26
  """
28
- providers = ["openai", "anthropic", "google"]
29
- if is_shotgun_account_enabled():
30
- providers.append("shotgun")
31
- return providers
27
+ return ["openai", "anthropic", "google", "shotgun"]
32
28
 
33
29
 
34
30
  class ProviderConfigScreen(Screen[None]):
@@ -1,16 +1,17 @@
1
1
  """Utilities for working with environment variables."""
2
2
 
3
- import os
4
-
5
3
 
6
4
  def is_shotgun_account_enabled() -> bool:
7
5
  """Check if Shotgun Account feature is enabled via environment variable.
8
6
 
9
7
  Returns:
10
- True if SHOTGUN_ACCOUNT_ENABLED is set to a truthy value,
11
- False otherwise
8
+ True always (Shotgun Account is now live for all users)
9
+
10
+ Note:
11
+ This function is deprecated and always returns True.
12
+ Shotgun Account is now available to all users by default.
12
13
  """
13
- return is_truthy(os.environ.get("SHOTGUN_ACCOUNT_ENABLED"))
14
+ return True
14
15
 
15
16
 
16
17
  def is_truthy(value: str | None) -> bool:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: shotgun-sh
3
- Version: 0.2.3.dev1
3
+ Version: 0.2.3.dev2
4
4
  Summary: AI-powered research, planning, and task management CLI tool
5
5
  Project-URL: Homepage, https://shotgun.sh/
6
6
  Project-URL: Repository, https://github.com/shotgun-sh/shotgun
@@ -1,4 +1,5 @@
1
1
  shotgun/__init__.py,sha256=P40K0fnIsb7SKcQrFnXZ4aREjpWchVDhvM1HxI4cyIQ,104
2
+ shotgun/api_endpoints.py,sha256=TvxuJyMrZLy6KZTrR6lrdkG8OBtb3TJ48qaw3pWitO0,526
2
3
  shotgun/build_constants.py,sha256=RXNxMz46HaB5jucgMVpw8a2yCJqjbhTOh0PddyEVMN8,713
3
4
  shotgun/logging_config.py,sha256=UKenihvgH8OA3W0b8ZFcItYaFJVe9MlsMYlcevyW1HY,7440
4
5
  shotgun/main.py,sha256=RA3q1xPfqxCu43UmgI2ryZpA-IxPhJb_MJrbLqp9c_g,5140
@@ -22,7 +23,7 @@ shotgun/agents/tasks.py,sha256=nk8zIl24o01hfzOGyWSbeVWeke6OGseO4Ppciurh13U,2999
22
23
  shotgun/agents/usage_manager.py,sha256=5d9JC4_cthXwhTSytMfMExMDAUYp8_nkPepTJZXk13w,5017
23
24
  shotgun/agents/config/__init__.py,sha256=Fl8K_81zBpm-OfOW27M_WWLSFdaHHek6lWz95iDREjQ,318
24
25
  shotgun/agents/config/constants.py,sha256=JNuLpeBUKikEsxGSjwX3RVWUQpbCKnDKstF2NczuDqk,932
25
- shotgun/agents/config/manager.py,sha256=e1HjGWKN1l9jDmK5MG8cZ6UMeWq6MntVv0NfETIgSO8,17577
26
+ shotgun/agents/config/manager.py,sha256=TeGl8n-gFLtphCjoGEma4Ej4JyltWXOJj-okYLi_INk,18491
26
27
  shotgun/agents/config/models.py,sha256=ohLXt9niCy4uFfFP1E6WSBZtxh7aZ16gTA2S3pHYkmc,5431
27
28
  shotgun/agents/config/provider.py,sha256=TwwZC_BtYSOpN2jdX6WZdor29EnAqfMoQK5GmNEYaPI,11012
28
29
  shotgun/agents/history/__init__.py,sha256=XFQj2a6fxDqVg0Q3juvN9RjV_RJbgvFZtQOCOjVJyp4,147
@@ -83,7 +84,7 @@ shotgun/codebase/core/nl_query.py,sha256=kPoSJXBlm5rLhzOofZhqPVMJ_Lj3rV2H6sld6Bw
83
84
  shotgun/codebase/core/parser_loader.py,sha256=LZRrDS8Sp518jIu3tQW-BxdwJ86lnsTteI478ER9Td8,4278
84
85
  shotgun/llm_proxy/__init__.py,sha256=BLD9NnVzdD0H7gFb65Ajud-Q7SiCymegLRaGx8UkC-Y,435
85
86
  shotgun/llm_proxy/clients.py,sha256=wP4UlgtCdrNwWsZLZ9inE3fEIDa-i1j7gsr9oXQf1o4,1037
86
- shotgun/llm_proxy/constants.py,sha256=E8sqL-8GZzl989T3OS7E1hImSZPj2vqmp3lbM6zGiQU,309
87
+ shotgun/llm_proxy/constants.py,sha256=_4piKdyvM7pAIRdAGrzYexwWoDlueUZiEMfwWrOa4T0,381
87
88
  shotgun/prompts/__init__.py,sha256=RswUm0HMdfm2m2YKUwUsEdRIwoczdbI7zlucoEvHYRo,132
88
89
  shotgun/prompts/loader.py,sha256=jy24-E02pCSmz2651aCT2NgHfRrHAGMYvKrD6gs0Er8,4424
89
90
  shotgun/prompts/agents/__init__.py,sha256=YRIJMbzpArojNX1BP5gfxxois334z_GQga8T-xyWMbY,39
@@ -115,10 +116,10 @@ shotgun/sdk/models.py,sha256=X9nOTUHH0cdkQW1NfnMEDu-QgK9oUsEISh1Jtwr5Am4,5496
115
116
  shotgun/sdk/services.py,sha256=J4PJFSxCQ6--u7rb3Ta-9eYtlYcxcbnzrMP6ThyCnw4,705
116
117
  shotgun/shotgun_web/__init__.py,sha256=IB-TvK3WvLNrdKH0j9MwMGtIjqi81ASFIVwaZa0ifNg,461
117
118
  shotgun/shotgun_web/client.py,sha256=n5DDuVfSa6VPZjhSsfSxQlSFOnhgDHyidRnB8Hv9XF4,4134
118
- shotgun/shotgun_web/constants.py,sha256=b1pwWr9l__3fVex6EUx8Z0fBO3jkzvr9gDdZK9_0jik,553
119
+ shotgun/shotgun_web/constants.py,sha256=eNvtjlu81bAVQaCwZXOVjSpDopUm9pf34XuZEvuMiko,661
119
120
  shotgun/shotgun_web/models.py,sha256=Ie9VfqKZM2tIJhIjentU9qLoNaMZvnUJaIu-xg9kQsA,1391
120
121
  shotgun/tui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
121
- shotgun/tui/app.py,sha256=bWs0GVJzXb6ZdANDi0qw1xtOAuVaCX6Xgb-ziNi5kVg,5753
122
+ shotgun/tui/app.py,sha256=B2tKbXeGhWBIVec1jJHGAuBcP1SMbO_6xol2OaBpw2Y,5374
122
123
  shotgun/tui/filtered_codebase_service.py,sha256=lJ8gTMhIveTatmvmGLP299msWWTkVYKwvY_2FhuL2s4,1687
123
124
  shotgun/tui/styles.tcss,sha256=ETyyw1bpMBOqTi5RLcAJUScdPWTvAWEqE9YcT0kVs_E,121
124
125
  shotgun/tui/commands/__init__.py,sha256=8D5lvtpqMW5-fF7Bg3oJtUzU75cKOv6aUaHYYszydU8,2518
@@ -131,7 +132,7 @@ shotgun/tui/screens/chat.tcss,sha256=2Yq3E23jxsySYsgZf4G1AYrYVcpX0UDW6kNNI0tDmtM
131
132
  shotgun/tui/screens/directory_setup.py,sha256=lIZ1J4A6g5Q2ZBX8epW7BhR96Dmdcg22CyiM5S-I5WU,3237
132
133
  shotgun/tui/screens/feedback.py,sha256=VxpW0PVxMp22ZvSfQkTtgixNrpEOlfWtekjqlVfYEjA,5708
133
134
  shotgun/tui/screens/model_picker.py,sha256=G-EvalpxgHKk0W3FgHMcxIr817VwZyEgh_ZadSQiRwo,11831
134
- shotgun/tui/screens/provider_config.py,sha256=s3SA13BJsV_Ge5lXdd4nOtbhCMjBPKqNOGaN20uMRBA,11069
135
+ shotgun/tui/screens/provider_config.py,sha256=UCnAzjXPoP7Y73gsXxZF2PNA4LdSgpgoGYwiOd6fERA,10902
135
136
  shotgun/tui/screens/shotgun_auth.py,sha256=Y--7LZewV6gfDkucxymfAO7BCd7eI2C3H1ClDMztVio,10663
136
137
  shotgun/tui/screens/splash.py,sha256=E2MsJihi3c9NY1L28o_MstDxGwrCnnV7zdq00MrGAsw,706
137
138
  shotgun/tui/screens/welcome.py,sha256=cpsBK2Gy99Nz7rwZhxVn310G68TjSdGXpIXGRp7DoLY,5329
@@ -142,12 +143,12 @@ shotgun/tui/screens/chat_screen/history.py,sha256=Go859iEjw0s5aELKpF42MjLXy7UFQ5
142
143
  shotgun/tui/utils/__init__.py,sha256=cFjDfoXTRBq29wgP7TGRWUu1eFfiIG-LLOzjIGfadgI,150
143
144
  shotgun/tui/utils/mode_progress.py,sha256=lseRRo7kMWLkBzI3cU5vqJmS2ZcCjyRYf9Zwtvc-v58,10931
144
145
  shotgun/utils/__init__.py,sha256=WinIEp9oL2iMrWaDkXz2QX4nYVPAm8C9aBSKTeEwLtE,198
145
- shotgun/utils/env_utils.py,sha256=5spVCdeqVKtlWoKocPhz_5j_iRN30neqcGUzUuiWmfc,1365
146
+ shotgun/utils/env_utils.py,sha256=ulM3BRi9ZhS7uC-zorGeDQm4SHvsyFuuU9BtVPqdrHY,1418
146
147
  shotgun/utils/file_system_utils.py,sha256=l-0p1bEHF34OU19MahnRFdClHufThfGAjQ431teAIp0,1004
147
148
  shotgun/utils/source_detection.py,sha256=Co6Q03R3fT771TF3RzB-70stfjNP2S4F_ArZKibwzm8,454
148
149
  shotgun/utils/update_checker.py,sha256=IgzPHRhS1ETH7PnJR_dIx6lxgr1qHpCkMTgzUxvGjhI,7586
149
- shotgun_sh-0.2.3.dev1.dist-info/METADATA,sha256=NLp4MqTNuIS5x10inUAEb6W0j2YPhrZOiwkgEHW9qEs,11226
150
- shotgun_sh-0.2.3.dev1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
151
- shotgun_sh-0.2.3.dev1.dist-info/entry_points.txt,sha256=asZxLU4QILneq0MWW10saVCZc4VWhZfb0wFZvERnzfA,45
152
- shotgun_sh-0.2.3.dev1.dist-info/licenses/LICENSE,sha256=YebsZl590zCHrF_acCU5pmNt0pnAfD2DmAnevJPB1tY,1065
153
- shotgun_sh-0.2.3.dev1.dist-info/RECORD,,
150
+ shotgun_sh-0.2.3.dev2.dist-info/METADATA,sha256=83cmMLDU0Zfx2TiRiX6cbJ6goC6i9cP6YmxvKI5hdzE,11226
151
+ shotgun_sh-0.2.3.dev2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
152
+ shotgun_sh-0.2.3.dev2.dist-info/entry_points.txt,sha256=asZxLU4QILneq0MWW10saVCZc4VWhZfb0wFZvERnzfA,45
153
+ shotgun_sh-0.2.3.dev2.dist-info/licenses/LICENSE,sha256=YebsZl590zCHrF_acCU5pmNt0pnAfD2DmAnevJPB1tY,1065
154
+ shotgun_sh-0.2.3.dev2.dist-info/RECORD,,