@roomi-fields/grillhouse 0.29.0 → 0.30.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 +739 -0
- package/bin/grillhouse.mjs +79 -18
- package/cadre/templates/projet/.github/workflows/ci.yml +2 -13
- package/cadre/templates/projet/CLAUDE.md +5 -1
- package/cadre/templates/projet/docs/agents/issue-tracker.md +1 -1
- package/cadre/templates/projet/package.json +2 -2
- package/charte.md +24 -0
- package/dist/temporal/acte.d.ts +24 -0
- package/dist/temporal/acte.js +139 -0
- package/dist/temporal/acte.js.map +1 -0
- package/dist/temporal/attributs.d.ts +6 -0
- package/dist/temporal/attributs.js +15 -0
- package/dist/temporal/attributs.js.map +1 -0
- package/dist/temporal/circuit/activites.d.ts +13 -0
- package/dist/temporal/circuit/activites.js +33 -0
- package/dist/temporal/circuit/activites.js.map +1 -0
- package/dist/temporal/circuit/client.d.ts +72 -0
- package/dist/temporal/circuit/client.js +247 -0
- package/dist/temporal/circuit/client.js.map +1 -0
- package/dist/temporal/circuit/commande.d.ts +2 -0
- package/dist/temporal/circuit/commande.js +238 -0
- package/dist/temporal/circuit/commande.js.map +1 -0
- package/dist/temporal/circuit/contrat.d.ts +305 -0
- package/dist/temporal/circuit/contrat.js +24 -0
- package/dist/temporal/circuit/contrat.js.map +1 -0
- package/dist/temporal/circuit/deroule.d.ts +3 -0
- package/dist/temporal/circuit/deroule.js +540 -0
- package/dist/temporal/circuit/deroule.js.map +1 -0
- package/dist/temporal/client.d.ts +47 -0
- package/dist/temporal/client.js +69 -0
- package/dist/temporal/client.js.map +1 -0
- package/dist/temporal/commande.d.ts +2 -0
- package/dist/temporal/commande.js +95 -0
- package/dist/temporal/commande.js.map +1 -0
- package/dist/temporal/deroules.d.ts +5 -0
- package/dist/temporal/deroules.js +10 -0
- package/dist/temporal/deroules.js.map +1 -0
- package/dist/temporal/etat.d.ts +33 -0
- package/dist/temporal/etat.js +59 -0
- package/dist/temporal/etat.js.map +1 -0
- package/dist/temporal/file/activites.d.ts +10 -0
- package/dist/temporal/file/activites.js +25 -0
- package/dist/temporal/file/activites.js.map +1 -0
- package/dist/temporal/file/client.d.ts +4 -0
- package/dist/temporal/file/client.js +6 -0
- package/dist/temporal/file/client.js.map +1 -0
- package/dist/temporal/file/contrat.d.ts +158 -0
- package/dist/temporal/file/contrat.js +14 -0
- package/dist/temporal/file/contrat.js.map +1 -0
- package/dist/temporal/file/deroule.d.ts +15 -0
- package/dist/temporal/file/deroule.js +235 -0
- package/dist/temporal/file/deroule.js.map +1 -0
- package/dist/temporal/installation.d.ts +124 -0
- package/dist/temporal/installation.js +408 -0
- package/dist/temporal/installation.js.map +1 -0
- package/dist/temporal/places/activites.d.ts +8 -0
- package/dist/temporal/places/activites.js +13 -0
- package/dist/temporal/places/activites.js.map +1 -0
- package/dist/temporal/places/client.d.ts +28 -0
- package/dist/temporal/places/client.js +64 -0
- package/dist/temporal/places/client.js.map +1 -0
- package/dist/temporal/places/contrat.d.ts +106 -0
- package/dist/temporal/places/contrat.js +21 -0
- package/dist/temporal/places/contrat.js.map +1 -0
- package/dist/temporal/places/deroule.d.ts +3 -0
- package/dist/temporal/places/deroule.js +198 -0
- package/dist/temporal/places/deroule.js.map +1 -0
- package/dist/temporal/sonde/activites.d.ts +6 -0
- package/dist/temporal/sonde/activites.js +52 -0
- package/dist/temporal/sonde/activites.js.map +1 -0
- package/dist/temporal/sonde/contrat.d.ts +35 -0
- package/dist/temporal/sonde/contrat.js +10 -0
- package/dist/temporal/sonde/contrat.js.map +1 -0
- package/dist/temporal/sonde/deroule.d.ts +3 -0
- package/dist/temporal/sonde/deroule.js +39 -0
- package/dist/temporal/sonde/deroule.js.map +1 -0
- package/dist/temporal/tickets/activites.d.ts +7 -0
- package/dist/temporal/tickets/activites.js +81 -0
- package/dist/temporal/tickets/activites.js.map +1 -0
- package/dist/temporal/tickets/client.d.ts +10 -0
- package/dist/temporal/tickets/client.js +31 -0
- package/dist/temporal/tickets/client.js.map +1 -0
- package/dist/temporal/tickets/contrat.d.ts +56 -0
- package/dist/temporal/tickets/contrat.js +13 -0
- package/dist/temporal/tickets/contrat.js.map +1 -0
- package/dist/temporal/tickets/deroule.d.ts +3 -0
- package/dist/temporal/tickets/deroule.js +94 -0
- package/dist/temporal/tickets/deroule.js.map +1 -0
- package/dist/temporal/travailleur.d.ts +2 -0
- package/dist/temporal/travailleur.js +69 -0
- package/dist/temporal/travailleur.js.map +1 -0
- package/docs/ARCHITECTURE.md +609 -80
- package/docs/CADRE.md +17 -0
- package/docs/INTERFACE.md +134 -42
- package/hooks/crochet.mjs +19 -2
- package/hooks/hooks.json +11 -0
- package/package.json +16 -4
- package/scripts/activites.mjs +2182 -0
- package/scripts/aiguillage.d.mts +37 -0
- package/scripts/aiguillage.mjs +7 -3
- package/scripts/avancement.mjs +128 -16
- package/scripts/bilan.mjs +37 -19
- package/scripts/cadre.mjs +11 -2
- package/scripts/circuit.mjs +881 -4059
- package/scripts/circuits-cles.d.mts +4 -0
- package/scripts/circuits-cles.mjs +21 -0
- package/scripts/circuits-du-serveur.mjs +105 -0
- package/scripts/codes-de-sortie.mjs +9 -0
- package/scripts/commandes-composees.mjs +45 -41
- package/scripts/commandes-du-path.d.mts +7 -0
- package/scripts/commandes-du-path.mjs +25 -0
- package/scripts/composition-des-langages.mjs +16 -12
- package/scripts/conformite.mjs +6 -13
- package/scripts/copies-finies.mjs +52 -47
- package/scripts/depart-du-ticket.d.mts +53 -0
- package/scripts/depart-du-ticket.mjs +124 -0
- package/scripts/dependances-internes.mjs +115 -0
- package/scripts/dernier-vert.mjs +7 -15
- package/scripts/donnees-cles.mjs +228 -0
- package/scripts/droits.mjs +11 -1
- package/scripts/effets.mjs +352 -0
- package/scripts/enveloppe/enveloppe.mjs +119 -8
- package/scripts/enveloppe/lancer.sh +14 -18
- package/scripts/enveloppe/paquets-du-plan.mjs +2 -2
- package/scripts/enveloppe/travail-de-la-copie.mjs +5 -1
- package/scripts/etapes.mjs +5 -2
- package/scripts/faits-du-circuit.mjs +493 -0
- package/scripts/file-des-tickets.d.mts +21 -0
- package/scripts/file-des-tickets.mjs +58 -0
- package/scripts/flux-des-paquets.mjs +187 -0
- package/scripts/gardes-du-cadre.mjs +12 -2
- package/scripts/integration/file.mjs +475 -420
- package/scripts/integration/integrer.mjs +17 -19
- package/scripts/integration/rejeu.mjs +19 -4
- package/scripts/jointure.d.ts +145 -27
- package/scripts/langages/cargo/commandes.mjs +289 -109
- package/scripts/langages/cargo/composants.mjs +130 -34
- package/scripts/langages/cargo/exemples.mjs +12 -21
- package/scripts/langages/cargo/index.mjs +18 -8
- package/scripts/langages/cargo/sccache.mjs +8 -14
- package/scripts/langages/python/commandes.mjs +216 -100
- package/scripts/langages/python/composants.mjs +53 -21
- package/scripts/langages/python/exemples.mjs +6 -16
- package/scripts/langages/python/index.mjs +24 -8
- package/scripts/langages/python/lot.mjs +1 -36
- package/scripts/langages/typescript/construire.mjs +6 -163
- package/scripts/langages/typescript/exemples.mjs +3 -11
- package/scripts/langages/typescript/frontieres.mjs +1 -1
- package/scripts/langages/typescript/index.mjs +43 -61
- package/scripts/langages/typescript/interfaces-contre-code.mjs +4 -4
- package/scripts/langages/typescript/migrations/0.30.0-prefixe-des-tickets.mjs +63 -0
- package/scripts/langages/typescript/migrations/0.30.0-tailles-des-outils-lourds.mjs +31 -0
- package/scripts/langages/typescript/migrations/0.30.0-titres-nommant-un-ticket.mjs +40 -0
- package/scripts/langages/typescript/mise-a-jour.mjs +1 -2
- package/scripts/langages/typescript/tailles-des-tests.mjs +40 -9
- package/scripts/langages/typescript/tests-de-nuit.mjs +12 -9
- package/scripts/langages/typescript/tests.mjs +17 -8
- package/scripts/langages/typescript/titres-de-tests.mjs +297 -0
- package/scripts/langages/typescript/turbo-des-paquets.mjs +183 -38
- package/scripts/langages/typescript/verdict.mjs +1 -1
- package/scripts/langages/typescript/verifier.mjs +31 -11
- package/scripts/langages/typescript/vitest-config/base.mjs +22 -1
- package/scripts/langages/typescript/vitest-config/bornes.mjs +13 -0
- package/scripts/langages/typescript/vitest-config/cibles.mjs +36 -14
- package/scripts/langages/typescript/vitest-config/delais.mjs +54 -0
- package/scripts/langages/typescript/vitest-config/delais.setup.mjs +11 -0
- package/scripts/langages/typescript/vitest-config/duree.classement.mjs +100 -0
- package/scripts/langages/typescript/vitest-config/duree.reporter.mjs +49 -63
- package/scripts/langages/typescript/vitest-config/machine.setup.mjs +3 -0
- package/scripts/langages/typescript/vitest.nuit.config.mjs +4 -0
- package/scripts/mesure/pression.mjs +3 -3
- package/scripts/mesure-de-la-machine.d.mts +21 -0
- package/scripts/mesure-de-la-machine.mjs +76 -0
- package/scripts/migrations/0.23.2-copies-du-cadre.mjs +8 -2
- package/scripts/migrations/0.30.0-ci-appelle-la-verification.mjs +120 -0
- package/scripts/migrations/0.31.0-paquets-dans-le-graphe.mjs +81 -0
- package/scripts/migrations.mjs +5 -0
- package/scripts/nuit.sh +10 -3
- package/scripts/outils-cles.d.mts +24 -0
- package/scripts/outils-cles.mjs +0 -1
- package/scripts/paquet-npm.mjs +147 -0
- package/scripts/paquet.mjs +73 -4
- package/scripts/paquets.mjs +34 -6
- package/scripts/passe-de-la-machine.mjs +66 -0
- package/scripts/places-de-la-machine.mjs +360 -0
- package/scripts/places-du-serveur.mjs +170 -0
- package/scripts/prefixe-des-tickets.mjs +68 -0
- package/scripts/preparation.mjs +10 -3
- package/scripts/registre.mjs +3 -2
- package/scripts/regles-des-places.d.mts +36 -0
- package/scripts/regles-des-places.mjs +70 -0
- package/scripts/reponses-du-circuit.d.mts +6 -0
- package/scripts/reponses-du-circuit.mjs +28 -0
- package/scripts/resultats.mjs +7 -9
- package/scripts/retirer-les-copies-finies.mjs +25 -0
- package/scripts/sans-reponse.d.mts +4 -0
- package/scripts/sans-reponse.mjs +13 -0
- package/scripts/seances.mjs +918 -0
- package/scripts/services-du-noyau.mjs +26 -8
- package/scripts/session-start.sh +2 -2
- package/scripts/sortie.mjs +3 -3
- package/scripts/sous-commandes.mjs +38 -9
- package/scripts/style-a-l-ecriture.mjs +229 -0
- package/scripts/superviseur.mjs +122 -111
- package/scripts/tableau.mjs +148 -110
- package/scripts/taches-du-graphe.mjs +328 -0
- package/scripts/ticket-du-circuit.mjs +206 -0
- package/scripts/transitions.d.mts +148 -0
- package/scripts/transitions.mjs +901 -0
- package/scripts/verrou-de-fichier.mjs +2 -2
- package/scripts/verrou-de-machine.mjs +28 -13
- package/skills/explorateur/SKILL.md +2 -1
- package/skills/pitmaster/SKILL.md +17 -18
- package/skills/pitmaster/references/consigne-agent.md +5 -1
- package/skills/release/SKILL.md +3 -3
- package/skills/relecteur/SKILL.md +4 -2
- package/skills/testwriter/SKILL.md +36 -24
- package/scripts/demon.mjs +0 -251
- package/scripts/integration/file-attente.mjs +0 -61
- package/scripts/langages/cargo/touches.mjs +0 -93
- package/scripts/langages/typescript/script-des-tests.mjs +0 -6
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
import type { DelaisDeLaCI } from '../file/contrat.js';
|
|
2
|
+
import type { EtatDuPlan } from '../../../scripts/transitions.mjs';
|
|
3
|
+
/** The workflow's type. */
|
|
4
|
+
export declare const CIRCUIT = "circuitDuTicket";
|
|
5
|
+
/** The id of the workflow of the ticket <ticket> of the repository at <racine>. */
|
|
6
|
+
export declare const idDuCircuit: (racine: string, ticket: string) => string;
|
|
7
|
+
/** The update that resumes a stopped circuit at its step (`--reprendre`). */
|
|
8
|
+
export declare const REPRENDRE = "reprendre";
|
|
9
|
+
/** The signal that stops the circuit, its session with it (`--arreter`), wherever it stands. */
|
|
10
|
+
export declare const ARRETER = "arreter";
|
|
11
|
+
/** The update that resumes a stopped circuit from the step of an agent (`--depuis`). */
|
|
12
|
+
export declare const DEPUIS = "depuis";
|
|
13
|
+
/** The update that extends the plan of a stopped circuit, then resumes it (`--etendre`). */
|
|
14
|
+
export declare const ETENDRE = "etendre";
|
|
15
|
+
/** The type of the failure a validator of an answer refuses it with, which the client names. */
|
|
16
|
+
export declare const REFUS_DU_VALIDATEUR = "RefusDuValidateur";
|
|
17
|
+
/** The query of the circuit as it stands. */
|
|
18
|
+
export declare const L_ETAT = "etatDuCircuit";
|
|
19
|
+
/** The agents a `--depuis` names. */
|
|
20
|
+
export declare const AGENTS_DU_LOT: readonly ["testwriter", "developpeur"];
|
|
21
|
+
/** The run at its step, as scripts/transitions.mjs reads it. */
|
|
22
|
+
export interface EtatDeLEtape {
|
|
23
|
+
etape: string;
|
|
24
|
+
tentative: number;
|
|
25
|
+
rapport: string | null;
|
|
26
|
+
finale: boolean;
|
|
27
|
+
relanceSurLeRefus?: boolean;
|
|
28
|
+
}
|
|
29
|
+
/** What the circuit keeps between steps (`MEMOIRE` of scripts/circuit.mjs, and its session to resume). */
|
|
30
|
+
export type Memoire = Record<string, unknown>;
|
|
31
|
+
/** The ticket as the decisions read it. */
|
|
32
|
+
interface TicketDuCircuit {
|
|
33
|
+
id: string;
|
|
34
|
+
paquets: string[];
|
|
35
|
+
sorte: unknown;
|
|
36
|
+
copie: string;
|
|
37
|
+
}
|
|
38
|
+
/** The question of a stop, as the supervisor reads it. */
|
|
39
|
+
export interface Question {
|
|
40
|
+
arret: string;
|
|
41
|
+
fait: string;
|
|
42
|
+
piece: string;
|
|
43
|
+
question: string;
|
|
44
|
+
qui: string;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* What the memo of a circuit holds of the state its run wrote last (`etat`), which the board reads
|
|
48
|
+
* (`lireLesCircuits`): its step, its attempt, its stop, the first line of its report, the object
|
|
49
|
+
* of its questioning, its loops and the start of its step led (ISO).
|
|
50
|
+
*/
|
|
51
|
+
export interface ResumeDeLEtat {
|
|
52
|
+
etape: string | null;
|
|
53
|
+
tentative: number | null;
|
|
54
|
+
finale: boolean;
|
|
55
|
+
code: number | null;
|
|
56
|
+
raison: string | null;
|
|
57
|
+
rapport: string | null;
|
|
58
|
+
questionnement: string | null;
|
|
59
|
+
boucles: Record<string, number>;
|
|
60
|
+
mene: string | null;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* The whole state the circuit wrote last (the effect `etat` of scripts/circuit.mjs `ecrireEtat`):
|
|
64
|
+
* its step, its stop, its question and what the run keeps between steps. The workflow holds it,
|
|
65
|
+
* and gives it back when it stops on the supervisor's word, so that his answer reopens from it.
|
|
66
|
+
*/
|
|
67
|
+
export type EtatEcrit = Record<string, unknown>;
|
|
68
|
+
/** A stop a decision returns (scripts/transitions.mjs), or an exception fallen in an activity. */
|
|
69
|
+
export type ArretDecide = Record<string, unknown> & {
|
|
70
|
+
nom?: string;
|
|
71
|
+
};
|
|
72
|
+
/** A stop written at the ticket: its code, its name, its question (none for « a-repasser »), its state. */
|
|
73
|
+
export interface ArretPublie {
|
|
74
|
+
code: number;
|
|
75
|
+
nom: string;
|
|
76
|
+
question: Question | null;
|
|
77
|
+
etat: EtatDeLEtape & {
|
|
78
|
+
raison?: string | null;
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
/** The supervisor's answer to a stop. */
|
|
82
|
+
export type Reponse = {
|
|
83
|
+
genre: 'reprendre';
|
|
84
|
+
contexte?: string | null;
|
|
85
|
+
} | {
|
|
86
|
+
genre: 'depuis';
|
|
87
|
+
role: (typeof AGENTS_DU_LOT)[number];
|
|
88
|
+
contexte?: string | null;
|
|
89
|
+
} | {
|
|
90
|
+
genre: 'etendre';
|
|
91
|
+
paquets: string[];
|
|
92
|
+
contexte?: string | null;
|
|
93
|
+
} | {
|
|
94
|
+
genre: 'arreter';
|
|
95
|
+
contexte?: string | null;
|
|
96
|
+
};
|
|
97
|
+
/** Where a run starts: its step, its memory, its ticket. */
|
|
98
|
+
export interface Ouverture {
|
|
99
|
+
debut: EtatDeLEtape;
|
|
100
|
+
memoire: Memoire;
|
|
101
|
+
ticket: TicketDuCircuit;
|
|
102
|
+
}
|
|
103
|
+
/** What the workflow receives; `suite` the state a Continue-As-New carries. */
|
|
104
|
+
export interface EntreeDuCircuit {
|
|
105
|
+
racine: string;
|
|
106
|
+
ticket: string;
|
|
107
|
+
/** The sleep before a « a-repasser » (75) plays again, in ms: 10 min (decision D4). */
|
|
108
|
+
repasserMs?: number;
|
|
109
|
+
/** How many times a « a-repasser » plays again before its question goes up: 6 (decision D4). */
|
|
110
|
+
repassesMax?: number;
|
|
111
|
+
/** The bounds of the reading of the CI at the step 5.2 (../file/contrat.ts). */
|
|
112
|
+
ci?: DelaisDeLaCI;
|
|
113
|
+
/** The length of history past which the workflow continues as new; 10 000 by default. */
|
|
114
|
+
limiteDHistoire?: number;
|
|
115
|
+
/**
|
|
116
|
+
* The session of the supervisor that put the ticket in the queue or answered its stop
|
|
117
|
+
* (`CLAUDE_CODE_SESSION_ID` of `npx grillhouse circuit`), which the stop gone up keeps
|
|
118
|
+
* (`montee.superviseur`, scripts/circuit.mjs `aLaFin`) and the bilan reads; null without one.
|
|
119
|
+
*/
|
|
120
|
+
superviseur?: string | null;
|
|
121
|
+
suite?: {
|
|
122
|
+
ouverture: Ouverture;
|
|
123
|
+
repasses: number;
|
|
124
|
+
reprend: boolean;
|
|
125
|
+
etat: EtatEcrit | null;
|
|
126
|
+
};
|
|
127
|
+
/**
|
|
128
|
+
* The supervisor's answer a new workflow opens on, for a circuit stopped on his word whose
|
|
129
|
+
* workflow ended (`--reprendre`, `--depuis`, `--etendre`): it reopens from the state that stop
|
|
130
|
+
* left, not as a first launch.
|
|
131
|
+
*/
|
|
132
|
+
reprise?: Exclude<Reponse, {
|
|
133
|
+
genre: 'arreter';
|
|
134
|
+
}>;
|
|
135
|
+
/**
|
|
136
|
+
* The state the stopped workflow gave back at its end (`FinDuCircuit`), which the new workflow of
|
|
137
|
+
* the answer reopens from; none when the server no longer holds it (`--depuis` alone).
|
|
138
|
+
*/
|
|
139
|
+
etatDArret?: EtatEcrit | null;
|
|
140
|
+
}
|
|
141
|
+
/** How the workflow ends: integrated (0), or stopped on the supervisor's word. */
|
|
142
|
+
export interface FinDuCircuit {
|
|
143
|
+
code: number;
|
|
144
|
+
raison: 'integre' | 'arrete';
|
|
145
|
+
/**
|
|
146
|
+
* The state the circuit wrote last: integrated, its end; stopped on the supervisor's word, the
|
|
147
|
+
* state his answer reopens from.
|
|
148
|
+
*/
|
|
149
|
+
etat?: EtatEcrit | null;
|
|
150
|
+
}
|
|
151
|
+
/** The circuit as the query gives it. */
|
|
152
|
+
export interface VueDuCircuit {
|
|
153
|
+
etape: string;
|
|
154
|
+
tentative: number;
|
|
155
|
+
attente: boolean;
|
|
156
|
+
question: Question | null;
|
|
157
|
+
repasses: number;
|
|
158
|
+
/** The state the circuit wrote last, whole (`EtatEcrit`); null before its first. */
|
|
159
|
+
ecrit: EtatEcrit | null;
|
|
160
|
+
}
|
|
161
|
+
/** A step the circuit leads itself, from its start: its line to the register at its end. */
|
|
162
|
+
export interface Menee {
|
|
163
|
+
etape: string;
|
|
164
|
+
debut: string;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* An external effect an act gives back, as data (scripts/effets.mjs): the workflow plays each in an
|
|
168
|
+
* activity of its own (`jouerUnEffet`), under the key of that activity.
|
|
169
|
+
*/
|
|
170
|
+
export type Effet = {
|
|
171
|
+
genre: string;
|
|
172
|
+
} & Record<string, unknown>;
|
|
173
|
+
/** What an act gives back besides its outcome: the effects it emitted, in their order. */
|
|
174
|
+
interface Rendus {
|
|
175
|
+
effets: Effet[];
|
|
176
|
+
}
|
|
177
|
+
/** The plan of a ticket still to write, between two of its steps (scripts/circuit.mjs `unPasDuPlan`). */
|
|
178
|
+
interface PlanEnCours {
|
|
179
|
+
/** The state of the plan, `pasDuPlan` of scripts/transitions.mjs deciding its next step. */
|
|
180
|
+
etat: EtatDuPlan;
|
|
181
|
+
/** The step the run starts at once the plan passes. */
|
|
182
|
+
debut: EtatDeLEtape;
|
|
183
|
+
/** The supervisor's context of the run, which the explorateur reads. */
|
|
184
|
+
contexte: string | null;
|
|
185
|
+
memoire: Memoire;
|
|
186
|
+
}
|
|
187
|
+
/** What every activity receives: the ticket, the memory the workflow holds, its supervisor. */
|
|
188
|
+
interface Lieu {
|
|
189
|
+
/** The main tree of the repository, where the act plays. */
|
|
190
|
+
racine: string;
|
|
191
|
+
ticket: string;
|
|
192
|
+
memoire: Memoire;
|
|
193
|
+
/** The supervisor's session of the entry (`EntreeDuCircuit.superviseur`), null without one. */
|
|
194
|
+
superviseur: string | null;
|
|
195
|
+
}
|
|
196
|
+
export interface Activites {
|
|
197
|
+
/**
|
|
198
|
+
* Opens a run of the circuit, as `npx grillhouse circuit` does: its first launch (<reponse>
|
|
199
|
+
* null), or the resumption <reponse> of the stopped state <arrete>. The plan before the
|
|
200
|
+
* testwriter, the checks of the launch (arbitrage, tools, generated files): an opening, or a
|
|
201
|
+
* stop written at the ticket.
|
|
202
|
+
*/
|
|
203
|
+
ouvrirLeCircuit(e: Lieu & {
|
|
204
|
+
reponse: Exclude<Reponse, {
|
|
205
|
+
genre: 'arreter';
|
|
206
|
+
}> | null;
|
|
207
|
+
arrete: (EtatDeLEtape & {
|
|
208
|
+
raison?: string | null;
|
|
209
|
+
question?: Question | null;
|
|
210
|
+
}) | null;
|
|
211
|
+
}): Promise<({
|
|
212
|
+
ouverture: Ouverture;
|
|
213
|
+
} | {
|
|
214
|
+
arret: ArretPublie;
|
|
215
|
+
} | {
|
|
216
|
+
plan: PlanEnCours;
|
|
217
|
+
}) & Rendus>;
|
|
218
|
+
/**
|
|
219
|
+
* The step <pas> of the plan <plan> (a session of the explorateur, of the questionneur, or the
|
|
220
|
+
* explorateur's answer, the conclusion with the last): the plan that follows, the opening once
|
|
221
|
+
* it passes, or its stop written at the ticket.
|
|
222
|
+
*/
|
|
223
|
+
jouerUnPasDuPlan(e: Lieu & {
|
|
224
|
+
pas: 'explorateur' | 'questionneur' | 'reponse' | 'conclure';
|
|
225
|
+
plan: PlanEnCours;
|
|
226
|
+
reponse: Exclude<Reponse, {
|
|
227
|
+
genre: 'arreter';
|
|
228
|
+
}> | null;
|
|
229
|
+
}): Promise<({
|
|
230
|
+
ouverture: Ouverture;
|
|
231
|
+
} | {
|
|
232
|
+
arret: ArretPublie;
|
|
233
|
+
} | {
|
|
234
|
+
plan: PlanEnCours;
|
|
235
|
+
}) & Rendus>;
|
|
236
|
+
/**
|
|
237
|
+
* The start of the step <etape>, its state written (`etat`, its loops counted; `menee`, a step
|
|
238
|
+
* the circuit leads itself), and the copy prepared on the tip of main before its pass, or its stop.
|
|
239
|
+
*/
|
|
240
|
+
preparerLaPasse(e: Lieu & {
|
|
241
|
+
etape: EtatDeLEtape;
|
|
242
|
+
paquets: string[];
|
|
243
|
+
}): Promise<{
|
|
244
|
+
etat: EtatDeLEtape;
|
|
245
|
+
menee: Menee | null;
|
|
246
|
+
} & Rendus & ({
|
|
247
|
+
memoire: Memoire;
|
|
248
|
+
arret?: undefined;
|
|
249
|
+
} | {
|
|
250
|
+
arret: ArretDecide;
|
|
251
|
+
})>;
|
|
252
|
+
/** The fact <fait> a decision asks for (a session, a pass, a reading), and the memory it leaves. */
|
|
253
|
+
lireUnFait(e: Lieu & {
|
|
254
|
+
fait: string;
|
|
255
|
+
parametres: Record<string, unknown>;
|
|
256
|
+
faits: Record<string, unknown>;
|
|
257
|
+
sorte: unknown;
|
|
258
|
+
paquets: string[];
|
|
259
|
+
}): Promise<{
|
|
260
|
+
valeur: unknown;
|
|
261
|
+
memoire: Memoire;
|
|
262
|
+
leve?: ArretDecide;
|
|
263
|
+
} & Rendus>;
|
|
264
|
+
/**
|
|
265
|
+
* The effects <effets> of a decision, in their order (a line at the ticket, a gesture, a report),
|
|
266
|
+
* then the end of its step <menee> when it ends there.
|
|
267
|
+
*/
|
|
268
|
+
appliquerLesEffets(e: Lieu & {
|
|
269
|
+
effets: unknown[];
|
|
270
|
+
menee: Menee | null;
|
|
271
|
+
paquets: string[];
|
|
272
|
+
}): Promise<Rendus>;
|
|
273
|
+
/**
|
|
274
|
+
* The stop <arret> at the step <etat> written at the ticket, its question gone up unless it is
|
|
275
|
+
* a « a-repasser » the workflow plays again (<monter> false). An exception of an activity
|
|
276
|
+
* (<arret> `{ inattendu: message }`) is the stop « inattendu ».
|
|
277
|
+
*/
|
|
278
|
+
publierLArret(e: Lieu & {
|
|
279
|
+
arret: ArretDecide;
|
|
280
|
+
etat: EtatDeLEtape;
|
|
281
|
+
monter: boolean;
|
|
282
|
+
paquets: string[] | null;
|
|
283
|
+
menee: Menee | null;
|
|
284
|
+
}): Promise<ArretPublie & Rendus>;
|
|
285
|
+
/** The end of the run, integrated: its state, the bilan, the finished copies. */
|
|
286
|
+
finirLeTicket(e: Lieu & {
|
|
287
|
+
etat: EtatDeLEtape;
|
|
288
|
+
paquets: string[];
|
|
289
|
+
}): Promise<Rendus>;
|
|
290
|
+
/** The circuit stopped on the supervisor's word at <etat>, its motive <contexte>, said at the ticket. */
|
|
291
|
+
arreterLeTicket(e: Lieu & {
|
|
292
|
+
etat: EtatDeLEtape;
|
|
293
|
+
contexte: string | null;
|
|
294
|
+
}): Promise<Rendus>;
|
|
295
|
+
/**
|
|
296
|
+
* One effect <effet> an act gave back, written under the key of this activity (its workflow,
|
|
297
|
+
* its run, its activity id, which the workflow sets): an effect that is not written fails.
|
|
298
|
+
*/
|
|
299
|
+
jouerUnEffet(e: {
|
|
300
|
+
racine: string;
|
|
301
|
+
ticket: string;
|
|
302
|
+
effet: Effet;
|
|
303
|
+
}): Promise<void>;
|
|
304
|
+
}
|
|
305
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// The contract of the workflow of a ticket (grillhouse-4nr.6, decision Q3): its type and its id,
|
|
2
|
+
// its signal, its updates and its query by their names, what it receives and gives back, and
|
|
3
|
+
// the activities it calls (./activites.ts, each an act of scripts/faits-du-circuit.mjs), their
|
|
4
|
+
// inputs and their outputs.
|
|
5
|
+
// The workflow, its activities and their clients share it without importing each other.
|
|
6
|
+
/** The workflow's type. */
|
|
7
|
+
export const CIRCUIT = 'circuitDuTicket';
|
|
8
|
+
/** The id of the workflow of the ticket <ticket> of the repository at <racine>. */
|
|
9
|
+
export const idDuCircuit = (racine, ticket) => `circuit:${racine}:${ticket}`;
|
|
10
|
+
/** The update that resumes a stopped circuit at its step (`--reprendre`). */
|
|
11
|
+
export const REPRENDRE = 'reprendre';
|
|
12
|
+
/** The signal that stops the circuit, its session with it (`--arreter`), wherever it stands. */
|
|
13
|
+
export const ARRETER = 'arreter';
|
|
14
|
+
/** The update that resumes a stopped circuit from the step of an agent (`--depuis`). */
|
|
15
|
+
export const DEPUIS = 'depuis';
|
|
16
|
+
/** The update that extends the plan of a stopped circuit, then resumes it (`--etendre`). */
|
|
17
|
+
export const ETENDRE = 'etendre';
|
|
18
|
+
/** The type of the failure a validator of an answer refuses it with, which the client names. */
|
|
19
|
+
export const REFUS_DU_VALIDATEUR = 'RefusDuValidateur';
|
|
20
|
+
/** The query of the circuit as it stands. */
|
|
21
|
+
export const L_ETAT = 'etatDuCircuit';
|
|
22
|
+
/** The agents a `--depuis` names. */
|
|
23
|
+
export const AGENTS_DU_LOT = ['testwriter', 'developpeur'];
|
|
24
|
+
//# sourceMappingURL=contrat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contrat.js","sourceRoot":"","sources":["../../../src/temporal/circuit/contrat.ts"],"names":[],"mappings":"AAAA,iGAAiG;AACjG,6FAA6F;AAC7F,+FAA+F;AAC/F,4BAA4B;AAC5B,wFAAwF;AAKxF,2BAA2B;AAC3B,MAAM,CAAC,MAAM,OAAO,GAAG,iBAAiB,CAAC;AACzC,mFAAmF;AACnF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,MAAc,EAAE,MAAc,EAAE,EAAE,CAAC,WAAW,MAAM,IAAI,MAAM,EAAE,CAAC;AAE7F,6EAA6E;AAC7E,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAC;AACrC,gGAAgG;AAChG,MAAM,CAAC,MAAM,OAAO,GAAG,SAAS,CAAC;AACjC,wFAAwF;AACxF,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC;AAC/B,4FAA4F;AAC5F,MAAM,CAAC,MAAM,OAAO,GAAG,SAAS,CAAC;AACjC,gGAAgG;AAChG,MAAM,CAAC,MAAM,mBAAmB,GAAG,mBAAmB,CAAC;AACvD,6CAA6C;AAC7C,MAAM,CAAC,MAAM,MAAM,GAAG,eAAe,CAAC;AAEtC,qCAAqC;AACrC,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,YAAY,EAAE,aAAa,CAAU,CAAC"}
|