Help us shape the future of Go! Take the 2026 Go Developer Survey

bridge

package
v0.17.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2026 License: MIT Imports: 21 Imported by: 0

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

Types

type Attachment

type Attachment struct {
	// contains filtered or unexported fields
}

func Attach

func Attach(lifetime context.Context, host Host, options Options) (*Attachment, error)

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

type Command struct {
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
}

Command is a slash command the instance runs: an extension's, a prompt template or a skill.

type Descriptor added in v0.14.0

type Descriptor struct {
	Status     string                `json:"status,omitempty"`
	Model      string                `json:"model,omitempty"`
	Thinking   string                `json:"thinking,omitempty"`
	Stats      *runtime.SessionStats `json:"stats,omitempty"`
	Commands   []Command             `json:"commands,omitempty"`
	Waits      bool                  `json:"waits"` // events.subscribe takes wait: a follower long-polls
	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

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
	InstanceID  string
	Store       document.Document
	Authorize   func(bridge.Request) bool
	LedgerQuota int
}

Directories

Path Synopsis
Package tool exposes independently opt-in, source-attributed bridge tools.
Package tool exposes independently opt-in, source-attributed bridge tools.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL