wotann 0.5.57 → 0.5.66

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 (146) hide show
  1. package/dist/cli/components/AuthModeBanner.js +1 -1
  2. package/dist/cli/onboarding-screens/bridge-opt-in-screen.js +1 -1
  3. package/dist/cli/onboarding-screens/done-screen.js +1 -1
  4. package/dist/cli/onboarding-screens/first-run-screen.js +1 -1
  5. package/dist/cli/onboarding-screens.js +1 -1
  6. package/dist/index.js +64 -81
  7. package/dist/index.js.map +1 -1
  8. package/dist/ui/animations/RavensFlight.js +1 -1
  9. package/dist/ui/animations/SigilStamp.js +1 -1
  10. package/dist/ui/bootstrap.d.ts +0 -40
  11. package/dist/ui/bootstrap.d.ts.map +1 -1
  12. package/dist/ui/bootstrap.js +7 -85
  13. package/dist/ui/bootstrap.js.map +1 -1
  14. package/dist/ui/components/AgentStatusPanel.js +1 -1
  15. package/dist/ui/components/AuditLogPanel.js +1 -1
  16. package/dist/ui/components/AutomationsPanel.js +1 -1
  17. package/dist/ui/components/ChatView.js +1 -1
  18. package/dist/ui/components/CommandPalette.js +1 -1
  19. package/dist/ui/components/ContextHUD.js +1 -1
  20. package/dist/ui/components/ContextSourcePanel.js +1 -1
  21. package/dist/ui/components/DesignPreview.js +1 -1
  22. package/dist/ui/components/DiffTimeline.js +1 -1
  23. package/dist/ui/components/DispatchInbox.js +1 -1
  24. package/dist/ui/components/FirstLaunchTour.js +1 -1
  25. package/dist/ui/components/GdprPanel.js +1 -1
  26. package/dist/ui/components/HelpOverlay.js +1 -1
  27. package/dist/ui/components/HistoryPicker.js +1 -1
  28. package/dist/ui/components/KeybindingsEditor.js +1 -1
  29. package/dist/ui/components/MemoryInspector.js +1 -1
  30. package/dist/ui/components/MessageActions.js +1 -1
  31. package/dist/ui/components/ModelPicker.js +1 -1
  32. package/dist/ui/components/OnboardingWizard.js +1 -1
  33. package/dist/ui/components/OptionPicker.js +1 -1
  34. package/dist/ui/components/PermissionPrompt.js +1 -1
  35. package/dist/ui/components/PromptInput.d.ts.map +1 -1
  36. package/dist/ui/components/PromptInput.js +9 -7
  37. package/dist/ui/components/PromptInput.js.map +1 -1
  38. package/dist/ui/components/ProofViewer.js +1 -1
  39. package/dist/ui/components/ProviderSetupOverlay.js +1 -1
  40. package/dist/ui/components/StartupScreen.js +1 -1
  41. package/dist/ui/components/StatusBar.js +1 -1
  42. package/dist/ui/components/TerminalBlocksView.js +1 -1
  43. package/dist/ui/components/TrustPanel.js +1 -1
  44. package/dist/ui/components/UnifiedStatusBar.js +1 -1
  45. package/dist/ui/components/primitives/Banner.js +1 -1
  46. package/dist/ui/components/primitives/Card.js +1 -1
  47. package/dist/ui/components/primitives/KeyHint.js +1 -1
  48. package/dist/ui/components/primitives/Notification.js +1 -1
  49. package/dist/ui/components/primitives/ProgressMeter.js +1 -1
  50. package/dist/ui/components/primitives/Spinner.js +1 -1
  51. package/dist/ui/components/primitives/StatusBadge.js +1 -1
  52. package/dist/ui/components/v3/AppV3.d.ts.map +1 -1
  53. package/dist/ui/components/v3/AppV3.js +2 -2
  54. package/dist/ui/components/v3/AppV3.js.map +1 -1
  55. package/dist/ui/components/v3/CapabilityTierIndicator.js +1 -1
  56. package/dist/ui/components/v3/CommandPaletteV3.js +1 -1
  57. package/dist/ui/components/v3/Composer.js +1 -1
  58. package/dist/ui/components/v3/GradientBanner.js +1 -1
  59. package/dist/ui/components/v3/KittyGraphics.js +1 -1
  60. package/dist/ui/components/v3/ModeCycle.js +1 -1
  61. package/dist/ui/components/v3/ModelTierBadge.js +1 -1
  62. package/dist/ui/components/v3/OSKeyLabel.js +1 -1
  63. package/dist/ui/components/v3/OnboardingTour.js +1 -1
  64. package/dist/ui/components/v3/OverlayManager.js +1 -1
  65. package/dist/ui/components/v3/ProviderStrip.js +1 -1
  66. package/dist/ui/components/v3/SidePane.js +1 -1
  67. package/dist/ui/components/v3/Splash.js +1 -1
  68. package/dist/ui/components/v3/StatusBar.d.ts.map +1 -1
  69. package/dist/ui/components/v3/StatusBar.js +6 -6
  70. package/dist/ui/components/v3/StatusBar.js.map +1 -1
  71. package/dist/ui/components/v3/Statusline.js +1 -1
  72. package/dist/ui/components/v3/SystemMessageCard.js +1 -1
  73. package/dist/ui/components/v3/Transcript.d.ts.map +1 -1
  74. package/dist/ui/components/v3/Transcript.js +14 -9
  75. package/dist/ui/components/v3/Transcript.js.map +1 -1
  76. package/dist/ui/components/v3/TypedSlashPanel.js +1 -1
  77. package/dist/ui/components/v3/WidthAwareLayout.js +1 -1
  78. package/dist/ui/raw-mode-guard.d.ts +41 -0
  79. package/dist/ui/raw-mode-guard.d.ts.map +1 -0
  80. package/dist/ui/raw-mode-guard.js +70 -0
  81. package/dist/ui/raw-mode-guard.js.map +1 -0
  82. package/dist/ui/slash-commands/handlers/cross-surface.d.ts.map +1 -1
  83. package/dist/ui/slash-commands/handlers/cross-surface.js +9 -45
  84. package/dist/ui/slash-commands/handlers/cross-surface.js.map +1 -1
  85. package/dist/ui/theme/context.js +1 -1
  86. package/dist/ui/theme/tokens.d.ts +2 -0
  87. package/dist/ui/theme/tokens.d.ts.map +1 -1
  88. package/dist/ui/theme/tokens.js +2 -0
  89. package/dist/ui/theme/tokens.js.map +1 -1
  90. package/dist/ui/viewport-guard.d.ts +35 -0
  91. package/dist/ui/viewport-guard.d.ts.map +1 -0
  92. package/dist/ui/viewport-guard.js +54 -0
  93. package/dist/ui/viewport-guard.js.map +1 -0
  94. package/jsx-shim/jsx-dev-runtime.d.ts +6 -0
  95. package/jsx-shim/jsx-dev-runtime.js +34 -0
  96. package/jsx-shim/jsx-runtime.d.ts +8 -0
  97. package/jsx-shim/jsx-runtime.js +20 -0
  98. package/package.json +6 -1
  99. package/dist/ui/App.d.ts +0 -24
  100. package/dist/ui/App.d.ts.map +0 -1
  101. package/dist/ui/App.js +0 -4943
  102. package/dist/ui/App.js.map +0 -1
  103. package/dist/ui/components/v2/AppV2.d.ts +0 -35
  104. package/dist/ui/components/v2/AppV2.d.ts.map +0 -1
  105. package/dist/ui/components/v2/AppV2.js +0 -155
  106. package/dist/ui/components/v2/AppV2.js.map +0 -1
  107. package/dist/ui/components/v2/CodeBlock.d.ts +0 -35
  108. package/dist/ui/components/v2/CodeBlock.d.ts.map +0 -1
  109. package/dist/ui/components/v2/CodeBlock.js +0 -227
  110. package/dist/ui/components/v2/CodeBlock.js.map +0 -1
  111. package/dist/ui/components/v2/CommandPaletteV2.d.ts +0 -58
  112. package/dist/ui/components/v2/CommandPaletteV2.d.ts.map +0 -1
  113. package/dist/ui/components/v2/CommandPaletteV2.js +0 -174
  114. package/dist/ui/components/v2/CommandPaletteV2.js.map +0 -1
  115. package/dist/ui/components/v2/ComposerFrame.d.ts +0 -64
  116. package/dist/ui/components/v2/ComposerFrame.d.ts.map +0 -1
  117. package/dist/ui/components/v2/ComposerFrame.js +0 -32
  118. package/dist/ui/components/v2/ComposerFrame.js.map +0 -1
  119. package/dist/ui/components/v2/FooterHintLine.d.ts +0 -43
  120. package/dist/ui/components/v2/FooterHintLine.d.ts.map +0 -1
  121. package/dist/ui/components/v2/FooterHintLine.js +0 -132
  122. package/dist/ui/components/v2/FooterHintLine.js.map +0 -1
  123. package/dist/ui/components/v2/HeroSplash.d.ts +0 -48
  124. package/dist/ui/components/v2/HeroSplash.d.ts.map +0 -1
  125. package/dist/ui/components/v2/HeroSplash.js +0 -70
  126. package/dist/ui/components/v2/HeroSplash.js.map +0 -1
  127. package/dist/ui/components/v2/StatusRow.d.ts +0 -49
  128. package/dist/ui/components/v2/StatusRow.d.ts.map +0 -1
  129. package/dist/ui/components/v2/StatusRow.js +0 -106
  130. package/dist/ui/components/v2/StatusRow.js.map +0 -1
  131. package/dist/ui/components/v2/ToolCallRow.d.ts +0 -37
  132. package/dist/ui/components/v2/ToolCallRow.d.ts.map +0 -1
  133. package/dist/ui/components/v2/ToolCallRow.js +0 -23
  134. package/dist/ui/components/v2/ToolCallRow.js.map +0 -1
  135. package/dist/ui/components/v2/Transcript.d.ts +0 -41
  136. package/dist/ui/components/v2/Transcript.d.ts.map +0 -1
  137. package/dist/ui/components/v2/Transcript.js +0 -13
  138. package/dist/ui/components/v2/Transcript.js.map +0 -1
  139. package/dist/ui/components/v2/TranscriptRow.d.ts +0 -36
  140. package/dist/ui/components/v2/TranscriptRow.d.ts.map +0 -1
  141. package/dist/ui/components/v2/TranscriptRow.js +0 -37
  142. package/dist/ui/components/v2/TranscriptRow.js.map +0 -1
  143. package/dist/ui/components/v2/index.d.ts +0 -36
  144. package/dist/ui/components/v2/index.d.ts.map +0 -1
  145. package/dist/ui/components/v2/index.js +0 -26
  146. package/dist/ui/components/v2/index.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "#wotann-jsx/jsx-runtime";
