@neikyun/ciel 5.2.11 → 5.2.12
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/package.json +1 -1
- package/scripts/postinstall.cjs +11 -50
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neikyun/ciel",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.12",
|
|
4
4
|
"description": "Ciel — Deep-reasoning pipeline for LLM-assisted development. OpenCode plugin + multi-platform CLI (OpenCode, Claude Code, more).",
|
|
5
5
|
"main": "./dist/plugin/index.js",
|
|
6
6
|
"types": "./dist/plugin/index.d.ts",
|
package/scripts/postinstall.cjs
CHANGED
|
@@ -113,6 +113,12 @@ async function main() {
|
|
|
113
113
|
const platforms = detectPlatforms(targetDir);
|
|
114
114
|
const assetsDir = resolveAssets();
|
|
115
115
|
|
|
116
|
+
// TOUJOURS chercher les CLI, même si des plateformes sont déjà détectées
|
|
117
|
+
const hasClaudeCLI = detectCLI("claude");
|
|
118
|
+
const hasOpenCodeCLI = detectCLI("opencode");
|
|
119
|
+
if (hasClaudeCLI && !platforms.includes("Claude Code")) platforms.push("Claude Code");
|
|
120
|
+
if (hasOpenCodeCLI && !platforms.includes("OpenCode")) platforms.push("OpenCode");
|
|
121
|
+
|
|
116
122
|
// Toujours afficher le message Ciel (sur stderr pour être visible via npm)
|
|
117
123
|
console.error(`\n ${bold("✦ Ciel v" + CIEL_VERSION)}`);
|
|
118
124
|
|
|
@@ -122,56 +128,11 @@ async function main() {
|
|
|
122
128
|
}
|
|
123
129
|
|
|
124
130
|
if (platforms.length === 0) {
|
|
125
|
-
// Aucune plateforme détectée
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
console.error(` ${yellow("~")} Aucune plateforme détectée.`);
|
|
131
|
-
console.error(` Installez ${cyan("opencode")} ou ${cyan("claude")} puis relancez.`);
|
|
132
|
-
console.error(` Ou: ${green("npx ciel init")}\n`);
|
|
133
|
-
return;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
// Proposer de configurer les CLIs détectées
|
|
137
|
-
let creer = !process.stdin.isTTY;
|
|
138
|
-
if (process.stdin.isTTY) {
|
|
139
|
-
const detected = [hasOpenCode && "OpenCode", hasClaude && "Claude Code"].filter(Boolean).join(" + ");
|
|
140
|
-
try {
|
|
141
|
-
const readline = require("readline");
|
|
142
|
-
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
143
|
-
creer = await new Promise(r => rl.question(` ${yellow("?")} Configurer Ciel pour ${cyan(detected)} ? ${green("(Y/n)")} `, a => { rl.close(); r(a.trim().toLowerCase() !== "n"); }));
|
|
144
|
-
} catch { creer = true; }
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
if (!creer) {
|
|
148
|
-
console.error(` ${cyan("→")} Annulé. Utilisez ${green("npx ciel init")} plus tard.\n`);
|
|
149
|
-
return;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
// Configurer les plateformes détectées
|
|
153
|
-
if (hasOpenCode) {
|
|
154
|
-
const cfgPath = join(targetDir, "opencode.json");
|
|
155
|
-
if (!existsSync(cfgPath)) {
|
|
156
|
-
const cfg = { $schema: "https://opencode.ai/config.json", plugin: ["@neikyun/ciel"] };
|
|
157
|
-
writeFileSync(cfgPath, JSON.stringify(cfg, null, 2) + "\n", "utf-8");
|
|
158
|
-
console.error(` ${green("✓")} opencode.json créé`);
|
|
159
|
-
}
|
|
160
|
-
platforms.push("OpenCode");
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
if (hasClaude) {
|
|
164
|
-
const claudeDir = join(targetDir, ".claude");
|
|
165
|
-
if (!existsSync(claudeDir)) {
|
|
166
|
-
mkdirSync(claudeDir, { recursive: true });
|
|
167
|
-
}
|
|
168
|
-
const settingsPath = join(claudeDir, "settings.json");
|
|
169
|
-
if (!existsSync(settingsPath)) {
|
|
170
|
-
writeFileSync(settingsPath, JSON.stringify({}, null, 2) + "\n", "utf-8");
|
|
171
|
-
console.error(` ${green("✓")} .claude/settings.json créé`);
|
|
172
|
-
}
|
|
173
|
-
platforms.push("Claude Code");
|
|
174
|
-
}
|
|
131
|
+
// Aucune plateforme détectée (ni config, ni CLI)
|
|
132
|
+
console.error(` ${yellow("~")} Aucune plateforme détectée.`);
|
|
133
|
+
console.error(` Installez ${cyan("opencode")} ou ${cyan("claude")} puis relancez.`);
|
|
134
|
+
console.error(` Ou: ${green("npx ciel init")}\n`);
|
|
135
|
+
return;
|
|
175
136
|
}
|
|
176
137
|
|
|
177
138
|
// Demander confirmation (sauter si non-TTY)
|