@kehto/paja 0.35.3 → 0.37.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/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-B7uqpu8g.js';
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
@@ -9,7 +9,7 @@ import {
9
9
  startPajaServer,
10
10
  summarizePajaSimulation,
11
11
  waitForTargetUrl
12
- } from "./chunk-HTLBCTIN.js";
12
+ } from "./chunk-F3KNRWX7.js";
13
13
 
14
14
  // src/cli.ts
15
15
  import { spawn } from "child_process";
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { P as PajaRawOptions, b as PajaHostConfig } from './server-B7uqpu8g.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 PajaNestedContextLockSetting, p as PajaOptions, q as PajaOptionsError, r as PajaPointerRuntimeConfig, t as PajaServer, u as PajaServerOptions, v as PajaSimulation, x as PajaSimulationError, y as PajaSimulationRawOptions, z as PajaTargetMode, R as ReadinessError, A as ReadinessFetch, W as WaitForTargetUrlOptions, B as createPajaHostConfig, C as createPajaRuntimeHostConfig, E as formatPajaUrl, F as normalizePajaOptions, G as normalizePajaSimulation, s as startPajaServer, H as summarizePajaSimulation, w as waitForTargetUrl } from './server-B7uqpu8g.js';
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-HTLBCTIN.js";
63
+ } from "./chunk-F3KNRWX7.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 ReadinessFetch as A, createPajaHostConfig as B, createPajaRuntimeHostConfig as C, DEFAULT_PAJA_AGGREGATE_HASH as D, formatPajaUrl as E, normalizePajaOptions as F, normalizePajaSimulation as G, summarizePajaSimulation as H, type JsonPrimitive as J, 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 PajaNestedContextLockSetting as o, type PajaOptions as p, PajaOptionsError as q, type PajaPointerRuntimeConfig as r, startPajaServer as s, type PajaServer as t, type PajaServerOptions as u, type PajaSimulation as v, waitForTargetUrl as w, PajaSimulationError as x, type PajaSimulationRawOptions as y, type PajaTargetMode as z };
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.35.3",
3
+ "version": "0.37.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,13 +26,13 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "@kehto/acl": "^0.20.6",
29
+ "@kehto/firewall": "^0.10.0",
29
30
  "@kehto/nip": "^0.8.0",
30
- "@kehto/services": "^0.33.0",
31
- "@kehto/shell": "^0.34.0",
32
- "@kehto/runtime": "^0.30.0",
33
- "@kehto/firewall": "^0.9.0",
31
+ "@kehto/runtime": "^0.30.1",
32
+ "@kehto/services": "^0.34.0",
33
+ "@kehto/wm": "^0.0.2",
34
34
  "@kehto/rate-limit": "^0.2.0",
35
- "@kehto/wm": "^0.0.2"
35
+ "@kehto/shell": "^0.35.0"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "@napplet/core": ">=0.41.0 <0.42.0",