holohq 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.fr.md +145 -0
- package/README.md +144 -2
- package/bin/holohq.js +12 -0
- package/dist/server/server/actions/clone.js +36 -0
- package/dist/server/server/actions/newProject.js +40 -0
- package/dist/server/server/actions/publish.js +22 -0
- package/dist/server/server/app.js +46 -0
- package/dist/server/server/autostart.js +127 -0
- package/dist/server/server/autostartRun.js +96 -0
- package/dist/server/server/browser.js +24 -0
- package/dist/server/server/cache.js +24 -0
- package/dist/server/server/claude/floor.js +408 -0
- package/dist/server/server/claude/history.js +268 -0
- package/dist/server/server/claude/prompt.js +8 -0
- package/dist/server/server/cli/autostart.js +21 -0
- package/dist/server/server/cli/config.js +45 -0
- package/dist/server/server/cli/convention.js +51 -0
- package/dist/server/server/cli/io.js +1 -0
- package/dist/server/server/cli/main.js +129 -0
- package/dist/server/server/config.js +311 -0
- package/dist/server/server/demo/config.js +19 -0
- package/dist/server/server/demo/data.js +317 -0
- package/dist/server/server/demo/deps.js +36 -0
- package/dist/server/server/demo/floor.js +45 -0
- package/dist/server/server/demo/run.js +315 -0
- package/dist/server/server/demo/scan.js +21 -0
- package/dist/server/server/domain/home.js +85 -0
- package/dist/server/server/domain/journal.js +33 -0
- package/dist/server/server/domain/sprint.js +9 -0
- package/dist/server/server/exec.js +12 -0
- package/dist/server/server/floor/attribute.js +74 -0
- package/dist/server/server/floor/evidence.js +39 -0
- package/dist/server/server/git/status.js +45 -0
- package/dist/server/server/github/gh.js +27 -0
- package/dist/server/server/github/labels.js +65 -0
- package/dist/server/server/github/project.js +58 -0
- package/dist/server/server/github/repos.js +17 -0
- package/dist/server/server/github/write.js +91 -0
- package/dist/server/server/guard.js +18 -0
- package/dist/server/server/index.js +9 -0
- package/dist/server/server/launch.js +168 -0
- package/dist/server/server/paths.js +26 -0
- package/dist/server/server/preload.js +30 -0
- package/dist/server/server/projects/remote.js +13 -0
- package/dist/server/server/projects/scan.js +79 -0
- package/dist/server/server/routes/actions.js +89 -0
- package/dist/server/server/routes/autostart.js +21 -0
- package/dist/server/server/routes/conversations.js +21 -0
- package/dist/server/server/routes/detail.js +24 -0
- package/dist/server/server/routes/floor.js +77 -0
- package/dist/server/server/routes/home.js +64 -0
- package/dist/server/server/routes/launch.js +79 -0
- package/dist/server/server/routes/projects.js +75 -0
- package/dist/server/server/routes/remotes.js +30 -0
- package/dist/server/server/routes/setup.js +114 -0
- package/dist/server/server/routes/write.js +129 -0
- package/dist/server/server/setup/tools.js +37 -0
- package/dist/server/server/skills.js +69 -0
- package/dist/server/server/start.js +166 -0
- package/dist/server/server/static.js +49 -0
- package/dist/server/shared/color.js +59 -0
- package/dist/server/shared/errors.js +88 -0
- package/dist/server/shared/ideas.js +36 -0
- package/dist/server/shared/labels.js +36 -0
- package/dist/server/shared/repoName.js +13 -0
- package/dist/server/shared/themes.js +120 -0
- package/dist/server/shared/tiers.js +15 -0
- package/dist/server/shared/types.js +1 -0
- package/dist/web/assets/Globe-ighOFp2V.js +4273 -0
- package/dist/web/assets/index-ByHbMQJl.js +11 -0
- package/dist/web/assets/index-DgR2KpYV.css +1 -0
- package/dist/web/assets/jetbrains-mono-cyrillic-400-normal-BEIGL1Tu.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-cyrillic-400-normal-ugxPyKxw.woff +0 -0
- package/dist/web/assets/jetbrains-mono-cyrillic-600-normal-8K4wrrwR.woff +0 -0
- package/dist/web/assets/jetbrains-mono-cyrillic-600-normal-EVf6-Yzo.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-greek-400-normal-B9oWc5Lo.woff +0 -0
- package/dist/web/assets/jetbrains-mono-greek-400-normal-C190GLew.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-greek-600-normal-H7WoG9Et.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-greek-600-normal-mc2nkWzM.woff +0 -0
- package/dist/web/assets/jetbrains-mono-latin-400-normal-6-qcROiO.woff +0 -0
- package/dist/web/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-latin-600-normal-BfsvjouI.woff +0 -0
- package/dist/web/assets/jetbrains-mono-latin-600-normal-C8RAYTDA.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-latin-ext-400-normal-Bc8Ftmh3.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-latin-ext-400-normal-fXTG6kC5.woff +0 -0
- package/dist/web/assets/jetbrains-mono-latin-ext-600-normal-BfB_LPfz.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-latin-ext-600-normal-DObL3zCW.woff +0 -0
- package/dist/web/assets/jetbrains-mono-vietnamese-400-normal-CqNFfHCs.woff +0 -0
- package/dist/web/assets/jetbrains-mono-vietnamese-600-normal-OWROknRo.woff +0 -0
- package/dist/web/assets/rajdhani-devanagari-500-normal-BPH8g_s8.woff +0 -0
- package/dist/web/assets/rajdhani-devanagari-500-normal-B_DH_jja.woff2 +0 -0
- package/dist/web/assets/rajdhani-devanagari-600-normal-BtY48IV_.woff +0 -0
- package/dist/web/assets/rajdhani-devanagari-600-normal-DhS7ScYx.woff2 +0 -0
- package/dist/web/assets/rajdhani-devanagari-700-normal-BQQOj9BB.woff2 +0 -0
- package/dist/web/assets/rajdhani-devanagari-700-normal-DBRwWuxA.woff +0 -0
- package/dist/web/assets/rajdhani-latin-500-normal-ByNUCHrt.woff2 +0 -0
- package/dist/web/assets/rajdhani-latin-500-normal-DfvNI-Td.woff +0 -0
- package/dist/web/assets/rajdhani-latin-600-normal-CXCVEoA9.woff2 +0 -0
- package/dist/web/assets/rajdhani-latin-600-normal-Dx02qI2_.woff +0 -0
- package/dist/web/assets/rajdhani-latin-700-normal-BPDUZo87.woff2 +0 -0
- package/dist/web/assets/rajdhani-latin-700-normal-e0Uj8ZlN.woff +0 -0
- package/dist/web/assets/rajdhani-latin-ext-500-normal-CyRWJZ5B.woff +0 -0
- package/dist/web/assets/rajdhani-latin-ext-500-normal-DiyUS11w.woff2 +0 -0
- package/dist/web/assets/rajdhani-latin-ext-600-normal-BleIgkPp.woff +0 -0
- package/dist/web/assets/rajdhani-latin-ext-600-normal-C9ZjJQAt.woff2 +0 -0
- package/dist/web/assets/rajdhani-latin-ext-700-normal-BPaQ7tlD.woff +0 -0
- package/dist/web/assets/rajdhani-latin-ext-700-normal-S6aYESQK.woff2 +0 -0
- package/dist/web/index.html +13 -0
- package/package.json +74 -4
- package/scripts/autostart.ps1 +28 -0
- package/scripts/start-hidden.vbs +12 -0
- package/templates/en/CLAUDE.md +18 -0
- package/templates/en/README.md +3 -0
- package/templates/fr/CLAUDE.md +18 -0
- package/templates/fr/README.md +3 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export const LABEL_SETS = {
|
|
2
|
+
fr: {
|
|
3
|
+
lang: 'fr',
|
|
4
|
+
idea: 'idée',
|
|
5
|
+
themePrefix: 'thème:',
|
|
6
|
+
impact: { high: 'impact:fort', medium: 'impact:moyen', low: 'impact:faible' },
|
|
7
|
+
journalTitle: '📓 Journal des sessions',
|
|
8
|
+
},
|
|
9
|
+
en: {
|
|
10
|
+
lang: 'en',
|
|
11
|
+
idea: 'idea',
|
|
12
|
+
themePrefix: 'theme:',
|
|
13
|
+
impact: { high: 'impact:high', medium: 'impact:medium', low: 'impact:low' },
|
|
14
|
+
journalTitle: '📓 Session log',
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
const matches = (set, name) => name === set.idea || name.startsWith(set.themePrefix) || Object.values(set.impact).includes(name);
|
|
18
|
+
/** Jeu de labels utilisé par un dépôt ; le français l'emporte si les deux sont présents. */
|
|
19
|
+
export function detectLabelSet(names) {
|
|
20
|
+
const lower = names.map((n) => n.toLowerCase());
|
|
21
|
+
for (const lang of ['fr', 'en']) {
|
|
22
|
+
if (lower.some((n) => matches(LABEL_SETS[lang], n)))
|
|
23
|
+
return lang;
|
|
24
|
+
}
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
/** Lit un label `impact:*` français ou anglais. */
|
|
28
|
+
export function parseImpact(label) {
|
|
29
|
+
const l = label.trim().toLowerCase();
|
|
30
|
+
for (const set of Object.values(LABEL_SETS)) {
|
|
31
|
+
for (const k of ['high', 'medium', 'low'])
|
|
32
|
+
if (set.impact[k] === l)
|
|
33
|
+
return k;
|
|
34
|
+
}
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Règle de nom de dépôt GitHub acceptée par HoloHQ (partagée serveur / interface). */
|
|
2
|
+
export const REPO_NAME = /^[A-Za-z0-9_][A-Za-z0-9._-]{0,99}$/;
|
|
3
|
+
/** Nom gardé tel quel s'il est accepté ; sinon accents retirés et caractères interdits (espaces…) remplacés par « - ». */
|
|
4
|
+
export function suggestRepoName(folder) {
|
|
5
|
+
if (REPO_NAME.test(folder))
|
|
6
|
+
return folder;
|
|
7
|
+
return folder
|
|
8
|
+
.normalize('NFD')
|
|
9
|
+
.replace(/[\u0300-\u036f]/g, '')
|
|
10
|
+
.replace(/[^A-Za-z0-9._-]+/g, '-')
|
|
11
|
+
.replace(/^[-.]+|-+$/g, '')
|
|
12
|
+
.slice(0, 100);
|
|
13
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { ensureContrast, mix, parseHex, toHex } from './color.js';
|
|
2
|
+
export const FLOOR_VIEWS = ['planets', 'tower', 'openspace'];
|
|
3
|
+
export const floorViewOf = (a) => a.floor ?? 'planets';
|
|
4
|
+
export const THEME_IDS = ['holo', 'mars', 'terminal', 'nebula', 'day', 'custom'];
|
|
5
|
+
export const DEFAULT_APPEARANCE = { theme: 'holo', effects: 'full' };
|
|
6
|
+
/** Bordure : l'accent à un tiers d'opacité (comme `--line` de Holo). */
|
|
7
|
+
const lineOf = (accent) => `${accent}55`;
|
|
8
|
+
export const PRESETS = {
|
|
9
|
+
holo: {
|
|
10
|
+
id: 'holo', mode: 'dark', bg: '#020509', bg2: '#0c3247', panelA: '#0b2a3a', panelB: '#04111a', line: lineOf('#4fd8ff'),
|
|
11
|
+
text: '#cfefff', title: '#eafaff', muted: '#7fb3c7', accent: '#4fd8ff', accent2: '#ffb547', ok: '#4ade80', err: '#f87171', glow: 1,
|
|
12
|
+
},
|
|
13
|
+
mars: {
|
|
14
|
+
id: 'mars', mode: 'dark', bg: '#0a0303', bg2: '#3a0d0a', panelA: '#3a120d', panelB: '#140504', line: lineOf('#ff5a3c'),
|
|
15
|
+
text: '#ffe6df', title: '#fff3ef', muted: '#c98b7f', accent: '#ff5a3c', accent2: '#ffd166', ok: '#4ade80', err: '#ff8a80', glow: 1,
|
|
16
|
+
},
|
|
17
|
+
terminal: {
|
|
18
|
+
id: 'terminal', mode: 'dark', bg: '#010603', bg2: '#06301a', panelA: '#0a2a17', panelB: '#03110a', line: lineOf('#39ff88'),
|
|
19
|
+
text: '#d8ffe6', title: '#effff4', muted: '#7fc79a', accent: '#39ff88', accent2: '#d4ff4f', ok: '#4ade80', err: '#f87171', glow: 1,
|
|
20
|
+
},
|
|
21
|
+
nebula: {
|
|
22
|
+
id: 'nebula', mode: 'dark', bg: '#07020f', bg2: '#2a0f4a', panelA: '#24103e', panelB: '#0d0518', line: lineOf('#c77dff'),
|
|
23
|
+
text: '#f1e6ff', title: '#faf5ff', muted: '#a98bc9', accent: '#c77dff', accent2: '#ff6ec7', ok: '#4ade80', err: '#f87171', glow: 1,
|
|
24
|
+
},
|
|
25
|
+
day: {
|
|
26
|
+
id: 'day', mode: 'light', bg: '#e9eef5', bg2: '#ffffff', panelA: '#ffffff', panelB: '#f3f6fb', line: lineOf('#1f6feb'),
|
|
27
|
+
text: '#0f1b2d', title: '#0a1424', muted: '#51627a', accent: '#1f6feb', accent2: '#b45309', ok: '#15803d', err: '#dc2626', glow: 0.25,
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Thème Perso : fond et panneaux = l'accent fondu dans le noir (sombre) ou le blanc (clair) ;
|
|
32
|
+
* texte au moins 4.5:1 contre le fond et les panneaux, accents au moins 3:1 contre le fond.
|
|
33
|
+
*/
|
|
34
|
+
export function customTheme(accent, accent2, mode) {
|
|
35
|
+
const dark = mode === 'dark';
|
|
36
|
+
const base = dark ? '#000000' : '#ffffff';
|
|
37
|
+
const tint = (t) => mix(base, accent, t);
|
|
38
|
+
const bg = tint(dark ? 0.03 : 0.08);
|
|
39
|
+
const bg2 = dark ? tint(0.22) : '#ffffff';
|
|
40
|
+
const panelA = dark ? tint(0.18) : '#ffffff';
|
|
41
|
+
const panelB = tint(dark ? 0.08 : 0.04);
|
|
42
|
+
const readable = (c, min) => ensureContrast(ensureContrast(c, panelA, min), bg, min);
|
|
43
|
+
const text = readable(mix(accent, dark ? '#ffffff' : '#000000', dark ? 0.75 : 0.85), 4.5);
|
|
44
|
+
const title = readable(mix(accent, dark ? '#ffffff' : '#000000', dark ? 0.9 : 0.92), 4.5);
|
|
45
|
+
const muted = readable(mix(text, bg, 0.35), 4.5);
|
|
46
|
+
const c = ensureContrast(accent, bg, 3);
|
|
47
|
+
return {
|
|
48
|
+
id: 'custom', mode, bg, bg2, panelA, panelB, line: lineOf(c), text, title, muted,
|
|
49
|
+
accent: c, accent2: ensureContrast(accent2, bg, 3),
|
|
50
|
+
ok: dark ? '#4ade80' : '#15803d', err: dark ? '#f87171' : '#dc2626', glow: dark ? 1 : 0.25,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
const validCustom = (c) => !!c && parseHex(c.accent) !== null && parseHex(c.accent2) !== null && (c.mode === 'dark' || c.mode === 'light');
|
|
54
|
+
/** Thème à appliquer ; Perso sans couleurs valides, ou thème inconnu → Holo. */
|
|
55
|
+
export function resolveTheme(a) {
|
|
56
|
+
if (a.theme === 'custom')
|
|
57
|
+
return validCustom(a.custom) ? customTheme(a.custom.accent, a.custom.accent2, a.custom.mode) : PRESETS.holo;
|
|
58
|
+
return Object.hasOwn(PRESETS, a.theme) ? PRESETS[a.theme] : PRESETS.holo;
|
|
59
|
+
}
|
|
60
|
+
/** Somme pondérée de couleurs `#rrggbb` (poids de somme 1). */
|
|
61
|
+
function blend(parts) {
|
|
62
|
+
const out = [0, 0, 0];
|
|
63
|
+
for (const [c, w] of parts) {
|
|
64
|
+
const rgb = parseHex(c);
|
|
65
|
+
for (let i = 0; i < 3; i++)
|
|
66
|
+
out[i] += rgb[i] * w;
|
|
67
|
+
}
|
|
68
|
+
return toHex(out);
|
|
69
|
+
}
|
|
70
|
+
const SUBTLE_GLOW = 0.35;
|
|
71
|
+
/** Variables CSS de la page (noms existants de styles.css et leurs alias). */
|
|
72
|
+
export function themeVars(t, effects) {
|
|
73
|
+
const full = t.mode === 'light' ? Math.min(t.glow, 0.6) : t.glow;
|
|
74
|
+
// Effets discrets : lueurs adoucies (35 % de l'intensité du thème), arrondies au centième.
|
|
75
|
+
const glow = effects === 'subtle' ? Math.round(full * SUBTLE_GLOW * 100) / 100 : full;
|
|
76
|
+
return {
|
|
77
|
+
'--bg': t.bg,
|
|
78
|
+
'--bg-glow': t.bg2,
|
|
79
|
+
'--panel-a': t.panelA,
|
|
80
|
+
'--panel-b': t.panelB,
|
|
81
|
+
'--line': t.line,
|
|
82
|
+
'--text': t.text,
|
|
83
|
+
'--title': t.title,
|
|
84
|
+
'--muted': t.muted,
|
|
85
|
+
'--c': t.accent,
|
|
86
|
+
'--c2': t.accent2,
|
|
87
|
+
'--ok': t.ok,
|
|
88
|
+
'--err': t.err,
|
|
89
|
+
'--accent': t.accent,
|
|
90
|
+
'--cyan': t.accent,
|
|
91
|
+
'--warn': t.accent2,
|
|
92
|
+
'--panel': t.panelB,
|
|
93
|
+
'--panel-2': `${t.accent}1a`,
|
|
94
|
+
'--glow': String(glow),
|
|
95
|
+
// Texte en surbrillance (survol, élément actif) : blanc sur fond sombre, titre sur fond clair.
|
|
96
|
+
'--hi': t.mode === 'dark' ? '#ffffff' : t.title,
|
|
97
|
+
...labelTones(t),
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
/** Opacité de `.gnode.cold.far` (styles.css) : étiquette en veille passée derrière le globe. */
|
|
101
|
+
export const COLD_FAR_OPACITY = 0.6;
|
|
102
|
+
/**
|
|
103
|
+
* Plancher de la couleur vue d'une étiquette en veille derrière le globe : celui de Holo (2.12:1),
|
|
104
|
+
* pour qu'aucun thème ne soit moins lisible que lui sans changer l'apparence de Holo.
|
|
105
|
+
*/
|
|
106
|
+
export const COLD_FAR_MIN = 2.1;
|
|
107
|
+
/**
|
|
108
|
+
* Étiquettes des projets (globe, orbites) : mélanges qui redonnent exactement les teintes de Holo,
|
|
109
|
+
* puis un plancher de contraste contre le fond (sans effet sur Holo, qui le passe déjà).
|
|
110
|
+
*/
|
|
111
|
+
function labelTones(t) {
|
|
112
|
+
const cold = ensureContrast(blend([[t.text, 0.12], [t.muted, 0.37], [t.panelA, 0.51]]), t.bg, 3);
|
|
113
|
+
return {
|
|
114
|
+
'--node': ensureContrast(blend([[t.text, 0.49], [t.muted, 0.37], [t.accent, 0.14]]), t.bg, 4.5),
|
|
115
|
+
'--node-sub': ensureContrast(blend([[t.muted, 0.82], [t.accent, 0.07], [t.bg2, 0.11]]), t.bg, 4.5),
|
|
116
|
+
'--node-cold': ensureContrast(cold, t.bg, COLD_FAR_MIN, COLD_FAR_OPACITY),
|
|
117
|
+
// Point décoratif : simple plancher de visibilité.
|
|
118
|
+
'--node-cold-dot': ensureContrast(blend([[t.muted, 0.25], [t.accent, 0.045], [t.panelA, 0.705]]), t.bg, 1.5),
|
|
119
|
+
};
|
|
120
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export const TIER_DAYS = { actif: 7, recent: 30 };
|
|
2
|
+
const DAY_MS = 86_400_000;
|
|
3
|
+
export function tierOf(lastActivity, now) {
|
|
4
|
+
if (!lastActivity)
|
|
5
|
+
return 'veille';
|
|
6
|
+
const t = Date.parse(lastActivity);
|
|
7
|
+
if (Number.isNaN(t))
|
|
8
|
+
return 'veille';
|
|
9
|
+
const age = now.getTime() - t;
|
|
10
|
+
if (age <= TIER_DAYS.actif * DAY_MS)
|
|
11
|
+
return 'actif';
|
|
12
|
+
if (age <= TIER_DAYS.recent * DAY_MS)
|
|
13
|
+
return 'recent';
|
|
14
|
+
return 'veille';
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|