@telorun/kernel 0.84.0 → 0.86.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.
- package/dist/bundle/module-artifact.d.ts +1 -1
- package/dist/bundle/module-artifact.d.ts.map +1 -1
- package/dist/bundle/module-artifact.js +3 -3
- package/dist/bundle/module-artifact.js.map +1 -1
- package/dist/controller-loaders/bundle-loader.d.ts +5 -5
- package/dist/controller-loaders/bundle-loader.js +7 -7
- package/dist/controller-loaders/bundle-loader.js.map +1 -1
- package/dist/evaluation-context.d.ts +158 -25
- package/dist/evaluation-context.d.ts.map +1 -1
- package/dist/evaluation-context.js +234 -44
- package/dist/evaluation-context.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/kernel.d.ts +60 -5
- package/dist/kernel.d.ts.map +1 -1
- package/dist/kernel.js +256 -9
- package/dist/kernel.js.map +1 -1
- package/dist/manifest-sources/local-manifest-cache-source.d.ts +6 -6
- package/dist/manifest-sources/local-manifest-cache-source.d.ts.map +1 -1
- package/dist/manifest-sources/local-manifest-cache-source.js +11 -12
- package/dist/manifest-sources/local-manifest-cache-source.js.map +1 -1
- package/dist/module-context.d.ts +31 -1
- package/dist/module-context.d.ts.map +1 -1
- package/dist/module-context.js +41 -1
- package/dist/module-context.js.map +1 -1
- package/dist/reconcile.d.ts +42 -0
- package/dist/reconcile.d.ts.map +1 -0
- package/dist/reconcile.js +58 -0
- package/dist/reconcile.js.map +1 -0
- package/dist/resource-edges.d.ts +58 -0
- package/dist/resource-edges.d.ts.map +1 -0
- package/dist/resource-edges.js +110 -0
- package/dist/resource-edges.js.map +1 -0
- package/dist/runtime-seam.d.ts.map +1 -1
- package/dist/runtime-seam.js +1 -2
- package/dist/runtime-seam.js.map +1 -1
- package/dist/transports/http-transport.d.ts +37 -0
- package/dist/transports/http-transport.d.ts.map +1 -0
- package/dist/transports/http-transport.js +168 -0
- package/dist/transports/http-transport.js.map +1 -0
- package/dist/transports/transport-registry.d.ts +13 -14
- package/dist/transports/transport-registry.d.ts.map +1 -1
- package/dist/transports/transport-registry.js +17 -24
- package/dist/transports/transport-registry.js.map +1 -1
- package/package.json +3 -3
- package/src/bundle/module-artifact.ts +2 -3
- package/src/controller-loaders/bundle-loader.ts +7 -7
- package/src/evaluation-context.ts +257 -53
- package/src/index.ts +1 -1
- package/src/kernel.ts +314 -12
- package/src/manifest-sources/local-manifest-cache-source.ts +9 -16
- package/src/module-context.ts +41 -1
- package/src/reconcile.ts +83 -0
- package/src/resource-edges.ts +114 -0
- package/src/runtime-seam.ts +1 -2
- package/src/transports/http-transport.ts +209 -0
- package/src/transports/transport-registry.ts +17 -24
- package/dist/transports/registry-transport.d.ts +0 -41
- package/dist/transports/registry-transport.d.ts.map +0 -1
- package/dist/transports/registry-transport.js +0 -282
- package/dist/transports/registry-transport.js.map +0 -1
- package/src/transports/registry-transport.ts +0 -339
package/dist/runtime-seam.js
CHANGED
|
@@ -130,7 +130,6 @@ export class KernelRuntimeSeam {
|
|
|
130
130
|
stdout: stdout.writable,
|
|
131
131
|
stderr: stderr.writable,
|
|
132
132
|
sources: [...this.kernel.injectedSources],
|
|
133
|
-
registryUrl: this.kernel.registryUrl,
|
|
134
133
|
});
|
|
135
134
|
// A child that fails to load is not an exception on this side: the caller
|
|
136
135
|
// asked to run a manifest and the answer is "it exited non-zero, here is
|
|
@@ -184,7 +183,7 @@ export class KernelRuntimeSeam {
|
|
|
184
183
|
// rather than the kernel's own loader because a checked manifest is often
|
|
185
184
|
// deliberately broken and has no business entering the running kernel's
|
|
186
185
|
// parse cache.
|
|
187
|
-
const loader = new Loader(defaultTransportRegistry(
|
|
186
|
+
const loader = new Loader(defaultTransportRegistry().sources(), {
|
|
188
187
|
celHandlers: nodeCelHandlers,
|
|
189
188
|
});
|
|
190
189
|
for (const injected of this.kernel.injectedSources) {
|
package/dist/runtime-seam.js.map
CHANG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Ae,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE;YACvF,eAAe;YACf,YAAY,EAAE,gBAAgB,EAAE;SACjC,CAAC,CAAC;QACH,MAAM,WAAW,GAAG,kBAAkB,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;QAC9D,OAAO;YACL,WAAW,EAAE,CAAC,GAAG,oBAAoB,EAAE,GAAG,kBAAkB,EAAE,GAAG,WAAW,CAAC,CAAC,GAAG,CAC/E,iBAAiB,CAClB;SACF,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type ArtifactLayer, type ManifestCacheCoords, type ManifestSource } from "@telorun/analyzer";
|
|
2
|
+
import type { PayloadFile } from "../bundle/files-integrity.js";
|
|
3
|
+
import type { PayloadLayer, PublishBundle, PublishOptions, PublishResult, Transport } from "./transport.js";
|
|
4
|
+
/** The transport for direct `https://…` (and `http://`) module URLs. Its
|
|
5
|
+
* resolution `source` composes the browser-safe `HttpSource` from `analyzer`;
|
|
6
|
+
* the Node-only management methods live here. This is the fallback transport
|
|
7
|
+
* for any ref that carries no owning scheme, so `oci://` (or a future `s3://`)
|
|
8
|
+
* never falls through to it — those refs are claimed by their own transport's
|
|
9
|
+
* `supports()`.
|
|
10
|
+
*
|
|
11
|
+
* A URL addresses exactly one file, so it names no enumerable version: this
|
|
12
|
+
* transport publishes nothing, lists no versions, and has no `@version` segment
|
|
13
|
+
* to bump. What it does own is reading, hashing and caching those bytes. */
|
|
14
|
+
export declare class HttpTransport implements Transport {
|
|
15
|
+
private readonly httpSource;
|
|
16
|
+
readonly source: ManifestSource;
|
|
17
|
+
constructor();
|
|
18
|
+
supports(ref: string): boolean;
|
|
19
|
+
cacheCoords(ref: string): ManifestCacheCoords | null;
|
|
20
|
+
listVersions(): Promise<string[] | null>;
|
|
21
|
+
refVersion(): string | null;
|
|
22
|
+
withVersion(ref: string): string;
|
|
23
|
+
/** Mirrors the source's fetch-URL derivation: the URL points at (or contains)
|
|
24
|
+
* the YAML file. `null` when this transport does not own the ref's shape. */
|
|
25
|
+
private manifestUrl;
|
|
26
|
+
digest(ref: string): Promise<string | null>;
|
|
27
|
+
/** Hashes the **raw response bytes**, which is exactly what `verifiedFetch`
|
|
28
|
+
* checks an inline `#sha256-…` pin against on the read path. */
|
|
29
|
+
manifestHash(ref: string): Promise<string>;
|
|
30
|
+
/** Layered artifacts are an OCI concept — a module reached over a plain URL is
|
|
31
|
+
* manifest-only, and its controllers come from npm. */
|
|
32
|
+
fetchLayer(ref: string, blobDigest: string): Promise<PayloadFile[]>;
|
|
33
|
+
layerIndex(layers: readonly PayloadLayer[]): Promise<ArtifactLayer[]>;
|
|
34
|
+
publish(destination: string, bundle: PublishBundle, opts?: PublishOptions): Promise<PublishResult>;
|
|
35
|
+
canonicalizeSiblingRef(destination: string, relativeSource: string, version: string): string;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=http-transport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-transport.d.ts","sourceRoot":"","sources":["../../src/transports/http-transport.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACpB,MAAM,mBAAmB,CAAC;AAI3B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,KAAK,EACV,YAAY,EACZ,aAAa,EACb,cAAc,EACd,aAAa,EACb,SAAS,EACV,MAAM,gBAAgB,CAAC;AAgCxB;;;;;;;;;6EAS6E;AAC7E,qBAAa,aAAc,YAAW,SAAS;IAC7C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAa;IACxC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;;IAgBhC,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAK9B,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,mBAAmB,GAAG,IAAI;IAsB9C,YAAY,IAAI,OAAO,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC;IAK9C,UAAU,IAAI,MAAM,GAAG,IAAI;IAK3B,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAMhC;kFAC8E;IAC9E,OAAO,CAAC,WAAW;IAMb,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAejD;qEACiE;IAC3D,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAchD;4DACwD;IAClD,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IAOnE,UAAU,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAYrE,OAAO,CACX,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,aAAa,EACrB,IAAI,GAAE,cAAmB,GACxB,OAAO,CAAC,aAAa,CAAC;IASzB,sBAAsB,CAAC,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM;CAY7F"}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { DEFAULT_MANIFEST_FILENAME, HttpSource, sha256Base64Url, splitIntegrity, } from "@telorun/analyzer";
|
|
2
|
+
import { fetchOrThrow } from "@telorun/sdk";
|
|
3
|
+
import { createHash } from "crypto";
|
|
4
|
+
import { assertPublicEgress } from "./egress-guard.js";
|
|
5
|
+
const QUERY_HASH_LENGTH = 12;
|
|
6
|
+
/** Mirror `HttpSource.read`'s `fetchUrl` derivation: when the URL does not
|
|
7
|
+
* already point at a YAML file, append `/telo.yaml`, so a raw import URL and
|
|
8
|
+
* the canonical source it resolves to map to the same cache path. */
|
|
9
|
+
function normalizePathname(rawUrl, parsed) {
|
|
10
|
+
let pathname = parsed.pathname;
|
|
11
|
+
if (!rawUrl.includes(".yaml")) {
|
|
12
|
+
pathname = pathname.endsWith("/")
|
|
13
|
+
? `${pathname}${DEFAULT_MANIFEST_FILENAME}`
|
|
14
|
+
: `${pathname}/${DEFAULT_MANIFEST_FILENAME}`;
|
|
15
|
+
}
|
|
16
|
+
return pathname;
|
|
17
|
+
}
|
|
18
|
+
/** Short hash of `search + hash` so two URLs that differ only in query /
|
|
19
|
+
* fragment do not collide at the same cache path. */
|
|
20
|
+
function disambiguatePath(pathname, search, hash) {
|
|
21
|
+
if (!search && !hash)
|
|
22
|
+
return pathname;
|
|
23
|
+
const digest = createHash("sha256")
|
|
24
|
+
.update(search + hash)
|
|
25
|
+
.digest("hex")
|
|
26
|
+
.slice(0, QUERY_HASH_LENGTH);
|
|
27
|
+
const dotIdx = pathname.lastIndexOf(".");
|
|
28
|
+
const slashIdx = pathname.lastIndexOf("/");
|
|
29
|
+
const ext = dotIdx > slashIdx ? pathname.slice(dotIdx) : "";
|
|
30
|
+
const base = pathname.slice(0, pathname.length - ext.length);
|
|
31
|
+
return `${base}.${digest}${ext}`;
|
|
32
|
+
}
|
|
33
|
+
/** The transport for direct `https://…` (and `http://`) module URLs. Its
|
|
34
|
+
* resolution `source` composes the browser-safe `HttpSource` from `analyzer`;
|
|
35
|
+
* the Node-only management methods live here. This is the fallback transport
|
|
36
|
+
* for any ref that carries no owning scheme, so `oci://` (or a future `s3://`)
|
|
37
|
+
* never falls through to it — those refs are claimed by their own transport's
|
|
38
|
+
* `supports()`.
|
|
39
|
+
*
|
|
40
|
+
* A URL addresses exactly one file, so it names no enumerable version: this
|
|
41
|
+
* transport publishes nothing, lists no versions, and has no `@version` segment
|
|
42
|
+
* to bump. What it does own is reading, hashing and caching those bytes. */
|
|
43
|
+
export class HttpTransport {
|
|
44
|
+
httpSource;
|
|
45
|
+
source;
|
|
46
|
+
constructor() {
|
|
47
|
+
this.httpSource = new HttpSource();
|
|
48
|
+
this.source = {
|
|
49
|
+
supports: (url) => this.supports(url),
|
|
50
|
+
read: async (url) => {
|
|
51
|
+
// The browser-safe source does the fetch; the Node-side egress policy
|
|
52
|
+
// is enforced here, on the host the read will actually hit.
|
|
53
|
+
await assertPublicEgress(url);
|
|
54
|
+
return this.httpSource.read(url);
|
|
55
|
+
},
|
|
56
|
+
resolveRelative: (base, relative) => this.httpSource.resolveRelative(base, relative),
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
supports(ref) {
|
|
60
|
+
const { base } = splitIntegrity(ref);
|
|
61
|
+
return base.startsWith("http://") || base.startsWith("https://");
|
|
62
|
+
}
|
|
63
|
+
cacheCoords(ref) {
|
|
64
|
+
const url = splitIntegrity(ref).base;
|
|
65
|
+
if (!url.startsWith("http://") && !url.startsWith("https://"))
|
|
66
|
+
return null;
|
|
67
|
+
let parsed;
|
|
68
|
+
try {
|
|
69
|
+
parsed = new URL(url);
|
|
70
|
+
}
|
|
71
|
+
catch {
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
const pathname = normalizePathname(url, parsed);
|
|
75
|
+
// `url` subtree, query-hash suffix on collision. No version segment: a URL
|
|
76
|
+
// addresses exactly one file, and the version it declares lives inside
|
|
77
|
+
// bytes the cache maps paths without.
|
|
78
|
+
const cleanPath = pathname.startsWith("/") ? pathname.slice(1) : pathname;
|
|
79
|
+
const segments = disambiguatePath(cleanPath, parsed.search, parsed.hash).split("/");
|
|
80
|
+
const file = segments.pop();
|
|
81
|
+
if (!file)
|
|
82
|
+
return null;
|
|
83
|
+
return { transport: "url", host: parsed.host, path: segments.join("/"), file };
|
|
84
|
+
}
|
|
85
|
+
async listVersions() {
|
|
86
|
+
// A direct `https://` URL has no version-list endpoint.
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
refVersion() {
|
|
90
|
+
// A direct `https://` URL has no version segment to bump.
|
|
91
|
+
return null;
|
|
92
|
+
}
|
|
93
|
+
withVersion(ref) {
|
|
94
|
+
throw new Error(`cannot set a version on '${ref}': a URL addresses one file and carries no version segment.`);
|
|
95
|
+
}
|
|
96
|
+
/** Mirrors the source's fetch-URL derivation: the URL points at (or contains)
|
|
97
|
+
* the YAML file. `null` when this transport does not own the ref's shape. */
|
|
98
|
+
manifestUrl(ref) {
|
|
99
|
+
const { base } = splitIntegrity(ref);
|
|
100
|
+
if (!base.startsWith("http://") && !base.startsWith("https://"))
|
|
101
|
+
return null;
|
|
102
|
+
return base.includes(".yaml") ? base : `${base}/${DEFAULT_MANIFEST_FILENAME}`;
|
|
103
|
+
}
|
|
104
|
+
async digest(ref) {
|
|
105
|
+
// The digest is Telo's canonical hash over the `telo.yaml` bytes — the same
|
|
106
|
+
// value `manifestHash` returns, but absent-is-null rather than a throw.
|
|
107
|
+
const fetchUrl = this.manifestUrl(ref);
|
|
108
|
+
if (!fetchUrl)
|
|
109
|
+
return null;
|
|
110
|
+
await assertPublicEgress(fetchUrl);
|
|
111
|
+
const res = await fetchOrThrow(fetchUrl, undefined, { operation: "Module manifest read" });
|
|
112
|
+
if (res.status === 404)
|
|
113
|
+
return null;
|
|
114
|
+
if (!res.ok) {
|
|
115
|
+
throw new Error(`${fetchUrl} returned ${res.status} ${res.statusText}`);
|
|
116
|
+
}
|
|
117
|
+
const bytes = new Uint8Array(await res.arrayBuffer());
|
|
118
|
+
return `sha256-${await sha256Base64Url(bytes)}`;
|
|
119
|
+
}
|
|
120
|
+
/** Hashes the **raw response bytes**, which is exactly what `verifiedFetch`
|
|
121
|
+
* checks an inline `#sha256-…` pin against on the read path. */
|
|
122
|
+
async manifestHash(ref) {
|
|
123
|
+
const fetchUrl = this.manifestUrl(ref);
|
|
124
|
+
if (!fetchUrl) {
|
|
125
|
+
throw new Error(`cannot hash non-remote import '${ref}'`);
|
|
126
|
+
}
|
|
127
|
+
await assertPublicEgress(fetchUrl);
|
|
128
|
+
const res = await fetchOrThrow(fetchUrl, undefined, { operation: "Module manifest hash" });
|
|
129
|
+
if (!res.ok) {
|
|
130
|
+
throw new Error(`fetch ${fetchUrl}: ${res.status} ${res.statusText}`);
|
|
131
|
+
}
|
|
132
|
+
const bytes = new Uint8Array(await res.arrayBuffer());
|
|
133
|
+
return `sha256-${await sha256Base64Url(bytes)}`;
|
|
134
|
+
}
|
|
135
|
+
/** Layered artifacts are an OCI concept — a module reached over a plain URL is
|
|
136
|
+
* manifest-only, and its controllers come from npm. */
|
|
137
|
+
async fetchLayer(ref, blobDigest) {
|
|
138
|
+
throw new Error(`Cannot fetch layer ${blobDigest} of ${ref}: a plain URL serves the manifest only. ` +
|
|
139
|
+
`A module with a bundled payload is published as an OCI artifact (oci://host/repo).`);
|
|
140
|
+
}
|
|
141
|
+
async layerIndex(layers) {
|
|
142
|
+
// Same boundary `fetchLayer` and `publish` draw: a plain URL serves the
|
|
143
|
+
// manifest only, so it frames no layer and can name no blob. An empty set is
|
|
144
|
+
// not a payload, so it answers rather than throws — a manifest-only module
|
|
145
|
+
// builds its payload through this transport during analysis.
|
|
146
|
+
if (layers.every((layer) => layer.files.length === 0))
|
|
147
|
+
return [];
|
|
148
|
+
throw new Error("A plain URL serves the manifest only, so it cannot index payload layers. " +
|
|
149
|
+
"A module with a bundled payload is published as an OCI artifact (oci://host/repo).");
|
|
150
|
+
}
|
|
151
|
+
async publish(destination, bundle, opts = {}) {
|
|
152
|
+
// `telo publish` rejects a non-OCI destination up front, so this is only a
|
|
153
|
+
// guard for a direct programmatic call.
|
|
154
|
+
throw new Error("Publishing over HTTP has been removed. Publish to an OCI registry " +
|
|
155
|
+
"(oci://host/repo) instead.");
|
|
156
|
+
}
|
|
157
|
+
canonicalizeSiblingRef(destination, relativeSource, version) {
|
|
158
|
+
// Canonicalizing a sibling is publish-path work, and this transport does not
|
|
159
|
+
// publish — so it refuses here for the same reason `publish` does, rather
|
|
160
|
+
// than computing a ref nothing could ever push. Silence would be worse than
|
|
161
|
+
// useless: an `https://host/` destination has no path to resolve `../lib`
|
|
162
|
+
// beside, so joining anyway yields a ref one segment short with no error.
|
|
163
|
+
throw new Error(`Cannot canonicalize the relative import '${relativeSource}' against '${destination}': ` +
|
|
164
|
+
`publishing over plain HTTP has been removed. Publish to an OCI registry ` +
|
|
165
|
+
`(oci://host/repo) instead.`);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
//# sourceMappingURL=http-transport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-transport.js","sourceRoot":"","sources":["../../src/transports/http-transport.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,UAAU,EACV,eAAe,EACf,cAAc,GAIf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAGpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AASvD,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAE7B;;sEAEsE;AACtE,SAAS,iBAAiB,CAAC,MAAc,EAAE,MAAW;IACpD,IAAI,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;IAC/B,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QAC9B,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC;YAC/B,CAAC,CAAC,GAAG,QAAQ,GAAG,yBAAyB,EAAE;YAC3C,CAAC,CAAC,GAAG,QAAQ,IAAI,yBAAyB,EAAE,CAAC;IACjD,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;sDACsD;AACtD,SAAS,gBAAgB,CAAC,QAAgB,EAAE,MAAc,EAAE,IAAY;IACtE,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI;QAAE,OAAO,QAAQ,CAAC;IACtC,MAAM,MAAM,GAAG,UAAU,CAAC,QAAQ,CAAC;SAChC,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC;SACrB,MAAM,CAAC,KAAK,CAAC;SACb,KAAK,CAAC,CAAC,EAAE,iBAAiB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zB,2EAA2E;QAC3E,wCAAwC;QACxC,MAAM,IAAI,KAAK,CACb,oEAAoE;YAClE,4BAA4B,CAC/B,CAAC;IACJ,CAAC;IAED,sBAAsB,CAAC,WAAmB,EAAE,cAAsB,EAAE,OAAe;QACjF,6EAA6E;QAC7E,0EAA0E;QAC1E,4EAA4E;QAC5E,0EAA0E;QAC1E,0EAA0E;QAC1E,MAAM,IAAI,KAAK,CACb,4CAA4C,cAAc,cAAc,WAAW,KAAK;YACtF,0EAA0E;YAC1E,4BAA4B,CAC/B,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -3,9 +3,9 @@ import type { PayloadFile } from "../bundle/files-integrity.js";
|
|
|
3
3
|
import type { PublishBundle, PublishOptions, PublishResult, Transport } from "./transport.js";
|
|
4
4
|
/** Dispatches ref-scheme-specific operations to the transport that owns a ref.
|
|
5
5
|
* The loader, cache source, `upgrade`, and `publish` consult this instead of
|
|
6
|
-
* branching on ref shape. `
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* branching on ref shape. `HttpTransport` is always last so it is the fallback
|
|
7
|
+
* for plain `https` refs, and a scheme-owning transport (OCI, later S3) claims
|
|
8
|
+
* its refs via `supports()` before the fallback is reached. */
|
|
9
9
|
export declare class TransportRegistry {
|
|
10
10
|
private readonly transports;
|
|
11
11
|
constructor(transports: Transport[]);
|
|
@@ -32,15 +32,14 @@ export declare class TransportRegistry {
|
|
|
32
32
|
private require;
|
|
33
33
|
}
|
|
34
34
|
/** The default transport set. Scheme-owning transports come first; the
|
|
35
|
-
* `
|
|
36
|
-
*
|
|
37
|
-
export declare function defaultTransports(
|
|
38
|
-
/** A `TransportRegistry` seeded with {@link defaultTransports}, memoized
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
|
|
45
|
-
export declare function defaultTransportRegistry(registryUrl?: string): TransportRegistry;
|
|
35
|
+
* `HttpTransport` is last, the fallback for plain `https` refs. OCI (and later
|
|
36
|
+
* S3) claim their `oci://` / `s3://` refs before the fallback is reached. */
|
|
37
|
+
export declare function defaultTransports(): Transport[];
|
|
38
|
+
/** A `TransportRegistry` seeded with {@link defaultTransports}, memoized. The
|
|
39
|
+
* default transports hold no per-call state, so one shared instance is safe —
|
|
40
|
+
* and avoids re-instantiating the whole set on hot paths like
|
|
41
|
+
* `cachePathForCanonical`. It is also what gives `OciTransport`'s per-instance
|
|
42
|
+
* read-client pool a process-wide lifetime here, so the bearer-token cache
|
|
43
|
+
* survives across operations without the pool having to be global. */
|
|
44
|
+
export declare function defaultTransportRegistry(): TransportRegistry;
|
|
46
45
|
//# sourceMappingURL=transport-registry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport-registry.d.ts","sourceRoot":"","sources":["../../src/transports/transport-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAE7E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAGhE,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,aAAa,EACb,SAAS,EACV,MAAM,gBAAgB,CAAC;AAExB;;;;
|
|
1
|
+
{"version":3,"file":"transport-registry.d.ts","sourceRoot":"","sources":["../../src/transports/transport-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAE7E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAGhE,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,aAAa,EACb,SAAS,EACV,MAAM,gBAAgB,CAAC;AAExB;;;;gEAIgE;AAChE,qBAAa,iBAAiB;IAChB,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAAV,UAAU,EAAE,SAAS,EAAE;IAEpD,kEAAkE;IAClE,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS;IAI1C;0EACsE;IACtE,OAAO,IAAI,cAAc,EAAE;IAI3B;iEAC6D;IAC7D,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,mBAAmB,GAAG,IAAI;IAIpD;wEACoE;IACpE,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC;IAInD;gEAC4D;IAC5D,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IAInE;kFAC8E;IAC9E,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAI3C;yDACqD;IACrD,OAAO,CACL,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,aAAa,EACrB,IAAI,CAAC,EAAE,cAAc,GACpB,OAAO,CAAC,aAAa,CAAC;IAIzB,OAAO,CAAC,OAAO;CAOhB;AAED;;8EAE8E;AAC9E,wBAAgB,iBAAiB,IAAI,SAAS,EAAE,CAE/C;AAID;;;;;uEAKuE;AACvE,wBAAgB,wBAAwB,IAAI,iBAAiB,CAE5D"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { HttpTransport } from "./http-transport.js";
|
|
1
2
|
import { OciTransport } from "./oci/oci-transport.js";
|
|
2
|
-
import { RegistryTransport } from "./registry-transport.js";
|
|
3
3
|
/** Dispatches ref-scheme-specific operations to the transport that owns a ref.
|
|
4
4
|
* The loader, cache source, `upgrade`, and `publish` consult this instead of
|
|
5
|
-
* branching on ref shape. `
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* branching on ref shape. `HttpTransport` is always last so it is the fallback
|
|
6
|
+
* for plain `https` refs, and a scheme-owning transport (OCI, later S3) claims
|
|
7
|
+
* its refs via `supports()` before the fallback is reached. */
|
|
8
8
|
export class TransportRegistry {
|
|
9
9
|
transports;
|
|
10
10
|
constructor(transports) {
|
|
@@ -53,26 +53,19 @@ export class TransportRegistry {
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
/** The default transport set. Scheme-owning transports come first; the
|
|
56
|
-
* `
|
|
57
|
-
*
|
|
58
|
-
export function defaultTransports(
|
|
59
|
-
return [new OciTransport(), new
|
|
56
|
+
* `HttpTransport` is last, the fallback for plain `https` refs. OCI (and later
|
|
57
|
+
* S3) claim their `oci://` / `s3://` refs before the fallback is reached. */
|
|
58
|
+
export function defaultTransports() {
|
|
59
|
+
return [new OciTransport(), new HttpTransport()];
|
|
60
60
|
}
|
|
61
|
-
|
|
62
|
-
/** A `TransportRegistry` seeded with {@link defaultTransports}, memoized
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
const key = registryUrl ?? "";
|
|
71
|
-
let cached = defaultRegistryCache.get(key);
|
|
72
|
-
if (!cached) {
|
|
73
|
-
cached = new TransportRegistry(defaultTransports(registryUrl));
|
|
74
|
-
defaultRegistryCache.set(key, cached);
|
|
75
|
-
}
|
|
76
|
-
return cached;
|
|
61
|
+
let defaultRegistry;
|
|
62
|
+
/** A `TransportRegistry` seeded with {@link defaultTransports}, memoized. The
|
|
63
|
+
* default transports hold no per-call state, so one shared instance is safe —
|
|
64
|
+
* and avoids re-instantiating the whole set on hot paths like
|
|
65
|
+
* `cachePathForCanonical`. It is also what gives `OciTransport`'s per-instance
|
|
66
|
+
* read-client pool a process-wide lifetime here, so the bearer-token cache
|
|
67
|
+
* survives across operations without the pool having to be global. */
|
|
68
|
+
export function defaultTransportRegistry() {
|
|
69
|
+
return (defaultRegistry ??= new TransportRegistry(defaultTransports()));
|
|
77
70
|
}
|
|
78
71
|
//# sourceMappingURL=transport-registry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport-registry.js","sourceRoot":"","sources":["../../src/transports/transport-registry.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"transport-registry.js","sourceRoot":"","sources":["../../src/transports/transport-registry.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAQtD;;;;gEAIgE;AAChE,MAAM,OAAO,iBAAiB;IACC;IAA7B,YAA6B,UAAuB;QAAvB,eAAU,GAAV,UAAU,CAAa;IAAG,CAAC;IAExD,kEAAkE;IAClE,MAAM,CAAC,GAAW;QAChB,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;IACtD,CAAC;IAED;0EACsE;IACtE,OAAO;QACL,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IAC9C,CAAC;IAED;iEAC6D;IAC7D,WAAW,CAAC,GAAW;QACrB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,WAAW,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC;IACpD,CAAC;IAED;wEACoE;IACpE,YAAY,CAAC,GAAW;QACtB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IAC7C,CAAC;IAED;gEAC4D;IAC5D,UAAU,CAAC,GAAW,EAAE,UAAkB;QACxC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;IACvD,CAAC;IAED;kFAC8E;IAC9E,MAAM,CAAC,GAAW;QAChB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACvC,CAAC;IAED;yDACqD;IACrD,OAAO,CACL,WAAmB,EACnB,MAAqB,EACrB,IAAqB;QAErB,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IACtE,CAAC;IAEO,OAAO,CAAC,GAAW;QACzB,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACnC,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CAAC,0BAA0B,GAAG,GAAG,CAAC,CAAC;QACpD,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AAED;;8EAE8E;AAC9E,MAAM,UAAU,iBAAiB;IAC/B,OAAO,CAAC,IAAI,YAAY,EAAE,EAAE,IAAI,aAAa,EAAE,CAAC,CAAC;AACnD,CAAC;AAED,IAAI,eAA8C,CAAC;AAEnD;;;;;uEAKuE;AACvE,MAAM,UAAU,wBAAwB;IACtC,OAAO,CAAC,eAAe,KAAK,IAAI,iBAAiB,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAC;AAC1E,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telorun/kernel",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.86.0",
|
|
4
4
|
"description": "Telo Runtime - A lightweight, polyglot execution host.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"telo",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"@marcbachmann/cel-js": "^7.6.1",
|
|
63
63
|
"@sinclair/typebox": "^0.34.48",
|
|
64
|
-
"@telorun/analyzer": "0.
|
|
64
|
+
"@telorun/analyzer": "0.70.0",
|
|
65
65
|
"@telorun/glob": "0.2.0",
|
|
66
66
|
"@telorun/templating": "0.18.0",
|
|
67
67
|
"ajv": "^8.17.1",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"@types/tar-stream": "^3.1.3",
|
|
76
76
|
"typescript": "^5.0.0",
|
|
77
77
|
"vitest": "^2.1.8",
|
|
78
|
-
"@telorun/sdk": "0.
|
|
78
|
+
"@telorun/sdk": "0.86.0"
|
|
79
79
|
},
|
|
80
80
|
"optionalDependencies": {
|
|
81
81
|
"esbuild": "^0.25.12"
|
|
@@ -433,15 +433,14 @@ export function moduleDirectoryFor(
|
|
|
433
433
|
requestedUrl: string,
|
|
434
434
|
source: string,
|
|
435
435
|
entryDir: string,
|
|
436
|
-
registryUrl: string | undefined,
|
|
437
436
|
manifestsDir: string | undefined,
|
|
438
437
|
legacyDir?: string | null,
|
|
439
438
|
): string | null {
|
|
440
439
|
const pinned = splitIntegrity(requestedUrl).base;
|
|
441
|
-
const cacheFile = cachePathForCanonical(pinned, entryDir,
|
|
440
|
+
const cacheFile = cachePathForCanonical(pinned, entryDir, manifestsDir);
|
|
442
441
|
if (cacheFile) {
|
|
443
442
|
if (legacyDir && !existsSync(cacheFile)) {
|
|
444
|
-
const legacyFile = cachePathForCanonical(pinned, entryDir,
|
|
443
|
+
const legacyFile = cachePathForCanonical(pinned, entryDir, legacyDir);
|
|
445
444
|
if (legacyFile && existsSync(legacyFile)) return path.dirname(legacyFile);
|
|
446
445
|
}
|
|
447
446
|
return path.dirname(cacheFile);
|
|
@@ -285,17 +285,17 @@ function findPackageRoot(entryFile: string, name: string): string | null {
|
|
|
285
285
|
|
|
286
286
|
/**
|
|
287
287
|
* Loads a `pkg:telo` controller — a controller delivered inside the module's own
|
|
288
|
-
*
|
|
289
|
-
*
|
|
288
|
+
* artifact, not fetched from an external package registry. Every PURL segment
|
|
289
|
+
* carries meaning:
|
|
290
290
|
*
|
|
291
291
|
* pkg:telo / local / <format> ? path=./nodejs/x.mjs # export
|
|
292
292
|
* type ns name qualifier subpath
|
|
293
293
|
*
|
|
294
294
|
* - `type=telo` — Telo-delivered (not npm/cargo).
|
|
295
295
|
* - `namespace=local` — the delivery sub-mode: bundled in the module artifact.
|
|
296
|
-
*
|
|
297
|
-
*
|
|
298
|
-
*
|
|
296
|
+
* The namespace is what leaves room for a future sub-mode (a controller
|
|
297
|
+
* fetched as its own artifact). A non-`local` namespace → env-missing here
|
|
298
|
+
* (a different mode another branch/kernel would handle).
|
|
299
299
|
* - `name=<format>` — the artifact format the loader dispatches on (`js` /
|
|
300
300
|
* `napi` / `wasm`). Bundling is the one delivery not tied to an ecosystem's
|
|
301
301
|
* runtime (npm ⇒ JS, cargo ⇒ Rust; a bundle is just files), so the format is
|
|
@@ -497,8 +497,8 @@ export class BundleControllerLoader {
|
|
|
497
497
|
}
|
|
498
498
|
|
|
499
499
|
// Delivery sub-mode lives in the namespace; this loader handles bundled
|
|
500
|
-
// (`local`) controllers. Anything else (
|
|
501
|
-
//
|
|
500
|
+
// (`local`) controllers. Anything else (a future sub-mode) is env-missing
|
|
501
|
+
// so the candidate list falls through.
|
|
502
502
|
if (parsed.namespace !== "local") {
|
|
503
503
|
throw new ControllerEnvMissingError(
|
|
504
504
|
`pkg:telo controller "${purl}" must use the "local" namespace (pkg:telo/local/<format>); got "${parsed.namespace ?? "(none)"}"`,
|