@gapi/gcli 1.8.246 → 1.8.248

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.md CHANGED
@@ -92,6 +92,10 @@ This repo is documentation-driven. With every change:
92
92
  3. **Skills / AGENTS.md** - learned something non-obvious, or a workflow
93
93
  bit you? Update the owning skill (`.agents/skills/<name>/SKILL.md`) or
94
94
  this file in the same change.
95
+ 4. **User docs + What's new** - a change users can see or do also updates
96
+ gql-fission's public docs page (`gql-fission/src/docs/<slug>.md`) and adds a
97
+ line to `gql-fission/src/app/changelog/releases.ts`. Skill:
98
+ `user-docs-and-changelog` in gql-fission.
95
99
 
96
100
  Before working on an existing feature: `node scripts/changelog.mjs render
97
101
  --feature <slug>` + its feature doc. That is where "how to test" and "how
package/README-CLI.md CHANGED
@@ -79,6 +79,9 @@ Commands:
79
79
  workflow:runs [options] List a workflow runs, newest first
80
80
  workflow:status [options] Show a run: its step events, error and output (--follow until it ends)
81
81
  workflow:cancel [options] Cancel a running run
82
+ workflow:trigger:add [options] Start runs from an HTTP URL (--http; the JSON body is the input) or a schedule (--cron). Needs Fission 1.26+ on the cluster
83
+ workflow:trigger:list [options] List a workflow HTTP and schedule triggers
84
+ workflow:trigger:remove [options] Remove a workflow trigger
82
85
  help [command] display help for command
83
86
  
84
87
  --- Subcommand: login ---
@@ -1134,3 +1137,43 @@ Options:
1134
1137
  -n, --name <name> Workflow name
1135
1138
  -r, --run <run> Run name (see workflow:runs)
1136
1139
  -h, --help display help for command
1140
+ 
1141
+ --- Subcommand: workflow:trigger:add ---
1142
+ Usage: gcli workflow:trigger:add [options]
1143
+
1144
+ Start runs from an HTTP URL (--http; the JSON body is the input) or a schedule (--cron). Needs Fission 1.26+ on the cluster
1145
+
1146
+ Options:
1147
+ -p, --project <project>
1148
+ -n, --name <name> Workflow name
1149
+ --http An HTTP trigger: <router>/<project>/workflows/<path>
1150
+ --path <path> HTTP path under /workflows/ (default: the workflow
1151
+ name)
1152
+ --method <methods> HTTP methods, comma separated (default POST)
1153
+ --cron <schedule> A schedule: "@every 1h", "0 9 * * 1-5", "@daily"
1154
+ (UTC)
1155
+ -i, --input <json> Schedule: the input of every run (default {})
1156
+ --input-file <file> Schedule: read the run input from a JSON file
1157
+ -h, --help display help for command
1158
+ 
1159
+ --- Subcommand: workflow:trigger:list ---
1160
+ Usage: gcli workflow:trigger:list [options]
1161
+
1162
+ List a workflow HTTP and schedule triggers
1163
+
1164
+ Options:
1165
+ -p, --project <project>
1166
+ -n, --name <name> Workflow name
1167
+ -h, --help display help for command
1168
+ 
1169
+ --- Subcommand: workflow:trigger:remove ---
1170
+ Usage: gcli workflow:trigger:remove [options]
1171
+
1172
+ Remove a workflow trigger
1173
+
1174
+ Options:
1175
+ -p, --project <project>
1176
+ -n, --name <name> Workflow name
1177
+ -t, --trigger <trigger> Trigger id, path or schedule (see
1178
+ workflow:trigger:list)
1179
+ -h, --help display help for command
package/README.md CHANGED
@@ -211,6 +211,27 @@ Steps that remove capacity or release the load balancer's IP (going back to
211
211
  `singleNode: true`, `loadBalancer: false`) are skipped unless you pass
212
212
  `--yes`. Nodes and the load balancer are billed per started hour.
213
213
 
214
+ #### Virtual clusters
215
+
216
+ A virtual cluster has its own Kubernetes API and Fission but no servers: it
217
+ runs in one namespace of the shared Lambforge cluster, or of one of your
218
+ private clusters, and is ready in about two minutes. Everything else
219
+ (environments, lambdas, `--clusterName`, `cluster:kubeconfig`,
220
+ `cluster:teardown`) works the same as for a private cluster; scaling and
221
+ load balancer commands don't apply.
222
+
223
+ ```bash
224
+ gcli cluster:create --virtual --name dev # on the shared cluster
225
+ gcli cluster:create --virtual --name stage --host prod # on your private cluster "prod"
226
+ ```
227
+
228
+ ```yaml
229
+ cluster:
230
+ name: dev
231
+ provider: vcluster
232
+ host: prod # optional - omitted = the shared cluster
233
+ ```
234
+
214
235
  ### RabbitMQ Brokers
215
236
 
216
237
  A project may have several RabbitMQ brokers, each optionally scoped to one of its private clusters.
