@tostudy-ai/cli 0.18.16 → 0.18.18

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/dist/main.js CHANGED
@@ -2330,6 +2330,7 @@ var init_instruction_template_v3 = __esm({
2330
2330
  // src/workspace/runtime-registry.ts
2331
2331
  var runtime_registry_exports = {};
2332
2332
  __export(runtime_registry_exports, {
2333
+ CODEX_LOGIN_NOTICE: () => CODEX_LOGIN_NOTICE,
2333
2334
  RUNTIMES: () => RUNTIMES,
2334
2335
  antigravitySkillMd: () => antigravitySkillMd,
2335
2336
  cursorMdc: () => cursorMdc,
@@ -2464,7 +2465,7 @@ function upsertRootAgentsBlock(cwd, ctx) {
2464
2465
  return null;
2465
2466
  }
2466
2467
  }
2467
- var logger2, detectOpencode, detectGrok, detectAntigravity, RUNTIMES, TOSTUDY_BLOCK_PATTERN, TOSTUDY_BLOCK_PATTERN_GLOBAL, slugifyTitle;
2468
+ var logger2, detectOpencode, detectGrok, detectAntigravity, CODEX_LOGIN_NOTICE, RUNTIMES, TOSTUDY_BLOCK_PATTERN, TOSTUDY_BLOCK_PATTERN_GLOBAL, slugifyTitle;
2468
2469
  var init_runtime_registry = __esm({
2469
2470
  "src/workspace/runtime-registry.ts"() {
2470
2471
  "use strict";
@@ -2476,6 +2477,11 @@ var init_runtime_registry = __esm({
2476
2477
  detectOpencode = (home) => existsSync2(join2(home, ".opencode")) || existsSync2(join2(home, ".config", "opencode"));
2477
2478
  detectGrok = (home) => existsSync2(join2(home, ".grok")) || hasBinary("grok");
2478
2479
  detectAntigravity = (home) => existsSync2(join2(home, ".gemini", "antigravity-cli")) || hasBinary("agy");
2480
+ CODEX_LOGIN_NOTICE = [
2481
+ " \u26A0 No Codex n\xE3o existe o comando /tostudy.",
2482
+ ' \u2192 Abra o Codex na pasta do curso e pe\xE7a: "vamos estudar".',
2483
+ " \u2192 No terminal, tostudy menu tamb\xE9m funciona."
2484
+ ];
2479
2485
  RUNTIMES = [
2480
2486
  {
2481
2487
  id: "claude",
@@ -2518,11 +2524,12 @@ var init_runtime_registry = __esm({
2518
2524
  detect: (home) => existsSync2(join2(home, ".codex")),
2519
2525
  // No writePerCourse: Codex has no project-level command channel — the
2520
2526
  // root AGENTS.md managed block (generic entry) is its per-course path.
2521
- writeUniversal({ home, content }) {
2522
- const file2 = join2(home, ".codex", "prompts", "tostudy.md");
2523
- writeFile2(join2(home, ".codex", "prompts"), "tostudy.md", content);
2524
- return [file2];
2525
- },
2527
+ // GH-2351 follow-up: no writeUniversal either. The hint below already stopped
2528
+ // naming /tostudy, but login still wrote ~10 KB to ~/.codex/prompts/tostudy.md
2529
+ // and printed "✓ Instalado: …/.codex/prompts/tostudy.md" — announcing, as the
2530
+ // last thing on screen, an install of a command that does not exist. Codex
2531
+ // never reads that directory, so nothing consumed the file. A stale one from
2532
+ // an older CLI is left on disk: we do not delete the student's files.
2526
2533
  // GH-2351: Codex never reads ~/.codex/prompts, so there is no /tostudy there;
2527
2534
  // asking in plain language works (it reads AGENTS.md and finds the course skill).
2528
2535
  slashHint: () => "No Codex, abra o Codex e pe\xE7a: vamos estudar"
@@ -3629,7 +3636,7 @@ var loginCommand = new Command("login").description("Autentica no ToStudy via br
3629
3636
  try {
3630
3637
  const { detectIDEs: detectIDEs2 } = await Promise.resolve().then(() => (init_ide_detector(), ide_detector_exports));
3631
3638
  const { installUniversalCommand: installUniversalCommand2 } = await Promise.resolve().then(() => (init_instruction_files(), instruction_files_exports));
3632
- const { RUNTIMES: RUNTIMES2 } = await Promise.resolve().then(() => (init_runtime_registry(), runtime_registry_exports));
3639
+ const { RUNTIMES: RUNTIMES2, CODEX_LOGIN_NOTICE: CODEX_LOGIN_NOTICE2 } = await Promise.resolve().then(() => (init_runtime_registry(), runtime_registry_exports));
3633
3640
  const { homedir: homedir2 } = await import("node:os");
3634
3641
  const ides = detectIDEs2();
3635
3642
  const detected = ides.filter((ide) => ide.detected);
@@ -3666,6 +3673,10 @@ var loginCommand = new Command("login").description("Autentica no ToStudy via br
3666
3673
  );
3667
3674
  }
3668
3675
  }
3676
+ if (detected.some((ide) => ide.id === "codex")) {
3677
+ console.log("");
3678
+ for (const line of CODEX_LOGIN_NOTICE2) console.log(line);
3679
+ }
3669
3680
  } catch {
3670
3681
  }
3671
3682
  try {
@@ -3745,7 +3756,7 @@ import { spawn } from "node:child_process";
3745
3756
  import { hostname } from "node:os";
3746
3757
 
3747
3758
  // src/version.ts
3748
- var CLI_VERSION = true ? "0.18.16" : "0.7.1";
3759
+ var CLI_VERSION = true ? "0.18.18" : "0.7.1";
3749
3760
 
3750
3761
  // src/installer/mcp-setup.ts
3751
3762
  function safeServerError(text2) {
@@ -4436,6 +4447,57 @@ var STOP_WORDS = /* @__PURE__ */ new Set([
4436
4447
  "este",
4437
4448
  "esta",
4438
4449
  "tem",
4450
+ // preposições e contrações que a lista acima não cobria: o aluno ainda lia
4451
+ // "Motivo: … em horas, entre e prática" (0.18.10)
4452
+ "entre",
4453
+ "sobre",
4454
+ "at\xE9",
4455
+ "ate",
4456
+ "ap\xF3s",
4457
+ "apos",
4458
+ "desde",
4459
+ "ante",
4460
+ "perante",
4461
+ "contra",
4462
+ "durante",
4463
+ "sob",
4464
+ "pelo",
4465
+ "pela",
4466
+ "pelos",
4467
+ "pelas",
4468
+ "num",
4469
+ "numa",
4470
+ "nos",
4471
+ "nas",
4472
+ "aos",
4473
+ // conectivos e pronomes, pela mesma razão
4474
+ "mas",
4475
+ "por\xE9m",
4476
+ "porem",
4477
+ "quando",
4478
+ "onde",
4479
+ "porque",
4480
+ "pois",
4481
+ "tamb\xE9m",
4482
+ "tambem",
4483
+ "ent\xE3o",
4484
+ "entao",
4485
+ "enquanto",
4486
+ "ele",
4487
+ "ela",
4488
+ "eles",
4489
+ "elas",
4490
+ "esse",
4491
+ "essa",
4492
+ "esses",
4493
+ "essas",
4494
+ "estes",
4495
+ "estas",
4496
+ "isto",
4497
+ "aquele",
4498
+ "aquela",
4499
+ "aquilo",
4500
+ "cada",
4439
4501
  "the",
4440
4502
  "and",
4441
4503
  "for",