Commit Graph

56 Commits

Author SHA1 Message Date
root 479c0f0937 feat: bridge AgentRun Kafka events to HWLAB stream 2026-07-09 19:59:32 +02:00
Codex Agent 225269b5ad fix: resolve hwpod by id for caserun agents 2026-06-08 12:51:42 +08:00
Codex Agent 6b175ea28a fix: remove direct helper workspaceFiles injection 2026-06-08 12:19:31 +08:00
Codex Agent e86cf0b271 docs: update code agent gitbundle skill reference 2026-06-08 12:00:51 +08:00
Codex Agent 1160089d3b fix: make hwpod workspace search node-native 2026-06-08 11:29:37 +08:00
Codex Agent c0b3939624 docs: document code agent profile inheritance 2026-06-08 10:37:56 +08:00
Codex Agent 6d1b1fd7ea code-agent: inherit child profile via env 2026-06-08 08:18:13 +08:00
Codex Agent 4c3a8951f6 feat: hwlab-code-agent tool and skill for agent scheduling
- tools/hwlab-code-agent-cli.ts: thin wrapper importing from skills/
- skills/hwlab-code-agent/: SKILL.md, config.json, scripts/src/client.ts
- toolAliases: hwlab-code-agent (spawn/poll/result/trace)
- skillRefs: hwlab-code-agent SKILL.md
- hwpod spec auto-inheritance: --spec-path, CWD .hwlab/, HWPOD_SPEC_CONTENT
- Leader agent can spawn Coder/Reviewer with inherited hwpod spec
2026-06-07 18:11:43 +08:00
Codex Agent 7b5dd408fc fix: align hwpod apply-patch with v2 engine 2026-06-07 15:00:26 +08:00
Codex Agent 712db9c597 feat: arm2d-skill directory seed for CaseRun agent workspace
Add B1 directory-type seed mechanism to AGENT_WORKSPACE_SEED_FILES:
- Extended agentWorkspaceFilesForRun with collectDirectorySeedFiles helper
- arm2d-skill (SKILL.md + references/ + python/) auto-injected to .agents/skills/arm2d-skill/
- Enables Code Agent to follow ARM-2D constraints and call asset scripts in case

Skill source: https://github.com/notLabyet/HWLabOA
2026-06-07 14:40:48 +08:00
Codex Agent 53aafde5bd fix: clarify caserun hwpod job polling 2026-06-06 23:50:53 +08:00
Codex Agent 1d5c3d422d fix: seed caserun hwpod tools 2026-06-06 23:08:19 +08:00
Codex Agent 3e7131f6ab refactor: converge hwpod node-ops channel 2026-06-05 17:23:56 +08:00
Codex Agent a9f81677e7 fix(v02): preserve device-pod rg patterns on Windows 2026-06-04 16:58:00 +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 d9d283c314 fix(v0.2): move workspace/debug-probe evidence handler to top-level command in device-host-cli for #773
Live CLI verification at 74.48.78.17:19667 showed that
workspace.evidence dispatched correctly through cloud-api and
the executor (executor returned text with the actual error),
but the device-host-cli threw unsupported command because
the new evidence subcommand was nested under command=build
instead of being its own top-level command.

The args shape for workspace.evidence from deviceHostArgs is
[workspace, evidence, kind, ...options], so the main() match
in device-host-cli should hit
at the workspace group level, not
under . Same fix for debug-probe.

After the move, readJobEvidence is dispatched with the right
kindPrefix (keil-build for workspace.evidence kind=build,
keil-download for debug-probe.evidence kind=download) and
the optional jobId from rest[1]. Tail defaults to 200 lines,
--full for the entire log.

Tracked-by: pikasTech/HWLAB#773
2026-06-03 21:57:53 +08:00
Codex eb5bada0d1 fix(v0.2): device-pod output.text evidence read-only selectors for #773
Tracks pikasTech/HWLAB#773. PR #765 fixed selector confusion but did
not touch cloud-api evidence propagation. This change closes the
real root cause and adds the read-only evidence selectors that #760
follow-up called for.

cloud-api (internal/cloud/access-control.ts):
- DEVICE_JOB_INTENTS adds workspace.evidence and debug.evidence.
- DEVICE_JOB_READ_ONLY_SUB_ACTIONS = { status, output, wait, cancel,
  evidence } and DEVICE_JOB_ACTIONABLE_INTENTS = { workspace.build,
  debug.download } make the mutating-intent / sub-action matrix
  explicit.
- _deviceJobRequiresReason(intent, args, reason) returns false when
  the caller already provided reason OR when the actionable mutating
  intent is paired with a read-only sub-action. debug.reset and other
  non-actionable mutating intents still always require reason.
- executorOutputPayload now also surfaces output.summary,
  nestedOutput.summary, evidence.text, evidence.logTail and
  evidence.summary as body.output.text, so a dispatcher that
  includes the host logTail / buildSummary in its result becomes
  visible to the Code Agent without a separate bootsharp dance.

device-pod executor (cmd/hwlab-device-pod/main.ts):
- gatewayDispatchText also walks result.evidence.{text,logTail,
  summary}, dispatch.message (only when dispatchStatus=completed),
  dispatch.summary, result.summary and dispatch.buildSummary before
  falling back to JSON.stringify.
- deviceHostArgs maps workspace.evidence / debug.evidence to the
  host device-host-cli evidence subcommands.

device-host-cli (skills/device-pod-cli/assets/device-host-cli.mjs):
- new readJobEvidence(kindPrefix, requestedId, { tail, full,
  target }) reads the most recent (or specified) keil-build /
  keil-download job log file and returns it as keil-build.evidence /
  keil-download.evidence. tail defaults to 200, --full for entire
  log. Missing job returns ok=false but does not throw.
