@roomi-fields/grillhouse 0.51.0 → 0.53.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/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +68 -0
- package/agents/direct.md +1 -1
- package/cadre/templates/projet/vitest.config.cjs +45 -0
- package/charte/plan.md +47 -0
- package/charte/preuve.md +39 -0
- package/charte/superviseur.md +60 -0
- package/charte/tests.md +38 -0
- package/charte.md +23 -178
- package/dist/temporal/circuit/appel.d.ts +2 -0
- package/dist/temporal/circuit/appel.js +24 -2
- package/dist/temporal/circuit/appel.js.map +1 -1
- package/dist/temporal/circuit/client.d.ts +15 -7
- package/dist/temporal/circuit/client.js +42 -11
- package/dist/temporal/circuit/client.js.map +1 -1
- package/dist/temporal/circuit/commande.js +17 -6
- package/dist/temporal/circuit/commande.js.map +1 -1
- package/dist/temporal/circuit/contrat.d.ts +9 -0
- package/dist/temporal/circuit/contrat.js +6 -0
- package/dist/temporal/circuit/contrat.js.map +1 -1
- package/dist/temporal/circuit/deroule.js +25 -4
- package/dist/temporal/circuit/deroule.js.map +1 -1
- package/dist/temporal/client.d.ts +35 -1
- package/dist/temporal/client.js +144 -1
- package/dist/temporal/client.js.map +1 -1
- package/dist/temporal/commande.js +31 -13
- package/dist/temporal/commande.js.map +1 -1
- package/dist/temporal/etat.d.ts +3 -1
- package/dist/temporal/etat.js +31 -17
- package/dist/temporal/etat.js.map +1 -1
- package/dist/temporal/file/activites.js +1 -1
- package/dist/temporal/file/activites.js.map +1 -1
- package/dist/temporal/file/contrat.d.ts +4 -5
- package/dist/temporal/file/contrat.js +2 -2
- package/dist/temporal/file/contrat.js.map +1 -1
- package/dist/temporal/file/deroule.js +7 -5
- package/dist/temporal/file/deroule.js.map +1 -1
- package/dist/temporal/installation.d.ts +103 -53
- package/dist/temporal/installation.js +842 -237
- package/dist/temporal/installation.js.map +1 -1
- package/dist/temporal/nuits/deroule.js +3 -1
- package/dist/temporal/nuits/deroule.js.map +1 -1
- package/dist/temporal/places/deroule.js +2 -1
- package/dist/temporal/places/deroule.js.map +1 -1
- package/dist/temporal/sonde/deroule.js +2 -1
- package/dist/temporal/sonde/deroule.js.map +1 -1
- package/dist/temporal/tickets/deroule.js +4 -3
- package/dist/temporal/tickets/deroule.js.map +1 -1
- package/dist/temporal/travailleur.d.ts +7 -1
- package/dist/temporal/travailleur.js +49 -25
- package/dist/temporal/travailleur.js.map +1 -1
- package/docs/INTERFACE.md +20 -14
- package/docs/architecture/circuit.md +19 -16
- package/docs/architecture/entree.md +8 -9
- package/docs/architecture/greffon.md +54 -20
- package/docs/architecture/installation.md +99 -60
- package/docs/architecture/machine.md +31 -4
- package/docs/architecture/tests.md +22 -8
- package/docs/lexique.md +12 -3
- package/hooks/hooks.json +10 -10
- package/hooks/register.tsx +84 -2
- package/package.json +4 -2
- package/scripts/activites.mjs +25 -9
- package/scripts/aiguillage.mjs +1 -1
- package/scripts/attente-au-tour.mjs +2 -3
- package/scripts/bilan.mjs +116 -56
- package/scripts/bilans-gardes.mjs +37 -0
- package/scripts/circuit.mjs +256 -42
- package/scripts/circuits-du-serveur.mjs +3 -2
- package/scripts/circuits-tenus.d.mts +7 -0
- package/scripts/circuits-tenus.mjs +17 -0
- package/scripts/copie-de-montee.mjs +354 -0
- package/scripts/copies-du-depot.d.mts +13 -0
- package/scripts/copies-du-depot.mjs +66 -0
- package/scripts/copies-finies.mjs +6 -40
- package/scripts/crochets.mjs +16 -2
- package/scripts/direct.mjs +2 -2
- package/scripts/droits.mjs +117 -38
- package/scripts/engendres.mjs +5 -3
- package/scripts/entree-de-seance.mjs +35 -0
- package/scripts/enveloppe/enveloppe.mjs +23 -16
- package/scripts/enveloppe/lancer.sh +32 -22
- package/scripts/enveloppe/travail-de-la-copie.mjs +154 -0
- package/scripts/etapes.mjs +11 -3
- package/scripts/faits-du-circuit.mjs +12 -5
- package/scripts/file-des-tickets.d.mts +13 -2
- package/scripts/file-des-tickets.mjs +44 -12
- package/scripts/greffons.mjs +42 -27
- package/scripts/grillhouse-maj.mjs +105 -85
- package/scripts/init.mjs +1 -1
- package/scripts/integration/file.mjs +5 -2
- package/scripts/integration/integrer.mjs +14 -4
- package/scripts/jointure.d.ts +18 -1
- package/scripts/langages/c/commandes.mjs +17 -7
- package/scripts/langages/cargo/commandes.mjs +87 -34
- package/scripts/langages/cargo/index.mjs +6 -3
- package/scripts/langages/cargo/sccache.mjs +15 -12
- package/scripts/langages/python/commandes.mjs +68 -15
- package/scripts/langages/python/squelette.mjs +4 -3
- package/scripts/langages/typescript/configurations-de-vitest.mjs +118 -0
- package/scripts/langages/typescript/index.mjs +14 -12
- package/scripts/langages/typescript/migrations/configurations-en-commonjs.mjs +299 -0
- package/scripts/langages/typescript/squelette.mjs +20 -17
- package/scripts/langages/typescript/tests-de-nuit.mjs +3 -3
- package/scripts/langages/typescript/turbo-des-paquets.mjs +76 -39
- package/scripts/langages/typescript/verifier.mjs +27 -2
- package/scripts/langages/typescript/vitest-config/base.mjs +1 -1
- package/scripts/langages/typescript/vitest-config/bornes.mjs +1 -1
- package/scripts/langages/typescript/vitest-config/cibles.mjs +2 -2
- package/scripts/langages/typescript/{vitest.nuit.config.mjs → vitest.nuit.config.cjs} +61 -50
- package/scripts/mesure/pression.mjs +5 -3
- package/scripts/migrations/serveurs-de-l-index.mjs +1 -1
- package/scripts/migrations/suivi-du-superviseur-retire.mjs +56 -0
- package/scripts/migrations.mjs +2 -0
- package/scripts/montee.mjs +524 -0
- package/scripts/nuit.sh +3 -2
- package/scripts/outil.mjs +5 -3
- package/scripts/paquet-npm.mjs +22 -0
- package/scripts/paquet.mjs +5 -5
- package/scripts/pre-compact.mjs +25 -0
- package/scripts/reponses-du-circuit.d.mts +17 -2
- package/scripts/reponses-du-circuit.mjs +78 -20
- package/scripts/resultats.mjs +42 -14
- package/scripts/retirer-les-copies-finies.mjs +4 -7
- package/scripts/seances.mjs +81 -29
- package/scripts/services-du-noyau.mjs +7 -2
- package/scripts/session-start.sh +19 -10
- package/scripts/sortie-de-seance.mjs +70 -0
- package/scripts/sortie.mjs +4 -7
- package/scripts/sous-commandes.mjs +1 -1
- package/scripts/superviseur.mjs +417 -159
- package/scripts/tableau.mjs +249 -152
- package/scripts/ticket-du-circuit.mjs +22 -0
- package/scripts/transitions.d.mts +6 -9
- package/scripts/transitions.mjs +123 -36
- package/scripts/verrou-de-fichier.d.mts +11 -0
- package/skills/direct/SKILL.md +21 -11
- package/skills/explorateur/SKILL.md +8 -3
- package/skills/grill/SKILL.md +11 -8
- package/skills/grill/references/paquets.md +4 -4
- package/skills/pitmaster/SKILL.md +99 -53
- package/skills/pitmaster/references/cadre.md +1 -1
- package/skills/pitmaster/references/consigne-agent.md +1 -1
- package/skills/pitmaster/references/tour.md +6 -5
- package/skills/relecteur/SKILL.md +9 -2
- package/skills/testwriter/SKILL.md +3 -3
- package/cadre/templates/projet/pitmaster/SUIVI.md +0 -22
- package/cadre/templates/projet/vitest.config.ts +0 -44
- package/scripts/attente-a-l-arret.mjs +0 -114
package/scripts/session-start.sh
CHANGED
|
@@ -20,9 +20,10 @@
|
|
|
20
20
|
# - The plugins: scripts/greffons.mjs --absents reads `.claude/settings.json` and
|
|
21
21
|
# `claude plugin list --json` (each call stopped after 5 s). Each declared plugin not installed
|
|
22
22
|
# joins « Manque » as « le greffon <id> », the missing claude command as « la commande claude »
|
|
23
|
-
# (
|
|
23
|
+
# (the line names `npx grillhouse greffons`, which installs them without the montée), a failed or stopped reading as « la lecture des greffons … »; the
|
|
24
24
|
# same reading names the mod installed at another version than the package, with the command
|
|
25
|
-
# that aligns it
|
|
25
|
+
# that aligns it: `npx grillhouse greffons` for a mod behind; for a mod ahead, the montée to its
|
|
26
|
+
# version, with who launches it, where, and what it does. An agent's copy does not read them.
|
|
26
27
|
# - The worker of Temporal on a former version after a change of `grillhouse.outil` (`grillhouse
|
|
27
28
|
# temporal perime`) joins « Manque » with `npx grillhouse temporal installer`. An agent's copy
|
|
28
29
|
# does not read it.
|
|
@@ -31,10 +32,12 @@
|
|
|
31
32
|
# leads to no project of the frame, and each other fault of the key, in one line that names the
|
|
32
33
|
# key and the path. An agent's copy does not read it.
|
|
33
34
|
#
|
|
34
|
-
# The supervisor (scripts/superviseur.mjs
|
|
35
|
-
#
|
|
36
|
-
#
|
|
37
|
-
#
|
|
35
|
+
# The supervisor (scripts/superviseur.mjs, given the `source` of the hook's input): the session
|
|
36
|
+
# takes the lock of its repository; when its opening takes it, and after a /clear or a compaction
|
|
37
|
+
# of the session that holds it, it receives « Les questions des circuits », « Les circuits du
|
|
38
|
+
# dépôt » and the note of resumption; a second session while the first lives receives first « Un
|
|
39
|
+
# autre superviseur tient ce dépôt ». An agent's copy takes nothing and receives nothing, nor does
|
|
40
|
+
# the compaction of a subagent (`agent_id` in the input).
|
|
38
41
|
#
|
|
39
42
|
# A session of a role of the frame (`claude --agent <rôle>`: the hook's input names it,
|
|
40
43
|
# `agent_type`, bare or `grillhouse:<rôle>`, and the plugin defines it,
|
|
@@ -47,11 +50,14 @@ root="${CLAUDE_PROJECT_DIR:-$PWD}"
|
|
|
47
50
|
ici="$(cd "$(dirname "$0")" && pwd)"
|
|
48
51
|
entree=
|
|
49
52
|
[ -t 0 ] || entree="$(cat)"
|
|
50
|
-
role=
|
|
53
|
+
role= origine= sous_agent=
|
|
54
|
+
{ read -r role; read -r origine; read -r sous_agent; } < <(printf '%s' "$entree" | node -e 'let s="";process.stdin.on("data",d=>s+=d).on("end",()=>{let e={};try{e=JSON.parse(s)}catch{}for(const v of [e?.agent_type,e?.source])console.log(typeof v==="string"&&/^[A-Za-z0-9_:-]+$/.test(v)?v:"");console.log(e?.agent_id?"1":"")})' 2>/dev/null)
|
|
51
55
|
role="${role#grillhouse:}"
|
|
52
56
|
[ -n "$role" ] && [ -n "${CLAUDE_PLUGIN_ROOT:-}" ] && [ -f "$CLAUDE_PLUGIN_ROOT/agents/$role.md" ] && exit 0
|
|
53
57
|
# One supervisor per project: the lock of the repository, or the section that says who holds it.
|
|
54
|
-
|
|
58
|
+
# The compaction of a subagent (an input that bears agent_id) is none of the supervisor's.
|
|
59
|
+
superviseur=
|
|
60
|
+
[ "$origine" = compact ] && [ -n "$sous_agent" ] || superviseur="$(node "$ici/superviseur.mjs" "$root" "$origine" 2>/dev/null)"
|
|
55
61
|
[ -z "$superviseur" ] || echo "$superviseur"
|
|
56
62
|
# The published version that leads the repository (grillhouse.outil), when it cannot be installed:
|
|
57
63
|
# the orchestration runs on the code of the repository, which the session is told
|
|
@@ -109,6 +115,9 @@ if [ -z "$copie_agent" ]; then
|
|
|
109
115
|
"ecart "*)
|
|
110
116
|
read -r _ e_id e_greffon e_paquet e_commande <<< "$ligne"
|
|
111
117
|
ecart_versions="Le greffon $e_id est en $e_greffon, le paquet @roomi-fields/grillhouse en $e_paquet : les deux sortent ensemble, sous une même version. Aligne-les : \`$e_commande\`."
|
|
118
|
+
case "$e_commande" in
|
|
119
|
+
"npx grillhouse maj "*) ecart_versions+=" Le superviseur la lance dans l'arbre principal (une copie la refuse) : elle monte le projet, commite, avance main et pousse. \`npx grillhouse maj\` sans version garde la version du projet et laisse le greffon en avance." ;;
|
|
120
|
+
esac
|
|
112
121
|
;;
|
|
113
122
|
esac
|
|
114
123
|
done < <(timeout -k 1 8 node "$ici/greffons.mjs" --absents "$root" 2>/dev/null)
|
|
@@ -238,7 +247,7 @@ epopees="$(cd "$root" && bd list --type epic --all --json --limit 0 2>/dev/null
|
|
|
238
247
|
|
|
239
248
|
echo "## Éléments du projet à définir (Roomi's Grillhouse)"
|
|
240
249
|
if [ ${#missing[@]} -gt 0 ]; then
|
|
241
|
-
echo "Manque : $(IFS=';'; echo "${missing[*]}" | sed "s/;/, /g"). Installe-les toi-même avant tout autre geste, sans invite, chacun par la commande qu'il nomme ; \`npx grillhouse
|
|
250
|
+
echo "Manque : $(IFS=';'; echo "${missing[*]}" | sed "s/;/, /g"). Installe-les toi-même avant tout autre geste, sans invite, chacun par la commande qu'il nomme ; \`npx grillhouse greffons\` installe les greffons et \`npx grillhouse hooks\` pose les crochets git du cadre, sans monter le projet comme le fait \`npx grillhouse maj\`, qui commite et avance main."
|
|
242
251
|
fi
|
|
243
252
|
if [ ${#pending[@]} -gt 0 ]; then
|
|
244
253
|
echo "Pas encore renseignés :"
|
|
@@ -246,7 +255,7 @@ if [ ${#pending[@]} -gt 0 ]; then
|
|
|
246
255
|
echo "Dès ta première réponse, propose au responsable de les griller, chacun avec ce que tu recommandes pour ce projet (compétence \`grill\`). Il peut accepter, en choisir un, ou reporter ; tant qu'un élément reste vide, cette proposition revient à chaque séance."
|
|
247
256
|
fi
|
|
248
257
|
if [ ${#wiring[@]} -gt 0 ]; then
|
|
249
|
-
echo "À brancher : $(IFS=' '; echo "${wiring[*]}") dans le package.json de la racine. L'intégration (\`npx grillhouse integrer\`, contrat en tête de son script) et la nuit lancent \`npm run verifier\` (les gardes et les tests, par l'outil du langage du projet), les agents \`npm test\` ; sans eux, l'intégration refuse chaque lot.
|
|
258
|
+
echo "À brancher : $(IFS=' '; echo "${wiring[*]}") dans le package.json de la racine. L'intégration (\`npx grillhouse integrer\`, contrat en tête de son script) et la nuit lancent \`npm run verifier\` (les gardes et les tests, par l'outil du langage du projet), les agents \`npm test\` ; sans eux, l'intégration refuse chaque lot. Écris-les pour ses tests ; la montée (\`npm run grillhouse:maj\`, qui commite et avance main, au superviseur) les écrit aussi quand le langage du projet sait jouer ses tests."
|
|
250
259
|
fi
|
|
251
260
|
if [ -n "$nuit_en_table" ]; then
|
|
252
261
|
echo "La table des tâches du poste lance encore la nuit : \`$nuit_en_table\`. La planification des nuits de la machine la remplace (\`npx grillhouse nuit --planifier\`, une fois par poste) : propose au responsable de retirer ces lignes (\`crontab -e\`)."
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// What a role session leaves of its output stream (claude's `--output-format stream-json`), read
|
|
2
|
+
// by both launchers once claude ends (scripts/seances.mjs out of the envelope,
|
|
3
|
+
// scripts/enveloppe/lancer.sh in it). A message of the stream is a line that holds a JSON object
|
|
4
|
+
// with a `type`. The result of the session is the line `type: result` alone: its sheet, the refusal
|
|
5
|
+
// of the API key and the usage limit are read there. The ticket's log takes that line and, as they
|
|
6
|
+
// are, the lines that are no message; the other messages stay in the transcript of the session.
|
|
7
|
+
// Without a result, the log takes after them the text of the last `assistant` message, where a
|
|
8
|
+
// usage limit said there is read at its end; the result of a tool, which may quote such a limit,
|
|
9
|
+
// never enters it. Architecture: docs/architecture/machine.md (§3.2).
|
|
10
|
+
//
|
|
11
|
+
// node sortie-de-seance.mjs <flux> <résultat>
|
|
12
|
+
//
|
|
13
|
+
// writes the result of the stream read in the file <flux> into <résultat> (empty without one), and
|
|
14
|
+
// the lines of the log on its standard output.
|
|
15
|
+
import { readFileSync, writeFileSync } from 'node:fs';
|
|
16
|
+
import { pathToFileURL } from 'node:url';
|
|
17
|
+
|
|
18
|
+
// The message the line holds, or null for a line that is none.
|
|
19
|
+
function messageDe(ligne) {
|
|
20
|
+
try {
|
|
21
|
+
const m = JSON.parse(ligne);
|
|
22
|
+
return typeof m?.type === 'string' ? m : null;
|
|
23
|
+
} catch {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const texteDe = message =>
|
|
29
|
+
(Array.isArray(message.message?.content) ? message.message.content : [])
|
|
30
|
+
.filter(bloc => bloc.type === 'text')
|
|
31
|
+
.map(bloc => bloc.text)
|
|
32
|
+
.join('\n');
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The stream `flux` sorted: `resultat`, its line `type: result` (the last one), empty without one;
|
|
36
|
+
* `journal`, the lines the ticket's log takes.
|
|
37
|
+
*/
|
|
38
|
+
export function trierLeFlux(flux) {
|
|
39
|
+
const lignes = flux.split('\n');
|
|
40
|
+
if (lignes.at(-1) === '') {
|
|
41
|
+
lignes.pop();
|
|
42
|
+
}
|
|
43
|
+
const journal = [];
|
|
44
|
+
let resultat = '';
|
|
45
|
+
let dernier = null;
|
|
46
|
+
for (const ligne of lignes) {
|
|
47
|
+
const message = messageDe(ligne);
|
|
48
|
+
if (message?.type === 'result') {
|
|
49
|
+
resultat = ligne;
|
|
50
|
+
}
|
|
51
|
+
if (message?.type === 'assistant') {
|
|
52
|
+
dernier = message;
|
|
53
|
+
}
|
|
54
|
+
if (!message || message.type === 'result') {
|
|
55
|
+
journal.push(ligne);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
const dit = !resultat && dernier ? texteDe(dernier) : '';
|
|
59
|
+
if (dit) {
|
|
60
|
+
journal.push(dit);
|
|
61
|
+
}
|
|
62
|
+
return { resultat, journal };
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (import.meta.url === pathToFileURL(process.argv[1] ?? '').href) {
|
|
66
|
+
const [flux, fichier] = process.argv.slice(2);
|
|
67
|
+
const { resultat, journal } = trierLeFlux(readFileSync(flux, 'utf8'));
|
|
68
|
+
writeFileSync(fichier, resultat ? `${resultat}\n` : '');
|
|
69
|
+
process.stdout.write(journal.map(l => `${l}\n`).join(''));
|
|
70
|
+
}
|
package/scripts/sortie.mjs
CHANGED
|
@@ -150,19 +150,16 @@ export function etiqueter(
|
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
/**
|
|
153
|
-
* What follows the tag <etiquette> once its package is published: the
|
|
154
|
-
*
|
|
155
|
-
* installs the version), and the update of the frame's plugin installed for the repository, at
|
|
156
|
-
* its local scope, as in the other projects.
|
|
153
|
+
* What follows the tag <etiquette> once its package is published: the one command that updates a
|
|
154
|
+
* project, Grillhouse's repository included (`npx grillhouse maj <version>`, scripts/montee.mjs).
|
|
157
155
|
* @param {string} etiquette v<x.y.z>
|
|
158
156
|
* @returns {string}
|
|
159
157
|
*/
|
|
160
158
|
export function suiteDeLaSortie(etiquette) {
|
|
161
159
|
const version = etiquette.replace(/^v/, '');
|
|
162
160
|
return (
|
|
163
|
-
`Une fois ${version} publiée,
|
|
164
|
-
|
|
165
|
-
'claude plugin update grillhouse@roomi-fields --scope local (le greffon de Grillhouse).\n'
|
|
161
|
+
`Une fois ${version} publiée, chaque projet, Grillhouse compris, y monte par une commande, ` +
|
|
162
|
+
`dans son arbre principal : npx grillhouse maj ${version}\n`
|
|
166
163
|
);
|
|
167
164
|
}
|
|
168
165
|
|
|
@@ -36,7 +36,6 @@ const SCRIPTS = path.dirname(fileURLToPath(import.meta.url));
|
|
|
36
36
|
// Each subcommand and its script, under `scripts/`, or the command of the module of the language
|
|
37
37
|
// that runs it (`{ langage }`, its name in `commandes`).
|
|
38
38
|
export const SOUS_COMMANDES = {
|
|
39
|
-
'attente-a-l-arret': 'attente-a-l-arret.mjs',
|
|
40
39
|
'attente-au-tour': 'attente-au-tour.mjs',
|
|
41
40
|
bilan: 'bilan.mjs',
|
|
42
41
|
binaires: 'binaires.mjs',
|
|
@@ -66,6 +65,7 @@ export const SOUS_COMMANDES = {
|
|
|
66
65
|
nuit: '../dist/temporal/nuits/commande.js',
|
|
67
66
|
outil: 'outil.mjs',
|
|
68
67
|
paquet: 'paquet.mjs',
|
|
68
|
+
'pre-compact': 'pre-compact.mjs',
|
|
69
69
|
pression: 'mesure/pression.mjs',
|
|
70
70
|
registre: 'registre.mjs',
|
|
71
71
|
resultats: 'resultats.mjs',
|