@jayyuen66/dsh-dir-prep-organize 0.1.15 → 0.1.17
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/CHANGELOG.md +12 -0
- package/README.md +29 -27
- package/README.zh-CN.md +29 -27
- package/THIRD_PARTY_NOTICES.md +5 -3
- package/client.js +4 -38
- package/docs/DETAIL.md +5 -26
- package/docs/DETAIL.zh.md +5 -26
- package/docs/images/capability-map.svg +66 -0
- package/docs/images/capability-map.zh.svg +74 -0
- package/docs/images/import-boundary.svg +64 -0
- package/docs/images/import-boundary.zh.svg +66 -0
- package/docs/images/organize-flow.svg +83 -0
- package/docs/images/organize-flow.zh.svg +71 -0
- package/docs/images/templates-card.svg +66 -0
- package/docs/images/templates-card.zh.svg +74 -0
- package/host.js +21 -1685
- package/package.json +72 -69
- package/templates.data.mjs +11840 -685
- package/types/host.d.ts +0 -474
- package/types/src/client-entry.d.ts +0 -99
- package/types/src/client-styles.d.ts +0 -1
- package/types/src/client-timeouts.d.ts +0 -30
- package/types/src/default-templates.generated.d.ts +0 -3
- package/types/src/group-labels.generated.d.ts +0 -2
- package/types/src/host-messages.d.ts +0 -96
- package/types/src/input-writeback.d.ts +0 -32
- package/types/src/remote.d.ts +0 -33
- package/types/src/templates.d.ts +0 -96
- package/types/src/ui-messages.d.ts +0 -224
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1180" height="720" viewBox="0 0 1180 720" preserveAspectRatio="xMidYMid meet" class="dsh-ib" role="img" aria-labelledby="dsh-ib-title" aria-describedby="dsh-ib-desc" xml:lang="en">
|
|
2
|
+
<title id="dsh-ib-title">DSH PLUGIN · IMPORT BOUNDARY AND OFF-CARD SETTINGS</title>
|
|
3
|
+
<desc id="dsh-ib-desc">Imports read three allowed zones only: session endpoints also accept the session working directory, the bundled agents library is always available, and importAllowRoots registers absolute directories. The path check resolves the real target first; relative paths, tilde, dot segments, hidden segments, out-of-zone paths and symlink escapes are refused. Directory scans cover the top level plus one sub-directory and only take .md files with a name in frontmatter. Off-card deployment values are organizeTimeoutMs, maxSnippetBytes and readConcurrency; the latter two take effect on restart.</desc>
|
|
4
|
+
<defs>
|
|
5
|
+
<linearGradient id="dsh-ib-bg" x2="100%" y2="100%"><stop offset="0%" stop-color="#0b1218"/><stop offset="100%" stop-color="#080d12"/></linearGradient>
|
|
6
|
+
<linearGradient id="dsh-ib-accent"><stop offset="0%" stop-color="#56c2f0"/><stop offset="100%" stop-color="#8a91ff"/></linearGradient>
|
|
7
|
+
<linearGradient id="dsh-ib-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-ib-chip"><stop offset="0%" stop-color="#56c2f0" stop-opacity=".16"/><stop offset="100%" stop-color="#8a91ff" stop-opacity=".10"/></linearGradient>
|
|
9
|
+
<radialGradient id="dsh-ib-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-ib-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-ib-grid" width="34" height="34" patternUnits="userSpaceOnUse"><path d="M0.5 34V0.5H34" fill="none" stroke="#ffffff" stroke-opacity=".05"/></pattern>
|
|
12
|
+
<symbol id="dsh-ib-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>
|
|
13
|
+
<symbol id="dsh-ib-home" viewBox="0 0 24 24"><path d="M3 11 12 3l9 8M5 10v10h14V10"/></symbol>
|
|
14
|
+
<symbol id="dsh-ib-package" viewBox="0 0 24 24"><path d="M21 8 12 3 3 8v8l9 5 9-5ZM3 8l9 5 9-5M12 13v8"/></symbol>
|
|
15
|
+
<symbol id="dsh-ib-filter" viewBox="0 0 24 24"><path d="M3 4h18l-7 8v7l-4 2v-9Z"/></symbol>
|
|
16
|
+
<symbol id="dsh-ib-shield" viewBox="0 0 24 24"><path d="M12 3 20 6v6c0 5-3.5 7.5-8 9-4.5-1.5-8-4-8-9V6ZM9 12l2 2 4-4"/></symbol>
|
|
17
|
+
<symbol id="dsh-ib-file" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8ZM14 2v6h6M8 13h8M8 17h5"/></symbol>
|
|
18
|
+
<symbol id="dsh-ib-gauge" viewBox="0 0 24 24"><path d="M4 18a8 8 0 1 1 16 0M12 18l4-5"/><circle cx="12" cy="18" r="1.5"/></symbol>
|
|
19
|
+
<symbol id="dsh-ib-clock" viewBox="0 0 24 24"><circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/></symbol>
|
|
20
|
+
</defs>
|
|
21
|
+
<style>
|
|
22
|
+
.dsh-ib text{font-family:Inter,'Segoe UI',Arial,'DejaVu Sans',sans-serif}
|
|
23
|
+
.dsh-ib .ib-brand{font-size:13px;font-weight:700;fill:url(#dsh-ib-accent)}
|
|
24
|
+
.dsh-ib .ib-title{font-size:31px;font-weight:700;fill:#f2f5fb}.dsh-ib .ib-sub{font-size:15px;fill:#94a0b6}
|
|
25
|
+
.dsh-ib .ib-section,.dsh-ib .ib-scan-title{font-weight:700;fill:#f2f5fb}.dsh-ib .ib-section{font-size:16px}.dsh-ib .ib-scan-title{font-size:13.5px}
|
|
26
|
+
.dsh-ib .ib-body{font-size:12.5px;fill:#d6deec;fill-opacity:.82}.dsh-ib .ib-note{font-size:11.5px;fill:#94a0b6;fill-opacity:.85}
|
|
27
|
+
.dsh-ib .ib-label{font-size:11.5px;font-weight:700;fill:#56c2f0}.dsh-ib .ib-check{font-size:12.5px;font-weight:600;fill:#8a91ff}
|
|
28
|
+
.dsh-ib .ib-mono{font-family:ui-monospace,Menlo,Consolas,'DejaVu Sans Mono',monospace;font-size:12px;fill:#56c2f0}.dsh-ib .ib-mono.ib-compact{font-size:11.5px}
|
|
29
|
+
.dsh-ib .ib-panel{fill:#ffffff;fill-opacity:.045;stroke:#ffffff;stroke-opacity:.10}.dsh-ib .ib-card{fill:#ffffff;fill-opacity:.03;stroke:#ffffff;stroke-opacity:.07}
|
|
30
|
+
.dsh-ib .ib-tile{fill:url(#dsh-ib-tile);stroke:#56c2f0;stroke-opacity:.28}.dsh-ib .ib-deny{fill:#8a91ff;fill-opacity:.08;stroke:#8a91ff;stroke-opacity:.28}
|
|
31
|
+
.dsh-ib .ib-icon{fill:none;stroke:#56c2f0;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
|
|
32
|
+
</style>
|
|
33
|
+
<rect width="1180" height="720" fill="url(#dsh-ib-bg)"/><circle cx="1015" cy="0" r="330" fill="url(#dsh-ib-glow-cyan)"/><circle cx="0" cy="720" r="300" fill="url(#dsh-ib-glow-violet)"/>
|
|
34
|
+
<rect width="1180" height="720" fill="url(#dsh-ib-grid)"/><rect width="1180" height="3" fill="url(#dsh-ib-accent)"/>
|
|
35
|
+
<text x="56" y="46" class="ib-brand">DSH PLUGIN · IMPORT BOUNDARY & OFF-CARD LIMITS</text>
|
|
36
|
+
<text x="56" y="85" class="ib-title">Allowed zones are explicit trust</text>
|
|
37
|
+
<text x="56" y="119" class="ib-sub">Imports read three places only; three deployment values stay off the card.</text>
|
|
38
|
+
<g transform="translate(908 57)"><rect width="148" height="32" rx="16" fill="url(#dsh-ib-chip)" stroke="#8a91ff" stroke-opacity=".45"/><circle cx="16" cy="16" r="3.5" fill="#8a91ff"/><text x="30" y="20.5" font-size="12.5" font-weight="700" fill="#8a91ff">deny by default</text></g>
|
|
39
|
+
<rect x="1072" y="47" width="52" height="52" rx="16" class="ib-tile"/><use href="#dsh-ib-shield" x="1086" y="61" width="24" height="24" class="ib-icon"/>
|
|
40
|
+
<rect x="56" y="148" width="692" height="484" rx="18" class="ib-panel"/><rect x="772" y="148" width="352" height="484" rx="18" class="ib-panel"/>
|
|
41
|
+
<text x="76" y="180" class="ib-section">Imports read three allowed zones</text>
|
|
42
|
+
<g transform="translate(76 198)"><rect width="208" height="102" rx="12" class="ib-card"/><rect x="14" y="14" width="32" height="32" rx="9" class="ib-tile"/><use href="#dsh-ib-home" x="21" y="21" width="18" height="18" class="ib-icon"/><text x="14" y="65" class="ib-body" font-weight="600">Session cwd</text><text x="14" y="85" class="ib-note">session endpoints only</text></g>
|
|
43
|
+
<g transform="translate(298 198)"><rect width="208" height="102" rx="12" class="ib-card"/><rect x="14" y="14" width="32" height="32" rx="9" class="ib-tile"/><use href="#dsh-ib-package" x="21" y="21" width="18" height="18" class="ib-icon"/><text x="14" y="65" class="ib-body" font-weight="600">Bundled agents/</text><text x="14" y="85" class="ib-note">shipped library · on-card</text></g>
|
|
44
|
+
<g transform="translate(520 198)"><rect width="208" height="102" rx="12" class="ib-card"/><rect x="14" y="14" width="32" height="32" rx="9" class="ib-tile"/><use href="#dsh-ib-folder" x="21" y="21" width="18" height="18" class="ib-icon"/><text x="14" y="65" class="ib-mono ib-compact">importAllowRoots</text><text x="14" y="85" class="ib-note">registered absolute dirs</text></g>
|
|
45
|
+
<path d="M180 306V322M176 318l4 4 4-4 M402 306V322M398 318l4 4 4-4 M624 306V322M620 318l4 4 4-4" fill="none" stroke="#56c2f0" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>
|
|
46
|
+
<rect x="76" y="330" width="652" height="46" rx="12" fill="#8a91ff" fill-opacity=".10" stroke="#8a91ff" stroke-opacity=".36"/><use href="#dsh-ib-filter" x="90" y="344" width="18" height="18" class="ib-icon"/>
|
|
47
|
+
<text x="118" y="357" class="ib-check">Path check: resolve the real target, then require an allowed zone</text>
|
|
48
|
+
<text x="76" y="404" class="ib-label">REFUSED</text><rect x="76" y="416" width="652" height="54" rx="12" class="ib-deny"/>
|
|
49
|
+
<text x="90" y="438" class="ib-body">relative · ~ · <tspan class="ib-mono">.</tspan> / <tspan class="ib-mono">..</tspan> · hidden segments</text>
|
|
50
|
+
<text x="90" y="457" class="ib-body">outside the zones · symlink escape · missing dirs</text>
|
|
51
|
+
<rect x="76" y="486" width="652" height="100" rx="12" class="ib-card"/><text x="90" y="509" class="ib-scan-title">Directory scan shape</text>
|
|
52
|
+
<text x="90" y="531" class="ib-body">Top level + one sub-directory; hidden and out-of-zone targets skipped.</text>
|
|
53
|
+
<text x="90" y="551" class="ib-body">Only .md with a name in frontmatter; the body becomes template text.</text>
|
|
54
|
+
<text x="90" y="571" class="ib-body">deeper / too large / unreadable / not a role / escaped: counted per class</text>
|
|
55
|
+
<text x="76" y="612" class="ib-note">No session on the card: on-card imports use the bundled library and registered roots only.</text>
|
|
56
|
+
<text x="792" y="180" class="ib-section">Off-card deployment values</text>
|
|
57
|
+
<g transform="translate(792 198)"><rect width="312" height="110" rx="12" class="ib-card"/><use href="#dsh-ib-clock" x="16" y="16" width="18" height="18" class="ib-icon"/><text x="42" y="29" class="ib-mono">organizeTimeoutMs</text><text x="16" y="58" class="ib-body">120000 ms · read per request</text><text x="16" y="78" class="ib-note">client fetch adds a 5000 ms allowance</text><text x="16" y="96" class="ib-note">clamped to [1, 2147483647]</text></g>
|
|
58
|
+
<g transform="translate(792 320)"><rect width="312" height="110" rx="12" class="ib-card"/><use href="#dsh-ib-file" x="16" y="16" width="18" height="18" class="ib-icon"/><text x="42" y="29" class="ib-mono">maxSnippetBytes</text><text x="16" y="58" class="ib-body">262144 · per-file snippet limit</text><text x="16" y="78" class="ib-note">over the limit: the whole file is skipped</text><text x="16" y="96" class="ib-note">takes effect on restart</text></g>
|
|
59
|
+
<g transform="translate(792 442)"><rect width="312" height="110" rx="12" class="ib-card"/><use href="#dsh-ib-gauge" x="16" y="16" width="18" height="18" class="ib-icon"/><text x="42" y="29" class="ib-mono">readConcurrency</text><text x="16" y="58" class="ib-body">8 · parallel key-file reads</text><text x="16" y="78" class="ib-note">clamped to [1, 64]; zero would hang</text><text x="16" y="96" class="ib-note">takes effect on restart</text></g>
|
|
60
|
+
<text x="792" y="576" class="ib-note">organizeTimeoutMs applies to the next request;<tspan x="792" y="594">the other two need a restart.</tspan></text>
|
|
61
|
+
<text x="792" y="612" class="ib-note">Set them in settings.yaml or the row's config:</text>
|
|
62
|
+
<rect x="56" y="650" width="1068" height="46" rx="14" class="ib-panel"/><rect x="68" y="662" width="3" height="22" rx="1.5" fill="url(#dsh-ib-accent)"/>
|
|
63
|
+
<use href="#dsh-ib-shield" x="84" y="664" width="18" height="18" class="ib-icon"/><text x="110" y="677" class="ib-body">Deny by default: an empty allow list trusts no extra directory; refusals echo the resolved path.</text>
|
|
64
|
+
</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-ib" role="img" aria-labelledby="dsh-ib-title" aria-describedby="dsh-ib-desc" xml:lang="zh">
|
|
2
|
+
<title id="dsh-ib-title">DSH PLUGIN · 导入边界与卡外配置</title>
|
|
3
|
+
<desc id="dsh-ib-desc">导入只读三块允许区:带会话的端点额外接受会话工作目录,内置 agents 角色库始终可用,importAllowRoots 逐条登记绝对目录。路径判定先解析真实目标,相对路径、波浪号、点段、隐藏段、区外路径与符号链接逃逸都被拒绝。目录扫描顶层加一层子目录,只收 frontmatter 带 name 的 .md。卡外的部署值是 organizeTimeoutMs、maxSnippetBytes 与 readConcurrency;后两项随重启生效。</desc>
|
|
4
|
+
<defs>
|
|
5
|
+
<linearGradient id="dsh-ib-bg" x2="100%" y2="100%"><stop offset="0" stop-color="#0b1218"/><stop offset="1" stop-color="#080d12"/></linearGradient>
|
|
6
|
+
<linearGradient id="dsh-ib-accent"><stop offset="0" stop-color="#56c2f0"/><stop offset="1" stop-color="#8a91ff"/></linearGradient>
|
|
7
|
+
<pattern id="dsh-ib-grid" width="34" height="34" patternUnits="userSpaceOnUse"><path d="M0.5 34V0.5H34" fill="none" stroke="#fff" stroke-opacity=".05"/></pattern>
|
|
8
|
+
<linearGradient id="dsh-ib-tile" x2="100%" y2="100%"><stop offset="0" stop-color="#56c2f0" stop-opacity=".20"/><stop offset="1" stop-color="#2a7fc0" stop-opacity=".24"/></linearGradient>
|
|
9
|
+
<linearGradient id="dsh-ib-chip"><stop offset="0" stop-color="#56c2f0" stop-opacity=".16"/><stop offset="1" stop-color="#8a91ff" stop-opacity=".10"/></linearGradient>
|
|
10
|
+
<radialGradient id="dsh-ib-glow-cyan"><stop offset="0" stop-color="#56c2f0" stop-opacity=".22"/><stop offset="1" stop-color="#56c2f0" stop-opacity="0"/></radialGradient>
|
|
11
|
+
<radialGradient id="dsh-ib-glow-violet"><stop offset="0" stop-color="#8a91ff" stop-opacity=".14"/><stop offset="1" stop-color="#8a91ff" stop-opacity="0"/></radialGradient>
|
|
12
|
+
<symbol id="dsh-ib-home" viewBox="0 0 24 24"><path d="M3 11 12 3l9 8M5 10v10h14V10"/></symbol>
|
|
13
|
+
<symbol id="dsh-ib-package" viewBox="0 0 24 24"><path d="M21 8 12 3 3 8v8l9 5 9-5ZM3 8l9 5 9-5M12 13v8"/></symbol>
|
|
14
|
+
<symbol id="dsh-ib-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>
|
|
15
|
+
<symbol id="dsh-ib-filter" viewBox="0 0 24 24"><path d="M3 4h18l-7 8v7l-4 2v-9Z"/></symbol>
|
|
16
|
+
<symbol id="dsh-ib-shield" viewBox="0 0 24 24"><path d="M12 3 20 6v6c0 5-3.5 7.5-8 9-4.5-1.5-8-4-8-9V6ZM9 12l2 2 4-4"/></symbol>
|
|
17
|
+
<symbol id="dsh-ib-file" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8ZM14 2v6h6M8 13h8M8 17h5"/></symbol>
|
|
18
|
+
<symbol id="dsh-ib-gauge" viewBox="0 0 24 24"><path d="M4 18a8 8 0 1 1 16 0M12 18l4-5"/><circle cx="12" cy="18" r="1.5"/></symbol>
|
|
19
|
+
<symbol id="dsh-ib-clock" viewBox="0 0 24 24"><circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/></symbol>
|
|
20
|
+
</defs>
|
|
21
|
+
<style type="text/css">
|
|
22
|
+
.dsh-ib text{font-family:Inter,'Segoe UI',Arial,'PingFang SC','Microsoft YaHei','Noto Sans CJK SC','Noto Sans SC',sans-serif}
|
|
23
|
+
.dsh-ib .ib-brand{font-size:13px;font-weight:700;fill:url(#dsh-ib-accent)} .dsh-ib .ib-title{font-size:31px;font-weight:700;fill:#f2f5fb}
|
|
24
|
+
.dsh-ib .ib-sub{font-size:15px;fill:#94a0b6} .dsh-ib .ib-section{font-size:16px;font-weight:700;fill:#f2f5fb} .dsh-ib .ib-section.ib-scan-title{font-size:13.5px}
|
|
25
|
+
.dsh-ib .ib-body{font-size:12.5px;fill:#d6deec;fill-opacity:.82} .dsh-ib .ib-note{font-size:11.5px;fill:#94a0b6;fill-opacity:.85}
|
|
26
|
+
.dsh-ib .ib-label{font-size:11.5px;font-weight:700;fill:#56c2f0} .dsh-ib .ib-body.ib-rule{fill:#8a91ff;fill-opacity:1;font-weight:600}
|
|
27
|
+
.dsh-ib .ib-mono{font-family:ui-monospace,Menlo,Consolas,'DejaVu Sans Mono',monospace;font-size:12px;fill:#56c2f0} .dsh-ib .ib-mono.ib-root-key{font-size:11.5px}
|
|
28
|
+
.dsh-ib .ib-panel{fill:#fff;fill-opacity:.045;stroke:#fff;stroke-opacity:.10} .dsh-ib .ib-card{fill:#fff;fill-opacity:.03;stroke:#fff;stroke-opacity:.07}
|
|
29
|
+
.dsh-ib .ib-tile{fill:url(#dsh-ib-tile);stroke:#56c2f0;stroke-opacity:.28} .dsh-ib .ib-icon{fill:none;stroke:#56c2f0;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
|
|
30
|
+
.dsh-ib .ib-deny{fill:#8a91ff;fill-opacity:.08;stroke:#8a91ff;stroke-opacity:.28}
|
|
31
|
+
</style>
|
|
32
|
+
<g aria-hidden="true"><rect width="1180" height="720" fill="url(#dsh-ib-bg)"/><circle cx="1015" cy="0" r="330" fill="url(#dsh-ib-glow-cyan)"/><circle cx="0" cy="720" r="300" fill="url(#dsh-ib-glow-violet)"/><rect width="1180" height="720" fill="url(#dsh-ib-grid)"/><rect width="1180" height="3" fill="url(#dsh-ib-accent)"/></g>
|
|
33
|
+
<text x="56" y="46" class="ib-brand">DSH PLUGIN · 导入边界与卡外配置</text><text x="56" y="86" class="ib-title">允许区是显式信任</text>
|
|
34
|
+
<text x="56" y="119" class="ib-sub">导入只读三块地方;三个部署值不在卡上。</text>
|
|
35
|
+
<rect x="952" y="59" width="104" height="30" rx="15" fill="url(#dsh-ib-chip)" stroke="#8a91ff" stroke-opacity=".45"/><circle cx="974" cy="74" r="3.5" fill="#8a91ff"/><text x="988" y="78.5" font-size="12.5" font-weight="700" fill="#8a91ff">默认拒绝</text>
|
|
36
|
+
<rect x="1072" y="48" width="52" height="52" rx="16" class="ib-tile"/><use href="#dsh-ib-shield" xlink:href="#dsh-ib-shield" x="1086" y="62" width="24" height="24" class="ib-icon"/>
|
|
37
|
+
|
|
38
|
+
<rect x="56" y="148" width="700" height="496" rx="18" class="ib-panel"/><text x="76" y="180" class="ib-section">导入:只读三块允许区</text>
|
|
39
|
+
<g transform="translate(76 196)"><rect width="212" height="84" rx="12" class="ib-card"/><rect x="16" y="26" width="32" height="32" rx="9" class="ib-tile"/><use href="#dsh-ib-home" xlink:href="#dsh-ib-home" x="23" y="33" width="18" height="18" class="ib-icon"/><text x="60" y="35" class="ib-body" font-weight="600">会话 cwd</text><text x="60" y="57" class="ib-note">带会话的端点额外接受</text></g>
|
|
40
|
+
<g transform="translate(300 196)"><rect width="212" height="84" rx="12" class="ib-card"/><rect x="16" y="26" width="32" height="32" rx="9" class="ib-tile"/><use href="#dsh-ib-package" xlink:href="#dsh-ib-package" x="23" y="33" width="18" height="18" class="ib-icon"/><text x="60" y="35" class="ib-body" font-weight="600">内置 agents/</text><text x="60" y="57" class="ib-note">随包角色库 · 卡上可用</text></g>
|
|
41
|
+
<g transform="translate(524 196)"><rect width="212" height="84" rx="12" class="ib-card"/><rect x="16" y="26" width="32" height="32" rx="9" class="ib-tile"/><use href="#dsh-ib-folder" xlink:href="#dsh-ib-folder" x="23" y="33" width="18" height="18" class="ib-icon"/><text x="60" y="35" class="ib-mono ib-root-key">importAllowRoots</text><text x="60" y="57" class="ib-note">逐条登记的绝对目录</text></g>
|
|
42
|
+
<path d="M182 285V304M178 300L182 304L186 300 M406 285V304M402 300L406 304L410 300 M630 285V304M626 300L630 304L634 300" fill="none" stroke="#56c2f0" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>
|
|
43
|
+
<rect x="76" y="310" width="660" height="48" rx="12" fill="#8a91ff" fill-opacity=".10" stroke="#8a91ff" stroke-opacity=".36"/><use href="#dsh-ib-filter" xlink:href="#dsh-ib-filter" x="92" y="325" width="18" height="18" class="ib-icon"/>
|
|
44
|
+
<text x="120" y="339" class="ib-body ib-rule">路径判定:先解析真实目标,再要求落在允许区内</text>
|
|
45
|
+
<text x="76" y="386" class="ib-label">直接拒绝</text><rect x="76" y="398" width="660" height="60" rx="12" class="ib-deny"/>
|
|
46
|
+
<text x="92" y="422" class="ib-body">相对路径 · ~ · <tspan class="ib-mono">.</tspan> / <tspan class="ib-mono">..</tspan> · 隐藏段</text>
|
|
47
|
+
<text x="92" y="443" class="ib-body">允许区之外 · 符号链接逃逸 · 不存在的目录</text>
|
|
48
|
+
<rect x="76" y="474" width="660" height="114" rx="12" class="ib-card"/><text x="92" y="500" class="ib-section ib-scan-title">目录扫描形状</text>
|
|
49
|
+
<text x="92" y="524" class="ib-body">顶层 + 一层子目录;跳过隐藏项与越界目标。</text>
|
|
50
|
+
<text x="92" y="546" class="ib-body">只收 frontmatter 带 name 的 .md,正文提炼为模板正文。</text>
|
|
51
|
+
<text x="92" y="568" class="ib-body">更深层 / 过大 / 不可读 / 非角色 / 越界:逐类计数回执给用户。</text>
|
|
52
|
+
<path d="M76 602H736" stroke="#fff" stroke-opacity=".07"/><text x="76" y="626" class="ib-note">设置卡没有会话上下文:卡上只能用内置库与已登记目录。</text>
|
|
53
|
+
|
|
54
|
+
<rect x="784" y="148" width="340" height="496" rx="18" class="ib-panel"/><text x="804" y="180" class="ib-section">卡外的部署值</text>
|
|
55
|
+
<g transform="translate(804 196)"><rect width="300" height="108" rx="12" class="ib-card"/><use href="#dsh-ib-clock" xlink:href="#dsh-ib-clock" x="16" y="16" width="18" height="18" class="ib-icon"/><text x="42" y="30" class="ib-mono">organizeTimeoutMs</text>
|
|
56
|
+
<text x="16" y="53" class="ib-body">120000 ms · 每次请求现读</text><text x="16" y="73" class="ib-note">客户端 fetch 再加 5000 ms 余量</text><text x="16" y="92" class="ib-note">夹到 [1, 2147483647]</text></g>
|
|
57
|
+
<g transform="translate(804 316)"><rect width="300" height="108" rx="12" class="ib-card"/><use href="#dsh-ib-file" xlink:href="#dsh-ib-file" x="16" y="16" width="18" height="18" class="ib-icon"/><text x="42" y="30" class="ib-mono">maxSnippetBytes</text>
|
|
58
|
+
<text x="16" y="53" class="ib-body">262144 · 单文件摘要上限</text><text x="16" y="73" class="ib-note">超出整份跳过,不截断后硬读</text><text x="16" y="92" class="ib-note">随重启生效</text></g>
|
|
59
|
+
<g transform="translate(804 436)"><rect width="300" height="108" rx="12" class="ib-card"/><use href="#dsh-ib-gauge" xlink:href="#dsh-ib-gauge" x="16" y="16" width="18" height="18" class="ib-icon"/><text x="42" y="30" class="ib-mono">readConcurrency</text>
|
|
60
|
+
<text x="16" y="53" class="ib-body">8 · 并发读取关键文件</text><text x="16" y="73" class="ib-note">夹到 [1, 64];下界 0 会无限等待</text><text x="16" y="92" class="ib-note">随重启生效</text></g>
|
|
61
|
+
<text x="804" y="567" class="ib-note">organizeTimeoutMs 下一次请求即生效;</text><text x="804" y="586" class="ib-note">另两个随重启生效。</text>
|
|
62
|
+
<path d="M804 602H1104" stroke="#fff" stroke-opacity=".07"/><text x="804" y="626" class="ib-note">改在 settings.yaml 或注册行的 config: 块。</text>
|
|
63
|
+
|
|
64
|
+
<rect x="56" y="660" width="1068" height="44" rx="14" class="ib-panel"/><rect x="68" y="671" width="3" height="22" rx="1.5" fill="url(#dsh-ib-accent)"/>
|
|
65
|
+
<use href="#dsh-ib-shield" xlink:href="#dsh-ib-shield" x="84" y="673" width="18" height="18" class="ib-icon"/><text x="110" y="687" class="ib-body">默认拒绝是策略:空允许表不额外信任任何目录;越界报错并回显解析后的路径。</text>
|
|
66
|
+
</svg>
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="dsh-tp"
|
|
2
|
+
width="1180" height="720" viewBox="0 0 1180 720" overflow="hidden" xml:lang="en"
|
|
3
|
+
role="img" aria-labelledby="dsh-tp-title" aria-describedby="dsh-tp-desc"
|
|
4
|
+
font-family="Inter, system-ui, 'Segoe UI', Arial, sans-serif">
|
|
5
|
+
<title id="dsh-tp-title">DSH PLUGIN · TWO PATHS — Polish calls the model; templates never do</title>
|
|
6
|
+
<desc id="dsh-tp-desc">Both paths start from the composer dock and write back through guarded host actions.</desc>
|
|
7
|
+
<defs>
|
|
8
|
+
<linearGradient id="dsh-tp-bg" y2="100%"><stop offset="0" stop-color="#0b1218"/><stop offset="1" stop-color="#080d12"/></linearGradient>
|
|
9
|
+
<linearGradient id="dsh-tp-accent"><stop offset="0" stop-color="#56c2f0"/><stop offset="1" stop-color="#8a91ff"/></linearGradient>
|
|
10
|
+
<linearGradient id="dsh-tp-rim"><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>
|
|
11
|
+
<linearGradient id="dsh-tp-badge"><stop offset="0" stop-color="#56c2f0" stop-opacity=".16"/><stop offset="1" stop-color="#8a91ff" stop-opacity=".10"/></linearGradient>
|
|
12
|
+
<linearGradient id="dsh-tp-tile" 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-tp-step" x2="0%" y2="100%"><stop offset="0" stop-color="#56c2f0"/><stop offset="1" stop-color="#2a7fc0"/></linearGradient>
|
|
14
|
+
<radialGradient id="dsh-tp-cyan"><stop offset="0" stop-color="#56c2f0" stop-opacity=".22"/><stop offset="1" stop-color="#56c2f0" stop-opacity="0"/></radialGradient>
|
|
15
|
+
<radialGradient id="dsh-tp-violet"><stop offset="0" stop-color="#8a91ff" stop-opacity=".14"/><stop offset="1" stop-color="#8a91ff" stop-opacity="0"/></radialGradient>
|
|
16
|
+
<pattern id="dsh-tp-grid" width="34" height="34" patternUnits="userSpaceOnUse"><path d="M0 .5H34M.5 0V34" fill="none" stroke="#fff" stroke-opacity=".05"/></pattern>
|
|
17
|
+
<path id="dsh-tp-arrow" d="M0 -.8H6V-3.8L12 0 6 3.8V.8H0Z" fill="#56c2f0" fill-opacity=".8"/>
|
|
18
|
+
<g id="dsh-tp-marks">
|
|
19
|
+
<circle cx="24" cy="24" r="12" fill="url(#dsh-tp-step)" opacity=".92"/>
|
|
20
|
+
<g fill="#56c2f0" fill-opacity=".8"><circle cx="14" cy="52" r="2.2"/><circle cx="14" cy="73" r="2.2"/><circle cx="14" cy="94" r="2.2"/></g>
|
|
21
|
+
</g>
|
|
22
|
+
</defs>
|
|
23
|
+
<style>
|
|
24
|
+
#dsh-tp .lane, #dsh-tp .soft { fill: #fff; stroke: #fff; stroke-width: 1; }
|
|
25
|
+
#dsh-tp .lane { fill-opacity: .045; stroke-opacity: .10; }
|
|
26
|
+
#dsh-tp .soft { fill-opacity: .03; stroke-opacity: .07; }
|
|
27
|
+
#dsh-tp .strong { fill: #f2f5fb; font-weight: 700; }
|
|
28
|
+
#dsh-tp .copy { fill: #d6deec; fill-opacity: .82; }
|
|
29
|
+
#dsh-tp .note { fill: #94a0b6; fill-opacity: .85; }
|
|
30
|
+
#dsh-tp .label { fill: #56c2f0; font-size: 12px; font-weight: 700; letter-spacing: 1.6px; }
|
|
31
|
+
#dsh-tp .num { fill: #0b0d12; font-size: 13.5px; font-weight: 700; text-anchor: middle; }
|
|
32
|
+
</style>
|
|
33
|
+
<rect width="1180" height="720" fill="url(#dsh-tp-bg)"/>
|
|
34
|
+
<circle cx="1014.8" cy="0" r="330" fill="url(#dsh-tp-cyan)"/><circle cx="0" cy="720" r="300" fill="url(#dsh-tp-violet)"/>
|
|
35
|
+
<rect width="1180" height="720" fill="url(#dsh-tp-grid)"/><rect width="1180" height="3" fill="url(#dsh-tp-rim)" opacity=".9"/>
|
|
36
|
+
<text x="56" y="48" font-size="12.5" font-weight="700" letter-spacing="2.4" fill="url(#dsh-tp-accent)">DSH PLUGIN · TWO PATHS</text>
|
|
37
|
+
<text x="56" y="86" font-size="31" class="strong">Polish calls the model; templates never do</text>
|
|
38
|
+
<text x="56" y="120" font-size="15" class="note">Both paths start from the composer dock and write back through guarded host actions.</text>
|
|
39
|
+
<g transform="translate(886 45)"><rect width="170" height="30" rx="15" fill="url(#dsh-tp-badge)" stroke="#56c2f0" stroke-opacity=".4"/><circle cx="17" cy="15" r="3.5" fill="#56c2f0"/><text x="29" y="19.5" fill="#56c2f0" font-size="12.5" font-weight="600">guarded write-back</text></g>
|
|
40
|
+
<g transform="translate(1072 34)"><rect width="52" height="52" rx="16" fill="url(#dsh-tp-tile)" stroke="#56c2f0" stroke-opacity=".28"/>
|
|
41
|
+
<path transform="translate(14 14)" d="M15 4l5 5L7 22l-5-5Z M14 7l3 3M9 2h2M19 12h2M2 9h2" fill="none" stroke="#56c2f0" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"/></g>
|
|
42
|
+
|
|
43
|
+
<g transform="translate(56 146)" font-size="12">
|
|
44
|
+
<rect width="1068" height="210" rx="18" class="lane"/><text x="20" y="31" class="label">POLISH PATH — calls the model</text>
|
|
45
|
+
<g transform="translate(20 46)"><rect width="188" height="120" rx="12" class="soft"/><use href="#dsh-tp-marks" xlink:href="#dsh-tp-marks"/><text class="num" x="24" y="29">1</text><text class="strong" x="44" y="29" font-size="14">Begin</text>
|
|
46
|
+
<text class="copy"><tspan x="28" y="56">writeBack.begin() ticket</tspan> <tspan x="28" y="77">inFlight ref + seq guard</tspan> <tspan x="28" y="98">empty draft refused</tspan></text></g>
|
|
47
|
+
<g transform="translate(230 46)"><rect width="188" height="120" rx="12" class="soft"/><use href="#dsh-tp-marks" xlink:href="#dsh-tp-marks"/><text class="num" x="24" y="29">2</text><text class="strong" x="44" y="29" font-size="14">Assemble</text>
|
|
48
|
+
<text class="copy"><tspan x="28" y="56">draft + dir entries</tspan> <tspan x="28" y="77">recent real turns</tspan> <tspan x="28" y="98">cwd of the live session</tspan></text></g>
|
|
49
|
+
<g transform="translate(440 46)"><rect width="188" height="120" rx="12" class="soft"/><use href="#dsh-tp-marks" xlink:href="#dsh-tp-marks"/><text class="num" x="24" y="29">3</text><text class="strong" x="44" y="29" font-size="14">Model</text>
|
|
50
|
+
<text class="copy"><tspan x="28" y="56">request-only message</tspan> <tspan x="28" y="77">system = rules + cwd</tspan> <tspan x="28" y="98">stream; stop or fail</tspan></text></g>
|
|
51
|
+
<g transform="translate(650 46)"><rect width="398" height="120" rx="12" class="soft"/><path d="M199 14V106" fill="none" stroke="#fff" stroke-opacity=".14"/>
|
|
52
|
+
<use href="#dsh-tp-marks" xlink:href="#dsh-tp-marks"/><text class="num" x="24" y="29">4</text><text class="strong" x="44" y="29" font-size="14">Write back</text>
|
|
53
|
+
<text class="copy"><tspan x="28" y="56">recheck ticket+draftRev</tspan> <tspan x="28" y="77">phase must be plain</tspan> <tspan x="28" y="98">setDraft atomically</tspan></text>
|
|
54
|
+
<g transform="translate(210 0)"><use href="#dsh-tp-marks" xlink:href="#dsh-tp-marks"/><text class="num" x="24" y="29">5</text><text class="strong" x="44" y="29" font-size="14">Stale check</text>
|
|
55
|
+
<text class="copy"><tspan x="28" y="56">same call as write-back</tspan> <tspan x="28" y="77">changed → drop result</tspan> <tspan x="28" y="98">button flashes 4s</tspan></text></g>
|
|
56
|
+
</g>
|
|
57
|
+
<use href="#dsh-tp-arrow" xlink:href="#dsh-tp-arrow" x="213" y="106"/><use href="#dsh-tp-arrow" xlink:href="#dsh-tp-arrow" x="423" y="106"/><use href="#dsh-tp-arrow" xlink:href="#dsh-tp-arrow" x="633" y="106"/>
|
|
58
|
+
<text x="20" y="191" class="note">Timeout is organizeTimeoutMs plus a 5 s client slack; a failed or stale result never reaches the draft.</text>
|
|
59
|
+
</g>
|
|
60
|
+
|
|
61
|
+
<g transform="translate(56 370)" font-size="12">
|
|
62
|
+
<rect width="1068" height="210" rx="18" class="lane"/><text x="20" y="31" class="label">TEMPLATE PATH — no model call</text>
|
|
63
|
+
<g transform="translate(912 15)"><rect width="136" height="24" rx="12" fill="url(#dsh-tp-badge)" stroke="#4ed17e" stroke-opacity=".35"/><text x="68" y="16" text-anchor="middle" fill="#4ed17e" font-size="11.5" font-weight="600">zero model calls</text></g>
|
|
64
|
+
<g transform="translate(20 46)"><rect width="242" height="120" rx="12" class="soft"/><use href="#dsh-tp-marks" xlink:href="#dsh-tp-marks"/><text class="num" x="24" y="29">1</text><text class="strong" x="44" y="29" font-size="14">Pick</text>
|
|
65
|
+
<text class="copy"><tspan x="28" y="56">grouped dropdown</tspan> <tspan x="28" y="77">hover shows description</tspan> <tspan x="28" y="98">saved library or built-ins</tspan></text></g>
|
|
66
|
+
<g transform="translate(282 46)"><rect width="242" height="120" rx="12" class="soft"/><use href="#dsh-tp-marks" xlink:href="#dsh-tp-marks"/><text class="num" x="24" y="29">2</text><text class="strong" x="44" y="29" font-size="14">Capture</text>
|
|
67
|
+
<text class="copy"><tspan x="28" y="56">captureInsertion() span</tspan> <tspan x="28" y="77">selection + draftRev</tspan> <tspan x="28" y="98">insertion ticket</tspan></text></g>
|
|
68
|
+
<g transform="translate(544 46)"><rect width="242" height="120" rx="12" class="soft"/><use href="#dsh-tp-marks" xlink:href="#dsh-tp-marks"/><text class="num" x="24" y="29">3</text><text class="strong" x="44" y="29" font-size="14">Insert</text>
|
|
69
|
+
<text class="copy"><tspan x="28" y="56">insertText(text, span)</tspan> <tspan x="28" y="77">host validates version</tspan> <tspan x="28" y="98">invalid → refused</tspan></text></g>
|
|
70
|
+
<g transform="translate(806 46)"><rect width="242" height="120" rx="12" class="soft"/><use href="#dsh-tp-marks" xlink:href="#dsh-tp-marks"/><text class="num" x="24" y="29">4</text><text class="strong" x="44" y="29" font-size="14">Done</text>
|
|
71
|
+
<text class="copy"><tspan x="28" y="56">quotes/attachments intact</tspan> <tspan x="28" y="77">no whole-draft fallback</tspan> <tspan x="28" y="98">compose phase only</tspan></text></g>
|
|
72
|
+
<use href="#dsh-tp-arrow" xlink:href="#dsh-tp-arrow" x="266" y="106"/><use href="#dsh-tp-arrow" xlink:href="#dsh-tp-arrow" x="528" y="106"/><use href="#dsh-tp-arrow" xlink:href="#dsh-tp-arrow" x="790" y="106"/>
|
|
73
|
+
<text x="20" y="191" class="note">The insertion ticket is validated by the host input at the moment of insertion; a stale ticket is refused without replacing the draft.</text>
|
|
74
|
+
</g>
|
|
75
|
+
|
|
76
|
+
<g transform="translate(56 594)">
|
|
77
|
+
<rect width="1068" height="40" rx="12" class="soft"/><rect x="12" y="6" width="28" height="28" rx="8" fill="url(#dsh-tp-tile)" stroke="#56c2f0" stroke-opacity=".28"/>
|
|
78
|
+
<path transform="translate(18.5 12.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" fill="none" stroke="#56c2f0" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"/>
|
|
79
|
+
<text x="52" y="24.5" class="copy" font-size="12.3">Shared edges: both paths end in guarded host actions — no plugin HTTP routes, no direct DOM writes.</text>
|
|
80
|
+
</g>
|
|
81
|
+
<g transform="translate(56 648)"><rect width="1068" height="48" rx="14" class="soft"/><rect x="10" y="10" width="3" height="28" rx="1.5" fill="url(#dsh-tp-accent)"/>
|
|
82
|
+
<text x="24" y="29" class="copy" font-size="13.5">No model tools, no plugin HTTP routes; the role library is vendored upstream MIT data, never hand-edited.</text></g>
|
|
83
|
+
</svg>
|
|
@@ -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>
|