Skip to content

feat(cli): add some (hidden) agent handling commands#187

Merged
jrvb-rl merged 3 commits into
mainfrom
jrvb/add-agent-cli
Mar 30, 2026
Merged

feat(cli): add some (hidden) agent handling commands#187
jrvb-rl merged 3 commits into
mainfrom
jrvb/add-agent-cli

Conversation

@jrvb-rl

@jrvb-rl jrvb-rl commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

Also fix a few other small things:

  • preserve agent version info where needed
  • better error messages for bad server calls

Also fix a few other small things:
* preserve agent version info where needed
* better error messages for bad server calls
@jrvb-rl jrvb-rl requested a review from james-rl March 30, 2026 20:23
@jrvb-rl jrvb-rl enabled auto-merge (squash) March 30, 2026 20:23
@jrvb-rl jrvb-rl disabled auto-merge March 30, 2026 20:26
@jrvb-rl jrvb-rl changed the title feat(cli): Add some (hidden) agent handling commands feat(cli): add some (hidden) agent handling commands Mar 30, 2026

@james-rl james-rl left a comment

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.

Looks good to me. A few minor comments in the feedback


function truncate(str: string, maxLen: number): string {
if (str.length <= maxLen) return str;
return str.slice(0, maxLen - 1) + "…";

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.

should this be maxLen -1 - "...".length?

);
}

console.log();

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.

is this just for the newline?

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.

Yep!

return getAgent(idOrName);
}

// Look up by name — fetch all versions with this name and pick the latest.

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 isn't a problem with this code, but reading through this makes me wonder if we should add a backend endpoint for this purpose

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.

Yeah, I considered this as well. At some point this might make sense, especially if we have lots of versions for public agents. (eg, re-publish every week, across 100s of agents?). It depends on how often this 'list' feature gets used; it might be fairly rare, in which case it doesn't much matter?

@jrvb-rl jrvb-rl merged commit 1a92f5f into main Mar 30, 2026
14 of 15 checks passed
@jrvb-rl jrvb-rl deleted the jrvb/add-agent-cli branch March 30, 2026 21:00
tode-rl pushed a commit that referenced this pull request Apr 3, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.15.0](v1.14.0...v1.15.0)
(2026-04-03)


### Features

* axon list with pagination and api-client upgrade
([#184](#184))
([dc9743e](dc9743e))
* **cli:** add some (hidden) agent handling commands
([#187](#187))
([1a92f5f](1a92f5f))


### Bug Fixes

* clean stdout for --config-only when appending SSH config
([#192](#192))
([4428295](4428295))
* **cli:** account for pending scenarios in rli display
([#185](#185))
([c82d528](c82d528))
* widen VERSION column in agent list to prevent truncation
([#190](#190))
([c7eba09](c7eba09))


### Performance Improvements

* fetch total count in the background, not foreground
([#189](#189))
([0903d89](0903d89))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

2 participants