Skip to content

Commit 4ba35ca

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 c3090e0 commit 4ba35ca

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

shared/types/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ export * from './i18n-status'
99
export * from './comparison'
1010
export * from './skills'
1111
export * from './version-downloads'
12+
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)