@chanaka_nakandala/integration-agent 1.1.0 → 2.0.0

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.
Files changed (65) hide show
  1. package/README.md +369 -60
  2. package/dist/index.js +22 -486
  3. package/dist/index.js.map +1 -1
  4. package/dist/{cli/init-command.d.ts → init-command.d.ts} +2 -2
  5. package/dist/init-command.d.ts.map +1 -0
  6. package/dist/{cli/init-command.js → init-command.js} +72 -46
  7. package/dist/init-command.js.map +1 -0
  8. package/package.json +5 -11
  9. package/agent-personas/ba-agent.yaml +0 -682
  10. package/agent-personas/developer-agent.yaml +0 -585
  11. package/dist/cache/file-cache.d.ts +0 -10
  12. package/dist/cache/file-cache.d.ts.map +0 -1
  13. package/dist/cache/file-cache.js +0 -79
  14. package/dist/cache/file-cache.js.map +0 -1
  15. package/dist/cli/init-command.d.ts.map +0 -1
  16. package/dist/cli/init-command.js.map +0 -1
  17. package/dist/scrapers/docs-scraper.d.ts +0 -28
  18. package/dist/scrapers/docs-scraper.d.ts.map +0 -1
  19. package/dist/scrapers/docs-scraper.js +0 -200
  20. package/dist/scrapers/docs-scraper.js.map +0 -1
  21. package/dist/search/keyword-search.d.ts +0 -39
  22. package/dist/search/keyword-search.d.ts.map +0 -1
  23. package/dist/search/keyword-search.js +0 -127
  24. package/dist/search/keyword-search.js.map +0 -1
  25. package/dist/tools/code-generation-tool.d.ts +0 -33
  26. package/dist/tools/code-generation-tool.d.ts.map +0 -1
  27. package/dist/tools/code-generation-tool.js +0 -62
  28. package/dist/tools/code-generation-tool.js.map +0 -1
  29. package/dist/tools/search-result-formatter.d.ts +0 -27
  30. package/dist/tools/search-result-formatter.d.ts.map +0 -1
  31. package/dist/tools/search-result-formatter.js +0 -89
  32. package/dist/tools/search-result-formatter.js.map +0 -1
  33. package/dist/tools/search-tool.d.ts +0 -9
  34. package/dist/tools/search-tool.d.ts.map +0 -1
  35. package/dist/tools/search-tool.js +0 -32
  36. package/dist/tools/search-tool.js.map +0 -1
  37. package/dist/tools/template-loader.d.ts +0 -54
  38. package/dist/tools/template-loader.d.ts.map +0 -1
  39. package/dist/tools/template-loader.js +0 -148
  40. package/dist/tools/template-loader.js.map +0 -1
  41. package/dist/types/search.d.ts +0 -21
  42. package/dist/types/search.d.ts.map +0 -1
  43. package/dist/types/search.js +0 -2
  44. package/dist/types/search.js.map +0 -1
  45. package/templates/README.md +0 -98
  46. package/templates/authenticate/curl.template +0 -97
  47. package/templates/authenticate/java.template +0 -155
  48. package/templates/authenticate/python.template +0 -111
  49. package/templates/authenticate/typescript.template +0 -98
  50. package/templates/create_menu/curl.template +0 -145
  51. package/templates/create_menu/java.template +0 -285
  52. package/templates/create_menu/python.template +0 -159
  53. package/templates/create_menu/typescript.template +0 -184
  54. package/templates/receive_order/curl.template +0 -138
  55. package/templates/receive_order/java.template +0 -263
  56. package/templates/receive_order/python.template +0 -157
  57. package/templates/receive_order/typescript.template +0 -194
  58. package/templates/update_item_availability/curl.template +0 -143
  59. package/templates/update_item_availability/java.template +0 -279
  60. package/templates/update_item_availability/python.template +0 -203
  61. package/templates/update_item_availability/typescript.template +0 -194
  62. package/templates/update_order_status/curl.template +0 -138
  63. package/templates/update_order_status/java.template +0 -202
  64. package/templates/update_order_status/python.template +0 -142
  65. package/templates/update_order_status/typescript.template +0 -139
package/README.md CHANGED
@@ -1,87 +1,396 @@
1
- # @grubtech/integration-agent
1
+ # Grubtech Integration Assistant
2
2
 
3
- > AI-powered MCP server for Grubtech API integration support
3
+ > **AI-powered integration helper for Claude Code**
4
+ > Get instant answers, generate code, and build Grubtech integrations faster
4
5
 
