cloud-operator-setup

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Set up the operator agent

设置 operator agent

Walk the user through setting up the operator agent one step at a time. Follow the
cloud-operator
skill's
agentId
and troubleshooting rules if installed. If
ask_cloud_operator
(on the
autocloud
MCP server) isn't available, tell the user it isn't connected, help them sign in with Application Default Credentials (
gcloud auth application-default login
), and stop until they reconnect.
逐步引导用户设置 operator agent。如果已安装
cloud-operator
skill,则遵循其
agentId
规则和故障排除规则。 如果无法使用
autocloud
MCP server 上的
ask_cloud_operator
,告知用户该功能尚未连接,帮助用户使用 Application Default Credentials(
gcloud auth application-default login
)登录,并停止操作,直到用户重新连接。

Usage Attribution

使用归属说明

MUST READ: Before executing any
gcloud
, REST API, or MCP command, you MUST read and follow the instructions in Usage Attribution.
必须阅读:执行任何
gcloud
、REST API 或 MCP 命令之前,必须阅读并遵循 Usage Attribution 中的说明。

Steps

步骤

  1. Choose the project: ask which Google Cloud project their operator agent is in, or will be in (unless already named). Suggest their default
    gcloud
    project or the project in local memory only as an option; don't use either without asking.
  2. Check or create the agent:
    • Unless the user said they have no agent in
      {project_id}
      , check first: call
      ask_cloud_operator
      with
      projects/{project_id}
      and "In one line, what can you help me with in this project? Don't create anything." Tell the user first that it can take 1–3 minutes.
    • If it fails with "personal operator agent … has not been initialized yet" (or they said they have none), walk them through creating it one step at a time and wait for confirmation: open
      https://console.cloud.google.com/autocloud/home?project={project_id}
      , click Create operator agent, then click Get started when it says the agent is ready. Once they confirm, run the check call above (waiting about a minute and retrying up to 3 times if the new agent isn't ready yet).
  3. Save and offer to share context: once the check call works, save
    {project_id}
    in local memory (and
    agentId
    if not their own) and tell the user the operator works, with
    {project_id}
    and the agent. In that same reply, if the
    cloud-operator-share-context
    skill is available and local memory has no "Cloud Operator context: shared on" or "declined on" note, ask in one line whether to scan agent instruction files, local memory, skills and workflows, and the repository's GCP docs for context they or their team already have about operating in Google Cloud (environments, projects, product preferences, best practices, architecture guidance, runbooks) and share it with the operator agent's memory — noting they'll see the list first. Read nothing else until they agree.
    • Yes: run
      cloud-operator-share-context
      (from its collection step).
    • No: note "Cloud Operator context: declined on {date}" in local memory.
    • No answer: note nothing. Then return to any request that was waiting when setup started.
  1. **选择项目:**询问用户的 operator agent 当前位于或将要位于哪个 Google Cloud 项目(除非已经指定)。只能将用户的默认
    gcloud
    项目或 local memory 中的项目作为选项提出;未经询问,不得直接使用其中任何一个。
  2. 检查或创建 agent:
    • 除非用户明确表示
      {project_id}
      中没有 agent,否则先进行检查:调用
      ask_cloud_operator
      ,传入
      projects/{project_id}
      和以下内容:“用一行说明你能帮我处理这个项目中的哪些事情?不要创建任何内容。”先告知用户,此操作可能需要 1–3 分钟。
    • 如果调用失败并返回“personal operator agent … has not been initialized yet”(或者用户表示自己没有 agent),则逐步引导用户创建,并等待用户确认:打开
      https://console.cloud.google.com/autocloud/home?project={project_id}
      ,点击 Create operator agent,当页面显示 agent 已就绪时,点击 Get started。用户确认后,运行上述检查调用(如果新 agent 尚未就绪,请等待约一分钟,并最多重试 3 次)。
  3. **保存并询问是否共享上下文:**检查调用成功后,将
    {project_id}
    保存到 local memory(如果 agent 不是用户自己的,还要保存
    agentId
    ),并告知用户 operator 已可使用,同时说明
    {project_id}
    和对应 agent。在同一条回复中,如果
    cloud-operator-share-context
    skill 可用,且 local memory 中没有“Cloud Operator context: shared on”或“declined on”备注,则用一行询问:是否要扫描 agent instruction files、local memory、skills 和 workflows,以及代码仓库中的 GCP docs,以查找用户或其团队现有的 Google Cloud 操作上下文(环境、项目、产品偏好、最佳实践、架构指导、runbooks),并将其共享到 operator agent 的 memory 中——同时说明用户会先看到扫描项列表。在用户同意之前,不要读取任何其他内容。
    • **是:**运行
      cloud-operator-share-context
      (从其收集步骤开始)。
    • **否:**在 local memory 中记录“Cloud Operator context: declined on {date}”。
    • **未回答:**不记录任何内容。 然后返回设置开始前正在等待处理的任何请求。