@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
package/README.md
ADDED
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
# ⚡ Telo
|
|
2
|
+
|
|
3
|
+
Runtime for declarative backends.
|
|
4
|
+
|
|
5
|
+
Telo is an execution engine (Micro-Kernel) that runs logic defined entirely in YAML manifests. Instead of writing imperative backend code, you define your routes, databases, schemas, and AI workflows as atomic, interconnected YAML documents. Telo takes those manifests and runs them.
|
|
6
|
+
|
|
7
|
+
Built to be language-agnostic and infinitely extensible.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# Reconcile your manifest into a running backend
|
|
11
|
+
$ telo ./examples/hello-api.yaml
|
|
12
|
+
|
|
13
|
+
{"level":30,"time":1771610393008,"pid":1310178,"hostname":"dev","msg":"Server listening at http://127.0.0.1:8844"}
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Why use Telo?
|
|
17
|
+
|
|
18
|
+
- **Open Standards:** Built on YAML, JSON Schema, and CEL — no proprietary DSL.
|
|
19
|
+
- **Static Analysis:** CEL type checking, reference validation, and IDE diagnostics catch errors before runtime.
|
|
20
|
+
- **Micro-Kernel Architecture:** Telo itself knows nothing about HTTP or SQL. Everything is a module you import, scope, and compose with typed variable and secret contracts.
|
|
21
|
+
- **Language Agnostic:** Available as a Node.js runtime today, with a shared YAML runtime contract that allows for future Rust or Go implementations without changing your manifests.
|
|
22
|
+
|
|
23
|
+
## What It Does
|
|
24
|
+
|
|
25
|
+
- **Loads** YAML resources and compiles CEL expressions (`${{ }}`) into an in-memory registry.
|
|
26
|
+
- **Resolves** resource dependencies via a multi-pass init loop, handling ordering automatically.
|
|
27
|
+
- **Indexes** resources by Kind and Name for constant-time lookup.
|
|
28
|
+
- **Dispatches** execution to the controller that owns each Kind.
|
|
29
|
+
|
|
30
|
+
Manifests also support directives for dynamic generation: `$let`, `$if`, `$for`, `$eval`, and `$include`. See [CEL-YAML Templating](./yaml-cel-templating/README.md) for documentation.
|
|
31
|
+
|
|
32
|
+
## Example manifest
|
|
33
|
+
|
|
34
|
+
Here is an example Telo application that defines a simple HTTP API:
|
|
35
|
+
|
|
36
|
+
```yaml
|
|
37
|
+
kind: Kernel.Module
|
|
38
|
+
metadata:
|
|
39
|
+
name: feedback
|
|
40
|
+
version: 1.0.0
|
|
41
|
+
description: |
|
|
42
|
+
A complete feedback collection REST API — no code, pure YAML.
|
|
43
|
+
Persists entries to SQLite and serves them over HTTP.
|
|
44
|
+
targets:
|
|
45
|
+
- Migrations
|
|
46
|
+
- Server
|
|
47
|
+
---
|
|
48
|
+
kind: Kernel.Import
|
|
49
|
+
metadata:
|
|
50
|
+
name: Http
|
|
51
|
+
source: ../modules/http-server
|
|
52
|
+
---
|
|
53
|
+
kind: Kernel.Import
|
|
54
|
+
metadata:
|
|
55
|
+
name: Sql
|
|
56
|
+
source: ../modules/sql
|
|
57
|
+
---
|
|
58
|
+
# SQLite database — swap driver/host/database for PostgreSQL with zero YAML changes
|
|
59
|
+
kind: Sql.Connection
|
|
60
|
+
metadata:
|
|
61
|
+
name: Db
|
|
62
|
+
driver: sqlite
|
|
63
|
+
file: ./tmp/feedback.db
|
|
64
|
+
---
|
|
65
|
+
# Migrations: applied automatically before the server starts
|
|
66
|
+
kind: Sql.Migrations
|
|
67
|
+
metadata:
|
|
68
|
+
name: Migrations
|
|
69
|
+
connection:
|
|
70
|
+
kind: Sql.Connection
|
|
71
|
+
name: Db
|
|
72
|
+
---
|
|
73
|
+
kind: Sql.Migration
|
|
74
|
+
metadata:
|
|
75
|
+
name: Migration_20260413_182154_CreateFeedback
|
|
76
|
+
sql: |
|
|
77
|
+
CREATE TABLE IF NOT EXISTS feedback (
|
|
78
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
79
|
+
text TEXT NOT NULL,
|
|
80
|
+
source TEXT,
|
|
81
|
+
score INTEGER NOT NULL DEFAULT 0,
|
|
82
|
+
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
|
|
83
|
+
)
|
|
84
|
+
---
|
|
85
|
+
kind: Http.Server
|
|
86
|
+
metadata:
|
|
87
|
+
name: Server
|
|
88
|
+
baseUrl: http://localhost:8844
|
|
89
|
+
port: 8844
|
|
90
|
+
logger: true
|
|
91
|
+
openapi:
|
|
92
|
+
info:
|
|
93
|
+
title: Feedback API
|
|
94
|
+
version: 1.0.0
|
|
95
|
+
mounts:
|
|
96
|
+
- path: /v1
|
|
97
|
+
type: Http.Api.FeedbackRoutes
|
|
98
|
+
---
|
|
99
|
+
kind: Http.Api
|
|
100
|
+
metadata:
|
|
101
|
+
name: FeedbackRoutes
|
|
102
|
+
routes:
|
|
103
|
+
# POST /v1/feedback — insert a new entry, score derived from body length heuristic
|
|
104
|
+
- request:
|
|
105
|
+
path: /feedback
|
|
106
|
+
method: POST
|
|
107
|
+
schema:
|
|
108
|
+
body:
|
|
109
|
+
type: object
|
|
110
|
+
properties:
|
|
111
|
+
text:
|
|
112
|
+
type: string
|
|
113
|
+
minLength: 1
|
|
114
|
+
source:
|
|
115
|
+
type: string
|
|
116
|
+
required: [text]
|
|
117
|
+
handler:
|
|
118
|
+
kind: Sql.Exec
|
|
119
|
+
connection:
|
|
120
|
+
kind: Sql.Connection
|
|
121
|
+
name: Db
|
|
122
|
+
inputs:
|
|
123
|
+
sql: "INSERT INTO feedback (text, source, score) VALUES (?, ?, ?)"
|
|
124
|
+
bindings:
|
|
125
|
+
- "${{ request.body.text }}"
|
|
126
|
+
- "${{ request.body.source }}"
|
|
127
|
+
- "${{ size(request.body.text) }}"
|
|
128
|
+
response:
|
|
129
|
+
- status: 201
|
|
130
|
+
headers:
|
|
131
|
+
Content-Type: application/json
|
|
132
|
+
body:
|
|
133
|
+
ok: true
|
|
134
|
+
message: Feedback received
|
|
135
|
+
|
|
136
|
+
# GET /v1/feedback — list all entries, newest first
|
|
137
|
+
- request:
|
|
138
|
+
path: /feedback
|
|
139
|
+
method: GET
|
|
140
|
+
handler:
|
|
141
|
+
kind: Sql.Select
|
|
142
|
+
connection:
|
|
143
|
+
kind: Sql.Connection
|
|
144
|
+
name: Db
|
|
145
|
+
from: feedback
|
|
146
|
+
columns: [id, text, source, score, created_at]
|
|
147
|
+
orderBy:
|
|
148
|
+
- { column: created_at, direction: desc }
|
|
149
|
+
response:
|
|
150
|
+
- status: 200
|
|
151
|
+
headers:
|
|
152
|
+
Content-Type: application/json
|
|
153
|
+
body: "${{ result.rows }}"
|
|
154
|
+
|
|
155
|
+
# GET /v1/feedback/{id} — fetch a single entry
|
|
156
|
+
- request:
|
|
157
|
+
path: /feedback/{id}
|
|
158
|
+
method: GET
|
|
159
|
+
schema:
|
|
160
|
+
params:
|
|
161
|
+
type: object
|
|
162
|
+
properties:
|
|
163
|
+
id:
|
|
164
|
+
type: integer
|
|
165
|
+
required: [id]
|
|
166
|
+
handler:
|
|
167
|
+
kind: Sql.Select
|
|
168
|
+
connection:
|
|
169
|
+
kind: Sql.Connection
|
|
170
|
+
name: Db
|
|
171
|
+
from: feedback
|
|
172
|
+
columns: [id, text, source, score, created_at]
|
|
173
|
+
where:
|
|
174
|
+
- { column: id, op: "=", value: "${{ request.params.id }}" }
|
|
175
|
+
response:
|
|
176
|
+
- status: 200
|
|
177
|
+
when: "size(result.rows) > 0"
|
|
178
|
+
headers:
|
|
179
|
+
Content-Type: application/json
|
|
180
|
+
body: "${{ result.rows[0] }}"
|
|
181
|
+
- status: 404
|
|
182
|
+
headers:
|
|
183
|
+
Content-Type: application/json
|
|
184
|
+
body:
|
|
185
|
+
ok: false
|
|
186
|
+
message: Not found
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
## Status
|
|
190
|
+
|
|
191
|
+
Telo is under **active development**. The core runtime, module system, and standard library are functional, but the API surface — including YAML shapes — may change without notice. Not yet recommended for production use.
|
|
192
|
+
|
|
193
|
+
## The Meaning of Telo
|
|
194
|
+
|
|
195
|
+
The name Telo is derived from the Greek root Telos - meaning the "end goal", "purpose", or "final state". That is exactly the philosophy behind this runtime. In standard imperative programming, you have to write thousands of lines of code to tell a server exactly how to start. With Telo, you simply declare your desired final state.
|
|
196
|
+
|
|
197
|
+
You define the end state. Telo makes it real.
|
|
198
|
+
|
|
199
|
+
## Philosophy
|
|
200
|
+
|
|
201
|
+
Modern platforms often spend disproportionate effort on technical mechanics-wiring frameworks, managing infrastructure, and negotiating toolchains-while the original business problem gets delayed or diluted. Telo pushes in the opposite direction: it treats kernel execution as a stable, predictable host so teams can concentrate on the **business logic and outcomes** instead of the plumbing.
|
|
202
|
+
|
|
203
|
+
By separating "what the system should do" from "how it is hosted", the runtime reduces friction for domain‑level changes. Teams can move faster on product requirements, experiment more safely, and keep conversations centered on value delivered rather than implementation trivia.
|
|
204
|
+
|
|
205
|
+
Telo also aims to **join forces across all programming language communities**, so the best ideas, patterns, and implementations can converge into a shared kernel truth without forcing everyone into a single stack.
|
|
206
|
+
|
|
207
|
+
YAML also makes the system more **AI‑friendly** than traditional programming languages: it is explicit, structured, and easier for tools to generate, review, and transform without losing intent.
|
|
208
|
+
|
|
209
|
+
## Modularity
|
|
210
|
+
|
|
211
|
+
Telo is built around **modules** that own specific resource kinds. A module is loaded from a manifest, declares which kinds it implements, and then receives only the resources of those kinds. This keeps concerns isolated and lets teams compose systems from focused building blocks rather than monolithic services.
|
|
212
|
+
|
|
213
|
+
At kernel execution time, execution is always routed by **Kind.Name**. The kernel resolves the Kind to its owning module and hands off execution. Modules can call back into the kernel to execute other resources, enabling composition without tight coupling.
|
|
214
|
+
|
|
215
|
+
## Architecture
|
|
216
|
+
|
|
217
|
+
The architecture is inspired by Kubernetes-style manifests: declarative resources, explicit kinds, and a control plane that routes work based on those definitions.
|
|
218
|
+
Those manifests were taken to the next level by allowing them to run inside a standalone runtime host.
|
|
219
|
+
|
|
220
|
+
## See more at
|
|
221
|
+
|
|
222
|
+
- [Telo Kernel](./kernel/README.md)
|
|
223
|
+
- [CEL-YAML Templating](./yaml-cel-templating/README.md)
|
|
224
|
+
- [Telo SDK for module authors](sdk/README.md)
|
|
225
|
+
- [Modules](modules/README.md)
|
|
226
|
+
|
|
227
|
+
## License
|
|
228
|
+
|
|
229
|
+
See [LICENSE](https://github.com/telorun/telo/blob/main/LICENSE).
|
|
230
|
+
|
|
231
|
+
## Contribution Note
|
|
232
|
+
|
|
233
|
+
By contributing, you agree that code and examples in this repository may be translated or re‑implemented in other programming languages (including by AI systems) to support the project’s polyglot goals.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-adapter.d.ts","sourceRoot":"","sources":["../../src/adapters/http-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"http-adapter.d.ts","sourceRoot":"","sources":["../../src/adapters/http-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9E,qBAAa,WAAY,YAAW,eAAe;IACjD,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAIxB,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAWlE,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM;CAIxD"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { DEFAULT_MANIFEST_FILENAME } from "../types.js";
|
|
1
2
|
export class HttpAdapter {
|
|
2
3
|
supports(url) {
|
|
3
4
|
return url.startsWith("http://") || url.startsWith("https://");
|
|
4
5
|
}
|
|
5
6
|
async read(url) {
|
|
6
|
-
const fetchUrl = url.includes(".yaml") ? url : `${url}
|
|
7
|
+
const fetchUrl = url.includes(".yaml") ? url : `${url}/${DEFAULT_MANIFEST_FILENAME}`;
|
|
7
8
|
const response = await fetch(fetchUrl);
|
|
8
9
|
if (!response.ok) {
|
|
9
10
|
throw new Error(`Failed to fetch manifest from ${fetchUrl}: ${response.status} ${response.statusText}`);
|
|
@@ -11,7 +12,7 @@ export class HttpAdapter {
|
|
|
11
12
|
return { text: await response.text(), source: fetchUrl };
|
|
12
13
|
}
|
|
13
14
|
resolveRelative(base, relative) {
|
|
14
|
-
const
|
|
15
|
-
return new URL(relative,
|
|
15
|
+
const baseDir = base.endsWith("/") ? base : base.slice(0, base.lastIndexOf("/") + 1);
|
|
16
|
+
return new URL(relative, baseDir).href;
|
|
16
17
|
}
|
|
17
18
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ManifestAdapter } from "../types.js";
|
|
2
2
|
/** Node.js fs-based ManifestAdapter for local files. Not browser-compatible. */
|
|
3
3
|
export declare class NodeAdapter implements ManifestAdapter {
|
|
4
4
|
private readonly cwd;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-adapter.d.ts","sourceRoot":"","sources":["../../src/adapters/node-adapter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"node-adapter.d.ts","sourceRoot":"","sources":["../../src/adapters/node-adapter.ts"],"names":[],"mappings":"AAEA,OAAO,EAA6B,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9E,gFAAgF;AAChF,qBAAa,WAAY,YAAW,eAAe;IACrC,OAAO,CAAC,QAAQ,CAAC,GAAG;gBAAH,GAAG,GAAE,MAAsB;IAExD,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAUxB,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IASlE,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM;CAKxD;AAED,qDAAqD;AACrD,wBAAgB,iBAAiB,CAAC,GAAG,GAAE,MAAsB,GAAG,eAAe,CAE9E"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as fs from "fs/promises";
|
|
2
2
|
import * as path from "path";
|
|
3
|
+
import { DEFAULT_MANIFEST_FILENAME } from "../types.js";
|
|
3
4
|
/** Node.js fs-based ManifestAdapter for local files. Not browser-compatible. */
|
|
4
5
|
export class NodeAdapter {
|
|
5
6
|
cwd;
|
|
@@ -16,7 +17,7 @@ export class NodeAdapter {
|
|
|
16
17
|
async read(url) {
|
|
17
18
|
const filePath = url.startsWith("file://") ? new URL(url).pathname : url;
|
|
18
19
|
const stat = await fs.stat(filePath).catch(() => null);
|
|
19
|
-
const resolvedPath = stat?.isDirectory() ? path.join(filePath,
|
|
20
|
+
const resolvedPath = stat?.isDirectory() ? path.join(filePath, DEFAULT_MANIFEST_FILENAME) : filePath;
|
|
20
21
|
const text = await fs.readFile(resolvedPath, "utf8");
|
|
21
22
|
return { text, source: resolvedPath };
|
|
22
23
|
}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ManifestAdapter } from "../types.js";
|
|
2
2
|
export declare class RegistryAdapter implements ManifestAdapter {
|
|
3
|
+
private registryUrl;
|
|
4
|
+
constructor(registryUrl?: string);
|
|
3
5
|
supports(url: string): boolean;
|
|
4
6
|
read(moduleRef: string): Promise<{
|
|
5
7
|
text: string;
|
|
6
8
|
source: string;
|
|
7
9
|
}>;
|
|
8
10
|
resolveRelative(base: string, relative: string): string;
|
|
11
|
+
private toRegistryModuleBase;
|
|
9
12
|
private toRegistryUrl;
|
|
13
|
+
private parseModuleRef;
|
|
10
14
|
}
|
|
11
15
|
//# sourceMappingURL=registry-adapter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry-adapter.d.ts","sourceRoot":"","sources":["../../src/adapters/registry-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"registry-adapter.d.ts","sourceRoot":"","sources":["../../src/adapters/registry-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAI9E,qBAAa,eAAgB,YAAW,eAAe;IACzC,OAAO,CAAC,WAAW;gBAAX,WAAW,SAAuB;IAEtD,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAWxB,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAWxE,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM;IAMvD,OAAO,CAAC,oBAAoB;IAM5B,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,cAAc;CAmBvB"}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import { DEFAULT_MANIFEST_FILENAME } from "../types.js";
|
|
2
|
+
const DEFAULT_REGISTRY_URL = "https://registry.telo.run";
|
|
2
3
|
export class RegistryAdapter {
|
|
4
|
+
registryUrl;
|
|
5
|
+
constructor(registryUrl = DEFAULT_REGISTRY_URL) {
|
|
6
|
+
this.registryUrl = registryUrl;
|
|
7
|
+
}
|
|
3
8
|
supports(url) {
|
|
4
9
|
return (!url.startsWith("http://") &&
|
|
5
10
|
!url.startsWith("https://") &&
|
|
@@ -17,17 +22,32 @@ export class RegistryAdapter {
|
|
|
17
22
|
return { text: await response.text(), source: fetchUrl };
|
|
18
23
|
}
|
|
19
24
|
resolveRelative(base, relative) {
|
|
20
|
-
const baseUrl = this.supports(base)
|
|
21
|
-
? this.toRegistryUrl(base).replace("/module.yaml", "")
|
|
22
|
-
: base;
|
|
25
|
+
const baseUrl = this.supports(base) ? this.toRegistryModuleBase(base) : base;
|
|
23
26
|
const baseWithSlash = baseUrl.endsWith("/") ? baseUrl : `${baseUrl}/`;
|
|
24
27
|
return new URL(relative, baseWithSlash).href;
|
|
25
28
|
}
|
|
29
|
+
toRegistryModuleBase(moduleRef) {
|
|
30
|
+
const parsed = this.parseModuleRef(moduleRef);
|
|
31
|
+
const normalizedBase = this.registryUrl.replace(/\/+$/, "");
|
|
32
|
+
return `${normalizedBase}/${parsed.modulePath}/${parsed.version}`;
|
|
33
|
+
}
|
|
26
34
|
toRegistryUrl(moduleRef) {
|
|
35
|
+
return `${this.toRegistryModuleBase(moduleRef)}/${DEFAULT_MANIFEST_FILENAME}`;
|
|
36
|
+
}
|
|
37
|
+
parseModuleRef(moduleRef) {
|
|
27
38
|
const atIdx = moduleRef.lastIndexOf("@");
|
|
39
|
+
if (atIdx <= 0 || atIdx === moduleRef.length - 1) {
|
|
40
|
+
throw new Error(`Invalid module reference '${moduleRef}', expected namespace/name@version`);
|
|
41
|
+
}
|
|
28
42
|
const modulePath = moduleRef.slice(0, atIdx);
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
43
|
+
if (!modulePath.includes("/")) {
|
|
44
|
+
throw new Error(`Invalid module reference '${moduleRef}', expected namespace/name@version`);
|
|
45
|
+
}
|
|
46
|
+
const rawVersion = moduleRef.slice(atIdx + 1);
|
|
47
|
+
const version = rawVersion.startsWith("v") ? rawVersion.substring(1) : rawVersion;
|
|
48
|
+
if (!version) {
|
|
49
|
+
throw new Error(`Invalid module reference '${moduleRef}', expected namespace/name@version`);
|
|
50
|
+
}
|
|
51
|
+
return { modulePath, version };
|
|
32
52
|
}
|
|
33
53
|
}
|
|
@@ -23,6 +23,8 @@ export declare class AnalysisRegistry {
|
|
|
23
23
|
* controller registry) can iterate them without importing KERNEL_BUILTINS directly.
|
|
24
24
|
*/
|
|
25
25
|
builtinDefinitions(): ResourceDefinition[];
|
|
26
|
+
resolveDefinition(kind: string): ResourceDefinition | undefined;
|
|
27
|
+
allKinds(): string[];
|
|
26
28
|
/** @internal Bridge for StaticAnalyzer — do not use outside the analyzer package. */
|
|
27
29
|
_context(): AnalysisContext;
|
|
28
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analysis-registry.d.ts","sourceRoot":"","sources":["../src/analysis-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAKzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD;;;;GAIG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA4B;IACjD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAuB;IAE/C,kBAAkB,CAAC,GAAG,EAAE,kBAAkB,GAAG,IAAI;IAIjD,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAIpE,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI;IAIpE,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAI7C;;;OAGG;IACH,mBAAmB,CACjB,QAAQ,EAAE,gBAAgB,EAC1B,KAAK,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,EAClC,OAAO,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,GACnC,IAAI;IAcP;;;;OAIG;IACH,kBAAkB,IAAI,kBAAkB,EAAE;IAI1C,qFAAqF;IACrF,QAAQ,IAAI,eAAe;CAG5B"}
|
|
1
|
+
{"version":3,"file":"analysis-registry.d.ts","sourceRoot":"","sources":["../src/analysis-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAKzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD;;;;GAIG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA4B;IACjD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAuB;IAE/C,kBAAkB,CAAC,GAAG,EAAE,kBAAkB,GAAG,IAAI;IAIjD,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAIpE,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI;IAIpE,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAI7C;;;OAGG;IACH,mBAAmB,CACjB,QAAQ,EAAE,gBAAgB,EAC1B,KAAK,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,EAClC,OAAO,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,GACnC,IAAI;IAcP;;;;OAIG;IACH,kBAAkB,IAAI,kBAAkB,EAAE;IAI1C,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,kBAAkB,GAAG,SAAS;IAM/D,QAAQ,IAAI,MAAM,EAAE;IAIpB,qFAAqF;IACrF,QAAQ,IAAI,eAAe;CAG5B"}
|
|
@@ -48,6 +48,14 @@ export class AnalysisRegistry {
|
|
|
48
48
|
builtinDefinitions() {
|
|
49
49
|
return KERNEL_BUILTINS;
|
|
50
50
|
}
|
|
51
|
+
resolveDefinition(kind) {
|
|
52
|
+
const ctx = this._context();
|
|
53
|
+
const resolved = ctx.aliases?.resolveKind(kind);
|
|
54
|
+
return ctx.definitions?.resolve(kind) ?? (resolved ? ctx.definitions?.resolve(resolved) : undefined);
|
|
55
|
+
}
|
|
56
|
+
allKinds() {
|
|
57
|
+
return this._context().definitions?.kinds() ?? [];
|
|
58
|
+
}
|
|
51
59
|
/** @internal Bridge for StaticAnalyzer — do not use outside the analyzer package. */
|
|
52
60
|
_context() {
|
|
53
61
|
return { aliases: this.aliases, definitions: this.defs };
|
package/dist/analyzer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyzer.d.ts","sourceRoot":"","sources":["../src/analyzer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAsB,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"analyzer.d.ts","sourceRoot":"","sources":["../src/analyzer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAsB,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAY1D,OAAO,EAAsB,KAAK,kBAAkB,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AA0O/F,qBAAa,cAAc;IACzB,OAAO,CACL,SAAS,EAAE,gBAAgB,EAAE,EAC7B,OAAO,CAAC,EAAE,eAAe,EACzB,QAAQ,CAAC,EAAE,gBAAgB,GAC1B,kBAAkB,EAAE;IAoPvB,aAAa,CACX,SAAS,EAAE,gBAAgB,EAAE,EAC7B,OAAO,CAAC,EAAE,eAAe,EACzB,QAAQ,CAAC,EAAE,gBAAgB,GAC1B,kBAAkB,EAAE;IAMvB,SAAS,CAAC,SAAS,EAAE,gBAAgB,EAAE,EAAE,QAAQ,EAAE,gBAAgB,GAAG,gBAAgB,EAAE;IAKxF,OAAO,CACL,SAAS,EAAE,gBAAgB,EAAE,EAC7B,QAAQ,EAAE,gBAAgB,GACzB;QAAE,WAAW,EAAE,kBAAkB,EAAE,CAAC;QAAC,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;QAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE;CAiB5F"}
|
package/dist/analyzer.js
CHANGED
|
@@ -2,10 +2,11 @@ import { AliasResolver } from "./alias-resolver.js";
|
|
|
2
2
|
import { buildTypedCelEnvironment, celEnvironment } from "./cel-environment.js";
|
|
3
3
|
import { DefinitionRegistry } from "./definition-registry.js";
|
|
4
4
|
import { buildDependencyGraph, formatCycle } from "./dependency-graph.js";
|
|
5
|
+
import { buildKernelGlobalsSchema, mergeKernelGlobalsIntoContext } from "./kernel-globals.js";
|
|
5
6
|
import { normalizeInlineResources } from "./normalize-inline-resources.js";
|
|
6
7
|
import { celTypeSatisfiesJsonSchema, substituteCelFields, validateAgainstSchema, } from "./schema-compat.js";
|
|
7
8
|
import { DiagnosticSeverity } from "./types.js";
|
|
8
|
-
import { extractAccessChains, pathMatchesScope, validateChainAgainstSchema, } from "./validate-cel-context.js";
|
|
9
|
+
import { extractAccessChains, getManifestItem, pathMatchesScope, resolveContextAnnotations, resolveTypeFieldToSchema, validateChainAgainstSchema, } from "./validate-cel-context.js";
|
|
9
10
|
import { validateReferences } from "./validate-references.js";
|
|
10
11
|
const TEMPLATE_REGEX = /\$\{\{\s*([^}]+?)\s*\}\}/g;
|
|
11
12
|
function walkCelExpressions(value, path, cb) {
|
|
@@ -53,6 +54,81 @@ function extractContextsFromSchema(schema, path = "$") {
|
|
|
53
54
|
}
|
|
54
55
|
return results;
|
|
55
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* Build a `steps` context schema from `x-telo-step-context` annotation.
|
|
59
|
+
* Walks each step in the manifest array, resolves the invoked resource's outputType,
|
|
60
|
+
* and builds `steps.<name>.result` context entries.
|
|
61
|
+
*/
|
|
62
|
+
function buildStepContextSchema(manifest, defSchema, allManifests) {
|
|
63
|
+
const props = defSchema.properties;
|
|
64
|
+
if (!props)
|
|
65
|
+
return undefined;
|
|
66
|
+
for (const [fieldName, fieldSchema] of Object.entries(props)) {
|
|
67
|
+
const stepCtx = fieldSchema["x-telo-step-context"];
|
|
68
|
+
if (!stepCtx)
|
|
69
|
+
continue;
|
|
70
|
+
const invokeField = stepCtx.invoke;
|
|
71
|
+
const outputTypeField = stepCtx.outputType;
|
|
72
|
+
if (!invokeField || !outputTypeField)
|
|
73
|
+
continue;
|
|
74
|
+
const steps = manifest[fieldName];
|
|
75
|
+
if (!Array.isArray(steps))
|
|
76
|
+
continue;
|
|
77
|
+
const stepProperties = {};
|
|
78
|
+
const collectSteps = (items) => {
|
|
79
|
+
for (const step of items) {
|
|
80
|
+
if (!step || typeof step !== "object")
|
|
81
|
+
continue;
|
|
82
|
+
const s = step;
|
|
83
|
+
const name = s.name;
|
|
84
|
+
if (typeof name === "string") {
|
|
85
|
+
const invoke = s[invokeField];
|
|
86
|
+
let outputSchema;
|
|
87
|
+
if (invoke && typeof invoke === "object") {
|
|
88
|
+
const invokedKind = invoke.kind;
|
|
89
|
+
const invokedName = invoke.name;
|
|
90
|
+
if (invokedName) {
|
|
91
|
+
const invokedManifest = allManifests.find((m) => m.metadata?.name === invokedName &&
|
|
92
|
+
(!invokedKind || m.kind === invokedKind));
|
|
93
|
+
if (invokedManifest) {
|
|
94
|
+
outputSchema = resolveTypeFieldToSchema(invokedManifest[outputTypeField], allManifests);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
outputSchema = resolveTypeFieldToSchema(invoke[outputTypeField], allManifests);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
stepProperties[name] = {
|
|
102
|
+
type: "object",
|
|
103
|
+
properties: {
|
|
104
|
+
result: outputSchema ?? { type: "object", additionalProperties: true },
|
|
105
|
+
},
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
// Recurse into nested step arrays (then, else, do, catch, finally, try, default, cases)
|
|
109
|
+
for (const nested of ["then", "else", "do", "catch", "finally", "try", "default"]) {
|
|
110
|
+
if (Array.isArray(s[nested]))
|
|
111
|
+
collectSteps(s[nested]);
|
|
112
|
+
}
|
|
113
|
+
// cases is an object map of arrays
|
|
114
|
+
if (s.cases && typeof s.cases === "object") {
|
|
115
|
+
for (const arr of Object.values(s.cases)) {
|
|
116
|
+
if (Array.isArray(arr))
|
|
117
|
+
collectSteps(arr);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
collectSteps(steps);
|
|
123
|
+
if (Object.keys(stepProperties).length > 0) {
|
|
124
|
+
return {
|
|
125
|
+
type: "object",
|
|
126
|
+
properties: stepProperties,
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return undefined;
|
|
131
|
+
}
|
|
56
132
|
const CEL_PURE_RE = /^\s*\$\{\{[^}]*\}\}\s*$/;
|
|
57
133
|
const CEL_EXPR_RE = /\$\{\{\s*([^}]+?)\s*\}\}/;
|
|
58
134
|
/** Recursively walk `data`+`schema` together, type-checking every pure CEL template
|
|
@@ -163,6 +239,9 @@ export class StaticAnalyzer {
|
|
|
163
239
|
byName.set(m.metadata.name, m);
|
|
164
240
|
}
|
|
165
241
|
}
|
|
242
|
+
// Build typed kernel globals schema so x-telo-context chain validation
|
|
243
|
+
// recognises variables, secrets, resources, env automatically
|
|
244
|
+
const kernelGlobals = buildKernelGlobalsSchema(allManifests);
|
|
166
245
|
// Validate each non-definition, non-system resource
|
|
167
246
|
for (const m of allManifests) {
|
|
168
247
|
if (!m.kind || !m.metadata?.name) {
|
|
@@ -239,6 +318,10 @@ export class StaticAnalyzer {
|
|
|
239
318
|
const resource = { kind: m.kind, name: m.metadata?.name };
|
|
240
319
|
const resolvedKind = aliases.resolveKind(m.kind);
|
|
241
320
|
const mDefinition = defs.resolve(m.kind) ?? (resolvedKind ? defs.resolve(resolvedKind) : undefined);
|
|
321
|
+
// Pre-compute step context for manifests with x-telo-step-context
|
|
322
|
+
const stepContextSchema = mDefinition?.schema
|
|
323
|
+
? buildStepContextSchema(m, mDefinition.schema, allManifests)
|
|
324
|
+
: undefined;
|
|
242
325
|
walkCelExpressions(m, "", (expr, path) => {
|
|
243
326
|
let parsed;
|
|
244
327
|
try {
|
|
@@ -254,23 +337,43 @@ export class StaticAnalyzer {
|
|
|
254
337
|
});
|
|
255
338
|
return;
|
|
256
339
|
}
|
|
340
|
+
const accessChains = extractAccessChains(parsed.ast);
|
|
257
341
|
const contexts = mDefinition?.schema ? extractContextsFromSchema(mDefinition.schema) : [];
|
|
258
342
|
const invocationContext = m.metadata?.xTeloInvocationContext;
|
|
259
|
-
|
|
343
|
+
// If no static context but we have step context, inject it
|
|
344
|
+
if (contexts.length === 0 && !invocationContext && !stepContextSchema)
|
|
260
345
|
return;
|
|
261
346
|
let matchedContext;
|
|
347
|
+
let matchedScope;
|
|
262
348
|
for (const ctx of contexts) {
|
|
263
349
|
if (pathMatchesScope(path, ctx.scope)) {
|
|
264
350
|
matchedContext = ctx.schema;
|
|
351
|
+
matchedScope = ctx.scope;
|
|
265
352
|
break;
|
|
266
353
|
}
|
|
267
354
|
}
|
|
268
355
|
if (!matchedContext)
|
|
269
356
|
matchedContext = invocationContext;
|
|
357
|
+
// Merge step context into the effective context
|
|
358
|
+
if (stepContextSchema) {
|
|
359
|
+
const base = matchedContext ?? { type: "object", properties: {}, additionalProperties: true };
|
|
360
|
+
matchedContext = {
|
|
361
|
+
...base,
|
|
362
|
+
properties: {
|
|
363
|
+
...(base.properties ?? {}),
|
|
364
|
+
steps: stepContextSchema,
|
|
365
|
+
},
|
|
366
|
+
};
|
|
367
|
+
}
|
|
270
368
|
if (!matchedContext)
|
|
271
369
|
return;
|
|
272
|
-
|
|
273
|
-
|
|
370
|
+
const manifestItem = matchedScope
|
|
371
|
+
? getManifestItem(path, matchedScope, m)
|
|
372
|
+
: m;
|
|
373
|
+
const resolvedContext = resolveContextAnnotations(matchedContext, manifestItem, allManifests);
|
|
374
|
+
const effectiveContext = mergeKernelGlobalsIntoContext(resolvedContext, kernelGlobals);
|
|
375
|
+
for (const chain of accessChains) {
|
|
376
|
+
const err = validateChainAgainstSchema(chain, effectiveContext);
|
|
274
377
|
if (!err)
|
|
275
378
|
continue;
|
|
276
379
|
diagnostics.push({
|
|
@@ -6,7 +6,10 @@ export declare const celEnvironment: Environment;
|
|
|
6
6
|
*
|
|
7
7
|
* - `variables`: typed from the manifest's `variables` field if it is a schema map
|
|
8
8
|
* (only `Kernel.Module` resources carry this); otherwise registered as `map` (dyn).
|
|
9
|
-
* - `secrets`, `resources`, `
|
|
10
|
-
* - `extraContextSchema`: additional variables from an `x-telo-context` annotation.
|
|
9
|
+
* - `secrets`, `resources`, `env`: always `map` (dyn — output schemas unknown).
|
|
10
|
+
* - `extraContextSchema`: additional variables from an `x-telo-context` annotation.
|
|
11
|
+
*
|
|
12
|
+
* NOTE: The set of kernel globals registered here must match `KERNEL_GLOBAL_NAMES`
|
|
13
|
+
* in kernel-globals.ts, which is used for chain-access validation. */
|
|
11
14
|
export declare function buildTypedCelEnvironment(manifest: ResourceManifest, extraContextSchema?: Record<string, any> | null): Environment;
|
|
12
15
|
//# sourceMappingURL=cel-environment.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cel-environment.d.ts","sourceRoot":"","sources":["../src/cel-environment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGnD,eAAO,MAAM,cAAc,aAWvB,CAAC;AAEL
|
|
1
|
+
{"version":3,"file":"cel-environment.d.ts","sourceRoot":"","sources":["../src/cel-environment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGnD,eAAO,MAAM,cAAc,aAWvB,CAAC;AAEL;;;;;;;;;uEASuE;AACvE,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,gBAAgB,EAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,GAC9C,WAAW,CAyCb"}
|
package/dist/cel-environment.js
CHANGED
|
@@ -17,8 +17,11 @@ export const celEnvironment = new Environment({ unlistedVariablesAreDyn: true })
|
|
|
17
17
|
*
|
|
18
18
|
* - `variables`: typed from the manifest's `variables` field if it is a schema map
|
|
19
19
|
* (only `Kernel.Module` resources carry this); otherwise registered as `map` (dyn).
|
|
20
|
-
* - `secrets`, `resources`, `
|
|
21
|
-
* - `extraContextSchema`: additional variables from an `x-telo-context` annotation.
|
|
20
|
+
* - `secrets`, `resources`, `env`: always `map` (dyn — output schemas unknown).
|
|
21
|
+
* - `extraContextSchema`: additional variables from an `x-telo-context` annotation.
|
|
22
|
+
*
|
|
23
|
+
* NOTE: The set of kernel globals registered here must match `KERNEL_GLOBAL_NAMES`
|
|
24
|
+
* in kernel-globals.ts, which is used for chain-access validation. */
|
|
22
25
|
export function buildTypedCelEnvironment(manifest, extraContextSchema) {
|
|
23
26
|
try {
|
|
24
27
|
const env = celEnvironment.clone();
|
|
@@ -42,7 +45,6 @@ export function buildTypedCelEnvironment(manifest, extraContextSchema) {
|
|
|
42
45
|
}
|
|
43
46
|
env.registerVariable("secrets", "map");
|
|
44
47
|
env.registerVariable("resources", "map");
|
|
45
|
-
env.registerVariable("imports", "map");
|
|
46
48
|
env.registerVariable("env", "map");
|
|
47
49
|
if (extraContextSchema?.properties) {
|
|
48
50
|
for (const [name, propSchema] of Object.entries(extraContextSchema.properties)) {
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,6 @@ export { RegistryAdapter } from "./adapters/registry-adapter.js";
|
|
|
4
4
|
export { AnalysisRegistry } from "./analysis-registry.js";
|
|
5
5
|
export { StaticAnalyzer } from "./analyzer.js";
|
|
6
6
|
export { Loader } from "./manifest-loader.js";
|
|
7
|
-
export { DiagnosticSeverity } from "./types.js";
|
|
8
|
-
export type { AnalysisDiagnostic, AnalysisOptions, LoadOptions, ManifestAdapter, Position, PositionIndex, Range } from "./types.js";
|
|
7
|
+
export { DEFAULT_MANIFEST_FILENAME, DiagnosticSeverity } from "./types.js";
|
|
8
|
+
export type { AnalysisDiagnostic, AnalysisOptions, LoaderInitOptions, LoadOptions, ManifestAdapter, Position, PositionIndex, Range } from "./types.js";
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAC3E,YAAY,EACR,kBAAkB,EAClB,eAAe,EAAE,iBAAiB,EAAE,WAAW,EAAE,eAAe,EAChE,QAAQ,EACR,aAAa,EACb,KAAK,EACR,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4,4 +4,4 @@ export { RegistryAdapter } from "./adapters/registry-adapter.js";
|
|
|
4
4
|
export { AnalysisRegistry } from "./analysis-registry.js";
|
|
5
5
|
export { StaticAnalyzer } from "./analyzer.js";
|
|
6
6
|
export { Loader } from "./manifest-loader.js";
|
|
7
|
-
export { DiagnosticSeverity } from "./types.js";
|
|
7
|
+
export { DEFAULT_MANIFEST_FILENAME, DiagnosticSeverity } from "./types.js";
|