@jayyuen66/dsh-dir-prep-organize 0.1.16 → 0.1.18

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.
@@ -0,0 +1,71 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1180" height="720" viewBox="0 0 1180 720" xml:lang="zh-CN" role="img" aria-labelledby="dsh-title" aria-describedby="dsh-desc" font-family="Inter, system-ui, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans CJK SC', sans-serif" font-size="13">
2
+ <title id="dsh-title">DSH 插件 · 双路径 — 润色调模型,模板零模型调用</title>
3
+ <desc id="dsh-desc">两条路径都从输入框组件发起,都经宿主受保护动作写回。</desc>
4
+ <defs>
5
+ <linearGradient id="dsh-bg" x2="100%" y2="100%"><stop offset="0" stop-color="#0b1218"/><stop offset="1" stop-color="#080d12"/></linearGradient>
6
+ <radialGradient id="dsh-glow-cyan"><stop offset="0" stop-color="#56c2f0" stop-opacity=".22"/><stop offset="1" stop-color="#56c2f0" stop-opacity="0"/></radialGradient>
7
+ <radialGradient id="dsh-glow-violet"><stop offset="0" stop-color="#8a91ff" stop-opacity=".14"/><stop offset="1" stop-color="#8a91ff" stop-opacity="0"/></radialGradient>
8
+ <pattern id="dsh-grid" width="34" height="34" patternUnits="userSpaceOnUse"><path d="M.5 34V.5H34" fill="none" stroke="#fff" stroke-opacity=".05"/></pattern>
9
+ <linearGradient id="dsh-rule"><stop offset="0" stop-color="#56c2f0" stop-opacity=".55"/><stop offset=".5" stop-color="#8a91ff" stop-opacity=".55"/><stop offset="1" stop-color="#56c2f0" stop-opacity=".55"/></linearGradient>
10
+ <linearGradient id="dsh-accent"><stop offset="0" stop-color="#56c2f0"/><stop offset="1" stop-color="#8a91ff"/></linearGradient>
11
+ <linearGradient id="dsh-badge"><stop offset="0" stop-color="#56c2f0" stop-opacity=".16"/><stop offset="1" stop-color="#8a91ff" stop-opacity=".10"/></linearGradient>
12
+ <linearGradient id="dsh-tile" x2="100%" y2="100%"><stop offset="0" stop-color="#56c2f0" stop-opacity=".20"/><stop offset="1" stop-color="#2a7fc0" stop-opacity=".24"/></linearGradient>
13
+ <linearGradient id="dsh-number" x2="0%" y2="100%"><stop offset="0" stop-color="#56c2f0"/><stop offset="1" stop-color="#2a7fc0"/></linearGradient>
14
+ <g id="dsh-step-mark"><circle cx="24" cy="24" r="12" fill="url(#dsh-number)" fill-opacity=".92"/><g fill="#56c2f0" fill-opacity=".8"><circle cx="14" cy="54" r="2.2"/><circle cx="14" cy="76" r="2.2"/><circle cx="14" cy="98" r="2.2"/></g></g>
15
+ <path id="dsh-arrow" d="M0 -1H7V-4L14 0 7 4V1H0Z" fill="#56c2f0" fill-opacity=".85"/>
16
+ </defs>
17
+ <style>
18
+ .dsh-panel { fill:#fff; fill-opacity:.045; stroke:#fff; stroke-opacity:.10 }
19
+ .dsh-card { fill:#fff; fill-opacity:.03; stroke:#fff; stroke-opacity:.07 }
20
+ .dsh-joint { fill:#fff; fill-opacity:.03; stroke:#56c2f0; stroke-opacity:.45; stroke-width:1.1 }
21
+ .dsh-heading { fill:#f2f5fb; font-weight:700 } .dsh-label { fill:#56c2f0; font-weight:700 }
22
+ .dsh-copy { fill:#d6deec; fill-opacity:.82 } .dsh-muted { fill:#94a0b6; fill-opacity:.85 }
23
+ .dsh-n { fill:#0b0d12; text-anchor:middle; font-size:13.5px; font-weight:700 }
24
+ .dsh-icon { fill:none; stroke:#56c2f0; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round }
25
+ </style>
26
+ <rect width="1180" height="720" fill="url(#dsh-bg)"/>
27
+ <circle cx="1014.8" cy="0" r="330" fill="url(#dsh-glow-cyan)"/><circle cx="0" cy="720" r="300" fill="url(#dsh-glow-violet)"/>
28
+ <rect width="1180" height="720" fill="url(#dsh-grid)"/><rect width="1180" height="3" fill="url(#dsh-rule)" opacity=".9"/>
29
+ <text x="56" y="48" font-size="12.5" font-weight="700" fill="url(#dsh-accent)">DSH 插件 · 双路径</text>
30
+ <text x="56" y="86" font-size="31" class="dsh-heading">润色调模型,模板零模型调用</text>
31
+ <text x="56" y="120" font-size="15" class="dsh-muted">两条路径都从输入框组件发起,都经宿主受保护动作写回。</text>
32
+ <rect x="944" y="45" width="112" height="30" rx="15" fill="url(#dsh-badge)" stroke="#56c2f0" stroke-opacity=".4"/><circle cx="960" cy="60" r="3.5" fill="#56c2f0"/><text x="972" y="64.5" class="dsh-label" font-size="12.5">受保护写回</text>
33
+ <rect x="1072" y="34" width="52" height="52" rx="16" fill="url(#dsh-tile)" stroke="#56c2f0" stroke-opacity=".28"/><path class="dsh-icon" transform="translate(1086 48)" d="M15 4l5 5L7 22l-5-5z M14 7l3 3 M9 2h2 M19 12h2 M2 9h2"/>
34
+ <g transform="translate(56 146)">
35
+ <rect width="1068" height="208" rx="18" class="dsh-panel"/><text x="24" y="30" class="dsh-label">润色路径 —— 调用模型</text>
36
+ <rect x="24" y="44" width="188" height="120" rx="12" class="dsh-card"/><rect x="232" y="44" width="188" height="120" rx="12" class="dsh-card"/><rect x="440" y="44" width="188" height="120" rx="12" class="dsh-card"/>
37
+ <rect x="648" y="44" width="396" height="120" rx="12" class="dsh-joint"/><path d="M846 58v92" fill="none" stroke="#56c2f0" stroke-opacity=".24"/>
38
+ <use xlink:href="#dsh-arrow" x="215" y="104"/><use xlink:href="#dsh-arrow" x="423" y="104"/><use xlink:href="#dsh-arrow" x="631" y="104"/>
39
+ <g transform="translate(24 44)"><use xlink:href="#dsh-step-mark"/><text x="24" y="29" class="dsh-n">1</text><text x="44" y="29" class="dsh-heading" font-size="14">发起</text>
40
+ <text class="dsh-copy"><tspan x="28" y="58">writeBack.begin() 凭据</tspan><tspan x="28" y="80">inFlight 引用 + seq 世代</tspan><tspan x="28" y="102">空草稿拒绝发起</tspan></text></g>
41
+ <g transform="translate(232 44)"><use xlink:href="#dsh-step-mark"/><text x="24" y="29" class="dsh-n">2</text><text x="44" y="29" class="dsh-heading" font-size="14">组装</text>
42
+ <text class="dsh-copy"><tspan x="28" y="58">草稿 + 会话目录顶层</tspan><tspan x="28" y="80">真实用户/模型对话轮</tspan><tspan x="28" y="102">会话活目录 cwd</tspan></text></g>
43
+ <g transform="translate(440 44)"><use xlink:href="#dsh-step-mark"/><text x="24" y="29" class="dsh-n">3</text><text x="44" y="29" class="dsh-heading" font-size="14">调模型</text>
44
+ <text class="dsh-copy"><tspan x="28" y="58">request-only 单条 user</tspan><tspan x="28" y="80">system 仅规则 + cwd</tspan><tspan x="28" y="102">流式聚合;finish=stop</tspan></text></g>
45
+ <g transform="translate(648 44)"><use xlink:href="#dsh-step-mark"/><text x="24" y="29" class="dsh-n">4</text><text x="44" y="29" class="dsh-heading" font-size="14">写回</text>
46
+ <text class="dsh-copy"><tspan x="28" y="58">复核凭据 + draftRev</tspan><tspan x="28" y="80">phase 必须是 plain</tspan><tspan x="28" y="102">setDraft 原子写入</tspan></text></g>
47
+ <g transform="translate(856 44)"><use xlink:href="#dsh-step-mark"/><text x="24" y="29" class="dsh-n">5</text><text x="44" y="29" class="dsh-heading" font-size="14">过期检查</text>
48
+ <text class="dsh-copy"><tspan x="28" y="58">与写回同一次调用</tspan><tspan x="28" y="80">输入已变化 → 丢弃</tspan><tspan x="28" y="102">按钮错误态闪 4 秒</tspan></text></g>
49
+ <text x="24" y="191" class="dsh-muted">超时为 organizeTimeoutMs 加客户端 5 秒余量;失败或过期的结果不会进入草稿。</text>
50
+ </g>
51
+ <g transform="translate(56 368)">
52
+ <rect width="1068" height="208" rx="18" class="dsh-panel"/><text x="24" y="30" class="dsh-label">模板路径 —— 不调模型</text>
53
+ <rect x="948" y="14" width="96" height="24" rx="12" fill="url(#dsh-badge)" stroke="#4ed17e" stroke-opacity=".35"/><text x="996" y="30" text-anchor="middle" font-size="12" font-weight="700" fill="#4ed17e">零模型调用</text>
54
+ <rect x="24" y="44" width="240" height="120" rx="12" class="dsh-card"/><rect x="284" y="44" width="240" height="120" rx="12" class="dsh-card"/><rect x="544" y="44" width="240" height="120" rx="12" class="dsh-card"/><rect x="804" y="44" width="240" height="120" rx="12" class="dsh-card"/>
55
+ <use xlink:href="#dsh-arrow" x="267" y="104"/><use xlink:href="#dsh-arrow" x="527" y="104"/><use xlink:href="#dsh-arrow" x="787" y="104"/>
56
+ <g transform="translate(24 44)"><use xlink:href="#dsh-step-mark"/><text x="24" y="29" class="dsh-n">1</text><text x="44" y="29" class="dsh-heading" font-size="14">选模板</text>
57
+ <text class="dsh-copy"><tspan x="28" y="58">分组下拉</tspan><tspan x="28" y="80">悬停显示说明</tspan><tspan x="28" y="102">已保存库或内置集</tspan></text></g>
58
+ <g transform="translate(284 44)"><use xlink:href="#dsh-step-mark"/><text x="24" y="29" class="dsh-n">2</text><text x="44" y="29" class="dsh-heading" font-size="14">捕获光标</text>
59
+ <text class="dsh-copy"><tspan x="28" y="58">captureInsertion() 选区</tspan><tspan x="28" y="80">记录选区 + draftRev</tspan><tspan x="28" y="102">生成插入凭据</tspan></text></g>
60
+ <g transform="translate(544 44)"><use xlink:href="#dsh-step-mark"/><text x="24" y="29" class="dsh-n">3</text><text x="44" y="29" class="dsh-heading" font-size="14">插入</text>
61
+ <text class="dsh-copy"><tspan x="28" y="58">insertText(text, span)</tspan><tspan x="28" y="80">宿主校验版本</tspan><tspan x="28" y="102">失效 → 静默拒绝</tspan></text></g>
62
+ <g transform="translate(804 44)"><use xlink:href="#dsh-step-mark"/><text x="24" y="29" class="dsh-n">4</text><text x="44" y="29" class="dsh-heading" font-size="14">完成</text>
63
+ <text class="dsh-copy"><tspan x="28" y="58">引用块与附件原样</tspan><tspan x="28" y="80">不回落整稿替换</tspan><tspan x="28" y="102">仅撰写期可用</tspan></text></g>
64
+ <text x="24" y="191" class="dsh-muted">插入凭据由宿主输入框在插入那一刻校验;过期凭据被拒绝,且不会整稿替换。</text>
65
+ </g>
66
+ <rect x="56" y="590" width="1068" height="44" rx="12" class="dsh-card"/>
67
+ <rect x="68" y="598" width="28" height="28" rx="8" fill="url(#dsh-tile)" stroke="#56c2f0" stroke-opacity=".28"/><path class="dsh-icon" transform="translate(74.5 604.5) scale(.625)" d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z M9 12l2 2 4-4"/>
68
+ <text x="108" y="617" class="dsh-copy">共同边界:两条路径都终止于宿主受保护动作 —— 无插件 HTTP 路由、无直接 DOM 写入。</text>
69
+ <rect x="56" y="648" width="1068" height="48" rx="14" class="dsh-card"/><rect x="68" y="658" width="3" height="28" rx="1.5" fill="url(#dsh-accent)"/>
70
+ <text x="80" y="677" font-size="13.5" class="dsh-copy">不注册模型工具、无自有 HTTP 路由;角色库是上游 MIT 的 vendored 数据,不手改;内置精选模板由同一库经代码生成产出。</text>
71
+ </svg>
@@ -0,0 +1,66 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1180" height="720" viewBox="0 0 1180 720" preserveAspectRatio="xMidYMid meet" class="dsh-tc" role="img" aria-labelledby="dsh-tc-title" aria-describedby="dsh-tc-desc" xml:lang="en">
2
+ <title id="dsh-tc-title">DSH PLUGIN · ROLE LIBRARY SETTINGS: templates and allowed roots</title>
3
+ <desc id="dsh-tc-desc">The settings card has one role-library section: the toolbar holds Add template and Restore defaults; each template row has emoji, name, group and delete, then description and body, with name and body required. An empty import path imports the bundled agents library top level plus one sub-directory; explicit paths must sit inside an allowed root, and results merge into the draft. Import allowed directories register absolute paths; relative paths and tilde are dropped. Every change stays in the local draft until Save; an empty template list falls back to the built-in curated set.</desc>
4
+ <defs>
5
+ <linearGradient id="dsh-tc-bg" x2="100%" y2="100%"><stop offset="0%" stop-color="#0b1218"/><stop offset="100%" stop-color="#080d12"/></linearGradient>
6
+ <linearGradient id="dsh-tc-accent"><stop offset="0%" stop-color="#56c2f0"/><stop offset="100%" stop-color="#8a91ff"/></linearGradient>
7
+ <linearGradient id="dsh-tc-tile" x2="100%" y2="100%"><stop offset="0%" stop-color="#56c2f0" stop-opacity=".20"/><stop offset="100%" stop-color="#2a7fc0" stop-opacity=".24"/></linearGradient>
8
+ <linearGradient id="dsh-tc-chip"><stop offset="0%" stop-color="#56c2f0" stop-opacity=".16"/><stop offset="100%" stop-color="#8a91ff" stop-opacity=".10"/></linearGradient>
9
+ <radialGradient id="dsh-tc-glow-cyan"><stop offset="0%" stop-color="#56c2f0" stop-opacity=".22"/><stop offset="100%" stop-color="#56c2f0" stop-opacity="0"/></radialGradient>
10
+ <radialGradient id="dsh-tc-glow-violet"><stop offset="0%" stop-color="#8a91ff" stop-opacity=".14"/><stop offset="100%" stop-color="#8a91ff" stop-opacity="0"/></radialGradient>
11
+ <pattern id="dsh-tc-grid" width="34" height="34" patternUnits="userSpaceOnUse"><path d="M0.5 34V0.5H34" fill="none" stroke="#ffffff" stroke-opacity=".05"/></pattern>
12
+ <clipPath id="dsh-tc-canvas"><rect width="1180" height="720"/></clipPath>
13
+ <symbol id="dsh-tc-sliders" viewBox="0 0 24 24"><path d="M4 3v7m0 4v7M12 3v5m0 4v9M20 3v9m0 4v5"/><rect x="1.5" y="10" width="5" height="4" rx="1"/><rect x="9.5" y="8" width="5" height="4" rx="1"/><rect x="17.5" y="12" width="5" height="4" rx="1"/></symbol>
14
+ <symbol id="dsh-tc-plus" viewBox="0 0 24 24"><path d="M12 5v14M5 12h14"/></symbol>
15
+ <symbol id="dsh-tc-undo" viewBox="0 0 24 24"><path d="M9 14 4 9l5-5M4 9h10a6 6 0 0 1 0 12h-3"/></symbol>
16
+ <symbol id="dsh-tc-trash" viewBox="0 0 24 24"><path d="M3 6h18M8 6V4h8v2M6 6l1 15h10l1-15"/></symbol>
17
+ <symbol id="dsh-tc-folder" viewBox="0 0 24 24"><path d="M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z"/></symbol>
18
+ <symbol id="dsh-tc-import" viewBox="0 0 24 24"><path d="M12 3v12M7 10l5 5 5-5M4 19h16"/></symbol>
19
+ <symbol id="dsh-tc-save" viewBox="0 0 24 24"><path d="M5 3h11l3 3v15H5ZM8 3v6h8V3M8 21v-7h8v7"/></symbol>
20
+ </defs>
21
+ <style>
22
+ .dsh-tc text{font-family:Inter,'Segoe UI',Arial,'DejaVu Sans',sans-serif}
23
+ .dsh-tc .tc-title{font-size:31px;font-weight:700;fill:#f2f5fb} .dsh-tc .tc-brand{font-size:13px;font-weight:700;fill:url(#dsh-tc-accent)} .dsh-tc .tc-sub{font-size:15px;fill:#94a0b6}
24
+ .dsh-tc .tc-section{font-size:16px;font-weight:700;fill:#f2f5fb} .dsh-tc .tc-section-sm{font-size:13.5px}
25
+ .dsh-tc .tc-body{font-size:12.5px;fill:#d6deec;fill-opacity:.82} .dsh-tc .tc-note{font-size:11.5px;fill:#94a0b6;fill-opacity:.85}
26
+ .dsh-tc .tc-label{font-size:11.5px;font-weight:700;fill:#56c2f0} .dsh-tc .tc-badge{font-size:12.5px;font-weight:700;fill:#56c2f0} .dsh-tc .tc-emoji{font-size:11.5px;fill:#56c2f0}
27
+ .dsh-tc .tc-mono{font-family:ui-monospace,Menlo,Consolas,'DejaVu Sans Mono',monospace;font-size:12px;fill:#56c2f0}
28
+ .dsh-tc .tc-panel{fill:#ffffff;fill-opacity:.045;stroke:#ffffff;stroke-opacity:.10} .dsh-tc .tc-field{fill:#ffffff;fill-opacity:.03;stroke:#ffffff;stroke-opacity:.07}
29
+ .dsh-tc .tc-input{fill:#ffffff;fill-opacity:.03;stroke:#ffffff;stroke-opacity:.09} .dsh-tc .tc-inset{fill:#0b0d12;stroke:#ffffff;stroke-opacity:.10} .dsh-tc .tc-rule{fill:none;stroke:#ffffff;stroke-opacity:.10}
30
+ .dsh-tc .tc-tile{fill:url(#dsh-tc-tile);stroke:#56c2f0;stroke-opacity:.28} .dsh-tc .tc-icon{fill:none;stroke:#56c2f0;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
31
+ .dsh-tc .tc-btn{fill:url(#dsh-tc-chip);stroke:#56c2f0;stroke-opacity:.35} .dsh-tc .tc-warn{fill:#8a91ff;fill-opacity:.10;stroke:#8a91ff;stroke-opacity:.36} .dsh-tc .tc-body.tc-warn-text{fill:#8a91ff;fill-opacity:1}
32
+ </style>
33
+ <g clip-path="url(#dsh-tc-canvas)"><rect width="1180" height="720" fill="url(#dsh-tc-bg)"/><circle cx="1015" cy="0" r="330" fill="url(#dsh-tc-glow-cyan)"/><circle cx="0" cy="720" r="300" fill="url(#dsh-tc-glow-violet)"/><rect width="1180" height="720" fill="url(#dsh-tc-grid)"/><rect width="1180" height="3" fill="url(#dsh-tc-accent)"/></g>
34
+ <text x="56" y="43" class="tc-brand">DSH PLUGIN · ROLE LIBRARY SETTINGS</text><text x="56" y="81" class="tc-title">One card, two editable lists</text>
35
+ <text x="56" y="112" class="tc-sub">Templates and allowed roots stay local until Save; an empty template list falls back to the built-in curated set.</text>
36
+ <rect x="946" y="42" width="110" height="30" rx="15" class="tc-btn"/><circle cx="962" cy="57" r="3.5" fill="#56c2f0"/><text x="974" y="61.5" class="tc-badge">local draft</text>
37
+ <rect x="1072" y="31" width="52" height="52" rx="16" class="tc-tile"/><use href="#dsh-tc-sliders" xlink:href="#dsh-tc-sliders" x="1086" y="45" width="24" height="24" class="tc-icon"/>
38
+ <rect x="56" y="144" width="700" height="510" rx="18" class="tc-panel"/><text x="76" y="177" class="tc-section">Role library</text><text x="190" y="176" class="tc-note">N items · live count</text>
39
+ <rect x="434" y="155" width="134" height="32" rx="9" class="tc-btn"/><use href="#dsh-tc-plus" xlink:href="#dsh-tc-plus" x="447" y="162" width="18" height="18" class="tc-icon"/><text x="471" y="175" class="tc-body">Add template</text>
40
+ <rect x="578" y="155" width="158" height="32" rx="9" class="tc-btn"/><use href="#dsh-tc-undo" xlink:href="#dsh-tc-undo" x="591" y="162" width="18" height="18" class="tc-icon"/><text x="616" y="175" class="tc-body">Restore defaults</text>
41
+ <rect x="76" y="198" width="660" height="160" rx="12" class="tc-field"/>
42
+ <rect x="90" y="212" width="56" height="32" rx="8" class="tc-tile"/><text x="118" y="232" text-anchor="middle" class="tc-emoji">emoji</text>
43
+ <rect x="156" y="212" width="236" height="32" rx="8" class="tc-input"/><text x="168" y="232" class="tc-mono">Name</text><rect x="402" y="212" width="226" height="32" rx="8" class="tc-input"/><text x="414" y="232" class="tc-mono">Group · blank = General</text>
44
+ <rect x="638" y="212" width="84" height="32" rx="8" class="tc-btn"/><use href="#dsh-tc-trash" xlink:href="#dsh-tc-trash" x="650" y="220" width="16" height="16" class="tc-icon"/><text x="673" y="232" class="tc-note">Delete</text>
45
+ <rect x="90" y="254" width="632" height="28" rx="8" class="tc-input"/><text x="102" y="272" class="tc-note">Description · shown when a dropdown entry is hovered</text>
46
+ <rect x="90" y="292" width="632" height="32" rx="8" class="tc-input"/><text x="102" y="312" class="tc-note">Body · inserted at the caret</text><text x="90" y="343" class="tc-note">Name and body are required; empty rows are dropped on Save</text>
47
+ <rect x="76" y="370" width="660" height="114" rx="12" class="tc-field"/><use href="#dsh-tc-import" xlink:href="#dsh-tc-import" x="90" y="382" width="18" height="18" class="tc-icon"/><text x="116" y="396" class="tc-section tc-section-sm">Import roles</text>
48
+ <rect x="90" y="408" width="490" height="32" rx="8" class="tc-inset"/><text x="102" y="428" class="tc-note">Empty = bundled agents/ (top + one level); or a .md / directory path</text><rect x="592" y="408" width="130" height="32" rx="8" class="tc-btn"/><text x="657" y="428" text-anchor="middle" class="tc-body">Import roles</text>
49
+ <text x="90" y="463" class="tc-note">Explicit paths are checked against allowed roots; imports merge into the draft and still need Save.</text>
50
+ <rect x="76" y="496" width="660" height="146" rx="12" class="tc-field"/><use href="#dsh-tc-folder" xlink:href="#dsh-tc-folder" x="90" y="508" width="18" height="18" class="tc-icon"/><text x="116" y="522" class="tc-section tc-section-sm">Import allowed directories (importAllowRoots)</text>
51
+ <rect x="90" y="532" width="310" height="28" rx="8" class="tc-inset"/><text x="102" y="550" class="tc-mono">/Users/you/notes</text><rect x="412" y="532" width="310" height="28" rx="8" class="tc-inset"/><text x="424" y="550" class="tc-mono">/Volumes/team-roles</text>
52
+ <path d="M330 538v16M652 538v16" class="tc-rule"/><text x="365" y="550" text-anchor="middle" class="tc-note">Remove</text><text x="687" y="550" text-anchor="middle" class="tc-note">Remove</text>
53
+ <rect x="90" y="568" width="490" height="28" rx="8" class="tc-input"/><text x="102" y="586" class="tc-note">Add an absolute directory path to allow imports from</text><rect x="592" y="568" width="130" height="28" rx="8" class="tc-btn"/><text x="657" y="586" text-anchor="middle" class="tc-body">Add root</text>
54
+ <text x="90" y="612" class="tc-note">Absolute paths only; relative paths and ~ are dropped; <tspan x="90" dy="15">separators normalized and deduped; empty adds no trust.</tspan></text>
55
+ <rect x="784" y="144" width="340" height="510" rx="18" class="tc-panel"/><text x="804" y="177" class="tc-section">When it writes</text>
56
+ <text x="804" y="213" class="tc-mono">Edit / add / delete / import</text><text x="804" y="231" class="tc-note">→ local draft only</text>
57
+ <text x="804" y="265" class="tc-mono">Save</text><text x="804" y="283" class="tc-note">→ writes both lists, then reads back</text>
58
+ <text x="804" y="317" class="tc-mono">Restore defaults</text><text x="804" y="335" class="tc-note">→ confirm, unset(templates); roots untouched</text>
59
+ <text x="804" y="369" class="tc-mono">Empty list</text><text x="804" y="387" class="tc-note">→ built-in curated set (host serves it)</text>
60
+ <path d="M804 409H1104" class="tc-rule"/><text x="804" y="436" class="tc-label">NO SESSION CONTEXT ON THE CARD</text>
61
+ <text x="804" y="458" class="tc-note">Imports can only use bundled agents/ <tspan x="804" dy="16">and the roots registered below.</tspan></text>
62
+ <text x="804" y="510" class="tc-note">The same list feeds the composer's Template <tspan x="804" dy="17">dropdown and the Polish ▾ role menu.</tspan></text>
63
+ <rect x="804" y="562" width="300" height="80" rx="10" class="tc-warn"/><text x="818" y="589" class="tc-body tc-warn-text">Out-of-zone paths fail and echo <tspan x="818" dy="17">the resolved path; no whole-draft</tspan> <tspan x="818" dy="17">fallback or silent allow.</tspan></text>
64
+ <rect x="56" y="668" width="1068" height="40" rx="14" class="tc-panel"/><rect x="68" y="677" width="3" height="22" rx="1.5" fill="url(#dsh-tc-accent)"/>
65
+ <use href="#dsh-tc-save" xlink:href="#dsh-tc-save" x="84" y="679" width="18" height="18" class="tc-icon"/><text x="110" y="692" class="tc-body">Save goes through the host settings service: it reads back immediately and reports a mismatch as failure.</text>
66
+ </svg>
@@ -0,0 +1,74 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="1180" height="720" viewBox="0 0 1180 720" preserveAspectRatio="xMidYMid meet" class="dsh-tc" role="img" aria-labelledby="dsh-tc-title" aria-describedby="dsh-tc-desc" xml:lang="zh-CN">
2
+ <title id="dsh-tc-title">DSH PLUGIN · 角色库设置卡:模板与允许目录</title>
3
+ <desc id="dsh-tc-desc">设置卡只有一节角色库:工具条有新增模板与恢复默认;每条模板有表情、名称、分组、删除,下方是说明与正文,名称与正文必填。导入区留空导入内置 agents/ 顶层加一层子目录,显式路径须在允许根内,结果合并进草稿。导入允许目录逐条登记绝对路径,相对路径与波浪号被丢弃。所有改动先留在本地草稿,点保存才写入;空模板列表回落内置精选集。</desc>
4
+ <defs>
5
+ <linearGradient id="dsh-tc-bg" x2="100%" y2="100%"><stop offset="0%" stop-color="#0b1218"/><stop offset="100%" stop-color="#080d12"/></linearGradient>
6
+ <linearGradient id="dsh-tc-accent"><stop offset="0%" stop-color="#56c2f0"/><stop offset="100%" stop-color="#8a91ff"/></linearGradient>
7
+ <linearGradient id="dsh-tc-tile" x2="100%" y2="100%"><stop offset="0%" stop-color="#56c2f0" stop-opacity=".20"/><stop offset="100%" stop-color="#2a7fc0" stop-opacity=".24"/></linearGradient>
8
+ <linearGradient id="dsh-tc-chip"><stop offset="0%" stop-color="#56c2f0" stop-opacity=".16"/><stop offset="100%" stop-color="#8a91ff" stop-opacity=".10"/></linearGradient>
9
+ <radialGradient id="dsh-tc-glow-cyan"><stop offset="0%" stop-color="#56c2f0" stop-opacity=".22"/><stop offset="100%" stop-color="#56c2f0" stop-opacity="0"/></radialGradient>
10
+ <radialGradient id="dsh-tc-glow-violet"><stop offset="0%" stop-color="#8a91ff" stop-opacity=".14"/><stop offset="100%" stop-color="#8a91ff" stop-opacity="0"/></radialGradient>
11
+ <pattern id="dsh-tc-grid" width="34" height="34" patternUnits="userSpaceOnUse"><path d="M0.5 34V0.5H34" fill="none" stroke="#ffffff" stroke-opacity=".05"/></pattern>
12
+ <clipPath id="dsh-tc-frame"><rect width="1180" height="720"/></clipPath>
13
+ <symbol id="dsh-tc-icon-settings" viewBox="0 0 24 24"><path d="M4 3v7m0 4v7M12 3v5m0 4v9M20 3v9m0 4v5"/><rect x="1.5" y="10" width="5" height="4" rx="1"/><rect x="9.5" y="8" width="5" height="4" rx="1"/><rect x="17.5" y="12" width="5" height="4" rx="1"/></symbol>
14
+ </defs>
15
+ <style type="text/css">
16
+ .dsh-tc text{font-family:Inter,'Segoe UI',Arial,'PingFang SC','Microsoft YaHei','Noto Sans CJK SC','Noto Sans SC',sans-serif;letter-spacing:0}
17
+ .dsh-tc .tc-brand{font-size:13px;font-weight:700;fill:url(#dsh-tc-accent)} .dsh-tc .tc-title{font-size:31px;font-weight:700;fill:#f2f5fb} .dsh-tc .tc-sub{font-size:15px;fill:#94a0b6}
18
+ .dsh-tc .tc-section{font-size:16px;font-weight:700;fill:#f2f5fb} .dsh-tc .tc-subsection{font-size:13.5px} .dsh-tc .tc-label{font-size:11.5px;font-weight:700;fill:#56c2f0}
19
+ .dsh-tc .tc-body{font-size:12.5px;fill:#d6deec;fill-opacity:.82} .dsh-tc .tc-note{font-size:11.5px;fill:#94a0b6;fill-opacity:.85} .dsh-tc .tc-warning-copy{fill:#8a91ff;fill-opacity:1}
20
+ .dsh-tc .tc-mono{font-family:ui-monospace,Menlo,Consolas,'DejaVu Sans Mono','PingFang SC','Microsoft YaHei','Noto Sans CJK SC','Noto Sans SC',monospace;font-size:12px;fill:#56c2f0}
21
+ .dsh-tc .tc-plus{font-size:16px;font-weight:700;fill:#56c2f0;fill-opacity:1} .dsh-tc .tc-panel{fill:#ffffff;fill-opacity:.045;stroke:#ffffff;stroke-opacity:.10} .dsh-tc .tc-field{fill:#ffffff;fill-opacity:.03;stroke:#ffffff;stroke-opacity:.07}
22
+ .dsh-tc .tc-input{fill:#ffffff;fill-opacity:.03;stroke:#ffffff;stroke-opacity:.09} .dsh-tc .tc-dark-input{fill:#0b0d12;stroke:#ffffff;stroke-opacity:.10} .dsh-tc .tc-rule{stroke:#ffffff;stroke-opacity:.10}
23
+ .dsh-tc .tc-tile{fill:url(#dsh-tc-tile);stroke:#56c2f0;stroke-opacity:.28} .dsh-tc .tc-btn{fill:url(#dsh-tc-chip);stroke:#56c2f0;stroke-opacity:.35} .dsh-tc .tc-warn{fill:#8a91ff;fill-opacity:.10;stroke:#8a91ff;stroke-opacity:.36}
24
+ .dsh-tc .tc-icon{fill:none;stroke:#56c2f0;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
25
+ </style>
26
+ <g clip-path="url(#dsh-tc-frame)" aria-hidden="true">
27
+ <rect width="1180" height="720" fill="url(#dsh-tc-bg)"/><circle cx="1015" cy="0" r="330" fill="url(#dsh-tc-glow-cyan)"/><circle cx="0" cy="720" r="300" fill="url(#dsh-tc-glow-violet)"/><rect width="1180" height="720" fill="url(#dsh-tc-grid)"/><rect width="1180" height="3" fill="url(#dsh-tc-accent)"/>
28
+ </g>
29
+ <text x="56" y="46" class="tc-brand">DSH PLUGIN · 角色库设置卡</text><text x="56" y="85" class="tc-title">一张卡管两份列表</text>
30
+ <text x="56" y="119" class="tc-sub">模板与允许目录都先改本地草稿,点「保存」才写入;空模板列表回落内置精选集。</text>
31
+ <rect x="946" y="45" width="110" height="30" rx="15" class="tc-btn"/><circle cx="962" cy="60" r="3.5" fill="#56c2f0"/><text x="974" y="64.5" font-size="12.5" font-weight="700" fill="#56c2f0">本地草稿</text>
32
+ <rect x="1072" y="34" width="52" height="52" rx="16" class="tc-tile"/>
33
+ <use href="#dsh-tc-icon-settings" x="1086" y="48" width="24" height="24" class="tc-icon" aria-hidden="true"/>
34
+
35
+ <rect x="56" y="152" width="700" height="492" rx="18" class="tc-panel"/><text x="76" y="190" class="tc-section">角色库</text><text x="142" y="188" class="tc-note">N 条 · 计数是实时条数</text>
36
+ <rect x="470" y="168" width="130" height="32" rx="9" class="tc-btn"/><text x="535" y="189" text-anchor="middle" class="tc-body"><tspan class="tc-plus">+</tspan> 新增模板</text>
37
+ <rect x="610" y="168" width="126" height="32" rx="9" class="tc-btn"/><svg x="636" y="175" width="18" height="18" viewBox="0 0 24 24" class="tc-icon" aria-hidden="true"><path d="M9 14 4 9l5-5M4 9h10a6 6 0 0 1 0 12h-3"/></svg><text x="660" y="189" class="tc-body">恢复默认</text>
38
+
39
+ <rect x="76" y="212" width="660" height="152" rx="12" class="tc-field"/>
40
+ <rect x="90" y="224" width="48" height="30" rx="8" class="tc-tile"/><text x="114" y="243" text-anchor="middle" font-size="10.5" fill="#56c2f0">表情</text>
41
+ <rect x="148" y="224" width="250" height="30" rx="8" class="tc-input"/><text x="160" y="243" class="tc-mono">名称</text>
42
+ <rect x="408" y="224" width="220" height="30" rx="8" class="tc-input"/><text x="420" y="243" class="tc-mono">分组 · 空 = 通用</text>
43
+ <rect x="638" y="224" width="84" height="30" rx="8" class="tc-btn"/><svg x="658" y="231" width="16" height="16" viewBox="0 0 24 24" class="tc-icon" aria-hidden="true"><path d="M3 6h18M8 6V4h8v2M6 6l1 15h10l1-15"/></svg><text x="680" y="243" class="tc-note">删除</text>
44
+ <rect x="90" y="262" width="632" height="28" rx="8" class="tc-input"/><text x="102" y="280" class="tc-note">说明 · 悬停时显示在模板下拉里</text>
45
+ <rect x="90" y="298" width="632" height="34" rx="8" class="tc-input"/><text x="102" y="317" class="tc-note">正文 · 插入到光标处的内容</text>
46
+ <text x="90" y="349" class="tc-note">名称与正文必填;保存时剔除空条目</text>
47
+
48
+ <rect x="76" y="376" width="660" height="106" rx="12" class="tc-field"/>
49
+ <svg x="90" y="390" width="18" height="18" viewBox="0 0 24 24" class="tc-icon" aria-hidden="true"><path d="M12 3v12M7 10l5 5 5-5M4 19h16"/></svg><text x="116" y="404" class="tc-section tc-subsection">导入角色</text>
50
+ <rect x="90" y="416" width="500" height="32" rx="8" class="tc-dark-input"/><text x="102" y="436" class="tc-note">留空 = 内置 agents/(顶层 + 一层);或 .md / 目录路径</text>
51
+ <rect x="602" y="416" width="120" height="32" rx="8" class="tc-btn"/><text x="662" y="437" text-anchor="middle" class="tc-body">导入角色</text>
52
+ <text x="90" y="468" class="tc-note">显式路径先按允许根检查再读取;导入结果合并进草稿,仍需保存。</text>
53
+
54
+ <rect x="76" y="494" width="660" height="134" rx="12" class="tc-field"/>
55
+ <svg x="90" y="508" width="18" height="18" viewBox="0 0 24 24" class="tc-icon" aria-hidden="true"><path d="M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z"/></svg><text x="116" y="522" class="tc-section tc-subsection">导入允许目录(importAllowRoots)</text>
56
+ <rect x="90" y="534" width="310" height="28" rx="8" class="tc-dark-input"/><path d="M348 540v16" class="tc-rule"/><text x="102" y="552" class="tc-mono">/Users/you/notes</text><text x="374" y="552" text-anchor="middle" class="tc-note">移除</text>
57
+ <rect x="412" y="534" width="310" height="28" rx="8" class="tc-dark-input"/><path d="M670 540v16" class="tc-rule"/><text x="424" y="552" class="tc-mono">/Volumes/team-roles</text><text x="696" y="552" text-anchor="middle" class="tc-note">移除</text>
58
+ <rect x="90" y="570" width="500" height="28" rx="8" class="tc-input"/><text x="102" y="588" class="tc-note">新增一个允许导入的目录绝对路径</text>
59
+ <rect x="602" y="570" width="120" height="28" rx="8" class="tc-btn"/><text x="662" y="589" text-anchor="middle" class="tc-body">登记目录</text>
60
+ <text x="90" y="616" class="tc-note">只收绝对路径;相对路径与 ~ 丢弃;末尾分隔符归一、去重;空表不额外信任。</text>
61
+
62
+ <rect x="784" y="152" width="340" height="492" rx="18" class="tc-panel"/><text x="804" y="190" class="tc-section">写入时机</text>
63
+ <text x="804" y="224" class="tc-mono">编辑 / 新增 / 删除 / 导入</text><text x="804" y="243" class="tc-note">→ 只改本地草稿</text>
64
+ <text x="804" y="274" class="tc-mono">保存</text><text x="804" y="293" class="tc-note">→ 写两份列表并回读校验</text>
65
+ <text x="804" y="324" class="tc-mono">恢复默认</text><text x="804" y="343" class="tc-note">→ 确认后 unset(templates),不动允许目录</text>
66
+ <text x="804" y="374" class="tc-mono">列表为空</text><text x="804" y="393" class="tc-note">→ 回落内置精选集(由 host 端按需下发)</text>
67
+ <path d="M804 421H1104" class="tc-rule"/><text x="804" y="450" class="tc-label">卡上没有会话上下文</text>
68
+ <text class="tc-note"><tspan x="804" y="472">导入只能用内置 agents/ 与</tspan><tspan x="804" y="490">下面登记的允许目录。</tspan></text>
69
+ <text class="tc-note"><tspan x="804" y="518">同一份列表同时供输入框「模板」</tspan><tspan x="804" y="536">下拉与「润色 ▾」角色菜单。</tspan></text>
70
+ <rect x="804" y="562" width="300" height="66" rx="10" class="tc-warn"/><text class="tc-body tc-warning-copy"><tspan x="816" y="590">越界路径直接报错并回显解析后的路径,</tspan><tspan x="816" y="609">没有整稿回退或静默放行。</tspan></text>
71
+
72
+ <rect x="56" y="660" width="1068" height="44" rx="14" class="tc-panel"/><rect x="68" y="671" width="3" height="22" rx="1.5" fill="url(#dsh-tc-accent)"/>
73
+ <svg x="84" y="673" width="18" height="18" viewBox="0 0 24 24" class="tc-icon" aria-hidden="true"><path d="M5 3h11l3 3v15H5ZM8 3v6h8V3M8 21v-7h8v7"/></svg><text x="110" y="687" class="tc-body">保存走宿主设置服务:写入后立即回读校验,不一致按失败报出,不假装成功。</text>
74
+ </svg>