Publish Claude Code Binaries / Stage and publish binaries (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-arm64 (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build linux-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build windows-amd64 (push) Canceled after 0s
Sync Tutti Agent Skills / sync (push) Canceled after 0s
Windows Agent Adapters / Test Windows agent adapters (push) Canceled after 0s
Windows Daemon Adapters / Test Windows daemon adapters (push) Canceled after 0s
Publish Tutti App Runtime / Publish runtime catalog (push) Canceled after 0s
31 lines
892 B
Go
31 lines
892 B
Go
package agent
|
|
|
|
import (
|
|
agenthost "github.com/tutti-os/tutti/packages/agent/host"
|
|
storesqlite "github.com/tutti-os/tutti/packages/agent/store-sqlite"
|
|
)
|
|
|
|
// ApplicationHost returns the Host installed during service construction.
|
|
// Missing wiring is a startup invariant violation; this adapter never creates
|
|
// a second lifecycle stack from service-local store/runtime copies.
|
|
func (s *Service) ApplicationHost() *agenthost.Host {
|
|
if s == nil {
|
|
return nil
|
|
}
|
|
s.applicationHostMu.Lock()
|
|
provider := s.applicationHostProvider
|
|
s.applicationHostMu.Unlock()
|
|
if provider == nil {
|
|
panic("agent service application host is not configured")
|
|
}
|
|
host := provider()
|
|
if host == nil {
|
|
panic("agent service application host provider returned nil")
|
|
}
|
|
return host
|
|
}
|
|
|
|
func persistedSessionFromHost(session storesqlite.Session) PersistedSession {
|
|
return persistedSessionFromActivity(session)
|
|
}
|