@posthog/wizard 2.33.0 → 2.35.0

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 (83) hide show
  1. package/dist/{add-mcp-server-to-clients-Dhq75Hda.js → add-mcp-server-to-clients-to65gLPl.js} +5 -5
  2. package/dist/{add-mcp-server-to-clients-Dhq75Hda.js.map → add-mcp-server-to-clients-to65gLPl.js.map} +1 -1
  3. package/dist/{agent-interface-DCeQ5Oiw.js → agent-interface-CXL9i_vX.js} +362 -48
  4. package/dist/agent-interface-CXL9i_vX.js.map +1 -0
  5. package/dist/{agent-runner-BRajaO84.js → agent-runner-CCTTG_Rn.js} +33 -14
  6. package/dist/agent-runner-CCTTG_Rn.js.map +1 -0
  7. package/dist/{analytics-CU4o3eF8.js → analytics-DP_j88IC.js} +2 -2
  8. package/dist/{analytics-CU4o3eF8.js.map → analytics-DP_j88IC.js.map} +1 -1
  9. package/dist/{api-BBRfHEZ-.js → api-Bdxv7mWH.js} +3 -3
  10. package/dist/{api-BBRfHEZ-.js.map → api-Bdxv7mWH.js.map} +1 -1
  11. package/dist/bin.js +78 -61
  12. package/dist/bin.js.map +1 -1
  13. package/dist/check-screens.tsx +25 -0
  14. package/dist/{ci-install-D-otkGW6.js → ci-install-BO-KLPLD.js} +5 -5
  15. package/dist/ci-install-BO-KLPLD.js.map +1 -0
  16. package/dist/{debug-BewTLNNr.js → debug-Clw8ctxh.js} +1 -1
  17. package/dist/{debug-BGMe1wP6.js → debug-DXWxKT5f.js} +3 -4
  18. package/dist/debug-DXWxKT5f.js.map +1 -0
  19. package/dist/{defaults-DII5CAog.js → defaults-4rSse24X.js} +1 -1
  20. package/dist/{defaults-DII5CAog.js.map → defaults-4rSse24X.js.map} +1 -1
  21. package/dist/{env-api-key-MlzJYAvt.js → env-api-key-B3gE9Un0.js} +1 -1
  22. package/dist/{env-api-key-MlzJYAvt.js.map → env-api-key-B3gE9Un0.js.map} +1 -1
  23. package/dist/{environment-G41UFzou.js → environment-C4HyCWTC.js} +3 -3
  24. package/dist/{environment-G41UFzou.js.map → environment-C4HyCWTC.js.map} +1 -1
  25. package/dist/{file-utils-D9InAvZd.js → file-utils-CW8XbbZP.js} +2 -2
  26. package/dist/{file-utils-D9InAvZd.js.map → file-utils-CW8XbbZP.js.map} +1 -1
  27. package/dist/{headless-ui-xjHVVUqe.js → headless-ui-BoZYhNpE.js} +2 -2
  28. package/dist/{headless-ui-xjHVVUqe.js.map → headless-ui-BoZYhNpE.js.map} +1 -1
  29. package/dist/host-resolution-Dw0fS8h5.js +115 -0
  30. package/dist/host-resolution-Dw0fS8h5.js.map +1 -0
  31. package/dist/{interactive-D2CKikzz.js → interactive-pwrc7QM-.js} +2 -2
  32. package/dist/{interactive-D2CKikzz.js.map → interactive-pwrc7QM-.js.map} +1 -1
  33. package/dist/{mcp-prompt-streaming-FrArGwfv.js → mcp-prompt-streaming-DZjjoeu3.js} +10 -7
  34. package/dist/mcp-prompt-streaming-DZjjoeu3.js.map +1 -0
  35. package/dist/{non-interactive-BXx6Q-D0.js → non-interactive-BW-MZYrP.js} +2 -2
  36. package/dist/{non-interactive-BXx6Q-D0.js.map → non-interactive-BW-MZYrP.js.map} +1 -1
  37. package/dist/{package-manager-D9ojA4jO.js → package-manager-BgXgJ1Mu.js} +2 -2
  38. package/dist/{package-manager-D9ojA4jO.js.map → package-manager-BgXgJ1Mu.js.map} +1 -1
  39. package/dist/{playground-Bgtxrusl.js → playground-xuLBqzJM.js} +6 -6
  40. package/dist/{playground-Bgtxrusl.js.map → playground-xuLBqzJM.js.map} +1 -1
  41. package/dist/{posthog-DU6JXG00.js → posthog-BrLFkaji.js} +1 -1
  42. package/dist/{posthog-DU6JXG00.js.map → posthog-BrLFkaji.js.map} +1 -1
  43. package/dist/{posthog-integration-gnC9v4kg.js → posthog-integration-Bj9WmwDq.js} +16 -16
  44. package/dist/{posthog-integration-gnC9v4kg.js.map → posthog-integration-Bj9WmwDq.js.map} +1 -1
  45. package/dist/{provisioning-C3qglLdc.js → provisioning-BF2reo5_.js} +28 -9
  46. package/dist/provisioning-BF2reo5_.js.map +1 -0
  47. package/dist/{registry-BVrvFTZ0.js → registry-Dj17F0a-.js} +4 -4
  48. package/dist/{registry-BVrvFTZ0.js.map → registry-Dj17F0a-.js.map} +1 -1
  49. package/dist/{setup-utils-CanVlGbX.js → setup-utils-DyTlaGOV.js} +100 -31
  50. package/dist/setup-utils-DyTlaGOV.js.map +1 -0
  51. package/dist/{start-tui-YE7bybIr.js → start-tui-S4fBBfmO.js} +176 -38
  52. package/dist/{start-tui-YE7bybIr.js.map → start-tui-S4fBBfmO.js.map} +1 -1
  53. package/dist/{steps-N20e4IoE.js → steps-CHgikk6q.js} +7 -7
  54. package/dist/{steps-N20e4IoE.js.map → steps-CHgikk6q.js.map} +1 -1
  55. package/dist/{store-D15C9YSW.js → store-vr5j37CU.js} +4 -4
  56. package/dist/{store-D15C9YSW.js.map → store-vr5j37CU.js.map} +1 -1
  57. package/dist/{task-stream-CPjpHFhI.js → task-stream-BVF6gi8x.js} +3 -3
  58. package/dist/{task-stream-CPjpHFhI.js.map → task-stream-BVF6gi8x.js.map} +1 -1
  59. package/dist/{telemetry-DknCDWP6.js → telemetry-CR-ilpWe.js} +3 -3
  60. package/dist/{telemetry-DknCDWP6.js.map → telemetry-CR-ilpWe.js.map} +1 -1
  61. package/dist/{terminal-Cvv0a-7Q.js → terminal-uzjco-wz.js} +86 -35
  62. package/dist/terminal-uzjco-wz.js.map +1 -0
  63. package/dist/urls-ChWit8SE.js +67 -0
  64. package/dist/urls-ChWit8SE.js.map +1 -0
  65. package/dist/{wizard-abort-Cw818xPr.js → wizard-abort-BE_j8xUt.js} +4 -4
  66. package/dist/{wizard-abort-Cw818xPr.js.map → wizard-abort-BE_j8xUt.js.map} +1 -1
  67. package/dist/{wizard-abort-DMvS0YXD.js → wizard-abort-CNYxdjJl.js} +1 -1
  68. package/dist/{wizard-session-CN55LYyZ.js → wizard-session-BHoLQueN.js} +2 -1
  69. package/dist/wizard-session-BHoLQueN.js.map +1 -0
  70. package/dist/{wizard-session-BKEdX9mO.js → wizard-session-D0PJ9lsl.js} +1 -1
  71. package/dist/wizard-ui-WZ48rUgr.js.map +1 -1
  72. package/package.json +1 -1
  73. package/dist/agent-interface-DCeQ5Oiw.js.map +0 -1
  74. package/dist/agent-runner-BRajaO84.js.map +0 -1
  75. package/dist/ci-install-D-otkGW6.js.map +0 -1
  76. package/dist/debug-BGMe1wP6.js.map +0 -1
  77. package/dist/mcp-prompt-streaming-FrArGwfv.js.map +0 -1
  78. package/dist/provisioning-C3qglLdc.js.map +0 -1
  79. package/dist/setup-utils-CanVlGbX.js.map +0 -1
  80. package/dist/terminal-Cvv0a-7Q.js.map +0 -1
  81. package/dist/urls-DrR6F_A3.js +0 -35
  82. package/dist/urls-DrR6F_A3.js.map +0 -1
  83. package/dist/wizard-session-CN55LYyZ.js.map +0 -1
