Commit Graph

18 Commits

Author SHA1 Message Date
Codex Agent a9f81677e7 fix(v02): preserve device-pod rg patterns on Windows 2026-06-04 16:58:00 +08:00
Codex Agent baa7289ca0 fix(v02): widen device-pod job output visibility 2026-06-04 16:16:56 +08:00
Lyon 9928954ea6 feat: add device-pod build verify (#827)
Co-authored-by: Codex Agent <codex@hwlab.local>
2026-06-04 16:11:00 +08:00
Codex Agent 37f1b6af22 fix: support device-pod filename rg 2026-06-04 15:56:08 +08:00
Codex bcec7e6934 feat(device-pod-cli): v0.2 hwpod prefers HWLAB_API_KEY over legacy key
- authHeaders now reads HWLAB_API_KEY (env or --apiKey/--bearerToken) first; only when hwl_live_ prefix is present
- when both are set, HWLAB_API_KEY wins and x-hwlab-device-pod-api-key is suppressed
- new test asserts the precedence using a fake API key against a local http server
- help auth hint updated to mention the preferred credential
2026-06-04 15:01:30 +08:00
Codex Agent bc059fa49d fix(tools): v0.2 device-pod-cli maps build/download evidence to first-class workspace.evidence/debug.evidence (HWLAB #801)
The CLI was emitting workspace.build/debug.download with action=evidence
for "<pod>:workspace build evidence <jobId>" and "<pod>:debug-probe
download evidence <jobId>". Cloud-api accepted the sub-action form, but
the device-pod executor mapped it to device-host-cli argv as
"workspace build evidence" / "debug-probe download evidence" -- neither
of which exists in the host CLI dispatcher; the host returned
"unsupported command: --profile-json-b64 ..." and the evidence job was
marked failed with blocker.code gateway_dispatch_failed.

Per docs/reference/g14.md (v0.2 device-pod cloud-api architecture),
"The evidence sub-action on workspace.evidence / debug.evidence is a
first-class intent, not a workspace.build sub-action." The executor's
deviceHostArgs already produces the correct argv for the first-class
intent, so the fix lives in the CLI selector parser: when
operation === "build" and rest[1] === "evidence", emit
intent=workspace.evidence with kind=build and the explicit jobId; the
same shape for operation === "download" -> debug.evidence with
kind=download. Non-evidence sub-actions (start, status, wait, output,
cancel) are unchanged.

Live verification on G14 against http://74.48.78.17:19667 (D601-F103-V2,
profileHash sha256:0352cd14...):
  - before: device-host-cli argv = "workspace build evidence"
            -> gateway_dispatch_failed
  - after:  device-host-cli argv = "workspace evidence build <jobId> ..."
            accepted by cloud-api with status=running, blocker=null
  - the executor argv proves the fix; the D601 Windows host
    F:\Work\ConStart\tools\device-host-cli.mjs is still a stale
    D601 ops-side copy and is tracked separately in #779 (out of scope
    for #801).

Adds:
  - device-pod-cli.test.ts: evidence sub-action -> first-class intent
  - device-pod-cli.test.ts: build start / download start regression
    (non-evidence sub-actions keep workspace.build / debug.download)

Out of scope: COM9 -> COM3 UART port drift on the Windows device pod
host (separate issue from #801; no UART/profile port code touched).
2026-06-04 10:36:11 +08:00
Codex Device-Pod Agent 5c35f8349e fix(device-pod-cli): add selector cheat sheet and fail-fast hints
Address the friction in #760 where Code Agent picked <pod>:workspace:/ keil
download/flash and <pod>:debug-probe flash for firmware flashing, all of
which are not SOP. Add to SKILL.md:

- Selector Cheat Sheet: explicit per-surface allowed operations table
- Common selector mistakes table: wrong selector -> error you would hit
  -> correct selector
- Pitfalls Observed in Real Runs: --reason required for build/download
  even on read-only sub-actions, cloud-api job output is empty for
  build/download, workspace rg --pattern shell-pipe collision

In tools/src/device-pod-cli-lib.ts:
- workspace.keil now fail-fasts on any action that is not add-source or
  remove-source, with code unsupported_workspace_keil_action and a
  selector hint pointing to debug-probe download start
- debug-probe flash now has a dedicated error code path with the same
  selector hint instead of the generic unsupported_debug_operation
- catch-all debug-probe error message now includes the allowed list
- help() payload exposes a selectorCheatSheet array so hwpod --help
  callers see the SOP table without reading the SKILL.md file

Tests in tools/device-pod-cli.test.ts: 6 new cases lock in the new
error codes, the selector cheat sheet, and that add-source still
dispatches correctly. 26/26 pass.
2026-06-03 16:59:27 +08:00
Codex bf7a8bfd49 fix: align hwpod lease guidance 2026-06-02 21:30:33 +08:00
Codex 7f97b41404 fix: route hwpod through cloud-api 2026-06-02 18:48:56 +08:00
Codex bacfa24289 fix: replace device pod lease with api key 2026-06-02 18:11:32 +08:00
Codex 10af8aaf76 fix: restore devicepod cli auth and output evidence 2026-06-02 14:53:41 +08:00
Codex 399af47ee8 fix: assemble device pod runtime endpoint 2026-06-02 07:44:24 +08:00
Codex 153aabf534 fix: compact device pod job output for code agent 2026-05-31 20:14:01 +08:00
Codex 72535cb32c fix: 收敛 device-pod DS 验收 CLI 摩擦 2026-05-31 20:03:43 +08:00
Codex 028308e4bd feat: 接入 D601 F103 v2 device-pod 2026-05-31 18:39:30 +08:00
Codex 5bf4bf0f47 feat: sync g14 harness and device-pod cli 2026-05-31 05:07:16 +08:00
Codex 4e7d837123 feat: seed device pods during v02 setup 2026-05-29 14:17:44 +08:00
Codex f740fc9dbc feat: migrate device pod cli to rest authority 2026-05-29 11:30:17 +08:00