@ai-ecoverse/slicc-spectrum 1.108.1 → 1.108.3
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/README.md +6 -6
- package/dist/{chunk-XQHRTHDQ.js → chunk-BUSDBLS7.js} +8 -4
- package/dist/{chunk-XQHRTHDQ.js.map → chunk-BUSDBLS7.js.map} +2 -2
- package/dist/slicc-dummy.js +72 -7
- package/dist/slicc-dummy.js.map +2 -2
- package/dist/slicc-ui.js +35 -10
- package/dist/slicc-ui.js.map +3 -3
- package/dist/types/app/secrets.d.ts +2 -1
- package/dist/types/app/settings.d.ts +2 -0
- package/dist/types/dummy/notices.d.ts +1 -1
- package/dist/types/dummy/vault.d.ts +4 -3
- package/dist/types/dummy.d.ts +1 -1
- package/dist/types/model/types.d.ts +12 -1
- package/dist/types/model/values.d.ts +2 -1
- package/package.json +6 -6
package/dist/slicc-ui.js
CHANGED
|
@@ -63,10 +63,11 @@ import {
|
|
|
63
63
|
define
|
|
64
64
|
} from "./chunk-SQG7U2FN.js";
|
|
65
65
|
import {
|
|
66
|
+
isPolicyPaused,
|
|
66
67
|
isVaultFailure,
|
|
67
68
|
nameProblem,
|
|
68
69
|
valueProblem
|
|
69
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-BUSDBLS7.js";
|
|
70
71
|
import {
|
|
71
72
|
Emitter
|
|
72
73
|
} from "./chunk-T5NHW4KC.js";
|
|
@@ -34855,6 +34856,7 @@ function widening(change, devices) {
|
|
|
34855
34856
|
}
|
|
34856
34857
|
}
|
|
34857
34858
|
function failureText(error) {
|
|
34859
|
+
if (isPolicyPaused(error)) return "Secrets are paused until the missing policy file is back";
|
|
34858
34860
|
const text4 = isVaultFailure(error) ? codeTexts[error.code] : void 0;
|
|
34859
34861
|
return text4 ?? (error instanceof Error ? error.message : "The vault did not answer");
|
|
34860
34862
|
}
|
|
@@ -52469,8 +52471,7 @@ var SliccNotices = class extends ModelElement {
|
|
|
52469
52471
|
display: flex;
|
|
52470
52472
|
align-items: flex-start;
|
|
52471
52473
|
gap: var(--swc-spacing-75);
|
|
52472
|
-
color: var(--
|
|
52473
|
-
--swc-icon-color: var(--swc-negative-content-color-default);
|
|
52474
|
+
--swc-icon-color: var(--tone);
|
|
52474
52475
|
}
|
|
52475
52476
|
`;
|
|
52476
52477
|
#port;
|
|
@@ -52712,7 +52713,23 @@ var sessionTrust = {
|
|
|
52712
52713
|
};
|
|
52713
52714
|
var sessionProtocol = (protocol) => Object.hasOwn(sessionProtocols, protocol) ? sessionProtocols[protocol] : protocol;
|
|
52714
52715
|
var sessionTrusted = (verifiedBy) => verifiedBy && Object.hasOwn(sessionTrust, verifiedBy) ? `${sessionTrust[verifiedBy]}, ` : "";
|
|
52715
|
-
function
|
|
52716
|
+
function returned(entries) {
|
|
52717
|
+
const paused = /* @__PURE__ */ new Set();
|
|
52718
|
+
const back = /* @__PURE__ */ new Map();
|
|
52719
|
+
for (const entry of [...entries].reverse()) {
|
|
52720
|
+
if (entry.type !== "policy") continue;
|
|
52721
|
+
if (entry.absent) paused.add(entry.file);
|
|
52722
|
+
else if (entry.accepted && paused.delete(entry.file)) back.set(entry.seq, paused.size === 0);
|
|
52723
|
+
}
|
|
52724
|
+
return back;
|
|
52725
|
+
}
|
|
52726
|
+
function policyHead(entry, running2) {
|
|
52727
|
+
if (entry.absent) return "was removed. Secrets are paused until it\u2019s back.";
|
|
52728
|
+
if (running2 !== void 0)
|
|
52729
|
+
return running2 ? "is back. Secrets are running again." : "is back. Secrets stay paused until the other file is back.";
|
|
52730
|
+
return entry.accepted ? "changed" : "changed and was refused";
|
|
52731
|
+
}
|
|
52732
|
+
function auditLine(entry, devices, named2, back = /* @__PURE__ */ new Map()) {
|
|
52716
52733
|
switch (entry.type) {
|
|
52717
52734
|
case "inject":
|
|
52718
52735
|
case "forward":
|
|
@@ -52734,7 +52751,7 @@ function auditLine(entry, devices, named2) {
|
|
|
52734
52751
|
case "refresh":
|
|
52735
52752
|
return entry.grant ? b`Refreshed automatically with the sign-in <code>${entry.grant}</code>` : b`Refreshed automatically`;
|
|
52736
52753
|
default:
|
|
52737
|
-
return b`<code>${entry.file}</code> ${entry.
|
|
52754
|
+
return b`<code>${entry.file}</code> ${policyHead(entry, back.get(entry.seq))}${changes(entry, devices).map(([kind, line]) => b`<span class="change" data-change=${kind}>${line}</span>`)}${entry.warning ? b`<span class="warning" data-warning>${entry.warning}</span>` : A}${entry.accepted && !entry.absent && !back.has(entry.seq) ? b`<span class="hint" data-hint>If you didn’t mean this, change the file back with sudo.</span>` : A}`;
|
|
52738
52755
|
}
|
|
52739
52756
|
}
|
|
52740
52757
|
function merged(...pages2) {
|
|
@@ -53662,24 +53679,25 @@ var SliccSecrets = class extends ThemedElement {
|
|
|
53662
53679
|
if (this.#mine(vault)) this.unpinning = null;
|
|
53663
53680
|
}
|
|
53664
53681
|
}
|
|
53665
|
-
#entry(entry, devices, vault, all2 = []) {
|
|
53682
|
+
#entry(entry, devices, vault, all2 = [], back) {
|
|
53666
53683
|
const date = new Date(entry.at);
|
|
53667
53684
|
const name = entry.type === "policy" || entry.type === "endpoints" ? null : entry.name;
|
|
53668
53685
|
return b`<li data-seq=${entry.seq} data-type=${entry.type}>
|
|
53669
53686
|
<time datetime=${date.toISOString()} title=${date.toLocaleString("en-GB", { dateStyle: "medium", timeStyle: "short" })}>${since(entry.at)}</time>
|
|
53670
|
-
<span class="what">${name ? b`<code>${name}</code> · ` : A}${auditLine(entry, devices, (provider) => this.#provider(provider))}${entry.type === "policy" || entry.type === "refresh" || entry.type === "endpoints" ? A : b` <span class="by">by ${who(entry)}</span>`}${entry.type === "endpoints" && vault ? this.#unpin(vault, entry, all2) : A}</span>
|
|
53687
|
+
<span class="what">${name ? b`<code>${name}</code> · ` : A}${auditLine(entry, devices, (provider) => this.#provider(provider), back)}${entry.type === "policy" || entry.type === "refresh" || entry.type === "endpoints" ? A : b` <span class="by">by ${who(entry)}</span>`}${entry.type === "endpoints" && vault ? this.#unpin(vault, entry, all2) : A}</span>
|
|
53671
53688
|
</li>`;
|
|
53672
53689
|
}
|
|
53673
53690
|
#audit(vault, list6, entries, devices) {
|
|
53674
53691
|
const shown4 = this.reveals ? entries.filter((entry) => entry.type === "materialize") : entries;
|
|
53675
53692
|
const more = this.more ?? list6.auditMore;
|
|
53693
|
+
const back = returned(entries);
|
|
53676
53694
|
return b`<div class="audit-head">
|
|
53677
53695
|
<h3 id="secrets-audit">Activity</h3>
|
|
53678
53696
|
<sp-switch size="s" data-action="reveals" .checked=${this.reveals} @change=${(event2) => {
|
|
53679
53697
|
this.reveals = event2.target.checked;
|
|
53680
53698
|
}}>Only reveals to programs</sp-switch>
|
|
53681
53699
|
</div>
|
|
53682
|
-
${shown4.length ? b`<ol class="audit" aria-labelledby="secrets-audit">${shown4.map((entry) => this.#entry(entry, devices, vault, entries))}</ol>` : b`<p class="muted" data-audit-empty>${this.reveals ? more ? "No reveals in the activity loaded so far." : "No program has been given a secret." : "Nothing has used a secret yet."}</p>`}
|
|
53700
|
+
${shown4.length ? b`<ol class="audit" aria-labelledby="secrets-audit">${shown4.map((entry) => this.#entry(entry, devices, vault, entries, back))}</ol>` : b`<p class="muted" data-audit-empty>${this.reveals ? more ? "No reveals in the activity loaded so far." : "No program has been given a secret." : "Nothing has used a secret yet."}</p>`}
|
|
53683
53701
|
${more ? b`<div class="row"><swc-button size="s" variant="secondary" fill-style="outline" data-action="older" ?pending=${this.loading} @click=${() => this.showOlder(vault, entries)}>Show older</swc-button></div>` : A}`;
|
|
53684
53702
|
}
|
|
53685
53703
|
#feedback() {
|
|
@@ -53708,11 +53726,16 @@ var SliccSecrets = class extends ThemedElement {
|
|
|
53708
53726
|
</div>
|
|
53709
53727
|
</div>`;
|
|
53710
53728
|
}
|
|
53729
|
+
#paused(status2) {
|
|
53730
|
+
const [first2, ...rest] = (status2.policy ?? []).filter((file) => file.paused);
|
|
53731
|
+
if (!first2) return A;
|
|
53732
|
+
return b`<swc-status-light size="m" variant="notice" data-paused>Paused: <code>${first2.path}</code> ${rest.length ? `and ${rest.length} more are` : "is"} missing</swc-status-light>`;
|
|
53733
|
+
}
|
|
53711
53734
|
#header(vault, status2) {
|
|
53712
53735
|
if (!status2) return A;
|
|
53713
53736
|
if (this.#offline)
|
|
53714
53737
|
return b`<swc-status-light size="m" variant="neutral">Waiting</swc-status-light>`;
|
|
53715
|
-
return b`<swc-status-light size="m" variant=${status2.locked ? "notice" : "positive"}>${status2.locked ? "Locked" : "Unlocked"}</swc-status-light
|
|
53738
|
+
return b`<swc-status-light size="m" variant=${status2.locked ? "notice" : "positive"}>${status2.locked ? "Locked" : "Unlocked"}</swc-status-light>${this.#paused(status2)}<span class="muted">${lockModes[status2.lock]}</span>
|
|
53716
53739
|
<span class="controls">${status2.locked ? b`${status2.scrub?.needed && !status2.scrub.ready ? b`<span class="availability" role="status" data-availability="unlock"><swc-icon-info-circle size="s" aria-hidden="true"></swc-icon-info-circle><span>Unlock the vault to continue</span></span>` : A}${this.#button({ intent: { kind: "unlock" }, label: "Unlock", variant: "accent" }, "unlock")}` : b`${vault.lock ? b`<swc-button size="m" variant="secondary" fill-style="outline" data-action="lock" ?pending=${this.acting.has("lock")} @click=${() => this.lockVault(vault)}>Lock</swc-button>` : A}
|
|
53717
53740
|
${this.#button({ intent: { kind: "protect" }, label: status2.lock === "auto" ? "Protect with a passkey" : "Change protection" }, "protect")}`}</span>`;
|
|
53718
53741
|
}
|
|
@@ -53850,7 +53873,9 @@ function serverLeft(account, left) {
|
|
|
53850
53873
|
const url = left.some(([part2]) => part2 === "url");
|
|
53851
53874
|
const record = left.some(([part2]) => part2 === "record");
|
|
53852
53875
|
const held2 = account.auth === "oauth" ? "sign-in" : "token";
|
|
53853
|
-
const locked = left.some(
|
|
53876
|
+
const locked = left.some(
|
|
53877
|
+
([, error]) => isVaultFailure(error) && error.code === "EACCES" && !isPolicyPaused(error)
|
|
53878
|
+
);
|
|
53854
53879
|
const what = !url ? `its ${held2} stayed in the vault` : record ? `its ${held2} and URL stayed in the vault` : "the vault kept its URL";
|
|
53855
53880
|
const next = url ? locked ? "Unlock the vault, then add the server and remove it again." : "Add the server and remove it again." : locked ? "Unlock the vault, then remove it under Secrets." : "Open Secrets to remove it.";
|
|
53856
53881
|
return `${account.provider} is removed, but ${what}. ${next}`;
|