Rename Host/Runtime hostname fields to Outside/Inside pattern
This renames all hostname/OS/working directory fields to follow the
Outside/Inside naming pattern rather than Host/Runtime naming pattern.
- HostHostname -> OutsideHostname
- RuntimeHostname -> InsideHostname
- HostOS -> OutsideOS
- RuntimeOS -> InsideOS
- HostWorkingDir -> OutsideWorkingDir
- RuntimeWorkingDir -> InsideWorkingDir
This includes related method names, struct fields, and JavaScript properties.
Co-Authored-By: sketch
diff --git a/loop/agent.go b/loop/agent.go
index 2bd0776..1ce67e5 100644
--- a/loop/agent.go
+++ b/loop/agent.go
@@ -73,9 +73,9 @@
// OS returns the operating system of the client.
OS() string
- HostOS() string
- HostHostname() string
- HostWorkingDir() string
+ OutsideOS() string
+ OutsideHostname() string
+ OutsideWorkingDir() string
GitOrigin() string
}
@@ -239,10 +239,10 @@
originalBudget ant.Budget
title string
codereview *claudetool.CodeReviewer
- // Host information
- hostHostname string
- hostOS string
- hostWorkingDir string
+ // Outside information
+ outsideHostname string
+ outsideOS string
+ outsideWorkingDir string
// URL of the git remote 'origin' if it exists
gitOrigin string
@@ -294,19 +294,19 @@
return a.config.ClientGOOS
}
-// HostOS returns the operating system of the host.
-func (a *Agent) HostOS() string {
- return a.hostOS
+// OutsideOS returns the operating system of the outside system.
+func (a *Agent) OutsideOS() string {
+ return a.outsideOS
}
-// HostHostname returns the hostname of the host.
-func (a *Agent) HostHostname() string {
- return a.hostHostname
+// OutsideHostname returns the hostname of the outside system.
+func (a *Agent) OutsideHostname() string {
+ return a.outsideHostname
}
-// HostWorkingDir returns the working directory on the host.
-func (a *Agent) HostWorkingDir() string {
- return a.hostWorkingDir
+// OutsideWorkingDir returns the working directory on the outside system.
+func (a *Agent) OutsideWorkingDir() string {
+ return a.outsideWorkingDir
}
// GitOrigin returns the URL of the git remote 'origin' if it exists.
@@ -441,26 +441,26 @@
ClientGOOS string
ClientGOARCH string
UseAnthropicEdit bool
- // Host information
- HostHostname string
- HostOS string
- HostWorkingDir string
+ // Outside information
+ OutsideHostname string
+ OutsideOS string
+ OutsideWorkingDir string
}
// NewAgent creates a new Agent.
// It is not usable until Init() is called.
func NewAgent(config AgentConfig) *Agent {
agent := &Agent{
- config: config,
- ready: make(chan struct{}),
- inbox: make(chan string, 100),
- outbox: make(chan AgentMessage, 100),
- startedAt: time.Now(),
- originalBudget: config.Budget,
- seenCommits: make(map[string]bool),
- hostHostname: config.HostHostname,
- hostOS: config.HostOS,
- hostWorkingDir: config.HostWorkingDir,
+ config: config,
+ ready: make(chan struct{}),
+ inbox: make(chan string, 100),
+ outbox: make(chan AgentMessage, 100),
+ startedAt: time.Now(),
+ originalBudget: config.Budget,
+ seenCommits: make(map[string]bool),
+ outsideHostname: config.OutsideHostname,
+ outsideOS: config.OutsideOS,
+ outsideWorkingDir: config.OutsideWorkingDir,
}
return agent
}
diff --git a/loop/server/loophttp.go b/loop/server/loophttp.go
index 8a43fce..271375b 100644
--- a/loop/server/loophttp.go
+++ b/loop/server/loophttp.go
@@ -59,12 +59,12 @@
OS string `json:"os"` // deprecated
GitOrigin string `json:"git_origin,omitempty"`
- HostHostname string `json:"host_hostname,omitempty"`
- RuntimeHostname string `json:"runtime_hostname,omitempty"`
- HostOS string `json:"host_os,omitempty"`
- RuntimeOS string `json:"runtime_os,omitempty"`
- HostWorkingDir string `json:"host_working_dir,omitempty"`
- RuntimeWorkingDir string `json:"runtime_working_dir,omitempty"`
+ OutsideHostname string `json:"outside_hostname,omitempty"`
+ InsideHostname string `json:"inside_hostname,omitempty"`
+ OutsideOS string `json:"outside_os,omitempty"`
+ InsideOS string `json:"inside_os,omitempty"`
+ OutsideWorkingDir string `json:"outside_working_dir,omitempty"`
+ InsideWorkingDir string `json:"inside_working_dir,omitempty"`
}
type InitRequest struct {
@@ -356,12 +356,12 @@
InitialCommit: agent.InitialCommit(),
Title: agent.Title(),
OS: agent.OS(),
- HostHostname: agent.HostHostname(),
- RuntimeHostname: s.hostname,
- HostOS: agent.HostOS(),
- RuntimeOS: agent.OS(),
- HostWorkingDir: agent.HostWorkingDir(),
- RuntimeWorkingDir: getWorkingDir(),
+ OutsideHostname: agent.OutsideHostname(),
+ InsideHostname: s.hostname,
+ OutsideOS: agent.OutsideOS(),
+ InsideOS: agent.OS(),
+ OutsideWorkingDir: agent.OutsideWorkingDir(),
+ InsideWorkingDir: getWorkingDir(),
GitOrigin: agent.GitOrigin(),
}
diff --git a/loop/webui/src/types.ts b/loop/webui/src/types.ts
index 68b6045..7874a3b 100644
--- a/loop/webui/src/types.ts
+++ b/loop/webui/src/types.ts
@@ -67,12 +67,12 @@
initial_commit: string;
title: string;
os: string;
- host_hostname?: string;
- runtime_hostname?: string;
- host_os?: string;
- runtime_os?: string;
- host_working_dir?: string;
- runtime_working_dir?: string;
+ outside_hostname?: string;
+ inside_hostname?: string;
+ outside_os?: string;
+ inside_os?: string;
+ outside_working_dir?: string;
+ inside_working_dir?: string;
git_origin?: string;
}
diff --git a/loop/webui/src/web-components/sketch-container-status.ts b/loop/webui/src/web-components/sketch-container-status.ts
index c6aa811..9e542cb 100644
--- a/loop/webui/src/web-components/sketch-container-status.ts
+++ b/loop/webui/src/web-components/sketch-container-status.ts
@@ -75,59 +75,63 @@
}
formatHostname() {
- const hostHostname = this.state?.host_hostname;
- const runtimeHostname = this.state?.runtime_hostname;
+ const outsideHostname = this.state?.outside_hostname;
+ const insideHostname = this.state?.inside_hostname;
- if (!hostHostname || !runtimeHostname) {
+ if (!outsideHostname || !insideHostname) {
return this.state?.hostname;
}
- if (hostHostname === runtimeHostname) {
- return hostHostname;
+ if (outsideHostname === insideHostname) {
+ return outsideHostname;
}
- return `${hostHostname}:${runtimeHostname}`;
+ return `${outsideHostname}:${insideHostname}`;
}
formatWorkingDir() {
- const hostWorkingDir = this.state?.host_working_dir;
- const runtimeWorkingDir = this.state?.runtime_working_dir;
+ const outsideWorkingDir = this.state?.outside_working_dir;
+ const insideWorkingDir = this.state?.inside_working_dir;
- if (!hostWorkingDir || !runtimeWorkingDir) {
+ if (!outsideWorkingDir || !insideWorkingDir) {
return this.state?.working_dir;
}
- if (hostWorkingDir === runtimeWorkingDir) {
- return hostWorkingDir;
+ if (outsideWorkingDir === insideWorkingDir) {
+ return outsideWorkingDir;
}
- return `${hostWorkingDir}:${runtimeWorkingDir}`;
+ return `${outsideWorkingDir}:${insideWorkingDir}`;
}
getHostnameTooltip() {
- const hostHostname = this.state?.host_hostname;
- const runtimeHostname = this.state?.runtime_hostname;
-
- if (!hostHostname || !runtimeHostname || hostHostname === runtimeHostname) {
- return "";
- }
-
- return `Host: ${hostHostname}, Runtime: ${runtimeHostname}`;
- }
-
- getWorkingDirTooltip() {
- const hostWorkingDir = this.state?.host_working_dir;
- const runtimeWorkingDir = this.state?.runtime_working_dir;
+ const outsideHostname = this.state?.outside_hostname;
+ const insideHostname = this.state?.inside_hostname;
if (
- !hostWorkingDir ||
- !runtimeWorkingDir ||
- hostWorkingDir === runtimeWorkingDir
+ !outsideHostname ||
+ !insideHostname ||
+ outsideHostname === insideHostname
) {
return "";
}
- return `Host: ${hostWorkingDir}, Runtime: ${runtimeWorkingDir}`;
+ return `Outside: ${outsideHostname}, Inside: ${insideHostname}`;
+ }
+
+ getWorkingDirTooltip() {
+ const outsideWorkingDir = this.state?.outside_working_dir;
+ const insideWorkingDir = this.state?.inside_working_dir;
+
+ if (
+ !outsideWorkingDir ||
+ !insideWorkingDir ||
+ outsideWorkingDir === insideWorkingDir
+ ) {
+ return "";
+ }
+
+ return `Outside: ${outsideWorkingDir}, Inside: ${insideWorkingDir}`;
}
// See https://lit.dev/docs/components/lifecycle/