@gapi/gcli 1.8.254 → 1.8.255

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
@@ -66,13 +66,20 @@ A token can also be limited to some lambdas (lambda, schedule and queue-trigger
66
66
  Before interacting with the platform, you must authenticate. You can log in using an API key or a personal access token.
67
67
 
68
68
  ```bash
69
- # Interactive Login
69
+ # Through the browser: prints a link + code, opens the browser and waits
70
70
  gcli login
71
+ gcli login --no-browser # headless: only print the link, open it on any device
71
72
 
72
- # Login with specific credentials
73
+ # Login with specific credentials (the command from Profile -> CLI Settings)
73
74
  gcli login --token 'YOUR_GRAPHQL_TOKEN' --key 'YOUR_API_KEY' --url 'API_URL'
74
75
  ```
75
76
 
77
+ The browser login is approved on lambforge.com: when you are not signed in,
78
+ the sign-in dialog opens and the terminal continues as soon as you are. The
79
+ token is created on the server and handed to this terminal once.
80
+ `gcli mcp:start` without a login serves a single `LambforgeLogin` tool that
81
+ gives your AI agent the link to show you.
82
+
76
83
  ## Managing Infrastructure
77
84
 
78
85
  `gcli` organizes resources into **Projects** and **Environments**.
@@ -0,0 +1,31 @@
1
+ ## 2026-11-03 - cli-browser-login: gcli login without --token logs in through the browser; mcp:start offers LambforgeLogin
2
+
3
+ **Feature:** cli-browser-login · **Type:** feat
4
+
5
+ - `gcli login` with no `--token` (`src/commands/auth/browser-login.ts`):
6
+ 1. calls `startCliLogin` on the gateway without auth;
7
+ 2. prints the link and code, opens the browser (child_process: `xdg-open`
8
+ / `open` / `cmd start`; `--no-browser` skips it);
9
+ 3. polls `pollCliLogin` every 2 s; a network blip keeps waiting;
10
+ 4. passes the returned token and key to the existing `loginWithToken`
11
+ path.
12
+ No new dependencies. `--token` without `--key` now explains itself.
13
+ - `gcli mcp:start` with no `~/.graphql-server/token`
14
+ (`src/commands/proxy/login-gate.ts`) serves only the `LambforgeLogin`
15
+ tool:
16
+ - the first call returns the link and code and waits in the background;
17
+ - the next call reports "still waiting", or "logged in, reconnect".
18
+ Nothing goes to stdout (it is the MCP channel); `loginWithToken` has a
19
+ `silent` flag.
20
+ - Without `--url` the gate uses `https://api.lambforge.com`. With
21
+ `--url <gateway>/mcp` it strips the `/mcp`.
22
+ - **Test:** `npx jest --coverage=false test/browser-login.spec.ts`:
23
+ - link and code printed, the browser opened once;
24
+ - the session id is never printed;
25
+ - no Authorization header is sent;
26
+ - a network blip, deny, expiry, and `--no-browser`.
27
+ - **Debug:** the canonical doc is graphql-server
28
+ `docs/features/cli-browser-login.md`. gcli waiting forever means the page
29
+ never approved (browser console). The gate logs to stderr.
30
+ - **Verification:** `npx jest --coverage=false`: 136 passed. `tsc --noEmit`
31
+ and eslint are clean. Not run against a live API yet.
@@ -0,0 +1,21 @@
1
+ ## 2026-11-03 - dedicated-platform-cluster: cluster:autoscale --profile, --serverTypes, --step; cluster.autoscale YAML keys
2
+
3
+ **Feature:** dedicated-platform-cluster · **Type:** feat
4
+
5
+ - `gcli cluster:autoscale` has three new flags:
6
+ - `--profile conservative|balanced|aggressive|custom`;
7
+ - `--serverTypes cx33,cpx22`: comma-separated, lowercased; `""` or
8
+ `none` clears the list;
9
+ - `--step 1-3`.
10
+ The result table shows the profile, worker types and step.
11
+ - `cluster.autoscale` in YAML accepts `scalingProfile`, `serverTypes` (a
12
+ list of at most 10) and `scaleUpStep`. `cluster:apply` compares lists by
13
+ value, so an unchanged list does not show up as a change.
14
+ - The fragment now asks for the new fields, so it needs a
15
+ cluster-provisioner that has them.
16
+ - **Test:** `npx jest --coverage=false test/cluster-scaling.spec.ts
17
+ test/cluster-apply.spec.ts`.
18
+ - **Debug:** "Cannot query field scalingProfile" means the API is older
19
+ than this gcli: deploy cluster-provisioner first.
20
+ - **Verification:** 28 tests in those specs, 136 overall, all passed. tsc
21
+ and eslint are clean.
@@ -0,0 +1,15 @@
1
+ ## 2026-11-03 - lambda-site-url: lambda:create/update print URL and Site
2
+
3
+ **Feature:** lambda-site-url · **Type:** feat
4
+
5
+ - After the result JSON, `lambda:create` and `lambda:update` print
6
+ `URL: <url>` and, for a public shared-cluster lambda,
7
+ `Site: https://<projectId>-<route>.lambforge.com`
8
+ (`printAddresses` in `src/commands/lambda/helpers/index.ts`).
9
+ - `siteUrl` is read with a separate, best-effort `getLambda`, so gcli still
10
+ works against an API without the field.
11
+ - **Test:** `gcli lambda:update` on a static lambda prints both lines.
12
+ - **Debug:** no `Site:` line on a public lambda means the API lacks
13
+ `siteUrl` (graphql-server-lambdas older than 2026-11-03), or the lambda
14
+ is on a private cluster.
15
+ - **Verification:** 136 tests passed. tsc and eslint are clean.
@@ -39,3 +39,5 @@ Outline (drop sections that don't apply):
39
39
  | `virtual-clusters` | [virtual-clusters.md](virtual-clusters.md) | cluster:create --virtual, provider: vcluster (slice; canonical in graphql-server-functions) |
40
40
  | `self-managed-nodes` | [self-managed-nodes.md](self-managed-nodes.md) | `cluster:attach/nodes/detach` - your own machine as a Talos worker (slice; canonical in graphql-server-functions) |
41
41
  | `mcp-proxy` | [mcp-proxy.md](mcp-proxy.md) | `gcli mcp:start` - local stdio MCP server forwarding to the platform MCP endpoint; token refreshed per request |
42
+ | `cli-browser-login` | [cli-browser-login.md](cli-browser-login.md) | Slice (canonical: graphql-server): `gcli login` with no token through the browser; `mcp:start` LambforgeLogin |
43
+ | `lambda-site-url` | [lambda-site-url.md](lambda-site-url.md) | Slice (canonical: graphql-server-lambdas): `Site:` line after create/update |
@@ -0,0 +1,13 @@
1
+ # cli-browser-login - gcli slice
2
+
3
+ Canonical doc: graphql-server `docs/features/cli-browser-login.md`.
4
+
5
+ - `src/commands/auth/browser-login.ts`: start, poll and wait over
6
+ unauthenticated gateway calls (node-fetch), and opening the browser
7
+ (child_process).
8
+ - `src/commands/auth/login.ts`: no `--token` runs the browser flow;
9
+ `loginWithToken` is the shared path that writes `~/.graphql-server/`
10
+ (`silent` for MCP).
11
+ - `src/commands/proxy/login-gate.ts`: `mcp:start` before login serves only
12
+ `LambforgeLogin`.
13
+ - Tests: `test/browser-login.spec.ts`.
@@ -17,7 +17,7 @@ commands (cluster-provisioner operations, the same ones gql-fission's
17
17
  | `cluster:scale --workers 1-10 [--wait]` | `scaleProjectCluster` |
18
18
  | `cluster:scale:control-planes --count 1/3/5 [--wait]` | `scaleControlPlanesProjectCluster` |
19
19
  | `cluster:multi-node --workers [--wait]` / `cluster:single-node [--wait]` | `migrateToMultiNodeProjectCluster` / `revertToSingleNodeProjectCluster` |
20
- | `cluster:autoscale [--enable/--disable] [--min --max --cpuUp --memUp --cpuDown --memDown --samples --cooldown]` | `updateProjectClusterAutoscale` - partial: the server merges it into the stored policy and validates (min <= max, scale-down below scale-up, single-node cannot autoscale) |
20
+ | `cluster:autoscale [--enable/--disable] [--profile] [--serverTypes a,b] [--step] [--min --max --cpuUp --memUp --cpuDown --memDown --samples --cooldown]` | `updateProjectClusterAutoscale` - partial: the server merges it into the stored policy and validates (min <= max, scale-down below scale-up, single-node cannot autoscale, server types allowed by the plan and of the cluster's CPU architecture). A preset profile overrides the thresholds |
21
21
  | `cluster:load-balancer --enable/--disable [--wait]` | `enable/disableLoadBalancerProjectCluster` |
22
22
  | `cluster:apply [--spec] [--dry-run] [--yes]` | reconciles the `cluster:` section of lambforge.yaml: `projectClusters` (current) → plan → provision / topology / scale / control planes / load balancer / autoscale, one job at a time, waiting for `ready` between them |
23
23
 
@@ -0,0 +1,6 @@
1
+ # lambda-site-url - gcli slice
2
+
3
+ Canonical doc: graphql-server-lambdas `docs/features/lambda-site-url.md`.
4
+ `lambda:create` / `lambda:update` print `URL:` and `Site:` through
5
+ `printAddresses` (`src/commands/lambda/helpers/index.ts`), with a
6
+ best-effort `getLambda(id, ['siteUrl'])`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gapi/gcli",
3
- "version": "1.8.254",
3
+ "version": "1.8.255",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/Stradivario/gapi.git"