vercel
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseVercel Monitor
Vercel Monitor
Monitor one immutable Vercel deployment for the project and notify the
current task when that exact deployment becomes ready or fails.
remotion监控 项目的一次不可变 Vercel deployment,并在该确切 deployment 变为就绪或失败时通知当前任务。
remotionNon-negotiable rules
不可违反的规则
- Never infer deployment state from an HTTP response. A branch preview alias can return 200 from the previous deployment while the new deployment is building.
- Never monitor a branch preview alias. It is movable and can resolve to an older or newer deployment.
- Pin the monitor to a Vercel deployment ID () or the immutable automatic deployment hostname (
dpl_...).<project>-<random>-<scope>.vercel.app - Read the machine-readable Vercel deployment state. Do not parse human CLI output.
- Default to the project and the
remotionVercel scope. Ignore theremotionproject unless the user explicitly asks for it.bugs
- 绝不能根据 HTTP 响应推断 deployment state。branch preview alias 在新 deployment 仍在构建时可能返回上一次 deployment 的 200 状态。
- 绝不能监控 branch preview alias。它是可移动的,并且可能解析到较旧或较新的 deployment。
- 将 monitor 固定到 Vercel deployment ID()或不可变的 automatic deployment hostname(
dpl_...)。<project>-<random>-<scope>.vercel.app - 读取机器可读的 Vercel deployment state。不要解析供人阅读的 CLI output。
- 默认使用 project 和
remotionVercel scope。除非用户明确要求,否则忽略remotionproject。bugs
Resolve the exact deployment
解析确切 deployment
Prefer these sources, in order:
- A Vercel deployment/dashboard URL supplied by the user.
- The check on the active GitHub PR. Its dashboard URL has the form
Vercel – remotion.https://vercel.com/remotion/remotion/<deployment-id-suffix> - The row in the Vercel bot's PR comment.
remotion - , matched to the exact PR, commit SHA, or branch in
vercel list remotion --scope remotion --format=json..deployments[].meta
The final path segment of a dashboard URL becomes the deployment ID by prefixing
it with . For example:
dpl_text
https://vercel.com/remotion/remotion/AbCd1234 -> dpl_AbCd1234The link in a Vercel PR comment is normally a branch alias. Preserve it
for the final notification, but do not use it for state checks.
PreviewWhen using , select the newest deployment that matches all available
identity fields:
vercel list.name == "remotion"- , when a PR is known
.meta.githubPrId == <PR number> - , when a commit is known
.meta.githubCommitSha == <full commit SHA>
Do not silently fall back to a different commit. If no exact deployment can be
identified, ask for the Vercel dashboard URL, PR number, or commit SHA.
按以下优先级选择来源:
- 用户提供的 Vercel deployment/dashboard URL。
- 当前活跃 GitHub PR 上的 check。其 dashboard URL 采用以下格式:
Vercel – remotion。https://vercel.com/remotion/remotion/<deployment-id-suffix> - Vercel bot 的 PR comment 中的 所在行。
remotion - ,并根据
vercel list remotion --scope remotion --format=json中的信息匹配确切的 PR、commit SHA 或 branch。.deployments[].meta
dashboard URL 的最后一个 path segment 即为 deployment ID,只需在前面加上 。例如:
dpl_text
https://vercel.com/remotion/remotion/AbCd1234 -> dpl_AbCd1234Vercel PR comment 中的 link 通常是 branch alias。保留它以用于最终通知,但不要将其用于 state check。
Preview使用 时,选择与所有可用 identity fields 均匹配的最新 deployment:
vercel list.name == "remotion"- 已知 PR 时,
.meta.githubPrId == <PR number> - 已知 commit 时,
.meta.githubCommitSha == <full commit SHA>
不得在未告知用户的情况下回退到其他 commit。如果无法识别确切的 deployment,请要求用户提供 Vercel dashboard URL、PR number 或 commit SHA。
Read state
读取 state
Run the bundled checker from the repository root:
bash
python3 .agents/skills/vercel/scripts/check-deployment.py <deployment-id-or-url>The checker calls:
bash
vercel inspect <deployment-id-or-immutable-url> \
--scope remotion \
--format=jsonIt validates the project, rejects moving aliases, and emits normalized JSON.
Use its field:
state- : success.
READY - ,
ERROR, orCANCELED: failure.CANCELLED - ,
BUILDING, orQUEUED: still in progress.INITIALIZING - : not terminal. Report the diagnostic only if it persists or prevents creation of a trustworthy monitor.
UNKNOWN
HTTP probing may be used after as an optional reachability check. It must
never promote a non-ready or unknown deployment to .
READYREADY从 repository root 运行 bundled checker:
bash
python3 .agents/skills/vercel/scripts/check-deployment.py <deployment-id-or-url>checker 会调用:
bash
vercel inspect <deployment-id-or-immutable-url> \
--scope remotion \
--format=json它会验证 project、拒绝 moving alias,并输出 normalized JSON。使用其 字段:
state- :成功。
READY - 、
ERROR或CANCELED:失败。CANCELLED - 、
BUILDING或QUEUED:仍在进行中。INITIALIZING - :非 terminal state。仅当该状态持续存在或妨碍创建可信 monitor 时,才报告诊断信息。
UNKNOWN
在 之后,可以使用 HTTP probing 作为可选的 reachability check。它绝不能将未就绪或状态未知的 deployment 提升为 。
READYREADYCreate the monitor
创建 monitor
Use the Codex automation tool to create a one-minute heartbeat with a bounded
count, normally 30 attempts. The heartbeat prompt must be self-contained and
include:
- The pinned deployment ID or immutable deployment hostname.
- The dashboard URL.
- The branch preview alias, if known, for the final notification only.
- The project, PR, branch, and commit context, if known.
- The exact checker command.
- The terminal-state rules above.
Use this prompt shape:
text
Monitor this exact Vercel deployment until it reaches a terminal state.
Pinned deployment: <dpl_id_or_immutable_hostname>
Dashboard: <dashboard_url>
Preview alias (reporting only; never use for state): <preview_url_or_unknown>
Context: <project/pr/branch/commit>
From the repository root, run:
python3 .agents/skills/vercel/scripts/check-deployment.py <pinned_deployment>
Only the JSON `state` is authoritative.
- READY: reply "Vercel deployment is ready" and include Dashboard and Preview.
- ERROR, CANCELED, or CANCELLED: reply with the failure state and include both links.
- BUILDING, QUEUED, INITIALIZING, or UNKNOWN: stay quiet and check again next time.
Never curl the preview URL to determine readiness. After reporting a terminal
state, delete or pause this heartbeat if its automation ID is available.Before creating a heartbeat, run the checker once. If the deployment is already
terminal, report immediately instead. Otherwise, tell the user which exact
deployment is being watched and the cadence.
使用 Codex automation tool 创建一个间隔一分钟且次数有限(通常为 30 次)的 heartbeat。heartbeat prompt 必须自包含,并包含:
- 固定的 deployment ID 或 immutable deployment hostname。
- dashboard URL。
- 已知时的 branch preview alias,仅用于最终通知。
- 已知时的 project、PR、branch 和 commit context。
- 确切的 checker command。
- 上述 terminal-state 规则。
使用以下 prompt 结构:
text
Monitor this exact Vercel deployment until it reaches a terminal state.
Pinned deployment: <dpl_id_or_immutable_hostname>
Dashboard: <dashboard_url>
Preview alias (reporting only; never use for state): <preview_url_or_unknown>
Context: <project/pr/branch/commit>
From the repository root, run:
python3 .agents/skills/vercel/scripts/check-deployment.py <pinned_deployment>
Only the JSON `state` is authoritative.
- READY: reply "Vercel deployment is ready" and include Dashboard and Preview.
- ERROR, CANCELED, or CANCELLED: reply with the failure state and include both links.
- BUILDING, QUEUED, INITIALIZING, or UNKNOWN: stay quiet and check again next time.
Never curl the preview URL to determine readiness. After reporting a terminal
state, delete or pause this heartbeat if its automation ID is available.创建 heartbeat 前,先运行 checker 一次。如果 deployment 已处于 terminal state,则立即报告。否则,告诉用户正在监视的是哪个确切 deployment 以及检查频率。