fix(cli): add missing Type field, Config, Capabilities, and Tools panels to actor add rich output
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 20s
CI / lint (pull_request) Failing after 22s
CI / helm (pull_request) Successful in 26s
CI / quality (pull_request) Successful in 46s
CI / typecheck (pull_request) Failing after 48s
CI / coverage (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Has been skipped
CI / security (pull_request) Failing after 54s
CI / unit_tests (pull_request) Failing after 1m49s
CI / docker (pull_request) Has been skipped
CI / e2e_tests (pull_request) Failing after 15m13s
CI / integration_tests (pull_request) Failing after 21m3s
CI / status-check (pull_request) Failing after 1s

Extended `_print_actor()` to render the full spec-required output for
`agents actor add`: the Actor Added panel now includes a Type field, and
three additional panels (Config, Capabilities, Tools) plus a success
status line are rendered when `show_add_panels=True`.

- Add `Type:` field to the Actor Added panel (from `config_blob["type"]`)
- Implement Config panel: Path, Hash, Options count, Nodes count, Edges count
- Implement Capabilities panel: bulleted list (rendered only when non-empty)
- Implement Tools panel: Rich table with Tool, Read-Only, Safe columns
  (rendered only when non-empty; string tool entries default to yes/yes)
- Add `✓ OK Actor added` success status line after all panels
- Pass `config_path` and `show_add_panels=True` from `add()` command
- Add Behave BDD scenarios covering each new panel and the success line
- Add Robot Framework integration test verifying the full rich output

ISSUES CLOSED: #1499
This commit is contained in:
2026-04-03 00:23:58 +00:00
parent 074c472e36
commit d430d671a0
5 changed files with 637 additions and 8 deletions
+49
View File
@@ -0,0 +1,49 @@
*** Settings ***
Documentation Integration tests for actor add rich output panels
Resource ${CURDIR}/common.resource
Suite Setup Setup Test Environment
Suite Teardown Cleanup Test Environment
*** Variables ***
${HELPER} ${CURDIR}/helper_actor_add_rich_output.py
*** Test Cases ***
Actor Add Rich Output Contains Type Field
[Documentation] Verify that ``actor add`` rich output includes the Type field
${result}= Run Process ${PYTHON} ${HELPER} add-type-field cwd=${WORKSPACE}
Log ${result.stdout}
Log ${result.stderr}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} actor-add-type-field-ok
Actor Add Rich Output Contains Config Panel
[Documentation] Verify that ``actor add`` rich output includes the Config panel
${result}= Run Process ${PYTHON} ${HELPER} add-config-panel cwd=${WORKSPACE}
Log ${result.stdout}
Log ${result.stderr}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} actor-add-config-panel-ok
Actor Add Rich Output Contains Capabilities Panel
[Documentation] Verify that ``actor add`` rich output includes the Capabilities panel
${result}= Run Process ${PYTHON} ${HELPER} add-capabilities-panel cwd=${WORKSPACE}
Log ${result.stdout}
Log ${result.stderr}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} actor-add-capabilities-panel-ok
Actor Add Rich Output Contains Tools Panel
[Documentation] Verify that ``actor add`` rich output includes the Tools panel
${result}= Run Process ${PYTHON} ${HELPER} add-tools-panel cwd=${WORKSPACE}
Log ${result.stdout}
Log ${result.stderr}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} actor-add-tools-panel-ok
Actor Add Rich Output Contains Success Line
[Documentation] Verify that ``actor add`` rich output ends with the success status line
${result}= Run Process ${PYTHON} ${HELPER} add-success-line cwd=${WORKSPACE}
Log ${result.stdout}
Log ${result.stderr}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} actor-add-success-line-ok