@oal-sarl/code 6.0.0 → 6.0.1

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.
Files changed (2) hide show
  1. package/dist/index.js +14 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -20,7 +20,8 @@ var __require = /* @__PURE__ */ createRequire(import.meta.url);
20
20
  // src/config/settings.ts
21
21
  var exports_settings = {};
22
22
  __export(exports_settings, {
23
- settings: () => settings
23
+ settings: () => settings,
24
+ CURRENT_SETUP_VERSION: () => CURRENT_SETUP_VERSION
24
25
  });
25
26
  import Conf from "conf";
26
27
  function migrateLegacySettings() {
@@ -28,8 +29,13 @@ function migrateLegacySettings() {
28
29
  if (currentVision === "none" || currentVision === "auto") {
29
30
  store.set("visionModel", "embedded");
30
31
  }
32
+ const setupVersion = store.get("setupVersion");
33
+ if (!Number.isFinite(setupVersion) || (setupVersion ?? 0) < CURRENT_SETUP_VERSION) {
34
+ store.set("setupCompleted", false);
35
+ store.set("setupVersion", CURRENT_SETUP_VERSION);
36
+ }
31
37
  }
32
- var store, settings;
38
+ var CURRENT_SETUP_VERSION = 2, store, settings;
33
39
  var init_settings = __esm(() => {
34
40
  store = new Conf({
35
41
  projectName: "code",
@@ -53,6 +59,7 @@ var init_settings = __esm(() => {
53
59
  previewServerPort: 7799,
54
60
  enableMultiSession: true,
55
61
  setupCompleted: false,
62
+ setupVersion: 0,
56
63
  enableSkills: true,
57
64
  enableTransactions: true,
58
65
  enableJudge: true,
@@ -84,6 +91,7 @@ var init_settings = __esm(() => {
84
91
  setApiKey: (key) => store.set("apiKey", key),
85
92
  getDefaultModel: () => store.get("defaultModel"),
86
93
  setDefaultModel: (model) => store.set("defaultModel", model),
94
+ isSetupCurrent: () => Boolean(store.get("setupCompleted")) && Number(store.get("setupVersion")) >= CURRENT_SETUP_VERSION,
87
95
  get: (key) => store.get(key),
88
96
  set: (key, val) => store.set(key, val)
89
97
  };
@@ -8580,6 +8588,7 @@ function WizardContainer({ onComplete }) {
8580
8588
  settings.set("visionModelCached", await isModelCached(VISION_MODEL_ID));
8581
8589
  settings.set("embeddingModelCached", await isModelCached(EMBED_MODEL_ID));
8582
8590
  settings.set("setupCompleted", true);
8591
+ settings.set("setupVersion", CURRENT_SETUP_VERSION);
8583
8592
  onComplete(merged);
8584
8593
  };
8585
8594
  const steps = [
@@ -14418,7 +14427,7 @@ async function bootstrapContext(apiKey, taskForSkills = "") {
14418
14427
  program.name("oal-code").description("Code v6 Augmented | OAL SARL | Vision embarquee | Transactions | Judge").version("6.0.0");
14419
14428
  async function startChat(opts) {
14420
14429
  const useInkUi = shouldUseInkUi();
14421
- const setupRequired = opts.setup || opts.config || !settings.get("setupCompleted") || !hasValidApiKey();
14430
+ const setupRequired = opts.setup || opts.config || !settings.isSetupCurrent() || !hasValidApiKey();
14422
14431
  if (setupRequired) {
14423
14432
  if (useInkUi) {
14424
14433
  const { waitForWizard: waitForWizard2 } = await Promise.resolve().then(() => (init_wizardHelper(), exports_wizardHelper));
@@ -14430,6 +14439,7 @@ async function startChat(opts) {
14430
14439
  rl.close();
14431
14440
  settings.setApiKey(key);
14432
14441
  settings.set("setupCompleted", true);
14442
+ settings.set("setupVersion", CURRENT_SETUP_VERSION);
14433
14443
  }
14434
14444
  }
14435
14445
  await resolveVisionSource();
@@ -14490,6 +14500,7 @@ program.command("start").description("Alias de chat").option("--setup", "Relance
14490
14500
  program.command("config").description("Configurer Code").option("-k, --key <apiKey>", "Cle API Pollinations (pk_... ou sk_...)").option("-m, --model <model>", "Modele par defaut (kimi | mistral | gemini-fast)").option("-l, --language <lang>", "Langue (fr | en | auto)").option("--vision <source>", "embedded | pollinations | ollama").option("--sandbox <mode>", "safe | docker | none").option("--max-iterations <n>", "Nombre max d'iterations agent").option("--setup", "Relancer le wizard au prochain demarrage").option("--no-memory", "Desactiver la memoire inter-sessions").option("--no-web-search", "Desactiver la recherche web").option("--no-undo", "Desactiver l'undo stack").option("--no-judge", "Desactiver le judge pass").option("--judge-threshold <score>", "Score minimum judge (defaut 80)").option("--no-transactions", "Desactiver les transactions atomiques").option("--no-semantic-index", "Desactiver l'index semantique").option("--autonomy <mode>", "guarded | supervised").option("--clarify <mode>", "moderate | high-only | never").option("--llm-judge <mode>", "always | required | off").action((options) => {
14491
14501
  if (options.setup) {
14492
14502
  settings.set("setupCompleted", false);
14503
+ settings.set("setupVersion", 0);
14493
14504
  console.log("Wizard reinitialise. Lance `oal-code chat --setup`.");
14494
14505
  }
14495
14506
  if (options.key) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oal-sarl/code",
3
- "version": "6.0.0",
3
+ "version": "6.0.1",
4
4
  "description": "Code v6 Augmented | OAL SARL | Agent de coding CLI",
5
5
  "type": "module",
6
6
  "author": "OAL SARL",