@task-shepherd/agent 1.0.2
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.
- package/README.md +297 -0
- package/dist/cli/index.js +154 -0
- package/dist/graphql/introspection.json +44158 -0
- package/dist/index.js +1 -0
- package/dist/meta.json +2823 -0
- package/mcp-agent/dist/index.d.ts +2 -0
- package/mcp-agent/dist/index.js +916 -0
- package/mcp-agent/dist/test-schema.d.ts +6 -0
- package/mcp-agent/dist/test-schema.js +95 -0
- package/mcp-agent/dist/types.d.ts +1893 -0
- package/mcp-agent/dist/types.js +139 -0
- package/package.json +125 -0
package/README.md
ADDED
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
# Task Shepherd AI Agent
|
|
2
|
+
|
|
3
|
+
AI agent service for automated project analysis and task processing with Claude integration.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g @task-shepherd/agent
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
### 1. Initialize Agent
|
|
14
|
+
```bash
|
|
15
|
+
task-shepherd-agent init
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### 2. Configure API Connection
|
|
19
|
+
```bash
|
|
20
|
+
# Set your Task Shepherd API connection
|
|
21
|
+
export TASK_SHEPHERD_API_URL="https://your-instance.taskshepherd.com/graphql"
|
|
22
|
+
export TASK_SHEPHERD_API_KEY="tks_your_api_key_here"
|
|
23
|
+
|
|
24
|
+
# Set your Claude API key
|
|
25
|
+
export CLAUDE_API_KEY="sk-ant-api03-your_claude_key_here"
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### 3. Start Agent Service
|
|
29
|
+
```bash
|
|
30
|
+
task-shepherd-agent start
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
The agent will:
|
|
34
|
+
- Connect to your Task Shepherd instance
|
|
35
|
+
- Register available workspaces
|
|
36
|
+
- Begin processing assigned work
|
|
37
|
+
- Provide analytics dashboard at http://localhost:8548
|
|
38
|
+
|
|
39
|
+
## Features
|
|
40
|
+
|
|
41
|
+
### 🤖 **AI-Powered Analysis**
|
|
42
|
+
- Comprehensive project reviews with scoring
|
|
43
|
+
- Development plan generation
|
|
44
|
+
- Story implementation guidance
|
|
45
|
+
- Code quality assessment
|
|
46
|
+
|
|
47
|
+
### 📊 **Analytics Dashboard**
|
|
48
|
+
- Real-time performance metrics
|
|
49
|
+
- Token usage tracking and cost monitoring
|
|
50
|
+
- Success rate analytics
|
|
51
|
+
- Worker performance comparisons
|
|
52
|
+
|
|
53
|
+
### âš¡ **Efficient Processing**
|
|
54
|
+
- Lightweight in-memory queue system
|
|
55
|
+
- Configurable concurrency limits
|
|
56
|
+
- Automatic retry for failed jobs
|
|
57
|
+
- Real-time progress tracking
|
|
58
|
+
|
|
59
|
+
### 🔧 **Workspace Management**
|
|
60
|
+
- Automatic workspace discovery
|
|
61
|
+
- Multi-technology support (React, Node.js, Python, etc.)
|
|
62
|
+
- Dynamic service registration
|
|
63
|
+
- Flexible configuration options
|
|
64
|
+
|
|
65
|
+
## Configuration
|
|
66
|
+
|
|
67
|
+
### Environment Variables
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
# Required: Task Shepherd API
|
|
71
|
+
TASK_SHEPHERD_API_URL="https://api.taskshepherd.com/graphql"
|
|
72
|
+
TASK_SHEPHERD_API_KEY="tks_your_api_key"
|
|
73
|
+
|
|
74
|
+
# Required: AI Provider
|
|
75
|
+
CLAUDE_API_KEY="sk-ant-api03-your_key"
|
|
76
|
+
|
|
77
|
+
# Optional: Service Configuration
|
|
78
|
+
PORT=8547 # Agent API port
|
|
79
|
+
WEB_PORT=8548 # Dashboard port
|
|
80
|
+
MAX_CONCURRENT_JOBS=3 # Concurrent processing limit
|
|
81
|
+
TOKEN_RATE_LIMIT=10000 # Daily token limit
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Workspace Registration
|
|
85
|
+
|
|
86
|
+
Register workspaces for the agent to process:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
# Register current directory
|
|
90
|
+
task-shepherd-agent workspace register
|
|
91
|
+
|
|
92
|
+
# Register specific directory
|
|
93
|
+
task-shepherd-agent workspace register --path /path/to/project
|
|
94
|
+
|
|
95
|
+
# Scan common development directories
|
|
96
|
+
task-shepherd-agent workspace scan-common
|
|
97
|
+
|
|
98
|
+
# List registered workspaces
|
|
99
|
+
task-shepherd-agent workspace list
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## CLI Commands
|
|
103
|
+
|
|
104
|
+
### Agent Management
|
|
105
|
+
```bash
|
|
106
|
+
task-shepherd-agent init # Initialize agent
|
|
107
|
+
task-shepherd-agent start # Start agent service
|
|
108
|
+
task-shepherd-agent status # Check agent status
|
|
109
|
+
task-shepherd-agent stop # Stop agent service
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Workspace Management
|
|
113
|
+
```bash
|
|
114
|
+
task-shepherd-agent workspace register # Register workspace
|
|
115
|
+
task-shepherd-agent workspace list # List workspaces
|
|
116
|
+
task-shepherd-agent workspace sync # Sync with backend
|
|
117
|
+
task-shepherd-agent workspace validate # Validate configuration
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Analysis Operations
|
|
121
|
+
```bash
|
|
122
|
+
task-shepherd-agent analysis start --type project_review
|
|
123
|
+
task-shepherd-agent analysis status --job <job-id>
|
|
124
|
+
task-shepherd-agent analysis list
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## API Endpoints
|
|
128
|
+
|
|
129
|
+
When running, the agent provides these endpoints:
|
|
130
|
+
|
|
131
|
+
### Analysis Operations
|
|
132
|
+
```bash
|
|
133
|
+
# Create analysis job
|
|
134
|
+
POST http://localhost:8547/api/analysis
|
|
135
|
+
{
|
|
136
|
+
"project": {
|
|
137
|
+
"id": "project-123",
|
|
138
|
+
"name": "My Project"
|
|
139
|
+
},
|
|
140
|
+
"analysisType": "project_review",
|
|
141
|
+
"workspacePath": "/path/to/project"
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
# Get job status
|
|
145
|
+
GET http://localhost:8547/api/analysis/{jobId}
|
|
146
|
+
|
|
147
|
+
# List active jobs
|
|
148
|
+
GET http://localhost:8547/api/analysis
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Health Monitoring
|
|
152
|
+
```bash
|
|
153
|
+
# Health check
|
|
154
|
+
GET http://localhost:8547/api/health
|
|
155
|
+
|
|
156
|
+
# Usage statistics
|
|
157
|
+
GET http://localhost:8547/api/usage/stats
|
|
158
|
+
|
|
159
|
+
# Rate limits
|
|
160
|
+
GET http://localhost:8547/api/usage/rate-limit
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## Analytics Dashboard
|
|
164
|
+
|
|
165
|
+
Access the web dashboard at http://localhost:8548 for:
|
|
166
|
+
|
|
167
|
+
- **Real-time Metrics**: Active jobs, queue status, success rates
|
|
168
|
+
- **Performance Analytics**: Completion times, throughput analysis
|
|
169
|
+
- **Cost Monitoring**: Token usage, API costs, efficiency metrics
|
|
170
|
+
- **Historical Data**: Trends, patterns, optimization insights
|
|
171
|
+
|
|
172
|
+
## Supported Analysis Types
|
|
173
|
+
|
|
174
|
+
### Project Review
|
|
175
|
+
Comprehensive analysis including:
|
|
176
|
+
- Code quality assessment
|
|
177
|
+
- Architecture evaluation
|
|
178
|
+
- Security considerations
|
|
179
|
+
- Performance recommendations
|
|
180
|
+
- Technical debt identification
|
|
181
|
+
|
|
182
|
+
### Development Plan
|
|
183
|
+
Strategic implementation guidance:
|
|
184
|
+
- Feature breakdown and prioritization
|
|
185
|
+
- Timeline estimation
|
|
186
|
+
- Risk assessment
|
|
187
|
+
- Resource requirements
|
|
188
|
+
- Technology recommendations
|
|
189
|
+
|
|
190
|
+
### Story Implementation
|
|
191
|
+
Detailed implementation guidance:
|
|
192
|
+
- Technical approach recommendations
|
|
193
|
+
- Code examples and patterns
|
|
194
|
+
- Testing strategies
|
|
195
|
+
- Integration considerations
|
|
196
|
+
|
|
197
|
+
## Workspace Support
|
|
198
|
+
|
|
199
|
+
The agent automatically detects and supports:
|
|
200
|
+
|
|
201
|
+
### Frontend Technologies
|
|
202
|
+
- React, Vue, Angular, Svelte
|
|
203
|
+
- TypeScript, JavaScript
|
|
204
|
+
- CSS frameworks (Tailwind, Bootstrap)
|
|
205
|
+
- Build tools (Vite, Webpack, Parcel)
|
|
206
|
+
|
|
207
|
+
### Backend Technologies
|
|
208
|
+
- Node.js, Python, Java, Go, Rust
|
|
209
|
+
- Express, FastAPI, Spring Boot
|
|
210
|
+
- GraphQL, REST APIs
|
|
211
|
+
- Database integrations
|
|
212
|
+
|
|
213
|
+
### Infrastructure
|
|
214
|
+
- Docker and containerization
|
|
215
|
+
- CI/CD pipelines
|
|
216
|
+
- Cloud platforms (AWS, Azure, GCP)
|
|
217
|
+
- Monitoring and logging
|
|
218
|
+
|
|
219
|
+
## Production Deployment
|
|
220
|
+
|
|
221
|
+
### Docker Deployment
|
|
222
|
+
```dockerfile
|
|
223
|
+
FROM node:18-alpine
|
|
224
|
+
RUN npm install -g @task-shepherd/agent
|
|
225
|
+
EXPOSE 8547 8548
|
|
226
|
+
CMD ["task-shepherd-agent", "start"]
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
### Environment Configuration
|
|
230
|
+
```bash
|
|
231
|
+
# Production settings
|
|
232
|
+
NODE_ENV=production
|
|
233
|
+
TASK_SHEPHERD_API_URL="https://api.taskshepherd.com/graphql"
|
|
234
|
+
CLAUDE_API_KEY="your-production-key"
|
|
235
|
+
MAX_CONCURRENT_JOBS=5
|
|
236
|
+
TOKEN_RATE_LIMIT=50000
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
### Health Monitoring
|
|
240
|
+
```bash
|
|
241
|
+
# Health check endpoint for load balancers
|
|
242
|
+
curl http://localhost:8547/api/health
|
|
243
|
+
|
|
244
|
+
# Readiness check
|
|
245
|
+
curl http://localhost:8547/api/ready
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
## Troubleshooting
|
|
249
|
+
|
|
250
|
+
### Connection Issues
|
|
251
|
+
```bash
|
|
252
|
+
# Test Task Shepherd API connection
|
|
253
|
+
curl -H "x-api-key: $TASK_SHEPHERD_API_KEY" \
|
|
254
|
+
-H "Content-Type: application/json" \
|
|
255
|
+
-d '{"query": "query { __typename }"}' \
|
|
256
|
+
$TASK_SHEPHERD_API_URL
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
### Agent Issues
|
|
260
|
+
```bash
|
|
261
|
+
# Check agent status
|
|
262
|
+
task-shepherd-agent status
|
|
263
|
+
|
|
264
|
+
# Validate workspace configuration
|
|
265
|
+
task-shepherd-agent workspace validate
|
|
266
|
+
|
|
267
|
+
# View agent logs
|
|
268
|
+
tail -f ~/.task-shepherd-agent/logs/agent.log
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
### Common Solutions
|
|
272
|
+
- **API Key Invalid**: Verify API key in Task Shepherd dashboard
|
|
273
|
+
- **Claude API Issues**: Check Claude API key and quotas
|
|
274
|
+
- **Workspace Not Found**: Re-register workspace with correct path
|
|
275
|
+
- **Port Conflicts**: Change PORT environment variable
|
|
276
|
+
|
|
277
|
+
## API Key Management
|
|
278
|
+
|
|
279
|
+
Get your API keys from:
|
|
280
|
+
1. **Task Shepherd API Key**: Your Task Shepherd instance dashboard → Settings → API Keys
|
|
281
|
+
2. **Claude API Key**: Anthropic Console → API Keys
|
|
282
|
+
|
|
283
|
+
Set environment variables or use a `.env` file:
|
|
284
|
+
```bash
|
|
285
|
+
TASK_SHEPHERD_API_KEY="tks_..."
|
|
286
|
+
CLAUDE_API_KEY="sk-ant-api03-..."
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
## License
|
|
290
|
+
|
|
291
|
+
Proprietary software - see LICENSE.md for usage terms.
|
|
292
|
+
|
|
293
|
+
## Support
|
|
294
|
+
|
|
295
|
+
- Check agent status: `task-shepherd-agent status`
|
|
296
|
+
- View logs: `~/.task-shepherd-agent/logs/`
|
|
297
|
+
- Health check: http://localhost:8547/api/health
|