assets

package
v0.21.3 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Copyright © 2025 KubeRocketAI Team

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	// DefaultAgentIcon is the placeholder icon used when an agent doesn't define an icon
	DefaultAgentIcon = "🤖"
)
View Source
const (

	// GitHubToolsList defines the complete set of tools available for GitHub integration
	GitHubToolsList = "" /* 163-byte string literal not displayed */
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	Agent struct {
		Identity AgentIdentity `yaml:"identity"`
	} `yaml:"agent"`
}

Agent represents the structure of an agent YAML file

type AgentData

type AgentData struct {
	Agent struct {
		Identity struct {
			Role string `yaml:"role"`
		} `yaml:"identity"`
	} `yaml:"agent"`
}

AgentData represents the parsed YAML structure for agent files

type AgentDependencyInfo added in v0.21.3

type AgentDependencyInfo struct {
	AgentInfo
	Tasks     []string `json:"tasks"`
	Templates []string `json:"templates"`
	DataFiles []string `json:"data_files"`
}

AgentDependencyInfo extends AgentInfo with dependency information

type AgentIdentity

type AgentIdentity struct {
	Name        string `yaml:"name"`
	ID          string `yaml:"id"`
	Version     string `yaml:"version"`
	Description string `yaml:"description"`
	Role        string `yaml:"role"`
	Goal        string `yaml:"goal"`
	Icon        string `yaml:"icon"`
}

AgentIdentity represents the identity section of an agent YAML

type AgentInfo

type AgentInfo struct {
	Name        string `yaml:"name"`
	Description string `yaml:"description"`
	Role        string `yaml:"role"`
	Goal        string `yaml:"goal"`
	Icon        string `yaml:"icon"`
	FilePath    string `yaml:"-"` // Not from YAML, computed
}

AgentInfo represents basic information about an agent

type ClaudeIntegration

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

ClaudeIntegration implements IDEIntegration for Claude Code

func (*ClaudeIntegration) GenerateContent

func (c *ClaudeIntegration) GenerateContent(agentName, role string, yamlContent []byte) string

func (*ClaudeIntegration) GetDirectoryPath

func (c *ClaudeIntegration) GetDirectoryPath() string

func (*ClaudeIntegration) GetFileExtension

func (c *ClaudeIntegration) GetFileExtension() string

type CursorIntegration

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

CursorIntegration implements IDEIntegration for Cursor IDE

func (*CursorIntegration) GenerateContent

func (c *CursorIntegration) GenerateContent(agentName, role string, yamlContent []byte) string

func (*CursorIntegration) GetDirectoryPath

func (c *CursorIntegration) GetDirectoryPath() string

func (*CursorIntegration) GetFileExtension

func (c *CursorIntegration) GetFileExtension() string

type Discovery

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

Discovery handles discovery and parsing of framework assets

func NewDiscovery

func NewDiscovery(targetDir string, embeddedAssets embed.FS) *Discovery

NewDiscovery creates a new asset discovery service

func (*Discovery) DiscoverAgents

func (d *Discovery) DiscoverAgents() ([]AgentInfo, error)

DiscoverAgents discovers and returns information about all installed agents

func (*Discovery) DiscoverAgentsWithDependencies added in v0.21.3

func (d *Discovery) DiscoverAgentsWithDependencies() ([]AgentDependencyInfo, error)

DiscoverAgentsWithDependencies discovers and returns agents with their complete dependency information

func (*Discovery) FormatAgentDependencyTable added in v0.21.3

func (d *Discovery) FormatAgentDependencyTable(agents []AgentDependencyInfo) string

FormatAgentDependencyTable formats agent dependency information as a table

func (*Discovery) FormatAgentSummary

func (d *Discovery) FormatAgentSummary(agent AgentInfo) string

FormatAgentSummary returns a formatted string summarizing agent information

func (*Discovery) GetAgentByName

func (d *Discovery) GetAgentByName(name string) (*AgentInfo, error)

GetAgentByName returns information about a specific agent by name

func (*Discovery) ListAvailableAgents

func (d *Discovery) ListAvailableAgents() ([]string, error)

ListAvailableAgents returns a simple list of agent names

func (*Discovery) ValidateAgentStructure

