devcopilot 0.2.0__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.
Files changed (189) hide show
  1. api/__init__.py +17 -0
  2. api/admin_config.py +1303 -0
  3. api/admin_routes.py +287 -0
  4. api/admin_static/admin.css +459 -0
  5. api/admin_static/admin.js +497 -0
  6. api/admin_static/index.html +77 -0
  7. api/admin_urls.py +34 -0
  8. api/app.py +194 -0
  9. api/command_utils.py +164 -0
  10. api/dependencies.py +144 -0
  11. api/detection.py +152 -0
  12. api/gateway_model_ids.py +54 -0
  13. api/model_catalog.py +133 -0
  14. api/model_router.py +125 -0
  15. api/models/__init__.py +45 -0
  16. api/models/anthropic.py +234 -0
  17. api/models/openai_responses.py +28 -0
  18. api/models/responses.py +60 -0
  19. api/optimization_handlers.py +154 -0
  20. api/request_pipeline.py +424 -0
  21. api/routes.py +156 -0
  22. api/runtime.py +334 -0
  23. api/validation_log.py +48 -0
  24. api/web_server_tools.py +22 -0
  25. api/web_tools/__init__.py +17 -0
  26. api/web_tools/constants.py +15 -0
  27. api/web_tools/egress.py +99 -0
  28. api/web_tools/outbound.py +278 -0
  29. api/web_tools/parsers.py +104 -0
  30. api/web_tools/request.py +87 -0
  31. api/web_tools/streaming.py +206 -0
  32. cli/__init__.py +5 -0
  33. cli/claude_env.py +12 -0
  34. cli/entrypoints.py +166 -0
  35. cli/env.example +209 -0
  36. cli/launchers/__init__.py +1 -0
  37. cli/launchers/claude.py +84 -0
  38. cli/launchers/codex.py +204 -0
  39. cli/launchers/codex_model_catalog.py +186 -0
  40. cli/launchers/common.py +93 -0
  41. cli/managed/__init__.py +6 -0
  42. cli/managed/claude.py +215 -0
  43. cli/managed/manager.py +157 -0
  44. cli/managed/session.py +260 -0
  45. cli/process_registry.py +78 -0
  46. config/__init__.py +5 -0
  47. config/constants.py +13 -0
  48. config/logging_config.py +159 -0
  49. config/nim.py +118 -0
  50. config/paths.py +91 -0
  51. config/provider_catalog.py +259 -0
  52. config/provider_ids.py +7 -0
  53. config/settings.py +538 -0
  54. core/__init__.py +1 -0
  55. core/anthropic/__init__.py +46 -0
  56. core/anthropic/content.py +31 -0
  57. core/anthropic/conversion.py +587 -0
  58. core/anthropic/emitted_sse_tracker.py +346 -0
  59. core/anthropic/errors.py +70 -0
  60. core/anthropic/native_messages_request.py +280 -0
  61. core/anthropic/native_sse_block_policy.py +313 -0
  62. core/anthropic/provider_stream_error.py +34 -0
  63. core/anthropic/server_tool_sse.py +14 -0
  64. core/anthropic/sse.py +440 -0
  65. core/anthropic/stream_contracts.py +205 -0
  66. core/anthropic/stream_recovery.py +346 -0
  67. core/anthropic/stream_recovery_session.py +133 -0
  68. core/anthropic/thinking.py +140 -0
  69. core/anthropic/tokens.py +117 -0
  70. core/anthropic/tools.py +212 -0
  71. core/anthropic/utils.py +9 -0
  72. core/openai_responses/__init__.py +5 -0
  73. core/openai_responses/adapter.py +31 -0
  74. core/openai_responses/anthropic_sse.py +59 -0
  75. core/openai_responses/errors.py +22 -0
  76. core/openai_responses/events.py +19 -0
  77. core/openai_responses/ids.py +21 -0
  78. core/openai_responses/input.py +258 -0
  79. core/openai_responses/items.py +37 -0
  80. core/openai_responses/reasoning.py +52 -0
  81. core/openai_responses/stream.py +25 -0
  82. core/openai_responses/stream_state.py +654 -0
  83. core/openai_responses/tools.py +374 -0
  84. core/openai_responses/usage.py +37 -0
  85. core/rate_limit.py +60 -0
  86. core/trace.py +216 -0
  87. devcopilot-0.2.0.dist-info/METADATA +687 -0
  88. devcopilot-0.2.0.dist-info/RECORD +189 -0
  89. devcopilot-0.2.0.dist-info/WHEEL +4 -0
  90. devcopilot-0.2.0.dist-info/entry_points.txt +6 -0
  91. devcopilot-0.2.0.dist-info/licenses/LICENSE +21 -0
  92. messaging/__init__.py +26 -0
  93. messaging/cli_event_constants.py +67 -0
  94. messaging/command_context.py +66 -0
  95. messaging/command_dispatcher.py +37 -0
  96. messaging/commands.py +275 -0
  97. messaging/event_parser.py +181 -0
  98. messaging/limiter.py +300 -0
  99. messaging/models.py +36 -0
  100. messaging/node_event_pipeline.py +127 -0
  101. messaging/node_runner.py +342 -0
  102. messaging/platforms/__init__.py +15 -0
  103. messaging/platforms/base.py +228 -0
  104. messaging/platforms/discord.py +567 -0
  105. messaging/platforms/factory.py +103 -0
  106. messaging/platforms/outbox.py +144 -0
  107. messaging/platforms/telegram.py +688 -0
  108. messaging/platforms/voice_flow.py +295 -0
  109. messaging/rendering/__init__.py +3 -0
  110. messaging/rendering/discord_markdown.py +318 -0
  111. messaging/rendering/markdown_tables.py +49 -0
  112. messaging/rendering/profiles.py +55 -0
  113. messaging/rendering/telegram_markdown.py +327 -0
  114. messaging/safe_diagnostics.py +17 -0
  115. messaging/session.py +334 -0
  116. messaging/transcript.py +581 -0
  117. messaging/transcription.py +164 -0
  118. messaging/trees/__init__.py +15 -0
  119. messaging/trees/data.py +482 -0
  120. messaging/trees/manager.py +433 -0
  121. messaging/trees/processor.py +179 -0
  122. messaging/trees/repository.py +177 -0
  123. messaging/turn_intake.py +235 -0
  124. messaging/ui_updates.py +101 -0
  125. messaging/voice.py +76 -0
  126. messaging/workflow.py +200 -0
  127. providers/__init__.py +31 -0
  128. providers/base.py +152 -0
  129. providers/cerebras/__init__.py +7 -0
  130. providers/cerebras/client.py +31 -0
  131. providers/cerebras/request.py +55 -0
  132. providers/codestral/__init__.py +7 -0
  133. providers/codestral/client.py +34 -0
  134. providers/deepseek/__init__.py +11 -0
  135. providers/deepseek/client.py +51 -0
  136. providers/deepseek/request.py +475 -0
  137. providers/defaults.py +41 -0
  138. providers/error_mapping.py +309 -0
  139. providers/exceptions.py +113 -0
  140. providers/fireworks/__init__.py +5 -0
  141. providers/fireworks/client.py +45 -0
  142. providers/fireworks/request.py +48 -0
  143. providers/gemini/__init__.py +7 -0
  144. providers/gemini/client.py +49 -0
  145. providers/gemini/request.py +199 -0
  146. providers/groq/__init__.py +7 -0
  147. providers/groq/client.py +31 -0
  148. providers/groq/request.py +83 -0
  149. providers/kimi/__init__.py +10 -0
  150. providers/kimi/client.py +53 -0
  151. providers/kimi/request.py +42 -0
  152. providers/llamacpp/__init__.py +3 -0
  153. providers/llamacpp/client.py +16 -0
  154. providers/lmstudio/__init__.py +5 -0
  155. providers/lmstudio/client.py +16 -0
  156. providers/mistral/__init__.py +7 -0
  157. providers/mistral/client.py +31 -0
  158. providers/mistral/request.py +37 -0
  159. providers/model_listing.py +133 -0
  160. providers/nvidia_nim/__init__.py +7 -0
  161. providers/nvidia_nim/client.py +91 -0
  162. providers/nvidia_nim/request.py +430 -0
  163. providers/nvidia_nim/voice.py +95 -0
  164. providers/ollama/__init__.py +7 -0
  165. providers/ollama/client.py +39 -0
  166. providers/open_router/__init__.py +7 -0
  167. providers/open_router/client.py +124 -0
  168. providers/open_router/request.py +42 -0
  169. providers/opencode/__init__.py +11 -0
  170. providers/opencode/client.py +31 -0
  171. providers/opencode/request.py +35 -0
  172. providers/rate_limit.py +300 -0
  173. providers/registry.py +527 -0
  174. providers/transports/__init__.py +1 -0
  175. providers/transports/anthropic_messages/__init__.py +5 -0
  176. providers/transports/anthropic_messages/http.py +118 -0
  177. providers/transports/anthropic_messages/recovery.py +206 -0
  178. providers/transports/anthropic_messages/stream.py +295 -0
  179. providers/transports/anthropic_messages/transport.py +236 -0
  180. providers/transports/openai_chat/__init__.py +5 -0
  181. providers/transports/openai_chat/recovery.py +217 -0
  182. providers/transports/openai_chat/stream.py +384 -0
  183. providers/transports/openai_chat/tool_calls.py +293 -0
  184. providers/transports/openai_chat/transport.py +156 -0
  185. providers/wafer/__init__.py +10 -0
  186. providers/wafer/client.py +50 -0
  187. providers/zai/__init__.py +10 -0
  188. providers/zai/client.py +46 -0
  189. providers/zai/request.py +42 -0
