@substrat-run/vertical-host 0.141.0 → 0.143.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/errors.d.ts +6 -3
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +73 -26
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +25 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +62 -10
- package/dist/index.js.map +1 -1
- package/dist/invocation-log.d.ts +195 -7
- package/dist/invocation-log.d.ts.map +1 -1
- package/dist/invocation-log.js +374 -6
- package/dist/invocation-log.js.map +1 -1
- package/dist/kick-flags.d.ts +9 -0
- package/dist/kick-flags.d.ts.map +1 -0
- package/dist/kick-flags.js +20 -0
- package/dist/kick-flags.js.map +1 -0
- package/dist/live.d.ts +3 -3
- package/dist/live.js +3 -3
- package/dist/routed-node.d.ts +83 -7
- package/dist/routed-node.d.ts.map +1 -1
- package/dist/routed-node.js +64 -6
- package/dist/routed-node.js.map +1 -1
- package/dist/scope-sweep-host.d.ts +7 -1
- package/dist/scope-sweep-host.d.ts.map +1 -1
- package/dist/scope-sweep-host.js +21 -4
- package/dist/scope-sweep-host.js.map +1 -1
- package/package.json +7 -7
- package/dist/platform-call.d.ts +0 -10
- package/dist/platform-call.d.ts.map +0 -1
- package/dist/platform-call.js +0 -10
- package/dist/platform-call.js.map +0 -1
package/dist/routed-node.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routed-node.js","sourceRoot":"","sources":["../src/routed-node.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"routed-node.js","sourceRoot":"","sources":["../src/routed-node.ts"],"names":[],"mappings":"AACA,qFAAqF;AACrF,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAElE;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,0BAA0B,CAAC;AA8BpD,oFAAoF;AACpF,MAAM,OAAO,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AC"}
|
|
@@ -22,6 +22,10 @@
|
|
|
22
22
|
* Zero imports on purpose: `tools/platform-entry-emit.mts` bundles this file into the
|
|
23
23
|
* platform's sweeper module, which is added to every such upload.
|
|
24
24
|
*/
|
|
25
|
+
/** The global registry key. Contracts' `PLATFORM_SWEEP_HOST_KEY`, spelled out because this file
|
|
26
|
+
* imports nothing: the control plane looks for it in a pushed bundle to tell that the bundle
|
|
27
|
+
* registers a host for the sweeper it would supply (#1646). */
|
|
28
|
+
export declare const SCOPE_SWEEP_HOST_KEY = "substrat.scope-sweep-host";
|
|
25
29
|
/** The env var the uploader sets to the binding of the sweeper it supplied (#1902). Contracts'
|
|
26
30
|
* `PLATFORM_SWEEPER_VAR`, spelled out because this file imports nothing; control-plane-api's
|
|
27
31
|
* `platform-entry.test.ts` holds the two equal. */
|
|
@@ -30,7 +34,9 @@ export declare const PLATFORM_SWEEPER_VAR = "SUBSTRAT_SCOPE_SWEEPER";
|
|
|
30
34
|
export type ScopeSweepHostFactory = (env: never) => unknown;
|
|
31
35
|
/** Record the vertical's host builder for the platform's sweeper. The last call wins. */
|
|
32
36
|
export declare function registerScopeSweepHost(hostFor: ScopeSweepHostFactory): void;
|
|
33
|
-
/** The host builder the vertical registered, or `undefined` when its bundle registers none.
|
|
37
|
+
/** The host builder the vertical registered, or `undefined` when its bundle registers none.
|
|
38
|
+
* The platform's sweeper module imports this file directly; the package index does not re-export
|
|
39
|
+
* it, so a vertical's bundle carries the key only through `registerScopeSweepHost` (#1646). */
|
|
34
40
|
export declare function registeredScopeSweepHost(): ScopeSweepHostFactory | undefined;
|
|
35
41
|
/** The slice of a sweeper stub the surface calls. */
|
|
36
42
|
interface RosterStub {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scope-sweep-host.d.ts","sourceRoot":"","sources":["../src/scope-sweep-host.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;
|
|
1
|
+
{"version":3,"file":"scope-sweep-host.d.ts","sourceRoot":"","sources":["../src/scope-sweep-host.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH;;gEAEgE;AAChE,eAAO,MAAM,oBAAoB,8BAA8B,CAAC;AAehE;;oDAEoD;AACpD,eAAO,MAAM,oBAAoB,2BAA2B,CAAC;AAE7D,oGAAoG;AACpG,MAAM,MAAM,qBAAqB,GAAG,CAAC,GAAG,EAAE,KAAK,KAAK,OAAO,CAAC;AAE5D,yFAAyF;AACzF,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,qBAAqB,GAAG,IAAI,CAE3E;AAED;;gGAEgG;AAChG,wBAAgB,wBAAwB,IAAI,qBAAqB,GAAG,SAAS,CAE5E;AAED,qDAAqD;AACrD,UAAU,UAAU;IAClB,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC/D,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAChD;AAUD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAWrE"}
|
package/dist/scope-sweep-host.js
CHANGED
|
@@ -22,18 +22,35 @@
|
|
|
22
22
|
* Zero imports on purpose: `tools/platform-entry-emit.mts` bundles this file into the
|
|
23
23
|
* platform's sweeper module, which is added to every such upload.
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
/** The global registry key. Contracts' `PLATFORM_SWEEP_HOST_KEY`, spelled out because this file
|
|
26
|
+
* imports nothing: the control plane looks for it in a pushed bundle to tell that the bundle
|
|
27
|
+
* registers a host for the sweeper it would supply (#1646). */
|
|
28
|
+
export const SCOPE_SWEEP_HOST_KEY = 'substrat.scope-sweep-host';
|
|
29
|
+
/**
|
|
30
|
+
* The registry slot, looked up per call and never at module top level. That placement is what
|
|
31
|
+
* the control plane's check relies on (#1646): the key reaches a bundle only when a function
|
|
32
|
+
* that registers or reads the host is reachable, so tree-shaking drops it from a bundle that
|
|
33
|
+
* imports vertical-host and never mounts `mountPlatformSurface`, and no purity annotation is
|
|
34
|
+
* involved. A top-level `Symbol.for(SCOPE_SWEEP_HOST_KEY)` would stay in every bundle that
|
|
35
|
+
* pulls in the package index, because esbuild only treats `Symbol.for` of a literal as pure.
|
|
36
|
+
* `sweep-host-bundle.test.ts` in control-plane-api holds this against a real build.
|
|
37
|
+
*/
|
|
38
|
+
function slot() {
|
|
39
|
+
return globalThis;
|
|
40
|
+
}
|
|
26
41
|
/** The env var the uploader sets to the binding of the sweeper it supplied (#1902). Contracts'
|
|
27
42
|
* `PLATFORM_SWEEPER_VAR`, spelled out because this file imports nothing; control-plane-api's
|
|
28
43
|
* `platform-entry.test.ts` holds the two equal. */
|
|
29
44
|
export const PLATFORM_SWEEPER_VAR = 'SUBSTRAT_SCOPE_SWEEPER';
|
|
30
45
|
/** Record the vertical's host builder for the platform's sweeper. The last call wins. */
|
|
31
46
|
export function registerScopeSweepHost(hostFor) {
|
|
32
|
-
|
|
47
|
+
slot()[Symbol.for(SCOPE_SWEEP_HOST_KEY)] = hostFor;
|
|
33
48
|
}
|
|
34
|
-
/** The host builder the vertical registered, or `undefined` when its bundle registers none.
|
|
49
|
+
/** The host builder the vertical registered, or `undefined` when its bundle registers none.
|
|
50
|
+
* The platform's sweeper module imports this file directly; the package index does not re-export
|
|
51
|
+
* it, so a vertical's bundle carries the key only through `registerScopeSweepHost` (#1646). */
|
|
35
52
|
export function registeredScopeSweepHost() {
|
|
36
|
-
return
|
|
53
|
+
return slot()[Symbol.for(SCOPE_SWEEP_HOST_KEY)];
|
|
37
54
|
}
|
|
38
55
|
/** `SCOPE_SWEEPER_NAME` in adapter-cloudflare — the singleton every caller addresses. */
|
|
39
56
|
const SCOPE_SWEEPER_NAME = 'scope-sweeper';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scope-sweep-host.js","sourceRoot":"","sources":["../src/scope-sweep-host.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,MAAM,
|
|
1
|
+
{"version":3,"file":"scope-sweep-host.js","sourceRoot":"","sources":["../src/scope-sweep-host.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH;;gEAEgE;AAChE,MAAM,CAAC,MAAM,oBAAoB,GAAG,2BAA2B,CAAC;AAEhE;;;;;;;;GAQG;AACH,SAAS,IAAI;IACX,OAAO,UAA0E,CAAC;AACpF,CAAC;AAED;;oDAEoD;AACpD,MAAM,CAAC,MAAM,oBAAoB,GAAG,wBAAwB,CAAC;AAK7D,yFAAyF;AACzF,MAAM,UAAU,sBAAsB,CAAC,OAA8B;IACnE,IAAI,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC,GAAG,OAAO,CAAC;AACrD,CAAC;AAED;;gGAEgG;AAChG,MAAM,UAAU,wBAAwB;IACtC,OAAO,IAAI,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC,CAAC;AAClD,CAAC;AAaD,yFAAyF;AACzF,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAE3C;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,GAAW;IAC3C,MAAM,IAAI,GAAG,GAA8B,CAAC;IAC5C,MAAM,OAAO,GAAG,IAAI,CAAC,oBAAoB,CAAC,CAAC;IAC3C,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,CAAC,OAAO;QAAE,OAAO,SAAS,CAAC;IAC9D,MAAM,EAAE,GAAG,IAAI,CAAC,OAAO,CAA0B,CAAC;IAClD,IAAI,CAAC,EAAE,IAAI,OAAO,EAAE,CAAC,UAAU,KAAK,UAAU,EAAE,CAAC;QAC/C,MAAM,IAAI,KAAK,CACb,GAAG,oBAAoB,uBAAuB,OAAO,iEAAiE,CACvH,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAe,CAAC;AACjE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@substrat-run/vertical-host",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.143.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": {
|
|
@@ -29,18 +29,18 @@
|
|
|
29
29
|
"ai": "7.0.128",
|
|
30
30
|
"hono": "^4.13.13",
|
|
31
31
|
"workers-ai-provider": "^4.0.0",
|
|
32
|
-
"@substrat-run/contracts": "^0.
|
|
33
|
-
"@substrat-run/kernel": "^0.
|
|
34
|
-
"@substrat-run/model-providers": "^0.5.
|
|
32
|
+
"@substrat-run/contracts": "^0.143.0",
|
|
33
|
+
"@substrat-run/kernel": "^0.143.0",
|
|
34
|
+
"@substrat-run/model-providers": "^0.5.33"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/better-sqlite3": "^9.6.0",
|
|
38
38
|
"better-sqlite3": "^13.0.3",
|
|
39
39
|
"typescript": "^7.0.0",
|
|
40
40
|
"vitest": "^5.0.3",
|
|
41
|
-
"@substrat-run/
|
|
42
|
-
"@substrat-run/
|
|
43
|
-
"@substrat-run/
|
|
41
|
+
"@substrat-run/adapter-sqlite": "^0.143.0",
|
|
42
|
+
"@substrat-run/vertical-auth": "^0.22.1",
|
|
43
|
+
"@substrat-run/contract-tests": "^0.143.0"
|
|
44
44
|
},
|
|
45
45
|
"publishConfig": {
|
|
46
46
|
"access": "public"
|
package/dist/platform-call.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Authenticating a call from the platform to a vertical (K-31, #1978).
|
|
3
|
-
*
|
|
4
|
-
* Moving here from the kernel, beside `readRoutedNode`. For one release the definition
|
|
5
|
-
* still lives in `@substrat-run/kernel` and this module re-exports that same binding, so an
|
|
6
|
-
* import from either package is the one function. Import it from here. The header names
|
|
7
|
-
* it reads are wire vocabulary and live in `@substrat-run/contracts`.
|
|
8
|
-
*/
|
|
9
|
-
export { assertPlatformCall, PlatformCallError, kickFlags } from '@substrat-run/kernel';
|
|
10
|
-
//# sourceMappingURL=platform-call.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"platform-call.d.ts","sourceRoot":"","sources":["../src/platform-call.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC"}
|
package/dist/platform-call.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Authenticating a call from the platform to a vertical (K-31, #1978).
|
|
3
|
-
*
|
|
4
|
-
* Moving here from the kernel, beside `readRoutedNode`. For one release the definition
|
|
5
|
-
* still lives in `@substrat-run/kernel` and this module re-exports that same binding, so an
|
|
6
|
-
* import from either package is the one function. Import it from here. The header names
|
|
7
|
-
* it reads are wire vocabulary and live in `@substrat-run/contracts`.
|
|
8
|
-
*/
|
|
9
|
-
export { assertPlatformCall, PlatformCallError, kickFlags } from '@substrat-run/kernel';
|
|
10
|
-
//# sourceMappingURL=platform-call.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"platform-call.js","sourceRoot":"","sources":["../src/platform-call.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC"}
|