Merge remote-tracking branch 'origin/polecat/Scabrous'

# Conflicts:
#	docs/architecture.md
#	docs/harness.md
#	internal/beads/builtin_molecules.go
#	internal/cmd/mail.go
#	internal/cmd/molecule.go
#	internal/cmd/mq.go
#	internal/git/git.go
#	internal/mail/router.go
This commit is contained in:
Steve Yegge
2025-12-19 17:59:36 -08:00
6 changed files with 32 additions and 15 deletions

View File

@@ -225,7 +225,7 @@ func preFlightChecks() error {
func getManager(role Role) string {
switch role {
case RoleMayor, RoleWitness:
return "daemon/"
return "deacon/"
case RolePolecat, RoleRefinery:
// Would need rig context to determine witness address
// For now, use a placeholder pattern
@@ -233,7 +233,7 @@ func getManager(role Role) string {
case RoleCrew:
return "human" // Crew is human-managed
default:
return "daemon/"
return "deacon/"
}
}

View File

@@ -23,10 +23,10 @@ type BeadsMessage struct {
Status string `json:"status"`
}
// ProcessLifecycleRequests checks for and processes lifecycle requests from the daemon inbox.
// ProcessLifecycleRequests checks for and processes lifecycle requests from the deacon inbox.
func (d *Daemon) ProcessLifecycleRequests() {
// Get mail for daemon identity
cmd := exec.Command("bd", "mail", "inbox", "--identity", "daemon/", "--json")
// Get mail for deacon identity
cmd := exec.Command("bd", "mail", "inbox", "--identity", "deacon/", "--json")
cmd.Dir = d.config.TownRoot
output, err := cmd.Output()

View File

@@ -41,6 +41,19 @@ const (
TypeReply MessageType = "reply"
)
// Delivery specifies how a message is delivered to the recipient.
type Delivery string
const (
// DeliveryQueue creates the message in the mailbox for periodic checking.
// This is the default delivery mode. Agent checks with `gt mail check`.
DeliveryQueue Delivery = "queue"
// DeliveryInterrupt injects a system-reminder directly into the agent's session.
// Use for lifecycle events, URGENT priority, or stuck detection.
DeliveryInterrupt Delivery = "interrupt"
)
// Message represents a mail message between agents.
// This is the GGT-side representation; it gets translated to/from beads messages.
type Message struct {
@@ -71,6 +84,10 @@ type Message struct {
// Type indicates the message type (task, scavenge, notification, reply).
Type MessageType `json:"type"`
// Delivery specifies how the message is delivered (queue or interrupt).
// Queue: agent checks periodically. Interrupt: inject into session.
Delivery Delivery `json:"delivery,omitempty"`
// ThreadID groups related messages into a conversation thread.
ThreadID string `json:"thread_id,omitempty"`