@telorun/runner-core 0.13.0 → 0.14.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.
@@ -10,16 +10,18 @@ export declare const WORKSPACE_MARKER_FILENAME = "telo-workspace.yaml";
10
10
  * apps in one workspace resolve the same module twice into two caches — and an
11
11
  * app in a subdirectory gets a third.
12
12
  *
13
- * `modules:` is release scope and is read by `telo release` alone, which never
14
- * runs in a session. It is written anyway because an empty list is a hard error
15
- * in the parser, and a file this repo's own tooling would reject is not one to
16
- * seed into a user's workspace.
13
+ * **It declares no blocks.** Every field of the marker sits in a block scoped to
14
+ * the command that reads it, and a session runs none of them: `release:` is
15
+ * versioning and publishing, which never happens here. This used to write
16
+ * `modules: ["*"]` — release scope a session has no use for — purely because an
17
+ * empty list was a parse error, so the runner shipped a fabricated claim into
18
+ * every user's workspace to satisfy a reader that was never going to run.
17
19
  */
18
- export declare const WORKSPACE_MARKER_CONTENTS = "# Marks the root of this session's workspace.\n#\n# The Telo kernel anchors its module cache (.telo) at the directory holding this\n# file, so every application in this workspace resolves its imports once into one\n# cache instead of once per app.\nmodules: [\"*\"]\n";
20
+ export declare const WORKSPACE_MARKER_CONTENTS = "# Marks the root of this session's workspace.\n#\n# The Telo kernel anchors its module cache (.telo) at the directory holding this\n# file, so every application in this workspace resolves its imports once into one\n# cache instead of once per app. It also bounds the walk that collects .env and\n# .env.local for a run.\n#\n# Nothing else is declared: 'release:' (where modules live, and where they\n# publish) is read by `telo release`, which does not run in a session.\n";
19
21
  /**
20
22
  * The marker, unless the workspace already brings its own. A user whose project
21
- * really is a Telo workspace has a marker with a real \`modules:\` list, and
22
- * overwriting it would silently change what \`telo release\` discovers.
23
+ * really is a Telo workspace has a marker with a real \`release.modules\` list,
24
+ * and overwriting it would silently change what \`telo release\` discovers.
23
25
  */
24
26
  export declare function workspaceMarkerWrite(bundle: RunBundle): NonNullable<WorkspaceChangeSet["write"]>;
25
27
  //# sourceMappingURL=workspace-marker.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"workspace-marker.d.ts","sourceRoot":"","sources":["../../src/session/workspace-marker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpE,+EAA+E;AAC/E,eAAO,MAAM,yBAAyB,wBAAwB,CAAC;AAE/D;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,yBAAyB,gRAMrC,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,SAAS,GAChB,WAAW,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAI1C"}
1
+ {"version":3,"file":"workspace-marker.d.ts","sourceRoot":"","sources":["../../src/session/workspace-marker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpE,+EAA+E;AAC/E,eAAO,MAAM,yBAAyB,wBAAwB,CAAC;AAE/D;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,yBAAyB,6dASrC,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,SAAS,GAChB,WAAW,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAI1C"}
@@ -9,22 +9,27 @@ export const WORKSPACE_MARKER_FILENAME = "telo-workspace.yaml";
9
9
  * apps in one workspace resolve the same module twice into two caches — and an
10
10
  * app in a subdirectory gets a third.
11
11
  *
12
- * `modules:` is release scope and is read by `telo release` alone, which never
13
- * runs in a session. It is written anyway because an empty list is a hard error
14
- * in the parser, and a file this repo's own tooling would reject is not one to
15
- * seed into a user's workspace.
12
+ * **It declares no blocks.** Every field of the marker sits in a block scoped to
13
+ * the command that reads it, and a session runs none of them: `release:` is
14
+ * versioning and publishing, which never happens here. This used to write
15
+ * `modules: ["*"]` — release scope a session has no use for — purely because an
16
+ * empty list was a parse error, so the runner shipped a fabricated claim into
17
+ * every user's workspace to satisfy a reader that was never going to run.
16
18
  */
17
19
  export const WORKSPACE_MARKER_CONTENTS = `# Marks the root of this session's workspace.
18
20
  #
19
21
  # The Telo kernel anchors its module cache (.telo) at the directory holding this
20
22
  # file, so every application in this workspace resolves its imports once into one
21
- # cache instead of once per app.
22
- modules: ["*"]
23
+ # cache instead of once per app. It also bounds the walk that collects .env and
24
+ # .env.local for a run.
25
+ #
26
+ # Nothing else is declared: 'release:' (where modules live, and where they
27
+ # publish) is read by \`telo release\`, which does not run in a session.
23
28
  `;
24
29
  /**
25
30
  * The marker, unless the workspace already brings its own. A user whose project
26
- * really is a Telo workspace has a marker with a real \`modules:\` list, and
27
- * overwriting it would silently change what \`telo release\` discovers.
31
+ * really is a Telo workspace has a marker with a real \`release.modules\` list,
32
+ * and overwriting it would silently change what \`telo release\` discovers.
28
33
  */
29
34
  export function workspaceMarkerWrite(bundle) {
30
35
  const provided = bundle.files.some((f) => f.relativePath === WORKSPACE_MARKER_FILENAME);
@@ -1 +1 @@
1
- {"version":3,"file":"workspace-marker.js","sourceRoot":"","sources":["../../src/session/workspace-marker.ts"],"names":[],"mappings":"AAEA,+EAA+E;AAC/E,MAAM,CAAC,MAAM,yBAAyB,GAAG,qBAAqB,CAAC;AAE/D;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG;;;;;;CAMxC,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAClC,MAAiB;IAEjB,MAAM,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,KAAK,yBAAyB,CAAC,CAAC;IACxF,IAAI,QAAQ;QAAE,OAAO,EAAE,CAAC;IACxB,OAAO,CAAC,EAAE,IAAI,EAAE,yBAAyB,EAAE,OAAO,EAAE,yBAAyB,EAAE,CAAC,CAAC;AACnF,CAAC"}
1
+ {"version":3,"file":"workspace-marker.js","sourceRoot":"","sources":["../../src/session/workspace-marker.ts"],"names":[],"mappings":"AAEA,+EAA+E;AAC/E,MAAM,CAAC,MAAM,yBAAyB,GAAG,qBAAqB,CAAC;AAE/D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG;;;;;;;;;CASxC,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAClC,MAAiB;IAEjB,MAAM,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,KAAK,yBAAyB,CAAC,CAAC;IACxF,IAAI,QAAQ;QAAE,OAAO,EAAE,CAAC;IACxB,OAAO,CAAC,EAAE,IAAI,EAAE,yBAAyB,EAAE,OAAO,EAAE,yBAAyB,EAAE,CAAC,CAAC;AACnF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telorun/runner-core",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "description": "Backend-neutral core for Telo runners: the /v1 session contract, the RunnerBackend interface, the session registry, SSE/byte ring buffers, and bundle handling. Shared by docker-runner and k8s-runner.",
5
5
  "keywords": [
6
6
  "telo",
@@ -27,9 +27,14 @@ describe("workspaceMarkerWrite", () => {
27
27
  expect(workspaceMarkerWrite(bundle(["telo.yaml", WORKSPACE_MARKER_FILENAME]))).toEqual([]);
28
28
  });
29
29
 
30
- it("writes a marker the workspace parser accepts", () => {
31
- // An empty `modules:` is a hard error in that parser, so a marker seeded
32
- // with one would be a file this repo's own tooling rejects.
33
- expect(WORKSPACE_MARKER_CONTENTS).toMatch(/^modules: \[.+\]$/m);
30
+ it("declares no blocks — a session reads none of them", () => {
31
+ // It used to write `modules: ["*"]`, release scope a session has no use
32
+ // for, purely because an empty list was a parse error. A marker whose whole
33
+ // content is comments is valid, so the runner stops shipping a fabricated
34
+ // claim into every user's workspace.
35
+ expect(WORKSPACE_MARKER_CONTENTS.split("\n").filter((line) => line.trim() !== "")).toEqual(
36
+ expect.arrayContaining([expect.stringMatching(/^#/)]),
37
+ );
38
+ expect(WORKSPACE_MARKER_CONTENTS).not.toMatch(/^[A-Za-z]/m);
34
39
  });
35
40
  });
@@ -12,23 +12,28 @@ export const WORKSPACE_MARKER_FILENAME = "telo-workspace.yaml";
12
12
  * apps in one workspace resolve the same module twice into two caches — and an
13
13
  * app in a subdirectory gets a third.
14
14
  *
15
- * `modules:` is release scope and is read by `telo release` alone, which never
16
- * runs in a session. It is written anyway because an empty list is a hard error
17
- * in the parser, and a file this repo's own tooling would reject is not one to
18
- * seed into a user's workspace.
15
+ * **It declares no blocks.** Every field of the marker sits in a block scoped to
16
+ * the command that reads it, and a session runs none of them: `release:` is
17
+ * versioning and publishing, which never happens here. This used to write
18
+ * `modules: ["*"]` — release scope a session has no use for — purely because an
19
+ * empty list was a parse error, so the runner shipped a fabricated claim into
20
+ * every user's workspace to satisfy a reader that was never going to run.
19
21
  */
20
22
  export const WORKSPACE_MARKER_CONTENTS = `# Marks the root of this session's workspace.
21
23
  #
22
24
  # The Telo kernel anchors its module cache (.telo) at the directory holding this
23
25
  # file, so every application in this workspace resolves its imports once into one
24
- # cache instead of once per app.
25
- modules: ["*"]
26
+ # cache instead of once per app. It also bounds the walk that collects .env and
27
+ # .env.local for a run.
28
+ #
29
+ # Nothing else is declared: 'release:' (where modules live, and where they
30
+ # publish) is read by \`telo release\`, which does not run in a session.
26
31
  `;
27
32
 
28
33
  /**
29
34
  * The marker, unless the workspace already brings its own. A user whose project
30
- * really is a Telo workspace has a marker with a real \`modules:\` list, and
31
- * overwriting it would silently change what \`telo release\` discovers.
35
+ * really is a Telo workspace has a marker with a real \`release.modules\` list,
36
+ * and overwriting it would silently change what \`telo release\` discovers.
32
37
  */
33
38
  export function workspaceMarkerWrite(
34
39
  bundle: RunBundle,