feat: vault core/CLI/workbench, vaultd token path, filetree view-state cleanup

Land password-vault dedicated workbench and mnote-vault-core/CLI, agent token
read path design, vault transport split, and retire obsolete filetree smokes.
Ignore local vault reimport scripts that trip secret scanners.
This commit is contained in:
Agent Board
2026-07-24 11:36:06 +08:00
parent b798f628ee
commit bc6f8488ee
41 changed files with 13072 additions and 2316 deletions
@@ -90,6 +90,64 @@
background: #f7f7f6;
}
/* 顶栏(密文簿旁):插入已有密文 [Key];编辑态显示,滚动详情时仍可见 */
.mnote-vault-header-actions .mnote-vault-insert-cipher,
.mnote-vault-insert-cipher {
display: inline-flex;
align-items: center;
margin: 0;
}
.mnote-vault-insert-cipher[hidden] {
display: none !important;
}
.mnote-vault-insert-cipher select {
height: 30px;
min-width: 118px;
max-width: 180px;
padding: 0 8px;
border: 1px solid rgba(27, 28, 28, 0.12);
border-radius: 4px;
background: #ffffff;
color: #37352f;
font: inherit;
font-size: 12px;
line-height: 28px;
cursor: pointer;
}
.mnote-vault-insert-cipher select:hover {
background: #f7f7f6;
}
.mnote-vault-form-hint {
margin: 0 0 8px;
padding: 0 2px;
color: #8b8782;
font-size: 12px;
line-height: 18px;
}
.mnote-vault-form-hint code {
font-size: 11px;
padding: 0 3px;
border-radius: 3px;
background: rgba(27, 28, 28, 0.05);
}
.mnote-vault-sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
.mnote-vault-detail-actions button.is-danger {
color: #c93a32;
border-color: rgba(201, 58, 50, 0.28);
@@ -732,3 +790,296 @@
grid-template-columns: 1fr;
}
}
/* Multi-account / multi-secret collapsible groups */
.mnote-vault-section {
display: flex;
flex-direction: column;
gap: 8px;
margin: 4px 0 12px;
padding: 10px 12px;
border: 1px solid rgba(27, 28, 28, 0.08);
border-radius: 8px;
background: rgba(247, 247, 246, 0.55);
}
.mnote-vault-section-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
font-size: 12px;
font-weight: 600;
color: #37352f;
}
.mnote-vault-section-head > button {
height: 26px;
padding: 0 10px;
border: 1px solid rgba(27, 28, 28, 0.12);
border-radius: 4px;
background: #fff;
font: inherit;
font-size: 12px;
cursor: pointer;
}
.mnote-vault-section-head > button:hover {
background: #f7f7f6;
}
/* Multi-URL (equivalent site endpoints / fallbacks) */
.mnote-vault-url-hint {
margin: 0 0 4px;
font-size: 12px;
color: rgba(55, 53, 47, 0.55);
}
.mnote-vault-url-row {
display: grid;
grid-template-columns: 56px minmax(0, 1fr) 28px;
align-items: center;
gap: 8px;
}
.mnote-vault-url-label {
font-size: 12px;
color: rgba(55, 53, 47, 0.65);
white-space: nowrap;
}
.mnote-vault-url-row input[type="url"] {
width: 100%;
min-width: 0;
height: 32px;
padding: 0 10px;
border: 1px solid rgba(27, 28, 28, 0.12);
border-radius: 4px;
font: inherit;
font-size: 13px;
background: #fff;
}
.mnote-vault-url-row input[type="url"]:focus {
outline: 2px solid rgba(35, 131, 226, 0.35);
border-color: rgba(35, 131, 226, 0.55);
}
.mnote-vault-url-row > button {
height: 28px;
width: 28px;
padding: 0;
border: 1px solid rgba(27, 28, 28, 0.1);
border-radius: 4px;
background: #fff;
font: inherit;
cursor: pointer;
color: #9b2c2c;
}
.mnote-vault-url-row > button:hover {
background: #fdf2f2;
}
.mnote-vault-url-spacer {
display: block;
width: 28px;
height: 28px;
}
.mnote-vault-urls-view .mnote-vault-field-value a {
color: #2383e2;
word-break: break-all;
}
.mnote-vault-slot-group {
border: 1px solid rgba(27, 28, 28, 0.1);
border-radius: 6px;
background: #fff;
overflow: hidden;
}
.mnote-vault-slot-summary {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
padding: 8px 10px;
cursor: pointer;
list-style: none;
user-select: none;
}
.mnote-vault-slot-summary::-webkit-details-marker {
display: none;
}
.mnote-vault-slot-title {
font-size: 12px;
font-weight: 600;
color: #37352f;
}
.mnote-vault-slot-actions {
display: inline-flex;
gap: 6px;
}
.mnote-vault-slot-actions button {
height: 24px;
padding: 0 8px;
border: 1px solid rgba(27, 28, 28, 0.12);
border-radius: 4px;
background: #fff;
font: inherit;
font-size: 11px;
cursor: pointer;
}
.mnote-vault-slot-actions button.is-danger {
color: #c93a32;
border-color: rgba(201, 58, 50, 0.28);
}
.mnote-vault-slot-body {
display: flex;
flex-direction: column;
gap: 6px;
padding: 0 10px 10px;
border-top: 1px solid rgba(27, 28, 28, 0.06);
}
.mnote-vault-slot-empty {
font-size: 12px;
padding: 4px 2px 2px;
}
/* Nested appendix secrets under each account (default collapsed) */
.mnote-vault-account-secrets {
margin-top: 8px;
padding: 8px 8px 6px;
border: 1px dashed rgba(27, 28, 28, 0.12);
border-radius: 6px;
background: #fafaf9;
display: flex;
flex-direction: column;
gap: 8px;
}
.mnote-vault-account-secrets.is-collapsed {
gap: 0;
padding-bottom: 6px;
}
.mnote-vault-account-secrets-body {
display: flex;
flex-direction: column;
gap: 8px;
}
.mnote-vault-account-secrets-body[hidden] {
display: none !important;
}
.mnote-vault-account-secrets-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
font-size: 11px;
font-weight: 600;
color: #6d6a65;
letter-spacing: 0.02em;
}
.mnote-vault-secrets-toggle {
display: inline-flex;
align-items: center;
gap: 6px;
margin: 0;
padding: 2px 4px;
border: none;
background: transparent;
font: inherit;
font-size: 11px;
font-weight: 600;
color: #6d6a65;
cursor: pointer;
text-align: left;
}
.mnote-vault-secrets-toggle:hover {
color: #37352f;
}
.mnote-vault-secrets-chevron {
display: inline-block;
width: 1em;
font-size: 9px;
line-height: 1;
color: #9b9a97;
}
.mnote-vault-secrets-count {
font-weight: 500;
color: #9b9a97;
}
.mnote-vault-account-secrets-head button:not(.mnote-vault-secrets-toggle) {
height: 24px;
padding: 0 8px;
border: 1px solid rgba(27, 28, 28, 0.12);
border-radius: 4px;
background: #fff;
font: inherit;
font-size: 11px;
cursor: pointer;
}
.mnote-vault-account-secrets-empty {
font-size: 12px;
padding: 2px 0;
}
.mnote-vault-nested-secret {
border: 1px solid rgba(27, 28, 28, 0.08);
border-radius: 5px;
background: #fff;
padding: 8px;
display: flex;
flex-direction: column;
gap: 6px;
}
.mnote-vault-nested-secret-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
}
.mnote-vault-nested-secret-title {
font-size: 12px;
font-weight: 600;
color: #37352f;
}
.mnote-vault-nested-secret-head button.is-danger {
height: 24px;
padding: 0 8px;
border: 1px solid rgba(201, 58, 50, 0.28);
border-radius: 4px;
background: #fff;
color: #c93a32;
font: inherit;
font-size: 11px;
cursor: pointer;
}
/* Cipher book plain input (visible while typing) */
.mnote-vault-cipher-add input.mnote-vault-secret-input-plain,
.mnote-vault-cipher-add input[type="text"] {
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}