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

@stll/cli

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stll/cli - npm Package Compare versions

Comparing version
0.1.1
to
0.1.2
+8
-3
dist/auth/constants.d.ts

@@ -28,6 +28,11 @@ /**

export declare const LOOPBACK_REDIRECT_URI: string;
/** Default scopes requested when `stella auth login` is run without `--scopes`. */
export declare const CLI_DEFAULT_SCOPES: readonly ["openid", "profile", "email", "stella:read", "stella:search"];
/**
* Default scopes requested when `stella auth login` is run without
* `--scopes`. Includes `offline_access` so the stored credential carries a
* refresh token; without it the access token dies after 15 minutes and
* every command would demand a fresh browser login.
*/
export declare const CLI_DEFAULT_SCOPES: readonly ["openid", "profile", "email", "offline_access", "stella:read", "stella:search"];
/** Every OAuth scope `stella auth login --scopes` is documented to accept. */
export declare const CLI_KNOWN_SCOPES: readonly ["openid", "profile", "email", "stella:search", "stella:read", "stella:templates", "stella:documents_write", "stella:matters_write", "stella:knowledge_write", "stella:billing_write", "stella:admin_read", "stella:admin_write", "stella:onboarding", "stella:skills", "stella:external_mcps"];
export declare const CLI_KNOWN_SCOPES: readonly ["openid", "profile", "email", "offline_access", "stella:search", "stella:read", "stella:templates", "stella:documents_write", "stella:matters_write", "stella:knowledge_write", "stella:billing_write", "stella:admin_read", "stella:admin_write", "stella:onboarding", "stella:skills", "stella:external_mcps"];
export declare const CLIENT_NAME = "stella-cli";

@@ -34,0 +39,0 @@ /** `--server` resolution: env var name, checked between the flag and the config file. */

@@ -42,3 +42,8 @@ // Shared literal constants for the `stella auth` flow (spec 051 Phase 2).

export const LOOPBACK_REDIRECT_URI = `http://127.0.0.1${LOOPBACK_REDIRECT_PATH}`;
/** Default scopes requested when `stella auth login` is run without `--scopes`. */
/**
* Default scopes requested when `stella auth login` is run without
* `--scopes`. Includes `offline_access` so the stored credential carries a
* refresh token; without it the access token dies after 15 minutes and
* every command would demand a fresh browser login.
*/
export const CLI_DEFAULT_SCOPES = [

@@ -48,2 +53,3 @@ "openid",

"email",
"offline_access",
"stella:read",

@@ -57,2 +63,3 @@ "stella:search",

"email",
"offline_access",
"stella:search",

@@ -59,0 +66,0 @@ "stella:read",

@@ -1,1 +0,1 @@

{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/auth/constants.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,EAAE;AACF,sEAAsE;AACtE,gFAAgF;AAChF,8EAA8E;AAC9E,4EAA4E;AAC5E,2EAA2E;AAC3E,8EAA8E;AAC9E,yBAAyB;AAEzB,iEAAiE;AACjE,MAAM,aAAa,GAAG,MAAM,CAAC;AAE7B;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,SAAiB,EAAU,EAAE,CAC7D,IAAI,GAAG,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC,QAAQ,EAAE,CAAC;AAE/C;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG;IACjD,yCAAyC;IACzC,kDAAkD;CAC1C,CAAC;AAEX;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,WAAW,CAAC;AAClD,MAAM,CAAC,MAAM,qBAAqB,GAAW,mBAAmB,sBAAsB,EAAE,CAAC;AAEzF,mFAAmF;AACnF,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,QAAQ;IACR,SAAS;IACT,OAAO;IACP,aAAa;IACb,eAAe;CACP,CAAC;AAEX,8EAA8E;AAC9E,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,QAAQ;IACR,SAAS;IACT,OAAO;IACP,eAAe;IACf,aAAa;IACb,kBAAkB;IAClB,wBAAwB;IACxB,sBAAsB;IACtB,wBAAwB;IACxB,sBAAsB;IACtB,mBAAmB;IACnB,oBAAoB;IACpB,mBAAmB;IACnB,eAAe;IACf,sBAAsB;CACd,CAAC;AAE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IACxB,sBAAsB;IACtB,mBAAmB;IACnB,oBAAoB;IACpB,mBAAmB;IACnB,eAAe;IACf,sBAAsB;CACd,CAAC;AAEX,MAAM,CAAC,MAAM,WAAW,GAAG,YAAY,CAAC;AAExC,yFAAyF;AACzF,MAAM,CAAC,MAAM,kBAAkB,GAAG,mBAAmB,CAAC;AAEtD,0EAA0E;AAC1E,MAAM,CAAC,MAAM,gBAAgB,GAAW,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;AAEtD,oFAAoF;AACpF,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC"}

@@ -5,10 +5,8 @@ // Token refresh state machine: called proactively (context/whoami resolution)

//
// Today's server config issues no refresh tokens at all (the oauthProvider's
// `scopes` list has no `offline_access`, which is what
// `@better-auth/oauth-provider` gates refresh-token issuance on — see
// `packages/cli/src/auth/login.ts`'s module comment and the design brief).
// This function is still exercised end-to-end against a mocked provider
// (see `ensure-fresh-credential.test.ts`) so it is ready the moment that
// scope is added server-side; until then every credential this CLI stores
// simply has no `refreshToken` and expires after `ACCESS_TOKEN_EXPIRES_IN`.
// `@better-auth/oauth-provider` gates refresh-token issuance on the
// `offline_access` scope, which the stella server grants and
// `CLI_DEFAULT_SCOPES` requests by default. A credential can still lack a
// `refreshToken` (explicit `--scopes` without `offline_access`, or an older
// self-hosted server that does not grant it); it then simply expires after
// `ACCESS_TOKEN_EXPIRES_IN` and the next command asks for a re-login.
import { Result } from "better-result";

@@ -15,0 +13,0 @@ import { getMcpResourceUrl } from "./constants.js";

@@ -1,1 +0,1 @@

{"version":3,"file":"ensure-fresh-credential.js","sourceRoot":"","sources":["../../src/auth/ensure-fresh-credential.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,2EAA2E;AAC3E,qDAAqD;AACrD,EAAE;AACF,6EAA6E;AAC7E,uDAAuD;AACvD,sEAAsE;AACtE,2EAA2E;AAC3E,wEAAwE;AACxE,yEAAyE;AACzE,0EAA0E;AAC1E,4EAA4E;AAE5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AC,KAAK,CAAC,cAAc,EAAE,OAAO,CAAC,CAChD,CAAC;IAEF,OAAO,MAAM,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC;AAC5B,CAAC,CAAC"}

@@ -1,1 +0,1 @@

export declare const CLI_VERSION = "0.1.1";
export declare const CLI_VERSION = "0.1.2";

@@ -5,3 +5,3 @@ // GENERATED by `bun run codegen`. Do not edit by hand.

// (spec 051 addendum) never reads package.json from the published dist.
export const CLI_VERSION = "0.1.1";
export const CLI_VERSION = "0.1.2";
//# sourceMappingURL=cli-version.js.map
{
"name": "@stll/cli",
"version": "0.1.1",
"version": "0.1.2",
"description": "Stella command-line client",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is too big to display