@@ -1,15 +1,15 @@
1
- import { P as POSTHOG_APP_URL, et as getSkillsBaseUrl, g as SERVICE_LABELS, s as logToFile } from "./debug-BGMe1wP6.js";
2
- import { t as analytics } from "./analytics-CU4o3eF8.js";
3
- import { i as withUtm, n as openTrackedLink } from "./telemetry-DknCDWP6.js";
4
- import { t as getOrAskForProjectData } from "./setup-utils-CanVlGbX.js";
5
- import { n as getCloudUrlFromRegion } from "./urls-DrR6F_A3.js";
6
- import { a as fetchUserData, i as fetchSlackConnected } from "./api-BBRfHEZ-.js";
7
- import "./wizard-session-CN55LYyZ.js";
8
- import { E as AUDIT_SEVERITY_STYLE, v as fetchSkillMenu } from "./agent-interface-DCeQ5Oiw.js";
9
- import { c as isClearBlock, d as Colors, f as Icons, l as isLinesBlock, o as TextBlock, s as computeVisibleRange, u as isObjectBlock } from "./posthog-integration-gnC9v4kg.js";
1
+ import { $ as getSkillsBaseUrl, P as POSTHOG_APP_URL, g as SERVICE_LABELS, s as logToFile } from "./debug-DXWxKT5f.js";
2
+ import { t as analytics } from "./analytics-DP_j88IC.js";
3
+ import { i as withUtm, n as openTrackedLink } from "./telemetry-CR-ilpWe.js";
4
+ import { t as getOrAskForProjectData } from "./setup-utils-DyTlaGOV.js";
5
+ import { t as HostResolution } from "./host-resolution-Dw0fS8h5.js";
6
+ import { a as fetchUserData, i as fetchSlackConnected } from "./api-Bdxv7mWH.js";
7
+ import "./wizard-session-BHoLQueN.js";
8
+ import { k as AUDIT_SEVERITY_STYLE, x as fetchSkillMenu } from "./agent-interface-CXL9i_vX.js";
9
+ import { c as isClearBlock, d as Colors, f as Icons, l as isLinesBlock, o as TextBlock, s as computeVisibleRange, u as isObjectBlock } from "./posthog-integration-Bj9WmwDq.js";
10
10
  import { a as ConfirmButton, d as Program, g as getKindMeta, i as useKeyboardHintsContext, n as useKeyBindings, o as PromptLabel, r as KeyboardHintsProvider, t as PickerMenu } from "./bin.js";
