@roomi-fields/grillhouse 0.48.0 → 0.49.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.
Files changed (147) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/CHANGELOG.md +68 -0
  3. package/agents/direct.md +9 -0
  4. package/cadre/templates/projet/.github/workflows/ci.yml +6 -0
  5. package/cadre/templates/projet/.github/workflows/nuit.yml +9 -2
  6. package/cadre/templates/projet/CLAUDE.md +9 -5
  7. package/cadre/templates/projet/docs/agents/issue-tracker.md +1 -1
  8. package/cadre/templates/turbo/paquets.json +3 -1
  9. package/cadre/templates/turbo/sans-paquets.json +3 -1
  10. package/charte.md +40 -14
  11. package/dist/temporal/circuit/appel.d.ts +4 -1
  12. package/dist/temporal/circuit/appel.js +15 -1
  13. package/dist/temporal/circuit/appel.js.map +1 -1
  14. package/dist/temporal/circuit/client.d.ts +7 -1
  15. package/dist/temporal/circuit/client.js +54 -1
  16. package/dist/temporal/circuit/client.js.map +1 -1
  17. package/dist/temporal/circuit/commande.js +30 -57
  18. package/dist/temporal/circuit/commande.js.map +1 -1
  19. package/dist/temporal/circuit/contrat.d.ts +2 -1
  20. package/dist/temporal/circuit/contrat.js +2 -1
  21. package/dist/temporal/circuit/contrat.js.map +1 -1
  22. package/dist/temporal/circuit/deroule.js +9 -2
  23. package/dist/temporal/circuit/deroule.js.map +1 -1
  24. package/dist/temporal/file/contrat.d.ts +16 -2
  25. package/dist/temporal/file/contrat.js +27 -3
  26. package/dist/temporal/file/contrat.js.map +1 -1
  27. package/dist/temporal/file/deroule.js +4 -4
  28. package/dist/temporal/file/deroule.js.map +1 -1
  29. package/dist/temporal/nuits/activites.d.ts +1 -15
  30. package/dist/temporal/nuits/activites.js +3 -62
  31. package/dist/temporal/nuits/activites.js.map +1 -1
  32. package/dist/temporal/nuits/contrat.d.ts +3 -21
  33. package/dist/temporal/nuits/deroule.js +38 -74
  34. package/dist/temporal/nuits/deroule.js.map +1 -1
  35. package/dist/temporal/places/client.d.ts +3 -16
  36. package/dist/temporal/places/client.js +3 -26
  37. package/dist/temporal/places/client.js.map +1 -1
  38. package/dist/temporal/places/contrat.d.ts +15 -51
  39. package/dist/temporal/places/contrat.js +3 -13
  40. package/dist/temporal/places/contrat.js.map +1 -1
  41. package/dist/temporal/places/deroule.js +11 -61
  42. package/dist/temporal/places/deroule.js.map +1 -1
  43. package/dist/temporal/tickets/activites.js +4 -2
  44. package/dist/temporal/tickets/activites.js.map +1 -1
  45. package/dist/temporal/tickets/contrat.d.ts +2 -1
  46. package/docs/ARCHITECTURE.md +310 -115
  47. package/docs/CADRE.md +16 -13
  48. package/docs/INTERFACE.md +90 -25
  49. package/hooks/hooks.json +9 -0
  50. package/hooks/register.tsx +59 -5
  51. package/package.json +1 -1
  52. package/scripts/activites.mjs +271 -42
  53. package/scripts/aiguillage.mjs +4 -1
  54. package/scripts/bilan.mjs +125 -2
  55. package/scripts/circuit.mjs +233 -159
  56. package/scripts/circuits-cles.d.mts +3 -3
  57. package/scripts/circuits-cles.mjs +6 -5
  58. package/scripts/coeurs-dedies.mjs +4 -4
  59. package/scripts/commandes-composees.mjs +12 -5
  60. package/scripts/dette.d.ts +2 -1
  61. package/scripts/dette.mjs +49 -6
  62. package/scripts/direct.mjs +343 -0
  63. package/scripts/droits.mjs +19 -0
  64. package/scripts/effets.mjs +4 -4
  65. package/scripts/engendres.mjs +2 -1
  66. package/scripts/enveloppe/enveloppe.mjs +67 -13
  67. package/scripts/enveloppe/lancer.sh +14 -3
  68. package/scripts/enveloppe/paquets-du-plan.mjs +9 -0
  69. package/scripts/enveloppe/travail-de-la-copie.mjs +119 -21
  70. package/scripts/etapes.mjs +3 -3
  71. package/scripts/faits-du-circuit.mjs +12 -11
  72. package/scripts/fermeture-de-la-machine.d.mts +4 -4
  73. package/scripts/fermeture-de-la-machine.mjs +10 -20
  74. package/scripts/fichiers-nommes.mjs +27 -1
  75. package/scripts/file-des-tickets.d.mts +18 -1
  76. package/scripts/file-des-tickets.mjs +63 -15
  77. package/scripts/grillhouse-maj.mjs +13 -25
  78. package/scripts/groupe-cles.d.mts +6 -0
  79. package/scripts/groupe-cles.mjs +29 -1
  80. package/scripts/integration/file.mjs +148 -37
  81. package/scripts/jointure.d.ts +17 -3
  82. package/scripts/journal-des-etats.d.mts +16 -0
  83. package/scripts/journal-des-etats.mjs +44 -2
  84. package/scripts/journal.mjs +3 -0
  85. package/scripts/langages/c/commandes.mjs +5 -5
  86. package/scripts/langages/c/composants.mjs +13 -5
  87. package/scripts/langages/cargo/commandes.mjs +5 -6
  88. package/scripts/langages/python/commandes.mjs +5 -5
  89. package/scripts/langages/python/composants.mjs +10 -2
  90. package/scripts/langages/typescript/composants.mjs +10 -3
  91. package/scripts/langages/typescript/construire.mjs +2 -0
  92. package/scripts/langages/typescript/exemples.mjs +33 -1
  93. package/scripts/langages/typescript/index.mjs +19 -0
  94. package/scripts/langages/typescript/migrations/0.49.0-tests-equipes.mjs +32 -0
  95. package/scripts/langages/typescript/tests-de-nuit.mjs +152 -32
  96. package/scripts/langages/typescript/tests-du-poste.mjs +65 -23
  97. package/scripts/langages/typescript/titres-de-tests.mjs +11 -7
  98. package/scripts/langages/typescript/turbo-des-paquets.mjs +21 -4
  99. package/scripts/langages/typescript/verifier.mjs +3 -5
  100. package/scripts/langages/typescript/verrou-des-dependances.mjs +161 -0
  101. package/scripts/langages/typescript/vitest-config/cibles.mjs +57 -6
  102. package/scripts/langages/typescript/vitest-config/machine.setup.mjs +11 -5
  103. package/scripts/langages/typescript/vitest.nuit.config.mjs +53 -5
  104. package/scripts/machine.mjs +1 -1
  105. package/scripts/mesure/base-de-passe.mjs +2 -1
  106. package/scripts/migrations/0.49.0-reservation-de-trois-coeurs.mjs +30 -0
  107. package/scripts/migrations.mjs +2 -0
  108. package/scripts/nuit.sh +97 -2
  109. package/scripts/paquet.mjs +16 -5
  110. package/scripts/paquets.d.ts +4 -0
  111. package/scripts/paquets.mjs +57 -0
  112. package/scripts/passe-de-la-machine.mjs +4 -7
  113. package/scripts/places-de-la-machine.mjs +55 -42
  114. package/scripts/places-du-serveur.mjs +2 -2
  115. package/scripts/plafond-de-la-machine.d.mts +7 -13
  116. package/scripts/plafond-de-la-machine.mjs +19 -35
  117. package/scripts/prefixe-des-tickets.mjs +1 -1
  118. package/scripts/references-changees.mjs +159 -0
  119. package/scripts/regles-des-places.d.mts +8 -31
  120. package/scripts/regles-des-places.mjs +14 -64
  121. package/scripts/repli-de-la-nuit.mjs +112 -0
  122. package/scripts/reponses-du-circuit.d.mts +2 -2
  123. package/scripts/reponses-du-circuit.mjs +21 -12
  124. package/scripts/reprise.mjs +27 -8
  125. package/scripts/resultats.mjs +21 -9
  126. package/scripts/seances.mjs +258 -40
  127. package/scripts/services-du-noyau.mjs +3 -0
  128. package/scripts/sous-commandes.mjs +24 -7
  129. package/scripts/superviseur.mjs +185 -39
  130. package/scripts/tableau.mjs +220 -89
  131. package/scripts/taches-du-graphe.mjs +84 -4
  132. package/scripts/ticket.mjs +345 -0
  133. package/scripts/transitions.d.mts +44 -0
  134. package/scripts/transitions.mjs +173 -13
  135. package/scripts/un-commit-par-ticket.mjs +4 -3
  136. package/scripts/verdict-de-la-nuit.mjs +47 -20
  137. package/scripts/verrou-de-fichier.mjs +2 -2
  138. package/scripts/verrous/ecriture-hors-enveloppe.mjs +86 -0
  139. package/scripts/verrous/verrou.mjs +17 -1
  140. package/skills/developpeur/SKILL.md +1 -1
  141. package/skills/direct/SKILL.md +57 -0
  142. package/skills/explorateur/SKILL.md +10 -6
  143. package/skills/pitmaster/SKILL.md +34 -14
  144. package/skills/pitmaster/references/consigne-agent.md +7 -1
  145. package/skills/relecteur/SKILL.md +8 -0
  146. package/skills/testwriter/SKILL.md +10 -0
  147. package/scripts/ticket.sh +0 -25
