Clarify Agentbox names and invariants
Co-authored-by: codegirl007 <codegirl-007@users.noreply.github.com>
This commit is contained in:
co-authored by
codegirl007
parent
4d2fb4a733
commit
e702497996
@@ -17,7 +17,7 @@ func (environmentBackend *Environment) Launch(
|
||||
ctx context.Context,
|
||||
application environment.Command,
|
||||
) error {
|
||||
fmt.Fprintln(environmentBackend.config.Output, "Uploading build...")
|
||||
fmt.Fprintln(environmentBackend.config.Output, "Staging application...")
|
||||
executable, err := os.Open(application.Path)
|
||||
if err != nil {
|
||||
return fmt.Errorf("open application: %w", err)
|
||||
@@ -47,7 +47,7 @@ func (environmentBackend *Environment) Launch(
|
||||
|
||||
fmt.Fprintln(environmentBackend.config.Output, "Launching application...")
|
||||
dockerArguments := []string{"exec", "-d"}
|
||||
for variableName, variableValue := range application.Env {
|
||||
for variableName, variableValue := range application.EnvironmentVariables {
|
||||
dockerArguments = append(
|
||||
dockerArguments,
|
||||
"-e",
|
||||
|
||||
@@ -69,6 +69,8 @@ func (environmentBackend *Environment) Start(ctx context.Context) error {
|
||||
); err != nil {
|
||||
return fmt.Errorf("start environment: %w", err)
|
||||
}
|
||||
// entrypoint.sh creates this file only after both Xvfb and Openbox accept
|
||||
// requests. It is the readiness handshake between host and container.
|
||||
if err := waitFor(ctx, 10*time.Second, func() bool {
|
||||
_, readyErr := environmentBackend.runDocker(
|
||||
ctx,
|
||||
|
||||
@@ -8,10 +8,10 @@ import (
|
||||
// Command describes a host executable and how it should start in an
|
||||
// environment. Environment implementations decide how to stage the file.
|
||||
type Command struct {
|
||||
Path string
|
||||
Args []string
|
||||
Env map[string]string
|
||||
WindowTitle string
|
||||
Path string
|
||||
Args []string
|
||||
EnvironmentVariables map[string]string
|
||||
WindowTitle string
|
||||
}
|
||||
|
||||
// InputType identifies one backend-neutral keyboard, mouse, or timing action.
|
||||
@@ -36,7 +36,8 @@ type InputAction struct {
|
||||
DurationMS int `json:"duration_ms,omitempty"`
|
||||
}
|
||||
|
||||
// LogEntry is a snapshot of one application output stream.
|
||||
// LogEntry is a cumulative snapshot of one application output stream. Time is
|
||||
// when Agentbox captured the snapshot, not when the application emitted it.
|
||||
type LogEntry struct {
|
||||
Stream string `json:"stream"`
|
||||
Message string `json:"message"`
|
||||
|
||||
Reference in New Issue
Block a user