@a16njs/models
v0.8.0
Published
Type definitions and plugin interface for a16n
Readme
@a16njs/models
Type definitions and plugin interface for a16n.
Installation
npm install @a16njs/modelsUsage
import {
CustomizationType,
type A16nPlugin,
type AgentCustomization,
type GlobalPrompt,
isGlobalPrompt,
createId,
} from '@a16njs/models';Exports
Types
CustomizationType- Enum of customization types (GlobalPrompt, SimpleAgentSkill, AgentSkillIO, FileRule, AgentIgnore, ManualPrompt)AgentCustomization- Base interface for all customizationsGlobalPrompt- Always-applied promptsSimpleAgentSkill- Context-triggered by descriptionAgentSkillIO- Complex skills with resources/filesFileRule- Triggered by file patternsAgentIgnore- Ignore patternsManualPrompt- User-invoked prompts (e.g.,/command), stored in.cursor/skills/or.claude/skills/withdisable-model-invocation: true
Plugin Interface
A16nPlugin- Interface that plugins must implementDiscoveryResult- Result of discovering customizationsEmitResult- Result of emitting customizationsWrittenFile- Info about a written file
Warnings
WarningCode- Enum of warning codes (Merged, Approximated, Skipped, Overwritten)Warning- Warning structure
Helpers
isGlobalPrompt(item)- Type guard for GlobalPromptisSimpleAgentSkill(item)- Type guard for SimpleAgentSkillisAgentSkillIO(item)- Type guard for AgentSkillIOisFileRule(item)- Type guard for FileRuleisAgentIgnore(item)- Type guard for AgentIgnoreisManualPrompt(item)- Type guard for ManualPromptcreateId(type, sourcePath)- Create unique ID
Documentation
Full documentation available at https://texarkanine.github.io/a16n/models.
