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

dev

package
v0.0.77 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2025 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRunProjectCmd

func CreateRunProjectCmd(log logger.Logger, theproject project.ProjectContext, liveDevConnection *Websocket, dir string, orgId string, port int) (*exec.Cmd, error)

func FindAvailablePort added in v0.0.74

func FindAvailablePort(p project.ProjectContext) (int, error)

func KillProjectServer added in v0.0.72

func KillProjectServer(projectServerCmd *exec.Cmd)

Types

type Agent

type Agent struct {
	Name        string `json:"name"`
	ID          string `json:"id"`
	Description string `json:"description"`
}

type AgentsPayload

type AgentsPayload struct {
	Agents      []Agent `json:"agents"`
	ProjectID   string  `json:"projectId"`
	ProjectName string  `json:"projectName"`
}

type FileWatcher

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

func NewWatcher

func NewWatcher(logger logger.Logger, dir string, patterns []string, callback func(string)) (*FileWatcher, error)

func (*FileWatcher) Close

func (fw *FileWatcher) Close(logger logger.Logger) error

type InputMessage

type InputMessage struct {
	ID      string `json:"id"`
	Type    string `json:"type"`
	From    string `json:"from"`
	Payload struct {
		SessionID   string `json:"sessionId"`
		Trigger     string `json:"trigger"`
		AgentID     string `json:"agentId"`
		ContentType string `json:"contentType"`
		Payload     []byte `json:"payload"`
	} `json:"payload"`
}

messages send by server to CLI

type Message

type Message struct {
	ID      string         `json:"id"`
	Type    string         `json:"type"`
	Payload map[string]any `json:"payload"`
}

func NewAgentsMessage

func NewAgentsMessage(id string, payload AgentsPayload) Message

func NewOutputMessage

func NewOutputMessage(id string, payload struct {
	ContentType string `json:"contentType"`
	Payload     []byte `json:"payload"`
	Trigger     string `json:"trigger"`
}) Message

messages send by CLI to the server

type OutputPayload

type OutputPayload struct {
	ContentType string `json:"contentType"`
	Payload     []byte `json:"payload"`
	Trigger     string `json:"trigger"`
}

type Websocket added in v0.0.66

type Websocket struct {
	WebSocketId string

	OtelToken string
	OtelUrl   string
	Project   project.ProjectContext
	Done      chan struct{}
	// contains filtered or unexported fields
}

func NewWebsocket added in v0.0.66

func NewWebsocket(logger logger.Logger, websocketId string, websocketUrl string, apiKey string, theproject project.ProjectContext) (*Websocket, error)

func (*Websocket) Close added in v0.0.66

func (c *Websocket) Close() error

func (*Websocket) SendMessage added in v0.0.66

func (c *Websocket) SendMessage(logger logger.Logger, msg Message) error

Update SendMessage to accept the MessageType interface

func (*Websocket) StartReadingMessages added in v0.0.66

func (c *Websocket) StartReadingMessages(ctx context.Context, logger logger.Logger, port int)

func (*Websocket) WebURL added in v0.0.66

func (c *Websocket) WebURL(appUrl string) string

Jump to

Keyboard shortcuts

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