@aisa-one/cli 0.5.0 → 0.5.1
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 +28 -6
- package/README.md +18 -13
- package/dist/commands/auth.js +2 -2
- package/dist/commands/tool-help.js +1 -1
- package/dist/commands/tools.js +2 -3
- package/dist/config.d.ts +3 -0
- package/dist/config.js +4 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,11 +7,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
-
## [0.5.
|
|
10
|
+
## [0.5.1] — 2026-09-10
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
Compatible patch on published `0.5.0`. Browser-login-first onboarding
|
|
13
|
+
guidance and an opt-in Quickstart Skill evaluation. No new commands, auth
|
|
14
|
+
mechanisms, or credential-precedence changes.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- README, missing-key errors, `whoami`, and Router help recommend `aisa login`
|
|
19
|
+
(browser; stores a CLI key) before pasting a key. `AISA_API_KEY` and
|
|
20
|
+
`aisa login --key` remain for CI. Resolution order is unchanged:
|
|
21
|
+
`AISA_API_KEY`, then `~/.aisa/key`, then legacy login.
|
|
22
|
+
- Quick Start covers login, discovery, catalog browse, and quote. It does not
|
|
23
|
+
copy `aisa chat` or `aisa call`. Quote is a price observation; approval and
|
|
24
|
+
whether to execute remain caller-owned guidance, not an enforced CLI gate.
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
|
|
28
|
+
- Default-off `eval/agent-quickstart/` Skill ablation. Reuses the existing
|
|
29
|
+
Router stub and pack path. Excluded from the npm package; does not run in
|
|
30
|
+
default CI or against production AIsa credentials.
|
|
31
|
+
|
|
32
|
+
## [0.5.0] — 2026-09-09
|
|
33
|
+
|
|
34
|
+
PR21 command-surface cleanup. Published to npm as `0.5.0`. Distinct from the
|
|
35
|
+
unpublished `0.4.0` main baseline (`0.4.0` was never tagged or published).
|
|
15
36
|
|
|
16
37
|
### Breaking
|
|
17
38
|
|
|
@@ -41,7 +62,7 @@ published).
|
|
|
41
62
|
## [0.4.0] — unpublished main baseline
|
|
42
63
|
|
|
43
64
|
Unpublished `main` candidate as of 2026-09-08. Not tagged and not on npm
|
|
44
|
-
(
|
|
65
|
+
(skipped between `0.3.0` and published `0.5.0`). Kept so the Router work and the
|
|
45
66
|
`api search` / `api show` / `run` deprecation history stay identifiable.
|
|
46
67
|
|
|
47
68
|
### Breaking
|
|
@@ -385,7 +406,8 @@ supports today; nothing here depends on a backend change.
|
|
|
385
406
|
- Config commands (`aisa config get|set|list|reset`) and auth
|
|
386
407
|
(`aisa login|logout|whoami`).
|
|
387
408
|
|
|
388
|
-
[Unreleased]: https://github.com/AIsa-team/cli/compare/v0.5.
|
|
409
|
+
[Unreleased]: https://github.com/AIsa-team/cli/compare/v0.5.1...HEAD
|
|
410
|
+
[0.5.1]: https://github.com/AIsa-team/cli/compare/v0.5.0...v0.5.1
|
|
389
411
|
[0.5.0]: https://github.com/AIsa-team/cli/compare/v0.3.0...v0.5.0
|
|
390
412
|
[0.4.0]: https://github.com/AIsa-team/cli/compare/v0.3.0...b5c0b04b2a7a2cb9efcb568be5ee5440d7f7d94d
|
|
391
413
|
[0.3.0]: https://github.com/AIsa-team/cli/compare/v0.2.4...v0.3.0
|
package/README.md
CHANGED
|
@@ -14,8 +14,8 @@ npm install -g @aisa-one/cli
|
|
|
14
14
|
## Quick Start
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
#
|
|
18
|
-
aisa login
|
|
17
|
+
# Sign in (browser; stores a CLI key — no key to copy)
|
|
18
|
+
aisa login
|
|
19
19
|
|
|
20
20
|
# Discover published tools (Router; search/schema may be anonymous)
|
|
21
21
|
aisa search "company facts" --json
|
|
@@ -25,17 +25,19 @@ aisa schema get_financial_company_facts --json
|
|
|
25
25
|
aisa api list
|
|
26
26
|
aisa api show financial
|
|
27
27
|
|
|
28
|
-
#
|
|
29
|
-
aisa chat "Explain quantum computing" --model claude-opus-4-6
|
|
30
|
-
|
|
31
|
-
# Quote then execute a published Router tool (same request JSON)
|
|
28
|
+
# Quote a published Router tool (does not execute)
|
|
32
29
|
aisa quote --input '{"calls":[{"call_id":"c1","tool":"get_financial_company_facts","arguments":{"ticker":"AAPL"}}]}' --json
|
|
33
|
-
aisa call --input '{"calls":[{"call_id":"c1","tool":"get_financial_company_facts","arguments":{"ticker":"AAPL"}}]}' --json
|
|
34
30
|
```
|
|
35
31
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
receive $5 in
|
|
32
|
+
`aisa login` opens a browser, signs you in, and stores a CLI key. You do not
|
|
33
|
+
need to create or paste a key from the console. For CI or scripts, set
|
|
34
|
+
`AISA_API_KEY` or run `aisa login --key <key>`. New accounts receive $5 in
|
|
35
|
+
free credits.
|
|
36
|
+
|
|
37
|
+
This first block does not run `aisa chat` or `aisa call`. Quote is a price
|
|
38
|
+
observation, not authorization to execute. See
|
|
39
|
+
[Published tools](#published-tools-tool-router) for the quote/approval
|
|
40
|
+
contract before a billable call.
|
|
39
41
|
|
|
40
42
|
Root help lists 21 explicit commands plus implicit `help`. Removed domain
|
|
41
43
|
shortcuts and raw execution names are unknown commands — not aliases and
|
|
@@ -102,8 +104,10 @@ HTTP error; `3` means the Router returned a batch with at least one failed
|
|
|
102
104
|
item.
|
|
103
105
|
|
|
104
106
|
`search` and `schema` may be anonymous. `quote` and `call` require a
|
|
105
|
-
configured AIsa API key
|
|
106
|
-
|
|
107
|
+
configured AIsa API key. Sign in with `aisa login` first; it mints and stores
|
|
108
|
+
a CLI key. Resolution order is unchanged: `AISA_API_KEY`, then `~/.aisa/key`,
|
|
109
|
+
then legacy login. `AISA_API_KEY` still takes precedence over the stored key.
|
|
110
|
+
For CI, set `AISA_API_KEY` or use `aisa login --key <key>`. The default Router
|
|
107
111
|
origin is `https://tools.aisa.one` (independent of `baseUrl` /
|
|
108
112
|
`https://api.aisa.one`). Point a test Router at `AISA_ROUTER_BASE_URL` (origin
|
|
109
113
|
or prefix before `/v1/tool-router/...`), or `aisa config set routerUrl`. There
|
|
@@ -319,7 +323,8 @@ Settings:
|
|
|
319
323
|
independent of `baseUrl`); overridden by `AISA_ROUTER_BASE_URL`
|
|
320
324
|
- `outputFormat` — `text` or `json`
|
|
321
325
|
|
|
322
|
-
|
|
326
|
+
`aisa login` stores a CLI key in `~/.aisa/key`. Environment variables:
|
|
327
|
+
`AISA_API_KEY` takes precedence over the stored key.
|
|
323
328
|
`AISA_ROUTER_BASE_URL` is the Router origin/prefix before
|
|
324
329
|
`/v1/tool-router/...` and overrides the default `https://tools.aisa.one`.
|
|
325
330
|
`AISA_CACHE_DIR` relocates the cache. `GITHUB_TOKEN`
|
package/dist/commands/auth.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import chalk from "chalk";
|
|
2
|
-
import { setApiKey, clearApiKey, getApiKey, getKeySource, maskKey } from "../config.js";
|
|
2
|
+
import { setApiKey, clearApiKey, getApiKey, getKeySource, maskKey, AUTH_SETUP_GUIDANCE } from "../config.js";
|
|
3
3
|
import { success, info } from "../utils/display.js";
|
|
4
4
|
import { CONSOLE_URL, ENV_VAR_NAME } from "../constants.js";
|
|
5
5
|
export async function loginAction(options) {
|
|
@@ -55,7 +55,7 @@ export function whoamiAction() {
|
|
|
55
55
|
const source = getKeySource();
|
|
56
56
|
if (!key) {
|
|
57
57
|
info("Not authenticated.");
|
|
58
|
-
console.log(chalk.gray(`
|
|
58
|
+
console.log(chalk.gray(` ${AUTH_SETUP_GUIDANCE}`));
|
|
59
59
|
return;
|
|
60
60
|
}
|
|
61
61
|
console.log(` Key: ${maskKey(key)}`);
|
|
@@ -32,7 +32,7 @@ export const ROUTER_EXITS = {
|
|
|
32
32
|
const FLOW = "Recommended sequence: aisa search → aisa schema when has_full_schema=false → aisa quote → aisa call.";
|
|
33
33
|
const INLINE = "--input is inline JSON text (no file required). Shell examples are POSIX sh with single-quoted --input; apostrophes are written as '\\'' so $(), backticks, and other expansions stay literal. -f FILE and -f - remain available.";
|
|
34
34
|
const JSON_CONTRACT = "--json writes the unmodified application body, including MCP identifiers and numeric tokens. Human output maps only AISA_SEARCH_TOOL, AISA_BATCH_GET_SCHEMA, AISA_BATCH_QUOTE, and AISA_BATCH_USE to aisa search / schema / quote / call.";
|
|
35
|
-
const KEY_RESOLUTION = "AISA_API_KEY, then ~/.aisa/key, then legacy login.
|
|
35
|
+
const KEY_RESOLUTION = "Prefer aisa login (stores a CLI key). Resolution: AISA_API_KEY, then ~/.aisa/key, then legacy login. CI: AISA_API_KEY or aisa login --key.";
|
|
36
36
|
const ENFORCED_OPTIONAL = `Enforced: invalid local input exits 2 and is not sent. A configured AIsa API key is optional (${KEY_RESOLUTION}).`;
|
|
37
37
|
const ENFORCED_REQUIRED = `Enforced: quote and call refuse to run without a configured AIsa API key (${KEY_RESOLUTION}). Invalid local input exits 2 and is not sent. search and schema may be anonymous.`;
|
|
38
38
|
const NOT_ENFORCED = "Not enforced: the CLI does not record quotes, approvals, or budget caps and does not reject an unquoted aisa call.";
|
package/dist/commands/tools.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import ora from "ora";
|
|
2
2
|
import chalk from "chalk";
|
|
3
|
-
import { getApiKey } from "../config.js";
|
|
4
|
-
import { ENV_VAR_NAME } from "../constants.js";
|
|
3
|
+
import { getApiKey, MISSING_API_KEY_GUIDANCE } from "../config.js";
|
|
5
4
|
import { CliError, EXIT_PARTIAL, EXIT_TRANSPORT, transportError } from "../cli-error.js";
|
|
6
5
|
import { routerPost } from "../router.js";
|
|
7
6
|
import { error as printError } from "../utils/display.js";
|
|
@@ -61,7 +60,7 @@ async function runToolCommand(kind, operands, options, auth) {
|
|
|
61
60
|
function requireRouterKey(kind) {
|
|
62
61
|
const key = getApiKey();
|
|
63
62
|
if (!key) {
|
|
64
|
-
throw new CliError(
|
|
63
|
+
throw new CliError(`${MISSING_API_KEY_GUIDANCE} ` +
|
|
65
64
|
`search and schema may be anonymous; ${kind} will not run without a key. ` +
|
|
66
65
|
`Do not invent a business result.`, EXIT_TRANSPORT);
|
|
67
66
|
}
|
package/dist/config.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export declare function getApiKey(): string | undefined;
|
|
2
|
+
/** Next step when no local credential is present. Browser login first; env/--key are CI. */
|
|
3
|
+
export declare const AUTH_SETUP_GUIDANCE = "Run \"aisa login\". For CI, set AISA_API_KEY or use \"aisa login --key <key>\".";
|
|
4
|
+
export declare const MISSING_API_KEY_GUIDANCE = "No API key found. Run \"aisa login\". For CI, set AISA_API_KEY or use \"aisa login --key <key>\".";
|
|
2
5
|
export declare function requireApiKey(): string;
|
|
3
6
|
export declare function setApiKey(key: string): void;
|
|
4
7
|
export declare function clearApiKey(): void;
|
package/dist/config.js
CHANGED
|
@@ -84,10 +84,13 @@ export function getApiKey() {
|
|
|
84
84
|
}
|
|
85
85
|
return undefined;
|
|
86
86
|
}
|
|
87
|
+
/** Next step when no local credential is present. Browser login first; env/--key are CI. */
|
|
88
|
+
export const AUTH_SETUP_GUIDANCE = `Run "aisa login". For CI, set ${ENV_VAR_NAME} or use "aisa login --key <key>".`;
|
|
89
|
+
export const MISSING_API_KEY_GUIDANCE = `No API key found. ${AUTH_SETUP_GUIDANCE}`;
|
|
87
90
|
export function requireApiKey() {
|
|
88
91
|
const key = getApiKey();
|
|
89
92
|
if (!key) {
|
|
90
|
-
console.error(
|
|
93
|
+
console.error(MISSING_API_KEY_GUIDANCE);
|
|
91
94
|
process.exit(1);
|
|
92
95
|
}
|
|
93
96
|
return key;
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const VERSION = "0.5.
|
|
1
|
+
export declare const VERSION = "0.5.1";
|
|
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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aisa-one/cli",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
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",
|