@henryqw/pi-herdr-tools 1.0.0
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/LICENSE +21 -0
- package/README.md +204 -0
- package/docs/btw-merge-sequence.html +156 -0
- package/docs/btw-merge-sequence.svg +138 -0
- package/docs/clone-flow.html +170 -0
- package/docs/clone-flow.svg +131 -0
- package/docs/done-flow.html +212 -0
- package/docs/done-flow.svg +166 -0
- package/docs/workflow-overview.html +114 -0
- package/docs/workflow-overview.svg +105 -0
- package/extensions/index.ts +12 -0
- package/internal/btw.ts +836 -0
- package/internal/clone-tab.ts +405 -0
- package/internal/config.ts +103 -0
- package/internal/context-store.ts +286 -0
- package/internal/core.ts +411 -0
- package/internal/done.ts +99 -0
- package/internal/merge.ts +317 -0
- package/internal/rename.ts +442 -0
- package/internal/router.ts +42 -0
- package/package.json +36 -0
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="1280" height="720" viewBox="0 0 1280 720" xmlns="http://www.w3.org/2000/svg" role="img" aria-labelledby="done-flow-title done-flow-desc">
|
|
3
|
+
<title id="done-flow-title">Safe worktree completion</title>
|
|
4
|
+
<desc id="done-flow-desc">Sequence showing /done waiting for Pi, requiring confirmation or explicit force, refusing unsafe normal removal, then closing workspace tabs around a conditional parent fast-forward whose failure does not stop final tab closure.</desc>
|
|
5
|
+
<defs>
|
|
6
|
+
<style>@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Geist:wght@400;500;600&family=Geist+Mono:wght@400;500;600&family=Noto+Sans+KR:wght@400;500;600&family=Noto+Serif+KR:wght@400&display=swap');</style>
|
|
7
|
+
<style>
|
|
8
|
+
.lifeline { stroke: rgba(16,24,40,.20); stroke-width: 1; stroke-dasharray: 4 4; }
|
|
9
|
+
.activation { fill: rgba(16,24,40,.06); stroke: #4c5665; stroke-width: .8; }
|
|
10
|
+
.fragment { fill: rgba(16,24,40,.02); stroke: rgba(16,24,40,.24); stroke-width: 1; }
|
|
11
|
+
.fragment-tab { fill: #f0eee9; stroke: rgba(16,24,40,.24); stroke-width: 1; }
|
|
12
|
+
.fragment-label { fill: #4c5665; font: 500 8px 'Geist Mono', monospace; text-anchor: middle; letter-spacing: .12em; }
|
|
13
|
+
.guard { fill: #4c5665; font: 400 8px 'Geist Mono', monospace; letter-spacing: .04em; }
|
|
14
|
+
.gate-badge { fill: rgba(29,78,216,.08); stroke: #1d4ed8; stroke-width: 1; }
|
|
15
|
+
.gate-label { fill: #1d4ed8; font: 500 8px 'Geist Mono', monospace; text-anchor: middle; letter-spacing: .08em; }
|
|
16
|
+
.message { fill: none; stroke: #4c5665; stroke-width: 1.2; marker-end: url(#done-flow-arrow); }
|
|
17
|
+
.message-return { fill: none; stroke: #4c5665; stroke-width: 1.2; stroke-dasharray: 4 4; marker-end: url(#done-flow-arrow); }
|
|
18
|
+
.message-accent { fill: none; stroke: #1d4ed8; stroke-width: 1.4; marker-end: url(#done-flow-arrow-accent); }
|
|
19
|
+
.label-mask { fill: #f0eee9; }
|
|
20
|
+
.message-label { fill: #4c5665; font: 400 8px 'Geist Mono', monospace; text-anchor: middle; letter-spacing: .04em; }
|
|
21
|
+
.message-label-accent { fill: #1d4ed8; font: 500 8px 'Geist Mono', monospace; text-anchor: middle; letter-spacing: .04em; }
|
|
22
|
+
.actor { fill: #fff; stroke: #101828; stroke-width: 1; }
|
|
23
|
+
.actor-input { fill: rgba(76,86,101,.10); stroke: #6a7282; stroke-width: 1; }
|
|
24
|
+
.actor-state { fill: rgba(16,24,40,.05); stroke: #4c5665; stroke-width: 1; }
|
|
25
|
+
.actor-name { fill: #101828; font: 600 12px 'Geist', sans-serif; text-anchor: middle; }
|
|
26
|
+
.actor-sub { fill: #4c5665; font: 400 9px 'Geist Mono', monospace; text-anchor: middle; letter-spacing: .04em; }
|
|
27
|
+
.boundary { stroke: rgba(16,24,40,.24); stroke-width: 1; stroke-dasharray: 4 4; }
|
|
28
|
+
.boundary-label { fill: #4c5665; font: 500 8px 'Geist Mono', monospace; text-anchor: middle; letter-spacing: .08em; }
|
|
29
|
+
.legend-label { fill: #4c5665; font: 400 8px 'Geist', sans-serif; }
|
|
30
|
+
.legend-title { fill: #6a7282; font: 500 8px 'Geist Mono', monospace; letter-spacing: .16em; }
|
|
31
|
+
</style>
|
|
32
|
+
<marker id="done-flow-arrow" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto">
|
|
33
|
+
<polygon points="0 0,8 3,0 6" fill="#4c5665"/>
|
|
34
|
+
</marker>
|
|
35
|
+
<marker id="done-flow-arrow-accent" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto">
|
|
36
|
+
<polygon points="0 0,8 3,0 6" fill="#1d4ed8"/>
|
|
37
|
+
</marker>
|
|
38
|
+
<marker id="done-flow-arrow-link" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto">
|
|
39
|
+
<polygon points="0 0,8 3,0 6" fill="#1d4ed8"/>
|
|
40
|
+
</marker>
|
|
41
|
+
</defs>
|
|
42
|
+
|
|
43
|
+
<rect width="1280" height="720" fill="#f0eee9"/>
|
|
44
|
+
|
|
45
|
+
<!-- Combined fragment frame and region divider -->
|
|
46
|
+
<rect class="fragment" x="120" y="200" width="544" height="232" rx="4"/>
|
|
47
|
+
<line x1="128" y1="352" x2="656" y2="352" stroke="rgba(16,24,40,.20)" stroke-width="1" stroke-dasharray="4 4"/>
|
|
48
|
+
|
|
49
|
+
<!-- Lifelines -->
|
|
50
|
+
<line class="lifeline" x1="136" y1="96" x2="136" y2="624"/>
|
|
51
|
+
<line class="lifeline" x1="404" y1="96" x2="404" y2="624"/>
|
|
52
|
+
<line class="lifeline" x1="652" y1="96" x2="652" y2="624"/>
|
|
53
|
+
<line class="lifeline" x1="1124" y1="96" x2="1124" y2="624"/>
|
|
54
|
+
|
|
55
|
+
<!-- Activation bars -->
|
|
56
|
+
<rect class="activation" x="400" y="124" width="8" height="476"/>
|
|
57
|
+
<rect class="activation" x="648" y="304" width="8" height="32"/>
|
|
58
|
+
<rect class="activation" x="648" y="456" width="8" height="16"/>
|
|
59
|
+
<rect class="activation" x="1120" y="544" width="8" height="24"/>
|
|
60
|
+
|
|
61
|
+
<!-- Fragment labels sit above lifelines for legibility -->
|
|
62
|
+
<rect class="fragment-tab" x="120" y="200" width="40" height="16" rx="4"/>
|
|
63
|
+
<text class="fragment-label" x="140" y="212">ALT</text>
|
|
64
|
+
<rect class="gate-badge" x="168" y="200" width="104" height="16" rx="4"/>
|
|
65
|
+
<text class="gate-label" x="220" y="212">SAFETY GATE</text>
|
|
66
|
+
<rect class="label-mask" x="128" y="220" width="528" height="16"/>
|
|
67
|
+
<text class="guard" x="132" y="232">[normal /done]</text>
|
|
68
|
+
<text class="guard" x="260" y="232">CONFIRM; DIRTY OR OTHER-WORKSPACE TAB USING CHECKOUT → REFUSE</text>
|
|
69
|
+
<rect class="label-mask" x="128" y="360" width="528" height="16"/>
|
|
70
|
+
<text class="guard" x="132" y="372">[explicit --force]</text>
|
|
71
|
+
<text class="guard" x="260" y="372">PERMITS FORCED REMOVAL · IRREVERSIBLE</text>
|
|
72
|
+
|
|
73
|
+
<!-- Messages: time flows downward -->
|
|
74
|
+
<line class="message" x1="136" y1="124" x2="400" y2="124"/>
|
|
75
|
+
<rect class="label-mask" x="200" y="104" width="136" height="12" rx="4"/>
|
|
76
|
+
<text class="message-label" x="268" y="112">RUN /DONE [--FORCE]</text>
|
|
77
|
+
|
|
78
|
+
<path class="message" d="M408 148 H452 Q460 148 460 156 V172 Q460 180 452 180 H412"/>
|
|
79
|
+
<rect class="label-mask" x="468" y="156" width="112" height="12" rx="4"/>
|
|
80
|
+
<text class="message-label" x="524" y="164">WAIT FOR PI IDLE</text>
|
|
81
|
+
|
|
82
|
+
<line class="message" x1="400" y1="256" x2="136" y2="256"/>
|
|
83
|
+
<rect class="label-mask" x="208" y="236" width="120" height="12" rx="4"/>
|
|
84
|
+
<text class="message-label" x="268" y="244">CONFIRM REMOVAL?</text>
|
|
85
|
+
|
|
86
|
+
<line class="message-return" x1="136" y1="280" x2="400" y2="280"/>
|
|
87
|
+
<rect class="label-mask" x="228" y="260" width="80" height="12" rx="4"/>
|
|
88
|
+
<text class="message-label" x="268" y="268">CONFIRMED</text>
|
|
89
|
+
|
|
90
|
+
<line class="message" x1="408" y1="304" x2="648" y2="304"/>
|
|
91
|
+
<rect class="label-mask" x="480" y="284" width="96" height="12" rx="4"/>
|
|
92
|
+
<text class="message-label" x="528" y="292">CHECK SAFETY</text>
|
|
93
|
+
|
|
94
|
+
<line class="message-return" x1="648" y1="328" x2="408" y2="328"/>
|
|
95
|
+
<rect class="label-mask" x="484" y="308" width="88" height="12" rx="4"/>
|
|
96
|
+
<text class="message-label" x="528" y="316">CLEAR / REFUSE</text>
|
|
97
|
+
|
|
98
|
+
<path class="message" d="M408 396 H452 Q460 396 460 404 V412 Q460 420 452 420 H412"/>
|
|
99
|
+
<rect class="label-mask" x="468" y="400" width="104" height="12" rx="4"/>
|
|
100
|
+
<text class="message-label" x="520" y="408">ACCEPT --FORCE</text>
|
|
101
|
+
|
|
102
|
+
<line class="message-accent" x1="408" y1="464" x2="648" y2="464"/>
|
|
103
|
+
<rect class="label-mask" x="448" y="436" width="160" height="20" rx="4"/>
|
|
104
|
+
<text class="message-label-accent" x="528" y="444">CLEAR OR EXPLICIT FORCE</text>
|
|
105
|
+
<text class="message-label-accent" x="528" y="452">REMOVE WORKTREE</text>
|
|
106
|
+
|
|
107
|
+
<!-- Successful removal is the partial-success boundary -->
|
|
108
|
+
<line class="boundary" x1="40" y1="488" x2="392" y2="488"/>
|
|
109
|
+
<line class="boundary" x1="888" y1="488" x2="1240" y2="488"/>
|
|
110
|
+
<text class="boundary-label" x="640" y="492">PARTIAL-SUCCESS BOUNDARY · WORKTREE REMOVED</text>
|
|
111
|
+
|
|
112
|
+
<line class="message" x1="400" y1="516" x2="136" y2="516"/>
|
|
113
|
+
<rect class="label-mask" x="180" y="496" width="176" height="12" rx="4"/>
|
|
114
|
+
<text class="message-label" x="268" y="504">CLOSE OTHER WORKSPACE TABS</text>
|
|
115
|
+
|
|
116
|
+
<line class="message" x1="408" y1="544" x2="1120" y2="544"/>
|
|
117
|
+
<rect class="label-mask" x="684" y="516" width="160" height="20" rx="4"/>
|
|
118
|
+
<text class="message-label" x="764" y="524">IF LINKED + NON-BARE PRIMARY</text>
|
|
119
|
+
<text class="message-label" x="764" y="532">LOCK + FAST-FORWARD ONLY</text>
|
|
120
|
+
|
|
121
|
+
<line class="message-return" x1="1120" y1="568" x2="408" y2="568"/>
|
|
122
|
+
<rect class="label-mask" x="696" y="548" width="136" height="12" rx="4"/>
|
|
123
|
+
<text class="message-label" x="764" y="556">UPDATED OR FAILED</text>
|
|
124
|
+
|
|
125
|
+
<line class="message" x1="400" y1="600" x2="136" y2="600"/>
|
|
126
|
+
<rect class="label-mask" x="184" y="580" width="168" height="12" rx="4"/>
|
|
127
|
+
<text class="message-label" x="268" y="588">ALWAYS CLOSE CURRENT TAB</text>
|
|
128
|
+
|
|
129
|
+
<!-- Actors are drawn after messages -->
|
|
130
|
+
<rect x="56" y="40" width="160" height="56" rx="6" fill="#f0eee9"/>
|
|
131
|
+
<rect class="actor-input" x="56" y="40" width="160" height="56" rx="6"/>
|
|
132
|
+
<text class="actor-name" x="136" y="68">Herdr workspace</text>
|
|
133
|
+
<text class="actor-sub" x="136" y="84">CURRENT + OTHER TABS</text>
|
|
134
|
+
|
|
135
|
+
<rect x="324" y="40" width="160" height="56" rx="6" fill="#f0eee9"/>
|
|
136
|
+
<rect class="actor" x="324" y="40" width="160" height="56" rx="6"/>
|
|
137
|
+
<text class="actor-name" x="404" y="68">Pi /done</text>
|
|
138
|
+
<text class="actor-sub" x="404" y="84">IDLE BEFORE CLEANUP</text>
|
|
139
|
+
|
|
140
|
+
<rect x="572" y="40" width="160" height="56" rx="6" fill="#f0eee9"/>
|
|
141
|
+
<rect class="actor-state" x="572" y="40" width="160" height="56" rx="6"/>
|
|
142
|
+
<text class="actor-name" x="652" y="68">Removal gate</text>
|
|
143
|
+
<text class="actor-sub" x="652" y="84">WORKTREE + TAB USE</text>
|
|
144
|
+
|
|
145
|
+
<rect x="1044" y="40" width="160" height="56" rx="6" fill="#f0eee9"/>
|
|
146
|
+
<rect class="actor" x="1044" y="40" width="160" height="56" rx="6"/>
|
|
147
|
+
<text class="actor-name" x="1124" y="68">Parent checkout</text>
|
|
148
|
+
<text class="actor-sub" x="1124" y="84">CONDITIONAL UPDATE</text>
|
|
149
|
+
|
|
150
|
+
<!-- Legend strip -->
|
|
151
|
+
<line x1="40" y1="640" x2="1240" y2="640" stroke="rgba(16,24,40,.141)" stroke-width=".8"/>
|
|
152
|
+
<text class="legend-title" x="40" y="668">LEGEND</text>
|
|
153
|
+
|
|
154
|
+
<line class="message" x1="128" y1="664" x2="164" y2="664"/>
|
|
155
|
+
<text class="legend-label" x="176" y="668">Action</text>
|
|
156
|
+
|
|
157
|
+
<line class="message-return" x1="264" y1="664" x2="300" y2="664"/>
|
|
158
|
+
<text class="legend-label" x="312" y="668">Return or result</text>
|
|
159
|
+
|
|
160
|
+
<rect class="fragment" x="448" y="656" width="32" height="16" rx="4"/>
|
|
161
|
+
<text class="fragment-label" x="464" y="668">ALT</text>
|
|
162
|
+
<text class="legend-label" x="492" y="668">Safety branch</text>
|
|
163
|
+
|
|
164
|
+
<line class="message-accent" x1="624" y1="664" x2="660" y2="664"/>
|
|
165
|
+
<text class="legend-label" x="672" y="668">Successful removal</text>
|
|
166
|
+
</svg>
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<title>Herdr tools: one extension, four workflows</title>
|
|
7
|
+
<link href="https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Geist:wght@400;500;600&family=Geist+Mono:wght@400;500;600&display=swap" rel="stylesheet">
|
|
8
|
+
<style>
|
|
9
|
+
* { box-sizing: border-box; }
|
|
10
|
+
body { margin: 0; padding: 24px; background: #f0eee9; color: #101828; }
|
|
11
|
+
main { width: min(1280px, 100%); min-width: 0; margin: auto; }
|
|
12
|
+
.diagram-container { width: 100%; overflow-x: auto; }
|
|
13
|
+
svg { display: block; width: 100%; min-width: 1280px; height: auto; }
|
|
14
|
+
@media print { .diagram-container { overflow-x: visible; } svg { min-width: 0; } }
|
|
15
|
+
</style>
|
|
16
|
+
</head>
|
|
17
|
+
<body>
|
|
18
|
+
<main>
|
|
19
|
+
<div class="diagram-container">
|
|
20
|
+
<svg width="1280" height="720" viewBox="0 0 1280 720" xmlns="http://www.w3.org/2000/svg" role="img" aria-labelledby="workflow-overview-title workflow-overview-desc">
|
|
21
|
+
<title id="workflow-overview-title">Herdr tools: one extension, four workflows</title>
|
|
22
|
+
<desc id="workflow-overview-desc">One Pi extension registers clone, side-question, title, and completion handlers that share the Herdr CLI library, with task-model routing used only for side questions and titles.</desc>
|
|
23
|
+
<defs>
|
|
24
|
+
<style>
|
|
25
|
+
.title { fill: #101828; font: 400 28px 'Instrument Serif', Georgia, serif; }
|
|
26
|
+
.name { fill: #101828; font: 600 12px 'Geist', system-ui, sans-serif; }
|
|
27
|
+
.body { fill: #4c5665; font: 400 12px 'Geist', system-ui, sans-serif; }
|
|
28
|
+
.technical { fill: #4c5665; font: 400 8px 'Geist Mono', ui-monospace, monospace; }
|
|
29
|
+
.tag { fill: #6a7282; font: 500 8px 'Geist Mono', ui-monospace, monospace; letter-spacing: .12em; }
|
|
30
|
+
.node { fill: #ffffff; stroke: #101828; stroke-width: 1; }
|
|
31
|
+
.focal { fill: #1d4ed8; fill-opacity: .08; stroke: #1d4ed8; stroke-width: 1.2; }
|
|
32
|
+
.edge { fill: none; stroke: #4c5665; stroke-width: 1.2; marker-end: url(#arrow); }
|
|
33
|
+
.primary { fill: none; stroke: #1d4ed8; stroke-width: 1.4; marker-end: url(#arrow-accent); }
|
|
34
|
+
</style>
|
|
35
|
+
<marker id="arrow" markerWidth="8" markerHeight="6" refX="8" refY="3" orient="auto"><path d="M0 0 L8 3 L0 6 Z" fill="#4c5665"/></marker>
|
|
36
|
+
<marker id="arrow-accent" markerWidth="8" markerHeight="6" refX="8" refY="3" orient="auto"><path d="M0 0 L8 3 L0 6 Z" fill="#1d4ed8"/></marker>
|
|
37
|
+
</defs>
|
|
38
|
+
<rect width="1280" height="720" fill="#f0eee9"/>
|
|
39
|
+
<text class="title" x="40" y="56">One extension, four workflows</text>
|
|
40
|
+
<text class="technical" x="1240" y="56" text-anchor="end">@henryqw/pi-herdr-tools</text>
|
|
41
|
+
<rect x="552" y="76" width="288" height="540" rx="8" fill="#e6e4de" stroke="#101828" stroke-opacity=".12"/>
|
|
42
|
+
<text class="tag" x="568" y="92">INTERNAL HANDLERS</text>
|
|
43
|
+
<path class="primary" d="M208 336 H248"/>
|
|
44
|
+
<path class="edge" d="M464 288 H488 Q496 288 496 280 V168 Q496 160 504 160 H568"/>
|
|
45
|
+
<path class="edge" d="M464 320 H500 Q508 320 508 312 V296 Q508 288 516 288 H568"/>
|
|
46
|
+
<path class="edge" d="M464 352 H524 Q532 352 532 360 V408 Q532 416 540 416 H568"/>
|
|
47
|
+
<path class="edge" d="M464 384 H512 Q520 384 520 392 V536 Q520 544 528 544 H568"/>
|
|
48
|
+
<path class="edge" d="M840 256 H1040"/>
|
|
49
|
+
<path class="edge" d="M840 436 H1040"/>
|
|
50
|
+
<rect x="896" y="232" width="88" height="14" rx="2" fill="#f0eee9"/>
|
|
51
|
+
<text class="tag" x="940" y="242" text-anchor="middle">CLI CALLS</text>
|
|
52
|
+
<rect x="896" y="412" width="88" height="14" rx="2" fill="#f0eee9"/>
|
|
53
|
+
<text class="tag" x="940" y="422" text-anchor="middle">MODEL ROUTES</text>
|
|
54
|
+
<g>
|
|
55
|
+
<rect class="node" x="40" y="288" width="168" height="96" rx="6"/>
|
|
56
|
+
<text class="tag" x="56" y="312">HOST</text>
|
|
57
|
+
<text class="name" x="56" y="336">Pi session</text>
|
|
58
|
+
<text class="technical" x="56" y="360">Pi 1.x</text>
|
|
59
|
+
</g>
|
|
60
|
+
<g>
|
|
61
|
+
<rect class="focal" x="248" y="256" width="216" height="160" rx="6"/>
|
|
62
|
+
<text class="tag" x="264" y="280">ONE LOADED EXTENSION</text>
|
|
63
|
+
<text class="name" x="264" y="316">Herdr tools</text>
|
|
64
|
+
<text class="technical" x="264" y="340">extensions/index.ts</text>
|
|
65
|
+
<text class="body" x="264" y="372">Registers all four handlers.</text>
|
|
66
|
+
<text class="body" x="264" y="392">Not separate resources.</text>
|
|
67
|
+
</g>
|
|
68
|
+
<g>
|
|
69
|
+
<rect class="node" x="568" y="112" width="240" height="96" rx="6"/>
|
|
70
|
+
<text class="technical" x="584" y="136">internal/clone-tab.ts</text>
|
|
71
|
+
<text class="name" x="584" y="160">Clone conversations</text>
|
|
72
|
+
<text class="technical" x="584" y="184">/clone-tab · /clone-worktree</text>
|
|
73
|
+
</g>
|
|
74
|
+
<g>
|
|
75
|
+
<rect class="node" x="568" y="240" width="240" height="96" rx="6"/>
|
|
76
|
+
<text class="technical" x="584" y="264">internal/btw.ts</text>
|
|
77
|
+
<text class="name" x="584" y="288">Ask and merge side questions</text>
|
|
78
|
+
<text class="technical" x="584" y="312">/btw · /btw merge</text>
|
|
79
|
+
</g>
|
|
80
|
+
<g>
|
|
81
|
+
<rect class="node" x="568" y="368" width="240" height="96" rx="6"/>
|
|
82
|
+
<text class="technical" x="584" y="392">internal/rename.ts</text>
|
|
83
|
+
<text class="name" x="584" y="416">Name conversations</text>
|
|
84
|
+
<text class="technical" x="584" y="440">/rename · automatic titles</text>
|
|
85
|
+
</g>
|
|
86
|
+
<g>
|
|
87
|
+
<rect class="node" x="568" y="496" width="240" height="96" rx="6"/>
|
|
88
|
+
<text class="technical" x="584" y="520">internal/done.ts</text>
|
|
89
|
+
<text class="name" x="584" y="544">Finish worktrees</text>
|
|
90
|
+
<text class="technical" x="584" y="568">/done [--force]</text>
|
|
91
|
+
</g>
|
|
92
|
+
<g>
|
|
93
|
+
<rect class="node" x="1040" y="208" width="200" height="96" rx="6"/>
|
|
94
|
+
<text class="technical" x="1056" y="232">@henryqw/pi-herdr</text>
|
|
95
|
+
<text class="name" x="1056" y="256">Shared Herdr CLI library</text>
|
|
96
|
+
<text class="body" x="1056" y="280">Used by all four handlers.</text>
|
|
97
|
+
</g>
|
|
98
|
+
<g>
|
|
99
|
+
<rect class="node" x="1040" y="388" width="200" height="96" rx="6"/>
|
|
100
|
+
<text class="technical" x="1056" y="412">@henryqw/pi-task-models</text>
|
|
101
|
+
<text class="name" x="1056" y="436">Shared task-model routing</text>
|
|
102
|
+
<text class="body" x="1056" y="460">Side questions and titles only.</text>
|
|
103
|
+
</g>
|
|
104
|
+
<line x1="40" y1="656" x2="1240" y2="656" stroke="#101828" stroke-opacity=".12"/>
|
|
105
|
+
<path class="primary" d="M40 680 H72"/>
|
|
106
|
+
<text class="body" x="84" y="684">Extension loading</text>
|
|
107
|
+
<path class="edge" d="M256 680 H288"/>
|
|
108
|
+
<text class="body" x="300" y="684">Registration or shared dependency</text>
|
|
109
|
+
<text class="body" x="1240" y="684" text-anchor="end">Detailed safety and recovery flows remain below.</text>
|
|
110
|
+
</svg>
|
|
111
|
+
</div>
|
|
112
|
+
</main>
|
|
113
|
+
</body>
|
|
114
|
+
</html>
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="1280" height="720" viewBox="0 0 1280 720" xmlns="http://www.w3.org/2000/svg" role="img" aria-labelledby="workflow-overview-title workflow-overview-desc" id="workflow-overview-root">
|
|
3
|
+
<title id="workflow-overview-title">Herdr tools: one extension, four workflows</title>
|
|
4
|
+
<desc id="workflow-overview-desc">One Pi extension registers clone, side-question, title, and completion handlers that share the Herdr CLI library, with task-model routing used only for side questions and titles.</desc>
|
|
5
|
+
<defs>
|
|
6
|
+
<style>@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Geist:wght@400;500;600&family=Geist+Mono:wght@400;500;600&family=Noto+Serif:ital@0;1&family=Noto+Sans+KR:wght@400;500;600&family=Noto+Serif+KR:wght@400&family=Noto+Sans+TC:wght@400;500;600&family=Noto+Serif+TC:wght@400&display=swap');
|
|
7
|
+
#workflow-overview-root { color: #101828; }
|
|
8
|
+
#workflow-overview-root .diagram-container { width: 100%; overflow-x: auto; }
|
|
9
|
+
#workflow-overview-root .diagram-container { overflow-x: visible; }
|
|
10
|
+
#workflow-overview-root .title { fill: #101828; font: 400 28px 'Instrument Serif', Georgia, serif; }
|
|
11
|
+
#workflow-overview-root .name { fill: #101828; font: 600 12px 'Geist', system-ui, sans-serif; }
|
|
12
|
+
#workflow-overview-root .body { fill: #4c5665; font: 400 12px 'Geist', system-ui, sans-serif; }
|
|
13
|
+
#workflow-overview-root .technical { fill: #4c5665; font: 400 8px 'Geist Mono', ui-monospace, monospace; }
|
|
14
|
+
#workflow-overview-root .tag { fill: #6a7282; font: 500 8px 'Geist Mono', ui-monospace, monospace; letter-spacing: .12em; }
|
|
15
|
+
#workflow-overview-root .node { fill: #ffffff; stroke: #101828; stroke-width: 1; }
|
|
16
|
+
#workflow-overview-root .focal { fill: #1d4ed8; fill-opacity: .08; stroke: #1d4ed8; stroke-width: 1.2; }
|
|
17
|
+
#workflow-overview-root .edge { fill: none; stroke: #4c5665; stroke-width: 1.2; marker-end: url(#workflow-overview-arrow); }
|
|
18
|
+
#workflow-overview-root .primary { fill: none; stroke: #1d4ed8; stroke-width: 1.4; marker-end: url(#workflow-overview-arrow-accent); }</style>
|
|
19
|
+
<style>
|
|
20
|
+
.title { fill: #101828; font: 400 28px 'Instrument Serif', Georgia, serif; }
|
|
21
|
+
.name { fill: #101828; font: 600 12px 'Geist', system-ui, sans-serif; }
|
|
22
|
+
.body { fill: #4c5665; font: 400 12px 'Geist', system-ui, sans-serif; }
|
|
23
|
+
.technical { fill: #4c5665; font: 400 8px 'Geist Mono', ui-monospace, monospace; }
|
|
24
|
+
.tag { fill: #6a7282; font: 500 8px 'Geist Mono', ui-monospace, monospace; letter-spacing: .12em; }
|
|
25
|
+
.node { fill: #ffffff; stroke: #101828; stroke-width: 1; }
|
|
26
|
+
.focal { fill: #1d4ed8; fill-opacity: .08; stroke: #1d4ed8; stroke-width: 1.2; }
|
|
27
|
+
.edge { fill: none; stroke: #4c5665; stroke-width: 1.2; marker-end: url(#workflow-overview-arrow); }
|
|
28
|
+
.primary { fill: none; stroke: #1d4ed8; stroke-width: 1.4; marker-end: url(#workflow-overview-arrow-accent); }
|
|
29
|
+
</style>
|
|
30
|
+
<marker id="workflow-overview-arrow" markerWidth="8" markerHeight="6" refX="8" refY="3" orient="auto"><path d="M0 0 L8 3 L0 6 Z" fill="#4c5665"/></marker>
|
|
31
|
+
<marker id="workflow-overview-arrow-accent" markerWidth="8" markerHeight="6" refX="8" refY="3" orient="auto"><path d="M0 0 L8 3 L0 6 Z" fill="#1d4ed8"/></marker>
|
|
32
|
+
</defs>
|
|
33
|
+
<rect width="1280" height="720" fill="#f0eee9"/>
|
|
34
|
+
<text class="title" x="40" y="56">One extension, four workflows</text>
|
|
35
|
+
<text class="technical" x="1240" y="56" text-anchor="end">@henryqw/pi-herdr-tools</text>
|
|
36
|
+
<rect x="552" y="76" width="288" height="540" rx="8" fill="#e6e4de" stroke="#101828" stroke-opacity=".12"/>
|
|
37
|
+
<text class="tag" x="568" y="92">INTERNAL HANDLERS</text>
|
|
38
|
+
<path class="primary" d="M208 336 H248"/>
|
|
39
|
+
<path class="edge" d="M464 288 H488 Q496 288 496 280 V168 Q496 160 504 160 H568"/>
|
|
40
|
+
<path class="edge" d="M464 320 H500 Q508 320 508 312 V296 Q508 288 516 288 H568"/>
|
|
41
|
+
<path class="edge" d="M464 352 H524 Q532 352 532 360 V408 Q532 416 540 416 H568"/>
|
|
42
|
+
<path class="edge" d="M464 384 H512 Q520 384 520 392 V536 Q520 544 528 544 H568"/>
|
|
43
|
+
<path class="edge" d="M840 256 H1040"/>
|
|
44
|
+
<path class="edge" d="M840 436 H1040"/>
|
|
45
|
+
<rect x="896" y="232" width="88" height="14" rx="2" fill="#f0eee9"/>
|
|
46
|
+
<text class="tag" x="940" y="242" text-anchor="middle">CLI CALLS</text>
|
|
47
|
+
<rect x="896" y="412" width="88" height="14" rx="2" fill="#f0eee9"/>
|
|
48
|
+
<text class="tag" x="940" y="422" text-anchor="middle">MODEL ROUTES</text>
|
|
49
|
+
<g>
|
|
50
|
+
<rect class="node" x="40" y="288" width="168" height="96" rx="6"/>
|
|
51
|
+
<text class="tag" x="56" y="312">HOST</text>
|
|
52
|
+
<text class="name" x="56" y="336">Pi session</text>
|
|
53
|
+
<text class="technical" x="56" y="360">Pi 1.x</text>
|
|
54
|
+
</g>
|
|
55
|
+
<g>
|
|
56
|
+
<rect class="focal" x="248" y="256" width="216" height="160" rx="6"/>
|
|
57
|
+
<text class="tag" x="264" y="280">ONE LOADED EXTENSION</text>
|
|
58
|
+
<text class="name" x="264" y="316">Herdr tools</text>
|
|
59
|
+
<text class="technical" x="264" y="340">extensions/index.ts</text>
|
|
60
|
+
<text class="body" x="264" y="372">Registers all four handlers.</text>
|
|
61
|
+
<text class="body" x="264" y="392">Not separate resources.</text>
|
|
62
|
+
</g>
|
|
63
|
+
<g>
|
|
64
|
+
<rect class="node" x="568" y="112" width="240" height="96" rx="6"/>
|
|
65
|
+
<text class="technical" x="584" y="136">internal/clone-tab.ts</text>
|
|
66
|
+
<text class="name" x="584" y="160">Clone conversations</text>
|
|
67
|
+
<text class="technical" x="584" y="184">/clone-tab · /clone-worktree</text>
|
|
68
|
+
</g>
|
|
69
|
+
<g>
|
|
70
|
+
<rect class="node" x="568" y="240" width="240" height="96" rx="6"/>
|
|
71
|
+
<text class="technical" x="584" y="264">internal/btw.ts</text>
|
|
72
|
+
<text class="name" x="584" y="288">Ask and merge side questions</text>
|
|
73
|
+
<text class="technical" x="584" y="312">/btw · /btw merge</text>
|
|
74
|
+
</g>
|
|
75
|
+
<g>
|
|
76
|
+
<rect class="node" x="568" y="368" width="240" height="96" rx="6"/>
|
|
77
|
+
<text class="technical" x="584" y="392">internal/rename.ts</text>
|
|
78
|
+
<text class="name" x="584" y="416">Name conversations</text>
|
|
79
|
+
<text class="technical" x="584" y="440">/rename · automatic titles</text>
|
|
80
|
+
</g>
|
|
81
|
+
<g>
|
|
82
|
+
<rect class="node" x="568" y="496" width="240" height="96" rx="6"/>
|
|
83
|
+
<text class="technical" x="584" y="520">internal/done.ts</text>
|
|
84
|
+
<text class="name" x="584" y="544">Finish worktrees</text>
|
|
85
|
+
<text class="technical" x="584" y="568">/done [--force]</text>
|
|
86
|
+
</g>
|
|
87
|
+
<g>
|
|
88
|
+
<rect class="node" x="1040" y="208" width="200" height="96" rx="6"/>
|
|
89
|
+
<text class="technical" x="1056" y="232">@henryqw/pi-herdr</text>
|
|
90
|
+
<text class="name" x="1056" y="256">Shared Herdr CLI library</text>
|
|
91
|
+
<text class="body" x="1056" y="280">Used by all four handlers.</text>
|
|
92
|
+
</g>
|
|
93
|
+
<g>
|
|
94
|
+
<rect class="node" x="1040" y="388" width="200" height="96" rx="6"/>
|
|
95
|
+
<text class="technical" x="1056" y="412">@henryqw/pi-task-models</text>
|
|
96
|
+
<text class="name" x="1056" y="436">Shared task-model routing</text>
|
|
97
|
+
<text class="body" x="1056" y="460">Side questions and titles only.</text>
|
|
98
|
+
</g>
|
|
99
|
+
<line x1="40" y1="656" x2="1240" y2="656" stroke="#101828" stroke-opacity=".12"/>
|
|
100
|
+
<path class="primary" d="M40 680 H72"/>
|
|
101
|
+
<text class="body" x="84" y="684">Extension loading</text>
|
|
102
|
+
<path class="edge" d="M256 680 H288"/>
|
|
103
|
+
<text class="body" x="300" y="684">Registration or shared dependency</text>
|
|
104
|
+
<text class="body" x="1240" y="684" text-anchor="end">Detailed safety and recovery flows remain below.</text>
|
|
105
|
+
</svg>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
2
|
+
import registerBtwExtension from "../internal/btw.ts";
|
|
3
|
+
import herdrCloneExtension from "../internal/clone-tab.ts";
|
|
4
|
+
import herdrDoneExtension from "../internal/done.ts";
|
|
5
|
+
import herdrRenameExtension from "../internal/rename.ts";
|
|
6
|
+
|
|
7
|
+
export default async function herdrToolsExtension(pi: ExtensionAPI): Promise<void> {
|
|
8
|
+
herdrRenameExtension(pi);
|
|
9
|
+
await registerBtwExtension(pi);
|
|
10
|
+
herdrCloneExtension(pi);
|
|
11
|
+
herdrDoneExtension(pi);
|
|
12
|
+
}
|