@aisa-one/cli 0.5.1 → 0.5.2

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
@@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.5.2] — 2026-09-10
11
+
12
+ Compatible patch on published `0.5.1`. Expanded `aisa login --help` for Agent
13
+ sign-in handoff, plus a default-off login-help evaluation. No auth runtime,
14
+ credential-precedence, or command-surface changes.
15
+
16
+ ### Changed
17
+
18
+ - `aisa login --help` owns accessible-browser vs persistent headless TTY, live
19
+ URL relay, one-time paste into the same living process, reuse of a running
20
+ login, stale-session recovery, no-TTY native MCP OAuth, and connected-only
21
+ after a successful balance check.
22
+
23
+ ### Added
24
+
25
+ - Default-off `eval/agent-quickstart/login-handoff/`. Excluded from the npm
26
+ package; does not run in default CI or against production AIsa credentials.
27
+
10
28
  ## [0.5.1] — 2026-09-10
11
29
 
12
30
  Compatible patch on published `0.5.0`. Browser-login-first onboarding
@@ -406,7 +424,8 @@ supports today; nothing here depends on a backend change.
406
424
  - Config commands (`aisa config get|set|list|reset`) and auth
407
425
  (`aisa login|logout|whoami`).
408
426
 
409
- [Unreleased]: https://github.com/AIsa-team/cli/compare/v0.5.1...HEAD
427
+ [Unreleased]: https://github.com/AIsa-team/cli/compare/v0.5.2...HEAD
428
+ [0.5.2]: https://github.com/AIsa-team/cli/compare/v0.5.1...v0.5.2
410
429
  [0.5.1]: https://github.com/AIsa-team/cli/compare/v0.5.0...v0.5.1
411
430
  [0.5.0]: https://github.com/AIsa-team/cli/compare/v0.3.0...v0.5.0
412
431
  [0.4.0]: https://github.com/AIsa-team/cli/compare/v0.3.0...b5c0b04b2a7a2cb9efcb568be5ee5440d7f7d94d
@@ -27,6 +27,8 @@ export declare function mintCliKey(options?: {
27
27
  lang?: Lang;
28
28
  catcher?: OAuthCatcher;
29
29
  }): Promise<string>;
30
+ /** Commander after-help for `aisa login`. Mechanics only; runtime is unchanged. */
31
+ export declare function loginHelpAfter(): string;
30
32
  export declare function oauthLogin(options?: {
31
33
  open?: boolean;
32
34
  lang?: Lang;
@@ -319,6 +319,20 @@ export async function mintCliKey(options = {}) {
319
319
  setApiKey(minted.key);
320
320
  return minted.key;
321
321
  }
322
+ /** Commander after-help for `aisa login`. Mechanics only; runtime is unchanged. */
323
+ export function loginHelpAfter() {
324
+ return `
325
+ Default: open a browser this person can actually use (SSH/CI/no display skip the local open). The live authorize URL is printed at the same time — relay that exact URL immediately. Do not invent, shorten, or delay it.
326
+
327
+ --no-browser needs a persistent interactive TTY. Agents request only the one-time redirect URL or code — never an API key, access token, or refresh token. Paste that result into this same living process once. Reuse a running login; do not start another. "Done" is not that input. If they cannot type here, relay the paste through chat into this PTY. An empty line cancels.
328
+
329
+ If this process already timed out, or the URL/code is from an older run, start a fresh aisa login and use the new URL and its result. Do not reuse a stale paste.
330
+
331
+ No browser and no TTY: this CLI cannot complete OAuth here. Normal setup is native MCP OAuth at https://tools.aisa.one/mcp.
332
+
333
+ Do not report connected unless login stored a key and the following balance check succeeded. aisa whoami and a stored local key are not proof. Scripts/CI: AISA_API_KEY or --key.
334
+ `;
335
+ }
322
336
  export async function oauthLogin(options = {}) {
323
337
  if (options.open === false && !process.stdin.isTTY) {
324
338
  error("--no-browser needs an interactive terminal to paste the redirect URL into.");
@@ -1,4 +1,4 @@
1
- export declare const VERSION = "0.5.1";
1
+ export declare const VERSION = "0.5.2";
2
2
  /** Root of the platform. Per-surface bases are derived in api.ts#resolveBases. */
3
3
  export declare const BASE_URL = "https://api.aisa.one";
4
4
  export declare const ENV_VAR_NAME = "AISA_API_KEY";
package/dist/constants.js CHANGED
@@ -1,4 +1,4 @@
1
- export const VERSION = "0.5.1";
1
+ export const VERSION = "0.5.2";
2
2
  /** Root of the platform. Per-surface bases are derived in api.ts#resolveBases. */
3
3
  export const BASE_URL = "https://api.aisa.one";
4
4
  export const ENV_VAR_NAME = "AISA_API_KEY";
package/dist/index.js CHANGED
@@ -4,6 +4,7 @@ import { VERSION } from "./constants.js";
4
4
  import { CliError } from "./cli-error.js";
5
5
  // Auth
6
6
  import { loginAction, logoutAction, whoamiAction } from "./commands/auth.js";
7
+ import { loginHelpAfter } from "./commands/oauth-login.js";
7
8
  // Account
8
9
  import { balanceAction, topupAction, usageAction } from "./commands/account.js";
9
10
  // API
@@ -75,6 +76,7 @@ program
75
76
  .description("Sign in to AIsa — browser sign-in by default, or --key to paste one")
76
77
  .option("--key <key>", "API key (skips the browser sign-in)")
77
78
  .option("--no-browser", "Print the sign-in URL and paste the redirect back (detected on its own over SSH)")
79
+ .addHelpText("after", loginHelpAfter())
78
80
  .action(wrap(loginAction));
79
81
  program
80
82
  .command("logout")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aisa-one/cli",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "CLI for the AIsa unified AI infrastructure platform - one API key for 80+ LLMs and 900+ endpoints across finance, search, social, and video APIs",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",