🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@devopsagent/cli

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@devopsagent/cli - npm Package Compare versions

Comparing version
1.0.0
to
1.0.1
+1
-1
package.json
{
"name": "@devopsagent/cli",
"version": "1.0.0",
"version": "1.0.1",
"description": "CLI for DevOps Agent - AI-powered infrastructure management from your terminal",

@@ -5,0 +5,0 @@ "homepage": "https://devopsagent.io",

@@ -43,4 +43,5 @@ import { createInterface } from 'node:readline';

const user = result.user;
success(`Logged in as ${user.username || user.email}`);
const user = result.user || {};
const label = user.username || user.email || 'DevOps Agent';
success(`Logged in as ${label}`);
dim(`Config saved to ${getConfigPath()}`);

@@ -47,0 +48,0 @@ } catch (err) {

@@ -46,3 +46,5 @@ import { getApiKey, getServerUrl } from './config-manager.js';

export async function validateKey(apiKey, serverUrl) {
const url = `${serverUrl.replace(/\/+$/, '')}/api-gateway/v1/auth/validate`;
// Uses /v1/conversations to validate — works before /v1/auth/validate is deployed.
// Once the new backend is live, this can switch to /api-gateway/v1/auth/validate.
const url = `${serverUrl.replace(/\/+$/, '')}/api-gateway/v1/conversations?limit=1`;
const res = await fetch(url, {

@@ -54,3 +56,8 @@ headers: {

});
return handleResponse(res);
if (!res.ok) {
let body;
try { body = await res.json(); } catch { body = { error: res.statusText }; }
throw new APIError(body.message || body.error || `HTTP ${res.status}`, res.status, body);
}
return { valid: true, user: { username: 'DevOps Agent', email: '' } };
}

@@ -57,0 +64,0 @@