@runtypelabs/cli 1.0.0 → 1.1.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
@@ -4922,6 +4922,7 @@ import React12 from "react";
4922
4922
  // src/ink/marathon/MarathonApp.tsx
4923
4923
  import { useState as useState18, useEffect as useEffect16, useRef as useRef7, useCallback as useCallback5 } from "react";
4924
4924
  import { execSync } from "child_process";
4925
+ import open3 from "open";
4925
4926
  import { Box as Box20, useApp as useApp5, useInput as useInput9, useStdout as useStdout2 } from "ink";
4926
4927
  import { StreamOutput as StreamOutput3, StatusBar as StatusBar2, ErrorDisplay as ErrorDisplay4, theme as theme21 } from "@runtypelabs/ink";
4927
4928
 
@@ -5582,7 +5583,7 @@ function copyToClipboard(text) {
5582
5583
  }
5583
5584
  function MarathonApp({
5584
5585
  taskName,
5585
- agentId: _agentId,
5586
+ agentId,
5586
5587
  model,
5587
5588
  sandbox,
5588
5589
  goal,
@@ -5592,6 +5593,7 @@ function MarathonApp({
5592
5593
  plainText,
5593
5594
  noSteer: _noSteer,
5594
5595
  steeringTimeout,
5596
+ dashboardUrl,
5595
5597
  onSaveState,
5596
5598
  onComplete: _onComplete,
5597
5599
  streamRef
@@ -5684,7 +5686,12 @@ function MarathonApp({
5684
5686
  setEventCursor(state.rawEvents.length - 1);
5685
5687
  }
5686
5688
  }, [showEventStream, eventCursor, state.rawEvents.length]);
5689
+ const agentPageUrl = agentId && dashboardUrl ? `${dashboardUrl.replace(/\/$/, "")}/agents/${agentId}` : null;
5687
5690
  useInput9((_input, key) => {
5691
+ if (_input === "o" && agentPageUrl && !(state.phase === "steering" && steeringRecap)) {
5692
+ void open3(agentPageUrl);
5693
+ return;
5694
+ }
5688
5695
  if (key.ctrl && _input === "c") {
5689
5696
  if (ctrlCPressed) {
5690
5697
  if (ctrlCTimeout.current) {
@@ -5801,7 +5808,8 @@ function MarathonApp({
5801
5808
  if (showEventStream && detailEvent) return "c: copy | \u2190\u2192: prev/next | Esc: back | Tab: chat";
5802
5809
  if (showEventStream) return "Enter: detail | c: copy | Tab: chat | Ctrl+C";
5803
5810
  const scrollHint = scrollOffset > 0 ? ` | +${scrollOffset}` : "";
5804
- return `Tab: events | Ctrl+C${scrollHint}`;
5811
+ const dashboardHint = agentPageUrl ? "o: dashboard | " : "";
5812
+ return `${dashboardHint}Tab: events | Ctrl+C${scrollHint}`;
5805
5813
  })();
5806
5814
  const detailCenter = detailEvent ? `EVENT DETAIL (${eventCursor + 1}/${state.rawEvents.length})` : "EVENT STREAM";
5807
5815
  const goalText = goal || "";
@@ -6343,6 +6351,7 @@ ${sandboxPrompt}` : baseMessage;
6343
6351
  plainText: options.plainText ?? false,
6344
6352
  noSteer: options.noSteer ?? false,
6345
6353
  steeringTimeout: parseInt(options.steerTimeout || "10", 10),
6354
+ dashboardUrl: getDashboardUrl(),
6346
6355
  onSaveState: (content, _tools) => {
6347
6356
  const partialState = {
6348
6357
  agentId,
@@ -6562,6 +6571,8 @@ Saving state... done. Session saved to ${filePath}`);
6562
6571
  console.log(`Sessions: ${finalState.sessionCount}`);
6563
6572
  console.log(`Total cost: ${chalk12.yellow(`$${finalState.totalCost.toFixed(4)}`)}`);
6564
6573
  console.log(`State: ${chalk12.gray(filePath)}`);
6574
+ const dashboardBaseUrl = getDashboardUrl();
6575
+ console.log(`Dashboard: ${chalk12.cyan(`${dashboardBaseUrl}/agents/${agentId}`)}`);
6565
6576
  if (result.recordId) {
6566
6577
  console.log(`Record: ${chalk12.gray(result.recordId)}`);
6567
6578
  }
@@ -8418,7 +8429,7 @@ import chalk19 from "chalk";
8418
8429
  import React19 from "react";
8419
8430
  import { render as render17 } from "ink";
8420
8431
  import { useState as useState25, useEffect as useEffect23 } from "react";
8421
- import open3 from "open";
8432
+ import open4 from "open";
8422
8433
  var billingCommand = new Command18("billing").description("View billing and subscription info");
8423
8434
  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) => {
8424
8435
  const apiKey = await ensureAuth();
@@ -8521,7 +8532,7 @@ billingCommand.command("portal").description("Open the billing portal in your br
8521
8532
  if (data.url) {
8522
8533
  console.log("Opening billing portal...");
8523
8534
  console.log(data.url);
8524
- await open3(data.url);
8535
+ await open4(data.url);
8525
8536
  } else {
8526
8537
  console.log("No portal URL returned. You may need to set up billing first.");
8527
8538
  }
@@ -8543,7 +8554,7 @@ billingCommand.command("portal").description("Open the billing portal in your br
8543
8554
  try {
8544
8555
  const data = await client.post("/billing/portal");
8545
8556
  if (data.url) {
8546
- await open3(data.url);
8557
+ await open4(data.url);
8547
8558
  setMsg("Billing portal opened in browser");
8548
8559
  setSuccess(true);
8549
8560
  } else {