hsb-app
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseHSB Application Runner
HSB 应用运行器
Use this skill when the user wants to discover, select, and run Holoscan Sensor Bridge example applications on a devkit with a connected HSB board.
This skill assumes the devkit is already set up (SSH, demo container built, host configured, board connected). If setup is not complete, instruct the user to run first.
/hsb-setupThis workflow runs applications inside the demo container. Only run it when the user explicitly invokes it.
当用户想要在连接了HSB开发板的开发工具包上发现、选择并运行Holoscan Sensor Bridge示例应用程序时,请使用此技能。
本技能假定开发工具包已完成设置(SSH已配置、演示容器已构建、主机已配置、开发板已连接)。如果设置未完成,请指示用户先运行。
/hsb-setup此工作流在演示容器内运行应用程序。仅当用户明确调用时才执行。
Before you start — required gates (do these first, in order)
开始前的必要检查步骤(按顺序完成)
Gate 1 — Read environment variables. Before doing anything else, check these variables and print their resolved values to the user:
SSH_TARGET Remote devkit login (e.g. nvidia@192.168.1.50). Ask the user if not set.
REMOTE_ROOT Remote working directory (e.g. /home/nvidia). Ask the user if not set.
REMOTE_SUDO sudo / sudo -n / "" — default to "sudo" if not set.
REMOTE_SSH_OPTS Additional SSH options (optional).
HSB_PLATFORM Platform hint (optional).SSH_TARGET and REMOTE_ROOT are required. Stop and ask the user for them if either is missing.
Gate 2 — Present the phase plan and get confirmation. Before taking any action:
If the user's request already includes platform, board type, and sensors, also state upfront:
- You will scan and filter apps by the user's sensor type and platform
examples/ - You will NOT add automatically — only if the user explicitly requests it
--headless - If the user specified a timeout (e.g., "60-second timeout"), state you will use that as the watchdog timeout
- Applications run inside the demo container via , using
docker runfor Python-based examplespython3
Show the phase plan:
HSB App — Phase Plan
Phase 0: Verify board connectivity and demo container readiness
Phase 1: Discover user setup and select application to run
Phase 2: Run application with monitoring, failure analysis, and iterative debugging
Phase 3: Generate session report (with option to save)Then ask explicitly: — do not start Phase 0 until the user confirms.
Shall I proceed with Phase 0? [Y/n]Gate 3 — Fast path check. After the user confirms in Gate 2, run this check before executing any Phase 0 commands:
bash
ssh -o BatchMode=yes $REMOTE_SSH_OPTS $SSH_TARGET \
"grep _SESSION_VERIFIED /tmp/.claude_hsb_app_session/state.sh 2>/dev/null || echo 'no session'"If the output contains , skip Phase 0 and Phase 1 setup discovery — go directly to app selection and inform the user.
_SESSION_VERIFIED=true检查步骤1 — 读取环境变量。在执行任何操作之前,检查以下变量并将其解析后的值显示给用户:
SSH_TARGET 远程开发板登录信息(例如 nvidia@192.168.1.50)。如果未设置,请询问用户。
REMOTE_ROOT 远程工作目录(例如 /home/nvidia)。如果未设置,请询问用户。
REMOTE_SUDO sudo / sudo -n / "" — 未设置时默认值为 "sudo"。
REMOTE_SSH_OPTS 额外的SSH选项(可选)。
HSB_PLATFORM 平台提示(可选)。SSH_TARGET 和 REMOTE_ROOT 是必填项。如果其中任意一项缺失,请停止操作并询问用户。
检查步骤2 — 展示阶段计划并获取确认。在执行任何操作之前:
如果用户的请求中已包含平台、开发板类型和传感器信息,请提前说明:
- 您将扫描目录,并根据用户的传感器类型和平台筛选应用
examples/ - 不会自动添加参数 — 仅当用户明确要求时才添加
--headless - 如果用户指定了超时时间(例如“60秒超时”),说明您将把该时间用作看门狗超时时间
- 应用程序通过在演示容器内运行,基于Python的示例使用
docker run执行python3
展示阶段计划:
HSB 应用 — 阶段计划
阶段0:验证开发板连接性和演示容器就绪状态
阶段1:发现用户设置并选择要运行的应用
阶段2:运行应用并进行监控、故障分析和迭代调试
阶段3:生成会话报告(提供保存选项)然后明确询问: — 在用户确认前不要启动阶段0。
是否开始执行阶段0?[Y/n]检查步骤3 — 快速路径检查。用户在步骤2中确认后,在执行任何阶段0命令之前运行此检查:
bash
ssh -o BatchMode=yes $REMOTE_SSH_OPTS $SSH_TARGET \
"grep _SESSION_VERIFIED /tmp/.claude_hsb_app_session/state.sh 2>/dev/null || echo 'no session'"如果输出包含,则跳过阶段0和阶段1的设置发现步骤,直接进入应用选择环节并通知用户。
_SESSION_VERIFIED=trueWhat this skill must do
此技能必须完成的任务
- Verify that the devkit is reachable over SSH, the HSB board is connected and responsive, and the demo container is available. Read the current FPGA version and board identity.
- Interact with the user to understand their specific setup — repo location on the devkit, HSB software version, board type (Lattice, etc.), and connected sensors (e.g., dual IMX274, VB1940). Then scan the repository's user guide and directory to build a list of applications compatible with the user's setup. Present the list and let the user choose an app to run.
examples/ - Run the selected application inside the demo container, monitor output, and if the app fails, analyze the log output and guide the user through debugging — including suggesting code or environment edits and re-running the app.
- Produce a summary report of the session — issues encountered, fixes applied, and outcome. Offer to save the report to a file.
- 验证开发板可通过SSH访问、HSB开发板已连接且响应正常,以及演示容器可用。读取当前FPGA版本和开发板标识。
- 与用户交互以了解其具体设置 — 开发板上的代码库位置、HSB软件版本、开发板类型(如Lattice等)以及已连接的传感器(例如双IMX274、VB1940)。然后扫描代码库的用户指南和目录,构建与用户设置兼容的应用列表。展示该列表并让用户选择要运行的应用。
examples/ - 在演示容器内运行选定的应用,监控输出;如果应用运行失败,分析日志输出并引导用户进行调试 — 包括建议代码或环境修改以及重新运行应用。
- 生成会话总结报告 — 记录遇到的问题、应用的修复措施以及最终结果。提供将报告保存到文件的选项。
Linux/Windows-friendly wrapper variables
兼容Linux/Windows的包装器变量
Reuse the same environment variables from the and skills:
hsb-setuphsb-flash- for the remote login target (e.g.
SSH_TARGET)nvidia@agx-thor-host - for the remote working directory
REMOTE_ROOT - for privileged commands
REMOTE_SUDO - for additional SSH options
REMOTE_SSH_OPTS - as an optional platform hint
HSB_PLATFORM
If these are set, notify the user of these settings and use them without re-asking.
Before Phase 0, print the resolved remote execution settings.
重用和技能中的相同环境变量:
hsb-setuphsb-flash- 用于远程登录目标(例如
SSH_TARGET)nvidia@agx-thor-host - 用于远程工作目录
REMOTE_ROOT - 用于特权命令
REMOTE_SUDO - 用于额外的SSH选项
REMOTE_SSH_OPTS - 作为可选的平台提示
HSB_PLATFORM
如果这些变量已设置,请通知用户这些设置并直接使用,无需再次询问。
在阶段0之前,打印解析后的远程执行设置。
Mandatory interaction pattern
强制交互模式
First run in a session (no prior verification)
会话首次运行(无先前验证)
When no valid session state exists, show the full phase plan:
- Phase 0: Verify board connectivity and demo container readiness
- Phase 1: Discover user setup and select application to run
- Phase 2: Run application with monitoring, failure analysis, and iterative debugging
- Phase 3: Generate session report (with option to save)
Then execute one phase at a time.
当不存在有效的会话状态时,展示完整的阶段计划:
- 阶段0:验证开发板连接性和演示容器就绪状态
- 阶段1:发现用户设置并选择要运行的应用
- 阶段2:运行应用并进行监控、故障分析和迭代调试
- 阶段3:生成会话报告(提供保存选项)
然后逐阶段执行。
Subsequent runs in the same session (fast path)
同一会话中的后续运行(快速路径)
When the session state file () exists and contains , the skill skips Phase 0 and Phase 1 setup discovery because connectivity and hardware were already verified. Instead, inform the user and jump directly to app selection:
/tmp/.claude_hsb_app_session/state.sh_SESSION_VERIFIED=trueSession already verified — skipping connectivity checks.
SSH target: $SSH_TARGET
Board: HSB Lattice | FPGA: XXXX
Platform: AGX Thor | HSB version: X.X.X
Sensors: Dual IMX274
Proceeding directly to application selection.Then execute:
- Phase 1 Steps 2–3 only (scan examples, present app list, user selects app)
- Phase 2: Run application
- Phase 3: Session report
当会话状态文件()存在且包含时,由于连接性和硬件已验证,技能将跳过阶段0和阶段1的设置发现步骤。相反,通知用户并直接跳转到应用选择环节:
/tmp/.claude_hsb_app_session/state.sh_SESSION_VERIFIED=true会话已验证 — 跳过连接性检查。
SSH目标:$SSH_TARGET
开发板:HSB Lattice | FPGA: XXXX
平台:AGX Thor | HSB版本:X.X.X
传感器:双IMX274
直接进入应用选择环节。然后执行:
- 仅阶段1的步骤2–3(扫描示例、展示应用列表、用户选择应用)
- 阶段2:运行应用
- 阶段3:会话报告
When to re-run Phase 0 from the beginning
何时重新从头运行阶段0
Phase 0 must be re-run (ignoring the fast path) when:
- New session: No session state file exists on the remote host, or a new Claude Code session is started.
- Execution failure suggesting connectivity loss: If Phase 2 fails with symptoms indicating the board or devkit is unreachable (ping failure, SSH timeout, container launch failure, errors), clear
No such devicefrom the session state and re-run Phase 0 before retrying._SESSION_VERIFIED - User explicitly requests it: If the user says "re-verify", "start over", "run from the beginning", or invokes , run Phase 0 from scratch.
/hsb-app --full
See ## Phase gate below for the full confirmation protocol.
If something fails, do not just dump raw logs. Summarize:
- the exact command that failed
- the likely root cause
- what safe action you recommend
- whether the issue is blocking
必须重新运行阶段0(忽略快速路径)的情况:
- 新会话:远程主机上不存在会话状态文件,或启动了新的Claude Code会话。
- 执行失败提示连接丢失:如果阶段2失败,且症状表明开发板或开发工具包无法访问(ping失败、SSH超时、容器启动失败、错误),请从会话状态中清除
No such device,并在重试前重新运行阶段0。_SESSION_VERIFIED - 用户明确要求:如果用户说“重新验证”、“从头开始”、“重新运行”或调用,则从头运行阶段0。
/hsb-app --full
有关完整的确认协议,请参见下方的## 阶段检查点。
如果发生故障,不要直接输出原始日志。请总结:
- 失败的具体命令
- 可能的根本原因
- 推荐的安全操作
- 问题是否具有阻塞性
Phase details
阶段详情
See references/phase-details.md for full step-by-step phase instructions.
有关完整的分步阶段说明,请参见references/phase-details.md。
Execution rules
执行规则
SSH heredoc pattern
SSH heredoc模式
Use the same persistent SSH session model as and . Each phase runs as a single SSH heredoc block:
hsb-setuphsb-flashbash
ssh -o BatchMode=yes $REMOTE_SSH_OPTS $SSH_TARGET bash -s <<'REMOTE'
set -e使用与和相同的持久SSH会话模型。每个阶段作为单个SSH heredoc块运行:
hsb-setuphsb-flashbash
ssh -o BatchMode=yes $REMOTE_SSH_OPTS $SSH_TARGET bash -s <<'REMOTE'
set -erestore state from previous phase
restore state from previous phase
source /tmp/.claude_hsb_app_session/state.sh 2>/dev/null || true
cd "${_CLAUDE_CWD:-REMOTE_ROOT}"
source /tmp/.claude_hsb_app_session/state.sh 2>/dev/null || true
cd "${_CLAUDE_CWD:-REMOTE_ROOT}"
phase commands
phase commands
echo "=== Phase N: description ==="
command1
command2
echo "=== Phase N: description ==="
command1
command2
save state for next phase (preserves _SESSION_VERIFIED if already set)
save state for next phase (preserves _SESSION_VERIFIED if already set)
_PREV_VERIFIED="${_SESSION_VERIFIED:-}"
mkdir -p /tmp/.claude_hsb_app_session
{
echo "export _CLAUDE_CWD="$(pwd)""
echo "export PATH="$PATH""
echo "export REPO_DIR="$REPO_DIR""
echo "export VERSION="$VERSION""
echo "export HSB_PLATFORM="$HSB_PLATFORM""
echo "export BOARD_TYPE="$BOARD_TYPE""
echo "export SENSORS="$SENSORS""
echo "export FPGA_VERSION="$FPGA_VERSION""
echo "export SELECTED_APP="$SELECTED_APP""
echo "export APP_OPTIONS="$APP_OPTIONS""
echo "export APP_TIMEOUT="$APP_TIMEOUT""
[ "$_PREV_VERIFIED" = "true" ] && echo "export _SESSION_VERIFIED=true"
} > /tmp/.claude_hsb_app_session/state.sh
REMOTE
Replace `__REMOTE_ROOT__` with the literal value of `$REMOTE_ROOT` when composing the heredoc._PREV_VERIFIED="${_SESSION_VERIFIED:-}"
mkdir -p /tmp/.claude_hsb_app_session
{
echo "export _CLAUDE_CWD="$(pwd)""
echo "export PATH="$PATH""
echo "export REPO_DIR="$REPO_DIR""
echo "export VERSION="$VERSION""
echo "export HSB_PLATFORM="$HSB_PLATFORM""
echo "export BOARD_TYPE="$BOARD_TYPE""
echo "export SENSORS="$SENSORS""
echo "export FPGA_VERSION="$FPGA_VERSION""
echo "export SELECTED_APP="$SELECTED_APP""
echo "export APP_OPTIONS="$APP_OPTIONS""
echo "export APP_TIMEOUT="$APP_TIMEOUT""
[ "$_PREV_VERIFIED" = "true" ] && echo "export _SESSION_VERIFIED=true"
} > /tmp/.claude_hsb_app_session/state.sh
REMOTE
在编写heredoc时,将`__REMOTE_ROOT__`替换为`$REMOTE_ROOT`的字面值。Container usage for applications
应用程序的容器使用方式
Application commands run inside the demo container. Use the detached pattern with a named container.
For apps with , use the watchdog pattern. For indefinite-run apps, stream logs and wait for the user to request a stop.
--timeout应用程序命令在演示容器内运行。使用带命名容器的分离模式。
对于带有参数的应用,使用看门狗模式。对于无限运行的应用,流式传输日志并等待用户请求停止。
--timeoutCleanup after app containers
应用容器的清理
After every app run, stop and remove the container. See references/phase-details.md for the cleanup pattern.
每次应用运行后,停止并移除容器。有关清理模式,请参见references/phase-details.md。
Session teardown
会话销毁
After Phase 3 (or on any failure that stops the workflow):
bash
docker ps --filter "name=hsb_app_" --format '{{.Names}}' | xargs -r docker stop -t 2 2>/dev/null || true
ssh -o BatchMode=yes $REMOTE_SSH_OPTS $SSH_TARGET "rm -rf /tmp/.claude_hsb_app_session"阶段3完成后(或任何导致工作流停止的故障发生时):
bash
docker ps --filter "name=hsb_app_" --format '{{.Names}}' | xargs -r docker stop -t 2 2>/dev/null || true
ssh -o BatchMode=yes $REMOTE_SSH_OPTS $SSH_TARGET "rm -rf /tmp/.claude_hsb_app_session"Phase gate — user confirmation between phases
阶段检查点 — 阶段间用户确认
After completing each phase (Phases 0–2), always prompt the user for confirmation before starting the next phase.
Exception: When (auto-approve mode) is active, phase gates are skipped. See "Auto-approve mode ()" section.
--y--yProceed to Phase <N+1> (<phase description>)? [Y/n]完成每个阶段(阶段0–2)后,必须提示用户确认后再开始下一阶段。
例外情况:当(自动批准模式)激活时,跳过阶段检查点。请参见“自动批准模式()”部分。
--y--y是否进入阶段<N+1>(<阶段描述>)?[Y/n]User response handling
用户响应处理
All prompts in this skill require explicit typed responses. Never treat a blank or Enter-only input as a selection — re-prompt the user instead.
- "y", "yes", "Y", "ok", "go", "continue", "next" → proceed to the next phase.
- "n", "no", "stop", "abort" → stop execution. Print:
Then run session teardown.
App workflow paused after Phase N. You can resume by re-invoking the skill. - Any other text → treat as a question or instruction about the current phase. Answer it, then re-prompt.
- "retry" → re-execute the current phase, show summary again, then re-prompt.
本技能中的所有提示都需要用户输入明确的响应。绝不能将空白或仅按Enter的输入视为选择 — 请重新提示用户。
- "y"、"yes"、"Y"、"ok"、"go"、"continue"、"next" → 进入下一阶段。
- "n"、"no"、"stop"、"abort" → 停止执行。输出:
然后执行会话销毁操作。
应用工作流在阶段N后暂停。 您可以通过重新调用此技能恢复执行。 - 任何其他文本 → 视为对当前阶段的问题或指令。回答后重新提示。
- "retry" → 重新执行当前阶段,再次展示总结,然后重新提示。
Exceptions
例外情况
- Phase 3 (session report) is the final phase — do not prompt after it unless the user wants to run another app. Show the report and offer to save.
- If a phase FAILs and cannot be recovered, stop and report clearly.
- 阶段3(会话报告)是最后一个阶段 — 除非用户想要运行另一个应用,否则无需提示。展示报告并提供保存选项。
- 如果某个阶段失败且无法恢复,停止并清晰报告。
Built-in help (--help
)
--help内置帮助(--help
)
--helpIf contains or , print the following and stop:
$ARGUMENTS--help-hHSB Application Runner Skill
USAGE
/hsb-app [OPTIONS]
OPTIONS
--help, -h Show this help message and exit
--verbose Show full raw command output for every phase
--y Auto-approve all phase gates (skip user confirmation
between phases). Not recommended — a confirmation
warning is shown before proceeding. All output is
saved to a timestamped log file.
--timeout N Set app runtime in seconds (default: no timeout,
app runs until user asks to stop)
--full Force full verification from Phase 0, even if the
session was already verified
ENVIRONMENT VARIABLES (set before invoking the skill)
SSH_TARGET Remote login target (e.g. ubuntu@10.0.0.1)
REMOTE_ROOT Remote working directory
REMOTE_SUDO Privilege escalation: 'sudo', 'sudo -n', or ''
REMOTE_SSH_OPTS Additional SSH options
HSB_PLATFORM Platform hint
HSB_REPO_DIR Repo directory name under REMOTE_ROOT (default: holoscan-sensor-bridge)
Example: HSB_REPO_DIR=hololink → repo at $REMOTE_ROOT/hololink
WORKFLOW PHASES
Phase 0 Verify board connectivity and demo container readiness
(skipped on repeat runs in the same session)
Phase 1 Discover user setup, scan examples, select application
(setup discovery skipped on repeat runs)
Phase 2 Run application with monitoring and iterative debugging
Phase 3 Generate and optionally save session report
EXAMPLES
/hsb-app
/hsb-app --verbose
/hsb-app --timeout 60
/hsb-app --timeout 30 --verbose
/hsb-app --y
/hsb-app --y --timeout 120
/hsb-app --full
/hsb-app --help如果包含或,则打印以下内容并停止:
$ARGUMENTS--help-hHSB 应用运行器技能
用法
/hsb-app [选项]
选项
--help, -h 显示此帮助信息并退出
--verbose 显示每个阶段的完整原始命令输出
--y 自动批准所有阶段检查点(跳过阶段间的用户确认
)。不推荐使用 — 执行前会显示确认警告。所有输出将保存到带时间戳的日志文件中。
--timeout N 设置应用运行时间(秒)(默认:无超时,
应用运行直到用户要求停止)
--full 强制从阶段0开始完整验证,即使会话已验证
环境变量(调用技能前设置)
SSH_TARGET 远程登录目标(例如 ubuntu@10.0.0.1)
REMOTE_ROOT 远程工作目录
REMOTE_SUDO 特权提升:'sudo'、'sudo -n' 或 ''
REMOTE_SSH_OPTS 额外的SSH选项
HSB_PLATFORM 平台提示
HSB_REPO_DIR REMOTE_ROOT下的代码库目录名称(默认:holoscan-sensor-bridge)
示例:HSB_REPO_DIR=hololink → 代码库位于 $REMOTE_ROOT/hololink
工作流阶段
阶段0 验证开发板连接性和演示容器就绪状态
(同一会话中的重复运行将跳过此阶段)
阶段1 发现用户设置、扫描示例、选择应用
(重复运行将跳过设置发现步骤)
阶段2 运行应用并进行监控和迭代调试
阶段3 生成并可选保存会话报告
示例
/hsb-app
/hsb-app --verbose
/hsb-app --timeout 60
/hsb-app --timeout 30 --verbose
/hsb-app --y
/hsb-app --y --timeout 120
/hsb-app --full
/hsb-app --helpInvocation examples
调用示例
/hsb-app/hsb-app --verbose/hsb-app --timeout 60/hsb-app --timeout 30 --verbose/hsb-app --y/hsb-app --y --timeout 120/hsb-app --full/hsb-app --full --verbose/hsb-app --help
/hsb-app/hsb-app --verbose/hsb-app --timeout 60/hsb-app --timeout 30 --verbose/hsb-app --y/hsb-app --y --timeout 120/hsb-app --full/hsb-app --full --verbose/hsb-app --help
Verbosity mode (--verbose
)
--verbose详细模式(--verbose
)
--verboseThe skill supports a flag:
--verbose本技能支持标志:
--verboseDetecting the flag
检测标志
Check whether (the text after the slash command) contains any of: / , , , , or (case-insensitive). Strip all flags (and their values) from arguments before further parsing.
$ARGUMENTS--help-h--verbose--y--timeout N--fullWhen is present, ignore any cached session state and run Phase 0 from scratch.
--full检查(斜杠命令后的文本)是否包含以下任一内容: / 、、、或(不区分大小写)。在进一步解析前,移除所有标志(及其值)。
$ARGUMENTS--help-h--verbose--y--timeout N--full当存在时,忽略任何缓存的会话状态,从头运行阶段0。
--fullVerbose mode (when set)
详细模式(已设置时)
- Show complete raw output of every SSH command
- Show full app output inline (all stdout/stderr)
- Show detailed phase status blocks
- 显示每个SSH命令的完整原始输出
- 内联显示完整的应用输出(所有stdout/stderr)
- 显示详细的阶段状态块
Concise mode (default, no --verbose
)
--verbose简洁模式(默认,未设置--verbose
)
--verbose- Show bullet-point summaries after each phase
- Suppress raw command output
- Show key app output lines (startup, errors, summary) but not every frame log
- Show issues with the 4-line format (Symptom, Cause, Resolution, Blocking)
- 每个阶段完成后显示项目符号总结
- 抑制原始命令输出
- 显示关键应用输出行(启动、错误、总结)但不显示每一帧日志
- 使用4行格式显示问题(症状、原因、解决方案、阻塞性)
Auto-approve mode (--y
)
--y自动批准模式(--y
)
--yThe skill supports a flag that skips all phase gates and runs the entire workflow from start to finish without waiting for user confirmation between phases. This is not recommended for normal use.
--y本技能支持标志,该标志跳过所有阶段检查点,无需等待用户在阶段间确认即可从头到尾运行整个工作流。不推荐在正常使用中启用此模式。
--yConfirmation warning
确认警告
When is detected, display a warning and ask the user to confirm:
--y⚠ WARNING: Auto-approve mode (--y) is enabled.
This is NOT RECOMMENDED. All phase gates will be skipped and the entire
workflow will run without pausing for your confirmation between phases.
You will not be able to review intermediate results, ask questions, or
abort between phases. All output will be saved to a timestamped log file.
NOTE: In auto-approve mode, the app selection in Phase 1 will still
require your input (you must choose which app to run), but the app will
run with default settings automatically. Debug iterations in Phase 2
will be skipped — the app runs once and the result is reported.
Type 'yes' to confirm auto-approve mode, or anything else to cancel:- If the user responds with "yes" (exact match, case-insensitive) → enable auto-approve mode.
- Any other response → cancel auto-approve mode and run interactively.
当检测到时,显示警告并要求用户确认:
--y⚠ 警告:已启用自动批准模式(--y)。
此模式**不推荐**使用。所有阶段检查点将被跳过,整个工作流将在阶段间不暂停等待您确认的情况下运行。
您将无法查看中间结果、提问或在阶段间中止。所有输出将保存到带时间戳的日志文件中。
注意:在自动批准模式下,阶段1中的应用选择仍需要您输入(您必须选择要运行的应用),但应用将使用默认设置自动运行。阶段2中的调试迭代将被跳过 — 应用运行一次后报告结果。
输入'yes'确认启用自动批准模式,输入其他内容则取消:- 如果用户回复**"yes"**(完全匹配,不区分大小写)→ 启用自动批准模式。
- 任何其他回复 → 取消自动批准模式并以交互方式运行。
Behavior when --y
is active
--y--y
激活时的行为
--y- Phase gates are skipped between phases.
- App selection still requires user input — the user must choose which app to run.
- Default app settings are used automatically — the "defaults vs. customize" prompt is skipped and the app runs with its default options.
- Timeout defaults to 30 seconds if no was specified on the command line (to avoid indefinite hangs).
--timeout - Debug iterations are skipped — if the app fails in Phase 2, the failure is logged but no interactive debugging is performed. The workflow proceeds directly to the report.
- Log file: Created at start as in
hsb-app-log-YYYY-MM-DD-HHMMSS.mdor current directory.$REMOTE_ROOT/ - Phase summaries are still shown in real time.
- Failures still stop the workflow if they are blocking.
- 跳过阶段检查点阶段间无需确认。
- 应用选择仍需用户输入 — 用户必须选择要运行的应用。
- 自动使用默认应用设置 — 跳过“默认值 vs 自定义”提示,应用使用默认选项运行。
- 如果命令行未指定,超时默认值为30秒(避免无限挂起)。
--timeout - 跳过调试迭代 — 如果阶段2中应用运行失败,将记录失败但不执行交互式调试。工作流直接进入报告环节。
- 日志文件:启动时在或当前目录创建
$REMOTE_ROOT/。hsb-app-log-YYYY-MM-DD-HHMMSS.md - 仍实时显示阶段总结。
- 如果故障具有阻塞性,仍会停止工作流。
Combining with other flags
与其他标志组合使用
- : Auto-approve with full raw output.
--y --verbose - : Auto-approve with a fixed app runtime.
--y --timeout N - alone: Auto-approve with concise output and no timeout (app runs for a default 30 seconds in auto-approve mode to avoid indefinite hangs).
--y
- :自动批准模式,显示完整原始输出。
--y --verbose - :自动批准模式,设置固定的应用运行时间。
--y --timeout N - 单独使用:自动批准模式,显示简洁输出,无超时(自动批准模式下应用默认运行30秒以避免无限挂起)。
--y
Timeout handling (--timeout
)
--timeout超时处理(--timeout
)
--timeoutThe skill supports a flag where N is the number of seconds to run the application.
--timeout N本技能支持标志,其中N是应用运行的秒数。
--timeout NDetecting the flag
检测标志
Match followed by a whitespace-separated integer in . Example: .
--timeout$ARGUMENTS--timeout 60在中匹配后跟一个空格分隔的整数。示例:。
$ARGUMENTS--timeout--timeout 60Behavior
行为
- When set: The app runs for exactly N seconds, then is stopped via . The output collected during that window is shown to the user.
docker stop - When not set (interactive mode): The app runs indefinitely until the user asks to stop. The user is informed how to request a stop.
- When not set (auto-approve mode): The app runs for a default of 30 seconds to prevent indefinite hangs.
- 已设置时:应用恰好运行N秒,然后通过停止。向用户显示该时间段内收集的输出。
docker stop - 未设置时(交互模式):应用无限期运行,直到用户要求停止。告知用户如何请求停止。
- 未设置时(自动批准模式):应用默认运行30秒以防止无限挂起。
Validation
验证
- N must be a positive integer
- Minimum: 5 seconds
- Maximum: 3600 seconds (1 hour)
- If invalid, show an error and ask the user to provide a valid timeout
- N必须为正整数
- 最小值:5秒
- 最大值:3600秒(1小时)
- 如果无效,显示错误并要求用户提供有效的超时时间