@telorun/run 0.2.3 → 0.2.5

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/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @telorun/run
2
2
 
3
+ ## 0.2.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 543b91f: Surface duplicate inline resource registrations as `ERR_DUPLICATE_RESOURCE` instead of silently skipping the second registration. `resolveChildren` previously suppressed the throw from `registerManifest` when the target name was already taken, which hid real bugs — most notably inline resources inside sibling `Run.Sequence` steps colliding on auto-generated names, where only the first sequence's invocations actually ran while the rest were silently aliased onto it.
8
+
9
+ Three changes ship together:
10
+
11
+ - `@telorun/kernel`: removed the `!hasManifest(name)` guard in `resolveChildren`. Duplicate registrations now throw at boot.
12
+ - `@telorun/run`: inline-step auto-names now include the parent sequence's name and follow the project's PascalCase resource-naming convention — e.g. `SequenceHealthLivenessSteps1Assert` rather than `__sequence_steps_1__assert`. Sibling sequences with identical step names no longer collide.
13
+ - `@telorun/kernel`: the unnamed-resource fallback was renamed from `__unnamed_<hex>` to `Unnamed<hex>` for the same convention.
14
+
15
+ ## 0.2.4
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies [b62e535]
20
+ - @telorun/sdk@0.7.0
21
+
3
22
  ## 0.2.3
4
23
 
5
24
  ### Patch Changes
package/README.md CHANGED
@@ -1,6 +1,21 @@
1
- # ⚡ Telo
1
+ <p align="center">
2
+ <img src="./assets/telo.png" alt="Telo" width="200" />
3
+ </p>
2
4
 
3
- Runtime for declarative backends.
5
+ <h1 align="center">Telo</h1>
6
+
7
+ <p align="center">Runtime for declarative backends.</p>
8
+
9
+ <p align="center">
10
+ <a href="https://github.com/telorun/telo/actions/workflows/test.yml"><img alt="Tests" src="https://github.com/telorun/telo/actions/workflows/test.yml/badge.svg" /></a>
11
+ <a href="https://www.npmjs.com/package/@telorun/cli"><img alt="node" src="https://img.shields.io/node/v/@telorun/cli" /></a>
12
+ <br />
13
+ <a href="https://github.com/telorun/telo/commits/main"><img alt="Last commit" src="https://img.shields.io/github/last-commit/telorun/telo" /></a>
14
+ <a href="https://github.com/telorun/telo/issues"><img alt="Issues" src="https://img.shields.io/github/issues/telorun/telo" /></a>
15
+ <a href="https://github.com/telorun/telo/pulls"><img alt="Pull requests" src="https://img.shields.io/github/issues-pr/telorun/telo" /></a>
16
+ <br />
17
+ <img alt="Changesets" src="https://img.shields.io/badge/maintained%20with-changesets-176de3" />
18
+ </p>
4
19
 
5
20
  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
21
 
@@ -27,8 +42,6 @@ $ telo ./examples/hello-api.yaml
27
42
  - **Indexes** resources by Kind and Name for constant-time lookup.
28
43
  - **Dispatches** execution to the controller that owns each Kind.
29
44
 
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
45
  ## Example manifest
33
46
 
34
47
  Here is an example Telo application that defines a simple HTTP API:
@@ -221,7 +234,6 @@ Those manifests were taken to the next level by allowing them to run inside a st
221
234
  ## See more at
222
235
 
223
236
  - [Telo Kernel](./kernel/README.md)
224
- - [CEL-YAML Templating](./yaml-cel-templating/README.md)
225
237
  - [Telo SDK for module authors](sdk/README.md)
226
238
  - [Modules](modules/README.md)
227
239
 
package/dist/sequence.js CHANGED
@@ -65,8 +65,10 @@ class RunSequence {
65
65
  }
66
66
  }
67
67
  inlineInvokeResourceName(stepName, stepPath) {
68
- const safeName = stepName.replace(/[^a-zA-Z0-9_-]+/g, "_");
69
- return `__sequence_${stepPath.join("_")}__${safeName}`;
68
+ const seq = pascalCase(String(this.resource.metadata.name));
69
+ const path = stepPath.map(pascalCase).join("");
70
+ const step = pascalCase(stepName);
71
+ return `Sequence${seq}${path}${step}`;
70
72
  }
71
73
  async run() {
72
74
  if (this.resource.with) {
@@ -244,6 +246,13 @@ class RunSequence {
244
246
  }
245
247
  }
246
248
  }
249
+ function pascalCase(s) {
250
+ return s
251
+ .split(/[^a-zA-Z0-9]+/)
252
+ .filter(Boolean)
253
+ .map((p) => p[0].toUpperCase() + p.slice(1))
254
+ .join("");
255
+ }
247
256
  function toSequenceError(err, stepName) {
248
257
  if (isInvokeError(err)) {
249
258
  return { message: err.message, code: err.code, data: err.data, step: stepName };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telorun/run",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "description": "Telo Run module - Sequence execution for Telo manifests.",
5
5
  "keywords": [
6
6
  "telo",
@@ -29,7 +29,7 @@
29
29
  }
30
30
  },
31
31
  "dependencies": {
32
- "@telorun/sdk": "0.6.0"
32
+ "@telorun/sdk": "0.7.0"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/node": "^20.0.0",
package/src/sequence.ts CHANGED
@@ -147,8 +147,10 @@ class RunSequence {
147
147
  }
148
148
 
149
149
  private inlineInvokeResourceName(stepName: string, stepPath: string[]): string {
150
- const safeName = stepName.replace(/[^a-zA-Z0-9_-]+/g, "_");
151
- return `__sequence_${stepPath.join("_")}__${safeName}`;
150
+ const seq = pascalCase(String(this.resource.metadata.name));
151
+ const path = stepPath.map(pascalCase).join("");
152
+ const step = pascalCase(stepName);
153
+ return `Sequence${seq}${path}${step}`;
152
154
  }
153
155
 
154
156
  async run(): Promise<void> {
@@ -378,6 +380,14 @@ class RunSequence {
378
380
  }
379
381
  }
380
382
 
383
+ function pascalCase(s: string): string {
384
+ return s
385
+ .split(/[^a-zA-Z0-9]+/)
386
+ .filter(Boolean)
387
+ .map((p) => p[0].toUpperCase() + p.slice(1))
388
+ .join("");
389
+ }
390
+
381
391
  function toSequenceError(err: unknown, stepName: string): SequenceError {
382
392
  if (isInvokeError(err)) {
383
393
  return { message: err.message, code: err.code, data: err.data, step: stepName };