amd-gaia 0.14.1__py3-none-any.whl → 0.14.2__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.
- amd_gaia-0.14.2.dist-info/METADATA +220 -0
- {amd_gaia-0.14.1.dist-info → amd_gaia-0.14.2.dist-info}/RECORD +32 -32
- gaia/agents/base/agent.py +32 -4
- gaia/agents/base/console.py +1 -1
- gaia/agents/chat/agent.py +5 -28
- gaia/agents/code/orchestration/checklist_executor.py +26 -2
- gaia/agents/code/orchestration/checklist_generator.py +7 -3
- gaia/agents/code/orchestration/orchestrator.py +64 -44
- gaia/agents/code/orchestration/steps/error_handler.py +1 -1
- gaia/agents/code/orchestration/template_catalog.py +7 -1
- gaia/agents/code/prompts/code_patterns.py +128 -17
- gaia/agents/code/tools/code_formatting.py +1 -1
- gaia/agents/code/tools/code_tools.py +1 -1
- gaia/agents/code/tools/web_dev_tools.py +16 -1
- gaia/apps/summarize/pdf_formatter.py +1 -1
- gaia/audio/audio_client.py +2 -2
- gaia/audio/kokoro_tts.py +2 -2
- gaia/audio/whisper_asr.py +2 -2
- gaia/chat/sdk.py +1 -1
- gaia/cli.py +16 -16
- gaia/eval/batch_experiment.py +1 -1
- gaia/eval/claude.py +4 -4
- gaia/llm/llm_client.py +1 -1
- gaia/rag/demo.py +5 -5
- gaia/rag/pdf_utils.py +1 -1
- gaia/rag/sdk.py +2 -2
- gaia/talk/sdk.py +1 -1
- gaia/version.py +1 -1
- amd_gaia-0.14.1.dist-info/METADATA +0 -768
- {amd_gaia-0.14.1.dist-info → amd_gaia-0.14.2.dist-info}/WHEEL +0 -0
- {amd_gaia-0.14.1.dist-info → amd_gaia-0.14.2.dist-info}/entry_points.txt +0 -0
- {amd_gaia-0.14.1.dist-info → amd_gaia-0.14.2.dist-info}/licenses/LICENSE.md +0 -0
- {amd_gaia-0.14.1.dist-info → amd_gaia-0.14.2.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: amd-gaia
|
|
3
|
+
Version: 0.14.2
|
|
4
|
+
Summary: GAIA is a lightweight agent framework designed for the edge and AI PCs.
|
|
5
|
+
Home-page: https://github.com/amd/gaia
|
|
6
|
+
Author: AMD
|
|
7
|
+
License: MIT
|
|
8
|
+
Classifier: Development Status :: 4 - Beta
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
17
|
+
Requires-Python: >=3.10
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
License-File: LICENSE.md
|
|
20
|
+
Requires-Dist: openai
|
|
21
|
+
Requires-Dist: pydantic>=2.9.2
|
|
22
|
+
Requires-Dist: transformers
|
|
23
|
+
Requires-Dist: accelerate
|
|
24
|
+
Requires-Dist: python-dotenv
|
|
25
|
+
Requires-Dist: aiohttp
|
|
26
|
+
Requires-Dist: rich
|
|
27
|
+
Requires-Dist: watchdog>=2.1.0
|
|
28
|
+
Provides-Extra: api
|
|
29
|
+
Requires-Dist: fastapi>=0.115.0; extra == "api"
|
|
30
|
+
Requires-Dist: uvicorn>=0.32.0; extra == "api"
|
|
31
|
+
Provides-Extra: audio
|
|
32
|
+
Requires-Dist: torch<2.4,>=2.0.0; extra == "audio"
|
|
33
|
+
Requires-Dist: torchvision<0.19.0; extra == "audio"
|
|
34
|
+
Requires-Dist: torchaudio; extra == "audio"
|
|
35
|
+
Provides-Extra: blender
|
|
36
|
+
Requires-Dist: bpy; extra == "blender"
|
|
37
|
+
Provides-Extra: mcp
|
|
38
|
+
Requires-Dist: mcp>=1.1.0; extra == "mcp"
|
|
39
|
+
Requires-Dist: starlette; extra == "mcp"
|
|
40
|
+
Requires-Dist: uvicorn; extra == "mcp"
|
|
41
|
+
Provides-Extra: dev
|
|
42
|
+
Requires-Dist: pytest; extra == "dev"
|
|
43
|
+
Requires-Dist: pytest-benchmark; extra == "dev"
|
|
44
|
+
Requires-Dist: pytest-mock; extra == "dev"
|
|
45
|
+
Requires-Dist: pytest-asyncio; extra == "dev"
|
|
46
|
+
Requires-Dist: memory_profiler; extra == "dev"
|
|
47
|
+
Requires-Dist: matplotlib; extra == "dev"
|
|
48
|
+
Requires-Dist: adjustText; extra == "dev"
|
|
49
|
+
Requires-Dist: plotly; extra == "dev"
|
|
50
|
+
Requires-Dist: black; extra == "dev"
|
|
51
|
+
Requires-Dist: pylint; extra == "dev"
|
|
52
|
+
Requires-Dist: isort; extra == "dev"
|
|
53
|
+
Requires-Dist: flake8; extra == "dev"
|
|
54
|
+
Requires-Dist: autoflake; extra == "dev"
|
|
55
|
+
Requires-Dist: mypy; extra == "dev"
|
|
56
|
+
Requires-Dist: bandit; extra == "dev"
|
|
57
|
+
Requires-Dist: responses; extra == "dev"
|
|
58
|
+
Requires-Dist: requests; extra == "dev"
|
|
59
|
+
Provides-Extra: eval
|
|
60
|
+
Requires-Dist: anthropic; extra == "eval"
|
|
61
|
+
Requires-Dist: bs4; extra == "eval"
|
|
62
|
+
Requires-Dist: scikit-learn>=1.5.0; extra == "eval"
|
|
63
|
+
Requires-Dist: numpy<2.3.0,>=2.0; extra == "eval"
|
|
64
|
+
Requires-Dist: pypdf; extra == "eval"
|
|
65
|
+
Provides-Extra: talk
|
|
66
|
+
Requires-Dist: pyaudio; extra == "talk"
|
|
67
|
+
Requires-Dist: openai-whisper; extra == "talk"
|
|
68
|
+
Requires-Dist: numpy==1.26.4; extra == "talk"
|
|
69
|
+
Requires-Dist: kokoro>=0.3.1; extra == "talk"
|
|
70
|
+
Requires-Dist: soundfile; extra == "talk"
|
|
71
|
+
Requires-Dist: sounddevice; extra == "talk"
|
|
72
|
+
Provides-Extra: youtube
|
|
73
|
+
Requires-Dist: llama-index-readers-youtube-transcript; extra == "youtube"
|
|
74
|
+
Provides-Extra: rag
|
|
75
|
+
Requires-Dist: pypdf; extra == "rag"
|
|
76
|
+
Requires-Dist: sentence-transformers; extra == "rag"
|
|
77
|
+
Requires-Dist: faiss-cpu>=1.7.0; extra == "rag"
|
|
78
|
+
Provides-Extra: lint
|
|
79
|
+
Requires-Dist: black; extra == "lint"
|
|
80
|
+
Requires-Dist: pylint; extra == "lint"
|
|
81
|
+
Requires-Dist: isort; extra == "lint"
|
|
82
|
+
Requires-Dist: flake8; extra == "lint"
|
|
83
|
+
Requires-Dist: autoflake; extra == "lint"
|
|
84
|
+
Requires-Dist: mypy; extra == "lint"
|
|
85
|
+
Requires-Dist: bandit; extra == "lint"
|
|
86
|
+
Dynamic: author
|
|
87
|
+
Dynamic: classifier
|
|
88
|
+
Dynamic: description
|
|
89
|
+
Dynamic: description-content-type
|
|
90
|
+
Dynamic: home-page
|
|
91
|
+
Dynamic: license
|
|
92
|
+
Dynamic: license-file
|
|
93
|
+
Dynamic: provides-extra
|
|
94
|
+
Dynamic: requires-dist
|
|
95
|
+
Dynamic: requires-python
|
|
96
|
+
Dynamic: summary
|
|
97
|
+
|
|
98
|
+
# <img src="src/gaia/img/gaia.ico" alt="GAIA Logo" width="64" height="64" style="vertical-align: middle;"> GAIA: AI Agent Framework for AMD Ryzen AI
|
|
99
|
+
|
|
100
|
+
[](https://github.com/amd/gaia/tree/main/tests "Check out our build")
|
|
101
|
+
[](https://github.com/amd/gaia/tree/main/tests "Check out our cli tests")
|
|
102
|
+
[](https://github.com/amd/gaia/releases/latest "Download the latest release")
|
|
103
|
+
[](https://pypi.org/project/amd-gaia/)
|
|
104
|
+
[](https://github.com/amd/gaia/releases)
|
|
105
|
+
[](https://amd-gaia.ai/quickstart "Windows installation")
|
|
106
|
+
[](https://amd-gaia.ai/quickstart "Linux installation")
|
|
107
|
+
[](https://www.python.org/)
|
|
108
|
+
[](https://opensource.org/licenses/MIT)
|
|
109
|
+
[](https://discord.com/channels/1392562559122407535/1402013282495102997)
|
|
110
|
+
|
|
111
|
+
**GAIA** is AMD's open-source framework for building intelligent AI agents that run **100% locally** on AMD Ryzen AI hardware. Keep your data private, eliminate cloud costs, and deploy in air-gapped environments—all with hardware-accelerated performance.
|
|
112
|
+
|
|
113
|
+
<p align="center">
|
|
114
|
+
<a href="https://amd-gaia.ai/quickstart"><strong>Get Started →</strong></a>
|
|
115
|
+
</p>
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Why GAIA?
|
|
120
|
+
|
|
121
|
+
| Feature | Description |
|
|
122
|
+
|---------|-------------|
|
|
123
|
+
| **100% Local** | All data stays on your machine—perfect for sensitive workloads and air-gapped deployments |
|
|
124
|
+
| **Zero Cloud Costs** | No API fees, no usage limits, no subscriptions—unlimited AI at no extra cost |
|
|
125
|
+
| **Privacy-First** | HIPAA-compliant, GDPR-friendly—ideal for healthcare, finance, and enterprise |
|
|
126
|
+
| **Ryzen AI Optimized** | Hardware-accelerated inference using NPU + iGPU on AMD Ryzen AI processors |
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Build Your First Agent
|
|
131
|
+
|
|
132
|
+
```python
|
|
133
|
+
from gaia.agents.base.agent import Agent
|
|
134
|
+
from gaia.agents.base.tools import tool
|
|
135
|
+
|
|
136
|
+
class MyAgent(Agent):
|
|
137
|
+
"""A simple agent with custom tools."""
|
|
138
|
+
|
|
139
|
+
def _get_system_prompt(self) -> str:
|
|
140
|
+
return "You are a helpful assistant."
|
|
141
|
+
|
|
142
|
+
def _register_tools(self):
|
|
143
|
+
@tool
|
|
144
|
+
def get_weather(city: str) -> dict:
|
|
145
|
+
"""Get weather for a city."""
|
|
146
|
+
return {"city": city, "temperature": 72, "conditions": "Sunny"}
|
|
147
|
+
|
|
148
|
+
agent = MyAgent()
|
|
149
|
+
result = agent.process_query("What's the weather in Austin?")
|
|
150
|
+
print(result)
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
**[See the full quickstart guide →](https://amd-gaia.ai/quickstart)**
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Key Capabilities
|
|
158
|
+
|
|
159
|
+
- **Agent Framework** — Base class with tool orchestration, state management, and error recovery
|
|
160
|
+
- **RAG System** — Document indexing and semantic search for Q&A
|
|
161
|
+
- **Voice Integration** — Whisper ASR + Kokoro TTS for speech interaction
|
|
162
|
+
- **Vision Models** — Extract text from images with Qwen2.5-VL
|
|
163
|
+
- **Plugin System** — Distribute agents via PyPI with auto-discovery
|
|
164
|
+
- **Web UI Packaging** — Generate modern interfaces for your agents
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## Quick Install
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
pip install amd-gaia
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
For complete setup instructions including Lemonade Server, see the **[Quickstart Guide](https://amd-gaia.ai/quickstart)**.
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## System Requirements
|
|
179
|
+
|
|
180
|
+
| Requirement | Minimum | Recommended |
|
|
181
|
+
|-------------|---------|-------------|
|
|
182
|
+
| **Processor** | AMD Ryzen AI 300-series | AMD Ryzen AI Max+ 395 |
|
|
183
|
+
| **OS** | Windows 11, Linux | - |
|
|
184
|
+
| **RAM** | 16GB | 64GB |
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## Documentation
|
|
189
|
+
|
|
190
|
+
- **[Quickstart](https://amd-gaia.ai/quickstart)** — Build your first agent in 10 minutes
|
|
191
|
+
- **[SDK Reference](https://amd-gaia.ai/sdk)** — Complete API documentation
|
|
192
|
+
- **[Guides](https://amd-gaia.ai/guides/chat)** — Chat, Voice, RAG, and more
|
|
193
|
+
- **[FAQ](https://amd-gaia.ai/reference/faq)** — Frequently asked questions
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## Contributing
|
|
198
|
+
|
|
199
|
+
We welcome contributions! See our [Contributing Guide](CONTRIBUTING.md) for details.
|
|
200
|
+
|
|
201
|
+
- **Build agents** in your own repository using GAIA as a dependency
|
|
202
|
+
- **Improve the framework** — check [GitHub Issues](https://github.com/amd/gaia/issues) for open tasks
|
|
203
|
+
- **Add documentation** — examples, tutorials, and guides
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## Contact
|
|
208
|
+
|
|
209
|
+
- **Email**: [gaia@amd.com](mailto:gaia@amd.com)
|
|
210
|
+
- **Discord**: [Join our community](https://discord.com/channels/1392562559122407535/1402013282495102997)
|
|
211
|
+
- **Issues**: [GitHub Issues](https://github.com/amd/gaia/issues)
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## License
|
|
216
|
+
|
|
217
|
+
[MIT License](./LICENSE.md)
|
|
218
|
+
|
|
219
|
+
Copyright(C) 2024-2025 Advanced Micro Devices, Inc. All rights reserved.
|
|
220
|
+
SPDX-License-Identifier: MIT
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
amd_gaia-0.14.
|
|
1
|
+
amd_gaia-0.14.2.dist-info/licenses/LICENSE.md,sha256=G1X5Kiqq2PwbU4BUcxqrxqo7tE_vlQZ_GC0VWembFi8,1103
|
|
2
2
|
gaia/__init__.py,sha256=v8FpwoL5Hw4zlXkruJmebBqIpUr2lyPZSg2NrfAx-HM,108
|
|
3
|
-
gaia/cli.py,sha256=
|
|
3
|
+
gaia/cli.py,sha256=oUBmvDX4zj0aLD1pIFwxfJkA3ts-7KjBegnvhm3zles,224951
|
|
4
4
|
gaia/logger.py,sha256=Z4IAkTRHFNeE2fd8p2OGYxt0qP5IWGBioo2GZ47z33g,6749
|
|
5
5
|
gaia/security.py,sha256=IUBnJvRz6CkPh_yYxGwifsiGCMPquHlqKWcJehEu6t4,5989
|
|
6
6
|
gaia/util.py,sha256=xpw398BY8Ez4WhdeZYSJq_lJgKi-0e78Ki6cy47708s,1615
|
|
7
|
-
gaia/version.py,sha256=
|
|
7
|
+
gaia/version.py,sha256=bbMjXL9qt0IUJLC8jMdgOkI0WXSKQ7dcqrQ_an4O63A,2940
|
|
8
8
|
gaia/agents/__init__.py,sha256=1_WqeEVnhTnAIIdu9bexrxOA713t6ULF8zQ9Wn2GFys,490
|
|
9
9
|
gaia/agents/base/__init__.py,sha256=DgK0xd27Ef6dWMUHgtrnuSnrZvNB4wExKEyg_XeGoSI,373
|
|
10
|
-
gaia/agents/base/agent.py,sha256=
|
|
10
|
+
gaia/agents/base/agent.py,sha256=MnuTCIEQ5YsMA1u_LFG2ju1vxN437uL5TXC1yit699Y,95260
|
|
11
11
|
gaia/agents/base/api_agent.py,sha256=7O_46AICrvMSL-iP_8XLT6bYKEu3QXHJpbYGG-pawv8,4027
|
|
12
|
-
gaia/agents/base/console.py,sha256=
|
|
12
|
+
gaia/agents/base/console.py,sha256=c3WJfJrvsrhNa6ApH7CC6gr1WeaOSLuMll-EQVHyLNI,53670
|
|
13
13
|
gaia/agents/base/mcp_agent.py,sha256=ixKnlqjP1YJ9GphShVWQ7r9LWInRV2rxSZI741OUssQ,2438
|
|
14
14
|
gaia/agents/base/tools.py,sha256=KM3WruuLNvn4zAU7MlTjVE38NVfDJkofuD6QqLqf9So,2697
|
|
15
15
|
gaia/agents/blender/agent.py,sha256=Qt6FkLVgOMi5UNTEMpxRG19Q33hlB5pKc0TwRryMPng,21270
|
|
@@ -23,7 +23,7 @@ gaia/agents/blender/core/rendering.py,sha256=UPCrROVdn5tATcv-af-gyk3F9BK0jtdYv-1
|
|
|
23
23
|
gaia/agents/blender/core/scene.py,sha256=MNkkmz89kDtxXWh1hp6UWuyiMrELG-kX_mJUPZCq68M,7191
|
|
24
24
|
gaia/agents/blender/core/view.py,sha256=iseY8jnESyXdkiAxctGm_sI52qYDEBAHsSZsKTGBT8I,5124
|
|
25
25
|
gaia/agents/chat/__init__.py,sha256=RlWMJDCVWXGz7UEoc9nl5ZalswaWxyWnvc2ZeB9DC54,244
|
|
26
|
-
gaia/agents/chat/agent.py,sha256=
|
|
26
|
+
gaia/agents/chat/agent.py,sha256=KL3yVhmf7vip1gIVxVfpOcYyiSYLWzWGhQ4HSXtni0U,39017
|
|
27
27
|
gaia/agents/chat/app.py,sha256=lj-MBLtMakij5pmslItAXKsudeHvn6E6VfaIFrWqKCk,48217
|
|
28
28
|
gaia/agents/chat/session.py,sha256=iAGodYKzAQ-D-IRiW_PKHCCdwLNTMAuqT4h7h6DULOw,18364
|
|
29
29
|
gaia/agents/chat/tools/__init__.py,sha256=7camTNaCUwcY96t8cVVWmi3VpXX_r4AoeWJubMehYEw,466
|
|
@@ -37,18 +37,18 @@ gaia/agents/code/models.py,sha256=v5uUuNvco3T7WkeGKkRg3V5sjNdw1-xjh9_-RjGNW84,32
|
|
|
37
37
|
gaia/agents/code/schema_inference.py,sha256=4GNEsE0ZMQDIta03nLHYu7s3yqARKr_6QGuSW5xBlOU,12887
|
|
38
38
|
gaia/agents/code/system_prompt.py,sha256=oDr-XIaQ5SdcU1kwBxCcc-SFdb2BsWP5TvFxYSgr58s,1525
|
|
39
39
|
gaia/agents/code/orchestration/__init__.py,sha256=tmZ1RHP01TXl08PTL0a4e20-c8ifMJNylQS8vF2tyO0,689
|
|
40
|
-
gaia/agents/code/orchestration/checklist_executor.py,sha256=
|
|
41
|
-
gaia/agents/code/orchestration/checklist_generator.py,sha256=
|
|
42
|
-
gaia/agents/code/orchestration/orchestrator.py,sha256=
|
|
40
|
+
gaia/agents/code/orchestration/checklist_executor.py,sha256=RT75Mceu8uhoJrdULcuEhIbC8FTfMtAmrHVg5_sSO3o,64442
|
|
41
|
+
gaia/agents/code/orchestration/checklist_generator.py,sha256=si2uE_zy9woGD1CcmasRQdSjWA63HxJND00nypGGQX4,29181
|
|
42
|
+
gaia/agents/code/orchestration/orchestrator.py,sha256=LNjU0_hS4-otlmKcF5sfQ6gc1kLYmBVmZl2oNBVL0XI,24308
|
|
43
43
|
gaia/agents/code/orchestration/project_analyzer.py,sha256=mk--4PherF36AGoo_CeP4ZY_EzC1UqV4SL6CQqbUTT4,12257
|
|
44
|
-
gaia/agents/code/orchestration/template_catalog.py,sha256=
|
|
44
|
+
gaia/agents/code/orchestration/template_catalog.py,sha256=jKdK-CvqzUJT5bZ8uEVGbiElIDQXymcsdR5e80UFBrA,18339
|
|
45
45
|
gaia/agents/code/orchestration/factories/__init__.py,sha256=jTUACMSl0Od5-OlwwEApXYRJQeNGGGXE1RZSfcBccZY,350
|
|
46
46
|
gaia/agents/code/orchestration/factories/base.py,sha256=4PvfaxG8P_X9dcyniPuuQSGNqI4etnFY8qjVoiHodEk,1916
|
|
47
47
|
gaia/agents/code/orchestration/factories/nextjs_factory.py,sha256=6tvLKo20AieLabyG0Rwc7Yk976QLZg4XulFC8zYVHnw,3712
|
|
48
48
|
gaia/agents/code/orchestration/factories/python_factory.py,sha256=GrV7Sf-q7gNcBBDEzI-fmEwrukXBGbzz4rPMrGD16P4,3157
|
|
49
49
|
gaia/agents/code/orchestration/steps/__init__.py,sha256=3P0LQNlWAe38FkBrmn8RMXCOBpM3pw34kNZTM-ej2zI,1659
|
|
50
50
|
gaia/agents/code/orchestration/steps/base.py,sha256=EojY57GZKaQE28y0_Rt-I9T7Ds_g8vGEUQmTPyxS_TU,5991
|
|
51
|
-
gaia/agents/code/orchestration/steps/error_handler.py,sha256=
|
|
51
|
+
gaia/agents/code/orchestration/steps/error_handler.py,sha256=sVPga7l5g04EIpq1YxGzPtLNAAKyPUmAIJqN_sZmhhY,11971
|
|
52
52
|
gaia/agents/code/orchestration/steps/nextjs.py,sha256=rv_VCF0eO6LNNpBkY2fEXSvP0RzI_qTAN2LOD1HHu74,31178
|
|
53
53
|
gaia/agents/code/orchestration/steps/python.py,sha256=hE7vBPSxUbi1uZlAzHhXxC8MzbkSRsGU4bR-nXWOJIo,10746
|
|
54
54
|
gaia/agents/code/orchestration/workflows/__init__.py,sha256=qobsddeNoOUlYFV5CH7hLRd00wqshFLqxmZh-pV0Q9Q,423
|
|
@@ -57,13 +57,13 @@ gaia/agents/code/orchestration/workflows/nextjs.py,sha256=CtlG6NYNTKwP63TAmIIDU1
|
|
|
57
57
|
gaia/agents/code/orchestration/workflows/python.py,sha256=PwC8xLYGJactiw_1zV4dfecxp9w06bp2qRQmmvlmaOE,2551
|
|
58
58
|
gaia/agents/code/prompts/__init__.py,sha256=ikoAO4w0t3D6KSblsiwQpvsvtj0I9uwYuNW_bNjXLhc,320
|
|
59
59
|
gaia/agents/code/prompts/base_prompt.py,sha256=5S3VkoKfZv9mRvR7PR4iiMAn7aKDP7uYfgCP2bgrDtQ,2811
|
|
60
|
-
gaia/agents/code/prompts/code_patterns.py,sha256=
|
|
60
|
+
gaia/agents/code/prompts/code_patterns.py,sha256=io0XaxDf7-_R90_QMT0pGQ65UD3lwZMkQzVYurUOK8k,69566
|
|
61
61
|
gaia/agents/code/prompts/nextjs_prompt.py,sha256=MlZq30ytFauA6SpUTHbGtpKGWzkDvlBjlA359YDrC2I,1376
|
|
62
62
|
gaia/agents/code/prompts/python_prompt.py,sha256=tDYrCF1fu1YBRcezOBDVrRzhNchQQaRzrpwbT3GkljI,5266
|
|
63
63
|
gaia/agents/code/tools/__init__.py,sha256=qFqvGOD8cwAoddFKjS4_4cyt7DTQhAAM-TIcDI4hfB0,1236
|
|
64
64
|
gaia/agents/code/tools/cli_tools.py,sha256=54lHmL_hRljqelxvSJNu-JxGC_l0pbWJlyu5wA7MdHA,39814
|
|
65
|
-
gaia/agents/code/tools/code_formatting.py,sha256=
|
|
66
|
-
gaia/agents/code/tools/code_tools.py,sha256=
|
|
65
|
+
gaia/agents/code/tools/code_formatting.py,sha256=dP4wXbtvlaXmj16xFArFUUIkau3RQHREPLWZ-0q1E44,12577
|
|
66
|
+
gaia/agents/code/tools/code_tools.py,sha256=cvF8NL_3HZ8ploIE5LFepHvYFW0GbXxiSANbTSieCaA,28202
|
|
67
67
|
gaia/agents/code/tools/error_fixing.py,sha256=pl6zJm0_cYH0oj-z1LkDuM1mk611J1ssc5AlvSNT6Zo,58989
|
|
68
68
|
gaia/agents/code/tools/external_tools.py,sha256=sGPPUw8LRwV9Ow1kPVFam_AlsLsTVNWsU0TbCrhsOm8,7493
|
|
69
69
|
gaia/agents/code/tools/file_io.py,sha256=Yu_FE1fpqepWqUibHKL76TGEF70k6K5shQ7YmS4_mig,33852
|
|
@@ -73,7 +73,7 @@ gaia/agents/code/tools/testing.py,sha256=UadAIUeNFKE90sPEiX3nuM16Wo9FyeQjyJPZ7TF
|
|
|
73
73
|
gaia/agents/code/tools/typescript_tools.py,sha256=p7S2sF2XypJCX4OSqS9P916Q5-Wp0HYoib1xcbsAhPw,4499
|
|
74
74
|
gaia/agents/code/tools/validation_parsing.py,sha256=BdZDMAHnoWyhk20NuDadrFtCluvVqvpVdZ6eWAZyqjI,17300
|
|
75
75
|
gaia/agents/code/tools/validation_tools.py,sha256=xM0FEfKpAWEHyEKDXdWAJBVjfuIiEnShXUA9qzk3EnI,36265
|
|
76
|
-
gaia/agents/code/tools/web_dev_tools.py,sha256=
|
|
76
|
+
gaia/agents/code/tools/web_dev_tools.py,sha256=KU13i2OsgBBc7JlaDhyfxJYy5h9VmNrUlo0060dUWcg,78400
|
|
77
77
|
gaia/agents/code/validators/__init__.py,sha256=gvCXPdksZs703Lkg-3Bs3CoC3k51K9LIUoiZux8koo0,509
|
|
78
78
|
gaia/agents/code/validators/antipattern_checker.py,sha256=4KQtE6yLLxK9tx2M6y8Pz8do5twIUyLWjeIqRcLpqdc,8614
|
|
79
79
|
gaia/agents/code/validators/ast_analyzer.py,sha256=KjZjOFeFWmheO7vScZsCq9m0h62Sdu5O1epOeKWAt9g,6980
|
|
@@ -98,18 +98,18 @@ gaia/apps/llm/__init__.py,sha256=TIepjYRrjI6A4M3l8hfhKRZnwHR38r1ZDQDFfGucuY4,162
|
|
|
98
98
|
gaia/apps/llm/app.py,sha256=takotX-pAQUg8-teig7cF0jOCZYe-fmqbMP_9GpdInE,5097
|
|
99
99
|
gaia/apps/summarize/app.py,sha256=roSFU8VUBNcKNXxxKQ3V_F0eyF5rvst1gAGqcojmJH8,24758
|
|
100
100
|
gaia/apps/summarize/html_viewer.py,sha256=EszoiclACH4i28jB7Rz10m3vpzVd-6skV0juYHA5Yz4,4314
|
|
101
|
-
gaia/apps/summarize/pdf_formatter.py,sha256=
|
|
101
|
+
gaia/apps/summarize/pdf_formatter.py,sha256=oCLNqT7vY4mopYb8KPpB-vHMrvCeM_6qCnIh4srV1jo,10711
|
|
102
102
|
gaia/audio/__init__.py,sha256=v8FpwoL5Hw4zlXkruJmebBqIpUr2lyPZSg2NrfAx-HM,108
|
|
103
|
-
gaia/audio/audio_client.py,sha256=
|
|
103
|
+
gaia/audio/audio_client.py,sha256=a1Y2yK02-gmLaBdHOEwD5esEkWbg2rEhRqRVQwE5VX8,19018
|
|
104
104
|
gaia/audio/audio_recorder.py,sha256=2YfJE-7S4uW7kzOAuW7Gkl3xX6WQljARKKUq2Ao4c1M,10009
|
|
105
|
-
gaia/audio/kokoro_tts.py,sha256=
|
|
106
|
-
gaia/audio/whisper_asr.py,sha256=
|
|
105
|
+
gaia/audio/kokoro_tts.py,sha256=paI1MwIdjYKL2c-Alq7QfIFRvHCGFnN6IfaXgrIM0z4,22430
|
|
106
|
+
gaia/audio/whisper_asr.py,sha256=MNNxYNMKkblv28rf5Qa0GxiL6Qu8yftk6SWr97ro7zs,16948
|
|
107
107
|
gaia/chat/__init__.py,sha256=LaQkeWzHVMkpOjQrawWrSiu2Q0i4OkVJ57p4pzrBWNg,365
|
|
108
108
|
gaia/chat/app.py,sha256=-occvE-x1zRibu4qfCuvWQbEZC2rkfPjYd3DHYK9TXA,12760
|
|
109
109
|
gaia/chat/prompts.py,sha256=cf5tMjS0qJoPscaejKCREEJ7-wy510ndihLuey39ma8,22089
|
|
110
|
-
gaia/chat/sdk.py,sha256=
|
|
111
|
-
gaia/eval/batch_experiment.py,sha256=
|
|
112
|
-
gaia/eval/claude.py,sha256=
|
|
110
|
+
gaia/chat/sdk.py,sha256=EfQ1zDRNS_RueHnJrNQ6cdt-GosECmH-0cfFRMWIQc0,44824
|
|
111
|
+
gaia/eval/batch_experiment.py,sha256=mKP11D1YSPCSPo5pxloMO_XjO8WHiAHXr8mE-Z0MNs0,101884
|
|
112
|
+
gaia/eval/claude.py,sha256=JpjEjWT00qWgiq356I7Eq6LCjmgF5f60gav_jAi4H_A,21186
|
|
113
113
|
gaia/eval/config.py,sha256=UQA1L5zBRGfLfhawRI8dYIczEdUzQ0qIlDzRDf1DQ9Q,1658
|
|
114
114
|
gaia/eval/email_generator.py,sha256=fvn_zG4XDgt1a1Z50QEvpluF-imYfRX5I9R5vsnh5bs,21719
|
|
115
115
|
gaia/eval/eval.py,sha256=56ukOYOgornJNWeJTENTBWMloOf_ZaACuYKX0tryhE4,151009
|
|
@@ -776,7 +776,7 @@ gaia/eval/webapp/public/styles.css,sha256=YTn_pyzKY3vzl1APs52vmtw03aQ0OOaIKESRFD
|
|
|
776
776
|
gaia/llm/__init__.py,sha256=v8FpwoL5Hw4zlXkruJmebBqIpUr2lyPZSg2NrfAx-HM,108
|
|
777
777
|
gaia/llm/lemonade_client.py,sha256=sj2Z71ewGBjIQEPGBBIgtpgWw7Z6rBv9Gr_0OIQEid8,116251
|
|
778
778
|
gaia/llm/lemonade_manager.py,sha256=LNNGXb1qeJ4NzpMDYxTVcwszGQ_kXx6U9YKSHNhMIH0,10600
|
|
779
|
-
gaia/llm/llm_client.py,sha256=
|
|
779
|
+
gaia/llm/llm_client.py,sha256=tOo9tk645G6IcqPij2rdhpygJpovl3iu9hX6l-bqd4o,29912
|
|
780
780
|
gaia/llm/vlm_client.py,sha256=VYskOi-ZinDhJQ2WRh-DG3a14Y2qYpRQVnLYHDAotF0,10681
|
|
781
781
|
gaia/mcp/agent_mcp_server.py,sha256=zgIjqEwYiLy1RyPLAiQ8GCBZAEKQD4QcB2B0McfP-Ws,10397
|
|
782
782
|
gaia/mcp/blender_mcp_client.py,sha256=g5Q972WaK4qgSf1sQ_vl_BquY9Wzwm-a-5KjP2O6ox0,5105
|
|
@@ -788,13 +788,13 @@ gaia/mcp/servers/__init__.py,sha256=cGW-US8qMthLG0EOqr7qxjawAI5rOKoOLJh8DbfPoOU,
|
|
|
788
788
|
gaia/mcp/servers/docker_mcp.py,sha256=ehDAcqR56te8FPT48N6kR6ARoSa0UcHs0nbapUelFqs,2183
|
|
789
789
|
gaia/rag/__init__.py,sha256=Ui7XO7C5tB-oEHOG1kYgNYV7GZL3PbQRojDzSgLdNuw,336
|
|
790
790
|
gaia/rag/app.py,sha256=Kee7h_llYBxI2rWgrkg2picSyIj_ECBmsnPrcWmbOs8,8872
|
|
791
|
-
gaia/rag/demo.py,sha256=
|
|
792
|
-
gaia/rag/pdf_utils.py,sha256=
|
|
793
|
-
gaia/rag/sdk.py,sha256=
|
|
791
|
+
gaia/rag/demo.py,sha256=L9paeJk9dFbkq5g2Ip5nlNQ2AQH9dVSUDiMVtnc2gfE,10609
|
|
792
|
+
gaia/rag/pdf_utils.py,sha256=mUWy4XZ4xLUbvbPbEUMcxwFnaK7ltKd46kdol0DgE2g,7696
|
|
793
|
+
gaia/rag/sdk.py,sha256=GqCl5yFUjd6WK5wkm3UzHwRlh4NhvbfNhONR_5g9rdM,88011
|
|
794
794
|
gaia/talk/app.py,sha256=T8nMkoGQluSo4TV-70OcwzRI48W87DC2O_HfyO0bHBA,8213
|
|
795
|
-
gaia/talk/sdk.py,sha256=
|
|
796
|
-
amd_gaia-0.14.
|
|
797
|
-
amd_gaia-0.14.
|
|
798
|
-
amd_gaia-0.14.
|
|
799
|
-
amd_gaia-0.14.
|
|
800
|
-
amd_gaia-0.14.
|
|
795
|
+
gaia/talk/sdk.py,sha256=MXbyic5JH_TM8JBegwPnNTi58IfRx71sqX0TQV6ijXc,17862
|
|
796
|
+
amd_gaia-0.14.2.dist-info/METADATA,sha256=jAKBDk9NRkNwkaJ56JsOdYG3a-tBVttUuwCTiBFL2MA,8674
|
|
797
|
+
amd_gaia-0.14.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
798
|
+
amd_gaia-0.14.2.dist-info/entry_points.txt,sha256=md5PIkmzuP8j-uzSLj5a1it-ZVrzAGupIihPrAig18E,149
|
|
799
|
+
amd_gaia-0.14.2.dist-info/top_level.txt,sha256=79yz2gLmqK4bFQkuN8_cnHVY-lobuVT0Ww4YoO6OFvU,5
|
|
800
|
+
amd_gaia-0.14.2.dist-info/RECORD,,
|
gaia/agents/base/agent.py
CHANGED
|
@@ -159,9 +159,38 @@ class Agent(abc.ABC):
|
|
|
159
159
|
# Register tools for this agent
|
|
160
160
|
self._register_tools()
|
|
161
161
|
|
|
162
|
-
# Update system prompt with available tools
|
|
162
|
+
# Update system prompt with available tools and response format
|
|
163
163
|
tools_description = self._format_tools_for_prompt()
|
|
164
|
-
self.system_prompt += f"\n\n==== AVAILABLE TOOLS ====\n{tools_description}\n
|
|
164
|
+
self.system_prompt += f"\n\n==== AVAILABLE TOOLS ====\n{tools_description}\n"
|
|
165
|
+
|
|
166
|
+
# Add JSON response format instructions (shared across all agents)
|
|
167
|
+
self.system_prompt += """
|
|
168
|
+
==== RESPONSE FORMAT ====
|
|
169
|
+
You must respond ONLY in valid JSON. No text before { or after }.
|
|
170
|
+
|
|
171
|
+
**To call a tool:**
|
|
172
|
+
{"thought": "reasoning", "goal": "objective", "tool": "tool_name", "tool_args": {"arg1": "value1"}}
|
|
173
|
+
|
|
174
|
+
**To create a multi-step plan:**
|
|
175
|
+
{
|
|
176
|
+
"thought": "reasoning",
|
|
177
|
+
"goal": "objective",
|
|
178
|
+
"plan": [
|
|
179
|
+
{"tool": "tool1", "tool_args": {"arg": "val"}},
|
|
180
|
+
{"tool": "tool2", "tool_args": {"arg": "val"}}
|
|
181
|
+
],
|
|
182
|
+
"tool": "tool1",
|
|
183
|
+
"tool_args": {"arg": "val"}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
**To provide a final answer:**
|
|
187
|
+
{"thought": "reasoning", "goal": "achieved", "answer": "response to user"}
|
|
188
|
+
|
|
189
|
+
**RULES:**
|
|
190
|
+
1. ALWAYS use tools for real data - NEVER hallucinate
|
|
191
|
+
2. Plan steps MUST be objects like {"tool": "x", "tool_args": {}}, NOT strings
|
|
192
|
+
3. After tool results, provide an "answer" summarizing them
|
|
193
|
+
"""
|
|
165
194
|
|
|
166
195
|
# Initialize ChatSDK with proper configuration
|
|
167
196
|
# Note: We don't set system_prompt in config, we pass it per request
|
|
@@ -199,12 +228,11 @@ class Agent(abc.ABC):
|
|
|
199
228
|
"""
|
|
200
229
|
raise NotImplementedError("Subclasses must implement _get_system_prompt")
|
|
201
230
|
|
|
202
|
-
@abc.abstractmethod
|
|
203
231
|
def _create_console(self):
|
|
204
232
|
"""
|
|
205
233
|
Create and return a console output handler.
|
|
206
234
|
Returns SilentConsole if in silent_mode, otherwise AgentConsole.
|
|
207
|
-
Subclasses
|
|
235
|
+
Subclasses can override this to provide domain-specific console output.
|
|
208
236
|
"""
|
|
209
237
|
if self.silent_mode:
|
|
210
238
|
# Check if we should completely silence everything (including final answer)
|
gaia/agents/base/console.py
CHANGED
|
@@ -21,7 +21,7 @@ try:
|
|
|
21
21
|
except ImportError:
|
|
22
22
|
RICH_AVAILABLE = False
|
|
23
23
|
print(
|
|
24
|
-
"Rich library not found. Install with 'pip install rich' for syntax highlighting."
|
|
24
|
+
"Rich library not found. Install with 'uv pip install rich' for syntax highlighting."
|
|
25
25
|
)
|
|
26
26
|
|
|
27
27
|
# Display configuration constants
|
gaia/agents/chat/agent.py
CHANGED
|
@@ -411,13 +411,8 @@ No documents are currently indexed.
|
|
|
411
411
|
"""
|
|
412
412
|
|
|
413
413
|
# Build the prompt with indexed documents section
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
**CRITICAL RULES:**
|
|
417
|
-
1. ALWAYS output valid JSON - every single response
|
|
418
|
-
2. Do NOT add text before or after the JSON
|
|
419
|
-
3. Do NOT use markdown code blocks
|
|
420
|
-
4. Your entire response must be parseable as JSON
|
|
414
|
+
# NOTE: Base agent now provides JSON format rules, so we only add ChatAgent-specific guidance
|
|
415
|
+
base_prompt = """You are a helpful AI assistant with document search and RAG capabilities.
|
|
421
416
|
"""
|
|
422
417
|
|
|
423
418
|
# Add indexed documents section
|
|
@@ -425,25 +420,7 @@ No documents are currently indexed.
|
|
|
425
420
|
base_prompt
|
|
426
421
|
+ indexed_docs_section
|
|
427
422
|
+ """
|
|
428
|
-
|
|
429
|
-
**JSON RESPONSE FORMATS:**
|
|
430
|
-
|
|
431
|
-
Format 1 - Direct Answer (for general conversation):
|
|
432
|
-
{
|
|
433
|
-
"thought": "brief reasoning",
|
|
434
|
-
"goal": "what you're trying to achieve",
|
|
435
|
-
"answer": "your response text here"
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
Format 2 - Tool Call (to get data or perform actions):
|
|
439
|
-
{
|
|
440
|
-
"thought": "why you need this tool",
|
|
441
|
-
"goal": "what you're trying to achieve",
|
|
442
|
-
"tool": "tool_name",
|
|
443
|
-
"tool_args": {}
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
**WHEN TO USE EACH FORMAT:**
|
|
423
|
+
**WHEN TO USE TOOLS VS DIRECT ANSWERS:**
|
|
447
424
|
|
|
448
425
|
Use Format 1 (answer) for:
|
|
449
426
|
- Greetings: {"answer": "Hello! How can I help?"}
|
|
@@ -847,9 +824,9 @@ When user asks to "index my data folder" or similar:
|
|
|
847
824
|
"\n❌ Error: Missing required package 'watchdog'\n\n"
|
|
848
825
|
"File watching requires the watchdog package.\n"
|
|
849
826
|
"Please install the required dependencies:\n"
|
|
850
|
-
|
|
827
|
+
' uv pip install -e ".[dev]"\n\n'
|
|
851
828
|
"Or install watchdog directly:\n"
|
|
852
|
-
|
|
829
|
+
' uv pip install "watchdog>=2.1.0"\n'
|
|
853
830
|
)
|
|
854
831
|
logger.error(error_msg)
|
|
855
832
|
raise ImportError(error_msg)
|
|
@@ -107,6 +107,12 @@ TEMPLATE_METADATA: Dict[str, Dict[str, Any]] = {
|
|
|
107
107
|
],
|
|
108
108
|
"file_pattern": "src/app/{resource}s/[id]/page.tsx",
|
|
109
109
|
},
|
|
110
|
+
"artifact-timer": {
|
|
111
|
+
"requires_client": True,
|
|
112
|
+
"expected_classes": [
|
|
113
|
+
"glass-card",
|
|
114
|
+
],
|
|
115
|
+
},
|
|
110
116
|
},
|
|
111
117
|
"generate_api_route": {
|
|
112
118
|
"collection": {
|
|
@@ -891,6 +897,7 @@ Return raw CSS starting with @tailwind base;"""
|
|
|
891
897
|
APP_GLOBALS_CSS,
|
|
892
898
|
CLIENT_COMPONENT_FORM,
|
|
893
899
|
CLIENT_COMPONENT_NEW_PAGE,
|
|
900
|
+
CLIENT_COMPONENT_TIMER,
|
|
894
901
|
SERVER_COMPONENT_DETAIL,
|
|
895
902
|
SERVER_COMPONENT_LIST,
|
|
896
903
|
)
|
|
@@ -975,6 +982,7 @@ export default function Home() {
|
|
|
975
982
|
"form": CLIENT_COMPONENT_FORM,
|
|
976
983
|
"new": CLIENT_COMPONENT_NEW_PAGE,
|
|
977
984
|
"detail": SERVER_COMPONENT_DETAIL,
|
|
985
|
+
"artifact-timer": CLIENT_COMPONENT_TIMER,
|
|
978
986
|
},
|
|
979
987
|
"generate_api_route": {
|
|
980
988
|
"collection": api_route_collection,
|
|
@@ -1030,6 +1038,12 @@ export default function Home() {
|
|
|
1030
1038
|
|
|
1031
1039
|
if template == "generate_react_component":
|
|
1032
1040
|
variant = params.get("variant", "list")
|
|
1041
|
+
component_name = params.get("component_name")
|
|
1042
|
+
if component_name:
|
|
1043
|
+
safe_name = "".join(
|
|
1044
|
+
ch for ch in component_name if ch.isalnum() or ch == "_"
|
|
1045
|
+
)
|
|
1046
|
+
component_name = safe_name or component_name
|
|
1033
1047
|
|
|
1034
1048
|
if variant == "list":
|
|
1035
1049
|
return f"src/app/{resource}s/page.tsx"
|
|
@@ -1039,7 +1053,12 @@ export default function Home() {
|
|
|
1039
1053
|
return f"src/app/{resource}s/new/page.tsx"
|
|
1040
1054
|
elif variant == "detail":
|
|
1041
1055
|
return f"src/app/{resource}s/[id]/page.tsx"
|
|
1056
|
+
elif variant == "artifact-timer":
|
|
1057
|
+
file_component = component_name or f"{resource_cap}Timer"
|
|
1058
|
+
return f"src/components/{file_component}.tsx"
|
|
1042
1059
|
else:
|
|
1060
|
+
if component_name:
|
|
1061
|
+
return f"src/components/{component_name}.tsx"
|
|
1043
1062
|
return f"src/components/{resource_cap}{variant.capitalize()}.tsx"
|
|
1044
1063
|
|
|
1045
1064
|
elif template == "generate_api_route":
|
|
@@ -1604,12 +1623,15 @@ if (process.env.NODE_ENV !== "production") globalForPrisma.prisma = prisma;
|
|
|
1604
1623
|
variant = template_params.get("variant", "list")
|
|
1605
1624
|
|
|
1606
1625
|
# Generate component_name from resource + variant
|
|
1607
|
-
#
|
|
1626
|
+
# Allow caller to provide an explicit component_name (used for timers)
|
|
1608
1627
|
resource_capitalized = resource.capitalize() if resource else "Item"
|
|
1609
1628
|
variant_capitalized = variant.capitalize() if variant else "List"
|
|
1629
|
+
explicit_component = template_params.get("component_name")
|
|
1610
1630
|
|
|
1611
1631
|
# Build component name based on variant
|
|
1612
|
-
if
|
|
1632
|
+
if explicit_component:
|
|
1633
|
+
component_name = explicit_component
|
|
1634
|
+
elif variant == "list":
|
|
1613
1635
|
component_name = f"{resource_capitalized}List"
|
|
1614
1636
|
elif variant == "form":
|
|
1615
1637
|
component_name = f"{resource_capitalized}Form"
|
|
@@ -1619,6 +1641,8 @@ if (process.env.NODE_ENV !== "production") globalForPrisma.prisma = prisma;
|
|
|
1619
1641
|
component_name = f"{resource_capitalized}Detail"
|
|
1620
1642
|
elif variant == "actions":
|
|
1621
1643
|
component_name = f"{resource_capitalized}Actions"
|
|
1644
|
+
elif variant == "artifact-timer":
|
|
1645
|
+
component_name = f"{resource_capitalized}Timer"
|
|
1622
1646
|
else:
|
|
1623
1647
|
component_name = f"{resource_capitalized}{variant_capitalized}"
|
|
1624
1648
|
|
|
@@ -137,6 +137,8 @@ CHECKLIST_SYSTEM_PROMPT = """You are a code generation planner. Your task is to
|
|
|
137
137
|
5. Ensure dependencies are satisfied (run setup before data, data before API, API before UI)
|
|
138
138
|
6. Generate a complete checklist that creates a working application
|
|
139
139
|
7. When follow-up fixes are requested, use `fix_code` to repair the specific files called out by validation/test logs. Extract the precise file paths and line numbers from the errors (see the Raw Validation Logs) and pass those line numbers inside the error description so the fixer knows exactly where to focus. Always reference the latest findings to decide which fixes to schedule before running validations again.
|
|
140
|
+
8. If the user explicitly requests an additional UI artifact (countdown display, stats badge, etc.), schedule a `generate_react_component` step with the appropriate `artifact-*` variant (e.g., `"artifact-timer"`) and a descriptive `component_name`. Keep the artifact's logic inside that client component—server components like `page.tsx` should only render the artifact and pass any required props.
|
|
141
|
+
9. **Route pairing requirement:** Whenever you schedule `{{"template": "generate_api_route", "params": {{"type": "collection", ...}}}}`, you MUST also include a matching `generate_api_route` item with `"type": "item"` for the same resource so detail pages can call `/api/<resource>/[id]`.
|
|
140
142
|
|
|
141
143
|
This workflow repeats until all validations pass, so each checklist should either advance new functionality or explicitly repair the failures reported in the latest validation logs.
|
|
142
144
|
|
|
@@ -144,12 +146,13 @@ This workflow repeats until all validations pass, so each checklist should eithe
|
|
|
144
146
|
|
|
145
147
|
For any app that manages resources (todos, posts, users, etc.), you MUST generate ALL of these UI components:
|
|
146
148
|
|
|
147
|
-
1. **
|
|
148
|
-
2. **
|
|
149
|
+
1. **Form component** (variant: "form") - Reusable form for create (generate this first so other pages can import it)
|
|
150
|
+
2. **Artifact components** (variant: "artifact-*") - Any additional UI artifacts requested by the user (e.g., countdown display, stats badge). Generate these before any page that consumes them.
|
|
149
151
|
3. **New page** (variant: "new") - Create new item at /resources/new
|
|
150
152
|
4. **Edit page** (variant: "detail") - Edit single item at /resources/[id] with pre-populated form
|
|
153
|
+
5. **List page** (variant: "list") - Main page showing all items at /resources
|
|
151
154
|
|
|
152
|
-
Missing any of
|
|
155
|
+
Missing any of the required components (form, new, detail, list) will result in broken navigation! When artifacts are requested, they must also be generated or the UI will be incomplete.
|
|
153
156
|
|
|
154
157
|
## REQUIRED: Setup and Validation Commands
|
|
155
158
|
|
|
@@ -181,6 +184,7 @@ Important:
|
|
|
181
184
|
- Use exact template names from the catalog
|
|
182
185
|
- Provide all required parameters
|
|
183
186
|
- Order items by dependency (setup first, then data, then API, then UI)
|
|
187
|
+
- REQUIRED ordering for `generate_react_component`: emit all non-`list` variants (form, new, detail, actions, artifact-*) before the `variant: "list"` call so the list can import previously generated components
|
|
184
188
|
- Add semantic enhancements that make the app intuitive (e.g., checkboxes for todos)
|
|
185
189
|
- For CRUD apps, ALWAYS include all 4 UI variants: list, form, new, detail
|
|
186
190
|
- REQUIRED: Include `setup_app_styling` after `create_next_app`
|