11
- import "./store-D15C9YSW.js";
12
- import { n as AVAILABLE_FEATURES, o as isAllFeaturesSelected, t as ALL_FEATURE_VALUES } from "./defaults-DII5CAog.js";
11
+ import "./store-vr5j37CU.js";
12
+ import { n as AVAILABLE_FEATURES, o as isAllFeaturesSelected, t as ALL_FEATURE_VALUES } from "./defaults-4rSse24X.js";
13
13
  import opn from "opn";
14
14
  import * as fs$1 from "fs";
15
15
  import { Box, Text, measureElement, useInput, useStdout } from "ink";
@@ -499,10 +499,9 @@ const ModalOverlay = ({ borderColor, title, titleColor, width = 68, children, fe
499
499
  const ESC = String.fromCharCode(27);
500
500
  const BEL = String.fromCharCode(7);
501
501
  const OSC_8 = `${ESC}]8;;`;
502
+ const ELLIPSIS = "…";
502
503
  /** Matches an http(s) URL run (no surrounding whitespace). */
503
504
  const URL_RUN = /https?:\/\/[^\s]+/g;
504
- /** A line whose entire (trimmed) content is a single URL. */
505
- const STANDALONE_URL_LINE = /^https?:\/\/\S+$/;
506
505
  /** Trailing characters that are punctuation around a URL, not part of it. */
507
506
  const TRAILING_PUNCTUATION = /[.,;:!?)\]}>'"]+$/;
