@coding-agent-fabric/common
v0.1.3
Published
Shared types, utilities, and constants for coding-agent-fabric
Maintainers
Readme
coding-agent-fabric-common
Shared types, utilities, and constants for coding-agent-fabric.
Overview
This package provides the foundational types and utilities used across all coding-agent-fabric packages. It includes:
- Types: Core type definitions for resources, agents, sources, and lock files
- Constants: Configuration constants and default values
- Utilities: Helper functions for parsing sources, path manipulation, and more
Installation
This package is internal to the coding-agent-fabric monorepo and is not published separately.
Usage
import {
AgentType,
Resource,
ParsedSource,
parseSource,
getCurrentTimestamp,
LOCK_FILE_VERSION,
} from 'coding-agent-fabric-common';
// Parse a source string
const source = parseSource('vercel-labs/agent-skills');
console.log(source); // { type: 'github', owner: 'vercel-labs', repo: 'agent-skills', ... }
// Get current timestamp
const timestamp = getCurrentTimestamp();Exports
Types
AgentType- Supported agent typesScope- Installation scope (global/project)InstallMode- Installation mode (symlink/copy)SourceType- Source types (github/gitlab/npm/local/http/registry)NamingStrategy- Conflict resolution strategiesParsedSource- Parsed source informationResource- Base resource definitionInstallTarget- Installation target configurationInstalledResource- Installed resource informationValidationResult- Validation resultUpdateCheck- Update check resultAgentConfig- Agent configurationLockFile- Lock file structure (version 2)- And many more...
Constants
LOCK_FILE_VERSION- Current lock file version (2)CONFIG_DIR_NAME- Configuration directory name (.coding-agent-fabric)SKILL_FILE_NAME- Skill file name (SKILL.md)CORE_RESOURCE_TYPES- Core resource types (skills, subagents)BUNDLED_PLUGINS- Bundled plugin IDs- And many more...
Utilities
parseSource(input)- Parse a source string into ParsedSourcenormalizePath(path)- Normalize a path (expand ~, remove trailing slashes)isValidSemver(version)- Check if a version is valid semvercompareSemver(v1, v2)- Compare two semantic versionsgetCurrentTimestamp()- Get current ISO timestampextractCategories(sourcePath)- Extract categories from pathgenerateSmartName(originalName, categories)- Generate disambiguated name- And many more...
License
Apache-2.0
