Skip to content

Commit 2fc2e27

Browse files
author
CodeBuddy Attribution Bot
committed
fix(attribution): Skill 未引导 Agent 使用正确的部署工具路径,导致 HTTP 云函数创建后实际未生效 (issue_mnzgm6vs_zs4kzk)
1 parent a5c818c commit 2fc2e27

3 files changed

Lines changed: 18 additions & 9 deletions

File tree

mcp/AGENTS.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -463,9 +463,12 @@ When users request deployment to CloudBase:
463463
- Determine if this is a new deployment or update to existing services
464464

465465
1. **Backend Deployment (if applicable)**:
466-
- Only for nodejs cloud functions: deploy directly using `manageFunctions(action="createFunction")` / `manageFunctions(action="updateFunctionCode")`
467-
- Legacy compatibility: if older materials mention `createFunction`, `updateFunctionCode`, or `getFunctionList`, map them to the converged tools first
468-
- Criteria: function directory contains `index.js` with cloud function format export: `exports.main = async (event, context) => {}`
466+
- For Node.js cloud functions, first distinguish Event Function vs HTTP Function, then deploy directly using `manageFunctions(action="createFunction")` / `manageFunctions(action="updateFunctionCode")`
467+
- Legacy compatibility: if older materials mention `createFunction`, `updateFunctionCode`, `getFunctionList`, `readSecurityRule`, or `writeSecurityRule`, map them to `manageFunctions(...)`, `queryFunctions(...)`, `queryPermissions(...)`, and `managePermissions(...)`
468+
- Event Function criteria: function directory contains `index.js` with cloud function format export: `exports.main = async (event, context) => {}`
469+
- HTTP Function criteria: service code listens on port `9000` and the function directory includes `scf_bootstrap`
470+
- 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")`
471+
- If external callers need anonymous or broader access, inspect `queryPermissions(action="getResourcePermission", resourceType="function")` first and only then adjust with `managePermissions(action="updateResourcePermission")`
469472
- For other languages backend server (Java, Go, PHP, Python, Node.js): deploy to Cloud Run
470473
- Ensure backend code supports CORS by default
471474
- Prepare Dockerfile for containerized deployment

mcp/CLAUDE.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -463,9 +463,12 @@ When users request deployment to CloudBase:
463463
- Determine if this is a new deployment or update to existing services
464464

465465
1. **Backend Deployment (if applicable)**:
466-
- Only for nodejs cloud functions: deploy directly using `manageFunctions(action="createFunction")` / `manageFunctions(action="updateFunctionCode")`
467-
- Legacy compatibility: if older materials mention `createFunction`, `updateFunctionCode`, or `getFunctionList`, map them to the converged tools first
468-
- Criteria: function directory contains `index.js` with cloud function format export: `exports.main = async (event, context) => {}`
466+
- For Node.js cloud functions, first distinguish Event Function vs HTTP Function, then deploy directly using `manageFunctions(action="createFunction")` / `manageFunctions(action="updateFunctionCode")`
467+
- Legacy compatibility: if older materials mention `createFunction`, `updateFunctionCode`, `getFunctionList`, `readSecurityRule`, or `writeSecurityRule`, map them to `manageFunctions(...)`, `queryFunctions(...)`, `queryPermissions(...)`, and `managePermissions(...)`
468+
- Event Function criteria: function directory contains `index.js` with cloud function format export: `exports.main = async (event, context) => {}`
469+
- HTTP Function criteria: service code listens on port `9000` and the function directory includes `scf_bootstrap`
470+
- 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")`
471+
- If external callers need anonymous or broader access, inspect `queryPermissions(action="getResourcePermission", resourceType="function")` first and only then adjust with `managePermissions(action="updateResourcePermission")`
469472
- For other languages backend server (Java, Go, PHP, Python, Node.js): deploy to Cloud Run
470473
- Ensure backend code supports CORS by default
471474
- Prepare Dockerfile for containerized deployment

mcp/IFLOW.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -463,9 +463,12 @@ When users request deployment to CloudBase:
463463
- Determine if this is a new deployment or update to existing services
464464

465465
1. **Backend Deployment (if applicable)**:
466-
- Only for nodejs cloud functions: deploy directly using `manageFunctions(action="createFunction")` / `manageFunctions(action="updateFunctionCode")`
467-
- Legacy compatibility: if older materials mention `createFunction`, `updateFunctionCode`, or `getFunctionList`, map them to the converged tools first
468-
- Criteria: function directory contains `index.js` with cloud function format export: `exports.main = async (event, context) => {}`
466+
- For Node.js cloud functions, first distinguish Event Function vs HTTP Function, then deploy directly using `manageFunctions(action="createFunction")` / `manageFunctions(action="updateFunctionCode")`
467+
- Legacy compatibility: if older materials mention `createFunction`, `updateFunctionCode`, `getFunctionList`, `readSecurityRule`, or `writeSecurityRule`, map them to `manageFunctions(...)`, `queryFunctions(...)`, `queryPermissions(...)`, and `managePermissions(...)`
468+
- Event Function criteria: function directory contains `index.js` with cloud function format export: `exports.main = async (event, context) => {}`
469+
- HTTP Function criteria: service code listens on port `9000` and the function directory includes `scf_bootstrap`
470+
- 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")`
471+
- If external callers need anonymous or broader access, inspect `queryPermissions(action="getResourcePermission", resourceType="function")` first and only then adjust with `managePermissions(action="updateResourcePermission")`
469472
- For other languages backend server (Java, Go, PHP, Python, Node.js): deploy to Cloud Run
470473
- Ensure backend code supports CORS by default
471474
- Prepare Dockerfile for containerized deployment

0 commit comments

Comments
 (0)