feat: assemble AgentRun prompts and skills
This commit is contained in:
@@ -8,16 +8,16 @@ version: 0.2.0-rest
|
||||
|
||||
Skill(cli-spec)
|
||||
|
||||
Scope: this skill is only for HWLAB-internal code agent runners inside the HWLAB runtime, such as `/workspace/hwlab` sessions running from the G14 DEV, PROD, or v0.2 images. It does not apply to external UniDesk developer workspaces or third-party machines.
|
||||
Scope: this skill is only for HWLAB-internal code agent runners assembled from a HWLAB `ResourceBundleRef`, such as AgentRun v0.1 jobs for the G14 DEV, PROD, or v0.2 lanes. It does not apply to external UniDesk developer workspaces or third-party machines.
|
||||
|
||||
Use this skill when the task mentions `device-pod-cli`, `device-pod`, `device-host-cli`, Keil build/download through a Device Pod, debug probe control, workspace operations, or I/O probe reads such as UART boot logs.
|
||||
|
||||
Canonical skill location: `/app/skills/device-pod-cli/SKILL.md`. Do not create duplicate skill copies under `/root/.agents/skills`, `/home/ubuntu/.agents/skills`, or `/workspace/hwlab/skills`; those locations cause stale instructions.
|
||||
Canonical AgentRun skill location: `.agents/skills/device-pod-cli/SKILL.md` inside the current materialized workspace. The source manifest is `skills/device-pod-cli/SKILL.md` in the same Git commit as the run. Do not use `/app/skills`, `/root/.agents/skills`, `/home/ubuntu/.agents/skills`, ConfigMaps, host paths, or copied workspace skill directories as substitutes; those locations cause stale instructions.
|
||||
|
||||
## Runtime Contract
|
||||
|
||||
- The stable runner entrypoint is `hwpod`. Use `node /app/skills/device-pod-cli/scripts/device-pod-cli.mjs` only as a compatibility fallback when `hwpod` is missing from PATH, and report that as a runner image/package friction point.
|
||||
- The canonical implementation is `/app/tools/device-pod-cli.ts`; `hwpod`, `/app/tools/device-pod-cli.mjs`, and the skill script are wrappers that launch the Bun+TypeScript CLI.
|
||||
- The stable runner entrypoint is `hwpod`. If `hwpod` is missing from PATH, report `hwpod_unavailable` as a runner assembly blocker; do not switch to `/app/skills`, generic shell, or an old diagnostic image.
|
||||
- The canonical implementation is `tools/device-pod-cli.mjs` from the same ResourceBundleRef commit, exposed through the `hwpod` tool alias.
|
||||
- All commands emit JSON. A command with no output is a failure.
|
||||
- Formal v0.2 mode is cloud-api authority: the CLI calls `/v1/device-pods...` REST APIs and must not read `.device-pod/*.json` as the source of truth for gateway session, workspace root, probe UID, UART port, or host CLI.
|
||||
- Server-side profile, grant, lease, job authority, and profile hash are owned by `hwlab-cloud-api`; `hwlab-device-pod` and `device-host-cli` execute only after cloud-api authorization.
|
||||
@@ -177,24 +177,24 @@ Do not upload or recreate runner-side `.device-pod/*.json` as the formal profile
|
||||
|
||||
## T1
|
||||
|
||||
阅读 `/app/skills/device-pod-cli/SKILL.md`,然后用 cli 手动测试以下内容:在未设置 `HWLAB_RUNTIME_*` / `HWLAB_DEVICE_POD_*` 装配环境时运行 `profile list`,确认输出 JSON 且错误码为 `runtime_endpoint_required`,没有静默 fallback 到旧 DEV 入口。
|
||||
阅读 `.agents/skills/device-pod-cli/SKILL.md`,然后用 cli 手动测试以下内容:在未设置 `HWLAB_RUNTIME_*` / `HWLAB_DEVICE_POD_*` 装配环境时运行 `profile list`,确认输出 JSON 且错误码为 `runtime_endpoint_required`,没有静默 fallback 到旧 DEV 入口。
|
||||
|
||||
## T2
|
||||
|
||||
阅读 `/app/skills/device-pod-cli/SKILL.md`,然后用 cli 手动测试以下内容:在 WEB / AgentRun 已装配 `HWLAB_RUNTIME_API_URL`、`HWLAB_RUNTIME_NAMESPACE`、`HWLAB_RUNTIME_LANE`、`HWLAB_RUNTIME_ENDPOINT_LOCKED=1` 和 `HWLAB_DEVICE_POD_SESSION_TOKEN` 的真实 runner 中运行 `profile list`、`profile show --pod-id <devicePodId>`、`doctor --pod-id <devicePodId>`,确认 CLI 自动定位当前 runtime,输出来自 cloud-api authority,并且没有泄露 `gatewaySessionId`、`hostWorkspaceRoot`、probe UID 或 UART port。
|
||||
阅读 `.agents/skills/device-pod-cli/SKILL.md`,然后用 cli 手动测试以下内容:在 WEB / AgentRun 已装配 `HWLAB_RUNTIME_API_URL`、`HWLAB_RUNTIME_NAMESPACE`、`HWLAB_RUNTIME_LANE`、`HWLAB_RUNTIME_ENDPOINT_LOCKED=1` 和 `HWLAB_DEVICE_POD_SESSION_TOKEN` 的真实 runner 中运行 `profile list`、`profile show --pod-id <devicePodId>`、`doctor --pod-id <devicePodId>`,确认 CLI 自动定位当前 runtime,输出来自 cloud-api authority,并且没有泄露 `gatewaySessionId`、`hostWorkspaceRoot`、probe UID 或 UART port。
|
||||
|
||||
## T3
|
||||
|
||||
阅读 `/app/skills/device-pod-cli/SKILL.md`,然后用 cli 手动测试以下内容:创建本地 `.device-pod/<devicePodId>.json`,写入假的 `gatewaySessionId`,再运行 `profile list` 和 selector `--dry-run`;确认 JSON 输出标记 `localProfileAuthority=false` 且没有读取本地 fake route。
|
||||
阅读 `.agents/skills/device-pod-cli/SKILL.md`,然后用 cli 手动测试以下内容:创建本地 `.device-pod/<devicePodId>.json`,写入假的 `gatewaySessionId`,再运行 `profile list` 和 selector `--dry-run`;确认 JSON 输出标记 `localProfileAuthority=false` 且没有读取本地 fake route。
|
||||
|
||||
## T4
|
||||
|
||||
阅读 `/app/skills/device-pod-cli/SKILL.md`,然后用 cli 手动测试以下内容:运行 `profile create --pod-id <devicePodId>`,确认返回 `legacy_profile_create_removed`,并提示使用 cloud-api admin API 管理服务端 profile/grant。
|
||||
阅读 `.agents/skills/device-pod-cli/SKILL.md`,然后用 cli 手动测试以下内容:运行 `profile create --pod-id <devicePodId>`,确认返回 `legacy_profile_create_removed`,并提示使用 cloud-api admin API 管理服务端 profile/grant。
|
||||
|
||||
## T5
|
||||
|
||||
阅读 `/app/skills/device-pod-cli/SKILL.md`,然后用 cli 手动测试以下内容:运行 `workspace put/rm/rmdir/keil` 和 `io-probe jsonrpc` 的 `--dry-run`,确认 JSON plan 中 intent 分别为 `workspace.put`、`workspace.rm`、`workspace.rmdir`、`workspace.keil`、`io.uart.jsonrpc`,且 `contentB64`、`text`、`patch` 不以原文泄露。
|
||||
阅读 `.agents/skills/device-pod-cli/SKILL.md`,然后用 cli 手动测试以下内容:运行 `workspace put/rm/rmdir/keil` 和 `io-probe jsonrpc` 的 `--dry-run`,确认 JSON plan 中 intent 分别为 `workspace.put`、`workspace.rm`、`workspace.rmdir`、`workspace.keil`、`io.uart.jsonrpc`,且 `contentB64`、`text`、`patch` 不以原文泄露。
|
||||
|
||||
## T6
|
||||
|
||||
阅读 `/app/skills/device-pod-cli/SKILL.md`,然后用 cli 手动测试以下内容:在 `HWLAB_RUNTIME_ENDPOINT_LOCKED=1` 的真实 runner 中额外传入 `--api-base-url`、`--api-url`、`--cloud-api-url` 或 `--base-url`,确认返回 `runtime_endpoint_manual_url_forbidden`,从而证明 DS、旧 trace 或人工命令不能覆盖 WEB / AgentRun 装配的当前集群路径。
|
||||
阅读 `.agents/skills/device-pod-cli/SKILL.md`,然后用 cli 手动测试以下内容:在 `HWLAB_RUNTIME_ENDPOINT_LOCKED=1` 的真实 runner 中额外传入 `--api-base-url`、`--api-url`、`--cloud-api-url` 或 `--base-url`,确认返回 `runtime_endpoint_manual_url_forbidden`,从而证明 DS、旧 trace 或人工命令不能覆盖 WEB / AgentRun 装配的当前集群路径。
|
||||
|
||||
Reference in New Issue
Block a user