ai-jue-adapter-claude 1.0.0
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/dist/index.d.ts +1 -0
- package/dist/index.js +52 -0
- package/dist/index.js.map +1 -0
- package/package.json +29 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function generate(config: any, outputDir: string): Promise<void>;
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.generate = generate;
|
|
7
|
+
const path_1 = __importDefault(require("path"));
|
|
8
|
+
const ai_jue_core_1 = require("ai-jue-core");
|
|
9
|
+
async function generate(config, outputDir) {
|
|
10
|
+
let content = '';
|
|
11
|
+
// 1. Inject AGENTS.md content first (Global Context)
|
|
12
|
+
if (config.prompts?.agents?.content) {
|
|
13
|
+
content += `# Context & Rules\n\n${config.prompts.agents.content}\n\n`;
|
|
14
|
+
}
|
|
15
|
+
// 2. Add specific Claude prompt
|
|
16
|
+
if (config.prompts?.claude?.content) {
|
|
17
|
+
content += `\n${config.prompts.claude.content}\n\n`;
|
|
18
|
+
}
|
|
19
|
+
// 3. Convert Skills to Slash Commands
|
|
20
|
+
if (config.skills) {
|
|
21
|
+
content += `## Slash Commands (Skills)\n\n`;
|
|
22
|
+
for (const [key, value] of Object.entries(config.skills)) {
|
|
23
|
+
const skill = value;
|
|
24
|
+
// Claude Code format: /command - description
|
|
25
|
+
content += `/skill-${key}: ${skill.description || 'Execute skill'}\n`;
|
|
26
|
+
content += ` Prompt: ${skill.content || skill.prompt || ''}\n\n`;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
// 4. Convert Commands to Slash Commands
|
|
30
|
+
if (config.commands) {
|
|
31
|
+
content += `## Custom Commands\n\n`;
|
|
32
|
+
for (const [key, value] of Object.entries(config.commands)) {
|
|
33
|
+
const cmd = value;
|
|
34
|
+
content += `/${key}: ${cmd.description || 'Execute command'}\n`;
|
|
35
|
+
content += ` Prompt: ${cmd.prompt}\n\n`;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
// 5. Hooks Documentation
|
|
39
|
+
if (config.hooks) {
|
|
40
|
+
content += `## Workflow Hooks\n\n`;
|
|
41
|
+
for (const [key, value] of Object.entries(config.hooks)) {
|
|
42
|
+
const hookValue = value;
|
|
43
|
+
const script = typeof hookValue === 'string' ? hookValue : hookValue.script;
|
|
44
|
+
content += `- **${key}**: Please ensure \`${script}\` is passed before proceeding.\n`;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
if (content.trim()) {
|
|
48
|
+
const filePath = path_1.default.join(outputDir, 'CLAUDE.md');
|
|
49
|
+
(0, ai_jue_core_1.generateMarkdownFile)(filePath, content);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAIA,4BAgDC;AApDD,gDAAwB;AAExB,6CAAmD;AAE5C,KAAK,UAAU,QAAQ,CAAC,MAAW,EAAE,SAAiB;IAC3D,IAAI,OAAO,GAAG,EAAE,CAAC;IAEjB,qDAAqD;IACrD,IAAI,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;QAClC,OAAO,IAAI,wBAAwB,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,MAAM,CAAC;IAC3E,CAAC;IAED,gCAAgC;IAChC,IAAI,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;QACpC,OAAO,IAAI,KAAK,MAAM,CAAC,OAAO,CAAC,MAAM,CAA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;YAC5E,OAAO,IAAI,OAAO,GAAG,uBAAuB,MAAM,mCAAmC,CAAC;QACxF,CAAC;IACL,CAAC;IAED,IAAI,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;QACnB,MAAM,QAAQ,GAAG,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;QACnD,IAAA,kCAAoB,EAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC1C,CAAC;AACH,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ai-jue-adapter-claude",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Adapter for generating Claude AI configurations.",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"build": "tsc"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"ai-jue-core": "*"
|
|
11
|
+
},
|
|
12
|
+
"author": "AI-Jue Team <contact@ai-jue.dev>",
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/ai-jue/ai-jue.git"
|
|
17
|
+
},
|
|
18
|
+
"bugs": {
|
|
19
|
+
"url": "https://github.com/ai-jue/ai-jue/issues"
|
|
20
|
+
},
|
|
21
|
+
"homepage": "https://github.com/ai-jue/ai-jue#readme",
|
|
22
|
+
"publishConfig": {
|
|
23
|
+
"access": "public"
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"dist"
|
|
27
|
+
],
|
|
28
|
+
"types": "dist/index.d.ts"
|
|
29
|
+
}
|