@@ -14,17 +14,13 @@ import { appendFileSync, existsSync, mkdirSync, readFileSync } from 'node:fs';
14
14
  import path from 'node:path';
15
15
  import { Context } from '@temporalio/activity';
16
16
  import { departDe, signalerGroupe } from '../../../scripts/mesure-de-la-machine.mjs';
17
- import { espacementDe, VARIABLE_JETON } from '../../../scripts/regles-des-places.mjs';
18
17
  import { ecrire, ligneDeNuit, REGISTRE } from '../../../scripts/registre.mjs';
19
18
  import { finirLaTentativeMorte } from '../acte.js';
20
19
  import { ouvrirLeClient } from '../client.js';
21
- import { choisir, marqueurDeLaNuit, projetsDuRegistre, raisonDeLaNuitSautee, sautDeLaFermeture, } from './choix.js';
22
- import { battreLaReservation, demarrerLesPlaces, leverLaReservation, lireLesPlaces, reserverLaMachineEntiere, } from '../places/client.js';
20
+ import { choisir, marqueurDeLaNuit, projetsDuRegistre, sautDeLaFermeture } from './choix.js';
23
21
  import { demanderDesNuits } from './client.js';
24
22
  // How often a night in progress sends its heartbeat.
25
23
  const BATTEMENT_MS = 30_000;
