@telorun/analyzer 0.1.1 → 0.1.3
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/README.md +233 -0
- package/dist/adapters/http-adapter.d.ts +1 -1
- package/dist/adapters/http-adapter.d.ts.map +1 -1
- package/dist/adapters/http-adapter.js +4 -3
- package/dist/adapters/node-adapter.d.ts +1 -1
- package/dist/adapters/node-adapter.d.ts.map +1 -1
- package/dist/adapters/node-adapter.js +2 -1
- package/dist/adapters/registry-adapter.d.ts +5 -1
- package/dist/adapters/registry-adapter.d.ts.map +1 -1
- package/dist/adapters/registry-adapter.js +27 -7
- package/dist/analysis-registry.d.ts +2 -0
- package/dist/analysis-registry.d.ts.map +1 -1
- package/dist/analysis-registry.js +8 -0
- package/dist/analyzer.d.ts.map +1 -1
- package/dist/analyzer.js +107 -4
- package/dist/cel-environment.d.ts +5 -2
- package/dist/cel-environment.d.ts.map +1 -1
- package/dist/cel-environment.js +5 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/kernel-globals.d.ts +34 -0
- package/dist/kernel-globals.d.ts.map +1 -0
- package/dist/kernel-globals.js +94 -0
- package/dist/manifest-loader.d.ts +6 -3
- package/dist/manifest-loader.d.ts.map +1 -1
- package/dist/manifest-loader.js +110 -5
- package/dist/schema-compat.d.ts +1 -1
- package/dist/schema-compat.d.ts.map +1 -1
- package/dist/schema-compat.js +82 -28
- package/dist/types.d.ts +12 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +2 -0
- package/dist/validate-cel-context.d.ts +26 -4
- package/dist/validate-cel-context.d.ts.map +1 -1
- package/dist/validate-cel-context.js +123 -15
- package/dist/validate-references.d.ts.map +1 -1
- package/dist/validate-references.js +13 -1
- package/package.json +21 -2
- package/src/adapters/http-adapter.ts +4 -4
- package/src/adapters/node-adapter.ts +2 -2
- package/src/adapters/registry-adapter.ts +30 -8
- package/src/analysis-registry.ts +10 -0
- package/src/analyzer.ts +139 -5
- package/src/cel-environment.ts +5 -3
- package/src/index.ts +2 -4
- package/src/kernel-globals.ts +110 -0
- package/src/manifest-loader.ts +131 -7
- package/src/schema-compat.ts +87 -31
- package/src/types.ts +14 -0
- package/src/validate-cel-context.ts +150 -15
- package/src/validate-references.ts +13 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ResourceManifest } from "@telorun/sdk";
|
|
2
|
+
/**
|
|
3
|
+
* Kernel global names available in every CEL evaluation context at runtime.
|
|
4
|
+
* Both `buildKernelGlobalsSchema` (chain-access validation) and
|
|
5
|
+
* `buildTypedCelEnvironment` in cel-environment.ts (CEL type-checking)
|
|
6
|
+
* must stay in sync with this list.
|
|
7
|
+
*
|
|
8
|
+
* Note: `env` is only available in the root module context. Child modules
|
|
9
|
+
* loaded via Kernel.Import do not receive host environment variables.
|
|
10
|
+
* There is no `imports` namespace at runtime — import snapshots are stored
|
|
11
|
+
* under `resources.<alias>`.
|
|
12
|
+
*/
|
|
13
|
+
export declare const KERNEL_GLOBAL_NAMES: readonly ["variables", "secrets", "resources", "env"];
|
|
14
|
+
/**
|
|
15
|
+
* Build a typed JSON Schema describing the kernel globals available in the
|
|
16
|
+
* given manifest set. Used to merge into `x-telo-context` schemas so that
|
|
17
|
+
* chain-access validation recognises kernel globals without module authors
|
|
18
|
+
* having to re-declare them.
|
|
19
|
+
*
|
|
20
|
+
* - `variables` / `secrets`: typed from the `Kernel.Module` declaration
|
|
21
|
+
* - `resources`: enumerates all non-system resource names
|
|
22
|
+
* - `env`: dynamic (runtime env vars, root module only)
|
|
23
|
+
*/
|
|
24
|
+
export declare function buildKernelGlobalsSchema(manifests: ResourceManifest[]): Record<string, any>;
|
|
25
|
+
/**
|
|
26
|
+
* Merge kernel globals into an `x-telo-context` schema so chain-access
|
|
27
|
+
* validation recognises `variables`, `secrets`, `resources`, `env`
|
|
28
|
+
* without module authors having to re-declare them.
|
|
29
|
+
*
|
|
30
|
+
* Context-specific properties take precedence over globals (spread order).
|
|
31
|
+
* The original `additionalProperties` setting is preserved.
|
|
32
|
+
*/
|
|
33
|
+
export declare function mergeKernelGlobalsIntoContext(contextSchema: Record<string, any>, globalsSchema: Record<string, any>): Record<string, any>;
|
|
34
|
+
//# sourceMappingURL=kernel-globals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kernel-globals.d.ts","sourceRoot":"","sources":["../src/kernel-globals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAErD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mBAAmB,uDAAwD,CAAC;AAQzF;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,gBAAgB,EAAE,GAC5B,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CA6BrB;AA2BD;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,CAC3C,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAClC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACjC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CASrB"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kernel global names available in every CEL evaluation context at runtime.
|
|
3
|
+
* Both `buildKernelGlobalsSchema` (chain-access validation) and
|
|
4
|
+
* `buildTypedCelEnvironment` in cel-environment.ts (CEL type-checking)
|
|
5
|
+
* must stay in sync with this list.
|
|
6
|
+
*
|
|
7
|
+
* Note: `env` is only available in the root module context. Child modules
|
|
8
|
+
* loaded via Kernel.Import do not receive host environment variables.
|
|
9
|
+
* There is no `imports` namespace at runtime — import snapshots are stored
|
|
10
|
+
* under `resources.<alias>`.
|
|
11
|
+
*/
|
|
12
|
+
export const KERNEL_GLOBAL_NAMES = ["variables", "secrets", "resources", "env"];
|
|
13
|
+
const SYSTEM_KINDS = new Set([
|
|
14
|
+
"Kernel.Definition",
|
|
15
|
+
"Kernel.Module",
|
|
16
|
+
"Kernel.Abstract",
|
|
17
|
+
]);
|
|
18
|
+
/**
|
|
19
|
+
* Build a typed JSON Schema describing the kernel globals available in the
|
|
20
|
+
* given manifest set. Used to merge into `x-telo-context` schemas so that
|
|
21
|
+
* chain-access validation recognises kernel globals without module authors
|
|
22
|
+
* having to re-declare them.
|
|
23
|
+
*
|
|
24
|
+
* - `variables` / `secrets`: typed from the `Kernel.Module` declaration
|
|
25
|
+
* - `resources`: enumerates all non-system resource names
|
|
26
|
+
* - `env`: dynamic (runtime env vars, root module only)
|
|
27
|
+
*/
|
|
28
|
+
export function buildKernelGlobalsSchema(manifests) {
|
|
29
|
+
const moduleManifest = manifests.find((m) => m.kind === "Kernel.Module");
|
|
30
|
+
const resourceProps = {};
|
|
31
|
+
for (const m of manifests) {
|
|
32
|
+
const name = m.metadata?.name;
|
|
33
|
+
if (!name || !m.kind)
|
|
34
|
+
continue;
|
|
35
|
+
// Kernel.Import snapshots are stored under resources.<alias> at runtime,
|
|
36
|
+
// so they appear here alongside regular resources.
|
|
37
|
+
if (!SYSTEM_KINDS.has(m.kind)) {
|
|
38
|
+
resourceProps[name] = { type: "object", additionalProperties: true };
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
type: "object",
|
|
43
|
+
properties: {
|
|
44
|
+
variables: buildSchemaMapSchema(moduleManifest?.variables),
|
|
45
|
+
secrets: buildSchemaMapSchema(moduleManifest?.secrets),
|
|
46
|
+
resources: {
|
|
47
|
+
type: "object",
|
|
48
|
+
properties: resourceProps,
|
|
49
|
+
additionalProperties: false,
|
|
50
|
+
},
|
|
51
|
+
env: { type: "object", additionalProperties: true },
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
/** Wrap a JSON Schema property map (like `Kernel.Module.variables`) into a
|
|
56
|
+
* closed object schema suitable for chain-access validation. Falls back to
|
|
57
|
+
* an open map when the module declares no variables/secrets. */
|
|
58
|
+
function buildSchemaMapSchema(schemaMap) {
|
|
59
|
+
if (!schemaMap || typeof schemaMap !== "object" || Array.isArray(schemaMap)) {
|
|
60
|
+
return { type: "object", additionalProperties: true };
|
|
61
|
+
}
|
|
62
|
+
const props = {};
|
|
63
|
+
for (const [key, value] of Object.entries(schemaMap)) {
|
|
64
|
+
if (value !== null && typeof value === "object" && !Array.isArray(value)) {
|
|
65
|
+
props[key] = value;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
if (Object.keys(props).length === 0) {
|
|
69
|
+
return { type: "object", additionalProperties: true };
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
type: "object",
|
|
73
|
+
properties: props,
|
|
74
|
+
additionalProperties: false,
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Merge kernel globals into an `x-telo-context` schema so chain-access
|
|
79
|
+
* validation recognises `variables`, `secrets`, `resources`, `env`
|
|
80
|
+
* without module authors having to re-declare them.
|
|
81
|
+
*
|
|
82
|
+
* Context-specific properties take precedence over globals (spread order).
|
|
83
|
+
* The original `additionalProperties` setting is preserved.
|
|
84
|
+
*/
|
|
85
|
+
export function mergeKernelGlobalsIntoContext(contextSchema, globalsSchema) {
|
|
86
|
+
return {
|
|
87
|
+
...contextSchema,
|
|
88
|
+
properties: {
|
|
89
|
+
...globalsSchema.properties,
|
|
90
|
+
...(contextSchema.properties ?? {}),
|
|
91
|
+
},
|
|
92
|
+
additionalProperties: contextSchema.additionalProperties ?? false,
|
|
93
|
+
};
|
|
94
|
+
}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type { LoadOptions, ManifestAdapter } from "./types.js";
|
|
1
|
+
import { type ResourceManifest } from "@telorun/sdk";
|
|
2
|
+
import type { LoadOptions, LoaderInitOptions, ManifestAdapter } from "./types.js";
|
|
3
3
|
export declare class Loader {
|
|
4
|
+
private static readonly moduleCache;
|
|
4
5
|
protected adapters: ManifestAdapter[];
|
|
5
|
-
constructor(
|
|
6
|
+
constructor(extraAdaptersOrOptions?: ManifestAdapter[] | LoaderInitOptions);
|
|
6
7
|
register(adapter: ManifestAdapter): this;
|
|
7
8
|
private pick;
|
|
9
|
+
resolveEntryPoint(url: string): Promise<string>;
|
|
8
10
|
loadModule(url: string, options?: LoadOptions): Promise<ResourceManifest[]>;
|
|
11
|
+
loadModuleGraph(entryUrl: string, onError?: (url: string, error: Error) => void): Promise<Map<string, ResourceManifest[]>>;
|
|
9
12
|
loadManifests(entryUrl: string): Promise<ResourceManifest[]>;
|
|
10
13
|
}
|
|
11
14
|
//# sourceMappingURL=manifest-loader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest-loader.d.ts","sourceRoot":"","sources":["../src/manifest-loader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"manifest-loader.d.ts","sourceRoot":"","sources":["../src/manifest-loader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAKtE,OAAO,KAAK,EACV,WAAW,EACX,iBAAiB,EACjB,eAAe,EAGhB,MAAM,YAAY,CAAC;AAEpB,qBAAa,MAAM;IACjB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAG/B;IAEJ,SAAS,CAAC,QAAQ,EAAE,eAAe,EAAE,CAAC;gBAE1B,sBAAsB,GAAE,eAAe,EAAE,GAAG,iBAAsB;IAiB9E,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI;IAKxC,OAAO,CAAC,IAAI;IAMN,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAK/C,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAgF3E,eAAe,CACnB,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,GAC5C,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,gBAAgB,EAAE,CAAC,CAAC;IAsCrC,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;CAoDnE"}
|
package/dist/manifest-loader.js
CHANGED
|
@@ -1,11 +1,25 @@
|
|
|
1
|
+
import { isCompiledValue } from "@telorun/sdk";
|
|
1
2
|
import { isMap, isPair, isScalar, isSeq, parseAllDocuments } from "yaml";
|
|
2
3
|
import { HttpAdapter } from "./adapters/http-adapter.js";
|
|
3
4
|
import { RegistryAdapter } from "./adapters/registry-adapter.js";
|
|
4
5
|
import { precompileDoc } from "./precompile.js";
|
|
5
6
|
export class Loader {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
static moduleCache = new Map();
|
|
8
|
+
adapters;
|
|
9
|
+
constructor(extraAdaptersOrOptions = []) {
|
|
10
|
+
const options = Array.isArray(extraAdaptersOrOptions)
|
|
11
|
+
? { extraAdapters: extraAdaptersOrOptions }
|
|
12
|
+
: extraAdaptersOrOptions;
|
|
13
|
+
const includeHttpAdapter = options.includeHttpAdapter ?? true;
|
|
14
|
+
const includeRegistryAdapter = options.includeRegistryAdapter ?? true;
|
|
15
|
+
this.adapters = [];
|
|
16
|
+
if (includeHttpAdapter)
|
|
17
|
+
this.adapters.push(new HttpAdapter());
|
|
18
|
+
if (includeRegistryAdapter)
|
|
19
|
+
this.adapters.push(new RegistryAdapter(options.registryUrl));
|
|
20
|
+
if (options.extraAdapters?.length) {
|
|
21
|
+
this.adapters.unshift(...options.extraAdapters);
|
|
22
|
+
}
|
|
9
23
|
}
|
|
10
24
|
register(adapter) {
|
|
11
25
|
this.adapters.unshift(adapter);
|
|
@@ -17,8 +31,17 @@ export class Loader {
|
|
|
17
31
|
throw new Error(`No adapter found for: ${url}`);
|
|
18
32
|
return a;
|
|
19
33
|
}
|
|
34
|
+
async resolveEntryPoint(url) {
|
|
35
|
+
const { source } = await this.pick(url).read(url);
|
|
36
|
+
return source;
|
|
37
|
+
}
|
|
20
38
|
async loadModule(url, options) {
|
|
21
39
|
const { text, source } = await this.pick(url).read(url);
|
|
40
|
+
const cacheKey = `${options?.compile ? "compiled" : "raw"}:${source}`;
|
|
41
|
+
const cached = Loader.moduleCache.get(cacheKey);
|
|
42
|
+
if (cached && cached.text === text) {
|
|
43
|
+
return cloneManifestArray(cached.manifests);
|
|
44
|
+
}
|
|
22
45
|
const parsedDocuments = parseAllDocuments(text);
|
|
23
46
|
const rawDocs = parsedDocuments.map((d) => d.toJSON());
|
|
24
47
|
const offsets = documentLineOffsets(text);
|
|
@@ -69,11 +92,58 @@ export class Loader {
|
|
|
69
92
|
if (moduleName) {
|
|
70
93
|
for (const manifest of resolved) {
|
|
71
94
|
if (manifest.kind !== "Kernel.Module" && !manifest.metadata?.module) {
|
|
95
|
+
const pi = manifest.metadata?.positionIndex;
|
|
72
96
|
manifest.metadata = { ...manifest.metadata, module: moduleName };
|
|
97
|
+
if (pi) {
|
|
98
|
+
Object.defineProperty(manifest.metadata, "positionIndex", {
|
|
99
|
+
value: pi,
|
|
100
|
+
enumerable: false,
|
|
101
|
+
writable: true,
|
|
102
|
+
configurable: true,
|
|
103
|
+
});
|
|
104
|
+
}
|
|
73
105
|
}
|
|
74
106
|
}
|
|
75
107
|
}
|
|
76
|
-
|
|
108
|
+
Loader.moduleCache.set(cacheKey, { text, manifests: resolved });
|
|
109
|
+
return cloneManifestArray(resolved);
|
|
110
|
+
}
|
|
111
|
+
async loadModuleGraph(entryUrl, onError) {
|
|
112
|
+
const visited = new Set([entryUrl]);
|
|
113
|
+
const result = new Map();
|
|
114
|
+
const entry = await this.loadModule(entryUrl);
|
|
115
|
+
result.set(entryUrl, entry);
|
|
116
|
+
const queue = [...entry];
|
|
117
|
+
while (queue.length > 0) {
|
|
118
|
+
const m = queue.shift();
|
|
119
|
+
if (m.kind !== "Kernel.Import")
|
|
120
|
+
continue;
|
|
121
|
+
const importSource = m.source;
|
|
122
|
+
if (!importSource)
|
|
123
|
+
continue;
|
|
124
|
+
const base = m.metadata?.source ?? entryUrl;
|
|
125
|
+
const importUrl = importSource.startsWith(".") || importSource.startsWith("/")
|
|
126
|
+
? this.pick(base).resolveRelative(base, importSource)
|
|
127
|
+
: importSource;
|
|
128
|
+
if (visited.has(importUrl))
|
|
129
|
+
continue;
|
|
130
|
+
visited.add(importUrl);
|
|
131
|
+
let imported;
|
|
132
|
+
try {
|
|
133
|
+
imported = await this.loadModule(importUrl);
|
|
134
|
+
}
|
|
135
|
+
catch (err) {
|
|
136
|
+
const error = err instanceof Error ? err : new Error(String(err));
|
|
137
|
+
onError?.(importUrl, error);
|
|
138
|
+
continue;
|
|
139
|
+
}
|
|
140
|
+
result.set(importUrl, imported);
|
|
141
|
+
for (const im of imported) {
|
|
142
|
+
if (im.kind === "Kernel.Import")
|
|
143
|
+
queue.push(im);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
return result;
|
|
77
147
|
}
|
|
78
148
|
async loadManifests(entryUrl) {
|
|
79
149
|
const visited = new Set([entryUrl]);
|
|
@@ -88,7 +158,9 @@ export class Loader {
|
|
|
88
158
|
if (!importSource)
|
|
89
159
|
continue;
|
|
90
160
|
const base = m.metadata?.source ?? entryUrl;
|
|
91
|
-
const importUrl =
|
|
161
|
+
const importUrl = importSource.startsWith(".") || importSource.startsWith("/")
|
|
162
|
+
? this.pick(base).resolveRelative(base, importSource)
|
|
163
|
+
: importSource;
|
|
92
164
|
if (visited.has(importUrl))
|
|
93
165
|
continue;
|
|
94
166
|
visited.add(importUrl);
|
|
@@ -103,11 +175,20 @@ export class Loader {
|
|
|
103
175
|
}
|
|
104
176
|
const importedModule = imported.find((im) => im.kind === "Kernel.Module");
|
|
105
177
|
if (importedModule?.metadata?.name) {
|
|
178
|
+
const pi = m.metadata?.positionIndex;
|
|
106
179
|
m.metadata = {
|
|
107
180
|
...m.metadata,
|
|
108
181
|
resolvedModuleName: importedModule.metadata.name,
|
|
109
182
|
resolvedNamespace: importedModule.metadata.namespace ?? null,
|
|
110
183
|
};
|
|
184
|
+
if (pi) {
|
|
185
|
+
Object.defineProperty(m.metadata, "positionIndex", {
|
|
186
|
+
value: pi,
|
|
187
|
+
enumerable: false,
|
|
188
|
+
writable: true,
|
|
189
|
+
configurable: true,
|
|
190
|
+
});
|
|
191
|
+
}
|
|
111
192
|
}
|
|
112
193
|
for (const im of imported) {
|
|
113
194
|
if (im.kind === "Kernel.Definition")
|
|
@@ -119,6 +200,30 @@ export class Loader {
|
|
|
119
200
|
return [...entry, ...importedDefs];
|
|
120
201
|
}
|
|
121
202
|
}
|
|
203
|
+
function cloneManifestArray(manifests) {
|
|
204
|
+
return manifests.map((manifest) => cloneManifestValue(manifest));
|
|
205
|
+
}
|
|
206
|
+
function cloneManifestValue(value) {
|
|
207
|
+
if (Array.isArray(value)) {
|
|
208
|
+
return value.map((entry) => cloneManifestValue(entry));
|
|
209
|
+
}
|
|
210
|
+
if (isCompiledValue(value)) {
|
|
211
|
+
return value;
|
|
212
|
+
}
|
|
213
|
+
if (value !== null && typeof value === "object") {
|
|
214
|
+
const source = value;
|
|
215
|
+
const clone = {};
|
|
216
|
+
for (const [key, entry] of Object.entries(source)) {
|
|
217
|
+
clone[key] = cloneManifestValue(entry);
|
|
218
|
+
}
|
|
219
|
+
const positionIndex = Object.getOwnPropertyDescriptor(source, "positionIndex");
|
|
220
|
+
if (positionIndex) {
|
|
221
|
+
Object.defineProperty(clone, "positionIndex", positionIndex);
|
|
222
|
+
}
|
|
223
|
+
return clone;
|
|
224
|
+
}
|
|
225
|
+
return value;
|
|
226
|
+
}
|
|
122
227
|
function documentLineOffsets(text) {
|
|
123
228
|
const offsets = [0];
|
|
124
229
|
const lines = text.split("\n");
|
package/dist/schema-compat.d.ts
CHANGED
|
@@ -37,6 +37,6 @@ export declare function celTypeSatisfiesJsonSchema(celType: string, schema: Reco
|
|
|
37
37
|
export declare function celPlaceholderForSchema(schema: Record<string, any>): unknown;
|
|
38
38
|
/** Deep-clone `data`, replacing every pure CEL template string (`${{ expr }}`) with a
|
|
39
39
|
* schema-appropriate placeholder so AJV can validate non-CEL fields without false positives. */
|
|
40
|
-
export declare function substituteCelFields(data: unknown, schema: Record<string, any>): unknown;
|
|
40
|
+
export declare function substituteCelFields(data: unknown, schema: Record<string, any>, rootSchema?: Record<string, any>): unknown;
|
|
41
41
|
export {};
|
|
42
42
|
//# sourceMappingURL=schema-compat.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-compat.d.ts","sourceRoot":"","sources":["../src/schema-compat.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,GAAG,KAA0C,CAAC;AAEpD;0FAC0F;AAC1F,wBAAgB,SAAS,IAAI,YAAY,CAAC,OAAO,GAAG,CAAC,CAMpD;
|
|
1
|
+
{"version":3,"file":"schema-compat.d.ts","sourceRoot":"","sources":["../src/schema-compat.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,GAAG,KAA0C,CAAC;AAEpD;0FAC0F;AAC1F,wBAAgB,SAAS,IAAI,YAAY,CAAC,OAAO,GAAG,CAAC,CAMpD;AAKD,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED;;oEAEoE;AACpE,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC3B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAC1B,mBAAmB,CAIrB;AAiDD,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,CAelD;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,IAAI,GAAG,SAAS,GAA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
|
const ajv = createAjv();
|
|
14
|
+
const compiledSchemaValidators = new WeakMap();
|
|
14
15
|
/** Conservative structural JSON Schema compatibility check.
|
|
15
16
|
* Only flags definite mismatches: missing required fields and primitive type conflicts.
|
|
16
17
|
* Ambiguous cases (anyOf/oneOf/etc.) are treated as compatible. */
|
|
@@ -51,7 +52,19 @@ function checkProperty(source, target, path, issues) {
|
|
|
51
52
|
}
|
|
52
53
|
export function formatSingleError(err) {
|
|
53
54
|
const p = err.instancePath || "/";
|
|
54
|
-
|
|
55
|
+
const params = err.params ?? {};
|
|
56
|
+
switch (err.keyword) {
|
|
57
|
+
case "additionalProperties":
|
|
58
|
+
return `${p} must NOT have additional properties ('${params.additionalProperty}' is not allowed)`;
|
|
59
|
+
case "required":
|
|
60
|
+
return `${p} is missing required property '${params.missingProperty}'`;
|
|
61
|
+
case "enum":
|
|
62
|
+
return `${p} ${err.message ?? "is invalid"} (${params.allowedValues?.join(" | ")})`;
|
|
63
|
+
case "type":
|
|
64
|
+
return `${p} must be ${params.type} (got ${typeof err.data})`;
|
|
65
|
+
default:
|
|
66
|
+
return `${p} ${err.message ?? "is invalid"}`;
|
|
67
|
+
}
|
|
55
68
|
}
|
|
56
69
|
export function formatAjvErrors(errors) {
|
|
57
70
|
if (!errors || errors.length === 0)
|
|
@@ -81,12 +94,15 @@ function ajvErrorToPath(err) {
|
|
|
81
94
|
}
|
|
82
95
|
/** Validate actual data against a JSON Schema. Returns issues with path info, or empty array if valid. */
|
|
83
96
|
export function validateAgainstSchema(data, schema) {
|
|
84
|
-
let validate;
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
97
|
+
let validate = compiledSchemaValidators.get(schema);
|
|
98
|
+
if (!validate) {
|
|
99
|
+
try {
|
|
100
|
+
validate = ajv.compile(schema);
|
|
101
|
+
compiledSchemaValidators.set(schema, validate);
|
|
102
|
+
}
|
|
103
|
+
catch {
|
|
104
|
+
return [];
|
|
105
|
+
}
|
|
90
106
|
}
|
|
91
107
|
if (validate(data))
|
|
92
108
|
return [];
|
|
@@ -153,13 +169,20 @@ export function jsonSchemaToCelType(schema) {
|
|
|
153
169
|
if (Array.isArray(schema.type))
|
|
154
170
|
return "dyn";
|
|
155
171
|
switch (schema.type) {
|
|
156
|
-
case "integer":
|
|
157
|
-
|
|
158
|
-
case "
|
|
159
|
-
|
|
160
|
-
case "
|
|
161
|
-
|
|
162
|
-
case "
|
|
172
|
+
case "integer":
|
|
173
|
+
return "int";
|
|
174
|
+
case "number":
|
|
175
|
+
return "double";
|
|
176
|
+
case "string":
|
|
177
|
+
return "string";
|
|
178
|
+
case "boolean":
|
|
179
|
+
return "bool";
|
|
180
|
+
case "array":
|
|
181
|
+
return "list";
|
|
182
|
+
case "object":
|
|
183
|
+
return "map";
|
|
184
|
+
case "null":
|
|
185
|
+
return "null_type";
|
|
163
186
|
}
|
|
164
187
|
if (schema.properties)
|
|
165
188
|
return "map";
|
|
@@ -200,33 +223,64 @@ export function celPlaceholderForSchema(schema) {
|
|
|
200
223
|
return schema.default;
|
|
201
224
|
switch (schema.type) {
|
|
202
225
|
case "integer":
|
|
203
|
-
case "number":
|
|
204
|
-
|
|
205
|
-
case "
|
|
206
|
-
|
|
207
|
-
case "
|
|
208
|
-
|
|
226
|
+
case "number":
|
|
227
|
+
return schema.minimum ?? 0;
|
|
228
|
+
case "string":
|
|
229
|
+
return "";
|
|
230
|
+
case "boolean":
|
|
231
|
+
return false;
|
|
232
|
+
case "array":
|
|
233
|
+
return [];
|
|
234
|
+
case "object":
|
|
235
|
+
return {};
|
|
236
|
+
default:
|
|
237
|
+
return null;
|
|
209
238
|
}
|
|
210
239
|
}
|
|
211
240
|
const CEL_PURE_RE = /^\s*\$\{\{[^}]*\}\}\s*$/;
|
|
241
|
+
/** Resolve a `$ref` (only `#/$defs/...` form) against the root schema. */
|
|
242
|
+
function resolveRef(schema, root) {
|
|
243
|
+
if (schema.$ref && typeof schema.$ref === "string" && schema.$ref.startsWith("#/$defs/")) {
|
|
244
|
+
const defName = schema.$ref.slice("#/$defs/".length);
|
|
245
|
+
const resolved = root.$defs?.[defName];
|
|
246
|
+
if (resolved)
|
|
247
|
+
return resolved;
|
|
248
|
+
}
|
|
249
|
+
return schema;
|
|
250
|
+
}
|
|
251
|
+
/** Collect property schemas from top-level `properties` and all `oneOf`/`anyOf` sub-schemas. */
|
|
252
|
+
function collectProperties(schema) {
|
|
253
|
+
const props = { ...(schema.properties ?? {}) };
|
|
254
|
+
for (const sub of schema.oneOf ?? schema.anyOf ?? []) {
|
|
255
|
+
if (sub && typeof sub === "object" && sub.properties) {
|
|
256
|
+
for (const [k, v] of Object.entries(sub.properties)) {
|
|
257
|
+
if (!(k in props))
|
|
258
|
+
props[k] = v;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
return props;
|
|
263
|
+
}
|
|
212
264
|
/** Deep-clone `data`, replacing every pure CEL template string (`${{ expr }}`) with a
|
|
213
265
|
* schema-appropriate placeholder so AJV can validate non-CEL fields without false positives. */
|
|
214
|
-
export function substituteCelFields(data, schema) {
|
|
266
|
+
export function substituteCelFields(data, schema, rootSchema) {
|
|
267
|
+
const root = rootSchema ?? schema;
|
|
268
|
+
const resolved = resolveRef(schema, root);
|
|
215
269
|
if (typeof data === "string" && CEL_PURE_RE.test(data)) {
|
|
216
|
-
return celPlaceholderForSchema(
|
|
270
|
+
return celPlaceholderForSchema(resolved);
|
|
217
271
|
}
|
|
218
272
|
if (Array.isArray(data)) {
|
|
219
|
-
const itemSchema = (
|
|
220
|
-
return data.map((item) => substituteCelFields(item, itemSchema));
|
|
273
|
+
const itemSchema = resolveRef((resolved.items ?? {}), root);
|
|
274
|
+
return data.map((item) => substituteCelFields(item, itemSchema, root));
|
|
221
275
|
}
|
|
222
276
|
if (data !== null && typeof data === "object") {
|
|
223
|
-
const props = (
|
|
224
|
-
const addlProps =
|
|
225
|
-
?
|
|
277
|
+
const props = collectProperties(resolved);
|
|
278
|
+
const addlProps = resolved.additionalProperties && typeof resolved.additionalProperties === "object"
|
|
279
|
+
? resolved.additionalProperties
|
|
226
280
|
: undefined;
|
|
227
281
|
const result = {};
|
|
228
282
|
for (const [k, v] of Object.entries(data)) {
|
|
229
|
-
result[k] = substituteCelFields(v, (props[k] ?? addlProps ?? {}));
|
|
283
|
+
result[k] = substituteCelFields(v, (props[k] ?? addlProps ?? {}), root);
|
|
230
284
|
}
|
|
231
285
|
return result;
|
|
232
286
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export declare const DiagnosticSeverity: {
|
|
|
7
7
|
readonly Hint: 4;
|
|
8
8
|
};
|
|
9
9
|
export type DiagnosticSeverity = (typeof DiagnosticSeverity)[keyof typeof DiagnosticSeverity];
|
|
10
|
+
/** Default entry-point filename when a directory is given instead of a file. */
|
|
11
|
+
export declare const DEFAULT_MANIFEST_FILENAME = "telo.yaml";
|
|
10
12
|
export interface Position {
|
|
11
13
|
/** 0-based line number */
|
|
12
14
|
line: number;
|
|
@@ -48,6 +50,16 @@ export interface LoadOptions {
|
|
|
48
50
|
* the analyzer works on raw strings and does not need compiled values. */
|
|
49
51
|
compile?: boolean;
|
|
50
52
|
}
|
|
53
|
+
export interface LoaderInitOptions {
|
|
54
|
+
/** Adapters inserted with highest priority before built-ins. */
|
|
55
|
+
extraAdapters?: ManifestAdapter[];
|
|
56
|
+
/** Include built-in HttpAdapter. Defaults to true. */
|
|
57
|
+
includeHttpAdapter?: boolean;
|
|
58
|
+
/** Include built-in RegistryAdapter. Defaults to true. */
|
|
59
|
+
includeRegistryAdapter?: boolean;
|
|
60
|
+
/** Base URL used by built-in RegistryAdapter when enabled. */
|
|
61
|
+
registryUrl?: string;
|
|
62
|
+
}
|
|
51
63
|
export interface AnalysisOptions {
|
|
52
64
|
strictContexts?: boolean;
|
|
53
65
|
}
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceR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AC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC7D,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;CACzD;AAED,MAAM,WAAW,WAAW;IAC1B;;;+EAG2E;IAC3E,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC,gEAAgE;IAChE,aAAa,CAAC,EAAE,eAAe,EAAE,CAAC;IAClC,sDAAsD;IACtD,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,0DAA0D;IAC1D,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,8DAA8D;IAC9D,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,eAAe;IAC9B,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;;;;gEAKgE;AAChE,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,OAAO,qBAAqB,EAAE,aAAa,CAAC;IACtD,WAAW,CAAC,EAAE,OAAO,0BAA0B,EAAE,kBAAkB,CAAC;CACrE"}
|
package/dist/types.js
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import type { ASTNode } from "@marcbachmann/cel-js";
|
|
2
|
+
/**
|
|
3
|
+
* Resolve a type field value (string name, inline type, or raw schema) to a JSON Schema.
|
|
4
|
+
* - String: look up the named type in allManifests (Type.JsonSchema resources)
|
|
5
|
+
* - Object with `kind` + `schema`: inline type definition → return the `schema`
|
|
6
|
+
* - Object with `type` or `properties`: raw JSON Schema, return as-is
|
|
7
|
+
*/
|
|
8
|
+
export declare function resolveTypeFieldToSchema(value: unknown, allManifests: Record<string, any>[]): Record<string, any> | undefined;
|
|
2
9
|
/**
|
|
3
10
|
* Extract all member-access chains from a CEL AST.
|
|
4
11
|
* Returns arrays like ["request", "query", "name"] for `request.query.name`.
|
|
@@ -14,11 +21,26 @@ export declare function extractAccessChains(node: ASTNode): string[][];
|
|
|
14
21
|
*/
|
|
15
22
|
export declare function validateChainAgainstSchema(chain: string[], schema: Record<string, any>): string | null;
|
|
16
23
|
/**
|
|
17
|
-
* Returns true when a CEL expression path (from walkCelExpressions, e.g. "routes[0].
|
|
18
|
-
* falls within the
|
|
24
|
+
* Returns true when a CEL expression path (from walkCelExpressions, e.g. "routes[0].inputs.q")
|
|
25
|
+
* falls within the scope of a context (e.g. "$.routes[*].inputs").
|
|
19
26
|
*
|
|
20
|
-
* The
|
|
21
|
-
*
|
|
27
|
+
* The scope is matched directly (no sibling sharing): a context at "$.routes[*].inputs" only
|
|
28
|
+
* applies to expressions whose path starts with "routes[N].inputs", not to other sibling fields.
|
|
22
29
|
*/
|
|
23
30
|
export declare function pathMatchesScope(exprPath: string, scope: string): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Resolves `x-telo-context-from` annotations in a context schema using the concrete
|
|
33
|
+
* manifest item. Navigates the manifest item at the given slash-separated path and merges
|
|
34
|
+
* the result as named properties into the annotated node (locking additionalProperties: false).
|
|
35
|
+
*
|
|
36
|
+
* Example: `x-telo-context-from: "request/schema"` on the `request` context node replaces
|
|
37
|
+
* the open `request` schema with a closed schema whose properties are the keys of
|
|
38
|
+
* `manifestItem.request.schema` (e.g. `query`, `body`, `params`, `headers`).
|
|
39
|
+
*/
|
|
40
|
+
export declare function resolveContextAnnotations(schema: Record<string, any>, manifestItem: Record<string, any>, allManifests?: Record<string, any>[]): Record<string, any>;
|
|
41
|
+
/**
|
|
42
|
+
* Extracts the concrete manifest array item for a given expression path + scope.
|
|
43
|
+
* e.g. exprPath="routes[0].inputs.q", scope="$.routes[*].inputs" → manifest.routes[0]
|
|
44
|
+
*/
|
|
45
|
+
export declare function getManifestItem(exprPath: string, scope: string, manifest: Record<string, any>): Record<string, any>;
|
|
24
46
|
//# sourceMappingURL=validate-cel-context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate-cel-context.d.ts","sourceRoot":"","sources":["../src/validate-cel-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,EAAE,EAAE,CAI7D;AAwED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,MAAM,EAAE,EACf,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAC1B,MAAM,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"validate-cel-context.d.ts","sourceRoot":"","sources":["../src/validate-cel-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpD;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,OAAO,EACd,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,GAClC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,CA6BjC;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,EAAE,EAAE,CAI7D;AAwED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,MAAM,EAAE,EACf,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAC1B,MAAM,GAAG,IAAI,CAmBf;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAoBzE;AAED;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC3B,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACjC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,GAC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