@roomi-fields/grillhouse 0.52.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 +48 -0
- package/agents/direct.md +1 -1
- package/cadre/templates/projet/vitest.config.cjs +45 -0
- package/charte/superviseur.md +36 -37
- package/charte.md +1 -1
- 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 +14 -5
- package/dist/temporal/circuit/client.js +41 -9
- 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 +17 -12
- package/docs/architecture/circuit.md +18 -15
- package/docs/architecture/entree.md +7 -8
- package/docs/architecture/greffon.md +30 -21
- package/docs/architecture/installation.md +87 -58
- package/docs/architecture/machine.md +1 -1
- package/docs/architecture/tests.md +14 -5
- package/docs/lexique.md +2 -2
- package/hooks/hooks.json +10 -0
- package/hooks/register.tsx +19 -25
- package/package.json +3 -2
- package/scripts/activites.mjs +5 -4
- package/scripts/aiguillage.mjs +1 -0
- package/scripts/circuit.mjs +254 -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 +2 -2
- package/scripts/engendres.mjs +5 -3
- package/scripts/enveloppe/travail-de-la-copie.mjs +77 -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 +16 -0
- 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 +18 -8
- package/scripts/langages/python/squelette.mjs +2 -2
- package/scripts/langages/typescript/configurations-de-vitest.mjs +118 -0
- package/scripts/langages/typescript/index.mjs +2 -0
- 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 +24 -37
- 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/montee.mjs +524 -0
- 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 +40 -12
- package/scripts/retirer-les-copies-finies.mjs +4 -7
- package/scripts/seances.mjs +28 -3
- package/scripts/services-du-noyau.mjs +7 -2
- package/scripts/session-start.sh +18 -11
- package/scripts/sortie.mjs +4 -7
- package/scripts/sous-commandes.mjs +1 -0
- package/scripts/superviseur.mjs +110 -70
- package/scripts/tableau.mjs +127 -108
- 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 +6 -1
- package/skills/grill/SKILL.md +9 -7
- package/skills/grill/references/paquets.md +4 -4
- package/skills/pitmaster/SKILL.md +45 -33
- package/skills/pitmaster/references/consigne-agent.md +1 -1
- package/skills/relecteur/SKILL.md +8 -1
- package/skills/testwriter/SKILL.md +1 -1
- package/cadre/templates/projet/vitest.config.ts +0 -44
package/scripts/tableau.mjs
CHANGED
|
@@ -27,6 +27,10 @@
|
|
|
27
27
|
// shows « ⤷ Question · <qui> » under its step;
|
|
28
28
|
// its card opens on that question, or on the stop (name, code) and the first line of its
|
|
29
29
|
// reason.
|
|
30
|
+
// - The direct circuit and the rescue command: an open circuit (it runs, or waits for an answer,
|
|
31
|
+
// never ended without its issue) keeps its ticket's line, and its agent `direct` stands at 3
|
|
32
|
+
// Code; on a ticket labelled `direct` without an open circuit, a role agent that works shows
|
|
33
|
+
// alone (`direct` under the block « Direct »), without the circuit's line.
|
|
30
34
|
// - Readings: a reading of the circuits or of the tickets that fails gives way to the last one
|
|
31
35
|
// that succeeded (`lectureGardee`, `tableau-lu-<quoi>.json` in the common git directory), its
|
|
32
36
|
// age in the alert that names the fault; a project beside the session's says its own faults.
|
|
@@ -65,13 +69,14 @@
|
|
|
65
69
|
// rank (« ⏳ <sorte> · <projet> · attend <raison> »). Such a line is marked `avancement`, which
|
|
66
70
|
// the pane measures again more often.
|
|
67
71
|
// - Signs: a ticket's line in AGENTS takes one of three, by the tone of its state: ▶ its step
|
|
68
|
-
// works (cyan; ▷ in a short circuit, a
|
|
69
|
-
// its right (« attend une place », « verrou », « disque », « démarre » in grey,
|
|
70
|
-
// machine; « question au superviseur », « question au responsable », « arrêté »
|
|
71
|
-
// waiting for someone); ⛔ it stopped on a fault or its pass is frozen (red). At
|
|
72
|
-
// AGENTS, 🔒 and ⏳ for a pass with no ticket, 🌙 the night under way. Alerts:
|
|
73
|
-
// claimed with nothing running, 🌙 a red night, ⚠ the others.
|
|
74
|
-
// width of a line counts its columns (`colonnes`), ⏳ and ⛔
|
|
72
|
+
// works (cyan; ▷ in a short circuit, ✎ in a direct one, by its view, `circuit`); ⏸ it waits,
|
|
73
|
+
// the reason on its right (« attend une place », « verrou », « disque », « démarre » in grey,
|
|
74
|
+
// waiting for the machine; « question au superviseur », « question au responsable », « arrêté »
|
|
75
|
+
// in yellow, waiting for someone); ⛔ it stopped on a fault or its pass is frozen (red). At
|
|
76
|
+
// the head of AGENTS, 🔒 and ⏳ for a pass with no ticket, 🌙 the night under way. Alerts:
|
|
77
|
+
// 💤 a ticket claimed with nothing running, 🌙 a red night, ⚠ the others.
|
|
78
|
+
// A sign is followed by a space; the width of a line counts its columns (`colonnes`), ⏳ and ⛔
|
|
79
|
+
// two.
|
|
75
80
|
// - Alerts: one per open night ticket (🌙), per circuit that waits for the supervisor (⏳, how
|
|
76
81
|
// long), a shell agent silent for 10 minutes, a ticket in progress with nothing running for 30
|
|
77
82
|
// minutes (💤), each with its state (`etat`).
|
|
@@ -129,8 +134,10 @@ import {
|
|
|
129
134
|
attendDeLAutreProjet,
|
|
130
135
|
enFileSansArchitecture,
|
|
131
136
|
enFileSurMain,
|
|
137
|
+
leReportRendLaPlace,
|
|
132
138
|
lireLesExternes,
|
|
133
139
|
lotEstSurMain,
|
|
140
|
+
reporteJusqua,
|
|
134
141
|
} from './file-des-tickets.mjs';
|
|
135
142
|
import { etatDesPlaces } from './places-de-la-machine.mjs';
|
|
136
143
|
import { duree as dureeDeLaFermeture } from './regles-des-places.mjs';
|
|
@@ -169,8 +176,8 @@ export const ROLE_DU_CIRCUIT = 'circuit';
|
|
|
169
176
|
// The role of a register line that the workflow of the nights writes for a night it skips
|
|
170
177
|
// (src/temporal/nuits/): no agent, no ticket, no turn; the board counts it nowhere.
|
|
171
178
|
export const ROLE_DE_LA_NUIT = 'nuit';
|
|
172
|
-
// The agent
|
|
173
|
-
//
|
|
179
|
+
// The agent who writes tests and code together, of a direct circuit or of the rescue command
|
|
180
|
+
// (scripts/direct.mjs), and the block of the board that lists those of the rescue command.
|
|
174
181
|
const ROLE_DIRECT = 'direct';
|
|
175
182
|
// A sub-agent's role from its meta file: the type it was spawned as; a named agent's `agentType`
|
|
176
183
|
// is its name.
|
|
@@ -179,13 +186,12 @@ export const roleDuMeta = m =>
|
|
|
179
186
|
// The states of a ticket, in the order the states' view lists them, with their meaning.
|
|
180
187
|
export const ETATS = [
|
|
181
188
|
{ cle: 'enCours', nom: 'en cours', sens: 'un agent y travaille' },
|
|
182
|
-
{ cle: 'enAttente', nom: 'en
|
|
189
|
+
{ cle: 'enAttente', nom: 'en file', sens: 'ton go, prêt à partir' },
|
|
183
190
|
{
|
|
184
191
|
cle: 'attendArchi',
|
|
185
192
|
nom: 'attend archi',
|
|
186
193
|
sens: 'ton go, sa section Architecture reste à écrire',
|
|
187
194
|
},
|
|
188
|
-
{ cle: 'fileDirecte', nom: 'en direct', sens: 'mené hors du circuit, pas encore pris' },
|
|
189
195
|
{ cle: 'bloques', nom: 'bloqué', sens: 'ton go, il attend un autre ticket' },
|
|
190
196
|
{ cle: 'sansGo', nom: 'sans go', sens: 'validé, il attend ton go' },
|
|
191
197
|
{ cle: 'aValider', nom: 'à valider', sens: 'une trouvaille attend ton accord' },
|
|
@@ -204,7 +210,6 @@ export const TONS = Object.freeze({
|
|
|
204
210
|
enCours: 'actif',
|
|
205
211
|
enAttente: 'discret',
|
|
206
212
|
attendArchi: 'discret',
|
|
207
|
-
fileDirecte: 'discret',
|
|
208
213
|
bloques: 'discret',
|
|
209
214
|
sansGo: 'attention',
|
|
210
215
|
aValider: 'attention',
|
|
@@ -213,6 +218,7 @@ export const TONS = Object.freeze({
|
|
|
213
218
|
// A circuit, a pass, a wait.
|
|
214
219
|
attendUnePlace: 'discret',
|
|
215
220
|
reporteLimite: 'discret',
|
|
221
|
+
reporteQuestion: 'discret',
|
|
216
222
|
attendUnePart: 'discret',
|
|
217
223
|
attendLeDisque: 'discret',
|
|
218
224
|
sansEtape: 'discret',
|
|
@@ -405,8 +411,8 @@ function avancer(etat, texte) {
|
|
|
405
411
|
}
|
|
406
412
|
const n = (u.input_tokens ?? 0) + (u.output_tokens ?? 0) + (u.cache_creation_input_tokens ?? 0);
|
|
407
413
|
etat.jetons += n;
|
|
408
|
-
// The tokens by minute of their message, which
|
|
409
|
-
//
|
|
414
|
+
// The tokens by minute of their message, of which the board counts in the day those since its
|
|
415
|
+
// marker; a state kept before them starts its own.
|
|
410
416
|
if (!Number.isNaN(t)) {
|
|
411
417
|
etat.minutes ??= {};
|
|
412
418
|
const minute = Math.floor(t / 60_000);
|
|
@@ -635,25 +641,6 @@ const metaDe = f => {
|
|
|
635
641
|
}
|
|
636
642
|
};
|
|
637
643
|
|
|
638
|
-
/**
|
|
639
|
-
* The tokens of the supervisor's sessions of the repository at <racine> by minute (`{ <minute>:
|
|
640
|
-
* <tokens> }`, the minute since the epoch): its main transcripts touched since the day's marker
|
|
641
|
-
* <jour>, read through <cache>; the sub-agents' are counted by their tickets.
|
|
642
|
-
*/
|
|
643
|
-
export function jetonsDuSuperviseur({ racine, home, jour, cache = {} }) {
|
|
644
|
-
const lire = lecteur(cache);
|
|
645
|
-
const out = {};
|
|
646
|
-
for (const f of fichiers(path.join(home, '.claude', 'projects', enTirets(racine)), '.jsonl')) {
|
|
647
|
-
if (statSync(f).mtimeMs < jour) {
|
|
648
|
-
continue;
|
|
649
|
-
}
|
|
650
|
-
for (const [minute, n] of Object.entries(lire(f)?.minutes ?? {})) {
|
|
651
|
-
out[minute] = (out[minute] ?? 0) + n;
|
|
652
|
-
}
|
|
653
|
-
}
|
|
654
|
-
return out;
|
|
655
|
-
}
|
|
656
|
-
|
|
657
644
|
// The agents running now, each with its measures so far. `ps` is the process list
|
|
658
645
|
// (`pid etimes args` per line); `cache` keeps the readings of unchanged transcripts. A role agent
|
|
659
646
|
// launched in a shell shows by the envelope lancer.sh starts for it,
|
|
@@ -765,6 +752,9 @@ export const attendLeSuperviseur = c =>
|
|
|
765
752
|
* @returns {string}
|
|
766
753
|
*/
|
|
767
754
|
export const cleDe = c => [c.ticket, c.run, c.numero, c.arret ?? 'interrompu'].join(':');
|
|
755
|
+
// The key of the stop of a circuit as the board holds it (`cle`, kept since its `numero` there is
|
|
756
|
+
// its ticket's number), else `cleDe`.
|
|
757
|
+
const cleDuStop = c => c.cle ?? cleDe(c);
|
|
768
758
|
|
|
769
759
|
/** The file of the stops gone up to the supervisor of the repository at <racine>. */
|
|
770
760
|
export const remonteesDe = racine =>
|
|
@@ -913,7 +903,8 @@ export function lignesDesParts({
|
|
|
913
903
|
* the alert says; `fauteTickets`, the fault of the reading of the tickets, said in an alert, and
|
|
914
904
|
* `ticketsLusA`, the time of the last one that succeeded, whose tickets `tous` holds;
|
|
915
905
|
* `echecPrefixe`, the cause of a ticket prefix that did not read, named in an alert; `voies`, the
|
|
916
|
-
* way of each circuit done (`voiesDesCircuits`), whose sign FAITS AUJOURD'HUI shows
|
|
906
|
+
* way of each circuit done (`voiesDesCircuits`), whose sign FAITS AUJOURD'HUI shows; `bilans`,
|
|
907
|
+
* the kept bilan of each ticket (`bilansGardes`), whose status says whether the engine led it.
|
|
917
908
|
* @param {{ tous: any[], prefix?: string, racine?: string | null, registre: any[], vivants: any[],
|
|
918
909
|
* circuits?: any[],
|
|
919
910
|
* circuitsLusA?: number | null, fauteTickets?: string | null, ticketsLusA?: number | null,
|
|
@@ -925,7 +916,8 @@ export function lignesDesParts({
|
|
|
925
916
|
* depuis: number, disque?: string | null }[],
|
|
926
917
|
* fermeture?: { auteur: 'superviseur', depuis: number, phase: string } | null } | null,
|
|
927
918
|
* nuit?: { racine: string, depuis: number | null } | null, muet?: boolean, faute?: string | null,
|
|
928
|
-
* echecPrefixe?: string | null, voies?: Record<string, 'complet' | 'court'
|
|
919
|
+
* echecPrefixe?: string | null, voies?: Record<string, 'complet' | 'court'>,
|
|
920
|
+
* bilans?: Record<string, { statut?: string }> }} lu
|
|
929
921
|
*/
|
|
930
922
|
export function assembler({
|
|
931
923
|
tous,
|
|
@@ -949,7 +941,7 @@ export function assembler({
|
|
|
949
941
|
echecPrefixe = null,
|
|
950
942
|
remontees = [],
|
|
951
943
|
voies = {},
|
|
952
|
-
|
|
944
|
+
bilans = {},
|
|
953
945
|
externes,
|
|
954
946
|
limite = null,
|
|
955
947
|
lotSurMain = () => false,
|
|
@@ -1013,7 +1005,12 @@ export function assembler({
|
|
|
1013
1005
|
!c.integre &&
|
|
1014
1006
|
(parId.get(c.ticket).status !== 'closed' || c.vivant || attendLeSuperviseur(c))
|
|
1015
1007
|
)
|
|
1016
|
-
|
|
1008
|
+
// `reporteA`: the hour its ticket is deferred to, still to come; none for a ticket closed.
|
|
1009
|
+
.map(c => {
|
|
1010
|
+
const t = parId.get(c.ticket);
|
|
1011
|
+
const reporteA = t.status === 'closed' ? null : reporteJusqua(t, maintenant);
|
|
1012
|
+
return [c.ticket, { ...c, reporteA }];
|
|
1013
|
+
})
|
|
1017
1014
|
);
|
|
1018
1015
|
const actifs = new Set([
|
|
1019
1016
|
...enCoursMesures.map(v => v.ticket).filter(Boolean),
|
|
@@ -1028,8 +1025,8 @@ export function assembler({
|
|
|
1028
1025
|
const pret = new Set(prets.map(t => t.id));
|
|
1029
1026
|
const avalider = new Set(aValider.map(t => t.id));
|
|
1030
1027
|
const bloquePar = t => [...blocages(t).map(d => numero(d.depends_on_id)), ...attentesExternes(t)];
|
|
1031
|
-
// The owner's go: the label `circuit`, set on his word
|
|
1032
|
-
const circuit = t => (t.labels ?? []).
|
|
1028
|
+
// The owner's go: the label `circuit`, set on his word, or `direct`.
|
|
1029
|
+
const circuit = t => (t.labels ?? []).some(l => l === 'circuit' || l === 'direct');
|
|
1033
1030
|
// A ticket's state: in progress (claimed, or its circuit launched and not integrated, its
|
|
1034
1031
|
// question deferred or its ticket closed before its integration included: AGENTS shows it, and it
|
|
1035
1032
|
// is done only once integrated), done, deferred,
|
|
@@ -1048,10 +1045,6 @@ export function assembler({
|
|
|
1048
1045
|
if (avalider.has(t.id)) {
|
|
1049
1046
|
return 'aValider';
|
|
1050
1047
|
}
|
|
1051
|
-
// A ticket led out of the circuit, not yet claimed: the direct queue.
|
|
1052
|
-
if ((t.labels ?? []).includes('direct')) {
|
|
1053
|
-
return 'fileDirecte';
|
|
1054
|
-
}
|
|
1055
1048
|
if (!circuit(t)) {
|
|
1056
1049
|
return 'sansGo';
|
|
1057
1050
|
}
|
|
@@ -1066,7 +1059,6 @@ export function assembler({
|
|
|
1066
1059
|
enCours: 0,
|
|
1067
1060
|
enAttente: 0,
|
|
1068
1061
|
attendArchi: 0,
|
|
1069
|
-
fileDirecte: 0,
|
|
1070
1062
|
bloques: 0,
|
|
1071
1063
|
fermes: 0,
|
|
1072
1064
|
sansGo: 0,
|
|
@@ -1222,6 +1214,7 @@ export function assembler({
|
|
|
1222
1214
|
...titre(t),
|
|
1223
1215
|
mere: !travail(t),
|
|
1224
1216
|
etat: e,
|
|
1217
|
+
voie: aLabel(t, 'direct') ? 'direct' : 'complet',
|
|
1225
1218
|
faits,
|
|
1226
1219
|
total: liste.length,
|
|
1227
1220
|
bloquePar: bloquePar(t),
|
|
@@ -1267,14 +1260,21 @@ export function assembler({
|
|
|
1267
1260
|
const e = etapeDuRole(role);
|
|
1268
1261
|
return e ? blocs.find(b => b.numero === e.numero) : undefined;
|
|
1269
1262
|
};
|
|
1270
|
-
//
|
|
1271
|
-
|
|
1263
|
+
// A circuit open: it runs, or waits for an answer; never ended without its issue.
|
|
1264
|
+
const ouvertSur = c => Boolean(c) && !c.sansIssue && (c.vivant || attendLeSuperviseur(c));
|
|
1265
|
+
// The block « Direct » heads them: the agents of the rescue command (`npx grillhouse direct`),
|
|
1266
|
+
// on a ticket with no open circuit, at no step.
|
|
1272
1267
|
const directs = [];
|
|
1273
|
-
// One line per ticket: a ticket on which a role agent runs stands at its step, the agent
|
|
1274
|
-
// direct under the block « Direct ».
|
|
1268
|
+
// One line per ticket: a ticket on which a role agent runs stands at its step, the agent
|
|
1269
|
+
// `direct` of an open circuit at the step of the code, else under the block « Direct ».
|
|
1275
1270
|
for (const v of enCoursMesures) {
|
|
1276
1271
|
const t = v.ticket && parId.get(v.ticket);
|
|
1277
|
-
const cible =
|
|
1272
|
+
const cible =
|
|
1273
|
+
v.role !== ROLE_DIRECT
|
|
1274
|
+
? bloc(v.role)
|
|
1275
|
+
: ouvertSur(parCircuit.get(v.ticket))
|
|
1276
|
+
? bloc('developpeur')
|
|
1277
|
+
: { enCours: directs };
|
|
1278
1278
|
if (!t || !cible) {
|
|
1279
1279
|
continue;
|
|
1280
1280
|
}
|
|
@@ -1290,37 +1290,26 @@ export function assembler({
|
|
|
1290
1290
|
});
|
|
1291
1291
|
}
|
|
1292
1292
|
const debutJour = jour;
|
|
1293
|
-
// The way of a ticket done:
|
|
1294
|
-
//
|
|
1293
|
+
// The way of a ticket done: the one of its circuit's integrated view; a circuit that runs or
|
|
1294
|
+
// waits keeps its ticket out of the facts, and one stopped gives no way, the lot having entered
|
|
1295
|
+
// another way. Without such a view: `direct` when labelled so; else the way its kept results
|
|
1296
|
+
// give (`voies`, `voiesDesCircuits`: `court` for the short circuit, else `complet`); else
|
|
1295
1297
|
// `complet` when a circuit led a step of it (the register) or is read for it; else `direct`,
|
|
1296
1298
|
// closed with no circuit.
|
|
1299
|
+
const integres = new Map(circuits.filter(c => c.integre).map(c => [c.ticket, c.circuit]));
|
|
1297
1300
|
const parUnCircuit = new Set([...etapesFinies.map(r => r.ticket), ...parCircuit.keys()]);
|
|
1298
1301
|
const voieDe = t =>
|
|
1299
|
-
(t.
|
|
1302
|
+
VOIE_DE_LA_VUE[integres.get(t.id)] ??
|
|
1303
|
+
((t.labels ?? []).includes('direct')
|
|
1300
1304
|
? 'direct'
|
|
1301
|
-
: (voies[t.id] ?? (parUnCircuit.has(t.id) ? 'complet' : 'direct'));
|
|
1305
|
+
: (voies[t.id] ?? (parUnCircuit.has(t.id) ? 'complet' : 'direct')));
|
|
1306
|
+
// The engine led a ticket's lot when its circuit's view is integrated, or its kept bilan says so.
|
|
1307
|
+
const meneParLeMoteur = t => integres.has(t.id) || bilans[t.id]?.statut === 'intégré';
|
|
1302
1308
|
// A ticket closed with no delivery: a duplicate, superseded (`bd duplicate`, `bd supersede`), or
|
|
1303
1309
|
// labelled `sans-suite`.
|
|
1304
1310
|
const sansLivraison = t =>
|
|
1305
1311
|
(t.dependencies ?? []).some(d => d.type === 'duplicates' || d.type === 'supersedes') ||
|
|
1306
1312
|
aLabel(t, 'sans-suite');
|
|
1307
|
-
// The supervisor leads a direct ticket from its claim to its close (now while it runs): each
|
|
1308
|
-
// minute of his tokens is shared among the direct tickets he holds at that minute.
|
|
1309
|
-
const tenusEnDirect = tous
|
|
1310
|
-
.filter(t => voieDe(t) === 'direct' && Number.isFinite(Date.parse(t.started_at ?? '')))
|
|
1311
|
-
.map(t => ({
|
|
1312
|
-
id: t.id,
|
|
1313
|
-
debut: Math.floor(Date.parse(t.started_at) / 60_000),
|
|
1314
|
-
fin: Math.floor((t.closed_at ? Date.parse(t.closed_at) : maintenant) / 60_000),
|
|
1315
|
-
}));
|
|
1316
|
-
const partDuSuperviseur = new Map();
|
|
1317
|
-
for (const [cle, n] of Object.entries(superviseur)) {
|
|
1318
|
-
const minute = Number(cle);
|
|
1319
|
-
const tenus = tenusEnDirect.filter(x => x.debut <= minute && minute <= x.fin);
|
|
1320
|
-
for (const x of tenus) {
|
|
1321
|
-
partDuSuperviseur.set(x.id, (partDuSuperviseur.get(x.id) ?? 0) + n / tenus.length);
|
|
1322
|
-
}
|
|
1323
|
-
}
|
|
1324
1313
|
// A finding is done only once led to its end: validated and carried by the circuit, or led
|
|
1325
1314
|
// direct; a finding just recorded, or rejected at its sorting, is no work done.
|
|
1326
1315
|
const menee = t => aLabel(t, 'circuit') || aLabel(t, 'direct');
|
|
@@ -1339,17 +1328,15 @@ export function assembler({
|
|
|
1339
1328
|
.map(t => {
|
|
1340
1329
|
const m = mesure(new Set([t.id]));
|
|
1341
1330
|
const voie = voieDe(t);
|
|
1342
|
-
// A circuit's time is its agents' and steps' working time; a direct ticket
|
|
1343
|
-
// claim to its close, null without a claim.
|
|
1331
|
+
// A circuit's time is its agents' and steps' working time; the time of a direct ticket no
|
|
1332
|
+
// circuit led runs from its claim to its close, null without a claim.
|
|
1344
1333
|
const pris = Date.parse(t.started_at ?? '');
|
|
1345
1334
|
const dure =
|
|
1346
|
-
voie !== 'direct'
|
|
1335
|
+
voie !== 'direct' || meneParLeMoteur(t)
|
|
1347
1336
|
? m.travail
|
|
1348
1337
|
: Number.isFinite(pris)
|
|
1349
1338
|
? Date.parse(t.closed_at) - pris
|
|
1350
1339
|
: null;
|
|
1351
|
-
const jetons =
|
|
1352
|
-
m.jetons + Math.round(voie === 'direct' ? (partDuSuperviseur.get(t.id) ?? 0) : 0);
|
|
1353
1340
|
return {
|
|
1354
1341
|
id: t.id,
|
|
1355
1342
|
numero: numero(t.id),
|
|
@@ -1357,7 +1344,6 @@ export function assembler({
|
|
|
1357
1344
|
voie,
|
|
1358
1345
|
duree: dure,
|
|
1359
1346
|
...m,
|
|
1360
|
-
jetons,
|
|
1361
1347
|
};
|
|
1362
1348
|
});
|
|
1363
1349
|
|
|
@@ -1425,7 +1411,9 @@ export function assembler({
|
|
|
1425
1411
|
remontees.filter(r => !estLue(r) && !Number.isFinite(r.chez)).map(r => [r.cle, r.depuis])
|
|
1426
1412
|
);
|
|
1427
1413
|
const enAttenteDuSuperviseur = [...parCircuit.values()]
|
|
1428
|
-
|
|
1414
|
+
// A deferred question asks nothing of the supervisor until its hour, whoever must answer it:
|
|
1415
|
+
// no alert. The owner's keeps its line ❓ and its count (`auResponsable`).
|
|
1416
|
+
.filter(c => attendLeSuperviseur(c) && !c.reporteA)
|
|
1429
1417
|
.sort((a, b) => ordre({ id: a.ticket }, { id: b.ticket }));
|
|
1430
1418
|
for (const c of enAttenteDuSuperviseur) {
|
|
1431
1419
|
const depuis = depuisDe.get(cleDe(c));
|
|
@@ -1500,9 +1488,9 @@ export function assembler({
|
|
|
1500
1488
|
// The tickets worked out of a circuit: claimed (`in_progress`), no circuit on the server that
|
|
1501
1489
|
// holds them, a mother of theirs or a ticket under them (a circuit holds its ticket's mothers and
|
|
1502
1490
|
// children): one that runs or waits for an answer (`attendLeSuperviseur`), never one the
|
|
1503
|
-
// supervisor stopped; or labelled `direct` and claimed
|
|
1504
|
-
// agent shown at a step. None while the circuits do not read (a silent server, a fault)
|
|
1505
|
-
// earlier reading is kept, when no ticket can be told out of a circuit.
|
|
1491
|
+
// supervisor stopped; or labelled `direct` and claimed, with no such circuit of their own; and
|
|
1492
|
+
// no role agent shown at a step. None while the circuits do not read (a silent server, a fault)
|
|
1493
|
+
// and no earlier reading is kept, when no ticket can be told out of a circuit.
|
|
1506
1494
|
const aUneEtape = new Set([...blocs.flatMap(b => b.enCours), ...directs].map(x => x.id));
|
|
1507
1495
|
const tenus = new Set(
|
|
1508
1496
|
[...parCircuit.values()].filter(c => c.vivant || attendLeSuperviseur(c)).map(c => c.ticket)
|
|
@@ -1525,7 +1513,7 @@ export function assembler({
|
|
|
1525
1513
|
travail(t) &&
|
|
1526
1514
|
!aUneEtape.has(t.id) &&
|
|
1527
1515
|
t.status === 'in_progress' &&
|
|
1528
|
-
(!dansUnCircuit(t) || (t
|
|
1516
|
+
(!dansUnCircuit(t) || (aLabel(t, 'direct') && !tenus.has(t.id)))
|
|
1529
1517
|
)
|
|
1530
1518
|
.sort(ordre)
|
|
1531
1519
|
.map(t => ({
|
|
@@ -1533,14 +1521,21 @@ export function assembler({
|
|
|
1533
1521
|
numero: numero(t.id),
|
|
1534
1522
|
sujet: titre(t).sujet,
|
|
1535
1523
|
}));
|
|
1536
|
-
// The circuits, in the tickets' order; a ticket worked in direct has its line alone
|
|
1524
|
+
// The circuits, in the tickets' order; a ticket worked in direct has its line alone, as has one
|
|
1525
|
+
// labelled `direct` whose circuit is not open while a role agent works on it.
|
|
1537
1526
|
const enDirect = new Set(horsCircuit.map(x => x.id));
|
|
1538
1527
|
const lesCircuits = [...parCircuit.values()]
|
|
1539
|
-
.filter(
|
|
1528
|
+
.filter(
|
|
1529
|
+
c =>
|
|
1530
|
+
!enDirect.has(c.ticket) &&
|
|
1531
|
+
!(aLabel(parId.get(c.ticket), 'direct') && !ouvertSur(c) && aUneEtape.has(c.ticket))
|
|
1532
|
+
)
|
|
1540
1533
|
.sort((a, b) => ordre({ id: a.ticket }, { id: b.ticket }))
|
|
1541
1534
|
.map(c => ({
|
|
1542
1535
|
...c,
|
|
1543
1536
|
id: c.ticket,
|
|
1537
|
+
// The key of its stop, read before `numero` turns into its ticket's number.
|
|
1538
|
+
cle: cleDe(c),
|
|
1544
1539
|
// Its way so far, read from its kept results (`voiesDesCircuits`).
|
|
1545
1540
|
court: voies[c.ticket] === 'court',
|
|
1546
1541
|
numero: numero(c.ticket),
|
|
@@ -1565,10 +1560,11 @@ export function assembler({
|
|
|
1565
1560
|
});
|
|
1566
1561
|
// The limit of circuits of the project (`limite`, its `grillhouse.circuits`): when it is held,
|
|
1567
1562
|
// the circuits that hold it waiting for the supervisor (a question to no one, or to the
|
|
1568
|
-
// supervisor; the owner's releases the place, as does a ticket deferred
|
|
1563
|
+
// supervisor; the owner's releases the place, as does a ticket deferred,
|
|
1564
|
+
// `leReportRendLaPlace`), by id.
|
|
1569
1565
|
const tenantsDeLaLimite = [...parCircuit.values()].filter(
|
|
1570
1566
|
c =>
|
|
1571
|
-
parId.get(c.ticket)
|
|
1567
|
+
!leReportRendLaPlace(parId.get(c.ticket), maintenant) &&
|
|
1572
1568
|
(c.vivant || (attendLeSuperviseur(c) && (c.qui ?? SUPERVISEUR) !== RESPONSABLE))
|
|
1573
1569
|
);
|
|
1574
1570
|
const tenueLaLimite = limite !== null && tenantsDeLaLimite.length >= limite;
|
|
@@ -1675,6 +1671,8 @@ function temoinDe(c, maintenant) {
|
|
|
1675
1671
|
// The sign of a ticket done by its way: a full circuit, a short one (its gesture
|
|
1676
1672
|
// played by a command, 1.1, or written by hand), a ticket led directly.
|
|
1677
1673
|
export const SIGNE_DE_LA_VOIE = Object.freeze({ complet: '●', court: '○', direct: '✎' });
|
|
1674
|
+
// The way each circuit of a view (`circuit`) gives its ticket.
|
|
1675
|
+
const VOIE_DE_LA_VUE = Object.freeze({ long: 'complet', court: 'court', direct: 'direct' });
|
|
1678
1676
|
|
|
1679
1677
|
/**
|
|
1680
1678
|
* The way of the circuit each ticket of <tickets> went, read from its kept results in the main tree
|
|
@@ -1770,25 +1768,32 @@ const courtDuTicket = id => id.slice(id.lastIndexOf('-') + 1);
|
|
|
1770
1768
|
|
|
1771
1769
|
// The sign of a ticket's line in AGENTS, by the tone of its state: ▶ what runs, ⛔ what asks for a
|
|
1772
1770
|
// correction, ⏸ a wait, for the machine (grey) or for someone (yellow).
|
|
1773
|
-
// A circuit that runs bears the
|
|
1774
|
-
//
|
|
1775
|
-
|
|
1776
|
-
|
|
1771
|
+
// A circuit <c> that runs bears the sign of the direct way when its view says it
|
|
1772
|
+
// (`SIGNE_DE_LA_VOIE`), else the full triangle, the hollow one in a short circuit (`court`), as
|
|
1773
|
+
// its line of FAITS AUJOURD'HUI bears the full or the hollow round.
|
|
1774
|
+
const signeEnCours = c => (c.circuit === 'direct' ? SIGNE_DE_LA_VOIE.direct : c.court ? '▷' : '▶');
|
|
1775
|
+
const signeDuTon = (ton, c) =>
|
|
1776
|
+
ton === TONS.enCours ? signeEnCours(c) : ton === 'alerte' ? '⛔' : '⏸';
|
|
1777
1777
|
// The step of the circuit <c>, by its state or its stop.
|
|
1778
1778
|
const etapeDuCircuitLu = c => etapeDuCircuit({ ...c, raison: c.arret });
|
|
1779
1779
|
// A circuit that waits for the supervisor (`attendLeSuperviseur`, the one rule): who must answer
|
|
1780
1780
|
// its question, the supervisor when its stop names no one.
|
|
1781
1781
|
// A question the supervisor carried to the owner (`chez` in the file of the stops gone up) is the
|
|
1782
1782
|
// owner's.
|
|
1783
|
-
const
|
|
1784
|
-
attendLeSuperviseur(c) ? (chez.has(
|
|
1783
|
+
const destinataire = (c, chez) =>
|
|
1784
|
+
attendLeSuperviseur(c) ? (chez.has(cleDuStop(c)) ? RESPONSABLE : (c.qui ?? SUPERVISEUR)) : null;
|
|
1785
|
+
// Whether the wait of <c> on the supervisor (its question, or its end without its issue) is deferred
|
|
1786
|
+
// to a later hour (`reporteA`): the board shows it paused until then. The owner's never is.
|
|
1787
|
+
const misEnPause = (c, chez) => Boolean(c.reporteA) && destinataire(c, chez) === SUPERVISEUR;
|
|
1788
|
+
// Who the board shows <c> on a question to: no one while paused.
|
|
1789
|
+
const enQuestion = (c, chez = new Set()) => (misEnPause(c, chez) ? null : destinataire(c, chez));
|
|
1785
1790
|
const chezLui = t =>
|
|
1786
1791
|
new Set((t.remontees ?? []).filter(r => Number.isFinite(r.chez)).map(r => r.cle));
|
|
1787
1792
|
// The state at the right of the line « ⤷ Question » of the circuit <c>: « chez lui · N min » (N from
|
|
1788
1793
|
// the mark), « lue il y a N min » (from the reading), « envoyée » (in the queue of the session);
|
|
1789
1794
|
// empty when the greffon has not sent it.
|
|
1790
1795
|
const etatDeLaQuestion = (c, t) => {
|
|
1791
|
-
const r = (t.remontees ?? []).find(x => x.cle ===
|
|
1796
|
+
const r = (t.remontees ?? []).find(x => x.cle === cleDuStop(c));
|
|
1792
1797
|
const min = depuis =>
|
|
1793
1798
|
`${Math.max(0, Math.floor(((t.maintenant ?? Date.now()) - depuis) / MINUTE))} min`;
|
|
1794
1799
|
return !r
|
|
@@ -1806,7 +1811,7 @@ const etatDeLaQuestion = (c, t) => {
|
|
|
1806
1811
|
* its state (`etat`, whose tone TONS gives), the reason of its wait (`raison`), its tone, its sign
|
|
1807
1812
|
* and its witness (`temoin`: the part it holds or waits for, « · <sorte> faits/prévus · <durée> »,
|
|
1808
1813
|
* « · part <sorte> · <durée> », else the progress of its automatic pass, `temoinDe`), in this
|
|
1809
|
-
* order: frozen; ended without its issue; its question (to the supervisor or to another); stopped;
|
|
1814
|
+
* order: frozen; its wait on the supervisor deferred to a later hour; ended without its issue; its question (to the supervisor or to another); stopped;
|
|
1810
1815
|
* its wait for the disk, a place, a part or its first
|
|
1811
1816
|
* state; else it runs. `lignes`: one entry per
|
|
1812
1817
|
* ticket's line of AGENTS, its id and its sign: each circuit, each ticket led in direct (▶) and
|
|
@@ -1870,6 +1875,14 @@ export function etatsDAgents(t) {
|
|
|
1870
1875
|
if (c.report?.raison === 'limite-d-usage') {
|
|
1871
1876
|
return ['reporteLimite', `limite d'usage · reprise ${heureEtMinute(c.report.reprise)}`];
|
|
1872
1877
|
}
|
|
1878
|
+
if (misEnPause(c, chezLui(t))) {
|
|
1879
|
+
const jour = jourEtMois(c.reporteA);
|
|
1880
|
+
const heure = heureEtMinute(c.reporteA);
|
|
1881
|
+
return [
|
|
1882
|
+
'reporteQuestion',
|
|
1883
|
+
`reporté ${jour === jourEtMois(maintenant) ? heure : `${jour} ${heure}`}`,
|
|
1884
|
+
];
|
|
1885
|
+
}
|
|
1873
1886
|
if (!c.vivant) {
|
|
1874
1887
|
const qui = enQuestion(c, chezLui(t));
|
|
1875
1888
|
return c.sansIssue
|
|
@@ -1903,9 +1916,9 @@ export function etatsDAgents(t) {
|
|
|
1903
1916
|
ton: TONS[etat],
|
|
1904
1917
|
// A question carried to the owner is his to answer: ⛔, which « toi : … question » counts.
|
|
1905
1918
|
signe:
|
|
1906
|
-
etat === 'attendLeResponsable' && chezLui(t).has(
|
|
1919
|
+
etat === 'attendLeResponsable' && chezLui(t).has(cleDuStop(c))
|
|
1907
1920
|
? '⛔'
|
|
1908
|
-
: signeDuTon(TONS[etat], c
|
|
1921
|
+
: signeDuTon(TONS[etat], c),
|
|
1909
1922
|
temoin,
|
|
1910
1923
|
});
|
|
1911
1924
|
}
|
|
@@ -1924,14 +1937,18 @@ export function etatsDAgents(t) {
|
|
|
1924
1937
|
}
|
|
1925
1938
|
|
|
1926
1939
|
/**
|
|
1927
|
-
* The counts of the signs of AGENTS on the board <t> (`etatsDAgents`): `enCours` ▶,
|
|
1928
|
-
* `arretes` ⛔.
|
|
1940
|
+
* The counts of the signs of AGENTS on the board <t> (`etatsDAgents`): `enCours` ▶, ▷ and ✎,
|
|
1941
|
+
* `enAttente` ⏸, `arretes` ⛔.
|
|
1929
1942
|
* @param {any} t
|
|
1930
1943
|
*/
|
|
1931
1944
|
export function comptesDAgents(t) {
|
|
1932
1945
|
const l = etatsDAgents(t).lignes;
|
|
1933
1946
|
const n = s => l.filter(x => x.signe === s).length;
|
|
1934
|
-
return {
|
|
1947
|
+
return {
|
|
1948
|
+
enCours: n('▶') + n('▷') + n(SIGNE_DE_LA_VOIE.direct),
|
|
1949
|
+
enAttente: n('⏸'),
|
|
1950
|
+
arretes: n('⛔'),
|
|
1951
|
+
};
|
|
1935
1952
|
}
|
|
1936
1953
|
|
|
1937
1954
|
// The board's lines, `largeur` columns wide, each with its tone (titre, alerte, attention, actif,
|
|
@@ -1968,7 +1985,7 @@ export function lignes(t, nom, largeur = LARGEUR, groupes = {}) {
|
|
|
1968
1985
|
// counter reads 0. « toi »: what the owner decides or validates (sans go, à valider, question:
|
|
1969
1986
|
// the questions that wait for him, `auResponsable`), then one line per such question,
|
|
1970
1987
|
// « ❓ <number> <subject> · depuis <HH:MM> » (« jj/mm » for another day), the subject alone cut;
|
|
1971
|
-
// « file »: the queues (● ready,
|
|
1988
|
+
// « file »: the queues (● ready, ⧗ attend archi, ⊘ blocked); « en cours »: where
|
|
1972
1989
|
// nobody acts (▶ in progress, ✓ done, ⏸ deferred). On a board of several projects, <projet>
|
|
1973
1990
|
// names the one whose lines these are, and each line is laid under its label.
|
|
1974
1991
|
const lignesDActeurs = (c, projet) => {
|
|
@@ -2005,7 +2022,7 @@ export function lignes(t, nom, largeur = LARGEUR, groupes = {}) {
|
|
|
2005
2022
|
})),
|
|
2006
2023
|
{
|
|
2007
2024
|
texte: sousLeProjet(
|
|
2008
|
-
`file : ● ${n('enAttente')} ·
|
|
2025
|
+
`file : ● ${n('enAttente')} · ⧗ ${n('attendArchi')} · ⊘ ${n('bloques')}`,
|
|
2009
2026
|
retrait
|
|
2010
2027
|
),
|
|
2011
2028
|
ton: TONS.enAttente,
|
|
@@ -2474,7 +2491,7 @@ export function lignes(t, nom, largeur = LARGEUR, groupes = {}) {
|
|
|
2474
2491
|
: n.etat === 'attendArchi'
|
|
2475
2492
|
? 'attend archi'
|
|
2476
2493
|
: n.etat === 'enAttente'
|
|
2477
|
-
? 'en
|
|
2494
|
+
? 'en file'
|
|
2478
2495
|
: n.etat === 'reportes'
|
|
2479
2496
|
? 'reporté'
|
|
2480
2497
|
: n.etat === 'fermes'
|
|
@@ -2505,8 +2522,10 @@ export function lignes(t, nom, largeur = LARGEUR, groupes = {}) {
|
|
|
2505
2522
|
: etat === 'attendUnePlace'
|
|
2506
2523
|
? 'attend une place'
|
|
2507
2524
|
: '';
|
|
2525
|
+
// A line of the group « en file » bears the sign of its way before its number.
|
|
2526
|
+
const marge = n.etat === 'enAttente' ? ` ${SIGNE_DE_LA_VOIE[n.voie]} ` : ' ';
|
|
2508
2527
|
return {
|
|
2509
|
-
texte: cadre(
|
|
2528
|
+
texte: cadre(`${marge}${duProjet(n)}${n.numero} ${n.sujet}`, droite, largeur),
|
|
2510
2529
|
ton: TONS[etat],
|
|
2511
2530
|
ticket: n.id,
|
|
2512
2531
|
};
|
|
@@ -2598,7 +2617,7 @@ export function lignes(t, nom, largeur = LARGEUR, groupes = {}) {
|
|
|
2598
2617
|
TONS.titre
|
|
2599
2618
|
);
|
|
2600
2619
|
// Each line: the sign of its way, then « <durée> · <jetons> », « — » for a direct ticket never
|
|
2601
|
-
// claimed.
|
|
2620
|
+
// claimed that no circuit led.
|
|
2602
2621
|
const fait = x => ({
|
|
2603
2622
|
texte: cadre(
|
|
2604
2623
|
`${SIGNE_DE_LA_VOIE[x.voie] ?? SIGNE_DE_LA_VOIE.direct} ${duProjet(x)}${x.numero} ${x.sujet}`,
|
|
@@ -2764,7 +2783,7 @@ export function ligneEtat(t, voisins = []) {
|
|
|
2764
2783
|
const a = comptesDAgents(t);
|
|
2765
2784
|
const dAgents = `▶ ${a.enCours} · ⏸ ${a.enAttente} · ⛔ ${a.arretes}`;
|
|
2766
2785
|
if (!ch) {
|
|
2767
|
-
return `${alerte}Grillhouse : ${dAgents} · ⏭ ● ${c.enAttente} ·
|
|
2786
|
+
return `${alerte}Grillhouse : ${dAgents} · ⏭ ● ${c.enAttente} · ✓ ${c.fermes}`;
|
|
2768
2787
|
}
|
|
2769
2788
|
return `${alerte}${ch.numero} ${ch.faits}/${ch.total} · ${dAgents} · ${k(t.global.jour.jetons)} aujourd'hui`;
|
|
2770
2789
|
}
|
|
@@ -2965,7 +2984,6 @@ function lire(
|
|
|
2965
2984
|
cache,
|
|
2966
2985
|
});
|
|
2967
2986
|
const jourLu = lireLeRepere(commun, maintenant);
|
|
2968
|
-
const superviseur = jetonsDuSuperviseur({ racine, home, jour: jourLu, cache });
|
|
2969
2987
|
try {
|
|
2970
2988
|
if (fichierCache) {
|
|
2971
2989
|
writeFileSync(
|
|
@@ -2983,6 +3001,7 @@ function lire(
|
|
|
2983
3001
|
...tous.filter(x => x.closed_at && Date.parse(x.closed_at) >= jour).map(x => x.id),
|
|
2984
3002
|
...lesCircuitsLus.liste.map(c => c.ticket),
|
|
2985
3003
|
]);
|
|
3004
|
+
const bilans = bilansGardes(commun ? path.dirname(commun) : racine);
|
|
2986
3005
|
const t = assembler({
|
|
2987
3006
|
tous,
|
|
2988
3007
|
prefix,
|
|
@@ -3005,12 +3024,12 @@ function lire(
|
|
|
3005
3024
|
echecPrefixe,
|
|
3006
3025
|
outil: echecDeLOutil(racine),
|
|
3007
3026
|
remontees: lireLesRemontees(racine, maintenant),
|
|
3008
|
-
|
|
3027
|
+
bilans,
|
|
3009
3028
|
externes: lireLesExternes(racine, tous),
|
|
3010
3029
|
limite: maxDuProjet(commun ? path.dirname(commun) : racine) ?? null,
|
|
3011
3030
|
lotSurMain: lotEstSurMain(commun ? path.dirname(commun) : racine),
|
|
3012
3031
|
});
|
|
3013
|
-
return { t, prefix, tous, vivants, commun };
|
|
3032
|
+
return { t, prefix, tous, vivants, commun, bilans };
|
|
3014
3033
|
}
|
|
3015
3034
|
|
|
3016
3035
|
// The places of the machine as the board shows them (`etatDesPlaces`), null when they do not read
|
|
@@ -3296,7 +3315,7 @@ export async function tableau(
|
|
|
3296
3315
|
const lisibles = lus.filter(x => x.t);
|
|
3297
3316
|
const parProjet = lisibles.map(x => ({
|
|
3298
3317
|
dossier: x.dossier,
|
|
3299
|
-
fiches: fiches(x.tous, toutes, x.prefix, x.t.parTicket, x.t.circuits,
|
|
3318
|
+
fiches: fiches(x.tous, toutes, x.prefix, x.t.parTicket, x.t.circuits, x.bilans),
|
|
3300
3319
|
}));
|
|
3301
3320
|
return {
|
|
3302
3321
|
...t,
|
|
@@ -34,6 +34,7 @@ export class Arret extends Error {
|
|
|
34
34
|
question = null,
|
|
35
35
|
qui = null,
|
|
36
36
|
etape = null,
|
|
37
|
+
demande = null,
|
|
37
38
|
} = {}
|
|
38
39
|
) {
|
|
39
40
|
super(nom);
|
|
@@ -47,6 +48,8 @@ export class Arret extends Error {
|
|
|
47
48
|
this.qui = qui;
|
|
48
49
|
// The step the stop stands at, when it is not the step that throws it.
|
|
49
50
|
this.etape = etape;
|
|
51
|
+
// The motif of the sheet the stop answers (« demande-un-plan »), which its state keeps.
|
|
52
|
+
this.demande = demande;
|
|
50
53
|
}
|
|
51
54
|
}
|
|
52
55
|
|
|
@@ -152,6 +155,25 @@ export function lesFiches(ctx) {
|
|
|
152
155
|
export const inscrire = (ctx, entree) =>
|
|
153
156
|
emettre(ctx, { genre: 'fiche', entree: { date: new Date().toISOString(), ...entree } });
|
|
154
157
|
|
|
158
|
+
// A line of the circuit that switches a direct circuit to the plan (`--planifier`, circuit.md §5.6).
|
|
159
|
+
const estUneBasculeVersLePlan = e => e.role === AUTEUR_DU_CIRCUIT && Boolean(e.planifier);
|
|
160
|
+
|
|
161
|
+
// The sheets of the ticket since its last switch to the plan, all of them without one: what was
|
|
162
|
+
// judged before it is stale, as a vote Gerrit does not copy to a new patch set.
|
|
163
|
+
export function fichesDepuisLaBascule(ctx) {
|
|
164
|
+
const tous = lesFiches(ctx);
|
|
165
|
+
return tous.slice(tous.findLastIndex(estUneBasculeVersLePlan) + 1);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// The switch to the plan whose plan has not passed yet (`{ raison, piece }`), or null.
|
|
169
|
+
export function basculeVersLePlanEnCours(ctx) {
|
|
170
|
+
const tous = lesFiches(ctx);
|
|
171
|
+
const i = tous.findLastIndex(estUneBasculeVersLePlan);
|
|
172
|
+
return i < 0 || tous.slice(i + 1).some(e => e.role === AUTEUR_DU_CIRCUIT && e.plan?.empreinte)
|
|
173
|
+
? null
|
|
174
|
+
: tous[i].planifier;
|
|
175
|
+
}
|
|
176
|
+
|
|
155
177
|
// The sheets of <role>, in their order.
|
|
156
178
|
export const fichesDe = (ctx, role) =>
|
|
157
179
|
lesFiches(ctx)
|
|
@@ -35,10 +35,10 @@ export interface Transition {
|
|
|
35
35
|
usage?: string;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
/** The circuit (`long` or `
|
|
38
|
+
/** The circuit (`long`, `court` or `direct`) the sort of a ticket makes. */
|
|
39
39
|
export function circuitDeLaSorte(
|
|
40
40
|
sorte: { genre?: string; comportement?: string } | null | undefined
|
|
41
|
-
): 'long' | 'court';
|
|
41
|
+
): 'long' | 'court' | 'direct';
|
|
42
42
|
|
|
43
43
|
/** The circuit <circuit> once the sort of its ticket turns to <sorte>: a direct circuit stays so. */
|
|
44
44
|
export function circuitSuivant(
|
|
@@ -220,16 +220,13 @@ interface Constat {
|
|
|
220
220
|
/** The developpeur's report on the integration's refusal <refus>. */
|
|
221
221
|
export function rapportDuRefus(refus: { rapport: string }): string;
|
|
222
222
|
|
|
223
|
-
/** The stop of a ticket the queue reopens
|
|
224
|
-
export function refusDeLaFile(
|
|
225
|
-
issue?: { raison?: string | null; conflit?: boolean },
|
|
226
|
-
circuit?: string | null
|
|
227
|
-
): {
|
|
223
|
+
/** The stop of a ticket the queue reopens without a conflict: its motive, and no question of its own. */
|
|
224
|
+
export function refusDeLaFile(issue?: { raison?: string | null }): {
|
|
228
225
|
motif: string;
|
|
229
|
-
question:
|
|
226
|
+
question: null;
|
|
230
227
|
};
|
|
231
228
|
|
|
232
|
-
/** The step after the plan of sort <sorte>: the gesture, the developpeur, or the testwriter. */
|
|
229
|
+
/** The step after the plan of sort <sorte>: the gesture, the code (developpeur or agent direct), or the testwriter. */
|
|
233
230
|
export function etapeApresLePlan(e: {
|
|
234
231
|
sorte?: { genre?: string; comportement?: string } | null;
|
|
235
232
|
sansTests?: boolean;
|