palabre 0.3.0 → 0.5.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.
@@ -0,0 +1,280 @@
1
+ const frCommandHelp = {
2
+ init: `
3
+ Initialise une configuration Palabre.
4
+
5
+ Usage:
6
+ palabre init [flags]
7
+
8
+ Flags:
9
+ --local cree ./palabre.config.json
10
+ --language <fr|en> definit la langue
11
+ --config <path> chemin de config explicite
12
+ `,
13
+ agents: `
14
+ Liste les agents declares dans la config.
15
+
16
+ Usage:
17
+ palabre agents [flags]
18
+
19
+ Flags:
20
+ --config <path> chemin de config explicite
21
+ --language <fr|en> force la langue
22
+ `,
23
+ presets: `
24
+ Liste les presets de paires d'agents.
25
+
26
+ Usage:
27
+ palabre presets [flags]
28
+
29
+ Flags:
30
+ --json sortie structuree pour integrations
31
+ --config <path> chemin de config explicite
32
+ `,
33
+ config: `
34
+ Configure les agents par defaut, la synthese, le nombre de reponses et la langue.
35
+
36
+ Usage:
37
+ palabre config
38
+ palabre config --set-defaults <agentA> <agentB>
39
+ palabre config -t <number>
40
+ palabre config --summary-agent <name|none>
41
+ palabre config --language <fr|en>
42
+
43
+ Flags:
44
+ --clear-defaults supprime les parametres par defaut
45
+ --sync-agents ajoute les agents detectes manquants
46
+ --config <path> chemin de config explicite
47
+ `,
48
+ new: `
49
+ Assistant interactif pour preparer un debat.
50
+
51
+ Usage:
52
+ palabre new [flags]
53
+
54
+ Flags:
55
+ --config <path> chemin de config explicite
56
+ --language <fr|en> force la langue
57
+ `,
58
+ doctor: `
59
+ Verifie la config et les outils locaux.
60
+
61
+ Usage:
62
+ palabre doctor [flags]
63
+
64
+ Flags:
65
+ --plain sortie simple pour logs
66
+ --config <path> chemin de config explicite
67
+ --language <fr|en> force la langue
68
+ `,
69
+ update: `
70
+ Affiche ou execute les etapes de mise a jour.
71
+
72
+ Usage:
73
+ palabre update [flags]
74
+
75
+ Flags:
76
+ --apply execute les etapes de mise a jour
77
+ --config <path> chemin de config explicite
78
+ `,
79
+ run: `
80
+ Lance un debat entre deux agents.
81
+
82
+ Usage:
83
+ palabre "Sujet"
84
+ palabre -s "Sujet" -t 4
85
+ palabre <preset> "Sujet" -t 4
86
+
87
+ Flags:
88
+ -s, --subject <text> sujet du debat
89
+ -t, --turns <n> nombre total de reponses
90
+ --preset <name> preset d'agents
91
+ --agent-a <name> premier agent
92
+ --agent-b <name> second agent
93
+ --show-prompt affiche le prompt sans appeler d'agent
94
+ `
95
+ };
96
+ const enCommandHelp = {
97
+ init: `
98
+ Initializes a Palabre configuration.
99
+
100
+ Usage:
101
+ palabre init [flags]
102
+
103
+ Flags:
104
+ --local creates ./palabre.config.json
105
+ --language <fr|en> sets the language
106
+ --config <path> explicit config path
107
+ `,
108
+ agents: `
109
+ Lists agents declared in the config.
110
+
111
+ Usage:
112
+ palabre agents [flags]
113
+
114
+ Flags:
115
+ --config <path> explicit config path
116
+ --language <fr|en> forces the language
117
+ `,
118
+ presets: `
119
+ Lists agent-pair presets.
120
+
121
+ Usage:
122
+ palabre presets [flags]
123
+
124
+ Flags:
125
+ --json structured output for integrations
126
+ --config <path> explicit config path
127
+ `,
128
+ config: `
129
+ Configures default agents, summary, response count, and language.
130
+
131
+ Usage:
132
+ palabre config
133
+ palabre config --set-defaults <agentA> <agentB>
134
+ palabre config -t <number>
135
+ palabre config --summary-agent <name|none>
136
+ palabre config --language <fr|en>
137
+
138
+ Flags:
139
+ --clear-defaults clears default settings
140
+ --sync-agents adds missing detected agents
141
+ --config <path> explicit config path
142
+ `,
143
+ new: `
144
+ Interactive assistant to prepare a debate.
145
+
146
+ Usage:
147
+ palabre new [flags]
148
+
149
+ Flags:
150
+ --config <path> explicit config path
151
+ --language <fr|en> forces the language
152
+ `,
153
+ doctor: `
154
+ Checks config and local tools.
155
+
156
+ Usage:
157
+ palabre doctor [flags]
158
+
159
+ Flags:
160
+ --plain simple output for logs
161
+ --config <path> explicit config path
162
+ --language <fr|en> forces the language
163
+ `,
164
+ update: `
165
+ Shows or applies update steps.
166
+
167
+ Usage:
168
+ palabre update [flags]
169
+
170
+ Flags:
171
+ --apply runs update steps
172
+ --config <path> explicit config path
173
+ `,
174
+ run: `
175
+ Runs a debate between two agents.
176
+
177
+ Usage:
178
+ palabre "Subject"
179
+ palabre -s "Subject" -t 4
180
+ palabre <preset> "Subject" -t 4
181
+
182
+ Flags:
183
+ -s, --subject <text> debate subject
184
+ -t, --turns <n> total number of responses
185
+ --preset <name> agent preset
186
+ --agent-a <name> first agent
187
+ --agent-b <name> second agent
188
+ --show-prompt shows the prompt without calling an agent
189
+ `
190
+ };
191
+ export const helpMessages = {
192
+ fr: {
193
+ render: () => `
194
+ PALABRE
195
+
196
+ Debats entre agents IA dans votre terminal.
197
+
198
+ Usage:
199
+ palabre [flags]
200
+ palabre [command]
201
+ palabre "Sujet"
202
+ palabre <preset> "Sujet"
203
+
204
+ Demarrage rapide:
205
+ palabre init
206
+ palabre new
207
+ palabre "Faut-il ajouter une TUI a Palabre ?"
208
+ palabre codex-claude "Comparer deux solutions" -t 4
209
+
210
+ Commandes:
211
+ init Creer une configuration
212
+ new Assistant interactif de debat
213
+ agents Lister les agents configures
214
+ presets Lister les presets disponibles
215
+ config Modifier les parametres par defaut
216
+ doctor Verifier la config et les outils locaux
217
+ update Afficher ou appliquer les etapes de mise a jour
218
+ help Afficher l'aide
219
+ version Afficher la version
220
+
221
+ Flags:
222
+ -h, --help aide pour Palabre
223
+ -v, --version affiche la version
224
+ -s, --subject <text> sujet du debat
225
+ -t, --turns <number> nombre total de reponses
226
+ --language <fr|en> force la langue
227
+ --config <path> chemin de config explicite
228
+
229
+ Documentation complete:
230
+ https://palab.re/fr
231
+
232
+ Utilisez "palabre [command] --help" pour plus d'informations sur une commande.
233
+ `,
234
+ renderCommand: (command) => frCommandHelp[command]
235
+ },
236
+ en: {
237
+ render: () => `
238
+ PALABRE
239
+
240
+ Debates between AI agents in your terminal.
241
+
242
+ Usage:
243
+ palabre [flags]
244
+ palabre [command]
245
+ palabre "Subject"
246
+ palabre <preset> "Subject"
247
+
248
+ Quick start:
249
+ palabre init
250
+ palabre new
251
+ palabre "Should Palabre add a TUI?"
252
+ palabre codex-claude "Compare two solutions" -t 4
253
+
254
+ Commands:
255
+ init Create a configuration
256
+ new Interactive debate assistant
257
+ agents List configured agents
258
+ presets List available presets
259
+ config Edit default settings
260
+ doctor Check config and local tools
261
+ update Show or apply update steps
262
+ help Show help
263
+ version Show version
264
+
265
+ Flags:
266
+ -h, --help help for Palabre
267
+ -v, --version show version
268
+ -s, --subject <text> debate subject
269
+ -t, --turns <number> total number of responses
270
+ --language <fr|en> force language
271
+ --config <path> explicit config path
272
+
273
+ Full documentation:
274
+ https://palab.re/en
275
+
276
+ Use "palabre [command] --help" for more information about a command.
277
+ `,
278
+ renderCommand: (command) => enCommandHelp[command]
279
+ }
280
+ };
@@ -0,0 +1,38 @@
1
+ import { adapterErrorMessages } from "./adapter-errors.js";
2
+ import { agentsMessages } from "./agents.js";
3
+ import { commonMessages } from "./common.js";
4
+ import { configMessages } from "./config.js";
5
+ import { contextMessages } from "./context.js";
6
+ import { doctorMessages } from "./doctor.js";
7
+ import { helpMessages } from "./help.js";
8
+ import { initMessages } from "./init.js";
9
+ import { limitsMessages } from "./limits.js";
10
+ import { newMessages } from "./new.js";
11
+ import { orchestratorMessages } from "./orchestrator.js";
12
+ import { outputMessages } from "./output.js";
13
+ import { promptMessages } from "./prompt.js";
14
+ import { presetsMessages } from "./presets.js";
15
+ import { previewMessages } from "./preview.js";
16
+ import { rendererMessages } from "./renderers.js";
17
+ import { updateMessages } from "./update.js";
18
+ export function createTranslator(language) {
19
+ return {
20
+ adapterErrors: adapterErrorMessages[language],
21
+ agents: agentsMessages[language],
22
+ common: commonMessages[language],
23
+ config: configMessages[language],
24
+ context: contextMessages[language],
25
+ doctor: doctorMessages[language],
26
+ help: helpMessages[language],
27
+ init: initMessages[language],
28
+ limits: limitsMessages[language],
29
+ new: newMessages[language],
30
+ orchestrator: orchestratorMessages[language],
31
+ output: outputMessages[language],
32
+ prompt: promptMessages[language],
33
+ presets: presetsMessages[language],
34
+ preview: previewMessages[language],
35
+ renderers: rendererMessages[language],
36
+ update: updateMessages[language]
37
+ };
38
+ }
@@ -0,0 +1,30 @@
1
+ export const initMessages = {
2
+ fr: {
3
+ configExists: (path) => `${path} existe déjà.`,
4
+ configCreated: (path) => `${path} créé.`,
5
+ editConfigThenRerun: (path) => `${path} créé. Édite la config puis relance palabre run.`,
6
+ localDetectionTitle: "Détection locale:",
7
+ commandDetected: (command) => `détecté (${command})`,
8
+ commandMissing: "non détecté",
9
+ ollamaServerUnreachable: (baseUrl) => `serveur non joignable (${baseUrl})`,
10
+ ollamaMissing: "non détecté",
11
+ ollamaDetected: (modelCount) => `détectée (${modelCount} modèle${modelCount > 1 ? "s" : ""})`,
12
+ defaults: (agentA, agentB) => `Défauts: ${agentA} <-> ${agentB}`,
13
+ noDefaultPair: (detectedAgents) => `Défauts: ${detectedAgents}. Palabre a besoin d'au moins deux agents.\nAgents compatibles: Codex CLI, Claude CLI, Gemini CLI, OpenCode CLI, Ollama local.\nGuide: https://palab.re/fr/agents/overview`,
14
+ languageHint: (language) => `Langue: ${language}\nEnglish > palabre config --language en`
15
+ },
16
+ en: {
17
+ configExists: (path) => `${path} already exists.`,
18
+ configCreated: (path) => `${path} created.`,
19
+ editConfigThenRerun: (path) => `${path} created. Edit the config, then run palabre run again.`,
20
+ localDetectionTitle: "Local detection:",
21
+ commandDetected: (command) => `detected (${command})`,
22
+ commandMissing: "not detected",
23
+ ollamaServerUnreachable: (baseUrl) => `server unreachable (${baseUrl})`,
24
+ ollamaMissing: "not detected",
25
+ ollamaDetected: (modelCount) => `detected (${modelCount} model${modelCount > 1 ? "s" : ""})`,
26
+ defaults: (agentA, agentB) => `Defaults: ${agentA} <-> ${agentB}`,
27
+ noDefaultPair: (detectedAgents) => `Defaults: ${detectedAgents}. Palabre needs at least two agents.\nCompatible agents: Codex CLI, Claude CLI, Gemini CLI, OpenCode CLI, local Ollama.\nGuide: https://palab.re/en/agents/overview`,
28
+ languageHint: (language) => `Language: ${language}\nFrançais > palabre config --language fr`
29
+ }
30
+ };
@@ -0,0 +1,12 @@
1
+ export const limitsMessages = {
2
+ fr: {
3
+ expectsInteger: (label, maxTurns) => `${label} attend un nombre entier entre 1 et ${maxTurns}.`,
4
+ mustBeProvidedOnce: (label) => `${label} doit être fourni une seule fois.`,
5
+ mustBeInteger: (label, maxTurns) => `${label} doit être un nombre entier entre 1 et ${maxTurns}.`
6
+ },
7
+ en: {
8
+ expectsInteger: (label, maxTurns) => `${label} expects an integer between 1 and ${maxTurns}.`,
9
+ mustBeProvidedOnce: (label) => `${label} must be provided only once.`,
10
+ mustBeInteger: (label, maxTurns) => `${label} must be an integer between 1 and ${maxTurns}.`
11
+ }
12
+ };
@@ -0,0 +1,66 @@
1
+ export const newMessages = {
2
+ fr: {
3
+ needsTwoAgents: "palabre new a besoin d'au moins deux agents dans la config. Lance `palabre init` ou edite ta config.",
4
+ cancelled: "Création de débat annulée.",
5
+ title: "PALABRE - ASSISTANT DE CONFIGURATION",
6
+ quitHint: "À tout moment: Ctrl+C pour interrompre, ou tape q, quit ou exit dans un prompt pour quitter.",
7
+ defaultHint: "Appuie sur Entrée pour accepter un choix par défaut (*).",
8
+ agentA: "Agent A",
9
+ agentB: "Agent B",
10
+ topic: "Sujet",
11
+ advancedHint: "Réponds non pour choisir le nombre de réponses, les modèles, la synthèse et le contexte.",
12
+ launchMinimal: "Lancer maintenant avec les options par défaut ?",
13
+ turns: "Nombre de réponses",
14
+ modelFor: (agent) => `Modèle pour ${agent} (optionnel)`,
15
+ summaryEnabled: "Synthèse finale ?",
16
+ summaryAgent: "Agent de synthèse",
17
+ summaryModelFor: (agent) => `Modèle de synthèse pour ${agent} (optionnel)`,
18
+ contextPaths: "Contexte dossier/fichier via --context (optionnel)",
19
+ filesPaths: "Fichiers stricts via --files (optionnel)",
20
+ showPrompt: "Afficher seulement le prompt ?",
21
+ plainOutput: "Rendu plain ?",
22
+ detectedOllama: (role, count) => `ollama/${role} détecté (${count} modèle(s))`,
23
+ ollamaUnreachable: (role) => `ollama/${role} non joignable`,
24
+ detectedCli: (role) => `cli/${role} détecté`,
25
+ missingCli: (role) => `cli/${role} non détecté`,
26
+ invalidAgentChoice: "Choix invalide. Tape un numéro, un nom d'agent, Entrée ou q.",
27
+ requiredField: "Ce champ est requis pour lancer un débat.",
28
+ invalidTurns: (maxTurns) => `Entre un nombre entier entre 1 et ${maxTurns}, Entrée ou q.`,
29
+ invalidYesNo: "Réponds par oui, non, Entrée ou q.",
30
+ equivalentCommands: "Commandes équivalentes:",
31
+ yesNoSuffix: (defaultValue) => defaultValue ? "O/n" : "o/N",
32
+ turnsValidationLabel: "Le nombre de réponses"
33
+ },
34
+ en: {
35
+ needsTwoAgents: "palabre new needs at least two agents in the config. Run `palabre init` or edit your config.",
36
+ cancelled: "Debate creation cancelled.",
37
+ title: "PALABRE - SETUP ASSISTANT",
38
+ quitHint: "At any time: Ctrl+C to interrupt, or type q, quit, or exit in a prompt to leave.",
39
+ defaultHint: "Press Enter to accept a default choice (*).",
40
+ agentA: "Agent A",
41
+ agentB: "Agent B",
42
+ topic: "Subject",
43
+ advancedHint: "Answer no to choose the number of responses, models, summary, and context.",
44
+ launchMinimal: "Launch now with default options?",
45
+ turns: "Number of responses",
46
+ modelFor: (agent) => `Model for ${agent} (optional)`,
47
+ summaryEnabled: "Final summary?",
48
+ summaryAgent: "Summary agent",
49
+ summaryModelFor: (agent) => `Summary model for ${agent} (optional)`,
50
+ contextPaths: "Folder/file context via --context (optional)",
51
+ filesPaths: "Strict files via --files (optional)",
52
+ showPrompt: "Only show the prompt?",
53
+ plainOutput: "Plain output?",
54
+ detectedOllama: (role, count) => `ollama/${role} detected (${count} model(s))`,
55
+ ollamaUnreachable: (role) => `ollama/${role} unreachable`,
56
+ detectedCli: (role) => `cli/${role} detected`,
57
+ missingCli: (role) => `cli/${role} not detected`,
58
+ invalidAgentChoice: "Invalid choice. Type a number, an agent name, Enter, or q.",
59
+ requiredField: "This field is required to start a debate.",
60
+ invalidTurns: (maxTurns) => `Enter an integer between 1 and ${maxTurns}, Enter, or q.`,
61
+ invalidYesNo: "Answer yes, no, Enter, or q.",
62
+ equivalentCommands: "Equivalent commands:",
63
+ yesNoSuffix: (defaultValue) => defaultValue ? "Y/n" : "y/N",
64
+ turnsValidationLabel: "The number of responses"
65
+ }
66
+ };
@@ -0,0 +1,14 @@
1
+ export const orchestratorMessages = {
2
+ fr: {
3
+ agreementStopReason: "Accord clair detecte apres un tour complet.",
4
+ earlyStop: (reason) => `Arret anticipe: ${reason}`,
5
+ ollamaNoContext: (agentNames) => `${agentNames} ne lit pas le filesystem. Ajoute --files ou --context pour fournir un contexte projet.`,
6
+ unknownSummaryAgent: (agentName) => `Agent de synthese inconnu: ${agentName}`
7
+ },
8
+ en: {
9
+ agreementStopReason: "Clear agreement detected after a complete round.",
10
+ earlyStop: (reason) => `Early stop: ${reason}`,
11
+ ollamaNoContext: (agentNames) => `${agentNames} cannot read the filesystem. Add --files or --context to provide project context.`,
12
+ unknownSummaryAgent: (agentName) => `Unknown summary agent: ${agentName}`
13
+ }
14
+ };
@@ -0,0 +1,64 @@
1
+ export const outputMessages = {
2
+ fr: {
3
+ title: "# PALABRE Debate",
4
+ contextTitle: "## Contexte",
5
+ exchangesTitle: "## Echanges",
6
+ finalSummaryTitle: "## Synthese finale",
7
+ tableField: "Champ",
8
+ tableValue: "Valeur",
9
+ summaryMissing: "_Synthese finale demandee mais non disponible._",
10
+ summaryDisabled: "_Synthese desactivee._",
11
+ noFileContext: "Aucun contexte fichier injecte.",
12
+ fileSizeUnit: "bytes",
13
+ yes: "oui",
14
+ no: "non",
15
+ disabled: "desactivee",
16
+ fields: {
17
+ subject: "Sujet",
18
+ agents: "Agents",
19
+ autoPullOllama: "Auto-pull Ollama",
20
+ summary: "Synthese",
21
+ requestedTurns: "Tours demandes",
22
+ playedTurns: "Tours joues",
23
+ earlyStop: "Arret anticipe",
24
+ localDate: "Date locale",
25
+ timeZone: "Fuseau horaire",
26
+ cwd: "Dossier courant",
27
+ sessionStartedAt: "Session demarree a",
28
+ agent: "Agent",
29
+ role: "Role",
30
+ date: "Date"
31
+ }
32
+ },
33
+ en: {
34
+ title: "# PALABRE Debate",
35
+ contextTitle: "## Context",
36
+ exchangesTitle: "## Exchanges",
37
+ finalSummaryTitle: "## Final summary",
38
+ tableField: "Field",
39
+ tableValue: "Value",
40
+ summaryMissing: "_Final summary requested but unavailable._",
41
+ summaryDisabled: "_Summary disabled._",
42
+ noFileContext: "No file context injected.",
43
+ fileSizeUnit: "bytes",
44
+ yes: "yes",
45
+ no: "no",
46
+ disabled: "disabled",
47
+ fields: {
48
+ subject: "Subject",
49
+ agents: "Agents",
50
+ autoPullOllama: "Ollama auto-pull",
51
+ summary: "Summary",
52
+ requestedTurns: "Requested turns",
53
+ playedTurns: "Played turns",
54
+ earlyStop: "Early stop",
55
+ localDate: "Local date",
56
+ timeZone: "Time zone",
57
+ cwd: "Current directory",
58
+ sessionStartedAt: "Session started at",
59
+ agent: "Agent",
60
+ role: "Role",
61
+ date: "Date"
62
+ }
63
+ }
64
+ };
@@ -0,0 +1,26 @@
1
+ export const presetsMessages = {
2
+ fr: {
3
+ unknown: (name, available) => `Preset inconnu: ${name}. Presets disponibles: ${available}`,
4
+ title: "Presets disponibles:",
5
+ available: "disponible",
6
+ unavailable: (reasons) => `indisponible (${reasons})`,
7
+ total: (count) => `Total : ${count} preset(s). Utilise --json pour une sortie machine-readable.`,
8
+ missingAgent: (agentName) => `agent absent de la config: ${agentName}`,
9
+ ollamaUnreachable: (agentName) => `Ollama non joignable pour ${agentName}`,
10
+ ollamaNotDetected: (agentName) => `Ollama non détecté pour ${agentName}`,
11
+ missingOllamaModel: (agentName, model) => `modèle Ollama absent pour ${agentName}: ${model}`,
12
+ missingCommand: (agentName, command) => `commande non détectée pour ${agentName}: ${command}`
13
+ },
14
+ en: {
15
+ unknown: (name, available) => `Unknown preset: ${name}. Available presets: ${available}`,
16
+ title: "Available presets:",
17
+ available: "available",
18
+ unavailable: (reasons) => `unavailable (${reasons})`,
19
+ total: (count) => `Total: ${count} preset(s). Use --json for machine-readable output.`,
20
+ missingAgent: (agentName) => `agent missing from config: ${agentName}`,
21
+ ollamaUnreachable: (agentName) => `Ollama unreachable for ${agentName}`,
22
+ ollamaNotDetected: (agentName) => `Ollama not detected for ${agentName}`,
23
+ missingOllamaModel: (agentName, model) => `missing Ollama model for ${agentName}: ${model}`,
24
+ missingCommand: (agentName, command) => `command not detected for ${agentName}: ${command}`
25
+ }
26
+ };
@@ -0,0 +1,22 @@
1
+ export const previewMessages = {
2
+ fr: {
3
+ title: "# Aperçu du prompt",
4
+ agent: (name, role) => `Agent: ${name} (${role})`,
5
+ peer: (name) => `Pair: ${name}`,
6
+ pullModels: (enabled) => `Télécharger les modèles Ollama manquants: ${enabled ? "oui" : "non"}`,
7
+ summary: (value) => `Synthèse: ${value}`,
8
+ disabled: "désactivée",
9
+ interfaceLanguage: (language) => `Langue: ${language}`,
10
+ note: "Note: seuls les prompts du premier tour sont exacts sans exécuter les agents. Les tours suivants incluent le transcript réel."
11
+ },
12
+ en: {
13
+ title: "# Prompt preview",
14
+ agent: (name, role) => `Agent: ${name} (${role})`,
15
+ peer: (name) => `Peer: ${name}`,
16
+ pullModels: (enabled) => `Pull missing Ollama models: ${enabled ? "yes" : "no"}`,
17
+ summary: (value) => `Summary: ${value}`,
18
+ disabled: "disabled",
19
+ interfaceLanguage: (language) => `Language: ${language}`,
20
+ note: "Note: only first-turn prompts are exact without running agents. Later turns include the real transcript."
21
+ }
22
+ };
@@ -0,0 +1,102 @@
1
+ const frRoleInstructions = {
2
+ implementer: "Consigne de role: propose une solution concrete, executable et sobrement justifiee.",
3
+ reviewer: "Consigne de role: cherche les risques, regressions, angles morts et tests manquants.",
4
+ architect: "Consigne de role: structure les options techniques, compromis et frontieres du systeme.",
5
+ scout: "Consigne de role: explore rapidement le terrain, releve les pistes utiles et les inconnues.",
6
+ critic: "Consigne de role: challenge les hypotheses, pointe les faiblesses et demande les preuves utiles.",
7
+ summarizer: "Consigne de role: synthetise fidelement le transcript sans ajouter de nouvelles hypotheses non signalees."
8
+ };
9
+ const enRoleInstructions = {
10
+ implementer: "Role instruction: propose a concrete, executable solution with concise justification.",
11
+ reviewer: "Role instruction: look for risks, regressions, blind spots, and missing tests.",
12
+ architect: "Role instruction: structure technical options, trade-offs, and system boundaries.",
13
+ scout: "Role instruction: quickly explore the terrain, useful leads, and unknowns.",
14
+ critic: "Role instruction: challenge assumptions, point out weaknesses, and ask for useful evidence.",
15
+ summarizer: "Role instruction: faithfully summarize the transcript without adding new unstated assumptions."
16
+ };
17
+ export const promptMessages = {
18
+ fr: {
19
+ subject: (topic) => `Sujet: ${topic}`,
20
+ debateIntro: (selfName, turn) => `Tu es ${selfName}. Tu reponds au tour ${turn}.`,
21
+ summaryIntro: (selfName) => `Tu es ${selfName}. Tu produis la synthese finale du debat.`,
22
+ peer: (peerName) => `Ton interlocuteur est ${peerName}.`,
23
+ role: (selfName, role) => `Role de ${selfName}: ${role}.`,
24
+ roleInstruction: (role) => frRoleInstructions[role],
25
+ sessionTitle: "Contexte de session PALABRE:",
26
+ sessionSource: "- Source: fourni par PALABRE et visible par tous les agents de ce debat.",
27
+ localDate: (value) => `- Date locale: ${value}`,
28
+ timeZone: (value) => `- Fuseau horaire: ${value}`,
29
+ cwd: (value) => `- Dossier courant: ${value}`,
30
+ sessionStartedAt: (value) => `- Session demarree a: ${value}`,
31
+ turnProgress: (turn, totalTurns) => `- Tour courant: ${turn}/${totalTurns}`,
32
+ objectiveTitle: "Objectif:",
33
+ debateObjectives: [
34
+ "- Apporte une reponse utile, concrete et courte.",
35
+ "- Reagis aux arguments precedents au lieu de repartir de zero.",
36
+ "- Signale les incertitudes ou les points a trancher.",
37
+ "- Respecte ton role sans ignorer les faits du transcript."
38
+ ],
39
+ summaryObjectives: [
40
+ "- Resume le consensus en points concrets.",
41
+ "- Liste les desaccords ou incertitudes qui restent.",
42
+ "- Propose les prochaines actions techniques.",
43
+ "- Termine par une conclusion courte en prose, bien ecrite, qui explique rapidement ce qu'il faut retenir.",
44
+ "- Reste concis et exploitable."
45
+ ],
46
+ fileContextTitle: "Contexte fichiers:",
47
+ historyTitle: "Historique:",
48
+ emptyHistory: "Historique: aucun message pour le moment.",
49
+ answerTitle: "Ta reponse:",
50
+ transcriptTitle: "Transcript du debat:",
51
+ noMessage: "Aucun message.",
52
+ expectedFormatTitle: "Format attendu:",
53
+ consensusHeading: "### Consensus",
54
+ disagreementsHeading: "### Desaccords / incertitudes",
55
+ actionsHeading: "### Actions proposees",
56
+ conclusionHeading: "### Conclusion",
57
+ finalProseInstruction: "Un court paragraphe de synthese en prose, sans liste, qui resume le sens general du debat et la decision ou direction la plus raisonnable.",
58
+ summaryAnswerTitle: "Synthese:"
59
+ },
60
+ en: {
61
+ subject: (topic) => `Subject: ${topic}`,
62
+ debateIntro: (selfName, turn) => `You are ${selfName}. You are answering turn ${turn}.`,
63
+ summaryIntro: (selfName) => `You are ${selfName}. You are producing the final debate summary.`,
64
+ peer: (peerName) => `Your counterpart is ${peerName}.`,
65
+ role: (selfName, role) => `${selfName}'s role: ${role}.`,
66
+ roleInstruction: (role) => enRoleInstructions[role],
67
+ sessionTitle: "PALABRE session context:",
68
+ sessionSource: "- Source: provided by PALABRE and visible to all agents in this debate.",
69
+ localDate: (value) => `- Local date: ${value}`,
70
+ timeZone: (value) => `- Time zone: ${value}`,
71
+ cwd: (value) => `- Current directory: ${value}`,
72
+ sessionStartedAt: (value) => `- Session started at: ${value}`,
73
+ turnProgress: (turn, totalTurns) => `- Current turn: ${turn}/${totalTurns}`,
74
+ objectiveTitle: "Objective:",
75
+ debateObjectives: [
76
+ "- Provide a useful, concrete, and concise answer.",
77
+ "- Respond to previous arguments instead of starting over.",
78
+ "- Call out uncertainties or points that still need a decision.",
79
+ "- Respect your role without ignoring facts from the transcript."
80
+ ],
81
+ summaryObjectives: [
82
+ "- Summarize the consensus into concrete points.",
83
+ "- List remaining disagreements or uncertainties.",
84
+ "- Propose the next technical actions.",
85
+ "- End with a short, well-written prose conclusion that explains what to retain.",
86
+ "- Stay concise and actionable."
87
+ ],
88
+ fileContextTitle: "File context:",
89
+ historyTitle: "History:",
90
+ emptyHistory: "History: no message yet.",
91
+ answerTitle: "Your answer:",
92
+ transcriptTitle: "Debate transcript:",
93
+ noMessage: "No message.",
94
+ expectedFormatTitle: "Expected format:",
95
+ consensusHeading: "### Consensus",
96
+ disagreementsHeading: "### Disagreements / uncertainties",
97
+ actionsHeading: "### Proposed actions",
98
+ conclusionHeading: "### Conclusion",
99
+ finalProseInstruction: "A short prose summary paragraph, without a list, that captures the general meaning of the debate and the most reasonable decision or direction.",
100
+ summaryAnswerTitle: "Summary:"
101
+ }
102
+ };