titan-cli 0.1.1__py3-none-any.whl → 0.1.3__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.
- titan_cli/__init__.py +3 -1
- titan_cli/cli.py +40 -7
- titan_cli/core/plugins/plugin_registry.py +6 -0
- titan_cli/ui/tui/icons.py +3 -2
- titan_cli/ui/tui/screens/ai_config.py +1 -1
- titan_cli/ui/tui/screens/ai_config_wizard.py +1 -1
- titan_cli/ui/tui/screens/main_menu.py +1 -1
- titan_cli/ui/tui/widgets/status_bar.py +1 -1
- titan_cli/utils/autoupdate.py +1 -1
- {titan_cli-0.1.1.dist-info → titan_cli-0.1.3.dist-info}/METADATA +1 -1
- {titan_cli-0.1.1.dist-info → titan_cli-0.1.3.dist-info}/RECORD +15 -15
- titan_plugin_jira/clients/jira_client.py +7 -6
- {titan_cli-0.1.1.dist-info → titan_cli-0.1.3.dist-info}/LICENSE +0 -0
- {titan_cli-0.1.1.dist-info → titan_cli-0.1.3.dist-info}/WHEEL +0 -0
- {titan_cli-0.1.1.dist-info → titan_cli-0.1.3.dist-info}/entry_points.txt +0 -0
titan_cli/__init__.py
CHANGED
titan_cli/cli.py
CHANGED
|
@@ -3,12 +3,14 @@ Titan CLI - Main CLI application
|
|
|
3
3
|
|
|
4
4
|
Combines all tool commands into a single CLI interface.
|
|
5
5
|
"""
|
|
6
|
+
import subprocess
|
|
7
|
+
import sys
|
|
6
8
|
import typer
|
|
7
9
|
|
|
8
10
|
from titan_cli import __version__
|
|
9
11
|
from titan_cli.messages import msg
|
|
10
12
|
from titan_cli.ui.tui import launch_tui
|
|
11
|
-
from titan_cli.utils.autoupdate import check_for_updates,
|
|
13
|
+
from titan_cli.utils.autoupdate import check_for_updates, perform_update
|
|
12
14
|
|
|
13
15
|
|
|
14
16
|
|
|
@@ -31,18 +33,49 @@ def get_version() -> str:
|
|
|
31
33
|
def main(ctx: typer.Context):
|
|
32
34
|
"""Titan CLI - Main entry point"""
|
|
33
35
|
if ctx.invoked_subcommand is None:
|
|
34
|
-
# Check for updates
|
|
36
|
+
# Check for updates BEFORE launching TUI
|
|
35
37
|
try:
|
|
36
38
|
update_info = check_for_updates()
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
if update_info["update_available"]:
|
|
40
|
+
current = update_info["current_version"]
|
|
41
|
+
latest = update_info["latest_version"]
|
|
42
|
+
|
|
43
|
+
typer.echo(f"🔔 Update available: v{current} → v{latest}")
|
|
44
|
+
typer.echo()
|
|
45
|
+
|
|
46
|
+
# Ask user if they want to update
|
|
47
|
+
if typer.confirm("Would you like to update now?", default=True):
|
|
48
|
+
typer.echo("⏳ Updating Titan CLI...")
|
|
49
|
+
typer.echo()
|
|
50
|
+
result = perform_update()
|
|
51
|
+
|
|
52
|
+
if result["success"]:
|
|
53
|
+
typer.echo(f"✅ Successfully updated to v{latest} using {result['method']}")
|
|
54
|
+
typer.echo("🔄 Relaunching Titan with new version...")
|
|
55
|
+
typer.echo()
|
|
56
|
+
|
|
57
|
+
# Relaunch titan using subprocess
|
|
58
|
+
# Note: sys.executable and sys.argv are controlled by the Python runtime,
|
|
59
|
+
# not user input, so this is safe from command injection
|
|
60
|
+
subprocess.run(
|
|
61
|
+
[sys.executable, "-m", "titan_cli.cli"] + sys.argv[1:],
|
|
62
|
+
shell=False, # Explicitly disable shell to prevent injection
|
|
63
|
+
check=False # Don't raise on non-zero exit
|
|
64
|
+
)
|
|
65
|
+
raise typer.Exit(0)
|
|
66
|
+
else:
|
|
67
|
+
typer.echo(f"❌ Update failed: {result['error']}")
|
|
68
|
+
typer.echo(" Please try manually: pipx upgrade titan-cli")
|
|
69
|
+
typer.echo()
|
|
70
|
+
# Continue to TUI even if update fails
|
|
71
|
+
else:
|
|
72
|
+
typer.echo("⏭ Skipping update. Run 'pipx upgrade titan-cli' to update later.")
|
|
73
|
+
typer.echo()
|
|
41
74
|
except Exception:
|
|
42
75
|
# Silently ignore update check failures
|
|
43
76
|
pass
|
|
44
77
|
|
|
45
|
-
# Launch TUI
|
|
78
|
+
# Launch TUI (only if no update or update was declined/failed)
|
|
46
79
|
launch_tui()
|
|
47
80
|
|
|
48
81
|
|
|
@@ -63,6 +63,12 @@ class PluginRegistry:
|
|
|
63
63
|
if name in initialized:
|
|
64
64
|
continue
|
|
65
65
|
|
|
66
|
+
# Skip plugins that are disabled in configuration
|
|
67
|
+
if not config.is_plugin_enabled(name):
|
|
68
|
+
logger.debug(f"Skipping disabled plugin: {name}")
|
|
69
|
+
initialized.add(name) # Mark as processed so we don't retry
|
|
70
|
+
continue
|
|
71
|
+
|
|
66
72
|
plugin = self._plugins[name]
|
|
67
73
|
dependencies_met = True
|
|
68
74
|
|
titan_cli/ui/tui/icons.py
CHANGED
|
@@ -17,8 +17,8 @@ class Icons:
|
|
|
17
17
|
# Status indicators
|
|
18
18
|
SUCCESS = "✅"
|
|
19
19
|
ERROR = "❌"
|
|
20
|
-
WARNING = "
|
|
21
|
-
INFO = "
|
|
20
|
+
WARNING = "🟡"
|
|
21
|
+
INFO = "🔵"
|
|
22
22
|
QUESTION = "❓"
|
|
23
23
|
|
|
24
24
|
# Progress states
|
|
@@ -56,6 +56,7 @@ class Icons:
|
|
|
56
56
|
|
|
57
57
|
# AI & Automation
|
|
58
58
|
AI = "🤖"
|
|
59
|
+
AI_CONFIG = "🧠"
|
|
59
60
|
ROBOT = "🤖"
|
|
60
61
|
SPARKLES = "✨"
|
|
61
62
|
|
|
@@ -152,7 +152,7 @@ class AIConfigWizardScreen(BaseScreen):
|
|
|
152
152
|
def __init__(self, config):
|
|
153
153
|
super().__init__(
|
|
154
154
|
config,
|
|
155
|
-
title=f"{Icons.
|
|
155
|
+
title=f"{Icons.AI_CONFIG} Configure AI Provider",
|
|
156
156
|
show_back=True,
|
|
157
157
|
show_status_bar=False
|
|
158
158
|
)
|
|
@@ -108,7 +108,7 @@ class MainMenuScreen(BaseScreen):
|
|
|
108
108
|
options.extend(
|
|
109
109
|
[
|
|
110
110
|
Option(f"{Icons.PLUGIN} Plugin Management", id="plugin_management"),
|
|
111
|
-
Option(f"{Icons.
|
|
111
|
+
Option(f"{Icons.AI_CONFIG} AI Configuration", id="ai_config"),
|
|
112
112
|
]
|
|
113
113
|
)
|
|
114
114
|
|
titan_cli/utils/autoupdate.py
CHANGED
|
@@ -108,7 +108,7 @@ def perform_update() -> Dict[str, any]:
|
|
|
108
108
|
# Try pipx first (recommended)
|
|
109
109
|
try:
|
|
110
110
|
subprocess.check_call(
|
|
111
|
-
["pipx", "upgrade", "titan-cli"],
|
|
111
|
+
["pipx", "upgrade", "--force", "titan-cli"],
|
|
112
112
|
stdout=subprocess.DEVNULL,
|
|
113
113
|
stderr=subprocess.DEVNULL
|
|
114
114
|
)
|
|
@@ -46,7 +46,7 @@ titan_plugin_jira/agents/prompts.py,sha256=MWiEbLz_vnHwdnT8toPiS4wDCK0m8lw1kLW6T
|
|
|
46
46
|
titan_plugin_jira/agents/response_parser.py,sha256=BoM64QhXUcr2APikqjcc2d78U-fdwClSoa3Nv7sm7uI,13881
|
|
47
47
|
titan_plugin_jira/agents/token_tracker.py,sha256=yNJQ8HYQl0S-nTZsPHYbb5Vc70rzGHpAsiWE83Gy2zA,7191
|
|
48
48
|
titan_plugin_jira/agents/validators.py,sha256=PzwtSbjzN1mrsU2gNQn6EqBJSVI-pTPhbpQiHuG3LXc,8186
|
|
49
|
-
titan_plugin_jira/clients/jira_client.py,sha256=
|
|
49
|
+
titan_plugin_jira/clients/jira_client.py,sha256=ttjP1-Y20niofNGsnZv_RcdBj2dP2x3WDgggVqTKlao,24068
|
|
50
50
|
titan_plugin_jira/config/jira_agent.toml,sha256=IOBaBlM3c7KsNiMCwOdKdibjB0QjRo71w1Kaf65CrHs,3114
|
|
51
51
|
titan_plugin_jira/config/templates/issue_analysis.md.j2,sha256=xPznSjW3U8GXFtumRx2BwtyS4erFYWHk2zCUrT7XCQA,1452
|
|
52
52
|
titan_plugin_jira/exceptions.py,sha256=NCOVDhynbVmyNFvi_zihl2JPTMr4twIsIb2Bk-v7ZJU,902
|
|
@@ -63,7 +63,7 @@ titan_plugin_jira/utils/__init__.py,sha256=CW540Bjbw33xaoiPlawEtNE7ncr4K3Pg_sFgZ
|
|
|
63
63
|
titan_plugin_jira/utils/issue_sorter.py,sha256=5l5K20ppb1zfhuEOyXXkmfV_zh1wTio1IUWMU2IBaRE,4012
|
|
64
64
|
titan_plugin_jira/utils/saved_queries.py,sha256=bWFI1LSs8ydCRprcJTHk6DMrq1wXN27pb5zoYYVJpRw,5111
|
|
65
65
|
titan_plugin_jira/workflows/analyze-jira-issues.yaml,sha256=VQ-_trGZGxvQUFsbXmrc8r2q9TIi5bfO-T4l6r-JyMw,802
|
|
66
|
-
titan_cli/__init__.py,sha256=
|
|
66
|
+
titan_cli/__init__.py,sha256=1gPtpwnCCyNpmlPD35zE08IPu1OhMErhfRA0sakZLJE,134
|
|
67
67
|
titan_cli/__main__.py,sha256=4tNjZ0tzDfvLID_RSjWREFBqEQ7pRnnerIqAv9Qd5uY,68
|
|
68
68
|
titan_cli/ai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
69
69
|
titan_cli/ai/agents/__init__.py,sha256=u5KT7ROBAvhpl_cVoju6rYtmKunxp2dti2clqTzVU00,341
|
|
@@ -77,7 +77,7 @@ titan_cli/ai/providers/__init__.py,sha256=sNzrQGY3MM1EmYaHKJux4yRE5tvZMIRUlHcLfG
|
|
|
77
77
|
titan_cli/ai/providers/anthropic.py,sha256=ibfIpseHsouEEc8HdIUihzlMQCJHQgNa1sQNSoPY0WY,4085
|
|
78
78
|
titan_cli/ai/providers/base.py,sha256=X2Mp0acJm4WSEWgF6m7d30x5CjVBwkW4pzdHyETmjwc,1778
|
|
79
79
|
titan_cli/ai/providers/gemini.py,sha256=hQwNe3wKXlORh6mE3vCHa-jm1vCJStqTmZLxDbaFUcA,10004
|
|
80
|
-
titan_cli/cli.py,sha256=
|
|
80
|
+
titan_cli/cli.py,sha256=K4ZeF_PysMtfJM7K6IReQTjwFJlrDuheR05YIIhxf_4,3156
|
|
81
81
|
titan_cli/clients/__init__.py,sha256=gI2mQ8JeuqFa8u7XAbYlyjOph1Z5VR42NnLOjq65iD4,22
|
|
82
82
|
titan_cli/clients/gcloud_client.py,sha256=BXc7PWqcWIjF4-l2GV3w__r11MmfPtl8OW5TFw4hgr4,1902
|
|
83
83
|
titan_cli/core/__init__.py,sha256=Z5dxtLlHbAQu79NUqjlA7Ovh9toDM2B9PiVv0J-kWGQ,71
|
|
@@ -88,7 +88,7 @@ titan_cli/core/models.py,sha256=468qjAXv6KBK3ZSEg4oV3wVOfNKDFzXIkqugBfMiisI,2373
|
|
|
88
88
|
titan_cli/core/plugins/available.py,sha256=__ejonPeOqw2Zy9gIRB-CHeFO9SvTFclG095afgnIz4,1163
|
|
89
89
|
titan_cli/core/plugins/models.py,sha256=3TFFKLkoIu6wzeFbGh2vGAU-Hr6Bvt9lroY7ZghUugE,3525
|
|
90
90
|
titan_cli/core/plugins/plugin_base.py,sha256=TtHjO-g1PBS0W0vfAM-5z-0xwL0IT2Ohi3BJ0TIfTEU,2597
|
|
91
|
-
titan_cli/core/plugins/plugin_registry.py,sha256=
|
|
91
|
+
titan_cli/core/plugins/plugin_registry.py,sha256=TcCZCVHW9sL6vlCgv2SnfRFNa0D-5M3urg74yvRNWjQ,7487
|
|
92
92
|
titan_cli/core/secrets.py,sha256=4A4rszaie1wJh7xccetOO9rM_0jwYiIQIZVgCM0tCT4,4642
|
|
93
93
|
titan_cli/core/workflows/__init__.py,sha256=CvpDKR4Co5Vzbb5aFTt5r6vyoqjGexj6Mt1_x0Z4iwg,653
|
|
94
94
|
titan_cli/core/workflows/models.py,sha256=xMXmZKMTYRawUeuAO0hG5dF6QMRCM-TWFNfoveBxJpQ,4746
|
|
@@ -114,14 +114,14 @@ titan_cli/messages.py,sha256=fBDQKHam94s5e2f5EBfqA0Ir88KfYmoF1Y4MbmUP2hY,5945
|
|
|
114
114
|
titan_cli/ui/tui/__init__.py,sha256=w0rk1XmK6NT-kohOJSd8clhg98QAYKo9eLBFm4Kwf50,9645
|
|
115
115
|
titan_cli/ui/tui/__previews__/statusbar_preview.py,sha256=QWrVbIDuMufveVavEKnPnvVVtjHHhg-leWDk98uj7Rc,3495
|
|
116
116
|
titan_cli/ui/tui/app.py,sha256=96bwBKddqDXBo37POx1zR3oBMDfrF4lrDaaXPL3JJos,3992
|
|
117
|
-
titan_cli/ui/tui/icons.py,sha256=
|
|
117
|
+
titan_cli/ui/tui/icons.py,sha256=i_xNue92PTyie-fWk0IfRGuFYtu208OZnWhRxDioBUA,1341
|
|
118
118
|
titan_cli/ui/tui/screens/__init__.py,sha256=0jqJJPqep7_pVKLRVpyl8iE6q9g8hj5G2kn8KLPhThY,708
|
|
119
|
-
titan_cli/ui/tui/screens/ai_config.py,sha256
|
|
120
|
-
titan_cli/ui/tui/screens/ai_config_wizard.py,sha256=
|
|
119
|
+
titan_cli/ui/tui/screens/ai_config.py,sha256=-e1p_1_NzUkXzxNCDKSjUzwM_eB-wpiCrTMF-r6C09U,16635
|
|
120
|
+
titan_cli/ui/tui/screens/ai_config_wizard.py,sha256=xPIDkT8L8Bjk7NqO_4mG4rhS-cdFwT-b1QeNeQ7XAdc,32123
|
|
121
121
|
titan_cli/ui/tui/screens/base.py,sha256=ufVYBkVzetQxsPQTobN0HgUGdSB0ARfRtvo-02DS2Pk,3695
|
|
122
122
|
titan_cli/ui/tui/screens/cli_launcher.py,sha256=C9XWe1jUr0-Q_PGwchL6bVu9N2g-QLa83jJZGl7ucHI,4385
|
|
123
123
|
titan_cli/ui/tui/screens/global_setup_wizard.py,sha256=gbkGMGXWJdfrIWvRvT5DDFZKKRWmf7nlGUuUkTtDiKI,12115
|
|
124
|
-
titan_cli/ui/tui/screens/main_menu.py,sha256=
|
|
124
|
+
titan_cli/ui/tui/screens/main_menu.py,sha256=5Z27Ny69PPJF0q6_H5zcNPOh8vrRDr_xgYFSmUbn244,4493
|
|
125
125
|
titan_cli/ui/tui/screens/plugin_config_wizard.py,sha256=yxwfBuZk3spn6fT3twoc9ZTokL0kDOvvMnOgKyMzJVQ,18882
|
|
126
126
|
titan_cli/ui/tui/screens/plugin_management.py,sha256=2UvdxISzaiQBpm1OW1cpDrQS4ghTSC_87nlpx5Nrjhw,12356
|
|
127
127
|
titan_cli/ui/tui/screens/project_setup_wizard.py,sha256=Q2cCHlzWpiLdtGUTHnkHnXapkxZahRAVTx5MI78sszU,24210
|
|
@@ -134,13 +134,13 @@ titan_cli/ui/tui/widgets/__init__.py,sha256=NLJMQOyI0IPFLNZ62wrJBulKgOG8bK0J2ute
|
|
|
134
134
|
titan_cli/ui/tui/widgets/button.py,sha256=Z7aRve1PSKpcQOsPo1db2GlKfwKddAVsU2KfhSRarKw,2143
|
|
135
135
|
titan_cli/ui/tui/widgets/header.py,sha256=ZGZuhY4B15q56DcZItXjarOrDX0ASCPdDczIOrYXwJI,3043
|
|
136
136
|
titan_cli/ui/tui/widgets/panel.py,sha256=jcLKZQXVqMGsvi7mVoTyKWijjrmXOgtC2ZuAkk2Ulgc,1818
|
|
137
|
-
titan_cli/ui/tui/widgets/status_bar.py,sha256=
|
|
137
|
+
titan_cli/ui/tui/widgets/status_bar.py,sha256=XiRFpoOb9DPHStaMddNIAaYmHIzg8ZkmyBzvWy4CrZg,3361
|
|
138
138
|
titan_cli/ui/tui/widgets/table.py,sha256=uWXyUda6mvflBybrrUSZh5Nvf794ege8SUe_0D24y3c,1668
|
|
139
139
|
titan_cli/ui/tui/widgets/text.py,sha256=p5h2V9w-JmPigwUFn-ky_D7gyYiix_93FJNqNmCYNHY,4057
|
|
140
140
|
titan_cli/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
141
|
-
titan_cli/utils/autoupdate.py,sha256=
|
|
142
|
-
titan_cli-0.1.
|
|
143
|
-
titan_cli-0.1.
|
|
144
|
-
titan_cli-0.1.
|
|
145
|
-
titan_cli-0.1.
|
|
146
|
-
titan_cli-0.1.
|
|
141
|
+
titan_cli/utils/autoupdate.py,sha256=Tq3SJp3iOMNONQZOw-48G6AmpKrPOyWV9RxuCA03q4M,4151
|
|
142
|
+
titan_cli-0.1.3.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
143
|
+
titan_cli-0.1.3.dist-info/METADATA,sha256=vKcX5Pq9CGckQCutN1nHA8C9coxz-G3-TurBekhV1VU,4526
|
|
144
|
+
titan_cli-0.1.3.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
|
145
|
+
titan_cli-0.1.3.dist-info/entry_points.txt,sha256=i_Zucivhsx6FcrkKDQS00MJ_Nwse-nAEkuksCcs_Ym8,186
|
|
146
|
+
titan_cli-0.1.3.dist-info/RECORD,,
|
|
@@ -50,18 +50,19 @@ class JiraClient:
|
|
|
50
50
|
JIRA Server/Next uses Basic Auth with Personal Access Token.
|
|
51
51
|
For JIRA Cloud: API tokens can be created at https://id.atlassian.com/manage/api-tokens
|
|
52
52
|
"""
|
|
53
|
+
# Validate before processing
|
|
54
|
+
if not base_url:
|
|
55
|
+
raise JiraAPIError("JIRA base URL not provided")
|
|
56
|
+
|
|
57
|
+
if not api_token:
|
|
58
|
+
raise JiraAPIError("JIRA API token not provided")
|
|
59
|
+
|
|
53
60
|
self.base_url = base_url.rstrip("/")
|
|
54
61
|
self.email = email
|
|
55
62
|
self.api_token = api_token
|
|
56
63
|
self.project_key = project_key
|
|
57
64
|
self.timeout = timeout
|
|
58
65
|
|
|
59
|
-
if not self.api_token:
|
|
60
|
-
raise JiraAPIError("JIRA API token not provided")
|
|
61
|
-
|
|
62
|
-
if not self.base_url:
|
|
63
|
-
raise JiraAPIError("JIRA base URL not provided")
|
|
64
|
-
|
|
65
66
|
if not self.email:
|
|
66
67
|
raise JiraAPIError("JIRA user email not provided")
|
|
67
68
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|