shotgun-sh 0.2.6.dev1__py3-none-any.whl → 0.2.6.dev3__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/agents/agent_manager.py +89 -41
- shotgun/agents/common.py +13 -45
- shotgun/agents/export.py +4 -5
- shotgun/agents/history/token_counting/anthropic.py +22 -2
- shotgun/agents/models.py +50 -2
- shotgun/agents/plan.py +4 -5
- shotgun/agents/research.py +4 -5
- shotgun/agents/specify.py +4 -5
- shotgun/agents/tasks.py +4 -5
- shotgun/agents/tools/__init__.py +0 -2
- shotgun/prompts/agents/export.j2 +1 -1
- shotgun/prompts/agents/partials/common_agent_system_prompt.j2 +4 -1
- shotgun/prompts/agents/partials/interactive_mode.j2 +24 -7
- shotgun/prompts/agents/plan.j2 +1 -1
- shotgun/prompts/agents/research.j2 +1 -1
- shotgun/prompts/agents/tasks.j2 +1 -1
- shotgun/telemetry.py +8 -0
- shotgun/tui/screens/chat.py +185 -34
- shotgun/tui/screens/chat_screen/history.py +12 -78
- {shotgun_sh-0.2.6.dev1.dist-info → shotgun_sh-0.2.6.dev3.dist-info}/METADATA +1 -1
- {shotgun_sh-0.2.6.dev1.dist-info → shotgun_sh-0.2.6.dev3.dist-info}/RECORD +24 -25
- shotgun/agents/tools/user_interaction.py +0 -37
- {shotgun_sh-0.2.6.dev1.dist-info → shotgun_sh-0.2.6.dev3.dist-info}/WHEEL +0 -0
- {shotgun_sh-0.2.6.dev1.dist-info → shotgun_sh-0.2.6.dev3.dist-info}/entry_points.txt +0 -0
- {shotgun_sh-0.2.6.dev1.dist-info → shotgun_sh-0.2.6.dev3.dist-info}/licenses/LICENSE +0 -0
|
@@ -6,20 +6,20 @@ shotgun/main.py,sha256=RA3q1xPfqxCu43UmgI2ryZpA-IxPhJb_MJrbLqp9c_g,5140
|
|
|
6
6
|
shotgun/posthog_telemetry.py,sha256=TOiyBtLg21SttHGWKc4-e-PQgpbq6Uz_4OzlvlxMcZ0,6099
|
|
7
7
|
shotgun/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
8
|
shotgun/sentry_telemetry.py,sha256=VD8es-tREfgtRKhDsEVvqpo0_kM_ab6iVm2lkOEmTlI,2950
|
|
9
|
-
shotgun/telemetry.py,sha256=
|
|
9
|
+
shotgun/telemetry.py,sha256=C8dM7Feo1OxJMwDvgAMaA2RyRDO2rYPvC_8kLBuRUS8,3683
|
|
10
10
|
shotgun/agents/__init__.py,sha256=8Jzv1YsDuLyNPFJyckSr_qI4ehTVeDyIMDW4omsfPGc,25
|
|
11
|
-
shotgun/agents/agent_manager.py,sha256=
|
|
12
|
-
shotgun/agents/common.py,sha256=
|
|
11
|
+
shotgun/agents/agent_manager.py,sha256=6f86XooirrBRxyfTWRwsJk6M_kKaaoAP4Yfi6Lu7zGc,28995
|
|
12
|
+
shotgun/agents/common.py,sha256=g8QW782XZfZHjAJPC6k2uXqoX4UZufvbGaejzWgya8E,17768
|
|
13
13
|
shotgun/agents/conversation_history.py,sha256=5J8_1yxdZiiWTq22aDio88DkBDZ4_Lh_p5Iy5_ENszc,3898
|
|
14
14
|
shotgun/agents/conversation_manager.py,sha256=fxAvXbEl3Cl2ugJ4N9aWXaqZtkrnfj3QzwjWC4LFXwI,3514
|
|
15
|
-
shotgun/agents/export.py,sha256=
|
|
15
|
+
shotgun/agents/export.py,sha256=7ZNw7781WJ4peLSeoUc7zxKeaZVxFpow2y4nU4dCfbo,2919
|
|
16
16
|
shotgun/agents/llm.py,sha256=hs8j1wwTczGtehzahL1Z_5D4qus5QUx4-h9-m5ZPzm4,2209
|
|
17
17
|
shotgun/agents/messages.py,sha256=wNn0qC5AqASM8LMaSGFOerZEJPn5FsIOmaJs1bdosuU,1036
|
|
18
|
-
shotgun/agents/models.py,sha256=
|
|
19
|
-
shotgun/agents/plan.py,sha256=
|
|
20
|
-
shotgun/agents/research.py,sha256=
|
|
21
|
-
shotgun/agents/specify.py,sha256=
|
|
22
|
-
shotgun/agents/tasks.py,sha256=
|
|
18
|
+
shotgun/agents/models.py,sha256=anNz8_U95B1__VPXgxFqfzk2BRIHrIO4clJlnfedVS8,9862
|
|
19
|
+
shotgun/agents/plan.py,sha256=lVhIoRUMCX2TsFbwbgKjS2HHhNreX35j_aZRqGxFAso,2980
|
|
20
|
+
shotgun/agents/research.py,sha256=EYqUda_wtrxmUNy6Mme3NFnO_uOXBCs94m2tZzheNOE,3224
|
|
21
|
+
shotgun/agents/specify.py,sha256=38z0n_7pAgWN3oJFuOxfiEHWtEqzMha-SyPhhZ9pWag,3087
|
|
22
|
+
shotgun/agents/tasks.py,sha256=AuriwtDn6uZz2G0eKfqBHYQrxYfJlbiAd-fcsw9lU3I,2949
|
|
23
23
|
shotgun/agents/usage_manager.py,sha256=5d9JC4_cthXwhTSytMfMExMDAUYp8_nkPepTJZXk13w,5017
|
|
24
24
|
shotgun/agents/config/__init__.py,sha256=Fl8K_81zBpm-OfOW27M_WWLSFdaHHek6lWz95iDREjQ,318
|
|
25
25
|
shotgun/agents/config/constants.py,sha256=JNuLpeBUKikEsxGSjwX3RVWUQpbCKnDKstF2NczuDqk,932
|
|
@@ -35,15 +35,14 @@ shotgun/agents/history/history_processors.py,sha256=D3z-hzrXHxE7OAZaVX4_YAKN_nyx
|
|
|
35
35
|
shotgun/agents/history/message_utils.py,sha256=aPusAl2RYKbjc7lBxPaNprRHmZEG6fe97q7DQUlhlzU,2918
|
|
36
36
|
shotgun/agents/history/token_estimation.py,sha256=iRyKq-YDivEpJrULIbQgNpjhOuSC4nHVJYfsWEFV8sQ,4770
|
|
37
37
|
shotgun/agents/history/token_counting/__init__.py,sha256=YZt5Lus--fkF6l1hdkIlp1e_oAIpACNwHOI0FRP4q8s,924
|
|
38
|
-
shotgun/agents/history/token_counting/anthropic.py,sha256=
|
|
38
|
+
shotgun/agents/history/token_counting/anthropic.py,sha256=0Nf4mR7yjDbGyy8WguHse-sOENyU4X4CkthPjzbBaog,4031
|
|
39
39
|
shotgun/agents/history/token_counting/base.py,sha256=TN4mzwSyWNQyTuOuCFaU-8AgLdAyquoX3af4qrmkxCs,1904
|
|
40
40
|
shotgun/agents/history/token_counting/openai.py,sha256=XJ2z2HaUG6f3Cw9tCK_yaOsaMJGHpSFF1I30-d3soSI,2350
|
|
41
41
|
shotgun/agents/history/token_counting/sentencepiece_counter.py,sha256=qj1bT7J5nCd5y6Mr42O9K1KTaele0rjdd09FeyyEA70,3987
|
|
42
42
|
shotgun/agents/history/token_counting/tokenizer_cache.py,sha256=Y0V6KMtEwn42M5-zJGAc7YudM8X6m5-j2ekA6YGL5Xk,2868
|
|
43
43
|
shotgun/agents/history/token_counting/utils.py,sha256=d124IDjtd0IYBYrr3gDJGWxSbdP10Vrc7ZistbUosMg,5002
|
|
44
|
-
shotgun/agents/tools/__init__.py,sha256=
|
|
44
|
+
shotgun/agents/tools/__init__.py,sha256=kYppd4f4MoJcfTEPzkY2rqtxL1suXRGa9IRUm1G82GY,717
|
|
45
45
|
shotgun/agents/tools/file_management.py,sha256=HYNe_QA4T3_bPzSWBYcFZcnWdj8eb4aQ3GB735-G8Nw,7138
|
|
46
|
-
shotgun/agents/tools/user_interaction.py,sha256=b3ncEpvoD06Cz4hwsS-ppVbQajQj640iWnVfA5WBjAA,1236
|
|
47
46
|
shotgun/agents/tools/codebase/__init__.py,sha256=ceAGkK006NeOYaIJBLQsw7Q46sAyCRK9PYDs8feMQVw,661
|
|
48
47
|
shotgun/agents/tools/codebase/codebase_shell.py,sha256=9b7ZStAVFprdGqp1O23ZgwkToMytlUdp_R4MhvmENhc,8584
|
|
49
48
|
shotgun/agents/tools/codebase/directory_lister.py,sha256=eX5GKDSmbKggKDvjPpYMa2WPSGPYQAtUEZ4eN01T0t8,4703
|
|
@@ -88,15 +87,15 @@ shotgun/llm_proxy/constants.py,sha256=_4piKdyvM7pAIRdAGrzYexwWoDlueUZiEMfwWrOa4T
|
|
|
88
87
|
shotgun/prompts/__init__.py,sha256=RswUm0HMdfm2m2YKUwUsEdRIwoczdbI7zlucoEvHYRo,132
|
|
89
88
|
shotgun/prompts/loader.py,sha256=_7CdUYrAo6ZwvTBUlXugKyLU0IDBg5CVzUIAHFPw418,4433
|
|
90
89
|
shotgun/prompts/agents/__init__.py,sha256=YRIJMbzpArojNX1BP5gfxxois334z_GQga8T-xyWMbY,39
|
|
91
|
-
shotgun/prompts/agents/export.j2,sha256=
|
|
92
|
-
shotgun/prompts/agents/plan.j2,sha256=
|
|
93
|
-
shotgun/prompts/agents/research.j2,sha256=
|
|
90
|
+
shotgun/prompts/agents/export.j2,sha256=Ya224lrPklWAIbW8gLTnUMRg-ktB7baxY-NYkaIff2Y,15943
|
|
91
|
+
shotgun/prompts/agents/plan.j2,sha256=mbt505NdqmzmPxXzQYJS_gH5vkiVa2a3Dgz2K-15JZk,6093
|
|
92
|
+
shotgun/prompts/agents/research.j2,sha256=QFoSSiF_5v7c78RHaiucZEb9mOC_wF54BVKnJEH_DnI,3964
|
|
94
93
|
shotgun/prompts/agents/specify.j2,sha256=AP7XrA3KE7GZsCvW4guASxZHBM2mnrMw3irdZ3RUOBs,2808
|
|
95
|
-
shotgun/prompts/agents/tasks.j2,sha256=
|
|
94
|
+
shotgun/prompts/agents/tasks.j2,sha256=SMvTQPzRR6eHlW3fcj-7Bl-Lh9HWaiF3uAKv77nMdZw,5956
|
|
96
95
|
shotgun/prompts/agents/partials/codebase_understanding.j2,sha256=7WH-PVd-TRBFQUdOdKkwwn9hAUaJznFZMAGHhO7IGGU,5633
|
|
97
|
-
shotgun/prompts/agents/partials/common_agent_system_prompt.j2,sha256=
|
|
96
|
+
shotgun/prompts/agents/partials/common_agent_system_prompt.j2,sha256=wfjsQGcMTWWGBk9l0pKDnPehG8NrwTHm5FFEqba__LI,2161
|
|
98
97
|
shotgun/prompts/agents/partials/content_formatting.j2,sha256=MG0JB7SSp8YV5akDWpbs2f9DcdREIYqLp38NnoWLeQ0,1854
|
|
99
|
-
shotgun/prompts/agents/partials/interactive_mode.j2,sha256=
|
|
98
|
+
shotgun/prompts/agents/partials/interactive_mode.j2,sha256=nyNTURRszG_Pl7M3TS_luUshekDn9yVHfBDMkHSZ1kw,1448
|
|
100
99
|
shotgun/prompts/agents/state/system_state.j2,sha256=RPweqBYmgWMiDuOjdEDl6NLgYU7HMaUGW1jBSnD5UzQ,1270
|
|
101
100
|
shotgun/prompts/agents/state/codebase/codebase_graphs_available.j2,sha256=U-hy-H9bPwV0sYIHTZ5TESxc5EOCtntI8GUZOmJipJw,601
|
|
102
101
|
shotgun/prompts/codebase/__init__.py,sha256=NYuPMtmYM2ptuwf3YxVuotNlJOUq0hnjmwlzKcJkGK4,42
|
|
@@ -128,7 +127,7 @@ shotgun/tui/components/prompt_input.py,sha256=Ss-htqraHZAPaehGE4x86ij0veMjc4Ugad
|
|
|
128
127
|
shotgun/tui/components/spinner.py,sha256=ovTDeaJ6FD6chZx_Aepia6R3UkPOVJ77EKHfRmn39MY,2427
|
|
129
128
|
shotgun/tui/components/splash.py,sha256=vppy9vEIEvywuUKRXn2y11HwXSRkQZHLYoVjhDVdJeU,1267
|
|
130
129
|
shotgun/tui/components/vertical_tail.py,sha256=kROwTaRjUwVB7H35dtmNcUVPQqNYvvfq7K2tXBKEb6c,638
|
|
131
|
-
shotgun/tui/screens/chat.py,sha256=
|
|
130
|
+
shotgun/tui/screens/chat.py,sha256=78GaZMKN2iE7bQQwiKBWFTsRoraWnuWl91qPjo5q1Nw,35446
|
|
132
131
|
shotgun/tui/screens/chat.tcss,sha256=2Yq3E23jxsySYsgZf4G1AYrYVcpX0UDW6kNNI0tDmtM,437
|
|
133
132
|
shotgun/tui/screens/directory_setup.py,sha256=lIZ1J4A6g5Q2ZBX8epW7BhR96Dmdcg22CyiM5S-I5WU,3237
|
|
134
133
|
shotgun/tui/screens/feedback.py,sha256=VxpW0PVxMp22ZvSfQkTtgixNrpEOlfWtekjqlVfYEjA,5708
|
|
@@ -140,7 +139,7 @@ shotgun/tui/screens/welcome.py,sha256=r-RjtzjMhAaA0XKgnYKdZOuE07bcBi223fleKEf-Fa
|
|
|
140
139
|
shotgun/tui/screens/chat_screen/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
141
140
|
shotgun/tui/screens/chat_screen/command_providers.py,sha256=7Xnxd4k30bpLOMZSX32bcugU4IgpqU4Y8f6eHWKXd4o,12694
|
|
142
141
|
shotgun/tui/screens/chat_screen/hint_message.py,sha256=WOpbk8q7qt7eOHTyyHvh_IQIaublVDeJGaLpsxEk9FA,933
|
|
143
|
-
shotgun/tui/screens/chat_screen/history.py,sha256=
|
|
142
|
+
shotgun/tui/screens/chat_screen/history.py,sha256=Bv7t1bcCf66X2qNEgwGMpPzNcxy4QZC4USshbctmJzA,12274
|
|
144
143
|
shotgun/tui/utils/__init__.py,sha256=cFjDfoXTRBq29wgP7TGRWUu1eFfiIG-LLOzjIGfadgI,150
|
|
145
144
|
shotgun/tui/utils/mode_progress.py,sha256=lseRRo7kMWLkBzI3cU5vqJmS2ZcCjyRYf9Zwtvc-v58,10931
|
|
146
145
|
shotgun/utils/__init__.py,sha256=WinIEp9oL2iMrWaDkXz2QX4nYVPAm8C9aBSKTeEwLtE,198
|
|
@@ -149,8 +148,8 @@ shotgun/utils/env_utils.py,sha256=ulM3BRi9ZhS7uC-zorGeDQm4SHvsyFuuU9BtVPqdrHY,14
|
|
|
149
148
|
shotgun/utils/file_system_utils.py,sha256=l-0p1bEHF34OU19MahnRFdClHufThfGAjQ431teAIp0,1004
|
|
150
149
|
shotgun/utils/source_detection.py,sha256=Co6Q03R3fT771TF3RzB-70stfjNP2S4F_ArZKibwzm8,454
|
|
151
150
|
shotgun/utils/update_checker.py,sha256=IgzPHRhS1ETH7PnJR_dIx6lxgr1qHpCkMTgzUxvGjhI,7586
|
|
152
|
-
shotgun_sh-0.2.6.
|
|
153
|
-
shotgun_sh-0.2.6.
|
|
154
|
-
shotgun_sh-0.2.6.
|
|
155
|
-
shotgun_sh-0.2.6.
|
|
156
|
-
shotgun_sh-0.2.6.
|
|
151
|
+
shotgun_sh-0.2.6.dev3.dist-info/METADATA,sha256=EZjXc7FhWhNdBYF9mP0vgCN9ANATGsCQtmcVq58OVn4,11226
|
|
152
|
+
shotgun_sh-0.2.6.dev3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
153
|
+
shotgun_sh-0.2.6.dev3.dist-info/entry_points.txt,sha256=asZxLU4QILneq0MWW10saVCZc4VWhZfb0wFZvERnzfA,45
|
|
154
|
+
shotgun_sh-0.2.6.dev3.dist-info/licenses/LICENSE,sha256=YebsZl590zCHrF_acCU5pmNt0pnAfD2DmAnevJPB1tY,1065
|
|
155
|
+
shotgun_sh-0.2.6.dev3.dist-info/RECORD,,
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"""User interaction tools for Pydantic AI agents."""
|
|
2
|
-
|
|
3
|
-
from asyncio import get_running_loop
|
|
4
|
-
|
|
5
|
-
from pydantic_ai import CallDeferred, RunContext
|
|
6
|
-
|
|
7
|
-
from shotgun.agents.models import AgentDeps, UserQuestion
|
|
8
|
-
from shotgun.logging_config import get_logger
|
|
9
|
-
|
|
10
|
-
logger = get_logger(__name__)
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
async def ask_user(ctx: RunContext[AgentDeps], question: str) -> str:
|
|
14
|
-
"""Ask the human a question and return the answer.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
Args:
|
|
18
|
-
question: The question to ask the user with a clear CTA at the end. Needs to be is readable, clear, and easy to understand. Use Markdown formatting. Make key phrases and words stand out.
|
|
19
|
-
|
|
20
|
-
Returns:
|
|
21
|
-
The user's response as a string
|
|
22
|
-
"""
|
|
23
|
-
tool_call_id = ctx.tool_call_id
|
|
24
|
-
assert tool_call_id is not None # noqa: S101
|
|
25
|
-
|
|
26
|
-
try:
|
|
27
|
-
logger.debug("\n👉 %s\n", question)
|
|
28
|
-
future = get_running_loop().create_future()
|
|
29
|
-
await ctx.deps.queue.put(
|
|
30
|
-
UserQuestion(question=question, tool_call_id=tool_call_id, result=future)
|
|
31
|
-
)
|
|
32
|
-
ctx.deps.tasks.append(future)
|
|
33
|
-
raise CallDeferred(question)
|
|
34
|
-
|
|
35
|
-
except (EOFError, KeyboardInterrupt):
|
|
36
|
-
logger.warning("User input interrupted or unavailable")
|
|
37
|
-
return "User input not available or interrupted"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|