antithesis-debug

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Antithesis Multiverse Debugger

Antithesis Multiverse Debugger

Use the
agent-browser
skill to interact with the Antithesis multiverse debugger.
Every debugging session should use:
  • a fresh, unique
    SESSION
    value such as
    antithesis-debug-$(date +%s)-$$
Use
--session-name antithesis
so
agent-browser
manages shared authentication state automatically, while
--session "$SESSION"
keeps each debugging run isolated from other concurrent agents. Close the unique live session when debugging is complete.
使用
agent-browser
Skill与Antithesis Multiverse调试器进行交互。
每个调试会话都应使用:
  • 一个全新的唯一
    SESSION
    值,例如
    antithesis-debug-$(date +%s)-$$
使用
--session-name antithesis
参数,
agent-browser
会自动管理共享的认证状态,而
--session "$SESSION"
参数可确保每个调试运行与其他并发Agent相互隔离。调试完成后,请关闭该唯一的实时会话。

When to use this skill

何时使用此Skill

Use this when the user gives:
  • an Antithesis debugging-session URL
  • a bug report URL that should be debugged interactively
  • a request to inspect container filesystem, runtime state, or events inside Antithesis
For auth and report navigation, use the
antithesis-triage
skill. It already encodes the right
agent-browser
session model. This skill handles the debugger itself.
当用户提供以下内容时,使用此Skill:
  • Antithesis调试会话URL
  • 需要交互式调试的Bug报告URL
  • 检查Antithesis环境内的容器文件系统、运行时状态或事件的请求
对于认证和报告导航,请使用
antithesis-triage
Skill,它已内置正确的
agent-browser
会话模型。本Skill负责调试器本身的操作。

Gathering user input

收集用户输入

Before starting, collect the following from the user:
  1. Debugger URL (required) — A debugging-session URL like
    https://TENANT.antithesis.com/debugging-session/...
    .
  2. What to investigate — Are they checking filesystem contents? Runtime state? Specific artifacts?
  3. Container name (if known) — The name of the container to target. If not provided, the log view or container dropdown will show available containers.
开始前,请从用户处收集以下信息:
  1. 调试器URL(必填)—— 类似
    https://TENANT.antithesis.com/debugging-session/...
    的调试会话URL。
  2. 调查内容—— 他们要检查文件系统内容?运行时状态?还是特定工件?
  3. 容器名称(若已知)—— 目标容器的名称。若未提供,日志视图或容器下拉菜单会显示可用容器。

Simplified vs. advanced mode

简化模式 vs 高级模式

The debugger has two modes. Prefer simplified mode — it is sufficient for most tasks.
ModeBest forHow it works
SimplifiedRunning shell commands, reading files, listing directories, extracting artifactsClick log lines to set moment/container, type bash commands, press Send
AdvancedProgrammatic inspection, branching, event sets, custom JavaScript, multi-step notebook workflowsMonaco editor with JavaScript cells, action authorization, runtime API
调试器有两种模式。优先使用简化模式——它足以处理大多数任务。
模式适用场景工作方式
简化模式执行Shell命令、读取文件、列出目录、提取工件点击日志行设置时间点/容器,输入Bash命令,按发送键
高级模式程序化检查、分支操作、事件集查询、自定义JavaScript、多步骤笔记本工作流带JavaScript单元格的Monaco编辑器、操作授权、运行时API

Detecting which mode is active

检测当前激活的模式

Different tenants may open the debugger in either mode by default. After injecting the runtime (see
references/setup-session.md
), check which mode is active:
bash
agent-browser --session "$SESSION" eval \
  "window.__antithesisDebug.getMode()"
Returns
"simplified"
or
"advanced"
. To switch:
bash
agent-browser --session "$SESSION" eval \
  'window.__antithesisDebug.switchMode("simplified")'
不同租户的调试器默认打开模式可能不同。注入运行时后(参见
references/setup-session.md
),检查当前激活的模式:
bash
agent-browser --session "$SESSION" eval \
  "window.__antithesisDebug.getMode()"
返回值为
"simplified"
"advanced"
。切换模式的命令:
bash
agent-browser --session "$SESSION" eval \
  'window.__antithesisDebug.switchMode("simplified")'

When to escalate to advanced mode

何时升级到高级模式