@@ -788,6 +809,24 @@ gcli workflow:validate -f order-flow.yaml
788
809
  gcli workflow:delete --name order-flow # also deletes its runs
789
810
  ```
790
811
 
812
+ **Triggers** start runs without anyone calling `workflow:run` (Fission 1.26+
813
+ on the workflow's cluster creates the run itself):
814
+
815
+ ```bash
816
+ # An HTTP URL: every request starts a run, the JSON body is the run input,
817
+ # the answer is 202 {"run": "..."}; default path = the workflow name, POST
818
+ gcli workflow:trigger:add --name order-flow --http --path orders --method POST
819
+ curl -X POST 'https://functions.lambforge.com/<projectId>/workflows/orders' -d '{"orderId": 42}'
820
+
821
+ # A schedule (UTC) with a fixed run input
822
+ gcli workflow:trigger:add --name nightly-report --cron "0 6 * * *" --input '{"scope": "all"}'
823
+
824
+ gcli workflow:trigger:list --name order-flow
825
+ gcli workflow:trigger:remove --name order-flow --trigger orders # id, path or schedule
826
+ ```
827
+
828
+ `workflow:runs` shows how each run started (`manual`, `http`, `schedule`).
829
+
791
830
  The file `workflow:get` / `workflow:generate` write (and `workflow:apply`
792
831
  reads) - a Fission `kind: Workflow` manifest or a bare `startAt` + `states`
793
832
  works too:
@@ -0,0 +1,23 @@
1
+ ## 2026-10-26 - workflows: workflow:trigger commands for HTTP and schedule triggers
2
+
3
+ **Feature:** workflows · **Type:** feat
4
+
5
+ - `workflow:trigger:add` (`--http [--path] [--method]` or `--cron
6
+ "<schedule>" [-i | --input-file]`), `workflow:trigger:list`,
7
+ `workflow:trigger:remove -t <id | path | schedule | Fission name>`
8
+ (`src/commands/workflow/trigger-*.ts`), on the graphql-server-lambdas
9
+ `addWorkflowTrigger` / `removeWorkflowTrigger` (Fission 1.26+ fork
10
+ `workflow-triggers` creates the runs).
11
+ - Option handling and output are pure (`triggers.ts`: `buildTriggerInput`,
12
+ `findTrigger`, `triggerRow`, `runSource`); `workflow:runs` gained a `by`
13
+ column (manual / http / schedule). `WorkflowFragment.triggers`,
14
+ `WorkflowRunFragment.triggerKind / triggerName`; client calls in
15
+ `gql-client.ts`.
16
+ - README Workflows section + regenerated `README-CLI.md`.
17
+ - **Test:** `npx jest --coverage=false test/workflow.spec.ts` (11 pass, 5 new).
18
+ - **Debug:** `Workflow triggers need Fission 1.26 or newer on this cluster`
19
+ is the backend saying the cluster is too old; `Pass either --http or
20
+ --cron` is the option check.
21
+ - **Verification:** gcli jest 114/114; tsc + eslint clean; the new
22
+ mutations and fragments validated against the local gateway schema;
23
+ not run against production (gcli login points at production).
@@ -0,0 +1,18 @@
1
+ ## 2026-10-27 - virtual-clusters: cluster:create --virtual and provider vcluster in cluster:apply
2
+
3
+ **Feature:** virtual-clusters · **Type:** feat
4
+
5
+ - `cluster:create --virtual [--host <private-cluster-name>]` and, in the
6
+ `cluster:` section, `provider: vcluster` + `host:` (both read by
7
+ `cluster:create` and `cluster:apply`). The host is resolved by name
8
+ (`helpers/virtual-cluster.ts`); no host = the shared cluster.
9
+ `cluster:apply` only creates a virtual cluster - nothing else to reconcile;
10
+ `validateDesired` rejects node settings on it and `host` without it.
11
+ - `GraphqlClienAPI.provisionProjectVirtualCluster` selects `routerUrl` and
12
+ `hostNamespace` itself (not in `ClusterFragment`, so older servers keep
13
+ working). Canonical doc: `graphql-server-functions/docs/features/virtual-clusters.md`.
14
+ - **Test:** `npx jest --coverage=false test/cluster-apply`.
15
+ - **Debug:** `No cluster named "<host>"` = the host name is not a live
16
+ cluster of the project (`gcli cluster:list`).
17
+ - **Verification:** jest 118/118 (4 new), tsc + eslint clean. README-CLI.md
18
+ not regenerated (needs a build of release/index.js).
@@ -36,3 +36,4 @@ Outline (drop sections that don't apply):
36
36
  | `dedicated-platform-cluster` | [dedicated-platform-cluster.md](dedicated-platform-cluster.md) | `cluster:status/health/scale/autoscale/...` commands; canonical doc in lambforge-agent |
37
37
  | `ci-token-scopes` | [ci-token-scopes.md](ci-token-scopes.md) | Which permission each command needs; `mq-trigger:*` commands; canonical doc in graphql-server |
38
38
  | `workflows` | [workflows.md](workflows.md) | `workflow:*` commands incl. AI drafts (`workflow:generate`); canonical doc in graphql-server-lambdas |
39
+ | `virtual-clusters` | [virtual-clusters.md](virtual-clusters.md) | cluster:create --virtual, provider: vcluster (slice; canonical in graphql-server-functions) |
@@ -0,0 +1,12 @@
1
+ # Virtual clusters (slice)
2
+
3
+ **Status:** built and tested end to end on minikube 2026-10-28, not deployed. Feature slug `virtual-clusters`.
4
+ Canonical doc (how it works, test, debug, limits):
5
+ [`graphql-server-functions/docs/features/virtual-clusters.md`](../../../../../graphql-server-functions/docs/features/virtual-clusters.md).
6
+
7
+ Virtual clusters are vClusters (own Kubernetes API + Fission) on the shared
8
+ cluster or one of the project's private clusters, `provider: 'vcluster'`.
9
+
10
+ ## This repo
11
+
12
+ `gcli cluster:create --virtual [--host <private-cluster>]`; in `lambforge.yaml`: `cluster: { name: dev, provider: vcluster, host: prod }` for `cluster:create` / `cluster:apply` (no host = shared cluster; node settings are rejected). Code: `src/commands/cluster/helpers/virtual-cluster.ts`, `helpers/plan.ts`. Test: `npx jest --coverage=false test/cluster-apply`.
@@ -17,9 +17,19 @@ the id with `listWorkflows`):
17
17
  | `workflow:validate -f file` | `validateWorkflow` (graph + lambdas on the cluster) |
18
18
  | `workflow:delete -n` | `deleteWorkflow` (runs too) |
19
19
  | `workflow:run -n [-i json \| --input-file] [--wait]` | `startWorkflowRun`; `--wait` polls `getWorkflowRun` every 2 s and prints each new event until the run is terminal |
20
- | `workflow:runs -n [-l]` | `listWorkflowRuns` |
20
+ | `workflow:runs -n [-l]` | `listWorkflowRuns` (column `by`: manual / http / schedule, from `triggerKind`) |
21
21
  | `workflow:status -n -r run [--follow]` | `getWorkflowRun` (events, error, output) |
22
22
  | `workflow:cancel -n -r run` | `cancelWorkflowRun` |
23
+ | `workflow:trigger:add -n (--http [--path] [--method a,b] \| --cron "<schedule>" [-i json \| --input-file])` | `addWorkflowTrigger`; prints the trigger and, for HTTP, a `curl` line |
24
+ | `workflow:trigger:list -n` | the workflow's `triggers` (id, kind, URL or schedule, input) |
25
+ | `workflow:trigger:remove -n -t <id \| path \| schedule \| Fission name>` | `removeWorkflowTrigger` |
26
+
27
+ Triggers (2026-10-26) are HTTP URLs (`<router>/<projectId>/workflows/<path>`,
28
+ the JSON body is the run input, 202 `{run}`) and schedules (cron, UTC, with a
29
+ fixed input) that start runs. Fission 1.26+ (fork `workflow-triggers`) on the
30
+ workflow's cluster creates the run. The option handling is pure and tested:
31
+ `src/commands/workflow/triggers.ts` (`buildTriggerInput`, `findTrigger`,
32
+ `triggerRow`, `runSource`).
23
33
 
24
34
  The workflow file (`definition.ts` `parseWorkflowFile`) accepts
25
35
  `workflow: {name, description, clusterId, definition}`, the same without the
@@ -37,7 +47,9 @@ USER-only in graphql-server-lambdas, so these commands need `gcli login`.
37
47
  `npx jest --coverage=false test/workflow.spec.ts`. Real: log in to a
38
48
  gateway whose project has `allowWorkflows`, then
39
49
  `gcli workflow:generate -d "..." -n demo --apply` and
40
- `gcli workflow:run -n demo --wait`.
50
+ `gcli workflow:run -n demo --wait`; triggers:
51
+ `gcli workflow:trigger:add -n demo --http`, then `curl -X POST <url> -d '{}'`
52
+ and `gcli workflow:runs -n demo` shows the run `by` http.
41
53
 
42
54
  ## How to debug
43
55
 
@@ -47,3 +59,6 @@ gateway whose project has `allowWorkflows`, then
47
59
  `allowWorkflows`.
48
60
  - `Workflows are not enabled on this cluster`: the cluster runs Fission
49
61
  without `workflows.enabled` (canonical doc, Requires).
62
+ - `Workflow triggers need Fission 1.26 or newer on this cluster`: the
63
+ cluster's Fission CRDs predate workflow triggers.
64
+ - `Pass either --http or --cron`: exactly one of them.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gapi/gcli",
3
- "version": "1.8.246",
3
+ "version": "1.8.248",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/Stradivario/gapi.git"