Documentation
¶
Overview ¶
Package bridge adapts an existing Orb runtime to Bridge without owning its lifetime.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attachment ¶
type Attachment struct {
// contains filtered or unexported fields
}
func (*Attachment) Close ¶
func (a *Attachment) Close() error
func (*Attachment) Invoke ¶
func (a *Attachment) Invoke(ctx context.Context, method string, params json.RawMessage) (json.RawMessage, error)
func (*Attachment) SetGeneration ¶
func (a *Attachment) SetGeneration(generation string) error
type Command ¶ added in v0.15.0
Command is a slash command the instance runs: an extension's, a prompt template or a skill.
type Completion ¶ added in v0.19.1
type Completion struct {
Text string `json:"text"`
Label string `json:"label"`
Detail string `json:"detail,omitempty"`
}
Completion is one `@` completion: the text that replaces the token, and how to show it.
type Descriptor ¶ added in v0.14.0
type Descriptor struct {
Status string `json:"status,omitempty"`
Model string `json:"model,omitempty"`
Provider string `json:"provider,omitempty"` // the model's: two providers may offer one name
Thinking string `json:"thinking,omitempty"`
Stats *runtime.SessionStats `json:"stats,omitempty"`
Usage *usage.Snapshot `json:"usage,omitempty"`
Commands []Command `json:"commands,omitempty"`
Catalog string `json:"catalog,omitempty"` // digest of models and commands, which a describe sending it omits
Waits bool `json:"waits"` // events.subscribe takes wait: a follower long-polls
State string `json:"state,omitempty"` // the pulse this describes, read first: a follower waits for a change since
Models []bridge.Model `json:"models,omitempty"`
Name string `json:"name,omitempty"`
CWD string `json:"cwd,omitempty"`
InstanceID string `json:"instance_id"`
Service string `json:"service"`
Generation string `json:"registration_generation"`
Target runtime.ControlTarget `json:"target"`
Methods []string `json:"methods"`
Input *runtime.InputRequest `json:"input,omitempty"`
}
Descriptor is what instances.describe reports about the attached runtime.
type Host ¶
type Host interface {
Session() *runtime.AgentSession
EnableControl() (*runtime.SessionControl, error)
ObserveSessions(func(*runtime.AgentSession)) func()
NewSession(context.Context, *extensions.NewSessionOptions) (extensions.SessionReplacementResult, error)
SwitchSession(context.Context, string, *runtime.AgentSessionRuntimeSwitchOptions) (extensions.SessionReplacementResult, error)
Fork(context.Context, string, *extensions.ForkOptions) (runtime.AgentSessionRuntimeForkResult, error)
}
Host is the local non-owning attachment boundary shared by the SDK runtime and Orb's existing interactive host. It intentionally has no Dispose method.
type Options ¶
type Options struct {
Status func(*runtime.AgentSession) string
// Usage is the plan limits of the session's provider account; nil when it reports none. A new
// reading moves the pulse, so followers describe again. It is called often and must not block.
Usage func(*runtime.AgentSession) *usage.Snapshot
// Complete is what `@query` completes to in a message, as the TUI offers it.
Complete func(context.Context, *runtime.AgentSession, string) []Completion
InstanceID string
Store document.Document
Authorize func(bridge.Request) bool
LedgerQuota int
}
Click to show internal directories.
Click to hide internal directories.