dx-lifecycle-center
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseLifecycle Center: Connect Orgs and Deploy Metadata
Lifecycle Center:连接 Org 与部署 Metadata
This skill manages which orgs a user can deploy to, and deploys to them. Everything runs from the source org: the org the user built in, where DX Inspector runs. All connections and environments are stored there.
此 skill 管理用户可部署到的 org,并负责向这些 org 部署。所有操作都从 source org 运行:即用户构建内容的 org,DX Inspector 在其中运行。所有连接和环境都存储在那里。
Operations
操作
| Op | Name | What it does | Details |
|---|---|---|---|
| A | List orgs | Shows the orgs connected to DX Inspector (the deploy targets), or the current org's details. Also resolves a target the user names. | |
| B | Connect an org | Connects a new sandbox or scratch, production, or OrgFarm org as a deploy target, or repairs a half-finished connection. The user signs in through a link. | |
| C | Lifecycle Center org | Connects, repairs, or checks the Lifecycle Center org (credential | |
| D | Deploy | Deploys, validates, or quick-deploys components from the source org to a connected target, then polls to the end. | |
Connect (B) and deploy or quick deploy (D) change an org, so they wait for the user's confirmation first. Listing, status checks, validate runs, and polling do not change a target org.
| 操作 | 名称 | 作用 | 详细信息 |
|---|---|---|---|
| A | 列出 Org | 显示与 DX Inspector 连接的 org(部署目标),或当前 org 的详细信息。也可解析用户指定的目标。 | |
| B | 连接 Org | 将新的 sandbox 或 scratch、production 或 OrgFarm org 连接为部署目标,或修复未完成的连接。用户通过链接登录。 | |
| C | Lifecycle Center Org | 连接、修复或检查 Lifecycle Center org(credential | |
| D | 部署 | 将组件从 source org 部署、验证或快速部署至已连接的目标,随后持续轮询直至结束。 | |
连接(B)和部署或快速部署(D)会更改 org,因此必须先等待用户确认。列出、状态检查、validate 运行和轮询不会更改目标 org。
Key terms
关键术语
| Term | Meaning |
|---|---|
| Source org | The org the user built in. Use the alias they name, else the default org from |
| DX Inspector environment | A |
| Deploy target | An environment in state |
| Lifecycle Center org | The Lifecycle Center hub. A separate connection that is never a deploy target. |
| 术语 | 含义 |
|---|---|
| Source org | 用户构建内容的 org。优先使用用户指定的 alias,否则使用 |
| DX Inspector environment | source org 中带有 Named Credential 的 |
| Deploy target | 状态为 |
| Lifecycle Center org | Lifecycle Center hub。它是一个独立连接,永远不会成为部署目标。 |
Routing (deterministic)
路由(确定性规则)
Scripts and references are paths inside this skill's folder (the folder that holds this file). This skill owns every request below. Pick the operation by these rules in order; the first match wins. Do not hand these requests to another skill, and do not answer them from general knowledge.
| # | The request | Operation |
|---|---|---|
| 1 | Names the Lifecycle Center org, in any request, however it is spelled: "Lifecycle Center", "lifecyclecenter", "lifecycle-center", "lifecycle_center" (matching rules in | C |
| 2 | Deploy, validate, quick deploy, or push components to an org, URL, org id, alias, or environment name; or gives a | D |
| 3 | Show, list, or pick connected orgs or environments; "which orgs can I deploy to"; the current org's details | A |
| 4 | Connect, add, log in to, reconnect, or repair an org or its credential | B |
| 5 | Anything else about connected orgs or DX Inspector environments | A |
The Lifecycle Center org rule (1) has two exclusions: "Dev Hub" is never the Lifecycle Center org, and plural phrases such as "DevOps Center orgs", "DX Inspector orgs", "environments", or "orgs connected to DX Inspector" are not the Lifecycle Center org; route them by rules 2 to 5. Details: .
references/hub-org.mdReading the wording. Before applying the rules, normalize the request: lowercase it, treat hyphens, underscores, and extra spaces as single spaces, and ignore punctuation, one-letter typos in words of five or more letters, and filler such as "please", "can you", "I want to". (Rule 1 also uses the two forms described in .) Then match on any word in the groups below; the exact phrase does not matter.
references/hub-org.md| Operation | Action words (any form: "deploy", "deploying", "deployment") | Object words |
|---|---|---|
| D | deploy, deployment, validate, validation, check only, dry run, quick deploy, quickdeploy, push, send, ship, move, copy, release, add or install (when the object is a component) | components, metadata, classes, flows, objects, or a named org as the destination ("to", "into", "onto") |
| B | connect, connection, add, link, hook up, hookup, authorize, authenticate, log in, login, sign in, set up, setup, register, onboard, reconnect, repair, fix, refresh | org, environment, env, sandbox, scratch, production, prod, orgfarm, org farm |
| A | show, list, see, view, display, which, what, pick, choose, available | orgs, environments, envs, targets, connections, "where can I deploy" |
A request with a D action word and a destination, or that names a component and a destination whatever the verb ("add AccountService to my QA sandbox"), is D, even when it also contains a B word. A B action word whose object is an org or environment makes the request B, even when words like "connected" or "linked" also appear ("reconnect my sandbox, it shows not connected"). A request with only B words is B. A request with only A words, or a question about what is connected, is A. A bare or "status of my deploy" is D. If no group matches, use the vague-prompt table below.
requestIdA request that mixes jobs (for example "connect my sandbox and deploy AccountService to it") takes the lowest-numbered match, here D, which runs B itself when the target is not connected.
Vague prompts. If the message is only "deploy", "push my changes", "connect an org", or similar, do not guess and do not call any API. Ask exactly one question that fixes the first missing input:
| Intent | Ask, in this order |
|---|---|
| Deploy | 1. Which components? ( |
| Connect | 1. "Is it a sandbox or scratch org, a production org, or an OrgFarm org?" 2. What short name (letters only) should the environment have? |
| Not clear which | "Do you want to connect an org or deploy components?" |
A bare "deploy" with no DX Inspector context is a question, not a deploy.
脚本和引用文件都是此 skill 文件夹(即包含当前文件的文件夹)内的路径。此 skill 负责以下所有请求。请按以下规则选择操作,按顺序匹配,第一个匹配项生效。不要将这些请求移交给其他 skill,也不要根据通用知识作答。
| # | 请求 | 操作 |
|---|---|---|
| 1 | 在任何请求中提到 Lifecycle Center org,无论拼写方式为何: | C |
| 2 | 将组件部署、验证、快速部署或推送至 org、URL、org id、alias 或环境名称;或提供 | D |
| 3 | 显示、列出或选择已连接的 org 或环境;“which orgs can I deploy to”;当前 org 的详细信息 | A |
| 4 | 连接、添加、登录、重新连接或修复 org 及其 credential | B |
| 5 | 其他任何与已连接 org 或 DX Inspector environments 有关的内容 | A |
Lifecycle Center org 规则(1)有两个例外: 永远不是 Lifecycle Center org;复数短语,如 、、 或 ,也不是 Lifecycle Center org,应按规则 2 至 5 进行路由。详细信息见 。
Dev HubDevOps Center orgsDX Inspector orgsenvironmentsorgs connected to DX Inspectorreferences/hub-org.md理解措辞。 应用规则前,先规范化请求:转换为小写,将连字符、下划线和多余空格统一视为单个空格,并忽略标点、长度至少为五个字母的单词中的单字母拼写错误,以及 、、 等填充词。(规则 1 还使用 中描述的两种形式。)然后匹配下方分组中的任意单词;无需完全匹配整个短语。
pleasecan youI want toreferences/hub-org.md| 操作 | 操作词(任意词形: | 对象词 |
|---|---|---|
| D | deploy, deployment, validate, validation, check only, dry run, quick deploy, quickdeploy, push, send, ship, move, copy, release, add 或 install(当对象是组件时) | components, metadata, classes, flows, objects,或作为目标位置的指定 org( |
| B | connect, connection, add, link, hook up, hookup, authorize, authenticate, log in, login, sign in, set up, setup, register, onboard, reconnect, repair, fix, refresh | org, environment, env, sandbox, scratch, production, prod, orgfarm, org farm |
| A | show, list, see, view, display, which, what, pick, choose, available | orgs, environments, envs, targets, connections, |
如果请求包含 D 操作词和目标位置,或者无论使用什么动词,只要同时指定组件和目标位置,则属于 D,即使还包含 B 操作词。如果 B 操作词的对象是 org 或 environment,则请求属于 B,即使同时出现 或 等词,例如“reconnect my sandbox, it shows not connected”。仅包含 B 操作词的请求属于 B。仅包含 A 操作词,或询问当前连接了什么的请求,属于 A。仅提供 或询问“status of my deploy”的请求属于 D。如果没有任何分组匹配,则使用下方模糊请求表。
connectedlinkedrequestId如果请求混合了多项任务,例如“connect my sandbox and deploy AccountService to it”,则采用编号最小的匹配项,此处为 D;当目标尚未连接时,D 本身会执行 B。
模糊请求。 如果消息仅为“deploy”、“push my changes”、“connect an org”或类似内容,不要猜测,也不要调用任何 API。只提出一个能够确定第一个缺失输入的问题:
| 意图 | 按以下顺序询问 |
|---|---|
| 部署 | 1. 要部署哪些组件?( |
| 连接 | 1. “它是 sandbox 或 scratch org、production org,还是 OrgFarm org?”2. 环境应使用什么短名称(仅限字母)? |
| 无法确定意图 | “你想连接 org,还是部署组件?” |
在没有任何 DX Inspector 上下文的情况下,单独出现“deploy”是一个问题,而不是部署请求。
Rules that always apply
始终适用的规则
- Targets come from the DX Inspector environments in the source org, never from or local aliases.
sf org list - Never deploy to a target that is not , never to the source org, and never to the Lifecycle Center org.
selectable - The Lifecycle Center org never appears in a list and is not mentioned while listing. It is discussed only when the user asks about it.
- Confirm before every call that changes an org: connect (, Step 1) and deploy (
connect-org.md, Step 4).deploy.mdis the only mode that needs no confirmation.validate - When a connect started from a deploy and finishes, tell the user the org is connected and that you are continuing the deploy, then ask for the deploy confirmation. Connecting never deploys by itself.
- A sandbox and a scratch org are the same type (). Treat their URLs alike.
SANDBOX - Make one attempt per API call. Never retry in a loop, resubmit after a timeout, or invent an id, credential name, or status.
- Never ask for, print, or pass an access token. Never show row ids or credential names.
- Never say a browser was opened. Give the login link and wait for the user to reply done.
- Do not guess a missing input. Ask one question for the first missing input.
- Ask the user to confirm an org type that the URL host does not decide. Never infer it from an environment name.
- 目标仅来自 source org 中的 DX Inspector environments,绝不来自 或本地 aliases。
sf org list - 绝不向状态不是 的目标、source org 或 Lifecycle Center org 部署。
selectable - Lifecycle Center org 永远不会出现在列表中,列出时也不得提及。只有用户主动询问时才讨论它。
- 每次更改 org 的调用前都必须确认:连接(,第 1 步)和部署(
connect-org.md,第 4 步)。deploy.md是唯一无需确认的模式。validate - 如果连接由部署流程触发并成功完成,应告知用户 org 已连接且将继续部署,然后请求部署确认。连接本身绝不会执行部署。
- sandbox 和 scratch org 属于同一种类型(),应同等处理其 URL。
SANDBOX - 每个 API 调用只尝试一次。绝不循环重试、在超时后重新提交,或臆造 id、credential name 或 status。
- 绝不询问、显示或传递 access token。绝不显示 row ids 或 credential names。
- 绝不能声称浏览器已打开。提供登录链接并等待用户回复 done。
- 不要猜测缺失的输入。针对第一个缺失输入只提出一个问题。
- 当 URL host 无法决定 org 类型时,要求用户确认。绝不根据 environment name 推断类型。
What the user sees
用户看到的内容
| After | Reply with |
|---|---|
| A list | Only the table and the closing sentence ( |
| A not enabled | The one-sentence message in |
| B connect | The sign-in layout with a button-style link ( |
| C | The exact sentences in |
| D | A plain-language report: what was deployed, from where, to where, and the outcome ( |
| 操作完成后 | 回复内容 |
|---|---|
| A 列出 | 仅提供表格和结束语( |
| A 未启用 | 仅提供 |
| B 连接 | 先提供带按钮样式链接的登录界面( |
| C | 严格按照 |
| D | 使用通俗语言报告:部署了什么、从哪里部署到哪里以及最终结果( |
If something fails
发生错误时
| Failure | Where to look |
|---|---|
| The list or target lookup fails | |
| A connect step fails | |
| A deploy or validate fails | |
| The target login is stale | Reconnect that environment ( |
| 错误 | 查看位置 |
|---|---|
| 列表或目标解析失败 | |
| 连接步骤失败 | |
| 部署或 validate 失败 | |
| 目标登录状态已失效 | 重新连接该环境( |
References
引用文件
- : Operation A. The resolver script, match statuses, the list table, and the not-enabled handling.
references/list-orgs.md - : Operation B. Modes, Steps 0 to 5, and rules for connecting an org.
references/connect-org.md - : Operation C. The Lifecycle Center org: hub names, replies, and rules.
references/hub-org.md - : Operation D. Steps 1 to 7 for deploy, validate, quick deploy, and polling.
references/deploy.md - : deploy, validate, and quick-deploy request bodies and test levels.
references/request-body.md - : Environment API and
references/connect-api.mdrequest and response shapes, status checks.setupNamedCredential - : connect error codes and recovery.
references/troubleshooting.md - : deploy error codes.
references/error-handling.md - : worked prompts for each operation.
examples/workflows.md - : read-only list and identifier resolver.
scripts/resolve-environment.sh - : read-only status poller. Reads the Simple Deploy endpoint and
scripts/poll-deploy-status.sh, and reports component errors on failure.DevopsRequestInfo
- :操作 A。包含解析脚本、匹配状态、列表表格和未启用时的处理方式。
references/list-orgs.md - :操作 B。包含连接 org 的模式、第 0 至第 5 步以及规则。
references/connect-org.md - :操作 C。包含 Lifecycle Center org 的 hub 名称、回复内容和规则。
references/hub-org.md - :操作 D。包含部署、validate、快速部署和轮询的第 1 至第 7 步。
references/deploy.md - :deploy、validate 和 quick-deploy 的请求体及测试级别。
references/request-body.md - :Environment API、
references/connect-api.md的请求与响应结构,以及状态检查。setupNamedCredential - :连接错误代码及恢复方式。
references/troubleshooting.md - :部署错误代码。
references/error-handling.md - :每种操作的示例提示词。
examples/workflows.md - :只读的列表和标识符解析脚本。
scripts/resolve-environment.sh - :只读的状态轮询脚本。读取 Simple Deploy endpoint 和
scripts/poll-deploy-status.sh,并在失败时报告组件错误。DevopsRequestInfo