@substrat-run/adapter-sqlite 0.197.1 → 0.198.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/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +68 -22
- package/dist/index.js.map +1 -1
- package/dist/vertical-broker.d.ts +48 -3
- package/dist/vertical-broker.d.ts.map +1 -1
- package/dist/vertical-broker.js +49 -5
- package/dist/vertical-broker.js.map +1 -1
- package/package.json +6 -6
|
@@ -25,8 +25,16 @@
|
|
|
25
25
|
* **What it deliberately cannot do.** Name a tenant (the target is searched in the caller's own
|
|
26
26
|
* tenant only), name a principal (there is no parameter for one: a peer acts as itself), or reach
|
|
27
27
|
* a preview (never resolved as a target, and refused as a caller).
|
|
28
|
+
*
|
|
29
|
+
* **A call made for a person (#3161).** `onBehalf` carries a delegated token, which is still not
|
|
30
|
+
* the caller naming anyone: the TARGET's harness verifies it (`delegated`, its person contract's
|
|
31
|
+
* door), and only a token it admits makes the call run as that person, with the token's `scope`
|
|
32
|
+
* as the ceiling. The calling vertical still passes the target's peer admission (declared in its
|
|
33
|
+
* `peers`, switched on), with no operation allowlist, so the peer switch stops it too. A refusal
|
|
34
|
+
* tells the caller only that it was refused, as the hosted door does; the reason goes to a log line
|
|
35
|
+
* without the token, which is never logged or echoed in an error.
|
|
28
36
|
*/
|
|
29
|
-
import { type PlatformActorId, type ScopeId, type TenantId } from '@substrat-run/contracts';
|
|
37
|
+
import { type PlatformActorId, type PrincipalId, type ScopeId, type TenantId } from '@substrat-run/contracts';
|
|
30
38
|
import { type InvokeOptions } from '@substrat-run/kernel';
|
|
31
39
|
import type { SqliteScopeHost } from './index.js';
|
|
32
40
|
/** The platform actor the broker reads the directory as — the platform, on the pure host. */
|
|
@@ -38,6 +46,13 @@ export interface LocalVerticalCallerRef {
|
|
|
38
46
|
tenantId: TenantId;
|
|
39
47
|
scopeId: ScopeId;
|
|
40
48
|
}
|
|
49
|
+
/** `invoke`'s options: the target scope's own, and the person a call may be made for (#3161). */
|
|
50
|
+
export interface LocalVerticalInvokeOptions extends InvokeOptions {
|
|
51
|
+
/** A delegated token for the target, as `peerCallRequest.onBehalf` carries it. */
|
|
52
|
+
onBehalf?: {
|
|
53
|
+
token: string;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
41
56
|
/** What a calling harness holds: calls out as ONE scope of ONE vertical, and nothing else. */
|
|
42
57
|
export interface LocalVerticalClient {
|
|
43
58
|
/**
|
|
@@ -45,8 +60,36 @@ export interface LocalVerticalClient {
|
|
|
45
60
|
* caller. Throws `forbidden` when the caller is not a live primary instance or the target's
|
|
46
61
|
* door refuses it, `not_found` when the target is not installed in the tenant, `conflict`
|
|
47
62
|
* when the tenant runs more than one instance without a choice, or a choice is unavailable.
|
|
63
|
+
*
|
|
64
|
+
* With `onBehalf`, as the person the token names instead (#3161): `forbidden` when the target
|
|
65
|
+
* takes no delegated calls, its door does not admit the token, or the caller does not pass its
|
|
66
|
+
* peer admission; `unavailable` when that door could not ask the app it takes its people from.
|
|
48
67
|
*/
|
|
49
|
-
invoke<O = unknown>(target: string, operation: string, input?: unknown, options?:
|
|
68
|
+
invoke<O = unknown>(target: string, operation: string, input?: unknown, options?: LocalVerticalInvokeOptions): Promise<O>;
|
|
69
|
+
}
|
|
70
|
+
/** What the target's harness answers for a call made for a person: its person contract's door. */
|
|
71
|
+
export type LocalDelegatedAnswer = {
|
|
72
|
+
admitted: true;
|
|
73
|
+
principal: PrincipalId;
|
|
74
|
+
scope: string[];
|
|
75
|
+
actor: string;
|
|
76
|
+
} | {
|
|
77
|
+
admitted: false;
|
|
78
|
+
reason: string;
|
|
79
|
+
};
|
|
80
|
+
/** Per target vertical: what the platform layer in front of its scopes answers (#3161). */
|
|
81
|
+
export interface LocalVerticalTargetHooks {
|
|
82
|
+
/** The target's OIDC client, the answer to `PEER_CLIENT_OPERATION`. Absent answers null. */
|
|
83
|
+
clientId?: string;
|
|
84
|
+
/** Who a call carrying `onBehalf` is made for. Absent: the target takes no delegated calls. */
|
|
85
|
+
delegated?: (call: {
|
|
86
|
+
token: string;
|
|
87
|
+
caller: LocalVerticalCallerRef;
|
|
88
|
+
target: {
|
|
89
|
+
tenantId: TenantId;
|
|
90
|
+
scopeId: ScopeId;
|
|
91
|
+
};
|
|
92
|
+
}) => Promise<LocalDelegatedAnswer>;
|
|
50
93
|
}
|
|
51
94
|
export interface LocalVerticalBroker {
|
|
52
95
|
/** A client that speaks as `from` — the harness's own scope, and only that. */
|
|
@@ -63,5 +106,7 @@ export interface LocalVerticalBroker {
|
|
|
63
106
|
* slug. Each host holds its own directory, so the tenant a test or dev harness provisions must be
|
|
64
107
|
* created on every host that serves one of its instances.
|
|
65
108
|
*/
|
|
66
|
-
export declare function createLocalVerticalBroker(hosts: Readonly<Record<string, SqliteScopeHost
|
|
109
|
+
export declare function createLocalVerticalBroker(hosts: Readonly<Record<string, SqliteScopeHost>>,
|
|
110
|
+
/** Keyed by the target's registry slug, as `hosts` is. */
|
|
111
|
+
targets?: Readonly<Record<string, LocalVerticalTargetHooks>>): LocalVerticalBroker;
|
|
67
112
|
//# sourceMappingURL=vertical-broker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vertical-broker.d.ts","sourceRoot":"","sources":["../src/vertical-broker.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"vertical-broker.d.ts","sourceRoot":"","sources":["../src/vertical-broker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,OAAO,EASL,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,QAAQ,EACd,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAA2C,KAAK,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACnG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,6FAA6F;AAC7F,eA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B;IAClC,+EAA+E;IAC/E,SAAS,CAAC,IAAI,EAAE,sBAAsB,GAAG,mBAAmB,CAAC;IAC7D;;;OAGG;IACH,UAAU,CAAC,IAAI,EAAE,sBAAsB,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACxG;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;AAChD,0DAA0D;AAC1D,OAAO,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAM,GAC/D,mBAAmB,CAqJrB"}
|
package/dist/vertical-broker.js
CHANGED
|
@@ -25,8 +25,16 @@
|
|
|
25
25
|
* **What it deliberately cannot do.** Name a tenant (the target is searched in the caller's own
|
|
26
26
|
* tenant only), name a principal (there is no parameter for one: a peer acts as itself), or reach
|
|
27
27
|
* a preview (never resolved as a target, and refused as a caller).
|
|
28
|
+
*
|
|
29
|
+
* **A call made for a person (#3161).** `onBehalf` carries a delegated token, which is still not
|
|
30
|
+
* the caller naming anyone: the TARGET's harness verifies it (`delegated`, its person contract's
|
|
31
|
+
* door), and only a token it admits makes the call run as that person, with the token's `scope`
|
|
32
|
+
* as the ceiling. The calling vertical still passes the target's peer admission (declared in its
|
|
33
|
+
* `peers`, switched on), with no operation allowlist, so the peer switch stops it too. A refusal
|
|
34
|
+
* tells the caller only that it was refused, as the hosted door does; the reason goes to a log line
|
|
35
|
+
* without the token, which is never logged or echoed in an error.
|
|
28
36
|
*/
|
|
29
|
-
import { platformActorId, scopeId as scopeIdOf, substratError, tenantId as tenantIdOf, verticalSlug, } from '@substrat-run/contracts';
|
|
37
|
+
import { PEER_CLIENT_OPERATION, peerOnBehalf, platformActorId, scopeId as scopeIdOf, substratError, tenantId as tenantIdOf, verticalSlug, } from '@substrat-run/contracts';
|
|
30
38
|
import { isPrimaryScope, resolvePeerInstanceFrom } from '@substrat-run/kernel';
|
|
31
39
|
/** The platform actor the broker reads the directory as — the platform, on the pure host. */
|
|
32
40
|
export const LOCAL_BROKER_ACTOR = platformActorId.parse('01JZ00000000000000PEERBRKR');
|
|
@@ -36,8 +44,11 @@ export const LOCAL_BROKER_ACTOR = platformActorId.parse('01JZ00000000000000PEERB
|
|
|
36
44
|
* slug. Each host holds its own directory, so the tenant a test or dev harness provisions must be
|
|
37
45
|
* created on every host that serves one of its instances.
|
|
38
46
|
*/
|
|
39
|
-
export function createLocalVerticalBroker(hosts
|
|
47
|
+
export function createLocalVerticalBroker(hosts,
|
|
48
|
+
/** Keyed by the target's registry slug, as `hosts` is. */
|
|
49
|
+
targets = {}) {
|
|
40
50
|
const hostOf = (vertical) => Object.prototype.hasOwnProperty.call(hosts, vertical) ? hosts[vertical] : undefined;
|
|
51
|
+
const hooksOf = (vertical) => Object.prototype.hasOwnProperty.call(targets, vertical) ? targets[vertical] : undefined;
|
|
41
52
|
// The broker is one in-process harness spanning hosts; no individual host directory has
|
|
42
53
|
// both endpoints. Production's directory keeps this row durably instead.
|
|
43
54
|
const bindings = new Map();
|
|
@@ -82,6 +93,7 @@ export function createLocalVerticalBroker(hosts) {
|
|
|
82
93
|
};
|
|
83
94
|
return {
|
|
84
95
|
async invoke(target, operation, input, options) {
|
|
96
|
+
const { onBehalf, ...invokeOptions } = options ?? {};
|
|
85
97
|
// 1. The caller, re-read from ITS host's directory on every call: a live, primary
|
|
86
98
|
// instance of the vertical it says it is, in the tenant it says. Suspended,
|
|
87
99
|
// archived, forked, preview — all refused here, before any target is looked up.
|
|
@@ -127,9 +139,41 @@ export function createLocalVerticalBroker(hosts) {
|
|
|
127
139
|
throw substratError('conflict', `this tenant runs ${resolution.count} instances of '${target_}' — a call cannot pick one; ` +
|
|
128
140
|
'bind the instance first');
|
|
129
141
|
}
|
|
130
|
-
|
|
131
|
-
const
|
|
132
|
-
|
|
142
|
+
const at = { tenantId: resolution.instance.tenantId, scopeId: resolution.instance.scopeId };
|
|
143
|
+
const hooks = hooksOf(target_);
|
|
144
|
+
// 3a. The platform layer's own answer (#3161), before any module or `peers` lookup: to a
|
|
145
|
+
// caller that got this far, as the router answers any peer it dispatches. A client
|
|
146
|
+
// id is no secret; every token the target's sign-in hands out names it.
|
|
147
|
+
if (operation === PEER_CLIENT_OPERATION) {
|
|
148
|
+
return { clientId: hooks?.clientId ?? null };
|
|
149
|
+
}
|
|
150
|
+
// 3b. A call made for a person: the target's own door says who, and the call runs as
|
|
151
|
+
// them under the token's scope, while the caller passes the target's peer admission.
|
|
152
|
+
if (onBehalf !== undefined) {
|
|
153
|
+
// Parsed for the transport's bound; the refusal echoes nothing of what was sent.
|
|
154
|
+
if (!peerOnBehalf.safeParse(onBehalf).success) {
|
|
155
|
+
throw substratError('validation_failed', 'onBehalf: expected { token } with a token of 1–8192 characters');
|
|
156
|
+
}
|
|
157
|
+
// The hosted door's words and codes (`vertical-host`'s `/internal/vertical-invoke`).
|
|
158
|
+
if (!hooks?.delegated)
|
|
159
|
+
throw substratError('forbidden', 'this app does not take calls for a person');
|
|
160
|
+
const answer = await hooks.delegated({ token: onBehalf.token, caller: { ...caller }, target: at });
|
|
161
|
+
if (!answer.admitted) {
|
|
162
|
+
// The reason is for the operator, on this line; the caller learns only that it was refused.
|
|
163
|
+
console.warn(JSON.stringify({ host: 'peer-on-behalf-refused', ...at, caller: caller.vertical, reason: answer.reason }));
|
|
164
|
+
throw answer.reason === 'unavailable'
|
|
165
|
+
? substratError('unavailable', 'this call for a person cannot be answered now; retry')
|
|
166
|
+
: substratError('forbidden', 'this call for a person was refused');
|
|
167
|
+
}
|
|
168
|
+
// `via`: the target's peer admission for the caller, inside the scope on every invoke.
|
|
169
|
+
const stub = await targetHost.getScope(answer.principal, at.tenantId, at.scopeId, {
|
|
170
|
+
delegation: { actor: answer.actor, scope: answer.scope, via: { vertical: caller.vertical, scope: caller.scopeId } },
|
|
171
|
+
});
|
|
172
|
+
return stub.invoke(operation, input, invokeOptions);
|
|
173
|
+
}
|
|
174
|
+
// 3c. The target's peer door, as the caller — admission and every check happen there.
|
|
175
|
+
const stub = await targetHost.getVerticalScope({ vertical: caller.vertical, scope: caller.scopeId }, at.tenantId, at.scopeId);
|
|
176
|
+
return stub.invoke(operation, input, invokeOptions);
|
|
133
177
|
},
|
|
134
178
|
};
|
|
135
179
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vertical-broker.js","sourceRoot":"","sources":["../src/vertical-broker.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"vertical-broker.js","sourceRoot":"","sources":["../src/vertical-broker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,OAAO,EACL,qBAAqB,EACrB,YAAY,EACZ,eAAe,EACf,OAAO,IAAI,SAAS,EACpB,aAAa,EACb,QAAQ,IAAI,UAAU,EACtB,YAAY,GAMb,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAsB,MAAM,sBAAsB,CAAC;AAGnG,6FAA6F;AAC7F,MAAM,CAAC,MAAM,kBAAkB,GAAoB,eAAe,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;AA0DvG;;;;;GAKG;AACH,MAAM,UAAU,yBAAyB,CACvC,KAAgD;AAChD,0DAA0D;AAC1D,OAAO,GAAuD,EAAE;IAEhE,MAAM,MAAM,GAAG,CAAC,QAAgB,EAA+B,EAAE,CAC/D,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACtF,MAAM,OAAO,GAAG,CAAC,QAAgB,EAAwC,EAAE,CACzE,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE,QA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,CAAC,CAAC;oBAClE,CAAC;oBACD,sFAAsF;oBACtF,MAAM,IAAI,GAAG,MAAM,UAAW,CAAC,gBAAgB,CAC7C,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,CAAC,OAAO,EAAE,EACpD,EAAE,CAAC,QAAQ,EACX,EAAE,CAAC,OAAO,CACX,CAAC;oBACF,OAAO,IAAI,CAAC,MAAM,CAAa,SAAS,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC;gBAClE,CAAC;aACF,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@substrat-run/adapter-sqlite",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.198.0",
|
|
4
4
|
"description": "Pure-SQLite scope host — real kernel semantics with no Cloudflare dependency (D-14): local dev, CI, self-host/escrow",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"repository": {
|
|
@@ -39,17 +39,17 @@
|
|
|
39
39
|
],
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"better-sqlite3": "^13.0.3",
|
|
42
|
-
"@substrat-run/contracts": "^0.
|
|
43
|
-
"@substrat-run/kernel": "^0.
|
|
42
|
+
"@substrat-run/contracts": "^0.198.0",
|
|
43
|
+
"@substrat-run/kernel": "^0.198.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/better-sqlite3": "^9.6.0",
|
|
47
47
|
"hono": "^4.13.13",
|
|
48
48
|
"typescript": "^7.0.0",
|
|
49
49
|
"vitest": "^5.0.5",
|
|
50
|
-
"@substrat-run/attachment-extractors": "^0.2.
|
|
51
|
-
"@substrat-run/
|
|
52
|
-
"@substrat-run/
|
|
50
|
+
"@substrat-run/attachment-extractors": "^0.2.59",
|
|
51
|
+
"@substrat-run/vertical-auth": "^0.36.0",
|
|
52
|
+
"@substrat-run/contract-tests": "^0.198.0"
|
|
53
53
|
},
|
|
54
54
|
"publishConfig": {
|
|
55
55
|
"access": "public"
|