feat(agent): add CLI commands to enable coder script interdependency#20719
Merged
SasSwart merged 31 commits intojjs/internal-1095-branch4-sdk-clientfrom Nov 27, 2025
Merged
Conversation
831a36b to
c300efb
Compare
51c9d3b to
ce2bf8a
Compare
c300efb to
234bb48
Compare
ce2bf8a to
d994626
Compare
234bb48 to
72a8f70
Compare
d994626 to
c344440
Compare
mafredri
reviewed
Nov 25, 2025
Contributor
Author
Contributor
Author
mafredri
requested changes
Nov 26, 2025
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
mafredri
reviewed
Nov 27, 2025
Member
mafredri
left a comment
There was a problem hiding this comment.
Basically approved but some final touches would be nice. Also one request for follow-up PR (re client and server unix/windows split).
mafredri
approved these changes
Nov 27, 2025
Member
mafredri
left a comment
There was a problem hiding this comment.
One simplification, but ignore Q about path, I found the answer.
Comment on lines
+66
to
+78
| header := fmt.Sprintf("Unit: %s\nStatus: %s\nReady: %t\n\nDependencies:\n", unit, statusResp.Status, statusResp.IsReady) | ||
| if formatter.FormatID() == "table" && len(statusResp.Dependencies) == 0 { | ||
| out = header + "No dependencies found" | ||
| } else { | ||
| out, err = formatter.Format(ctx, statusResp) | ||
| if err != nil { | ||
| return xerrors.Errorf("format status: %w", err) | ||
| } | ||
|
|
||
| if formatter.FormatID() == "table" { | ||
| out = header + out | ||
| } | ||
| } |
Member
There was a problem hiding this comment.
Suggested change
| header := fmt.Sprintf("Unit: %s\nStatus: %s\nReady: %t\n\nDependencies:\n", unit, statusResp.Status, statusResp.IsReady) | |
| if formatter.FormatID() == "table" && len(statusResp.Dependencies) == 0 { | |
| out = header + "No dependencies found" | |
| } else { | |
| out, err = formatter.Format(ctx, statusResp) | |
| if err != nil { | |
| return xerrors.Errorf("format status: %w", err) | |
| } | |
| if formatter.FormatID() == "table" { | |
| out = header + out | |
| } | |
| } | |
| out, err = formatter.Format(ctx, statusResp) | |
| if err != nil { | |
| return xerrors.Errorf("format status: %w", err) | |
| } | |
| if formatter.FormatID() == "table" { | |
| if len(statusResp.Dependencies) == 0 { | |
| out = "No dependencies found" | |
| } | |
| out = fmt.Sprintf("Unit: %s\nStatus: %s\nReady: %t\n\nDependencies:\n%s", unit, statusResp.Status, statusResp.IsReady, out) | |
| } |
This seemed a bit complicated, with checking ID multiple times.
359b11c
into
jjs/internal-1095-branch4-sdk-client
25 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


relates to: coder/internal#1094
This is number 5 of 5 pull requests in an effort to add agent script ordering. It adds CLI commands that allow coder scripts to manage dependencies between one another at runtime.
I used an LLM to produce some of these changes, but I have conducted thorough self review and consider this contribution to be ready for an external reviewer.