@intentius/chant-lexicon-cpln 0.84.0 → 0.85.0

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.
@@ -0,0 +1,3 @@
1
+ import type { CompositeEntry } from "@intentius/chant/lexicon";
2
+ export declare const compositeCatalog: CompositeEntry[];
3
+ //# sourceMappingURL=catalog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../src/composites/catalog.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/D,eAAO,MAAM,gBAAgB,EAAE,cAAc,EA2iB5C,CAAC"}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "algorithm": "sha256",
3
3
  "artifacts": {
4
- "manifest.json": "1dfa837e8d6713c575a44953647794812b5f94c717a8bbc141c012f1494cbdd1",
4
+ "manifest.json": "d8ef46df61d78be05e1efb76f38a52be4dab9e9b92469f763a68b9aa9d11a0b1",
5
5
  "meta.json": "998f1c9cb7c7d2204eab8aae9c581cb80d45420ed51484c64f467f023ad9c0aa",
6
6
  "types/index.d.ts": "e7df28acf3abb14270cce181f15b75b4b7811c7074c3a1d78fa86e0be67049e6",
7
7
  "rules/cpl001-no-secret-literals.ts": "c79b537f78dbd26893bd801b3e5c5f30d7326c8c6816a6fd82fb885796f86c61",
@@ -31,5 +31,5 @@
31
31
  "skills/chant-cpln-workloads.md": "8353909ff18f244f4d4389e74b8d95b04359e97a46ddacb18d669d41d62b6080",
32
32
  "skills/chant-cpln-secrets.md": "8628c2286a7e8e14aa78224fe22ff266dc54b996f4fdb64002fa433213de13a0"
33
33
  },
34
- "composite": "31b721698263d2c582599531496689b98f907062037e07c2bd192a248067de2d"
34
+ "composite": "9e665122ffc9e08a03688770e3b4d114d2b4cd2c74ba94e819391dafd7d578cf"
35
35
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cpln",
3
- "version": "0.84.0",
3
+ "version": "0.85.0",
4
4
  "chantVersion": ">=0.1.0",
5
5
  "namespace": "Cpln"
6
6
  }
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EAId,MAAM,0BAA0B,CAAC;AAsClC,eAAO,MAAM,UAAU,EAAE,aA+IxB,CAAC"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,aAAa,EAId,MAAM,0BAA0B,CAAC;AAsClC,eAAO,MAAM,UAAU,EAAE,aAmJxB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentius/chant-lexicon-cpln",
3
- "version": "0.84.0",
3
+ "version": "0.85.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src/",
@@ -49,7 +49,7 @@
49
49
  "typescript": "^5.9.3"
50
50
  },
51
51
  "peerDependencies": {
52
- "@intentius/chant": "^0.84.0",
52
+ "@intentius/chant": "^0.85.0",
53
53
  "typescript": "^5.9.3"
54
54
  },
55
55
  "description": "Control Plane (cpln) lexicon for chant — declarative IaC in TypeScript",
