source

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package source exposes the session's source-control selection as a fixed single-instance MCP connector.

A session's working directory routinely holds many cloned repos, and the Source panel has ONE of them selected. That selection used to live only in the browser, so "this repo" was a guess the agent made from whatever path was mentioned last — and it guessed wrong the moment the human switched repos. The selection now lives on the session, the system prompt names it, and these ops are how the agent re-reads or moves it.

A connector rather than a hard-coded meta-tool, for the same reason notes and tickets are: a connector is taggable and auditable per user, and each op carries its own name and schema instead of being an action string on one overloaded tool.

File layout:

  • connector.go — Meta, Input structs, Operations, handler struct
  • ops.go — handler implementations

Wire-up: connectors.Register(source.Module(layout)) before connectors.Service.Bootstrap.

Index

Constants

View Source
const Key = "source"

Variables

This section is empty.

Functions

func Meta

func Meta() connector.Meta

Meta returns the static metadata block.

func Module

func Module(layout agentconfig.Layout) connector.Module

Module returns the fully-wired connector.Module.

func Operations

func Operations(layout agentconfig.Layout) []connector.Category

Operations builds the op list, capturing layout so handlers can reach the session store.

Types

type Configs

type Configs struct{}

Configs is intentionally empty — the repos are the session's own working directory, and git runs with the credentials already on the machine.

Jump to

Keyboard shortcuts

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