@iola_adm/iola-cli 0.1.89 → 0.1.91

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": "@iola_adm/iola-cli",
3
- "version": "0.1.89",
3
+ "version": "0.1.91",
4
4
  "description": "CLI и AI-агент городского округа Йошкар-Ола.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/adm-iola/iola-cli#readme",
package/src/cli.js CHANGED
@@ -299,7 +299,6 @@ const SLASH_COMMANDS = [
299
299
  { command: "/views", description: "saved views" },
300
300
  { command: "/config get", description: "конфигурация" },
301
301
  { command: "/delete", description: "удалить локальные данные iola-cli" },
302
- { command: "/uninstall", description: "алиас для /delete" },
303
302
  { command: "/layers", description: "слои данных" },
304
303
  { command: "/data schools --limit 10", description: "данные слоя" },
305
304
  { command: "/schools --limit 10", description: "школы" },
@@ -391,8 +390,6 @@ const COMMANDS = new Map([
391
390
  ["alias", handleAlias],
392
391
  ["run", runNaturalLanguage],
393
392
  ["config", handleConfig],
394
- ["uninstall", handleUninstall],
395
- ["purge", handleUninstall],
396
393
  ["delete", handleUninstall],
397
394
  ["banner", showBanner],
398
395
  ["agent", startAgent],
@@ -582,7 +579,6 @@ Usage:
582
579
  iola config set api.mcpBaseUrl URL
583
580
  iola config reset
584
581
  iola delete
585
- iola uninstall
586
582
  iola update
587
583
  iola ask TEXT [--profile NAME] [--model MODEL] [--tools] [--files] [--plan] [--trace] [--reasoning fast|verify|vote] [--output FILE] [--schema json|table] [--events] [--no-history] [--bare] [--quiet] [--no-color] [--fail-on-empty]
588
584
  iola data LAYER [--limit 10] [--search TEXT] [--where FIELD=VALUE] [--columns a,b,c] [--format table|json|csv]
@@ -1264,8 +1260,6 @@ async function handleAgentLine(line, state) {
1264
1260
  diff: ["diff", args],
1265
1261
  config: ["config", args],
1266
1262
  delete: ["delete", args],
1267
- uninstall: ["uninstall", args],
1268
- purge: ["purge", args],
1269
1263
  layers: ["layers", args],
1270
1264
  data: ["data", args],
1271
1265
  schools: ["schools", args],
@@ -1290,7 +1284,8 @@ async function handleAgentLine(line, state) {
1290
1284
  }
1291
1285
 
1292
1286
  const [cliCommand, cliArgs] = mapped;
1293
- await COMMANDS.get(cliCommand)(cliArgs);
1287
+ const result = await COMMANDS.get(cliCommand)(cliArgs);
1288
+ if (cliCommand === "delete" && result?.deleted) return true;
1294
1289
  return false;
1295
1290
  }
1296
1291
 
@@ -2170,7 +2165,7 @@ async function handleUninstall(args = []) {
2170
2165
  };
2171
2166
  if (options.json) printJson(payload);
2172
2167
  else printKeyValue(Object.fromEntries(payload.willDelete.map((item) => [item.label, `${item.path} (${item.exists ? "exists" : "missing"})`])));
2173
- return;
2168
+ return { deleted: false };
2174
2169
  }
2175
2170
 
2176
2171
  if (!options.yes) {
@@ -2184,7 +2179,7 @@ async function handleUninstall(args = []) {
2184
2179
  const confirmed = await confirm("Удалить локальные данные iola-cli? [y/N] ");
2185
2180
  if (!confirmed) {
2186
2181
  console.log("Удаление отменено.");
2187
- return;
2182
+ return { deleted: false };
2188
2183
  }
2189
2184
  }
2190
2185
 
@@ -2195,8 +2190,9 @@ async function handleUninstall(args = []) {
2195
2190
  console.log("Локальные данные iola-cli удалены.");
2196
2191
  console.log("Codex CLI не тронут.");
2197
2192
  console.log("Для полной переустановки npm-пакета:");
2198
- console.log(" npm uninstall -g @iola_adm/iola-cli");
2193
+ console.log(" npm remove -g @iola_adm/iola-cli");
2199
2194
  console.log(" npm install -g @iola_adm/iola-cli@latest");
2195
+ return { deleted: true };
2200
2196
  }
2201
2197
 
2202
2198
  async function handleDb(args) {
@@ -49,7 +49,7 @@ const commands = await runCli(["commands"]);
49
49
  assertIncludes(commands, "iola browser status|install|open|text|html|screenshot|pdf|click|type|eval", "commands");
50
50
  assertIncludes(commands, "iola mcp list|status|install|remove|serve [--stdio]", "commands");
51
51
  assertIncludes(commands, "iola delete", "commands");
52
- assertIncludes(commands, "iola uninstall", "commands");
52
+ assertNotIncludes(commands, "iola uninstall", "commands");
53
53
  assertNotIncludes(commands, "Госуслуг", "commands");
54
54
  assertNotIncludes(commands, "gosuslugi", "commands");
55
55
 
@@ -63,11 +63,6 @@ assertIncludes(skills, "open-data", "skills list");
63
63
  assertIncludes(skills, "reports", "skills list");
64
64
  assertNotIncludes(skills, "gosuslugi", "skills list");
65
65
 
66
- const uninstallPlan = JSON.parse(await runCli(["uninstall", "--dry-run", "--json"]));
67
- if (!Array.isArray(uninstallPlan.willDelete) || !uninstallPlan.willKeep.includes("Codex CLI")) {
68
- throw new Error("uninstall dry-run should list delete targets and keep Codex CLI");
69
- }
70
-
71
66
  const deletePlan = JSON.parse(await runCli(["delete", "--dry-run", "--json"]));
72
67
  if (!Array.isArray(deletePlan.willDelete) || !deletePlan.willKeep.includes("Codex CLI")) {
73
68
  throw new Error("delete dry-run should list delete targets and keep Codex CLI");