Documentation
¶
Index ¶
- func BaseEnv(config bridgeconfig.Config) []string
- func BootstrapTargets(config bridgeconfig.Config) []protocol.Target
- func ConversationContextIDForTarget(networkID string, target protocol.Target, fallbackMessageID ...string) string
- func DefaultSessionStorePath(workspacePath string) string
- func EnsureWorkspaceClientConfig(config bridgeconfig.Config) error
- func GenerateUUID() (string, error)
- func Run(ctx context.Context, config bridgeconfig.Config, driver Driver, ...) error
- func RunAttached(ctx context.Context, config bridgeconfig.Config, notifier Notifier, ...) error
- func SessionKey(config bridgeconfig.Config, message *protocol.Message) string
- func SessionKeyForTarget(config bridgeconfig.Config, target protocol.Target) string
- func SessionKeyFromContext(config bridgeconfig.Config, contextID string) string
- type CommandResult
- type CommandSpec
- type Delivery
- type Driver
- type Notifier
- type Nudge
- type Runner
- type RunnerEvent
- type RunnerEventType
- type RunnerObserver
- type SessionRecord
- type SessionStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BaseEnv ¶
func BaseEnv(config bridgeconfig.Config) []string
func BootstrapTargets ¶
func BootstrapTargets(config bridgeconfig.Config) []protocol.Target
func DefaultSessionStorePath ¶
func EnsureWorkspaceClientConfig ¶ added in v0.1.1
func EnsureWorkspaceClientConfig(config bridgeconfig.Config) error
func GenerateUUID ¶
func RunAttached ¶ added in v0.1.21
func SessionKey ¶
func SessionKey(config bridgeconfig.Config, message *protocol.Message) string
func SessionKeyForTarget ¶
func SessionKeyForTarget(config bridgeconfig.Config, target protocol.Target) string
func SessionKeyFromContext ¶
func SessionKeyFromContext(config bridgeconfig.Config, contextID string) string
Types ¶
type CommandResult ¶
func RunCommand ¶
func RunCommand(ctx context.Context, spec CommandSpec) (CommandResult, error)
type CommandSpec ¶
type Driver ¶
type Driver interface {
Name() string
DefaultCommand() string
UsesSessionIDForFirstDelivery() bool
BuildCommand(config bridgeconfig.Config, delivery Delivery) (CommandSpec, error)
ExtractRuntimeSessionID(result CommandResult) string
}
type Notifier ¶ added in v0.1.21
type Notifier interface {
Name() string
Notify(ctx context.Context, config bridgeconfig.Config, text string) error
}
Notifier delivers a nudge into an already-open runtime session (runtime.mode: attached). It never starts the runtime.
type Nudge ¶ added in v0.1.21
type Nudge struct {
Target protocol.Target
Count int
Senders []string
// LatestID is the newest message id; it keeps consecutive nudges distinct
// so a runtime's repeated-input filter never drops one.
LatestID string
}
Nudge is the coalesced notice for one Moltnet conversation that an attached session has unread messages. It never carries message bodies: the session pulls them itself with `moltnet read --since-last`.
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
func NewAttachedRunner ¶ added in v0.1.21
func NewAttachedRunner( config bridgeconfig.Config, notifier Notifier, streamer eventStreamer, backoff backoffPolicy, ) *Runner
NewAttachedRunner builds a runner that shares the managed runner's event stream, wake policy, and per-conversation queues, but nudges an open session through notifier instead of running a CLI command per wake.
func NewRunner ¶
func NewRunner( config bridgeconfig.Config, driver Driver, streamer eventStreamer, backoff backoffPolicy, ) *Runner
func (*Runner) SetObserver ¶ added in v0.1.14
func (r *Runner) SetObserver(observer RunnerObserver)
type RunnerEvent ¶ added in v0.1.14
type RunnerEventType ¶ added in v0.1.14
type RunnerEventType string
const ( RunnerEventWakeQueued RunnerEventType = "agent.wake.queued" RunnerEventTurnStarted RunnerEventType = "agent.turn.started" RunnerEventTurnCompleted RunnerEventType = "agent.turn.completed" RunnerEventTurnFailed RunnerEventType = "agent.turn.failed" )
type RunnerObserver ¶ added in v0.1.14
type RunnerObserver func(eventType RunnerEventType, payload RunnerEvent)
type SessionRecord ¶
type SessionStore ¶
type SessionStore struct {
// contains filtered or unexported fields
}
func NewSessionStore ¶
func NewSessionStore(path string) *SessionStore
func (*SessionStore) Delete ¶ added in v0.1.9
func (s *SessionStore) Delete(key string) error
func (*SessionStore) Get ¶
func (s *SessionStore) Get(key string) (SessionRecord, bool, error)
func (*SessionStore) GetOrCreate ¶
func (s *SessionStore) GetOrCreate(key string) (SessionRecord, bool, error)
func (*SessionStore) Put ¶
func (s *SessionStore) Put(key string, runtimeSessionID string) (SessionRecord, error)
Click to show internal directories.
Click to hide internal directories.