@substrat-run/vertical-host 0.186.0 → 0.187.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/model.d.ts CHANGED
@@ -67,8 +67,8 @@ export interface ModelRequest extends ModelIntent {
67
67
  readonly maxOutputTokens?: number;
68
68
  readonly temperature?: number;
69
69
  /**
70
- * Aborts the call. A host with a deadline passes one so a late answer is never received, and so
71
- * never billed with no line for it: an aborted call records nothing.
70
+ * Aborts the call. A host with a deadline passes one so a late answer is never received. An
71
+ * aborted call records nothing; what the provider consumed before the abort may still be billed.
72
72
  */
73
73
  readonly abortSignal?: AbortSignal;
74
74
  /** Retries the AI SDK makes on its own after a retryable failure. Default 2; 0 makes one request one HTTP call. */
@@ -0,0 +1,60 @@
1
+ /**
2
+ * The door a deployed vertical's worker mounts: who is calling, and the routes that decide it.
3
+ *
4
+ * A vertical runs no credential store. Sign-in is the issuer's, the subject maps to a principal in
5
+ * the tenant's identity directory, and the first person in takes the owner seat. Every deployed
6
+ * worker carried that wiring by hand, and a project should not hold it: the template shipped none,
7
+ * so a generated app answered 401 to everybody once hosted. So it lives here once, and a worker
8
+ * supplies only what is its own: its bindings, how a request routes, and its declared settings.
9
+ *
10
+ * `scope` is the one way in. It hands `getScope` the address the issuer verified (K-61), so an
11
+ * operation reads `ctx.verifiedEmail` and a worker cannot forget to pass it.
12
+ *
13
+ * On its own subpath because `IdentityDO` is a Durable Object: `cloudflare:workers` does not load
14
+ * in the node server a vertical's dev loop runs, which imports this package's root.
15
+ *
16
+ * Not here: member invites. Who may invite is the vertical's own question, so a worker that wants
17
+ * them mounts `mountInviteRoutes` beside this, with its own admin gate.
18
+ */
19
+ import type { Context, Hono } from 'hono';
20
+ import { type EnvVarSpec, type ScopeId, type TenantId } from '@substrat-run/contracts';
21
+ import type { ScopeHost, ScopeStub, ScopeStubOptions } from '@substrat-run/kernel';
22
+ import { IdentityDO, type IdentityStub, type InstanceAuth, type OwnerClaimMintHost } from '@substrat-run/vertical-auth';
23
+ import { type OwnerClaimRouteDeps } from '@substrat-run/vertical-auth/owner-claim-routes';
24
+ import type { PlatformSurfaceDeps } from './index.js';
25
+ export { IdentityDO };
26
+ /** The (tenant, scope) a request routed to. */
27
+ export interface DoorNode {
28
+ tenantId: TenantId;
29
+ scopeId: ScopeId;
30
+ }
31
+ /** What a worker supplies: only what is its own. */
32
+ export interface WorkerDoorDeps<E extends object> {
33
+ /** The tenant's identity directory: `env.AUTH.get(env.AUTH.idFromName(node.tenantId))`. */
34
+ directory: (env: E, node: DoorNode) => IdentityStub;
35
+ /** The routed (tenant, scope), from the router's assertion. */
36
+ nodeFor: (req: Request, env: E) => DoorNode;
37
+ hostFor: (env: E) => Pick<ScopeHost, 'getScope'> & OwnerClaimMintHost & ReturnType<OwnerClaimRouteDeps<E, DoorNode>['host']>;
38
+ /** The vertical's declared settings, resolved per scope with the delivered values. */
39
+ envSpec: EnvVarSpec[];
40
+ }
41
+ type DoorHooks<E> = Required<Pick<PlatformSurfaceDeps<E>, 'onProvision' | 'onConfigure' | 'onReadPreviewConfig' | 'onDeleteScope' | 'resolveOwner' | 'ownerSeat' | 'mintOwnerClaim' | 'transferOwner' | 'completeOwnerTransfer' | 'abandonOwnerTransfer'>>;
42
+ export interface WorkerDoor<E extends object> {
43
+ /** `/api/auth/*` (the login round-trip), `/api/me` and `/api/claim-owner`. */
44
+ mount(app: Hono<{
45
+ Bindings: E;
46
+ }>): void;
47
+ /** The caller's scope stub, with their verified address. 401 for nobody. */
48
+ scope(c: Context<{
49
+ Bindings: E;
50
+ }>, options?: ScopeStubOptions): Promise<ScopeStub>;
51
+ /**
52
+ * The declared settings for one scope: delivered value, then binding, then default. Read them
53
+ * here and never off `env`: a default rides as a binding every install of a script shares.
54
+ */
55
+ settings(env: E, node: DoorNode): Promise<InstanceAuth['settings']>;
56
+ /** Spread into `mountPlatformSurface`, so what the platform delivers lands in the directory. */
57
+ platform: DoorHooks<E>;
58
+ }
59
+ export declare function workerDoor<E extends object>(deps: WorkerDoorDeps<E>): WorkerDoor<E>;
60
+ //# sourceMappingURL=worker-door.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worker-door.d.ts","sourceRoot":"","sources":["../src/worker-door.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE1C,OAAO,EAAe,KAAK,UAAU,EAAE,KAAK,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACpG,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACnF,OAAO,EAEL,UAAU,EAOV,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,CAAC,KAAK,QAAQ,CAAC;IAC5C,OAAO,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,GAAG,kBAAkB,GAAG,UAAU,CAAC,mBAAmB,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7H,sFAAsF;IACtF,OAAO,EAAE,UAAU,EAAE,CAAC;CACvB;AAED,KAAK,SAAS,CAAC,CAAC,IAAI,QAAQ,CAC1B,IAAI,CACF,mBAAmB,CAAC,CAAC,CAAC,EACpB,aAAa,GACb,aAAa,GACb,qBAAqB,GACrB,eAAe,GACf,cAAc,GACd,WAAW,GACX,gBAAgB,GAChB,eAAe,GACf,uBAAuB,GACvB,sBAAsB,CACzB,CACF,CAAC;AAEF,MAAM,WAAW,UAAU,CAAC,CAAC,SAAS,MAAM;IAC1C,8EAA8E;IAC9E,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC;QAAE,QAAQ,EAAE,CAAC,CAAA;KAAE,CAAC,GAAG,IAAI,CAAC;IACxC,4EAA4E;IAC5E,KAAK,CAAC,CAAC,EAAE,OAAO,CAAC;QAAE,QAAQ,EAAE,CAAC,CAAA;KAAE,CAAC,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;IACnF;;;OAGG;IACH,QAAQ,CAAC,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,GAAG,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,CA2EnF"}
@@ -0,0 +1,75 @@
1
+ import { HTTPException } from 'hono/http-exception';
2
+ import { principalId } from '@substrat-run/contracts';
3
+ import { AuthConfigError, IdentityDO, instanceAuthFor, mintOwnerClaimLink, placesReporter, reportScopeMembers, verifiedEmailOf, } from '@substrat-run/vertical-auth';
4
+ import { mountOwnerClaim } from '@substrat-run/vertical-auth/owner-claim-routes';
5
+ import { mountSession } from '@substrat-run/vertical-auth/session-route';
6
+ export { IdentityDO };
7
+ export function workerDoor(deps) {
8
+ const wiring = (env, node) => instanceAuthFor({
9
+ directory: deps.directory(env, node),
10
+ scopeId: node.scopeId,
11
+ envSpec: deps.envSpec,
12
+ env: env,
13
+ });
14
+ /** The provider a configuration selects; a refusal is its HTTP status, not a 500. */
15
+ const providerOf = (instance) => {
16
+ try {
17
+ return instance.provider();
18
+ }
19
+ catch (err) {
20
+ if (err instanceof AuthConfigError)
21
+ throw new HTTPException(err.status, { message: err.message });
22
+ throw err;
23
+ }
24
+ };
25
+ const authProvider = async (env, req) => providerOf(await wiring(env, deps.nodeFor(req, env)));
26
+ const callerOf = async (env, req) => {
27
+ const node = deps.nodeFor(req, env);
28
+ const instance = await wiring(env, node);
29
+ const subject = await providerOf(instance).resolve(req.headers);
30
+ const principal = subject ? await deps.directory(env, node).resolvePrincipal(node.scopeId, subject.sub) : null;
31
+ return { node, subject, principal, identity: instance.identity };
32
+ };
33
+ return {
34
+ mount(app) {
35
+ app.on(['GET', 'POST'], '/api/auth/*', async (c) => (await authProvider(c.env, c.req.raw)).handle(c.req.raw));
36
+ mountSession(app, { caller: (c) => callerOf(c.env, c.req.raw), directory: deps.directory });
37
+ mountOwnerClaim(app, { nodeFor: deps.nodeFor, authProvider, directory: deps.directory, host: deps.hostFor });
38
+ },
39
+ async scope(c, options) {
40
+ const { node, subject, principal } = await callerOf(c.env, c.req.raw);
41
+ if (!principal)
42
+ throw new HTTPException(401, { message: 'unauthorized' });
43
+ return deps.hostFor(c.env).getScope(principalId.parse(principal), node.tenantId, node.scopeId, {
44
+ ...options,
45
+ verifiedEmail: verifiedEmailOf(subject),
46
+ });
47
+ },
48
+ settings: async (env, node) => (await wiring(env, node)).settings,
49
+ platform: {
50
+ onProvision: async (env, b) => {
51
+ const directory = deps.directory(env, b);
52
+ await directory.setPendingOwner(b.scopeId, b.owner, b.parentScopeId);
53
+ // The places repair (#1670): a no-op before an issuer is delivered, and it never throws.
54
+ const { identity } = await wiring(env, b);
55
+ await reportScopeMembers(directory, placesReporter({ identity }), b.scopeId);
56
+ },
57
+ onConfigure: (env, b) => deps.directory(env, b).setScopeConfig(b.scopeId, b.entries),
58
+ onReadPreviewConfig: (env, b) => deps.directory(env, b).getScopeConfig(b.scopeId),
59
+ onDeleteScope: async (env, scopeId, tenantId) => {
60
+ if (tenantId)
61
+ await deps.directory(env, { tenantId, scopeId }).deleteScopeConfig(scopeId);
62
+ },
63
+ resolveOwner: async (env, ref) => {
64
+ const owner = await deps.directory(env, ref).getOwnerOfRecord(ref.scopeId);
65
+ return owner ? principalId.parse(owner) : null;
66
+ },
67
+ ownerSeat: (env, ref) => deps.directory(env, ref).ownerSeat(ref.scopeId),
68
+ mintOwnerClaim: (env, ref, input) => mintOwnerClaimLink({ directory: deps.directory(env, ref), host: deps.hostFor(env) }, ref, input.origin, input.actor),
69
+ transferOwner: (env, ref, input) => deps.directory(env, ref).transferOwner(ref.scopeId, input.from, input.to, input.toHoldsRole),
70
+ completeOwnerTransfer: (env, ref, input) => deps.directory(env, ref).completeOwnerTransfer(ref.scopeId, input.from, input.to),
71
+ abandonOwnerTransfer: (env, ref, input) => deps.directory(env, ref).abandonOwnerTransfer(ref.scopeId, input.from, input.to, input.toHoldsRole),
72
+ },
73
+ };
74
+ }
75
+ //# sourceMappingURL=worker-door.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worker-door.js","sourceRoot":"","sources":["../src/worker-door.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAgD,MAAM,yBAAyB,CAAC;AAEpG,OAAO,EACL,eAAe,EACf,UAAU,EACV,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,eAAe,GAKhB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,eAAe,EAA4B,MAAM,gDAAgD,CAAC;AAC3G,OAAO,EAAE,YAA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,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.186.0",
3
+ "version": "0.187.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": {
@@ -24,6 +24,10 @@
24
24
  "./connectors": {
25
25
  "types": "./dist/connectors.d.ts",
26
26
  "default": "./dist/connectors.js"
27
+ },
28
+ "./worker-door": {
29
+ "types": "./dist/worker-door.d.ts",
30
+ "default": "./dist/worker-door.js"
27
31
  }
28
32
  },
29
33
  "files": [
@@ -33,9 +37,10 @@
33
37
  "ai": "7.0.159",
34
38
  "hono": "^4.13.13",
35
39
  "workers-ai-provider": "^4.0.0",
36
- "@substrat-run/contracts": "^0.186.0",
37
- "@substrat-run/kernel": "^0.186.0",
38
- "@substrat-run/model-providers": "^0.5.76"
40
+ "@substrat-run/contracts": "^0.187.0",
41
+ "@substrat-run/kernel": "^0.187.0",
42
+ "@substrat-run/vertical-auth": "^0.32.0",
43
+ "@substrat-run/model-providers": "^0.5.77"
39
44
  },
40
45
  "devDependencies": {
41
46
  "@scalar/api-reference": "1.76.4",
@@ -43,9 +48,8 @@
43
48
  "better-sqlite3": "^13.0.3",
44
49
  "typescript": "^7.0.0",
45
50
  "vitest": "^5.0.5",
46
- "@substrat-run/vertical-auth": "^0.31.6",
47
- "@substrat-run/adapter-sqlite": "^0.186.0",
48
- "@substrat-run/contract-tests": "^0.186.0"
51
+ "@substrat-run/adapter-sqlite": "^0.187.0",
52
+ "@substrat-run/contract-tests": "^0.187.0"
49
53
  },
50
54
  "publishConfig": {
51
55
  "access": "public"