@runloop/rl-cli 1.7.0 → 1.8.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/commands/menu.js +2 -1
- package/dist/commands/secret/list.js +379 -4
- package/dist/components/BenchmarkMenu.js +88 -0
- package/dist/components/MainMenu.js +63 -22
- package/dist/components/SecretCreatePage.js +185 -0
- package/dist/components/SettingsMenu.js +85 -0
- package/dist/components/StatusBadge.js +73 -0
- package/dist/components/StreamingLogsViewer.js +114 -53
- package/dist/router/Router.js +21 -1
- package/dist/screens/BenchmarkMenuScreen.js +23 -0
- package/dist/screens/BenchmarkRunDetailScreen.js +189 -0
- package/dist/screens/BenchmarkRunListScreen.js +255 -0
- package/dist/screens/MenuScreen.js +5 -2
- package/dist/screens/ScenarioRunDetailScreen.js +220 -0
- package/dist/screens/ScenarioRunListScreen.js +245 -0
- package/dist/screens/SecretCreateScreen.js +7 -0
- package/dist/screens/SecretDetailScreen.js +198 -0
- package/dist/screens/SecretListScreen.js +7 -0
- package/dist/screens/SettingsMenuScreen.js +23 -0
- package/dist/services/benchmarkService.js +73 -0
- package/dist/store/benchmarkStore.js +120 -0
- package/dist/store/betaFeatureStore.js +47 -0
- package/dist/store/index.js +1 -0
- package/dist/utils/config.js +8 -0
- package/package.json +1 -1
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Beta Feature Store - React context for managing beta feature flags
|
|
4
|
+
*
|
|
5
|
+
* Enable beta features by setting the environment variable:
|
|
6
|
+
* export RL_CLI_BETA=1
|
|
7
|
+
* export RL_CLI_BETA=true
|
|
8
|
+
*/
|
|
9
|
+
import React from "react";
|
|
10
|
+
import { isBetaEnabled } from "../utils/config.js";
|
|
11
|
+
const BetaFeatureContext = React.createContext(null);
|
|
12
|
+
export function BetaFeatureProvider({ children }) {
|
|
13
|
+
// Read beta status once on mount (env vars don't change during runtime)
|
|
14
|
+
const betaEnabled = React.useMemo(() => isBetaEnabled(), []);
|
|
15
|
+
const isFeatureEnabled = React.useCallback((feature) => {
|
|
16
|
+
// Currently all beta features are gated by the same flag
|
|
17
|
+
// This can be extended to support per-feature flags in the future
|
|
18
|
+
switch (feature) {
|
|
19
|
+
case "benchmarks":
|
|
20
|
+
return betaEnabled;
|
|
21
|
+
default:
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
}, [betaEnabled]);
|
|
25
|
+
const value = React.useMemo(() => ({
|
|
26
|
+
isBetaEnabled: betaEnabled,
|
|
27
|
+
isFeatureEnabled,
|
|
28
|
+
}), [betaEnabled, isFeatureEnabled]);
|
|
29
|
+
return (_jsx(BetaFeatureContext.Provider, { value: value, children: children }));
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Hook to access beta feature flags
|
|
33
|
+
*/
|
|
34
|
+
export function useBetaFeatures() {
|
|
35
|
+
const context = React.useContext(BetaFeatureContext);
|
|
36
|
+
if (!context) {
|
|
37
|
+
throw new Error("useBetaFeatures must be used within BetaFeatureProvider");
|
|
38
|
+
}
|
|
39
|
+
return context;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Hook to check if a specific beta feature is enabled
|
|
43
|
+
*/
|
|
44
|
+
export function useBetaFeature(feature) {
|
|
45
|
+
const { isFeatureEnabled } = useBetaFeatures();
|
|
46
|
+
return isFeatureEnabled(feature);
|
|
47
|
+
}
|
package/dist/store/index.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Root Store - Exports all stores for easy importing
|
|
3
3
|
*/
|
|
4
4
|
export { useNavigation, useNavigationStore, NavigationProvider, } from "./navigationStore.js";
|
|
5
|
+
export { BetaFeatureProvider, useBetaFeatures, useBetaFeature, } from "./betaFeatureStore.js";
|
|
5
6
|
export { useDevboxStore } from "./devboxStore.js";
|
|
6
7
|
export { useBlueprintStore } from "./blueprintStore.js";
|
|
7
8
|
export { useSnapshotStore } from "./snapshotStore.js";
|
package/dist/utils/config.js
CHANGED
|
@@ -72,6 +72,14 @@ export function setDetectedTheme(theme) {
|
|
|
72
72
|
export function clearDetectedTheme() {
|
|
73
73
|
config.delete("detectedTheme");
|
|
74
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* Check if beta features are enabled via the RL_CLI_BETA environment variable.
|
|
77
|
+
* Set RL_CLI_BETA=1 or RL_CLI_BETA=true to enable beta features.
|
|
78
|
+
*/
|
|
79
|
+
export function isBetaEnabled() {
|
|
80
|
+
const betaValue = process.env.RL_CLI_BETA?.toLowerCase();
|
|
81
|
+
return betaValue === "1" || betaValue === "true";
|
|
82
|
+
}
|
|
75
83
|
/**
|
|
76
84
|
* Returns the detailed error message for when the API key is not configured.
|
|
77
85
|
* This message provides instructions on how to set up the API key.
|