@klok-integration/cli 0.7.269 → 0.7.281
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/assets/agents/AGENTS.datamodel.md +3 -1
- package/assets/agents/AGENTS.documentation.md +2 -2
- package/assets/agents/knowledge/platform-rules.md +5 -3
- package/assets/agents/skills/klok-cli/reference.md +9 -2
- package/assets/agents/skills/klok-datamodel/SKILL.md +9 -1
- package/assets/agents/skills/klok-release/SKILL.md +5 -0
- package/dist/cli.js +7 -7
- package/package.json +1 -1
|
@@ -14,7 +14,9 @@ dependency catalog. Read `klok docs read klok-framework-klok-common` for naming
|
|
|
14
14
|
(`customer-v1.xsd`), the Maven artifact and the npm and Python packages, and `customer_v1` ends the Java package.
|
|
15
15
|
Inside the XSD the model keeps its PascalCase form: root element `Customer_v1`, root type and class `CustomerV1`.
|
|
16
16
|
* The major version is part of the model name; a breaking change is a new major version and a new topic, never a
|
|
17
|
-
silent change of an existing one.
|
|
17
|
+
silent change of an existing one. The pipeline's `klok_datamodel_compatibility` fails a merge request whose change
|
|
18
|
+
breaks a service built with any earlier release, in either direction: read its `breaking:` lines, then make the
|
|
19
|
+
change compatible or create the next major version (the `klok-datamodel` skill).
|
|
18
20
|
* `klok-datamodel-project.json` at the root is the model's metadata (name, description, class, model type,
|
|
19
21
|
`targetNamespace`, template version), rendered from `klok/environment/project-template-datamodel`; klok.dev and
|
|
20
22
|
the documentation payload read it. The pipeline takes the artifact and the Java package from the repository path
|
|
@@ -13,8 +13,8 @@ content arrives here. There are two kinds, and they are edited differently:
|
|
|
13
13
|
* `klok-docs/` in the source repository, in a merge request there: the hand written pages, their order and
|
|
14
14
|
chapter titles (`toc-manifest.json`), and where an AI section appears (`<!-- KLOK:GENERATED:START <id> -->` …
|
|
15
15
|
`<!-- KLOK:GENERATED:END <id> -->`);
|
|
16
|
-
* what is generated and how (chapters, sections, prompts, languages, model): klok.dev,
|
|
17
|
-
|
|
16
|
+
* what is generated and how (chapters, sections, prompts, languages, model): klok.dev, Run → Documentation,
|
|
17
|
+
tab Generation, which tenant admins change.
|
|
18
18
|
* **A standalone documentation project** (directly under `<tenant>/documentation/`, such as
|
|
19
19
|
`klok-integration-strategy-and-tactics`) is written by hand in this repository, and the egress never touches it.
|
|
20
20
|
Keep `docs/toc` and `docs/toc-manifest.json` in sync when adding a page.
|
|
@@ -141,9 +141,11 @@ whether a model may travel on a topic; it decides how widely the model is shared
|
|
|
141
141
|
* The major version is part of the name: repository `<model>-v<n>` in kebab case, XSD root element `<Model>_v<n>`,
|
|
142
142
|
class and topic `<Model>V<n>`. A compatible change (a new optional field) stays in the major version; consumers
|
|
143
143
|
ignore unknown fields. A breaking change (remove, rename or retype a field, change its meaning, make an optional
|
|
144
|
-
field required) is a new major version in a new repository, run in parallel
|
|
145
|
-
`KlokSchemaUpgradeBridge` / `KlokSchemaDowngradeBridge` while readers move. A
|
|
146
|
-
into a new shape.
|
|
144
|
+
field required, add or remove an enumeration value) is a new major version in a new repository, run in parallel
|
|
145
|
+
with the old one, bridged by `KlokSchemaUpgradeBridge` / `KlokSchemaDowngradeBridge` while readers move. A
|
|
146
|
+
published version is never edited into a new shape. The datamodel pipeline enforces it: every merge request is
|
|
147
|
+
compared with every earlier release of the datamodel, both ways, because producers and consumers deploy in any
|
|
148
|
+
order, and a change that breaks one fails (`klokDatamodelCompatibilityCheck`).
|
|
147
149
|
* A, B and C (and X with its own repository) generate Java, Python and TypeScript classes that are compatible on the
|
|
148
150
|
wire, and their versions are written into the dependency catalog.
|
|
149
151
|
|
|
@@ -897,7 +897,7 @@ Deployment manifests in the GitOps repository that Argo CD applies
|
|
|
897
897
|
klok manifest update [options]
|
|
898
898
|
```
|
|
899
899
|
|
|
900
|
-
Set the image of one container in one manifest file, then commit and push
|
|
900
|
+
Set the image of one container in one manifest file and in the service's per-tenant instances, then commit and push
|
|
901
901
|
|
|
902
902
|
| Option | Description |
|
|
903
903
|
|---|---|
|
|
@@ -909,6 +909,7 @@ Set the image of one container in one manifest file, then commit and push it
|
|
|
909
909
|
| `--container <name>` | Container to update (default: KLOK_MANIFEST_CONTAINER, else the only one in the file) |
|
|
910
910
|
| `--workload <name>` | [<kind>/]<name> of the workload, when the container name repeats (default: KLOK_MANIFEST_WORKLOAD) |
|
|
911
911
|
| `--branch <name>` | Branch to push to (default: KLOK_MANIFEST_BRANCH, then main) |
|
|
912
|
+
| `--no-instances` | Leave the per-tenant instances <tenant>/platform/<name>/<name>-crds.yaml alone (default: update them; KLOK_MANIFEST_INSTANCES=false turns it off too) |
|
|
912
913
|
| `-n, --dry-run` | Clone and edit, print the diff, commit and push nothing |
|
|
913
914
|
|
|
914
915
|
```
|
|
@@ -918,6 +919,12 @@ catalog) is then a new reference that Argo CD rolls out, while an image that cam
|
|
|
918
919
|
the same digest and changes nothing. Without a digest the manifest says only the tag, and a new image under an old tag is
|
|
919
920
|
never rolled out: nodes keep the copy they cached.
|
|
920
921
|
|
|
922
|
+
Instances: a platform service can run once per tenant from the same image, each instance in its own manifest
|
|
923
|
+
<tenant>/platform/<name>/<name>-crds.yaml, where <name> is the repository name of <project path>/<name>-crds.yaml.
|
|
924
|
+
Every such file in another tenant's folder whose containers run the same image repository (any tag or digest) gets
|
|
925
|
+
the new image in the same commit; only those image lines change. A file of another image is left as it is, and so is
|
|
926
|
+
the project's own tenant folder. --no-instances updates the project's own manifest alone.
|
|
927
|
+
|
|
921
928
|
Credentials: in CI the job logs in to Vault with its identity token (VAULT_ID_TOKEN) and the role
|
|
922
929
|
<tenant>-ci-protected (KLOK_VAULT_DEPLOY_KEY_ROLE overrides it), which only pipelines of a protected branch or tag
|
|
923
930
|
can use, and reads the deploy key and the pinned host key from secret/<tenant>/CICD_KEY and
|
|
@@ -1126,7 +1133,7 @@ Mirror the GitLab repositories you can see into a local workspace
|
|
|
1126
1133
|
klok sync clone [options]
|
|
1127
1134
|
```
|
|
1128
1135
|
|
|
1129
|
-
Discover every repository you can see and clone the missing ones
|
|
1136
|
+
Discover every repository you can see that is not archived, and clone the missing ones
|
|
1130
1137
|
|
|
1131
1138
|
| Option | Description |
|
|
1132
1139
|
|---|---|
|
|
@@ -65,7 +65,15 @@ domains read should still travel as class B or C (transform at the edge).
|
|
|
65
65
|
4. A breaking change is a new major version (`Customer_v2`), which is a new class, a new topic and a new catalog
|
|
66
66
|
key; a compatible change (optional field) stays in the same version. The old and the new version run in
|
|
67
67
|
parallel while readers move, at least the class's minimum (table above) and until every known reader
|
|
68
|
-
has moved.
|
|
68
|
+
has moved. The pipeline decides which is which: `klok_datamodel_compatibility` compares the Avro schema the
|
|
69
|
+
generated classes register on the broker with every earlier release, both ways, and fails on a numeric or
|
|
70
|
+
boolean element added without `minOccurs="0"`, a removed or renamed field, a changed type, a field made required
|
|
71
|
+
or optional, an added or removed enumeration value and a removed type. Its `breaking:` lines name the field. Make
|
|
72
|
+
the change compatible (add optional fields only; keep a field you no longer need and stop filling it), or create
|
|
73
|
+
`<name>-v<n+1>`. Only when no service runs some earlier releases any more does the owner record that in
|
|
74
|
+
`klok-datamodel-project.json` (`"compatibility": {"since": "<release>", "reason": "<who moved, when>"}`); never
|
|
75
|
+
to get a new break through. The rules are on the *Datamodel compatibility* page of
|
|
76
|
+
`klok docs read klok-framework-klok-gradle-plugin`.
|
|
69
77
|
5. Work in the task worktree (`klok-worktree` skill), push its `agent/<task-id>` branch, open a merge request;
|
|
70
78
|
the pipeline validates the XSD and generates the Java project. On `main` it
|
|
71
79
|
publishes `dev.klok.<tenant>.datamodel:<name>-v<n>:1.0.0-build.<ts>` with its Python and TypeScript packages,
|
|
@@ -72,6 +72,11 @@ as a red pipeline. Vault CI login is not one of them: it needs nothing per proje
|
|
|
72
72
|
keys); the service's own Keycloak client with its broker grants; and every topic `./gradlew klokTopics` lists, in
|
|
73
73
|
its owning tenant's Pulsar file and applied (requested in klok.dev, or a merge request to
|
|
74
74
|
`klok/environment/klok-environment-setup`). A topic's `_DLQ` and a `_Request` topic's `_Response` come with it.
|
|
75
|
+
* For a platform service's instance in another tenant (the ODL, tasks, the OpenSearch ingress and egress): the same
|
|
76
|
+
image, deployed from `<tenant>/platform/<name>/<name>-crds.yaml` in the manifests repository, written by hand with
|
|
77
|
+
the service's current image and the tenant's namespace, Vault role, env secret and Keycloak client. Nobody updates
|
|
78
|
+
its image by hand: the service's own `update_manifest` (`klok manifest update`) sets every instance that runs the
|
|
79
|
+
same image repository in the same commit.
|
|
75
80
|
* Documentation projects need the tenant's docs upload client: Keycloak client `klok-docs-upload-<tenant>` and its
|
|
76
81
|
id and secret in `secret/<tenant>/common/repo/cicd-environment-variables`.
|
|
77
82
|
|