- workspace build evidence and debug-probe download evidence now
  wired in main() and help text.

device-pod-cli (tools/src/device-pod-cli-lib.ts):
- selectorCheatSheet adds the evidence row and clarifies that
  build/download status/output/wait/cancel/evidence are read-only
  and do NOT need --reason. build/download start still require
  --reason. usage examples now include the two evidence selectors.
- failed-fast selectors are unchanged; existing 26 tests still pass.

SKILL.md (skills/device-pod-cli/SKILL.md):
- Selector Cheat Sheet adds workspace.evidence and
  debug.evidence rows.
- #773 follow-up note: --reason is now required only for
  mutating sub-actions, not for the read-only ones.

cloud-api tests (internal/cloud/access-control.test.ts):
- workspace.evidence and debug.evidence must be in DEVICE_JOB_INTENTS.
- _deviceJobRequiresReason signature and the read-only / actionable
  branch table.
- executorOutputPayload must look at evidence and summary fields
  in addition to text. 3 new tests; pre-existing 4 workbench
  failures are unrelated to this change and reproduce on the
  unchanged v0.2 base.

Verification (host-side, G14 /root/hwlab-v02, source=0cf9a8c6):
- bun test tools/device-pod-cli.test.ts → 26/26 pass.
- bun test internal/cloud/access-control.test.ts → 23 pass,
  4 pre-existing workbench failures (unchanged on v0.2 base).
- bun test cmd/hwlab-device-pod/main.test.ts → 7/7 pass.
- node --check skills/device-pod-cli/assets/device-host-cli.mjs
  → syntax OK.

Hot probe: live v0.2 cloud-api at 74.48.78.17:19667 confirmed
job_devicepod_804c5db4... (workspace.build) returned
text="", bytes=0, output={} before this change. After the
executor text-extraction update and the new evidence selector,
a follow-up workspace.build start + build evidence will surface
the host logTail / buildSummary in body.output.text without
requiring bootsharp + host file fallback.

Tracked-by: pikasTech/HWLAB#773
2026-06-03 21:57:39 +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 58df53bce5 feat: assemble AgentRun prompts and skills 2026-06-02 20:56:36 +08:00
Codex 08fec46af9 fix: auto-detect devicepod uart ports 2026-06-02 15:27:31 +08:00
Codex 399af47ee8 fix: assemble device pod runtime endpoint 2026-06-02 07:44:24 +08:00
Codex 72535cb32c fix: 收敛 device-pod DS 验收 CLI 摩擦 2026-05-31 20:03:43 +08:00
Codex ca714bfa27 fix: 优化 device-pod CLI 短入口 2026-05-31 19:16:17 +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 6c78f34158 fix: make device pod host cli launch windows safe 2026-05-29 15:58:55 +08:00
Codex f740fc9dbc feat: migrate device pod cli to rest authority 2026-05-29 11:30:17 +08:00
Codex 03c09f5c94 refactor: migrate v0.2 runtime services to TypeScript 2026-05-29 02:09:35 +08:00
Codex 067ccf6b7e fix: improve device pod trace diagnostics 2026-05-28 12:22:34 +08:00
Codex f72905243e Improve code agent trace inspection tooling 2026-05-28 11:28:58 +08:00
Codex 8a25691b82 fix: reject spaced io probe selectors 2026-05-28 10:18:36 +08:00
Codex 904649533b fix: reduce device pod cli runner friction 2026-05-28 09:48:06 +08:00
Codex 7288f39031 fix: bootstrap device pod profiles from canonical skill 2026-05-28 08:45:02 +08:00
Codex 7accdd4568 fix: persist and select device-pod profiles 2026-05-28 02:31:54 +08:00
Codex cafcc2cb21 fix: default tran to in-cluster cloud api 2026-05-28 00:23:19 +08:00
Codex c42131afaa fix: tune gateway tran upload chunks 2026-05-28 00:06:36 +08:00
Codex 078ca04941 fix: support device-pod flash-vector launch 2026-05-27 23:24:14 +08:00
Codex f53f9d1850 feat: preinstall device pod cli skill 2026-05-27 22:06:37 +08:00
Codex d02b7cd8a6 fix: persist code agent workspace 2026-05-27 13:26:12 +08:00
Codex 4812beca81 test: align ci contracts with current runtime blockers 2026-05-26 03:16:18 +08:00
lyon 9e584be848 fix: remove obsolete code agent gates 2026-05-25 22:10:07 +08:00
lyon 8b2c569ec4 fix: remove code agent routing gates 2026-05-25 20:55:33 +08:00
Code Queue Review ac4b0f2975 fix: 识别 Code Agent M3 IO 闭环拓扑意图 2026-05-24 03:21:45 +00:00
Code Queue Review fc7ff9b022 feat: route code agent m3 io through hwlab api skill cli 2026-05-23 18:41:34 +00:00
unidesk-code-queue-runner 9974c259e3 test: guard M3 IO Code Agent contract 2026-05-23 16:11:37 +00:00
Code Queue Review 903a733b2e test: cover Code Agent slow timeout paths 2026-05-23 15:36:58 +00:00
unidesk-code-queue-runner 9296c28bff feat: expose M3 Code Agent route evidence 2026-05-23 15:26:15 +00:00
Lyon 997b96dc65 fix: add structured Code Agent blockers
Add structured Code Agent blocker taxonomy across /v1/agent/chat, runner/session/tool, and HWLAB M3 Skill CLI paths.\n\nValidated with npm run check and focused server/session/Skill CLI/web tests.
2026-05-23 23:17:13 +08:00