@@ -0,0 +1,459 @@
1
+ :root {
2
+ color-scheme: dark;
3
+ --bg: #11100e;
4
+ --panel: #1a1815;
5
+ --panel-strong: #25211c;
6
+ --card: #201d19;
7
+ --input: #12110f;
8
+ --text: #f3eee7;
9
+ --muted: #aaa197;
10
+ --line: #373129;
11
+ --line-strong: #4d4439;
12
+ --accent: #2fb984;
13
+ --accent-dark: #24946b;
14
+ --warn: #f5b74f;
15
+ --error: #ff746c;
16
+ --ok: #59d994;
17
+ --info: #7cc7ff;
18
+ --shadow: 0 14px 34px rgba(0, 0, 0, 0.38);
19
+ }
20
+
21
+ * {
22
+ box-sizing: border-box;
23
+ }
24
+
25
+ body {
26
+ margin: 0;
27
+ min-width: 320px;
28
+ background: var(--bg);
29
+ color: var(--text);
30
+ font-family:
31
+ Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
32
+ sans-serif;
33
+ letter-spacing: 0;
34
+ }
35
+
36
+ button,
37
+ input,
38
+ select,
39
+ textarea {
40
+ font: inherit;
41
+ }
42
+
43
+ .app-shell {
44
+ display: grid;
45
+ grid-template-columns: 268px minmax(0, 1fr);
46
+ min-height: 100vh;
47
+ padding-bottom: 86px;
48
+ }
49
+
50
+ .sidebar {
51
+ position: sticky;
52
+ top: 0;
53
+ height: 100vh;
54
+ border-right: 1px solid var(--line);
55
+ background: #171511;
56
+ padding: 20px 16px;
57
+ }
58
+
59
+ .brand {
60
+ display: flex;
61
+ align-items: center;
62
+ gap: 12px;
63
+ margin-bottom: 28px;
64
+ }
65
+
66
+ .brand-mark {
67
+ display: grid;
68
+ width: 38px;
69
+ height: 38px;
70
+ place-items: center;
71
+ border-radius: 8px;
72
+ background: var(--accent);
73
+ color: #ffffff;
74
+ font-weight: 800;
75
+ font-size: 14px;
76
+ }
77
+
78
+ .brand h1,
79
+ .brand p,
80
+ .topbar h2,
81
+ .section-heading h3,
82
+ .section-heading p,
83
+ .strip-header h3 {
84
+ margin: 0;
85
+ }
86
+
87
+ .brand h1 {
88
+ font-size: 15px;
89
+ line-height: 1.2;
90
+ }
91
+
92
+ .brand p,
93
+ .section-heading p,
94
+ .action-meta span {
95
+ color: var(--muted);
96
+ font-size: 12px;
97
+ }
98
+
99
+ .section-nav {
100
+ display: grid;
101
+ gap: 8px;
102
+ }
103
+
104
+ .nav-link {
105
+ display: flex;
106
+ justify-content: space-between;
107
+ align-items: center;
108
+ width: 100%;
109
+ min-height: 42px;
110
+ border: 1px solid transparent;
111
+ border-radius: 8px;
112
+ background: transparent;
113
+ color: var(--text);
114
+ padding: 10px 12px;
115
+ text-align: left;
116
+ cursor: pointer;
117
+ font-weight: 700;
118
+ }
119
+
120
+ .nav-link:hover,
121
+ .nav-link.active {
122
+ background: var(--panel-strong);
123
+ border-color: var(--line);
124
+ }
125
+
126
+ .nav-link.active {
127
+ border-color: rgba(89, 217, 148, 0.34);
128
+ color: #ffffff;
129
+ }
130
+
131
+ .main {
132
+ min-width: 0;
133
+ padding: 28px;
134
+ }
135
+
136
+ .topbar {
137
+ margin-bottom: 20px;
138
+ }
139
+
140
+ .topbar h2 {
141
+ font-size: 28px;
142
+ line-height: 1.15;
143
+ }
144
+
145
+ .status-pill {
146
+ display: inline-flex;
147
+ align-items: center;
148
+ min-height: 30px;
149
+ border: 1px solid var(--line);
150
+ border-radius: 999px;
151
+ padding: 5px 10px;
152
+ background: var(--panel-strong);
153
+ color: var(--muted);
154
+ font-size: 12px;
155
+ font-weight: 700;
156
+ white-space: nowrap;
157
+ }
158
+
159
+ .status-pill.ok {
160
+ color: var(--ok);
161
+ background: rgba(47, 185, 132, 0.13);
162
+ border-color: rgba(89, 217, 148, 0.36);
163
+ }
164
+
165
+ .status-pill.warn {
166
+ color: var(--warn);
167
+ background: rgba(245, 183, 79, 0.13);
168
+ border-color: rgba(245, 183, 79, 0.38);
169
+ }
170
+
171
+ .status-pill.error {
172
+ color: var(--error);
173
+ background: rgba(255, 116, 108, 0.12);
174
+ border-color: rgba(255, 116, 108, 0.36);
175
+ }
176
+
177
+ .admin-views,
178
+ .admin-view {
179
+ display: grid;
180
+ gap: 18px;
181
+ }
182
+
183
+ .admin-view[hidden] {
184
+ display: none;
185
+ }
186
+
187
+ .provider-strip,
188
+ .settings-section {
189
+ border: 1px solid var(--line);
190
+ border-radius: 8px;
191
+ background: var(--panel);
192
+ box-shadow: var(--shadow);
193
+ }
194
+
195
+ .provider-strip {
196
+ padding: 16px;
197
+ }
198
+
199
+ .strip-header,
200
+ .section-heading {
201
+ display: flex;
202
+ align-items: center;
203
+ justify-content: space-between;
204
+ gap: 12px;
205
+ }
206
+
207
+ .strip-header {
208
+ margin-bottom: 12px;
209
+ }
210
+
211
+ .strip-header h3,
212
+ .section-heading h3 {
213
+ font-size: 16px;
214
+ }
215
+
216
+ .provider-grid {
217
+ display: grid;
218
+ grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
219
+ gap: 10px;
220
+ }
221
+
222
+ .provider-card {
223
+ display: grid;
224
+ gap: 8px;
225
+ min-height: 108px;
226
+ border: 1px solid var(--line);
227
+ border-radius: 8px;
228
+ padding: 12px;
229
+ background: var(--card);
230
+ }
231
+
232
+ .provider-title {
233
+ display: flex;
234
+ align-items: center;
235
+ justify-content: space-between;
236
+ gap: 8px;
237
+ }
238
+
239
+ .provider-title strong {
240
+ font-size: 14px;
241
+ }
242
+
243
+ .provider-meta {
244
+ color: var(--muted);
245
+ font-size: 12px;
246
+ word-break: break-word;
247
+ }
248
+
249
+ .test-button,
250
+ .ghost-button,
251
+ .secondary-button,
252
+ .primary-button {
253
+ min-height: 34px;
254
+ border-radius: 8px;
255
+ border: 1px solid var(--line-strong);
256
+ padding: 7px 12px;
257
+ cursor: pointer;
258
+ font-weight: 700;
259
+ }
260
+
261
+ .ghost-button,
262
+ .secondary-button,
263
+ .test-button {
264
+ background: var(--panel-strong);
265
+ color: var(--text);
266
+ }
267
+
268
+ .ghost-button:hover,
269
+ .secondary-button:hover,
270
+ .test-button:hover {
271
+ border-color: var(--accent);
272
+ }
273
+
274
+ .primary-button {
275
+ border-color: var(--accent);
276
+ background: var(--accent);
277
+ color: #06100b;
278
+ }
279
+
280
+ .primary-button:hover {
281
+ background: var(--accent-dark);
282
+ }
283
+
284
+ .primary-button:disabled {
285
+ cursor: not-allowed;
286
+ border-color: var(--line);
287
+ background: #34302a;
288
+ color: #797067;
289
+ }
290
+
291
+ .form-sections {
292
+ display: grid;
293
+ gap: 18px;
294
+ }
295
+
296
+ .settings-section {
297
+ padding: 18px;
298
+ scroll-margin-top: 20px;
299
+ }
300
+
301
+ .section-heading {
302
+ margin-bottom: 16px;
303
+ }
304
+
305
+ .field-grid {
306
+ display: grid;
307
+ grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
308
+ gap: 14px;
309
+ }
310
+
311
+ .field {
312
+ display: grid;
313
+ gap: 7px;
314
+ align-content: start;
315
+ }
316
+
317
+ .field label {
318
+ display: flex;
319
+ align-items: center;
320
+ justify-content: space-between;
321
+ gap: 8px;
322
+ font-size: 13px;
323
+ font-weight: 700;
324
+ }
325
+
326
+ .field-source {
327
+ color: var(--muted);
328
+ font-size: 11px;
329
+ font-weight: 600;
330
+ }
331
+
332
+ .field input,
333
+ .field select,
334
+ .field textarea {
335
+ width: 100%;
336
+ min-height: 38px;
337
+ border: 1px solid var(--line-strong);
338
+ border-radius: 8px;
339
+ background: var(--input);
340
+ color: var(--text);
341
+ padding: 8px 10px;
342
+ }
343
+
344
+ .field textarea {
345
+ min-height: 90px;
346
+ resize: vertical;
347
+ }
348
+
349
+ .field input:disabled,
350
+ .field select:disabled,
351
+ .field textarea:disabled {
352
+ background: #26231f;
353
+ color: #82796f;
354
+ }
355
+
356
+ .field-description {
357
+ color: var(--muted);
358
+ font-size: 12px;
359
+ line-height: 1.35;
360
+ }
361
+
362
+ .field.advanced-field {
363
+ display: none;
364
+ }
365
+
366
+ .settings-section.show-advanced .advanced-field {
367
+ display: grid;
368
+ }
369
+
370
+ .advanced-toggle {
371
+ justify-self: start;
372
+ margin-top: 14px;
373
+ }
374
+
375
+ .action-bar {
376
+ position: fixed;
377
+ right: 0;
378
+ bottom: 0;
379
+ left: 268px;
380
+ z-index: 10;
381
+ display: grid;
382
+ grid-template-columns: minmax(0, 1fr) minmax(180px, auto) auto;
383
+ gap: 14px;
384
+ align-items: center;
385
+ min-height: 72px;
386
+ border-top: 1px solid var(--line);
387
+ background: rgba(26, 24, 21, 0.94);
388
+ padding: 12px 28px;
389
+ backdrop-filter: blur(12px);
390
+ }
391
+
392
+ .action-meta {
393
+ display: grid;
394
+ gap: 3px;
395
+ min-width: 0;
396
+ }
397
+
398
+ .action-meta strong,
399
+ .action-meta span {
400
+ overflow: hidden;
401
+ text-overflow: ellipsis;
402
+ white-space: nowrap;
403
+ }
404
+
405
+ .message-area {
406
+ min-width: 0;
407
+ color: var(--muted);
408
+ font-size: 13px;
409
+ }
410
+
411
+ .message-area.error {
412
+ color: var(--error);
413
+ }
414
+
415
+ .message-area.ok {
416
+ color: var(--ok);
417
+ }
418
+
419
+ .action-buttons {
420
+ display: flex;
421
+ gap: 8px;
422
+ }
423
+
424
+ @media (max-width: 900px) {
425
+ .app-shell {
426
+ display: block;
427
+ padding-bottom: 122px;
428
+ }
429
+
430
+ .sidebar {
431
+ position: relative;
432
+ height: auto;
433
+ border-right: 0;
434
+ border-bottom: 1px solid var(--line);
435
+ }
436
+
437
+ .section-nav {
438
+ grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
439
+ }
440
+
441
+ .main {
442
+ padding: 18px;
443
+ }
444
+
445
+ .action-bar {
446
+ left: 0;
447
+ grid-template-columns: 1fr;
448
+ align-items: stretch;
449
+ padding: 12px 18px;
450
+ }
451
+
452
+ .action-buttons {
453
+ justify-content: stretch;
454
+ }
455
+
456
+ .action-buttons button {
457
+ flex: 1;
458
+ }
459
+ }