wotann 0.5.67 → 0.5.68

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/index.js CHANGED
@@ -198,50 +198,17 @@ program
198
198
  // (every shell is just chrome over the SAME shared slash-command
199
199
  // + runtime engine). The env/flag escape hatches and the three
200
200
  // tui-variant resolvers went with them.
201
- // Auto-launch onboarding wizard on first-run when no providers are
202
- // detected. The TUI also shows an inline banner (App.tsx
203
- // needsOnboarding) but the explicit wizard hand-holds the user
204
- // through provider auth + a smoke-test message. Skip when an
205
- // explicit --provider/--model was supplied (user knows what they
206
- // want), or when WOTANN_SKIP_WIZARD=1 (CI / power users), OR when
207
- // stdin/stdout isn't a real TTYthe Ink wizard uses useInput()
208
- // which BLOCKS forever waiting for keypresses that never arrive
209
- // when no controlling TTY is attached. This was the "npx wotann
210
- // hangs" failure: certain npx exec wrappers and shells run the
211
- // child with a degraded TTY, the wizard mounts to a void, and
212
- // every keystroke is dropped. Matching the `wotann init` guard
213
- // at the corresponding code path below ensures parity.
201
+ // First-run onboarding is the IN-TUI OnboardingTour, mounted by
202
+ // AppV3 when no provider is configured (user chose the in-TUI
203
+ // flow over a separate pre-TUI CLI wizard — 2026-05-18). The
204
+ // standalone Ink wizard still exists for explicit `wotann init
205
+ // --wizard`; auto-launching it here too would double-onboard.
206
+ // For NON-TTY callers (piped / CI) no interactive tour can run —
207
+ // the raw-mode guard refuses cleanlyso we just print how to
208
+ // authenticate the standardized way and fall through.
214
209
  const detected = interactive.providers.filter((p) => p.available).length;
215
210
  const isInteractiveTTY = Boolean(process.stdin.isTTY) && Boolean(process.stdout.isTTY);
216
- const skipWizard = process.env["WOTANN_SKIP_WIZARD"] === "1" ||
217
- Boolean(options.provider) ||
218
- Boolean(options.model) ||
219
- !isInteractiveTTY;
220
- if (detected === 0 && !skipWizard) {
221
- try {
222
- // Give the user immediate feedback so they know the wizard is
223
- // about to mount — the Ink render itself can take 1-2s on
224
- // cold start while react + ink load. Without this, the user
225
- // sees a black screen and assumes it's hung.
226
- process.stderr.write("[wotann] No providers detected — launching onboarding wizard…\n");
227
- const { runOnboardingWizard } = await import("./cli/run-onboarding-wizard.js");
228
- await runOnboardingWizard();
229
- // After the wizard completes, re-bootstrap so the TUI sees the
230
- // newly-configured providers.
231
- interactive = await bootstrapInteractiveSession(process.cwd(), options);
232
- }
233
- catch (err) {
234
- // Wizard import or run failed — log so first-launch users get
235
- // a hint why the hand-holding wizard didn't appear, then fall
236
- // through to the in-TUI onboarding banner.
237
- const msg = err instanceof Error ? err.message : String(err);
238
- process.stderr.write(`[wotann] onboarding wizard unavailable: ${msg}\n`);
239
- }
240
- }
241
- else if (detected === 0 && !isInteractiveTTY) {
242
- // Non-TTY caller with no providers: surface a plain-text hint
243
- // so the user knows WHY the wizard didn't run. Then fall through
244
- // to App.tsx's static banner (also TTY-safe).
211
+ if (detected === 0 && !isInteractiveTTY) {
245
212
  process.stderr.write("[wotann] No providers detected and stdin is not a TTY. " +
246
213
  "Run `wotann init` in an interactive terminal, or set " +
247
214
  "ANTHROPIC_API_KEY / OPENAI_API_KEY / GEMINI_API_KEY etc. " +