@kehto/paja 0.30.0 → 0.31.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.
@@ -275,6 +275,7 @@ function mergePajaRawOptions(base, override) {
275
275
  port: override.port ?? base.port,
276
276
  readyTimeoutMs: override.readyTimeoutMs ?? base.readyTimeoutMs,
277
277
  configPath: override.configPath ?? base.configPath,
278
+ experimental: override.experimental ?? base.experimental,
278
279
  simulation: mergeSimulationOptions(base.simulation, override.simulation)
279
280
  };
280
281
  }
@@ -331,6 +332,13 @@ var DEFAULT_PAJA_WINDOW_ID = "kehto-paja-window";
331
332
  var DEFAULT_PAJA_DTAG = "dev-target";
332
333
  var DEFAULT_PAJA_AGGREGATE_HASH = "paja";
333
334
  var DEFAULT_PAJA_RUNTIME_WAIT_MS = 5e3;
335
+ function normalizePajaExperimental(raw) {
336
+ const setting = raw?.nestedContextLock ?? "auto";
337
+ if (setting !== "on" && setting !== "off" && setting !== "auto") {
338
+ throw new Error(`experimental.nestedContextLock must be "on", "off", or "auto"; got ${String(setting)}`);
339
+ }
340
+ return { nestedContextLock: setting };
341
+ }
334
342
  function normalizePajaOptions(raw) {
335
343
  const targetUrl = normalizeTargetUrl(raw.targetUrl);
336
344
  const host = normalizeHost(raw.host);
@@ -342,6 +350,7 @@ function normalizePajaOptions(raw) {
342
350
  const command = normalizeCommand(raw.command);
343
351
  const configPath = raw.configPath?.trim();
344
352
  const simulation = normalizePajaSimulation(raw.simulation);
353
+ const experimental = normalizePajaExperimental(raw.experimental);
345
354
  return {
346
355
  targetUrl,
347
356
  command,
@@ -350,6 +359,7 @@ function normalizePajaOptions(raw) {
350
359
  readyTimeoutMs,
351
360
  configPath: configPath && configPath.length > 0 ? configPath : void 0,
352
361
  simulation,
362
+ experimental,
353
363
  mode: command ? "managed-command" : "external-target"
354
364
  };
355
365
  }
@@ -357,6 +367,7 @@ function createPajaHostConfig(options, now = /* @__PURE__ */ new Date()) {
357
367
  const base = createPajaHostConfigBase(options.simulation);
358
368
  return {
359
369
  ...base,
370
+ ...options.experimental ? { experimental: options.experimental } : {},
360
371
  target: {
361
372
  mode: "iframe-url",
362
373
  url: options.targetUrl,
@@ -378,6 +389,7 @@ function createPajaRuntimeHostConfig(options = {}, now = /* @__PURE__ */ new Dat
378
389
  return {
379
390
  ...base,
380
391
  ...options.csp ? { csp: options.csp } : {},
392
+ ...options.experimental ? { experimental: options.experimental } : {},
381
393
  target: {
382
394
  mode: "runtime-pointer",
383
395
  url: "about:blank",
@@ -769,6 +781,18 @@ function renderPajaHtml(config) {
769
781
  <div id="paja-resource-servers-status" role="status" aria-live="polite"></div>
770
782
  </form>
771
783
  </div></details>
784
+ <details class="section" id="paja-section-security" data-paja-section="security" open>
785
+ <summary class="section-title">Security<span class="section-chevron" aria-hidden="true">\u203A</span></summary><div class="section-body">
786
+ <label class="section-title" for="paja-nested-context-lock">Frame-creation lock (experimental)</label>
787
+ <select id="paja-nested-context-lock" aria-describedby="paja-nested-context-lock-help paja-nested-context-lock-status">
788
+ <option value="">Host default</option>
789
+ <option value="auto">Auto (lock private-data napplets)</option>
790
+ <option value="on">On (lock every napplet)</option>
791
+ <option value="off">Off</option>
792
+ </select>
793
+ <small id="paja-nested-context-lock-help">Stops a napplet creating an iframe. Auto locks napplets granted a private domain (e.g. DM). Applies on the next napplet load. Turning it off for a private-data napplet lowers exfiltration protection.</small>
794
+ <div id="paja-nested-context-lock-status" role="status" aria-live="polite"></div>
795
+ </div></details>
772
796
  <details class="section" id="paja-section-llm" data-paja-section="llm" open>
773
797
  <summary class="section-title">Language models<span class="section-chevron" aria-hidden="true">\u203A</span></summary><div class="section-body">
774
798
  <ul class="llm-connections" id="paja-llm-connections" aria-label="Configured model connections"></ul>
@@ -2585,4 +2609,4 @@ export {
2585
2609
  validatePajaLlmVaultPassword,
2586
2610
  createPajaLlmVault
2587
2611
  };
2588
- //# sourceMappingURL=chunk-4GUFJFK7.js.map
2612
+ //# sourceMappingURL=chunk-JVTK35QF.js.map