tapps-agents 3.5.41__py3-none-any.whl → 3.6.1__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.
- tapps_agents/__init__.py +2 -2
- tapps_agents/agents/reviewer/scoring.py +1566 -1566
- tapps_agents/agents/reviewer/tools/__init__.py +41 -41
- tapps_agents/cli/commands/health.py +665 -665
- tapps_agents/cli/commands/top_level.py +3586 -3586
- tapps_agents/core/artifact_context_builder.py +293 -0
- tapps_agents/core/config.py +33 -0
- tapps_agents/health/orchestrator.py +271 -271
- tapps_agents/resources/__init__.py +5 -0
- tapps_agents/resources/claude/__init__.py +1 -0
- tapps_agents/resources/claude/commands/README.md +156 -0
- tapps_agents/resources/claude/commands/__init__.py +1 -0
- tapps_agents/resources/claude/commands/build-fix.md +22 -0
- tapps_agents/resources/claude/commands/build.md +77 -0
- tapps_agents/resources/claude/commands/debug.md +53 -0
- tapps_agents/resources/claude/commands/design.md +68 -0
- tapps_agents/resources/claude/commands/docs.md +53 -0
- tapps_agents/resources/claude/commands/e2e.md +22 -0
- tapps_agents/resources/claude/commands/fix.md +54 -0
- tapps_agents/resources/claude/commands/implement.md +53 -0
- tapps_agents/resources/claude/commands/improve.md +53 -0
- tapps_agents/resources/claude/commands/library-docs.md +64 -0
- tapps_agents/resources/claude/commands/lint.md +52 -0
- tapps_agents/resources/claude/commands/plan.md +65 -0
- tapps_agents/resources/claude/commands/refactor-clean.md +21 -0
- tapps_agents/resources/claude/commands/refactor.md +55 -0
- tapps_agents/resources/claude/commands/review.md +67 -0
- tapps_agents/resources/claude/commands/score.md +60 -0
- tapps_agents/resources/claude/commands/security-review.md +22 -0
- tapps_agents/resources/claude/commands/security-scan.md +54 -0
- tapps_agents/resources/claude/commands/tdd.md +24 -0
- tapps_agents/resources/claude/commands/test-coverage.md +21 -0
- tapps_agents/resources/claude/commands/test.md +54 -0
- tapps_agents/resources/claude/commands/update-codemaps.md +20 -0
- tapps_agents/resources/claude/commands/update-docs.md +21 -0
- tapps_agents/resources/claude/skills/__init__.py +1 -0
- tapps_agents/resources/claude/skills/analyst/SKILL.md +272 -0
- tapps_agents/resources/claude/skills/analyst/__init__.py +1 -0
- tapps_agents/resources/claude/skills/architect/SKILL.md +282 -0
- tapps_agents/resources/claude/skills/architect/__init__.py +1 -0
- tapps_agents/resources/claude/skills/backend-patterns/SKILL.md +30 -0
- tapps_agents/resources/claude/skills/backend-patterns/__init__.py +1 -0
- tapps_agents/resources/claude/skills/coding-standards/SKILL.md +29 -0
- tapps_agents/resources/claude/skills/coding-standards/__init__.py +1 -0
- tapps_agents/resources/claude/skills/debugger/SKILL.md +203 -0
- tapps_agents/resources/claude/skills/debugger/__init__.py +1 -0
- tapps_agents/resources/claude/skills/designer/SKILL.md +243 -0
- tapps_agents/resources/claude/skills/designer/__init__.py +1 -0
- tapps_agents/resources/claude/skills/documenter/SKILL.md +252 -0
- tapps_agents/resources/claude/skills/documenter/__init__.py +1 -0
- tapps_agents/resources/claude/skills/enhancer/SKILL.md +307 -0
- tapps_agents/resources/claude/skills/enhancer/__init__.py +1 -0
- tapps_agents/resources/claude/skills/evaluator/SKILL.md +204 -0
- tapps_agents/resources/claude/skills/evaluator/__init__.py +1 -0
- tapps_agents/resources/claude/skills/frontend-patterns/SKILL.md +29 -0
- tapps_agents/resources/claude/skills/frontend-patterns/__init__.py +1 -0
- tapps_agents/resources/claude/skills/implementer/SKILL.md +188 -0
- tapps_agents/resources/claude/skills/implementer/__init__.py +1 -0
- tapps_agents/resources/claude/skills/improver/SKILL.md +218 -0
- tapps_agents/resources/claude/skills/improver/__init__.py +1 -0
- tapps_agents/resources/claude/skills/ops/SKILL.md +281 -0
- tapps_agents/resources/claude/skills/ops/__init__.py +1 -0
- tapps_agents/resources/claude/skills/orchestrator/SKILL.md +390 -0
- tapps_agents/resources/claude/skills/orchestrator/__init__.py +1 -0
- tapps_agents/resources/claude/skills/planner/SKILL.md +254 -0
- tapps_agents/resources/claude/skills/planner/__init__.py +1 -0
- tapps_agents/resources/claude/skills/reviewer/SKILL.md +434 -0
- tapps_agents/resources/claude/skills/reviewer/__init__.py +1 -0
- tapps_agents/resources/claude/skills/security-review/SKILL.md +31 -0
- tapps_agents/resources/claude/skills/security-review/__init__.py +1 -0
- tapps_agents/resources/claude/skills/simple-mode/SKILL.md +695 -0
- tapps_agents/resources/claude/skills/simple-mode/__init__.py +1 -0
- tapps_agents/resources/claude/skills/tester/SKILL.md +219 -0
- tapps_agents/resources/claude/skills/tester/__init__.py +1 -0
- tapps_agents/resources/cursor/.cursorignore +35 -0
- tapps_agents/resources/cursor/__init__.py +1 -0
- tapps_agents/resources/cursor/commands/__init__.py +1 -0
- tapps_agents/resources/cursor/commands/build-fix.md +11 -0
- tapps_agents/resources/cursor/commands/build.md +11 -0
- tapps_agents/resources/cursor/commands/e2e.md +11 -0
- tapps_agents/resources/cursor/commands/fix.md +11 -0
- tapps_agents/resources/cursor/commands/refactor-clean.md +11 -0
- tapps_agents/resources/cursor/commands/review.md +11 -0
- tapps_agents/resources/cursor/commands/security-review.md +11 -0
- tapps_agents/resources/cursor/commands/tdd.md +11 -0
- tapps_agents/resources/cursor/commands/test-coverage.md +11 -0
- tapps_agents/resources/cursor/commands/test.md +11 -0
- tapps_agents/resources/cursor/commands/update-codemaps.md +10 -0
- tapps_agents/resources/cursor/commands/update-docs.md +11 -0
- tapps_agents/resources/cursor/rules/__init__.py +1 -0
- tapps_agents/resources/cursor/rules/agent-capabilities.mdc +687 -0
- tapps_agents/resources/cursor/rules/coding-style.mdc +31 -0
- tapps_agents/resources/cursor/rules/command-reference.mdc +2081 -0
- tapps_agents/resources/cursor/rules/cursor-mode-usage.mdc +125 -0
- tapps_agents/resources/cursor/rules/git-workflow.mdc +29 -0
- tapps_agents/resources/cursor/rules/performance.mdc +29 -0
- tapps_agents/resources/cursor/rules/project-context.mdc +163 -0
- tapps_agents/resources/cursor/rules/project-profiling.mdc +197 -0
- tapps_agents/resources/cursor/rules/quick-reference.mdc +630 -0
- tapps_agents/resources/cursor/rules/security.mdc +32 -0
- tapps_agents/resources/cursor/rules/simple-mode.mdc +500 -0
- tapps_agents/resources/cursor/rules/testing.mdc +31 -0
- tapps_agents/resources/cursor/rules/when-to-use.mdc +156 -0
- tapps_agents/resources/cursor/rules/workflow-presets.mdc +179 -0
- tapps_agents/resources/customizations/__init__.py +1 -0
- tapps_agents/resources/customizations/example-custom.yaml +83 -0
- tapps_agents/resources/hooks/__init__.py +1 -0
- tapps_agents/resources/hooks/templates/README.md +5 -0
- tapps_agents/resources/hooks/templates/__init__.py +1 -0
- tapps_agents/resources/hooks/templates/add-project-context.yaml +8 -0
- tapps_agents/resources/hooks/templates/auto-format-js.yaml +10 -0
- tapps_agents/resources/hooks/templates/auto-format-python.yaml +10 -0
- tapps_agents/resources/hooks/templates/git-commit-check.yaml +7 -0
- tapps_agents/resources/hooks/templates/notify-on-complete.yaml +8 -0
- tapps_agents/resources/hooks/templates/quality-gate.yaml +8 -0
- tapps_agents/resources/hooks/templates/security-scan-on-edit.yaml +10 -0
- tapps_agents/resources/hooks/templates/session-end-log.yaml +7 -0
- tapps_agents/resources/hooks/templates/show-beads-ready.yaml +8 -0
- tapps_agents/resources/hooks/templates/test-on-edit.yaml +10 -0
- tapps_agents/resources/hooks/templates/update-docs-on-complete.yaml +8 -0
- tapps_agents/resources/hooks/templates/user-prompt-log.yaml +7 -0
- tapps_agents/resources/scripts/__init__.py +1 -0
- tapps_agents/resources/scripts/set_bd_path.ps1 +51 -0
- tapps_agents/resources/workflows/__init__.py +1 -0
- tapps_agents/resources/workflows/presets/__init__.py +1 -0
- tapps_agents/resources/workflows/presets/brownfield-analysis.yaml +235 -0
- tapps_agents/resources/workflows/presets/fix.yaml +78 -0
- tapps_agents/resources/workflows/presets/full-sdlc.yaml +122 -0
- tapps_agents/resources/workflows/presets/quality.yaml +82 -0
- tapps_agents/resources/workflows/presets/rapid-dev.yaml +84 -0
- tapps_agents/simple_mode/orchestrators/base.py +185 -185
- tapps_agents/simple_mode/orchestrators/build_orchestrator.py +2700 -2667
- tapps_agents/simple_mode/orchestrators/fix_orchestrator.py +723 -723
- tapps_agents/workflow/cursor_executor.py +2337 -2337
- tapps_agents/workflow/message_formatter.py +188 -188
- {tapps_agents-3.5.41.dist-info → tapps_agents-3.6.1.dist-info}/METADATA +6 -6
- {tapps_agents-3.5.41.dist-info → tapps_agents-3.6.1.dist-info}/RECORD +141 -18
- {tapps_agents-3.5.41.dist-info → tapps_agents-3.6.1.dist-info}/WHEEL +0 -0
- {tapps_agents-3.5.41.dist-info → tapps_agents-3.6.1.dist-info}/entry_points.txt +0 -0
- {tapps_agents-3.5.41.dist-info → tapps_agents-3.6.1.dist-info}/licenses/LICENSE +0 -0
- {tapps_agents-3.5.41.dist-info → tapps_agents-3.6.1.dist-info}/top_level.txt +0 -0
|
@@ -1,188 +1,188 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Message Formatter - ENH-001-S3
|
|
3
|
-
|
|
4
|
-
Formats enforcement messages for the Workflow Enforcement System.
|
|
5
|
-
Provides rich, context-aware messages for blocking and warning modes
|
|
6
|
-
with support for CLI and IDE output formats.
|
|
7
|
-
|
|
8
|
-
Design Principles:
|
|
9
|
-
- Separation of Concerns: Message formatting separate from enforcement logic
|
|
10
|
-
- Configurable: Emoji support, output format selection
|
|
11
|
-
- Context-Aware: Messages tailored to detected workflow type
|
|
12
|
-
"""
|
|
13
|
-
|
|
14
|
-
from __future__ import annotations
|
|
15
|
-
|
|
16
|
-
import logging
|
|
17
|
-
from dataclasses import dataclass
|
|
18
|
-
from enum import Enum
|
|
19
|
-
from pathlib import Path
|
|
20
|
-
from typing import Literal
|
|
21
|
-
|
|
22
|
-
from tapps_agents.workflow.intent_detector import WorkflowType
|
|
23
|
-
|
|
24
|
-
logger = logging.getLogger(__name__)
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
class OutputFormat(str, Enum):
|
|
28
|
-
"""Output format for messages."""
|
|
29
|
-
|
|
30
|
-
CLI = "cli"
|
|
31
|
-
IDE = "ide"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
@dataclass
|
|
35
|
-
class MessageConfig:
|
|
36
|
-
"""Configuration for message formatting."""
|
|
37
|
-
|
|
38
|
-
use_emoji: bool = True
|
|
39
|
-
output_format: OutputFormat = OutputFormat.CLI
|
|
40
|
-
show_benefits: bool = True
|
|
41
|
-
show_override: bool = True
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
# Workflow-specific benefits
|
|
45
|
-
WORKFLOW_BENEFITS: dict[WorkflowType, list[str]] = {
|
|
46
|
-
WorkflowType.BUILD: [
|
|
47
|
-
"Automatic testing (80%+ coverage)",
|
|
48
|
-
"Quality gates (75+ score required)",
|
|
49
|
-
"Comprehensive documentation",
|
|
50
|
-
"Early bug detection",
|
|
51
|
-
],
|
|
52
|
-
WorkflowType.FIX: [
|
|
53
|
-
"Root cause analysis",
|
|
54
|
-
"Regression test generation",
|
|
55
|
-
"Fix verification",
|
|
56
|
-
"Related issue detection",
|
|
57
|
-
],
|
|
58
|
-
WorkflowType.REFACTOR: [
|
|
59
|
-
"Behavior preservation tests",
|
|
60
|
-
"Code quality improvement",
|
|
61
|
-
"Technical debt reduction",
|
|
62
|
-
"Safe incremental changes",
|
|
63
|
-
],
|
|
64
|
-
WorkflowType.REVIEW: [
|
|
65
|
-
"Security vulnerability detection",
|
|
66
|
-
"Code quality scoring",
|
|
67
|
-
"Best practice suggestions",
|
|
68
|
-
"Maintainability analysis",
|
|
69
|
-
],
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
class MessageFormatter:
|
|
74
|
-
"""
|
|
75
|
-
Formats enforcement messages for workflow enforcement system.
|
|
76
|
-
|
|
77
|
-
Provides rich, context-aware messages for blocking and warning modes
|
|
78
|
-
with configurable emoji support and output format selection.
|
|
79
|
-
"""
|
|
80
|
-
|
|
81
|
-
def __init__(self, config: MessageConfig | None = None) -> None:
|
|
82
|
-
"""Initialize formatter with optional configuration."""
|
|
83
|
-
self.config = config or MessageConfig()
|
|
84
|
-
|
|
85
|
-
def format_blocking_message(
|
|
86
|
-
self,
|
|
87
|
-
workflow: WorkflowType,
|
|
88
|
-
user_intent: str,
|
|
89
|
-
file_path: Path,
|
|
90
|
-
confidence: float,
|
|
91
|
-
) -> str:
|
|
92
|
-
"""
|
|
93
|
-
Format blocking mode message with benefits and override instructions.
|
|
94
|
-
|
|
95
|
-
Args:
|
|
96
|
-
workflow: Detected workflow type
|
|
97
|
-
user_intent: User's intent description
|
|
98
|
-
file_path: Path to file being edited
|
|
99
|
-
confidence: Detection confidence (0-100)
|
|
100
|
-
|
|
101
|
-
Returns:
|
|
102
|
-
Formatted blocking message
|
|
103
|
-
"""
|
|
104
|
-
emoji = self._get_emoji("block") if self.config.use_emoji else ""
|
|
105
|
-
intent_display = user_intent or "Implement feature"
|
|
106
|
-
path_display = Path(file_path).as_posix()
|
|
107
|
-
|
|
108
|
-
lines = [
|
|
109
|
-
f"{emoji}Direct file edit blocked: {path_display}".strip(),
|
|
110
|
-
"",
|
|
111
|
-
f"Detected intent: {workflow.value} (confidence: {confidence:.0f}%)",
|
|
112
|
-
"",
|
|
113
|
-
]
|
|
114
|
-
|
|
115
|
-
if self.config.show_benefits:
|
|
116
|
-
lines.append("TappsCodingAgents workflows provide:")
|
|
117
|
-
for benefit in self._get_workflow_benefits(workflow):
|
|
118
|
-
bullet = " * " if self.config.output_format == OutputFormat.IDE else " - "
|
|
119
|
-
lines.append(f"{bullet}{benefit}")
|
|
120
|
-
lines.append("")
|
|
121
|
-
|
|
122
|
-
lines.append("Suggested workflow:")
|
|
123
|
-
lines.append(f' @simple-mode {workflow.value} "{intent_display}"')
|
|
124
|
-
lines.append("")
|
|
125
|
-
|
|
126
|
-
if self.config.show_override:
|
|
127
|
-
lines.extend(self._get_override_instructions())
|
|
128
|
-
|
|
129
|
-
return "\n".join(lines)
|
|
130
|
-
|
|
131
|
-
def format_warning_message(
|
|
132
|
-
self,
|
|
133
|
-
workflow: WorkflowType,
|
|
134
|
-
user_intent: str,
|
|
135
|
-
confidence: float,
|
|
136
|
-
) -> str:
|
|
137
|
-
"""
|
|
138
|
-
Format warning mode message (lighter suggestion).
|
|
139
|
-
|
|
140
|
-
Args:
|
|
141
|
-
workflow: Detected workflow type
|
|
142
|
-
user_intent: User's intent description
|
|
143
|
-
confidence: Detection confidence (0-100)
|
|
144
|
-
|
|
145
|
-
Returns:
|
|
146
|
-
Formatted warning message
|
|
147
|
-
"""
|
|
148
|
-
emoji = self._get_emoji("warn") if self.config.use_emoji else ""
|
|
149
|
-
intent_display = user_intent or "Implement feature"
|
|
150
|
-
|
|
151
|
-
lines = [
|
|
152
|
-
f"{emoji}Consider using a workflow (confidence: {confidence:.0f}%)".strip(),
|
|
153
|
-
f'Suggested: @simple-mode {workflow.value} "{intent_display}"',
|
|
154
|
-
"(Proceeding with direct edit...)",
|
|
155
|
-
]
|
|
156
|
-
|
|
157
|
-
return "\n".join(lines)
|
|
158
|
-
|
|
159
|
-
def format_allow_message(self) -> str:
|
|
160
|
-
"""Format allow message (empty for silent mode)."""
|
|
161
|
-
return ""
|
|
162
|
-
|
|
163
|
-
def _get_emoji(self, action: Literal["block", "warn", "allow"]) -> str:
|
|
164
|
-
"""Get emoji for action type."""
|
|
165
|
-
emojis = {
|
|
166
|
-
"block": "\u26a0\ufe0f ", # Warning sign
|
|
167
|
-
"warn": "\U0001f4a1 ", # Light bulb
|
|
168
|
-
"allow": "\u2705 ", # Check mark
|
|
169
|
-
}
|
|
170
|
-
return emojis.get(action, "")
|
|
171
|
-
|
|
172
|
-
def _get_workflow_benefits(self, workflow: WorkflowType) -> list[str]:
|
|
173
|
-
"""Get benefits list for workflow type."""
|
|
174
|
-
return WORKFLOW_BENEFITS.get(workflow, WORKFLOW_BENEFITS[WorkflowType.BUILD])
|
|
175
|
-
|
|
176
|
-
def _get_override_instructions(self) -> list[str]:
|
|
177
|
-
"""Get override instructions based on output format."""
|
|
178
|
-
if self.config.output_format == OutputFormat.IDE:
|
|
179
|
-
return [
|
|
180
|
-
"To bypass enforcement:",
|
|
181
|
-
" * Use --skip-enforcement flag",
|
|
182
|
-
" * Or set enforcement.mode: silent in config",
|
|
183
|
-
]
|
|
184
|
-
return [
|
|
185
|
-
"To bypass enforcement:",
|
|
186
|
-
" - Use --skip-enforcement flag",
|
|
187
|
-
" - Or set enforcement.mode: silent in .tapps-agents/config.yaml",
|
|
188
|
-
]
|
|
1
|
+
"""
|
|
2
|
+
Message Formatter - ENH-001-S3
|
|
3
|
+
|
|
4
|
+
Formats enforcement messages for the Workflow Enforcement System.
|
|
5
|
+
Provides rich, context-aware messages for blocking and warning modes
|
|
6
|
+
with support for CLI and IDE output formats.
|
|
7
|
+
|
|
8
|
+
Design Principles:
|
|
9
|
+
- Separation of Concerns: Message formatting separate from enforcement logic
|
|
10
|
+
- Configurable: Emoji support, output format selection
|
|
11
|
+
- Context-Aware: Messages tailored to detected workflow type
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
import logging
|
|
17
|
+
from dataclasses import dataclass
|
|
18
|
+
from enum import Enum
|
|
19
|
+
from pathlib import Path
|
|
20
|
+
from typing import Literal
|
|
21
|
+
|
|
22
|
+
from tapps_agents.workflow.intent_detector import WorkflowType
|
|
23
|
+
|
|
24
|
+
logger = logging.getLogger(__name__)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class OutputFormat(str, Enum):
|
|
28
|
+
"""Output format for messages."""
|
|
29
|
+
|
|
30
|
+
CLI = "cli"
|
|
31
|
+
IDE = "ide"
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
@dataclass
|
|
35
|
+
class MessageConfig:
|
|
36
|
+
"""Configuration for message formatting."""
|
|
37
|
+
|
|
38
|
+
use_emoji: bool = True
|
|
39
|
+
output_format: OutputFormat = OutputFormat.CLI
|
|
40
|
+
show_benefits: bool = True
|
|
41
|
+
show_override: bool = True
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
# Workflow-specific benefits
|
|
45
|
+
WORKFLOW_BENEFITS: dict[WorkflowType, list[str]] = {
|
|
46
|
+
WorkflowType.BUILD: [
|
|
47
|
+
"Automatic testing (80%+ coverage)",
|
|
48
|
+
"Quality gates (75+ score required)",
|
|
49
|
+
"Comprehensive documentation",
|
|
50
|
+
"Early bug detection",
|
|
51
|
+
],
|
|
52
|
+
WorkflowType.FIX: [
|
|
53
|
+
"Root cause analysis",
|
|
54
|
+
"Regression test generation",
|
|
55
|
+
"Fix verification",
|
|
56
|
+
"Related issue detection",
|
|
57
|
+
],
|
|
58
|
+
WorkflowType.REFACTOR: [
|
|
59
|
+
"Behavior preservation tests",
|
|
60
|
+
"Code quality improvement",
|
|
61
|
+
"Technical debt reduction",
|
|
62
|
+
"Safe incremental changes",
|
|
63
|
+
],
|
|
64
|
+
WorkflowType.REVIEW: [
|
|
65
|
+
"Security vulnerability detection",
|
|
66
|
+
"Code quality scoring",
|
|
67
|
+
"Best practice suggestions",
|
|
68
|
+
"Maintainability analysis",
|
|
69
|
+
],
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
class MessageFormatter:
|
|
74
|
+
"""
|
|
75
|
+
Formats enforcement messages for workflow enforcement system.
|
|
76
|
+
|
|
77
|
+
Provides rich, context-aware messages for blocking and warning modes
|
|
78
|
+
with configurable emoji support and output format selection.
|
|
79
|
+
"""
|
|
80
|
+
|
|
81
|
+
def __init__(self, config: MessageConfig | None = None) -> None:
|
|
82
|
+
"""Initialize formatter with optional configuration."""
|
|
83
|
+
self.config = config or MessageConfig()
|
|
84
|
+
|
|
85
|
+
def format_blocking_message(
|
|
86
|
+
self,
|
|
87
|
+
workflow: WorkflowType,
|
|
88
|
+
user_intent: str,
|
|
89
|
+
file_path: Path,
|
|
90
|
+
confidence: float,
|
|
91
|
+
) -> str:
|
|
92
|
+
"""
|
|
93
|
+
Format blocking mode message with benefits and override instructions.
|
|
94
|
+
|
|
95
|
+
Args:
|
|
96
|
+
workflow: Detected workflow type
|
|
97
|
+
user_intent: User's intent description
|
|
98
|
+
file_path: Path to file being edited
|
|
99
|
+
confidence: Detection confidence (0-100)
|
|
100
|
+
|
|
101
|
+
Returns:
|
|
102
|
+
Formatted blocking message
|
|
103
|
+
"""
|
|
104
|
+
emoji = self._get_emoji("block") if self.config.use_emoji else ""
|
|
105
|
+
intent_display = user_intent or "Implement feature"
|
|
106
|
+
path_display = Path(file_path).as_posix()
|
|
107
|
+
|
|
108
|
+
lines = [
|
|
109
|
+
f"{emoji}Direct file edit blocked: {path_display}".strip(),
|
|
110
|
+
"",
|
|
111
|
+
f"Detected intent: {workflow.value} (confidence: {confidence:.0f}%)",
|
|
112
|
+
"",
|
|
113
|
+
]
|
|
114
|
+
|
|
115
|
+
if self.config.show_benefits:
|
|
116
|
+
lines.append("TappsCodingAgents workflows provide:")
|
|
117
|
+
for benefit in self._get_workflow_benefits(workflow):
|
|
118
|
+
bullet = " * " if self.config.output_format == OutputFormat.IDE else " - "
|
|
119
|
+
lines.append(f"{bullet}{benefit}")
|
|
120
|
+
lines.append("")
|
|
121
|
+
|
|
122
|
+
lines.append("Suggested workflow:")
|
|
123
|
+
lines.append(f' @simple-mode {workflow.value} "{intent_display}"')
|
|
124
|
+
lines.append("")
|
|
125
|
+
|
|
126
|
+
if self.config.show_override:
|
|
127
|
+
lines.extend(self._get_override_instructions())
|
|
128
|
+
|
|
129
|
+
return "\n".join(lines)
|
|
130
|
+
|
|
131
|
+
def format_warning_message(
|
|
132
|
+
self,
|
|
133
|
+
workflow: WorkflowType,
|
|
134
|
+
user_intent: str,
|
|
135
|
+
confidence: float,
|
|
136
|
+
) -> str:
|
|
137
|
+
"""
|
|
138
|
+
Format warning mode message (lighter suggestion).
|
|
139
|
+
|
|
140
|
+
Args:
|
|
141
|
+
workflow: Detected workflow type
|
|
142
|
+
user_intent: User's intent description
|
|
143
|
+
confidence: Detection confidence (0-100)
|
|
144
|
+
|
|
145
|
+
Returns:
|
|
146
|
+
Formatted warning message
|
|
147
|
+
"""
|
|
148
|
+
emoji = self._get_emoji("warn") if self.config.use_emoji else ""
|
|
149
|
+
intent_display = user_intent or "Implement feature"
|
|
150
|
+
|
|
151
|
+
lines = [
|
|
152
|
+
f"{emoji}Consider using a workflow (confidence: {confidence:.0f}%)".strip(),
|
|
153
|
+
f'Suggested: @simple-mode {workflow.value} "{intent_display}"',
|
|
154
|
+
"(Proceeding with direct edit...)",
|
|
155
|
+
]
|
|
156
|
+
|
|
157
|
+
return "\n".join(lines)
|
|
158
|
+
|
|
159
|
+
def format_allow_message(self) -> str:
|
|
160
|
+
"""Format allow message (empty for silent mode)."""
|
|
161
|
+
return ""
|
|
162
|
+
|
|
163
|
+
def _get_emoji(self, action: Literal["block", "warn", "allow"]) -> str:
|
|
164
|
+
"""Get emoji for action type."""
|
|
165
|
+
emojis = {
|
|
166
|
+
"block": "\u26a0\ufe0f ", # Warning sign
|
|
167
|
+
"warn": "\U0001f4a1 ", # Light bulb
|
|
168
|
+
"allow": "\u2705 ", # Check mark
|
|
169
|
+
}
|
|
170
|
+
return emojis.get(action, "")
|
|
171
|
+
|
|
172
|
+
def _get_workflow_benefits(self, workflow: WorkflowType) -> list[str]:
|
|
173
|
+
"""Get benefits list for workflow type."""
|
|
174
|
+
return WORKFLOW_BENEFITS.get(workflow, WORKFLOW_BENEFITS[WorkflowType.BUILD])
|
|
175
|
+
|
|
176
|
+
def _get_override_instructions(self) -> list[str]:
|
|
177
|
+
"""Get override instructions based on output format."""
|
|
178
|
+
if self.config.output_format == OutputFormat.IDE:
|
|
179
|
+
return [
|
|
180
|
+
"To bypass enforcement:",
|
|
181
|
+
" * Use --skip-enforcement flag",
|
|
182
|
+
" * Or set enforcement.mode: silent in config",
|
|
183
|
+
]
|
|
184
|
+
return [
|
|
185
|
+
"To bypass enforcement:",
|
|
186
|
+
" - Use --skip-enforcement flag",
|
|
187
|
+
" - Or set enforcement.mode: silent in .tapps-agents/config.yaml",
|
|
188
|
+
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tapps-agents
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.6.1
|
|
4
4
|
Summary: A specification framework for defining, configuring, and orchestrating coding agents
|
|
5
5
|
Author: Tapps
|
|
6
6
|
Maintainer: Tapps
|
|
@@ -23,16 +23,16 @@ Requires-Dist: pydantic>=2.12.5
|
|
|
23
23
|
Requires-Dist: httpx>=0.28.1
|
|
24
24
|
Requires-Dist: pyyaml>=6.0.3
|
|
25
25
|
Requires-Dist: aiohttp>=3.13.3
|
|
26
|
-
Requires-Dist: psutil>=7.2.
|
|
26
|
+
Requires-Dist: psutil>=7.2.2
|
|
27
27
|
Requires-Dist: radon>=6.0.1
|
|
28
|
-
Requires-Dist: bandit>=1.9.
|
|
29
|
-
Requires-Dist: coverage>=7.13.
|
|
28
|
+
Requires-Dist: bandit>=1.9.3
|
|
29
|
+
Requires-Dist: coverage>=7.13.3
|
|
30
30
|
Requires-Dist: jinja2>=3.1.6
|
|
31
31
|
Requires-Dist: packaging<27,>=23.2
|
|
32
|
-
Requires-Dist: rich>=14.2
|
|
32
|
+
Requires-Dist: rich>=14.3.2
|
|
33
33
|
Requires-Dist: aiofiles>=25.1.0
|
|
34
34
|
Provides-Extra: dev
|
|
35
|
-
Requires-Dist: ruff<1.0,>=0.
|
|
35
|
+
Requires-Dist: ruff<1.0,>=0.15.0; extra == "dev"
|
|
36
36
|
Requires-Dist: mypy<2.0,>=1.19.1; extra == "dev"
|
|
37
37
|
Requires-Dist: types-PyYAML>=6.0.12.20250915; extra == "dev"
|
|
38
38
|
Requires-Dist: pytest>=9.0.2; extra == "dev"
|