@gapi/gcli 1.8.254 → 1.8.256
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 +9 -2
- package/docs/changelog.d/2026-11-01-dedicated-platform-cluster-cluster-cost-prints-amounts-in-the-platform-currency-no-usd.md +10 -0
- package/docs/changelog.d/2026-11-03-cli-browser-login-gcli-login-without-token-logs-in-through-the-browser-mcp-sta.md +31 -0
- package/docs/changelog.d/2026-11-03-dedicated-platform-cluster-cluster-autoscale-profile-servertypes-step-cluster.autoscale.md +21 -0
- package/docs/changelog.d/2026-11-03-dedicated-platform-cluster-cluster-plan-cluster-autoscale-mode-consolidation-minnodeage.md +20 -0
- package/docs/changelog.d/2026-11-03-lambda-site-url-lambda-create-update-print-url-and-site.md +15 -0
- package/docs/features/README.md +2 -0
- package/docs/features/cli-browser-login.md +13 -0
- package/docs/features/dedicated-platform-cluster.md +3 -2
- package/docs/features/lambda-site-url.md +6 -0
- package/package.json +1 -1
- package/release/index.js +820 -381
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
|
-
#
|
|
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,10 @@
|
|
|
1
|
+
## 2026-11-01 - dedicated-platform-cluster: cluster:cost prints amounts in the platform currency (no USD column)
|
|
2
|
+
|
|
3
|
+
**Feature:** dedicated-platform-cluster · **Type:** feat
|
|
4
|
+
|
|
5
|
+
- `gcli cluster:cost`: the USD column (totalCostUsd) is gone; amounts are
|
|
6
|
+
plain numbers in the platform currency (`totalCost`,
|
|
7
|
+
`estimatedMonthlyCost`), with a note.
|
|
8
|
+
- **Test:** `gcli cluster:cost --project <id>`.
|
|
9
|
+
- **Debug:** a missing column = an old gateway schema (restart it).
|
|
10
|
+
- **Verification:** tsc 0.
|
|
@@ -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,20 @@
|
|
|
1
|
+
## 2026-11-03 - dedicated-platform-cluster: cluster:plan; cluster:autoscale --mode/--consolidation/--minNodeAge; pools in YAML
|
|
2
|
+
|
|
3
|
+
**Feature:** dedicated-platform-cluster · **Type:** feat
|
|
4
|
+
|
|
5
|
+
- `gcli cluster:plan --cluster <id>` (`commands/cluster/plan.ts`): why pods
|
|
6
|
+
are pending (a verdict per pod), the nodes pods mode would create with
|
|
7
|
+
the monthly price, and the consolidation decision. Read-only, any mode.
|
|
8
|
+
- `cluster:autoscale` has three new flags:
|
|
9
|
+
- `--mode thresholds|pods`;
|
|
10
|
+
- `--consolidation` / `--no-consolidation`;
|
|
11
|
+
- `--minNodeAge <minutes>` (5-1440).
|
|
12
|
+
- `cluster.autoscale` in YAML accepts `mode`, `consolidation`,
|
|
13
|
+
`minNodeAgeMinutes` and `pools` (up to 5:
|
|
14
|
+
`{ name, serverTypes, labels, taints, maxWorkers, weight }`).
|
|
15
|
+
`cluster:apply` diffs pools as a list.
|
|
16
|
+
- **Test:** `npx jest --coverage=false test/cluster-scaling.spec.ts
|
|
17
|
+
test/cluster-apply.spec.ts`.
|
|
18
|
+
- **Debug:** "Cannot query field mode/pools" means cluster-provisioner is
|
|
19
|
+
older than this gcli.
|
|
20
|
+
- **Verification:** 141 tests passed. tsc and eslint are clean.
|
package/docs/changelog.d/2026-11-03-lambda-site-url-lambda-create-update-print-url-and-site.md
ADDED
|
@@ -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.
|
package/docs/features/README.md
CHANGED
|
@@ -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`.
|
|
@@ -13,11 +13,12 @@ commands (cluster-provisioner operations, the same ones gql-fission's
|
|
|
13
13
|
| `cluster:status [--cluster]` | `projectClustersOverview` (status, agent, nodes, load, autoscale, issues) |
|
|
14
14
|
| `cluster:health --cluster` | `clusterHealth(limit: 1)` - latest agent report + nodes |
|
|
15
15
|
| `cluster:scale-events --cluster [--limit]` | `clusterScaleEvents` |
|
|
16
|
-
| `cluster:
|
|
16
|
+
| `cluster:plan --cluster` | `clusterProvisioningPlan` - why pods are pending (verdict per pod), the nodes pods mode would create, consolidation (plan 17) |
|
|
17
|
+
| `cluster:cost` | `projectClustersOverview` (`monthToDate`, `estimatedMonthlyCost`) |
|
|
17
18
|
| `cluster:scale --workers 1-10 [--wait]` | `scaleProjectCluster` |
|
|
18
19
|
| `cluster:scale:control-planes --count 1/3/5 [--wait]` | `scaleControlPlanesProjectCluster` |
|
|
19
20
|
| `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) |
|
|
21
|
+
| `cluster:autoscale [--enable/--disable] [--mode thresholds|pods] [--consolidation/--no-consolidation] [--minNodeAge] [--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
22
|
| `cluster:load-balancer --enable/--disable [--wait]` | `enable/disableLoadBalancerProjectCluster` |
|
|
22
23
|
| `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
24
|
|
|
@@ -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'])`.
|