Switch to advanced mode only when you need:
  • Branching (
    moment.branch()
    ) and advancing time
  • Event set queries (
    environment.events.up_to(moment)
    )
  • Fault injector state inspection
  • Complex multi-cell notebook workflows
  • The full JavaScript notebook API
To switch modes, use the three-dot menu (vertical dots icon) in the top-right corner of the debug timeline header. See
references/simplified-debugger.md
for details.
仅当你需要以下功能时,才切换到高级模式:
  • 分支操作(
    moment.branch()
    )和时间推进
  • 事件集查询(
    environment.events.up_to(moment)
  • 故障注入器状态检查
  • 复杂的多单元格笔记本工作流
  • 完整的JavaScript笔记本API
要切换模式,使用调试时间线标题右上角的三点菜单(垂直点图标)。详情请参见
references/simplified-debugger.md

Reference files

参考文件

Each reference file covers a specific interaction mode or task. Read the relevant file before performing that task.
每个参考文件涵盖特定的交互模式或任务。执行任务前,请阅读相关文件。

Simplified mode (default — start here)

简化模式(默认——从这里开始)

PageWhen to read
references/setup-session.md
Always — read first to set up the browser session
references/simplified-debugger.md
Running commands, extracting files, reading logs in simplified mode
页面阅读时机
references/setup-session.md
必读——首先阅读以设置浏览器会话
references/simplified-debugger.md
在简化模式下执行命令、提取文件、读取日志时阅读

Advanced mode (notebook)

高级模式(笔记本)

PageWhen to read
references/setup-session.md
Always — read first to set up the browser session
references/notebook.md
Reading or writing notebook source, injecting cells
references/actions.md
Authorizing shell actions, reading action output
references/common-inspections.md
Ready-to-use debug cell snippets for common tasks
页面阅读时机
references/setup-session.md
必读——首先阅读以设置浏览器会话
references/notebook.md
读取或编写笔记本源码、注入单元格时阅读
references/actions.md
授权Shell操作、读取操作输出时阅读
references/common-inspections.md
执行常见任务时使用现成的调试单元格代码片段时阅读

Recommended workflows

推荐工作流

Simplified: Run a command in a container

简化模式:在容器中执行命令

  1. Read
    references/setup-session.md
    — open the debugger URL
  2. Read
    references/simplified-debugger.md
    — click a log line to set the moment and container, enter a bash command, press Send, read the output
  3. Report findings with concrete evidence
  1. 阅读
    references/setup-session.md
    ——打开调试器URL
  2. 阅读
    references/simplified-debugger.md
    ——点击日志行设置时间点和容器,输入Bash命令,按发送键,读取输出
  3. 附带具体证据报告调查结果

Simplified: Extract a file

简化模式:提取文件

  1. Read
    references/setup-session.md
    — open the debugger URL
  2. Read
    references/simplified-debugger.md
    — click a log line, toggle "Extract file", enter the file path, press Send
  3. Read the download link from the output
  1. 阅读
    references/setup-session.md
    ——打开调试器URL
  2. 阅读
    references/simplified-debugger.md
    ——点击日志行,切换“提取文件”选项,输入文件路径,按发送键
  3. 从输出中获取下载链接

Advanced: Programmatic investigation

高级模式:程序化调查

  1. Read
    references/setup-session.md
    — open the debugger URL and inject runtime
  2. Switch to advanced mode:
    window.__antithesisDebug.switchMode("advanced")
  3. Read
    references/notebook.md
    — understand the seeded notebook
  4. Read
    references/common-inspections.md
    — pick inspection cells
  5. Read
    references/actions.md
    — authorize actions and read results
  6. Report findings with evidence chain
  1. 阅读
    references/setup-session.md
    ——打开调试器URL并注入运行时
  2. 切换到高级模式:
    window.__antithesisDebug.switchMode("advanced")
  3. 阅读
    references/notebook.md
    ——了解预配置的笔记本
  4. 阅读
    references/common-inspections.md
    ——选择检查单元格
  5. 阅读
    references/actions.md
    ——授权操作并读取结果
  6. 附带证据链报告调查结果

Runtime injection

运行时注入

The JS runtime is required for both simplified and advanced modes. It provides the
window.__antithesisDebug
API with three namespaces:
simplified
,
notebook
, and
actions
.
Use the browser-side runtime file:
  • assets/antithesis-debug.js
Inject it into the current page with:
bash
cat assets/antithesis-debug.js \
  | agent-browser --session "$SESSION" eval --stdin
Injecting the file registers methods on
window.__antithesisDebug
. Call those methods with
agent-browser eval
.
Method call examples:
bash
undefined
JS运行时是简化模式和高级模式都必需的。它提供
window.__antithesisDebug
API,包含三个命名空间:
simplified
notebook
actions
使用浏览器端运行时文件:
  • assets/antithesis-debug.js
通过以下命令将其注入当前页面:
bash
cat assets/antithesis-debug.js \
  | agent-browser --session "$SESSION" eval --stdin
注入文件后,
window.__antithesisDebug
会注册相关方法。使用
agent-browser eval
调用这些方法。
方法调用示例:
bash
undefined

Simplified mode

简化模式

agent-browser --session "$SESSION" eval
'window.__antithesisDebug.simplified.runCommand("ls -la /")'
agent-browser --session "$SESSION" eval
'window.__antithesisDebug.simplified.runCommand("ls -la /")'

Advanced mode

高级模式

agent-browser --session "$SESSION" eval
"window.__antithesisDebug.notebook.getSource()"

`agent-browser eval` awaits Promises automatically, so async and sync methods
use the same call pattern.

If `window.__antithesisDebug` is missing, inject `assets/antithesis-debug.js` and retry the method call.

Do not run method calls in parallel with `agent-browser open`, navigation, or
any other command that can replace the page. Wait until the target page is
settled before starting `eval` calls. Run queries sequentially; mutations will
interfere with each other if launched in parallel.

After every `open` call or any interaction that may navigate or replace the
page, first confirm the browser has landed on the debugger page, then inject
`assets/antithesis-debug.js` and call the appropriate `waitForReady()` before
running other methods.
agent-browser --session "$SESSION" eval
"window.__antithesisDebug.notebook.getSource()"

`agent-browser eval`会自动等待Promise完成,因此异步和同步方法使用相同的调用模式。

如果`window.__antithesisDebug`不存在,请注入`assets/antithesis-debug.js`并重试方法调用。

不要在`agent-browser open`、导航或任何可能替换页面的命令并行运行方法调用。等待目标页面加载完成后再开始`eval`调用。按顺序执行查询;如果并行启动,修改操作会相互干扰。

每次执行`open`调用或任何可能导航或替换页面的交互后,首先确认浏览器已加载到调试器页面,然后注入`assets/antithesis-debug.js`,并在运行其他方法前调用相应的`waitForReady()`。

Page loading checks

页面加载检查

After navigation, inject the runtime, then call the appropriate
waitForReady
:
bash
undefined
导航完成后,注入运行时,然后调用相应的
waitForReady
bash
undefined

Simplified mode

简化模式

agent-browser --session "$SESSION" eval
"window.__antithesisDebug.simplified.waitForReady()"
agent-browser --session "$SESSION" eval
"window.__antithesisDebug.simplified.waitForReady()"

Advanced mode

高级模式

agent-browser --session "$SESSION" eval
"window.__antithesisDebug.notebook.waitForReady()"

Both poll for up to 60 seconds and return `{ ok, ready, attempts, waitedMs }`.
On timeout, the result also includes `details`.

One-shot probes:

```bash
agent-browser --session "$SESSION" eval \
  "window.__antithesisDebug.simplified.loadingFinished()"

agent-browser --session "$SESSION" eval \
  "window.__antithesisDebug.notebook.loadingFinished()"
Diagnostics:
bash
agent-browser --session "$SESSION" eval \
  "window.__antithesisDebug.simplified.loadingStatus()"

agent-browser --session "$SESSION" eval \
  "window.__antithesisDebug.notebook.loadingStatus()"
agent-browser --session "$SESSION" eval
"window.__antithesisDebug.notebook.waitForReady()"

两者都会轮询最多60秒,并返回`{ ok, ready, attempts, waitedMs }`。超时后,结果还会包含`details`。

一次性探测:

```bash
agent-browser --session "$SESSION" eval \
  "window.__antithesisDebug.simplified.loadingFinished()"

agent-browser --session "$SESSION" eval \
  "window.__antithesisDebug.notebook.loadingFinished()"
诊断命令:
bash
agent-browser --session "$SESSION" eval \
  "window.__antithesisDebug.simplified.loadingStatus()"

agent-browser --session "$SESSION" eval \
  "window.__antithesisDebug.notebook.loadingStatus()"

General guidance

通用指南

  • Start in simplified mode. The simplified debugger handles most debugging tasks. Only switch to advanced mode when you specifically need the notebook API.
  • Defer to antithesis-triage for auth. If the debugger URL requires authentication, use the
    antithesis-triage
    skill's
    references/setup-auth.md
    for the interactive login flow. Use the same
    --session-name antithesis
    so auth state is shared.
  • Use disposable sessions. Generate a unique
    SESSION
    for each debugging run, pair it with the shared
    --session-name antithesis
    , and
    agent-browser --session "$SESSION" close
    when you finish or abort.
  • Run commands sequentially. In both modes, wait for each command to complete before sending the next one.
  • Do not fabricate container names. Use the container dropdown (simplified) or
    environment.containers.list({moment})
    (advanced) to determine valid container names.
  • Present results clearly. When reporting filesystem contents, include the full path and listing. When reporting artifact searches, include what was found and what was not.
  • 从简化模式开始。简化调试器可处理大多数调试任务。仅当明确需要笔记本API时,才切换到高级模式。
  • 认证操作请使用antithesis-triage。如果调试器URL需要认证,请使用
    antithesis-triage
    Skill的
    references/setup-auth.md
    进行交互式登录流程。使用相同的
    --session-name antithesis
    参数以共享认证状态。
  • 使用一次性会话。为每个调试运行生成唯一的
    SESSION
    值,搭配共享的
    --session-name antithesis
    参数,调试完成或中止时执行
    agent-browser --session "$SESSION" close
    关闭会话。
  • 按顺序执行命令。在两种模式下,都要等待每个命令完成后再发送下一个命令。
  • 不要编造容器名称。使用容器下拉菜单(简化模式)或
    environment.containers.list({moment})
    (高级模式)确定有效的容器名称。
  • 清晰呈现结果。报告文件系统内容时,包含完整路径和列表。报告工件搜索结果时,说明找到的内容和未找到的内容。

Advanced mode only

仅高级模式适用

  • Inject the runtime after navigation. After every
    open
    call or page reload, inject
    assets/antithesis-debug.js
    and call
    notebook.waitForReady()
    before the next method call.
  • Retry missing-runtime errors by reinjecting. If a command fails because
    window.__antithesisDebug
    is undefined or missing, inject the runtime and rerun the same method.
  • Authorize actions one at a time. Each
    bash\
    ...`` cell needs explicit authorization. Read the result before injecting the next cell.
  • 导航后重新注入运行时。每次执行
    open
    调用或页面重新加载后,注入
    assets/antithesis-debug.js
    ,并在调用下一个方法前执行
    notebook.waitForReady()
  • 若运行时缺失则重新注入并重试。如果命令因
    window.__antithesisDebug
    未定义或缺失而失败,请重新注入运行时并重试方法调用。
  • 逐个授权操作。每个
    bash\
    ...``单元格都需要显式授权。读取结果后再注入下一个单元格。

Self-Review

自我检查

Before declaring this skill complete, review your work against the criteria below. This skill's output is conversational (summaries, evidence, analysis), so the review should happen in your current context. Re-read the guidance in this file, then systematically check each item below against the answers and analysis you produced.
Review criteria:
  • Every filesystem listing or artifact search was extracted from actual debugger output, not inferred or assumed
  • The evidence chain is clear: which commands were run, what they returned, and what conclusions follow
  • The summary distinguishes between what the debugger shows and what you interpret or recommend
  • The browser session was closed at the end of the debugging run
在确认此Skill执行完成前,请根据以下标准检查你的工作。此Skill的输出为对话式内容(摘要、证据、分析),因此检查需在当前上下文中进行。重新阅读本文档中的指南,然后系统地对照你生成的答案和分析检查每一项。
检查标准:
  • 所有文件系统列表或工件搜索结果均来自实际调试器输出,而非推断或假设
  • 证据链清晰:执行了哪些命令,返回了什么结果,得出了什么结论
  • 摘要区分了调试器显示的内容和你的解读或建议
  • 调试运行结束后已关闭浏览器会话