@gapi/gcli 1.8.240 → 1.8.242
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/.agents/skills/cluster-targeting/SKILL.md +23 -0
- package/README-CLI.md +220 -0
- package/README.md +157 -11
- package/docs/changelog.d/2026-10-19-ci-token-scopes-mq-trigger-list-create-update-delete-commands-readme-documen.md +21 -0
- package/docs/changelog.d/2026-10-19-dedicated-platform-cluster-cluster-scaling-topology-load-balancer-and-health-commands-c.md +31 -0
- package/docs/changelog.d/2026-10-19-lambforge-agent-skill-readme-points-to-the-lambforge-agent-skill-gcli-mcp-start-fo.md +17 -0
- package/docs/changelog.d/2026-10-19-repo-cron-create-honours-cron-triggername-readme-brought-up-to-da.md +21 -0
- package/docs/features/README.md +3 -0
- package/docs/features/ci-token-scopes.md +25 -0
- package/docs/features/dedicated-platform-cluster.md +70 -0
- package/docs/features/lambforge-agent-skill.md +22 -0
- package/package.json +1 -1
- package/release/index.js +2187 -793
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# dedicated-platform-cluster (gcli slice)
|
|
2
|
+
|
|
3
|
+
**Canonical doc:** `lambforge-agent/docs/features/dedicated-platform-cluster.md`
|
|
4
|
+
· **Since:** 2026-10-19 (cluster scaling and health commands)
|
|
5
|
+
|
|
6
|
+
The cluster page's scaling, topology, load balancer and health actions as
|
|
7
|
+
commands (cluster-provisioner operations, the same ones gql-fission's
|
|
8
|
+
`core/services/cluster/*.graphql` use; every one is USER-enabled with
|
|
9
|
+
`isMemberOrProjectOwner`):
|
|
10
|
+
|
|
11
|
+
| Command | Operation |
|
|
12
|
+
|---|---|
|
|
13
|
+
| `cluster:status [--cluster]` | `projectClustersOverview` (status, agent, nodes, load, autoscale, issues) |
|
|
14
|
+
| `cluster:health --cluster` | `clusterHealth(limit: 1)` - latest agent report + nodes |
|
|
15
|
+
| `cluster:scale-events --cluster [--limit]` | `clusterScaleEvents` |
|
|
16
|
+
| `cluster:cost` | `projectClustersOverview` (`monthToDate`, `estimatedMonthlyCostEur`) |
|
|
17
|
+
| `cluster:scale --workers 1-10 [--wait]` | `scaleProjectCluster` |
|
|
18
|
+
| `cluster:scale:control-planes --count 1/3/5 [--wait]` | `scaleControlPlanesProjectCluster` |
|
|
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) |
|
|
21
|
+
| `cluster:load-balancer --enable/--disable [--wait]` | `enable/disableLoadBalancerProjectCluster` |
|
|
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
|
+
|
|
24
|
+
## Declarative clusters (`cluster:apply`)
|
|
25
|
+
|
|
26
|
+
`cluster:` keys: `name` (identity), `imageId` / `serverType` / `location`
|
|
27
|
+
(create only), `singleNode`, `workers` (1-10), `controlPlanes` (1/3/5),
|
|
28
|
+
`loadBalancer`, `autoscale.{enabled,minWorkers,maxWorkers,cpuScaleUpPercent,
|
|
29
|
+
memScaleUpPercent,cpuScaleDownPercent,memScaleDownPercent,samplesToScale,
|
|
30
|
+
cooldownMinutes}`. Missing keys are left alone.
|
|
31
|
+
|
|
32
|
+
- `helpers/plan.ts` `planClusterChanges(current, desired)` is pure (unit
|
|
33
|
+
tested): create in the desired shape (workers, control planes, load
|
|
34
|
+
balancer at provision time) then autoscale; otherwise topology → workers
|
|
35
|
+
→ control planes → load balancer → autoscale (only the changed keys).
|
|
36
|
+
- `workers` is skipped while `autoscale.enabled` (the autoscaler owns it);
|
|
37
|
+
converting to multi-node already creates the workers.
|
|
38
|
+
- Destructive steps (to single-node, removing the load balancer) need
|
|
39
|
+
`--yes`; without it they are printed and skipped.
|
|
40
|
+
- `validateDesired` mirrors the server's bounds; a cluster that is not
|
|
41
|
+
`ready` is refused (apply again once it settles).
|
|
42
|
+
|
|
43
|
+
## Files
|
|
44
|
+
|
|
45
|
+
| Path | Responsibility |
|
|
46
|
+
|---|---|
|
|
47
|
+
| `src/commands/cluster/index.ts` | registration (`--cluster` / `--clusterName` on every one) |
|
|
48
|
+
| `src/commands/cluster/{status,health,scale-events,cost,scale,scale-control-planes,autoscale,multi-node,single-node,load-balancer}.ts` | actions |
|
|
49
|
+
| `src/commands/cluster/helpers/cluster-change.ts` | target resolution, int validation, mutate → print → `--wait` (`pollUntilReady`; ends in `error` → non-zero exit) |
|
|
50
|
+
| `src/commands/cluster/types.ts` | local types + selections (newer than `@introspection`) |
|
|
51
|
+
| `src/services/gql-client.ts` | the API calls |
|
|
52
|
+
|
|
53
|
+
## How to test
|
|
54
|
+
|
|
55
|
+
`npx jest --coverage=false test/cluster-scaling.spec.ts`; manually against a
|
|
56
|
+
project with a private cluster: `gcli cluster:status`, then
|
|
57
|
+
`gcli cluster:scale --clusterName <n> --workers 2 --wait`.
|
|
58
|
+
|
|
59
|
+
## How to debug
|
|
60
|
+
|
|
61
|
+
| Symptom | Look at |
|
|
62
|
+
|---|---|
|
|
63
|
+
| "Pass --cluster <id> or --clusterName" | no cluster given; `gcli cluster:list` |
|
|
64
|
+
| autoscale refused | the server's message: single-node clusters must `cluster:multi-node` first; external clusters cannot autoscale |
|
|
65
|
+
| `--wait` ends in error | `gcli cluster:list` (status + error), the dashboard's cluster page |
|
|
66
|
+
|
|
67
|
+
## Not in the CLI yet
|
|
68
|
+
|
|
69
|
+
Resource migration between clusters (`migrateResourcesToCluster` + status /
|
|
70
|
+
retry), Fission options, the cluster agent install/rotate - dashboard only.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# lambforge-agent-skill (gcli slice)
|
|
2
|
+
|
|
3
|
+
**Canonical doc:** `gql-fission/docs/features/lambforge-agent-skill.md` ·
|
|
4
|
+
**Since:** 2026-10-19
|
|
5
|
+
|
|
6
|
+
The Lambforge agent skill (entry https://lambforge.com/skills/platform.md,
|
|
7
|
+
topic files next to it; source in gql-fission `src/skills/`) teaches AI
|
|
8
|
+
agents to drive this CLI. `cli.md` lists every command, and `platform.md`,
|
|
9
|
+
`deploy.md`, `events.md`, `clusters.md` and `agents.md` quote gcli exactly:
|
|
10
|
+
|
|
11
|
+
- install: `npm i -g @gapi/gcli` (or `npx @gapi/gcli`);
|
|
12
|
+
- login: the command from Profile -> CLI (`login --token --key --url
|
|
13
|
+
--uploadUrl`), run by the human;
|
|
14
|
+
- `project:list` / `project:use`;
|
|
15
|
+
- `mcp:start` without `--url` (proxy to `<login url>/mcp`, token refresh on
|
|
16
|
+
401/403) as the MCP server: `claude mcp add --scope user lambforge -- gcli mcp:start`;
|
|
17
|
+
- the `lambda:*`, `environment:*`, `cron:*`, `cluster:*`, `rabbitmq:*`,
|
|
18
|
+
`plugin:*`, `build`, `start` commands and flags it lists.
|
|
19
|
+
|
|
20
|
+
**When you change any of those commands, flags or `mcp:start`, update
|
|
21
|
+
the skill files in gql-fission in the same change** - agents copy it verbatim.
|
|
22
|
+
README.md "AI agent skill" points users to it.
|