@volter/world-runtime 3.0.37 → 3.0.39
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/known-external-services.json +3 -10
- package/dist/src/actions-runner-cli.js +3 -3
- package/dist/src/actions-runner.js +2 -1
- package/dist/src/app-url.js +2 -1
- package/dist/src/backings.d.ts +10 -1
- package/dist/src/backings.js +66 -7
- package/dist/src/branch.js +85 -52
- package/dist/src/browser-routes.cjs +59 -0
- package/dist/src/ca-trust.js +4 -3
- package/dist/src/changeset.js +4 -3
- package/dist/src/cli-commands.js +25 -9
- package/dist/src/cli.js +2 -1
- package/dist/src/command-lifetime.d.mts +12 -0
- package/dist/src/command-lifetime.d.ts +1 -15
- package/dist/src/command-lifetime.js +1 -98
- package/dist/src/command-lifetime.mjs +90 -0
- package/dist/src/configs.js +1 -1
- package/dist/src/console-apart.js +3 -2
- package/dist/src/covers.d.ts +3 -2
- package/dist/src/covers.js +95 -18
- package/dist/src/error-message.d.mts +1 -0
- package/dist/src/error-message.d.ts +1 -0
- package/dist/src/error-message.js +2 -0
- package/dist/src/error-message.mjs +10 -0
- package/dist/src/guest-command.d.mts +4 -0
- package/dist/src/guest-command.mjs +26 -0
- package/dist/src/guest-control.d.mts +1 -0
- package/dist/src/guest-control.mjs +17 -0
- package/dist/src/guest-entry.mjs +146 -0
- package/dist/src/guest-processes.d.mts +9 -0
- package/dist/src/guest-processes.mjs +47 -0
- package/dist/src/guest-runner.d.ts +6 -0
- package/dist/src/guest-runner.js +567 -0
- package/dist/src/host.js +5 -4
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/infra-cli.js +4 -0
- package/dist/src/infra.js +133 -23
- package/dist/src/init.js +60 -23
- package/dist/src/lifecycle-record.d.ts +3 -1
- package/dist/src/lifecycle-record.js +29 -6
- package/dist/src/livekit-backing.mjs +37 -0
- package/dist/src/local-branches.js +11 -3
- package/dist/src/mongodb-backing.d.ts +7 -0
- package/dist/src/mongodb-backing.js +58 -0
- package/dist/src/native-postgres-backing.d.ts +4 -0
- package/dist/src/native-postgres-backing.js +404 -0
- package/dist/src/origin.js +2 -1
- package/dist/src/owned-path.d.ts +4 -0
- package/dist/src/owned-path.js +37 -0
- package/dist/src/pack-facts.d.ts +1 -0
- package/dist/src/pglite-backing.d.ts +4 -13
- package/dist/src/pglite-backing.js +198 -106
- package/dist/src/pglite-host.mjs +47 -17
- package/dist/src/placeholder.d.ts +3 -2
- package/dist/src/placeholder.js +9 -4
- package/dist/src/process-groups.d.mts +2 -0
- package/dist/src/process-groups.d.ts +1 -4
- package/dist/src/process-groups.js +1 -49
- package/dist/src/process-groups.mjs +59 -0
- package/dist/src/process-receipt.d.mts +6 -0
- package/dist/src/process-receipt.d.ts +11 -0
- package/dist/src/process-receipt.js +3 -0
- package/dist/src/process-receipt.mjs +45 -0
- package/dist/src/process-signal.d.mts +9 -0
- package/dist/src/process-signal.mjs +92 -0
- package/dist/src/project-inspect.d.ts +1 -1
- package/dist/src/project-inspect.js +4 -2
- package/dist/src/proxy-daemon.js +2 -1
- package/dist/src/redirect-proxy.js +186 -19
- package/dist/src/redis-backing.js +99 -35
- package/dist/src/reflect.js +2 -1
- package/dist/src/root.js +7 -6
- package/dist/src/run-task-worker.js +2 -1
- package/dist/src/runtime.d.ts +24 -7
- package/dist/src/runtime.js +703 -286
- package/dist/src/schema.d.ts +12 -1
- package/dist/src/schema.js +20 -5
- package/dist/src/served-world.d.ts +1 -0
- package/dist/src/served-world.js +26 -14
- package/dist/src/service-recorder.js +8 -3
- package/dist/src/signals.d.mts +1 -0
- package/dist/src/signals.d.ts +1 -1
- package/dist/src/signals.js +1 -11
- package/dist/src/signals.mjs +10 -0
- package/dist/src/tail.d.ts +2 -0
- package/dist/src/tail.js +9 -2
- package/dist/src/tcp-port.js +27 -13
- package/dist/src/temporal-backing.mjs +28 -0
- package/dist/src/up-cli.js +8 -3
- package/dist/src/up-task-worker.js +2 -1
- package/dist/src/websocket-relay.d.ts +1 -1
- package/dist/src/websocket-relay.js +23 -10
- package/dist/src/world-view.js +2 -2
- package/known-external-services.json +3 -10
- package/package.json +12 -7
- package/src/actions-runner-cli.ts +3 -3
- package/src/actions-runner.ts +2 -1
- package/src/app-url.ts +2 -1
- package/src/backings.ts +65 -7
- package/src/branch.ts +73 -34
- package/src/browser-routes.cjs +59 -0
- package/src/ca-trust.ts +4 -3
- package/src/changeset.ts +4 -3
- package/src/cli-commands.ts +21 -9
- package/src/cli.ts +2 -1
- package/src/command-lifetime.d.mts +12 -0
- package/src/command-lifetime.mjs +90 -0
- package/src/command-lifetime.ts +1 -79
- package/src/configs.ts +1 -1
- package/src/console-apart.ts +2 -1
- package/src/covers.ts +97 -19
- package/src/error-message.d.mts +1 -0
- package/src/error-message.mjs +10 -0
- package/src/error-message.ts +2 -0
- package/src/guest-command.d.mts +4 -0
- package/src/guest-command.mjs +26 -0
- package/src/guest-control.d.mts +1 -0
- package/src/guest-control.mjs +17 -0
- package/src/guest-entry.mjs +146 -0
- package/src/guest-processes.d.mts +9 -0
- package/src/guest-processes.mjs +47 -0
- package/src/guest-runner.ts +414 -0
- package/src/host.ts +5 -4
- package/src/index.ts +1 -0
- package/src/infra-cli.ts +4 -0
- package/src/infra.ts +103 -22
- package/src/init.ts +55 -22
- package/src/lifecycle-record.ts +21 -6
- package/src/livekit-backing.mjs +37 -0
- package/src/local-branches.ts +6 -3
- package/src/mongodb-backing.ts +55 -0
- package/src/native-postgres-backing.ts +329 -0
- package/src/origin.ts +2 -1
- package/src/owned-path.ts +32 -0
- package/src/pack-facts.ts +1 -0
- package/src/pglite-backing.ts +155 -79
- package/src/pglite-host.mjs +47 -17
- package/src/placeholder.ts +10 -5
- package/src/process-groups.d.mts +2 -0
- package/src/process-groups.mjs +59 -0
- package/src/process-groups.ts +1 -33
- package/src/process-receipt.d.mts +6 -0
- package/src/process-receipt.mjs +45 -0
- package/src/process-receipt.ts +5 -0
- package/src/process-signal.d.mts +9 -0
- package/src/process-signal.mjs +92 -0
- package/src/project-inspect.ts +4 -2
- package/src/proxy-daemon.ts +2 -1
- package/src/redirect-proxy.ts +153 -18
- package/src/redis-backing.ts +74 -25
- package/src/reflect.ts +2 -1
- package/src/root.ts +7 -6
- package/src/run-task-worker.ts +2 -1
- package/src/runtime.ts +596 -265
- package/src/schema.ts +30 -6
- package/src/served-world.ts +21 -15
- package/src/service-recorder.ts +4 -2
- package/src/signals.d.mts +1 -0
- package/src/signals.mjs +10 -0
- package/src/signals.ts +1 -10
- package/src/tail.ts +10 -3
- package/src/tcp-port.ts +24 -13
- package/src/temporal-backing.mjs +28 -0
- package/src/up-cli.ts +6 -3
- package/src/up-task-worker.ts +2 -1
- package/src/websocket-relay.ts +18 -11
- package/src/world-view.ts +2 -2
package/dist/src/runtime.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import type { SpawnIdentity } from './process-receipt.js';
|
|
2
|
+
import { type WorldNetwork } from '@volter/world-core/network-policy';
|
|
1
3
|
import { type CaTrustInputs } from './ca-trust.js';
|
|
2
|
-
import type { WorldInstance, WorldIsolation, WorldMode, WorldRunOutcome } from './schema.js';
|
|
4
|
+
import type { WorldInstance, WorldIsolation, WorldMode, WorldRunOutcome, WorldServiceConfig } from './schema.js';
|
|
3
5
|
/** The World's events file: every service's start and end, and the World's own stops, one JSON line each. */
|
|
4
6
|
export declare function worldEventsPath(logs: string): string;
|
|
5
7
|
export type UpWorldOptions = {
|
|
@@ -19,6 +21,8 @@ export type UpWorldOptions = {
|
|
|
19
21
|
* episodes survive the boot; logs and the pid file start clean. Never the default: `up` starts
|
|
20
22
|
* clean, and the world dir is the reproducible story. */
|
|
21
23
|
keepState?: boolean;
|
|
24
|
+
/** A branch's base permission: intersects both the config and the launching process. */
|
|
25
|
+
networkCeiling?: WorldNetwork;
|
|
22
26
|
};
|
|
23
27
|
export type ShareWorldOptions = {
|
|
24
28
|
root?: string;
|
|
@@ -45,6 +49,8 @@ export type WorldDoctorReport = {
|
|
|
45
49
|
checks: WorldDoctorCheck[];
|
|
46
50
|
};
|
|
47
51
|
export type RunWorldOptions = UpWorldOptions & {
|
|
52
|
+
/** the command's working directory: the caller's, as `attach` runs its command (default: the World's root) */
|
|
53
|
+
cwd?: string;
|
|
48
54
|
keep?: boolean;
|
|
49
55
|
verbose?: boolean;
|
|
50
56
|
};
|
|
@@ -78,11 +84,20 @@ export declare function sharingClaimAlive(claim: SharingClaim): boolean;
|
|
|
78
84
|
* run code that is not Volter's (a World's apps, a command attached to a World, a tunnel, a dependency install) are
|
|
79
85
|
* given an environment without it. */
|
|
80
86
|
export declare function withoutVaultSignIn<T extends Record<string, string | undefined>>(env: T): T;
|
|
87
|
+
/** The boot permission, never a fallback to a mutable config. */
|
|
88
|
+
export declare function recordedWorldNetwork(instance: WorldInstance): WorldNetwork | undefined;
|
|
89
|
+
/** A stopped receipt checks byte consistency before fields are read; it is not authentication. */
|
|
90
|
+
export declare function readWorldBootRecord(name: string, root: string): WorldInstance;
|
|
81
91
|
export declare function admittedEnv(strip: string[] | undefined, env?: NodeJS.ProcessEnv): Record<string, string>;
|
|
82
92
|
/** The names a twin of this World was to issue and did not (its door failed): kept out of every command's env, so a
|
|
83
93
|
* caller's own value (a real key in their shell) never stands in for the credential the World meant to issue. */
|
|
84
94
|
export declare const UNISSUED_ENV = "VOLTER_WORLD_UNISSUED";
|
|
85
95
|
export declare function saveWorldInstance(instance: WorldInstance): void;
|
|
96
|
+
/** The environment an external service and its replacement infrastructure hosts run in. Shared with branching,
|
|
97
|
+
* so both use the boot's admission, service overrides, lifecycle context and control-plane egress rules. */
|
|
98
|
+
export declare function externalServiceEnv(service: WorldServiceConfig, paths: {
|
|
99
|
+
logs: string;
|
|
100
|
+
}, worldEnv: Record<string, string>, stripEnv?: string[]): NodeJS.ProcessEnv;
|
|
86
101
|
/**
|
|
87
102
|
* THE MANAGED-DATABASE BINDING (architecture.md, managed infrastructure: the data plane's declared exception): for a
|
|
88
103
|
* twin whose pack declares `managedDatabase`, the URL of the World's own managed postgres — the service its
|
|
@@ -96,16 +111,20 @@ export declare function managedDatabaseFor(vendor: string, configPath: string |
|
|
|
96
111
|
url: string;
|
|
97
112
|
} | undefined;
|
|
98
113
|
export declare function upWorld(configId: string, options?: UpWorldOptions, abort?: AbortSignal): Promise<WorldInstance>;
|
|
114
|
+
/** The same bounded, identity-checked retirement used by World down, for provider-owned groups.
|
|
115
|
+
* No caller may release a durable receipt when inspection or signal delivery is uncertain. */
|
|
116
|
+
export declare function retireOwnedProcessGroups(records: SpawnIdentity[], graceMs?: number): Promise<void>;
|
|
99
117
|
export declare function downWorld(name: string, root?: string, options?: {
|
|
100
118
|
graceMs?: number;
|
|
101
119
|
purge?: boolean;
|
|
102
|
-
|
|
120
|
+
expectedInstance?: string;
|
|
103
121
|
}): Promise<{
|
|
104
122
|
name: string;
|
|
105
123
|
stopped: number[];
|
|
106
124
|
escalated: number[];
|
|
107
125
|
externalStopped: string[];
|
|
108
126
|
externalErrors: string[];
|
|
127
|
+
externalAbandoned?: string[];
|
|
109
128
|
notSignalled?: string[];
|
|
110
129
|
purged?: string;
|
|
111
130
|
}>;
|
|
@@ -149,17 +168,15 @@ export declare function shareWorldServices(name: string, options?: ShareWorldSer
|
|
|
149
168
|
* services — SIGTERM, confirm dead (escalating to SIGKILL past the grace), and only THEN erase the
|
|
150
169
|
* tunnel facts/pids. A best-effort SIGTERM with no confirmation can leave a `cloudflared` that
|
|
151
170
|
* ignores SIGTERM serving the public URL forever while instance.json (and the pids file) say
|
|
152
|
-
* nothing is shared — the exact "half-shared" state docs/concepts/worlds.md promises cannot exist.
|
|
153
|
-
* synchronous (via `killSurvivorsAfterGraceSync`) to match the existing signature/call sites
|
|
154
|
-
* (the CLI does not await it). Returns the instance plus the tunnel pids that needed escalating,
|
|
171
|
+
* nothing is shared — the exact "half-shared" state docs/concepts/worlds.md promises cannot exist. Retirement awaits asynchronous birth verification. Returns the instance plus the tunnel pids that needed escalating,
|
|
155
172
|
* for callers that want to report it. */
|
|
156
173
|
export declare function unshareWorld(name: string, options?: {
|
|
157
174
|
root?: string;
|
|
158
175
|
service?: string;
|
|
159
176
|
graceMs?: number;
|
|
160
|
-
}): WorldInstance & {
|
|
177
|
+
}): Promise<WorldInstance & {
|
|
161
178
|
escalated: number[];
|
|
162
|
-
}
|
|
179
|
+
}>;
|
|
163
180
|
export declare function doctorWorld(name: string, options?: {
|
|
164
181
|
root?: string;
|
|
165
182
|
verifyPublic?: boolean;
|