@volter/world-core 3.0.161 → 3.0.162
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/generated/pack-facts.json +84 -5
- package/dist/inject.cjs +2 -2
- package/dist/src/derived-core.d.ts +9 -1
- package/dist/src/derived-core.js +120 -57
- package/dist/src/index.d.ts +4 -2
- package/dist/src/index.js +3 -1
- package/dist/src/machines.d.ts +4 -16
- package/dist/src/machines.js +10 -44
- package/dist/src/pack-fetch.js +29 -5
- package/dist/src/packRegistry.d.ts +7 -0
- package/dist/src/protobuf.d.ts +4 -0
- package/dist/src/protobuf.js +43 -2
- package/dist/src/request-scope.d.ts +2 -0
- package/dist/src/request-scope.js +9 -0
- package/dist/src/runtime.d.ts +6 -3
- package/dist/src/runtime.js +4 -1
- package/dist/src/serve-http.d.ts +11 -0
- package/dist/src/serve-http.js +132 -0
- package/dist/src/signing.d.ts +30 -7
- package/dist/src/signing.js +32 -16
- package/dist/src/sockets.d.ts +1 -1
- package/dist/src/sockets.js +11 -7
- package/dist/src/world-account-name.d.ts +2 -0
- package/dist/src/world-account-name.js +4 -0
- package/generated/pack-facts.json +84 -5
- package/inject.cjs +2 -2
- package/package.json +1 -1
- package/src/derived-core.ts +125 -63
- package/src/index.ts +5 -2
- package/src/machines.ts +10 -38
- package/src/pack-fetch.ts +27 -5
- package/src/packRegistry.ts +2 -2
- package/src/protobuf.ts +39 -2
- package/src/request-scope.ts +9 -0
- package/src/runtime.ts +8 -3
- package/src/serve-http.ts +111 -0
- package/src/signing.ts +38 -18
- package/src/sockets.ts +12 -9
- package/src/world-account-name.ts +4 -0
|
@@ -25,6 +25,9 @@
|
|
|
25
25
|
"resources": [],
|
|
26
26
|
"endpointEnvNone": "@ai-sdk/gateway calls https://ai-gateway.vercel.sh/v4/ai and an OpenAI client is given https://ai-gateway.vercel.sh/v1 in code; the World claims the host",
|
|
27
27
|
"credentialDoor": {
|
|
28
|
+
"account": {
|
|
29
|
+
"field": "account"
|
|
30
|
+
},
|
|
28
31
|
"path": "/_twin/app-credentials",
|
|
29
32
|
"body": {},
|
|
30
33
|
"fill": {
|
|
@@ -110,6 +113,9 @@
|
|
|
110
113
|
"note": "the SDKs' base URL (the TypeScript and Python SDKs and Claude Code read ANTHROPIC_BASE_URL)"
|
|
111
114
|
},
|
|
112
115
|
"credentialDoor": {
|
|
116
|
+
"account": {
|
|
117
|
+
"field": "account"
|
|
118
|
+
},
|
|
113
119
|
"path": "/_twin/app-credentials",
|
|
114
120
|
"body": {},
|
|
115
121
|
"fill": {
|
|
@@ -174,6 +180,9 @@
|
|
|
174
180
|
"note": "The AWS SDKs read AWS_ENDPOINT_URL as every service's endpoint (https://docs.aws.amazon.com/sdkref/latest/guide/feature-ss-endpoints.html)."
|
|
175
181
|
},
|
|
176
182
|
"credentialDoor": {
|
|
183
|
+
"account": {
|
|
184
|
+
"field": "account"
|
|
185
|
+
},
|
|
177
186
|
"path": "/_twin/app-credentials",
|
|
178
187
|
"body": {},
|
|
179
188
|
"fill": {
|
|
@@ -360,6 +369,9 @@
|
|
|
360
369
|
"credentialDoor": {
|
|
361
370
|
"path": "/_twin/app-credentials",
|
|
362
371
|
"body": {},
|
|
372
|
+
"account": {
|
|
373
|
+
"field": "account"
|
|
374
|
+
},
|
|
363
375
|
"fill": {
|
|
364
376
|
"CLERK_SECRET_KEY": "secret_key",
|
|
365
377
|
"CLERK_API_KEY": "secret_key",
|
|
@@ -782,6 +794,9 @@
|
|
|
782
794
|
"note": "Python e2b 2.45.0 and the JS SDK read E2B_API_URL; the JS SDK reads E2B_SANDBOX_URL and sends sandbox id/port headers; vendor hosts route through the World proxy"
|
|
783
795
|
},
|
|
784
796
|
"credentialDoor": {
|
|
797
|
+
"account": {
|
|
798
|
+
"field": "account"
|
|
799
|
+
},
|
|
785
800
|
"path": "/_twin/teams",
|
|
786
801
|
"body": {
|
|
787
802
|
"name": "World team"
|
|
@@ -1003,6 +1018,9 @@
|
|
|
1003
1018
|
"note": "Google GenAI SDK reads this base URL; other callers retain the routed vendor host."
|
|
1004
1019
|
},
|
|
1005
1020
|
"credentialDoor": {
|
|
1021
|
+
"account": {
|
|
1022
|
+
"field": "account"
|
|
1023
|
+
},
|
|
1006
1024
|
"path": "/_twin/app-credentials",
|
|
1007
1025
|
"body": {},
|
|
1008
1026
|
"fill": {
|
|
@@ -1079,6 +1097,9 @@
|
|
|
1079
1097
|
"app"
|
|
1080
1098
|
],
|
|
1081
1099
|
"credentialDoor": {
|
|
1100
|
+
"account": {
|
|
1101
|
+
"field": "account"
|
|
1102
|
+
},
|
|
1082
1103
|
"path": "/_twin/app-credentials",
|
|
1083
1104
|
"body": {},
|
|
1084
1105
|
"fill": {
|
|
@@ -1213,6 +1234,9 @@
|
|
|
1213
1234
|
],
|
|
1214
1235
|
"endpointEnvNone": "Google's OAuth libraries read no base-URL variable: the endpoints are the discovery document's, claimed by the host rules.",
|
|
1215
1236
|
"credentialDoor": {
|
|
1237
|
+
"account": {
|
|
1238
|
+
"field": "world_account"
|
|
1239
|
+
},
|
|
1216
1240
|
"path": "/_twin/credentials",
|
|
1217
1241
|
"body": {
|
|
1218
1242
|
"client_email": "world@world-project.iam.gserviceaccount.com",
|
|
@@ -1657,11 +1681,20 @@
|
|
|
1657
1681
|
"endpointEnv": {
|
|
1658
1682
|
"name": "LIVEKIT_URL",
|
|
1659
1683
|
"templates": {
|
|
1660
|
-
"LIVEKIT_URL": "ws://${host}:${port}"
|
|
1661
|
-
"LIVEKIT_API_KEY": "twin-livekit-key",
|
|
1662
|
-
"LIVEKIT_API_SECRET": "twin-livekit-secret-for-the-worlds-own-server"
|
|
1684
|
+
"LIVEKIT_URL": "ws://${host}:${port}"
|
|
1663
1685
|
},
|
|
1664
|
-
"note": "
|
|
1686
|
+
"note": "The native server uses a private key; its twin front accepts only keys issued for retained World accounts."
|
|
1687
|
+
},
|
|
1688
|
+
"credentialDoor": {
|
|
1689
|
+
"path": "/_twin/app-credentials",
|
|
1690
|
+
"body": {},
|
|
1691
|
+
"account": {
|
|
1692
|
+
"field": "account"
|
|
1693
|
+
},
|
|
1694
|
+
"fill": {
|
|
1695
|
+
"LIVEKIT_API_KEY": "api_key",
|
|
1696
|
+
"LIVEKIT_API_SECRET": "api_secret"
|
|
1697
|
+
}
|
|
1665
1698
|
},
|
|
1666
1699
|
"sidePorts": [
|
|
1667
1700
|
{
|
|
@@ -1696,6 +1729,9 @@
|
|
|
1696
1729
|
"resources": [],
|
|
1697
1730
|
"endpointEnvNone": "Open Autonomy reads MODEL_GATEWAY_URL and defaults to api-gateway.merge.dev; the World claims the host",
|
|
1698
1731
|
"credentialDoor": {
|
|
1732
|
+
"account": {
|
|
1733
|
+
"field": "account"
|
|
1734
|
+
},
|
|
1699
1735
|
"path": "/_twin/organizations",
|
|
1700
1736
|
"body": {},
|
|
1701
1737
|
"fill": {
|
|
@@ -1734,6 +1770,9 @@
|
|
|
1734
1770
|
"resources": [],
|
|
1735
1771
|
"endpointEnvNone": "the SDKs call https://api.mistral.ai/v1 unless given a base URL in code or config; the World claims the host",
|
|
1736
1772
|
"credentialDoor": {
|
|
1773
|
+
"account": {
|
|
1774
|
+
"field": "account"
|
|
1775
|
+
},
|
|
1737
1776
|
"path": "/_twin/app-credentials",
|
|
1738
1777
|
"body": {},
|
|
1739
1778
|
"fill": {
|
|
@@ -1808,6 +1847,9 @@
|
|
|
1808
1847
|
"note": "npm and bun read the registry from npm_config_registry (and .npmrc's `registry`)."
|
|
1809
1848
|
},
|
|
1810
1849
|
"credentialDoor": {
|
|
1850
|
+
"account": {
|
|
1851
|
+
"field": "account"
|
|
1852
|
+
},
|
|
1811
1853
|
"path": "/_twin/app-credentials",
|
|
1812
1854
|
"body": {},
|
|
1813
1855
|
"fill": {
|
|
@@ -1871,6 +1913,9 @@
|
|
|
1871
1913
|
"api_key"
|
|
1872
1914
|
],
|
|
1873
1915
|
"credentialDoor": {
|
|
1916
|
+
"account": {
|
|
1917
|
+
"field": "account"
|
|
1918
|
+
},
|
|
1874
1919
|
"path": "/_twin/app-credentials",
|
|
1875
1920
|
"body": {},
|
|
1876
1921
|
"fill": {
|
|
@@ -1982,6 +2027,9 @@
|
|
|
1982
2027
|
"note": "the twin's own URL; applications reach it at <region>.connect.psdb.cloud, which the injector redirects, with the password the credentialDoor issued."
|
|
1983
2028
|
},
|
|
1984
2029
|
"credentialDoor": {
|
|
2030
|
+
"account": {
|
|
2031
|
+
"field": "account"
|
|
2032
|
+
},
|
|
1985
2033
|
"path": "/_twin/app-credentials",
|
|
1986
2034
|
"body": {
|
|
1987
2035
|
"organization": "world",
|
|
@@ -2306,6 +2354,9 @@
|
|
|
2306
2354
|
"received"
|
|
2307
2355
|
],
|
|
2308
2356
|
"credentialDoor": {
|
|
2357
|
+
"account": {
|
|
2358
|
+
"field": "account"
|
|
2359
|
+
},
|
|
2309
2360
|
"path": "/_twin/app-credentials",
|
|
2310
2361
|
"body": {},
|
|
2311
2362
|
"fill": {
|
|
@@ -2377,6 +2428,9 @@
|
|
|
2377
2428
|
],
|
|
2378
2429
|
"endpointEnvNone": "an SDK sends to its DSN's host and sentry-cli to SENTRY_URL (sentry.io by default); the DSN the World issues names the World's ingest host, claimed by the host rules",
|
|
2379
2430
|
"credentialDoor": {
|
|
2431
|
+
"account": {
|
|
2432
|
+
"field": "account"
|
|
2433
|
+
},
|
|
2380
2434
|
"path": "/_twin/app-credentials",
|
|
2381
2435
|
"body": {},
|
|
2382
2436
|
"fill": {
|
|
@@ -2485,6 +2539,9 @@
|
|
|
2485
2539
|
"app"
|
|
2486
2540
|
],
|
|
2487
2541
|
"credentialDoor": {
|
|
2542
|
+
"account": {
|
|
2543
|
+
"field": "account"
|
|
2544
|
+
},
|
|
2488
2545
|
"path": "/_twin/app-credentials",
|
|
2489
2546
|
"body": {},
|
|
2490
2547
|
"fill": {
|
|
@@ -2602,6 +2659,9 @@
|
|
|
2602
2659
|
"credentialDoor": {
|
|
2603
2660
|
"path": "/_twin/app-credentials",
|
|
2604
2661
|
"body": {},
|
|
2662
|
+
"account": {
|
|
2663
|
+
"field": "account"
|
|
2664
|
+
},
|
|
2605
2665
|
"fill": {
|
|
2606
2666
|
"STRIPE_SECRET_KEY": "secret_key",
|
|
2607
2667
|
"STRIPE_API_KEY": "secret_key",
|
|
@@ -2675,7 +2735,11 @@
|
|
|
2675
2735
|
"managedDatabase": {
|
|
2676
2736
|
"kind": "postgres",
|
|
2677
2737
|
"arg": "--database",
|
|
2678
|
-
"
|
|
2738
|
+
"user": "world",
|
|
2739
|
+
"database": "world",
|
|
2740
|
+
"clock": "wall",
|
|
2741
|
+
"credentialField": "database_url",
|
|
2742
|
+
"note": "the selected Supabase twin owns its private PostgreSQL data plane; the credential door answers its URL, application migrations own application tables, and SQL uses wall time"
|
|
2679
2743
|
},
|
|
2680
2744
|
"serveExport": "createSupabaseTwinServer"
|
|
2681
2745
|
},
|
|
@@ -2886,6 +2950,9 @@
|
|
|
2886
2950
|
],
|
|
2887
2951
|
"endpointEnvNone": "Tinybird's clients take the API host as configuration (@chronark/zod-bird's baseUrl, tinybird-cli's --host), defaulting to https://api.tinybird.co, which the World routes by host; no SDK reads a base-URL variable of its own",
|
|
2888
2952
|
"credentialDoor": {
|
|
2953
|
+
"account": {
|
|
2954
|
+
"field": "account"
|
|
2955
|
+
},
|
|
2889
2956
|
"path": "/_twin/app-credentials",
|
|
2890
2957
|
"body": {},
|
|
2891
2958
|
"fill": {
|
|
@@ -3205,6 +3272,9 @@
|
|
|
3205
3272
|
"note": "Redis reads its REST URL; QStash and Workflow read QSTASH_URL. Direct SDK transports use the twin endpoint and issued token; other clients also use host routing."
|
|
3206
3273
|
},
|
|
3207
3274
|
"credentialDoor": {
|
|
3275
|
+
"account": {
|
|
3276
|
+
"field": "account"
|
|
3277
|
+
},
|
|
3208
3278
|
"path": "/_twin/app-credentials",
|
|
3209
3279
|
"body": {
|
|
3210
3280
|
"owner": "owner@world.test"
|
|
@@ -3270,6 +3340,9 @@
|
|
|
3270
3340
|
],
|
|
3271
3341
|
"endpointEnvNone": "the applications reach api.vercel.com and the Edge Config connection string's host, which the World routes to the twin",
|
|
3272
3342
|
"credentialDoor": {
|
|
3343
|
+
"account": {
|
|
3344
|
+
"field": "account"
|
|
3345
|
+
},
|
|
3273
3346
|
"path": "/_twin/app-credentials",
|
|
3274
3347
|
"body": {
|
|
3275
3348
|
"team": "world",
|
|
@@ -3508,6 +3581,9 @@
|
|
|
3508
3581
|
"upload"
|
|
3509
3582
|
],
|
|
3510
3583
|
"credentialDoor": {
|
|
3584
|
+
"account": {
|
|
3585
|
+
"field": "account"
|
|
3586
|
+
},
|
|
3511
3587
|
"path": "/_twin/app-credentials",
|
|
3512
3588
|
"body": {},
|
|
3513
3589
|
"fill": {
|
|
@@ -3546,6 +3622,9 @@
|
|
|
3546
3622
|
"resources": [],
|
|
3547
3623
|
"endpointEnvNone": "the SDK calls https://api.x.ai/v1 unless given a base URL in code; the World claims the host",
|
|
3548
3624
|
"credentialDoor": {
|
|
3625
|
+
"account": {
|
|
3626
|
+
"field": "account"
|
|
3627
|
+
},
|
|
3549
3628
|
"path": "/_twin/app-credentials",
|
|
3550
3629
|
"body": {},
|
|
3551
3630
|
"fill": {
|
package/dist/inject.cjs
CHANGED
|
@@ -358,8 +358,8 @@ function strictEgressEnabled() {
|
|
|
358
358
|
}
|
|
359
359
|
|
|
360
360
|
// THE WORLD'S DECISION (docs/contributing/architecture.md, "Capability decisions"): every seam below asks
|
|
361
|
-
// capability-decision.cjs and enforces its answer. This process is a host process, whose declaration is the open one;
|
|
362
|
-
//
|
|
361
|
+
// capability-decision.cjs and enforces its answer. This process is a host process, whose declaration is the open one; or
|
|
362
|
+
// a process of an image run, which carries its
|
|
363
363
|
// image's declaration (VOLTER_WORLD_DECLARATION) and is confined from the host's network. What the World grants is its
|
|
364
364
|
// published policy. The seams supply what they observe: the twin route, the vendors sharing a host, the World's doors.
|
|
365
365
|
function worldGrant() {
|
|
@@ -783,6 +783,7 @@ export type DerivedManifest = {
|
|
|
783
783
|
* read, list, update and delete by it and stamps it on every create, for each resource not `shared`. */
|
|
784
784
|
tenant?: {
|
|
785
785
|
field: string;
|
|
786
|
+
storage?: 'namespaced';
|
|
786
787
|
};
|
|
787
788
|
/** The vendor's own lanes behind this manifest's API ("Other wires: lanes"), dispatched by the kernel before the
|
|
788
789
|
* vendor's own doors, clock and API (LanesDecl). */
|
|
@@ -916,6 +917,10 @@ export type CoreScope = {
|
|
|
916
917
|
/** the application a walk stands in for: what the vendor asks it (`ctx.ask`) is answered by it (events.ts) */
|
|
917
918
|
application?: ApplicationStandIn;
|
|
918
919
|
};
|
|
920
|
+
/** World-owned generated values use the same private seed and log as pack secrets. */
|
|
921
|
+
export declare function worldSecret(service: string, root: string, label: string, at?: string): Promise<string>;
|
|
922
|
+
/** The same retained account primitive for pack doors and private native twin fronts. */
|
|
923
|
+
export declare function worldAccount(service: string, root: string | undefined, id?: unknown, at?: string, provisioning?: boolean): Promise<string>;
|
|
919
924
|
/** The lane a vendor's router sent a request to (pack-fetch's laneRouter sets it). */
|
|
920
925
|
export declare const LANE_HEADER = "x-volter-lane";
|
|
921
926
|
/** What a coverage measurement sees of a pack's declared state logic: each move a request made and each refusal a
|
|
@@ -1011,6 +1016,8 @@ export type SemanticsContext = {
|
|
|
1011
1016
|
* random, and keeps as bookkeeping no door answers. The same label gives the same secret for the World's whole life,
|
|
1012
1017
|
* and no one can compute it from ids the World shows, as they can a value derived from them alone. */
|
|
1013
1018
|
secret(label: string): Promise<string>;
|
|
1019
|
+
/** Select an account at a pack's credential door. Packs retain their own vendor account/key semantics. */
|
|
1020
|
+
account(field?: string): Promise<string>;
|
|
1014
1021
|
/** The World's machine pool (machines.ts), as the pack's `machine-pool` door enrolled it; `none` when none was. */
|
|
1015
1022
|
machines: MachinePool;
|
|
1016
1023
|
/** A signing key pair for `label` (an issuer's ID tokens, a provider's JWTs, a CA's or a log's key), PEM: RSA 2048
|
|
@@ -1031,7 +1038,8 @@ export type SemanticsContext = {
|
|
|
1031
1038
|
create(resource: string, fields: Record<string, unknown> | ((id: string) => Record<string, unknown>), operation: string): Promise<Record<string, unknown>>;
|
|
1032
1039
|
/** Create under declared unique keys and the action lock; a collision returns the existing own-field view without a write. */
|
|
1033
1040
|
createUnique(resource: string, fields: Record<string, unknown> | ((id: string) => Record<string, unknown>), operation: string, options?: {
|
|
1034
|
-
input
|
|
1041
|
+
input?: 'omit';
|
|
1042
|
+
id?: string;
|
|
1035
1043
|
}): Promise<{
|
|
1036
1044
|
created: boolean;
|
|
1037
1045
|
row: Record<string, unknown>;
|