@intentius/chant-lexicon-fly 0.83.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.
- package/dist/composites/catalog.d.ts +3 -0
- package/dist/composites/catalog.d.ts.map +1 -0
- package/dist/integrity.json +2 -2
- package/dist/manifest.json +1 -1
- package/dist/plugin.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/composites/catalog.test.ts +40 -0
- package/src/composites/catalog.ts +83 -0
- package/src/plugin.ts +5 -0
|
@@ -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,EA6E5C,CAAC"}
|
package/dist/integrity.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"algorithm": "sha256",
|
|
3
3
|
"artifacts": {
|
|
4
|
-
"manifest.json": "
|
|
4
|
+
"manifest.json": "0831632c8991e193dff7de2275b9d00d080cab97b686b06d2fc6564a57003571",
|
|
5
5
|
"meta.json": "273f2a523b66f08ca91642dba2592c44765ab59ddf7329998884a0b08c6c3f24",
|
|
6
6
|
"types/index.d.ts": "63ec7f2eaa8dddd3abb273748c646c4870d99616db53fc04b53edd0588ccf260",
|
|
7
7
|
"rules/guest-sizing.ts": "bc749d218df8f3cc3d8fbe388205ae96e6b204ae0d6d77e8bf82cb936cc53ff6",
|
|
@@ -15,5 +15,5 @@
|
|
|
15
15
|
"skills/chant-fly-ops.md": "b8eef6504e203133e6a35c83aabb08404eec95060705395515a0046d42269cf1",
|
|
16
16
|
"skills/chant-fly-sprites.md": "3ebbbd9a2751b91fc573c21bafa9a8e490c53e1bdcee16cc61f4051c9e12e526"
|
|
17
17
|
},
|
|
18
|
-
"composite": "
|
|
18
|
+
"composite": "9eb15c3f8967fb879a7ac2a4d913bbd7b023bbcc4621a4b51e8b8cf3402d59ea"
|
|
19
19
|
}
|
package/dist/manifest.json
CHANGED
package/dist/plugin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAkD,MAAM,0BAA0B,CAAC;AAuB9G;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,aAiTvB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentius/chant-lexicon-fly",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.85.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"src/",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"typescript": "^5.9.3"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
|
-
"@intentius/chant": "^0.
|
|
66
|
+
"@intentius/chant": "^0.85.0",
|
|
67
67
|
"typescript": "^5.9.3"
|
|
68
68
|
},
|
|
69
69
|
"description": "Fly.io Machines lexicon for chant — declarative IaC in TypeScript",
|
|
@@ -0,0 +1,40 @@
|
|
|
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 fly 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 flyDeployModule from "./fly-deploy";
|
|
13
|
+
import * as flyOtelCollectorModule from "./fly-otel-collector";
|
|
14
|
+
import { compositeCatalog } from "./catalog";
|
|
15
|
+
import { flyPlugin } from "../plugin";
|
|
16
|
+
|
|
17
|
+
const exported = Object.entries({ ...flyDeployModule, ...flyOtelCollectorModule })
|
|
18
|
+
.filter(([, value]) => isCompositeDefinition(value))
|
|
19
|
+
.map(([name]) => name)
|
|
20
|
+
.sort();
|
|
21
|
+
const catalogued = compositeCatalog.map((entry) => entry.name).sort();
|
|
22
|
+
|
|
23
|
+
describe("the fly composite catalog", () => {
|
|
24
|
+
test("every exported composite has an entry, and every entry names an exported composite", () => {
|
|
25
|
+
expect(exported.length).toBeGreaterThan(0);
|
|
26
|
+
expect(catalogued, "regenerate with `npm run generate:composite-catalogs -- fly`").toEqual(exported);
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
test("every entry says what it is and what it bundles", () => {
|
|
30
|
+
for (const entry of compositeCatalog) {
|
|
31
|
+
expect(entry.lexicon, entry.name).toBe("fly");
|
|
32
|
+
expect(entry.description.length, entry.name).toBeGreaterThan(0);
|
|
33
|
+
expect(entry.bundles.length, entry.name).toBeGreaterThan(0);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
test("the plugin contributes it", () => {
|
|
38
|
+
expect(flyPlugin.composites?.()).toBe(compositeCatalog);
|
|
39
|
+
});
|
|
40
|
+
});
|
|
@@ -0,0 +1,83 @@
|
|
|
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": "FlyOtelCollector",
|
|
9
|
+
"lexicon": "fly",
|
|
10
|
+
"description": "Create a FlyOtelCollector composite.",
|
|
11
|
+
"bundles": [
|
|
12
|
+
"Machine"
|
|
13
|
+
],
|
|
14
|
+
"params": [
|
|
15
|
+
{
|
|
16
|
+
"name": "name",
|
|
17
|
+
"type": "string",
|
|
18
|
+
"required": false,
|
|
19
|
+
"description": "Machine name (default: \"otel-collector\")."
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "app",
|
|
23
|
+
"type": "string | Declarable",
|
|
24
|
+
"required": false,
|
|
25
|
+
"description": "The app the machine belongs to, as an app name."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"name": "region",
|
|
29
|
+
"type": "string | Declarable",
|
|
30
|
+
"required": false,
|
|
31
|
+
"description": "Region (default: `Fly.Region`, which the build resolves from `FLY_REGION`)."
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"name": "image",
|
|
35
|
+
"type": "string",
|
|
36
|
+
"required": false,
|
|
37
|
+
"description": "Collector image (default: the contrib image at the otel lexicon's pinned collector version)."
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "config",
|
|
41
|
+
"type": "Iterable<Declarable>",
|
|
42
|
+
"required": false,
|
|
43
|
+
"description": "The collector config, as otel lexicon entities (components and pipelines)."
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "exporters",
|
|
47
|
+
"type": "OTelComponent<\"exporter\", string, any>[]",
|
|
48
|
+
"required": false,
|
|
49
|
+
"description": "Exporters for the default config (default: one `debug` exporter)."
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"name": "signals",
|
|
53
|
+
"type": "Signal[]",
|
|
54
|
+
"required": false,
|
|
55
|
+
"description": "Signals the default config has pipelines for (default: traces, metrics and logs)."
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": "cpuKind",
|
|
59
|
+
"type": "string",
|
|
60
|
+
"required": false,
|
|
61
|
+
"description": "Guest CPU kind (default: \"shared\")."
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"name": "cpus",
|
|
65
|
+
"type": "number",
|
|
66
|
+
"required": false,
|
|
67
|
+
"description": "Guest CPUs (default: 1)."
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"name": "memoryMb",
|
|
71
|
+
"type": "number",
|
|
72
|
+
"required": false,
|
|
73
|
+
"description": "Guest memory in MB (default: 512)."
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"name": "defaults",
|
|
77
|
+
"type": "{ machine?: Partial<Record<string, unknown>>; }",
|
|
78
|
+
"required": false,
|
|
79
|
+
"description": "Per-member defaults for fine-grained overrides."
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
];
|
package/src/plugin.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { compositeCatalog } from "./composites/catalog";
|
|
1
2
|
import type { LexiconPlugin, SkillDefinition, IntrinsicDef, InitTemplateSet } from "@intentius/chant/lexicon";
|
|
2
3
|
import type { LintRule } from "@intentius/chant/lint/rule";
|
|
3
4
|
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
@@ -156,6 +157,10 @@ export const flyPlugin: LexiconPlugin = {
|
|
|
156
157
|
},
|
|
157
158
|
]),
|
|
158
159
|
|
|
160
|
+
composites() {
|
|
161
|
+
return compositeCatalog;
|
|
162
|
+
},
|
|
163
|
+
|
|
159
164
|
mcpTools() {
|
|
160
165
|
return flyContextTools();
|
|
161
166
|
},
|