shadok-ai 0.19.52 → 0.19.53
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/package.json +1 -1
- package/public/index.html +4 -1
- package/public/profile-card.js +15 -0
package/package.json
CHANGED
package/public/index.html
CHANGED
|
@@ -4620,7 +4620,7 @@
|
|
|
4620
4620
|
profileBadges,
|
|
4621
4621
|
defaultAgentName,
|
|
4622
4622
|
hasReadonlyPreset,
|
|
4623
|
-
applyReadonlyPreset, isManagedProfile, profileSaveBody, secretUsers } from "/profile-card.js?v=__ASSET_V__";
|
|
4623
|
+
applyReadonlyPreset, isManagedProfile, profileSaveBody, secretUsers, secretDeleteConfirmText } from "/profile-card.js?v=__ASSET_V__";
|
|
4624
4624
|
import { secretsPanelMode, secretSections, keyGroups, shareTargets, auditLine, panelGroupOptions, publicWriteTarget, secretChipPick } from "/secrets-panel.js?v=__ASSET_V__";
|
|
4625
4625
|
import { notifyState, BLINK_MS } from "/notify.js?v=__ASSET_V__";
|
|
4626
4626
|
import { echoAuthor, isOwnPrompt } from "/echo-author.js?v=__ASSET_V__";
|
|
@@ -4720,6 +4720,7 @@
|
|
|
4720
4720
|
window.profileBadges = profileBadges;
|
|
4721
4721
|
window.defaultAgentName = defaultAgentName;
|
|
4722
4722
|
window.secretUsers = secretUsers;
|
|
4723
|
+
window.secretDeleteConfirmText = secretDeleteConfirmText;
|
|
4723
4724
|
window.secretsPanelMode = secretsPanelMode;
|
|
4724
4725
|
window.secretSections = secretSections;
|
|
4725
4726
|
window.panelGroupOptions = panelGroupOptions;
|
|
@@ -4877,6 +4878,7 @@
|
|
|
4877
4878
|
isManagedProfile: () => false,
|
|
4878
4879
|
profileSaveBody: (form) => ({ ...form }),
|
|
4879
4880
|
secretUsers: () => [],
|
|
4881
|
+
secretDeleteConfirmText: (name) => "Remove the secret " + name + " from the vault?",
|
|
4880
4882
|
// Before the module lands: the flat list (today's look) and no groups.
|
|
4881
4883
|
secretsPanelMode: () => "flat",
|
|
4882
4884
|
secretSections: () => ({ own: [], sharedIn: [], inheritedMain: [] }),
|
|
@@ -12874,6 +12876,7 @@
|
|
|
12874
12876
|
actionBtn("s-edit", "✎", "Replace this secret's value (its profiles are the chips below)", () =>
|
|
12875
12877
|
grouped ? startInlineEdit(li, sec) : startEditSecret(k, null)),
|
|
12876
12878
|
actionBtn("s-del", "✕", "Remove from vault", async () => {
|
|
12879
|
+
if (!confirm(window.secretDeleteConfirmText(k, users || []))) return;
|
|
12877
12880
|
// The row's OWNER group, not the panel's write target (see secretControls).
|
|
12878
12881
|
const g = grouped && sec.ownerGroup != null ? String(sec.ownerGroup) : secretWriteGroup();
|
|
12879
12882
|
const r = await fetch("/secrets?name=" + encodeURIComponent(k) + (g ? "&group=" + encodeURIComponent(g) : ""), { method: "DELETE" });
|
package/public/profile-card.js
CHANGED
|
@@ -228,3 +228,18 @@ export function secretUsers(profiles, name) {
|
|
|
228
228
|
.map((p) => p.name)
|
|
229
229
|
.sort();
|
|
230
230
|
}
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* What the vault asks before removing a secret. The vault is write-only, so a
|
|
234
|
+
* removed value cannot be read back from anywhere: one stray click on the row's
|
|
235
|
+
* ✕ used to delete it with no question at all. Naming the profiles that inject
|
|
236
|
+
* it says what actually breaks — their agents stop receiving it at the next
|
|
237
|
+
* spawn or reload.
|
|
238
|
+
*/
|
|
239
|
+
export function secretDeleteConfirmText(name, users) {
|
|
240
|
+
const list = Array.isArray(users) ? users.filter((u) => typeof u === "string" && u) : [];
|
|
241
|
+
const head = "Remove the secret " + name + " from the vault?\n\nIts value cannot be recovered afterwards.";
|
|
242
|
+
if (!list.length) return head;
|
|
243
|
+
return head + "\n\nAgents running " + (list.length === 1 ? "the profile " + list[0] : "these profiles: " + list.join(", ")) +
|
|
244
|
+
" will no longer receive it once they restart.";
|
|
245
|
+
}
|