Skip to content

Commit a04f31c

Browse files
authored
revert to npm for stdio node tools (#424)
1 parent 999c0c0 commit a04f31c

2 files changed

Lines changed: 2 additions & 17 deletions

File tree

go/controller/internal/autogen/autogen_api_translator.go

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -70,24 +70,12 @@ func (a *apiTranslator) TranslateToolServer(ctx context.Context, toolServer *v1a
7070
}, nil
7171
}
7272

73-
var aliasMap = map[string]string{
74-
"npx": "bunx",
75-
"npm": "bun",
76-
}
77-
78-
func commandAlias(command string) string {
79-
if alias, ok := aliasMap[command]; ok {
80-
return alias
81-
}
82-
return command
83-
}
84-
8573
func translateToolServerConfig(config v1alpha1.ToolServerConfig) (string, *api.ToolServerConfig, error) {
8674
switch {
8775
case config.Stdio != nil:
8876
return "kagent.tool_servers.StdioMcpToolServer", &api.ToolServerConfig{
8977
StdioMcpServerConfig: &api.StdioMcpServerConfig{
90-
Command: commandAlias(config.Stdio.Command),
78+
Command: config.Stdio.Command,
9179
Args: config.Stdio.Args,
9280
Env: config.Stdio.Env,
9381
},

python/Dockerfile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,12 @@ RUN curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/s
7474
### STAGE 4: final
7575
FROM python-os AS final
7676

77-
ENV BUN_INSTALL_CACHE_DIR=/cache/bun
78-
ENV BUN_INSTALL=/usr/local/bun
79-
ENV PATH=$BUN_INSTALL/bin:$PATH
77+
RUN apk update && apk add nodejs npm
8078

8179
COPY --from=python-builder /usr/local/bin/kubectl /usr/local/bin/kubectl
8280
COPY --from=python-builder /usr/local/bin/istioctl /usr/local/bin/istioctl
8381
COPY --from=python-builder /usr/local/bin/helm /usr/local/bin/helm
8482
COPY --from=python-builder /usr/local/bin/kubectl-argo-rollouts /usr/local/bin/kubectl-argo-rollouts
85-
COPY --from=python-builder $BUN_INSTALL $BUN_INSTALL
8683

8784
COPY pyproject.toml .
8885
COPY .python-version .

0 commit comments

Comments
 (0)