Documentation
¶
Overview ¶
Package copilotadapter is the HTTP adapter that fronts a Copilot CLI session with the contract in openapi.yaml. It is a library (CS-10): the binary in cmd/ reads flags and environment, this package never does.
Index ¶
- Variables
- func DefaultAdapterConfig() *copilotv1.AdapterConfig
- type BridgeEvent
- type BridgeEventKind
- type BridgeModel
- type BridgePrompt
- type BridgePromptDelivery
- type BridgeRequestKind
- type BridgeResolution
- type BridgeRestoredTurn
- type BridgeSession
- type BridgeSessionSpec
- type CopilotAdapter
- func (adapter *CopilotAdapter) Close() error
- func (adapter *CopilotAdapter) InvalidateWorkspace()
- func (adapter *CopilotAdapter) LinkWorkspaceTask(ctx context.Context, sessionID uuid.UUID, taskURL string, ...) (api.WorkspaceTaskLink, error)
- func (adapter *CopilotAdapter) MoveWorkspaceTask(ctx context.Context, link api.WorkspaceTaskLink, expectedID string, ...) (*workv1.ResumeRecord, error)
- func (adapter *CopilotAdapter) RefreshWorkspace(ctx context.Context) error
- func (adapter *CopilotAdapter) Register(router gin.IRouter) error
- func (adapter *CopilotAdapter) RestoreSessions(ctx context.Context) error
- func (adapter *CopilotAdapter) RunSchedules(ctx context.Context) error
- func (adapter *CopilotAdapter) SubscribeWorkspace() WorkspaceSubscription
- func (adapter *CopilotAdapter) Telemetry(ctx context.Context) (api.TelemetrySnapshot, error)
- func (adapter *CopilotAdapter) Workspace(ctx context.Context) (api.WorkspaceSnapshot, error)
- func (adapter *CopilotAdapter) WorkspaceTask(ctx context.Context, taskURL string, force bool) *workv1.ResumeRecord
- type ICopilotBridge
- type IStore
- type ITerminalManager
- type IWorktreeManager
- type Option
- func WithBridge(bridge ICopilotBridge) Option
- func WithConfig(config *copilotv1.AdapterConfig) Option
- func WithLogger(logger *slog.Logger) Option
- func WithScheduleStore(scheduleStore cron.IStore) Option
- func WithStore(store IStore) Option
- func WithTaskContinuity(source *workcontinuity.Continuity) Option
- func WithTerminalManager(terminals ITerminalManager) Option
- func WithVersion(version string) Option
- func WithWorktreeManager(worktrees IWorktreeManager) Option
- type PermissionPolicy
- type PreparedWorktree
- type Repository
- type SessionMessaging
- func (messaging *SessionMessaging) Attach(ctx context.Context, agent relay.AgentID, session uuid.UUID) (relay.Registration, error)
- func (messaging *SessionMessaging) Send(ctx context.Context, session uuid.UUID, to relay.AgentID, ...) (relay.Envelope[*agentv1.AgentMessage], error)
- func (messaging *SessionMessaging) Start(scope *runtime.Scope) error
- type StoreTransaction
- type TerminalEventReplay
- type TerminalOutput
- type TerminalSnapshot
- type TerminalSpec
- type ToolCallID
- type ToolName
- type TraceExporter
- type TraceOption
- type WorkspaceSubscription
- type WorktreeChange
- type WorktreeChanges
- type WorktreeRequest
- type WorktreeSnapshot
Constants ¶
This section is empty.
Variables ¶
var ErrAbortPending = errors.New("copilot adapter: an earlier abort is still pending")
ErrAbortPending means an earlier abort RPC still awaits its terminal SDK event. A second abort must not replace that event's exact target.
var ErrAbortTargetMismatch = errors.New("copilot adapter: active turn does not match the abort target")
ErrAbortTargetMismatch means the caller's durable expected turn is no longer the CLI's foreground turn. The bridge must not guess and abort a successor.
var ErrBridgeSessionMissing = errors.New("copilot adapter: bridge session missing")
ErrBridgeSessionMissing means the Copilot SDK has proved that a persisted adapter session no longer exists in its durable session store. Only this class may terminalize that session during restart; resume dependency errors must leave it retryable.
var ErrInvalidWorktree = errors.New("copilot adapter: invalid worktree")
ErrInvalidWorktree means a persisted path definitively falls outside the configured repository boundary. Callers may quarantine only this class; git, filesystem and cancellation failures leave persisted state untouched.
var ErrNoActiveTurn = errors.New("copilot adapter: no active turn")
ErrNoActiveTurn means an abort cannot select a turn without guessing.
var ErrNotResident = errors.New("copilot-adapter: agent is not a session on this adapter")
ErrNotResident reports an agent whose current address is not a session on this adapter, so its messages cannot be delivered by a direct call.
Functions ¶
func DefaultAdapterConfig ¶
func DefaultAdapterConfig() *copilotv1.AdapterConfig
DefaultAdapterConfig preserves the service's public entry point while the configuration package owns defaults and their typed projections.
Types ¶
type BridgeEvent ¶
type BridgeEvent struct {
// ID is the source event's stable identifier. The concrete SDK supplies its
// event UUID; callback-originated events use the callback request UUID.
ID string
Kind BridgeEventKind
OccurredAt time.Time
TurnID *uuid.UUID
Text string
// FailureCode classifies terminal failures independently of diagnostic text.
FailureCode api.FailureCode
ToolName ToolName
// ToolCallID is the CLI's own identifier for one tool invocation. It
// pairs a toolResult with the toolCall that produced it even when two
// calls to the same tool overlap.
ToolCallID ToolCallID
Author string
RequestID *uuid.UUID
RequestKind BridgeRequestKind
// ResolutionDecision is approve or deny on RequestCompleted.
ResolutionDecision string
AgentID string
DisplayName string
SessionBusy bool
Usage *api.UsageObservation
UsagePayload json.RawMessage
}
BridgeEvent is one thing the CLI told the adapter. It is data, not behaviour, so it is a struct rather than an interface (CS-8's data-shaped test).
type BridgeEventKind ¶
type BridgeEventKind string
BridgeEventKind names what a BridgeEvent reports. It mirrors the contract's SessionEventKind without importing the generated HTTP types into the seam.
const ( // BridgeEventUsage preserves provider measurements even after turn completion. BridgeEventUsage BridgeEventKind = "usage" // BridgeEventAssistantDelta is a token delta on the assistant's reply. BridgeEventAssistantDelta BridgeEventKind = "assistantDelta" // BridgeEventAssistantMessage is one completed assistant message. BridgeEventAssistantMessage BridgeEventKind = "assistantMessage" // BridgeEventToolCall is the CLI invoking a tool. BridgeEventToolCall BridgeEventKind = "toolCall" // BridgeEventToolResult is a tool's output coming back. BridgeEventToolResult BridgeEventKind = "toolResult" // BridgeEventTurnStarted marks the exact FIFO turn the CLI began. BridgeEventTurnStarted BridgeEventKind = "turnStarted" // BridgeEventTurnCompleted closes the turn in flight. BridgeEventTurnCompleted BridgeEventKind = "turnCompleted" // BridgeEventTurnAborted closes the exact foreground turn canceled by the CLI. BridgeEventTurnAborted BridgeEventKind = "turnAborted" // BridgeEventTurnFailed closes the exact foreground turn whose SDK request failed. BridgeEventTurnFailed BridgeEventKind = "turnFailed" // BridgeEventRequestOpened raises one exact-identity permission request. BridgeEventRequestOpened BridgeEventKind = "requestOpened" // BridgeEventRequestCompleted reports the exact permission result observed // from the SDK, including decisions made by another attached client. BridgeEventRequestCompleted BridgeEventKind = "requestCompleted" // BridgeEventSubagentStarted opens one actual SDK subagent lifecycle. BridgeEventSubagentStarted BridgeEventKind = "subagentStarted" // BridgeEventSubagentCompleted closes a successful SDK subagent lifecycle. BridgeEventSubagentCompleted BridgeEventKind = "subagentCompleted" // BridgeEventSubagentFailed closes a failed SDK subagent lifecycle. BridgeEventSubagentFailed BridgeEventKind = "subagentFailed" // BridgeEventSubagentMessage is one completed subagent progress message. BridgeEventSubagentMessage BridgeEventKind = "subagentMessage" // BridgeEventSubagentProgress is the SDK's live assistant.intent update for // one identified subagent. BridgeEventSubagentProgress BridgeEventKind = "subagentProgress" // BridgeEventSubagentToolCall is a tool invoked by a subagent. BridgeEventSubagentToolCall BridgeEventKind = "subagentToolCall" // BridgeEventSubagentToolResult is a subagent tool's output. BridgeEventSubagentToolResult BridgeEventKind = "subagentToolResult" // BridgeEventFailed is reserved for an unrecoverable CLI session failure. BridgeEventFailed BridgeEventKind = "failed" )
type BridgeModel ¶
type BridgeModel struct {
ID string
DisplayName string
Capabilities []api.ModelCapability
}
BridgeModel is one model the CLI reports.
type BridgePrompt ¶
BridgePrompt is one durable adapter turn handed to the CLI. TurnID is queued before Send crosses the external boundary, then paired with the SDK's assistant.turn_start identifier by the concrete bridge.
type BridgePromptDelivery ¶
type BridgePromptDelivery uint8
BridgePromptDelivery states what the bridge knows about one Send call after it returns. An error after crossing the SDK boundary is deliberately Unknown: the adapter keeps the durable turn in its distinct unknown state until a retry or later SDK event proves acceptance instead of guessing that delivery failed.
const ( // BridgePromptDeliveryUnknown means the bridge cannot prove whether the SDK // accepted the prompt. BridgePromptDeliveryUnknown BridgePromptDelivery = iota // BridgePromptDeliveryAccepted means the SDK accepted the prompt. BridgePromptDeliveryAccepted // BridgePromptDeliveryRejected means the prompt definitely did not cross the // SDK boundary and may be failed or retried safely. BridgePromptDeliveryRejected )
type BridgeRequestKind ¶
type BridgeRequestKind string
BridgeRequestKind names the kind of decision the CLI is asking for.
const ( // BridgeRequestPermission is the CLI asking to run a tool. BridgeRequestPermission BridgeRequestKind = "permission" )
type BridgeResolution ¶
BridgeResolution is a decision routed back into a pending CLI request.
type BridgeRestoredTurn ¶
type BridgeRestoredTurn struct {
ID uuid.UUID
Mode api.PromptMode
Status api.TurnStatus
DeliveryUnknown bool
}
BridgeRestoredTurn preserves the scheduling lane a durable turn occupied before the adapter process restarted.
type BridgeSession ¶
type BridgeSession struct {
Events <-chan BridgeEvent
UsageHistory func(ctx context.Context) ([]BridgeEvent, error)
Send func(ctx context.Context, prompt BridgePrompt) (BridgePromptDelivery, error)
AcknowledgeDelivery func(turnID uuid.UUID)
ActiveTurn func() (uuid.UUID, bool)
Abort func(ctx context.Context, expectedTurnID uuid.UUID) (uuid.UUID, error)
SetModel func(ctx context.Context, model string) error
Resolve func(ctx context.Context, resolution BridgeResolution) error
AcknowledgeResolution func(requestID uuid.UUID)
AbandonResolution func(requestID uuid.UUID)
Close func(ctx context.Context) error
}
BridgeSession is the live handle on one CLI session. Every capability is a function value and the stream is a channel, so there is no behaviour left to abstract and no interface to exempt (CS-8's data-shaped test).
type BridgeSessionSpec ¶
type BridgeSessionSpec struct {
SessionID uuid.UUID
// AgentID is a host-scoped durable identity. The adapter carries it without
// interpreting permissions or service-specific configuration.
AgentID string
Model string
WorkingDirectory string
SystemInstructions string
PermissionPolicy PermissionPolicy
RestoredTurns []BridgeRestoredTurn
}
BridgeSessionSpec is what the adapter asks the bridge to start.
type CopilotAdapter ¶
type CopilotAdapter struct {
// contains filtered or unexported fields
}
CopilotAdapter is the adapter, mounted into a binary's existing Gin engine through Register. It owns no process concerns and never opens a listener: a service is an option slid into a pre-existing binary (CS-10).
func NewCopilotAdapter ¶
func NewCopilotAdapter(options ...Option) (*CopilotAdapter, error)
NewCopilotAdapter validates the whole option set, then builds the adapter.
func (*CopilotAdapter) Close ¶
func (adapter *CopilotAdapter) Close() error
Close ends every live CLI session and stops the registry. Run does not call it: the binary that owns the process decides when the sessions die.
func (*CopilotAdapter) InvalidateWorkspace ¶
func (adapter *CopilotAdapter) InvalidateWorkspace()
InvalidateWorkspace invalidates snapshots after an external source is ingested. It does not itself fetch GitHub state or infer task completion.
func (*CopilotAdapter) LinkWorkspaceTask ¶
func (adapter *CopilotAdapter) LinkWorkspaceTask(ctx context.Context, sessionID uuid.UUID, taskURL string, expectedGeneration int64) (api.WorkspaceTaskLink, error)
LinkWorkspaceTask retains only an explicit association. expectedGeneration belongs to that association, not to the checkpoint's Git revision.
func (*CopilotAdapter) MoveWorkspaceTask ¶
func (adapter *CopilotAdapter) MoveWorkspaceTask(ctx context.Context, link api.WorkspaceTaskLink, expectedID string, status workv1.WorkStatus, nextAction, reason string) (*workv1.ResumeRecord, error)
MoveWorkspaceTask publishes a prepared checkpoint and verifies its retained receipt. The caller supplies the observed association and checkpoint tip. The existing session mutation owner serializes moves with relinking in this host. GitHub's stale/fork checks still apply; comments are not a remote CAS.
func (*CopilotAdapter) RefreshWorkspace ¶
func (adapter *CopilotAdapter) RefreshWorkspace(ctx context.Context) error
RefreshWorkspace refreshes task observations and invalidates the shared view.
func (*CopilotAdapter) Register ¶
func (adapter *CopilotAdapter) Register(router gin.IRouter) error
Register installs OpenAPI request validation and the generated strict handlers onto router. It is the service's only mount point.
func (*CopilotAdapter) RestoreSessions ¶
func (adapter *CopilotAdapter) RestoreSessions(ctx context.Context) error
RestoreSessions reconnects every persisted nonterminal SDK session before HTTP or scheduled jobs can address it. Each stored working directory is revalidated through the configured worktree manager first, so restart does not turn legacy database paths into filesystem authority.
func (*CopilotAdapter) RunSchedules ¶
func (adapter *CopilotAdapter) RunSchedules(ctx context.Context) error
RunSchedules owns the reloadable cron scheduler. The mounting binary runs it beside HTTP; each active product row becomes a cron trigger, so the cron service owns recurrence, catch-up, overlap, leases and occurrence completion. Every reload starts a new scheduler on a scope of its own and joins the previous one.
func (*CopilotAdapter) SubscribeWorkspace ¶
func (adapter *CopilotAdapter) SubscribeWorkspace() WorkspaceSubscription
SubscribeWorkspace observes committed adapter writes in this process. The caller owns the returned subscription and must close it on cancellation.
func (*CopilotAdapter) Telemetry ¶
func (adapter *CopilotAdapter) Telemetry(ctx context.Context) (api.TelemetrySnapshot, error)
Telemetry reads the same retained facts used by the API, board and metrics. SQLC keyset pagination prevents silently truncating totals at one page.
func (*CopilotAdapter) Workspace ¶
func (adapter *CopilotAdapter) Workspace(ctx context.Context) (api.WorkspaceSnapshot, error)
Workspace reads retained identities without filesystem inspection or provider calls. SubscribeWorkspace must be called before loading a live snapshot.
func (*CopilotAdapter) WorkspaceTask ¶
func (adapter *CopilotAdapter) WorkspaceTask(ctx context.Context, taskURL string, force bool) *workv1.ResumeRecord
WorkspaceTask returns a cloned observation, never mutable shared state. force is used at explicit ingestion boundaries after external issue changes.
type ICopilotBridge ¶
type ICopilotBridge interface {
CreateSession(ctx context.Context, spec BridgeSessionSpec) (BridgeSession, error)
ResumeSession(ctx context.Context, spec BridgeSessionSpec) (BridgeSession, error)
ListModels(ctx context.Context) ([]BridgeModel, error)
}
ICopilotBridge is the seam over the Copilot CLI. Everything above it is testable with a generated mock; the concrete implementation needs a CLI on the host.
type IStore ¶
type IStore interface {
storedb.Querier
Transact(ctx context.Context, transaction StoreTransaction) error
}
IStore is the persistence seam. Its method set is sqlc's own generated Querier (emit_interface in store/sqlc.yaml), plus the one transaction capability SQLC deliberately does not generate. The concrete store binds a callback to one pgx.Tx so related domain facts and their event pointer commit together.
type ITerminalManager ¶
type ITerminalManager interface {
List(worktreeID uuid.UUID) []TerminalSnapshot
Create(ctx context.Context, spec TerminalSpec) (TerminalSnapshot, error)
Get(identifier uuid.UUID) (TerminalSnapshot, bool)
Resize(identifier uuid.UUID, rows int32, columns int32) (TerminalSnapshot, error)
Write(identifier uuid.UUID, data string) (TerminalSnapshot, error)
Stop(identifier uuid.UUID) (TerminalSnapshot, error)
EventsAfter(identifier uuid.UUID, afterSeq int64) (TerminalEventReplay, bool)
Close() error
}
ITerminalManager owns PTYs and their bounded in-memory replay.
type IWorktreeManager ¶
type IWorktreeManager interface {
Repositories() []Repository
Prepare(ctx context.Context, request WorktreeRequest) (PreparedWorktree, error)
Reuse(ctx context.Context, repositoryID string, path string) (PreparedWorktree, error)
Inspect(ctx context.Context, path string) (WorktreeSnapshot, error)
Changes(ctx context.Context, path string) (WorktreeChanges, error)
Release(ctx context.Context, worktree PreparedWorktree) error
}
IWorktreeManager owns the git/filesystem boundary for configured roots.
type Option ¶
type Option func(configuration *configuration) error
Option configures a Service before New builds anything (CS-6, CS-10).
func WithBridge ¶
func WithBridge(bridge ICopilotBridge) Option
WithBridge supplies the Copilot CLI seam. Required.
func WithConfig ¶
func WithConfig(config *copilotv1.AdapterConfig) Option
WithConfig supplies the adapter's tunables. The message and its bounds are generated from proto/candace/copilot/v1/adapter.proto and the defaults come from config/defaults.json, so a caller overrides a DECLARED value rather than a constant in source. Optional; DefaultAdapterConfig is the fallback.
func WithLogger ¶
WithLogger supplies the structured logger. Optional; the service falls back to slog.Default.
func WithScheduleStore ¶
WithScheduleStore supplies the cron service's trigger and occurrence store (candace/services/cron): cron.NewStore over the csfpg capability in a binary, the same store over pgmem in a spec.
func WithTaskContinuity ¶
func WithTaskContinuity(source *workcontinuity.Continuity) Option
WithTaskContinuity supplies the issue authority used for shared planning. Without it, sessions still render, but task status is visibly unavailable.
func WithTerminalManager ¶
func WithTerminalManager(terminals ITerminalManager) Option
WithTerminalManager supplies the process-owned PTY boundary.
func WithVersion ¶
WithVersion labels the build in the health response.
func WithWorktreeManager ¶
func WithWorktreeManager(worktrees IWorktreeManager) Option
WithWorktreeManager supplies the configured repository/git boundary.
type PermissionPolicy ¶
type PermissionPolicy struct {
Mode api.PermissionPolicyMode
ToolAllowlist []string
ShellAllowlist []string
}
PermissionPolicy is the durable authority supplied to both new and restored bridge sessions. Empty slices are deliberate: only Mode can broaden access.
type PreparedWorktree ¶
type PreparedWorktree struct {
Repository Repository
Path string
BaseRef string
Managed bool
}
PreparedWorktree is a validated working directory ready for a CLI session.
type Repository ¶
Repository describes one configured root the browser is allowed to select.
type SessionMessaging ¶ added in v0.2.0
type SessionMessaging struct {
// contains filtered or unexported fields
}
SessionMessaging makes the adapter's Workbench sessions in_process agents of a relay mounted in the same runtime. A session registers under an agent name, sends to any registered agent, and receives each message addressed to its agent as a queued prompt in its own session — by a direct call into this adapter, never through a socket.
It is a runtime service: mount it after the relay. Each attached agent gets one delivery goroutine on its scope.
func NewSessionMessaging ¶ added in v0.2.0
func NewSessionMessaging(adapter *CopilotAdapter, core *relay.Relay[*agentv1.AgentMessage]) (*SessionMessaging, error)
NewSessionMessaging binds the adapter's sessions to core.
func (*SessionMessaging) Attach ¶ added in v0.2.0
func (messaging *SessionMessaging) Attach(ctx context.Context, agent relay.AgentID, session uuid.UUID) (relay.Registration, error)
Attach registers session as agent's in-process address and starts the agent's delivery goroutine if it has none. Attaching another session to the same agent re-registers it: later messages reach the new session, and anything already queued carries over.
func (*SessionMessaging) Send ¶ added in v0.2.0
func (messaging *SessionMessaging) Send(ctx context.Context, session uuid.UUID, to relay.AgentID, message *agentv1.AgentMessage) (relay.Envelope[*agentv1.AgentMessage], error)
Send relays message from session to the named agent once it satisfies the agent message contract. The session must be attached to an agent: a sender speaks only for the address it holds.
type StoreTransaction ¶
StoreTransaction is one atomic mutation against a transaction-bound SQLC query set. The callback must not retain queries after it returns.
type TerminalEventReplay ¶
type TerminalEventReplay struct {
// Changed closes when newer output or a lifecycle event is published. It is
// captured with Events so a subscriber cannot miss a write before waiting.
Changed <-chan struct{}
Snapshot TerminalSnapshot
Events []TerminalOutput
}
TerminalEventReplay is one atomic view of a terminal's current lifecycle state and every retained event after a cursor. The snapshot and events must come from the same read so a stream cannot miss the terminal event while deciding that an exited process is already caught up.
type TerminalOutput ¶
type TerminalOutput struct {
Seq int64
TerminalID uuid.UUID
Kind string
Data string
ExitCode *int32
OccurredAt time.Time
ReplayTruncated bool
}
TerminalOutput is one bounded replay event.
type TerminalSnapshot ¶
type TerminalSnapshot struct {
ID uuid.UUID
WorktreeID uuid.UUID
Rows int32
Columns int32
Shell string
Status string
ExitCode *int32
CreatedAt time.Time
UpdatedAt time.Time
}
TerminalSnapshot is the lifecycle state returned by the terminal manager.
type TerminalSpec ¶
TerminalSpec is a process-owned shell request in one persisted worktree.
type ToolCallID ¶
type ToolCallID string
ToolCallID is the CLI's own identifier for one tool invocation; it pairs a result with the call that produced it.
type ToolName ¶
type ToolName string
ToolName identifies a tool the CLI can invoke. The protocol leaves the set open (MCP servers and custom tools register names at run time) and the SDK exports no enumeration of the built-ins, so this is a typed identifier rather than an enum; the names the SDK does export are re-exported typed from copilotbridge.
type TraceExporter ¶
type TraceExporter struct {
// contains filtered or unexported fields
}
TraceExporter is one caller-owned goroutine over the existing SQL outbox. The official OTLP client owns the wire protocol; SQL owns retry and fencing.
func NewTraceExporter ¶
func NewTraceExporter(queries storedb.Querier, config *copilotv1.TraceExportConfig, options ...TraceOption) (*TraceExporter, error)
func (*TraceExporter) DeliverNext ¶
func (exporter *TraceExporter) DeliverNext(ctx context.Context) (bool, error)
DeliverNext acknowledges only after the official client confirms acceptance. A shutdown or lost acknowledgement leaves the lease recoverable; stable IDs make a replay refer to the same observation, not a new model invocation.
type TraceOption ¶
type TraceOption func(exporter *TraceExporter)
func WithTraceClient ¶
func WithTraceClient(client otlptrace.Client) TraceOption
func WithTraceNetwork ¶ added in v0.2.0
func WithTraceNetwork(network ipcnet.IDialer) TraceOption
WithTraceNetwork grants the socket capability the official OTLP client dials the collector through. The binary grants it; without it, or a WithTraceClient transport, the exporter is not constructed.
type WorkspaceSubscription ¶
type WorkspaceSubscription struct {
Changed <-chan struct{}
Close func()
}
WorkspaceSubscription coalesces committed changes into a request to reload current state. Subscribe before reading the initial snapshot so a commit during that read remains pending. Close releases the subscription; it starts no goroutine and is safe to call repeatedly.
type WorktreeChange ¶
type WorktreeChange struct {
Path string
PreviousPath string
IndexState string
WorktreeState string
}
WorktreeChange is one porcelain-v2 status entry.
type WorktreeChanges ¶
type WorktreeChanges struct {
HeadSHA string
Clean bool
Files []WorktreeChange
Patch string
Truncated bool
Captured time.Time
}
WorktreeChanges is the bounded current diff plus file states.
type WorktreeRequest ¶
WorktreeRequest asks the concrete adapter to reuse a configured root or create an isolated git worktree. No browser-supplied path crosses the seam.
Source Files
¶
- agent_messaging.go
- config.go
- errors.go
- failure_codes.go
- handlers.go
- options.go
- restoration.go
- schedule_operations.go
- schedules.go
- seams.go
- service.go
- session_mutations.go
- session_operations.go
- sessions.go
- sse.go
- subagent_handlers.go
- subagent_operations.go
- telemetry.go
- telemetry_operations.go
- terminal_handlers.go
- terminal_operations.go
- traces.go
- views.go
- views_gen.go
- views_seam.go
- workspace.go
- workspace_changes.go
- workspace_operations.go
- workspace_task_operations.go
- workspace_tasks.go
- worktree_handlers.go
- worktree_operations.go
Directories
¶
| Path | Synopsis |
|---|---|
|
Package adaptertest is a generated GoMock package.
|
Package adaptertest is a generated GoMock package. |
|
Package copilotbridge is the concrete ICopilotBridge over the Copilot Go SDK.
|
Package copilotbridge is the concrete ICopilotBridge over the Copilot Go SDK. |
|
gen
|
|
|
api
Package api provides primitives to interact with the openapi HTTP API.
|
Package api provides primitives to interact with the openapi HTTP API. |
|
Package kanban mounts shared task planning into an existing HTTP server.
|
Package kanban mounts shared task planning into an existing HTTP server. |
|
card
Package card is the generated KanbanCard widget.
|
Package card is the generated KanbanCard widget. |
|
proto
|
|
|
Package store carries the adapter's schema.
|
Package store carries the adapter's schema. |
|
Package terminaladapter owns interactive PTYs for the Copilot workbench.
|
Package terminaladapter owns interactive PTYs for the Copilot workbench. |
|
Package workbench composes the existing Copilot service for caller-owned hosts.
|
Package workbench composes the existing Copilot service for caller-owned hosts. |
|
Package worktreeadapter implements configured git repository and worktree operations for the Copilot adapter.
|
Package worktreeadapter implements configured git repository and worktree operations for the Copilot adapter. |