UAT: agents version --format json data schema is flat instead of spec-required nested cli/build/dependencies structure #6801

Open
opened 2026-04-10 02:07:31 +00:00 by HAL9000 · 0 comments
Owner

Background and Context

The specification defines the exact JSON schema for agents version output. The data object must be structured with three nested sub-objects: cli, build, and dependencies. The current implementation returns a flat structure that does not match the spec schema.

Current Behavior

{
  "command": "",
  "status": "ok",
  "exit_code": 0,
  "data": {
    "version": "1.0.0",
    "channel": "stable",
    "python": "3.13.3",
    "build_date": "2026-04-10",
    "commit": "8109091b",
    "schema": "v3",
    "platform": "linux-x86_64",
    "dependencies": {
      "langgraph": "1.1.6",
      "langchain-core": "1.2.28",
      "pydantic": "2.12.5",
      "typer": "0.23.1"
    }
  },
  ...
}

All version, channel, python fields are flat at the data top level rather than nested under cli. Build fields (build_date, commit, schema, platform) are also flat.

Expected Behavior (from spec)

The spec defines the following nested structure:

{
  "command": "version",
  "status": "ok",
  "exit_code": 0,
  "data": {
    "cli": {
      "name": "CleverAgents CLI",
      "version": "1.0.0",
      "channel": "stable",
      "python": "3.13"
    },
    "build": {
      "build_date": "2026-02-08",
      "commit": "a17c3f9",
      "schema": "v3",
      "platform": "linux-x86_64"
    },
    "dependencies": {
      "langgraph": "0.2.60",
      "langchain": "0.3.18",
      "mcp_sdk": "1.4.0",
      "pydantic": "2.10.4"
    }
  },
  "timing": { "duration_ms": 8 },
  "messages": [{ "level": "ok", "text": "Version reported" }]
}

Key differences:

  • data.cli.name ("CleverAgents CLI") is missing entirely
  • data.cli.version, data.cli.channel, data.cli.python must be nested under cli sub-object
  • data.build.build_date, data.build.commit, data.build.schema, data.build.platform must be nested under build sub-object
  • Dependencies key uses mcp_sdk (not present in current output at all) and langchain (not langchain-core)

Steps to Reproduce

agents --format json version
agents --format yaml version

Observe: data is flat instead of having cli, build, dependencies nested sub-objects.

Code Analysis

In src/cleveragents/cli/commands/system.py, the build_version_data() function (line 86) assembles a flat dict. The spec requires a nested structure with cli, build, and dependencies sub-objects.

Acceptance Criteria

  • data.cli sub-object contains: name ("CleverAgents CLI"), version, channel, python
  • data.build sub-object contains: build_date, commit, schema, platform
  • data.dependencies sub-object contains spec-required keys (including mcp_sdk)
  • YAML format produces the equivalent nested structure
  • The spec's exact JSON schema is reproduced

Supporting Information

  • Spec reference: docs/specification.mdagents version → JSON example
  • Code location: src/cleveragents/cli/commands/system.py, function build_version_data()
  • Runtime confirmed: agents --format json version produces flat data structure

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: uat-tester

## Background and Context The specification defines the exact JSON schema for `agents version` output. The `data` object must be structured with three nested sub-objects: `cli`, `build`, and `dependencies`. The current implementation returns a flat structure that does not match the spec schema. ## Current Behavior ```json { "command": "", "status": "ok", "exit_code": 0, "data": { "version": "1.0.0", "channel": "stable", "python": "3.13.3", "build_date": "2026-04-10", "commit": "8109091b", "schema": "v3", "platform": "linux-x86_64", "dependencies": { "langgraph": "1.1.6", "langchain-core": "1.2.28", "pydantic": "2.12.5", "typer": "0.23.1" } }, ... } ``` All version, channel, python fields are flat at the `data` top level rather than nested under `cli`. Build fields (build_date, commit, schema, platform) are also flat. ## Expected Behavior (from spec) The spec defines the following nested structure: ```json { "command": "version", "status": "ok", "exit_code": 0, "data": { "cli": { "name": "CleverAgents CLI", "version": "1.0.0", "channel": "stable", "python": "3.13" }, "build": { "build_date": "2026-02-08", "commit": "a17c3f9", "schema": "v3", "platform": "linux-x86_64" }, "dependencies": { "langgraph": "0.2.60", "langchain": "0.3.18", "mcp_sdk": "1.4.0", "pydantic": "2.10.4" } }, "timing": { "duration_ms": 8 }, "messages": [{ "level": "ok", "text": "Version reported" }] } ``` Key differences: - `data.cli.name` ("CleverAgents CLI") is missing entirely - `data.cli.version`, `data.cli.channel`, `data.cli.python` must be nested under `cli` sub-object - `data.build.build_date`, `data.build.commit`, `data.build.schema`, `data.build.platform` must be nested under `build` sub-object - Dependencies key uses `mcp_sdk` (not present in current output at all) and `langchain` (not `langchain-core`) ## Steps to Reproduce ```bash agents --format json version agents --format yaml version ``` Observe: `data` is flat instead of having `cli`, `build`, `dependencies` nested sub-objects. ## Code Analysis In `src/cleveragents/cli/commands/system.py`, the `build_version_data()` function (line 86) assembles a flat dict. The spec requires a nested structure with `cli`, `build`, and `dependencies` sub-objects. ## Acceptance Criteria - [ ] `data.cli` sub-object contains: `name` ("CleverAgents CLI"), `version`, `channel`, `python` - [ ] `data.build` sub-object contains: `build_date`, `commit`, `schema`, `platform` - [ ] `data.dependencies` sub-object contains spec-required keys (including `mcp_sdk`) - [ ] YAML format produces the equivalent nested structure - [ ] The spec's exact JSON schema is reproduced ## Supporting Information - Spec reference: `docs/specification.md` → `agents version` → JSON example - Code location: `src/cleveragents/cli/commands/system.py`, function `build_version_data()` - Runtime confirmed: `agents --format json version` produces flat `data` structure --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.4.0 milestone 2026-04-10 02:07:38 +00:00
HAL9000 self-assigned this 2026-04-10 06:06:41 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#6801
No description provided.