@tiangong-lca/cli 0.1.7 → 0.1.8

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/README.md CHANGED
@@ -31,14 +31,14 @@ checkPaths:
31
31
  - test/auth-identity*.test.ts
32
32
  - test/public-auth-identity-receipt.test.ts
33
33
  - test/lca-release*.test.ts
34
- lastReviewedAt: 2026-08-31
35
- lastReviewedCommit: 499c910d07bb6a5e2e1cd8e4403a5a617d4269bb
36
- lastReviewedNote: 'Reviewed for Issue #260: CLI 0.1.7 removes the password-equivalent API-key bootstrap and historical runner; OAuth or an explicit verified headless token is required for every user-authenticated remote command.'
34
+ lastReviewedAt: 2026-09-02
35
+ lastReviewedCommit: 3254d6167662121ca871090f6e57ff2a55578f28
36
+ lastReviewedNote: 'Reviewed for Issue #266: published CLI 0.1.8 ships zero-config official Production login and complete custom/headless boundaries through the existing verified release path.'
37
37
  ---
38
38
 
39
39
  # TianGong LCA CLI
40
40
 
41
- Package: `@tiangong-lca/cli` Executable: `tiangong-lca` Current package version: `0.1.7` Node: `24.19.0`
41
+ Package: `@tiangong-lca/cli` Executable: `tiangong-lca` Current package version: `0.1.8` Node: `24.19.0`
42
42
 
43
43
  Repository development is single-track on pnpm `11.24.0` and TypeScript `7.0.2`. The published package remains a clean, package-manager-neutral consumer artifact: it contains runtime files only, not pnpm, TypeScript, Oxlint, tests, source-only tooling, or repository lockfiles.
44
44
 
@@ -104,7 +104,8 @@ One-off published run:
104
104
 
105
105
  ```bash
106
106
  pnpm dlx @tiangong-lca/cli@latest --help
107
- pnpm dlx @tiangong-lca/cli@latest doctor
107
+ pnpm dlx @tiangong-lca/cli@latest auth login
108
+ pnpm dlx @tiangong-lca/cli@latest auth doctor-auth --json
108
109
  pnpm dlx @tiangong-lca/cli@latest flow --help
109
110
  ```
110
111
 
@@ -113,7 +114,8 @@ Install the published CLI:
113
114
  ```bash
114
115
  pnpm add --global @tiangong-lca/cli
115
116
  tiangong-lca --help
116
- tiangong-lca doctor
117
+ tiangong-lca auth login
118
+ tiangong-lca auth doctor-auth --json
117
119
  tiangong-lca flow --help
118
120
  ```
119
121
 
@@ -138,12 +140,17 @@ The packed ESM, CJS dynamic-import, and TypeScript consumers exercise every publ
138
140
 
139
141
  ## Env
140
142
 
141
- Remote commands require:
143
+ Official Production requires **no environment setup**. Run `tiangong-lca auth login` from a trusted terminal and finish authorization in your browser. The CLI bundles the public Production project URL, publishable key, CLI OAuth client ID, registered loopback callback, and region as one profile in `src/lib/env.ts`. These are application configuration, not user credentials; no client secret is used. Skills and external consumers must reuse the CLI rather than copy this profile.
144
+
145
+ Before the first login, `auth status --json` and `auth doctor-auth --json` return `login-required` (exit 1), not a missing-client configuration error. `doctor --json` reports the public profile fields as `source: "default"`; this is configuration readiness, not proof of a logged-in user.
146
+
147
+ Only Dev, self-hosted, or a custom public client needs explicit configuration. Supply the complete matching tuple from that environment's administrator:
142
148
 
143
149
  ```bash
144
- TIANGONG_LCA_API_BASE_URL=
145
- TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY=
146
- TIANGONG_LCA_OAUTH_CLIENT_ID=
150
+ TIANGONG_LCA_API_BASE_URL=https://<your-project>.supabase.co/functions/v1
151
+ TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY=<that-project-publishable-key>
152
+ TIANGONG_LCA_OAUTH_CLIENT_ID=<that-project-registered-public-client-id>
153
+ TIANGONG_LCA_OAUTH_REDIRECT_URI=http://127.0.0.1:49191/oauth/callback
147
154
  TIANGONG_LCA_REGION=us-east-1
148
155
  ```
149
156
 
@@ -151,8 +158,10 @@ Notes:
151
158
 
152
159
  - `TIANGONG_LCA_API_BASE_URL` accepts the project root, `/functions/v1`, or `/rest/v1`.
153
160
  - `TIANGONG_LCA_OAUTH_CLIENT_ID` is the environment-specific registered public CLI client; it is not a secret.
161
+ - Blank public fields and the exact official Production URL aliases use the bundled profile. Any non-Production URL, client, key, or callback disables profile completion; incomplete custom configuration fails before browser/network access. An explicit custom URL cannot be combined with the known Production key or client. Changing `--base-url` also requires a matching complete environment.
154
162
  - Run `tiangong-lca auth login` once in a trusted terminal. All Edge Function and direct Supabase commands then reuse the OAuth access token and rotate the refresh token on demand.
