integrations

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2026 License: Apache-2.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package integrations manages the local configuration and skill files owned by Kivgraph for supported MCP clients. It deliberately keeps each client's schema behind this package so the CLI only deals in targets and scopes.

Index

Constants

View Source
const (
	TargetClaudeCode    = "claude-code"
	TargetClaudeDesktop = "claude-desktop"
	TargetCodex         = "codex"
	TargetOpenCode      = "opencode"
	TargetOhMyPi        = "oh-my-pi"

	ScopeUser    = "user"
	ScopeProject = "project"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action string
const (
	ActionInstall Action = "install"
	ActionRemove  Action = "remove"
	ActionStatus  Action = "status"
)

type Manager

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

Manager applies integration plans for one local user and one project.

func New

func New(options Options) (Manager, error)

New validates and resolves the local roots used by an integration manager.

func (Manager) DetectMCPTargets

func (manager Manager) DetectMCPTargets(scope Scope) ([]TargetDetection, error)

DetectMCPTargets returns every MCP target supported by the requested scope, marking the targets whose local configuration or installation markers exist.

func (Manager) DetectSkillTargets

func (manager Manager) DetectSkillTargets(scope Scope) ([]TargetDetection, error)

DetectSkillTargets returns every local skill target supported by the requested scope, marking the targets whose local installation markers exist.

func (Manager) InstallMCP

func (manager Manager) InstallMCP(target Target, scope Scope, dryRun, force bool) (Plan, error)

InstallMCP registers the local MCP server, or returns an idempotent plan if the exact Kivgraph-managed entry already exists.

func (Manager) InstallSkill

func (manager Manager) InstallSkill(target Target, scope Scope, dryRun, force bool) (Plan, error)

InstallSkill copies the canonical embedded skill to a client-native path.

func (Manager) RemoveMCP

func (manager Manager) RemoveMCP(target Target, scope Scope, dryRun, force bool) (Plan, error)

RemoveMCP removes only an exact Kivgraph-managed MCP entry. An incompatible entry requires force, even when the target name is the same.

func (Manager) RemoveSkill

func (manager Manager) RemoveSkill(target Target, scope Scope, dryRun, force bool) (Plan, error)

RemoveSkill removes only the exact canonical skill installed by Kivgraph.

func (Manager) StatusMCP

func (manager Manager) StatusMCP(target Target, scope Scope) (Plan, error)

StatusMCP inspects one target without changing its file.

func (Manager) StatusSkill

func (manager Manager) StatusSkill(target Target, scope Scope) (Plan, error)

StatusSkill inspects one client-native skill path.

type Options

type Options struct {
	HomeDir    string
	ProjectDir string
	Executable string
	GOOS       string
}

Options identifies the filesystem roots used by a Manager. HomeDir and ProjectDir are injectable to make safety checks testable without touching a real client configuration.

type Plan

type Plan struct {
	Action  Action
	Target  Target
	Scope   Scope
	Path    string
	Status  string
	Changed bool
	DryRun  bool
	Detail  string
}

Plan describes an inspected or applied integration operation.

type Scope

type Scope string

type Target

type Target string

type TargetDetection

type TargetDetection struct {
	Target   Target
	Detected bool
}

TargetDetection reports whether a supported client appears to be installed in the requested scope.

Jump to

Keyboard shortcuts

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