shotgun-sh 0.1.0.dev7__py3-none-any.whl → 0.1.0.dev8__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.
- shotgun/__init__.py +3 -1
- shotgun/agents/config/manager.py +34 -7
- shotgun/agents/config/models.py +2 -0
- shotgun/build_constants.py +20 -0
- shotgun/cli/config.py +14 -0
- shotgun/cli/plan.py +11 -0
- shotgun/cli/research.py +11 -0
- shotgun/cli/tasks.py +11 -0
- shotgun/cli/update.py +152 -0
- shotgun/main.py +73 -3
- shotgun/posthog_telemetry.py +156 -0
- shotgun/sentry_telemetry.py +85 -0
- shotgun/telemetry.py +45 -3
- shotgun/tui/app.py +38 -3
- shotgun/utils/update_checker.py +375 -0
- {shotgun_sh-0.1.0.dev7.dist-info → shotgun_sh-0.1.0.dev8.dist-info}/METADATA +150 -1
- {shotgun_sh-0.1.0.dev7.dist-info → shotgun_sh-0.1.0.dev8.dist-info}/RECORD +20 -15
- {shotgun_sh-0.1.0.dev7.dist-info → shotgun_sh-0.1.0.dev8.dist-info}/WHEEL +0 -0
- {shotgun_sh-0.1.0.dev7.dist-info → shotgun_sh-0.1.0.dev8.dist-info}/entry_points.txt +0 -0
- {shotgun_sh-0.1.0.dev7.dist-info → shotgun_sh-0.1.0.dev8.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: shotgun-sh
|
|
3
|
-
Version: 0.1.0.
|
|
3
|
+
Version: 0.1.0.dev8
|
|
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
|
|
@@ -29,8 +29,11 @@ Requires-Dist: jinja2>=3.1.0
|
|
|
29
29
|
Requires-Dist: kuzu>=0.7.0
|
|
30
30
|
Requires-Dist: logfire[pydantic-ai]>=2.0.0
|
|
31
31
|
Requires-Dist: openai>=1.0.0
|
|
32
|
+
Requires-Dist: packaging>=23.0
|
|
33
|
+
Requires-Dist: posthog>=3.0.0
|
|
32
34
|
Requires-Dist: pydantic-ai>=0.0.14
|
|
33
35
|
Requires-Dist: rich>=13.0.0
|
|
36
|
+
Requires-Dist: sentry-sdk[pure-eval]>=2.0.0
|
|
34
37
|
Requires-Dist: textual-dev>=1.7.0
|
|
35
38
|
Requires-Dist: textual>=6.1.0
|
|
36
39
|
Requires-Dist: tree-sitter-go>=0.23.0
|
|
@@ -131,6 +134,44 @@ uv run shotgun plan "Build a web application"
|
|
|
131
134
|
uv run shotgun tasks "Create a machine learning model"
|
|
132
135
|
```
|
|
133
136
|
|
|
137
|
+
## Auto-Updates
|
|
138
|
+
|
|
139
|
+
Shotgun automatically checks for updates to keep you on the latest version.
|
|
140
|
+
|
|
141
|
+
### How it works
|
|
142
|
+
|
|
143
|
+
- Checks for updates on startup (runs in background, non-blocking)
|
|
144
|
+
- Caches results for 24 hours to minimize API calls
|
|
145
|
+
- Shows notification after command execution if an update is available
|
|
146
|
+
- Never auto-updates development versions
|
|
147
|
+
|
|
148
|
+
### Update Commands
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
# Check for available updates
|
|
152
|
+
shotgun update --check
|
|
153
|
+
|
|
154
|
+
# Install available updates
|
|
155
|
+
shotgun update
|
|
156
|
+
|
|
157
|
+
# Force update (even for dev versions with confirmation)
|
|
158
|
+
shotgun update --force
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Disable Update Checks
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
# Disable for a single command
|
|
165
|
+
shotgun --no-update-check research "topic"
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### Installation Methods
|
|
169
|
+
|
|
170
|
+
The update command automatically detects and uses the appropriate method:
|
|
171
|
+
- **pipx**: `pipx upgrade shotgun-sh`
|
|
172
|
+
- **pip**: `pip install --upgrade shotgun-sh`
|
|
173
|
+
- **venv**: Updates within the virtual environment
|
|
174
|
+
|
|
134
175
|
## Development Setup
|
|
135
176
|
|
|
136
177
|
### Requirements
|
|
@@ -312,6 +353,114 @@ GitHub Actions automatically:
|
|
|
312
353
|
- Validates code with ruff, ruff-format, and mypy
|
|
313
354
|
- Ensures all checks pass before merge
|
|
314
355
|
|
|
356
|
+
## Observability & Telemetry
|
|
357
|
+
|
|
358
|
+
Shotgun includes built-in observability with Sentry for error tracking and Logfire for logging and tracing. Both services track users anonymously using a UUID generated on first run.
|
|
359
|
+
|
|
360
|
+
### Anonymous User Tracking
|
|
361
|
+
|
|
362
|
+
Each user gets a unique anonymous ID stored in their config:
|
|
363
|
+
```bash
|
|
364
|
+
# Get your anonymous user ID
|
|
365
|
+
shotgun config get-user-id
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
This ID is automatically included in:
|
|
369
|
+
- **Sentry**: Error reports and exceptions
|
|
370
|
+
- **Logfire**: All logs, traces, and spans
|
|
371
|
+
|
|
372
|
+
### Logfire Queries
|
|
373
|
+
|
|
374
|
+
Logfire uses SQL for querying logs. Here are helpful queries for debugging and analysis:
|
|
375
|
+
|
|
376
|
+
#### Find all logs for a specific user
|
|
377
|
+
```sql
|
|
378
|
+
SELECT * FROM records
|
|
379
|
+
WHERE attributes->>'user_id' = 'your-user-id-here'
|
|
380
|
+
ORDER BY timestamp DESC;
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
#### Track user actions
|
|
384
|
+
```sql
|
|
385
|
+
SELECT
|
|
386
|
+
timestamp,
|
|
387
|
+
span_name,
|
|
388
|
+
message,
|
|
389
|
+
attributes
|
|
390
|
+
FROM records
|
|
391
|
+
WHERE attributes->>'user_id' = 'your-user-id-here'
|
|
392
|
+
AND span_name LIKE '%research%'
|
|
393
|
+
ORDER BY timestamp DESC;
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
#### Find slow operations for a user
|
|
397
|
+
```sql
|
|
398
|
+
SELECT
|
|
399
|
+
span_name,
|
|
400
|
+
duration_ms,
|
|
401
|
+
attributes
|
|
402
|
+
FROM records
|
|
403
|
+
WHERE attributes->>'user_id' = 'your-user-id-here'
|
|
404
|
+
AND duration_ms > 1000
|
|
405
|
+
ORDER BY duration_ms DESC;
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
#### Find errors for a user
|
|
409
|
+
```sql
|
|
410
|
+
SELECT * FROM records
|
|
411
|
+
WHERE attributes->>'user_id' = 'your-user-id-here'
|
|
412
|
+
AND level = 'error'
|
|
413
|
+
ORDER BY timestamp DESC;
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
#### Analyze user's AI provider usage
|
|
417
|
+
```sql
|
|
418
|
+
SELECT
|
|
419
|
+
attributes->>'provider' as provider,
|
|
420
|
+
COUNT(*) as usage_count,
|
|
421
|
+
AVG(duration_ms) as avg_duration
|
|
422
|
+
FROM records
|
|
423
|
+
WHERE attributes->>'user_id' = 'your-user-id-here'
|
|
424
|
+
AND attributes->>'provider' IS NOT NULL
|
|
425
|
+
GROUP BY provider;
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
#### Track feature usage by user
|
|
429
|
+
```sql
|
|
430
|
+
SELECT
|
|
431
|
+
span_name,
|
|
432
|
+
COUNT(*) as usage_count
|
|
433
|
+
FROM records
|
|
434
|
+
WHERE attributes->>'user_id' = 'your-user-id-here'
|
|
435
|
+
AND span_name IN ('research', 'plan', 'tasks')
|
|
436
|
+
GROUP BY span_name
|
|
437
|
+
ORDER BY usage_count DESC;
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
### Setting Up Observability (Optional)
|
|
441
|
+
|
|
442
|
+
For local development with Logfire:
|
|
443
|
+
```bash
|
|
444
|
+
# Set environment variables
|
|
445
|
+
export LOGFIRE_ENABLED=true
|
|
446
|
+
export LOGFIRE_TOKEN=your-logfire-token
|
|
447
|
+
|
|
448
|
+
# Run shotgun - will now send logs to Logfire
|
|
449
|
+
shotgun research "topic"
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
For Sentry (automatically configured in production builds):
|
|
453
|
+
```bash
|
|
454
|
+
# Set for local development
|
|
455
|
+
export SENTRY_DSN=your-sentry-dsn
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
### Privacy
|
|
459
|
+
|
|
460
|
+
- **No PII collected**: Only anonymous UUIDs are used for identification
|
|
461
|
+
- **Opt-in for development**: Telemetry requires explicit environment variables
|
|
462
|
+
- **Automatic in production**: Production builds include telemetry for error tracking
|
|
463
|
+
|
|
315
464
|
## Support
|
|
316
465
|
|
|
317
466
|
Join our discord https://discord.gg/5RmY6J2N7s
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
shotgun/__init__.py,sha256=
|
|
1
|
+
shotgun/__init__.py,sha256=P40K0fnIsb7SKcQrFnXZ4aREjpWchVDhvM1HxI4cyIQ,104
|
|
2
|
+
shotgun/build_constants.py,sha256=RXNxMz46HaB5jucgMVpw8a2yCJqjbhTOh0PddyEVMN8,713
|
|
2
3
|
shotgun/logging_config.py,sha256=EJL2kpwH8-zRtpKit3_BbpeUxbRR-wen3MaNXuHCoD4,5600
|
|
3
|
-
shotgun/main.py,sha256=
|
|
4
|
+
shotgun/main.py,sha256=7gXkTNmwqW2phBnENn76bUyh5Qm68Iq7NBf3GnWG6J0,4618
|
|
5
|
+
shotgun/posthog_telemetry.py,sha256=7drAXtedvZmpPqq4_9dI19kJ_xEHGk7XKXQk797QvCM,4954
|
|
4
6
|
shotgun/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
-
shotgun/
|
|
7
|
+
shotgun/sentry_telemetry.py,sha256=3r9on0GQposn9aX6Dkb9mrfaVQl_dIZzhu9BjE838AU,2854
|
|
8
|
+
shotgun/telemetry.py,sha256=p4l9GxDfoxbEsmUpuSkQclRMhVFWqsOv97ze60KxRjk,2899
|
|
6
9
|
shotgun/agents/__init__.py,sha256=8Jzv1YsDuLyNPFJyckSr_qI4ehTVeDyIMDW4omsfPGc,25
|
|
7
10
|
shotgun/agents/agent_manager.py,sha256=1Aof8btrV2Ei3V3bNn8bLzdBiBsJ-sjaQq0t7bnwbpo,6564
|
|
8
11
|
shotgun/agents/common.py,sha256=xNlbvwt68de2588930iI4JnNVyPMGsUEwf_ySFXttFE,9439
|
|
@@ -11,8 +14,8 @@ shotgun/agents/plan.py,sha256=mSkaMfavZ1-WNJ-Yk-8ivbNtmbOz-TZI4oO8vIXXu5Y,3537
|
|
|
11
14
|
shotgun/agents/research.py,sha256=zDoS1BLVn7Wvcc4VAoYWOZ33IhtaHCY_CIlvEFiD1_A,4089
|
|
12
15
|
shotgun/agents/tasks.py,sha256=8miXmOB6zp-9jTZgzpgs-109M5BWAg0n5-TD5D8tm1c,3648
|
|
13
16
|
shotgun/agents/config/__init__.py,sha256=Fl8K_81zBpm-OfOW27M_WWLSFdaHHek6lWz95iDREjQ,318
|
|
14
|
-
shotgun/agents/config/manager.py,sha256=
|
|
15
|
-
shotgun/agents/config/models.py,sha256=
|
|
17
|
+
shotgun/agents/config/manager.py,sha256=gUeLtJHk9WUXgWeP9ftZAj1e57wLynjazane0IV7SZY,8601
|
|
18
|
+
shotgun/agents/config/models.py,sha256=AsstJiAJ1J0_7Lv3IuyKsJYQG_g2CHwwKJoWD3eCtgg,3678
|
|
16
19
|
shotgun/agents/config/provider.py,sha256=tN__agB1MiaNL49HTDUz1QzvOXTegLRoJ9xQKoklK-k,5820
|
|
17
20
|
shotgun/agents/history/__init__.py,sha256=XFQj2a6fxDqVg0Q3juvN9RjV_RJbgvFZtQOCOjVJyp4,147
|
|
18
21
|
shotgun/agents/history/history_processors.py,sha256=U0HiJM4zVLfwUnlZ6_2YoXNRteedMxwmr52KE4jky5w,7036
|
|
@@ -32,11 +35,12 @@ shotgun/agents/tools/web_search/gemini.py,sha256=RB7AeGDBvjlsA2RLCI8ErxZh3gOPtA0
|
|
|
32
35
|
shotgun/agents/tools/web_search/openai.py,sha256=ItpV3IquamYJ13ZNUHYjXrSsgOROD51jDd2mwnz0KCE,2972
|
|
33
36
|
shotgun/agents/tools/web_search/utils.py,sha256=GLJ5QV9bT2ubFMuFN7caMN7tK9OTJ0R3GD57B-tCMF0,532
|
|
34
37
|
shotgun/cli/__init__.py,sha256=_F1uW2g87y4bGFxz8Gp8u7mq2voHp8vQIUtCmm8Tojo,40
|
|
35
|
-
shotgun/cli/config.py,sha256=
|
|
38
|
+
shotgun/cli/config.py,sha256=LbjxDNPdetYJiwlcyOYLnqwzALfgU-m54cfstUshbrs,8715
|
|
36
39
|
shotgun/cli/models.py,sha256=LoajeEK7MEDUSnZXb1Li-dbhXqne812YZglx-LcVpiQ,181
|
|
37
|
-
shotgun/cli/plan.py,sha256=
|
|
38
|
-
shotgun/cli/research.py,sha256=
|
|
39
|
-
shotgun/cli/tasks.py,sha256=
|
|
40
|
+
shotgun/cli/plan.py,sha256=PNlqpmGkcoEaqK-8khveX1xX9i3-Xmdv-JJbPmlgIMA,2492
|
|
41
|
+
shotgun/cli/research.py,sha256=qvBBtX3Wyn6pDZlJpcEvbeK-0iTOXegi71tm8HKVYaE,2490
|
|
42
|
+
shotgun/cli/tasks.py,sha256=OUdxbB7EU5XVe0QeiTlVTayhLKlQN9HrzDyjoAMf708,2597
|
|
43
|
+
shotgun/cli/update.py,sha256=3IWt3vbFprsyiRH8J-YYVSOuga7Spi7SrbQVvKH8r5U,4771
|
|
40
44
|
shotgun/cli/utils.py,sha256=umVWXDx8pelovMk-nT8B7m0c39AKY9hHsuAMnbw_Hcg,732
|
|
41
45
|
shotgun/cli/codebase/__init__.py,sha256=rKdvx33p0i_BYbNkz5_4DCFgEMwzOOqLi9f5p7XTLKM,73
|
|
42
46
|
shotgun/cli/codebase/commands.py,sha256=zvcM9gjHHO6styhXojb_1bnpq-Cozh2c77ZOIjw4B8s,6683
|
|
@@ -79,7 +83,7 @@ shotgun/sdk/exceptions.py,sha256=qBcQv0v7ZTwP7CMcxZST4GqCsfOWtOUjSzGBo0-heqo,412
|
|
|
79
83
|
shotgun/sdk/models.py,sha256=RsR9e2wiVrNGP2zTvjIZVvBlibgluuhDZlCNcw8JTTA,5488
|
|
80
84
|
shotgun/sdk/services.py,sha256=J4PJFSxCQ6--u7rb3Ta-9eYtlYcxcbnzrMP6ThyCnw4,705
|
|
81
85
|
shotgun/tui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
82
|
-
shotgun/tui/app.py,sha256=
|
|
86
|
+
shotgun/tui/app.py,sha256=gHxqOWjJ9hGDRz6esnoM2JTyaP_IWTWmsYnO8pwpeDQ,2762
|
|
83
87
|
shotgun/tui/styles.tcss,sha256=ETyyw1bpMBOqTi5RLcAJUScdPWTvAWEqE9YcT0kVs_E,121
|
|
84
88
|
shotgun/tui/components/prompt_input.py,sha256=Ss-htqraHZAPaehGE4x86ij0veMjc4UgadMXpbdXr40,2229
|
|
85
89
|
shotgun/tui/components/spinner.py,sha256=ovTDeaJ6FD6chZx_Aepia6R3UkPOVJ77EKHfRmn39MY,2427
|
|
@@ -91,8 +95,9 @@ shotgun/tui/screens/provider_config.py,sha256=A_tvDHF5KLP5PV60LjMJ_aoOdT3TjI6_g0
|
|
|
91
95
|
shotgun/tui/screens/splash.py,sha256=E2MsJihi3c9NY1L28o_MstDxGwrCnnV7zdq00MrGAsw,706
|
|
92
96
|
shotgun/utils/__init__.py,sha256=WinIEp9oL2iMrWaDkXz2QX4nYVPAm8C9aBSKTeEwLtE,198
|
|
93
97
|
shotgun/utils/file_system_utils.py,sha256=KQCxgkspb1CR8VE1n66q7-oT6O7MmV_edCXFEEO-CNY,871
|
|
94
|
-
|
|
95
|
-
shotgun_sh-0.1.0.
|
|
96
|
-
shotgun_sh-0.1.0.
|
|
97
|
-
shotgun_sh-0.1.0.
|
|
98
|
-
shotgun_sh-0.1.0.
|
|
98
|
+
shotgun/utils/update_checker.py,sha256=Xf-7w3Pos3etzCoT771gJe2HLkA8_V2GrqWy7ni9UqA,11373
|
|
99
|
+
shotgun_sh-0.1.0.dev8.dist-info/METADATA,sha256=EYMSwvdWlWiwseTmyKYNvPZraUta6RQXtRqSRzwpz5o,11239
|
|
100
|
+
shotgun_sh-0.1.0.dev8.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
101
|
+
shotgun_sh-0.1.0.dev8.dist-info/entry_points.txt,sha256=zMC2AP_RmTKW4s4FlQRdap3AzzPOUvByudp8cALAiVY,71
|
|
102
|
+
shotgun_sh-0.1.0.dev8.dist-info/licenses/LICENSE,sha256=YebsZl590zCHrF_acCU5pmNt0pnAfD2DmAnevJPB1tY,1065
|
|
103
|
+
shotgun_sh-0.1.0.dev8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|