axiom-mcp 2.19.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +409 -0
- package/dist/bundle.json +609177 -0
- package/dist/catalog/index.d.ts +26 -0
- package/dist/catalog/index.d.ts.map +1 -0
- package/dist/catalog/index.js +173 -0
- package/dist/catalog/index.js.map +1 -0
- package/dist/config.d.ts +31 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +60 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +130 -0
- package/dist/index.js.map +1 -0
- package/dist/loader/dev-loader.d.ts +55 -0
- package/dist/loader/dev-loader.d.ts.map +1 -0
- package/dist/loader/dev-loader.js +223 -0
- package/dist/loader/dev-loader.js.map +1 -0
- package/dist/loader/parser.d.ts +117 -0
- package/dist/loader/parser.d.ts.map +1 -0
- package/dist/loader/parser.js +204 -0
- package/dist/loader/parser.js.map +1 -0
- package/dist/loader/prod-loader.d.ts +42 -0
- package/dist/loader/prod-loader.d.ts.map +1 -0
- package/dist/loader/prod-loader.js +144 -0
- package/dist/loader/prod-loader.js.map +1 -0
- package/dist/loader/types.d.ts +55 -0
- package/dist/loader/types.d.ts.map +1 -0
- package/dist/loader/types.js +2 -0
- package/dist/loader/types.js.map +1 -0
- package/dist/loader/xcode-docs.d.ts +18 -0
- package/dist/loader/xcode-docs.d.ts.map +1 -0
- package/dist/loader/xcode-docs.js +91 -0
- package/dist/loader/xcode-docs.js.map +1 -0
- package/dist/prompts/handler.d.ts +57 -0
- package/dist/prompts/handler.d.ts.map +1 -0
- package/dist/prompts/handler.js +95 -0
- package/dist/prompts/handler.js.map +1 -0
- package/dist/resources/handler.d.ts +51 -0
- package/dist/resources/handler.d.ts.map +1 -0
- package/dist/resources/handler.js +99 -0
- package/dist/resources/handler.js.map +1 -0
- package/dist/scripts/bundle.d.ts +13 -0
- package/dist/scripts/bundle.d.ts.map +1 -0
- package/dist/scripts/bundle.js +137 -0
- package/dist/scripts/bundle.js.map +1 -0
- package/dist/search/index.d.ts +65 -0
- package/dist/search/index.d.ts.map +1 -0
- package/dist/search/index.js +227 -0
- package/dist/search/index.js.map +1 -0
- package/dist/tools/handler.d.ts +40 -0
- package/dist/tools/handler.d.ts.map +1 -0
- package/dist/tools/handler.js +265 -0
- package/dist/tools/handler.js.map +1 -0
- package/package.json +53 -0
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import { readdir, readFile, stat } from 'fs/promises';
|
|
2
|
+
import { join } from 'path';
|
|
3
|
+
import { parseSkill, parseCommand, parseAgent, applyAnnotations } from './parser.js';
|
|
4
|
+
import { buildIndex, search } from '../search/index.js';
|
|
5
|
+
import { buildCatalog } from '../catalog/index.js';
|
|
6
|
+
import { detectXcode, loadAppleDocs } from './xcode-docs.js';
|
|
7
|
+
/**
|
|
8
|
+
* Development mode loader - reads live files from Claude Code plugin directory
|
|
9
|
+
*/
|
|
10
|
+
export class DevLoader {
|
|
11
|
+
pluginPath;
|
|
12
|
+
logger;
|
|
13
|
+
config;
|
|
14
|
+
skillsCache = new Map();
|
|
15
|
+
commandsCache = new Map();
|
|
16
|
+
agentsCache = new Map();
|
|
17
|
+
searchIndex = null;
|
|
18
|
+
constructor(pluginPath, logger, config) {
|
|
19
|
+
this.pluginPath = pluginPath;
|
|
20
|
+
this.logger = logger;
|
|
21
|
+
this.config = config;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Load MCP annotations from skill-annotations.json (co-located with mcp-server/)
|
|
25
|
+
*/
|
|
26
|
+
async loadAnnotations() {
|
|
27
|
+
// Try multiple resolution strategies for skill-annotations.json
|
|
28
|
+
const candidates = [
|
|
29
|
+
join(this.pluginPath, '..', '..', 'mcp-server', 'skill-annotations.json'),
|
|
30
|
+
join(process.cwd(), 'skill-annotations.json'),
|
|
31
|
+
];
|
|
32
|
+
for (const annotationsPath of candidates) {
|
|
33
|
+
try {
|
|
34
|
+
const content = await readFile(annotationsPath, 'utf-8');
|
|
35
|
+
this.logger.debug(`Loaded annotations from: ${annotationsPath}`);
|
|
36
|
+
return JSON.parse(content);
|
|
37
|
+
}
|
|
38
|
+
catch {
|
|
39
|
+
// Try next candidate
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
this.logger.debug('No skill-annotations.json found, using defaults');
|
|
43
|
+
return {};
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Load all skills from the plugin directory
|
|
47
|
+
* Skills live in subdirectories: skills/<name>/SKILL.md
|
|
48
|
+
*/
|
|
49
|
+
async loadSkills() {
|
|
50
|
+
const skillsDir = join(this.pluginPath, 'skills');
|
|
51
|
+
this.logger.debug(`Loading skills from: ${skillsDir}`);
|
|
52
|
+
// Invalidate search index so it rebuilds with the new skill set
|
|
53
|
+
this.searchIndex = null;
|
|
54
|
+
try {
|
|
55
|
+
const annotations = await this.loadAnnotations();
|
|
56
|
+
const entries = await readdir(skillsDir);
|
|
57
|
+
let loadedCount = 0;
|
|
58
|
+
for (const entry of entries) {
|
|
59
|
+
const entryPath = join(skillsDir, entry);
|
|
60
|
+
const entryStat = await stat(entryPath);
|
|
61
|
+
if (entryStat.isDirectory()) {
|
|
62
|
+
const skillFile = join(entryPath, 'SKILL.md');
|
|
63
|
+
try {
|
|
64
|
+
const content = await readFile(skillFile, 'utf-8');
|
|
65
|
+
const skill = applyAnnotations(parseSkill(content, entry), annotations);
|
|
66
|
+
this.skillsCache.set(skill.name, skill);
|
|
67
|
+
this.logger.debug(`Loaded skill: ${skill.name}`);
|
|
68
|
+
loadedCount++;
|
|
69
|
+
}
|
|
70
|
+
catch {
|
|
71
|
+
this.logger.debug(`No SKILL.md in ${entry}, skipping`);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
this.logger.info(`Found ${loadedCount} skills`);
|
|
76
|
+
// Load Apple docs from Xcode (runtime, not bundled)
|
|
77
|
+
if (this.config?.enableAppleDocs !== false) {
|
|
78
|
+
await this.loadAppleDocsIntoCache();
|
|
79
|
+
}
|
|
80
|
+
return this.skillsCache;
|
|
81
|
+
}
|
|
82
|
+
catch (error) {
|
|
83
|
+
this.logger.error(`Failed to load skills:`, error);
|
|
84
|
+
throw error;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
async loadAppleDocsIntoCache() {
|
|
88
|
+
const xcodeConfig = await detectXcode(this.config?.xcodePath);
|
|
89
|
+
if (!xcodeConfig) {
|
|
90
|
+
this.logger.info('Xcode not found, skipping Apple docs');
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
const appleDocs = await loadAppleDocs(xcodeConfig, this.logger);
|
|
94
|
+
for (const [name, skill] of appleDocs) {
|
|
95
|
+
this.skillsCache.set(name, skill);
|
|
96
|
+
}
|
|
97
|
+
this.logger.info(`Loaded ${appleDocs.size} Apple docs from Xcode`);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Load all commands from the plugin directory
|
|
101
|
+
*/
|
|
102
|
+
async loadCommands() {
|
|
103
|
+
const commandsDir = join(this.pluginPath, 'commands');
|
|
104
|
+
this.logger.debug(`Loading commands from: ${commandsDir}`);
|
|
105
|
+
try {
|
|
106
|
+
const files = await readdir(commandsDir);
|
|
107
|
+
const commandFiles = files.filter(f => f.endsWith('.md'));
|
|
108
|
+
this.logger.info(`Found ${commandFiles.length} command files`);
|
|
109
|
+
for (const file of commandFiles) {
|
|
110
|
+
try {
|
|
111
|
+
const filePath = join(commandsDir, file);
|
|
112
|
+
const content = await readFile(filePath, 'utf-8');
|
|
113
|
+
const command = parseCommand(content, file);
|
|
114
|
+
this.commandsCache.set(command.name, command);
|
|
115
|
+
this.logger.debug(`Loaded command: ${command.name}`);
|
|
116
|
+
}
|
|
117
|
+
catch (err) {
|
|
118
|
+
this.logger.warn(`Failed to parse command ${file}, skipping`);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return this.commandsCache;
|
|
122
|
+
}
|
|
123
|
+
catch (error) {
|
|
124
|
+
this.logger.error(`Failed to load commands:`, error);
|
|
125
|
+
throw error;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Load all agents from the plugin directory
|
|
130
|
+
*/
|
|
131
|
+
async loadAgents() {
|
|
132
|
+
const agentsDir = join(this.pluginPath, 'agents');
|
|
133
|
+
this.logger.debug(`Loading agents from: ${agentsDir}`);
|
|
134
|
+
try {
|
|
135
|
+
const files = await readdir(agentsDir);
|
|
136
|
+
const agentFiles = files.filter(f => f.endsWith('.md'));
|
|
137
|
+
this.logger.info(`Found ${agentFiles.length} agent files`);
|
|
138
|
+
for (const file of agentFiles) {
|
|
139
|
+
const filePath = join(agentsDir, file);
|
|
140
|
+
const content = await readFile(filePath, 'utf-8');
|
|
141
|
+
const agent = parseAgent(content, file);
|
|
142
|
+
this.agentsCache.set(agent.name, agent);
|
|
143
|
+
this.logger.debug(`Loaded agent: ${agent.name}`);
|
|
144
|
+
}
|
|
145
|
+
return this.agentsCache;
|
|
146
|
+
}
|
|
147
|
+
catch (error) {
|
|
148
|
+
this.logger.error(`Failed to load agents:`, error);
|
|
149
|
+
throw error;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
async getSkill(name) {
|
|
153
|
+
if (this.skillsCache.size === 0) {
|
|
154
|
+
await this.loadSkills();
|
|
155
|
+
}
|
|
156
|
+
return this.skillsCache.get(name);
|
|
157
|
+
}
|
|
158
|
+
async getCommand(name) {
|
|
159
|
+
if (this.commandsCache.size === 0) {
|
|
160
|
+
await this.loadCommands();
|
|
161
|
+
}
|
|
162
|
+
return this.commandsCache.get(name);
|
|
163
|
+
}
|
|
164
|
+
async getAgent(name) {
|
|
165
|
+
if (this.agentsCache.size === 0) {
|
|
166
|
+
await this.loadAgents();
|
|
167
|
+
}
|
|
168
|
+
return this.agentsCache.get(name);
|
|
169
|
+
}
|
|
170
|
+
async getSkillSections(name, sectionNames) {
|
|
171
|
+
const skill = await this.getSkill(name);
|
|
172
|
+
if (!skill)
|
|
173
|
+
return undefined;
|
|
174
|
+
if (!sectionNames || sectionNames.length === 0) {
|
|
175
|
+
return { skill, content: skill.content, sections: skill.sections };
|
|
176
|
+
}
|
|
177
|
+
const lines = skill.content.split('\n');
|
|
178
|
+
const matchedSections = [];
|
|
179
|
+
const contentParts = [];
|
|
180
|
+
for (const section of skill.sections) {
|
|
181
|
+
const matches = sectionNames.some(filter => section.heading.toLowerCase().includes(filter.toLowerCase()));
|
|
182
|
+
if (matches) {
|
|
183
|
+
matchedSections.push(section);
|
|
184
|
+
contentParts.push(lines.slice(section.startLine, section.endLine + 1).join('\n'));
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
return {
|
|
188
|
+
skill,
|
|
189
|
+
content: contentParts.join('\n\n'),
|
|
190
|
+
sections: matchedSections,
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
async searchSkills(query, options) {
|
|
194
|
+
if (this.skillsCache.size === 0) {
|
|
195
|
+
await this.loadSkills();
|
|
196
|
+
}
|
|
197
|
+
if (!this.searchIndex) {
|
|
198
|
+
this.logger.debug('Building search index');
|
|
199
|
+
this.searchIndex = buildIndex(this.skillsCache);
|
|
200
|
+
this.logger.info(`Search index built: ${this.searchIndex.docCount} documents`);
|
|
201
|
+
}
|
|
202
|
+
return search(this.searchIndex, query, options, this.skillsCache);
|
|
203
|
+
}
|
|
204
|
+
async getCatalog(category) {
|
|
205
|
+
if (this.skillsCache.size === 0) {
|
|
206
|
+
await this.loadSkills();
|
|
207
|
+
}
|
|
208
|
+
if (this.agentsCache.size === 0) {
|
|
209
|
+
await this.loadAgents();
|
|
210
|
+
}
|
|
211
|
+
return buildCatalog(this.skillsCache, this.agentsCache, category);
|
|
212
|
+
}
|
|
213
|
+
getSkills() {
|
|
214
|
+
return this.skillsCache;
|
|
215
|
+
}
|
|
216
|
+
getCommands() {
|
|
217
|
+
return this.commandsCache;
|
|
218
|
+
}
|
|
219
|
+
getAgents() {
|
|
220
|
+
return this.agentsCache;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
//# sourceMappingURL=dev-loader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dev-loader.js","sourceRoot":"","sources":["../../src/loader/dev-loader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAyD,MAAM,aAAa,CAAC;AAG5I,OAAO,EAAE,UAAU,EAAE,MAAM,EAA6B,MAAM,oBAAoB,CAAC;AACnF,OAAO,EAAE,YAAY,EAAiB,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE7D;;GAEG;AACH,MAAM,OAAO,SAAS;IAOV;IACA;IACA;IARF,WAAW,GAAG,IAAI,GAAG,EAAiB,CAAC;IACvC,aAAa,GAAG,IAAI,GAAG,EAAmB,CAAC;IAC3C,WAAW,GAAG,IAAI,GAAG,EAAiB,CAAC;IACvC,WAAW,GAAuB,IAAI,CAAC;IAE/C,YACU,UAAkB,EAClB,MAAc,EACd,MAAe;QAFf,eAAU,GAAV,UAAU,CAAQ;QAClB,WAAM,GAAN,MAAM,CAAQ;QACd,WAAM,GAAN,MAAM,CAAS;IACtB,CAAC;IAEJ;;OAEG;IACK,KAAK,CAAC,eAAe;QAC3B,gEAAgE;QAChE,MAAM,UAAU,GAAG;YACjB,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,wBAAwB,CAAC;YACzE,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,wBAAwB,CAAC;SAC9C,CAAC;QAEF,KAAK,MAAM,eA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AK,EAAE,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IACpE,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,QAAiB;QAChC,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;YAChC,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC;QAC1B,CAAC;QACD,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;YAChC,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC;QAC1B,CAAC;QAED,OAAO,YAAY,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;IACpE,CAAC;IAED,SAAS;QACP,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED,WAAW;QACT,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IAED,SAAS;QACP,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;CACF"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP-specific annotations for skills
|
|
3
|
+
*/
|
|
4
|
+
export interface SkillMcpAnnotation {
|
|
5
|
+
category?: string;
|
|
6
|
+
tags?: string[];
|
|
7
|
+
related?: string[];
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* MCP-specific annotations for commands (prompts)
|
|
11
|
+
*/
|
|
12
|
+
export interface CommandMcpAnnotation {
|
|
13
|
+
category?: string;
|
|
14
|
+
tags?: string[];
|
|
15
|
+
related?: string[];
|
|
16
|
+
arguments?: {
|
|
17
|
+
name: string;
|
|
18
|
+
description: string;
|
|
19
|
+
required: boolean;
|
|
20
|
+
default?: string;
|
|
21
|
+
}[];
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* MCP-specific annotations for agents (tools)
|
|
25
|
+
*/
|
|
26
|
+
export interface AgentMcpAnnotation {
|
|
27
|
+
category?: string;
|
|
28
|
+
tags?: string[];
|
|
29
|
+
related?: string[];
|
|
30
|
+
inputSchema?: any;
|
|
31
|
+
annotations?: {
|
|
32
|
+
readOnly?: boolean;
|
|
33
|
+
destructive?: boolean;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* A section within a skill's markdown content
|
|
38
|
+
*/
|
|
39
|
+
export interface SkillSection {
|
|
40
|
+
heading: string;
|
|
41
|
+
level: number;
|
|
42
|
+
startLine: number;
|
|
43
|
+
endLine: number;
|
|
44
|
+
charCount: number;
|
|
45
|
+
}
|
|
46
|
+
export type SkillType = 'discipline' | 'reference' | 'diagnostic' | 'router' | 'meta';
|
|
47
|
+
export type SkillSource = 'axiom' | 'apple';
|
|
48
|
+
/**
|
|
49
|
+
* Parsed skill metadata
|
|
50
|
+
*/
|
|
51
|
+
export interface Skill {
|
|
52
|
+
name: string;
|
|
53
|
+
description: string;
|
|
54
|
+
content: string;
|
|
55
|
+
skillType: SkillType;
|
|
56
|
+
source: SkillSource;
|
|
57
|
+
category?: string;
|
|
58
|
+
tags: string[];
|
|
59
|
+
related: string[];
|
|
60
|
+
sections: SkillSection[];
|
|
61
|
+
mcp?: SkillMcpAnnotation;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Parsed command metadata
|
|
65
|
+
*/
|
|
66
|
+
export interface Command {
|
|
67
|
+
name: string;
|
|
68
|
+
description: string;
|
|
69
|
+
content: string;
|
|
70
|
+
mcp?: CommandMcpAnnotation;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Parsed agent metadata
|
|
74
|
+
*/
|
|
75
|
+
export interface Agent {
|
|
76
|
+
name: string;
|
|
77
|
+
description: string;
|
|
78
|
+
model?: string;
|
|
79
|
+
content: string;
|
|
80
|
+
mcp?: AgentMcpAnnotation;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Parse markdown content into sections based on ## headings.
|
|
84
|
+
* Content before the first ## heading becomes the "_preamble" section.
|
|
85
|
+
*/
|
|
86
|
+
export declare function parseSections(content: string): SkillSection[];
|
|
87
|
+
/**
|
|
88
|
+
* Parse a skill markdown file.
|
|
89
|
+
* MCP annotations (category, tags, related) are merged externally via applyAnnotations().
|
|
90
|
+
*/
|
|
91
|
+
export declare function parseSkill(content: string, filename: string): Skill;
|
|
92
|
+
/**
|
|
93
|
+
* MCP annotations for skills that need explicit search/catalog metadata.
|
|
94
|
+
* Loaded from skill-annotations.json to keep SKILL.md files spec-compliant.
|
|
95
|
+
*/
|
|
96
|
+
export interface SkillAnnotations {
|
|
97
|
+
[skillName: string]: SkillMcpAnnotation;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Apply external MCP annotations to a parsed skill.
|
|
101
|
+
* Annotations from the file override any existing values.
|
|
102
|
+
*/
|
|
103
|
+
export declare function applyAnnotations(skill: Skill, annotations: SkillAnnotations): Skill;
|
|
104
|
+
/**
|
|
105
|
+
* Parse a command markdown file
|
|
106
|
+
*/
|
|
107
|
+
export declare function parseCommand(content: string, filename: string): Command;
|
|
108
|
+
/**
|
|
109
|
+
* Parse an agent markdown file
|
|
110
|
+
*/
|
|
111
|
+
export declare function parseAgent(content: string, filename: string): Agent;
|
|
112
|
+
/**
|
|
113
|
+
* Parse an Apple documentation markdown file (no frontmatter).
|
|
114
|
+
* Used for Xcode-bundled AdditionalDocumentation and Swift diagnostics.
|
|
115
|
+
*/
|
|
116
|
+
export declare function parseAppleDoc(content: string, filename: string, docType: 'guide' | 'diagnostic'): Skill;
|
|
117
|
+
//# sourceMappingURL=parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../src/loader/parser.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,EA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CAiDP"}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import matter from 'gray-matter';
|
|
2
|
+
/**
|
|
3
|
+
* Parse markdown content into sections based on ## headings.
|
|
4
|
+
* Content before the first ## heading becomes the "_preamble" section.
|
|
5
|
+
*/
|
|
6
|
+
export function parseSections(content) {
|
|
7
|
+
const lines = content.split('\n');
|
|
8
|
+
const sections = [];
|
|
9
|
+
let currentHeading = null;
|
|
10
|
+
let currentLevel = 0;
|
|
11
|
+
let currentStart = 0;
|
|
12
|
+
for (let i = 0; i < lines.length; i++) {
|
|
13
|
+
const match = lines[i].match(/^(#{1,6})\s+(.+)$/);
|
|
14
|
+
if (match && match[1].length <= 2) {
|
|
15
|
+
// Close previous section
|
|
16
|
+
if (currentHeading !== null || (i > 0 && sections.length === 0)) {
|
|
17
|
+
const heading = currentHeading ?? '_preamble';
|
|
18
|
+
const startLine = currentStart;
|
|
19
|
+
const endLine = i - 1;
|
|
20
|
+
const sectionContent = lines.slice(startLine, i).join('\n');
|
|
21
|
+
sections.push({
|
|
22
|
+
heading,
|
|
23
|
+
level: currentHeading ? currentLevel : 0,
|
|
24
|
+
startLine,
|
|
25
|
+
endLine,
|
|
26
|
+
charCount: sectionContent.length,
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
currentHeading = match[2].trim();
|
|
30
|
+
currentLevel = match[1].length;
|
|
31
|
+
currentStart = i;
|
|
32
|
+
}
|
|
33
|
+
else if (i === 0 && !lines[i].match(/^#{1,2}\s/)) {
|
|
34
|
+
// Content starts before any heading — will become preamble
|
|
35
|
+
currentHeading = null;
|
|
36
|
+
currentStart = 0;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
// Close final section
|
|
40
|
+
const finalHeading = currentHeading ?? (sections.length === 0 ? '_preamble' : null);
|
|
41
|
+
if (finalHeading !== null) {
|
|
42
|
+
const sectionContent = lines.slice(currentStart).join('\n');
|
|
43
|
+
sections.push({
|
|
44
|
+
heading: finalHeading,
|
|
45
|
+
level: currentHeading ? currentLevel : 0,
|
|
46
|
+
startLine: currentStart,
|
|
47
|
+
endLine: lines.length - 1,
|
|
48
|
+
charCount: sectionContent.length,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
return sections;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Skills whose type can't be inferred from name conventions alone.
|
|
55
|
+
* Maintained here so SKILL.md frontmatter doesn't need a non-standard skill_type field.
|
|
56
|
+
*/
|
|
57
|
+
const SKILL_TYPE_OVERRIDES = {
|
|
58
|
+
'axiom-apple-docs': 'router',
|
|
59
|
+
'axiom-getting-started': 'discipline',
|
|
60
|
+
'axiom-haptics': 'reference',
|
|
61
|
+
'axiom-localization': 'reference',
|
|
62
|
+
'axiom-privacy-ux': 'reference',
|
|
63
|
+
'axiom-sqlitedata-migration': 'reference',
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Infer skill type from name conventions, with explicit overrides for edge cases
|
|
67
|
+
*/
|
|
68
|
+
function inferSkillType(name) {
|
|
69
|
+
if (SKILL_TYPE_OVERRIDES[name])
|
|
70
|
+
return SKILL_TYPE_OVERRIDES[name];
|
|
71
|
+
if (name.match(/^axiom-ios-/))
|
|
72
|
+
return 'router';
|
|
73
|
+
if (name === 'axiom-using-axiom')
|
|
74
|
+
return 'meta';
|
|
75
|
+
if (name.endsWith('-ref'))
|
|
76
|
+
return 'reference';
|
|
77
|
+
if (name.endsWith('-diag'))
|
|
78
|
+
return 'diagnostic';
|
|
79
|
+
return 'discipline';
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Parse a skill markdown file.
|
|
83
|
+
* MCP annotations (category, tags, related) are merged externally via applyAnnotations().
|
|
84
|
+
*/
|
|
85
|
+
export function parseSkill(content, filename) {
|
|
86
|
+
const parsed = matter(content);
|
|
87
|
+
const data = parsed.data;
|
|
88
|
+
const name = data.name || extractNameFromFilename(filename);
|
|
89
|
+
// Support both spec-compliant frontmatter and legacy mcp: block (backward-compatible)
|
|
90
|
+
const mcp = data.mcp;
|
|
91
|
+
return {
|
|
92
|
+
name,
|
|
93
|
+
description: data.description || '',
|
|
94
|
+
content: parsed.content,
|
|
95
|
+
skillType: inferSkillType(name),
|
|
96
|
+
source: 'axiom',
|
|
97
|
+
category: mcp?.category,
|
|
98
|
+
tags: mcp?.tags || [],
|
|
99
|
+
related: mcp?.related || [],
|
|
100
|
+
sections: parseSections(parsed.content),
|
|
101
|
+
mcp,
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Apply external MCP annotations to a parsed skill.
|
|
106
|
+
* Annotations from the file override any existing values.
|
|
107
|
+
*/
|
|
108
|
+
export function applyAnnotations(skill, annotations) {
|
|
109
|
+
const ann = annotations[skill.name];
|
|
110
|
+
if (!ann)
|
|
111
|
+
return skill;
|
|
112
|
+
return {
|
|
113
|
+
...skill,
|
|
114
|
+
category: ann.category ?? skill.category,
|
|
115
|
+
tags: ann.tags ?? skill.tags,
|
|
116
|
+
related: ann.related ?? skill.related,
|
|
117
|
+
mcp: ann,
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Parse a command markdown file
|
|
122
|
+
*/
|
|
123
|
+
export function parseCommand(content, filename) {
|
|
124
|
+
const parsed = matter(content);
|
|
125
|
+
const data = parsed.data;
|
|
126
|
+
return {
|
|
127
|
+
name: data.name || extractNameFromFilename(filename),
|
|
128
|
+
description: data.description || '',
|
|
129
|
+
content: parsed.content,
|
|
130
|
+
mcp: data.mcp
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Parse an agent markdown file
|
|
135
|
+
*/
|
|
136
|
+
export function parseAgent(content, filename) {
|
|
137
|
+
const parsed = matter(content);
|
|
138
|
+
const data = parsed.data;
|
|
139
|
+
return {
|
|
140
|
+
name: data.name || extractNameFromFilename(filename),
|
|
141
|
+
description: data.description || '',
|
|
142
|
+
model: data.model,
|
|
143
|
+
content: parsed.content,
|
|
144
|
+
mcp: data.mcp
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Parse an Apple documentation markdown file (no frontmatter).
|
|
149
|
+
* Used for Xcode-bundled AdditionalDocumentation and Swift diagnostics.
|
|
150
|
+
*/
|
|
151
|
+
export function parseAppleDoc(content, filename, docType) {
|
|
152
|
+
const baseName = filename.replace(/\.md$/, '');
|
|
153
|
+
// Build a normalized skill name from the filename
|
|
154
|
+
const slug = baseName
|
|
155
|
+
.replace(/[^a-zA-Z0-9]+/g, '-')
|
|
156
|
+
.replace(/^-|-$/g, '')
|
|
157
|
+
.toLowerCase();
|
|
158
|
+
const prefix = docType === 'guide' ? 'apple-guide' : 'apple-diag';
|
|
159
|
+
const name = `${prefix}-${slug}`;
|
|
160
|
+
// Extract title from first # heading
|
|
161
|
+
const titleMatch = content.match(/^#\s+(.+)$/m);
|
|
162
|
+
const title = titleMatch ? titleMatch[1].trim() : baseName.replace(/-/g, ' ');
|
|
163
|
+
// Extract description from first paragraph after the title
|
|
164
|
+
const lines = content.split('\n');
|
|
165
|
+
let description = '';
|
|
166
|
+
let pastTitle = false;
|
|
167
|
+
for (const line of lines) {
|
|
168
|
+
if (!pastTitle) {
|
|
169
|
+
if (line.match(/^#\s+/)) {
|
|
170
|
+
pastTitle = true;
|
|
171
|
+
}
|
|
172
|
+
continue;
|
|
173
|
+
}
|
|
174
|
+
const trimmed = line.trim();
|
|
175
|
+
if (trimmed === '')
|
|
176
|
+
continue;
|
|
177
|
+
if (trimmed.startsWith('#'))
|
|
178
|
+
break;
|
|
179
|
+
description = trimmed;
|
|
180
|
+
break;
|
|
181
|
+
}
|
|
182
|
+
// Infer tags from filename components
|
|
183
|
+
const tags = baseName
|
|
184
|
+
.split(/[-_]/)
|
|
185
|
+
.filter(t => t.length > 2)
|
|
186
|
+
.map(t => t.toLowerCase());
|
|
187
|
+
return {
|
|
188
|
+
name,
|
|
189
|
+
description: description || title,
|
|
190
|
+
content,
|
|
191
|
+
skillType: docType === 'diagnostic' ? 'diagnostic' : 'reference',
|
|
192
|
+
source: 'apple',
|
|
193
|
+
tags,
|
|
194
|
+
related: [],
|
|
195
|
+
sections: parseSections(content),
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Extract name from filename (remove extension)
|
|
200
|
+
*/
|
|
201
|
+
function extractNameFromFilename(filename) {
|
|
202
|
+
return filename.replace(/\.md$/, '');
|
|
203
|
+
}
|
|
204
|
+
//# sourceMappingURL=parser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parser.js","sourceRoot":"","sources":["../../src/loader/parser.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AA4FjC;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,OAAe;IAC3C,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAClC,MAAM,QAAQ,GAAmB,EAAE,CAAC;IACpC,IAAI,cAAc,GAAkB,IAAI,CAAC;IACzC,IAAI,YAAY,GAAG,CAAC,CAAC;IACrB,IAAI,YAAY,GAAG,CAAC,CAAC;IAErB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACtC,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAClD,IAAI,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC;YAClC,yBAAyB;YACzB,IAAI,cAAc,KAAK,IAAI,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,CAAC,EAAE,CAAC;gBAChE,MAAM,OAAO,GAAG,cAAc,IAAI,WAAW,CAAC;gBAC9C,MAAM,SAAS,GAAG,YAAY,CAAC;gB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AAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC;gBACxB,SAAS,GAAG,IAAI,CAAC;YACnB,CAAC;YACD,SAAS;QACX,CAAC;QACD,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;QAC5B,IAAI,OAAO,KAAK,EAAE;YAAE,SAAS;QAC7B,IAAI,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC;YAAE,MAAM;QACnC,WAAW,GAAG,OAAO,CAAC;QACtB,MAAM;IACR,CAAC;IAED,sCAAsC;IACtC,MAAM,IAAI,GAAG,QAAQ;SAClB,KAAK,CAAC,MAAM,CAAC;SACb,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;SACzB,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;IAE7B,OAAO;QACL,IAAI;QACJ,WAAW,EAAE,WAAW,IAAI,KAAK;QACjC,OAAO;QACP,SAAS,EAAE,OAAO,KAAK,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,WAAW;QAChE,MAAM,EAAE,OAAO;QACf,IAAI;QACJ,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,aAAa,CAAC,OAAO,CAAC;KACjC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAS,uBAAuB,CAAC,QAAgB;IAC/C,OAAO,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;AACvC,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Skill, Command, Agent, SkillSection } from './parser.js';
|
|
2
|
+
import { Config, Logger } from '../config.js';
|
|
3
|
+
import { Loader } from './types.js';
|
|
4
|
+
import { SearchResult } from '../search/index.js';
|
|
5
|
+
import { CatalogResult } from '../catalog/index.js';
|
|
6
|
+
/**
|
|
7
|
+
* Production mode loader - reads from pre-generated bundle.json
|
|
8
|
+
*/
|
|
9
|
+
export declare class ProdLoader implements Loader {
|
|
10
|
+
private bundlePath;
|
|
11
|
+
private logger;
|
|
12
|
+
private config?;
|
|
13
|
+
private skillsCache;
|
|
14
|
+
private commandsCache;
|
|
15
|
+
private agentsCache;
|
|
16
|
+
private searchIdx;
|
|
17
|
+
private loaded;
|
|
18
|
+
constructor(bundlePath: string, logger: Logger, config?: Config | undefined);
|
|
19
|
+
private ensureLoaded;
|
|
20
|
+
loadSkills(): Promise<Map<string, Skill>>;
|
|
21
|
+
loadCommands(): Promise<Map<string, Command>>;
|
|
22
|
+
loadAgents(): Promise<Map<string, Agent>>;
|
|
23
|
+
getSkill(name: string): Promise<Skill | undefined>;
|
|
24
|
+
getCommand(name: string): Promise<Command | undefined>;
|
|
25
|
+
getAgent(name: string): Promise<Agent | undefined>;
|
|
26
|
+
getSkillSections(name: string, sectionNames?: string[]): Promise<{
|
|
27
|
+
skill: Skill;
|
|
28
|
+
content: string;
|
|
29
|
+
sections: SkillSection[];
|
|
30
|
+
} | undefined>;
|
|
31
|
+
searchSkills(query: string, options?: {
|
|
32
|
+
limit?: number;
|
|
33
|
+
skillType?: string;
|
|
34
|
+
category?: string;
|
|
35
|
+
source?: string;
|
|
36
|
+
}): Promise<SearchResult[]>;
|
|
37
|
+
getCatalog(category?: string): Promise<CatalogResult>;
|
|
38
|
+
getSkills(): Map<string, Skill>;
|
|
39
|
+
getCommands(): Map<string, Command>;
|
|
40
|
+
getAgents(): Map<string, Agent>;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=prod-loader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prod-loader.d.ts","sourceRoot":"","sources":["../../src/loader/prod-loader.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC9C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