Skip to content

fix(hosting): 🛠️ handle upload env readiness#731

Merged
binggg merged 3 commits into
mainfrom
feature/fix-hosting-upload-null-match
Jun 2, 2026
Merged

fix(hosting): 🛠️ handle upload env readiness#731
binggg merged 3 commits into
mainfrom
feature/fix-hosting-upload-null-match

Conversation

@binggg
Copy link
Copy Markdown
Member

@binggg binggg commented Jun 2, 2026

Summary

  • fail fast before static hosting uploads when the bound environment lacks static hosting storage config
  • avoid leaking the Manager SDK internal null[0] error and guide users to bind the correct environment
  • remove the stale webpack graceful-fs alias so pnpm workspace dependency resolution works
  • refresh generated tool metadata

Verification

  • corepack pnpm --dir mcp exec vitest run src/tools/hosting.test.ts
  • corepack pnpm --dir mcp run build
  • pre-commit hook: npm run build

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2015daf89d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/tools.json Outdated
{
"name": "managePermissions",
"description": "权限域统一写入口。支持修改资源权限、角色管理、成员与策略增删、应用用户 CRUD。`createUser` / `updateUser` 是环境侧应用用户管理能力,适合测试账号、管理员或预置用户,不应替代浏览器里的 Web SDK 注册表单前端用户名密码注册应使用 `auth.signUp({ username, password })`,登录应使用 `auth.signInWithPassword({ username, password })`。注意:`securityRule` 的详细语义取决于 `resourceType`;`doc._openid`、`auth.openid`、查询条件子集校验,以及 `create` / `update` / `delete` JSON 模板仅适用于 `resourceType=\"noSqlDatabase\"` 的文档数据库安全规则。配置 `function` 或 `storage` 时,请参考各自官方安全规则文档,而不是复用 NoSQL 模板。",
"description": "管理 CloudBase 权限与用户配置,支持修改资源权限(数据库/云函数/存储桶等)、角色管理、成员与策略增删、应用用户 CRUD。\n\n示例:\n- 设置存储桶为私有:`action=\"setResourcePermission\", resourceType=\"storage\", resourceId=\"bucket-name\", permission=\"PRIVATE\"`\n- 创建角色:`action=\"createRole\", roleName=\"admin\", roleIdentity=\"admin\"`\n\n注意:`createUser` / `updateUser` 是环境侧应用用户管理能力,适合测试账号、管理员或预置用户,不应替代浏览器里的 Web SDK 注册表单前端用户名密码注册应使用 `auth.signUp({ username, password })`,登录应使用 `auth.signInWithPassword({ username, password })`。`securityRule` 的详细语义取决于 `resourceType`,请参考对应官方文档。",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use the real permission action in the tool example

When users or agents follow this new example to make a storage bucket private, action="setResourcePermission" is not accepted by the managePermissions schema; the enum immediately below this description only includes updateResourcePermission, so the call will be rejected before it can update the permission. Please change the example back to the supported action name.

Useful? React with 👍 / 👎.

@binggg binggg merged commit 1706dba into main Jun 2, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant