@kehto/paja 0.35.2 → 0.36.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/LICENSE +21 -0
- package/README.md +14 -3
- package/dist/browser-host.js +2619 -1856
- package/dist/browser-host.js.map +1 -1
- package/dist/{chunk-HTLBCTIN.js → chunk-DK5RJN5P.js} +155 -84
- package/dist/chunk-DK5RJN5P.js.map +1 -0
- package/dist/cli.d.ts +2 -1
- package/dist/cli.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -1
- package/dist/{server-B7uqpu8g.d.ts → server-D1H77278.d.ts} +36 -1
- package/package.json +5 -5
- package/dist/chunk-HTLBCTIN.js.map +0 -1
package/dist/cli.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { P as PajaRawOptions, s as startPajaServer, a as PajaCommand, w as waitForTargetUrl } from './server-
|
|
2
|
+
import { P as PajaRawOptions, s as startPajaServer, a as PajaCommand, w as waitForTargetUrl } from './server-D1H77278.js';
|
|
3
3
|
import '@kehto/shell';
|
|
4
|
+
import '@kehto/services';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Minimal output streams used by the CLI runner.
|
package/dist/cli.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as PajaRawOptions, b as PajaHostConfig } from './server-
|
|
2
|
-
export { D as DEFAULT_PAJA_AGGREGATE_HASH, c as DEFAULT_PAJA_DTAG, d as DEFAULT_PAJA_HOST, e as DEFAULT_PAJA_PORT, f as DEFAULT_PAJA_RUNTIME_WAIT_MS, g as DEFAULT_PAJA_WINDOW_ID, h as DEFAULT_READY_TIMEOUT_MS, J as JsonPrimitive, i as JsonRecord, j as JsonValue, k as PAJA_SIMULATION_DOMAINS, l as PajaCapabilityDomain, a as PajaCommand, m as PajaExperimentalConfig, n as PajaHmrStrategy, o as
|
|
1
|
+
import { P as PajaRawOptions, b as PajaHostConfig } from './server-D1H77278.js';
|
|
2
|
+
export { D as DEFAULT_PAJA_AGGREGATE_HASH, c as DEFAULT_PAJA_DTAG, d as DEFAULT_PAJA_HOST, e as DEFAULT_PAJA_PORT, f as DEFAULT_PAJA_RUNTIME_WAIT_MS, g as DEFAULT_PAJA_WINDOW_ID, h as DEFAULT_READY_TIMEOUT_MS, J as JsonPrimitive, i as JsonRecord, j as JsonValue, k as PAJA_SIMULATION_DOMAINS, l as PajaCapabilityDomain, a as PajaCommand, m as PajaExperimentalConfig, n as PajaHmrStrategy, o as PajaIceServer, p as PajaMultiplayerConfig, q as PajaNestedContextLockSetting, r as PajaOptions, t as PajaOptionsError, u as PajaPointerRuntimeConfig, v as PajaServer, x as PajaServerOptions, y as PajaSimulation, z as PajaSimulationError, A as PajaSimulationRawOptions, B as PajaTargetMode, R as ReadinessError, C as ReadinessFetch, W as WaitForTargetUrlOptions, E as createPajaHostConfig, F as createPajaRuntimeHostConfig, G as formatPajaUrl, H as normalizePajaMultiplayer, I as normalizePajaOptions, K as normalizePajaSimulation, s as startPajaServer, L as summarizePajaSimulation, w as waitForTargetUrl } from './server-D1H77278.js';
|
|
3
3
|
import { NostrEvent } from 'nostr-tools';
|
|
4
4
|
import { Filter } from 'nostr-tools/filter';
|
|
5
5
|
import { ResolvedNapplet } from '@kehto/nip/5d';
|
package/dist/index.js
CHANGED
|
@@ -45,6 +45,7 @@ import {
|
|
|
45
45
|
loadPajaConfigFile,
|
|
46
46
|
mergePajaRawOptions,
|
|
47
47
|
normalizePajaLlmBaseUrl,
|
|
48
|
+
normalizePajaMultiplayer,
|
|
48
49
|
normalizePajaOptions,
|
|
49
50
|
normalizePajaSimulation,
|
|
50
51
|
parsePajaIntentLink,
|
|
@@ -59,7 +60,7 @@ import {
|
|
|
59
60
|
summarizePajaSimulation,
|
|
60
61
|
validatePajaLlmVaultPassword,
|
|
61
62
|
waitForTargetUrl
|
|
62
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-DK5RJN5P.js";
|
|
63
64
|
export {
|
|
64
65
|
BrowserIntentController,
|
|
65
66
|
DEFAULT_PAJA_AGGREGATE_HASH,
|
|
@@ -107,6 +108,7 @@ export {
|
|
|
107
108
|
loadPajaConfigFile,
|
|
108
109
|
mergePajaRawOptions,
|
|
109
110
|
normalizePajaLlmBaseUrl,
|
|
111
|
+
normalizePajaMultiplayer,
|
|
110
112
|
normalizePajaOptions,
|
|
111
113
|
normalizePajaSimulation,
|
|
112
114
|
parsePajaIntentLink,
|
|
@@ -1,4 +1,35 @@
|
|
|
1
1
|
import { NappletCspOptions } from '@kehto/shell';
|
|
2
|
+
import { CvmRegistryFamily } from '@kehto/services';
|
|
3
|
+
|
|
4
|
+
/** Host-owned static ICE configuration; credentials never enter napplet messages. */
|
|
5
|
+
interface PajaIceServer {
|
|
6
|
+
urls: string[];
|
|
7
|
+
username?: string;
|
|
8
|
+
credential?: string;
|
|
9
|
+
}
|
|
10
|
+
/** Explicit host interoperability settings; no provider or application is inferred from a URL. */
|
|
11
|
+
interface PajaMultiplayerConfig {
|
|
12
|
+
/** Documented Nostr signaling format, selected by the operator. */
|
|
13
|
+
profile: 'soy-rtc/1';
|
|
14
|
+
/** Relays used for signaling, independently of social relay routing. */
|
|
15
|
+
relays: string[];
|
|
16
|
+
/** Local family labels and verified tool hash pins for CVM providers. */
|
|
17
|
+
registry: CvmRegistryFamily[];
|
|
18
|
+
/** Optional operator-managed STUN/TURN endpoints and credentials. */
|
|
19
|
+
iceServers?: PajaIceServer[];
|
|
20
|
+
/** Shared namespace for unsigned local development targets only. Verified targets derive theirs from the signed event. */
|
|
21
|
+
developmentNamespace?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Validate a provider-neutral multiplayer configuration from a file or host settings.
|
|
25
|
+
* @param value - Parsed JSON; undefined means the host's default transport.
|
|
26
|
+
* @returns A detached, validated configuration, or undefined.
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* normalizePajaMultiplayer({ profile: 'soy-rtc/1', relays: ['wss://relay.example'], registry: [] });
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
declare function normalizePajaMultiplayer(value: unknown): PajaMultiplayerConfig | undefined;
|
|
2
33
|
|
|
3
34
|
/** JSON primitive accepted in Paja simulation config values. */
|
|
4
35
|
type JsonPrimitive = string | number | boolean | null;
|
|
@@ -12,6 +43,8 @@ type JsonRecord = Record<string, JsonValue>;
|
|
|
12
43
|
type PajaCapabilityDomain = 'shell' | 'gamepad' | 'relay' | 'outbox' | 'storage' | 'identity' | 'keys' | 'config' | 'resource' | 'theme' | 'notify' | 'media' | 'upload' | 'intent' | 'count' | 'link' | 'common' | 'lists' | 'serial' | 'ble' | 'webrtc' | 'dm' | 'fs' | 'cvm' | 'inc' | 'llm';
|
|
13
44
|
/** Raw simulation controls accepted from CLI args or JSON config. */
|
|
14
45
|
interface PajaSimulationRawOptions {
|
|
46
|
+
/** Optional shared CVM/WebRTC transport profile. */
|
|
47
|
+
readonly multiplayer?: PajaMultiplayerConfig;
|
|
15
48
|
/** Per-domain capability overrides. */
|
|
16
49
|
readonly capabilities?: {
|
|
17
50
|
readonly domains?: Partial<Record<PajaCapabilityDomain, boolean>>;
|
|
@@ -66,6 +99,8 @@ interface PajaSimulationRawOptions {
|
|
|
66
99
|
}
|
|
67
100
|
/** Fully normalized Paja simulation model served to the browser host. */
|
|
68
101
|
interface PajaSimulation {
|
|
102
|
+
/** Optional shared CVM/WebRTC transport profile. */
|
|
103
|
+
readonly multiplayer?: PajaMultiplayerConfig;
|
|
69
104
|
/** Capability domains and disabled-domain summary. */
|
|
70
105
|
readonly capabilities: {
|
|
71
106
|
readonly domains: Record<PajaCapabilityDomain, boolean>;
|
|
@@ -360,4 +395,4 @@ interface PajaServer {
|
|
|
360
395
|
*/
|
|
361
396
|
declare function startPajaServer(input: PajaServerOptions): Promise<PajaServer>;
|
|
362
397
|
|
|
363
|
-
export { type
|
|
398
|
+
export { type PajaSimulationRawOptions as A, type PajaTargetMode as B, type ReadinessFetch as C, DEFAULT_PAJA_AGGREGATE_HASH as D, createPajaHostConfig as E, createPajaRuntimeHostConfig as F, formatPajaUrl as G, normalizePajaMultiplayer as H, normalizePajaOptions as I, type JsonPrimitive as J, normalizePajaSimulation as K, summarizePajaSimulation as L, type PajaRawOptions as P, ReadinessError as R, type WaitForTargetUrlOptions as W, type PajaCommand as a, type PajaHostConfig as b, DEFAULT_PAJA_DTAG as c, DEFAULT_PAJA_HOST as d, DEFAULT_PAJA_PORT as e, DEFAULT_PAJA_RUNTIME_WAIT_MS as f, DEFAULT_PAJA_WINDOW_ID as g, DEFAULT_READY_TIMEOUT_MS as h, type JsonRecord as i, type JsonValue as j, PAJA_SIMULATION_DOMAINS as k, type PajaCapabilityDomain as l, type PajaExperimentalConfig as m, type PajaHmrStrategy as n, type PajaIceServer as o, type PajaMultiplayerConfig as p, type PajaNestedContextLockSetting as q, type PajaOptions as r, startPajaServer as s, PajaOptionsError as t, type PajaPointerRuntimeConfig as u, type PajaServer as v, waitForTargetUrl as w, type PajaServerOptions as x, type PajaSimulation as y, PajaSimulationError as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kehto/paja",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.36.0",
|
|
4
4
|
"description": "Paja local authoring workshop for hosting napplets in a real Kehto iframe during development",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@kehto/acl": "^0.20.6",
|
|
29
|
-
"@kehto/firewall": "^0.
|
|
29
|
+
"@kehto/firewall": "^0.10.0",
|
|
30
30
|
"@kehto/nip": "^0.8.0",
|
|
31
|
-
"@kehto/runtime": "^0.30.
|
|
32
|
-
"@kehto/
|
|
33
|
-
"@kehto/
|
|
31
|
+
"@kehto/runtime": "^0.30.1",
|
|
32
|
+
"@kehto/services": "^0.34.0",
|
|
33
|
+
"@kehto/shell": "^0.35.0",
|
|
34
34
|
"@kehto/wm": "^0.0.2",
|
|
35
35
|
"@kehto/rate-limit": "^0.2.0"
|
|
36
36
|
},
|