Skip to content

Commit b92b7f1

Browse files
committed
feat(types): add llms-txt type definitions
Add AgentFile and LlmsTxtResult interfaces for llms.txt generation and export from the shared types barrel.
1 parent e42fff4 commit b92b7f1

2 files changed

Lines changed: 32 additions & 0 deletions

File tree

shared/types/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ export * from './skills'
1111
export * from './compare'
1212
export * from './version-downloads'
1313
export * from './install-size'
14+
export * from './llms-txt'

shared/types/llms-txt.ts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/**
2+
* Agent instruction file discovered in a package
3+
*/
4+
export interface AgentFile {
5+
/** Relative path within the package (e.g., "CLAUDE.md", ".github/copilot-instructions.md") */
6+
path: string
7+
/** File content */
8+
content: string
9+
/** Human-readable display name (e.g., "Claude Code", "GitHub Copilot") */
10+
displayName: string
11+
}
12+
13+
/**
14+
* Result of gathering all data needed to generate llms.txt
15+
*/
16+
export interface LlmsTxtResult {
17+
/** Package name (e.g., "nuxt" or "@nuxt/kit") */
18+
packageName: string
19+
/** Resolved version (e.g., "3.12.0") */
20+
version: string
21+
/** Package description from packument */
22+
description?: string
23+
/** Homepage URL */
24+
homepage?: string
25+
/** Repository URL */
26+
repositoryUrl?: string
27+
/** README content (raw markdown) */
28+
readme?: string
29+
/** Discovered agent instruction files */
30+
agentFiles: AgentFile[]
31+
}

0 commit comments

Comments
 (0)