Commit 144d901
authored
refactor: Remove write_to_csv skill and related tests (#36)
## Summary
Removes the specialized `write_to_csv` skill in favor of using ADK's
built-in `create_artifact` tool. The `take_screenshot` skill now saves
files locally and returns file paths instead of automatically creating
artifacts. This promotes better separation of concerns - skills handle
browser automation while the agent uses `create_artifact` for making
files downloadable.
## Changes
### Removed
- **write_to_csv skill** and all related tests
(`skills/write_to_csv.go`, `skills/write_to_csv_test.go`)
- Automatic artifact creation logic from `take_screenshot` skill
### Modified
- **take_screenshot skill**: Now saves screenshots to local filesystem
and returns the file path instead of automatically creating artifacts
- **Agent system prompt**: Updated to include instructions for using
`create_artifact` tool with screenshots and data extraction
- **Main server initialization**:
- Changed from `NewDefaultToolBox()` to `NewToolBox()` +
`WithDefaultToolBox()` pattern
- Added `ArtifactService` initialization and configuration
- Updated server builder to use `WithArtifactService` instead of
`WithArtifactStorage`
- **Dependencies**: Upgraded ADK from v0.14.0 to v0.15.0
### Benefits
- **Better separation of concerns**: Skills focus on their core
functionality (browser automation), artifact creation is handled by the
agent
- **More flexible**: Users can choose whether to create artifacts or
just work with local files
- **Reduced code duplication**: Removes specialized artifact handling
from individual skills
- **Consistent pattern**: All file creation now follows the same
pattern: skill creates file → agent uses `create_artifact` to make it
downloadable
## Test Plan
- [x] Removed tests for `write_to_csv` skill
- [x] Updated `take_screenshot` tests to validate file path return
instead of artifact creation
- [x] Manual testing: Verify screenshots can be taken and then converted
to artifacts using `create_artifact` tool
- [ ] Manual testing: Verify data extraction → CSV conversion → artifact
creation workflow
## Migration Notes
For users upgrading to this version:
- The `write_to_csv` skill is no longer available
- To create CSV files, use data extraction combined with the
`create_artifact` tool
- Screenshots now return file paths; use `create_artifact` to make them
downloadable
---------
Signed-off-by: Eden Reich <eden.reich@gmail.com>1 parent 3b6d3be commit 144d901
19 files changed
Lines changed: 136 additions & 754 deletions
File tree
- .github/workflows
- .well-known
- config
- example
- internal/logger
- skills
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
66 | 72 | | |
67 | 73 | | |
68 | 74 | | |
| |||
75 | 81 | | |
76 | 82 | | |
77 | 83 | | |
78 | | - | |
| 84 | + | |
79 | 85 | | |
80 | 86 | | |
81 | 87 | | |
| |||
134 | 140 | | |
135 | 141 | | |
136 | 142 | | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | 143 | | |
145 | 144 | | |
146 | 145 | | |
| |||
246 | 245 | | |
247 | 246 | | |
248 | 247 | | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | 248 | | |
255 | 249 | | |
256 | 250 | | |
| |||
298 | 292 | | |
299 | 293 | | |
300 | 294 | | |
301 | | - | |
302 | | - | |
303 | 295 | | |
304 | 296 | | |
305 | 297 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
86 | 85 | | |
87 | 86 | | |
88 | 87 | | |
| |||
118 | 117 | | |
119 | 118 | | |
120 | 119 | | |
121 | | - | |
| 120 | + | |
122 | 121 | | |
123 | 122 | | |
124 | 123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | 52 | | |
54 | 53 | | |
55 | 54 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | 313 | | |
352 | 314 | | |
353 | 315 | | |
354 | 316 | | |
355 | | - | |
356 | | - | |
| 317 | + | |
| 318 | + | |
357 | 319 | | |
358 | 320 | | |
359 | 321 | | |
| |||
363 | 325 | | |
364 | 326 | | |
365 | 327 | | |
366 | | - | |
| 328 | + | |
| 329 | + | |
367 | 330 | | |
368 | 331 | | |
369 | 332 | | |
| |||
375 | 338 | | |
376 | 339 | | |
377 | 340 | | |
378 | | - | |
| 341 | + | |
379 | 342 | | |
380 | 343 | | |
381 | 344 | | |
| |||
384 | 347 | | |
385 | 348 | | |
386 | 349 | | |
387 | | - | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
388 | 356 | | |
389 | 357 | | |
390 | 358 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments