@neikyun/ciel 5.2.3 → 5.2.4

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neikyun/ciel",
3
- "version": "5.2.3",
3
+ "version": "5.2.4",
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",
@@ -108,10 +108,26 @@ async function main() {
108
108
  }
109
109
 
110
110
  if (platforms.length === 0) {
111
- console.error(` ${yellow("~")} Aucune plateforme détectée.`);
112
- console.error(` Ajoutez ${cyan("opencode.json")} ou créez ${cyan(".claude/")} puis relancez npm install.`);
113
- console.error(` Ou utilisez ${green("npx ciel init")} pour configurer manuellement.\n`);
114
- return;
111
+ // Aucune plateforme détectée → proposer de créer opencode.json
112
+ let creer = !process.stdin.isTTY; // auto en non-TTY
113
+ if (process.stdin.isTTY) {
114
+ try {
115
+ const readline = require("readline");
116
+ const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
117
+ creer = await new Promise(r => rl.question(` ${yellow("?")} Configurer Ciel pour OpenCode ? ${green("(Y/n)")} `, a => { rl.close(); r(a.trim().toLowerCase() !== "n"); }));
118
+ } catch { creer = true; }
119
+ }
120
+ if (creer) {
121
+ // Créer opencode.json
122
+ const cfgPath = join(targetDir, "opencode.json");
123
+ const cfg = { $schema: "https://opencode.ai/config.json", plugin: ["@neikyun/ciel"] };
124
+ writeFileSync(cfgPath, JSON.stringify(cfg, null, 2) + "\n", "utf-8");
125
+ console.error(` ${green("✓")} opencode.json créé avec le plugin ${cyan("@neikyun/ciel")}`);
126
+ platforms.push("OpenCode");
127
+ } else {
128
+ console.error(` ${cyan("→")} Utilisez ${green("npx ciel init")} plus tard.\n`);
129
+ return;
130
+ }
115
131
  }
116
132
 
117
133
  // Demander confirmation (sauter si non-TTY)