shotgun-sh 0.2.29.dev2__py3-none-any.whl → 0.6.1.dev1__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 +497 -30
- shotgun/agents/cancellation.py +103 -0
- shotgun/agents/common.py +90 -77
- shotgun/agents/config/README.md +0 -1
- shotgun/agents/config/manager.py +52 -8
- shotgun/agents/config/models.py +48 -45
- shotgun/agents/config/provider.py +44 -29
- shotgun/agents/conversation/history/file_content_deduplication.py +66 -43
- shotgun/agents/conversation/history/token_counting/base.py +51 -9
- shotgun/agents/export.py +12 -13
- shotgun/agents/file_read.py +176 -0
- shotgun/agents/messages.py +15 -3
- shotgun/agents/models.py +90 -2
- shotgun/agents/plan.py +12 -13
- shotgun/agents/research.py +13 -10
- shotgun/agents/router/__init__.py +47 -0
- shotgun/agents/router/models.py +384 -0
- shotgun/agents/router/router.py +185 -0
- shotgun/agents/router/tools/__init__.py +18 -0
- shotgun/agents/router/tools/delegation_tools.py +557 -0
- shotgun/agents/router/tools/plan_tools.py +403 -0
- shotgun/agents/runner.py +17 -2
- shotgun/agents/specify.py +12 -13
- shotgun/agents/tasks.py +12 -13
- shotgun/agents/tools/__init__.py +8 -0
- shotgun/agents/tools/codebase/directory_lister.py +27 -39
- shotgun/agents/tools/codebase/file_read.py +26 -35
- shotgun/agents/tools/codebase/query_graph.py +9 -0
- shotgun/agents/tools/codebase/retrieve_code.py +9 -0
- shotgun/agents/tools/file_management.py +81 -3
- shotgun/agents/tools/file_read_tools/__init__.py +7 -0
- shotgun/agents/tools/file_read_tools/multimodal_file_read.py +167 -0
- shotgun/agents/tools/markdown_tools/__init__.py +62 -0
- shotgun/agents/tools/markdown_tools/insert_section.py +148 -0
- shotgun/agents/tools/markdown_tools/models.py +86 -0
- shotgun/agents/tools/markdown_tools/remove_section.py +114 -0
- shotgun/agents/tools/markdown_tools/replace_section.py +119 -0
- shotgun/agents/tools/markdown_tools/utils.py +453 -0
- shotgun/agents/tools/registry.py +41 -0
- shotgun/agents/tools/web_search/__init__.py +1 -2
- shotgun/agents/tools/web_search/gemini.py +1 -3
- shotgun/agents/tools/web_search/openai.py +42 -23
- shotgun/attachments/__init__.py +41 -0
- shotgun/attachments/errors.py +60 -0
- shotgun/attachments/models.py +107 -0
- shotgun/attachments/parser.py +257 -0
- shotgun/attachments/processor.py +193 -0
- shotgun/cli/clear.py +2 -2
- shotgun/cli/codebase/commands.py +181 -65
- shotgun/cli/compact.py +2 -2
- shotgun/cli/context.py +2 -2
- shotgun/cli/run.py +90 -0
- shotgun/cli/spec/backup.py +2 -1
- shotgun/cli/spec/commands.py +2 -0
- shotgun/cli/spec/models.py +18 -0
- shotgun/cli/spec/pull_service.py +122 -68
- shotgun/codebase/__init__.py +2 -0
- shotgun/codebase/benchmarks/__init__.py +35 -0
- shotgun/codebase/benchmarks/benchmark_runner.py +309 -0
- shotgun/codebase/benchmarks/exporters.py +119 -0
- shotgun/codebase/benchmarks/formatters/__init__.py +49 -0
- shotgun/codebase/benchmarks/formatters/base.py +34 -0
- shotgun/codebase/benchmarks/formatters/json_formatter.py +106 -0
- shotgun/codebase/benchmarks/formatters/markdown.py +136 -0
- shotgun/codebase/benchmarks/models.py +129 -0
- shotgun/codebase/core/__init__.py +4 -0
- shotgun/codebase/core/call_resolution.py +91 -0
- shotgun/codebase/core/change_detector.py +11 -6
- shotgun/codebase/core/errors.py +159 -0
- shotgun/codebase/core/extractors/__init__.py +23 -0
- shotgun/codebase/core/extractors/base.py +138 -0
- shotgun/codebase/core/extractors/factory.py +63 -0
- shotgun/codebase/core/extractors/go/__init__.py +7 -0
- shotgun/codebase/core/extractors/go/extractor.py +122 -0
- shotgun/codebase/core/extractors/javascript/__init__.py +7 -0
- shotgun/codebase/core/extractors/javascript/extractor.py +132 -0
- shotgun/codebase/core/extractors/protocol.py +109 -0
- shotgun/codebase/core/extractors/python/__init__.py +7 -0
- shotgun/codebase/core/extractors/python/extractor.py +141 -0
- shotgun/codebase/core/extractors/rust/__init__.py +7 -0
- shotgun/codebase/core/extractors/rust/extractor.py +139 -0
- shotgun/codebase/core/extractors/types.py +15 -0
- shotgun/codebase/core/extractors/typescript/__init__.py +7 -0
- shotgun/codebase/core/extractors/typescript/extractor.py +92 -0
- shotgun/codebase/core/gitignore.py +252 -0
- shotgun/codebase/core/ingestor.py +644 -354
- shotgun/codebase/core/kuzu_compat.py +119 -0
- shotgun/codebase/core/language_config.py +239 -0
- shotgun/codebase/core/manager.py +256 -46
- shotgun/codebase/core/metrics_collector.py +310 -0
- shotgun/codebase/core/metrics_types.py +347 -0
- shotgun/codebase/core/parallel_executor.py +424 -0
- shotgun/codebase/core/work_distributor.py +254 -0
- shotgun/codebase/core/worker.py +768 -0
- shotgun/codebase/indexing_state.py +86 -0
- shotgun/codebase/models.py +94 -0
- shotgun/codebase/service.py +13 -0
- shotgun/exceptions.py +1 -1
- shotgun/main.py +2 -10
- shotgun/prompts/agents/export.j2 +2 -0
- shotgun/prompts/agents/file_read.j2 +48 -0
- shotgun/prompts/agents/partials/common_agent_system_prompt.j2 +20 -28
- shotgun/prompts/agents/partials/content_formatting.j2 +12 -33
- shotgun/prompts/agents/partials/interactive_mode.j2 +9 -32
- shotgun/prompts/agents/partials/router_delegation_mode.j2 +35 -0
- shotgun/prompts/agents/plan.j2 +43 -1
- shotgun/prompts/agents/research.j2 +75 -20
- shotgun/prompts/agents/router.j2 +713 -0
- shotgun/prompts/agents/specify.j2 +94 -4
- shotgun/prompts/agents/state/codebase/codebase_graphs_available.j2 +14 -1
- shotgun/prompts/agents/state/system_state.j2 +24 -15
- shotgun/prompts/agents/tasks.j2 +77 -23
- shotgun/settings.py +44 -0
- shotgun/shotgun_web/shared_specs/upload_pipeline.py +38 -0
- shotgun/tui/app.py +90 -23
- shotgun/tui/commands/__init__.py +9 -1
- shotgun/tui/components/attachment_bar.py +87 -0
- shotgun/tui/components/mode_indicator.py +120 -25
- shotgun/tui/components/prompt_input.py +23 -28
- shotgun/tui/components/status_bar.py +5 -4
- shotgun/tui/dependencies.py +58 -8
- shotgun/tui/protocols.py +37 -0
- shotgun/tui/screens/chat/chat.tcss +24 -1
- shotgun/tui/screens/chat/chat_screen.py +1374 -211
- shotgun/tui/screens/chat/codebase_index_prompt_screen.py +8 -4
- shotgun/tui/screens/chat_screen/attachment_hint.py +40 -0
- shotgun/tui/screens/chat_screen/command_providers.py +0 -97
- shotgun/tui/screens/chat_screen/history/agent_response.py +7 -3
- shotgun/tui/screens/chat_screen/history/chat_history.py +49 -6
- shotgun/tui/screens/chat_screen/history/formatters.py +75 -15
- shotgun/tui/screens/chat_screen/history/partial_response.py +11 -1
- shotgun/tui/screens/chat_screen/history/user_question.py +25 -3
- shotgun/tui/screens/chat_screen/messages.py +219 -0
- shotgun/tui/screens/database_locked_dialog.py +219 -0
- shotgun/tui/screens/database_timeout_dialog.py +158 -0
- shotgun/tui/screens/kuzu_error_dialog.py +135 -0
- shotgun/tui/screens/model_picker.py +14 -9
- shotgun/tui/screens/models.py +11 -0
- shotgun/tui/screens/shotgun_auth.py +50 -0
- shotgun/tui/screens/spec_pull.py +2 -0
- shotgun/tui/state/processing_state.py +19 -0
- shotgun/tui/utils/mode_progress.py +20 -86
- shotgun/tui/widgets/__init__.py +2 -1
- shotgun/tui/widgets/approval_widget.py +152 -0
- shotgun/tui/widgets/cascade_confirmation_widget.py +203 -0
- shotgun/tui/widgets/plan_panel.py +129 -0
- shotgun/tui/widgets/step_checkpoint_widget.py +180 -0
- shotgun/tui/widgets/widget_coordinator.py +18 -0
- shotgun/utils/file_system_utils.py +4 -1
- {shotgun_sh-0.2.29.dev2.dist-info → shotgun_sh-0.6.1.dev1.dist-info}/METADATA +88 -34
- shotgun_sh-0.6.1.dev1.dist-info/RECORD +292 -0
- shotgun/cli/export.py +0 -81
- shotgun/cli/plan.py +0 -73
- shotgun/cli/research.py +0 -93
- shotgun/cli/specify.py +0 -70
- shotgun/cli/tasks.py +0 -78
- shotgun/tui/screens/onboarding.py +0 -580
- shotgun_sh-0.2.29.dev2.dist-info/RECORD +0 -229
- {shotgun_sh-0.2.29.dev2.dist-info → shotgun_sh-0.6.1.dev1.dist-info}/WHEEL +0 -0
- {shotgun_sh-0.2.29.dev2.dist-info → shotgun_sh-0.6.1.dev1.dist-info}/entry_points.txt +0 -0
- {shotgun_sh-0.2.29.dev2.dist-info → shotgun_sh-0.6.1.dev1.dist-info}/licenses/LICENSE +0 -0
shotgun/cli/plan.py
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
"""Plan command for shotgun CLI."""
|
|
2
|
-
|
|
3
|
-
import asyncio
|
|
4
|
-
from typing import Annotated
|
|
5
|
-
|
|
6
|
-
import typer
|
|
7
|
-
|
|
8
|
-
from shotgun.agents.config import ProviderType
|
|
9
|
-
from shotgun.agents.models import AgentRuntimeOptions
|
|
10
|
-
from shotgun.agents.plan import create_plan_agent, run_plan_agent
|
|
11
|
-
from shotgun.cli.error_handler import print_agent_error
|
|
12
|
-
from shotgun.exceptions import ErrorNotPickedUpBySentry
|
|
13
|
-
from shotgun.logging_config import get_logger
|
|
14
|
-
from shotgun.posthog_telemetry import track_event
|
|
15
|
-
|
|
16
|
-
app = typer.Typer(name="plan", help="Generate structured plans", no_args_is_help=True)
|
|
17
|
-
logger = get_logger(__name__)
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
@app.callback(invoke_without_command=True)
|
|
21
|
-
def plan(
|
|
22
|
-
goal: Annotated[str, typer.Argument(help="Goal or objective to plan for")],
|
|
23
|
-
non_interactive: Annotated[
|
|
24
|
-
bool,
|
|
25
|
-
typer.Option(
|
|
26
|
-
"--non-interactive", "-n", help="Disable user interaction (for CI/CD)"
|
|
27
|
-
),
|
|
28
|
-
] = False,
|
|
29
|
-
provider: Annotated[
|
|
30
|
-
ProviderType | None,
|
|
31
|
-
typer.Option("--provider", "-p", help="AI provider to use (overrides default)"),
|
|
32
|
-
] = None,
|
|
33
|
-
) -> None:
|
|
34
|
-
"""Generate a structured plan for achieving the given goal.
|
|
35
|
-
|
|
36
|
-
This command will create detailed, actionable plans broken down into steps
|
|
37
|
-
and milestones to help achieve your specified objective. It can also update
|
|
38
|
-
existing plans based on new requirements or refinements.
|
|
39
|
-
"""
|
|
40
|
-
|
|
41
|
-
logger.info("📋 Planning Goal: %s", goal)
|
|
42
|
-
|
|
43
|
-
# Track plan command usage
|
|
44
|
-
track_event(
|
|
45
|
-
"plan_command",
|
|
46
|
-
{
|
|
47
|
-
"non_interactive": non_interactive,
|
|
48
|
-
"provider": provider.value if provider else "default",
|
|
49
|
-
},
|
|
50
|
-
)
|
|
51
|
-
|
|
52
|
-
# Create agent dependencies
|
|
53
|
-
agent_runtime_options = AgentRuntimeOptions(interactive_mode=not non_interactive)
|
|
54
|
-
|
|
55
|
-
# Create the plan agent with deps and provider
|
|
56
|
-
agent, deps = asyncio.run(create_plan_agent(agent_runtime_options, provider))
|
|
57
|
-
|
|
58
|
-
# Start planning process with error handling
|
|
59
|
-
logger.info("🎯 Starting planning...")
|
|
60
|
-
|
|
61
|
-
async def async_plan() -> None:
|
|
62
|
-
try:
|
|
63
|
-
result = await run_plan_agent(agent, goal, deps)
|
|
64
|
-
logger.info("✅ Planning Complete!")
|
|
65
|
-
logger.info("📋 Results:")
|
|
66
|
-
logger.info("%s", result.output)
|
|
67
|
-
except ErrorNotPickedUpBySentry as e:
|
|
68
|
-
print_agent_error(e)
|
|
69
|
-
except Exception as e:
|
|
70
|
-
logger.exception("Unexpected error in plan command")
|
|
71
|
-
print(f"⚠️ An unexpected error occurred: {str(e)}")
|
|
72
|
-
|
|
73
|
-
asyncio.run(async_plan())
|
shotgun/cli/research.py
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
"""Research command for shotgun CLI."""
|
|
2
|
-
|
|
3
|
-
import asyncio
|
|
4
|
-
from typing import Annotated
|
|
5
|
-
|
|
6
|
-
import typer
|
|
7
|
-
|
|
8
|
-
from shotgun.agents.config import ProviderType
|
|
9
|
-
from shotgun.agents.models import AgentRuntimeOptions
|
|
10
|
-
from shotgun.agents.research import (
|
|
11
|
-
create_research_agent,
|
|
12
|
-
run_research_agent,
|
|
13
|
-
)
|
|
14
|
-
from shotgun.cli.error_handler import print_agent_error
|
|
15
|
-
from shotgun.exceptions import ErrorNotPickedUpBySentry
|
|
16
|
-
from shotgun.logging_config import get_logger
|
|
17
|
-
from shotgun.posthog_telemetry import track_event
|
|
18
|
-
|
|
19
|
-
app = typer.Typer(
|
|
20
|
-
name="research", help="Perform research with agentic loops", no_args_is_help=True
|
|
21
|
-
)
|
|
22
|
-
logger = get_logger(__name__)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
@app.callback(invoke_without_command=True)
|
|
26
|
-
def research(
|
|
27
|
-
query: Annotated[str, typer.Argument(help="Research query or topic")],
|
|
28
|
-
non_interactive: Annotated[
|
|
29
|
-
bool,
|
|
30
|
-
typer.Option(
|
|
31
|
-
"--non-interactive", "-n", help="Disable user interaction (for CI/CD)"
|
|
32
|
-
),
|
|
33
|
-
] = False,
|
|
34
|
-
provider: Annotated[
|
|
35
|
-
ProviderType | None,
|
|
36
|
-
typer.Option("--provider", "-p", help="AI provider to use (overrides default)"),
|
|
37
|
-
] = None,
|
|
38
|
-
) -> None:
|
|
39
|
-
"""Perform research on a given query using agentic loops.
|
|
40
|
-
|
|
41
|
-
This command will use AI agents to iteratively research the provided topic,
|
|
42
|
-
gathering information from multiple sources and refining the search process.
|
|
43
|
-
"""
|
|
44
|
-
|
|
45
|
-
logger.info("🔍 Research Query: %s", query)
|
|
46
|
-
|
|
47
|
-
try:
|
|
48
|
-
# Run everything in the same event loop
|
|
49
|
-
asyncio.run(async_research(query, non_interactive, provider))
|
|
50
|
-
|
|
51
|
-
except Exception as e:
|
|
52
|
-
logger.error("❌ Error during research: %s", str(e))
|
|
53
|
-
import traceback
|
|
54
|
-
|
|
55
|
-
logger.debug("Full traceback:\n%s", traceback.format_exc())
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
async def async_research(
|
|
59
|
-
query: str,
|
|
60
|
-
non_interactive: bool,
|
|
61
|
-
provider: ProviderType | None = None,
|
|
62
|
-
) -> None:
|
|
63
|
-
"""Async wrapper for research process."""
|
|
64
|
-
# Track research command usage
|
|
65
|
-
track_event(
|
|
66
|
-
"research_command",
|
|
67
|
-
{
|
|
68
|
-
"non_interactive": non_interactive,
|
|
69
|
-
"provider": provider.value if provider else "default",
|
|
70
|
-
},
|
|
71
|
-
)
|
|
72
|
-
|
|
73
|
-
# Create agent dependencies
|
|
74
|
-
agent_runtime_options = AgentRuntimeOptions(interactive_mode=not non_interactive)
|
|
75
|
-
|
|
76
|
-
# Create the research agent with deps and provider
|
|
77
|
-
agent, deps = await create_research_agent(agent_runtime_options, provider)
|
|
78
|
-
|
|
79
|
-
# Start research process with error handling
|
|
80
|
-
logger.info("🔬 Starting research...")
|
|
81
|
-
try:
|
|
82
|
-
result = await run_research_agent(agent, query, deps)
|
|
83
|
-
# Display results
|
|
84
|
-
print("✅ Research Complete!")
|
|
85
|
-
print("📋 Findings:")
|
|
86
|
-
print(result.output)
|
|
87
|
-
except ErrorNotPickedUpBySentry as e:
|
|
88
|
-
# All user-actionable errors - display with plain text
|
|
89
|
-
print_agent_error(e)
|
|
90
|
-
except Exception as e:
|
|
91
|
-
# Unexpected errors that weren't wrapped (shouldn't happen)
|
|
92
|
-
logger.exception("Unexpected error in research command")
|
|
93
|
-
print(f"⚠️ An unexpected error occurred: {str(e)}")
|
shotgun/cli/specify.py
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"""Specify command for shotgun CLI."""
|
|
2
|
-
|
|
3
|
-
import asyncio
|
|
4
|
-
from typing import Annotated
|
|
5
|
-
|
|
6
|
-
import typer
|
|
7
|
-
|
|
8
|
-
from shotgun.agents.config import ProviderType
|
|
9
|
-
from shotgun.agents.models import AgentRuntimeOptions
|
|
10
|
-
from shotgun.agents.specify import (
|
|
11
|
-
create_specify_agent,
|
|
12
|
-
run_specify_agent,
|
|
13
|
-
)
|
|
14
|
-
from shotgun.cli.error_handler import print_agent_error
|
|
15
|
-
from shotgun.exceptions import ErrorNotPickedUpBySentry
|
|
16
|
-
from shotgun.logging_config import get_logger
|
|
17
|
-
|
|
18
|
-
app = typer.Typer(
|
|
19
|
-
name="specify", help="Generate comprehensive specifications", no_args_is_help=True
|
|
20
|
-
)
|
|
21
|
-
logger = get_logger(__name__)
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
@app.callback(invoke_without_command=True)
|
|
25
|
-
def specify(
|
|
26
|
-
requirement: Annotated[
|
|
27
|
-
str, typer.Argument(help="Requirement or feature to specify")
|
|
28
|
-
],
|
|
29
|
-
non_interactive: Annotated[
|
|
30
|
-
bool,
|
|
31
|
-
typer.Option(
|
|
32
|
-
"--non-interactive", "-n", help="Disable user interaction (for CI/CD)"
|
|
33
|
-
),
|
|
34
|
-
] = False,
|
|
35
|
-
provider: Annotated[
|
|
36
|
-
ProviderType | None,
|
|
37
|
-
typer.Option("--provider", "-p", help="AI provider to use (overrides default)"),
|
|
38
|
-
] = None,
|
|
39
|
-
) -> None:
|
|
40
|
-
"""Generate comprehensive specifications for software features and systems.
|
|
41
|
-
|
|
42
|
-
This command creates detailed technical specifications including requirements,
|
|
43
|
-
architecture, implementation details, and acceptance criteria based on your
|
|
44
|
-
provided requirement or feature description.
|
|
45
|
-
"""
|
|
46
|
-
|
|
47
|
-
logger.info("📝 Specification Requirement: %s", requirement)
|
|
48
|
-
|
|
49
|
-
# Create agent dependencies
|
|
50
|
-
agent_runtime_options = AgentRuntimeOptions(interactive_mode=not non_interactive)
|
|
51
|
-
|
|
52
|
-
# Create the specify agent with deps and provider
|
|
53
|
-
agent, deps = asyncio.run(create_specify_agent(agent_runtime_options, provider))
|
|
54
|
-
|
|
55
|
-
# Start specification process with error handling
|
|
56
|
-
logger.info("📋 Starting specification generation...")
|
|
57
|
-
|
|
58
|
-
async def async_specify() -> None:
|
|
59
|
-
try:
|
|
60
|
-
result = await run_specify_agent(agent, requirement, deps)
|
|
61
|
-
logger.info("✅ Specification Complete!")
|
|
62
|
-
logger.info("📋 Results:")
|
|
63
|
-
logger.info("%s", result.output)
|
|
64
|
-
except ErrorNotPickedUpBySentry as e:
|
|
65
|
-
print_agent_error(e)
|
|
66
|
-
except Exception as e:
|
|
67
|
-
logger.exception("Unexpected error in specify command")
|
|
68
|
-
print(f"⚠️ An unexpected error occurred: {str(e)}")
|
|
69
|
-
|
|
70
|
-
asyncio.run(async_specify())
|
shotgun/cli/tasks.py
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
"""Tasks command for shotgun CLI."""
|
|
2
|
-
|
|
3
|
-
import asyncio
|
|
4
|
-
from typing import Annotated
|
|
5
|
-
|
|
6
|
-
import typer
|
|
7
|
-
|
|
8
|
-
from shotgun.agents.config import ProviderType
|
|
9
|
-
from shotgun.agents.models import AgentRuntimeOptions
|
|
10
|
-
from shotgun.agents.tasks import (
|
|
11
|
-
create_tasks_agent,
|
|
12
|
-
run_tasks_agent,
|
|
13
|
-
)
|
|
14
|
-
from shotgun.cli.error_handler import print_agent_error
|
|
15
|
-
from shotgun.exceptions import ErrorNotPickedUpBySentry
|
|
16
|
-
from shotgun.logging_config import get_logger
|
|
17
|
-
from shotgun.posthog_telemetry import track_event
|
|
18
|
-
|
|
19
|
-
app = typer.Typer(name="tasks", help="Generate task lists with agentic approach")
|
|
20
|
-
logger = get_logger(__name__)
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
@app.callback(invoke_without_command=True)
|
|
24
|
-
def tasks(
|
|
25
|
-
instruction: Annotated[
|
|
26
|
-
str, typer.Argument(help="Task creation instruction or project description")
|
|
27
|
-
],
|
|
28
|
-
non_interactive: Annotated[
|
|
29
|
-
bool,
|
|
30
|
-
typer.Option(
|
|
31
|
-
"--non-interactive", "-n", help="Disable user interaction (for CI/CD)"
|
|
32
|
-
),
|
|
33
|
-
] = False,
|
|
34
|
-
provider: Annotated[
|
|
35
|
-
ProviderType | None,
|
|
36
|
-
typer.Option("--provider", "-p", help="AI provider to use (overrides default)"),
|
|
37
|
-
] = None,
|
|
38
|
-
) -> None:
|
|
39
|
-
"""Generate actionable task lists based on existing research and plans.
|
|
40
|
-
|
|
41
|
-
This command creates detailed task breakdowns using AI agents that analyze
|
|
42
|
-
your research and plans to generate prioritized, actionable tasks with
|
|
43
|
-
acceptance criteria and effort estimates.
|
|
44
|
-
"""
|
|
45
|
-
|
|
46
|
-
logger.info("📋 Task Creation Instruction: %s", instruction)
|
|
47
|
-
|
|
48
|
-
# Track tasks command usage
|
|
49
|
-
track_event(
|
|
50
|
-
"tasks_command",
|
|
51
|
-
{
|
|
52
|
-
"non_interactive": non_interactive,
|
|
53
|
-
"provider": provider.value if provider else "default",
|
|
54
|
-
},
|
|
55
|
-
)
|
|
56
|
-
|
|
57
|
-
# Create agent dependencies
|
|
58
|
-
agent_runtime_options = AgentRuntimeOptions(interactive_mode=not non_interactive)
|
|
59
|
-
|
|
60
|
-
# Create the tasks agent with deps and provider
|
|
61
|
-
agent, deps = asyncio.run(create_tasks_agent(agent_runtime_options, provider))
|
|
62
|
-
|
|
63
|
-
# Start task creation process with error handling
|
|
64
|
-
logger.info("🎯 Starting task creation...")
|
|
65
|
-
|
|
66
|
-
async def async_tasks() -> None:
|
|
67
|
-
try:
|
|
68
|
-
result = await run_tasks_agent(agent, instruction, deps)
|
|
69
|
-
logger.info("✅ Task Creation Complete!")
|
|
70
|
-
logger.info("📋 Results:")
|
|
71
|
-
logger.info("%s", result.output)
|
|
72
|
-
except ErrorNotPickedUpBySentry as e:
|
|
73
|
-
print_agent_error(e)
|
|
74
|
-
except Exception as e:
|
|
75
|
-
logger.exception("Unexpected error in tasks command")
|
|
76
|
-
print(f"⚠️ An unexpected error occurred: {str(e)}")
|
|
77
|
-
|
|
78
|
-
asyncio.run(async_tasks())
|