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/cmd/sketch/main.go b/cmd/sketch/main.go
index e6fdbc0..e37c729 100644
--- a/cmd/sketch/main.go
+++ b/cmd/sketch/main.go
@@ -59,9 +59,9 @@
 	record := flag.Bool("httprecord", true, "(debugging) Record trace (if httprr is set)")
 	noCleanup := flag.Bool("nocleanup", false, "(debugging) do not clean up docker containers on exit")
 	containerLogDest := flag.String("save-container-logs", "", "(debugging) host path to save container logs to on exit")
-	hostHostname := flag.String("host-hostname", "", "(internal) hostname on the host")
-	hostOS := flag.String("host-os", "", "(internal) OS on the host")
-	hostWorkingDir := flag.String("host-working-dir", "", "(internal) workign dir on the host")
+	outsideHostname := flag.String("outside-hostname", "", "(internal) hostname on the outside system")
+	outsideOS := flag.String("outside-os", "", "(internal) OS on the outside system")
+	outsideWorkingDir := flag.String("outside-working-dir", "", "(internal) working dir on the outside system")
 	sketchBinaryLinux := flag.String("sketch-binary-linux", "", "(development) path to a pre-built sketch binary for linux")
 
 	flag.Parse()
@@ -216,9 +216,9 @@
 			SSHAuthorizedKeys: authorizedKeys,
 			SSHPort:           *sshPort,
 			ForceRebuild:      false,
-			HostHostname:      getHostname(),
-			HostOS:            runtime.GOOS,
-			HostWorkingDir:    cwd,
+			OutsideHostname:   getHostname(),
+			OutsideOS:         runtime.GOOS,
+			OutsideWorkingDir: cwd,
 		}
 		if err := dockerimg.LaunchContainer(ctx, stdout, stderr, config); err != nil {
 			if *verbose {
@@ -255,20 +255,20 @@
 	}
 
 	agentConfig := loop.AgentConfig{
-		Context:          ctx,
-		AntURL:           antURL,
-		APIKey:           apiKey,
-		HTTPC:            client,
-		Budget:           ant.Budget{MaxResponses: *maxIterations, MaxWallTime: *maxWallTime, MaxDollars: *maxDollars},
-		GitUsername:      *gitUsername,
-		GitEmail:         *gitEmail,
-		SessionID:        *sessionID,
-		ClientGOOS:       runtime.GOOS,
-		ClientGOARCH:     runtime.GOARCH,
-		UseAnthropicEdit: os.Getenv("SKETCH_ANTHROPIC_EDIT") == "1",
-		HostHostname:     *hostHostname,
-		HostOS:           *hostOS,
-		HostWorkingDir:   *hostWorkingDir,
+		Context:           ctx,
+		AntURL:            antURL,
+		APIKey:            apiKey,
+		HTTPC:             client,
+		Budget:            ant.Budget{MaxResponses: *maxIterations, MaxWallTime: *maxWallTime, MaxDollars: *maxDollars},
+		GitUsername:       *gitUsername,
+		GitEmail:          *gitEmail,
+		SessionID:         *sessionID,
+		ClientGOOS:        runtime.GOOS,
+		ClientGOARCH:      runtime.GOARCH,
+		UseAnthropicEdit:  os.Getenv("SKETCH_ANTHROPIC_EDIT") == "1",
+		OutsideHostname:   *outsideHostname,
+		OutsideOS:         *outsideOS,
+		OutsideWorkingDir: *outsideWorkingDir,
 	}
 	agent := loop.NewAgent(agentConfig)
 
diff --git a/dockerimg/dockerimg.go b/dockerimg/dockerimg.go
index 3a839e0..c2fd1c5 100644
--- a/dockerimg/dockerimg.go
+++ b/dockerimg/dockerimg.go
@@ -79,10 +79,10 @@
 	// Private key used to identify the container's ssh server
 	SSHServerIdentity []byte
 
-	// Host information to pass to the container
-	HostHostname   string
-	HostOS         string
-	HostWorkingDir string
+	// Outside information to pass to the container
+	OutsideHostname   string
+	OutsideOS         string
+	OutsideWorkingDir string
 }
 
 // LaunchContainer creates a docker container for a project, installs sketch and opens a connection to it.
@@ -410,9 +410,9 @@
 		"-session-id="+config.SessionID,
 		"-git-username="+config.GitUsername,
 		"-git-email="+config.GitEmail,
-		"-host-hostname="+config.HostHostname,
-		"-host-os="+config.HostOS,
-		"-host-working-dir="+config.HostWorkingDir,
+		"-outside-hostname="+config.OutsideHostname,
+		"-outside-os="+config.OutsideOS,
+		"-outside-working-dir="+config.OutsideWorkingDir,
 	)
 	if config.SkabandAddr != "" {
 		cmdArgs = append(cmdArgs, "-skaband-addr="+config.SkabandAddr)
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/