@volter/world-runtime 2.0.54 → 3.0.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/known-external-services.json +5 -4
- package/dist/src/actions-runner-cli.d.ts +2 -0
- package/dist/src/actions-runner-cli.js +25 -0
- package/dist/src/actions-runner.d.ts +18 -0
- package/dist/src/actions-runner.js +281 -0
- package/dist/src/ancestry.js +1 -1
- package/dist/src/app-url.js +1 -1
- package/dist/src/backings.d.ts +29 -0
- package/dist/src/backings.js +45 -0
- package/dist/src/branch.js +3 -2
- package/dist/src/browser-proxy-cli.js +1 -1
- package/dist/src/catalog-index.d.ts +38 -0
- package/dist/src/catalog-index.js +37 -0
- package/dist/src/catalog.d.ts +16 -3
- package/dist/src/catalog.js +69 -26
- package/dist/src/changeset.d.ts +1 -1
- package/dist/src/changeset.js +9 -11
- package/dist/src/cli-args.d.ts +4 -0
- package/dist/src/cli-args.js +18 -0
- package/dist/src/cli-commands.d.ts +1 -0
- package/dist/src/cli-commands.js +1216 -0
- package/dist/src/cli.js +8 -1300
- package/dist/src/configs.js +1 -1
- package/dist/src/console-apart.d.ts +2 -2
- package/dist/src/console-apart.js +5 -5
- package/dist/src/consumers.js +1 -1
- package/dist/src/covers.d.ts +1 -1
- package/dist/src/covers.js +94 -30
- package/dist/src/env-output.d.ts +1 -1
- package/dist/src/env-output.js +2 -2
- package/dist/src/fixture-env.js +18 -26
- package/dist/src/host-cli.js +4 -2
- package/dist/src/host-fault-fixture.js +6 -0
- package/dist/src/host-ready.d.ts +8 -2
- package/dist/src/host-ready.js +16 -4
- package/dist/src/host-worker.js +6 -1
- package/dist/src/host.d.ts +2 -0
- package/dist/src/host.js +9 -1
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.js +2 -2
- package/dist/src/init.d.ts +33 -23
- package/dist/src/init.js +228 -96
- package/dist/src/lifecycle-record.js +2 -2
- package/dist/src/local-branches.js +1 -1
- package/dist/src/origin.d.ts +1 -1
- package/dist/src/origin.js +12 -10
- package/dist/src/pack-facts.d.ts +30 -6
- package/dist/src/pack-facts.js +13 -3
- package/dist/src/pglite-backing.js +2 -1
- package/dist/src/placeholder.d.ts +1 -1
- package/dist/src/placeholder.js +12 -4
- package/dist/src/project-inspect.d.ts +1 -1
- package/dist/src/project-inspect.js +2 -2
- package/dist/src/redirect-proxy.d.ts +5 -0
- package/dist/src/redirect-proxy.js +8 -1
- package/dist/src/redis-backing.js +4 -2
- package/dist/src/reflect.js +1 -1
- package/dist/src/root.d.ts +11 -33
- package/dist/src/root.js +28 -59
- package/dist/src/runtime-test-support.js +1 -1
- package/dist/src/runtime.d.ts +7 -1
- package/dist/src/runtime.js +317 -53
- package/dist/src/schema.d.ts +27 -5
- package/dist/src/schema.js +13 -12
- package/dist/src/served-world.d.ts +11 -35
- package/dist/src/served-world.js +54 -141
- package/dist/src/tail.js +1 -1
- package/dist/src/up-cli.d.ts +3 -0
- package/dist/src/up-cli.js +55 -0
- package/dist/src/websocket-relay.d.ts +1 -1
- package/dist/src/world-origins.d.ts +1 -1
- package/dist/src/world-origins.js +1 -1
- package/dist/src/world-view.d.ts +1 -1
- package/dist/src/world-view.js +2 -2
- package/known-external-services.json +5 -4
- package/package.json +11 -11
- package/src/actions-runner-cli.ts +24 -0
- package/src/actions-runner.ts +244 -0
- package/src/ancestry.ts +1 -1
- package/src/app-url.ts +1 -1
- package/src/backings.ts +55 -0
- package/src/branch.ts +3 -2
- package/src/browser-proxy-cli.ts +1 -1
- package/src/catalog-index.ts +44 -0
- package/src/catalog.ts +67 -24
- package/src/changeset.ts +10 -13
- package/src/cli-args.ts +17 -0
- package/src/cli-commands.ts +1070 -0
- package/src/cli.ts +9 -1139
- package/src/configs.ts +1 -1
- package/src/console-apart.ts +5 -5
- package/src/consumers.ts +1 -1
- package/src/covers.ts +83 -30
- package/src/env-output.ts +2 -2
- package/src/fixture-env.ts +18 -26
- package/src/host-cli.ts +4 -2
- package/src/host-ready.ts +13 -4
- package/src/host-worker.ts +6 -2
- package/src/host.ts +11 -2
- package/src/index.ts +2 -2
- package/src/init.ts +222 -101
- package/src/lifecycle-record.ts +2 -2
- package/src/local-branches.ts +1 -1
- package/src/origin.ts +12 -10
- package/src/pack-facts.ts +22 -6
- package/src/pglite-backing.ts +2 -1
- package/src/placeholder.ts +13 -4
- package/src/project-inspect.ts +2 -2
- package/src/redirect-proxy.ts +9 -1
- package/src/redis-backing.ts +4 -2
- package/src/reflect.ts +1 -1
- package/src/root.ts +33 -65
- package/src/runtime-test-support.ts +1 -1
- package/src/runtime.ts +261 -55
- package/src/schema.ts +26 -13
- package/src/served-world.ts +50 -130
- package/src/tail.ts +1 -1
- package/src/up-cli.ts +55 -0
- package/src/websocket-relay.ts +1 -1
- package/src/world-origins.ts +1 -1
- package/src/world-view.ts +3 -3
package/dist/src/init.d.ts
CHANGED
|
@@ -8,7 +8,9 @@ export type InitWiring =
|
|
|
8
8
|
| 'app-read'
|
|
9
9
|
/** no injector entry and no endpoint env: the SDK is pointed at the twin by explicit client config */
|
|
10
10
|
| 'explicit-config'
|
|
11
|
-
/**
|
|
11
|
+
/** the vendor's own open-source server runs as the World's service (VENDOR_SERVER_BACKINGS) */
|
|
12
|
+
| 'backing'
|
|
13
|
+
/** detected vendor with no vendor pack in the catalog — nothing to emit */
|
|
12
14
|
| 'no-pack';
|
|
13
15
|
export type InitVendorPlan = {
|
|
14
16
|
vendor: string;
|
|
@@ -21,17 +23,30 @@ export type InitVendorPlan = {
|
|
|
21
23
|
service: WorldServiceConfig | null;
|
|
22
24
|
/** why this wiring — printed in the report and embedded in the service's `//` note */
|
|
23
25
|
note: string;
|
|
26
|
+
/** the source init chose the pack from (architecture, "The catalog: where twins come from"): where it comes from, its
|
|
27
|
+
* protocol and its version */
|
|
28
|
+
source?: {
|
|
29
|
+
kind: 'checkout' | 'installed';
|
|
30
|
+
version?: string;
|
|
31
|
+
};
|
|
24
32
|
};
|
|
25
33
|
/** What `init` did with one env NAME found in the repo's example env files. */
|
|
26
34
|
export type EnvDisposition =
|
|
27
35
|
/** credential-shaped → replaced by a structurally valid fake (never the committed value) */
|
|
28
36
|
'faked'
|
|
37
|
+
/** a credential the vendor's twin issues at boot → `$issue:<vendor>` (the twin refuses a key it did not make) */
|
|
38
|
+
| 'issued'
|
|
29
39
|
/** non-credential app config → the example value copied verbatim */
|
|
30
40
|
| 'kept'
|
|
31
41
|
/** infra connection string → points at a World-managed infrastructure service */
|
|
32
42
|
| 'compose'
|
|
33
43
|
/** infra connection string → a documented placeholder the operator fills in */
|
|
34
44
|
| 'placeholder'
|
|
45
|
+
/** the application's own origin → `$app-url`, the address its booter records, resolved when it attaches */
|
|
46
|
+
| 'app-origin'
|
|
47
|
+
/** a detected vendor's endpoint pointed at a local stand-in server (a garage or MinIO for S3) → left unset, so the SDK
|
|
48
|
+
* addresses the vendor's own host, which the World routes to its twin */
|
|
49
|
+
| 'stand-in'
|
|
35
50
|
/** neither credential-shaped nor valued: the operator has to decide */
|
|
36
51
|
| 'unknown';
|
|
37
52
|
export type InitEnvRow = {
|
|
@@ -114,10 +129,12 @@ export type InitPlan = {
|
|
|
114
129
|
}>;
|
|
115
130
|
/** pack `defaults/` files copied into the world dir (TWIN-PROGRAMMING-MODEL: default
|
|
116
131
|
* reasonable — visible starter seeds/handlers, ownership transfers on copy). */
|
|
132
|
+
/** `from` is copied byte for byte; `content` (a runner init writes for a protocol-3 pack's seed data) is written as given. */
|
|
117
133
|
defaultsCopies: Array<{
|
|
118
134
|
vendor: string;
|
|
119
|
-
kind: 'handlers' | 'seed';
|
|
120
|
-
from
|
|
135
|
+
kind: 'handlers' | 'seed' | 'seed-data';
|
|
136
|
+
from?: string;
|
|
137
|
+
content?: string;
|
|
121
138
|
to: string;
|
|
122
139
|
}>;
|
|
123
140
|
/** emitted when any pack ships a default seed: the one explicit entry point + story skeleton */
|
|
@@ -158,7 +175,7 @@ export type InitResult = {
|
|
|
158
175
|
};
|
|
159
176
|
export type InitOptions = {
|
|
160
177
|
/** the WORLD root: where the emitted config boots from, and where the catalog is resolved —
|
|
161
|
-
*
|
|
178
|
+
* the sibling pack repository when init runs here, else the `@volter/twin-<vendor>`
|
|
162
179
|
* packages installed above it (docs/concepts/worlds.md#the-config-and-the-running-world). Defaults to the
|
|
163
180
|
* application repo. */
|
|
164
181
|
root?: string;
|
|
@@ -173,39 +190,29 @@ export type InitOptions = {
|
|
|
173
190
|
bare?: string;
|
|
174
191
|
};
|
|
175
192
|
/** The twins available at `root`, sorted — a deterministic input (catalog.ts: this checkout's
|
|
176
|
-
*
|
|
193
|
+
* vendor directories in the pack repository, or the `@volter/twin-<vendor>` packages installed above root). */
|
|
177
194
|
export declare function packCatalog(root: string): string[];
|
|
178
195
|
/**
|
|
179
|
-
* The
|
|
180
|
-
*
|
|
181
|
-
*
|
|
182
|
-
*
|
|
183
|
-
*
|
|
184
|
-
* inngest `INNGEST_BASE_URL` (+ `INNGEST_EVENT_API_BASE_URL` for the event API)
|
|
185
|
-
* — inngest@4's own apiBaseUrl/eventBaseUrl getters.
|
|
186
|
-
* ai-gateway `AI_GATEWAY_BASE_URL` — `@ai-sdk/gateway`'s baseURL env.
|
|
187
|
-
* livekit `LIVEKIT_URL` as a ws:// template — the media plane is a WebSocket
|
|
188
|
-
* URL the SDK takes as its first constructor argument.
|
|
189
|
-
*
|
|
190
|
-
* A pack that is base-URL-configurable but has NO conventional env var (algolia, pinecone,
|
|
191
|
-
* replicate, fal, twilio, sendblue, figma, notion) is deliberately ABSENT: it gets a service
|
|
192
|
-
* with no endpoint env at all, and the proof reports it UNINTERCEPTABLE. Inventing a
|
|
193
|
-
* `<VENDOR>_BASE_URL` for it would make `covers` call the world covered (any app-read env counts)
|
|
194
|
-
* while the app, which reads no such var, still talks to the real vendor — the exact class of lie
|
|
195
|
-
* the proof exists to catch.
|
|
196
|
+
* The endpoint env for a pack the injector cannot intercept and whose descriptor cannot state it as `endpointEnv`
|
|
197
|
+
* (which receives the twin's URL): a raw protocol, whose client is pointed by host and port. Every name is one a real
|
|
198
|
+
* client documents. A pack with no such env is absent: it gets a service with no endpoint env at all, and the proof
|
|
199
|
+
* reports it UNINTERCEPTABLE. Inventing a `<VENDOR>_BASE_URL` for it would make `covers` call the world covered while
|
|
200
|
+
* the app, which reads no such var, still talks to the real vendor.
|
|
196
201
|
*/
|
|
197
202
|
export declare const APP_READ_ENDPOINT_ENV: Record<string, {
|
|
198
203
|
injectEnv?: string;
|
|
199
204
|
injectEnvTemplates?: Record<string, string>;
|
|
200
205
|
note: string;
|
|
201
206
|
}>;
|
|
207
|
+
export { VENDOR_SERVER_BACKINGS } from './backings.js';
|
|
202
208
|
/** Render the private managed-infrastructure definition — deterministic, with no absolute paths.
|
|
203
209
|
* Only meaningful when `plan.compose` is non-empty (writeWorldInit skips it otherwise). */
|
|
204
210
|
export declare function renderComposeFile(plan: InitPlan): string;
|
|
205
211
|
export type ParsedEnvEntry = {
|
|
206
212
|
name: string;
|
|
207
213
|
value: string;
|
|
208
|
-
source: string;
|
|
214
|
+
source: string; /** several dirs define it differently: each `source=value` */
|
|
215
|
+
conflict?: string[];
|
|
209
216
|
};
|
|
210
217
|
/** Parse one dotenv-ish file into ordered NAME/value pairs. Deliberately conservative: the same
|
|
211
218
|
* `NAME=` line shape `projectEnvNames` detects, plus quote stripping, so the two views of a repo's
|
|
@@ -224,6 +231,9 @@ export declare const STATE_GITIGNORE = "# Volter: the world's running state and
|
|
|
224
231
|
export declare function writeWorldInit(plan: InitPlan, options?: {
|
|
225
232
|
force?: boolean;
|
|
226
233
|
}): void;
|
|
234
|
+
/** The runner of a protocol-3 pack's default data (its `src/semantics/seed.ts`, copied beside it as `<vendor>.data.ts`):
|
|
235
|
+
* each call, in order, against the twin at its `<VENDOR>_TWIN_URL`, a refusal stopping the seed with the twin's answer. */
|
|
236
|
+
export declare function seedCallsRunner(vendor: string): string;
|
|
227
237
|
/**
|
|
228
238
|
* Plan, emit, and PROVE. The coverage proof runs against the just-written config (by path, so it
|
|
229
239
|
* reads exactly the bytes on disk rather than the in-memory plan) — `ok` is the proof's verdict and
|