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.
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.
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.
Index ¶
- Constants
- type Agent
- type AgentData
- type AgentDependencyInfo
- type AgentIdentity
- type AgentInfo
- type AssetSource
- type ClaudeIntegration
- type CursorIntegration
- type Discovery
- func (d *Discovery) DiscoverAgentWithDependencies(shortName string) (AgentDependencyInfo, error)
- func (d *Discovery) DiscoverAgents() ([]AgentInfo, error)
- func (d *Discovery) DiscoverAgentsWithDependencies(agentNames ...string) ([]AgentDependencyInfo, error)
- func (d *Discovery) DiscoverEmbeddedAgents(embeddedAssets embed.FS) ([]AgentInfo, error)
- func (d *Discovery) FormatAgentDependencyTable(agents []AgentDependencyInfo) string
- func (d *Discovery) FormatAgentSummary(agent AgentInfo) string
- func (d *Discovery) GetAgentByName(name string) (*AgentInfo, error)
- func (d *Discovery) GetAgentByShortName(shortName string) (*AgentInfo, error)
- func (d *Discovery) ListAvailableAgents() ([]string, error)
- func (d *Discovery) ValidateAgentStructure(filePath string) error
- func (d *Discovery) ValidateEmbeddedAgentNames(embeddedAssets embed.FS, agentNames []string) error
- type EmbeddedAssetSource
- type EmbeddedSource
- type FilesystemSource
- type IDEIntegration
- type Installer
- func (i *Installer) GetAgentsPath() string
- func (i *Installer) GetClaudeCommandsPath() string
- func (i *Installer) GetCursorRulesPath() string
- func (i *Installer) GetDataPath() string
- func (i *Installer) GetInstallationPath() string
- func (i *Installer) GetTasksPath() string
- func (i *Installer) GetTemplatesPath() string
- func (i *Installer) GetVSCodeChatmodesPath() string
- func (i *Installer) GetWindsurfRulesPath() string
- func (i *Installer) Install() error
- func (i *Installer) InstallClaudeIntegration() error
- func (i *Installer) InstallCursorIntegration() error
- func (i *Installer) InstallSelective(agentNames []string) error
- func (i *Installer) InstallVSCodeIntegration() error
- func (i *Installer) InstallWindsurfIntegration() error
- func (i *Installer) IsInstalled() bool
- func (i *Installer) ListInstalledAgents() ([]string, error)
- func (i *Installer) ValidateInstallation() error
- type VSCodeIntegration
- type WindsurfIntegration
Constants ¶
const ( // DefaultAgentIcon is the placeholder icon used when an agent doesn't define an icon DefaultAgentIcon = "🤖" // Source type constants FilesystemSourceType = "filesystem" EmbeddedSourceType = "embedded" )
const ( // Main framework directory structure KrciAIDir = ".krci-ai" BundleDir = "bundle" DataDir = "data" TasksDir = "tasks" TemplatesDir = "templates" // GitHub tools configuration 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
ShortName string `yaml:"-"` // Not from YAML, computed
}
AgentInfo represents basic information about an agent
type AssetSource ¶ added in v0.28.0
type AssetSource interface {
// ListAgentFiles returns a list of agent YAML file paths
ListAgentFiles() ([]string, error)
// ReadFile reads a file from the source
ReadFile(path string) ([]byte, error)
// Exists checks if a file exists in the source
Exists(path string) bool
// GetSourceType returns the type of source for logging/debugging
GetSourceType() string
}
AssetSource abstracts different sources of framework assets (filesystem vs embedded)
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 from any source
func NewDiscovery ¶
NewDiscovery creates a new asset discovery service for filesystem assets
func NewDiscoveryWithSource ¶ added in v0.28.0
func NewDiscoveryWithSource(targetDir string, embeddedAssets embed.FS, source AssetSource) *Discovery
NewDiscoveryWithSource creates a new asset discovery service with a specific source
func (*Discovery) DiscoverAgentWithDependencies ¶ added in v0.26.0
func (d *Discovery) DiscoverAgentWithDependencies(shortName string) (AgentDependencyInfo, error)
func (*Discovery) DiscoverAgents ¶
DiscoverAgents discovers and returns information about agents from the configured source
func (*Discovery) DiscoverAgentsWithDependencies ¶ added in v0.21.3
func (d *Discovery) DiscoverAgentsWithDependencies(agentNames ...string) ([]AgentDependencyInfo, error)
DiscoverAgentsWithDependencies discovers and returns agents with their complete dependency information. If agentNames is empty, discovers all agents (filesystem behavior). If agentNames provided, filters to specific agents (embedded behavior).
func (*Discovery) DiscoverEmbeddedAgents ¶ added in v0.28.0
DiscoverEmbeddedAgents discovers agents from embedded filesystem using the unified AssetSource approach
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 ¶
FormatAgentSummary returns a formatted string summarizing agent information
func (*Discovery) GetAgentByName ¶
GetAgentByName returns information about a specific agent by name
func (*Discovery) GetAgentByShortName ¶ added in v0.26.0
GetAgentByShortName returns information about a specific agent by short name
func (*Discovery) ListAvailableAgents ¶
ListAvailableAgents returns a simple list of agent names
func (*Discovery) ValidateAgentStructure ¶
ValidateAgentStructure performs basic validation of agent file structure
type EmbeddedAssetSource ¶ added in v0.28.0
type EmbeddedAssetSource interface {
AssetSource
// GetEmbeddedFS returns the underlying embedded filesystem for validation operations
GetEmbeddedFS() embed.FS
}
EmbeddedAssetSource extends AssetSource with embedded-specific functionality
type EmbeddedSource ¶ added in v0.28.0
type EmbeddedSource struct {
// contains filtered or unexported fields
}
EmbeddedSource implements AssetSource for embedded framework assets
func NewEmbeddedSource ¶ added in v0.28.0
func NewEmbeddedSource(embeddedAssets embed.FS) *EmbeddedSource
NewEmbeddedSource creates a new embedded asset source
func (*EmbeddedSource) Exists ¶ added in v0.28.0
func (es *EmbeddedSource) Exists(path string) bool
func (*EmbeddedSource) GetEmbeddedFS ¶ added in v0.28.0
func (es *EmbeddedSource) GetEmbeddedFS() embed.FS
GetEmbeddedFS implements EmbeddedAssetSource interface
func (*EmbeddedSource) GetSourceType ¶ added in v0.28.0
func (es *EmbeddedSource) GetSourceType() string
func (*EmbeddedSource) ListAgentFiles ¶ added in v0.28.0
func (es *EmbeddedSource) ListAgentFiles() ([]string, error)
type FilesystemSource ¶ added in v0.28.0
type FilesystemSource struct {
// contains filtered or unexported fields
}
FilesystemSource implements AssetSource for installed framework files
func NewFilesystemSource ¶ added in v0.28.0
func NewFilesystemSource(baseDir string) *FilesystemSource
NewFilesystemSource creates a new filesystem-based asset source
func (*FilesystemSource) Exists ¶ added in v0.28.0
func (fs *FilesystemSource) Exists(path string) bool
func (*FilesystemSource) GetSourceType ¶ added in v0.28.0
func (fs *FilesystemSource) GetSourceType() string
func (*FilesystemSource) ListAgentFiles ¶ added in v0.28.0
func (fs *FilesystemSource) ListAgentFiles() ([]string, error)
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 ¶
NewInstaller creates a new asset installer
func (*Installer) GetAgentsPath ¶
GetAgentsPath returns the path to the agents directory
func (*Installer) GetClaudeCommandsPath ¶
GetClaudeCommandsPath returns the path to the Claude commands directory
func (*Installer) GetCursorRulesPath ¶
GetCursorRulesPath returns the path to the Cursor rules directory
func (*Installer) GetDataPath ¶
GetDataPath returns the path to the data directory
func (*Installer) GetInstallationPath ¶
GetInstallationPath returns the full path to the .krci-ai directory
func (*Installer) GetTasksPath ¶
GetTasksPath returns the path to the tasks directory
func (*Installer) GetTemplatesPath ¶
GetTemplatesPath returns the path to the templates directory
func (*Installer) GetVSCodeChatmodesPath ¶
GetVSCodeChatmodesPath returns the path to the VS Code chatmodes directory
func (*Installer) GetWindsurfRulesPath ¶
GetWindsurfRulesPath returns the path to the Windsurf rules directory
func (*Installer) InstallClaudeIntegration ¶
InstallClaudeIntegration creates .claude/commands directory and generates .md files for agents
func (*Installer) InstallCursorIntegration ¶
InstallCursorIntegration creates .cursor/rules directory and generates .mdc files for agents
func (*Installer) InstallSelective ¶ added in v0.28.0
InstallSelective installs only specified agents and their dependencies using existing bundle logic
func (*Installer) InstallVSCodeIntegration ¶
InstallVSCodeIntegration creates .github/chatmodes directory and generates .chatmode.md files for agents
func (*Installer) InstallWindsurfIntegration ¶
InstallWindsurfIntegration creates .windsurf/rules directory and generates .md files for agents
func (*Installer) IsInstalled ¶
IsInstalled checks if the framework is properly installed in the target directory
func (*Installer) ListInstalledAgents ¶
ListInstalledAgents returns a list of installed agent file names
func (*Installer) ValidateInstallation ¶
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