Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions control-plane/internal/core/services/agent_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -590,11 +590,15 @@ func (as *DefaultAgentService) buildProcessConfig(agentNode packages.InstalledPa
}

// Launch via the manifest entrypoint (e.g. "python -m pr_af.app"). When the
// program token is python/python3, substitute the resolved interpreter.
// program token is python/python3, substitute the resolved interpreter. A Go
// node launches its install-time-built binary; a package-relative binary path
// is resolved against the install dir so exec finds it regardless of cwd.
startArgs := metadata.StartCommand()
command := startArgs[0]
args := startArgs[1:]
if command == "python" || command == "python3" {
if metadata.IsGo() {
command = packages.GoBinaryProgram(agentNode.Path, command)
} else if command == "python" || command == "python3" {
command = pythonPath
}

Expand Down
6 changes: 4 additions & 2 deletions control-plane/internal/core/services/package_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -545,9 +545,11 @@ func (ps *DefaultPackageService) copyFile(src, dst string) error {
return err
}

// installDependencies installs package dependencies
// installDependencies installs package dependencies for the node's language
// (Go build or Python venv), delegating to the shared, language-aware installer
// so this service path handles Go nodes identically to the CLI installer.
func (ps *DefaultPackageService) installDependencies(packagePath string, metadata *packages.PackageMetadata) error {
return packages.InstallPythonDependencies(packagePath, metadata.Dependencies.Python, metadata.Dependencies.System)
return packages.InstallDependencies(packagePath, metadata)
}

// hasRequirementsFile checks if requirements.txt exists
Expand Down
10 changes: 10 additions & 0 deletions control-plane/internal/packages/config_version_fixtures_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ name: pr-af
version: 0.2.0
description: Opens draft PRs from a task description
author: Agent-Field
language: python
entrypoint:
start: python -m pr_af.app
healthcheck: /health
Expand Down Expand Up @@ -167,6 +168,15 @@ user_environment:
if md.Name != "pr-af" || md.Version != "0.2.0" {
t.Errorf("basics: name=%q version=%q", md.Name, md.Version)
}
// `language` is an additive optional field (added without a
// config_version bump): the current-version fixture asserts the
// reader extracts it and that "python" is not treated as a Go node.
if md.Language != "python" {
t.Errorf("language = %q, want python", md.Language)
}
if md.IsGo() {
t.Errorf("a python node must not be classified as Go")
}
if got := md.StartCommand(); len(got) == 0 || got[0] != "python" {
t.Errorf("StartCommand() = %v", got)
}
Expand Down
Loading
Loading