opencode-global-habit-profile 0.0.0-stage → 0.2.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 +87 -2
- package/dist/assets/index-CMgH-UX9.js +21 -0
- package/dist/assets/index-CX37tAhW.css +1 -0
- package/dist/index.html +4 -0
- package/docs/mcp-setup.md +32 -0
- package/docs/metrics.md +200 -0
- package/index.js +501 -0
- package/package.json +51 -4
- package/src/App.vue +753 -0
- package/src/mcp.js +39 -0
- package/src/metrics.js +614 -0
- package/src/plugin-stats.js +215 -0
- package/src/store.js +296 -0
- package/src/ui-model.js +184 -0
- package/src/ui-navigation.js +13 -0
- package/src/ui-server.js +300 -0
- package/src/ui.css +221 -0
- package/src/ui.js +5 -0
package/src/ui.css
ADDED
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
color-scheme: dark;
|
|
3
|
+
--canvas: #0b1119;
|
|
4
|
+
--surface: #101923;
|
|
5
|
+
--surface-raised: #141f2b;
|
|
6
|
+
--ink: #dce6ed;
|
|
7
|
+
--muted: #91a2b1;
|
|
8
|
+
--brand: #59d6c8;
|
|
9
|
+
--danger: #ed8589;
|
|
10
|
+
--series-commands: #b69af7;
|
|
11
|
+
--series-input: #7cc7ff;
|
|
12
|
+
--series-cache: #59d6c8;
|
|
13
|
+
--series-output: #f0b86e;
|
|
14
|
+
--line: color-mix(in srgb, var(--ink) 12%, transparent);
|
|
15
|
+
--line-soft: color-mix(in srgb, var(--ink) 7%, transparent);
|
|
16
|
+
--focus: var(--brand);
|
|
17
|
+
background: var(--canvas);
|
|
18
|
+
color: var(--ink);
|
|
19
|
+
font: 14px/1.5 system-ui, sans-serif;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
:root[data-theme="light"] {
|
|
23
|
+
color-scheme: light;
|
|
24
|
+
--canvas: #f2f6f8;
|
|
25
|
+
--surface: #ffffff;
|
|
26
|
+
--surface-raised: #e8eff2;
|
|
27
|
+
--ink: #172733;
|
|
28
|
+
--muted: #536a78;
|
|
29
|
+
--brand: #087d75;
|
|
30
|
+
--danger: #a8323c;
|
|
31
|
+
--series-commands: #6045a8;
|
|
32
|
+
--series-input: #0b5f8a;
|
|
33
|
+
--series-cache: #087d75;
|
|
34
|
+
--series-output: #8a4b00;
|
|
35
|
+
--line: color-mix(in srgb, var(--ink) 17%, transparent);
|
|
36
|
+
--line-soft: color-mix(in srgb, var(--ink) 10%, transparent);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
* { box-sizing: border-box; }
|
|
40
|
+
html { scroll-behavior: smooth; }
|
|
41
|
+
body { margin: 0; background: var(--canvas); color: var(--ink); }
|
|
42
|
+
button, select { color: inherit; font: inherit; }
|
|
43
|
+
|
|
44
|
+
.app-shell { min-height: 100vh; background: var(--canvas); }
|
|
45
|
+
.sidebar {
|
|
46
|
+
display: flex;
|
|
47
|
+
flex-wrap: wrap;
|
|
48
|
+
align-items: center;
|
|
49
|
+
gap: .75rem 1rem;
|
|
50
|
+
padding: .875rem 1rem .75rem;
|
|
51
|
+
border-bottom: 1px solid var(--line);
|
|
52
|
+
background: var(--canvas);
|
|
53
|
+
}
|
|
54
|
+
.brand { color: var(--ink); font-size: 1rem; font-weight: 750; letter-spacing: -.035em; text-decoration: none; white-space: nowrap; }
|
|
55
|
+
.brand::before { content: "HM"; display: inline-grid; width: 1.75rem; height: 1.75rem; margin-right: .55rem; place-items: center; border: 1px solid color-mix(in srgb, var(--brand) 55%, transparent); border-radius: .35rem; color: var(--brand); font-size: .65rem; letter-spacing: .02em; vertical-align: -.2rem; }
|
|
56
|
+
.sidebar-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; flex: none; gap: .25rem; padding: .2rem; border: 1px solid var(--line-soft); border-radius: .45rem; background: var(--surface); }
|
|
57
|
+
.sidebar-nav a { flex: 1; min-width: 0; padding: .45rem .55rem; border-radius: .3rem; color: var(--muted); font-size: .82rem; font-weight: 650; overflow-wrap: anywhere; text-align: center; text-decoration: none; }
|
|
58
|
+
.sidebar-nav a:hover, .sidebar-nav a:focus-visible { color: var(--ink); background: var(--surface-raised); }
|
|
59
|
+
.sidebar-nav a[aria-current="page"] { color: color-mix(in srgb, var(--brand) 90%, var(--ink)); background: var(--surface-raised); }
|
|
60
|
+
.local-note { flex: 1 1 9rem; max-width: 13rem; margin: 0; color: var(--muted); font-size: .75rem; }
|
|
61
|
+
.workspace { min-width: 0; }
|
|
62
|
+
.masthead { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; padding: 1.4rem 1rem 1.1rem; border-bottom: 1px solid var(--line-soft); }
|
|
63
|
+
.eyebrow { margin: 0 0 .35rem; color: var(--brand); font-size: .68rem; font-weight: 750; letter-spacing: .13em; }
|
|
64
|
+
h1 { margin: 0; font-size: clamp(1.55rem, 5vw, 2.1rem); font-weight: 650; letter-spacing: -.045em; line-height: 1.18; text-wrap: balance; }
|
|
65
|
+
.intro { margin: .3rem 0 0; color: var(--muted); font-size: .9rem; }
|
|
66
|
+
.masthead-controls { display: flex; align-items: center; gap: .5rem; }
|
|
67
|
+
.language { display: flex; align-items: center; gap: .45rem; color: var(--muted); font-size: .75rem; font-weight: 650; }
|
|
68
|
+
.language select, .theme-toggle { min-height: 2.25rem; padding: .35rem .6rem; border: 1px solid var(--line); border-radius: .35rem; background: var(--surface); color: var(--ink); font-size: .78rem; font-weight: 650; }
|
|
69
|
+
.theme-toggle { cursor: pointer; }
|
|
70
|
+
|
|
71
|
+
main { width: min(100%, 88rem); margin-inline: auto; padding: 1rem 1rem 3rem; }
|
|
72
|
+
.page-note, .section-note { color: var(--muted); }
|
|
73
|
+
.page-note { max-width: 60rem; margin: 0 0 1rem; font-size: .8rem; }
|
|
74
|
+
.stat-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin-bottom: 1.8rem; }
|
|
75
|
+
.stat-card { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-width: 0; min-height: 3.8rem; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: .4rem; background: var(--surface); color: var(--muted); font-size: .76rem; font-weight: 650; }
|
|
76
|
+
.stat-card span { min-width: 0; overflow-wrap: anywhere; }
|
|
77
|
+
.stat-card strong { color: var(--brand); font-size: 1.35rem; font-variant-numeric: tabular-nums; line-height: 1; }
|
|
78
|
+
.checkpoint-summary { grid-template-columns: minmax(0, 1fr); max-width: 20rem; margin: .8rem 0 1.2rem; }
|
|
79
|
+
main > section { margin-top: 2rem; scroll-margin-top: 1rem; }
|
|
80
|
+
h2 { display: flex; align-items: baseline; gap: .65rem; margin: 0; font-size: 1.15rem; font-weight: 680; letter-spacing: -.025em; text-wrap: balance; }
|
|
81
|
+
h3 { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; margin: 0; font-size: .86rem; font-weight: 680; line-height: 1.4; text-wrap: balance; }
|
|
82
|
+
.section-note { margin: .25rem 0 .8rem; font-size: .8rem; }
|
|
83
|
+
.notice { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; color: var(--danger); }
|
|
84
|
+
|
|
85
|
+
.report-heading { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; }
|
|
86
|
+
.report-heading .section-note { max-width: 58rem; margin-bottom: 0; }
|
|
87
|
+
.include-archived { display: flex; align-items: center; gap: .5rem; min-height: 2.5rem; color: var(--muted); font-size: .8rem; font-weight: 650; cursor: pointer; }
|
|
88
|
+
.include-archived input { width: 1rem; height: 1rem; margin: 0; accent-color: var(--brand); }
|
|
89
|
+
.include-archived input:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
|
|
90
|
+
.report-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: .6rem; margin-top: .8rem; }
|
|
91
|
+
.report-card, .trend-panel { min-width: 0; padding: .8rem .85rem; border: 1px solid var(--line); border-radius: .4rem; background: var(--surface); }
|
|
92
|
+
.report-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .7rem; }
|
|
93
|
+
.report-total { flex: none; color: var(--brand); font-size: 1.1rem; font-variant-numeric: tabular-nums; }
|
|
94
|
+
.report-ranking { margin: .55rem 0 0; padding: 0; list-style: none; }
|
|
95
|
+
.report-ranking li { display: flex; justify-content: space-between; gap: .6rem; padding: .55rem 0; border-top: 1px solid var(--line-soft); }
|
|
96
|
+
.report-ranking li > strong { flex: none; color: var(--brand); font-variant-numeric: tabular-nums; }
|
|
97
|
+
.report-label { min-width: 0; overflow-wrap: anywhere; }
|
|
98
|
+
.report-label code { display: block; margin-top: .15rem; color: var(--muted); font-size: .7rem; }
|
|
99
|
+
.empty-report { margin: .7rem 0 0; color: var(--muted); font-size: .8rem; }
|
|
100
|
+
.trend-panel { margin-top: .65rem; }
|
|
101
|
+
.trend-legend { display: flex; flex-wrap: wrap; gap: .35rem 1rem; margin: .65rem 0 .2rem; padding: 0; color: var(--muted); font-size: .72rem; list-style: none; }
|
|
102
|
+
.trend-legend li::before { display: inline-block; width: .48rem; height: .48rem; margin-right: .35rem; border-radius: .1rem; background: currentColor; content: ""; }
|
|
103
|
+
.tools-series { color: var(--brand); }
|
|
104
|
+
.commands-series { color: var(--series-commands); }
|
|
105
|
+
.trend-chart { display: block; width: 100%; max-width: 100%; height: auto; overflow: hidden; }
|
|
106
|
+
.trend-chart .chart-axis { stroke: var(--line); stroke-width: 1; }
|
|
107
|
+
.trend-chart text { fill: var(--muted); font: 10px system-ui, sans-serif; }
|
|
108
|
+
.trend-chart rect { rx: 1px; }
|
|
109
|
+
.trend-chart .tools-series { fill: var(--brand); }
|
|
110
|
+
.trend-chart .commands-series { fill: var(--series-commands); }
|
|
111
|
+
|
|
112
|
+
.metrics-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); align-items: end; min-width: 0; gap: .65rem; margin: 1rem 0 1.2rem; padding: .75rem; border: 1px solid var(--line); border-radius: .4rem; background: var(--surface); }
|
|
113
|
+
.metrics-filters legend { padding: 0 .3rem; color: var(--brand); font-size: .68rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
|
|
114
|
+
.metrics-filter { display: grid; gap: .28rem; min-width: 0; color: var(--muted); font-size: .72rem; font-weight: 650; }
|
|
115
|
+
.metrics-filter select { width: 100%; min-width: 0; }
|
|
116
|
+
.metrics-reset { align-self: end; }
|
|
117
|
+
.metrics-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: .6rem; margin-bottom: .8rem; }
|
|
118
|
+
.metric-card { display: grid; gap: .25rem; min-width: 0; padding: .75rem .8rem; border: 1px solid var(--line); border-radius: .4rem; background: var(--surface); color: var(--muted); font-size: .72rem; }
|
|
119
|
+
.metric-card span { font-weight: 650; overflow-wrap: anywhere; }
|
|
120
|
+
.metric-card strong { color: var(--ink); font-size: 1.35rem; font-variant-numeric: tabular-nums; line-height: 1.1; overflow-wrap: anywhere; }
|
|
121
|
+
.metric-card small { color: var(--muted); font-size: .68rem; overflow-wrap: anywhere; }
|
|
122
|
+
.savings-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .4rem .8rem; padding: .8rem .9rem; border: 1px solid color-mix(in srgb, var(--brand) 38%, var(--line)); border-radius: .4rem; background: var(--surface); }
|
|
123
|
+
.savings-panel h3 { display: block; }
|
|
124
|
+
.savings-panel .section-note { margin: .2rem 0 0; }
|
|
125
|
+
.savings-rate { color: var(--brand); font-size: 1.8rem; font-variant-numeric: tabular-nums; line-height: 1; }
|
|
126
|
+
.savings-detail { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: .72rem; overflow-wrap: anywhere; }
|
|
127
|
+
.metrics-charts, .metrics-tables { display: grid; grid-template-columns: minmax(0, 1fr); gap: .65rem; margin-top: .8rem; }
|
|
128
|
+
.metrics-tables-note { margin-top: 1.2rem; }
|
|
129
|
+
.metrics-table-panel { min-width: 0; padding: .8rem .85rem; border: 1px solid var(--line); border-radius: .4rem; background: var(--surface); overflow-x: auto; }
|
|
130
|
+
.metrics-table { width: 100%; border-collapse: collapse; font-size: .76rem; }
|
|
131
|
+
.metrics-table caption { padding: 0 0 .55rem; color: var(--ink); font-size: .84rem; font-weight: 680; text-align: left; }
|
|
132
|
+
.metrics-table th, .metrics-table td { padding: .5rem .45rem; border-top: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
|
|
133
|
+
.metrics-table thead th { color: var(--muted); font-size: .68rem; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
|
|
134
|
+
.metrics-table thead th[aria-sort="ascending"], .metrics-table thead th[aria-sort="descending"] { color: var(--ink); }
|
|
135
|
+
.sort-button { display: flex; align-items: center; gap: .22rem; width: 100%; min-height: 1.75rem; padding: .1rem 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; }
|
|
136
|
+
.sort-button:hover:not(:disabled) { border-color: transparent; color: var(--ink); }
|
|
137
|
+
.sort-indicator { color: var(--brand); font-size: .95em; line-height: 1; }
|
|
138
|
+
.metrics-table tbody th { max-width: 16rem; font-weight: 650; overflow-wrap: anywhere; }
|
|
139
|
+
.metrics-table td { color: var(--muted); }
|
|
140
|
+
.metrics-table .numeric { color: var(--ink); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
|
|
141
|
+
.row-sub { display: block; margin-top: .15rem; color: var(--muted); font-size: .68rem; font-weight: 400; overflow-wrap: anywhere; }
|
|
142
|
+
.project-hash { display: block; max-width: 100%; color: var(--muted); font-size: .66rem; overflow-wrap: anywhere; }
|
|
143
|
+
.metrics-empty { margin-top: .8rem; }
|
|
144
|
+
.plugin-health { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
|
|
145
|
+
.plugin-heading { margin-bottom: .8rem; }
|
|
146
|
+
.plugin-heading h3 { display: block; font-size: 1rem; }
|
|
147
|
+
.plugin-heading .section-note { margin-bottom: 0; }
|
|
148
|
+
.plugin-tables { margin-top: .8rem; }
|
|
149
|
+
.input-series { color: var(--series-input); }
|
|
150
|
+
.cache-series { color: var(--series-cache); }
|
|
151
|
+
.output-series { color: var(--series-output); }
|
|
152
|
+
.trend-chart .input-series { fill: var(--series-input); }
|
|
153
|
+
.trend-chart .cache-series { fill: var(--series-cache); }
|
|
154
|
+
.trend-chart .output-series { fill: var(--series-output); }
|
|
155
|
+
|
|
156
|
+
@media (max-width: 30rem) {
|
|
157
|
+
.savings-panel { grid-template-columns: minmax(0, 1fr); }
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.scope { min-width: 0; border: 1px solid var(--line); border-radius: .4rem; background: var(--surface); }
|
|
161
|
+
.scope-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: .65rem; margin-top: .8rem; }
|
|
162
|
+
.project-summary { display: flex; align-items: center; gap: .75rem; min-width: 0; padding: .8rem; cursor: pointer; }
|
|
163
|
+
.project-summary::after { margin-left: auto; color: var(--muted); content: "⌄"; font-size: 1.2rem; }
|
|
164
|
+
.scope[open] > .project-summary::after { content: "⌃"; }
|
|
165
|
+
.project-summary:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
|
|
166
|
+
.scope-provenance { display: grid; min-width: 0; gap: .4rem; }
|
|
167
|
+
.scope-caption { display: flex; align-items: center; gap: .4rem; margin: 0; color: var(--brand); font-size: .67rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
|
|
168
|
+
.scope-caption::before { content: ""; width: .35rem; height: .35rem; border-radius: 50%; background: var(--brand); }
|
|
169
|
+
.scope-caption .scope-directory { min-width: 0; color: var(--ink); font-size: .82rem; letter-spacing: normal; text-transform: none; overflow-wrap: anywhere; }
|
|
170
|
+
code { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }
|
|
171
|
+
.project-summary code, .entry-context code { display: inline-block; max-width: 100%; padding: .15rem .35rem; border: 1px solid var(--line-soft); border-radius: .25rem; background: var(--canvas); font-size: .77rem; overflow-wrap: anywhere; }
|
|
172
|
+
.project-checkpoints { border-top: 1px solid var(--line-soft); }
|
|
173
|
+
.todo-status-list { display: grid; padding: .7rem .8rem; border-top: 1px solid var(--line-soft); }
|
|
174
|
+
.todo-status + .todo-status { padding-top: .65rem; border-top: 1px solid var(--line-soft); }
|
|
175
|
+
.todo-status-heading { color: var(--muted); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
|
|
176
|
+
.todo-status-heading span:last-child { color: var(--brand); font-variant-numeric: tabular-nums; }
|
|
177
|
+
.todo-items { margin: .35rem 0 0; padding: 0; list-style: none; }
|
|
178
|
+
.todo-items li { padding: .5rem 0; border-top: 1px solid var(--line-soft); overflow-wrap: anywhere; white-space: pre-wrap; }
|
|
179
|
+
.entry { display: flex; flex-direction: column; align-items: flex-start; gap: .65rem; padding: .8rem; }
|
|
180
|
+
.entry + .entry { border-top: 1px solid var(--line-soft); }
|
|
181
|
+
.entry-content { min-width: 0; }
|
|
182
|
+
.entry-title { display: block; margin: 0 0 .25rem; overflow-wrap: anywhere; }
|
|
183
|
+
.entry-summary { margin: 0 0 .3rem; white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
184
|
+
.entry-context { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin: 0 0 .25rem; color: var(--muted); font-size: .72rem; }
|
|
185
|
+
time { color: var(--muted); font-size: .72rem; }
|
|
186
|
+
.entry-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
|
|
187
|
+
|
|
188
|
+
button, select { min-height: 2.35rem; padding: .4rem .65rem; border: 1px solid var(--line); border-radius: .32rem; background: var(--surface-raised); color: var(--ink); cursor: pointer; }
|
|
189
|
+
button { font-size: .76rem; font-weight: 650; }
|
|
190
|
+
button:hover:not(:disabled), select:hover { border-color: color-mix(in srgb, var(--brand) 65%, var(--line)); }
|
|
191
|
+
.action-edit { border-color: color-mix(in srgb, var(--brand) 38%, var(--line)); color: var(--brand); }
|
|
192
|
+
.action-delete { border-color: color-mix(in srgb, var(--danger) 46%, var(--line)); color: var(--danger); }
|
|
193
|
+
.action-delete:hover:not(:disabled) { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); }
|
|
194
|
+
button:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
|
|
195
|
+
button:disabled { opacity: .55; cursor: not-allowed; }
|
|
196
|
+
|
|
197
|
+
@media (min-width: 45rem) {
|
|
198
|
+
.app-shell { display: grid; grid-template-columns: 13.5rem minmax(0, 1fr); }
|
|
199
|
+
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 1.5rem; height: 100vh; min-height: 32rem; padding: 1.5rem 1rem 1rem; border-right: 1px solid var(--line); border-bottom: 0; }
|
|
200
|
+
.brand { font-size: 1.05rem; }
|
|
201
|
+
.sidebar-nav { display: flex; flex: none; flex-direction: column; gap: .25rem; padding: .25rem; }
|
|
202
|
+
.sidebar-nav a { flex: none; padding: .62rem .65rem; text-align: left; }
|
|
203
|
+
.local-note { flex: none; max-width: none; margin: auto 0 0; }
|
|
204
|
+
.masthead { flex-direction: row; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.6rem 1.75rem 1.2rem; }
|
|
205
|
+
main { padding: 1.25rem 1.75rem 3rem; }
|
|
206
|
+
.report-heading { flex-direction: row; align-items: center; justify-content: space-between; }
|
|
207
|
+
.report-heading > button { flex: none; }
|
|
208
|
+
.entry { flex-direction: row; justify-content: space-between; }
|
|
209
|
+
.entry-actions { flex: none; }
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
@media (min-width: 68rem) {
|
|
213
|
+
.report-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
214
|
+
.scope-list { grid-template-columns: minmax(0, 1fr); }
|
|
215
|
+
.metrics-tables { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
@media (prefers-reduced-motion: reduce) {
|
|
219
|
+
html { scroll-behavior: auto; }
|
|
220
|
+
*, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
|
|
221
|
+
}
|