@telorun/test 0.1.0 → 0.1.2

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.
Files changed (3) hide show
  1. package/LICENSE +17 -0
  2. package/README.md +233 -0
  3. package/package.json +24 -7
package/LICENSE ADDED
@@ -0,0 +1,17 @@
1
+ # SUSTAINABLE USE LICENSE (Fair-code)
2
+
3
+ Copyright (c) 2026 DiglyAI
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to use, copy, modify, and distribute the Software for any purpose—including commercial purposes—subject to the following conditions:
6
+
7
+ 1. ANTI-COMPETITION RESTRICTION: The Software may not be provided to third parties as a managed service, commercial SaaS (Software-as-a-Service), PaaS (Platform-as-a-Service), BaaS (Backend-as-a-Service), or similar offering where the primary value provided to the user is the functionality of the Software itself, without a separate commercial license from the copyright holder.
8
+
9
+ 2. PERMITTED COMMERCIAL USE: You are free to use the Software to build, host, and monetize your own commercial applications, products, and services, provided such use does not violate Clause 1.
10
+
11
+ 3. ATTRIBUTION: This copyright notice and license must be included in all copies or substantial portions of the Software.
12
+
13
+ 4. CONTRIBUTIONS: Contributions to the Software are welcome and encouraged. By contributing, you agree that your contributions may be incorporated into the Software and distributed under this license.
14
+
15
+ 5. DISCLAIMER: The Software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the Software or the use or other dealings in the Software.
16
+
17
+ For commercial licensing, managed hosting exemptions, or enterprise inquiries, please contact DiglyAI.
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.
package/package.json CHANGED
@@ -1,6 +1,23 @@
1
1
  {
2
2
  "name": "@telorun/test",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
+ "description": "Telo Test module - Test runner for Telo manifests.",
5
+ "keywords": [
6
+ "telo",
7
+ "test",
8
+ "runner"
9
+ ],
10
+ "author": "Bartosz Pasiński <bartosz.pasinski@codenet.pl>",
11
+ "license": "SEE LICENSE IN LICENSE",
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/telorun/telo.git",
15
+ "directory": "modules/test/nodejs"
16
+ },
17
+ "homepage": "https://github.com/telorun/telo#readme",
18
+ "bugs": {
19
+ "url": "https://github.com/telorun/telo/issues"
20
+ },
4
21
  "type": "module",
5
22
  "exports": {
6
23
  "./suite": {
@@ -10,20 +27,20 @@
10
27
  "default": "./dist/suite.js"
11
28
  }
12
29
  },
13
- "scripts": {
14
- "build": "tsc -p tsconfig.lib.json"
15
- },
16
30
  "files": [
17
31
  "dist",
18
32
  "src/**"
19
33
  ],
20
34
  "dependencies": {
21
35
  "@sinclair/typebox": "^0.34.48",
22
- "@telorun/kernel": "workspace:*",
23
- "@telorun/sdk": "workspace:*"
36
+ "@telorun/kernel": "0.2.8",
37
+ "@telorun/sdk": "0.2.8"
24
38
  },
25
39
  "devDependencies": {
26
40
  "@types/node": "^20.0.0",
27
41
  "typescript": "^5.0.0"
42
+ },
43
+ "scripts": {
44
+ "build": "tsc -p tsconfig.lib.json"
28
45
  }
29
- }
46
+ }