mcp-ticketer 0.12.0__py3-none-any.whl → 2.2.13__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 mcp-ticketer might be problematic. Click here for more details.

Files changed (129) hide show
  1. mcp_ticketer/__init__.py +10 -10
  2. mcp_ticketer/__version__.py +1 -1
  3. mcp_ticketer/_version_scm.py +1 -0
  4. mcp_ticketer/adapters/aitrackdown.py +507 -6
  5. mcp_ticketer/adapters/asana/adapter.py +229 -0
  6. mcp_ticketer/adapters/asana/mappers.py +14 -0
  7. mcp_ticketer/adapters/github/__init__.py +26 -0
  8. mcp_ticketer/adapters/github/adapter.py +3229 -0
  9. mcp_ticketer/adapters/github/client.py +335 -0
  10. mcp_ticketer/adapters/github/mappers.py +797 -0
  11. mcp_ticketer/adapters/github/queries.py +692 -0
  12. mcp_ticketer/adapters/github/types.py +460 -0
  13. mcp_ticketer/adapters/hybrid.py +47 -5
  14. mcp_ticketer/adapters/jira/__init__.py +35 -0
  15. mcp_ticketer/adapters/jira/adapter.py +1351 -0
  16. mcp_ticketer/adapters/jira/client.py +271 -0
  17. mcp_ticketer/adapters/jira/mappers.py +246 -0
  18. mcp_ticketer/adapters/jira/queries.py +216 -0
  19. mcp_ticketer/adapters/jira/types.py +304 -0
  20. mcp_ticketer/adapters/linear/adapter.py +2730 -139
  21. mcp_ticketer/adapters/linear/client.py +175 -3
  22. mcp_ticketer/adapters/linear/mappers.py +203 -8
  23. mcp_ticketer/adapters/linear/queries.py +280 -3
  24. mcp_ticketer/adapters/linear/types.py +120 -4
  25. mcp_ticketer/analysis/__init__.py +56 -0
  26. mcp_ticketer/analysis/dependency_graph.py +255 -0
  27. mcp_ticketer/analysis/health_assessment.py +304 -0
  28. mcp_ticketer/analysis/orphaned.py +218 -0
  29. mcp_ticketer/analysis/project_status.py +594 -0
  30. mcp_ticketer/analysis/similarity.py +224 -0
  31. mcp_ticketer/analysis/staleness.py +266 -0
  32. mcp_ticketer/automation/__init__.py +11 -0
  33. mcp_ticketer/automation/project_updates.py +378 -0
  34. mcp_ticketer/cli/adapter_diagnostics.py +3 -1
  35. mcp_ticketer/cli/auggie_configure.py +17 -5
  36. mcp_ticketer/cli/codex_configure.py +97 -61
  37. mcp_ticketer/cli/configure.py +1288 -105
  38. mcp_ticketer/cli/cursor_configure.py +314 -0
  39. mcp_ticketer/cli/diagnostics.py +13 -12
  40. mcp_ticketer/cli/discover.py +5 -0
  41. mcp_ticketer/cli/gemini_configure.py +17 -5
  42. mcp_ticketer/cli/init_command.py +880 -0
  43. mcp_ticketer/cli/install_mcp_server.py +418 -0
  44. mcp_ticketer/cli/instruction_commands.py +6 -0
  45. mcp_ticketer/cli/main.py +267 -3175
  46. mcp_ticketer/cli/mcp_configure.py +821 -119
  47. mcp_ticketer/cli/mcp_server_commands.py +415 -0
  48. mcp_ticketer/cli/platform_detection.py +77 -12
  49. mcp_ticketer/cli/platform_installer.py +545 -0
  50. mcp_ticketer/cli/project_update_commands.py +350 -0
  51. mcp_ticketer/cli/setup_command.py +795 -0
  52. mcp_ticketer/cli/simple_health.py +12 -10
  53. mcp_ticketer/cli/ticket_commands.py +705 -103
  54. mcp_ticketer/cli/utils.py +113 -0
  55. mcp_ticketer/core/__init__.py +56 -6
  56. mcp_ticketer/core/adapter.py +533 -2
  57. mcp_ticketer/core/config.py +21 -21
  58. mcp_ticketer/core/exceptions.py +7 -1
  59. mcp_ticketer/core/label_manager.py +732 -0
  60. mcp_ticketer/core/mappers.py +31 -19
  61. mcp_ticketer/core/milestone_manager.py +252 -0
  62. mcp_ticketer/core/models.py +480 -0
  63. mcp_ticketer/core/onepassword_secrets.py +1 -1
  64. mcp_ticketer/core/priority_matcher.py +463 -0
  65. mcp_ticketer/core/project_config.py +132 -14
  66. mcp_ticketer/core/project_utils.py +281 -0
  67. mcp_ticketer/core/project_validator.py +376 -0
  68. mcp_ticketer/core/session_state.py +176 -0
  69. mcp_ticketer/core/state_matcher.py +625 -0
  70. mcp_ticketer/core/url_parser.py +425 -0
  71. mcp_ticketer/core/validators.py +69 -0
  72. mcp_ticketer/mcp/server/__main__.py +2 -1
  73. mcp_ticketer/mcp/server/diagnostic_helper.py +175 -0
  74. mcp_ticketer/mcp/server/main.py +106 -25
  75. mcp_ticketer/mcp/server/routing.py +723 -0
  76. mcp_ticketer/mcp/server/server_sdk.py +58 -0
  77. mcp_ticketer/mcp/server/tools/__init__.py +33 -11
  78. mcp_ticketer/mcp/server/tools/analysis_tools.py +854 -0
  79. mcp_ticketer/mcp/server/tools/attachment_tools.py +5 -5
  80. mcp_ticketer/mcp/server/tools/bulk_tools.py +259 -202
  81. mcp_ticketer/mcp/server/tools/comment_tools.py +74 -12
  82. mcp_ticketer/mcp/server/tools/config_tools.py +1391 -145
  83. mcp_ticketer/mcp/server/tools/diagnostic_tools.py +211 -0
  84. mcp_ticketer/mcp/server/tools/hierarchy_tools.py +870 -460
  85. mcp_ticketer/mcp/server/tools/instruction_tools.py +7 -5
  86. mcp_ticketer/mcp/server/tools/label_tools.py +942 -0
  87. mcp_ticketer/mcp/server/tools/milestone_tools.py +338 -0
  88. mcp_ticketer/mcp/server/tools/pr_tools.py +3 -7
  89. mcp_ticketer/mcp/server/tools/project_status_tools.py +158 -0
  90. mcp_ticketer/mcp/server/tools/project_update_tools.py +473 -0
  91. mcp_ticketer/mcp/server/tools/search_tools.py +209 -97
  92. mcp_ticketer/mcp/server/tools/session_tools.py +308 -0
  93. mcp_ticketer/mcp/server/tools/ticket_tools.py +1107 -124
  94. mcp_ticketer/mcp/server/tools/user_ticket_tools.py +218 -236
  95. mcp_ticketer/queue/queue.py +68 -0
  96. mcp_ticketer/queue/worker.py +1 -1
  97. mcp_ticketer/utils/__init__.py +5 -0
  98. mcp_ticketer/utils/token_utils.py +246 -0
  99. mcp_ticketer-2.2.13.dist-info/METADATA +1396 -0
  100. mcp_ticketer-2.2.13.dist-info/RECORD +158 -0
  101. mcp_ticketer-2.2.13.dist-info/top_level.txt +2 -0
  102. py_mcp_installer/examples/phase3_demo.py +178 -0
  103. py_mcp_installer/scripts/manage_version.py +54 -0
  104. py_mcp_installer/setup.py +6 -0
  105. py_mcp_installer/src/py_mcp_installer/__init__.py +153 -0
  106. py_mcp_installer/src/py_mcp_installer/command_builder.py +445 -0
  107. py_mcp_installer/src/py_mcp_installer/config_manager.py +541 -0
  108. py_mcp_installer/src/py_mcp_installer/exceptions.py +243 -0
  109. py_mcp_installer/src/py_mcp_installer/installation_strategy.py +617 -0
  110. py_mcp_installer/src/py_mcp_installer/installer.py +656 -0
  111. py_mcp_installer/src/py_mcp_installer/mcp_inspector.py +750 -0
  112. py_mcp_installer/src/py_mcp_installer/platform_detector.py +451 -0
  113. py_mcp_installer/src/py_mcp_installer/platforms/__init__.py +26 -0
  114. py_mcp_installer/src/py_mcp_installer/platforms/claude_code.py +225 -0
  115. py_mcp_installer/src/py_mcp_installer/platforms/codex.py +181 -0
  116. py_mcp_installer/src/py_mcp_installer/platforms/cursor.py +191 -0
  117. py_mcp_installer/src/py_mcp_installer/types.py +222 -0
  118. py_mcp_installer/src/py_mcp_installer/utils.py +463 -0
  119. py_mcp_installer/tests/__init__.py +0 -0
  120. py_mcp_installer/tests/platforms/__init__.py +0 -0
  121. py_mcp_installer/tests/test_platform_detector.py +17 -0
  122. mcp_ticketer/adapters/github.py +0 -1574
  123. mcp_ticketer/adapters/jira.py +0 -1258
  124. mcp_ticketer-0.12.0.dist-info/METADATA +0 -550
  125. mcp_ticketer-0.12.0.dist-info/RECORD +0 -91
  126. mcp_ticketer-0.12.0.dist-info/top_level.txt +0 -1
  127. {mcp_ticketer-0.12.0.dist-info → mcp_ticketer-2.2.13.dist-info}/WHEEL +0 -0
  128. {mcp_ticketer-0.12.0.dist-info → mcp_ticketer-2.2.13.dist-info}/entry_points.txt +0 -0
  129. {mcp_ticketer-0.12.0.dist-info → mcp_ticketer-2.2.13.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,243 @@
1
+ """Custom exceptions for py-mcp-installer-service.
2
+
3
+ This module defines a comprehensive exception hierarchy with clear error
4
+ messages and recovery suggestions for users.
5
+
6
+ Design Philosophy:
7
+ - Base exception for all library errors
8
+ - Specific exceptions for different failure modes
9
+ - Clear error messages with actionable recovery suggestions
10
+ - Preserve exception chaining for debugging
11
+ """
12
+
13
+
14
+ class PyMCPInstallerError(Exception):
15
+ """Base exception for all py-mcp-installer errors.
16
+
17
+ All custom exceptions in this library inherit from this base class,
18
+ making it easy to catch all library-specific errors.
19
+
20
+ Attributes:
21
+ message: Error description
22
+ recovery_suggestion: Suggested action to resolve the error
23
+ """
24
+
25
+ def __init__(self, message: str, recovery_suggestion: str = "") -> None:
26
+ """Initialize exception with message and optional recovery suggestion.
27
+
28
+ Args:
29
+ message: Error description
30
+ recovery_suggestion: How user can resolve this error
31
+ """
32
+ self.message = message
33
+ self.recovery_suggestion = recovery_suggestion
34
+ super().__init__(message)
35
+
36
+ def __str__(self) -> str:
37
+ """Format error message with recovery suggestion if available."""
38
+ if self.recovery_suggestion:
39
+ return f"{self.message}\n\nSuggestion: {self.recovery_suggestion}"
40
+ return self.message
41
+
42
+
43
+ class PlatformDetectionError(PyMCPInstallerError):
44
+ """Failed to detect any supported AI coding platform.
45
+
46
+ Raised when platform auto-detection cannot find any supported tools
47
+ installed on the system.
48
+
49
+ Example:
50
+ >>> raise PlatformDetectionError(
51
+ ... "No supported platforms detected",
52
+ ... "Install Claude Code, Cursor, or Windsurf"
53
+ ... )
54
+ """
55
+
56
+ def __init__(self, message: str = "No supported AI coding tools detected") -> None:
57
+ """Initialize with default recovery suggestion."""
58
+ super().__init__(
59
+ message,
60
+ recovery_suggestion=(
61
+ "Install one of the supported tools:\n"
62
+ " - Claude Code: https://claude.ai/download\n"
63
+ " - Cursor: https://cursor.sh\n"
64
+ " - Windsurf: https://codeium.com/windsurf\n"
65
+ " - Auggie: https://auggie.app\n"
66
+ " - Codex: https://codex.ai"
67
+ ),
68
+ )
69
+
70
+
71
+ class ConfigurationError(PyMCPInstallerError):
72
+ """Configuration file is invalid, corrupted, or inaccessible.
73
+
74
+ Raised when:
75
+ - Config file exists but contains invalid JSON/TOML
76
+ - Config file has incorrect permissions
77
+ - Config file is corrupted
78
+ - Config file structure is invalid
79
+
80
+ Example:
81
+ >>> raise ConfigurationError(
82
+ ... "Invalid JSON in config file",
83
+ ... config_path="/home/user/.config/claude/mcp.json"
84
+ ... )
85
+ """
86
+
87
+ def __init__(self, message: str, config_path: str = "") -> None:
88
+ """Initialize with config file path for recovery suggestion.
89
+
90
+ Args:
91
+ message: Error description
92
+ config_path: Path to problematic config file
93
+ """
94
+ recovery = ""
95
+ if config_path:
96
+ recovery = (
97
+ f"Fix or delete the config file: {config_path}\n"
98
+ f"Backup will be created before any modifications."
99
+ )
100
+ super().__init__(message, recovery_suggestion=recovery)
101
+
102
+
103
+ class InstallationError(PyMCPInstallerError):
104
+ """MCP server installation operation failed.
105
+
106
+ Raised when:
107
+ - Server installation fails
108
+ - Config file cannot be written
109
+ - Native CLI command fails
110
+ - Server already exists (without force=True)
111
+
112
+ Example:
113
+ >>> raise InstallationError(
114
+ ... "Failed to install mcp-ticketer: permission denied",
115
+ ... "Check file permissions on config directory"
116
+ ... )
117
+ """
118
+
119
+ pass
120
+
121
+
122
+ class ValidationError(PyMCPInstallerError):
123
+ """Server configuration validation failed.
124
+
125
+ Raised when:
126
+ - Required fields missing from server config
127
+ - Invalid command or args
128
+ - Environment variables invalid
129
+ - Server name conflicts
130
+
131
+ Example:
132
+ >>> raise ValidationError(
133
+ ... "Server configuration missing 'command' field",
134
+ ... "Provide command parameter or use auto-detection"
135
+ ... )
136
+ """
137
+
138
+ pass
139
+
140
+
141
+ class CommandNotFoundError(PyMCPInstallerError):
142
+ """Required command not found in PATH.
143
+
144
+ Raised when:
145
+ - MCP server binary not found
146
+ - Platform CLI (claude, cursor) not found
147
+ - uv or pipx not found when required
148
+
149
+ Example:
150
+ >>> raise CommandNotFoundError(
151
+ ... "mcp-ticketer",
152
+ ... "pipx install mcp-ticketer"
153
+ ... )
154
+ """
155
+
156
+ def __init__(self, command: str, install_hint: str = "") -> None:
157
+ """Initialize with command name and installation hint.
158
+
159
+ Args:
160
+ command: Command that was not found
161
+ install_hint: How to install the command (optional)
162
+ """
163
+ message = f"Command not found in PATH: {command}"
164
+ recovery = install_hint or f"Install '{command}' and ensure it's in your PATH"
165
+ super().__init__(message, recovery_suggestion=recovery)
166
+
167
+
168
+ class BackupError(PyMCPInstallerError):
169
+ """Failed to create or restore configuration backup.
170
+
171
+ Raised when:
172
+ - Backup directory cannot be created
173
+ - Backup file cannot be written
174
+ - Disk space insufficient
175
+ - Restore operation fails
176
+
177
+ Example:
178
+ >>> raise BackupError(
179
+ ... "Failed to create backup: disk full",
180
+ ... "Free up disk space and try again"
181
+ ... )
182
+ """
183
+
184
+ def __init__(self, message: str) -> None:
185
+ """Initialize with default recovery suggestion."""
186
+ super().__init__(
187
+ message, recovery_suggestion="Check file permissions and disk space"
188
+ )
189
+
190
+
191
+ class AtomicWriteError(PyMCPInstallerError):
192
+ """Atomic file write operation failed.
193
+
194
+ Raised when:
195
+ - Temporary file cannot be created
196
+ - Write operation fails midway
197
+ - Atomic rename fails
198
+ - File permissions prevent write
199
+
200
+ This is a critical error as it may leave config in inconsistent state.
201
+
202
+ Example:
203
+ >>> raise AtomicWriteError(
204
+ ... "Failed to write config file atomically",
205
+ ... "/home/user/.config/claude/mcp.json"
206
+ ... )
207
+ """
208
+
209
+ def __init__(self, message: str, target_path: str = "") -> None:
210
+ """Initialize with target file path."""
211
+ recovery = "Check file permissions and disk space"
212
+ if target_path:
213
+ recovery += f"\nTarget file: {target_path}"
214
+ super().__init__(message, recovery_suggestion=recovery)
215
+
216
+
217
+ class PlatformNotSupportedError(PyMCPInstallerError):
218
+ """Requested platform is not supported by this library.
219
+
220
+ Raised when:
221
+ - User specifies unknown platform
222
+ - Platform detection returns unsupported platform
223
+ - Platform implementation missing
224
+
225
+ Example:
226
+ >>> raise PlatformNotSupportedError(
227
+ ... "my_custom_platform",
228
+ ... ["claude_code", "cursor", "windsurf"]
229
+ ... )
230
+ """
231
+
232
+ def __init__(self, platform: str, supported_platforms: list[str]) -> None:
233
+ """Initialize with platform name and list of supported platforms.
234
+
235
+ Args:
236
+ platform: Unsupported platform name
237
+ supported_platforms: List of supported platform names
238
+ """
239
+ message = f"Platform not supported: {platform}"
240
+ recovery = "Supported platforms:\n" + "\n".join(
241
+ f" - {p}" for p in supported_platforms
242
+ )
243
+ super().__init__(message, recovery_suggestion=recovery)