508
507
  function trimTrailingPunctuation(url) {
@@ -516,17 +515,49 @@ function trimTrailingPunctuation(url) {
516
515
  function osc8Hyperlink(url, label = url) {
517
516
  return `${OSC_8}${url}${BEL}${label}${OSC_8}${BEL}`;
518
517
  }
518
+ /**
519
+ * Shorten a URL for *display only*, keeping the trust-relevant head visible.
520
+ *
521
+ * A long authorize URL is mostly query-string noise (`?client_id=…&state=…`).
522
+ * The part a user needs to judge where they're being sent, the scheme and host,
523
+ * sits at the front. So we always keep `scheme://host` intact and collapse the
524
+ * long path/query tail to an ellipsis, never the other way round.
525
+ *
526
+ * This is purely the visible label. Callers pair it with `osc8Hyperlink(url,
527
+ * label)` so the click target, and the copy/open keybinds, stay the full URL.
528
+ * Returns the URL unchanged when it already fits within `maxLength`.
529
+ */
530
+ function truncateUrlLabel(url, maxLength = 56) {
531
+ if (url.length <= maxLength) return url;
532
+ let head;
533
+ let tail;
534
+ try {
535
+ const parsed = new URL(url);
536
+ head = `${parsed.protocol}//${parsed.host}`;
537
+ tail = url.slice(head.length);
538
+ } catch {
539
+ return url.slice(0, Math.max(1, maxLength - 1)) + ELLIPSIS;
540
+ }
541
+ if (head.length >= maxLength - 1) return tail.length > 0 ? head + ELLIPSIS : head;
542
+ const room = maxLength - head.length - 1;
543
+ return head + tail.slice(0, room) + ELLIPSIS;
544
+ }
519
545
  /** Extract every http(s) URL in `text`, trailing punctuation removed. */
520
546
  function extractUrls(text) {
521
547
  return (text.match(URL_RUN) ?? []).map(trimTrailingPunctuation);
522
548
  }
523
549
  /**
524
- * Split prompt text into renderable segments, breaking out any line that is
525
- * *solely* a URL into its own `url` segment. Consecutive non-URL lines stay
526
- * grouped in one `text` segment (newlines preserved) so paragraph spacing is
527
- * unchanged. URLs that appear inline within prose are left in the text
528
- * segment — only standalone-line URLs are special-cased, which is how the
529
- * wizard's prompts present links a user is meant to open.
550
+ * Split prompt text into renderable segments, breaking *every* URL out onto its
551
+ * own `url` segment — whether it sits alone on a line or inline within prose.
552
+ * Pulling it out matters: `LinkText` renders a `url` segment as a single OSC 8
553
+ * hyperlink, so the click target stays the exact full URL even when it wraps. A
554
+ * URL left inline in a `text` segment is plain text the terminal may auto-detect
555
+ * per *visual* line, which opens a broken half-URL when it wraps.
556
+ *
557
+ * Consecutive URL-free lines stay grouped in one `text` segment (newlines
558
+ * preserved) so paragraph spacing is unchanged. The prose surrounding an inline
559
+ * URL is kept as `text` segments before/after it (trailing URL punctuation stays
560
+ * with the prose), so it reads the same minus the link being on its own line.
530
561
  */
531
562
  function splitPromptIntoSegments(text) {
532
563
  const segments = [];
@@ -541,14 +572,34 @@ function splitPromptIntoSegments(text) {
541
572
  }
542
573
  };
543
574
  for (const line of text.split("\n")) {
544
- const trimmed = line.trim();
545
- if (STANDALONE_URL_LINE.test(trimmed)) {
546
- flush();
575
+ URL_RUN.lastIndex = 0;
576
+ if (!URL_RUN.test(line)) {
577
+ buffer.push(line);
578
+ continue;
579
+ }
580
+ flush();
581
+ let cursor = 0;
582
+ URL_RUN.lastIndex = 0;
583
+ let match;
584
+ while ((match = URL_RUN.exec(line)) !== null) {
585
+ const url = trimTrailingPunctuation(match[0]);
586
+ const before = line.slice(cursor, match.index).trim();
587
+ if (before) segments.push({
588
+ type: "text",
589
+ value: before
590
+ });
547
591
  segments.push({
548
592
  type: "url",
549
- value: trimTrailingPunctuation(trimmed)
593
+ value: url
550
594
  });
551
- } else buffer.push(line);
595
+ cursor = match.index + url.length;
596
+ URL_RUN.lastIndex = cursor;
597
+ }
598
+ const after = line.slice(cursor).trim();
599
+ if (after) segments.push({
600
+ type: "text",
601
+ value: after
602
+ });
552
603
  }
553
604
  flush();
554
605
  return segments;
@@ -556,15 +607,15 @@ function splitPromptIntoSegments(text) {
556
607
  //#endregion
557
608
  //#region src/ui/tui/primitives/LinkText.tsx
558
609
  /**
559
- * LinkText — renders prompt text with standalone URLs as OSC 8 hyperlinks.
610
+ * LinkText — renders prompt text with URLs as OSC 8 hyperlinks.
560
611
  *
561
- * Each URL gets its own line, wrapped (`wrap="wrap"`) so the full URL is shown
562
- * within the overlay instead of truncated — the user can read and select all of
563
- * it. Ink's wrap (wrap-ansi) re-emits the OSC 8 escape on every wrapped visual
564
- * line, so the click target stays the exact, full URL no matter where the
565
- * visible text breaks. A manual selection of a wrapped line still picks up the
566
- * line break, so for a clean copy `WizardAskScreen` auto-copies a sole URL to
567
- * the clipboard. Prose renders unchanged.
612
+ * Every URL (standalone or inline in prose) is pulled onto its own line. Long
613
+ * URLs are truncated for display (`scheme://host` kept, the noisy path/query
614
+ * tail collapsed to an ellipsis) so the overlay stays clean instead of a URL
615
+ * wrapping across several lines. The OSC 8 escape carries the *full* URL as the
616
+ * click target regardless of the shortened label, and `WizardAskScreen` opens
617
+ * (`o`) / copies (`c`) the full URL too, so no path loses the real destination.
618
+ * Prose renders unchanged.
568
619
  *
569
620
  * Used by the `wizard_ask` overlay only for programs that opt into rich link
570
621
  * rendering (see `PendingQuestion.richLinks`). Other flows are untouched.
@@ -576,7 +627,7 @@ const LinkText = ({ text }) => {
576
627
  color: Colors.accent,
577
628
  underline: true,
578
629
  wrap: "wrap",
579
- children: osc8Hyperlink(segment.value)
630
+ children: osc8Hyperlink(segment.value, truncateUrlLabel(segment.value))
580
631
  }, i) : /* @__PURE__ */ jsx(Text, { children: segment.value }, i))
581
632
  });