5
- [![npm version](https://img.shields.io/npm/v/@grubtech/integration-agent.svg)](https://www.npmjs.com/package/@grubtech/integration-agent)
6
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
+ ---
7
7
 
8
- An MCP (Model Context Protocol) server that provides instant, AI-powered assistance for integrating with Grubtech APIs through Claude Code. Get code generation, documentation search, and integration guidance directly in your development environment.
8
+ ## 📖 What is This?
9
9
 
10
- ## Features
10
+ If you're a **restaurant, POS system, delivery platform, or cloud kitchen** building an integration with Grubtech APIs, this tool helps you work faster by providing:
11
11
 
12
- - 🚀 **Code Generation** - Generate integration code in TypeScript, Python, Java, or cURL
13
- - 🔍 **Documentation Search** - Search Grubtech API docs using natural language
14
- - 📝 **20 Ready-to-Use Templates** - 5 operations × 4 languages
15
- - 🤖 **Claude Code Integration** - Works seamlessly with Claude Code
16
- - 🔒 **100% Local** - Runs entirely on your machine
17
- - 📦 **Zero Configuration** - Works with \`npx\` out of the box
12
+ - **Instant answers** to API questions (no more searching docs)
13
+ - **Production-ready code** in TypeScript, Python, Java, or cURL
14
+ - **AI guidance** from specialized Developer and Business Analyst agents
15
+ - **Smart documentation search** using natural language
18
16
 
19
- ## Quick Start
17
+ **Example:** Instead of searching docs for 30 minutes, just ask:
18
+ *"How do I authenticate with Grubtech?"* → Get working code instantly.
20
19
 
21
- ### Using with Claude Code (Recommended)
20
+ ---
22
21
 
23
- 1. **Configure MCP Server**
22
+ ## 🍔 What is Grubtech?
24
23
 
25
- Create or edit: \`~/.config/claude/code_mcp_settings.json\`
24
+ [**Grubtech**](https://www.grubtech.com) is a leading cloud-based restaurant technology platform that powers:
25
+ - Cloud kitchens and virtual restaurants
26
+ - Multi-channel online ordering (delivery apps, web, mobile)
27
+ - Menu management across platforms
28
+ - Order aggregation and kitchen operations
26
29
 
27
- \`\`\`json
28
- {
29
- "mcpServers": {
30
- "grubtech-integration-support": {
31
- "command": "npx",
32
- "args": ["-y", "@grubtech/integration-agent", "mcp-server"]
33
- }
34
- }
35
- }
36
- \`\`\`
30
+ **For Developers:** If you're integrating your restaurant POS, delivery platform, or ordering system with Grubtech, you'll need to work with their REST APIs.
37
31
 
38
- 2. **Restart Claude Code**
32
+ **Official Resources:**
33
+ - 🌐 Website: https://www.grubtech.com
34
+ - 📚 API Documentation: https://docs.grubtech.io
35
+ - 📧 Support: support@grubtech.io
39
36
 
40
- 3. **Start Using!**
41
- \`\`\`
42
- Generate authentication code for Grubtech in TypeScript
43
- \`\`\`
37
+ ---
44
38
 
45
- ## Available Tools
39
+ ## 👥 Who Should Use This?
46
40
 
47
- ### generate_integration_code
41
+ This tool is perfect for **external developers** who are:
48
42
 
49
- Generate code snippets for Grubtech integration tasks (20 templates available).
43
+ **Restaurant/POS Developers** - Integrating your point-of-sale system with Grubtech
44
+ ✅ **Delivery Platform Engineers** - Building order sync between your platform and Grubtech
45
+ ✅ **Cloud Kitchen Tech Teams** - Connecting kitchen management systems
46
+ ✅ **Integration Consultants** - Building custom integrations for clients
47
+ ✅ **Technical Partners** - Developing apps in the Grubtech ecosystem
50
48
 
51
- **Example Prompts:**
52
- \`\`\`
53
- Generate authentication code in TypeScript
54
- Show me how to sync menus using Python
55
- Create a Java webhook for receiving orders
56
- \`\`\`
49
+ **No prior Grubtech experience needed!** This AI assistant guides you through the entire process.
57
50
 
58
- ### search_grubtech_docs
51
+ ---
59
52
 
60
- Search Grubtech API documentation.
53
+ ## Quick Start - ONE Command!
61
54
 
62
- **Example Prompts:**
63
- \`\`\`
64
- Search for authentication methods
65
- How do I update item availability?
66
- \`\`\`
55
+ ### Prerequisites
67
56
 
68
- ## Installation
57
+ - **Node.js 18+** - [Download](https://nodejs.org/)
58
+ - **Claude Desktop or Claude Code** - [Download](https://claude.ai/)
69
59
 
70
- ### NPX (Recommended)
71
- \`\`\`bash
72
- npx @grubtech/integration-agent mcp-server
73
- \`\`\`
60
+ ### Installation
74
61
 
75
- ### Global
76
- \`\`\`bash
77
- npm install -g @grubtech/integration-agent
78
- \`\`\`
62
+ Run this **ONE command** in your terminal:
79
63
 
80
- ## Requirements
64
+ ```bash
65
+ npx @chanaka_nakandala/integration-agent init
66
+ ```
81
67
 
82
- - Node.js 18+
83
- - Claude Code
68
+ That's it! This installs:
69
+ - ✅ AI-powered MCP server for Claude Code
70
+ - ✅ 2 specialized AI agent personas (Developer & Business Analyst)
71
+ - ✅ 20 production-ready code templates
72
+ - ✅ Intelligent documentation search
84
73
 
85
- ## License
74
+ **Then:**
75
+ 1. Restart Claude Code
76
+ 2. Select an agent persona from the menu
77
+ 3. Start asking questions!
78
+
79
+ ---
80
+
81
+ ## 💬 How to Use
82
+
83
+ ### Example 1: Get Authentication Code
84
+
85
+ **You ask Claude:**
86
+ ```
87
+ How do I authenticate with Grubtech API in TypeScript?
88
+ ```
89
+
90
+ **Claude responds with:**
91
+ ```typescript
92
+ // Complete working code with error handling
93
+ const API_KEY = 'your-api-key-here';
94
+ const PARTNER_ID = 'your-partner-id';
95
+
96
+ async function authenticate() {
97
+ const response = await fetch('https://api.grubtech.io/auth/token', {
98
+ method: 'POST',
99
+ headers: { 'Content-Type': 'application/json' },
100
+ body: JSON.stringify({ apiKey: API_KEY, partnerId: PARTNER_ID })
101
+ });
102
+
103
+ if (!response.ok) {
104
+ throw new Error(`Authentication failed: ${response.statusText}`);
105
+ }
106
+
107
+ const { accessToken } = await response.json();
108
+ return accessToken;
109
+ }
110
+ ```
111
+
112
+ ### Example 2: Search Documentation
113
+
114
+ **You ask:**
115
+ ```
116
+ How do incoming orders work?
117
+ ```
118
+
119
+ **Claude responds with:**
120
+ Relevant documentation about order webhooks, payload structure, authentication requirements, and best practices - all extracted from official Grubtech docs.
121
+
122
+ ### Example 3: Planning Your Integration
123
+
124
+ **You ask:**
125
+ ```
126
+ Help me plan my restaurant POS integration with Grubtech
127
+ ```
128
+
129
+ **BA Agent responds:**
130
+ - Asks discovery questions about your system
131
+ - Identifies integration requirements
132
+ - Creates a comprehensive project plan with architecture diagrams
133
+ - Provides a handoff document for implementation
134
+
135
+ ---
136
+
137
+ ## 🤖 Two AI Agent Personas
138
+
139
+ ### 🔧 Developer Agent (Technical Implementation)
140
+
141
+ **When to use:** You're ready to write code
142
+
143
+ **What it does:**
144
+ - Generates production-ready code in TypeScript, Python, Java, or cURL
145
+ - Provides API specifications and technical details
146
+ - Helps debug API errors with specific solutions
147
+ - Technical, concise, code-first responses
148
+
149
+ **Example questions:**
150
+ - "Generate Python code for menu synchronization"
151
+ - "How do I handle order status updates in Java?"
152
+ - "Show me cURL examples for item availability"
153
+
154
+ ### 📊 Business Analyst Agent (Planning & Requirements)
155
+
156
+ **When to use:** You're starting a new integration project
157
+
158
+ **What it does:**
159
+ - Asks discovery questions about your integration needs
160
+ - Gathers comprehensive requirements
161
+ - Creates project documentation with architecture diagrams
162
+ - Provides process guidance and go-live checklists
163
+ - Explanatory, question-driven, process-oriented responses
164
+
165
+ **Example questions:**
166
+ - "Help me plan my integration with Grubtech"
167
+ - "What do I need to know before starting?"
168
+ - "Create a requirements document for my POS integration"
169
+
170
+ **💡 Best Practice:** Start with BA Agent for planning → Switch to Developer Agent for coding
171
+
172
+ ---
173
+
174
+ ## 🛠️ Common Integration Scenarios
175
+
176
+ This tool helps with all major Grubtech integration scenarios:
177
+
178
+ ### 1. **Authentication**
179
+ Get access tokens to call Grubtech APIs securely.
180
+
181
+ **Ask Claude:** *"How do I authenticate?"*
182
+
183
+ ### 2. **Menu Synchronization**
184
+ Push your menu items, modifiers, and pricing to Grubtech.
185
+
186
+ **Ask Claude:** *"Generate code to sync my menu"*
187
+
188
+ ### 3. **Receiving Orders**
189
+ Handle incoming order webhooks from Grubtech when customers place orders.
190
+
191
+ **Ask Claude:** *"How do I receive orders from Grubtech?"*
192
+
193
+ ### 4. **Order Status Updates**
194
+ Update Grubtech when orders are accepted, prepared, or delivered.
195
+
196
+ **Ask Claude:** *"Show me how to update order status"*
197
+
198
+ ### 5. **Item Availability**
199
+ Toggle menu items on/off when they're out of stock.
200
+
201
+ **Ask Claude:** *"How do I mark items as unavailable?"*
202
+
203
+ ---
204
+
205
+ ## 📚 Available Code Templates
206
+
207
+ 20 production-ready templates for common operations:
208
+
209
+ | Operation | TypeScript | Python | Java | cURL |
210
+ |-----------|:----------:|:------:|:----:|:----:|
211
+ | **Authentication** | ✅ | ✅ | ✅ | ✅ |
212
+ | **Menu Sync** | ✅ | ✅ | ✅ | ✅ |
213
+ | **Order Receive** | ✅ | ✅ | ✅ | ✅ |
214
+ | **Order Status** | ✅ | ✅ | ✅ | ✅ |
215
+ | **Item Availability** | ✅ | ✅ | ✅ | ✅ |
216
+
217
+ Each template includes:
218
+ - ✅ Complete working code
219
+ - ✅ Error handling and logging
220
+ - ✅ Type definitions (TypeScript/Python/Java)
221
+ - ✅ Inline documentation
222
+ - ✅ Placeholder markers for your credentials
223
+ - ✅ Example usage
224
+
225
+ ---
226
+
227
+ ## 🔐 Privacy & Security
228
+
229
+ - **100% Local** - All processing happens on your machine
230
+ - **No Data Collection** - Zero telemetry or analytics
231
+ - **No External API Calls** - Works offline (after initial doc scraping)
232
+ - **Open Source** - Audit the code yourself
233
+ - **No API Keys Required** - Templates use placeholders for your keys
234
+
235
+ Your code and credentials **never leave your machine**.
236
+
237
+ ---
238
+
239
+ ## 🆘 Getting Help
240
+
241
+ ### Within Claude Code
242
+ Just ask! The AI agents can help with:
243
+ - API questions
244
+ - Code errors
245
+ - Integration planning
246
+ - Best practices
247
+
248
+ ### External Resources
249
+ - 📚 Grubtech API Docs: https://docs.grubtech.io
250
+ - 🌐 Grubtech Website: https://www.grubtech.com
251
+ - 📧 Email Support: support@grubtech.io
252
+
253
+ ### Common Questions
254
+
255
+ **Q: Do I need a Grubtech account?**
256
+ A: Yes, you'll need API credentials from Grubtech. Contact support@grubtech.io to get started.
257
+
258
+ **Q: Which programming language should I use?**
259
+ A: Use whatever your existing system is built with. This tool supports TypeScript, Python, Java, and cURL.
260
+
261
+ **Q: Is this tool official from Grubtech?**
262
+ A: This is a developer tool built to help with Grubtech integrations. For official support, contact Grubtech directly.
263
+
264
+ **Q: Do I need to know Grubtech APIs beforehand?**
265
+ A: No! The AI agents guide you through everything. Start with the BA Agent to learn the basics.
266
+
267
+ ---
268
+
269
+ ## 🚀 What You Can Build
270
+
271
+ Examples of integrations developers have built:
272
+
273
+ - **Restaurant POS Systems** - Sync menus, receive orders, update status
274
+ - **Delivery Management Platforms** - Route orders, track deliveries, update statuses
275
+ - **Kitchen Display Systems** - Receive orders, mark as prepared
276
+ - **Inventory Management** - Update item availability based on stock
277
+ - **Custom Ordering Websites** - Pull menus, create orders, track status
278
+ - **Multi-Brand Aggregators** - Manage menus across multiple virtual brands
279
+
280
+ ---
281
+
282
+ ## 📝 Typical Integration Workflow
283
+
284
+ ### Phase 1: Planning (Use BA Agent)
285
+ 1. Ask: *"Help me plan my integration"*
286
+ 2. Answer discovery questions about your system
287
+ 3. Review generated requirements document
288
+
289
+ ### Phase 2: Setup
290
+ 1. Get API credentials from Grubtech
291
+ 2. Set up authentication
292
+ 3. Test connectivity
293
+
294
+ ### Phase 3: Implementation (Use Developer Agent)
295
+ 1. Implement menu synchronization
296
+ 2. Set up order webhook receiver
297
+ 3. Implement order status updates
298
+ 4. Add item availability management
299
+
300
+ ### Phase 4: Testing
301
+ 1. Test in Grubtech sandbox environment
302
+ 2. Validate data flows
303
+ 3. Handle edge cases
304
+
305
+ ### Phase 5: Go-Live
306
+ 1. Complete Grubtech certification
307
+ 2. Deploy to production
308
+ 3. Monitor integration health
309
+
310
+ **💡 The AI agents guide you through each phase!**
311
+
312
+ ---
313
+
314
+ ## 💻 Example Session
315
+
316
+ ```
317
+ You: Help me start a POS integration with Grubtech
318
+
319
+ BA Agent: I'll help you plan this integration. Let me ask a few questions:
320
+
321
+ 1. What type of system are you integrating?
322
+ - POS System, Delivery Platform, Kitchen Display, or Other?
323
+
324
+ 2. What's your tech stack?
325
+ - Language/framework you're using?
326
+
327
+ 3. What capabilities do you need?
328
+ - Menu sync, order receiving, status updates?
329
+
330
+ [You answer the questions...]
331
+
332
+ BA Agent: Based on your requirements, I've created a comprehensive
333
+ integration plan. See docs/integration-requirements.md
334
+
335
+ Next step: Switch to "Developer Agent" to start implementation.
336
+
337
+ ---
338
+
339
+ You: [Switch to Developer Agent]
340
+ I have the requirements document. Let's start with authentication.
341
+
342
+ Developer Agent: I'll generate TypeScript authentication code for you.
343
+ [Provides complete working code with error handling...]
344
+ ```
345
+
346
+ ---
347
+
348
+ ## 🌟 Why Use This Tool?
349
+
350
+ ### Without This Tool:
351
+ - ⏰ Spend hours searching documentation
352
+ - 📄 Copy/paste code examples that don't quite fit
353
+ - ❓ Get stuck on API errors with unclear messages
354
+ - 🔄 Repeatedly ask the same questions
355
+
356
+ ### With This Tool:
357
+ - ⚡ Get instant answers in Claude Code
358
+ - 💻 Generate code tailored to your language
359
+ - 🤖 AI agents guide you step-by-step
360
+ - 📚 Smart search finds exactly what you need
361
+
362
+ **Result:** Build integrations **5-10x faster** with fewer errors.
363
+
364
+ ---
365
+
366
+ ## 📄 License
86
367
 
87
368
  MIT © Grubtech
369
+
370
+ Free to use for commercial and personal projects.
371
+
372
+ ---
373
+
374
+ ## 🔗 Links
375
+
376
+ - **Grubtech Website:** https://www.grubtech.com
377
+ - **API Documentation:** https://docs.grubtech.io
378
+ - **Email Support:** support@grubtech.io
379
+ - **NPM Package:** https://www.npmjs.com/package/@chanaka_nakandala/integration-agent
380
+
381
+ ---
382
+
383
+ ## 🎉 Ready to Start?
384
+
385
+ Install with ONE command:
386
+
387
+ ```bash
388
+ npx @chanaka_nakandala/integration-agent init
389
+ ```
390
+
391
+ Then restart Claude Code and start building! 🚀
392
+
393
+ ---
394
+
395
+ **Built for external developers integrating with Grubtech APIs**
396
+ *Questions? Ask the AI agents in Claude Code or contact support@grubtech.io*