2
2
  import { Box, Text } from "ink";
3
3
  import { bannerLabelForMode, bannerTextForMode, bannerToneForMode, } from "../../auth/auth-mode.js";
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "#wotann-jsx/jsx-runtime";
2
2
  /**
3
3
  * BridgeOptInScreen — Onboarding wizard screen 5 (between Confirm and FirstRun).
4
4
  *
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "#wotann-jsx/jsx-runtime";
2
2
  import { Box, Text, useInput } from "ink";
3
3
  export function DoneScreen({ step, onExit }) {
4
4
  useInput((_input, key) => {
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "#wotann-jsx/jsx-runtime";
2
2
  /**
3
3
  * FirstRunScreen — Onboarding wizard screen 5.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "#wotann-jsx/jsx-runtime";
2
2
  /**
3
3
  * Onboarding wizard screens — V9 Tier 6 T6.2.
4
4
  *
package/dist/index.js CHANGED
@@ -188,35 +188,16 @@ program
188
188
  return; // thin TUI rendered and exited
189
189
  // else fall through to full runtime
190
190
  }
191
- const [{ render }, ReactModule, { WotannApp }] = await Promise.all([
192
- import("ink"),
193
- import("react"),
194
- import("./ui/App.js"),
195
- ]);
196
- const { bootstrapInteractiveSession, resolveTuiV2Variant, resolveTuiV3Variant, resolveTuiLegacyOptOut, } = await import("./ui/bootstrap.js");
191
+ const [{ render }, ReactModule] = await Promise.all([import("ink"), import("react")]);
192
+ const { bootstrapInteractiveSession } = await import("./ui/bootstrap.js");
197
193
  const React = ReactModule.default;
198
194
  let interactive = await bootstrapInteractiveSession(process.cwd(), options);
199
- // V3 ("capability-tier") is now the DEFAULT TUI surface.
200
- //
201
- // Escape hatches (opt-out, win over the default):
202
- // - WOTANN_TUI_LEGACY=1 env / --tui-legacy flag mount the
203
- // pre-v3 <WotannApp />. Useful for regression triage or for
204
- // users with terminals that misbehave in the new shell.
205
- // - WOTANN_TUI_V3=0/off/false / --no-tui-v3 → opt out of v3
206
- // specifically. Falls through to v2 if WOTANN_TUI_V2 is set,
207
- // otherwise to legacy.
208
- //
209
- // Opt-in (kept for back-compat with launch scripts from soak):
210
- // - WOTANN_TUI_V3=composer-frame / --tui-v3 → matches the
211
- // default; explicit form keeps existing launch scripts green.
212
- // - WOTANN_TUI_V2=composer / --tui-v2 → mounts v2 ONLY when
213
- // the legacy opt-out is set AND v3 is disabled.
214
- //
215
- // Lazy imports keep the v2/v3 bundles out of the cold-start path
216
- // when the user has explicitly opted into legacy.
217
- const tuiLegacy = resolveTuiLegacyOptOut();
218
- const tuiV3 = tuiLegacy === null ? resolveTuiV3Variant() : null;
219
- const tuiV2 = tuiLegacy === null && tuiV3 === null ? resolveTuiV2Variant() : null;
195
+ // V3 ("capability-tier") is the SINGLE TUI surface. The legacy
196
+ // <WotannApp /> and the v2 <AppV2 /> shells were retired — V3 was
197
+ // already the default and the others added no unique surface
198
+ // (every shell is just chrome over the SAME shared slash-command
199
+ // + runtime engine). The env/flag escape hatches and the three
200
+ // tui-variant resolvers went with them.
220
201
  // Auto-launch onboarding wizard on first-run when no providers are
221
202
  // detected. The TUI also shows an inline banner (App.tsx
222
203
  // needsOnboarding) but the explicit wizard hand-holds the user
@@ -276,38 +257,44 @@ program
276
257
  if (isAltBufferRequested(options.fullscreen !== false)) {
277
258
  enterAltBuffer();
278
259
  }
279
- // Mount precedence: v3 v2 legacy. The v3/v2 branches lazy-
280
- // import their bundles only when selected so the legacy cold-
281
- // start path stays unchanged when neither flag is set.
282
- if (tuiV3 === "composer-frame") {
283
- const { AppV3 } = await import("./ui/components/v3/index.js");
284
- render(React.createElement(AppV3, {
285
- version: VERSION,
286
- providers: interactive.providers,
287
- initialModel: interactive.initialModel,
288
- initialProvider: interactive.initialProvider,
289
- runtime: interactive.runtime,
290
- }));
291
- }
292
- else if (tuiV2 === "composer") {
293
- const { AppV2 } = await import("./ui/components/v2/index.js");
294
- render(React.createElement(AppV2, {
295
- version: VERSION,
296
- providers: interactive.providers,
297
- initialModel: interactive.initialModel,
298
- initialProvider: interactive.initialProvider,
299
- runtime: interactive.runtime,
300
- }));
301
- }
302
- else {
303
- render(React.createElement(WotannApp, {
304
- version: VERSION,
305
- providers: interactive.providers,
306
- initialModel: interactive.initialModel,
307
- initialProvider: interactive.initialProvider,
308
- runtime: interactive.runtime,
309
- }));
260
+ // Guarantee a renderable viewport BEFORE Ink mounts. Ink sizes
261
+ // its Yoga root box from `stdout.columns` directly; under npx
262
+ // wrappers / pipes / CI / size-less PTYs that is `undefined`,
263
+ // collapsing the root to width 0 — every glyph wraps to its own
264
+ // line and the whole TUI is unreadable. This repairs the stream
265
+ // only when the geometry is invalid (a real TTY is left
266
+ // untouched). Applies to all three shells below.
267
+ const { ensureRenderableViewport } = await import("./ui/viewport-guard.js");
268
+ ensureRenderableViewport(process.stdout);
269
+ ensureRenderableViewport(process.stderr);
270
+ // Resolve a raw-mode-capable input stream BEFORE mounting Ink.
271
+ // Ink's useInput() requires stdin.setRawMode; under `npx wotann`,
272
+ // piped stdin, and some shells it's absent → Ink throws "Raw mode
273
+ // is not supported on the current process.stdin" and the app
274
+ // error-render-loops forever (the reported "npx wotann just
275
+ // hangs"). Fall back to the controlling terminal (/dev/tty); if
276
+ // there is none, refuse cleanly with guidance instead of mounting
277
+ // Ink to a void and hanging.
278
+ const { resolveInteractiveStdin } = await import("./ui/raw-mode-guard.js");
279
+ const inputStdin = resolveInteractiveStdin();
280
+ if (inputStdin === null) {
281
+ process.stderr.write("[wotann] No raw-mode-capable terminal available for the interactive TUI.\n" +
282
+ " stdin is piped or the launcher degraded the TTY (some `npx`\n" +
283
+ " wrappers do this). Options:\n" +
284
+ " • run `wotann` directly in a terminal (not piped)\n" +
285
+ " • `npm i -g wotann` then run `wotann`\n" +
286
+ ' • non-interactive: `wotann -p "your prompt"`\n');
287
+ return;
310
288
  }
289
+ // Mount the single V3 shell (lazy-imported to keep cold start lean).
290
+ const { AppV3 } = await import("./ui/components/v3/index.js");
291
+ render(React.createElement(AppV3, {
292
+ version: VERSION,
293
+ providers: interactive.providers,
294
+ initialModel: interactive.initialModel,
295
+ initialProvider: interactive.initialProvider,
296
+ runtime: interactive.runtime,
297
+ }), { stdin: inputStdin });
311
298
  });
312
299
  // ── wotann link ─────────────────────────────────────────────
313
300
  program
@@ -665,24 +652,15 @@ program
665
652
  // CI / launch-script preflights).
666
653
  program
667
654
  .command("shells")
668
- .description("Show which TUI shell (v3/v2/legacy) would mount + how to switch")
669
- .action(async () => {
670
- const { resolveTuiLegacyOptOut, resolveTuiV3Variant, resolveTuiV2Variant } = await import("./ui/bootstrap.js");
671
- const legacy = resolveTuiLegacyOptOut();
672
- const v3 = legacy === null ? resolveTuiV3Variant() : null;
673
- const v2 = legacy === null && v3 === null ? resolveTuiV2Variant() : null;
674
- const active = legacy !== null ? "legacy" : v3 !== null ? "v3" : v2 !== null ? "v2" : "legacy";
675
- const lines = [
676
- `Active TUI shell on this invocation: ${active.toUpperCase()}`,
677
- "",
678
- "Mount precedence (top wins):",
679
- ` 1. legacy opt-out — WOTANN_TUI_LEGACY=1 or --tui-legacy ${legacy !== null ? "← ACTIVE" : ""}`,
680
- ` 2. v3 (default) — implicit, or WOTANN_TUI_V3=composer-frame, or --tui-v3 ${v3 !== null ? "← ACTIVE" : ""}`,
681
- ` 3. v2 (opt-in) — WOTANN_TUI_V2=composer or --tui-v2 ${v2 !== null ? "← ACTIVE" : ""}`,
655
+ .description("Show the active TUI shell")
656
+ .action(() => {
657
+ console.log([
658
+ "Active TUI shell: V3 — the single, canonical shell.",
682
659
  "",
683
- "Disable v3 explicitly: WOTANN_TUI_V3=0 (or off / false / no), or --no-tui-v3",
684
- ];
685
- console.log(lines.join("\n"));
660
+ "The legacy (<WotannApp />) and v2 (<AppV2 />) shells were",
661
+ "retired; V3 is the only surface. The WOTANN_TUI_* env vars",
662
+ "and --tui-* flags are no longer used.",
663
+ ].join("\n"));
686
664
  });
687
665
  // ── wotann model-info (small-model amplifier introspection) ──────
688
666
  // Surfaces what the harness knows about a given model id: size tier,
@@ -1590,11 +1568,7 @@ program
1590
1568
  });
1591
1569
  interactive.runtime.restoreSession(session);
1592
1570
  console.log(chalk.green(" Session context restored. Continue where you left off.\n"));
1593
- const [{ render }, ReactModule, { WotannApp }] = await Promise.all([
1594
- import("ink"),
1595
- import("react"),
1596
- import("./ui/App.js"),
1597
- ]);
1571
+ const [{ render }, ReactModule] = await Promise.all([import("ink"), import("react")]);
1598
1572
  const React = ReactModule.default;
1599
1573
  // Same fullscreen-mode hook as `wotann start` — env var only here
1600
1574
  // (no CLI flag on `wotann resume`). Default ON; disable via
@@ -1603,7 +1577,16 @@ program
1603
1577
  if (isAltBufferRequested(true)) {
1604
1578
  enterAltBuffer();
1605
1579
  }
1606
- render(React.createElement(WotannApp, {
1580
+ // Same viewport guard as the start path — without it Ink's root
1581
+ // box collapses to width 0 under a size-less stdout.
1582
+ const { ensureRenderableViewport } = await import("./ui/viewport-guard.js");
1583
+ ensureRenderableViewport(process.stdout);
1584
+ ensureRenderableViewport(process.stderr);
1585
+ // Single V3 shell — initialMessages seeds the transcript so the
1586
+ // resumed session continues where it left off (AppV3 wires it via
1587
+ // useState([...initialMessages])).
1588
+ const { AppV3 } = await import("./ui/components/v3/index.js");
1589
+ render(React.createElement(AppV3, {
1607
1590
  version: VERSION,
1608
1591
  providers: interactive.providers,
1609
1592
  initialModel: session.model,