specbox 6.29.0 → 6.29.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/README.md +5 -3
- package/bin/specbox.mjs +38 -2
- package/hooks/app-docs-sync-guard.mjs +326 -0
- package/hooks/branch-guard.mjs +79 -0
- package/hooks/checkpoint-freshness-guard.mjs +56 -0
- package/hooks/commit-spec-guard.mjs +61 -0
- package/hooks/context-budget-guard.mjs +130 -0
- package/hooks/design-gate.mjs +144 -0
- package/hooks/design-review-gate.mjs +102 -0
- package/hooks/design-system-gate.mjs +134 -0
- package/hooks/e2e-gate.mjs +86 -0
- package/hooks/file-ownership-guard.mjs +163 -0
- package/hooks/freeform-fragment.mjs +160 -0
- package/hooks/freeform-path-guard.mjs +172 -0
- package/hooks/healing-budget-guard.mjs +83 -0
- package/hooks/hooks-history.json +176 -0
- package/hooks/hooks-manifest.json +51 -0
- package/hooks/implement-checkpoint.mjs +46 -0
- package/hooks/implement-healing.mjs +38 -0
- package/hooks/lib/autopilot.mjs +240 -0
- package/hooks/lib/config.mjs +117 -0
- package/hooks/lib/decisiones.mjs +58 -0
- package/hooks/lib/design-gaps.mjs +272 -0
- package/hooks/lib/execution-context.mjs +69 -0
- package/hooks/lib/freeform-fragment.mjs +379 -0
- package/hooks/lib/freeform-path.mjs +115 -0
- package/hooks/lib/handoff-builder.mjs +388 -0
- package/hooks/lib/heartbeat-send.mjs +91 -0
- package/hooks/lib/heartbeat.mjs +110 -0
- package/hooks/lib/mcp-client-io.mjs +210 -0
- package/hooks/lib/mcp-client.mjs +91 -0
- package/hooks/lib/native-reservation-revalidate.mjs +80 -0
- package/hooks/lib/output.mjs +70 -0
- package/hooks/lib/ownership-map.mjs +162 -0
- package/hooks/lib/token-counter.mjs +81 -0
- package/hooks/lib/utils.mjs +235 -0
- package/hooks/no-bypass-guard.mjs +57 -0
- package/hooks/on-session-end.mjs +163 -0
- package/hooks/pipeline-phase-guard.mjs +140 -0
- package/hooks/post-implement-validate.mjs +61 -0
- package/hooks/pre-commit-lint.mjs +76 -0
- package/hooks/pre-prd-discovery-check.mjs +242 -0
- package/hooks/pre-read-budget-guard.mjs +83 -0
- package/hooks/quality-first-guard.mjs +85 -0
- package/hooks/read-tracker.mjs +33 -0
- package/hooks/session-heartbeat.mjs +113 -0
- package/hooks/session-start.mjs +159 -0
- package/hooks/settings-hooks.json +363 -0
- package/hooks/spec-guard.mjs +152 -0
- package/hooks/stripe-safety-guard.mjs +262 -0
- package/hooks/uc-lifecycle-guard.mjs +87 -0
- package/lib/hooks.mjs +156 -0
- package/lib/install.mjs +9 -0
- package/lib/internal.mjs +26 -3
- package/lib/mcp-headers.mjs +31 -3
- package/lib/messages.mjs +41 -0
- package/package.json +4 -2
package/lib/messages.mjs
CHANGED
|
@@ -28,11 +28,14 @@ export function messages(lang) {
|
|
|
28
28
|
" login conecta este ordenador a SpecBox con tu cuenta de GitHub",
|
|
29
29
|
" status enseña con qué cuenta y dispositivo estás conectado",
|
|
30
30
|
" logout desconecta este ordenador",
|
|
31
|
+
" hooks [status|update] compara los hooks del proyecto con los publicados y los",
|
|
32
|
+
" actualiza sin pisar los que cambiaste (--overwrite <hook> para sustituirlo)",
|
|
31
33
|
"",
|
|
32
34
|
"Opciones:",
|
|
33
35
|
" --server <url> servidor MCP (por defecto el de SpecBox)",
|
|
34
36
|
" --cloud <url> API del panel",
|
|
35
37
|
" --no-browser no abrir el navegador",
|
|
38
|
+
" --project <dir> proyecto de hooks (por defecto, el repositorio actual)",
|
|
36
39
|
" --version, --help",
|
|
37
40
|
].join("\n")
|
|
38
41
|
: [
|
|
@@ -42,11 +45,14 @@ export function messages(lang) {
|
|
|
42
45
|
" login connect this computer to SpecBox with your GitHub account",
|
|
43
46
|
" status show which account and device you are connected with",
|
|
44
47
|
" logout disconnect this computer",
|
|
48
|
+
" hooks [status|update] compare the project's hooks with the published ones and",
|
|
49
|
+
" update them without overwriting the ones you changed (--overwrite <hook>)",
|
|
45
50
|
"",
|
|
46
51
|
"Options:",
|
|
47
52
|
" --server <url> MCP server (SpecBox's by default)",
|
|
48
53
|
" --cloud <url> panel API",
|
|
49
54
|
" --no-browser do not open the browser",
|
|
55
|
+
" --project <dir> project for hooks (default: the current repository)",
|
|
50
56
|
" --version, --help",
|
|
51
57
|
].join("\n"),
|
|
52
58
|
loginTitle: es ? "SpecBox · conectar este ordenador" : "SpecBox · connect this computer",
|
|
@@ -119,6 +125,41 @@ export function messages(lang) {
|
|
|
119
125
|
]
|
|
120
126
|
).join("\n");
|
|
121
127
|
},
|
|
128
|
+
hooksNotPackaged: es
|
|
129
|
+
? "Este specbox no trae hooks empaquetados (¿se ejecuta desde el repositorio?). Usa npx specbox@latest hooks."
|
|
130
|
+
: "This specbox carries no packaged hooks (running from the repository?). Use npx specbox@latest hooks.",
|
|
131
|
+
hooksStatus: (status, root) => {
|
|
132
|
+
const label = es
|
|
133
|
+
? { current: "al día", updatable: "se actualiza", modified: "retocado: no se toca", missing: "falta: se instala", retired: "ya no se publica: no se borra" }
|
|
134
|
+
: { current: "up to date", updatable: "will be updated", modified: "changed locally: left as is", missing: "missing: will be installed", retired: "no longer published: not deleted" };
|
|
135
|
+
const lines = [
|
|
136
|
+
es
|
|
137
|
+
? `Hooks de ${root} frente a SpecBox ${status.version} (instalados: ${status.installed_version ?? "sin registro"})`
|
|
138
|
+
: `Hooks of ${root} against SpecBox ${status.version} (installed: ${status.installed_version ?? "no record"})`,
|
|
139
|
+
];
|
|
140
|
+
const differ = status.hooks.filter((h) => h.state !== "current");
|
|
141
|
+
for (const h of differ) lines.push(` ${h.path.padEnd(36)} ${label[h.state]}`);
|
|
142
|
+
if (status.settings_missing.length) {
|
|
143
|
+
lines.push(es ? ` .claude/settings.json: faltan ${status.settings_missing.length} registros de hooks (se añaden)` : ` .claude/settings.json: ${status.settings_missing.length} hook registrations missing (will be added)`);
|
|
144
|
+
}
|
|
145
|
+
if (!status.differs) lines.push(es ? " Todo al día." : " Everything is up to date.");
|
|
146
|
+
else lines.push(es ? ` ${status.hooks.length - differ.length} hooks al día.` : ` ${status.hooks.length - differ.length} hooks up to date.`);
|
|
147
|
+
return lines.join("\n");
|
|
148
|
+
},
|
|
149
|
+
hooksUpdated: (r) => {
|
|
150
|
+
const lines = [es ? `✓ Hooks actualizados a ${r.version}: ${r.written.length} escritos.` : `✓ Hooks updated to ${r.version}: ${r.written.length} written.`];
|
|
151
|
+
for (const k of r.kept) {
|
|
152
|
+
lines.push(
|
|
153
|
+
es
|
|
154
|
+
? ` ${k.path}: lo cambiaste tú; la versión nueva está en ${k.new}. Compáralas y quédate con la tuya o pasa a la nueva con --overwrite ${k.path.replace(/\.mjs$/, "")}.`
|
|
155
|
+
: ` ${k.path}: you changed it; the new version is in ${k.new}. Compare them and keep yours or switch with --overwrite ${k.path.replace(/\.mjs$/, "")}.`,
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
if (r.settings_added) {
|
|
159
|
+
lines.push(es ? ` .claude/settings.json: ${r.settings_added} registros añadidos (copia en ${r.settings_backup ?? "—"}).` : ` .claude/settings.json: ${r.settings_added} registrations added (copy in ${r.settings_backup ?? "—"}).`);
|
|
160
|
+
}
|
|
161
|
+
return lines.join("\n");
|
|
162
|
+
},
|
|
122
163
|
loggedOut: (name, remote) =>
|
|
123
164
|
es
|
|
124
165
|
? `✓ Dispositivo desconectado: «${name}».${remote ? "" : "\n ⚠ No se pudo avisar al panel: desconéctalo también en Perfil → Dispositivos conectados."}\n Claude Code seguirá configurado y se conectará sin cuenta hasta que vuelvas a ejecutar specbox login.`
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "specbox",
|
|
3
|
-
"version": "6.29.
|
|
4
|
-
"description": "Conecta este ordenador a SpecBox sin copiar tokens
|
|
3
|
+
"version": "6.29.2",
|
|
4
|
+
"description": "Conecta este ordenador a SpecBox sin copiar tokens (specbox login, status y logout) y actualiza los hooks del proyecto sin pisar los tuyos (specbox hooks).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"specbox": "bin/specbox.mjs"
|
|
@@ -9,12 +9,14 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
"bin",
|
|
11
11
|
"lib",
|
|
12
|
+
"hooks",
|
|
12
13
|
"README.md"
|
|
13
14
|
],
|
|
14
15
|
"engines": {
|
|
15
16
|
"node": ">=18.17"
|
|
16
17
|
},
|
|
17
18
|
"scripts": {
|
|
19
|
+
"prepack": "node scripts/pack-hooks.mjs",
|
|
18
20
|
"test": "node --test test/*.test.mjs"
|
|
19
21
|
},
|
|
20
22
|
"keywords": [
|