job_ops-mcp 0.4.1 → 0.4.2
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/dist/core/reports.js +26 -13
- package/dist/core/reports.js.map +1 -1
- package/dist/http/dashboard.js +27 -21
- package/dist/http/dashboard.js.map +1 -1
- package/dist/http/theme.js +119 -0
- package/dist/http/theme.js.map +1 -0
- package/package.json +1 -1
package/dist/core/reports.js
CHANGED
|
@@ -5,6 +5,7 @@ import { resolve } from 'node:path';
|
|
|
5
5
|
import { config } from '../config.js';
|
|
6
6
|
import { getDb, runInWriteLock } from '../db.js';
|
|
7
7
|
import { escapeHtml } from './html.js';
|
|
8
|
+
import { themeCss, themeInitScript, themeToggleButton } from '../http/theme.js';
|
|
8
9
|
const REPORTS_SUBDIR = 'reports';
|
|
9
10
|
export async function saveReport(args) {
|
|
10
11
|
return runInWriteLock(async () => {
|
|
@@ -112,27 +113,39 @@ function renderReportHtml(args) {
|
|
|
112
113
|
<head>
|
|
113
114
|
<meta charset="utf-8" />
|
|
114
115
|
<title>Evaluation ${args.reportId.slice(0, 8)}</title>
|
|
116
|
+
${themeInitScript()}
|
|
115
117
|
<style>
|
|
116
|
-
|
|
118
|
+
${themeCss()}
|
|
117
119
|
body { font-family: ui-sans-serif, system-ui, -apple-system, sans-serif; max-width: 880px;
|
|
118
|
-
margin: 2rem auto; padding: 0 1rem; line-height: 1.55;
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
.
|
|
122
|
-
.score
|
|
123
|
-
|
|
120
|
+
margin: 2rem auto; padding: 0 1rem 4rem; line-height: 1.55;
|
|
121
|
+
background: var(--bg-page); color: var(--text); }
|
|
122
|
+
h1 { margin-bottom: 0.25rem; color: var(--text); }
|
|
123
|
+
.meta { color: var(--text-2); font-size: 0.9rem; margin-bottom: 1.25rem; }
|
|
124
|
+
.score { background: var(--accent); color: var(--accent-fg); padding: 0.15rem 0.55rem;
|
|
125
|
+
border-radius: 3px; font-weight: 600; }
|
|
126
|
+
.score.muted { background: var(--text-muted); }
|
|
127
|
+
.sub { color: var(--text-2); font-size: 0.85rem; margin-left: 0.5rem; }
|
|
124
128
|
section { margin-bottom: 1.5rem; }
|
|
125
129
|
h2 { font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.05em;
|
|
126
|
-
color:
|
|
127
|
-
.prose
|
|
128
|
-
|
|
129
|
-
.
|
|
130
|
-
|
|
130
|
+
color: var(--accent); border-bottom: 1.5px solid var(--border); padding-bottom: 4px; }
|
|
131
|
+
.prose p, .prose li { color: var(--text); }
|
|
132
|
+
.prose table { border-collapse: collapse; margin: 0.5em 0; }
|
|
133
|
+
.prose td { border-bottom: 1px solid var(--border-soft); padding: 0.3em 0.6em; color: var(--text); }
|
|
134
|
+
.prose code { background: var(--code-bg); color: var(--text-2); padding: 0.05em 0.35em;
|
|
135
|
+
border-radius: 2px; font-size: 0.88em; }
|
|
136
|
+
.prose pre { white-space: pre-wrap; background: var(--pre-bg); padding: 0.6rem 0.8rem;
|
|
137
|
+
border-left: 3px solid var(--pre-border); border-radius: 3px; font-size: 0.9em;
|
|
138
|
+
color: var(--text); }
|
|
139
|
+
.prose strong { color: var(--text); }
|
|
140
|
+
.keywords code { background: var(--accent-soft); color: var(--accent); padding: 0.1rem 0.4rem;
|
|
141
|
+
border-radius: 2px; margin: 0.1rem 0.15rem 0.1rem 0; display: inline-block;
|
|
142
|
+
font-size: 0.85em; }
|
|
131
143
|
.raw { max-height: 280px; overflow: auto; }
|
|
132
|
-
a { color:
|
|
144
|
+
a { color: var(--link); }
|
|
133
145
|
</style>
|
|
134
146
|
</head>
|
|
135
147
|
<body>
|
|
148
|
+
${themeToggleButton()}
|
|
136
149
|
<h1>Evaluation Report</h1>
|
|
137
150
|
<div class="meta">
|
|
138
151
|
${scoreBadge} ·
|
package/dist/core/reports.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reports.js","sourceRoot":"","sources":["../../src/core/reports.ts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AAC,MAAM,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;YACjE,SAAS;QACX,CAAC;QACD,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;YAAC,SAAS,EAAE,CAAC;YAAC,SAAS;QAAC,CAAC;QAClD,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrB,CAAC;IACD,SAAS,EAAE,CAAC;IAAC,SAAS,EAAE,CAAC;IAAC,UAAU,EAAE,CAAC;IAAC,IAAI,MAAM;QAAE,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IAC9E,OAAO,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACxB,CAAC;AAED,SAAS,QAAQ,CAAC,CAAS;IACzB,OAAO,UAAU,CAAC,CAAC,CAAC;SACjB,OAAO,CAAC,YAAY,EAAE,iBAAiB,CAAC;SACxC,OAAO,CAAC,kBAAkB,EAAE,qBAAqB,CAAC;SAClD,OAAO,CAAC,0BAA0B,EAAE,qBAAqB,CAAC,CAAC;AAChE,CAAC"}
|
package/dist/http/dashboard.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// links that hit MCP tools via the same server.
|
|
3
3
|
import { getDb } from '../db.js';
|
|
4
4
|
import { escapeHtml } from '../core/html.js';
|
|
5
|
+
import { themeCss, themeInitScript, themeToggleButton } from './theme.js';
|
|
5
6
|
export function renderDashboard() {
|
|
6
7
|
const db = getDb();
|
|
7
8
|
const counts = db.prepare(`
|
|
@@ -62,34 +63,39 @@ export function renderDashboard() {
|
|
|
62
63
|
<head>
|
|
63
64
|
<meta charset="utf-8" />
|
|
64
65
|
<title>mcp-jsa tracker</title>
|
|
66
|
+
${themeInitScript()}
|
|
65
67
|
<style>
|
|
66
|
-
|
|
67
|
-
body { font-family: ui-sans-serif, system-ui, sans-serif; margin: 0; background:
|
|
68
|
-
header { padding: 1.4rem 1.6rem; border-bottom: 1px solid
|
|
69
|
-
|
|
70
|
-
header
|
|
68
|
+
${themeCss()}
|
|
69
|
+
body { font-family: ui-sans-serif, system-ui, sans-serif; margin: 0; background: var(--bg-page); color: var(--text); }
|
|
70
|
+
header { padding: 1.4rem 1.6rem; border-bottom: 1px solid var(--border); background: var(--bg-card);
|
|
71
|
+
display: flex; justify-content: space-between; align-items: baseline; }
|
|
72
|
+
header h1 { margin: 0; font-size: 1.05rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); }
|
|
73
|
+
header .meta { color: var(--text-muted); font-size: 0.85rem; }
|
|
71
74
|
main { padding: 1.4rem 1.6rem; max-width: 1180px; margin: 0 auto; }
|
|
72
75
|
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0.75rem; margin-bottom: 1.4rem; }
|
|
73
|
-
.card { background:
|
|
74
|
-
.card .n { font-size: 1.4rem; font-weight: 700; }
|
|
75
|
-
.card .lbl { color:
|
|
76
|
-
table { width: 100%; border-collapse: collapse; background:
|
|
77
|
-
th, td { text-align: left; padding: 0.55rem 0.7rem; border-bottom: 1px solid
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
.
|
|
81
|
-
.tier
|
|
82
|
-
.tier.
|
|
83
|
-
.tier.
|
|
84
|
-
.tier.
|
|
85
|
-
.
|
|
86
|
-
|
|
87
|
-
|
|
76
|
+
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 4px; padding: 0.75rem 0.9rem; box-shadow: var(--shadow); }
|
|
77
|
+
.card .n { font-size: 1.4rem; font-weight: 700; color: var(--text); }
|
|
78
|
+
.card .lbl { color: var(--text-2); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
|
|
79
|
+
table { width: 100%; border-collapse: collapse; background: var(--bg-card); border: 1px solid var(--border); box-shadow: var(--shadow); }
|
|
80
|
+
th, td { text-align: left; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--border-soft);
|
|
81
|
+
font-size: 0.88rem; vertical-align: top; color: var(--text); }
|
|
82
|
+
th { background: var(--bg-soft); text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.72rem; color: var(--text-2); }
|
|
83
|
+
td.meta { color: var(--text-muted); font-size: 0.8rem; }
|
|
84
|
+
.tier { font-weight: 700; padding: 0.1rem 0.5rem; border-radius: 3px; color: var(--tier-fg); display: inline-block; min-width: 1.6em; text-align: center; }
|
|
85
|
+
.tier.a { background: var(--tier-a); }
|
|
86
|
+
.tier.b { background: var(--tier-b); }
|
|
87
|
+
.tier.c { background: var(--tier-c); }
|
|
88
|
+
.tier.d { background: var(--tier-d); }
|
|
89
|
+
.tier.muted { background: transparent; color: var(--text-muted); font-weight: 400; }
|
|
90
|
+
.muted { color: var(--text-muted); }
|
|
91
|
+
code { background: var(--code-bg); padding: 0.05rem 0.4rem; border-radius: 2px; font-size: 0.78em; color: var(--text-2); }
|
|
92
|
+
a { color: var(--link); text-decoration: none; }
|
|
88
93
|
a:hover { text-decoration: underline; }
|
|
89
|
-
.empty { padding: 3rem; text-align: center; color:
|
|
94
|
+
.empty { padding: 3rem; text-align: center; color: var(--text-muted); }
|
|
90
95
|
</style>
|
|
91
96
|
</head>
|
|
92
97
|
<body>
|
|
98
|
+
${themeToggleButton()}
|
|
93
99
|
<header>
|
|
94
100
|
<h1>mcp-jsa tracker</h1>
|
|
95
101
|
<span class="meta">${counts.total ?? 0} jobs in pipeline · /files served from output/</span>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.js","sourceRoot":"","sources":["../../src/http/dashboard.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,gDAAgD;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"dashboard.js","sourceRoot":"","sources":["../../src/http/dashboard.ts"],"names":[],"mappings":"AAAA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|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
// Shared light/dark theme primitives for the web-served HTML surfaces ONLY:
|
|
2
|
+
// - the tracker dashboard at `/`
|
|
3
|
+
// - the eval report HTML at `/files/reports/*.html`
|
|
4
|
+
//
|
|
5
|
+
// NOT for PDF templates (templates/cv-template.html / cover-template.html) — those must
|
|
6
|
+
// stay light/white-background for printing and sending to employers.
|
|
7
|
+
//
|
|
8
|
+
// Three exports — drop them into any page:
|
|
9
|
+
//
|
|
10
|
+
// themeInitScript() → goes into <head> BEFORE any styles. Sets data-theme on <html>
|
|
11
|
+
// synchronously to prevent flash-of-wrong-theme (FOUC).
|
|
12
|
+
// themeCss() → CSS variables for :root (light) + [data-theme="dark"]. Tokens
|
|
13
|
+
// everything downstream references via var(--*).
|
|
14
|
+
// themeToggleButton() → fixed-position sun/moon button (top-right). Inline onclick
|
|
15
|
+
// flips the attribute + writes to localStorage. No framework.
|
|
16
|
+
//
|
|
17
|
+
// The toggle state is shared across dashboard + reports because both pages read the same
|
|
18
|
+
// localStorage key (`job_ops-mcp-theme`) on load.
|
|
19
|
+
const STORAGE_KEY = 'job_ops-mcp-theme';
|
|
20
|
+
/** Goes into <head> BEFORE styles. Runs synchronously to set the attribute pre-paint. */
|
|
21
|
+
export function themeInitScript() {
|
|
22
|
+
return `<script>(function(){try{var t=localStorage.getItem('${STORAGE_KEY}');if(!t){t=window.matchMedia&&window.matchMedia('(prefers-color-scheme: dark)').matches?'dark':'light';}document.documentElement.setAttribute('data-theme',t);}catch(e){}})();</script>`;
|
|
23
|
+
}
|
|
24
|
+
/** CSS variables. Everything else in the page references var(--*) — no hardcoded colours. */
|
|
25
|
+
export function themeCss() {
|
|
26
|
+
return `
|
|
27
|
+
:root {
|
|
28
|
+
--bg-page: #fafbfc;
|
|
29
|
+
--bg-card: #ffffff;
|
|
30
|
+
--bg-soft: #f6f6f8;
|
|
31
|
+
--text: #1a1a2e;
|
|
32
|
+
--text-2: #555;
|
|
33
|
+
--text-muted: #777;
|
|
34
|
+
--border: #e2e2e2;
|
|
35
|
+
--border-soft: #f0f0f0;
|
|
36
|
+
--accent: hsl(187, 74%, 32%);
|
|
37
|
+
--accent-soft: hsl(187, 40%, 92%);
|
|
38
|
+
--accent-fg: #ffffff;
|
|
39
|
+
--link: hsl(270, 70%, 45%);
|
|
40
|
+
--code-bg: #f0f0f3;
|
|
41
|
+
--code-border: #d0d0d4;
|
|
42
|
+
--pre-bg: #f6f6f8;
|
|
43
|
+
--pre-border: #cccccc;
|
|
44
|
+
--shadow: 0 1px 2px rgba(0,0,0,0.04);
|
|
45
|
+
--tier-a: hsl(140, 60%, 38%);
|
|
46
|
+
--tier-b: hsl(195, 60%, 42%);
|
|
47
|
+
--tier-c: hsl(36, 80%, 45%);
|
|
48
|
+
--tier-d: hsl(8, 55%, 50%);
|
|
49
|
+
--tier-fg: #ffffff;
|
|
50
|
+
color-scheme: light;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
[data-theme="dark"] {
|
|
54
|
+
--bg-page: #15181c;
|
|
55
|
+
--bg-card: #1d2026;
|
|
56
|
+
--bg-soft: #23272f;
|
|
57
|
+
--text: #e8e8ec;
|
|
58
|
+
--text-2: #aab2c0;
|
|
59
|
+
--text-muted: #7a8290;
|
|
60
|
+
--border: #2c3038;
|
|
61
|
+
--border-soft: #23272f;
|
|
62
|
+
--accent: hsl(187, 60%, 60%);
|
|
63
|
+
--accent-soft: hsla(187, 60%, 60%, 0.14);
|
|
64
|
+
--accent-fg: #0e1115;
|
|
65
|
+
--link: hsl(270, 80%, 75%);
|
|
66
|
+
--code-bg: #2a2e36;
|
|
67
|
+
--code-border: #3a3f48;
|
|
68
|
+
--pre-bg: #1a1d22;
|
|
69
|
+
--pre-border: #2c3038;
|
|
70
|
+
--shadow: 0 1px 2px rgba(0,0,0,0.4);
|
|
71
|
+
--tier-a: hsl(140, 50%, 50%);
|
|
72
|
+
--tier-b: hsl(195, 60%, 55%);
|
|
73
|
+
--tier-c: hsl(36, 75%, 55%);
|
|
74
|
+
--tier-d: hsl(8, 55%, 58%);
|
|
75
|
+
--tier-fg: #0e1115;
|
|
76
|
+
color-scheme: dark;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* ── theme toggle (fixed top-right on both pages) ───────────────────────── */
|
|
80
|
+
.theme-toggle {
|
|
81
|
+
position: fixed;
|
|
82
|
+
top: 0.9rem;
|
|
83
|
+
right: 0.9rem;
|
|
84
|
+
z-index: 100;
|
|
85
|
+
width: 36px;
|
|
86
|
+
height: 36px;
|
|
87
|
+
border-radius: 50%;
|
|
88
|
+
border: 1px solid var(--border);
|
|
89
|
+
background: var(--bg-card);
|
|
90
|
+
color: var(--text-2);
|
|
91
|
+
cursor: pointer;
|
|
92
|
+
display: inline-flex;
|
|
93
|
+
align-items: center;
|
|
94
|
+
justify-content: center;
|
|
95
|
+
box-shadow: var(--shadow);
|
|
96
|
+
transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
|
|
97
|
+
padding: 0;
|
|
98
|
+
}
|
|
99
|
+
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); transform: scale(1.05); }
|
|
100
|
+
.theme-toggle:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
|
|
101
|
+
.theme-toggle svg { width: 18px; height: 18px; }
|
|
102
|
+
.theme-toggle .icon-sun { display: none; }
|
|
103
|
+
.theme-toggle .icon-moon { display: inline; }
|
|
104
|
+
[data-theme="dark"] .theme-toggle .icon-sun { display: inline; }
|
|
105
|
+
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
|
|
106
|
+
`;
|
|
107
|
+
}
|
|
108
|
+
/** Sun/moon button with inline onclick — flips data-theme + persists. */
|
|
109
|
+
export function themeToggleButton() {
|
|
110
|
+
const onclick = `(function(){var d=document.documentElement,c=d.getAttribute('data-theme')==='dark'?'light':'dark';d.setAttribute('data-theme',c);try{localStorage.setItem('${STORAGE_KEY}',c);}catch(e){}})()`;
|
|
111
|
+
// SVGs are sized via .theme-toggle svg in themeCss().
|
|
112
|
+
return `
|
|
113
|
+
<button class="theme-toggle" type="button" aria-label="Toggle light/dark theme" title="Toggle light/dark theme" onclick="${onclick}">
|
|
114
|
+
<svg class="icon-moon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79Z"/></svg>
|
|
115
|
+
<svg class="icon-sun" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41"/></svg>
|
|
116
|
+
</button>
|
|
117
|
+
`;
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=theme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src/http/theme.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,mCAAmC;AACnC,sDAAsD;AACtD,EAAE;AACF,wFAAwF;AACxF,qEAAqE;AACrE,EAAE;AACF,2CAA2C;AAC3C,EAAE;AACF,yFAAyF;AACzF,iFAAiF;AACjF,yFAAyF;AACzF,0EAA0E;AAC1E,sFAAsF;AACtF,uFAAuF;AACvF,EAAE;AACF,yFAAyF;AACzF,kDAAkD;AAElD,MAAM,WAAW,GAAG,mBAAmB,CAAC;AAExC,yFAAyF;AACzF,MAAM,UAAU,eAAe;IAC7B,OAAO,uDAAuD,WAAW,0LAA0L,CAAC;AACtQ,CAAC;AAED,6FAA6F;AAC7F,MAAM,UAAU,QAAQ;IACtB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgFR,CAAC;AACF,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,iBAAiB;IAC/B,MAAM,OAAO,GACX,8JAA8J,WAAW,sBAAsB,CAAC;IAClM,sDAAsD;IACtD,OAAO;2HACkH,OAAO;;;;CAIjI,CAAC;AACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "job_ops-mcp",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "Self-hosted MCP server for the full job-search loop: portal scanning, JD evaluation, tailored resume + cover PDFs, outreach drafting, story bank, negotiation brief — chat-driven, human-in-the-loop.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|