@substrat-run/vertical-host 0.187.0 → 0.188.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/worker-door.d.ts +25 -2
- package/dist/worker-door.d.ts.map +1 -1
- package/dist/worker-door.js +45 -7
- package/dist/worker-door.js.map +1 -1
- package/package.json +7 -7
package/dist/worker-door.d.ts
CHANGED
|
@@ -10,6 +10,13 @@
|
|
|
10
10
|
* `scope` is the one way in. It hands `getScope` the address the issuer verified (K-61), so an
|
|
11
11
|
* operation reads `ctx.verifiedEmail` and a worker cannot forget to pass it.
|
|
12
12
|
*
|
|
13
|
+
* It is also where a person arrives. The first time someone signed in reaches a scope, the door
|
|
14
|
+
* runs the vertical's join, if it names one, and then gives them every shape its `permissions`
|
|
15
|
+
* declare `bootstrap` with `holder: 'self'`, on their own record (`grantSelfShapesLocal`). A dev
|
|
16
|
+
* server's seed does both; a deployed worker had nothing that did, so a hosted owner could sign in
|
|
17
|
+
* and then not create anything. Both run again in a new isolate, and both are made safe to: a
|
|
18
|
+
* join returns the row it already wrote, and a shape is given once, so a revoke stays revoked.
|
|
19
|
+
*
|
|
13
20
|
* On its own subpath because `IdentityDO` is a Durable Object: `cloudflare:workers` does not load
|
|
14
21
|
* in the node server a vertical's dev loop runs, which imports this package's root.
|
|
15
22
|
*
|
|
@@ -17,7 +24,7 @@
|
|
|
17
24
|
* them mounts `mountInviteRoutes` beside this, with its own admin gate.
|
|
18
25
|
*/
|
|
19
26
|
import type { Context, Hono } from 'hono';
|
|
20
|
-
import { type EnvVarSpec, type ScopeId, type TenantId } from '@substrat-run/contracts';
|
|
27
|
+
import { type EntityRef, type EnvVarSpec, type PrincipalId, type ScopeId, type TenantId } from '@substrat-run/contracts';
|
|
21
28
|
import type { ScopeHost, ScopeStub, ScopeStubOptions } from '@substrat-run/kernel';
|
|
22
29
|
import { IdentityDO, type IdentityStub, type InstanceAuth, type OwnerClaimMintHost } from '@substrat-run/vertical-auth';
|
|
23
30
|
import { type OwnerClaimRouteDeps } from '@substrat-run/vertical-auth/owner-claim-routes';
|
|
@@ -34,9 +41,25 @@ export interface WorkerDoorDeps<E extends object> {
|
|
|
34
41
|
directory: (env: E, node: DoorNode) => IdentityStub;
|
|
35
42
|
/** The routed (tenant, scope), from the router's assertion. */
|
|
36
43
|
nodeFor: (req: Request, env: E) => DoorNode;
|
|
37
|
-
hostFor: (env: E) => Pick<ScopeHost, 'getScope'> & OwnerClaimMintHost & ReturnType<OwnerClaimRouteDeps<E, DoorNode>['host']
|
|
44
|
+
hostFor: (env: E) => Pick<ScopeHost, 'getScope'> & OwnerClaimMintHost & ReturnType<OwnerClaimRouteDeps<E, DoorNode>['host']> & SelfShapeHost;
|
|
38
45
|
/** The vertical's declared settings, resolved per scope with the delivered values. */
|
|
39
46
|
envSpec: EnvVarSpec[];
|
|
47
|
+
/**
|
|
48
|
+
* The vertical's join, if it has one: `(scope, who) => scope.invoke('todo/join', { displayName:
|
|
49
|
+
* who.display })`. Run when a person first reaches a scope, and only when the issuer verified
|
|
50
|
+
* their address, since a join records it from `ctx.verifiedEmail`. Their own-record shapes are
|
|
51
|
+
* given after it succeeds. A refusal is logged and tried again on their next request.
|
|
52
|
+
*
|
|
53
|
+
* It can run more than once for one person (a new isolate, two first requests at once), so the
|
|
54
|
+
* join has to return the row it already wrote rather than fail, as `todo/join` does.
|
|
55
|
+
*/
|
|
56
|
+
join?: (scope: ScopeStub, who: {
|
|
57
|
+
display: string;
|
|
58
|
+
}) => Promise<unknown>;
|
|
59
|
+
}
|
|
60
|
+
/** The host call that gives a person the shapes declared for their own record. */
|
|
61
|
+
export interface SelfShapeHost {
|
|
62
|
+
grantSelfShapesLocal(scopeId: ScopeId, principal: PrincipalId): Promise<EntityRef[]>;
|
|
40
63
|
}
|
|
41
64
|
type DoorHooks<E> = Required<Pick<PlatformSurfaceDeps<E>, 'onProvision' | 'onConfigure' | 'onReadPreviewConfig' | 'onDeleteScope' | 'resolveOwner' | 'ownerSeat' | 'mintOwnerClaim' | 'transferOwner' | 'completeOwnerTransfer' | 'abandonOwnerTransfer'>>;
|
|
42
65
|
export interface WorkerDoor<E extends object> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker-door.d.ts","sourceRoot":"","sources":["../src/worker-door.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"worker-door.d.ts","sourceRoot":"","sources":["../src/worker-door.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE1C,OAAO,EAAe,KAAK,SAAS,EAAE,KAAK,UAAU,EAAE,KAAK,WAAW,EAAE,KAAK,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACtI,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACnF,OAAO,EAEL,UAAU,EAQV,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACxB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAmB,KAAK,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AAE3G,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,OAAO,EAAE,UAAU,EAAE,CAAC;AAEtB,+CAA+C;AAC/C,MAAM,WAAW,QAAQ;IACvB,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,oDAAoD;AACpD,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,MAAM;IAC9C,2FAA2F;IAC3F,SAAS,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,KAAK,YAAY,CAAC;IACpD,+DAA+D;IAC/D,OAAO,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,CA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,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC;IACpE,gGAAgG;IAChG,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;CACxB;AAED,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAkHnF"}
|
package/dist/worker-door.js
CHANGED
|
@@ -2,7 +2,7 @@ import { HTTPException } from 'hono/http-exception';
|
|
|
2
2
|
import { principalId } from '@substrat-run/contracts';
|
|
3
3
|
import { AuthConfigError, IdentityDO, instanceAuthFor, mintOwnerClaimLink, placesReporter, reportScopeMembers, verifiedEmailOf, } from '@substrat-run/vertical-auth';
|
|
4
4
|
import { mountOwnerClaim } from '@substrat-run/vertical-auth/owner-claim-routes';
|
|
5
|
-
import { mountSession } from '@substrat-run/vertical-auth/session-route';
|
|
5
|
+
import { mountSession, sessionAnswer } from '@substrat-run/vertical-auth/session-route';
|
|
6
6
|
export { IdentityDO };
|
|
7
7
|
export function workerDoor(deps) {
|
|
8
8
|
const wiring = (env, node) => instanceAuthFor({
|
|
@@ -23,6 +23,34 @@ export function workerDoor(deps) {
|
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
25
|
const authProvider = async (env, req) => providerOf(await wiring(env, deps.nodeFor(req, env)));
|
|
26
|
+
/**
|
|
27
|
+
* The people who have arrived, per isolate. Arriving is safe to repeat, so this only saves the
|
|
28
|
+
* calls; it is cleared rather than left to grow.
|
|
29
|
+
*/
|
|
30
|
+
const arrived = new Set();
|
|
31
|
+
const arrive = async (env, node, principal, subject, scope) => {
|
|
32
|
+
const key = `${node.tenantId}/${node.scopeId}/${principal}`;
|
|
33
|
+
if (arrived.has(key))
|
|
34
|
+
return;
|
|
35
|
+
if (deps.join) {
|
|
36
|
+
// Not yet a person here: they are signed in, and they join once the issuer vouches.
|
|
37
|
+
if (verifiedEmailOf(subject) === null)
|
|
38
|
+
return;
|
|
39
|
+
try {
|
|
40
|
+
await deps.join(scope, { display: sessionAnswer(principal, subject).display });
|
|
41
|
+
}
|
|
42
|
+
catch (err) {
|
|
43
|
+
console.error(JSON.stringify({ host: 'door-join-failed', ...node, principal, message: err instanceof Error ? err.message : String(err) }));
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
await deps.hostFor(env).grantSelfShapesLocal(node.scopeId, principal);
|
|
48
|
+
if (arrived.size >= 10_000)
|
|
49
|
+
arrived.clear();
|
|
50
|
+
arrived.add(key);
|
|
51
|
+
};
|
|
52
|
+
/** The caller's stub, carrying the address the issuer verified (K-61). */
|
|
53
|
+
const scopeFor = (env, node, principal, subject, options) => deps.hostFor(env).getScope(principal, node.tenantId, node.scopeId, { ...options, verifiedEmail: verifiedEmailOf(subject) });
|
|
26
54
|
const callerOf = async (env, req) => {
|
|
27
55
|
const node = deps.nodeFor(req, env);
|
|
28
56
|
const instance = await wiring(env, node);
|
|
@@ -33,17 +61,27 @@ export function workerDoor(deps) {
|
|
|
33
61
|
return {
|
|
34
62
|
mount(app) {
|
|
35
63
|
app.on(['GET', 'POST'], '/api/auth/*', async (c) => (await authProvider(c.env, c.req.raw)).handle(c.req.raw));
|
|
36
|
-
mountSession(app, {
|
|
64
|
+
mountSession(app, {
|
|
65
|
+
caller: (c) => callerOf(c.env, c.req.raw),
|
|
66
|
+
directory: deps.directory,
|
|
67
|
+
// Every screen asks this first, so it is where a person signed in from a browser arrives.
|
|
68
|
+
extra: async (c, { node, principal, subject }) => {
|
|
69
|
+
const who = principalId.parse(principal);
|
|
70
|
+
await arrive(c.env, node, who, subject, await scopeFor(c.env, node, who, subject));
|
|
71
|
+
return {};
|
|
72
|
+
},
|
|
73
|
+
});
|
|
37
74
|
mountOwnerClaim(app, { nodeFor: deps.nodeFor, authProvider, directory: deps.directory, host: deps.hostFor });
|
|
38
75
|
},
|
|
39
76
|
async scope(c, options) {
|
|
40
77
|
const { node, subject, principal } = await callerOf(c.env, c.req.raw);
|
|
41
|
-
if (!principal)
|
|
78
|
+
if (!principal || !subject)
|
|
42
79
|
throw new HTTPException(401, { message: 'unauthorized' });
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
80
|
+
const who = principalId.parse(principal);
|
|
81
|
+
const scope = await scopeFor(c.env, node, who, subject, options);
|
|
82
|
+
// Before the operation, so a client that never asks `/api/me` (MCP, a script) has arrived too.
|
|
83
|
+
await arrive(c.env, node, who, subject, scope);
|
|
84
|
+
return scope;
|
|
47
85
|
},
|
|
48
86
|
settings: async (env, node) => (await wiring(env, node)).settings,
|
|
49
87
|
platform: {
|
package/dist/worker-door.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker-door.js","sourceRoot":"","sources":["../src/worker-door.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"worker-door.js","sourceRoot":"","sources":["../src/worker-door.ts"],"names":[],"mappings":"AA0BA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAkF,MAAM,yBAAyB,CAAC;AAEtI,OAAO,EACL,eAAe,EACf,UAAU,EACV,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,eAAe,GAMhB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,eAAe,EAA4B,MAAM,gDAAgD,CAAC;AAC3G,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAGxF,OAAO,EAAE,UAAU,EAAE,CAAC;AAgEtB,MAAM,UAAU,UAAU,CAAmB,IAAuB;IAClE,MAAM,MAAM,GAAG,CAAC,GAAM,EAAE,IAAc,EAAyB,EAAE,CAC/D,eAAe,CAAC;QACd,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,IAAI,CAAC;QACpC,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,OAAO,EAAE,IAAI,CAAC,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AC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,CAClC,kBAAkB,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,EAAE,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC;YACtH,aAAa,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,CACjC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,aAAa,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,WAAW,CAAC;YAC9F,qBAAqB,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,CACzC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,qBAAqB,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC;YACnF,oBAAoB,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,CACxC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,oBAAoB,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,WAAW,CAAC;SACtG;KACF,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@substrat-run/vertical-host",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.188.0",
|
|
4
4
|
"description": "The platform's /internal/* surface + error envelope, authored once — mount it in a vertical worker instead of re-copying the control-plane contract",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"repository": {
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"ai": "7.0.159",
|
|
38
38
|
"hono": "^4.13.13",
|
|
39
39
|
"workers-ai-provider": "^4.0.0",
|
|
40
|
-
"@substrat-run/contracts": "^0.
|
|
41
|
-
"@substrat-run/kernel": "^0.
|
|
42
|
-
"@substrat-run/
|
|
43
|
-
"@substrat-run/
|
|
40
|
+
"@substrat-run/contracts": "^0.188.0",
|
|
41
|
+
"@substrat-run/kernel": "^0.188.0",
|
|
42
|
+
"@substrat-run/model-providers": "^0.5.78",
|
|
43
|
+
"@substrat-run/vertical-auth": "^0.32.1"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@scalar/api-reference": "1.76.4",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"better-sqlite3": "^13.0.3",
|
|
49
49
|
"typescript": "^7.0.0",
|
|
50
50
|
"vitest": "^5.0.5",
|
|
51
|
-
"@substrat-run/
|
|
52
|
-
"@substrat-run/
|
|
51
|
+
"@substrat-run/contract-tests": "^0.188.0",
|
|
52
|
+
"@substrat-run/adapter-sqlite": "^0.188.0"
|
|
53
53
|
},
|
|
54
54
|
"publishConfig": {
|
|
55
55
|
"access": "public"
|