func (d *Discovery) ValidateAgentStructure(filePath string) error

ValidateAgentStructure performs basic validation of agent file structure

type IDEIntegration

type IDEIntegration interface {
	GetDirectoryPath() string
	GetFileExtension() string
	GenerateContent(agentName, role string, yamlContent []byte) string
}

IDEIntegration defines the interface for IDE-specific integrations

type Installer

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

Installer handles installation of framework assets

func NewInstaller

func NewInstaller(targetDir string, embeddedAssets embed.FS) *Installer

NewInstaller creates a new asset installer

func (*Installer) GetAgentsPath

func (i *Installer) GetAgentsPath() string

GetAgentsPath returns the path to the agents directory

func (*Installer) GetClaudeCommandsPath

func (i *Installer) GetClaudeCommandsPath() string

GetClaudeCommandsPath returns the path to the Claude commands directory

func (*Installer) GetCursorRulesPath

func (i *Installer) GetCursorRulesPath() string

GetCursorRulesPath returns the path to the Cursor rules directory

func (*Installer) GetDataPath

func (i *Installer) GetDataPath() string

GetDataPath returns the path to the data directory

func (*Installer) GetInstallationPath

func (i *Installer) GetInstallationPath() string

GetInstallationPath returns the full path to the .krci-ai directory

func (*Installer) GetTasksPath

func (i *Installer) GetTasksPath() string

GetTasksPath returns the path to the tasks directory

func (*Installer) GetTemplatesPath

func (i *Installer) GetTemplatesPath() string

GetTemplatesPath returns the path to the templates directory

func (*Installer) GetVSCodeChatmodesPath

func (i *Installer) GetVSCodeChatmodesPath() string

GetVSCodeChatmodesPath returns the path to the VS Code chatmodes directory

func (*Installer) GetWindsurfRulesPath

func (i *Installer) GetWindsurfRulesPath() string

GetWindsurfRulesPath returns the path to the Windsurf rules directory

func (*Installer) Install

func (i *Installer) Install() error

Install installs framework assets to the target directory

func (*Installer) InstallClaudeIntegration

func (i *Installer) InstallClaudeIntegration() error

InstallClaudeIntegration creates .claude/commands directory and generates .md files for agents

func (*Installer) InstallCursorIntegration

func (i *Installer) InstallCursorIntegration() error

InstallCursorIntegration creates .cursor/rules directory and generates .mdc files for agents

func (*Installer) InstallVSCodeIntegration

func (i *Installer) InstallVSCodeIntegration() error

InstallVSCodeIntegration creates .github/chatmodes directory and generates .chatmode.md files for agents

func (*Installer) InstallWindsurfIntegration

func (i *Installer) InstallWindsurfIntegration() error

InstallWindsurfIntegration creates .windsurf/rules directory and generates .md files for agents

func (*Installer) IsInstalled

func (i *Installer) IsInstalled() bool

IsInstalled checks if the framework is properly installed in the target directory

func (*Installer) ListInstalledAgents

func (i *Installer) ListInstalledAgents() ([]string, error)

ListInstalledAgents returns a list of installed agent file names

func (*Installer) ValidateInstallation

func (i *Installer) ValidateInstallation() error

ValidateInstallation performs basic validation of the installation

type VSCodeIntegration

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

VSCodeIntegration implements IDEIntegration for VS Code

func (*VSCodeIntegration) GenerateContent

func (v *VSCodeIntegration) GenerateContent(agentName, role string, yamlContent []byte) string

func (*VSCodeIntegration) GetDirectoryPath

func (v *VSCodeIntegration) GetDirectoryPath() string

func (*VSCodeIntegration) GetFileExtension

func (v *VSCodeIntegration) GetFileExtension() string

type WindsurfIntegration

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

WindsurfIntegration implements IDEIntegration for Windsurf IDE

func (*WindsurfIntegration) GenerateContent

func (w *WindsurfIntegration) GenerateContent(agentName, role string, yamlContent []byte) string

func (*WindsurfIntegration) GetDirectoryPath

func (w *WindsurfIntegration) GetDirectoryPath() string

func (*WindsurfIntegration) GetFileExtension

func (w *WindsurfIntegration) GetFileExtension() string

Jump to

Keyboard shortcuts

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