@kehto/paja 0.29.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.
- package/dist/browser-host.js +386 -17
- package/dist/browser-host.js.map +1 -1
- package/dist/{chunk-EROJQR3U.js → chunk-JVTK35QF.js} +33 -2
- package/dist/chunk-JVTK35QF.js.map +1 -0
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +8 -1
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/{server-CRv7mQBf.d.ts → server-bAe1oDUG.d.ts} +20 -7
- package/package.json +3 -3
- package/dist/chunk-EROJQR3U.js.map +0 -1
|
@@ -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",
|
|
@@ -598,6 +610,11 @@ function renderPajaHtml(config) {
|
|
|
598
610
|
.llm-connections { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
|
|
599
611
|
.llm-connection { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 4px; background: #0b0d0b; font-size: 11px; }
|
|
600
612
|
.llm-connection-label { min-width: 0; overflow-wrap: anywhere; color: var(--text); }
|
|
613
|
+
.llm-form label[hidden] { display: none; }
|
|
614
|
+
.llm-model-status:empty { display: none; }
|
|
615
|
+
.llm-model-status { margin: 0; min-height: 0; }
|
|
616
|
+
.llm-model-status[data-state="ready"] { color: #9fd08a; }
|
|
617
|
+
.llm-model-status[data-state="error"] { color: #e6a5a5; }
|
|
601
618
|
.llm-select-dialog select, .llm-vault-dialog input { width: 100%; min-width: 0; padding: 4px 8px; }
|
|
602
619
|
.llm-vault-dialog .config-error:empty { display: none; }
|
|
603
620
|
.signer { color: var(--muted); word-break: break-all; font-size: 12px; }
|
|
@@ -764,6 +781,18 @@ function renderPajaHtml(config) {
|
|
|
764
781
|
<div id="paja-resource-servers-status" role="status" aria-live="polite"></div>
|
|
765
782
|
</form>
|
|
766
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>
|
|
767
796
|
<details class="section" id="paja-section-llm" data-paja-section="llm" open>
|
|
768
797
|
<summary class="section-title">Language models<span class="section-chevron" aria-hidden="true">\u203A</span></summary><div class="section-body">
|
|
769
798
|
<ul class="llm-connections" id="paja-llm-connections" aria-label="Configured model connections"></ul>
|
|
@@ -771,7 +800,9 @@ function renderPajaHtml(config) {
|
|
|
771
800
|
<label>Provider<select id="paja-llm-preset" aria-label="Provider preset"></select></label>
|
|
772
801
|
<label>Name<input id="paja-llm-name" type="text" required maxlength="64" spellcheck="false"></label>
|
|
773
802
|
<label>API base URL<input id="paja-llm-base-url" type="url" required spellcheck="false" placeholder="API root; presets fill this in"></label>
|
|
774
|
-
<label>Model<input id="paja-llm-model" type="text" required maxlength="200" spellcheck="false" list="paja-llm-model-examples"><datalist id="paja-llm-model-examples"></datalist></label>
|
|
803
|
+
<label id="paja-llm-model-field">Model<input id="paja-llm-model" type="text" required maxlength="200" spellcheck="false" list="paja-llm-model-examples"><datalist id="paja-llm-model-examples"></datalist></label>
|
|
804
|
+
<label id="paja-llm-model-select-field" hidden>Model<select id="paja-llm-model-select" required aria-describedby="paja-llm-model-status"></select></label>
|
|
805
|
+
<p class="hint llm-model-status" id="paja-llm-model-status" role="status" aria-live="polite"></p>
|
|
775
806
|
<label>API key<input id="paja-llm-credential" type="password" autocomplete="off" spellcheck="false"></label>
|
|
776
807
|
<label class="llm-check"><input id="paja-llm-remember" type="checkbox"><span>Remember the key, encrypted with a vault password</span></label>
|
|
777
808
|
<label class="llm-check"><input id="paja-llm-images" type="checkbox"><span>Accepts image input</span></label>
|
|
@@ -2578,4 +2609,4 @@ export {
|
|
|
2578
2609
|
validatePajaLlmVaultPassword,
|
|
2579
2610
|
createPajaLlmVault
|
|
2580
2611
|
};
|
|
2581
|
-
//# sourceMappingURL=chunk-
|
|
2612
|
+
//# sourceMappingURL=chunk-JVTK35QF.js.map
|