@a1st/aix-core 0.6.0 → 0.7.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/README.md +1 -1
- package/dist/agents/parser.d.ts.map +1 -1
- package/dist/agents/parser.js +3 -2
- package/dist/agents/parser.js.map +1 -1
- package/dist/direct-install.d.ts +8 -1
- package/dist/direct-install.d.ts.map +1 -1
- package/dist/direct-install.js +48 -6
- package/dist/direct-install.js.map +1 -1
- package/dist/editors/adapters/antigravity.d.ts +32 -0
- package/dist/editors/adapters/antigravity.d.ts.map +1 -0
- package/dist/editors/adapters/antigravity.js +94 -0
- package/dist/editors/adapters/antigravity.js.map +1 -0
- package/dist/editors/adapters/base.d.ts +34 -3
- package/dist/editors/adapters/base.d.ts.map +1 -1
- package/dist/editors/adapters/base.js +194 -34
- package/dist/editors/adapters/base.js.map +1 -1
- package/dist/editors/adapters/claude-code.d.ts +3 -1
- package/dist/editors/adapters/claude-code.d.ts.map +1 -1
- package/dist/editors/adapters/claude-code.js +5 -3
- package/dist/editors/adapters/claude-code.js.map +1 -1
- package/dist/editors/adapters/codex.d.ts +3 -1
- package/dist/editors/adapters/codex.d.ts.map +1 -1
- package/dist/editors/adapters/codex.js +7 -5
- package/dist/editors/adapters/codex.js.map +1 -1
- package/dist/editors/adapters/copilot.d.ts +3 -1
- package/dist/editors/adapters/copilot.d.ts.map +1 -1
- package/dist/editors/adapters/copilot.js +13 -3
- package/dist/editors/adapters/copilot.js.map +1 -1
- package/dist/editors/adapters/cursor.d.ts +3 -1
- package/dist/editors/adapters/cursor.d.ts.map +1 -1
- package/dist/editors/adapters/cursor.js +5 -3
- package/dist/editors/adapters/cursor.js.map +1 -1
- package/dist/editors/adapters/grok.d.ts +33 -0
- package/dist/editors/adapters/grok.d.ts.map +1 -0
- package/dist/editors/adapters/grok.js +121 -0
- package/dist/editors/adapters/grok.js.map +1 -0
- package/dist/editors/adapters/index.d.ts +2 -1
- package/dist/editors/adapters/index.d.ts.map +1 -1
- package/dist/editors/adapters/index.js +2 -1
- package/dist/editors/adapters/index.js.map +1 -1
- package/dist/editors/adapters/opencode.d.ts +3 -1
- package/dist/editors/adapters/opencode.d.ts.map +1 -1
- package/dist/editors/adapters/opencode.js +5 -3
- package/dist/editors/adapters/opencode.js.map +1 -1
- package/dist/editors/adapters/windsurf.d.ts +3 -1
- package/dist/editors/adapters/windsurf.d.ts.map +1 -1
- package/dist/editors/adapters/windsurf.js +6 -4
- package/dist/editors/adapters/windsurf.js.map +1 -1
- package/dist/editors/adapters/zed.d.ts +3 -1
- package/dist/editors/adapters/zed.d.ts.map +1 -1
- package/dist/editors/adapters/zed.js +6 -4
- package/dist/editors/adapters/zed.js.map +1 -1
- package/dist/editors/index.d.ts +3 -3
- package/dist/editors/index.d.ts.map +1 -1
- package/dist/editors/index.js +2 -2
- package/dist/editors/index.js.map +1 -1
- package/dist/editors/install.d.ts.map +1 -1
- package/dist/editors/install.js +16 -6
- package/dist/editors/install.js.map +1 -1
- package/dist/editors/remove.d.ts +49 -1
- package/dist/editors/remove.d.ts.map +1 -1
- package/dist/editors/remove.js +222 -3
- package/dist/editors/remove.js.map +1 -1
- package/dist/editors/section-managed-markdown.d.ts +1 -1
- package/dist/editors/section-managed-markdown.js +1 -1
- package/dist/editors/strategies/{gemini → antigravity}/hooks.d.ts +3 -3
- package/dist/editors/strategies/antigravity/hooks.d.ts.map +1 -0
- package/dist/editors/strategies/{gemini → antigravity}/hooks.js +25 -38
- package/dist/editors/strategies/antigravity/hooks.js.map +1 -0
- package/dist/editors/strategies/antigravity/index.d.ts +5 -0
- package/dist/editors/strategies/antigravity/index.d.ts.map +1 -0
- package/dist/editors/strategies/antigravity/index.js +5 -0
- package/dist/editors/strategies/antigravity/index.js.map +1 -0
- package/dist/editors/strategies/{gemini → antigravity}/mcp.d.ts +4 -4
- package/dist/editors/strategies/antigravity/mcp.d.ts.map +1 -0
- package/dist/editors/strategies/antigravity/mcp.js +49 -0
- package/dist/editors/strategies/antigravity/mcp.js.map +1 -0
- package/dist/editors/strategies/antigravity/prompts.d.ts +20 -0
- package/dist/editors/strategies/antigravity/prompts.d.ts.map +1 -0
- package/dist/editors/strategies/antigravity/prompts.js +42 -0
- package/dist/editors/strategies/antigravity/prompts.js.map +1 -0
- package/dist/editors/strategies/antigravity/rules.d.ts +19 -0
- package/dist/editors/strategies/antigravity/rules.d.ts.map +1 -0
- package/dist/editors/strategies/antigravity/rules.js +90 -0
- package/dist/editors/strategies/antigravity/rules.js.map +1 -0
- package/dist/editors/strategies/claude-code/hooks.d.ts.map +1 -1
- package/dist/editors/strategies/claude-code/hooks.js +9 -5
- package/dist/editors/strategies/claude-code/hooks.js.map +1 -1
- package/dist/editors/strategies/claude-code/index.d.ts +2 -0
- package/dist/editors/strategies/claude-code/index.d.ts.map +1 -1
- package/dist/editors/strategies/claude-code/index.js +2 -0
- package/dist/editors/strategies/claude-code/index.js.map +1 -1
- package/dist/editors/strategies/claude-code/marketplaces.d.ts +14 -0
- package/dist/editors/strategies/claude-code/marketplaces.d.ts.map +1 -0
- package/dist/editors/strategies/claude-code/marketplaces.js +71 -0
- package/dist/editors/strategies/claude-code/marketplaces.js.map +1 -0
- package/dist/editors/strategies/claude-code/mcp.d.ts.map +1 -1
- package/dist/editors/strategies/claude-code/mcp.js +3 -24
- package/dist/editors/strategies/claude-code/mcp.js.map +1 -1
- package/dist/editors/strategies/claude-code/plugins.d.ts +14 -0
- package/dist/editors/strategies/claude-code/plugins.d.ts.map +1 -0
- package/dist/editors/strategies/claude-code/plugins.js +37 -0
- package/dist/editors/strategies/claude-code/plugins.js.map +1 -0
- package/dist/editors/strategies/codex/hooks.d.ts.map +1 -1
- package/dist/editors/strategies/codex/hooks.js +44 -10
- package/dist/editors/strategies/codex/hooks.js.map +1 -1
- package/dist/editors/strategies/codex/mcp.d.ts.map +1 -1
- package/dist/editors/strategies/codex/mcp.js +123 -34
- package/dist/editors/strategies/codex/mcp.js.map +1 -1
- package/dist/editors/strategies/copilot/index.d.ts +2 -0
- package/dist/editors/strategies/copilot/index.d.ts.map +1 -1
- package/dist/editors/strategies/copilot/index.js +2 -0
- package/dist/editors/strategies/copilot/index.js.map +1 -1
- package/dist/editors/strategies/copilot/marketplaces.d.ts +15 -0
- package/dist/editors/strategies/copilot/marketplaces.d.ts.map +1 -0
- package/dist/editors/strategies/copilot/marketplaces.js +44 -0
- package/dist/editors/strategies/copilot/marketplaces.js.map +1 -0
- package/dist/editors/strategies/copilot/mcp.d.ts.map +1 -1
- package/dist/editors/strategies/copilot/mcp.js +5 -59
- package/dist/editors/strategies/copilot/mcp.js.map +1 -1
- package/dist/editors/strategies/copilot/plugins.d.ts +15 -0
- package/dist/editors/strategies/copilot/plugins.d.ts.map +1 -0
- package/dist/editors/strategies/copilot/plugins.js +41 -0
- package/dist/editors/strategies/copilot/plugins.js.map +1 -0
- package/dist/editors/strategies/cursor/index.d.ts +2 -0
- package/dist/editors/strategies/cursor/index.d.ts.map +1 -1
- package/dist/editors/strategies/cursor/index.js +2 -0
- package/dist/editors/strategies/cursor/index.js.map +1 -1
- package/dist/editors/strategies/cursor/marketplaces.d.ts +13 -0
- package/dist/editors/strategies/cursor/marketplaces.d.ts.map +1 -0
- package/dist/editors/strategies/cursor/marketplaces.js +39 -0
- package/dist/editors/strategies/cursor/marketplaces.js.map +1 -0
- package/dist/editors/strategies/cursor/plugins.d.ts +13 -0
- package/dist/editors/strategies/cursor/plugins.d.ts.map +1 -0
- package/dist/editors/strategies/cursor/plugins.js +36 -0
- package/dist/editors/strategies/cursor/plugins.js.map +1 -0
- package/dist/editors/strategies/grok/hooks.d.ts +14 -0
- package/dist/editors/strategies/grok/hooks.d.ts.map +1 -0
- package/dist/editors/strategies/grok/hooks.js +190 -0
- package/dist/editors/strategies/grok/hooks.js.map +1 -0
- package/dist/editors/strategies/grok/index.d.ts +5 -0
- package/dist/editors/strategies/grok/index.d.ts.map +1 -0
- package/dist/editors/strategies/grok/index.js +5 -0
- package/dist/editors/strategies/grok/index.js.map +1 -0
- package/dist/editors/strategies/grok/mcp.d.ts +19 -0
- package/dist/editors/strategies/grok/mcp.d.ts.map +1 -0
- package/dist/editors/strategies/grok/mcp.js +60 -0
- package/dist/editors/strategies/grok/mcp.js.map +1 -0
- package/dist/editors/strategies/grok/prompts.d.ts +24 -0
- package/dist/editors/strategies/grok/prompts.d.ts.map +1 -0
- package/dist/editors/strategies/grok/prompts.js +46 -0
- package/dist/editors/strategies/grok/prompts.js.map +1 -0
- package/dist/editors/strategies/grok/rules.d.ts +20 -0
- package/dist/editors/strategies/grok/rules.d.ts.map +1 -0
- package/dist/editors/strategies/grok/rules.js +41 -0
- package/dist/editors/strategies/grok/rules.js.map +1 -0
- package/dist/editors/strategies/index.d.ts +8 -7
- package/dist/editors/strategies/index.d.ts.map +1 -1
- package/dist/editors/strategies/index.js +7 -6
- package/dist/editors/strategies/index.js.map +1 -1
- package/dist/editors/strategies/opencode/index.d.ts +1 -0
- package/dist/editors/strategies/opencode/index.d.ts.map +1 -1
- package/dist/editors/strategies/opencode/index.js +1 -0
- package/dist/editors/strategies/opencode/index.js.map +1 -1
- package/dist/editors/strategies/opencode/mcp.d.ts.map +1 -1
- package/dist/editors/strategies/opencode/mcp.js +7 -12
- package/dist/editors/strategies/opencode/mcp.js.map +1 -1
- package/dist/editors/strategies/opencode/plugins.d.ts +15 -0
- package/dist/editors/strategies/opencode/plugins.d.ts.map +1 -0
- package/dist/editors/strategies/opencode/plugins.js +52 -0
- package/dist/editors/strategies/opencode/plugins.js.map +1 -0
- package/dist/editors/strategies/shared/agents.d.ts +1 -0
- package/dist/editors/strategies/shared/agents.d.ts.map +1 -1
- package/dist/editors/strategies/shared/agents.js +2 -2
- package/dist/editors/strategies/shared/agents.js.map +1 -1
- package/dist/editors/strategies/shared/global-mcp.d.ts +10 -0
- package/dist/editors/strategies/shared/global-mcp.d.ts.map +1 -1
- package/dist/editors/strategies/shared/global-mcp.js +6 -0
- package/dist/editors/strategies/shared/global-mcp.js.map +1 -1
- package/dist/editors/strategies/shared/hook-paths.d.ts +16 -0
- package/dist/editors/strategies/shared/hook-paths.d.ts.map +1 -0
- package/dist/editors/strategies/shared/hook-paths.js +30 -0
- package/dist/editors/strategies/shared/hook-paths.js.map +1 -0
- package/dist/editors/strategies/shared/index.d.ts +5 -0
- package/dist/editors/strategies/shared/index.d.ts.map +1 -1
- package/dist/editors/strategies/shared/index.js +5 -0
- package/dist/editors/strategies/shared/index.js.map +1 -1
- package/dist/editors/strategies/shared/mcp-import-utils.d.ts +7 -0
- package/dist/editors/strategies/shared/mcp-import-utils.d.ts.map +1 -0
- package/dist/editors/strategies/shared/mcp-import-utils.js +16 -0
- package/dist/editors/strategies/shared/mcp-import-utils.js.map +1 -0
- package/dist/editors/strategies/shared/no-marketplaces.d.ts +13 -0
- package/dist/editors/strategies/shared/no-marketplaces.d.ts.map +1 -0
- package/dist/editors/strategies/shared/no-marketplaces.js +19 -0
- package/dist/editors/strategies/shared/no-marketplaces.js.map +1 -0
- package/dist/editors/strategies/shared/no-plugins.d.ts +13 -0
- package/dist/editors/strategies/shared/no-plugins.d.ts.map +1 -0
- package/dist/editors/strategies/shared/no-plugins.js +19 -0
- package/dist/editors/strategies/shared/no-plugins.js.map +1 -0
- package/dist/editors/strategies/shared/plugin-compatibility.d.ts +33 -0
- package/dist/editors/strategies/shared/plugin-compatibility.d.ts.map +1 -0
- package/dist/editors/strategies/shared/plugin-compatibility.js +134 -0
- package/dist/editors/strategies/shared/plugin-compatibility.js.map +1 -0
- package/dist/editors/strategies/shared/plugin-paths.d.ts +20 -0
- package/dist/editors/strategies/shared/plugin-paths.d.ts.map +1 -0
- package/dist/editors/strategies/shared/plugin-paths.js +62 -0
- package/dist/editors/strategies/shared/plugin-paths.js.map +1 -0
- package/dist/editors/strategies/shared/standard-mcp.d.ts +34 -0
- package/dist/editors/strategies/shared/standard-mcp.d.ts.map +1 -1
- package/dist/editors/strategies/shared/standard-mcp.js +76 -30
- package/dist/editors/strategies/shared/standard-mcp.js.map +1 -1
- package/dist/editors/strategies/types.d.ts +44 -1
- package/dist/editors/strategies/types.d.ts.map +1 -1
- package/dist/editors/strategies/windsurf/mcp.d.ts.map +1 -1
- package/dist/editors/strategies/windsurf/mcp.js +40 -55
- package/dist/editors/strategies/windsurf/mcp.js.map +1 -1
- package/dist/editors/strategies/zed/mcp.d.ts.map +1 -1
- package/dist/editors/strategies/zed/mcp.js +19 -29
- package/dist/editors/strategies/zed/mcp.js.map +1 -1
- package/dist/editors/types.d.ts +30 -6
- package/dist/editors/types.d.ts.map +1 -1
- package/dist/editors/types.js +10 -3
- package/dist/editors/types.js.map +1 -1
- package/dist/format-error.d.ts.map +1 -1
- package/dist/format-error.js +1 -3
- package/dist/format-error.js.map +1 -1
- package/dist/fs/safe-rm.d.ts.map +1 -1
- package/dist/fs/safe-rm.js +2 -0
- package/dist/fs/safe-rm.js.map +1 -1
- package/dist/global/processor.d.ts.map +1 -1
- package/dist/global/processor.js +17 -18
- package/dist/global/processor.js.map +1 -1
- package/dist/global/types.d.ts +5 -0
- package/dist/global/types.d.ts.map +1 -1
- package/dist/mcp/env.d.ts +7 -0
- package/dist/mcp/env.d.ts.map +1 -1
- package/dist/mcp/env.js +10 -1
- package/dist/mcp/env.js.map +1 -1
- package/dist/mcp/index.d.ts +1 -1
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +1 -1
- package/dist/mcp/index.js.map +1 -1
- package/dist/merge.d.ts +11 -2
- package/dist/merge.d.ts.map +1 -1
- package/dist/merge.js +41 -0
- package/dist/merge.js.map +1 -1
- package/dist/reference-resolver.d.ts +1 -1
- package/dist/reference-resolver.d.ts.map +1 -1
- package/dist/reference-resolver.js +1 -0
- package/dist/reference-resolver.js.map +1 -1
- package/dist/state/tracker.d.ts +18 -0
- package/dist/state/tracker.d.ts.map +1 -1
- package/dist/state/tracker.js +31 -0
- package/dist/state/tracker.js.map +1 -1
- package/dist/state/types.d.ts +4 -2
- package/dist/state/types.d.ts.map +1 -1
- package/dist/type-guards.d.ts +6 -0
- package/dist/type-guards.d.ts.map +1 -0
- package/dist/type-guards.js +8 -0
- package/dist/type-guards.js.map +1 -0
- package/package.json +1 -1
- package/dist/editors/adapters/gemini.d.ts +0 -45
- package/dist/editors/adapters/gemini.d.ts.map +0 -1
- package/dist/editors/adapters/gemini.js +0 -144
- package/dist/editors/adapters/gemini.js.map +0 -1
- package/dist/editors/strategies/gemini/hooks.d.ts.map +0 -1
- package/dist/editors/strategies/gemini/hooks.js.map +0 -1
- package/dist/editors/strategies/gemini/index.d.ts +0 -5
- package/dist/editors/strategies/gemini/index.d.ts.map +0 -1
- package/dist/editors/strategies/gemini/index.js +0 -5
- package/dist/editors/strategies/gemini/index.js.map +0 -1
- package/dist/editors/strategies/gemini/mcp.d.ts.map +0 -1
- package/dist/editors/strategies/gemini/mcp.js +0 -73
- package/dist/editors/strategies/gemini/mcp.js.map +0 -1
- package/dist/editors/strategies/gemini/prompts.d.ts +0 -34
- package/dist/editors/strategies/gemini/prompts.d.ts.map +0 -1
- package/dist/editors/strategies/gemini/prompts.js +0 -92
- package/dist/editors/strategies/gemini/prompts.js.map +0 -1
- package/dist/editors/strategies/gemini/rules.d.ts +0 -19
- package/dist/editors/strategies/gemini/rules.d.ts.map +0 -1
- package/dist/editors/strategies/gemini/rules.js +0 -51
- package/dist/editors/strategies/gemini/rules.js.map +0 -1
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { parsePromptFiles } from '../shared/prompt-utils.js';
|
|
2
|
-
/**
|
|
3
|
-
* Gemini CLI prompts strategy. Gemini uses TOML files in `.gemini/commands/` for custom
|
|
4
|
-
* slash commands. Each command has a `description` and `prompt` field.
|
|
5
|
-
*
|
|
6
|
-
* Format:
|
|
7
|
-
* ```toml
|
|
8
|
-
* description = "Review code changes"
|
|
9
|
-
* prompt = "Review the following code..."
|
|
10
|
-
* ```
|
|
11
|
-
*/
|
|
12
|
-
export class GeminiPromptsStrategy {
|
|
13
|
-
isSupported() {
|
|
14
|
-
return true;
|
|
15
|
-
}
|
|
16
|
-
getPromptsDir() {
|
|
17
|
-
return 'commands';
|
|
18
|
-
}
|
|
19
|
-
getFileExtension() {
|
|
20
|
-
return '.toml';
|
|
21
|
-
}
|
|
22
|
-
getGlobalPromptsPath() {
|
|
23
|
-
return '.gemini/commands';
|
|
24
|
-
}
|
|
25
|
-
formatPrompt(prompt) {
|
|
26
|
-
const lines = [];
|
|
27
|
-
if (prompt.description) {
|
|
28
|
-
lines.push(`description = ${tomlQuote(prompt.description)}`);
|
|
29
|
-
}
|
|
30
|
-
lines.push(`prompt = ${tomlQuote(prompt.content)}`);
|
|
31
|
-
return lines.join('\n') + '\n';
|
|
32
|
-
}
|
|
33
|
-
async parseGlobalPrompts(files, readFile) {
|
|
34
|
-
return parsePromptFiles({
|
|
35
|
-
files,
|
|
36
|
-
readFile,
|
|
37
|
-
includeFile: (file) => file.endsWith('.toml'),
|
|
38
|
-
stripSuffix: /\.toml$/,
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Detect if content appears to be in Gemini's TOML prompt format.
|
|
43
|
-
* Gemini prompts use `prompt = "..."` in TOML.
|
|
44
|
-
*/
|
|
45
|
-
detectFormat(content) {
|
|
46
|
-
return /^prompt\s*=/m.test(content);
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Parse Gemini TOML prompt format into unified format.
|
|
50
|
-
* Extracts `description` and `prompt` fields.
|
|
51
|
-
*/
|
|
52
|
-
parseFrontmatter(rawContent) {
|
|
53
|
-
// For TOML prompts, the entire file is the "prompt" definition
|
|
54
|
-
const descMatch = rawContent.match(/^description\s*=\s*"([^"]*(?:\\.[^"]*)*)"/m), promptMatch = rawContent.match(/^prompt\s*=\s*"([^"]*(?:\\.[^"]*)*)"/m);
|
|
55
|
-
// Try multiline literal strings (triple quotes)
|
|
56
|
-
const promptMultiMatch = rawContent.match(/^prompt\s*=\s*"""([\s\S]*?)"""/m);
|
|
57
|
-
const description = descMatch?.[1] ? unescapeToml(descMatch[1]) : undefined;
|
|
58
|
-
const content = promptMultiMatch?.[1]
|
|
59
|
-
? promptMultiMatch[1].trim()
|
|
60
|
-
: promptMatch?.[1]
|
|
61
|
-
? unescapeToml(promptMatch[1])
|
|
62
|
-
: rawContent;
|
|
63
|
-
return {
|
|
64
|
-
content,
|
|
65
|
-
description,
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Quote a string for TOML format. Uses multiline literal strings (triple quotes) for content
|
|
71
|
-
* with newlines, otherwise uses basic strings with escaping.
|
|
72
|
-
*/
|
|
73
|
-
function tomlQuote(value) {
|
|
74
|
-
if (value.includes('\n')) {
|
|
75
|
-
// Use multiline basic string
|
|
76
|
-
return `"""\n${value}\n"""`;
|
|
77
|
-
}
|
|
78
|
-
// Escape backslashes and quotes for basic string
|
|
79
|
-
const escaped = value.replace(/\\/g, '\\\\').replace(/"/g, '\\"');
|
|
80
|
-
return `"${escaped}"`;
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Unescape a TOML basic string value.
|
|
84
|
-
*/
|
|
85
|
-
function unescapeToml(value) {
|
|
86
|
-
return value
|
|
87
|
-
.replace(/\\n/g, '\n')
|
|
88
|
-
.replace(/\\t/g, '\t')
|
|
89
|
-
.replace(/\\"/g, '"')
|
|
90
|
-
.replace(/\\\\/g, '\\');
|
|
91
|
-
}
|
|
92
|
-
//# sourceMappingURL=prompts.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../../../src/editors/strategies/gemini/prompts.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7D;;;;;;;;;GASG;AACH,MAAM,OAAO,qBAAqB;IAC/B,WAAW;QACR,OAAO,IAAI,CAAC;IACf,CAAC;IAED,aAAa;QACV,OAAO,UAAU,CAAC;IACrB,CA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CAAC;QAC5E,MAAM,OAAO,GAAG,gBAAgB,EAAE,CAAC,CAAC,CAAC;YAClC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE;YAC5B,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;gBACf,CAAC,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;gBAC9B,CAAC,CAAC,UAAU,CAAC;QAEnB,OAAO;YACJ,OAAO;YACP,WAAW;SACb,CAAC;IACL,CAAC;CACH;AAED;;;GAGG;AACH,SAAS,SAAS,CAAC,KAAa;IAC7B,IAAI,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QACxB,6BAA6B;QAC7B,OAAO,QAAQ,KAAK,OAAO,CAAC;IAC/B,CAAC;IACD,iDAAiD;IACjD,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAElE,OAAO,IAAI,OAAO,GAAG,CAAC;AACzB,CAAC;AAED;;GAEG;AACH,SAAS,YAAY,CAAC,KAAa;IAChC,OAAO,KAAK;SACR,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC;SACrB,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC;SACrB,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;SACpB,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AAC9B,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { ImportedRulesResult, RulesStrategy } from '../types.js';
|
|
2
|
-
import type { EditorRule } from '../../types.js';
|
|
3
|
-
/**
|
|
4
|
-
* Gemini CLI rules strategy. Uses `GEMINI.md` at the project root for project-level context and
|
|
5
|
-
* instructions. Plain markdown, no frontmatter. The adapter handles section-managed writing to
|
|
6
|
-
* avoid overwriting user content.
|
|
7
|
-
*/
|
|
8
|
-
export declare class GeminiRulesStrategy implements RulesStrategy {
|
|
9
|
-
getRulesDir(): string;
|
|
10
|
-
getFileExtension(): string;
|
|
11
|
-
getGlobalRulesPath(): string | null;
|
|
12
|
-
parseGlobalRules(content: string): {
|
|
13
|
-
rules: string[];
|
|
14
|
-
warnings: string[];
|
|
15
|
-
};
|
|
16
|
-
importProjectRules(projectRoot: string): Promise<ImportedRulesResult>;
|
|
17
|
-
formatRule(rule: EditorRule): string;
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=rules.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../../../src/editors/strategies/gemini/rules.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACtE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAIjD;;;;GAIG;AACH,qBAAa,mBAAoB,YAAW,aAAa;IACtD,WAAW,IAAI,MAAM;IAKrB,gBAAgB,IAAI,MAAM;IAI1B,kBAAkB,IAAI,MAAM,GAAG,IAAI;IAInC,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG;QAAE,KAAK,EAAE,MAAM,EAAE,CAAC;QAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;KAAE;IASpE,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAwB3E,UAAU,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM;CAGtC"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { join } from 'pathe';
|
|
2
|
-
import { getRuntimeAdapter } from '../../../runtime/index.js';
|
|
3
|
-
import { formatPlainMarkdownRule } from '../shared/rule-utils.js';
|
|
4
|
-
/**
|
|
5
|
-
* Gemini CLI rules strategy. Uses `GEMINI.md` at the project root for project-level context and
|
|
6
|
-
* instructions. Plain markdown, no frontmatter. The adapter handles section-managed writing to
|
|
7
|
-
* avoid overwriting user content.
|
|
8
|
-
*/
|
|
9
|
-
export class GeminiRulesStrategy {
|
|
10
|
-
getRulesDir() {
|
|
11
|
-
// Gemini uses GEMINI.md at the project root, one level above the .gemini config dir
|
|
12
|
-
return '..';
|
|
13
|
-
}
|
|
14
|
-
getFileExtension() {
|
|
15
|
-
return '.md';
|
|
16
|
-
}
|
|
17
|
-
getGlobalRulesPath() {
|
|
18
|
-
return '.gemini/GEMINI.md';
|
|
19
|
-
}
|
|
20
|
-
parseGlobalRules(content) {
|
|
21
|
-
const rules = [];
|
|
22
|
-
if (content.trim()) {
|
|
23
|
-
rules.push(content.trim());
|
|
24
|
-
}
|
|
25
|
-
return { rules, warnings: [] };
|
|
26
|
-
}
|
|
27
|
-
async importProjectRules(projectRoot) {
|
|
28
|
-
const warnings = [], geminiPath = join(projectRoot, 'GEMINI.md');
|
|
29
|
-
try {
|
|
30
|
-
const content = await getRuntimeAdapter().fs.readFile(geminiPath, 'utf-8');
|
|
31
|
-
if (content.trim()) {
|
|
32
|
-
return {
|
|
33
|
-
rules: [{ content: content.trim(), name: 'GEMINI', path: geminiPath, scope: 'project' }],
|
|
34
|
-
paths: { GEMINI: geminiPath },
|
|
35
|
-
scopes: { GEMINI: 'project' },
|
|
36
|
-
warnings,
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
catch (err) {
|
|
41
|
-
if (err.code !== 'ENOENT') {
|
|
42
|
-
warnings.push(`Failed to read Gemini rules from ${geminiPath}: ${err.message}`);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
return { rules: [], paths: {}, scopes: {}, warnings };
|
|
46
|
-
}
|
|
47
|
-
formatRule(rule) {
|
|
48
|
-
return formatPlainMarkdownRule(rule, '##');
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
//# sourceMappingURL=rules.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rules.js","sourceRoot":"","sources":["../../../../src/editors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