@knowttl/mg-axi 0.1.3 → 0.1.6

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/docs/coverage.md CHANGED
@@ -14,7 +14,7 @@ scheduled work as complete.
14
14
 
15
15
  - implemented read leaves: 263 (261 named Entra reads plus reviewed raw api get and doctor health check)
16
16
  - implemented write leaves: 5 (named gated mutations below)
17
- - local leaves: 7 (home, profile, login and setup views)
17
+ - local leaves: 11 (home, profile, config, auth, login alias and setup views)
18
18
  - inventory named-command: 289
19
19
  - inventory reviewed-raw-read: 5
20
20
  - inventory scheduled: 3717
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowttl/mg-axi",
3
- "version": "0.1.3",
3
+ "version": "0.1.6",
4
4
  "description": "Agent-facing Microsoft Graph CLI, read-only by default",
5
5
  "type": "module",
6
6
  "bin": {
@@ -20,7 +20,8 @@
20
20
  "inventory/operations.json",
21
21
  "skills/mg-axi",
22
22
  "docs/coverage.md",
23
- "README.md"
23
+ "README.md",
24
+ "axi-credential.schema.json"
24
25
  ],
25
26
  "engines": {
26
27
  "node": ">=22.12.0"
@@ -28,7 +29,7 @@
28
29
  "packageManager": "pnpm@10.34.6",
29
30
  "scripts": {
30
31
  "build": "tsc -p tsconfig.json",
31
- "test": "node --test --test-concurrency=4 test/*.test.mjs",
32
+ "test": "node tools/isolated-home.mjs node --test --test-concurrency=4 test/*.test.mjs",
32
33
  "lint": "tsc --noEmit -p tsconfig.json",
33
34
  "docs:generate": "node tools/generate-docs.mjs",
34
35
  "docs:check": "node tools/generate-docs.mjs --check"
@@ -42,8 +43,5 @@
42
43
  "devDependencies": {
43
44
  "@types/node": "^22.20.5",
44
45
  "typescript": "^7.0.2"
45
- },
46
- "optionalDependencies": {
47
- "keytar": "^7.9.0"
48
46
  }
49
47
  }
@@ -17,13 +17,13 @@ See [README.md](../../README.md) for write usage, execution gates, identity pinn
17
17
  Run commands non-interactively as `npx -y @knowttl/mg-axi ...`: no global install needed and no interactive prompts.
18
18
  Version pinning is the installer's choice: use `npx -y @knowttl/mg-axi@<version> ...` to select a specific release.
19
19
  Run `npx -y @knowttl/mg-axi doctor` first.
20
- See [README.md](../../README.md#release) for doctor profile selection, checks and failure behavior.
20
+ See [README.md](../../README.md#usage) for doctor profile selection, checks and failure behavior.
21
21
 
22
22
  ## Orientation
23
23
 
24
24
  The exact current leaf registry is `src/catalogue.ts`.
25
25
  Its capability label is `native` (implemented by an mg-axi handler).
26
- Its effect is `read` for Graph read leaves and the doctor health check, `write` for the gated named writes, or `local` for home, profile, login and setup views.
26
+ Its effect is `read` for Graph read leaves and the doctor health check, `write` for the gated named writes, or `local` for home, profile, auth, config path, login-alias and setup views.
27
27
  Doctor acquires credentials silently and contacts Graph; only its help view stays offline.
28
28
  The list below records current executable leaves; it makes no coverage claim for other Graph operations.
29
29
  See `docs/coverage.md` for the per-operation disposition records.
@@ -36,7 +36,7 @@ See `docs/coverage.md` for the per-operation disposition records.
36
36
  | `mg-axi profile create` | native | local |
37
37
  | `mg-axi profile list` | native | local |
38
38
  | `mg-axi profile show` | native | local |
39
- | `mg-axi login` | native | local |
39
+ | `mg-axi auth login` | native | local |
40
40
  | `mg-axi setup` | native | local |
41
41
  | `mg-axi setup hooks` | native | local |
42
42
  | `mg-axi doctor` | native | read |
@@ -307,6 +307,10 @@ See `docs/coverage.md` for the per-operation disposition records.
307
307
  | `mg-axi entra lifecycle run task-processing-result show` | native | read |
308
308
  | `mg-axi entra lifecycle run task-processing-result count` | native | read |
309
309
  | `mg-axi api get` | native | read |
310
+ | `mg-axi login` | native | local |
311
+ | `mg-axi config path` | native | local |
312
+ | `mg-axi auth status` | native | local |
313
+ | `mg-axi auth logout` | native | local |
310
314
  <!-- command-registry:end -->
311
315
 
312
316
  Run `npx -y @knowttl/mg-axi <leaf-path> --help` for that leaf's accepted flags and reference.
@@ -318,7 +322,7 @@ The no-args home view prints these hints alongside live profile status:
318
322
 
319
323
  ```sh
320
324
  npx -y @knowttl/mg-axi profile list
321
- npx -y @knowttl/mg-axi login --help
325
+ npx -y @knowttl/mg-axi auth login --help
322
326
  npx -y @knowttl/mg-axi setup
323
327
  npx -y @knowttl/mg-axi doctor
324
328
  npx -y @knowttl/mg-axi entra user list --help
@@ -333,19 +337,22 @@ npx -y @knowttl/mg-axi api get --help
333
337
 
334
338
  ## Setup (explicit only)
335
339
 
336
- Follow [release guidance](../../README.md#release) for npm installation and explicit skill installation; [README.md](../../README.md#mg-axi) also documents checkout builds.
340
+ Follow [installation guidance](../../README.md#quick-start) for npm installation and explicit skill installation; [README.md](../../README.md#development--testing) also documents checkout builds.
337
341
  Create profiles explicitly and keep secrets out of argv and config files:
338
342
 
339
343
  ```sh
340
344
  npx -y @knowttl/mg-axi setup # build steps, config path and capabilities; writes nothing
341
345
  npx -y @knowttl/mg-axi profile create --name soc --tenant <tenant-id> --client <client-id> --cloud commercial
342
- npx -y @knowttl/mg-axi login --profile soc --scopes https://graph.microsoft.com/User.Read.All
346
+ npx -y @knowttl/mg-axi auth login --profile soc --scopes https://graph.microsoft.com/User.Read.All
343
347
  npx -y @knowttl/mg-axi doctor # one bounded read per selected profile
344
348
  npx -y @knowttl/mg-axi entra user list --profile soc --limit 10
345
349
  ```
346
350
 
347
- Configuration defaults to `~/.mg-axi/config.json`; `MG_AXI_CONFIG` selects a separate file.
351
+ Configuration uses the XDG config directory (default `~/.config/mg-axi/config.json`), or `%APPDATA%\mg-axi\config.json` on Windows; `--config` overrides `MG_AXI_CONFIG`.
348
352
  `mg-axi setup` shows the selected path and writes nothing.
353
+ Application profiles authenticate headlessly through credential references: the profile names an env var or file and the environment supplies the value at acquisition time.
354
+ Container examples for client secrets, certificate keys and workload federation live in [README.md](../../README.md#mg-axi).
355
+ A client secret is weaker than a certificate or federated credential and needs scheduled rotation.
349
356
 
350
357
  Agent discovery has two install paths, and either suffices alone.
351
358
  For ambient context at every agent session start instead of the skill, install the CLI globally and opt into the session hook:
@@ -363,16 +370,15 @@ No other ordinary command installs hooks, plugins or configuration.
363
370
  ## Selecting a profile
364
371
 
365
372
  Read leaves accept `--profile <name>`.
366
- Selection uses `--profile` or the configured default.
367
- Without either, read leaves report `AUTH_REQUIRED`, even if only one profile exists.
368
- Doctor selection is documented in [README.md](../../README.md#release).
373
+ Profile selection order and env-profile rules live in [README Configuration](../../README.md#configuration); an explicitly selected file profile ignores env fields.
374
+ Doctor selection is documented in [README.md](../../README.md#usage).
369
375
  Without profiles, home, setup and profile list show unconfigured state; Graph read leaves report `AUTH_REQUIRED`.
370
376
 
371
377
  ## Safety
372
378
 
373
- Reads run through a session that authorizes only catalogued operations before silent credential acquisition; only explicit `login` opens a browser or prints a device-code challenge.
379
+ Reads run through a session that authorizes only catalogued operations before silent credential acquisition; only explicit `auth login` opens a browser or prints a device-code challenge.
374
380
  Writes preview before sending and need `--execute` plus a typed `--confirm` repeating the target; an already-desired value is a no-op with exit 0, never an error.
375
381
  Output is TOON on stdout; diagnostics use stderr.
376
382
  Text truncates at 500 characters (`--full` restores text, never redaction); row caps resume through opaque cursors.
377
- Secrets stay in protected storage references, never in argv, config files or output; credential fields carry expiry metadata only.
383
+ Secrets stay in credential references, never in argv, config files or output; credential fields carry expiry metadata only.
378
384
  Tests run offline with fixture credentials; never point tests at a real tenant.