@north-light/api 0.3.578 → 0.3.579
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/shared/env.d.ts +5 -0
- package/dist/shared/env.js +7 -0
- package/package.json +1 -1
package/dist/shared/env.d.ts
CHANGED
|
@@ -11,6 +11,11 @@ export declare function launchSnapshotFile(dir: string): string | undefined;
|
|
|
11
11
|
export declare function sandboxCliNodeId(): string | undefined;
|
|
12
12
|
/** A Linux app command uses its mounted launch snapshot, not host user stores. */
|
|
13
13
|
export declare function isSandboxedNode(): boolean;
|
|
14
|
+
/** True when this CLI reaches `/v1` through its broker's CLI relay to a remote control plane: the broker exports `CRTR_API_URL` (an
|
|
15
|
+
* http(s) URL, the fleet launcher's) and `CRTR_API_SOCKET` (the relay it serves). It chooses only where this process gets provider command
|
|
16
|
+
* descriptions (`GET /v1/providers/tools` through that relay); the relay's node token stays the authority. It is not `isSandboxedNode()`,
|
|
17
|
+
* which gates owner-only commands and launch-snapshot reads on a Linux launcher mount. */
|
|
18
|
+
export declare function providerProjectionOverBrokerRelay(): boolean;
|
|
14
19
|
/** The app that owns the current node, supplied in its broker launch identity. */
|
|
15
20
|
export declare function envGrantee(): string | undefined;
|
|
16
21
|
/** Set to '1' by `nodeEnv` for an app-started run's brokers, which admit inbox
|
package/dist/shared/env.js
CHANGED
|
@@ -64,6 +64,13 @@ export function sandboxCliNodeId() {
|
|
|
64
64
|
export function isSandboxedNode() {
|
|
65
65
|
return sandboxCliNodeId() !== undefined;
|
|
66
66
|
}
|
|
67
|
+
/** True when this CLI reaches `/v1` through its broker's CLI relay to a remote control plane: the broker exports `CRTR_API_URL` (an
|
|
68
|
+
* http(s) URL, the fleet launcher's) and `CRTR_API_SOCKET` (the relay it serves). It chooses only where this process gets provider command
|
|
69
|
+
* descriptions (`GET /v1/providers/tools` through that relay); the relay's node token stays the authority. It is not `isSandboxedNode()`,
|
|
70
|
+
* which gates owner-only commands and launch-snapshot reads on a Linux launcher mount. */
|
|
71
|
+
export function providerProjectionOverBrokerRelay() {
|
|
72
|
+
return /^https?:\/\//.test(process.env['CRTR_API_URL'] ?? '') && (process.env['CRTR_API_SOCKET'] ?? '') !== '';
|
|
73
|
+
}
|
|
67
74
|
/** The app that owns the current node, supplied in its broker launch identity. */
|
|
68
75
|
export function envGrantee() {
|
|
69
76
|
return process.env['CRTR_GRANTEE'];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@north-light/api",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.579",
|
|
4
4
|
"description": "Typed crtrd /v1 API contract — DTOs, route builders, the error contract, the CrtrClient, and the command-plugin manifest format. Zero runtime dependencies.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/api/index.js",
|