582
633
  };
@@ -5885,7 +5936,7 @@ const AiOptInRequiredScreen = ({ store }) => {
5885
5936
  }
5886
5937
  setRetrying(true);
5887
5938
  setRetryError(null);
5888
- fetchUserData(accessToken, getCloudUrlFromRegion(region)).then((user) => {
5939
+ fetchUserData(accessToken, HostResolution.fromRegion(region, { baseUrl: session.baseUrl }).appHost).then((user) => {
5889
5940
  store.setApiUser(user);
5890
5941
  }).catch((err) => {
5891
5942
  setRetryError(err instanceof Error ? err.message : "Retry failed.");
@@ -6071,4 +6122,4 @@ function releaseTerminal() {
6071
6122
  //#endregion
6072
6123
  export { ConfirmationInput as A, TabContainer as C, LinkText as D, LogViewer as E, SplitView as F, CardLayout as I, useStdoutDimensions as M, ProgressList as N, extractUrls as O, LoadingBox as P, HNViewer as S, EventPlanViewer as T, ServiceHealthList as _, useSkillEntry as a, LearnCard as b, AUDIT_AREA_SLIDES as c, McpSuggestedPromptsScreen as d, TAILORED_ROLES as f, SEVERITY_ORDER as g, SEVERITY_LABEL as h, SkillSourceInfo as i, GroupedPickerMenu as j, ModalOverlay as k, VisualBox as l, IssueTable as m, releaseTerminal as n, OutroScreen as o, McpScreen as p, AiOptInRequiredScreen as r, SlackConnectScreen as s, enterDarkTerminal as t, AuditChecksViewer as u, VisualizerTab as v, ScreenContainer as w, ContentSequencer as x, TipsCard as y };
6073
6124
 
6074
- //# sourceMappingURL=terminal-Cvv0a-7Q.js.map
6125
+ //# sourceMappingURL=terminal-uzjco-wz.js.map