26
- // How often the wait of the stages under way reads the phase of the night again.
27
- const ATTENTE_DES_ETAPES_MS = 5_000;
28
24
  // How long a cancelled night's group has after SIGTERM, before SIGKILL.
29
25
  const GRACE_MS = 10_000;
30
26
  // The date and the time of <d>, in local time, as the night writes them (`date +%Y-%m-%d %H:%M`).
@@ -59,71 +55,19 @@ export function noterLeSaut(saut) {
59
55
  noterLeSautA(saut, new Date());
60
56
  return Promise.resolve();
61
57
  }
62
- /** The environment of the passes of the night: <env> with the jeton of the reservation of the machine. */
63
- export function environnementDeLaNuit(env, jeton) {
64
- return { ...env, [VARIABLE_JETON]: jeton };
65
- }
66
- // Renews the reservation <jeton> of the machine, which the places lift once its beat is PERIME_MS
67
- // old; a beat that fails is the next one's to renew.
68
- async function battreLaReservationDe(jeton) {
69
- const c = ouvrirLeClient();
70
- try {
71
- await battreLaReservation(c.client, jeton);
72
- }
73
- catch {
74
- // The next beat renews it.
75
- }
76
- finally {
77
- await c.fermer();
78
- }
79
- }
80
58
  export function sauterLaNuit({ racine, raison, }) {
81
59
  const saut = sautDeLaFermeture(racine, raison);
82
60
  noterLeSautA(saut, new Date());
83
61
  return Promise.resolve(saut);
84
62
  }
