mcp-ticketer 0.1.30__py3-none-any.whl → 1.2.11__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 (109) hide show
  1. mcp_ticketer/__init__.py +10 -10
  2. mcp_ticketer/__version__.py +3 -3
  3. mcp_ticketer/adapters/__init__.py +2 -0
  4. mcp_ticketer/adapters/aitrackdown.py +796 -46
  5. mcp_ticketer/adapters/asana/__init__.py +15 -0
  6. mcp_ticketer/adapters/asana/adapter.py +1416 -0
  7. mcp_ticketer/adapters/asana/client.py +292 -0
  8. mcp_ticketer/adapters/asana/mappers.py +348 -0
  9. mcp_ticketer/adapters/asana/types.py +146 -0
  10. mcp_ticketer/adapters/github.py +879 -129
  11. mcp_ticketer/adapters/hybrid.py +11 -11
  12. mcp_ticketer/adapters/jira.py +973 -73
  13. mcp_ticketer/adapters/linear/__init__.py +24 -0
  14. mcp_ticketer/adapters/linear/adapter.py +2732 -0
  15. mcp_ticketer/adapters/linear/client.py +344 -0
  16. mcp_ticketer/adapters/linear/mappers.py +420 -0
  17. mcp_ticketer/adapters/linear/queries.py +479 -0
  18. mcp_ticketer/adapters/linear/types.py +360 -0
  19. mcp_ticketer/adapters/linear.py +10 -2315
  20. mcp_ticketer/analysis/__init__.py +23 -0
  21. mcp_ticketer/analysis/orphaned.py +218 -0
  22. mcp_ticketer/analysis/similarity.py +224 -0
  23. mcp_ticketer/analysis/staleness.py +266 -0
  24. mcp_ticketer/cache/memory.py +9 -8
  25. mcp_ticketer/cli/adapter_diagnostics.py +421 -0
  26. mcp_ticketer/cli/auggie_configure.py +116 -15
  27. mcp_ticketer/cli/codex_configure.py +274 -82
  28. mcp_ticketer/cli/configure.py +888 -151
  29. mcp_ticketer/cli/diagnostics.py +400 -157
  30. mcp_ticketer/cli/discover.py +297 -26
  31. mcp_ticketer/cli/gemini_configure.py +119 -26
  32. mcp_ticketer/cli/init_command.py +880 -0
  33. mcp_ticketer/cli/instruction_commands.py +435 -0
  34. mcp_ticketer/cli/linear_commands.py +616 -0
  35. mcp_ticketer/cli/main.py +203 -1165
  36. mcp_ticketer/cli/mcp_configure.py +474 -90
  37. mcp_ticketer/cli/mcp_server_commands.py +415 -0
  38. mcp_ticketer/cli/migrate_config.py +12 -8
  39. mcp_ticketer/cli/platform_commands.py +123 -0
  40. mcp_ticketer/cli/platform_detection.py +418 -0
  41. mcp_ticketer/cli/platform_installer.py +513 -0
  42. mcp_ticketer/cli/python_detection.py +126 -0
  43. mcp_ticketer/cli/queue_commands.py +15 -15
  44. mcp_ticketer/cli/setup_command.py +639 -0
  45. mcp_ticketer/cli/simple_health.py +90 -65
  46. mcp_ticketer/cli/ticket_commands.py +1013 -0
  47. mcp_ticketer/cli/update_checker.py +313 -0
  48. mcp_ticketer/cli/utils.py +114 -66
  49. mcp_ticketer/core/__init__.py +24 -1
  50. mcp_ticketer/core/adapter.py +250 -16
  51. mcp_ticketer/core/config.py +145 -37
  52. mcp_ticketer/core/env_discovery.py +101 -22
  53. mcp_ticketer/core/env_loader.py +349 -0
  54. mcp_ticketer/core/exceptions.py +160 -0
  55. mcp_ticketer/core/http_client.py +26 -26
  56. mcp_ticketer/core/instructions.py +405 -0
  57. mcp_ticketer/core/label_manager.py +732 -0
  58. mcp_ticketer/core/mappers.py +42 -30
  59. mcp_ticketer/core/models.py +280 -28
  60. mcp_ticketer/core/onepassword_secrets.py +379 -0
  61. mcp_ticketer/core/project_config.py +183 -49
  62. mcp_ticketer/core/registry.py +3 -3
  63. mcp_ticketer/core/session_state.py +171 -0
  64. mcp_ticketer/core/state_matcher.py +592 -0
  65. mcp_ticketer/core/url_parser.py +425 -0
  66. mcp_ticketer/core/validators.py +69 -0
  67. mcp_ticketer/defaults/ticket_instructions.md +644 -0
  68. mcp_ticketer/mcp/__init__.py +29 -1
  69. mcp_ticketer/mcp/__main__.py +60 -0
  70. mcp_ticketer/mcp/server/__init__.py +25 -0
  71. mcp_ticketer/mcp/server/__main__.py +60 -0
  72. mcp_ticketer/mcp/server/constants.py +58 -0
  73. mcp_ticketer/mcp/server/diagnostic_helper.py +175 -0
  74. mcp_ticketer/mcp/server/dto.py +195 -0
  75. mcp_ticketer/mcp/server/main.py +1343 -0
  76. mcp_ticketer/mcp/server/response_builder.py +206 -0
  77. mcp_ticketer/mcp/server/routing.py +655 -0
  78. mcp_ticketer/mcp/server/server_sdk.py +151 -0
  79. mcp_ticketer/mcp/server/tools/__init__.py +56 -0
  80. mcp_ticketer/mcp/server/tools/analysis_tools.py +495 -0
  81. mcp_ticketer/mcp/server/tools/attachment_tools.py +226 -0
  82. mcp_ticketer/mcp/server/tools/bulk_tools.py +273 -0
  83. mcp_ticketer/mcp/server/tools/comment_tools.py +152 -0
  84. mcp_ticketer/mcp/server/tools/config_tools.py +1439 -0
  85. mcp_ticketer/mcp/server/tools/diagnostic_tools.py +211 -0
  86. mcp_ticketer/mcp/server/tools/hierarchy_tools.py +921 -0
  87. mcp_ticketer/mcp/server/tools/instruction_tools.py +300 -0
  88. mcp_ticketer/mcp/server/tools/label_tools.py +948 -0
  89. mcp_ticketer/mcp/server/tools/pr_tools.py +152 -0
  90. mcp_ticketer/mcp/server/tools/search_tools.py +215 -0
  91. mcp_ticketer/mcp/server/tools/session_tools.py +170 -0
  92. mcp_ticketer/mcp/server/tools/ticket_tools.py +1268 -0
  93. mcp_ticketer/mcp/server/tools/user_ticket_tools.py +547 -0
  94. mcp_ticketer/queue/__init__.py +1 -0
  95. mcp_ticketer/queue/health_monitor.py +168 -136
  96. mcp_ticketer/queue/manager.py +95 -25
  97. mcp_ticketer/queue/queue.py +40 -21
  98. mcp_ticketer/queue/run_worker.py +6 -1
  99. mcp_ticketer/queue/ticket_registry.py +213 -155
  100. mcp_ticketer/queue/worker.py +109 -49
  101. mcp_ticketer-1.2.11.dist-info/METADATA +792 -0
  102. mcp_ticketer-1.2.11.dist-info/RECORD +110 -0
  103. mcp_ticketer/mcp/server.py +0 -1895
  104. mcp_ticketer-0.1.30.dist-info/METADATA +0 -413
  105. mcp_ticketer-0.1.30.dist-info/RECORD +0 -49
  106. {mcp_ticketer-0.1.30.dist-info → mcp_ticketer-1.2.11.dist-info}/WHEEL +0 -0
  107. {mcp_ticketer-0.1.30.dist-info → mcp_ticketer-1.2.11.dist-info}/entry_points.txt +0 -0
  108. {mcp_ticketer-0.1.30.dist-info → mcp_ticketer-1.2.11.dist-info}/licenses/LICENSE +0 -0
  109. {mcp_ticketer-0.1.30.dist-info → mcp_ticketer-1.2.11.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,479 @@
1
+ """GraphQL queries and fragments for Linear API."""
2
+
3
+ # GraphQL Fragments for reusable field definitions
4
+
5
+ USER_FRAGMENT = """
6
+ fragment UserFields on User {
7
+ id
8
+ name
9
+ email
10
+ displayName
11
+ avatarUrl
12
+ isMe
13
+ }
14
+ """
15
+
16
+ WORKFLOW_STATE_FRAGMENT = """
17
+ fragment WorkflowStateFields on WorkflowState {
18
+ id
19
+ name
20
+ type
21
+ position
22
+ color
23
+ }
24
+ """
25
+
26
+ TEAM_FRAGMENT = """
27
+ fragment TeamFields on Team {
28
+ id
29
+ name
30
+ key
31
+ description
32
+ }
33
+ """
34
+
35
+ CYCLE_FRAGMENT = """
36
+ fragment CycleFields on Cycle {
37
+ id
38
+ number
39
+ name
40
+ description
41
+ startsAt
42
+ endsAt
43
+ completedAt
44
+ }
45
+ """
46
+
47
+ PROJECT_FRAGMENT = """
48
+ fragment ProjectFields on Project {
49
+ id
50
+ name
51
+ description
52
+ state
53
+ createdAt
54
+ updatedAt
55
+ url
56
+ icon
57
+ color
58
+ targetDate
59
+ startedAt
60
+ completedAt
61
+ teams {
62
+ nodes {
63
+ ...TeamFields
64
+ }
65
+ }
66
+ }
67
+ """
68
+
69
+ LABEL_FRAGMENT = """
70
+ fragment LabelFields on IssueLabel {
71
+ id
72
+ name
73
+ color
74
+ description
75
+ }
76
+ """
77
+
78
+ ATTACHMENT_FRAGMENT = """
79
+ fragment AttachmentFields on Attachment {
80
+ id
81
+ title
82
+ url
83
+ subtitle
84
+ metadata
85
+ createdAt
86
+ updatedAt
87
+ }
88
+ """
89
+
90
+ COMMENT_FRAGMENT = """
91
+ fragment CommentFields on Comment {
92
+ id
93
+ body
94
+ createdAt
95
+ updatedAt
96
+ user {
97
+ ...UserFields
98
+ }
99
+ parent {
100
+ id
101
+ }
102
+ }
103
+ """
104
+
105
+ ISSUE_COMPACT_FRAGMENT = """
106
+ fragment IssueCompactFields on Issue {
107
+ id
108
+ identifier
109
+ title
110
+ description
111
+ priority
112
+ priorityLabel
113
+ estimate
114
+ dueDate
115
+ slaBreachesAt
116
+ slaStartedAt
117
+ createdAt
118
+ updatedAt
119
+ archivedAt
120
+ canceledAt
121
+ completedAt
122
+ startedAt
123
+ startedTriageAt
124
+ triagedAt
125
+ url
126
+ branchName
127
+ customerTicketCount
128
+
129
+ state {
130
+ ...WorkflowStateFields
131
+ }
132
+ assignee {
133
+ ...UserFields
134
+ }
135
+ creator {
136
+ ...UserFields
137
+ }
138
+ labels {
139
+ nodes {
140
+ ...LabelFields
141
+ }
142
+ }
143
+ team {
144
+ ...TeamFields
145
+ }
146
+ cycle {
147
+ ...CycleFields
148
+ }
149
+ project {
150
+ ...ProjectFields
151
+ }
152
+ parent {
153
+ id
154
+ identifier
155
+ title
156
+ }
157
+ children {
158
+ nodes {
159
+ id
160
+ identifier
161
+ title
162
+ }
163
+ }
164
+ attachments {
165
+ nodes {
166
+ ...AttachmentFields
167
+ }
168
+ }
169
+ }
170
+ """
171
+
172
+ ISSUE_FULL_FRAGMENT = """
173
+ fragment IssueFullFields on Issue {
174
+ ...IssueCompactFields
175
+ comments {
176
+ nodes {
177
+ ...CommentFields
178
+ }
179
+ }
180
+ subscribers {
181
+ nodes {
182
+ ...UserFields
183
+ }
184
+ }
185
+ relations {
186
+ nodes {
187
+ id
188
+ type
189
+ relatedIssue {
190
+ id
191
+ identifier
192
+ title
193
+ }
194
+ }
195
+ }
196
+ }
197
+ """
198
+
199
+ # Combine all fragments
200
+ ALL_FRAGMENTS = (
201
+ USER_FRAGMENT
202
+ + WORKFLOW_STATE_FRAGMENT
203
+ + TEAM_FRAGMENT
204
+ + CYCLE_FRAGMENT
205
+ + PROJECT_FRAGMENT
206
+ + LABEL_FRAGMENT
207
+ + ATTACHMENT_FRAGMENT
208
+ + COMMENT_FRAGMENT
209
+ + ISSUE_COMPACT_FRAGMENT
210
+ + ISSUE_FULL_FRAGMENT
211
+ )
212
+
213
+ # Fragments needed for issue list/search (without comments)
214
+ ISSUE_LIST_FRAGMENTS = (
215
+ USER_FRAGMENT
216
+ + WORKFLOW_STATE_FRAGMENT
217
+ + TEAM_FRAGMENT
218
+ + CYCLE_FRAGMENT
219
+ + PROJECT_FRAGMENT
220
+ + LABEL_FRAGMENT
221
+ + ATTACHMENT_FRAGMENT
222
+ + ISSUE_COMPACT_FRAGMENT
223
+ )
224
+
225
+ # Query definitions
226
+
227
+ WORKFLOW_STATES_QUERY = """
228
+ query WorkflowStates($teamId: String!) {
229
+ team(id: $teamId) {
230
+ states {
231
+ nodes {
232
+ id
233
+ name
234
+ type
235
+ position
236
+ color
237
+ }
238
+ }
239
+ }
240
+ }
241
+ """
242
+
243
+ CREATE_ISSUE_MUTATION = (
244
+ ALL_FRAGMENTS
245
+ + """
246
+ mutation CreateIssue($input: IssueCreateInput!) {
247
+ issueCreate(input: $input) {
248
+ success
249
+ issue {
250
+ ...IssueFullFields
251
+ }
252
+ }
253
+ }
254
+ """
255
+ )
256
+
257
+ UPDATE_ISSUE_MUTATION = (
258
+ ALL_FRAGMENTS
259
+ + """
260
+ mutation UpdateIssue($id: String!, $input: IssueUpdateInput!) {
261
+ issueUpdate(id: $id, input: $input) {
262
+ success
263
+ issue {
264
+ ...IssueFullFields
265
+ }
266
+ }
267
+ }
268
+ """
269
+ )
270
+
271
+ LIST_ISSUES_QUERY = (
272
+ ISSUE_LIST_FRAGMENTS
273
+ + """
274
+ query ListIssues($filter: IssueFilter, $first: Int!) {
275
+ issues(
276
+ filter: $filter
277
+ first: $first
278
+ orderBy: updatedAt
279
+ ) {
280
+ nodes {
281
+ ...IssueCompactFields
282
+ }
283
+ pageInfo {
284
+ hasNextPage
285
+ hasPreviousPage
286
+ }
287
+ }
288
+ }
289
+ """
290
+ )
291
+
292
+ SEARCH_ISSUES_QUERY = (
293
+ ISSUE_LIST_FRAGMENTS
294
+ + """
295
+ query SearchIssues($filter: IssueFilter, $first: Int!) {
296
+ issues(
297
+ filter: $filter
298
+ first: $first
299
+ orderBy: updatedAt
300
+ ) {
301
+ nodes {
302
+ ...IssueCompactFields
303
+ }
304
+ }
305
+ }
306
+ """
307
+ )
308
+
309
+ GET_CYCLES_QUERY = """
310
+ query GetCycles($filter: CycleFilter) {
311
+ cycles(filter: $filter, orderBy: createdAt) {
312
+ nodes {
313
+ id
314
+ number
315
+ name
316
+ description
317
+ startsAt
318
+ endsAt
319
+ completedAt
320
+ issues {
321
+ nodes {
322
+ id
323
+ identifier
324
+ }
325
+ }
326
+ }
327
+ }
328
+ }
329
+ """
330
+
331
+ UPDATE_ISSUE_BRANCH_MUTATION = """
332
+ mutation UpdateIssue($id: String!, $input: IssueUpdateInput!) {
333
+ issueUpdate(id: $id, input: $input) {
334
+ issue {
335
+ id
336
+ identifier
337
+ branchName
338
+ }
339
+ success
340
+ }
341
+ }
342
+ """
343
+
344
+ SEARCH_ISSUE_BY_IDENTIFIER_QUERY = """
345
+ query SearchIssue($identifier: String!) {
346
+ issue(id: $identifier) {
347
+ id
348
+ identifier
349
+ }
350
+ }
351
+ """
352
+
353
+ LIST_PROJECTS_QUERY = (
354
+ PROJECT_FRAGMENT
355
+ + """
356
+ query ListProjects($filter: ProjectFilter, $first: Int!) {
357
+ projects(filter: $filter, first: $first, orderBy: updatedAt) {
358
+ nodes {
359
+ ...ProjectFields
360
+ }
361
+ }
362
+ }
363
+ """
364
+ )
365
+
366
+ CREATE_SUB_ISSUE_MUTATION = (
367
+ ALL_FRAGMENTS
368
+ + """
369
+ mutation CreateSubIssue($input: IssueCreateInput!) {
370
+ issueCreate(input: $input) {
371
+ success
372
+ issue {
373
+ ...IssueFullFields
374
+ }
375
+ }
376
+ }
377
+ """
378
+ )
379
+
380
+ GET_CURRENT_USER_QUERY = (
381
+ USER_FRAGMENT
382
+ + """
383
+ query GetCurrentUser {
384
+ viewer {
385
+ ...UserFields
386
+ }
387
+ }
388
+ """
389
+ )
390
+
391
+ CREATE_LABEL_MUTATION = """
392
+ mutation CreateLabel($input: IssueLabelCreateInput!) {
393
+ issueLabelCreate(input: $input) {
394
+ success
395
+ issueLabel {
396
+ id
397
+ name
398
+ color
399
+ description
400
+ }
401
+ }
402
+ }
403
+ """
404
+
405
+ LIST_CYCLES_QUERY = """
406
+ query GetCycles($teamId: String!, $first: Int!, $after: String) {
407
+ team(id: $teamId) {
408
+ cycles(first: $first, after: $after) {
409
+ nodes {
410
+ id
411
+ name
412
+ number
413
+ startsAt
414
+ endsAt
415
+ completedAt
416
+ progress
417
+ }
418
+ pageInfo {
419
+ hasNextPage
420
+ endCursor
421
+ }
422
+ }
423
+ }
424
+ }
425
+ """
426
+
427
+ GET_ISSUE_STATUS_QUERY = """
428
+ query GetIssueStatus($issueId: String!) {
429
+ issue(id: $issueId) {
430
+ id
431
+ state {
432
+ id
433
+ name
434
+ type
435
+ color
436
+ description
437
+ position
438
+ }
439
+ }
440
+ }
441
+ """
442
+
443
+ LIST_ISSUE_STATUSES_QUERY = """
444
+ query GetWorkflowStates($teamId: String!) {
445
+ team(id: $teamId) {
446
+ states {
447
+ nodes {
448
+ id
449
+ name
450
+ type
451
+ color
452
+ description
453
+ position
454
+ }
455
+ }
456
+ }
457
+ }
458
+ """
459
+
460
+ GET_CUSTOM_VIEW_QUERY = (
461
+ ISSUE_LIST_FRAGMENTS
462
+ + """
463
+ query GetCustomView($viewId: String!, $first: Int!) {
464
+ customView(id: $viewId) {
465
+ id
466
+ name
467
+ description
468
+ issues(first: $first) {
469
+ nodes {
470
+ ...IssueCompactFields
471
+ }
472
+ pageInfo {
473
+ hasNextPage
474
+ }
475
+ }
476
+ }
477
+ }
478
+ """
479
+ )