Skip to content

Commit f69677f

Browse files
committed
refactor(sidecar): drop redundant commands list from PackageLinkedResponse
The response carried both commands: list<str> and projectedCommands; no client reads the former anymore (projectedCommands supersedes it). Remove it from the wire + generated types; the sidecar keeps its internal commands vector to derive projected_commands.
1 parent f903cb1 commit f69677f

5 files changed

Lines changed: 1 addition & 9 deletions

File tree

crates/sidecar-core/src/frames.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,13 +168,11 @@ pub fn vm_configured_response(
168168

169169
pub fn package_linked_response(
170170
request: &RequestFrame,
171-
commands: Vec<String>,
172171
projected_commands: Vec<ProjectedCommand>,
173172
) -> ResponseFrame {
174173
respond(
175174
request,
176175
ResponsePayload::PackageLinked(PackageLinkedResponse {
177-
commands,
178176
projected_commands,
179177
}),
180178
)

crates/sidecar-protocol/protocol/secure_exec_sidecar_v1.bare

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@ type ProjectedCommand struct {
227227
}
228228

229229
type PackageLinkedResponse struct {
230-
commands: list<str>
231230
projectedCommands: list<ProjectedCommand>
232231
}
233232

crates/sidecar/src/vm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ where
613613
.collect();
614614

615615
Ok(DispatchResult {
616-
response: package_linked_response(request, commands, projected_commands),
616+
response: package_linked_response(request, projected_commands),
617617
events: Vec::new(),
618618
})
619619
}

packages/core/src/generated-protocol.ts

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/core/src/response-payloads.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ export type LiveResponsePayload =
9595
}
9696
| {
9797
type: "package_linked";
98-
commands: string[];
9998
projected_commands: LiveProjectedCommand[];
10099
}
101100
| {
@@ -271,7 +270,6 @@ export function fromGeneratedResponsePayload(
271270
case "PackageLinkedResponse":
272271
return {
273272
type: "package_linked",
274-
commands: [...payload.val.commands],
275273
projected_commands: payload.val.projectedCommands.map(
276274
(command) => ({
277275
name: command.name,

0 commit comments

Comments
 (0)