@runtypelabs/cli 1.5.3 → 1.6.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.
package/dist/index.js CHANGED
@@ -2937,10 +2937,10 @@ ${userInput}`;
2937
2937
  };
2938
2938
 
2939
2939
  // src/ink/talk/TalkApp.tsx
2940
- import { useState as useState10, useEffect as useEffect9, useRef as useRef4 } from "react";
2940
+ import { useState as useState11, useEffect as useEffect9, useRef as useRef4 } from "react";
2941
2941
  import fs3 from "fs";
2942
2942
  import path3 from "path";
2943
- import { Box as Box11, useApp as useApp3, useInput as useInput7, useStdout } from "ink";
2943
+ import { Box as Box11, useApp as useApp3, useInput as useInput7, useStdout as useStdout2 } from "ink";
2944
2944
  import { StatusBar, ErrorDisplay as ErrorDisplay3, theme as theme12 } from "@runtypelabs/ink-components";
2945
2945
 
2946
2946
  // src/ink/talk/useTalkStream.ts
@@ -3362,29 +3362,114 @@ function ChatInput({
3362
3362
  }
3363
3363
 
3364
3364
  // src/ink/talk/ModelPicker.tsx
3365
- import { Box as Box10, Text as Text11, useInput as useInput6 } from "ink";
3366
- import SelectInput2 from "ink-select-input";
3365
+ import { useState as useState10, useMemo as useMemo2, useCallback as useCallback3 } from "react";
3366
+ import { Box as Box10, Text as Text11, useInput as useInput6, useStdout } from "ink";
3367
+ import TextInput2 from "ink-text-input";
3368
+ import open2 from "open";
3367
3369
  import { theme as theme11 } from "@runtypelabs/ink-components";
3368
3370
  import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
3369
- var MODELS = [
3370
- { label: "Claude Sonnet 4.5", value: "claude-sonnet-4-5" },
3371
- { label: "Claude Haiku 3.5", value: "claude-3-5-haiku" },
3372
- { label: "GPT-5 Mini", value: "gpt-5-mini" },
3373
- { label: "GPT-4.1 Mini", value: "gpt-4.1-mini" },
3374
- { label: "Gemini 3 Flash", value: "gemini-3-flash" },
3375
- { label: "Gemini 2.5 Flash", value: "gemini-2.5-flash" }
3371
+ var ALL_MODELS = [
3372
+ // Anthropic
3373
+ { label: "Claude Opus 4.6", value: "claude-opus-4-6", group: "Anthropic" },
3374
+ { label: "Claude Sonnet 4.6", value: "claude-sonnet-4-6", group: "Anthropic" },
3375
+ { label: "Claude Haiku 4.5", value: "claude-haiku-4-5", group: "Anthropic" },
3376
+ // OpenAI
3377
+ { label: "GPT-5", value: "gpt-5", group: "OpenAI" },
3378
+ { label: "GPT-5 Mini", value: "gpt-5-mini", group: "OpenAI" },
3379
+ { label: "GPT-4.1", value: "gpt-4.1", group: "OpenAI" },
3380
+ { label: "GPT-4.1 Mini", value: "gpt-4.1-mini", group: "OpenAI" },
3381
+ { label: "GPT-4.1 Nano", value: "gpt-4.1-nano", group: "OpenAI" },
3382
+ { label: "GPT-5 Nano", value: "gpt-5-nano", group: "OpenAI" },
3383
+ // Google
3384
+ { label: "Gemini 3.1 Pro", value: "gemini-3.1-pro", group: "Google" },
3385
+ { label: "Gemini 3 Pro Image", value: "gemini-3-pro-image", group: "Google" },
3386
+ { label: "Gemini 3 Flash", value: "gemini-3-flash", group: "Google" },
3387
+ { label: "Gemini 2.5 Pro", value: "gemini-2.5-pro", group: "Google" },
3388
+ { label: "Gemini 2.5 Flash", value: "gemini-2.5-flash", group: "Google" },
3389
+ { label: "Gemini 2.5 Flash Image", value: "gemini-2.5-flash-image", group: "Google" },
3390
+ { label: "Gemini 2.5 Flash-Lite", value: "gemini-2.5-flash-lite", group: "Google" },
3391
+ // xAI
3392
+ { label: "Grok 4", value: "grok-4", group: "xAI" },
3393
+ { label: "Grok 4 Fast", value: "grok-4-fast", group: "xAI" },
3394
+ { label: "Grok 4.1 Fast", value: "grok-4.1-fast", group: "xAI" },
3395
+ // Qwen
3396
+ { label: "Qwen 3.5 Plus", value: "qwen3.5-plus", group: "Qwen" },
3397
+ { label: "Qwen 3.5 35B A3B", value: "qwen3.5-35b-a3b", group: "Qwen" },
3398
+ { label: "Qwen 3.5 Flash", value: "qwen3.5-flash", group: "Qwen" },
3399
+ { label: "Qwen 3 8B", value: "qwen/qwen3-8b", group: "Qwen" }
3376
3400
  ];
3401
+ var MAX_VISIBLE = 12;
3377
3402
  function ModelPicker({ currentModel, onSelect, onCancel }) {
3403
+ const { stdout } = useStdout();
3404
+ const [search, setSearch] = useState10("");
3405
+ const [selectedIndex, setSelectedIndex] = useState10(0);
3406
+ const contentWidth = (stdout?.columns ?? 120) - 4;
3407
+ const pad = useCallback3(
3408
+ (text) => text.length < contentWidth ? text + " ".repeat(contentWidth - text.length) : text,
3409
+ [contentWidth]
3410
+ );
3411
+ const filtered = useMemo2(() => {
3412
+ if (!search.trim()) return ALL_MODELS;
3413
+ const q = search.toLowerCase();
3414
+ return ALL_MODELS.filter(
3415
+ (m) => m.label.toLowerCase().includes(q) || m.value.toLowerCase().includes(q) || m.group.toLowerCase().includes(q)
3416
+ );
3417
+ }, [search]);
3418
+ const handleSearchChange = (value) => {
3419
+ if (value === search) return;
3420
+ setSearch(value);
3421
+ setSelectedIndex(0);
3422
+ };
3378
3423
  useInput6((_input, key) => {
3379
3424
  if (key.escape) {
3380
3425
  onCancel();
3426
+ return;
3427
+ }
3428
+ if (key.return) {
3429
+ if (filtered.length > 0) {
3430
+ onSelect(filtered[selectedIndex].value);
3431
+ }
3432
+ return;
3433
+ }
3434
+ if (key.upArrow) {
3435
+ setSelectedIndex((prev) => prev > 0 ? prev - 1 : filtered.length - 1);
3436
+ return;
3437
+ }
3438
+ if (key.downArrow) {
3439
+ setSelectedIndex((prev) => prev < filtered.length - 1 ? prev + 1 : 0);
3440
+ return;
3441
+ }
3442
+ if (key.tab) {
3443
+ void open2(`${getDashboardUrl()}/settings/models`);
3444
+ return;
3381
3445
  }
3382
3446
  });
3383
- const items = MODELS.map((m) => ({
3384
- label: m.value === currentModel ? `${m.label} *` : m.label,
3385
- value: m.value
3386
- }));
3387
- const initialIndex = Math.max(0, MODELS.findIndex((m) => m.value === currentModel));
3447
+ const MODEL_WINDOW = MAX_VISIBLE - 4;
3448
+ const modelWindowStart = Math.max(
3449
+ 0,
3450
+ Math.min(
3451
+ selectedIndex - Math.floor(MODEL_WINDOW / 2),
3452
+ filtered.length - MODEL_WINDOW
3453
+ )
3454
+ );
3455
+ const modelWindowEnd = Math.min(modelWindowStart + MODEL_WINDOW, filtered.length);
3456
+ const rows = [];
3457
+ let lastGroup = "";
3458
+ for (let i = modelWindowStart; i < modelWindowEnd; i++) {
3459
+ const model = filtered[i];
3460
+ if (model.group !== lastGroup) {
3461
+ rows.push({ type: "group", label: model.group });
3462
+ lastGroup = model.group;
3463
+ }
3464
+ rows.push({
3465
+ type: "model",
3466
+ model,
3467
+ isHighlighted: i === selectedIndex,
3468
+ isCurrent: model.value === currentModel
3469
+ });
3470
+ }
3471
+ const showScrollUp = modelWindowStart > 0;
3472
+ const showScrollDown = modelWindowEnd < filtered.length;
3388
3473
  return /* @__PURE__ */ jsxs9(
3389
3474
  Box10,
3390
3475
  {
@@ -3395,18 +3480,44 @@ function ModelPicker({ currentModel, onSelect, onCancel }) {
3395
3480
  paddingY: theme11.panelPaddingY,
3396
3481
  flexDirection: "column",
3397
3482
  children: [
3398
- /* @__PURE__ */ jsx11(Text11, { color: theme11.accent, bold: true, children: "Select Model" }),
3399
- /* @__PURE__ */ jsx11(Text11, { color: theme11.textSubtle, children: "Esc to cancel" }),
3400
- /* @__PURE__ */ jsx11(
3401
- SelectInput2,
3402
- {
3403
- items,
3404
- onSelect: (item) => onSelect(item.value),
3405
- initialIndex,
3406
- indicatorComponent: ThemedSelectIndicator,
3407
- itemComponent: ThemedSelectItem
3483
+ /* @__PURE__ */ jsxs9(Box10, { marginBottom: 1, children: [
3484
+ /* @__PURE__ */ jsx11(Text11, { color: theme11.accent, bold: true, children: "Select Model" }),
3485
+ /* @__PURE__ */ jsxs9(Text11, { color: theme11.textSubtle, children: [
3486
+ " ",
3487
+ filtered.length,
3488
+ " models"
3489
+ ] })
3490
+ ] }),
3491
+ /* @__PURE__ */ jsxs9(Box10, { marginBottom: 1, children: [
3492
+ /* @__PURE__ */ jsx11(Text11, { color: theme11.textSubtle, children: "/ " }),
3493
+ /* @__PURE__ */ jsx11(
3494
+ TextInput2,
3495
+ {
3496
+ value: search,
3497
+ onChange: handleSearchChange,
3498
+ placeholder: "Search models..."
3499
+ }
3500
+ )
3501
+ ] }),
3502
+ /* @__PURE__ */ jsx11(Box10, { height: 1, children: /* @__PURE__ */ jsx11(Text11, { color: theme11.textSubtle, children: pad(showScrollUp ? " ..." : "") }) }),
3503
+ /* @__PURE__ */ jsx11(Box10, { flexDirection: "column", height: MAX_VISIBLE, children: filtered.length === 0 ? /* @__PURE__ */ jsx11(Text11, { color: theme11.textSubtle, children: " No matching models" }) : rows.map((row) => {
3504
+ if (row.type === "group") {
3505
+ return /* @__PURE__ */ jsx11(Box10, { children: /* @__PURE__ */ jsx11(Text11, { color: theme11.textSubtle, dimColor: true, children: pad(` ${row.label}`) }) }, `group-${row.label}`);
3408
3506
  }
3409
- )
3507
+ const { model, isHighlighted, isCurrent } = row;
3508
+ const indicator = isHighlighted ? "\u203A " : " ";
3509
+ const suffix = isCurrent ? " *" : "";
3510
+ return /* @__PURE__ */ jsx11(Box10, { children: /* @__PURE__ */ jsx11(
3511
+ Text11,
3512
+ {
3513
+ color: isHighlighted ? theme11.accentActive : isCurrent ? theme11.accent : theme11.textMuted,
3514
+ bold: isHighlighted,
3515
+ children: pad(`${indicator}${model.label}${suffix}`)
3516
+ }
3517
+ ) }, model.value);
3518
+ }) }),
3519
+ /* @__PURE__ */ jsx11(Box10, { height: 1, children: /* @__PURE__ */ jsx11(Text11, { color: theme11.textSubtle, children: pad(showScrollDown ? " ..." : "") }) }),
3520
+ /* @__PURE__ */ jsx11(Box10, { marginTop: 1, children: /* @__PURE__ */ jsx11(Text11, { color: theme11.textSubtle, children: ["\u2191\u2193 navigate", "Enter select", "Tab manage models", "Esc cancel"].join(theme11.separator ?? " \xB7 ") }) })
3410
3521
  ]
3411
3522
  }
3412
3523
  );
@@ -3430,7 +3541,7 @@ function TalkApp({
3430
3541
  }) {
3431
3542
  const { state, callbacks, reset, contentRef } = useTalkStream();
3432
3543
  const { exit } = useApp3();
3433
- const { stdout } = useStdout();
3544
+ const { stdout } = useStdout2();
3434
3545
  const separator = theme12.separator ?? " \xB7 ";
3435
3546
  useEffect9(() => {
3436
3547
  streamRef.current = {
@@ -3438,16 +3549,16 @@ function TalkApp({
3438
3549
  getState: () => state
3439
3550
  };
3440
3551
  });
3441
- const [messages, setMessages] = useState10([]);
3442
- const [scrollOffset, setScrollOffset] = useState10(0);
3443
- const [enableMarkdown, setEnableMarkdown] = useState10(initialMarkdown);
3444
- const [currentModel, setCurrentModel] = useState10(model);
3445
- const [showModelPicker, setShowModelPicker] = useState10(false);
3552
+ const [messages, setMessages] = useState11([]);
3553
+ const [scrollOffset, setScrollOffset] = useState11(0);
3554
+ const [enableMarkdown, setEnableMarkdown] = useState11(initialMarkdown);
3555
+ const [currentModel, setCurrentModel] = useState11(model);
3556
+ const [showModelPicker, setShowModelPicker] = useState11(false);
3446
3557
  const terminalWidth = stdout?.columns ?? 120;
3447
3558
  const terminalRows = stdout?.rows ?? 40;
3448
3559
  const contentHeight = Math.max(5, terminalRows - CHROME_ROWS);
3449
3560
  const isStreaming = state.phase === "thinking" || state.phase === "streaming";
3450
- const [ctrlCPressed, setCtrlCPressed] = useState10(false);
3561
+ const [ctrlCPressed, setCtrlCPressed] = useState11(false);
3451
3562
  const ctrlCTimeout = useRef4(null);
3452
3563
  function appendSystemMessage(text) {
3453
3564
  setMessages((prev) => [
@@ -3827,8 +3938,8 @@ import { Command as Command8 } from "commander";
3827
3938
  import chalk11 from "chalk";
3828
3939
  import React9 from "react";
3829
3940
  import { render as render7 } from "ink";
3830
- import { useState as useState11, useEffect as useEffect10 } from "react";
3831
- import open2 from "open";
3941
+ import { useState as useState12, useEffect as useEffect10 } from "react";
3942
+ import open3 from "open";
3832
3943
  function displayAgentCard(agentCard) {
3833
3944
  console.log(chalk11.cyan("\nAgent Details:"));
3834
3945
  console.log(` Name: ${agentCard.name}`);
@@ -3967,7 +4078,7 @@ productsCommand.command("init").description("Initialize a product from an extern
3967
4078
  } else {
3968
4079
  console.log(chalk11.cyan("\nOpening browser to complete setup..."));
3969
4080
  }
3970
- await open2(targetUrl);
4081
+ await open3(targetUrl);
3971
4082
  return;
3972
4083
  }
3973
4084
  const createResult = await createProduct(
@@ -4001,11 +4112,11 @@ productsCommand.command("init").description("Initialize a product from an extern
4001
4112
  return;
4002
4113
  }
4003
4114
  const ProductInitApp = () => {
4004
- const [loading, setLoading] = useState11(!!options.from);
4005
- const [loadingLabel, setLoadingLabel] = useState11("Validating URL...");
4006
- const [success, setSuccess] = useState11(null);
4007
- const [error, setError] = useState11(null);
4008
- const [resultNode, setResultNode] = useState11(void 0);
4115
+ const [loading, setLoading] = useState12(!!options.from);
4116
+ const [loadingLabel, setLoadingLabel] = useState12("Validating URL...");
4117
+ const [success, setSuccess] = useState12(null);
4118
+ const [error, setError] = useState12(null);
4119
+ const [resultNode, setResultNode] = useState12(void 0);
4009
4120
  useEffect10(() => {
4010
4121
  if (!options.from) return void 0;
4011
4122
  const run = async () => {
@@ -4029,7 +4140,7 @@ productsCommand.command("init").description("Initialize a product from an extern
4029
4140
  const dashboardUrl2 = getDashboardUrl();
4030
4141
  const encodedUrl = encodeURIComponent(options.from);
4031
4142
  const targetUrl = `${dashboardUrl2}/now?from=${encodedUrl}&cli=true`;
4032
- await open2(targetUrl);
4143
+ await open3(targetUrl);
4033
4144
  setSuccess(true);
4034
4145
  setLoading(false);
4035
4146
  setResultNode(
@@ -4130,10 +4241,10 @@ import { render as render8 } from "ink";
4130
4241
 
4131
4242
  // src/ink/init/InitApp.tsx
4132
4243
  init_credential_store();
4133
- import { useState as useState12, useEffect as useEffect11, useCallback as useCallback3 } from "react";
4244
+ import { useState as useState13, useEffect as useEffect11, useCallback as useCallback4 } from "react";
4134
4245
  import { Box as Box14, Text as Text14, useApp as useApp4, useInput as useInput8 } from "ink";
4135
- import TextInput2 from "ink-text-input";
4136
- import SelectInput3 from "ink-select-input";
4246
+ import TextInput3 from "ink-text-input";
4247
+ import SelectInput2 from "ink-select-input";
4137
4248
  import { Spinner as Spinner4, theme as theme15 } from "@runtypelabs/ink-components";
4138
4249
 
4139
4250
  // src/ink/init/WizardStep.tsx
@@ -4189,7 +4300,7 @@ function getStepNumber(step) {
4189
4300
  }
4190
4301
  function InitApp({ apiUrl, onComplete }) {
4191
4302
  const { exit } = useApp4();
4192
- const [state, setState] = useState12({
4303
+ const [state, setState] = useState13({
4193
4304
  step: 0,
4194
4305
  authMethod: null,
4195
4306
  apiKey: null,
@@ -4205,7 +4316,7 @@ function InitApp({ apiUrl, onComplete }) {
4205
4316
  complete: false,
4206
4317
  createdProductId: null
4207
4318
  });
4208
- const getSummary = useCallback3(() => {
4319
+ const getSummary = useCallback4(() => {
4209
4320
  const answers = [];
4210
4321
  if (state.authMethod) {
4211
4322
  const labels = {
@@ -4276,7 +4387,7 @@ function InitApp({ apiUrl, onComplete }) {
4276
4387
  },
4277
4388
  { isActive: !state.loading && !state.complete }
4278
4389
  );
4279
- const handleAuthMethodSelect = useCallback3(
4390
+ const handleAuthMethodSelect = useCallback4(
4280
4391
  (item) => {
4281
4392
  const method = item.value;
4282
4393
  setState((prev) => ({
@@ -4335,7 +4446,7 @@ function InitApp({ apiUrl, onComplete }) {
4335
4446
  },
4336
4447
  [apiUrl]
4337
4448
  );
4338
- const handleApiKeySubmit = useCallback3(
4449
+ const handleApiKeySubmit = useCallback4(
4339
4450
  (value) => {
4340
4451
  if (!value.trim()) {
4341
4452
  setState((prev) => ({ ...prev, error: "API key is required" }));
@@ -4390,7 +4501,7 @@ function InitApp({ apiUrl, onComplete }) {
4390
4501
  },
4391
4502
  [apiUrl]
4392
4503
  );
4393
- const handleProductChoice = useCallback3(
4504
+ const handleProductChoice = useCallback4(
4394
4505
  (item) => {
4395
4506
  const choice = item.value;
4396
4507
  setState((prev) => ({
@@ -4405,7 +4516,7 @@ function InitApp({ apiUrl, onComplete }) {
4405
4516
  },
4406
4517
  []
4407
4518
  );
4408
- const handleUrlSubmit = useCallback3(
4519
+ const handleUrlSubmit = useCallback4(
4409
4520
  (value) => {
4410
4521
  if (!value.trim()) {
4411
4522
  setState((prev) => ({ ...prev, error: "URL is required" }));
@@ -4472,14 +4583,14 @@ function InitApp({ apiUrl, onComplete }) {
4472
4583
  },
4473
4584
  [apiUrl]
4474
4585
  );
4475
- const handleConfirmCreate = useCallback3((confirmed) => {
4586
+ const handleConfirmCreate = useCallback4((confirmed) => {
4476
4587
  if (!confirmed) {
4477
4588
  setState((prev) => ({ ...prev, step: 8, complete: true }));
4478
4589
  return;
4479
4590
  }
4480
4591
  setState((prev) => ({ ...prev, step: 6 }));
4481
4592
  }, []);
4482
- const handleProductNameSubmit = useCallback3(
4593
+ const handleProductNameSubmit = useCallback4(
4483
4594
  (value) => {
4484
4595
  const name = value.trim() || state.agentCard?.name || "My Product";
4485
4596
  setState((prev) => ({
@@ -4579,7 +4690,7 @@ function InitApp({ apiUrl, onComplete }) {
4579
4690
  children: /* @__PURE__ */ jsxs13(Box14, { flexDirection: "column", children: [
4580
4691
  state.error && /* @__PURE__ */ jsx15(Text14, { color: theme15.error, children: state.error }),
4581
4692
  /* @__PURE__ */ jsx15(
4582
- SelectInput3,
4693
+ SelectInput2,
4583
4694
  {
4584
4695
  items: [
4585
4696
  { label: "Create a new account", value: "signup" },
@@ -4609,7 +4720,7 @@ function InitApp({ apiUrl, onComplete }) {
4609
4720
  state.loading ? /* @__PURE__ */ jsx15(Spinner4, { label: state.loadingLabel }) : /* @__PURE__ */ jsxs13(Box14, { children: [
4610
4721
  /* @__PURE__ */ jsx15(Text14, { color: theme15.muted, children: "> " }),
4611
4722
  /* @__PURE__ */ jsx15(
4612
- TextInput2,
4723
+ TextInput3,
4613
4724
  {
4614
4725
  value: state.apiKeyInput,
4615
4726
  onChange: (value) => setState((prev) => ({
@@ -4650,7 +4761,7 @@ function InitApp({ apiUrl, onComplete }) {
4650
4761
  totalSteps: TOTAL_VISIBLE_STEPS,
4651
4762
  title: "What would you like to do?",
4652
4763
  children: /* @__PURE__ */ jsx15(
4653
- SelectInput3,
4764
+ SelectInput2,
4654
4765
  {
4655
4766
  items: [
4656
4767
  { label: "Import A2A agent URL", value: "url" },
@@ -4677,7 +4788,7 @@ function InitApp({ apiUrl, onComplete }) {
4677
4788
  state.loading ? /* @__PURE__ */ jsx15(Spinner4, { label: state.loadingLabel }) : /* @__PURE__ */ jsxs13(Box14, { children: [
4678
4789
  /* @__PURE__ */ jsx15(Text14, { color: theme15.muted, children: "> " }),
4679
4790
  /* @__PURE__ */ jsx15(
4680
- TextInput2,
4791
+ TextInput3,
4681
4792
  {
4682
4793
  value: state.urlInput,
4683
4794
  onChange: (value) => setState((prev) => ({
@@ -4756,7 +4867,7 @@ function InitApp({ apiUrl, onComplete }) {
4756
4867
  /* @__PURE__ */ jsxs13(Box14, { children: [
4757
4868
  /* @__PURE__ */ jsx15(Text14, { color: theme15.muted, children: "> " }),
4758
4869
  /* @__PURE__ */ jsx15(
4759
- TextInput2,
4870
+ TextInput3,
4760
4871
  {
4761
4872
  value: state.productName,
4762
4873
  onChange: (value) => setState((prev) => ({
@@ -4857,7 +4968,7 @@ function InitApp({ apiUrl, onComplete }) {
4857
4968
  function ConfirmInput({
4858
4969
  onConfirm
4859
4970
  }) {
4860
- const [answered, setAnswered] = useState12(false);
4971
+ const [answered, setAnswered] = useState13(false);
4861
4972
  useInput8(
4862
4973
  (input) => {
4863
4974
  if (answered) return;
@@ -4961,7 +5072,7 @@ import { Command as Command10 } from "commander";
4961
5072
  import chalk12 from "chalk";
4962
5073
  import React11 from "react";
4963
5074
  import { render as render9 } from "ink";
4964
- import { useState as useState13, useEffect as useEffect12 } from "react";
5075
+ import { useState as useState14, useEffect as useEffect12 } from "react";
4965
5076
  import { readFileSync as readFileSync3 } from "fs";
4966
5077
  import { processStream as processStream4 } from "@runtypelabs/sdk";
4967
5078
  var dispatchCommand = new Command10("dispatch").description("Execute a flow or agent via the dispatch API").option("-f, --flow <id>", "Flow ID to execute").option("-a, --agent <id>", "Agent ID to execute").option("-r, --record <id>", "Existing record ID").option("--record-json <file>", "JSON file with record data").option("-m, --message <text>", "Message to send").option("-v, --variable <key=value>", "Set a variable (repeatable)", collectVariables, []).option("--stream", "Stream the response (default)", true).option("--no-stream", "Wait for complete response").option("--json", "Output as JSON").option("--debug", "Show step-level details").option("--tty", "Force TTY mode").option("--no-tty", "Force non-TTY mode").action(async (options) => {
@@ -5088,9 +5199,9 @@ async function handleNonStreaming(client, payload, options) {
5088
5199
  return;
5089
5200
  }
5090
5201
  const App = () => {
5091
- const [loading, setLoading] = useState13(true);
5092
- const [success, setSuccess] = useState13(null);
5093
- const [error, setError] = useState13(null);
5202
+ const [loading, setLoading] = useState14(true);
5203
+ const [success, setSuccess] = useState14(null);
5204
+ const [error, setError] = useState14(null);
5094
5205
  useEffect12(() => {
5095
5206
  const run = async () => {
5096
5207
  try {
@@ -5141,7 +5252,7 @@ import { Command as Command12 } from "commander";
5141
5252
  import chalk17 from "chalk";
5142
5253
  import React13 from "react";
5143
5254
  import { render as render11 } from "ink";
5144
- import { useState as useState20, useEffect as useEffect18 } from "react";
5255
+ import { useState as useState21, useEffect as useEffect18 } from "react";
5145
5256
  import { processStream as processStream5 } from "@runtypelabs/sdk";
5146
5257
 
5147
5258
  // src/commands/agents-task.ts
@@ -5151,15 +5262,15 @@ import { render as render10 } from "ink";
5151
5262
  import React12 from "react";
5152
5263
 
5153
5264
  // src/ink/marathon/MarathonApp.tsx
5154
- import { useState as useState19, useEffect as useEffect17, useRef as useRef8, useCallback as useCallback6, useMemo as useMemo5 } from "react";
5265
+ import { useState as useState20, useEffect as useEffect17, useRef as useRef8, useCallback as useCallback7, useMemo as useMemo6 } from "react";
5155
5266
  import { execSync } from "child_process";
5156
- import open3 from "open";
5157
- import { Box as Box24, useApp as useApp5, useInput as useInput9, useStdout as useStdout2 } from "ink";
5267
+ import open4 from "open";
5268
+ import { Box as Box24, useApp as useApp5, useInput as useInput9, useStdout as useStdout3 } from "ink";
5158
5269
  import { StreamOutput as StreamOutput3, StatusBar as StatusBar2, ErrorDisplay as ErrorDisplay4, theme as theme27 } from "@runtypelabs/ink-components";
5159
5270
  import { LoadingAnimation } from "@runtypelabs/terminal-animations";
5160
5271
 
5161
5272
  // src/ink/marathon/useMarathonStream.ts
5162
- import { useState as useState14, useRef as useRef5, useMemo as useMemo2, useCallback as useCallback4 } from "react";
5273
+ import { useState as useState15, useRef as useRef5, useMemo as useMemo3, useCallback as useCallback5 } from "react";
5163
5274
 
5164
5275
  // src/ink/marathon/transcript-utils.ts
5165
5276
  function appendTranscriptText(content, delta, previousKind) {
@@ -5202,10 +5313,10 @@ function pushRawEvent(prev, type, data) {
5202
5313
  }
5203
5314
  var toolCounter = 0;
5204
5315
  function useMarathonStream() {
5205
- const [state, setState] = useState14(INITIAL_STATE2);
5316
+ const [state, setState] = useState15(INITIAL_STATE2);
5206
5317
  const stateRef = useRef5(state);
5207
5318
  stateRef.current = state;
5208
- const callbacks = useMemo2(
5319
+ const callbacks = useMemo3(
5209
5320
  () => ({
5210
5321
  onAgentStart() {
5211
5322
  setState((prev) => ({
@@ -5338,13 +5449,13 @@ function useMarathonStream() {
5338
5449
  }),
5339
5450
  []
5340
5451
  );
5341
- const reset = useCallback4(() => {
5452
+ const reset = useCallback5(() => {
5342
5453
  setState(INITIAL_STATE2);
5343
5454
  }, []);
5344
- const setSteering = useCallback4(() => {
5455
+ const setSteering = useCallback5(() => {
5345
5456
  setState((prev) => ({ ...prev, phase: "steering" }));
5346
5457
  }, []);
5347
- const resetForNewSession = useCallback4(() => {
5458
+ const resetForNewSession = useCallback5(() => {
5348
5459
  setState((prev) => ({
5349
5460
  ...prev,
5350
5461
  phase: "idle",
@@ -5357,7 +5468,7 @@ function useMarathonStream() {
5357
5468
  error: null
5358
5469
  }));
5359
5470
  }, []);
5360
- const showError = useCallback4((error) => {
5471
+ const showError = useCallback5((error) => {
5361
5472
  setState((prev) => ({
5362
5473
  ...prev,
5363
5474
  phase: "error",
@@ -5373,7 +5484,7 @@ import { Box as Box15, Text as Text15 } from "ink";
5373
5484
  import { theme as theme17 } from "@runtypelabs/ink-components";
5374
5485
 
5375
5486
  // src/ink/marathon/RunnerTrack.tsx
5376
- import { useState as useState15, useEffect as useEffect13, useRef as useRef6, useCallback as useCallback5 } from "react";
5487
+ import { useState as useState16, useEffect as useEffect13, useRef as useRef6, useCallback as useCallback6 } from "react";
5377
5488
  import { theme as theme16 } from "@runtypelabs/ink-components";
5378
5489
  var TRAIL_CHARS = ["\u2022", "\xB7", "."];
5379
5490
  var BORDER_H = "\u2500";
@@ -5393,11 +5504,11 @@ function useRunnerTrack({
5393
5504
  }) {
5394
5505
  const innerWidth = Math.max(4, width - 2);
5395
5506
  const perimeter = innerWidth * 2;
5396
- const [position, setPosition] = useState15(
5507
+ const [position, setPosition] = useState16(
5397
5508
  () => Math.min(initialPosition, perimeter - 1)
5398
5509
  );
5399
- const [laps, setLaps] = useState15(initialLaps);
5400
- const [elapsed, setElapsed] = useState15(0);
5510
+ const [laps, setLaps] = useState16(initialLaps);
5511
+ const [elapsed, setElapsed] = useState16(0);
5401
5512
  const startTimeRef = useRef6(Date.now());
5402
5513
  const onPositionChangeRef = useRef6(onPositionChange);
5403
5514
  onPositionChangeRef.current = onPositionChange;
@@ -5430,7 +5541,7 @@ function useRunnerTrack({
5430
5541
  return () => clearInterval(interval);
5431
5542
  }, [isAnimating, perimeter, laps]);
5432
5543
  const finishPosition = Math.floor(innerWidth / 2);
5433
- const getRowCol = useCallback5(
5544
+ const getRowCol = useCallback6(
5434
5545
  (pos) => {
5435
5546
  if (pos < innerWidth) {
5436
5547
  return { row: "top", col: pos };
@@ -5655,11 +5766,11 @@ function SessionTabs({ tabs, hiddenLeft, hiddenRight }) {
5655
5766
  }
5656
5767
 
5657
5768
  // src/ink/marathon/ThinkingIndicator.tsx
5658
- import { useState as useState16, useEffect as useEffect14 } from "react";
5769
+ import { useState as useState17, useEffect as useEffect14 } from "react";
5659
5770
  import { Spinner as Spinner5, theme as theme19 } from "@runtypelabs/ink-components";
5660
5771
  import { jsx as jsx18 } from "react/jsx-runtime";
5661
5772
  function ThinkingIndicator({ startedAt }) {
5662
- const [elapsed, setElapsed] = useState16(
5773
+ const [elapsed, setElapsed] = useState17(
5663
5774
  () => startedAt ? Math.floor((Date.now() - startedAt) / 1e3) : 0
5664
5775
  );
5665
5776
  useEffect14(() => {
@@ -5674,7 +5785,7 @@ function ThinkingIndicator({ startedAt }) {
5674
5785
  }
5675
5786
 
5676
5787
  // src/ink/marathon/ToolPanel.tsx
5677
- import { useState as useState17, useEffect as useEffect15, useMemo as useMemo3 } from "react";
5788
+ import { useState as useState18, useEffect as useEffect15, useMemo as useMemo4 } from "react";
5678
5789
  import { Box as Box19, Text as Text19 } from "ink";
5679
5790
  import { theme as theme22 } from "@runtypelabs/ink-components";
5680
5791
 
@@ -5773,9 +5884,9 @@ import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
5773
5884
  var ROWS_PER_TOOL = 3;
5774
5885
  var REASONING_PREVIEW_LINES = 4;
5775
5886
  function ToolPanel({ tools, reasoning, maxHeight }) {
5776
- const [now, setNow] = useState17(Date.now());
5887
+ const [now, setNow] = useState18(Date.now());
5777
5888
  const hasRunning = tools.some((t) => t.status === "running");
5778
- const reasoningLines = useMemo3(
5889
+ const reasoningLines = useMemo4(
5779
5890
  () => getVisibleReasoningLines(reasoning || "", REASONING_PREVIEW_LINES),
5780
5891
  [reasoning]
5781
5892
  );
@@ -5786,7 +5897,7 @@ function ToolPanel({ tools, reasoning, maxHeight }) {
5786
5897
  }, 100);
5787
5898
  return () => clearInterval(interval);
5788
5899
  }, [hasRunning]);
5789
- const visibleTools = useMemo3(() => {
5900
+ const visibleTools = useMemo4(() => {
5790
5901
  if (!maxHeight) return tools;
5791
5902
  const reasoningRows = reasoningLines.length > 0 ? 1 + reasoningLines.length + 1 : 0;
5792
5903
  const availableRows = maxHeight - 1 - reasoningRows;
@@ -5808,7 +5919,7 @@ function ToolPanel({ tools, reasoning, maxHeight }) {
5808
5919
  }
5809
5920
 
5810
5921
  // src/ink/marathon/EventStreamPanel.tsx
5811
- import { useMemo as useMemo4 } from "react";
5922
+ import { useMemo as useMemo5 } from "react";
5812
5923
  import { Box as Box20, Text as Text20 } from "ink";
5813
5924
  import { theme as theme23 } from "@runtypelabs/ink-components";
5814
5925
  import { jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
@@ -5843,7 +5954,7 @@ function EventDetailView({
5843
5954
  scrollOffset = 0
5844
5955
  }) {
5845
5956
  const separator = theme23.separator ?? " \xB7 ";
5846
- const { lines, totalLines } = useMemo4(() => {
5957
+ const { lines, totalLines } = useMemo5(() => {
5847
5958
  const json = JSON.stringify(event.data, null, 2);
5848
5959
  const allLines = json.split("\n");
5849
5960
  const total = allLines.length;
@@ -5901,7 +6012,7 @@ function EventStreamPanel({
5901
6012
  }
5902
6013
  );
5903
6014
  }
5904
- const { rows, hiddenAbove, hiddenBelow } = useMemo4(() => {
6015
+ const { rows, hiddenAbove, hiddenBelow } = useMemo5(() => {
5905
6016
  if (events.length === 0) return { rows: [], hiddenAbove: 0, hiddenBelow: 0 };
5906
6017
  const total = events.length;
5907
6018
  const half = Math.floor(maxVisibleLines / 2);
@@ -5980,9 +6091,9 @@ function EventStreamPanel({
5980
6091
  }
5981
6092
 
5982
6093
  // src/ink/marathon/SteeringPrompt.tsx
5983
- import { useState as useState18, useEffect as useEffect16, useRef as useRef7 } from "react";
6094
+ import { useState as useState19, useEffect as useEffect16, useRef as useRef7 } from "react";
5984
6095
  import { Box as Box22, Text as Text22 } from "ink";
5985
- import TextInput3 from "ink-text-input";
6096
+ import TextInput4 from "ink-text-input";
5986
6097
  import { theme as theme25 } from "@runtypelabs/ink-components";
5987
6098
 
5988
6099
  // src/ink/marathon/SteeringRecap.tsx
@@ -6046,13 +6157,20 @@ function SteeringPrompt({
6046
6157
  currentSandbox: _currentSandbox,
6047
6158
  recap
6048
6159
  }) {
6049
- const [value, setValue] = useState18("");
6050
- const [remaining, setRemaining] = useState18(timeout);
6051
- const [isTyping, setIsTyping] = useState18(false);
6052
- const [showModelPicker, setShowModelPicker] = useState18(false);
6053
- const [showHelp, setShowHelp] = useState18(false);
6160
+ const [value, setValue] = useState19("");
6161
+ const [remaining, setRemaining] = useState19(timeout);
6162
+ const [isTyping, setIsTyping] = useState19(false);
6163
+ const [showModelPicker, setShowModelPicker] = useState19(false);
6164
+ const [showHelp, setShowHelp] = useState19(false);
6054
6165
  const timerRef = useRef7(null);
6055
6166
  const separator = theme25.separator ?? " \xB7 ";
6167
+ useEffect16(() => {
6168
+ const title = "Marathon";
6169
+ const body = isTerminal ? "Marathon complete" : `Session ${recap?.sessionNumber ?? "?"} complete`;
6170
+ process.stderr.write(`\x1B]777;notify;${title};${body}\x07`);
6171
+ process.stderr.write(`\x1B]9;${body}\x07`);
6172
+ process.stderr.write("\x07");
6173
+ }, []);
6056
6174
  const handleChange = (newValue) => {
6057
6175
  setValue(newValue);
6058
6176
  if (newValue.length > 0 && !isTyping) {
@@ -6146,7 +6264,7 @@ function SteeringPrompt({
6146
6264
  /* @__PURE__ */ jsxs20(Box22, { children: [
6147
6265
  /* @__PURE__ */ jsx24(Text22, { color: theme25.accentActive, children: "> " }),
6148
6266
  /* @__PURE__ */ jsx24(Box22, { flexGrow: 1, children: /* @__PURE__ */ jsx24(
6149
- TextInput3,
6267
+ TextInput4,
6150
6268
  {
6151
6269
  value,
6152
6270
  onChange: handleChange,
@@ -6465,25 +6583,25 @@ function MarathonApp({
6465
6583
  }) {
6466
6584
  const { state, callbacks, reset: _reset, setSteering, resetForNewSession, showError } = useMarathonStream();
6467
6585
  const { exit } = useApp5();
6468
- const { stdout } = useStdout2();
6586
+ const { stdout } = useStdout3();
6469
6587
  const separator = theme27.separator ?? " \xB7 ";
6470
6588
  const steeringResolveRef = useRef8(null);
6471
- const [steeringRecap, setSteeringRecap] = useState19(null);
6472
- const [currentModel, setCurrentModel] = useState19(model || "default");
6473
- const [currentSandbox, setCurrentSandbox] = useState19(sandbox);
6474
- const [isTerminalSteering, setIsTerminalSteering] = useState19(false);
6475
- const [sessionSnapshots, setSessionSnapshots] = useState19(
6589
+ const [steeringRecap, setSteeringRecap] = useState20(null);
6590
+ const [currentModel, setCurrentModel] = useState20(model || "default");
6591
+ const [currentSandbox, setCurrentSandbox] = useState20(sandbox);
6592
+ const [isTerminalSteering, setIsTerminalSteering] = useState20(false);
6593
+ const [sessionSnapshots, setSessionSnapshots] = useState20(
6476
6594
  () => (initialSessionSnapshots || []).map((snapshot) => cloneSessionSnapshot(snapshot))
6477
6595
  );
6478
- const [selectedSessionKey, setSelectedSessionKey] = useState19(void 0);
6479
- const [followLatest, setFollowLatest] = useState19(true);
6480
- const [latestUnreadKey, setLatestUnreadKey] = useState19(void 0);
6481
- const [previewUrl, setPreviewUrl] = useState19(void 0);
6482
- const [runnerPosition, setRunnerPosition] = useState19(initialRunnerPosition ?? 0);
6483
- const [runnerLaps, setRunnerLaps] = useState19(initialRunnerLaps ?? 0);
6596
+ const [selectedSessionKey, setSelectedSessionKey] = useState20(void 0);
6597
+ const [followLatest, setFollowLatest] = useState20(true);
6598
+ const [latestUnreadKey, setLatestUnreadKey] = useState20(void 0);
6599
+ const [previewUrl, setPreviewUrl] = useState20(void 0);
6600
+ const [runnerPosition, setRunnerPosition] = useState20(initialRunnerPosition ?? 0);
6601
+ const [runnerLaps, setRunnerLaps] = useState20(initialRunnerLaps ?? 0);
6484
6602
  const runnerPositionRef = useRef8(initialRunnerPosition ?? 0);
6485
6603
  const runnerLapsRef = useRef8(initialRunnerLaps ?? 0);
6486
- const handleRunnerPositionChange = useCallback6((position, laps) => {
6604
+ const handleRunnerPositionChange = useCallback7((position, laps) => {
6487
6605
  setRunnerPosition(position);
6488
6606
  setRunnerLaps(laps);
6489
6607
  runnerPositionRef.current = position;
@@ -6491,7 +6609,7 @@ function MarathonApp({
6491
6609
  }, []);
6492
6610
  const isRunnerAnimating = state.phase === "thinking" || state.phase === "streaming" || state.phase === "tool";
6493
6611
  const isTerminalSteeringRef = useRef8(false);
6494
- const handleSteeringSubmit = useCallback6(
6612
+ const handleSteeringSubmit = useCallback7(
6495
6613
  (result) => {
6496
6614
  if (result.action === "model" && result.model) {
6497
6615
  setCurrentModel(result.model);
@@ -6564,17 +6682,17 @@ function MarathonApp({
6564
6682
  const contentHeight = Math.max(5, terminalRows - chromeRows);
6565
6683
  const isStacked = terminalWidth < STACKED_THRESHOLD;
6566
6684
  const toolPanelWidth = terminalWidth < NARROW_THRESHOLD ? TOOL_PANEL_NARROW : TOOL_PANEL_WIDE;
6567
- const [ctrlCPressed, setCtrlCPressed] = useState19(false);
6685
+ const [ctrlCPressed, setCtrlCPressed] = useState20(false);
6568
6686
  const ctrlCTimeout = useRef8(null);
6569
- const [showEventStream, setShowEventStream] = useState19(false);
6570
- const [scrollOffset, setScrollOffset] = useState19(0);
6571
- const [reasoningCollapsed, setReasoningCollapsed] = useState19(false);
6572
- const [eventCursor, setEventCursor] = useState19(-1);
6573
- const [detailEvent, setDetailEvent] = useState19(null);
6574
- const [detailScrollOffset, setDetailScrollOffset] = useState19(0);
6575
- const [goalExpanded, setGoalExpanded] = useState19(false);
6576
- const [upgradeModalDismissed, setUpgradeModalDismissed] = useState19(false);
6577
- const [clipboardFlash, setClipboardFlash] = useState19(null);
6687
+ const [showEventStream, setShowEventStream] = useState20(false);
6688
+ const [scrollOffset, setScrollOffset] = useState20(0);
6689
+ const [reasoningCollapsed, setReasoningCollapsed] = useState20(false);
6690
+ const [eventCursor, setEventCursor] = useState20(-1);
6691
+ const [detailEvent, setDetailEvent] = useState20(null);
6692
+ const [detailScrollOffset, setDetailScrollOffset] = useState20(0);
6693
+ const [goalExpanded, setGoalExpanded] = useState20(false);
6694
+ const [upgradeModalDismissed, setUpgradeModalDismissed] = useState20(false);
6695
+ const [clipboardFlash, setClipboardFlash] = useState20(null);
6578
6696
  const flashTimeout = useRef8(null);
6579
6697
  const billingPageUrl = billingUrl || `${(dashboardUrl || "https://use.runtype.com").replace(/\/$/, "")}/settings/billing`;
6580
6698
  function showFlash(msg) {
@@ -6584,21 +6702,21 @@ function MarathonApp({
6584
6702
  }
6585
6703
  const latestCompletedSessionIndex = sessionSnapshots[sessionSnapshots.length - 1]?.sessionIndex ?? initialSessionCount;
6586
6704
  const shouldShowLiveTab = state.phase !== "idle" && state.phase !== "steering" && state.phase !== "complete" && (Boolean(state.content) || Boolean(state.reasoning) || state.tools.length > 0 || state.rawEvents.length > 0 || state.phase === "thinking" || state.phase === "error");
6587
- const liveSessionSnapshot = useMemo5(
6705
+ const liveSessionSnapshot = useMemo6(
6588
6706
  () => shouldShowLiveTab ? buildLiveSessionSnapshot(state, latestCompletedSessionIndex + 1, currentModel) : void 0,
6589
6707
  [currentModel, latestCompletedSessionIndex, shouldShowLiveTab, state]
6590
6708
  );
6591
6709
  const liveSessionKey = liveSessionSnapshot ? createSessionTabKey(liveSessionSnapshot.sessionIndex, "live") : void 0;
6592
6710
  const latestSessionKey = getLatestSessionTabKey(sessionSnapshots, liveSessionSnapshot);
6593
- const allTabs = useMemo5(
6711
+ const allTabs = useMemo6(
6594
6712
  () => buildSessionTabs(sessionSnapshots, selectedSessionKey, latestUnreadKey, liveSessionSnapshot),
6595
6713
  [latestUnreadKey, liveSessionSnapshot, selectedSessionKey, sessionSnapshots]
6596
6714
  );
6597
- const visibleTabs = useMemo5(
6715
+ const visibleTabs = useMemo6(
6598
6716
  () => getVisibleSessionTabs(allTabs, selectedSessionKey, terminalWidth),
6599
6717
  [allTabs, selectedSessionKey, terminalWidth]
6600
6718
  );
6601
- const displayedSessionSnapshot = useMemo5(() => {
6719
+ const displayedSessionSnapshot = useMemo6(() => {
6602
6720
  if (!selectedSessionKey) return liveSessionSnapshot ?? sessionSnapshots[sessionSnapshots.length - 1];
6603
6721
  if (selectedSessionKey === liveSessionKey) return liveSessionSnapshot;
6604
6722
  return sessionSnapshots.find(
@@ -6611,14 +6729,14 @@ function MarathonApp({
6611
6729
  const displayedTools = displayedSessionSnapshot?.tools ?? state.tools;
6612
6730
  const displayedEvents = displayedSessionSnapshot?.rawEvents ?? state.rawEvents;
6613
6731
  const latestLiveActivityRef = useRef8(void 0);
6614
- const upgradePrompt = useMemo5(() => parseMarathonUpgradePrompt(state.error), [state.error]);
6615
- const upgradePromptKey = useMemo5(
6732
+ const upgradePrompt = useMemo6(() => parseMarathonUpgradePrompt(state.error), [state.error]);
6733
+ const upgradePromptKey = useMemo6(
6616
6734
  () => upgradePrompt ? `${upgradePrompt.message}|${upgradePrompt.code ?? ""}|${upgradePrompt.limitType ?? ""}|${upgradePrompt.retryAfter ?? ""}` : void 0,
6617
6735
  [upgradePrompt]
6618
6736
  );
6619
6737
  const showUpgradeModal = Boolean(upgradePrompt && !upgradeModalDismissed);
6620
6738
  const canBrowseAfterUpgradeError = Boolean(upgradePrompt && !showUpgradeModal);
6621
- const selectSessionTab = useCallback6(
6739
+ const selectSessionTab = useCallback7(
6622
6740
  (nextKey, manual = true) => {
6623
6741
  if (!nextKey) return;
6624
6742
  setSelectedSessionKey(nextKey);
@@ -6689,7 +6807,7 @@ function MarathonApp({
6689
6807
  setEventCursor(displayedEvents.length - 1);
6690
6808
  }
6691
6809
  }, [displayedEvents.length, eventCursor, showEventStream]);
6692
- const navigateToEvent = useCallback6(
6810
+ const navigateToEvent = useCallback7(
6693
6811
  (index) => {
6694
6812
  const clamped = Math.max(0, Math.min(displayedEvents.length - 1, index));
6695
6813
  const evt = displayedEvents[clamped];
@@ -6704,12 +6822,12 @@ function MarathonApp({
6704
6822
  const agentPageUrl = agentId && dashboardUrl ? `${dashboardUrl.replace(/\/$/, "")}/agents/${agentId}` : null;
6705
6823
  useInput9((_input, key) => {
6706
6824
  if (_input === "u" && upgradePrompt) {
6707
- void open3(billingPageUrl);
6825
+ void open4(billingPageUrl);
6708
6826
  setUpgradeModalDismissed(true);
6709
6827
  return;
6710
6828
  }
6711
6829
  if (_input === "o" && agentPageUrl && !(state.phase === "steering" && steeringRecap)) {
6712
- void open3(agentPageUrl);
6830
+ void open4(agentPageUrl);
6713
6831
  return;
6714
6832
  }
6715
6833
  if (key.ctrl && _input === "c") {
@@ -6741,7 +6859,7 @@ function MarathonApp({
6741
6859
  return;
6742
6860
  }
6743
6861
  if (key.return) {
6744
- void open3(billingPageUrl);
6862
+ void open4(billingPageUrl);
6745
6863
  setUpgradeModalDismissed(true);
6746
6864
  return;
6747
6865
  }
@@ -6928,7 +7046,7 @@ function MarathonApp({
6928
7046
  adjustedContentHeight - reasoningHintRows - reasoningLiveRows - thinkingRows - 3
6929
7047
  );
6930
7048
  const targetReasoningRows = hasReasoning && !reasoningCollapsed ? Math.min(maxReasoningRows, Math.max(3, Math.min(8, Math.floor(adjustedContentHeight * 0.3)))) : 0;
6931
- const visibleReasoningLines = useMemo5(
7049
+ const visibleReasoningLines = useMemo6(
6932
7050
  () => getVisibleReasoningLines(displayedReasoning, targetReasoningRows),
6933
7051
  [displayedReasoning, targetReasoningRows]
6934
7052
  );
@@ -9449,9 +9567,9 @@ agentsCommand.command("list").description("List all agents").option("--json", "O
9449
9567
  return;
9450
9568
  }
9451
9569
  const App = () => {
9452
- const [items, setItems] = useState20(null);
9453
- const [error, setError] = useState20(null);
9454
- const [total, setTotal] = useState20();
9570
+ const [items, setItems] = useState21(null);
9571
+ const [error, setError] = useState21(null);
9572
+ const [total, setTotal] = useState21();
9455
9573
  useEffect18(() => {
9456
9574
  client.get("/agents", { limit: options.limit }).then((res) => {
9457
9575
  setItems(res.data ?? []);
@@ -9510,8 +9628,8 @@ agentsCommand.command("get <id>").description("Get agent details").option("--jso
9510
9628
  return;
9511
9629
  }
9512
9630
  const App = () => {
9513
- const [items, setItems] = useState20(null);
9514
- const [error, setError] = useState20(null);
9631
+ const [items, setItems] = useState21(null);
9632
+ const [error, setError] = useState21(null);
9515
9633
  useEffect18(() => {
9516
9634
  client.get(`/agents/${id}`).then((res) => setItems([res])).catch((err) => setError(err instanceof Error ? err : new Error(String(err))));
9517
9635
  }, []);
@@ -9562,10 +9680,10 @@ agentsCommand.command("create").description("Create a new agent").requiredOption
9562
9680
  return;
9563
9681
  }
9564
9682
  const App = () => {
9565
- const [loading, setLoading] = useState20(true);
9566
- const [success, setSuccess] = useState20(null);
9567
- const [error, setError] = useState20(null);
9568
- const [result, setResult] = useState20(null);
9683
+ const [loading, setLoading] = useState21(true);
9684
+ const [success, setSuccess] = useState21(null);
9685
+ const [error, setError] = useState21(null);
9686
+ const [result, setResult] = useState21(null);
9569
9687
  useEffect18(() => {
9570
9688
  client.post("/agents", {
9571
9689
  name: options.name,
@@ -9613,10 +9731,10 @@ agentsCommand.command("delete <id>").description("Delete an agent").option("--tt
9613
9731
  return;
9614
9732
  }
9615
9733
  const App = () => {
9616
- const [confirmed, setConfirmed] = useState20(null);
9617
- const [loading, setLoading] = useState20(false);
9618
- const [success, setSuccess] = useState20(null);
9619
- const [error, setError] = useState20(null);
9734
+ const [confirmed, setConfirmed] = useState21(null);
9735
+ const [loading, setLoading] = useState21(false);
9736
+ const [success, setSuccess] = useState21(null);
9737
+ const [error, setError] = useState21(null);
9620
9738
  useEffect18(() => {
9621
9739
  if (confirmed !== true) return void 0;
9622
9740
  setLoading(true);
@@ -9707,7 +9825,7 @@ import { Command as Command13 } from "commander";
9707
9825
  import chalk18 from "chalk";
9708
9826
  import React14 from "react";
9709
9827
  import { render as render12 } from "ink";
9710
- import { useState as useState21, useEffect as useEffect19 } from "react";
9828
+ import { useState as useState22, useEffect as useEffect19 } from "react";
9711
9829
  var modelsCommand = new Command13("models").description("Manage model configurations");
9712
9830
  modelsCommand.command("list").description("List your enabled model configurations").option("--json", "Output as JSON").option("--tty", "Force TTY mode").option("--no-tty", "Force non-TTY mode").action(async (options) => {
9713
9831
  const apiKey = await ensureAuth();
@@ -9744,9 +9862,9 @@ modelsCommand.command("list").description("List your enabled model configuration
9744
9862
  return;
9745
9863
  }
9746
9864
  const App = () => {
9747
- const [items, setItems] = useState21(null);
9748
- const [error, setError] = useState21(null);
9749
- const [total, setTotal] = useState21();
9865
+ const [items, setItems] = useState22(null);
9866
+ const [error, setError] = useState22(null);
9867
+ const [total, setTotal] = useState22();
9750
9868
  useEffect19(() => {
9751
9869
  client.get("/model-configs").then((res) => {
9752
9870
  setItems(res.data ?? []);
@@ -9809,8 +9927,8 @@ modelsCommand.command("available").description("List all available models groupe
9809
9927
  return;
9810
9928
  }
9811
9929
  const App = () => {
9812
- const [items, setItems] = useState21(null);
9813
- const [error, setError] = useState21(null);
9930
+ const [items, setItems] = useState22(null);
9931
+ const [error, setError] = useState22(null);
9814
9932
  useEffect19(() => {
9815
9933
  client.get("/model-configs/grouped").then((res) => setItems(res.data ?? [])).catch((err) => setError(err instanceof Error ? err : new Error(String(err))));
9816
9934
  }, []);
@@ -9857,10 +9975,10 @@ modelsCommand.command("enable <modelId>").description("Enable a model by creatin
9857
9975
  return;
9858
9976
  }
9859
9977
  const App = () => {
9860
- const [loading, setLoading] = useState21(true);
9861
- const [success, setSuccess] = useState21(null);
9862
- const [error, setError] = useState21(null);
9863
- const [result, setResult] = useState21(null);
9978
+ const [loading, setLoading] = useState22(true);
9979
+ const [success, setSuccess] = useState22(null);
9980
+ const [error, setError] = useState22(null);
9981
+ const [result, setResult] = useState22(null);
9864
9982
  useEffect19(() => {
9865
9983
  client.post("/model-configs", { modelId }).then((data) => {
9866
9984
  setResult(data);
@@ -9905,9 +10023,9 @@ modelsCommand.command("disable <id>").description("Disable a model configuration
9905
10023
  return;
9906
10024
  }
9907
10025
  const App = () => {
9908
- const [loading, setLoading] = useState21(true);
9909
- const [success, setSuccess] = useState21(null);
9910
- const [error, setError] = useState21(null);
10026
+ const [loading, setLoading] = useState22(true);
10027
+ const [success, setSuccess] = useState22(null);
10028
+ const [error, setError] = useState22(null);
9911
10029
  useEffect19(() => {
9912
10030
  client.patch(`/model-configs/${id}/status`, { enabled: false }).then(() => {
9913
10031
  setSuccess(true);
@@ -9945,9 +10063,9 @@ modelsCommand.command("default <id>").description("Set a model configuration as
9945
10063
  return;
9946
10064
  }
9947
10065
  const App = () => {
9948
- const [loading, setLoading] = useState21(true);
9949
- const [success, setSuccess] = useState21(null);
9950
- const [error, setError] = useState21(null);
10066
+ const [loading, setLoading] = useState22(true);
10067
+ const [success, setSuccess] = useState22(null);
10068
+ const [error, setError] = useState22(null);
9951
10069
  useEffect19(() => {
9952
10070
  client.patch(`/model-configs/${id}/default`, {}).then(() => {
9953
10071
  setSuccess(true);
@@ -9989,7 +10107,7 @@ import { Command as Command14 } from "commander";
9989
10107
  import chalk19 from "chalk";
9990
10108
  import React15 from "react";
9991
10109
  import { render as render13 } from "ink";
9992
- import { useState as useState22, useEffect as useEffect20 } from "react";
10110
+ import { useState as useState23, useEffect as useEffect20 } from "react";
9993
10111
  var schedulesCommand = new Command14("schedules").description("Manage schedules");
9994
10112
  schedulesCommand.command("list").description("List all schedules").option("--json", "Output as JSON").option("--tty", "Force TTY mode").option("--no-tty", "Force non-TTY mode").action(async (options) => {
9995
10113
  const apiKey = await ensureAuth();
@@ -10033,9 +10151,9 @@ schedulesCommand.command("list").description("List all schedules").option("--jso
10033
10151
  return;
10034
10152
  }
10035
10153
  const App = () => {
10036
- const [items, setItems] = useState22(null);
10037
- const [error, setError] = useState22(null);
10038
- const [total, setTotal] = useState22();
10154
+ const [items, setItems] = useState23(null);
10155
+ const [error, setError] = useState23(null);
10156
+ const [total, setTotal] = useState23();
10039
10157
  useEffect20(() => {
10040
10158
  client.get("/schedules").then((res) => {
10041
10159
  setItems(res.data ?? []);
@@ -10099,8 +10217,8 @@ schedulesCommand.command("get <id>").description("Get schedule details").option(
10099
10217
  return;
10100
10218
  }
10101
10219
  const App = () => {
10102
- const [items, setItems] = useState22(null);
10103
- const [error, setError] = useState22(null);
10220
+ const [items, setItems] = useState23(null);
10221
+ const [error, setError] = useState23(null);
10104
10222
  useEffect20(() => {
10105
10223
  client.get(`/schedules/${id}`).then((res) => setItems([res])).catch((err) => setError(err instanceof Error ? err : new Error(String(err))));
10106
10224
  }, []);
@@ -10155,10 +10273,10 @@ schedulesCommand.command("create").description("Create a new schedule").required
10155
10273
  return;
10156
10274
  }
10157
10275
  const App = () => {
10158
- const [loading, setLoading] = useState22(true);
10159
- const [success, setSuccess] = useState22(null);
10160
- const [error, setError] = useState22(null);
10161
- const [result, setResult] = useState22(null);
10276
+ const [loading, setLoading] = useState23(true);
10277
+ const [success, setSuccess] = useState23(null);
10278
+ const [error, setError] = useState23(null);
10279
+ const [result, setResult] = useState23(null);
10162
10280
  useEffect20(() => {
10163
10281
  client.post("/schedules", {
10164
10282
  flowId: options.flow,
@@ -10210,9 +10328,9 @@ function simpleMutationCommand(name, description, mutationFn, successMsg, loadin
10210
10328
  return;
10211
10329
  }
10212
10330
  const App = () => {
10213
- const [loading, setLoading] = useState22(true);
10214
- const [success, setSuccess] = useState22(null);
10215
- const [error, setError] = useState22(null);
10331
+ const [loading, setLoading] = useState23(true);
10332
+ const [success, setSuccess] = useState23(null);
10333
+ const [error, setError] = useState23(null);
10216
10334
  useEffect20(() => {
10217
10335
  mutationFn(client, id).then(() => {
10218
10336
  setSuccess(true);
@@ -10272,10 +10390,10 @@ schedulesCommand.command("delete <id>").description("Delete a schedule").option(
10272
10390
  return;
10273
10391
  }
10274
10392
  const App = () => {
10275
- const [confirmed, setConfirmed] = useState22(null);
10276
- const [loading, setLoading] = useState22(false);
10277
- const [success, setSuccess] = useState22(null);
10278
- const [error, setError] = useState22(null);
10393
+ const [confirmed, setConfirmed] = useState23(null);
10394
+ const [loading, setLoading] = useState23(false);
10395
+ const [success, setSuccess] = useState23(null);
10396
+ const [error, setError] = useState23(null);
10279
10397
  useEffect20(() => {
10280
10398
  if (confirmed !== true) return void 0;
10281
10399
  setLoading(true);
@@ -10320,7 +10438,7 @@ import { Command as Command15 } from "commander";
10320
10438
  import chalk20 from "chalk";
10321
10439
  import React16 from "react";
10322
10440
  import { render as render14 } from "ink";
10323
- import { useState as useState23, useEffect as useEffect21 } from "react";
10441
+ import { useState as useState24, useEffect as useEffect21 } from "react";
10324
10442
  import { Text as Text24 } from "ink";
10325
10443
  import { readFileSync as readFileSync8 } from "fs";
10326
10444
  var evalCommand = new Command15("eval").description("Manage evaluations");
@@ -10365,10 +10483,10 @@ evalCommand.command("submit").description("Submit an eval batch").requiredOption
10365
10483
  return;
10366
10484
  }
10367
10485
  const App = () => {
10368
- const [loading, setLoading] = useState23(true);
10369
- const [success, setSuccess] = useState23(null);
10370
- const [error, setError] = useState23(null);
10371
- const [resultNode, setResultNode] = useState23(void 0);
10486
+ const [loading, setLoading] = useState24(true);
10487
+ const [success, setSuccess] = useState24(null);
10488
+ const [error, setError] = useState24(null);
10489
+ const [resultNode, setResultNode] = useState24(void 0);
10372
10490
  useEffect21(() => {
10373
10491
  const run = async () => {
10374
10492
  try {
@@ -10448,10 +10566,10 @@ evalCommand.command("list").description("List eval batches").option("--flow <id>
10448
10566
  return;
10449
10567
  }
10450
10568
  const App = () => {
10451
- const [loading, setLoading] = useState23(true);
10452
- const [items, setItems] = useState23(null);
10453
- const [total, setTotal] = useState23(void 0);
10454
- const [error, setError] = useState23(null);
10569
+ const [loading, setLoading] = useState24(true);
10570
+ const [items, setItems] = useState24(null);
10571
+ const [total, setTotal] = useState24(void 0);
10572
+ const [error, setError] = useState24(null);
10455
10573
  useEffect21(() => {
10456
10574
  const run = async () => {
10457
10575
  try {
@@ -10528,10 +10646,10 @@ evalCommand.command("results <id>").description("Get eval batch results").option
10528
10646
  return;
10529
10647
  }
10530
10648
  const App = () => {
10531
- const [loading, setLoading] = useState23(true);
10532
- const [success, setSuccess] = useState23(null);
10533
- const [error, setError] = useState23(null);
10534
- const [resultNode, setResultNode] = useState23(void 0);
10649
+ const [loading, setLoading] = useState24(true);
10650
+ const [success, setSuccess] = useState24(null);
10651
+ const [error, setError] = useState24(null);
10652
+ const [resultNode, setResultNode] = useState24(void 0);
10535
10653
  useEffect21(() => {
10536
10654
  const run = async () => {
10537
10655
  try {
@@ -10592,9 +10710,9 @@ evalCommand.command("compare <groupId>").description("Compare evals in a group")
10592
10710
  return;
10593
10711
  }
10594
10712
  const App = () => {
10595
- const [loading, setLoading] = useState23(true);
10596
- const [success, setSuccess] = useState23(null);
10597
- const [error, setError] = useState23(null);
10713
+ const [loading, setLoading] = useState24(true);
10714
+ const [success, setSuccess] = useState24(null);
10715
+ const [error, setError] = useState24(null);
10598
10716
  useEffect21(() => {
10599
10717
  const run = async () => {
10600
10718
  try {
@@ -10627,7 +10745,7 @@ import { Command as Command16 } from "commander";
10627
10745
  import chalk21 from "chalk";
10628
10746
  import React17 from "react";
10629
10747
  import { render as render15 } from "ink";
10630
- import { useState as useState24, useEffect as useEffect22 } from "react";
10748
+ import { useState as useState25, useEffect as useEffect22 } from "react";
10631
10749
  import { Text as Text25 } from "ink";
10632
10750
  var apiKeysCommand = new Command16("api-keys").description("Manage API keys");
10633
10751
  apiKeysCommand.command("list").description("List your API keys").option("--json", "Output as JSON").option("--tty", "Force TTY mode").option("--no-tty", "Force non-TTY mode").action(async (options) => {
@@ -10666,10 +10784,10 @@ apiKeysCommand.command("list").description("List your API keys").option("--json"
10666
10784
  return;
10667
10785
  }
10668
10786
  const App = () => {
10669
- const [loading, setLoading] = useState24(true);
10670
- const [items, setItems] = useState24(null);
10671
- const [total, setTotal] = useState24(void 0);
10672
- const [error, setError] = useState24(null);
10787
+ const [loading, setLoading] = useState25(true);
10788
+ const [items, setItems] = useState25(null);
10789
+ const [total, setTotal] = useState25(void 0);
10790
+ const [error, setError] = useState25(null);
10673
10791
  useEffect22(() => {
10674
10792
  const run = async () => {
10675
10793
  try {
@@ -10730,10 +10848,10 @@ apiKeysCommand.command("get <id>").description("Get API key details").option("--
10730
10848
  return;
10731
10849
  }
10732
10850
  const App = () => {
10733
- const [loading, setLoading] = useState24(true);
10734
- const [success, setSuccess] = useState24(null);
10735
- const [error, setError] = useState24(null);
10736
- const [resultNode, setResultNode] = useState24(void 0);
10851
+ const [loading, setLoading] = useState25(true);
10852
+ const [success, setSuccess] = useState25(null);
10853
+ const [error, setError] = useState25(null);
10854
+ const [resultNode, setResultNode] = useState25(void 0);
10737
10855
  useEffect22(() => {
10738
10856
  const run = async () => {
10739
10857
  try {
@@ -10799,10 +10917,10 @@ apiKeysCommand.command("create").description("Create a new API key").requiredOpt
10799
10917
  return;
10800
10918
  }
10801
10919
  const App = () => {
10802
- const [loading, setLoading] = useState24(true);
10803
- const [success, setSuccess] = useState24(null);
10804
- const [error, setError] = useState24(null);
10805
- const [resultNode, setResultNode] = useState24(void 0);
10920
+ const [loading, setLoading] = useState25(true);
10921
+ const [success, setSuccess] = useState25(null);
10922
+ const [error, setError] = useState25(null);
10923
+ const [resultNode, setResultNode] = useState25(void 0);
10806
10924
  useEffect22(() => {
10807
10925
  const run = async () => {
10808
10926
  try {
@@ -10858,9 +10976,9 @@ apiKeysCommand.command("delete <id>").description("Delete an API key").option("-
10858
10976
  }
10859
10977
  if (options.yes) {
10860
10978
  const App = () => {
10861
- const [loading, setLoading] = useState24(true);
10862
- const [success, setSuccess] = useState24(null);
10863
- const [error, setError] = useState24(null);
10979
+ const [loading, setLoading] = useState25(true);
10980
+ const [success, setSuccess] = useState25(null);
10981
+ const [error, setError] = useState25(null);
10864
10982
  useEffect22(() => {
10865
10983
  const run = async () => {
10866
10984
  try {
@@ -10901,9 +11019,9 @@ apiKeysCommand.command("delete <id>").description("Delete an API key").option("-
10901
11019
  });
10902
11020
  if (!confirmed) return;
10903
11021
  const DeleteApp = () => {
10904
- const [loading, setLoading] = useState24(true);
10905
- const [success, setSuccess] = useState24(null);
10906
- const [error, setError] = useState24(null);
11022
+ const [loading, setLoading] = useState25(true);
11023
+ const [success, setSuccess] = useState25(null);
11024
+ const [error, setError] = useState25(null);
10907
11025
  useEffect22(() => {
10908
11026
  const run = async () => {
10909
11027
  try {
@@ -10954,10 +11072,10 @@ apiKeysCommand.command("regenerate <id>").description("Regenerate an API key").o
10954
11072
  return;
10955
11073
  }
10956
11074
  const App = () => {
10957
- const [loading, setLoading] = useState24(true);
10958
- const [success, setSuccess] = useState24(null);
10959
- const [error, setError] = useState24(null);
10960
- const [resultNode, setResultNode] = useState24(void 0);
11075
+ const [loading, setLoading] = useState25(true);
11076
+ const [success, setSuccess] = useState25(null);
11077
+ const [error, setError] = useState25(null);
11078
+ const [resultNode, setResultNode] = useState25(void 0);
10961
11079
  useEffect22(() => {
10962
11080
  const run = async () => {
10963
11081
  try {
@@ -11010,9 +11128,9 @@ apiKeysCommand.command("analytics").description("Show API key usage analytics").
11010
11128
  return;
11011
11129
  }
11012
11130
  const App = () => {
11013
- const [loading, setLoading] = useState24(true);
11014
- const [success, setSuccess] = useState24(null);
11015
- const [error, setError] = useState24(null);
11131
+ const [loading, setLoading] = useState25(true);
11132
+ const [success, setSuccess] = useState25(null);
11133
+ const [error, setError] = useState25(null);
11016
11134
  useEffect22(() => {
11017
11135
  const run = async () => {
11018
11136
  try {
@@ -11046,7 +11164,7 @@ import { Command as Command17 } from "commander";
11046
11164
  import chalk22 from "chalk";
11047
11165
  import React18 from "react";
11048
11166
  import { render as render16 } from "ink";
11049
- import { useState as useState25, useEffect as useEffect23 } from "react";
11167
+ import { useState as useState26, useEffect as useEffect23 } from "react";
11050
11168
  import { Text as Text26 } from "ink";
11051
11169
  var analyticsCommand = new Command17("analytics").description("View analytics and execution results");
11052
11170
  analyticsCommand.command("stats").description("Show account statistics").option("--json", "Output as JSON").option("--tty", "Force TTY mode").option("--no-tty", "Force non-TTY mode").action(async (options) => {
@@ -11075,10 +11193,10 @@ analyticsCommand.command("stats").description("Show account statistics").option(
11075
11193
  return;
11076
11194
  }
11077
11195
  const App = () => {
11078
- const [loading, setLoading] = useState25(true);
11079
- const [success, setSuccess] = useState25(null);
11080
- const [error, setError] = useState25(null);
11081
- const [resultNode, setResultNode] = useState25(void 0);
11196
+ const [loading, setLoading] = useState26(true);
11197
+ const [success, setSuccess] = useState26(null);
11198
+ const [error, setError] = useState26(null);
11199
+ const [resultNode, setResultNode] = useState26(void 0);
11082
11200
  useEffect23(() => {
11083
11201
  const run = async () => {
11084
11202
  try {
@@ -11159,10 +11277,10 @@ analyticsCommand.command("results").description("List execution results").option
11159
11277
  return;
11160
11278
  }
11161
11279
  const App = () => {
11162
- const [loading, setLoading] = useState25(true);
11163
- const [items, setItems] = useState25(null);
11164
- const [total, setTotal] = useState25(void 0);
11165
- const [error, setError] = useState25(null);
11280
+ const [loading, setLoading] = useState26(true);
11281
+ const [items, setItems] = useState26(null);
11282
+ const [total, setTotal] = useState26(void 0);
11283
+ const [error, setError] = useState26(null);
11166
11284
  useEffect23(() => {
11167
11285
  const run = async () => {
11168
11286
  try {
@@ -11208,8 +11326,8 @@ import { Command as Command18 } from "commander";
11208
11326
  import chalk23 from "chalk";
11209
11327
  import React19 from "react";
11210
11328
  import { render as render17 } from "ink";
11211
- import { useState as useState26, useEffect as useEffect24 } from "react";
11212
- import open4 from "open";
11329
+ import { useState as useState27, useEffect as useEffect24 } from "react";
11330
+ import open5 from "open";
11213
11331
  var billingCommand = new Command18("billing").description("View billing and subscription info");
11214
11332
  billingCommand.command("status").description("Show current plan and usage").option("--json", "Output as JSON").option("--tty", "Force TTY mode").option("--no-tty", "Force non-TTY mode").action(async (options) => {
11215
11333
  const apiKey = await ensureAuth();
@@ -11254,10 +11372,10 @@ billingCommand.command("status").description("Show current plan and usage").opti
11254
11372
  return;
11255
11373
  }
11256
11374
  const App = () => {
11257
- const [loading, setLoading] = useState26(true);
11258
- const [success, setSuccess] = useState26(null);
11259
- const [error, setError] = useState26(null);
11260
- const [resultNode, setResultNode] = useState26(void 0);
11375
+ const [loading, setLoading] = useState27(true);
11376
+ const [success, setSuccess] = useState27(null);
11377
+ const [error, setError] = useState27(null);
11378
+ const [resultNode, setResultNode] = useState27(void 0);
11261
11379
  useEffect24(() => {
11262
11380
  const run = async () => {
11263
11381
  try {
@@ -11312,7 +11430,7 @@ billingCommand.command("portal").description("Open the billing portal in your br
11312
11430
  if (data.url) {
11313
11431
  console.log("Opening billing portal...");
11314
11432
  console.log(data.url);
11315
- await open4(data.url);
11433
+ await open5(data.url);
11316
11434
  } else {
11317
11435
  console.log("No portal URL returned. You may need to set up billing first.");
11318
11436
  }
@@ -11325,16 +11443,16 @@ billingCommand.command("portal").description("Open the billing portal in your br
11325
11443
  return;
11326
11444
  }
11327
11445
  const App = () => {
11328
- const [loading, setLoading] = useState26(true);
11329
- const [success, setSuccess] = useState26(null);
11330
- const [error, setError] = useState26(null);
11331
- const [msg, setMsg] = useState26("Opening billing portal...");
11446
+ const [loading, setLoading] = useState27(true);
11447
+ const [success, setSuccess] = useState27(null);
11448
+ const [error, setError] = useState27(null);
11449
+ const [msg, setMsg] = useState27("Opening billing portal...");
11332
11450
  useEffect24(() => {
11333
11451
  const run = async () => {
11334
11452
  try {
11335
11453
  const data = await client.post("/billing/portal");
11336
11454
  if (data.url) {
11337
- await open4(data.url);
11455
+ await open5(data.url);
11338
11456
  setMsg("Billing portal opened in browser");
11339
11457
  setSuccess(true);
11340
11458
  } else {
@@ -11378,9 +11496,9 @@ billingCommand.command("refresh").description("Refresh plan data from billing pr
11378
11496
  return;
11379
11497
  }
11380
11498
  const App = () => {
11381
- const [loading, setLoading] = useState26(true);
11382
- const [success, setSuccess] = useState26(null);
11383
- const [error, setError] = useState26(null);
11499
+ const [loading, setLoading] = useState27(true);
11500
+ const [success, setSuccess] = useState27(null);
11501
+ const [error, setError] = useState27(null);
11384
11502
  useEffect24(() => {
11385
11503
  const run = async () => {
11386
11504
  try {
@@ -11412,7 +11530,7 @@ import { Command as Command19 } from "commander";
11412
11530
  import chalk24 from "chalk";
11413
11531
  import React20 from "react";
11414
11532
  import { render as render18 } from "ink";
11415
- import { useState as useState27, useEffect as useEffect25 } from "react";
11533
+ import { useState as useState28, useEffect as useEffect25 } from "react";
11416
11534
  import { Text as Text27 } from "ink";
11417
11535
  var flowVersionsCommand = new Command19("flow-versions").description(
11418
11536
  "Manage flow versions"
@@ -11449,9 +11567,9 @@ flowVersionsCommand.command("list <flowId>").description("List all versions for
11449
11567
  return;
11450
11568
  }
11451
11569
  const App = () => {
11452
- const [loading, setLoading] = useState27(true);
11453
- const [items, setItems] = useState27(null);
11454
- const [error, setError] = useState27(null);
11570
+ const [loading, setLoading] = useState28(true);
11571
+ const [items, setItems] = useState28(null);
11572
+ const [error, setError] = useState28(null);
11455
11573
  useEffect25(() => {
11456
11574
  const run = async () => {
11457
11575
  try {
@@ -11510,10 +11628,10 @@ flowVersionsCommand.command("get <flowId> <versionId>").description("Get a speci
11510
11628
  return;
11511
11629
  }
11512
11630
  const App = () => {
11513
- const [loading, setLoading] = useState27(true);
11514
- const [success, setSuccess] = useState27(null);
11515
- const [error, setError] = useState27(null);
11516
- const [resultNode, setResultNode] = useState27(void 0);
11631
+ const [loading, setLoading] = useState28(true);
11632
+ const [success, setSuccess] = useState28(null);
11633
+ const [error, setError] = useState28(null);
11634
+ const [resultNode, setResultNode] = useState28(void 0);
11517
11635
  useEffect25(() => {
11518
11636
  const run = async () => {
11519
11637
  try {
@@ -11576,10 +11694,10 @@ flowVersionsCommand.command("published <flowId>").description("Get the published
11576
11694
  return;
11577
11695
  }
11578
11696
  const App = () => {
11579
- const [loading, setLoading] = useState27(true);
11580
- const [success, setSuccess] = useState27(null);
11581
- const [error, setError] = useState27(null);
11582
- const [resultNode, setResultNode] = useState27(void 0);
11697
+ const [loading, setLoading] = useState28(true);
11698
+ const [success, setSuccess] = useState28(null);
11699
+ const [error, setError] = useState28(null);
11700
+ const [resultNode, setResultNode] = useState28(void 0);
11583
11701
  useEffect25(() => {
11584
11702
  const run = async () => {
11585
11703
  try {
@@ -11633,9 +11751,9 @@ flowVersionsCommand.command("publish <flowId>").description("Publish a version")
11633
11751
  return;
11634
11752
  }
11635
11753
  const App = () => {
11636
- const [loading, setLoading] = useState27(true);
11637
- const [success, setSuccess] = useState27(null);
11638
- const [error, setError] = useState27(null);
11754
+ const [loading, setLoading] = useState28(true);
11755
+ const [success, setSuccess] = useState28(null);
11756
+ const [error, setError] = useState28(null);
11639
11757
  useEffect25(() => {
11640
11758
  const run = async () => {
11641
11759
  try {