@rubixkube/rubix 0.0.4 → 0.0.5

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/CHANGELOG.md CHANGED
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org).
7
7
 
8
+ ## [0.0.5] - 2025-03-06
9
+
10
+ ### Added
11
+
12
+ - Bugfixes and performance improvements
13
+
8
14
  ## [0.0.4] - 2025-03-03
9
15
 
10
16
  ### Added
@@ -1,7 +1,7 @@
1
1
  import { getConfig } from "../config/env.js";
2
2
  import { refreshAccessToken } from "./device-auth.js";
3
3
  import { saveAuthConfig } from "./auth-store.js";
4
- const DEFAULT_APP_NAME = "SRI Agent";
4
+ const DEFAULT_APP_NAME = "Rubix";
5
5
  export class StreamError extends Error {
6
6
  reason;
7
7
  status;
@@ -87,7 +87,8 @@ export async function refreshAndUpdateAuth(auth) {
87
87
  }
88
88
  catch (error) {
89
89
  const msg = error instanceof Error ? error.message : String(error);
90
- throw new StreamError(`Token refresh failed: ${msg}. Please run /login again.`, {
90
+ const fullMsg = msg.includes("Token refresh failed") ? msg : `Token refresh failed: ${msg}`;
91
+ throw new StreamError(`${fullMsg}. Please run /login again.`, {
91
92
  reason: "http_error",
92
93
  status: 401,
93
94
  });
package/dist/ui/App.js CHANGED
@@ -249,7 +249,7 @@ export function App({ initialSessionId, seedPrompt }) {
249
249
  const [modelPanelError, setModelPanelError] = useState(null);
250
250
  const [modelSelectedIndex, setModelSelectedIndex] = useState(0);
251
251
  const [availableAgents, setAvailableAgents] = useState([]);
252
- const [currentAgent, setCurrentAgent] = useState("SRI Agent");
252
+ const [currentAgent, setCurrentAgent] = useState("Rubix");
253
253
  const [showAgentPanel, setShowAgentPanel] = useState(false);
254
254
  const [agentPanelLoading, setAgentPanelLoading] = useState(false);
255
255
  const [agentPanelError, setAgentPanelError] = useState(null);
@@ -747,12 +747,11 @@ export function App({ initialSessionId, seedPrompt }) {
747
747
  cfg = await refreshAndUpdateAuth(cfg);
748
748
  // Successfully refreshed, continue with fresh token
749
749
  }
750
- catch (error) {
751
- // Refresh failed - token is invalid/expired, force re-login
752
- const errMsg = error instanceof Error ? error.message : String(error);
750
+ catch {
753
751
  if (!cancelled) {
754
- addSystemMessage(`Session expired (${errMsg}). Use /login to refresh.`);
752
+ addSystemMessage("Your session has expired. Run /login to sign in again.");
755
753
  }
754
+ await clearAuthConfig();
756
755
  loggedIn = false;
757
756
  cfg = null;
758
757
  }
@@ -789,7 +788,7 @@ export function App({ initialSessionId, seedPrompt }) {
789
788
  setAvailableAgents(appList);
790
789
  const saved = currentSettingsRef.current;
791
790
  const savedAgent = saved.agentId && appList.includes(saved.agentId) ? saved.agentId : null;
792
- const preferApp = savedAgent ?? (appList.includes("SRI Agent") ? "SRI Agent" : appList[0]);
791
+ const preferApp = savedAgent ?? (appList.includes("Rubix") ? "Rubix" : appList[0]);
793
792
  if (preferApp)
794
793
  setCurrentAgent(preferApp);
795
794
  }
@@ -1309,7 +1308,7 @@ export function App({ initialSessionId, seedPrompt }) {
1309
1308
  return [
1310
1309
  {
1311
1310
  id: sessionId,
1312
- appName: "SRI Agent",
1311
+ appName: "Rubix",
1313
1312
  createdAt: new Date().toISOString(),
1314
1313
  updatedAt: new Date().toISOString(),
1315
1314
  title: metadata.title,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rubixkube/rubix",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "Chat with your infrastructure from the terminal. RubixKube CLI for Site Reliability Intelligence—predict, prevent, and fix failures with AI.",
5
5
  "type": "module",
6
6
  "bin": {