155
- - For approved headless execution, set `TIANGONG_LCA_AUTH_MODE=access-token` and inject one short-lived `TIANGONG_LCA_ACCESS_TOKEN`. It is verified online, kept only in process memory, and never refreshed.
163
+ - For approved headless execution, explicitly set the destination `TIANGONG_LCA_API_BASE_URL`, its `TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY`, and `TIANGONG_LCA_AUTH_MODE=access-token`, then inject one short-lived `TIANGONG_LCA_ACCESS_TOKEN`. A token alone never selects Production. It is verified online, kept only in process memory, and never refreshed.
164
+ - Bundled configuration does not enable implicit remote publishing. Local-first publish executor selection still requires explicit configured remote runtime; existing `--commit`, remote-lookup, identity, and approval gates are unchanged.
156
165
 
157
166
  Optional session control:
158
167
 
package/dist/src/cli.js CHANGED
@@ -243,7 +243,8 @@ Options:
243
243
  --json Print compact JSON; default output is pretty JSON
244
244
  -h, --help
245
245
 
246
- Required env:
246
+ Official Production requires no environment configuration. Run auth login directly.
247
+ For a custom environment, configure its complete public tuple (never mix projects):
247
248
  TIANGONG_LCA_API_BASE_URL
248
249
  TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY
249
250
  TIANGONG_LCA_OAUTH_CLIENT_ID
@@ -287,7 +288,8 @@ Safety:
287
288
  tokens, full email addresses, session paths, or credential-derived fingerprints. Production guards
288
289
  must pass both expected assertions and require assertions.mode="intent-bound".
289
290
 
290
- Required env:
291
+ Official Production uses the bundled public profile and a prior "tiangong-lca auth login".
292
+ For a custom environment, configure:
291
293
  TIANGONG_LCA_API_BASE_URL
292
294
  TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY
293
295
  TIANGONG_LCA_OAUTH_CLIENT_ID and a prior "tiangong-lca auth login"
@@ -323,7 +325,8 @@ Options:
323
325
  --timeout-ms <n> Request timeout in milliseconds
324
326
  -h, --help
325
327
 
326
- Required env:
328
+ Official Production: run "tiangong-lca auth login" with no env setup.
329
+ Custom environment (complete matching tuple required):
327
330
  TIANGONG_LCA_API_BASE_URL
328
331
  TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY
329
332
  TIANGONG_LCA_OAUTH_CLIENT_ID and a prior "tiangong-lca auth login"
@@ -345,7 +348,8 @@ Options:
345
348
  --timeout-ms <n> Request timeout in milliseconds
346
349
  -h, --help
347
350
 
348
- Required env:
351
+ Official Production: run "tiangong-lca auth login" with no env setup.
352
+ Custom environment (complete matching tuple required):
349
353
  TIANGONG_LCA_API_BASE_URL
350
354
  TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY
351
355
  TIANGONG_LCA_OAUTH_CLIENT_ID and a prior "tiangong-lca auth login"
@@ -388,7 +392,8 @@ Options:
388
392
  --timeout-ms <n> Request timeout in milliseconds (default 60000)
389
393
  -h, --help
390
394
 
391
- Required environment:
395
+ Official Production: run "tiangong-lca auth login" with no env setup.
396
+ Custom environment (complete matching tuple required):
392
397
  TIANGONG_LCA_API_BASE_URL
393
398
  TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY
394
399
  TIANGONG_LCA_OAUTH_CLIENT_ID and a prior "tiangong-lca auth login"
@@ -1049,7 +1054,7 @@ Options:
1049
1054
  -h, --help
1050
1055
 
1051
1056
  Environment:
1052
- TIANGONG_LCA_API_BASE_URL, TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY, and a configured OAuth session
1057
+ Official Production profile (no env setup), or a complete custom URL/key/client; prior auth login
1053
1058
 
1054
1059
  Outputs written under --out-dir:
1055
1060
  - outputs/remote-verification-report.json
@@ -1265,7 +1270,7 @@ Options:
1265
1270
 
1266
1271
  Environment:
1267
1272
  none for local dry-run
1268
- TIANGONG_LCA_API_BASE_URL, TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY, and a configured OAuth session
1273
+ Official Production profile (no env setup), or a complete custom URL/key/client; prior auth login
1269
1274
  when --commit executes remote writes
1270
1275
 
1271
1276
  Outputs written under --out-dir:
@@ -1379,7 +1384,8 @@ Options:
1379
1384
  --json Print compact JSON
1380
1385
  -h, --help
1381
1386
 
1382
- Required env:
1387
+ Official Production: run "tiangong-lca auth login" with no env setup.
1388
+ Custom environment (complete matching tuple required):
1383
1389
  TIANGONG_LCA_API_BASE_URL
1384
1390
  TIANGONG_LCA_OAUTH_CLIENT_ID and a prior "tiangong-lca auth login"
1385
1391
  TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY
