@roomi-fields/grillhouse 0.51.0 → 0.52.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 +20 -0
- package/charte/plan.md +47 -0
- package/charte/preuve.md +39 -0
- package/charte/superviseur.md +61 -0
- package/charte/tests.md +38 -0
- package/charte.md +22 -177
- package/dist/temporal/circuit/client.d.ts +1 -2
- package/dist/temporal/circuit/client.js +1 -2
- package/dist/temporal/circuit/client.js.map +1 -1
- package/docs/INTERFACE.md +4 -3
- package/docs/architecture/circuit.md +2 -2
- package/docs/architecture/entree.md +1 -1
- package/docs/architecture/greffon.md +43 -18
- package/docs/architecture/installation.md +17 -7
- package/docs/architecture/machine.md +30 -3
- package/docs/architecture/tests.md +8 -3
- package/docs/lexique.md +10 -1
- package/hooks/hooks.json +0 -10
- package/hooks/register.tsx +91 -3
- package/package.json +2 -1
- package/scripts/activites.mjs +20 -5
- package/scripts/aiguillage.mjs +0 -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 +3 -1
- package/scripts/direct.mjs +1 -1
- package/scripts/droits.mjs +115 -36
- 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 +77 -0
- package/scripts/jointure.d.ts +2 -1
- package/scripts/langages/python/commandes.mjs +50 -7
- package/scripts/langages/python/squelette.mjs +2 -1
- package/scripts/langages/typescript/index.mjs +12 -12
- package/scripts/langages/typescript/turbo-des-paquets.mjs +52 -2
- package/scripts/langages/typescript/verifier.mjs +27 -2
- 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/nuit.sh +3 -2
- package/scripts/paquet.mjs +1 -1
- package/scripts/resultats.mjs +2 -2
- package/scripts/seances.mjs +53 -26
- package/scripts/session-start.sh +8 -6
- package/scripts/sortie-de-seance.mjs +70 -0
- package/scripts/sous-commandes.mjs +0 -1
- package/scripts/superviseur.mjs +373 -155
- package/scripts/tableau.mjs +127 -49
- package/skills/explorateur/SKILL.md +2 -2
- package/skills/grill/SKILL.md +3 -2
- package/skills/pitmaster/SKILL.md +68 -34
- package/skills/pitmaster/references/cadre.md +1 -1
- package/skills/pitmaster/references/tour.md +6 -5
- package/skills/relecteur/SKILL.md +1 -1
- package/skills/testwriter/SKILL.md +2 -2
- package/cadre/templates/projet/pitmaster/SUIVI.md +0 -22
- package/scripts/attente-a-l-arret.mjs +0 -114
package/scripts/session-start.sh
CHANGED
|
@@ -31,10 +31,11 @@
|
|
|
31
31
|
# leads to no project of the frame, and each other fault of the key, in one line that names the
|
|
32
32
|
# key and the path. An agent's copy does not read it.
|
|
33
33
|
#
|
|
34
|
-
# The supervisor (scripts/superviseur.mjs
|
|
35
|
-
#
|
|
36
|
-
#
|
|
37
|
-
#
|
|
34
|
+
# The supervisor (scripts/superviseur.mjs, given the `source` of the hook's input): the session
|
|
35
|
+
# takes the lock of its repository; when its opening takes it, and after a /clear of the session
|
|
36
|
+
# that holds it, it receives « Les questions des circuits », « Les circuits du dépôt » and the note
|
|
37
|
+
# of resumption; a second session while the first lives receives first « Un autre superviseur tient
|
|
38
|
+
# ce dépôt ». An agent's copy takes nothing and receives nothing.
|
|
38
39
|
#
|
|
39
40
|
# A session of a role of the frame (`claude --agent <rôle>`: the hook's input names it,
|
|
40
41
|
# `agent_type`, bare or `grillhouse:<rôle>`, and the plugin defines it,
|
|
@@ -47,11 +48,12 @@ root="${CLAUDE_PROJECT_DIR:-$PWD}"
|
|
|
47
48
|
ici="$(cd "$(dirname "$0")" && pwd)"
|
|
48
49
|
entree=
|
|
49
50
|
[ -t 0 ] || entree="$(cat)"
|
|
50
|
-
role=
|
|
51
|
+
role= origine=
|
|
52
|
+
{ read -r role; read -r origine; } < <(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:"")})' 2>/dev/null)
|
|
51
53
|
role="${role#grillhouse:}"
|
|
52
54
|
[ -n "$role" ] && [ -n "${CLAUDE_PLUGIN_ROOT:-}" ] && [ -f "$CLAUDE_PLUGIN_ROOT/agents/$role.md" ] && exit 0
|
|
53
55
|
# One supervisor per project: the lock of the repository, or the section that says who holds it.
|
|
54
|
-
superviseur="$(node "$ici/superviseur.mjs" "$root" 2>/dev/null)"
|
|
56
|
+
superviseur="$(node "$ici/superviseur.mjs" "$root" "$origine" 2>/dev/null)"
|
|
55
57
|
[ -z "$superviseur" ] || echo "$superviseur"
|
|
56
58
|
# The published version that leads the repository (grillhouse.outil), when it cannot be installed:
|
|
57
59
|
# the orchestration runs on the code of the repository, which the session is told
|
|
@@ -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
|
+
}
|
|
@@ -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',
|