85
- export async function reserverLaMachine({ jeton, }) {
86
- const contexte = Context.current();
87
- const c = ouvrirLeClient();
88
- try {
89
- await demarrerLesPlaces(c.client, { espacementMs: espacementDe(process.env), veilleMs: 1_000 });
90
- const { prise } = await reserverLaMachineEntiere(c.client, { jeton });
91
- if (!prise) {
92
- // The supervisor closed the machine: the night is skipped, not made to fail.
93
- const raison = raisonDeLaNuitSautee((await lireLesPlaces(c.client)).fermeture);
94
- return { prise: false, raison: raison ?? 'machine fermée par le superviseur' };
95
- }
96
- // The stages under way finish: the nights start once no place is held but the night's.
97
- for (;;) {
98
- if ((await lireLesPlaces(c.client)).nuit?.phase === 'en cours') {
99
- return { prise: true };
100
- }
101
- contexte.heartbeat();
102
- await battreLaReservation(c.client, jeton);
103
- await contexte.sleep(ATTENTE_DES_ETAPES_MS);
104
- }
105
- }
106
- finally {
107
- await c.fermer();
108
- }
109
- }
110
- export async function leverLaMachine({ jeton }) {
111
- const c = ouvrirLeClient();
112
- try {
113
- await leverLaReservation(c.client, jeton);
114
- }
115
- finally {
116
- await c.fermer();
117
- }
118
- }
119
- export async function jouerLaNuit({ racine, jeton, }) {
63
+ export async function jouerLaNuit({ racine }) {
120
64
  const contexte = Context.current();
121
65
  const avant = contexte.info.heartbeatDetails;
122
66
  finirLaTentativeMorte(avant?.processus);
123
67
  const enfant = spawn(path.join(racine, 'node_modules/.bin/grillhouse'), ['nuit'], {
124
68
  cwd: racine,
125
69
  stdio: 'ignore',
126
- env: environnementDeLaNuit(process.env, jeton),
70
+ env: process.env,
127
71
  detached: true,
128
72
  });
129
73
  const fin = new Promise((ok, ko) => {
@@ -133,7 +77,6 @@ export async function jouerLaNuit({ racine, jeton, }) {
133
77
  const moi = { pid: enfant.pid, depart: enfant.pid ? departDe(enfant.pid) : null };
134
78
  const battre = () => {
135
79
  contexte.heartbeat({ processus: moi });
136
- void battreLaReservationDe(jeton);
137
80
  };
138
81
  battre();
139
82
  const minuteur = setInterval(battre, BATTEMENT_MS);
@@ -172,9 +115,7 @@ export async function demanderLesNuitsPlanifiees() {
172
115
  export const activitesDesNuits = {
173
116
  choisirLesNuits,
174
117
  noterLeSaut,
175
- reserverLaMachine,
176
118
  sauterLaNuit,
177
- leverLaMachine,
178
119
  jouerLaNuit,
179
120
  demanderLesNuitsPlanifiees,
180
121
  };
@@ -1 +1 @@
1
- {"version":3,"file":"activites.js","sourceRoot":"","sources":["../../../src/temporal/nuits/activites.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,kGAAkG;AAClG,gGAAgG;AAChG,wDAAwD;AACxD,EAAE;AACF,iGAAiG;AACjG,gGAAgG;AAChG,8FAA8F;AAC9F,gGAAgG;AAChG,iGAAiG;AACjG,iFAAiF;AACjF,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC9E,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAC;AACrF,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACtF,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EACL,OAAO,EACP,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,wBAAwB,GACzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,gBAAgB,EAAE,MA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MAAM,CAAC,GAAG,cAAc,EAAE,CAAC;IAC3B,IAAI,CAAC;QACH,MAAM,gBAAgB,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACxD,CAAC;YAAS,CAAC;QACT,MAAM,CAAC,CAAC,MAAM,EAAE,CAAC;IACnB,CAAC;AACH,CAAC;AAED,uCAAuC;AACvC,MAAM,CAAC,MAAM,iBAAiB,GAAsB;IAClD,eAAe;IACf,WAAW;IACX,YAAY;IACZ,WAAW;IACX,0BAA0B;CAC3B,CAAC"}
@@ -70,11 +70,10 @@ export interface VueDesNuits {
70
70
  export interface EntreeDesNuits {
71
71
  /** The length of history past which the workflow continues as new; 2000 by default. */
72
72
  limiteDHistoire?: number;
73
- /** The jeton of the reservation of the machine, kept across a Continue-As-New. */
73
+ /** The queue and the scheduled requests, kept across a Continue-As-New. */
74
74
  etat?: {
75
75
  attente: string[];
76
76
  planifiees: number;
77
- jeton?: string | null;
78
77
  };
79
78
  }
80
79
  export interface ActivitesDesNuits {
@@ -91,25 +90,12 @@ export interface ActivitesDesNuits {
91
90
  noterLeSaut(saut: Saut): Promise<void>;
92
91
  /**
93
92
  * The pass of the night of the project at <racine> (`node_modules/.bin/grillhouse nuit`, which
94
- * runs scripts/nuit.sh), in its main tree, in a process group of its own: its exit code.
93
+ * runs scripts/nuit.sh), in its main tree, in a process group of its own: its exit code. The
94
+ * pass takes the part of its project, as every pass of the machine.
95
95
  */
96
96
  jouerLaNuit(e: {
97
97
  racine: string;
98
- jeton: string;
99
98
  }): Promise<number>;
100
- /**
101
- * Reserves the whole machine for the nights under <jeton> (the workflow of the places,
102
- * ../places/deroule.ts) and returns once the stages under way have finished: no place is taken
103
- * by anything but the night, and the activity renews the reservation while it waits.
104
- */
105
- reserverLaMachine(e: {
106
- jeton: string;
107
- }): Promise<{
108
- prise: true;
109
- } | {
110
- prise: false;
111
- raison: string;
112
- }>;
113
99
  /**
114
100
  * The skip of the night of <racine> for <raison> (the machine closed by the supervisor), noted
115
101
  * as a skip the marker decides, in the journal of the night and in the register: the skip.
@@ -118,10 +104,6 @@ export interface ActivitesDesNuits {
118
104
  racine: string;
119
105
  raison: string;
120
106
  }): Promise<Saut>;
121
- /** Lifts the reservation of the machine <jeton>, so that the circuits resume. */
122
- leverLaMachine(e: {
123
- jeton: string;
124
- }): Promise<void>;
125
107
  /** The scheduled nights asked of the workflow of the nights, started when none runs. */
126
108
  demanderLesNuitsPlanifiees(): Promise<void>;
127
109
  }
@@ -14,7 +14,7 @@
14
14
  // - Once the queue is empty and no request waits, the workflow ends; the next request starts it
15
15
  // again. Past its length of history it continues as new with its queue.
16
16
  // Deterministic: it imports the workflow API and the contract.
17
- import { CancellationScope, allHandlersFinished, condition, continueAsNew, defineQuery, defineSignal, proxyActivities, setHandler, uuid4, workflowInfo, } from '@temporalio/workflow';
17
+ import { allHandlersFinished, condition, continueAsNew, defineQuery, defineSignal, proxyActivities, setHandler, workflowInfo, } from '@temporalio/workflow';
18
18
  import { DEMANDER, L_ETAT_DES_NUITS, } from './contrat.js';
19
19
  const actes = proxyActivities({
20
20
  startToCloseTimeout: '5 minutes',
@@ -27,12 +27,6 @@ const { jouerLaNuit } = proxyActivities({
27
27
  heartbeatTimeout: '5 minutes',
28
28
  retry: { maximumAttempts: 2 },
29
29
  });
30
- // The wait of the stages under way is as long as the longest of them; its heartbeat says it lives.
31
- const { reserverLaMachine } = proxyActivities({
32
- startToCloseTimeout: '12 hours',
33
- heartbeatTimeout: '5 minutes',
34
- retry: { maximumAttempts: 2 },
35
- });
36
30
  const demander = defineSignal(DEMANDER);
37
31
  const lEtat = defineQuery(L_ETAT_DES_NUITS);
38
32
  const LIMITE_D_HISTOIRE = 2000;
@@ -61,77 +55,47 @@ export async function nuitsDeLaMachine(entree = {}) {
61
55
  }
62
56
  });
63
57
  setHandler(lEtat, () => vue);
64
- // The reservation of the whole machine (`reserverLaMachine`): made once, before the first night
65
- // that plays, lifted when the nights are done, whatever ends them (a failure, a cancellation);
66
- // a Continue-As-New carries it.
67
- let jeton = entree.etat?.jeton ?? null;
68
- let suite = false;
69
- const lever = async () => {
70
- if (jeton === null) {
71
- return;
72
- }
73
- const j = jeton;
74
- jeton = null;
75
- await CancellationScope.nonCancellable(() => actes.leverLaMachine({ jeton: j }));
76
- };
58
+ // A night reserves nothing: its pass takes the part of its project, as every pass of the machine
59
+ // (scripts/places-de-la-machine.mjs), and waits for it, without bound under the closure of the
60
+ // supervisor.
77
61
  const limite = entree.limiteDHistoire ?? LIMITE_D_HISTOIRE;
78
- try {
79
- for (;;) {
80
- if (planifiees > 0) {
81
- planifiees = 0;
82
- const choix = await actes.choisirLesNuits();
83
- for (const saut of choix.sautes) {
84
- await actes.noterLeSaut(saut);
85
- }
86
- vue.sautes.push(...choix.sautes);
87
- vue.ecartes.push(...choix.ecartes);
88
- choix.jouer.forEach(inscrire);
89
- continue;
90
- }
91
- const racine = vue.attente.shift();
92
- if (racine === undefined) {
93
- // A request that arrives while the handlers finish is read before the end.
94
- await condition(allHandlersFinished);
95
- if (planifiees > 0 || vue.attente.length > 0) {
96
- continue;
97
- }
98
- return vue;
62
+ for (;;) {
63
+ if (planifiees > 0) {
64
+ planifiees = 0;
65
+ const choix = await actes.choisirLesNuits();
66
+ for (const saut of choix.sautes) {
67
+ await actes.noterLeSaut(saut);
99
68
  }
100
- if (jeton === null) {
101
- // The stages under way finish; the night starts once no place is held.
102
- const demande = uuid4();
103
- const reservation = await reserverLaMachine({ jeton: demande });
104
- if (!reservation.prise) {
105
- // The supervisor closed the machine: this night is skipped, its reason written like any
106
- // skip, and not caught up at the reopening: the next planned night plays it.
107
- vue.sautes.push(await actes.sauterLaNuit({ racine, raison: reservation.raison }));
108
- continue;
109
- }
110
- jeton = demande;
111
- }
112
- vue.enCours = racine;
113
- vue.depuis = Date.now();
114
- try {
115
- vue.jouees.push({ racine, code: await jouerLaNuit({ racine, jeton }), echec: null });
116
- }
117
- catch (e) {
118
- vue.jouees.push({ racine, code: null, echec: e instanceof Error ? e.message : String(e) });
119
- }
120
- vue.enCours = null;
121
- vue.depuis = null;
122
- if (workflowInfo().continueAsNewSuggested || workflowInfo().historyLength >= limite) {
123
- await condition(allHandlersFinished);
124
- suite = true;
125
- await continueAsNew({
126
- ...entree,
127
- etat: { attente: vue.attente, planifiees, jeton },
128
- });
69
+ vue.sautes.push(...choix.sautes);
70
+ vue.ecartes.push(...choix.ecartes);
71
+ choix.jouer.forEach(inscrire);
72
+ continue;
73
+ }
74
+ const racine = vue.attente.shift();
75
+ if (racine === undefined) {
76
+ // A request that arrives while the handlers finish is read before the end.
77
+ await condition(allHandlersFinished);
78
+ if (planifiees > 0 || vue.attente.length > 0) {
79
+ continue;
129
80
  }
81
+ return vue;
130
82
  }
131
- }
132
- finally {
133
- if (!suite) {
134
- await lever();
83
+ vue.enCours = racine;
84
+ vue.depuis = Date.now();
85
+ try {
86
+ vue.jouees.push({ racine, code: await jouerLaNuit({ racine }), echec: null });
87
+ }
88
+ catch (e) {
89
+ vue.jouees.push({ racine, code: null, echec: e instanceof Error ? e.message : String(e) });
90
+ }
91
+ vue.enCours = null;
92
+ vue.depuis = null;
93
+ if (workflowInfo().continueAsNewSuggested || workflowInfo().historyLength >= limite) {
94
+ await condition(allHandlersFinished);
95
+ await continueAsNew({
96
+ ...entree,
97
+ etat: { attente: vue.attente, planifiees },
98
+ });
135
99
  }
136
100
  }
137
101
  }
@@ -1 +1 @@
1
- {"version":3,"file":"deroule.js","sourceRoot":"","sources":["../../../src/temporal/nuits/deroule.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,mGAAmG;AACnG,qFAAqF;AACrF,6FAA6F;AAC7F,8FAA8F;AAC9F,EAAE;AACF,+FAA+F;AAC/F,8FAA8F;AAC9F,wEAAwE;AACxE,wEAAwE;AACxE,qEAAqE;AACrE,kGAAkG;AAClG,iFAAiF;AACjF,gGAAgG;AAChG,0EAA0E;AAC1E,+DAA+D;AAC/D,OAAO,EACL,iBAAiB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MAAM;gBACT,IAAI,EAAE,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE;aAC3C,CAAC,CAAC;QACL,CAAC;IACH,CAAC;AACH,CAAC;AAED,oFAAoF;AACpF,MAAM,CAAC,KAAK,UAAU,aAAa;IACjC,MAAM,KAAK,CAAC,0BAA0B,EAAE,CAAC;AAC3C,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { Client } from '@temporalio/client';
2
- import { type IssueDeLaFermeture, type IssueDeLaReouverture, type PriseDeLaMachine, type CircuitsDuProjet, type DemandeDePlace, type EntreeDesPlaces, type PlaceDonnee, type VueDesPlaces } from './contrat.js';
2
+ import { type IssueDeLaFermeture, type IssueDeLaReouverture, type CircuitsDuProjet, type DemandeDePlace, type EntreeDesPlaces, type PlaceDonnee, type VueDesPlaces } from './contrat.js';
3
3
  /** Starts the workflow of the machine on <file>, or leaves the one that runs. */
4
4
  export declare function demarrerLesPlaces(client: Client, entree: EntreeDesPlaces, { file, id }?: {
5
5
  file?: string;
@@ -26,29 +26,16 @@ export declare function rattacherLaPlace(client: Client, place: string, processu
26
26
  }, id?: string): Promise<void>;
27
27
  /** The places of the machine as the board shows them: the ceiling, the places, the waits. */
28
28
  export declare function lireLesPlaces(client: Client, id?: string): Promise<VueDesPlaces>;
29
- /**
30
- * Reserves the whole machine for the night <jeton> (RESERVER_LA_MACHINE): no place is given but to
31
- * the requests that carry the jeton, no circuit starts, the places taken finish. The update
32
- * returns at once; the phase is read in `lireLesPlaces`.
33
- */
34
- export declare function reserverLaMachineEntiere(client: Client, { jeton }: {
35
- jeton: string;
36
- }, id?: string): Promise<PriseDeLaMachine>;
37
29
  /**
38
30
  * Closes the machine as the supervisor (FERMER_LA_MACHINE, `cordon` of kubectl): no place is given,
39
- * no circuit starts, the places taken finish. `nuit-tient` when the night holds the machine (no
40
- * second reservation), `deja-fermee` when it is closed already.
31
+ * no circuit starts, the places taken finish. `deja-fermee` when it is closed already.
41
32
  */
42
33
  export declare function fermerLaMachine(client: Client, id?: string): Promise<IssueDeLaFermeture>;
43
34
  /**
44
35
  * Reopens the machine the supervisor closed (ROUVRIR_LA_MACHINE, `uncordon`): the places wait are
45
- * given again by themselves. A night's reservation is never lifted (`nuit-tient`).
36
+ * given again by themselves.
46
37
  */
47
38
  export declare function rouvrirLaMachine(client: Client, id?: string): Promise<IssueDeLaReouverture>;
48
- /** Renews the reservation <jeton>: its beat, which keeps it from going out of date. */
49
- export declare function battreLaReservation(client: Client, jeton: string, id?: string): Promise<void>;
50
- /** Lifts the reservation <jeton>; another jeton lifts nothing. */
51
- export declare function leverLaReservation(client: Client, jeton: string, id?: string): Promise<void>;
52
39
  /**
53
40
  * The tickets of the demand <c> that hold a place of a circuit (RESERVER: the candidates the
54
41
  * machine lets the project start, or the circuit resumed), in the order of arrival of every
@@ -7,7 +7,7 @@
7
7
  import { randomUUID } from 'node:crypto';
8
8
  import { setTimeout as dormir } from 'node:timers/promises';
9
9
  import { FILE_DE_LA_MACHINE } from '../installation.js';
10
- import { BATTRE_LA_RESERVATION, FERMER_LA_MACHINE, ROUVRIR_LA_MACHINE, ID_DES_PLACES, LA_DEMANDE, LES_PLACES, LEVER_LA_RESERVATION, RESERVER_LA_MACHINE, PLACES, PRENDRE, RATTACHER, RENDRE, RESERVER, TIRER_UN_RANG, } from './contrat.js';
10
+ import { FERMER_LA_MACHINE, ROUVRIR_LA_MACHINE, ID_DES_PLACES, LA_DEMANDE, LES_PLACES, PLACES, PRENDRE, RATTACHER, RENDRE, RESERVER, TIRER_UN_RANG, } from './contrat.js';
11
11
  /** Starts the workflow of the machine on <file>, or leaves the one that runs. */
12
12
  export async function demarrerLesPlaces(client, entree, { file = FILE_DE_LA_MACHINE, id = ID_DES_PLACES } = {}) {
13
13
  await client.workflow.start(PLACES, {
@@ -62,43 +62,20 @@ export async function rattacherLaPlace(client, place, processus, id = ID_DES_PLA
62
62
  export async function lireLesPlaces(client, id = ID_DES_PLACES) {
63
63
  return client.workflow.getHandle(id).query(LES_PLACES);
64
64
  }
65
- /**
66
- * Reserves the whole machine for the night <jeton> (RESERVER_LA_MACHINE): no place is given but to
67
- * the requests that carry the jeton, no circuit starts, the places taken finish. The update
68
- * returns at once; the phase is read in `lireLesPlaces`.
69
- */
70
- export async function reserverLaMachineEntiere(client, { jeton }, id = ID_DES_PLACES) {
71
- return client.workflow
72
- .getHandle(id)
73
- .executeUpdate(RESERVER_LA_MACHINE, { args: [jeton] });
74
- }
75
65
  /**
76
66
  * Closes the machine as the supervisor (FERMER_LA_MACHINE, `cordon` of kubectl): no place is given,
77
- * no circuit starts, the places taken finish. `nuit-tient` when the night holds the machine (no
78
- * second reservation), `deja-fermee` when it is closed already.
67
+ * no circuit starts, the places taken finish. `deja-fermee` when it is closed already.
79
68
  */
80
69
  export async function fermerLaMachine(client, id = ID_DES_PLACES) {
81
70
  return client.workflow.getHandle(id).executeUpdate(FERMER_LA_MACHINE);
82
71
  }
83
72
  /**
84
73
  * Reopens the machine the supervisor closed (ROUVRIR_LA_MACHINE, `uncordon`): the places wait are
85
- * given again by themselves. A night's reservation is never lifted (`nuit-tient`).
74
+ * given again by themselves.
86
75
  */
87
76
  export async function rouvrirLaMachine(client, id = ID_DES_PLACES) {
88
77
  return client.workflow.getHandle(id).executeUpdate(ROUVRIR_LA_MACHINE);
89
78
  }
90
- /** Renews the reservation <jeton>: its beat, which keeps it from going out of date. */
91
- export async function battreLaReservation(client, jeton, id = ID_DES_PLACES) {
92
- await client.workflow
93
- .getHandle(id)
94
- .executeUpdate(BATTRE_LA_RESERVATION, { args: [jeton] });
95
- }
96
- /** Lifts the reservation <jeton>; another jeton lifts nothing. */
97
- export async function leverLaReservation(client, jeton, id = ID_DES_PLACES) {
98
- await client.workflow
99
- .getHandle(id)
100
- .executeUpdate(LEVER_LA_RESERVATION, { args: [jeton] });
101
- }
102
79
  /**
103
80
  * The tickets of the demand <c> that hold a place of a circuit (RESERVER: the candidates the
104
81
  * machine lets the project start, or the circuit resumed), in the order of arrival of every
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/temporal/places/client.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,8FAA8F;AAC9F,+FAA+F;AAC/F,+FAA+F;AAC/F,8FAA8F;AAC9F,8FAA8F;AAC9F,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,IAAI,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,kBAAkB,EAIlB,aAAa,EACb,UAAU,EACV,UAAU,EACV,oBAAoB,EACpB,mBAAmB,EACnB,MAAM,EACN,OAAO,EACP,SAAS,EACT,MAAM,EACN,QAAQ,EACR,aAAa,GAQd,MAAM,cAAc,CAAC;AAEtB,iFAAiF;AACjF,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,MAAc,EACd,MAAuB,EACvB,EAAE,IAAI,GAAG,kBAAkB,EAAE,EAAE,GAAG,aAAa,KAAqC,EAAE;IAEtF,MAAM,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE;QAClC,UAAU,EAAE,EAAE;QACd,SAAS,EAAE,IAAI;QACf,IAAI,EAAE,CAAC,MAAM,CAAC;QACd,wBAAwB,EAAE,cAAc;KACzC,CAAC,CAAC;AACL,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAC9C,MAAc,EACd,OAAmC,EACnC,EACE,EAAE,GAAG,aAAa,EAClB,QAAQ,GAAG,GAAG,EACd,MAAM,MACsD,EAAE;IAEhE,MAAM,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IACxC,MAAM,KAAK,GAAG,UAAU,EAAE,CAAC;IAC3B,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC,CA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CAAC,CAAC,MAAM,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YACnD,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,IAAK,CAAW,CAAC,IAAI,KAAK,uBAAuB,EAAE,CAAC;YAClD,OAAO,IAAI,CAAC;QACd,CAAC;QACD,MAAM,CAAC,CAAC;IACV,CAAC;IACD,OAAO,CAAC,CAAC,aAAa,CAA+B,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AAChF,CAAC"}
@@ -21,61 +21,34 @@ export declare const LA_DEMANDE = "laDemande";
21
21
  */
22
22
  export declare const RESERVER = "reserverDesCircuits";
23
23
  /**
24
- * The update by which the nights reserve the whole machine (grillhouse-giw): no place is given but
25
- * to the requests that carry the jeton of the night, and the places taken finish.
26
- */
27
- export declare const RESERVER_LA_MACHINE = "reserverLaMachine";
28
- /** The update by which the nights renew their reservation: its beat. */
29
- export declare const BATTRE_LA_RESERVATION = "battreLaReservation";
30
- /** The update by which the nights lift their reservation, by its jeton. */
31
- export declare const LEVER_LA_RESERVATION = "leverLaReservation";
32
- /**
33
- * The update by which the supervisor closes the machine (`cordon` of kubectl): the same
34
- * reservation as the night's, its author `superviseur`, a jeton of its own, no beat. Its issue says
35
- * what it did.
24
+ * The update by which the supervisor closes the machine (`cordon` of kubectl): the only reservation
25
+ * of the machine, its author `superviseur`. Its issue says what it did.
36
26
  */
37
27
  export declare const FERMER_LA_MACHINE = "fermerLaMachine";
38
- /** The update by which the supervisor reopens the machine; it never lifts a night's reservation. */
28
+ /** The update by which the supervisor reopens the machine. */
39
29
  export declare const ROUVRIR_LA_MACHINE = "rouvrirLaMachine";
40
- /** The author of the reservation of the machine; an absent one is the night's. */
41
- type AuteurDeLaReservation = 'nuit' | 'superviseur';
42
- /** What the closure did: made, already there, or the night holds the machine. */
43
- export type IssueDeLaFermeture = 'fermee' | 'deja-fermee' | 'nuit-tient';
44
- /** What the reopening did: made, nothing to do, or the night holds the machine. */
45
- export type IssueDeLaReouverture = 'rouverte' | 'deja-ouverte' | 'nuit-tient';
46
- /** What the nights learn of their reservation: taken, or not (the supervisor's closure stands). */
47
- export interface PriseDeLaMachine {
48
- prise: boolean;
49
- }
50
- /** The reservation of the whole machine, by the night or by the supervisor. */
30
+ /** The author of the reservation of the machine: the supervisor. */
31
+ type AuteurDeLaReservation = 'superviseur';
32
+ /** What the closure did: made, or already there. */
33
+ export type IssueDeLaFermeture = 'fermee' | 'deja-fermee';
34
+ /** What the reopening did: made, or nothing to do. */
35
+ export type IssueDeLaReouverture = 'rouverte' | 'deja-ouverte';
36
+ /** The closure of the whole machine by the supervisor. */
51
37
  interface Reservation {
52
- /** Absent in a state of before: the night's. */
53
- auteur?: AuteurDeLaReservation;
54
- jeton: string;
38
+ auteur: AuteurDeLaReservation;
55
39
  /** The time it was made, in ms. */
56
40
  depuis: number;
57
- /** The time of its last beat, in ms; the supervisor's closure has none and never goes out of date. */
58
- battement?: number;
59
41
  }
60
42
  /** The machine closed as the places show it: its author, since when, and its phase. */
61
43
  interface FermetureDesPlaces {
62
44
  auteur: AuteurDeLaReservation;
63
45
  depuis: number;
64
- /** `attend` while the places taken finish, `en cours` (night) or `vide` (closure) once none is. */
65
- phase: 'attend' | 'en cours' | 'vide';
66
- }
67
- /** The night as the places show it: its reservation and its phase. */
68
- interface NuitDesPlaces {
69
- /** `attend` while the places taken finish, `en cours` once none is. */
70
- phase: 'attend' | 'en cours';
71
- depuis: number;
72
- battement: number;
46
+ /** `attend` while the places taken finish, `vide` once none is. */
47
+ phase: 'attend' | 'vide';
73
48
  }
74
49
  /** A place taken. */
75
50
  interface Prise {
76
51
  id: string;
77
- /** The jeton of the night the request carried, null without. */
78
- jeton?: string | null;
79
52
  pid: number;
80
53
  /** The start of the process (`departDe`), null when unknown. */
81
54
  depart: string | null;
@@ -89,7 +62,6 @@ interface Prise {
89
62
  /** A taking that waits, and why. */
90
63
  interface Attente {
91
64
  id: string;
92
- jeton?: string | null;
93
65
  pid: number;
94
66
  depart: string | null;
95
67
  ticket: string | null;
@@ -132,7 +104,7 @@ export interface EtatDesPlaces {
132
104
  attentes: Attente[];
133
105
  /** The places of the circuits of the machine; absent in a state of before. */
134
106
  circuits?: PlaceDeCircuit[];
135
- /** The reservation of the machine by the night; absent in a state of before, null without. */
107
+ /** The closure of the machine by the supervisor; absent in a state of before, null without. */
136
108
  reservation?: Reservation | null;
137
109
  }
138
110
  /** What the machine gives at a moment (scripts/regles-des-places.mjs). */
@@ -168,8 +140,6 @@ export interface DemandeDePlace {
168
140
  ticket?: string | null;
169
141
  /** The root of the main tree of the project that asks. */
170
142
  racine?: string | null;
171
- /** The jeton of the reservation of the night, which the passes of the night carry. */
172
- jeton?: string | null;
173
143
  /** The rank of arrival of the circuit; drawn by the workflow, past every rank given, when absent. */
174
144
  rang?: number;
175
145
  }
@@ -189,17 +159,11 @@ export interface VueDesPlaces {
189
159
  prises: Prise[];
190
160
  attentes: Attente[];
191
161
  circuits?: PlaceDeCircuit[];
192
- /** The night when it reserves the machine; absent without (a closure of the supervisor is none). */
193
- nuit?: NuitDesPlaces | null;
194
162
  /** The machine closed, by whom and since when; absent without. */
195
163
  fermeture?: FermetureDesPlaces | null;
196
- /**
197
- * The reservation of the machine, by the night or by the supervisor, as the parts of the passes
198
- * read it: its author and its jeton; null without one.
199
- */
164
+ /** The closure of the machine, as the parts of the passes read it; null without one. */
200
165
  reservation?: {
201
166
  auteur: AuteurDeLaReservation;
202
- jeton: string;
203
167
  } | null;
204
168
  }
205
169
  /** Where a request stands. */
@@ -20,20 +20,10 @@ export const LA_DEMANDE = 'laDemande';
20
20
  */
21
21
  export const RESERVER = 'reserverDesCircuits';
22
22
  /**
23
- * The update by which the nights reserve the whole machine (grillhouse-giw): no place is given but
24
- * to the requests that carry the jeton of the night, and the places taken finish.
25
- */
26
- export const RESERVER_LA_MACHINE = 'reserverLaMachine';
27
- /** The update by which the nights renew their reservation: its beat. */
28
- export const BATTRE_LA_RESERVATION = 'battreLaReservation';
29
- /** The update by which the nights lift their reservation, by its jeton. */
30
- export const LEVER_LA_RESERVATION = 'leverLaReservation';
31
- /**
32
- * The update by which the supervisor closes the machine (`cordon` of kubectl): the same
33
- * reservation as the night's, its author `superviseur`, a jeton of its own, no beat. Its issue says
34
- * what it did.
23
+ * The update by which the supervisor closes the machine (`cordon` of kubectl): the only reservation
24
+ * of the machine, its author `superviseur`. Its issue says what it did.
35
25
  */
36
26
  export const FERMER_LA_MACHINE = 'fermerLaMachine';
37
- /** The update by which the supervisor reopens the machine; it never lifts a night's reservation. */
27
+ /** The update by which the supervisor reopens the machine. */
38
28
  export const ROUVRIR_LA_MACHINE = 'rouvrirLaMachine';
39
29
  //# sourceMappingURL=contrat.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"contrat.js","sourceRoot":"","sources":["../../../src/temporal/places/contrat.ts"],"names":[],"mappings":"AAMA,2BAA2B;AAC3B,MAAM,CAAC,MAAM,MAAM,GAAG,mBAAmB,CAAC;AAC1C,iDAAiD;AACjD,MAAM,CAAC,MAAM,aAAa,GAAG,iCAAiC,CAAC;AAC/D,oFAAoF;AACpF,MAAM,CAAC,MAAM,OAAO,GAAG,SAAS,CAAC;AACjC,4FAA4F;AAC5F,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CAAC;AAC3C,6EAA6E;AAC7E,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC;AAC/B,yEAAyE;AACzE,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAC;AACrC,sDAAsD;AACtD,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAAC;AACtC,6FAA6F;AAC7F,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAAC;AACtC;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,qBAAqB,CAAC;AAC9C;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,mBAAmB,CAA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