fix(archieui): reach the sandbox and setup terminal on the daemon's listener

This commit is contained in:
sam committed 2026-10-24 11:24:49 +11:00
1 parent 61cbfd8271
commit b2e1810bd6
6 files changed
+6 -25

No files matched your search

-3
View File
@@ -66,7 +66,6 @@ type projection struct {
gateway ServiceTarget
state ServiceTarget
messaging ServiceTarget
harness ServiceTarget
daemon ServiceTarget
tls config.TLS
capture CaptureOptions
@@ -80,7 +79,6 @@ func project(cfg config.Config) projection {
gateway: ServiceTarget{Target: cfg.Services.Get(config.ServiceNameGateway).Target},
messaging: ServiceTarget{Target: cfg.Services.Get(config.ServiceNameMessaging).Target},
state: ServiceTarget{Target: cfg.Services.Get(config.ServiceNameState).Target},
harness: ServiceTarget{Target: cfg.Services.Get(config.ServiceNameHarness).Target},
daemon: ServiceTarget{Target: cfg.Services.Get(config.ServiceNameDaemon).Target},
tls: cfg.TLS,
instance: cfg.Instance,
@@ -106,7 +104,6 @@ func merge(o Options, p projection) Options {
o.Gateway = mergeTarget(o.Gateway, p.gateway)
o.Messaging = mergeTarget(o.Messaging, p.messaging)
o.State = mergeTarget(o.State, p.state)
o.Harness = mergeTarget(o.Harness, p.harness)
o.Daemon = mergeTarget(o.Daemon, p.daemon)
if o.Capture.Retention <= 0 {
o.Capture.Retention = p.capture.Retention
-4
View File
@@ -62,10 +62,6 @@ type Options struct {
State ServiceTarget
Messaging ServiceTarget
Daemon ServiceTarget
// Harness is the daemon's session contract. Optional: empty leaves the
// setup terminal unwired, and /api/harness reports terminal:false rather
// than offering a control that would fail.
Harness ServiceTarget
// DependencyTimeout bounds each readiness probe's call to a dependency.
DependencyTimeout time.Duration
+3 -7
View File
@@ -142,14 +142,10 @@ func wireDaemon(opts Options, srv *webui.Server, cleanups *[]func()) error {
return wireHarness(opts, srv, cleanups)
}
// wireHarness attaches the setup terminal and the run-scoped sandbox view to the daemon's session contract
// when the operator configured one, and registers its cleanup.
// wireHarness attaches the setup terminal and the run-scoped sandbox view to
// the session contract the daemon serves on its listener.
func wireHarness(opts Options, srv *webui.Server, cleanups *[]func()) error {
if opts.Harness.Target == "" {
return nil
}
harness, closeHarness, err := harnessrpc.Dial(opts.Harness.Target, opts.identity)
harness, closeHarness, err := harnessrpc.Dial(opts.Daemon.Target, opts.identity)
if err != nil {
return err
}
+1 -6
View File
@@ -43,7 +43,6 @@ const (
ServiceNameGateway = "gateway"
ServiceNameState = "state"
ServiceNameMessaging = "messaging"
ServiceNameHarness = "harness"
ServiceNameDaemon = "daemon"
)
@@ -112,10 +111,6 @@ func init() {
RegisterService(ServiceBoth, ServiceNameGateway, "127.0.0.1:8585", "127.0.0.1:8585")
RegisterService(ServiceClient, ServiceNameState, "", "127.0.0.1:9090")
RegisterService(ServiceBoth, ServiceNameMessaging, "127.0.0.1:8586", "127.0.0.1:8586")
// The daemon hosts the harness session contract in this repository; the
// dashboard dials it, and its target is the operator's to supply, so a
// deployment with no [services.harness].target leaves the setup terminal
// unwired rather than dialling a default nothing owns.
// The daemon listener also serves the harness session contract.
RegisterService(ServiceBoth, ServiceNameDaemon, "127.0.0.1:8587", "127.0.0.1:8587")
RegisterService(ServiceClient, ServiceNameHarness, "", "")
}