@substrat-run/control-plane-api 0.150.0 → 0.152.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/api.d.ts +3 -1
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +13 -5
- package/dist/api.js.map +1 -1
- package/dist/custom-hostnames.js +2 -2
- package/dist/custom-hostnames.js.map +1 -1
- package/dist/deploy.d.ts +2 -2
- package/dist/deploy.d.ts.map +1 -1
- package/dist/deploy.js +3 -2
- package/dist/deploy.js.map +1 -1
- package/dist/platform-scope-stores.d.ts +8 -2
- package/dist/platform-scope-stores.d.ts.map +1 -1
- package/dist/platform-scope-stores.js +19 -8
- package/dist/platform-scope-stores.js.map +1 -1
- package/dist/preview-auth.d.ts +14 -8
- package/dist/preview-auth.d.ts.map +1 -1
- package/dist/preview-auth.js +178 -21
- package/dist/preview-auth.js.map +1 -1
- package/dist/store-entry.d.ts +21 -11
- package/dist/store-entry.d.ts.map +1 -1
- package/dist/store-entry.js +39 -26
- package/dist/store-entry.js.map +1 -1
- package/package.json +7 -7
package/dist/preview-auth.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SHARED_ISSUER_CONFIG_KEY, oidcCallbackUrl, } from '@substrat-run/contracts';
|
|
1
|
+
import { MCP_RESOURCES_CONFIG_PREFIX, SHARED_ISSUER_CONFIG_KEY, mcpResourceOf, oidcCallbackUrl, } from '@substrat-run/contracts';
|
|
2
2
|
import { ControlPlaneError } from '@substrat-run/control-plane-client';
|
|
3
3
|
/**
|
|
4
4
|
* A preview's login (#1704) — the control plane's half. The issuer's half, and why the
|
|
@@ -36,6 +36,38 @@ import { ControlPlaneError } from '@substrat-run/control-plane-client';
|
|
|
36
36
|
* exists) means stop: the push that minted it owns what happens next. Only `kept: false`
|
|
37
37
|
* — its own client vanished while its version is still bound — is retried, three
|
|
38
38
|
* attempts in all; running out is a failure, never a success.
|
|
39
|
+
*
|
|
40
|
+
* ## Its MCP endpoint
|
|
41
|
+
*
|
|
42
|
+
* The issuer that now signs the preview in is also told to mint for the preview's MCP
|
|
43
|
+
* endpoint, or an MCP client pointed at the preview meets `invalid_target` before any login
|
|
44
|
+
* page (#1619). It is the dashboard's own delivery, `substrat:resources:<scope id>` through
|
|
45
|
+
* the issuer's `/internal/configure`, keyed by the PREVIEW's scope: the issuer touches only
|
|
46
|
+
* rows marked for that key, so prod's registration is never read or written. The value is
|
|
47
|
+
* the whole set, so every push re-asserts it at no cost, and the reap clears it. Like the
|
|
48
|
+
* dashboard's registration it is best-effort: a login that works is not failed for it.
|
|
49
|
+
*
|
|
50
|
+
* ## A reap racing a push
|
|
51
|
+
*
|
|
52
|
+
* The reap keeps the preview's row until its very last step, so the row alone cannot tell a
|
|
53
|
+
* push that the preview is going. The reap therefore ARCHIVES it before it touches any issuer
|
|
54
|
+
* (`retireClientsOfReapedScope`), and a push reads anything but `active` as gone. Archived is
|
|
55
|
+
* one-way here: no push ever restores a scope. Every issuer write of a push is followed by
|
|
56
|
+
* one of its looks at the binding before it answers, so either that look came before the
|
|
57
|
+
* archive, and the reap's issuer step, which runs after the archive, removes what the push
|
|
58
|
+
* wrote; or the look sees the archive, and the push removes what it wrote itself.
|
|
59
|
+
*
|
|
60
|
+
* Both removals clear the registration BEFORE they retire the clients. The issuer refuses to
|
|
61
|
+
* treat a scope it minted preview clients for as a parent, while the registration's row
|
|
62
|
+
* carries the same platform marker an app's does; clearing first means that row never
|
|
63
|
+
* outlives the clients that make the issuer read the scope as a preview.
|
|
64
|
+
*
|
|
65
|
+
* One row per endpoint, and the issuer moves it to whichever key delivered it last. A fresh
|
|
66
|
+
* preview of the same tag holds the same `--<tag>` hostname under a new scope, so a push still
|
|
67
|
+
* running for the reaped one could move that preview's row onto its own key, and its removal
|
|
68
|
+
* would then delete it. A push therefore registers only the hostnames the directory says its
|
|
69
|
+
* preview holds now, and after its removal hands back any such row to the preview of the same
|
|
70
|
+
* app that holds the hostname (`handBack`).
|
|
39
71
|
*/
|
|
40
72
|
/** The capability a vertical declares to be a team issuer (manifest `provides`, #427). */
|
|
41
73
|
const OIDC_ISSUER = 'oidc-issuer';
|
|
@@ -44,6 +76,8 @@ const LEGACY_ISSUER_SLUG = 'auth-server';
|
|
|
44
76
|
/** The most callbacks a parent's hostnames yield in one check (the wire bound). */
|
|
45
77
|
const MAX_PARENT_CALLBACKS = 32;
|
|
46
78
|
const MAX_ATTEMPTS = 3;
|
|
79
|
+
/** The statuses `archiveScope` leaves; anything else is gone already, or past archived. */
|
|
80
|
+
const ARCHIVABLE = new Set(['provisioning', 'active', 'suspended']);
|
|
47
81
|
/** The team's own auth-servers: active, not a fork, not a preview, of a vertical that provides `oidc-issuer`. */
|
|
48
82
|
export async function tenantIssuers(deps, tenantId) {
|
|
49
83
|
const verticals = await deps.admin.listVerticals(deps.actor);
|
|
@@ -59,6 +93,10 @@ function issuerHostname(bound) {
|
|
|
59
93
|
return (pick(active) ?? pick(live))?.hostname;
|
|
60
94
|
}
|
|
61
95
|
const reasonOf = (e) => (e instanceof Error ? e.message : String(e));
|
|
96
|
+
/** The issuer's registration of a preview's MCP endpoints (#1619's entry): `[]` clears them. */
|
|
97
|
+
function previewResourcesEntry(previewScopeId, resources) {
|
|
98
|
+
return { key: `${MCP_RESOURCES_CONFIG_PREFIX}${previewScopeId}`, value: resources.length > 0 ? JSON.stringify(resources) : '' };
|
|
99
|
+
}
|
|
62
100
|
/** Re-exported for the preview routes, which name a preview's callback on every row. */
|
|
63
101
|
export { oidcCallbackUrl };
|
|
64
102
|
/** Why a push left the login alone, as `preview create` reports it. */
|
|
@@ -157,15 +195,87 @@ export async function wirePreviewAuth(deps, input) {
|
|
|
157
195
|
const issuer = `https://${claim.hostname}`;
|
|
158
196
|
const address = { tenantId: input.tenantId, scopeId: claim.scope.id, previewScopeId: input.previewId };
|
|
159
197
|
const retireOwn = (minted) => claim.client.retirePreviewClients({ ...address, only: minted.clientId }).then(() => null, (e) => reasonOf(e));
|
|
198
|
+
/** Deliver a scope's whole set of MCP endpoints, under that scope's own key, at this issuer. */
|
|
199
|
+
const registerMcp = (scopeId, hosts) => (deps.retry ?? ((fn) => fn()))(() => claim.client.configureInstance({
|
|
200
|
+
tenantId: input.tenantId,
|
|
201
|
+
scopeId: claim.scope.id,
|
|
202
|
+
entries: [previewResourcesEntry(scopeId, hosts.map((h) => mcpResourceOf(`https://${h}`)))],
|
|
203
|
+
}));
|
|
204
|
+
/**
|
|
205
|
+
* The hostnames a scope's endpoints are, by the dashboard's rule (`mcpResourcesFor`): every
|
|
206
|
+
* one the directory says it actively answers on NOW. Never one it no longer holds: the issuer
|
|
207
|
+
* moves a row to whichever key delivered it last, so a push still running for a reaped
|
|
208
|
+
* preview must not claim the `--<tag>` hostname a newer preview of the same tag holds.
|
|
209
|
+
*/
|
|
210
|
+
const activeHosts = async (scopeId) => [
|
|
211
|
+
...new Set((await deps.admin.listHostnames(deps.actor, { scopeId }))
|
|
212
|
+
.filter((h) => h.status === 'active')
|
|
213
|
+
.map((h) => h.hostname)),
|
|
214
|
+
].sort();
|
|
215
|
+
/** Anything but `active` is gone: the reap archives a preview before its issuer step. */
|
|
160
216
|
const bound = async () => {
|
|
161
217
|
const rec = await deps.admin.getScopeRecord(deps.actor, input.tenantId, input.previewId);
|
|
162
218
|
if (!rec || rec.status !== 'active')
|
|
163
219
|
return 'gone';
|
|
164
220
|
return rec.verticalVersionId === input.versionId ? 'ours' : 'moved';
|
|
165
221
|
};
|
|
222
|
+
/** Set once this push has minted: from then on it may have left something at the issuer. */
|
|
223
|
+
let wrote = false;
|
|
224
|
+
/** What this push last asked the issuer to register — the rows its delivery may have moved. */
|
|
225
|
+
let registeredHosts = [];
|
|
226
|
+
/** Is this scope an active preview of the same app — one a hand-back may write for? */
|
|
227
|
+
const liveSibling = async (scopeId) => {
|
|
228
|
+
const rec = await deps.admin.getScopeRecord(deps.actor, input.tenantId, scopeId);
|
|
229
|
+
return rec?.status === 'active' && rec.kind === 'preview' && rec.forkedFrom === parent.id;
|
|
230
|
+
};
|
|
231
|
+
/**
|
|
232
|
+
* After this push cleared its own key: hand back a row it moved off a NEWER preview of the
|
|
233
|
+
* same app (the same `--<tag>` hostname under a fresh scope), which the clear just deleted.
|
|
234
|
+
* The directory names who holds each hostname now; that preview gets its own whole set back
|
|
235
|
+
* under its own key, as its own push sends it. Anything else holding one is left alone.
|
|
236
|
+
*
|
|
237
|
+
* The hand-back is an issuer write like any other, so it is followed by a look: a holder
|
|
238
|
+
* reaped while it was in flight has its key cleared again. Its reap archives it before its
|
|
239
|
+
* own clear, so either this look sees the archive or that clear lands after this write.
|
|
240
|
+
*/
|
|
241
|
+
const handBack = async () => {
|
|
242
|
+
const holders = new Set();
|
|
243
|
+
for (const hostname of registeredHosts) {
|
|
244
|
+
const route = await deps.admin.resolveHostname(hostname);
|
|
245
|
+
if (route && route.tenantId === input.tenantId && route.scopeId !== input.previewId)
|
|
246
|
+
holders.add(route.scopeId);
|
|
247
|
+
}
|
|
248
|
+
for (const holder of holders) {
|
|
249
|
+
if (!(await liveSibling(holder)))
|
|
250
|
+
continue;
|
|
251
|
+
await registerMcp(holder, await activeHosts(holder));
|
|
252
|
+
if (!(await liveSibling(holder)))
|
|
253
|
+
await registerMcp(holder, []);
|
|
254
|
+
}
|
|
255
|
+
};
|
|
166
256
|
const reapedMeanwhile = async () => {
|
|
167
|
-
// The preview was reaped while this push ran
|
|
168
|
-
|
|
257
|
+
// The preview was reaped while this push ran. What this push wrote after the reap's issuer
|
|
258
|
+
// step is this push's to remove (see "A reap racing a push"), and a step that fails is
|
|
259
|
+
// said, each in its own words: after the row is gone, nothing names those writes again.
|
|
260
|
+
// Every step runs whatever the others did, except that the clients stay when the clear
|
|
261
|
+
// failed, so the registration never outlives them (clear first, as the reap does).
|
|
262
|
+
if (wrote) {
|
|
263
|
+
const failed = [];
|
|
264
|
+
const step = (what, run) => run().then(() => true, (e) => {
|
|
265
|
+
failed.push(`${what} failed (${reasonOf(e)})`);
|
|
266
|
+
return false;
|
|
267
|
+
});
|
|
268
|
+
const cleared = await step("clearing this preview's MCP registration", () => registerMcp(input.previewId, []));
|
|
269
|
+
await step('handing back the MCP registration of the newer preview that holds its hostname', handBack);
|
|
270
|
+
if (cleared)
|
|
271
|
+
await step("deleting this push's client", () => claim.client.retirePreviewClients(address));
|
|
272
|
+
else
|
|
273
|
+
failed.push("its client was kept, so it does not outlive the registration that failed to clear");
|
|
274
|
+
if (failed.length > 0) {
|
|
275
|
+
throw new ControlPlaneError(502, `preview '${input.tag}' was reaped while this push ran, and at the auth server ${claim.scope.id} ` +
|
|
276
|
+
`${failed.join('; ')}.`);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
169
279
|
return superseded(callbackUrl, 'the preview was reaped while this push ran');
|
|
170
280
|
};
|
|
171
281
|
const noLogin = (why) => new ControlPlaneError(502, `preview '${input.tag}' was created but has NO working login: ${why}. Re-run \`preview create\` to retry.`);
|
|
@@ -189,6 +299,7 @@ export async function wirePreviewAuth(deps, input) {
|
|
|
189
299
|
catch (e) {
|
|
190
300
|
throw noLogin(`the auth server ${claim.scope.id} did not mint its client (${reasonOf(e)})`);
|
|
191
301
|
}
|
|
302
|
+
wrote = true;
|
|
192
303
|
try {
|
|
193
304
|
await input.deliver([
|
|
194
305
|
{
|
|
@@ -205,29 +316,51 @@ export async function wirePreviewAuth(deps, input) {
|
|
|
205
316
|
(cleanup ? `, and removing that client failed too (${cleanup}) — the preview's reap removes it` : ''));
|
|
206
317
|
}
|
|
207
318
|
const after = await bound();
|
|
208
|
-
if (after
|
|
319
|
+
if (after === 'gone')
|
|
320
|
+
return reapedMeanwhile(); // which removes our client with the rest
|
|
321
|
+
if (after === 'moved') {
|
|
209
322
|
// Our client sits only in our own version's store, which is no longer served.
|
|
210
323
|
await retireOwn(minted);
|
|
211
|
-
return
|
|
324
|
+
return superseded(callbackUrl, 'another push re-bound the preview');
|
|
212
325
|
}
|
|
213
|
-
|
|
326
|
+
// Delivered and bound: the issuer signs this preview in now, so it may mint for the
|
|
327
|
+
// preview's MCP endpoints too. A repeat (a retry below, every later push) writes nothing.
|
|
328
|
+
const mcp = await activeHosts(input.previewId)
|
|
329
|
+
.then(async (hosts) => {
|
|
330
|
+
registeredHosts = hosts;
|
|
331
|
+
await registerMcp(input.previewId, hosts);
|
|
332
|
+
return hosts.length > 0
|
|
333
|
+
? ` MCP: ${hosts.map((h) => mcpResourceOf(`https://${h}`)).join(', ')} registered there too, and un-registered by the same reap.`
|
|
334
|
+
: ` MCP: the preview answers on no active hostname yet, so no endpoint of it is registered there.`;
|
|
335
|
+
})
|
|
336
|
+
.catch((e) => ` MCP: the preview's endpoint could not be registered there (${reasonOf(e)}), so an MCP client ` +
|
|
337
|
+
`pointed at the preview gets invalid_target until the next push registers it.`);
|
|
338
|
+
let older = '';
|
|
214
339
|
try {
|
|
215
|
-
retired = await claim.client.retirePreviewClients({ ...address, keep: minted.clientId });
|
|
340
|
+
const retired = await claim.client.retirePreviewClients({ ...address, keep: minted.clientId });
|
|
341
|
+
if (retired.kept === false)
|
|
342
|
+
continue; // our own client vanished while our version is bound
|
|
216
343
|
}
|
|
217
344
|
catch (e) {
|
|
218
345
|
// Delivered and bound: the login works. What is left is older clients, which the next
|
|
219
346
|
// push or the reap removes — said, not hidden.
|
|
220
|
-
|
|
347
|
+
older = ` Older clients of this preview could not be removed yet (${reasonOf(e)}); the next push or the reap removes them.`;
|
|
221
348
|
}
|
|
222
|
-
|
|
223
|
-
continue; // our own client vanished while our version is bound
|
|
349
|
+
// The look after this push's last issuer write, on every way to `wired` (see "A reap racing a push").
|
|
224
350
|
if ((await bound()) === 'gone')
|
|
225
351
|
return reapedMeanwhile();
|
|
226
|
-
return wired(claim.scope.id, issuer, minted.clientId, callbackUrl);
|
|
352
|
+
return wired(claim.scope.id, issuer, minted.clientId, callbackUrl, `${mcp}${older}`);
|
|
227
353
|
}
|
|
354
|
+
// The last attempt's `continue` lands here, after its writes: the same look, before giving up,
|
|
355
|
+
// and the same answers the loop gives.
|
|
356
|
+
const last = await bound();
|
|
357
|
+
if (last === 'gone')
|
|
358
|
+
return reapedMeanwhile();
|
|
359
|
+
if (last === 'moved')
|
|
360
|
+
return superseded(callbackUrl, 'another push re-bound the preview');
|
|
228
361
|
throw noLogin(`its client kept disappearing at the auth server ${claim.scope.id} (${MAX_ATTEMPTS} attempts)`);
|
|
229
362
|
}
|
|
230
|
-
function wired(issuerScopeId, issuer, clientId, callbackUrl, extra
|
|
363
|
+
function wired(issuerScopeId, issuer, clientId, callbackUrl, extra) {
|
|
231
364
|
return {
|
|
232
365
|
status: 'wired',
|
|
233
366
|
callbackUrl,
|
|
@@ -237,11 +370,14 @@ function wired(issuerScopeId, issuer, clientId, callbackUrl, extra = '') {
|
|
|
237
370
|
note: `Sign-in: this preview has its own client at your auth server ${issuer} (client ${clientId}); it is deleted when the preview is reaped.${extra}`,
|
|
238
371
|
};
|
|
239
372
|
}
|
|
373
|
+
/** A refusal that says the deployment does not implement the call: it cannot hold what the call removes. */
|
|
374
|
+
const predates = (e) => e instanceof ControlPlaneError && e.status === 501;
|
|
240
375
|
/**
|
|
241
|
-
*
|
|
242
|
-
*
|
|
243
|
-
*
|
|
244
|
-
*
|
|
376
|
+
* Un-register a preview's MCP endpoint and delete every client minted for it, at every
|
|
377
|
+
* auth-server of its tenant, in that order (see "A reap racing a push") — the reap's half,
|
|
378
|
+
* run BEFORE the preview's storage and row go, so a failure leaves a preview a retry can still
|
|
379
|
+
* find. A deployment that takes no delivery holds no registration, and one that predates
|
|
380
|
+
* preview clients holds no client; each is skipped for that half. Any other failure throws.
|
|
245
381
|
*/
|
|
246
382
|
export async function retireAllPreviewClients(deps, tenantId, previewScopeId) {
|
|
247
383
|
const deleted = [];
|
|
@@ -249,25 +385,46 @@ export async function retireAllPreviewClients(deps, tenantId, previewScopeId) {
|
|
|
249
385
|
const client = await deps.issuerClient(scope);
|
|
250
386
|
if (!client)
|
|
251
387
|
throw new ControlPlaneError(502, `the auth server ${scope.id} could not be reached to delete preview ${previewScopeId}'s clients`);
|
|
388
|
+
await client
|
|
389
|
+
.configureInstance({ tenantId, scopeId: scope.id, entries: [previewResourcesEntry(previewScopeId, [])] })
|
|
390
|
+
.catch((e) => {
|
|
391
|
+
if (!predates(e))
|
|
392
|
+
throw e;
|
|
393
|
+
});
|
|
252
394
|
try {
|
|
253
395
|
deleted.push(...(await client.retirePreviewClients({ tenantId, scopeId: scope.id, previewScopeId })).deleted);
|
|
254
396
|
}
|
|
255
397
|
catch (e) {
|
|
256
|
-
if (e
|
|
257
|
-
|
|
258
|
-
throw e;
|
|
398
|
+
if (!predates(e))
|
|
399
|
+
throw e;
|
|
259
400
|
}
|
|
260
401
|
}
|
|
261
402
|
return deleted;
|
|
262
403
|
}
|
|
263
404
|
/**
|
|
264
405
|
* The reap's half for ANY scope about to go, as the platform sweep's expiry GC sees it: a
|
|
265
|
-
* preview fork
|
|
266
|
-
*
|
|
406
|
+
* preview fork is archived — so no push still running can wire it again — and then its MCP
|
|
407
|
+
* registration is cleared and its clients retired; anything else — a snapshot, a clean room —
|
|
408
|
+
* has neither and is left alone. One predicate for the interactive reap and the sweep, so
|
|
409
|
+
* they agree. A reap that fails after the archive leaves an archived preview, which the reap's
|
|
410
|
+
* retry (the DELETE, the sweep's next pass, a create of the same tag) finds and finishes.
|
|
267
411
|
*/
|
|
268
412
|
export async function retireClientsOfReapedScope(deps, scope) {
|
|
269
413
|
if (!scope || scope.kind !== 'preview' || !scope.forkedFrom)
|
|
270
414
|
return [];
|
|
415
|
+
await archiveForReap(deps, scope);
|
|
271
416
|
return retireAllPreviewClients(deps, scope.tenantId, scope.id);
|
|
272
417
|
}
|
|
418
|
+
/** Archive a preview about to be reaped, unless it is archived (or gone) already — by a reap racing this one, too. */
|
|
419
|
+
async function archiveForReap(deps, scope) {
|
|
420
|
+
const current = async () => (await deps.admin.getScopeRecord(deps.actor, scope.tenantId, scope.id))?.status;
|
|
421
|
+
const status = await current();
|
|
422
|
+
if (status === undefined || !ARCHIVABLE.has(status))
|
|
423
|
+
return;
|
|
424
|
+
await deps.admin.archiveScope(deps.actor, scope.tenantId, scope.id).catch(async (e) => {
|
|
425
|
+
const now = await current();
|
|
426
|
+
if (now !== undefined && ARCHIVABLE.has(now))
|
|
427
|
+
throw e;
|
|
428
|
+
});
|
|
429
|
+
}
|
|
273
430
|
//# sourceMappingURL=preview-auth.js.map
|
package/dist/preview-auth.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preview-auth.js","sourceRoot":"","sources":["../src/preview-auth.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,eAAe,GAQhB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAGvE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,0FAA0F;AAC1F,MAAM,WAAW,GAAG,aAAa,CAAC;AAClC,yFAAyF;AACzF,MAAM,kBAAkB,GAAG,aAAa,CAAC;AACzC,mFAAmF;AACnF,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAChC,MAAM,YAAY,GAAG,CAAC,CAAC;AASvB,iHAAiH;AACjH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,IAAqB,EAAE,QAAkB;IAC3E,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC7D,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,CAAC,kBAAkB,EAAE,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpI,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,UAAU,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C,IAAI,KAAK,SAAS,IAAI,CAAC,KAAK,CAAC,UAAU;QAAE,OAAO,EAAE,CAAC;IACvE,MAAM,cAAc,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAClC,OAAO,uBAAuB,CAAC,IAAI,EAAE,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC;AACjE,CAAC;AAED,sHAAsH;AACtH,KAAK,UAAU,cAAc,CAAC,IAAqB,EAAE,KAAY;IAC/D,MAAM,OAAO,GAAG,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,CAAC;IAC5G,MAAM,MAAM,GAAG,MAAM,OAAO,EAAE,CAAC;IAC/B,IAAI,MAAM,KAAK,SAAS,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC;QAAE,OAAO;IAC5D,MAAM,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,EAAE,CAAU,EAAE,EAAE;QAC7F,MAAM,GAAG,GAAG,MAAM,OAAO,EAAE,CAAC;QAC5B,IAAI,GAAG,KAAK,SAAS,IAAI,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,MAAM,CAAC,CAAC;IACxD,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/store-entry.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type DeclaredBinding } from '@substrat-run/contracts';
|
|
1
|
+
import { type DeclaredBinding, type PythonStoreModuleClass } from '@substrat-run/contracts';
|
|
2
2
|
import type { VerticalBundle } from './deploy.js';
|
|
3
3
|
export { STORE_CLASS_PLACEHOLDER, STORE_ENTRY_MODULE, STORE_ENTRY_PYTHON_MODULE, STORE_ENTRY_PYTHON_SOURCE, STORE_ENTRY_PYTHON_VERIFIER_SOURCE, STORE_ENTRY_SOURCE, STORE_DRIVER_PLACEHOLDER, STORE_OBJECT_BINDING, STORE_OBJECT_CLASS, STORE_PYTHON_COMPATIBILITY_DATE, STORE_RESERVED_MODULES, STORE_VERIFIER_MODULE, } from './store-entry.generated.js';
|
|
4
4
|
export interface StoreEntryOptions {
|
|
@@ -67,24 +67,34 @@ export interface PythonStoreScript {
|
|
|
67
67
|
readonly compatibilityFlags: readonly string[];
|
|
68
68
|
readonly bindings: readonly DeclaredBinding[];
|
|
69
69
|
}
|
|
70
|
+
/**
|
|
71
|
+
* Workers' Data module type. Vendored `python_modules/` files, `.py` included, upload as this:
|
|
72
|
+
* that is the multipart type a Data module uses, and it is what the upload already sends for
|
|
73
|
+
* opaque bytes. The driver's own `.py` modules stay `text/x-python`.
|
|
74
|
+
*/
|
|
75
|
+
export declare const STORE_PYTHON_DATA_CONTENT_TYPE = "application/octet-stream";
|
|
70
76
|
/**
|
|
71
77
|
* The store script as uploaded for a Python driver (#2290, #2210). The Python entry is the main
|
|
72
78
|
* module, with the driver's module and class in place of its two placeholders, and the verifier
|
|
73
79
|
* it imports is shipped beside it, so it runs the JavaScript entry's check. The driver's modules
|
|
74
|
-
* follow, byte for byte
|
|
75
|
-
* (`withStoreEntry`), with `python_workers`.
|
|
80
|
+
* follow, byte for byte, and so do its vendored `python_modules/` (#2390), as Data modules. The
|
|
81
|
+
* bindings and the two flags are the JavaScript entry's (`withStoreEntry`), with `python_workers`.
|
|
82
|
+
*
|
|
83
|
+
* The script imports `workers` from the Python workers runtime those flags and
|
|
84
|
+
* {@link STORE_PYTHON_COMPATIBILITY_DATE} select. The release does not ship that SDK.
|
|
76
85
|
*
|
|
77
86
|
* Refused, before anything is built (D-63): a class name that is not a Python identifier or is
|
|
78
|
-
* the entry's own class; a module
|
|
79
|
-
* than one package; a module named twice; an entry that is not one of the modules
|
|
80
|
-
* whatever `withStoreEntry` refuses of the script name and the keys. A
|
|
81
|
-
*
|
|
87
|
+
* the entry's own class; a module {@link classifyPythonStoreModule} refuses; modules under more
|
|
88
|
+
* than one `driver_` package; a module named twice; an entry that is not one of the modules, or
|
|
89
|
+
* not a driver module; and whatever `withStoreEntry` refuses of the script name and the keys. A
|
|
90
|
+
* reserved module name is refused again by name.
|
|
82
91
|
*/
|
|
83
92
|
export declare function withPythonStoreEntry(release: PythonStoreDriverRelease, options: StoreEntryOptions): PythonStoreScript;
|
|
84
93
|
/**
|
|
85
|
-
* The module rule of a Python driver's release (D-63):
|
|
86
|
-
*
|
|
87
|
-
* release arrives (#2300), and `withPythonStoreEntry`
|
|
94
|
+
* The module rule of a Python driver's release (D-63, #2390): one `driver_<package>` of `.py`
|
|
95
|
+
* modules, optionally `python_modules/<path>` beside it, none twice, and the entry one of the
|
|
96
|
+
* driver modules. The upload applies it when a release arrives (#2300), and `withPythonStoreEntry`
|
|
97
|
+
* again before every script it builds. Returns each module's class, so nothing classifies twice.
|
|
88
98
|
*/
|
|
89
|
-
export declare function assertPythonDriverModules(release: PythonStoreDriverRelease):
|
|
99
|
+
export declare function assertPythonDriverModules(release: PythonStoreDriverRelease): ReadonlyMap<string, PythonStoreModuleClass>;
|
|
90
100
|
//# sourceMappingURL=store-entry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store-entry.d.ts","sourceRoot":"","sources":["../src/store-entry.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"store-entry.d.ts","sourceRoot":"","sources":["../src/store-entry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuD,KAAK,eAAe,EAAE,KAAK,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjJ,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAqBlD,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,yBAAyB,EACzB,yBAAyB,EACz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M,CAAC;QAAC,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;QAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACnH,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,kBAAkB,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/C,QAAQ,CAAC,QAAQ,EAAE,SAAS,eAAe,EAAE,CAAC;CAC/C;AAED;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,6BAA6B,CAAC;AAEzE;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,wBAAwB,EAAE,OAAO,EAAE,iBAAiB,GAAG,iBAAiB,CA4BrH;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,wBAAwB,GAAG,WAAW,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAsBxH"}
|
package/dist/store-entry.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { scopeStorePublicKeysFrom } from '@substrat-run/contracts';
|
|
1
|
+
import { classifyPythonStoreModule, scopeStorePublicKeysFrom } from '@substrat-run/contracts';
|
|
2
2
|
import { STORE_CALLER_KEYS_VAR, STORE_CLASS_PLACEHOLDER, STORE_ENTRY_MODULE, STORE_ENTRY_PYTHON_MODULE, STORE_ENTRY_PYTHON_SOURCE, STORE_ENTRY_PYTHON_VERIFIER_SOURCE, STORE_ENTRY_SOURCE, STORE_DRIVER_PLACEHOLDER, STORE_OBJECT_BINDING, STORE_OBJECT_CLASS, STORE_PLATFORM_KEYS_VAR, STORE_PYTHON_COMPATIBILITY_DATE, STORE_PYTHON_COMPATIBILITY_FLAGS, STORE_RESERVED_BINDING_PREFIX, STORE_RESERVED_MODULES, STORE_SCRIPT_VAR, STORE_VERIFIER_MODULE, } from './store-entry.generated.js';
|
|
3
3
|
export { STORE_CLASS_PLACEHOLDER, STORE_ENTRY_MODULE, STORE_ENTRY_PYTHON_MODULE, STORE_ENTRY_PYTHON_SOURCE, STORE_ENTRY_PYTHON_VERIFIER_SOURCE, STORE_ENTRY_SOURCE, STORE_DRIVER_PLACEHOLDER, STORE_OBJECT_BINDING, STORE_OBJECT_CLASS, STORE_PYTHON_COMPATIBILITY_DATE, STORE_RESERVED_MODULES, STORE_VERIFIER_MODULE, } from './store-entry.generated.js';
|
|
4
4
|
/** A module name the uploader can write and the entry can import: relative, no `..`, JavaScript. */
|
|
@@ -106,28 +106,30 @@ export function withStoreEntry(bundle, options) {
|
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
108
|
/**
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
* and off `metadata`, the upload's own form part.
|
|
109
|
+
* Workers' Data module type. Vendored `python_modules/` files, `.py` included, upload as this:
|
|
110
|
+
* that is the multipart type a Data module uses, and it is what the upload already sends for
|
|
111
|
+
* opaque bytes. The driver's own `.py` modules stay `text/x-python`.
|
|
113
112
|
*/
|
|
114
|
-
const
|
|
113
|
+
export const STORE_PYTHON_DATA_CONTENT_TYPE = 'application/octet-stream';
|
|
115
114
|
/**
|
|
116
115
|
* The store script as uploaded for a Python driver (#2290, #2210). The Python entry is the main
|
|
117
116
|
* module, with the driver's module and class in place of its two placeholders, and the verifier
|
|
118
117
|
* it imports is shipped beside it, so it runs the JavaScript entry's check. The driver's modules
|
|
119
|
-
* follow, byte for byte
|
|
120
|
-
* (`withStoreEntry`), with `python_workers`.
|
|
118
|
+
* follow, byte for byte, and so do its vendored `python_modules/` (#2390), as Data modules. The
|
|
119
|
+
* bindings and the two flags are the JavaScript entry's (`withStoreEntry`), with `python_workers`.
|
|
120
|
+
*
|
|
121
|
+
* The script imports `workers` from the Python workers runtime those flags and
|
|
122
|
+
* {@link STORE_PYTHON_COMPATIBILITY_DATE} select. The release does not ship that SDK.
|
|
121
123
|
*
|
|
122
124
|
* Refused, before anything is built (D-63): a class name that is not a Python identifier or is
|
|
123
|
-
* the entry's own class; a module
|
|
124
|
-
* than one package; a module named twice; an entry that is not one of the modules
|
|
125
|
-
* whatever `withStoreEntry` refuses of the script name and the keys. A
|
|
126
|
-
*
|
|
125
|
+
* the entry's own class; a module {@link classifyPythonStoreModule} refuses; modules under more
|
|
126
|
+
* than one `driver_` package; a module named twice; an entry that is not one of the modules, or
|
|
127
|
+
* not a driver module; and whatever `withStoreEntry` refuses of the script name and the keys. A
|
|
128
|
+
* reserved module name is refused again by name.
|
|
127
129
|
*/
|
|
128
130
|
export function withPythonStoreEntry(release, options) {
|
|
129
131
|
assertDriverClass(options.className, /^[A-Za-z_][A-Za-z0-9_]*$/);
|
|
130
|
-
assertPythonDriverModules(release);
|
|
132
|
+
const classes = assertPythonDriverModules(release);
|
|
131
133
|
const bindings = storeEntryBindings(options);
|
|
132
134
|
const driverModule = release.entry.replace(/\.py$/, '').replaceAll('/', '.');
|
|
133
135
|
const source = STORE_ENTRY_PYTHON_SOURCE.split(STORE_DRIVER_PLACEHOLDER)
|
|
@@ -143,7 +145,11 @@ export function withPythonStoreEntry(release, options) {
|
|
|
143
145
|
content: encode(STORE_ENTRY_PYTHON_VERIFIER_SOURCE),
|
|
144
146
|
contentType: 'application/javascript+module',
|
|
145
147
|
},
|
|
146
|
-
...release.modules.map((module) => ({
|
|
148
|
+
...release.modules.map((module) => ({
|
|
149
|
+
name: module.name,
|
|
150
|
+
content: module.content,
|
|
151
|
+
contentType: classes.get(module.name).kind === 'vendored' ? STORE_PYTHON_DATA_CONTENT_TYPE : 'text/x-python',
|
|
152
|
+
})),
|
|
147
153
|
],
|
|
148
154
|
compatibilityDate: STORE_PYTHON_COMPATIBILITY_DATE,
|
|
149
155
|
compatibilityFlags: [...STORE_PYTHON_COMPATIBILITY_FLAGS, STORE_DISALLOW_IMPORTABLE_ENV, STORE_DISABLE_CTX_EXPORTS],
|
|
@@ -151,28 +157,35 @@ export function withPythonStoreEntry(release, options) {
|
|
|
151
157
|
};
|
|
152
158
|
}
|
|
153
159
|
/**
|
|
154
|
-
* The module rule of a Python driver's release (D-63):
|
|
155
|
-
*
|
|
156
|
-
* release arrives (#2300), and `withPythonStoreEntry`
|
|
160
|
+
* The module rule of a Python driver's release (D-63, #2390): one `driver_<package>` of `.py`
|
|
161
|
+
* modules, optionally `python_modules/<path>` beside it, none twice, and the entry one of the
|
|
162
|
+
* driver modules. The upload applies it when a release arrives (#2300), and `withPythonStoreEntry`
|
|
163
|
+
* again before every script it builds. Returns each module's class, so nothing classifies twice.
|
|
157
164
|
*/
|
|
158
165
|
export function assertPythonDriverModules(release) {
|
|
159
166
|
const packages = new Set();
|
|
160
|
-
const
|
|
167
|
+
const classes = new Map();
|
|
161
168
|
for (const module of release.modules) {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
throw new Error(`a store driver release may not ship a module named '${module.name}': a driver module is driver_<package>/…/<module>.py`);
|
|
169
|
+
if (STORE_RESERVED_MODULES.includes(module.name)) {
|
|
170
|
+
throw new Error(`a store driver release may not ship a module named '${module.name}': a driver module is driver_<package>/…/<module>.py, or a dependency is python_modules/<path>`);
|
|
165
171
|
}
|
|
166
|
-
|
|
172
|
+
const classified = classifyPythonStoreModule(module.name);
|
|
173
|
+
if (classes.has(module.name))
|
|
167
174
|
throw new Error(`a store driver release ships '${module.name}' twice`);
|
|
168
|
-
|
|
169
|
-
|
|
175
|
+
classes.set(module.name, classified);
|
|
176
|
+
if (classified.kind === 'driver')
|
|
177
|
+
packages.add(classified.packageName);
|
|
170
178
|
}
|
|
171
179
|
if (packages.size > 1) {
|
|
172
180
|
throw new Error(`a store driver release ships more than one package (${[...packages].sort().join(', ')})`);
|
|
173
181
|
}
|
|
174
|
-
if (
|
|
182
|
+
if (packages.size === 0)
|
|
183
|
+
throw new Error('a store driver release ships no driver_ package');
|
|
184
|
+
const entry = classes.get(release.entry);
|
|
185
|
+
if (!entry)
|
|
175
186
|
throw new Error(`store driver entry '${release.entry}' is not one of the release's modules`);
|
|
176
|
-
|
|
187
|
+
if (entry.kind !== 'driver')
|
|
188
|
+
throw new Error(`store driver entry '${release.entry}' is not a driver module`);
|
|
189
|
+
return classes;
|
|
177
190
|
}
|
|
178
191
|
//# sourceMappingURL=store-entry.js.map
|
package/dist/store-entry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store-entry.js","sourceRoot":"","sources":["../src/store-entry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,
|
|
1
|
+
{"version":3,"file":"store-entry.js","sourceRoot":"","sources":["../src/store-entry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,wBAAwB,EAAqD,MAAM,yBAAyB,CAAC;AAEjJ,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,kBAAkB,EAClB,yBAAyB,EACzB,yBAAyB,EACzB,kCAAkC,EAClC,kBAAkB,EAClB,wBAAwB,EACxB,oBAAoB,EACpB,kBAAkB,EAClB,uBAAuB,EACvB,+BAA+B,EAC/B,gCAAgC,EAChC,6BAA6B,EAC7B,sBAAsB,EACtB,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,yBAAyB,EACzB,yBAAyB,EACzB,kCAAkC,EAClC,kBAAkB,EAClB,wBAAwB,EACxB,oBAAoB,EACpB,kBAAkB,EAClB,+BAA+B,EAC/B,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,4BAA4B,CAAC;AAgBpC,oGAAoG;AACpG,MAAM,WAAW,GAAG,gDAAgD,CAAC;AAErE;;;;GAIG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,yBAAyB,CAAC;AAEvE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,qBAAqB,CAAC;AAE/D,4FAA4F;AAC5F,MAAM,oBAAoB,GAAG,CAAC,sBAAsB,EAAE,oBAAoB,CAAC,CAAC;AAE5E,wGAAwG;AACxG,MAAM,SAAS,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I,CAAC,KAAK;QAAE,MAAM,IAAI,KAAK,CAAC,uBAAuB,OAAO,CAAC,KAAK,uCAAuC,CAAC,CAAC;IACzG,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ;QAAE,MAAM,IAAI,KAAK,CAAC,uBAAuB,OAAO,CAAC,KAAK,0BAA0B,CAAC,CAAC;IAC7G,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@substrat-run/control-plane-api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.152.0",
|
|
4
4
|
"description": "HTTP surface over HostAdmin — the audited control-plane transport (control-plane.md §4.5)",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"repository": {
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"hono": "^4.13.13",
|
|
30
|
-
"@substrat-run/
|
|
31
|
-
"@substrat-run/
|
|
30
|
+
"@substrat-run/contracts": "^0.152.0",
|
|
31
|
+
"@substrat-run/control-plane-client": "^0.3.3",
|
|
32
32
|
"@substrat-run/psl": "^0.2.5",
|
|
33
|
-
"@substrat-run/kernel": "^0.
|
|
33
|
+
"@substrat-run/kernel": "^0.152.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@hono/node-server": "^1.13.0",
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
"miniflare": "^4.20260310.0",
|
|
43
43
|
"tsx": "^4.19.0",
|
|
44
44
|
"typescript": "^7.0.0",
|
|
45
|
-
"vitest": "^5.0.
|
|
46
|
-
"@substrat-run/
|
|
47
|
-
"@substrat-run/
|
|
45
|
+
"vitest": "^5.0.5",
|
|
46
|
+
"@substrat-run/adapter-sqlite": "^0.152.0",
|
|
47
|
+
"@substrat-run/vertical-host": "^0.152.0"
|
|
48
48
|
},
|
|
49
49
|
"publishConfig": {
|
|
50
50
|
"access": "public"
|