@lifeaitools/clauth 1.30.5 → 1.30.6
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/cli/commands/serve.js +21 -10
- package/package.json +2 -2
package/cli/commands/serve.js
CHANGED
|
@@ -627,8 +627,9 @@ function dashboardHtml(port, whitelist, isStaged = false, initWriteToken = null)
|
|
|
627
627
|
.btn-reveal{background:#1e3a5f;color:#60a5fa}.btn-reveal:hover{background:#1e4a7f}
|
|
628
628
|
.btn-copy{background:#1a3328;color:#4ade80}.btn-copy:hover{background:#1a4338}
|
|
629
629
|
.btn-set{background:#2d1f4a;color:#a78bfa}.btn-set:hover{background:#3d2f5a}
|
|
630
|
-
.btn-save{background:#1e3a5f;color:#60a5fa;padding:6px 16px}.btn-save:hover{background:#1e4a7f}
|
|
631
|
-
.btn-
|
|
630
|
+
.btn-save{background:#1e3a5f;color:#60a5fa;padding:6px 16px}.btn-save:hover{background:#1e4a7f}
|
|
631
|
+
.btn-generate{background:#3b2f0d;color:#facc15;padding:6px 12px}.btn-generate:hover{background:#56420d}
|
|
632
|
+
.btn-cancel{background:transparent;color:#64748b;padding:6px 10px}.btn-cancel:hover{color:#94a3b8}
|
|
632
633
|
.btn-check{background:#0f2d2d;color:#34d399;border:1px solid #064e3b;padding:7px 16px;font-size:.85rem;border-radius:7px;cursor:pointer;font-weight:500;transition:all .15s}
|
|
633
634
|
.btn-check:hover{background:#134e4a;border-color:#34d399}.btn-check:disabled{opacity:.5;cursor:not-allowed}
|
|
634
635
|
.btn-enable{background:#14291a;color:#4ade80;border:1px solid #166534}.btn-enable:hover{background:#1a3d22;border-color:#4ade80}
|
|
@@ -1198,10 +1199,11 @@ function renderSetPanel(serviceOrName) {
|
|
|
1198
1199
|
return \`
|
|
1199
1200
|
<div class="set-panel" id="set-panel-\${id}">
|
|
1200
1201
|
<label>New value for <strong>\${displayName}</strong> — paste here, never in chat</label>
|
|
1201
|
-
<textarea class="set-input" id="set-input-\${id}" placeholder="\${htmlEscape(SERVICE_HINTS[name] || "Paste credential…")}" spellcheck="false"></textarea>
|
|
1202
|
-
\${SERVICE_HINTS[name] ? \`<div style="font-size:.72rem;color:#475569;margin-top:4px;font-family:'Courier New',monospace">\${htmlEscape(SERVICE_HINTS[name])}</div>\` : ""}
|
|
1203
|
-
<div class="set-foot">
|
|
1204
|
-
<button class="btn btn-
|
|
1202
|
+
<textarea class="set-input" id="set-input-\${id}" placeholder="\${htmlEscape(SERVICE_HINTS[name] || "Paste credential…")}" spellcheck="false"></textarea>
|
|
1203
|
+
\${SERVICE_HINTS[name] ? \`<div style="font-size:.72rem;color:#475569;margin-top:4px;font-family:'Courier New',monospace">\${htmlEscape(SERVICE_HINTS[name])}</div>\` : ""}
|
|
1204
|
+
<div class="set-foot">
|
|
1205
|
+
<button class="btn btn-generate" type="button" onclick='generateSecretKey(\${arg})'>Generate 32-byte key</button>
|
|
1206
|
+
<button class="btn btn-save" type="button" onclick='saveKey(\${arg})'>Save</button>
|
|
1205
1207
|
<button class="btn btn-cancel" type="button" onclick='toggleSet(\${arg})'>Cancel</button>
|
|
1206
1208
|
<span class="set-msg" id="set-msg-\${id}"></span>
|
|
1207
1209
|
</div>
|
|
@@ -2026,10 +2028,19 @@ function toggleSet(name) {
|
|
|
2026
2028
|
}
|
|
2027
2029
|
}
|
|
2028
2030
|
|
|
2029
|
-
function getServiceKeyType(name) {
|
|
2030
|
-
const svc = allServices.find(s => s.name === name);
|
|
2031
|
-
return String(svc?.key_type || "").toLowerCase();
|
|
2032
|
-
}
|
|
2031
|
+
function getServiceKeyType(name) {
|
|
2032
|
+
const svc = allServices.find(s => s.name === name);
|
|
2033
|
+
return String(svc?.key_type || "").toLowerCase();
|
|
2034
|
+
}
|
|
2035
|
+
|
|
2036
|
+
function generateSecretKey(name) {
|
|
2037
|
+
const input = document.getElementById("set-input-" + serviceDomId(name));
|
|
2038
|
+
if (!input) return;
|
|
2039
|
+
const bytes = crypto.getRandomValues(new Uint8Array(32));
|
|
2040
|
+
input.value = Array.from(bytes, byte => byte.toString(16).padStart(2, "0")).join("");
|
|
2041
|
+
input.focus();
|
|
2042
|
+
input.select();
|
|
2043
|
+
}
|
|
2033
2044
|
|
|
2034
2045
|
async function saveKey(name) {
|
|
2035
2046
|
const id = serviceDomId(name);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lifeaitools/clauth",
|
|
3
|
-
"version": "1.30.
|
|
3
|
+
"version": "1.30.6",
|
|
4
4
|
"description": "Hardware-bound credential vault for the LIFEAI infrastructure stack",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
10
|
"build": "bash scripts/build.sh",
|
|
11
|
-
"test": "node --test cli/commands/scrub.test.js cli/api.classify.test.js test/studio-debug.test.mjs && node test-auth-verdict.mjs",
|
|
11
|
+
"test": "node --test cli/commands/scrub.test.js cli/api.classify.test.js test/studio-debug.test.mjs test/dashboard-key-generator.test.mjs && node test-auth-verdict.mjs",
|
|
12
12
|
"test:studio-debug": "node --test test/studio-debug.test.mjs",
|
|
13
13
|
"test:agent-pool": "node test/agent-pool.test.mjs",
|
|
14
14
|
"test:call-agent-10": "node test/call-agent-10-skills.test.mjs",
|