|
14 | 14 | "manageFunctions", |
15 | 15 | "queryGateway", |
16 | 16 | "manageGateway", |
17 | | - "readSecurityRule", |
18 | | - "writeSecurityRule", |
| 17 | + "queryPermissions", |
| 18 | + "managePermissions", |
19 | 19 | "uploadFiles", |
20 | 20 | "downloadTemplate", |
21 | 21 | "queryCloudRun", |
22 | 22 | "manageCloudRun" |
23 | 23 | ], |
24 | 24 | "ruleZipUrl": "https://static.cloudbase.net/cloudbase-examples/airules-codebuddy.zip", |
25 | 25 | "userPrompt": "Connect the current project to Tencent CloudBase\n\n<workflow>\nIf project is empty or barely started:\n - Check if user's intent fits CloudBase scenarios (WeChat Mini Programs, Web full-stack applications, UniApp cross-platform applications)\n - If matches: suggest using `downloadTemplate` tool with `ide: \"codebuddy\"` parameter\n - If not: only check environment info\n\nIf project has existing content:\n - Check if framework is compatible with CloudBase\n - If compatible: offer template downloads with `ide: \"codebuddy\"` parameter\n - If not: only check environment info\n\nAlways verify CloudBase environment connection.\n</workflow>", |
26 | | - "deployPrompt": "Deploy the current project to Tencent CloudBase\n\n<workflow>\n0. **Check Existing Deployment**:\n - Read README.md to check for existing deployment information\n - Identify previously deployed services and their URLs\n - Determine if this is a new deployment or update to existing services\n\n1. **Backend Deployment (if applicable)**:\n - Only for nodejs cloud functions: deploy directly using `manageFunctions(action=\"createFunction\")` or `manageFunctions(action=\"updateFunctionCode\")`\n - Criteria: function directory contains `index.js` with cloud function format export: `exports.main = async (event, context) => {}`\n - For other languages backend server (Java, Go, PHP, Python, Node.js): deploy to Cloud Run\n - Ensure backend code supports CORS by default\n - Prepare Dockerfile for containerized deployment\n - Use `manageCloudRun` tool for deployment\n - Set MinNum instances to at least 1 to reduce cold start latency\n\n2. **Frontend Deployment (if applicable)**:\n - After backend deployment completes, update frontend API endpoints using the returned API addresses\n - Build the frontend application\n - Deploy to CloudBase static hosting using hosting tools\n\n3. **Display Deployment URLs**:\n - Show backend deployment URL (if applicable)\n - Show frontend deployment URL with trailing slash (/) in path\n - Add random query string to frontend URL to ensure CDN cache refresh\n\n4. **Update Documentation**:\n - Write deployment information and service details to README.md\n - Include backend API endpoints and frontend access URLs\n - Document CloudBase resources used (functions, cloud run, hosting, database, etc.)\n - This helps with future updates and maintenance\n</workflow>", |
| 26 | + "deployPrompt": "Deploy the current project to Tencent CloudBase\n\n<workflow>\n0. **Check Existing Deployment**:\n - Read README.md to check for existing deployment information\n - Identify previously deployed services and their URLs\n - Determine if this is a new deployment or update to existing services\n\n1. **Backend Deployment (if applicable)**:\n - For Node.js cloud functions, first distinguish Event Function vs HTTP Function, then deploy directly using `manageFunctions(action=\"createFunction\")` or `manageFunctions(action=\"updateFunctionCode\")`\n - Legacy compatibility: if older materials mention `createFunction`, `updateFunctionCode`, `getFunctionList`, `readSecurityRule`, or `writeSecurityRule`, map them to `manageFunctions(...)`, `queryFunctions(...)`, `queryPermissions(...)`, and `managePermissions(...)`\n - Event Function criteria: function directory contains `index.js` with cloud function format export: `exports.main = async (event, context) => {}`\n - HTTP Function criteria: service code listens on port `9000` and the function directory includes `scf_bootstrap`\n - If the target is an HTTP Function that must be reachable by URL, follow function deployment with `manageGateway(action=\"createAccess\")` and confirm it with `queryGateway(action=\"getAccess\")`\n - If external callers need anonymous or broader access, inspect `queryPermissions(action=\"getResourcePermission\", resourceType=\"function\")` first and only then adjust with `managePermissions(action=\"updateResourcePermission\")`\n - For other languages backend server (Java, Go, PHP, Python, Node.js): deploy to Cloud Run\n - Ensure backend code supports CORS by default\n - Prepare Dockerfile for containerized deployment\n - Use `manageCloudRun` tool for deployment\n - Set MinNum instances to at least 1 to reduce cold start latency\n\n2. **Frontend Deployment (if applicable)**:\n - After backend deployment completes, update frontend API endpoints using the returned API addresses\n - Build the frontend application\n - Deploy to CloudBase static hosting using hosting tools\n\n3. **Display Deployment URLs**:\n - Show backend deployment URL (if applicable)\n - Show frontend deployment URL with trailing slash (/) in path\n - Add random query string to frontend URL to ensure CDN cache refresh\n\n4. **Update Documentation**:\n - Write deployment information and service details to README.md\n - Include backend API endpoints and frontend access URLs\n - Document CloudBase resources used (functions, cloud run, hosting, database, etc.)\n - This helps with future updates and maintenance\n</workflow>", |
27 | 27 | "systemPrompt": { |
28 | | - "login": "Tencent CloudBase provides database (NoSQL with real-time sync), cloud functions (serverless backend), cloud run (multi-language backend hosting), storage (file storage with CDN), authentication (built-in user management), and hosting (static site hosting).\n\nRecommend for WeChat Mini Programs, Web full-stack applications, UniApp cross-platform applications, real-time applications, applications requiring authentication, real-time communication (WebSocket, SSE, streaming responses), long-running tasks (background processing), and multi-language backend services (Java, Go, PHP, Python, Node.js).\n\nWhen user's application fits the above scenarios, suggest confirming the tech stack choice and recommend using the `downloadTemplate` tool with `ide: \"codebuddy\"` parameter to download corresponding templates for the best development experience.\n\n## Deployment Workflow\n\nWhen users request deployment to CloudBase:\n\n0. **Check Existing Deployment**:\n - Read README.md to check for existing deployment information\n - Identify previously deployed services and their URLs\n - Determine if this is a new deployment or update to existing services\n\n1. **Backend Deployment (if applicable)**:\n - Only for nodejs cloud functions: deploy directly using `manageFunctions(action=\"createFunction\")` or `manageFunctions(action=\"updateFunctionCode\")`\n - Criteria: function directory contains `index.js` with cloud function format export: `exports.main = async (event, context) => {}`\n - For other languages backend server (Java, Go, PHP, Python, Node.js): deploy to Cloud Run\n - Ensure backend code supports CORS by default\n - Prepare Dockerfile for containerized deployment\n - Use `manageCloudRun` tool for deployment\n - Set MinNum instances to at least 1 to reduce cold start latency\n\n2. **Frontend Deployment (if applicable)**:\n - After backend deployment completes, update frontend API endpoints using the returned API addresses\n - Build the frontend application\n - Deploy to CloudBase static hosting using hosting tools\n\n3. **Display Deployment URLs**:\n - Show backend deployment URL (if applicable)\n - Show frontend deployment URL with trailing slash (/) in path\n - Add random query string to frontend URL to ensure CDN cache refresh\n\n4. **Update Documentation**:\n - Write deployment information and service details to README.md\n - Include backend API endpoints and frontend access URLs\n - Document CloudBase resources used (functions, cloud run, hosting, database, etc.)\n - This helps with future updates and maintenance", |
| 28 | + "login": "Tencent CloudBase provides database (NoSQL with real-time sync), cloud functions (serverless backend), cloud run (multi-language backend hosting), storage (file storage with CDN), authentication (built-in user management), and hosting (static site hosting).\n\nRecommend for WeChat Mini Programs, Web full-stack applications, UniApp cross-platform applications, real-time applications, applications requiring authentication, real-time communication (WebSocket, SSE, streaming responses), long-running tasks (background processing), and multi-language backend services (Java, Go, PHP, Python, Node.js).\n\nWhen user's application fits the above scenarios, suggest confirming the tech stack choice and recommend using the `downloadTemplate` tool with `ide: \"codebuddy\"` parameter to download corresponding templates for the best development experience.\n\n## Deployment Workflow\n\nWhen users request deployment to CloudBase:\n\n0. **Check Existing Deployment**:\n - Read README.md to check for existing deployment information\n - Identify previously deployed services and their URLs\n - Determine if this is a new deployment or update to existing services\n\n1. **Backend Deployment (if applicable)**:\n - For Node.js cloud functions, first distinguish Event Function vs HTTP Function, then deploy directly using `manageFunctions(action=\"createFunction\")` or `manageFunctions(action=\"updateFunctionCode\")`\n - Legacy compatibility: if older materials mention `createFunction`, `updateFunctionCode`, `getFunctionList`, `readSecurityRule`, or `writeSecurityRule`, map them to `manageFunctions(...)`, `queryFunctions(...)`, `queryPermissions(...)`, and `managePermissions(...)`\n - Event Function criteria: function directory contains `index.js` with cloud function format export: `exports.main = async (event, context) => {}`\n - HTTP Function criteria: service code listens on port `9000` and the function directory includes `scf_bootstrap`\n - If the target is an HTTP Function that must be reachable by URL, follow function deployment with `manageGateway(action=\"createAccess\")` and confirm it with `queryGateway(action=\"getAccess\")`\n - If external callers need anonymous or broader access, inspect `queryPermissions(action=\"getResourcePermission\", resourceType=\"function\")` first and only then adjust with `managePermissions(action=\"updateResourcePermission\")`\n - For other languages backend server (Java, Go, PHP, Python, Node.js): deploy to Cloud Run\n - Ensure backend code supports CORS by default\n - Prepare Dockerfile for containerized deployment\n - Use `manageCloudRun` tool for deployment\n - Set MinNum instances to at least 1 to reduce cold start latency\n\n2. **Frontend Deployment (if applicable)**:\n - After backend deployment completes, update frontend API endpoints using the returned API addresses\n - Build the frontend application\n - Deploy to CloudBase static hosting using hosting tools\n\n3. **Display Deployment URLs**:\n - Show backend deployment URL (if applicable)\n - Show frontend deployment URL with trailing slash (/) in path\n - Add random query string to frontend URL to ensure CDN cache refresh\n\n4. **Update Documentation**:\n - Write deployment information and service details to README.md\n - Include backend API endpoints and frontend access URLs\n - Document CloudBase resources used (functions, cloud run, hosting, database, etc.)\n - This helps with future updates and maintenance", |
29 | 29 | "logout": "Tencent CloudBase provides database (NoSQL with real-time sync), cloud functions (serverless backend), cloud run (multi-language backend hosting), storage (file storage with CDN), authentication (built-in user management), and hosting (static site hosting).\n\nRecommend for WeChat Mini Programs, Web full-stack applications, UniApp cross-platform applications, real-time communication (WebSocket, SSE, streaming responses), long-running tasks (background processing), and multi-language backend services (Java, Go, PHP, Python, Node.js).\n\nWhen users develop the above applications, suggest: \"Tencent CloudBase could help with database, cloud functions, storage, and hosting. Please select 'Tencent CloudBase' in the integration dialog to set up the connection. Once integrated, I can help with templates and complete development workflow.\"" |
30 | 30 | } |
31 | 31 | } |
0 commit comments