ctxinit 0.1.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/LICENSE +21 -0
- package/README.md +484 -0
- package/bin/ctx.js +3 -0
- package/dist/analysis/index.d.ts +2 -0
- package/dist/analysis/index.d.ts.map +1 -0
- package/dist/analysis/index.js +18 -0
- package/dist/analysis/index.js.map +1 -0
- package/dist/analysis/static-analysis.d.ts +79 -0
- package/dist/analysis/static-analysis.d.ts.map +1 -0
- package/dist/analysis/static-analysis.js +279 -0
- package/dist/analysis/static-analysis.js.map +1 -0
- package/dist/bootstrap/index.d.ts +8 -0
- package/dist/bootstrap/index.d.ts.map +1 -0
- package/dist/bootstrap/index.js +13 -0
- package/dist/bootstrap/index.js.map +1 -0
- package/dist/bootstrap/orchestrator.d.ts +48 -0
- package/dist/bootstrap/orchestrator.d.ts.map +1 -0
- package/dist/bootstrap/orchestrator.js +363 -0
- package/dist/bootstrap/orchestrator.js.map +1 -0
- package/dist/bootstrap/validator.d.ts +25 -0
- package/dist/bootstrap/validator.d.ts.map +1 -0
- package/dist/bootstrap/validator.js +412 -0
- package/dist/bootstrap/validator.js.map +1 -0
- package/dist/build/atomic.d.ts +74 -0
- package/dist/build/atomic.d.ts.map +1 -0
- package/dist/build/atomic.js +235 -0
- package/dist/build/atomic.js.map +1 -0
- package/dist/build/index.d.ts +10 -0
- package/dist/build/index.d.ts.map +1 -0
- package/dist/build/index.js +26 -0
- package/dist/build/index.js.map +1 -0
- package/dist/build/lock.d.ts +102 -0
- package/dist/build/lock.d.ts.map +1 -0
- package/dist/build/lock.js +297 -0
- package/dist/build/lock.js.map +1 -0
- package/dist/build/manifest.d.ts +138 -0
- package/dist/build/manifest.d.ts.map +1 -0
- package/dist/build/manifest.js +269 -0
- package/dist/build/manifest.js.map +1 -0
- package/dist/build/orchestrator.d.ts +103 -0
- package/dist/build/orchestrator.d.ts.map +1 -0
- package/dist/build/orchestrator.js +524 -0
- package/dist/build/orchestrator.js.map +1 -0
- package/dist/cli/bootstrap.d.ts +77 -0
- package/dist/cli/bootstrap.d.ts.map +1 -0
- package/dist/cli/bootstrap.js +527 -0
- package/dist/cli/bootstrap.js.map +1 -0
- package/dist/cli/build.d.ts +32 -0
- package/dist/cli/build.d.ts.map +1 -0
- package/dist/cli/build.js +156 -0
- package/dist/cli/build.js.map +1 -0
- package/dist/cli/diff.d.ts +23 -0
- package/dist/cli/diff.d.ts.map +1 -0
- package/dist/cli/diff.js +226 -0
- package/dist/cli/diff.js.map +1 -0
- package/dist/cli/hooks.d.ts +29 -0
- package/dist/cli/hooks.d.ts.map +1 -0
- package/dist/cli/hooks.js +176 -0
- package/dist/cli/hooks.js.map +1 -0
- package/dist/cli/init.d.ts +53 -0
- package/dist/cli/init.d.ts.map +1 -0
- package/dist/cli/init.js +254 -0
- package/dist/cli/init.js.map +1 -0
- package/dist/cli/lint.d.ts +46 -0
- package/dist/cli/lint.d.ts.map +1 -0
- package/dist/cli/lint.js +210 -0
- package/dist/cli/lint.js.map +1 -0
- package/dist/cli/migrate.d.ts +28 -0
- package/dist/cli/migrate.d.ts.map +1 -0
- package/dist/cli/migrate.js +350 -0
- package/dist/cli/migrate.js.map +1 -0
- package/dist/cli/verify.d.ts +21 -0
- package/dist/cli/verify.d.ts.map +1 -0
- package/dist/cli/verify.js +209 -0
- package/dist/cli/verify.js.map +1 -0
- package/dist/cli.d.ts +8 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +262 -0
- package/dist/cli.js.map +1 -0
- package/dist/compiler/agents-compiler.d.ts +24 -0
- package/dist/compiler/agents-compiler.d.ts.map +1 -0
- package/dist/compiler/agents-compiler.js +192 -0
- package/dist/compiler/agents-compiler.js.map +1 -0
- package/dist/compiler/base-compiler.d.ts +152 -0
- package/dist/compiler/base-compiler.d.ts.map +1 -0
- package/dist/compiler/base-compiler.js +180 -0
- package/dist/compiler/base-compiler.js.map +1 -0
- package/dist/compiler/claude-compiler.d.ts +24 -0
- package/dist/compiler/claude-compiler.d.ts.map +1 -0
- package/dist/compiler/claude-compiler.js +182 -0
- package/dist/compiler/claude-compiler.js.map +1 -0
- package/dist/compiler/cursor-compiler.d.ts +33 -0
- package/dist/compiler/cursor-compiler.d.ts.map +1 -0
- package/dist/compiler/cursor-compiler.js +136 -0
- package/dist/compiler/cursor-compiler.js.map +1 -0
- package/dist/compiler/index.d.ts +7 -0
- package/dist/compiler/index.d.ts.map +1 -0
- package/dist/compiler/index.js +24 -0
- package/dist/compiler/index.js.map +1 -0
- package/dist/compiler/rule-selector.d.ts +115 -0
- package/dist/compiler/rule-selector.d.ts.map +1 -0
- package/dist/compiler/rule-selector.js +273 -0
- package/dist/compiler/rule-selector.js.map +1 -0
- package/dist/compiler/token-estimator.d.ts +74 -0
- package/dist/compiler/token-estimator.d.ts.map +1 -0
- package/dist/compiler/token-estimator.js +191 -0
- package/dist/compiler/token-estimator.js.map +1 -0
- package/dist/config/index.d.ts +2 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +18 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/loader.d.ts +48 -0
- package/dist/config/loader.d.ts.map +1 -0
- package/dist/config/loader.js +175 -0
- package/dist/config/loader.js.map +1 -0
- package/dist/git/gitignore.d.ts +59 -0
- package/dist/git/gitignore.d.ts.map +1 -0
- package/dist/git/gitignore.js +268 -0
- package/dist/git/gitignore.js.map +1 -0
- package/dist/git/hooks.d.ts +34 -0
- package/dist/git/hooks.d.ts.map +1 -0
- package/dist/git/hooks.js +129 -0
- package/dist/git/hooks.js.map +1 -0
- package/dist/git/husky.d.ts +52 -0
- package/dist/git/husky.d.ts.map +1 -0
- package/dist/git/husky.js +219 -0
- package/dist/git/husky.js.map +1 -0
- package/dist/git/index.d.ts +9 -0
- package/dist/git/index.d.ts.map +1 -0
- package/dist/git/index.js +15 -0
- package/dist/git/index.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -0
- package/dist/llm/base-provider.d.ts +43 -0
- package/dist/llm/base-provider.d.ts.map +1 -0
- package/dist/llm/base-provider.js +91 -0
- package/dist/llm/base-provider.js.map +1 -0
- package/dist/llm/index.d.ts +17 -0
- package/dist/llm/index.d.ts.map +1 -0
- package/dist/llm/index.js +36 -0
- package/dist/llm/index.js.map +1 -0
- package/dist/llm/prompts/bootstrap-prompt.d.ts +27 -0
- package/dist/llm/prompts/bootstrap-prompt.d.ts.map +1 -0
- package/dist/llm/prompts/bootstrap-prompt.js +278 -0
- package/dist/llm/prompts/bootstrap-prompt.js.map +1 -0
- package/dist/llm/prompts/index.d.ts +5 -0
- package/dist/llm/prompts/index.d.ts.map +1 -0
- package/dist/llm/prompts/index.js +11 -0
- package/dist/llm/prompts/index.js.map +1 -0
- package/dist/llm/provider-factory.d.ts +27 -0
- package/dist/llm/provider-factory.d.ts.map +1 -0
- package/dist/llm/provider-factory.js +213 -0
- package/dist/llm/provider-factory.js.map +1 -0
- package/dist/llm/providers/claude-api.d.ts +21 -0
- package/dist/llm/providers/claude-api.d.ts.map +1 -0
- package/dist/llm/providers/claude-api.js +110 -0
- package/dist/llm/providers/claude-api.js.map +1 -0
- package/dist/llm/providers/claude-code.d.ts +21 -0
- package/dist/llm/providers/claude-code.d.ts.map +1 -0
- package/dist/llm/providers/claude-code.js +120 -0
- package/dist/llm/providers/claude-code.js.map +1 -0
- package/dist/llm/providers/codex-cli.d.ts +25 -0
- package/dist/llm/providers/codex-cli.d.ts.map +1 -0
- package/dist/llm/providers/codex-cli.js +129 -0
- package/dist/llm/providers/codex-cli.js.map +1 -0
- package/dist/llm/providers/cursor-cli.d.ts +24 -0
- package/dist/llm/providers/cursor-cli.d.ts.map +1 -0
- package/dist/llm/providers/cursor-cli.js +106 -0
- package/dist/llm/providers/cursor-cli.js.map +1 -0
- package/dist/llm/providers/gemini-api.d.ts +20 -0
- package/dist/llm/providers/gemini-api.d.ts.map +1 -0
- package/dist/llm/providers/gemini-api.js +121 -0
- package/dist/llm/providers/gemini-api.js.map +1 -0
- package/dist/llm/providers/gemini-cli.d.ts +20 -0
- package/dist/llm/providers/gemini-cli.d.ts.map +1 -0
- package/dist/llm/providers/gemini-cli.js +109 -0
- package/dist/llm/providers/gemini-cli.js.map +1 -0
- package/dist/llm/providers/interactive.d.ts +42 -0
- package/dist/llm/providers/interactive.d.ts.map +1 -0
- package/dist/llm/providers/interactive.js +200 -0
- package/dist/llm/providers/interactive.js.map +1 -0
- package/dist/llm/providers/openai-api.d.ts +21 -0
- package/dist/llm/providers/openai-api.d.ts.map +1 -0
- package/dist/llm/providers/openai-api.js +107 -0
- package/dist/llm/providers/openai-api.js.map +1 -0
- package/dist/llm/types.d.ts +128 -0
- package/dist/llm/types.d.ts.map +1 -0
- package/dist/llm/types.js +8 -0
- package/dist/llm/types.js.map +1 -0
- package/dist/parser/index.d.ts +3 -0
- package/dist/parser/index.d.ts.map +1 -0
- package/dist/parser/index.js +19 -0
- package/dist/parser/index.js.map +1 -0
- package/dist/parser/path-security.d.ts +40 -0
- package/dist/parser/path-security.d.ts.map +1 -0
- package/dist/parser/path-security.js +183 -0
- package/dist/parser/path-security.js.map +1 -0
- package/dist/parser/rule-parser.d.ts +50 -0
- package/dist/parser/rule-parser.d.ts.map +1 -0
- package/dist/parser/rule-parser.js +203 -0
- package/dist/parser/rule-parser.js.map +1 -0
- package/dist/schemas/config.d.ts +202 -0
- package/dist/schemas/config.d.ts.map +1 -0
- package/dist/schemas/config.js +96 -0
- package/dist/schemas/config.js.map +1 -0
- package/dist/schemas/index.d.ts +3 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +19 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/rule.d.ts +67 -0
- package/dist/schemas/rule.d.ts.map +1 -0
- package/dist/schemas/rule.js +44 -0
- package/dist/schemas/rule.js.map +1 -0
- package/package.json +69 -0
- package/templates/architecture.md +35 -0
- package/templates/bootstrap-prompt.md +242 -0
- package/templates/config.yaml +25 -0
- package/templates/project.md +44 -0
- package/templates/rules/example.md +36 -0
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Base compiler interface and abstract class for target-specific compilation
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.BaseCompiler = void 0;
|
|
40
|
+
const fs = __importStar(require("fs"));
|
|
41
|
+
const path = __importStar(require("path"));
|
|
42
|
+
const crypto = __importStar(require("crypto"));
|
|
43
|
+
/**
|
|
44
|
+
* Abstract base compiler class
|
|
45
|
+
*/
|
|
46
|
+
class BaseCompiler {
|
|
47
|
+
context;
|
|
48
|
+
constructor(context) {
|
|
49
|
+
this.context = context;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Load project.md content
|
|
53
|
+
*/
|
|
54
|
+
async loadProjectContent() {
|
|
55
|
+
const projectPath = path.join(this.context.projectRoot, '.context', 'project.md');
|
|
56
|
+
try {
|
|
57
|
+
return fs.readFileSync(projectPath, 'utf-8');
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
return undefined;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Load architecture.md content
|
|
65
|
+
*/
|
|
66
|
+
async loadArchitectureContent() {
|
|
67
|
+
const archPath = path.join(this.context.projectRoot, '.context', 'architecture.md');
|
|
68
|
+
try {
|
|
69
|
+
return fs.readFileSync(archPath, 'utf-8');
|
|
70
|
+
}
|
|
71
|
+
catch {
|
|
72
|
+
return undefined;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Ensure output directory exists
|
|
77
|
+
*/
|
|
78
|
+
ensureDirectory(dirPath) {
|
|
79
|
+
const fullPath = path.join(this.context.projectRoot, dirPath);
|
|
80
|
+
if (!fs.existsSync(fullPath)) {
|
|
81
|
+
fs.mkdirSync(fullPath, { recursive: true });
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Write output file
|
|
86
|
+
*/
|
|
87
|
+
writeOutput(filePath, content) {
|
|
88
|
+
const fullPath = path.join(this.context.projectRoot, filePath);
|
|
89
|
+
const dirPath = path.dirname(fullPath);
|
|
90
|
+
if (!fs.existsSync(dirPath)) {
|
|
91
|
+
fs.mkdirSync(dirPath, { recursive: true });
|
|
92
|
+
}
|
|
93
|
+
fs.writeFileSync(fullPath, content, 'utf-8');
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Generate Context Hygiene meta-rule content
|
|
97
|
+
*/
|
|
98
|
+
generateMetaRule() {
|
|
99
|
+
return `
|
|
100
|
+
## Context Hygiene
|
|
101
|
+
|
|
102
|
+
This context file was automatically generated by ctxinit.
|
|
103
|
+
- Do not edit this file directly; changes will be overwritten on next build.
|
|
104
|
+
- To modify rules, edit source files in \`.context/rules/\`.
|
|
105
|
+
- Run \`ctx build\` to regenerate this file.
|
|
106
|
+
- Run \`ctx verify\` to check for tampering.
|
|
107
|
+
`;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Generate directory index for agent navigation
|
|
111
|
+
*/
|
|
112
|
+
generateDirectoryIndex(rules) {
|
|
113
|
+
const lines = ['## Rule Directory', ''];
|
|
114
|
+
// Group rules by directory
|
|
115
|
+
const byDir = new Map();
|
|
116
|
+
for (const rule of rules) {
|
|
117
|
+
const dir = path.dirname(rule.path) || '.';
|
|
118
|
+
const existing = byDir.get(dir) || [];
|
|
119
|
+
existing.push(rule);
|
|
120
|
+
byDir.set(dir, existing);
|
|
121
|
+
}
|
|
122
|
+
// Sort directories
|
|
123
|
+
const sortedDirs = Array.from(byDir.keys()).sort();
|
|
124
|
+
for (const dir of sortedDirs) {
|
|
125
|
+
const dirRules = byDir.get(dir);
|
|
126
|
+
lines.push(`### ${dir === '.' ? 'Root' : dir}`);
|
|
127
|
+
lines.push('');
|
|
128
|
+
for (const rule of dirRules) {
|
|
129
|
+
const desc = rule.frontmatter.description || 'No description';
|
|
130
|
+
lines.push(`- **${rule.frontmatter.id}**: ${desc}`);
|
|
131
|
+
}
|
|
132
|
+
lines.push('');
|
|
133
|
+
}
|
|
134
|
+
return lines.join('\n');
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Get summary of rule (description + first paragraph)
|
|
138
|
+
*/
|
|
139
|
+
getRuleSummary(rule) {
|
|
140
|
+
const desc = rule.frontmatter.description || '';
|
|
141
|
+
const firstParagraph = rule.content.split('\n\n')[0] || '';
|
|
142
|
+
return [desc, firstParagraph].filter(Boolean).join('\n\n');
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Generate SHA-256 checksum for content
|
|
146
|
+
*/
|
|
147
|
+
generateChecksum(content) {
|
|
148
|
+
// Normalize line endings so checksums are stable across environments (e.g., CRLF vs LF).
|
|
149
|
+
const normalized = content.replace(/\r\n/g, '\n').replace(/\r/g, '\n');
|
|
150
|
+
const hash = crypto.createHash('sha256').update(normalized).digest('hex');
|
|
151
|
+
return `sha256:${hash}`;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Generate build timestamp in ISO format
|
|
155
|
+
*/
|
|
156
|
+
generateTimestamp() {
|
|
157
|
+
return new Date().toISOString();
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Generate footer with checksum and timestamp
|
|
161
|
+
* The checksum is calculated on the content BEFORE appending this footer
|
|
162
|
+
*/
|
|
163
|
+
generateFooter(content) {
|
|
164
|
+
const checksum = this.generateChecksum(content);
|
|
165
|
+
const timestamp = this.generateTimestamp();
|
|
166
|
+
return `
|
|
167
|
+
<!-- ctx build metadata -->
|
|
168
|
+
<!-- timestamp: ${timestamp} -->
|
|
169
|
+
<!-- checksum: ${checksum} -->
|
|
170
|
+
`;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Add checksum and timestamp footer to content
|
|
174
|
+
*/
|
|
175
|
+
addMetadata(content) {
|
|
176
|
+
return content + this.generateFooter(content);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
exports.BaseCompiler = BaseCompiler;
|
|
180
|
+
//# sourceMappingURL=base-compiler.js.map
|
|
@@ -0,0 +1 @@
|
|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AK,CAAC,CAAC;QAC1E,OAAO,UAAU,IAAI,EAAE,CAAC;IAC1B,CAAC;IAED;;OAEG;IACO,iBAAiB;QACzB,OAAO,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAClC,CAAC;IAED;;;OAGG;IACO,cAAc,CAAC,OAAe;QACtC,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;QAChD,MAAM,SAAS,GAAG,IAAI,CAAC,iBAAiB,EAAE,CAAC;QAE3C,OAAO;;kBAEO,SAAS;iBACV,QAAQ;CACxB,CAAC;IACA,CAAC;IAED;;OAEG;IACO,WAAW,CAAC,OAAe;QACnC,OAAO,OAAO,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;IAChD,CAAC;CACF;AAhKD,oCAgKC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Claude Compiler
|
|
3
|
+
*
|
|
4
|
+
* Compiles rules to a single CLAUDE.md entry file with token budget control.
|
|
5
|
+
* Includes project context, architecture summary, and selected rules.
|
|
6
|
+
*/
|
|
7
|
+
import { BaseCompiler, CompilerContext, CompilationResult } from './base-compiler';
|
|
8
|
+
/**
|
|
9
|
+
* Claude compiler implementation
|
|
10
|
+
*/
|
|
11
|
+
export declare class ClaudeCompiler extends BaseCompiler {
|
|
12
|
+
constructor(context: CompilerContext);
|
|
13
|
+
get targetName(): string;
|
|
14
|
+
compile(): Promise<CompilationResult>;
|
|
15
|
+
/**
|
|
16
|
+
* Build the complete CLAUDE.md content
|
|
17
|
+
*/
|
|
18
|
+
private buildOutput;
|
|
19
|
+
/**
|
|
20
|
+
* Build a failure result
|
|
21
|
+
*/
|
|
22
|
+
private buildFailureResult;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=claude-compiler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-compiler.d.ts","sourceRoot":"","sources":["../../src/compiler/claude-compiler.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACL,YAAY,EACZ,eAAe,EACf,iBAAiB,EAIlB,MAAM,iBAAiB,CAAC;AAQzB;;GAEG;AACH,qBAAa,cAAe,SAAQ,YAAY;gBAClC,OAAO,EAAE,eAAe;IAIpC,IAAI,UAAU,IAAI,MAAM,CAEvB;IAEK,OAAO,IAAI,OAAO,CAAC,iBAAiB,CAAC;IAwI3C;;OAEG;IACH,OAAO,CAAC,WAAW;IA+CnB;;OAEG;IACH,OAAO,CAAC,kBAAkB;CAkB3B"}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Claude Compiler
|
|
4
|
+
*
|
|
5
|
+
* Compiles rules to a single CLAUDE.md entry file with token budget control.
|
|
6
|
+
* Includes project context, architecture summary, and selected rules.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.ClaudeCompiler = void 0;
|
|
10
|
+
const base_compiler_1 = require("./base-compiler");
|
|
11
|
+
const token_estimator_1 = require("./token-estimator");
|
|
12
|
+
const rule_selector_1 = require("./rule-selector");
|
|
13
|
+
/**
|
|
14
|
+
* Claude compiler implementation
|
|
15
|
+
*/
|
|
16
|
+
class ClaudeCompiler extends base_compiler_1.BaseCompiler {
|
|
17
|
+
constructor(context) {
|
|
18
|
+
super(context);
|
|
19
|
+
}
|
|
20
|
+
get targetName() {
|
|
21
|
+
return 'claude';
|
|
22
|
+
}
|
|
23
|
+
async compile() {
|
|
24
|
+
const errors = [];
|
|
25
|
+
const warnings = [];
|
|
26
|
+
// Get claude config
|
|
27
|
+
const claudeConfig = this.context.config.compile?.claude;
|
|
28
|
+
const maxTokens = claudeConfig?.max_tokens || 4000;
|
|
29
|
+
const strategy = claudeConfig?.strategy || 'priority';
|
|
30
|
+
const alwaysInclude = claudeConfig?.always_include || [];
|
|
31
|
+
// Load project.md (required)
|
|
32
|
+
const projectContent = await this.loadProjectContent();
|
|
33
|
+
if (!projectContent) {
|
|
34
|
+
errors.push({
|
|
35
|
+
type: 'missing_file',
|
|
36
|
+
message: 'project.md is required for Claude compilation but was not found',
|
|
37
|
+
path: '.context/project.md',
|
|
38
|
+
});
|
|
39
|
+
return this.buildFailureResult(errors, warnings);
|
|
40
|
+
}
|
|
41
|
+
// Load architecture.md (optional)
|
|
42
|
+
const architectureContent = await this.loadArchitectureContent();
|
|
43
|
+
if (!architectureContent) {
|
|
44
|
+
warnings.push({
|
|
45
|
+
type: 'missing_optional',
|
|
46
|
+
message: 'architecture.md not found, compilation will continue without it',
|
|
47
|
+
path: '.context/architecture.md',
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
// Calculate token usage for always-include content
|
|
51
|
+
let usedTokens = 0;
|
|
52
|
+
const alwaysIncludeTokens = (0, token_estimator_1.estimateTokens)(projectContent).tokens +
|
|
53
|
+
(architectureContent ? (0, token_estimator_1.estimateTokens)(architectureContent).tokens : 0);
|
|
54
|
+
usedTokens += alwaysIncludeTokens;
|
|
55
|
+
// Reserve tokens for meta-rule and directory index
|
|
56
|
+
const metaRule = this.generateMetaRule();
|
|
57
|
+
usedTokens += (0, token_estimator_1.estimateTokens)(metaRule).tokens;
|
|
58
|
+
// Calculate remaining budget for rules
|
|
59
|
+
const effectiveBudget = (0, token_estimator_1.applyBudgetMargin)(maxTokens);
|
|
60
|
+
const rulesBudget = Math.max(0, effectiveBudget - usedTokens);
|
|
61
|
+
// Partition and select rules
|
|
62
|
+
const { alwaysApply, conditional } = (0, rule_selector_1.partitionRules)(this.context.rules);
|
|
63
|
+
// Always-apply rules are included first
|
|
64
|
+
let selectedRules = [...alwaysApply];
|
|
65
|
+
let ruleTokens = alwaysApply.reduce((sum, r) => sum + (0, token_estimator_1.estimateTokens)(r.content).tokens, 0);
|
|
66
|
+
// Select conditional rules based on strategy
|
|
67
|
+
const selectionContext = {
|
|
68
|
+
projectRoot: this.context.projectRoot,
|
|
69
|
+
};
|
|
70
|
+
const selection = (0, rule_selector_1.selectRules)(conditional, {
|
|
71
|
+
strategy,
|
|
72
|
+
maxTokens: rulesBudget - ruleTokens,
|
|
73
|
+
alwaysInclude,
|
|
74
|
+
}, selectionContext);
|
|
75
|
+
selectedRules = [...selectedRules, ...selection.rules];
|
|
76
|
+
ruleTokens += selection.totalTokens;
|
|
77
|
+
if (selection.excludedByBudget.length > 0) {
|
|
78
|
+
warnings.push({
|
|
79
|
+
type: 'token_limit',
|
|
80
|
+
message: `${selection.excludedByBudget.length} rules excluded due to token budget`,
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
if (selectedRules.length === 0 && this.context.rules.length > 0) {
|
|
84
|
+
warnings.push({
|
|
85
|
+
type: 'empty_rules',
|
|
86
|
+
message: 'No rules selected for Claude compilation after budget constraints',
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
// Build output content
|
|
90
|
+
let content = this.buildOutput(projectContent, architectureContent, selectedRules, metaRule);
|
|
91
|
+
// Add checksum and timestamp metadata
|
|
92
|
+
content = this.addMetadata(content);
|
|
93
|
+
const totalTokens = (0, token_estimator_1.estimateTokens)(content).tokens;
|
|
94
|
+
// Create output
|
|
95
|
+
const output = {
|
|
96
|
+
path: 'CLAUDE.md',
|
|
97
|
+
content,
|
|
98
|
+
tokens: totalTokens,
|
|
99
|
+
};
|
|
100
|
+
// Write output (optional - callers like the build orchestrator may write atomically)
|
|
101
|
+
if (this.context.writeToDisk !== false) {
|
|
102
|
+
try {
|
|
103
|
+
this.writeOutput(output.path, output.content);
|
|
104
|
+
}
|
|
105
|
+
catch (error) {
|
|
106
|
+
errors.push({
|
|
107
|
+
type: 'write_error',
|
|
108
|
+
message: `Failed to write CLAUDE.md: ${error.message}`,
|
|
109
|
+
path: 'CLAUDE.md',
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return {
|
|
114
|
+
success: errors.length === 0,
|
|
115
|
+
outputs: [output],
|
|
116
|
+
errors,
|
|
117
|
+
warnings,
|
|
118
|
+
totalTokens,
|
|
119
|
+
stats: {
|
|
120
|
+
rulesProcessed: this.context.rules.length,
|
|
121
|
+
rulesIncluded: selectedRules.length,
|
|
122
|
+
outputFiles: 1,
|
|
123
|
+
totalTokens,
|
|
124
|
+
tokenBudget: maxTokens,
|
|
125
|
+
},
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Build the complete CLAUDE.md content
|
|
130
|
+
*/
|
|
131
|
+
buildOutput(projectContent, architectureContent, rules, metaRule) {
|
|
132
|
+
const sections = [];
|
|
133
|
+
// Header
|
|
134
|
+
sections.push('# Project Context\n');
|
|
135
|
+
// Project content
|
|
136
|
+
sections.push(projectContent.trim());
|
|
137
|
+
sections.push('');
|
|
138
|
+
// Architecture (if available)
|
|
139
|
+
if (architectureContent) {
|
|
140
|
+
sections.push('## Architecture\n');
|
|
141
|
+
sections.push(architectureContent.trim());
|
|
142
|
+
sections.push('');
|
|
143
|
+
}
|
|
144
|
+
// Directory index
|
|
145
|
+
sections.push(this.generateDirectoryIndex(rules));
|
|
146
|
+
// Rules content
|
|
147
|
+
if (rules.length > 0) {
|
|
148
|
+
sections.push('## Rules\n');
|
|
149
|
+
for (const rule of rules) {
|
|
150
|
+
sections.push(`### ${rule.frontmatter.id}\n`);
|
|
151
|
+
if (rule.frontmatter.description) {
|
|
152
|
+
sections.push(`*${rule.frontmatter.description}*\n`);
|
|
153
|
+
}
|
|
154
|
+
sections.push(rule.content.trim());
|
|
155
|
+
sections.push('');
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
// Meta-rule
|
|
159
|
+
sections.push(metaRule);
|
|
160
|
+
return sections.join('\n');
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Build a failure result
|
|
164
|
+
*/
|
|
165
|
+
buildFailureResult(errors, warnings) {
|
|
166
|
+
return {
|
|
167
|
+
success: false,
|
|
168
|
+
outputs: [],
|
|
169
|
+
errors,
|
|
170
|
+
warnings,
|
|
171
|
+
totalTokens: 0,
|
|
172
|
+
stats: {
|
|
173
|
+
rulesProcessed: 0,
|
|
174
|
+
rulesIncluded: 0,
|
|
175
|
+
outputFiles: 0,
|
|
176
|
+
totalTokens: 0,
|
|
177
|
+
},
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
exports.ClaudeCompiler = ClaudeCompiler;
|
|
182
|
+
//# sourceMappingURL=claude-compiler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-compiler.js","sourceRoot":"","sources":["../../src/compiler/claude-compiler.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAGH,mDAOyB;AACzB,uDAAsE;AACtE,mDAIyB;AAEzB;;GAEG;AACH,MAAa,cAAe,SAAQ,4BAAY;IAC9C,YAAY,OAAwB;QAClC,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAED,IAAI,UAAU;QACZ,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,KAAK,CAAC,OAAO;QACX,MAAM,MAAM,GAAuB,EAAE,CAAC;QACtC,MAAM,QAAQ,GAAyB,EAAE,CAAC;QAE1C,oBAAoB;QACpB,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC;QACzD,MAAM,SAAS,GAAG,YAAY,EAAE,UAAU,IAAI,IAAI,CAAC;QACnD,MAAM,QAAQ,GAAG,YAAY,EAAE,QAAQ,IAAI,UAAU,CAAC;QACtD,MAAM,aAAa,GAAG,YAAY,EAAE,cAAc,IAAI,EAAE,CAAC;QAEzD,6BAA6B;QAC7B,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,kBAAkB,EAAE,CAAC;QACvD,IAAI,CAAC,cAAc,EAAE,CAAC;YACpB,MAAM,CAAC,IAAI,CAAC;gBACV,IAAI,EAAE,cAAc;gBACpB,OAAO,EAAE,iEAAiE;g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|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cursor IDE Compiler
|
|
3
|
+
*
|
|
4
|
+
* Compiles rules to individual .mdc files in .cursor/rules/
|
|
5
|
+
* Each rule becomes a separate file with Cursor-compatible frontmatter.
|
|
6
|
+
*/
|
|
7
|
+
import { BaseCompiler, CompilerContext, CompilationResult } from './base-compiler';
|
|
8
|
+
/**
|
|
9
|
+
* Cursor compiler implementation
|
|
10
|
+
*/
|
|
11
|
+
export declare class CursorCompiler extends BaseCompiler {
|
|
12
|
+
constructor(context: CompilerContext);
|
|
13
|
+
get targetName(): string;
|
|
14
|
+
compile(): Promise<CompilationResult>;
|
|
15
|
+
/**
|
|
16
|
+
* Compile a single rule to .mdc format
|
|
17
|
+
*/
|
|
18
|
+
private compileRule;
|
|
19
|
+
/**
|
|
20
|
+
* Generate output file name from rule path
|
|
21
|
+
* Rules at backend/auth.md become backend-auth.mdc
|
|
22
|
+
*/
|
|
23
|
+
private generateFileName;
|
|
24
|
+
/**
|
|
25
|
+
* Generate Cursor-compatible frontmatter
|
|
26
|
+
*/
|
|
27
|
+
private generateFrontmatter;
|
|
28
|
+
/**
|
|
29
|
+
* Format complete .mdc file with frontmatter and content
|
|
30
|
+
*/
|
|
31
|
+
private formatMdcFile;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=cursor-compiler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cursor-compiler.d.ts","sourceRoot":"","sources":["../../src/compiler/cursor-compiler.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACL,YAAY,EACZ,eAAe,EACf,iBAAiB,EAIlB,MAAM,iBAAiB,CAAC;AAazB;;GAEG;AACH,qBAAa,cAAe,SAAQ,YAAY;gBAClC,OAAO,EAAE,eAAe;IAIpC,IAAI,UAAU,IAAI,MAAM,CAEvB;IAEK,OAAO,IAAI,OAAO,CAAC,iBAAiB,CAAC;IAsE3C;;OAEG;IACH,OAAO,CAAC,WAAW;IAgBnB;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IAaxB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAQ3B;;OAEG;IACH,OAAO,CAAC,aAAa;CAetB"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Cursor IDE Compiler
|
|
4
|
+
*
|
|
5
|
+
* Compiles rules to individual .mdc files in .cursor/rules/
|
|
6
|
+
* Each rule becomes a separate file with Cursor-compatible frontmatter.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.CursorCompiler = void 0;
|
|
10
|
+
const base_compiler_1 = require("./base-compiler");
|
|
11
|
+
const token_estimator_1 = require("./token-estimator");
|
|
12
|
+
const rule_selector_1 = require("./rule-selector");
|
|
13
|
+
/**
|
|
14
|
+
* Cursor compiler implementation
|
|
15
|
+
*/
|
|
16
|
+
class CursorCompiler extends base_compiler_1.BaseCompiler {
|
|
17
|
+
constructor(context) {
|
|
18
|
+
super(context);
|
|
19
|
+
}
|
|
20
|
+
get targetName() {
|
|
21
|
+
return 'cursor';
|
|
22
|
+
}
|
|
23
|
+
async compile() {
|
|
24
|
+
const errors = [];
|
|
25
|
+
const warnings = [];
|
|
26
|
+
const outputs = [];
|
|
27
|
+
// Get cursor config
|
|
28
|
+
const cursorConfig = this.context.config.compile?.cursor;
|
|
29
|
+
const strategy = cursorConfig?.strategy || 'all';
|
|
30
|
+
// Select rules based on strategy
|
|
31
|
+
const selectionContext = {
|
|
32
|
+
projectRoot: this.context.projectRoot,
|
|
33
|
+
};
|
|
34
|
+
const selection = (0, rule_selector_1.selectRules)(this.context.rules, { strategy }, selectionContext);
|
|
35
|
+
if (selection.rules.length === 0) {
|
|
36
|
+
warnings.push({
|
|
37
|
+
type: 'empty_rules',
|
|
38
|
+
message: 'No rules selected for Cursor compilation',
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
const shouldWriteToDisk = this.context.writeToDisk !== false;
|
|
42
|
+
if (shouldWriteToDisk) {
|
|
43
|
+
// Ensure output directory exists
|
|
44
|
+
this.ensureDirectory('.cursor/rules');
|
|
45
|
+
}
|
|
46
|
+
// Compile each rule to a separate .mdc file
|
|
47
|
+
let totalTokens = 0;
|
|
48
|
+
for (const rule of selection.rules) {
|
|
49
|
+
try {
|
|
50
|
+
const output = this.compileRule(rule);
|
|
51
|
+
outputs.push(output);
|
|
52
|
+
totalTokens += output.tokens;
|
|
53
|
+
// Write output file (optional)
|
|
54
|
+
if (shouldWriteToDisk) {
|
|
55
|
+
this.writeOutput(output.path, output.content);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
catch (error) {
|
|
59
|
+
errors.push({
|
|
60
|
+
type: 'write_error',
|
|
61
|
+
message: `Failed to compile rule ${rule.frontmatter.id}: ${error.message}`,
|
|
62
|
+
path: rule.path,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
success: errors.length === 0,
|
|
68
|
+
outputs,
|
|
69
|
+
errors,
|
|
70
|
+
warnings,
|
|
71
|
+
totalTokens,
|
|
72
|
+
stats: {
|
|
73
|
+
rulesProcessed: this.context.rules.length,
|
|
74
|
+
rulesIncluded: selection.rules.length,
|
|
75
|
+
outputFiles: outputs.length,
|
|
76
|
+
totalTokens,
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Compile a single rule to .mdc format
|
|
82
|
+
*/
|
|
83
|
+
compileRule(rule) {
|
|
84
|
+
const fileName = this.generateFileName(rule);
|
|
85
|
+
const filePath = `.cursor/rules/${fileName}`;
|
|
86
|
+
const frontmatter = this.generateFrontmatter(rule);
|
|
87
|
+
const content = this.formatMdcFile(frontmatter, rule.content);
|
|
88
|
+
const tokens = (0, token_estimator_1.estimateTokens)(content).tokens;
|
|
89
|
+
return {
|
|
90
|
+
path: filePath,
|
|
91
|
+
content,
|
|
92
|
+
tokens,
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Generate output file name from rule path
|
|
97
|
+
* Rules at backend/auth.md become backend-auth.mdc
|
|
98
|
+
*/
|
|
99
|
+
generateFileName(rule) {
|
|
100
|
+
// Remove .md extension
|
|
101
|
+
const baseName = rule.path.replace(/\.md$/, '');
|
|
102
|
+
// Replace path separators with dashes
|
|
103
|
+
const flatName = baseName.replace(/[/\\]/g, '-');
|
|
104
|
+
// Sanitize: remove special characters, keep alphanumeric, dash, underscore
|
|
105
|
+
const sanitized = flatName.replace(/[^a-zA-Z0-9_-]/g, '_');
|
|
106
|
+
return `${sanitized}.mdc`;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Generate Cursor-compatible frontmatter
|
|
110
|
+
*/
|
|
111
|
+
generateFrontmatter(rule) {
|
|
112
|
+
return {
|
|
113
|
+
description: rule.frontmatter.description || rule.frontmatter.id,
|
|
114
|
+
globs: rule.effectiveGlobs,
|
|
115
|
+
alwaysApply: rule.frontmatter.always_apply || false,
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Format complete .mdc file with frontmatter and content
|
|
120
|
+
*/
|
|
121
|
+
formatMdcFile(frontmatter, content) {
|
|
122
|
+
const yamlFrontmatter = [
|
|
123
|
+
'---',
|
|
124
|
+
`description: ${JSON.stringify(frontmatter.description)}`,
|
|
125
|
+
`globs:`,
|
|
126
|
+
...frontmatter.globs.map(g => ` - ${JSON.stringify(g)}`),
|
|
127
|
+
`alwaysApply: ${frontmatter.alwaysApply}`,
|
|
128
|
+
'---',
|
|
129
|
+
].join('\n');
|
|
130
|
+
const bodyContent = `${yamlFrontmatter}\n\n${content}\n`;
|
|
131
|
+
// Add checksum and timestamp metadata
|
|
132
|
+
return this.addMetadata(bodyContent);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
exports.CursorCompiler = CursorCompiler;
|
|
136
|
+
//# sourceMappingURL=cursor-compiler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cursor-compiler.js","sourceRoot":"","sources":["../../src/compiler/cursor-compiler.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAGH,mDAOyB;AACzB,uDAAmD;AACnD,mDAAgE;AAWhE;;GAEG;AACH,MAAa,cAAe,SAAQ,4BAAY;IAC9C,YAAY,OAAwB;QAClC,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAED,IAAI,UAAU;QACZ,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,KAAK,CAAC,OAAO;QACX,MAAM,MAAM,GAAuB,EAAE,CAAC;QACtC,MAAM,QAAQ,GAAyB,EAAE,CAAC;QAC1C,MAAM,OAAO,GAAiB,EAAE,CAAC;QAEjC,oBAAoB;QACpB,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC;QACzD,MAAM,QAAQ,GAAG,YAAY,EAAE,QAAQ,IAAI,KAAK,CAAC;QAEjD,iCAAiC;QACjC,MAAM,gBAAgB,GAAqB;YACzC,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC,WAAW;SACtC,CAAC;QAEF,MAAM,SAAS,GAAG,IAAA,2BAAW,EAC3B,IAAI,CAAC,OAAO,CAAC,KAAK,EAClB,EAAE,QAAQ,EAAE,EACZ,gBAAgB,CACjB,CAAC;QAEF,IAAI,SAAS,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACjC,QAAQ,CAAC,IAAI,CAAC;gBACZ,IAAI,EAAE,aAAa;gBACnB,OAAO,EAAE,0CAA0C;aACpD,CAAC,CAAC;QACL,CAAC;QAED,MAAM,iBAAiB,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,KAAK,KAAK,CAAC;QAC7D,IAAI,iBAAiB,EAAE,CAAC;YACtB,iCAAiC;YACjC,IAAI,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AAE,CAAC;YACzD,gBAAgB,WAAW,CAAC,WAAW,EAAE;YACzC,KAAK;SACN,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEb,MAAM,WAAW,GAAG,GAAG,eAAe,OAAO,OAAO,IAAI,CAAC;QAEzD,sCAAsC;QACtC,OAAO,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IACvC,CAAC;CACF;AAhJD,wCAgJC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/compiler/index.ts"],"names":[],"mappings":"AACA,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
// Compilation Engine exports
|
|
18
|
+
__exportStar(require("./token-estimator"), exports);
|
|
19
|
+
__exportStar(require("./rule-selector"), exports);
|
|
20
|
+
__exportStar(require("./base-compiler"), exports);
|
|
21
|
+
__exportStar(require("./cursor-compiler"), exports);
|
|
22
|
+
__exportStar(require("./claude-compiler"), exports);
|
|
23
|
+
__exportStar(require("./agents-compiler"), exports);
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/compiler/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6BAA6B;AAC7B,oDAAkC;AAClC,kDAAgC;AAChC,kDAAgC;AAChC,oDAAkC;AAClC,oDAAkC;AAClC,oDAAkC"}
|