@@ -0,0 +1,39 @@
1
+ /**
2
+ * The composite catalog matches what this lexicon exports (#2662).
3
+ *
4
+ * `catalog.ts` is generated by `npm run generate:composite-catalogs` and is
5
+ * what `chant serve mcp` lists. A composite added without regenerating it would
6
+ * be invisible to an agent asking what cpln offers; one renamed or removed
7
+ * would be offered and fail to import.
8
+ */
9
+
10
+ import { describe, expect, test } from "vitest";
11
+ import { isCompositeDefinition } from "@intentius/chant";
12
+ import * as composites from "./index";
13
+ import { compositeCatalog } from "./catalog";
14
+ import { cplnPlugin } from "../plugin";
15
+
16
+ const exported = Object.entries(composites)
17
+ .filter(([, value]) => isCompositeDefinition(value))
18
+ .map(([name]) => name)
19
+ .sort();
20
+ const catalogued = compositeCatalog.map((entry) => entry.name).sort();
21
+
22
+ describe("the cpln composite catalog", () => {
23
+ test("every exported composite has an entry, and every entry names an exported composite", () => {
24
+ expect(exported.length).toBeGreaterThan(0);
25
+ expect(catalogued, "regenerate with `npm run generate:composite-catalogs -- cpln`").toEqual(exported);
26
+ });
27
+
28
+ test("every entry says what it is and what it bundles", () => {
29
+ for (const entry of compositeCatalog) {
30
+ expect(entry.lexicon, entry.name).toBe("cpln");
31
+ expect(entry.description.length, entry.name).toBeGreaterThan(0);
32
+ expect(entry.bundles.length, entry.name).toBeGreaterThan(0);
33
+ }
34
+ });
35
+
36
+ test("the plugin contributes it", () => {
37
+ expect(cplnPlugin.composites?.()).toBe(compositeCatalog);
38
+ });
39
+ });
@@ -0,0 +1,561 @@
1
+ // Generated by scripts/generate-composite-catalogs.ts (#2662) from this
2
+ // lexicon's composite exports. Do not edit by hand: run
3
+ // `npm run generate:composite-catalogs`. catalog.test.ts holds it to the exports.
4
+ import type { CompositeEntry } from "@intentius/chant/lexicon";
5
+
6
+ export const compositeCatalog: CompositeEntry[] = [
7
+ {
8
+ "name": "CronJob",
9
+ "lexicon": "cpln",
10
+ "description": "CronJob — a scheduled workload, with the constraints cron carries.",
11
+ "bundles": [
12
+ "Workload"
13
+ ],
14
+ "params": [
15
+ {
16
+ "name": "name",
17
+ "type": "string",
18
+ "required": true,
19
+ "description": "Workload name."
20
+ },
21
+ {
22
+ "name": "gvc",
23
+ "type": "string",
24
+ "required": true,
25
+ "description": "GVC this job is deployed into."
26
+ },
27
+ {
28
+ "name": "image",
29
+ "type": "string",
30
+ "required": true,
31
+ "description": "Container image."
32
+ },
33
+ {
34
+ "name": "schedule",
35
+ "type": "string",
36
+ "required": true,
37
+ "description": "Cron schedule, standard five-field syntax (e.g. `\"0 * * * *\"`)."
38
+ },
39
+ {
40
+ "name": "containerName",
41
+ "type": "string",
42
+ "required": false,
43
+ "description": "Container name (default `main`)."
44
+ },
45
+ {
46
+ "name": "command",
47
+ "type": "string",
48
+ "required": false,
49
+ "description": "Entrypoint override."
50
+ },
51
+ {
52
+ "name": "args",
53
+ "type": "string[]",
54
+ "required": false,
55
+ "description": "Arguments passed to the entrypoint."
56
+ },
57
+ {
58
+ "name": "cpu",
59
+ "type": "string",
60
+ "required": false,
61
+ "description": "CPU in millicores (default `50m`)."
62
+ },
63
+ {
64
+ "name": "memory",
65
+ "type": "string",
66
+ "required": false,
67
+ "description": "Memory (default `128Mi`)."
68
+ },
69
+ {
70
+ "name": "env",
71
+ "type": "Record<string, string>",
72
+ "required": false,
73
+ "description": "Environment variables, as a plain map."
74
+ },
75
+ {
76
+ "name": "concurrencyPolicy",
77
+ "type": "\"Allow\" | \"Forbid\" | \"Replace\"",
78
+ "required": false,
79
+ "description": "What to do when a run is still going at the next scheduled time (default `Forbid` — skip the new run rather than overlap)."
80
+ },
81
+ {
82
+ "name": "restartPolicy",
83
+ "type": "\"Never\" | \"OnFailure\"",
84
+ "required": false,
85
+ "description": "Restart behaviour for a failed run (default `Never`)."
86
+ },
87
+ {
88
+ "name": "activeDeadlineSeconds",
89
+ "type": "number",
90
+ "required": false,
91
+ "description": "Seconds a run may take before it is killed."
92
+ },
93
+ {
94
+ "name": "historyLimit",
95
+ "type": "number",
96
+ "required": false,
97
+ "description": "How many finished runs to retain."
98
+ },
99
+ {
100
+ "name": "outboundAllowCidr",
101
+ "type": "string[]",
102
+ "required": false,
103
+ "description": "Hostnames or CIDRs the job may call out to."
104
+ },
105
+ {
106
+ "name": "identityLink",
107
+ "type": "string",
108
+ "required": false,
109
+ "description": "Identity to run as, as a link (`//gvc/GVC/identity/NAME`)."
110
+ },
111
+ {
112
+ "name": "tags",
113
+ "type": "Record<string, string>",
114
+ "required": false,
115
+ "description": "Tags applied to the workload."
116
+ },
117
+ {
118
+ "name": "defaults",
119
+ "type": "{ workload?: Partial<ConstructorParameters<typeof Workload>[0]>; }",
120
+ "required": false,
121
+ "description": "Per-member defaults for customizing the underlying resource."
122
+ }
123
+ ]
124
+ },
125
+ {
126
+ "name": "GvcEnvironment",
127
+ "lexicon": "cpln",
128
+ "description": "GvcEnvironment — a GVC placed in named locations, with its pull secrets.",
129
+ "bundles": [
130
+ "Gvc"
131
+ ],
132
+ "params": [
133
+ {
134
+ "name": "name",
135
+ "type": "string",
136
+ "required": true,
137
+ "description": "GVC name."
138
+ },
139
+ {
140
+ "name": "org",
141
+ "type": "string",
142
+ "required": true,
143
+ "description": "Org the GVC belongs to."
144
+ },
145
+ {
146
+ "name": "locations",
147
+ "type": "string[]",
148
+ "required": true,
149
+ "description": "Location ids to place workloads in, e.g. `[\"aws-us-east-1\"]`."
150
+ },
151
+ {
152
+ "name": "pullSecrets",
153
+ "type": "string[]",
154
+ "required": false,
155
+ "description": "Names of secrets used to pull private images."
156
+ },
157
+ {
158
+ "name": "endpointNamingFormat",
159
+ "type": "\"default\" | \"legacy\" | \"org\"",
160
+ "required": false,
161
+ "description": "Public endpoint naming scheme (default `org`, the default for new GVCs): `{workload}-{gvcAlias}.{orgPrefix}.cpln.app`."
162
+ },
163
+ {
164
+ "name": "env",
165
+ "type": "Record<string, string>",
166
+ "required": false,
167
+ "description": "Environment variables inherited by every workload in the GVC."
168
+ },
169
+ {
170
+ "name": "keda",
171
+ "type": "boolean",
172
+ "required": false,
173
+ "description": "Enable KEDA autoscaling for standard and stateful workloads in this GVC."
174
+ },
175
+ {
176
+ "name": "tags",
177
+ "type": "Record<string, string>",
178
+ "required": false,
179
+ "description": "Tags applied to the GVC."
180
+ },
181
+ {
182
+ "name": "defaults",
183
+ "type": "{ gvc?: Partial<ConstructorParameters<typeof Gvc>[0]>; }",
184
+ "required": false,
185
+ "description": "Per-member defaults for customizing the underlying resource."
186
+ }
187
+ ]
188
+ },
189
+ {
190
+ "name": "PublicDomain",
191
+ "lexicon": "cpln",
192
+ "description": "PublicDomain — a custom domain routed to workloads in one GVC.",
193
+ "bundles": [
194
+ "Domain"
195
+ ],
196
+ "params": [
197
+ {
198
+ "name": "name",
199
+ "type": "string",
200
+ "required": true,
201
+ "description": "The domain name, e.g. `api.example.com` or the apex `example.com`."
202
+ },
203
+ {
204
+ "name": "gvc",
205
+ "type": "string",
206
+ "required": true,
207
+ "description": "The GVC every route targets."
208
+ },
209
+ {
210
+ "name": "routes",
211
+ "type": "DomainRoute[]",
212
+ "required": false,
213
+ "description": "Routes for the domain."
214
+ },
215
+ {
216
+ "name": "dnsMode",
217
+ "type": "\"cname\" | \"ns\"",
218
+ "required": false,
219
+ "description": "DNS mode."
220
+ },
221
+ {
222
+ "name": "certChallengeType",
223
+ "type": "\"dns01\" | \"http01\"",
224
+ "required": false,
225
+ "description": "Certificate challenge type."
226
+ },
227
+ {
228
+ "name": "port",
229
+ "type": "number",
230
+ "required": false,
231
+ "description": "Public port (default 443)."
232
+ },
233
+ {
234
+ "name": "protocol",
235
+ "type": "\"http\" | \"http2\" | \"tcp\"",
236
+ "required": false,
237
+ "description": "Protocol (default `http2`)."
238
+ },
239
+ {
240
+ "name": "tags",
241
+ "type": "Record<string, string>",
242
+ "required": false,
243
+ "description": "Tags applied to the domain."
244
+ },
245
+ {
246
+ "name": "defaults",
247
+ "type": "{ domain?: Partial<ConstructorParameters<typeof Domain>[0]>; }",
248
+ "required": false,
249
+ "description": "Per-member defaults for customizing the underlying resource."
250
+ }
251
+ ]
252
+ },
253
+ {
254
+ "name": "SecretAccess",
255
+ "lexicon": "cpln",
256
+ "description": "SecretAccess — the identity and policy a workload needs to read a secret.",
257
+ "bundles": [
258
+ "Identity",
259
+ "Policy"
260
+ ],
261
+ "params": [
262
+ {
263
+ "name": "name",
264
+ "type": "string",
265
+ "required": true,
266
+ "description": "Identity name."
267
+ },
268
+ {
269
+ "name": "gvc",
270
+ "type": "string",
271
+ "required": true,
272
+ "description": "GVC the identity lives in."
273
+ },
274
+ {
275
+ "name": "secrets",
276
+ "type": "string[]",
277
+ "required": true,
278
+ "description": "Names of the org-scoped secrets this identity may read."
279
+ },
280
+ {
281
+ "name": "policyName",
282
+ "type": "string",
283
+ "required": false,
284
+ "description": "Policy name (default `<name>-secret-access`)."
285
+ },
286
+ {
287
+ "name": "permissions",
288
+ "type": "string[]",
289
+ "required": false,
290
+ "description": "Permissions granted on the target secrets (default `[\"reveal\"]`)."
291
+ },
292
+ {
293
+ "name": "tags",
294
+ "type": "Record<string, string>",
295
+ "required": false,
296
+ "description": "Tags applied to both resources."
297
+ },
298
+ {
299
+ "name": "defaults",
300
+ "type": "{ identity?: Partial<ConstructorParameters<typeof Identity>[0]>; policy?: Partial<ConstructorParameters<typeof Policy...",
301
+ "required": false,
302
+ "description": "Per-member defaults for customizing individual resources."
303
+ }
304
+ ]
305
+ },
306
+ {
307
+ "name": "ServerlessService",
308
+ "lexicon": "cpln",
309
+ "description": "ServerlessService — a serverless workload with the port, probe and firewall settings a public HTTP service actually needs.",
310
+ "bundles": [
311
+ "Workload"
312
+ ],
313
+ "params": [
314
+ {
315
+ "name": "name",
316
+ "type": "string",
317
+ "required": true,
318
+ "description": "Workload name."
319
+ },
320
+ {
321
+ "name": "gvc",
322
+ "type": "string",
323
+ "required": true,
324
+ "description": "GVC this workload is deployed into."
325
+ },
326
+ {
327
+ "name": "image",
328
+ "type": "string",
329
+ "required": true,
330
+ "description": "Container image."
331
+ },
332
+ {
333
+ "name": "port",
334
+ "type": "number",
335
+ "required": false,
336
+ "description": "The port the container listens on."
337
+ },
338
+ {
339
+ "name": "protocol",
340
+ "type": "\"http\" | \"http2\"",
341
+ "required": false,
342
+ "description": "Protocol for the exposed port (default `http`)."
343
+ },
344
+ {
345
+ "name": "containerName",
346
+ "type": "string",
347
+ "required": false,
348
+ "description": "Container name (default `main`)."
349
+ },
350
+ {
351
+ "name": "cpu",
352
+ "type": "string",
353
+ "required": false,
354
+ "description": "CPU in millicores (default `50m`)."
355
+ },
356
+ {
357
+ "name": "memory",
358
+ "type": "string",
359
+ "required": false,
360
+ "description": "Memory (default `128Mi`)."
361
+ },
362
+ {
363
+ "name": "env",
364
+ "type": "Record<string, string>",
365
+ "required": false,
366
+ "description": "Environment variables, as a plain map."
367
+ },
368
+ {
369
+ "name": "inboundAllowCidr",
370
+ "type": "string[]",
371
+ "required": false,
372
+ "description": "CIDRs allowed to reach the workload from the internet."
373
+ },
374
+ {
375
+ "name": "outboundAllowCidr",
376
+ "type": "string[]",
377
+ "required": false,
378
+ "description": "Hostnames or CIDRs the workload may call out to."
379
+ },
380
+ {
381
+ "name": "minScale",
382
+ "type": "number",
383
+ "required": false,
384
+ "description": "Minimum replicas (default 1)."
385
+ },
386
+ {
387
+ "name": "maxScale",
388
+ "type": "number",
389
+ "required": false,
390
+ "description": "Maximum replicas (default 5)."
391
+ },
392
+ {
393
+ "name": "autoscalingMetric",
394
+ "type": "\"concurrency\" | \"rps\" | \"cpu\" | \"memory\" | \"disabled\"",
395
+ "required": false,
396
+ "description": "Autoscaling strategy (default `concurrency`)."
397
+ },
398
+ {
399
+ "name": "autoscalingTarget",
400
+ "type": "number",
401
+ "required": false,
402
+ "description": "Scaling target (default 95)."
403
+ },
404
+ {
405
+ "name": "identityLink",
406
+ "type": "string",
407
+ "required": false,
408
+ "description": "Identity to run as, as a link (`//gvc/GVC/identity/NAME`)."
409
+ },
410
+ {
411
+ "name": "tags",
412
+ "type": "Record<string, string>",
413
+ "required": false,
414
+ "description": "Tags applied to the workload."
415
+ },
416
+ {
417
+ "name": "defaults",
418
+ "type": "{ workload?: Partial<ConstructorParameters<typeof Workload>[0]>; }",
419
+ "required": false,
420
+ "description": "Per-member defaults for customizing the underlying resource."
421
+ }
422
+ ]
423
+ },
424
+ {
425
+ "name": "StatefulService",
426
+ "lexicon": "cpln",
427
+ "description": "StatefulService — a stateful workload with its volume set, mounted.",
428
+ "bundles": [
429
+ "VolumeSet",
430
+ "Workload"
431
+ ],
432
+ "params": [
433
+ {
434
+ "name": "name",
435
+ "type": "string",
436
+ "required": true,
437
+ "description": "Workload name."
438
+ },
439
+ {
440
+ "name": "gvc",
441
+ "type": "string",
442
+ "required": true,
443
+ "description": "GVC for both the workload and the volume set."
444
+ },
445
+ {
446
+ "name": "image",
447
+ "type": "string",
448
+ "required": true,
449
+ "description": "Container image."
450
+ },
451
+ {
452
+ "name": "mountPath",
453
+ "type": "string",
454
+ "required": true,
455
+ "description": "Mount path inside the container."
456
+ },
457
+ {
458
+ "name": "capacityGb",
459
+ "type": "number",
460
+ "required": true,
461
+ "description": "Initial volume capacity in GB."
462
+ },
463
+ {
464
+ "name": "volumeSetName",
465
+ "type": "string",
466
+ "required": false,
467
+ "description": "Volume set name (default `<name>-data`)."
468
+ },
469
+ {
470
+ "name": "fileSystemType",
471
+ "type": "\"ext4\" | \"xfs\" | \"shared\"",
472
+ "required": false,
473
+ "description": "Filesystem (default `ext4`)."
474
+ },
475
+ {
476
+ "name": "performanceClass",
477
+ "type": "\"general-purpose-ssd\" | \"high-throughput-ssd\" | \"shared\"",
478
+ "required": false,
479
+ "description": "Performance class (default `general-purpose-ssd`)."
480
+ },
481
+ {
482
+ "name": "recoveryPolicy",
483
+ "type": "\"retain\" | \"recycle\"",
484
+ "required": false,
485
+ "description": "What happens to the volume when the workload releases it (default `retain`)."
486
+ },
487
+ {
488
+ "name": "ports",
489
+ "type": "Array<{ number: number; protocol?: \"http\" | \"http2\" | \"grpc\" | \"tcp\" }>",
490
+ "required": false,
491
+ "description": "Ports the container exposes."
492
+ },
493
+ {
494
+ "name": "containerName",
495
+ "type": "string",
496
+ "required": false,
497
+ "description": "Container name (default `main`)."
498
+ },
499
+ {
500
+ "name": "cpu",
501
+ "type": "string",
502
+ "required": false,
503
+ "description": "CPU in millicores (default `50m`)."
504
+ },
505
+ {
506
+ "name": "memory",
507
+ "type": "string",
508
+ "required": false,
509
+ "description": "Memory (default `128Mi`)."
510
+ },
511
+ {
512
+ "name": "env",
513
+ "type": "Record<string, string>",
514
+ "required": false,
515
+ "description": "Environment variables, as a plain map."
516
+ },
517
+ {
518
+ "name": "inboundAllowCidr",
519
+ "type": "string[]",
520
+ "required": false,
521
+ "description": "CIDRs allowed to reach the workload from the internet."
522
+ },
523
+ {
524
+ "name": "outboundAllowCidr",
525
+ "type": "string[]",
526
+ "required": false,
527
+ "description": "Hostnames or CIDRs the workload may call out to."
528
+ },
529
+ {
530
+ "name": "minScale",
531
+ "type": "number",
532
+ "required": false,
533
+ "description": "Minimum replicas (default 1)."
534
+ },
535
+ {
536
+ "name": "maxScale",
537
+ "type": "number",
538
+ "required": false,
539
+ "description": "Maximum replicas (default 1)."
540
+ },
541
+ {
542
+ "name": "identityLink",
543
+ "type": "string",
544
+ "required": false,
545
+ "description": "Identity to run as, as a link (`//gvc/GVC/identity/NAME`)."
546
+ },
547
+ {
548
+ "name": "tags",
549
+ "type": "Record<string, string>",
550
+ "required": false,
551
+ "description": "Tags applied to both resources."
552
+ },
553
+ {
554
+ "name": "defaults",
555
+ "type": "{ workload?: Partial<ConstructorParameters<typeof Workload>[0]>; volumeSet?: Partial<ConstructorParameters<typeof Vol...",
556
+ "required": false,
557
+ "description": "Per-member defaults for customizing individual resources."
558
+ }
559
+ ]
560
+ }
561
+ ];
package/src/plugin.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { compositeCatalog } from "./composites/catalog";
1
2
  import type {
2
3
  LexiconPlugin,
3
4
  SkillDefinition,
@@ -158,6 +159,10 @@ export const cplnPlugin: LexiconPlugin = {
158
159
  },
159
160
  ]) as () => SkillDefinition[],
160
161
 
162
+ composites() {
163
+ return compositeCatalog;
164
+ },
165
+
161
166
  mcpTools(): McpToolContribution[] {
162
167
  return [
163
168
  createDiffTool(