@@ -1407,7 +1413,8 @@ Options:
1407
1413
  --json Print compact JSON
1408
1414
  -h, --help
1409
1415
 
1410
- Required env:
1416
+ Official Production: run "tiangong-lca auth login" with no env setup.
1417
+ Custom environment (complete matching tuple required):
1411
1418
  TIANGONG_LCA_API_BASE_URL
1412
1419
  TIANGONG_LCA_OAUTH_CLIENT_ID and a prior "tiangong-lca auth login"
1413
1420
  TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY
@@ -1448,7 +1455,8 @@ Options:
1448
1455
  --json Print compact JSON
1449
1456
  -h, --help
1450
1457
 
1451
- Required env:
1458
+ Official Production: run "tiangong-lca auth login" with no env setup.
1459
+ Custom environment (complete matching tuple required):
1452
1460
  TIANGONG_LCA_API_BASE_URL
1453
1461
  TIANGONG_LCA_OAUTH_CLIENT_ID and a prior "tiangong-lca auth login"
1454
1462
  TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY
@@ -1495,7 +1503,8 @@ Options:
1495
1503
  --json Print compact JSON
1496
1504
  -h, --help
1497
1505
 
1498
- Environment:
1506
+ Official Production: run "tiangong-lca auth login" with no env setup.
1507
+ Custom environment (complete matching tuple required):
1499
1508
  TIANGONG_LCA_API_BASE_URL
1500
1509
  TIANGONG_LCA_OAUTH_CLIENT_ID and a prior "tiangong-lca auth login"
1501
1510
  TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY
@@ -1527,7 +1536,7 @@ Options:
1527
1536
 
1528
1537
  Environment:
1529
1538
  none for local dry-run
1530
- TIANGONG_LCA_API_BASE_URL, TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY, and a configured OAuth session
1539
+ Official Production profile (no env setup), or a complete custom URL/key/client; prior auth login
1531
1540
  when --commit publishes prepared rows
1532
1541
 
1533
1542
  Outputs written under --out-dir:
@@ -1761,6 +1770,8 @@ Options:
1761
1770
  -h, --help
1762
1771
 
1763
1772
  Remote lookup env (only when process_sources.allow_remote_lookup=true):
1773
+ Official Production uses its bundled profile and a prior "tiangong-lca auth login".
1774
+ A custom environment requires the complete matching tuple:
1764
1775
  TIANGONG_LCA_API_BASE_URL
1765
1776
  TIANGONG_LCA_OAUTH_CLIENT_ID and a prior "tiangong-lca auth login"
1766
1777
  TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY
@@ -1792,7 +1803,7 @@ Options:
1792
1803
 
1793
1804
  Environment:
1794
1805
  none for local dry-run
1795
- TIANGONG_LCA_API_BASE_URL, TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY, and a configured OAuth session
1806
+ Official Production profile (no env setup), or a complete custom URL/key/client; prior auth login
1796
1807
  when --commit executes remote writes
1797
1808
 
1798
1809
  Local gate:
@@ -1956,7 +1967,8 @@ Options:
1956
1967
  --json Print compact JSON
1957
1968
  -h, --help
1958
1969
 
1959
- Required env:
1970
+ Official Production: run "tiangong-lca auth login" with no env setup.
1971
+ Custom environment (complete matching tuple required):
1960
1972
  TIANGONG_LCA_API_BASE_URL
1961
1973
  TIANGONG_LCA_OAUTH_CLIENT_ID and a prior "tiangong-lca auth login"
1962
1974
  TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY
@@ -1983,7 +1995,8 @@ Options:
1983
1995
  --json Print compact JSON
1984
1996
  -h, --help
1985
1997
 
1986
- Required env:
1998
+ Official Production: run "tiangong-lca auth login" with no env setup.
1999
+ Custom environment (complete matching tuple required):
1987
2000
  TIANGONG_LCA_API_BASE_URL
1988
2001
  TIANGONG_LCA_OAUTH_CLIENT_ID and a prior "tiangong-lca auth login"
1989
2002
  TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY
@@ -2135,7 +2148,7 @@ Options:
2135
2148
 
2136
2149
  Environment:
2137
2150
  none for local dry-run
2138
- TIANGONG_LCA_API_BASE_URL, TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY, and a configured OAuth session
2151
+ Official Production profile (no env setup), or a complete custom URL/key/client; prior auth login
2139
2152
  when --commit executes remote writes
2140
2153
 
2141
2154
  Local gate:
@@ -2189,7 +2202,8 @@ Options:
2189
2202
  --json Print compact JSON
2190
2203
  -h, --help
2191
2204
 
2192
- Required env:
2205
+ Official Production: run "tiangong-lca auth login" with no env setup.
2206
+ Custom environment (complete matching tuple required):
2193
2207
  TIANGONG_LCA_API_BASE_URL
2194
2208
  TIANGONG_LCA_OAUTH_CLIENT_ID and a prior "tiangong-lca auth login"
2195
2209
  TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY