@runtypelabs/cli 1.1.0 → 1.1.3
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 +34 -34
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -127,7 +127,7 @@ var init_credential_store = __esm({
|
|
|
127
127
|
// src/index.ts
|
|
128
128
|
import { Command as Command20 } from "commander";
|
|
129
129
|
import chalk21 from "chalk";
|
|
130
|
-
import { config as
|
|
130
|
+
import { config as loadEnv } from "dotenv";
|
|
131
131
|
import { readFileSync as readFileSync6 } from "fs";
|
|
132
132
|
import { dirname as dirname2, join as join2 } from "path";
|
|
133
133
|
import { fileURLToPath } from "url";
|
|
@@ -452,9 +452,9 @@ var CallbackServer = class {
|
|
|
452
452
|
var OAuthManager = class {
|
|
453
453
|
clerkPublishableKey;
|
|
454
454
|
dashboardUrl;
|
|
455
|
-
constructor(
|
|
456
|
-
this.clerkPublishableKey =
|
|
457
|
-
this.dashboardUrl =
|
|
455
|
+
constructor(config2) {
|
|
456
|
+
this.clerkPublishableKey = config2.clerkPublishableKey;
|
|
457
|
+
this.dashboardUrl = config2.dashboardUrl;
|
|
458
458
|
}
|
|
459
459
|
async authenticate(mode) {
|
|
460
460
|
const state = crypto.randomBytes(32).toString("base64url");
|
|
@@ -608,7 +608,7 @@ function isTTY(options) {
|
|
|
608
608
|
|
|
609
609
|
// src/ink/shared/EntityCard.tsx
|
|
610
610
|
import { Box, Text } from "ink";
|
|
611
|
-
import { theme } from "@runtypelabs/ink";
|
|
611
|
+
import { theme } from "@runtypelabs/ink-components";
|
|
612
612
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
613
613
|
function EntityCard({ fields, title }) {
|
|
614
614
|
const visibleFields = fields.filter(
|
|
@@ -631,7 +631,7 @@ function EntityCard({ fields, title }) {
|
|
|
631
631
|
// src/ink/shared/ConfirmPrompt.tsx
|
|
632
632
|
import { useState } from "react";
|
|
633
633
|
import { Text as Text2, useInput } from "ink";
|
|
634
|
-
import { theme as theme2 } from "@runtypelabs/ink";
|
|
634
|
+
import { theme as theme2 } from "@runtypelabs/ink-components";
|
|
635
635
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
636
636
|
function ConfirmPrompt({
|
|
637
637
|
message,
|
|
@@ -682,7 +682,7 @@ function ConfirmPrompt({
|
|
|
682
682
|
// src/ink/shared/DataList.tsx
|
|
683
683
|
import { useEffect, useRef } from "react";
|
|
684
684
|
import { Box as Box2, Text as Text3, useApp, useInput as useInput2 } from "ink";
|
|
685
|
-
import { Spinner, ErrorDisplay, theme as theme3 } from "@runtypelabs/ink";
|
|
685
|
+
import { Spinner, ErrorDisplay, theme as theme3 } from "@runtypelabs/ink-components";
|
|
686
686
|
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
687
687
|
function DataList({
|
|
688
688
|
title,
|
|
@@ -751,7 +751,7 @@ function DataList({
|
|
|
751
751
|
// src/ink/shared/MutationResult.tsx
|
|
752
752
|
import { useEffect as useEffect2, useRef as useRef2 } from "react";
|
|
753
753
|
import { Box as Box3, Text as Text4, useApp as useApp2, useInput as useInput3 } from "ink";
|
|
754
|
-
import { Spinner as Spinner2, ErrorDisplay as ErrorDisplay2, theme as theme4 } from "@runtypelabs/ink";
|
|
754
|
+
import { Spinner as Spinner2, ErrorDisplay as ErrorDisplay2, theme as theme4 } from "@runtypelabs/ink-components";
|
|
755
755
|
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
756
756
|
function MutationResult({
|
|
757
757
|
loading,
|
|
@@ -1743,7 +1743,7 @@ flowsCommand.command("run <id>").description("Execute a flow via dispatch").opti
|
|
|
1743
1743
|
try {
|
|
1744
1744
|
const response = await client.stream("/dispatch", payload);
|
|
1745
1745
|
const callbacks = {
|
|
1746
|
-
|
|
1746
|
+
onStepDelta: (chunk) => {
|
|
1747
1747
|
process.stdout.write(chunk);
|
|
1748
1748
|
},
|
|
1749
1749
|
onFlowComplete: (event) => {
|
|
@@ -2378,7 +2378,7 @@ promptsCommand.command("test <id>").description("Test a prompt with input").opti
|
|
|
2378
2378
|
try {
|
|
2379
2379
|
const response = await client.stream("/dispatch", payload);
|
|
2380
2380
|
const callbacks = {
|
|
2381
|
-
|
|
2381
|
+
onStepDelta: (chunk) => {
|
|
2382
2382
|
process.stdout.write(chunk);
|
|
2383
2383
|
},
|
|
2384
2384
|
onError: (err) => {
|
|
@@ -2796,7 +2796,7 @@ import { useState as useState10, useEffect as useEffect9, useRef as useRef4 } fr
|
|
|
2796
2796
|
import fs3 from "fs";
|
|
2797
2797
|
import path3 from "path";
|
|
2798
2798
|
import { Box as Box10, useApp as useApp3, useInput as useInput7, useStdout } from "ink";
|
|
2799
|
-
import { StatusBar, ErrorDisplay as ErrorDisplay3 } from "@runtypelabs/ink";
|
|
2799
|
+
import { StatusBar, ErrorDisplay as ErrorDisplay3 } from "@runtypelabs/ink-components";
|
|
2800
2800
|
|
|
2801
2801
|
// src/ink/talk/useTalkStream.ts
|
|
2802
2802
|
import { useState as useState7, useRef as useRef3, useMemo, useCallback } from "react";
|
|
@@ -2814,7 +2814,7 @@ function useTalkStream() {
|
|
|
2814
2814
|
contentRef.current = "";
|
|
2815
2815
|
setState({ phase: "thinking", content: "", error: null });
|
|
2816
2816
|
},
|
|
2817
|
-
|
|
2817
|
+
onStepDelta(chunk) {
|
|
2818
2818
|
contentRef.current += chunk;
|
|
2819
2819
|
setState((prev) => ({
|
|
2820
2820
|
...prev,
|
|
@@ -2845,12 +2845,12 @@ function useTalkStream() {
|
|
|
2845
2845
|
// src/ink/talk/MessageHistory.tsx
|
|
2846
2846
|
import React7 from "react";
|
|
2847
2847
|
import { Box as Box5, Text as Text6 } from "ink";
|
|
2848
|
-
import { theme as theme6 } from "@runtypelabs/ink";
|
|
2848
|
+
import { theme as theme6 } from "@runtypelabs/ink-components";
|
|
2849
2849
|
|
|
2850
2850
|
// src/ink/talk/MessageBubble.tsx
|
|
2851
2851
|
import React6 from "react";
|
|
2852
2852
|
import { Box as Box4, Text as Text5 } from "ink";
|
|
2853
|
-
import { StreamOutput, theme as theme5 } from "@runtypelabs/ink";
|
|
2853
|
+
import { StreamOutput, theme as theme5 } from "@runtypelabs/ink-components";
|
|
2854
2854
|
|
|
2855
2855
|
// src/ink/talk/useRelativeTime.ts
|
|
2856
2856
|
import { useState as useState8, useEffect as useEffect8 } from "react";
|
|
@@ -2949,7 +2949,7 @@ var MessageHistory = React7.memo(MessageHistoryInner);
|
|
|
2949
2949
|
|
|
2950
2950
|
// src/ink/talk/StreamingBubble.tsx
|
|
2951
2951
|
import { Box as Box6, Text as Text7 } from "ink";
|
|
2952
|
-
import { StreamOutput as StreamOutput2, Spinner as Spinner3, theme as theme7 } from "@runtypelabs/ink";
|
|
2952
|
+
import { StreamOutput as StreamOutput2, Spinner as Spinner3, theme as theme7 } from "@runtypelabs/ink-components";
|
|
2953
2953
|
import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
2954
2954
|
function StreamingBubble({ content, phase, enableMarkdown }) {
|
|
2955
2955
|
return /* @__PURE__ */ jsxs6(
|
|
@@ -2983,12 +2983,12 @@ function StreamingBubble({ content, phase, enableMarkdown }) {
|
|
|
2983
2983
|
import { useState as useState9, useCallback as useCallback2 } from "react";
|
|
2984
2984
|
import { Box as Box8, Text as Text9, useInput as useInput5 } from "ink";
|
|
2985
2985
|
import TextInput from "ink-text-input";
|
|
2986
|
-
import { theme as theme9 } from "@runtypelabs/ink";
|
|
2986
|
+
import { theme as theme9 } from "@runtypelabs/ink-components";
|
|
2987
2987
|
|
|
2988
2988
|
// src/ink/talk/SlashCommandMenu.tsx
|
|
2989
2989
|
import { Box as Box7, Text as Text8, useInput as useInput4 } from "ink";
|
|
2990
2990
|
import SelectInput from "ink-select-input";
|
|
2991
|
-
import { theme as theme8 } from "@runtypelabs/ink";
|
|
2991
|
+
import { theme as theme8 } from "@runtypelabs/ink-components";
|
|
2992
2992
|
|
|
2993
2993
|
// src/ink/talk/types.ts
|
|
2994
2994
|
var TALK_COMMANDS = [
|
|
@@ -3176,7 +3176,7 @@ function ChatInput({
|
|
|
3176
3176
|
// src/ink/talk/ModelPicker.tsx
|
|
3177
3177
|
import { Box as Box9, Text as Text10, useInput as useInput6 } from "ink";
|
|
3178
3178
|
import SelectInput2 from "ink-select-input";
|
|
3179
|
-
import { theme as theme10 } from "@runtypelabs/ink";
|
|
3179
|
+
import { theme as theme10 } from "@runtypelabs/ink-components";
|
|
3180
3180
|
import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
3181
3181
|
var MODELS = [
|
|
3182
3182
|
{ label: "Claude Sonnet 4.5", value: "claude-sonnet-4-5" },
|
|
@@ -3903,11 +3903,11 @@ import { useState as useState12, useEffect as useEffect11, useCallback as useCal
|
|
|
3903
3903
|
import { Box as Box13, Text as Text13, useApp as useApp4, useInput as useInput8 } from "ink";
|
|
3904
3904
|
import TextInput2 from "ink-text-input";
|
|
3905
3905
|
import SelectInput3 from "ink-select-input";
|
|
3906
|
-
import { Spinner as Spinner4, theme as theme13 } from "@runtypelabs/ink";
|
|
3906
|
+
import { Spinner as Spinner4, theme as theme13 } from "@runtypelabs/ink-components";
|
|
3907
3907
|
|
|
3908
3908
|
// src/ink/init/WizardStep.tsx
|
|
3909
3909
|
import { Box as Box11, Text as Text11 } from "ink";
|
|
3910
|
-
import { theme as theme11 } from "@runtypelabs/ink";
|
|
3910
|
+
import { theme as theme11 } from "@runtypelabs/ink-components";
|
|
3911
3911
|
import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3912
3912
|
function WizardStep({
|
|
3913
3913
|
stepNumber,
|
|
@@ -3933,7 +3933,7 @@ function WizardStep({
|
|
|
3933
3933
|
|
|
3934
3934
|
// src/ink/init/StepSummary.tsx
|
|
3935
3935
|
import { Box as Box12, Text as Text12 } from "ink";
|
|
3936
|
-
import { theme as theme12 } from "@runtypelabs/ink";
|
|
3936
|
+
import { theme as theme12 } from "@runtypelabs/ink-components";
|
|
3937
3937
|
import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
3938
3938
|
function StepSummary({ answers }) {
|
|
3939
3939
|
if (answers.length === 0) {
|
|
@@ -4796,7 +4796,7 @@ async function handleStreaming(client, payload, options) {
|
|
|
4796
4796
|
[${event.name}] Running...`));
|
|
4797
4797
|
}
|
|
4798
4798
|
},
|
|
4799
|
-
|
|
4799
|
+
onStepDelta: (chunk) => {
|
|
4800
4800
|
process.stdout.write(chunk);
|
|
4801
4801
|
},
|
|
4802
4802
|
onStepComplete: (_result, event) => {
|
|
@@ -4924,7 +4924,7 @@ import { useState as useState18, useEffect as useEffect16, useRef as useRef7, us
|
|
|
4924
4924
|
import { execSync } from "child_process";
|
|
4925
4925
|
import open3 from "open";
|
|
4926
4926
|
import { Box as Box20, useApp as useApp5, useInput as useInput9, useStdout as useStdout2 } from "ink";
|
|
4927
|
-
import { StreamOutput as StreamOutput3, StatusBar as StatusBar2, ErrorDisplay as ErrorDisplay4, theme as theme21 } from "@runtypelabs/ink";
|
|
4927
|
+
import { StreamOutput as StreamOutput3, StatusBar as StatusBar2, ErrorDisplay as ErrorDisplay4, theme as theme21 } from "@runtypelabs/ink-components";
|
|
4928
4928
|
|
|
4929
4929
|
// src/ink/marathon/useMarathonStream.ts
|
|
4930
4930
|
import { useState as useState14, useRef as useRef5, useMemo as useMemo2, useCallback as useCallback4 } from "react";
|
|
@@ -5043,7 +5043,7 @@ function useMarathonStream() {
|
|
|
5043
5043
|
tools: prev.tools.map(
|
|
5044
5044
|
(t) => t.status === "running" ? { ...t, status: "complete", executionTime: Date.now() - t.startedAt } : t
|
|
5045
5045
|
),
|
|
5046
|
-
rawEvents: pushRawEvent(prev, "
|
|
5046
|
+
rawEvents: pushRawEvent(prev, "agent_await", {})
|
|
5047
5047
|
}));
|
|
5048
5048
|
},
|
|
5049
5049
|
onAgentComplete(event) {
|
|
@@ -5088,7 +5088,7 @@ function useMarathonStream() {
|
|
|
5088
5088
|
|
|
5089
5089
|
// src/ink/marathon/SessionHeader.tsx
|
|
5090
5090
|
import { Box as Box14, Text as Text14 } from "ink";
|
|
5091
|
-
import { theme as theme14 } from "@runtypelabs/ink";
|
|
5091
|
+
import { theme as theme14 } from "@runtypelabs/ink-components";
|
|
5092
5092
|
import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
5093
5093
|
function SessionHeader({
|
|
5094
5094
|
sessionName,
|
|
@@ -5120,7 +5120,7 @@ function SessionHeader({
|
|
|
5120
5120
|
|
|
5121
5121
|
// src/ink/marathon/ThinkingIndicator.tsx
|
|
5122
5122
|
import { useState as useState15, useEffect as useEffect13 } from "react";
|
|
5123
|
-
import { Spinner as Spinner5, theme as theme15 } from "@runtypelabs/ink";
|
|
5123
|
+
import { Spinner as Spinner5, theme as theme15 } from "@runtypelabs/ink-components";
|
|
5124
5124
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
5125
5125
|
function ThinkingIndicator({ startedAt }) {
|
|
5126
5126
|
const [elapsed, setElapsed] = useState15(
|
|
@@ -5140,11 +5140,11 @@ function ThinkingIndicator({ startedAt }) {
|
|
|
5140
5140
|
// src/ink/marathon/ToolPanel.tsx
|
|
5141
5141
|
import { useState as useState16, useEffect as useEffect14, useMemo as useMemo3 } from "react";
|
|
5142
5142
|
import { Box as Box16, Text as Text16 } from "ink";
|
|
5143
|
-
import { theme as theme17 } from "@runtypelabs/ink";
|
|
5143
|
+
import { theme as theme17 } from "@runtypelabs/ink-components";
|
|
5144
5144
|
|
|
5145
5145
|
// src/ink/marathon/ToolEntry.tsx
|
|
5146
5146
|
import { Box as Box15, Text as Text15 } from "ink";
|
|
5147
|
-
import { Spinner as Spinner6, theme as theme16 } from "@runtypelabs/ink";
|
|
5147
|
+
import { Spinner as Spinner6, theme as theme16 } from "@runtypelabs/ink-components";
|
|
5148
5148
|
import { Fragment, jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
5149
5149
|
function ToolEntry({ tool, now }) {
|
|
5150
5150
|
const elapsedLive = ((now - tool.startedAt) / 1e3).toFixed(1);
|
|
@@ -5231,13 +5231,13 @@ function ToolPanel({ tools, maxHeight }) {
|
|
|
5231
5231
|
// src/ink/marathon/EventStreamPanel.tsx
|
|
5232
5232
|
import { useMemo as useMemo4 } from "react";
|
|
5233
5233
|
import { Box as Box17, Text as Text17 } from "ink";
|
|
5234
|
-
import { theme as theme18 } from "@runtypelabs/ink";
|
|
5234
|
+
import { theme as theme18 } from "@runtypelabs/ink-components";
|
|
5235
5235
|
import { jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
5236
5236
|
var EVENT_COLORS = {
|
|
5237
5237
|
agent_start: theme18.success,
|
|
5238
5238
|
agent_complete: theme18.success,
|
|
5239
5239
|
agent_error: theme18.error,
|
|
5240
|
-
|
|
5240
|
+
agent_await: theme18.warning,
|
|
5241
5241
|
agent_iteration_start: theme18.info,
|
|
5242
5242
|
agent_iteration_complete: theme18.info,
|
|
5243
5243
|
agent_turn_delta: theme18.muted,
|
|
@@ -5375,11 +5375,11 @@ function EventStreamPanel({
|
|
|
5375
5375
|
import { useState as useState17, useEffect as useEffect15, useRef as useRef6 } from "react";
|
|
5376
5376
|
import { Box as Box19, Text as Text19 } from "ink";
|
|
5377
5377
|
import TextInput3 from "ink-text-input";
|
|
5378
|
-
import { theme as theme20 } from "@runtypelabs/ink";
|
|
5378
|
+
import { theme as theme20 } from "@runtypelabs/ink-components";
|
|
5379
5379
|
|
|
5380
5380
|
// src/ink/marathon/SteeringRecap.tsx
|
|
5381
5381
|
import { Box as Box18, Text as Text18 } from "ink";
|
|
5382
|
-
import { theme as theme19 } from "@runtypelabs/ink";
|
|
5382
|
+
import { theme as theme19 } from "@runtypelabs/ink-components";
|
|
5383
5383
|
import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
5384
5384
|
function SteeringRecap({
|
|
5385
5385
|
sessionNumber,
|
|
@@ -6887,7 +6887,7 @@ agentsCommand.command("execute <id>").description("Execute an agent").requiredOp
|
|
|
6887
6887
|
try {
|
|
6888
6888
|
const response = await client.stream(`/agents/${id}/execute`, payload);
|
|
6889
6889
|
const callbacks = {
|
|
6890
|
-
|
|
6890
|
+
onStepDelta: (chunk) => {
|
|
6891
6891
|
process.stdout.write(chunk);
|
|
6892
6892
|
},
|
|
6893
6893
|
onError: (err) => {
|
|
@@ -8886,7 +8886,7 @@ flowVersionsCommand.command("publish <flowId>").description("Publish a version")
|
|
|
8886
8886
|
|
|
8887
8887
|
// src/index.ts
|
|
8888
8888
|
init_credential_store();
|
|
8889
|
-
|
|
8889
|
+
loadEnv();
|
|
8890
8890
|
function getPackageVersion() {
|
|
8891
8891
|
try {
|
|
8892
8892
|
const pkgPath = join2(dirname2(fileURLToPath(import.meta.url)), "..", "package.json");
|