Skip to content

CLI structured output cleanups#3633

Open
noise64 wants to merge 31 commits into
mainfrom
cli-structured-output
Open

CLI structured output cleanups#3633
noise64 wants to merge 31 commits into
mainfrom
cli-structured-output

Conversation

@noise64

@noise64 noise64 commented Jun 15, 2026

Copy link
Copy Markdown
Contributor
  • resolves Verify that every CLI command properly supports all output formats #3374
  • unifies CLI outputs:
  • all meaningful comand now has specific output shape
  • every output has $type meta field
  • normalizes casing
  • cleaned up / reviewed how we log outputs
  • introduces JSON schema for the union of the outputs, which can be access with a new CLI command (golem output-schema), which can also be used to list all the types, and to return a focused subschema
  • to help keeping the schema and the DTOs in shapes:
    • a property based test was added, to generate CLI output DTOs, and match it against the schema
    • there is unit test that find "unregistered" types for testing
    • added relevant skill for this work, and updated related ones

@netlify

netlify Bot commented Jun 15, 2026

Copy link
Copy Markdown

Deploy Preview for golemcloud canceled.

Name Link
🔨 Latest commit c5f37e7
🔍 Latest deploy log https://app.netlify.com/projects/golemcloud/deploys/6a32bb16a269670008735dcf

@noise64 noise64 self-assigned this Jun 15, 2026
@noise64 noise64 added this to the Golem 1.6 milestone Jun 15, 2026
@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown

📖 Docs preview: https://docs-ba2crlas8-golem-cloud.vercel.app

Built from commit c5f37e73e211e030c101ddb382ca3a9fdabd9569 by docs.yaml.

@noise64 noise64 marked this pull request as ready for review June 16, 2026 13:00
@noise64 noise64 requested a review from a team June 16, 2026 13:00
self.ctx.log_handler().log_view(&env_summaries)?;
}

self.ctx.log_handler().log_view(&EnvironmentListView {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will print an empty table after we already logged that "No environments are available", is that the intention?

@noise64 noise64 Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the intention is to always return a structured response, in listing commands too.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I'm asking about the human output

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, sorry, will recheck.

}
}

impl CliOutput for SecretCreateView {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand correctly, these Secret* views hold the secret value itself in AgentSecretDto and the show_sensitive flag used for text output. If we serialize this to JSON with serde, we are leaking out the secret values regardless of the show-sensitive flag.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will recheck all the places where we do sensitive checks, most probably we had mixed filtering for these even before, in non-text modes; but thanks for pointing it out, let's "normalize" handling these.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Verify that every CLI command properly supports all output formats

2 participants