@nanocollective/nanocoder
Version:
A local-first CLI coding agent that brings the power of agentic coding tools like Claude Code and Gemini CLI to local models or controlled APIs like OpenRouter
56 lines • 1.48 kB
TypeScript
import { Message } from '../types/core.js';
export interface Command<T = React.ReactElement | void> {
name: string;
description: string;
handler: (args: string[], messages: Message[], metadata: {
provider: string;
model: string;
tokens: number;
getMessageTokens: (message: Message) => number;
}) => Promise<T>;
}
export interface ParsedCommand {
isCommand: boolean;
command?: string;
args?: string[];
fullCommand?: string;
isBashCommand?: boolean;
bashCommand?: string;
}
export interface CustomCommandMetadata {
description?: string;
aliases?: string[];
parameters?: string[];
tags?: string[];
triggers?: string[];
estimatedTokens?: number;
category?: string;
version?: string;
author?: string;
examples?: string[];
references?: string[];
dependencies?: string[];
}
export interface CommandResource {
name: string;
path: string;
type: 'script' | 'template' | 'document' | 'config';
description?: string;
executable?: boolean;
}
export interface CustomCommand {
name: string;
path: string;
namespace?: string;
fullName: string;
metadata: CustomCommandMetadata;
content: string;
source?: 'personal' | 'project';
lastModified?: Date;
loadedResources?: CommandResource[];
}
export interface ParsedCustomCommand {
metadata: CustomCommandMetadata;
content: string;
}
//# sourceMappingURL=commands.d.ts.map