@intentius/chant-lexicon-azure 0.37.0 → 0.38.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/codegen/docs.d.ts.map +1 -1
- package/dist/integrity.json +2 -2
- package/dist/manifest.json +1 -1
- package/dist/op/activities/floci-az.d.ts +14 -1
- package/dist/op/activities/floci-az.d.ts.map +1 -1
- package/dist/plugin.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/codegen/docs.ts +0 -1
- package/src/lifecycle-integration.test.ts +1 -0
- package/src/op/activities/floci-az.test.ts +1 -1
- package/src/op/activities/floci-az.ts +25 -5
- package/src/plugin.test.ts +3 -3
- package/src/plugin.ts +16 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../src/codegen/docs.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../src/codegen/docs.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAwFH;;GAEG;AACH,wBAAsB,YAAY,CAAC,IAAI,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAM9E"}
|
package/dist/integrity.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"algorithm": "sha256",
|
|
3
3
|
"artifacts": {
|
|
4
|
-
"manifest.json": "
|
|
4
|
+
"manifest.json": "89559fdc63632e7cbaeb195d455ac1db336eb82f6a23a5572ddc6c08a026c65b",
|
|
5
5
|
"meta.json": "051fb4ee43f7de48a36f1abc59c8ff5207c3b75aa28f13db6440b9f5b0337605",
|
|
6
6
|
"types/index.d.ts": "617a6de433bd92a126170a7f5ae903d6d7aa83fbb0b57169d3450b5a13e72e0d",
|
|
7
7
|
"rules/hardcoded-location.ts": "a9b1d1cec93f2ca9c5206641f53fc9621cefcfd2c00b3ab89c194b30a75fa949",
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"skills/chant-azure-patterns.md": "1a3bacfac612826b77332d2692a59195638db9f1b5e8ea2eda7579621d25f603",
|
|
34
34
|
"skills/chant-azure-aks.md": "2d4e0098c1a22b54ffadd410564d9df0f3a04cb4eb7c6261f20ae33106e7aca8"
|
|
35
35
|
},
|
|
36
|
-
"composite": "
|
|
36
|
+
"composite": "eb179778297979d924b6757f7b4b582220a69e508dcdb6092c1da311e53da90e"
|
|
37
37
|
}
|
package/dist/manifest.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { type EmulatorCapability, type EmulatorSpec } from "@intentius/chant/op";
|
|
1
2
|
export interface FlociAzUpArgs {
|
|
2
3
|
/** Container name. Default: `chant-floci-az`. */
|
|
3
4
|
name?: string;
|
|
4
5
|
/** Host port mapped to the emulator's `:4577`. Default: `4577`. */
|
|
5
6
|
port?: number;
|
|
6
|
-
/** Image. Default: `floci/floci-az
|
|
7
|
+
/** Image. Default: the pinned `floci/floci-az` tag. */
|
|
7
8
|
image?: string;
|
|
8
9
|
/** Readiness timeout in ms. Default: `60000`. */
|
|
9
10
|
timeoutMs?: number;
|
|
@@ -14,6 +15,18 @@ export interface FlociAzDownArgs {
|
|
|
14
15
|
/** Container name to remove. Default: `chant-floci-az`. */
|
|
15
16
|
name?: string;
|
|
16
17
|
}
|
|
18
|
+
export declare const FLOCI_AZ_SPEC: EmulatorSpec;
|
|
19
|
+
/**
|
|
20
|
+
* The azure plugin's emulator capability (#1345).
|
|
21
|
+
*
|
|
22
|
+
* The spec below has existed since #746; what was missing was declaring it, so
|
|
23
|
+
* `chant emulator up --all` booted Floci and nothing else even though floci-az
|
|
24
|
+
* was one line away. `AZURE_ENDPOINT_URL` is the var azure's own
|
|
25
|
+
* `describe-resources.ts` and `deep-observe.ts` already read on every live
|
|
26
|
+
* call, which is also what makes `--live --env <local>` reach the emulator
|
|
27
|
+
* instead of real Azure.
|
|
28
|
+
*/
|
|
29
|
+
export declare const FLOCI_AZ_EMULATOR: EmulatorCapability;
|
|
17
30
|
export declare const flociAzExistsCommand: (name: string) => string;
|
|
18
31
|
export declare const flociAzRmCommand: (name: string) => string;
|
|
19
32
|
export declare const flociAzHealthUrl: (port: number) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"floci-az.d.ts","sourceRoot":"","sources":["../../../src/op/activities/floci-az.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"floci-az.d.ts","sourceRoot":"","sources":["../../../src/op/activities/floci-az.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,kBAAkB,EAAE,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEpG,MAAM,WAAW,aAAa;IAC5B,iDAAiD;IACjD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mDAAmD;IACnD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B,2DAA2D;IAC3D,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAMD,eAAO,MAAM,aAAa,EAAE,YAM3B,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,EAAE,kBAG/B,CAAC;AAIF,eAAO,MAAM,oBAAoB,0BAAmB,CAAC;AACrD,eAAO,MAAM,gBAAgB,0BAAe,CAAC;AAC7C,eAAO,MAAM,gBAAgB,0BAAe,CAAC;AAC7C,0EAA0E;AAC1E,eAAO,MAAM,eAAe,0BAAc,CAAC;AAC3C,eAAO,MAAM,iBAAiB,GAAI,OAAM,aAAkB,KAAG,MAA6B,CAAC;AAE3F,oFAAoF;AACpF,eAAO,MAAM,SAAS,GAAI,OAAM,aAAkB,EAAE,SAAS,WAAW,KAAG,OAAO,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAClF,CAAC;AAEtB,4EAA4E;AAC5E,eAAO,MAAM,WAAW,GAAI,OAAM,eAAoB,EAAE,SAAS,WAAW,KAAG,OAAO,CAAC,IAAI,CACpE,CAAC"}
|
package/dist/plugin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAgB,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAgB,MAAM,0BAA0B,CAAC;AAyB5E;;;;;GAKG;AACH,eAAO,MAAM,WAAW,EAAE,aAgdzB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentius/chant-lexicon-azure",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.38.0",
|
|
4
4
|
"description": "Azure lexicon for chant — declarative IaC in TypeScript",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://intentius.io/chant",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"typescript": "^5.9.3"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
|
-
"@intentius/chant": "^0.
|
|
77
|
+
"@intentius/chant": "^0.38.0",
|
|
78
78
|
"typescript": "^5.9.3"
|
|
79
79
|
}
|
|
80
80
|
}
|
package/src/codegen/docs.ts
CHANGED
|
@@ -75,7 +75,6 @@ const docsConfig: DocsConfig = {
|
|
|
75
75
|
// `lint-rules` below is the rules documentation; the generated `rules` table
|
|
76
76
|
// would duplicate it and land in no sidebar (#1312). aws, k8s, gitlab and
|
|
77
77
|
// github already suppress it for the same reason.
|
|
78
|
-
suppressPages: ["rules"],
|
|
79
78
|
// These pages are hand-written files under docs/src/content/docs/. The
|
|
80
79
|
// pipeline preserves pages it did not emit, but Starlight has no
|
|
81
80
|
// auto-discovery, so without an entry here they are reachable only by URL —
|
|
@@ -125,6 +125,7 @@ describe("azure lifecycle integration (#163)", () => {
|
|
|
125
125
|
// The shared conformance suite (#1089).
|
|
126
126
|
describeObservationConformance({
|
|
127
127
|
lexicon: "azure",
|
|
128
|
+
ownershipChannel: azurePlugin.ownershipChannel,
|
|
128
129
|
scenarios: [
|
|
129
130
|
{
|
|
130
131
|
name: "a nested ARM type the reader cannot address",
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
describe("floci-az lifecycle commands (typed emulator, not shell)", () => {
|
|
11
11
|
test("run command uses defaults and maps the port", () => {
|
|
12
12
|
expect(flociAzRunCommand({})).toBe(
|
|
13
|
-
"docker run -d --rm --name chant-floci-az -p 4577:4577 floci/floci-az:
|
|
13
|
+
"docker run -d --rm --name chant-floci-az -p 4577:4577 floci/floci-az:0.10.0",
|
|
14
14
|
);
|
|
15
15
|
});
|
|
16
16
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { emulatorLifecycle } from "@intentius/chant/op";
|
|
1
|
+
import { emulatorLifecycle, type EmulatorCapability, type EmulatorSpec } from "@intentius/chant/op";
|
|
2
2
|
|
|
3
3
|
export interface FlociAzUpArgs {
|
|
4
4
|
/** Container name. Default: `chant-floci-az`. */
|
|
5
5
|
name?: string;
|
|
6
6
|
/** Host port mapped to the emulator's `:4577`. Default: `4577`. */
|
|
7
7
|
port?: number;
|
|
8
|
-
/** Image. Default: `floci/floci-az
|
|
8
|
+
/** Image. Default: the pinned `floci/floci-az` tag. */
|
|
9
9
|
image?: string;
|
|
10
10
|
/** Readiness timeout in ms. Default: `60000`. */
|
|
11
11
|
timeoutMs?: number;
|
|
@@ -20,12 +20,32 @@ export interface FlociAzDownArgs {
|
|
|
20
20
|
|
|
21
21
|
// floci-az is a bespoke ARM fake (not LocalStack) — a plain 200 on its health
|
|
22
22
|
// endpoint means ready. Shared lifecycle: emulatorLifecycle (#746).
|
|
23
|
-
|
|
23
|
+
// Pinned rather than `:latest` (#1345): an image that moves underneath a
|
|
24
|
+
// passing local suite is exactly the drift a pin exists to stop.
|
|
25
|
+
export const FLOCI_AZ_SPEC: EmulatorSpec = {
|
|
24
26
|
name: "chant-floci-az",
|
|
25
|
-
image: "floci/floci-az:
|
|
27
|
+
image: "floci/floci-az:0.10.0",
|
|
26
28
|
containerPort: 4577,
|
|
27
29
|
healthPath: "/_floci/health",
|
|
28
|
-
}
|
|
30
|
+
upstream: { repo: "floci-io/floci-az" },
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* The azure plugin's emulator capability (#1345).
|
|
35
|
+
*
|
|
36
|
+
* The spec below has existed since #746; what was missing was declaring it, so
|
|
37
|
+
* `chant emulator up --all` booted Floci and nothing else even though floci-az
|
|
38
|
+
* was one line away. `AZURE_ENDPOINT_URL` is the var azure's own
|
|
39
|
+
* `describe-resources.ts` and `deep-observe.ts` already read on every live
|
|
40
|
+
* call, which is also what makes `--live --env <local>` reach the emulator
|
|
41
|
+
* instead of real Azure.
|
|
42
|
+
*/
|
|
43
|
+
export const FLOCI_AZ_EMULATOR: EmulatorCapability = {
|
|
44
|
+
spec: FLOCI_AZ_SPEC,
|
|
45
|
+
env: (endpoint) => ({ AZURE_ENDPOINT_URL: endpoint }),
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const az = emulatorLifecycle(FLOCI_AZ_SPEC);
|
|
29
49
|
|
|
30
50
|
export const flociAzExistsCommand = az.existsCommand;
|
|
31
51
|
export const flociAzRmCommand = az.rmCommand;
|
package/src/plugin.test.ts
CHANGED
|
@@ -185,7 +185,7 @@ describe("azurePlugin", () => {
|
|
|
185
185
|
|
|
186
186
|
test("lookup-resource tool has correct structure", () => {
|
|
187
187
|
const tools = azurePlugin.mcpTools!();
|
|
188
|
-
const lookupTool = tools.find((t) => t.name === "lookup-resource");
|
|
188
|
+
const lookupTool = tools.find((t) => t.name === "azure:lookup-resource");
|
|
189
189
|
expect(lookupTool).toBeDefined();
|
|
190
190
|
expect(lookupTool!.description.length).toBeGreaterThan(0);
|
|
191
191
|
expect(lookupTool!.inputSchema.type).toBe("object");
|
|
@@ -195,7 +195,7 @@ describe("azurePlugin", () => {
|
|
|
195
195
|
|
|
196
196
|
test("lookup-resource tool schema has query as required", () => {
|
|
197
197
|
const tools = azurePlugin.mcpTools!();
|
|
198
|
-
const lookupTool = tools.find((t) => t.name === "lookup-resource")!;
|
|
198
|
+
const lookupTool = tools.find((t) => t.name === "azure:lookup-resource")!;
|
|
199
199
|
expect(lookupTool.inputSchema.required).toContain("query");
|
|
200
200
|
});
|
|
201
201
|
});
|
|
@@ -212,7 +212,7 @@ describe("azurePlugin", () => {
|
|
|
212
212
|
|
|
213
213
|
test("catalog has correct structure", () => {
|
|
214
214
|
const resources = azurePlugin.mcpResources!();
|
|
215
|
-
const catalog = resources.find((r) => r.uri === "
|
|
215
|
+
const catalog = resources.find((r) => r.uri === "resource-catalog");
|
|
216
216
|
expect(catalog).toBeDefined();
|
|
217
217
|
expect(catalog!.name.length).toBeGreaterThan(0);
|
|
218
218
|
expect(catalog!.description.length).toBeGreaterThan(0);
|
package/src/plugin.ts
CHANGED
|
@@ -7,6 +7,7 @@ import type { CompletionContext, CompletionItem, HoverContext, HoverInfo } from
|
|
|
7
7
|
import type { McpToolContribution, McpResourceContribution } from "@intentius/chant/mcp/types";
|
|
8
8
|
import { postSynthChecks as postSynthCheckList } from "./lint/post-synth";
|
|
9
9
|
import { azureAuditCatalog } from "./lint/audit-catalog";
|
|
10
|
+
import { FLOCI_AZ_EMULATOR } from "./op/activities/floci-az";
|
|
10
11
|
import { createSkillsLoader } from "@intentius/chant/lexicon-plugin-helpers";
|
|
11
12
|
import { readFileSync, readdirSync, existsSync } from "fs";
|
|
12
13
|
import { join, dirname } from "path";
|
|
@@ -20,6 +21,7 @@ import { ArmGenerator } from "./import/generator";
|
|
|
20
21
|
import { azureCompletions } from "./lsp/completions";
|
|
21
22
|
import { azureHover } from "./lsp/hover";
|
|
22
23
|
import { azureDeepNormalizationHooks, observeResourcesDeepAzure } from "./deep-observe";
|
|
24
|
+
import { AZURE_TAG_OWNERSHIP_KEYS } from "./ownership";
|
|
23
25
|
|
|
24
26
|
/**
|
|
25
27
|
* Azure Resource Manager lexicon plugin.
|
|
@@ -29,6 +31,8 @@ import { azureDeepNormalizationHooks, observeResourcesDeepAzure } from "./deep-o
|
|
|
29
31
|
*/
|
|
30
32
|
export const azurePlugin: LexiconPlugin = {
|
|
31
33
|
name: "azure",
|
|
34
|
+
ownershipChannel: { keys: AZURE_TAG_OWNERSHIP_KEYS, reads: ["exportResources"] },
|
|
35
|
+
emulator: FLOCI_AZ_EMULATOR,
|
|
32
36
|
auditCatalog: () => azureAuditCatalog,
|
|
33
37
|
serializer: azureSerializer,
|
|
34
38
|
|
|
@@ -354,7 +358,7 @@ export const tags = defaultTags([
|
|
|
354
358
|
|
|
355
359
|
mcpTools(): McpToolContribution[] {
|
|
356
360
|
return [{
|
|
357
|
-
name: "lookup-resource",
|
|
361
|
+
name: "azure:lookup-resource",
|
|
358
362
|
description: "Look up an Azure resource type by name",
|
|
359
363
|
inputSchema: {
|
|
360
364
|
type: "object",
|
|
@@ -384,7 +388,7 @@ export const tags = defaultTags([
|
|
|
384
388
|
mcpResources(): McpResourceContribution[] {
|
|
385
389
|
return [
|
|
386
390
|
{
|
|
387
|
-
uri: "
|
|
391
|
+
uri: "resource-catalog",
|
|
388
392
|
name: "Azure Resource Catalog",
|
|
389
393
|
description: "All available Azure resource types",
|
|
390
394
|
mimeType: "application/json",
|
|
@@ -398,7 +402,7 @@ export const tags = defaultTags([
|
|
|
398
402
|
},
|
|
399
403
|
},
|
|
400
404
|
{
|
|
401
|
-
uri: "
|
|
405
|
+
uri: "examples",
|
|
402
406
|
name: "Azure Example Projects",
|
|
403
407
|
description: "Example project summaries with code snippets for Azure ARM templates",
|
|
404
408
|
mimeType: "application/json",
|
|
@@ -480,4 +484,13 @@ export const tags = defaultTags([
|
|
|
480
484
|
const { exportResources } = await import("./export-resources");
|
|
481
485
|
return exportResources(options);
|
|
482
486
|
},
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* The generator has always existed in src/codegen/docs.ts; only the package
|
|
490
|
+
* script reached it, so `plugin.docs()` was a no-op for azure alone (#1342).
|
|
491
|
+
*/
|
|
492
|
+
async docs(options?: { verbose?: boolean }): Promise<void> {
|
|
493
|
+
const { generateDocs } = await import("./codegen/docs");
|
|
494
|
+
await generateDocs(options);
|
|
495
|
+
},
|
|
483
496
|
};
|