palabre 0.8.0 → 0.8.1
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/README.md +13 -15
- package/dist/adapters/cli-pty.js +1 -1
- package/dist/adapters/cli.js +33 -3
- package/dist/adapters/ollama.js +1 -1
- package/dist/agentRegistry.js +1 -2
- package/dist/args.js +4 -2
- package/dist/config.js +25 -25
- package/dist/context.js +5 -1
- package/dist/discovery.js +1 -3
- package/dist/doctor.js +0 -1
- package/dist/history.js +85 -0
- package/dist/index.js +346 -179
- package/dist/messages/config.js +2 -0
- package/dist/messages/help.js +58 -8
- package/dist/messages/init.js +2 -2
- package/dist/messages/tui.js +64 -28
- package/dist/orchestrator.js +12 -4
- package/dist/presets.js +0 -48
- package/dist/renderers/tui.js +196 -73
- package/dist/tuiState.js +31 -0
- package/package.json +1 -1
- package/palabre.config.example.json +0 -17
package/dist/messages/config.js
CHANGED
|
@@ -3,6 +3,7 @@ export const configMessages = {
|
|
|
3
3
|
createdForConfig: (path) => `${path} créé. Édite la config puis relance palabre config.`,
|
|
4
4
|
syncNoMissing: (path) => `Aucun agent détecté manquant dans ${path}.`,
|
|
5
5
|
syncAdded: (path, agents) => `Agents ajoutés dans ${path}: ${agents}.`,
|
|
6
|
+
syncRefreshed: (path) => `Agents détectés rafraîchis dans ${path}.`,
|
|
6
7
|
ollamaModelNoChange: (path, model) => `Modèle Ollama inchangé dans ${path}: ${model ?? "aucun"}.`,
|
|
7
8
|
ollamaModelUpdated: (path, previousModel, nextModel) => `Modèle Ollama mis à jour dans ${path}: ${previousModel} -> ${nextModel}.`,
|
|
8
9
|
ollamaModelUnavailable: (model) => `Modèle Ollama non installé: ${model}. Action: choisis un modèle installé ou lance \`ollama pull ${model}\`.`,
|
|
@@ -56,6 +57,7 @@ export const configMessages = {
|
|
|
56
57
|
createdForConfig: (path) => `${path} created. Edit the config, then run palabre config again.`,
|
|
57
58
|
syncNoMissing: (path) => `No missing detected agent in ${path}.`,
|
|
58
59
|
syncAdded: (path, agents) => `Agents added to ${path}: ${agents}.`,
|
|
60
|
+
syncRefreshed: (path) => `Detected agents refreshed in ${path}.`,
|
|
59
61
|
ollamaModelNoChange: (path, model) => `Ollama model unchanged in ${path}: ${model ?? "none"}.`,
|
|
60
62
|
ollamaModelUpdated: (path, previousModel, nextModel) => `Ollama model updated in ${path}: ${previousModel} -> ${nextModel}.`,
|
|
61
63
|
ollamaModelUnavailable: (model) => `Ollama model is not installed: ${model}. Action: choose an installed model or run \`ollama pull ${model}\`.`,
|
package/dist/messages/help.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
const frCommandHelp = {
|
|
2
2
|
init: `
|
|
3
|
-
Initialise une configuration Palabre.
|
|
3
|
+
Initialise explicitement une configuration Palabre.
|
|
4
|
+
|
|
5
|
+
Note:
|
|
6
|
+
palabre sans argument cree deja la configuration globale au premier lancement TUI.
|
|
4
7
|
|
|
5
8
|
Usage:
|
|
6
9
|
palabre init [flags]
|
|
@@ -26,6 +29,28 @@ Liste les presets de paires d'agents.
|
|
|
26
29
|
Usage:
|
|
27
30
|
palabre presets [flags]
|
|
28
31
|
|
|
32
|
+
Flags:
|
|
33
|
+
--json sortie structuree pour integrations
|
|
34
|
+
--config <path> chemin de config explicite
|
|
35
|
+
`,
|
|
36
|
+
history: `
|
|
37
|
+
Liste les derniers exports Palabre.
|
|
38
|
+
|
|
39
|
+
Usage:
|
|
40
|
+
palabre history [flags]
|
|
41
|
+
palabre historique [flags]
|
|
42
|
+
|
|
43
|
+
Flags:
|
|
44
|
+
--json sortie structuree pour integrations
|
|
45
|
+
--config <path> chemin de config explicite
|
|
46
|
+
`,
|
|
47
|
+
historique: `
|
|
48
|
+
Liste les derniers exports Palabre.
|
|
49
|
+
|
|
50
|
+
Usage:
|
|
51
|
+
palabre history [flags]
|
|
52
|
+
palabre historique [flags]
|
|
53
|
+
|
|
29
54
|
Flags:
|
|
30
55
|
--json sortie structuree pour integrations
|
|
31
56
|
--config <path> chemin de config explicite
|
|
@@ -56,7 +81,7 @@ Usage:
|
|
|
56
81
|
|
|
57
82
|
Flags:
|
|
58
83
|
--clear-defaults supprime les parametres par defaut
|
|
59
|
-
--sync-agents ajoute les agents detectes manquants
|
|
84
|
+
--sync-agents ajoute les agents detectes manquants et rafraichit les commandes connues
|
|
60
85
|
--config <path> chemin de config explicite
|
|
61
86
|
`,
|
|
62
87
|
new: `
|
|
@@ -127,7 +152,10 @@ Flags:
|
|
|
127
152
|
};
|
|
128
153
|
const enCommandHelp = {
|
|
129
154
|
init: `
|
|
130
|
-
|
|
155
|
+
Explicitly initializes a Palabre configuration.
|
|
156
|
+
|
|
157
|
+
Note:
|
|
158
|
+
palabre without arguments already creates the global configuration on first TUI launch.
|
|
131
159
|
|
|
132
160
|
Usage:
|
|
133
161
|
palabre init [flags]
|
|
@@ -153,6 +181,28 @@ Lists agent-pair presets.
|
|
|
153
181
|
Usage:
|
|
154
182
|
palabre presets [flags]
|
|
155
183
|
|
|
184
|
+
Flags:
|
|
185
|
+
--json structured output for integrations
|
|
186
|
+
--config <path> explicit config path
|
|
187
|
+
`,
|
|
188
|
+
history: `
|
|
189
|
+
Lists recent Palabre exports.
|
|
190
|
+
|
|
191
|
+
Usage:
|
|
192
|
+
palabre history [flags]
|
|
193
|
+
palabre historique [flags]
|
|
194
|
+
|
|
195
|
+
Flags:
|
|
196
|
+
--json structured output for integrations
|
|
197
|
+
--config <path> explicit config path
|
|
198
|
+
`,
|
|
199
|
+
historique: `
|
|
200
|
+
Lists recent Palabre exports.
|
|
201
|
+
|
|
202
|
+
Usage:
|
|
203
|
+
palabre history [flags]
|
|
204
|
+
palabre historique [flags]
|
|
205
|
+
|
|
156
206
|
Flags:
|
|
157
207
|
--json structured output for integrations
|
|
158
208
|
--config <path> explicit config path
|
|
@@ -183,7 +233,7 @@ Usage:
|
|
|
183
233
|
|
|
184
234
|
Flags:
|
|
185
235
|
--clear-defaults clears default settings
|
|
186
|
-
--sync-agents adds missing detected agents
|
|
236
|
+
--sync-agents adds missing detected agents and refreshes known commands
|
|
187
237
|
--config <path> explicit config path
|
|
188
238
|
`,
|
|
189
239
|
new: `
|
|
@@ -268,18 +318,18 @@ Usage:
|
|
|
268
318
|
palabre ask "Sujet" --agents codex claude
|
|
269
319
|
|
|
270
320
|
Demarrage rapide:
|
|
271
|
-
palabre init
|
|
272
321
|
palabre
|
|
273
322
|
palabre new
|
|
274
323
|
palabre "Faut-il ajouter une TUI a Palabre ?"
|
|
275
324
|
palabre codex-claude "Comparer deux solutions" -t 4
|
|
276
325
|
|
|
277
326
|
Commandes:
|
|
278
|
-
init Creer une configuration
|
|
327
|
+
init Creer explicitement une configuration
|
|
279
328
|
new Assistant interactif de debat
|
|
280
329
|
ask Demande multi-agents independante
|
|
281
330
|
agents Lister les agents configures
|
|
282
331
|
presets Lister les presets disponibles
|
|
332
|
+
history Lister les derniers exports
|
|
283
333
|
context Scanner le contexte projet
|
|
284
334
|
config Modifier les parametres par defaut
|
|
285
335
|
doctor Verifier la config et les outils locaux
|
|
@@ -319,18 +369,18 @@ Usage:
|
|
|
319
369
|
palabre ask "Subject" --agents codex claude
|
|
320
370
|
|
|
321
371
|
Quick start:
|
|
322
|
-
palabre init
|
|
323
372
|
palabre
|
|
324
373
|
palabre new
|
|
325
374
|
palabre "Should Palabre add a TUI?"
|
|
326
375
|
palabre codex-claude "Compare two solutions" -t 4
|
|
327
376
|
|
|
328
377
|
Commands:
|
|
329
|
-
init
|
|
378
|
+
init Explicitly create a configuration
|
|
330
379
|
new Interactive debate assistant
|
|
331
380
|
ask Independent multi-agent request
|
|
332
381
|
agents List configured agents
|
|
333
382
|
presets List available presets
|
|
383
|
+
history List recent exports
|
|
334
384
|
context Scan project context
|
|
335
385
|
config Edit default settings
|
|
336
386
|
doctor Check config and local tools
|
package/dist/messages/init.js
CHANGED
|
@@ -10,7 +10,7 @@ export const initMessages = {
|
|
|
10
10
|
ollamaMissing: "non détecté",
|
|
11
11
|
ollamaDetected: (modelCount) => `détectée (${modelCount} modèle${modelCount > 1 ? "s" : ""})`,
|
|
12
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,
|
|
13
|
+
noDefaultPair: (detectedAgents) => `Défauts: ${detectedAgents}. Palabre a besoin d'au moins deux agents.\nAgents compatibles: Codex CLI, Claude CLI, Antigravity CLI, OpenCode CLI, Mistral Vibe CLI, Ollama local.\nGuide: https://palab.re/fr/agents/overview`,
|
|
14
14
|
languageHint: (language) => `Langue: ${language}\nEnglish > palabre config --language en`
|
|
15
15
|
},
|
|
16
16
|
en: {
|
|
@@ -24,7 +24,7 @@ export const initMessages = {
|
|
|
24
24
|
ollamaMissing: "not detected",
|
|
25
25
|
ollamaDetected: (modelCount) => `detected (${modelCount} model${modelCount > 1 ? "s" : ""})`,
|
|
26
26
|
defaults: (agentA, agentB) => `Defaults: ${agentA} <-> ${agentB}`,
|
|
27
|
-
noDefaultPair: (detectedAgents) => `Defaults: ${detectedAgents}. Palabre needs at least two agents.\nCompatible agents: Codex CLI, Claude CLI,
|
|
27
|
+
noDefaultPair: (detectedAgents) => `Defaults: ${detectedAgents}. Palabre needs at least two agents.\nCompatible agents: Codex CLI, Claude CLI, Antigravity CLI, OpenCode CLI, Mistral Vibe CLI, local Ollama.\nGuide: https://palab.re/en/agents/overview`,
|
|
28
28
|
languageHint: (language) => `Language: ${language}\nFrançais > palabre config --language fr`
|
|
29
29
|
}
|
|
30
30
|
};
|
package/dist/messages/tui.js
CHANGED
|
@@ -7,7 +7,8 @@ export const tuiMessages = {
|
|
|
7
7
|
lastAskAgent: "dernier agent ask",
|
|
8
8
|
roles: "Roles",
|
|
9
9
|
summary: "Synthese",
|
|
10
|
-
|
|
10
|
+
ollamaModel: "Modele Ollama",
|
|
11
|
+
responses: "Tours",
|
|
11
12
|
folder: "Dossier",
|
|
12
13
|
docs: "Docs",
|
|
13
14
|
commands: "commandes",
|
|
@@ -15,15 +16,24 @@ export const tuiMessages = {
|
|
|
15
16
|
changeMode: "changer de mode",
|
|
16
17
|
tipContext: "* Tip Ajoute du contexte avec --context <dossier> ou --files <fichier>.",
|
|
17
18
|
helpTitle: "Commandes TUI",
|
|
18
|
-
helpAsk: "
|
|
19
|
-
helpDebate: "
|
|
20
|
-
helpAgents: "
|
|
21
|
-
helpRoles: "
|
|
22
|
-
helpConfig: "
|
|
23
|
-
helpNew: "
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
helpAsk: "mode Ask",
|
|
20
|
+
helpDebate: "mode Debat",
|
|
21
|
+
helpAgents: "choisir les agents",
|
|
22
|
+
helpRoles: "choisir les roles",
|
|
23
|
+
helpConfig: "reglages",
|
|
24
|
+
helpNew: "assistant guide",
|
|
25
|
+
helpRetry: "relancer la derniere session",
|
|
26
|
+
helpHistory: "voir les derniers exports",
|
|
27
|
+
helpHelp: "aide",
|
|
28
|
+
helpQuit: "quitter",
|
|
29
|
+
helpFallback: "Tape un sujet ou une commande.",
|
|
30
|
+
historyTitle: "Historique Palabre",
|
|
31
|
+
historyEmpty: "Aucun export trouve pour le moment.",
|
|
32
|
+
historyOpenHint: "Le chemin du fichier est cliquable dans les terminaux compatibles.",
|
|
33
|
+
historyFile: "Fichier",
|
|
34
|
+
historyMode: (mode) => mode === "ask" ? "Mode ask" : "Mode debat",
|
|
35
|
+
historyCount: (mode) => mode === "ask" ? "Reponses" : "Tours",
|
|
36
|
+
retryUnavailable: "Aucune session a relancer pour le moment.",
|
|
27
37
|
agentsTitle: "Agents Palabre",
|
|
28
38
|
activeMode: "Mode actif",
|
|
29
39
|
activeAgents: "Agents actifs",
|
|
@@ -46,8 +56,7 @@ export const tuiMessages = {
|
|
|
46
56
|
availableCommands: "Commandes disponibles",
|
|
47
57
|
noConfiguredAgents: "aucun agent configure",
|
|
48
58
|
or: "ou",
|
|
49
|
-
|
|
50
|
-
modeConfigCommand: "changer de mode de configuration",
|
|
59
|
+
modeConfigCommand: "basculer et definir par defaut",
|
|
51
60
|
backCommand: "revenir a l'accueil",
|
|
52
61
|
quitCommand: "quitter",
|
|
53
62
|
subject: "Sujet",
|
|
@@ -55,6 +64,7 @@ export const tuiMessages = {
|
|
|
55
64
|
agentsPrompt: "Agents",
|
|
56
65
|
rolesPrompt: "Roles",
|
|
57
66
|
sessionDone: "Session terminee",
|
|
67
|
+
sessionHistoryHint: "Retrouvez vos exports avec /history.",
|
|
58
68
|
askResponse: (response, totalResponses) => `reponse ${response}/${totalResponses}`,
|
|
59
69
|
turnLabel: (turn) => `tour ${turn}`,
|
|
60
70
|
planTitle: "Plan de session",
|
|
@@ -64,9 +74,15 @@ export const tuiMessages = {
|
|
|
64
74
|
planSummaryDisabled: "Synthese desactivee",
|
|
65
75
|
planExport: "Export Markdown",
|
|
66
76
|
ptyNotice: (agents) => `Note: ${agents} utilise un pseudo-terminal; une fenetre peut apparaitre brievement.`,
|
|
67
|
-
unknownCommand: "Commande inconnue. Utilise /
|
|
68
|
-
turnsUsage: "Usage: /turns <
|
|
77
|
+
unknownCommand: "Commande inconnue. Utilise /home pour revenir.",
|
|
78
|
+
turnsUsage: "Usage: /turns <tours>",
|
|
69
79
|
summaryUsage: "Usage: /summary <agent|none>",
|
|
80
|
+
ollamaModelUsage: "Usage: /ollama-model <modele>",
|
|
81
|
+
interfaceUsage: "Usage: /interface <tui|terminal>",
|
|
82
|
+
languageUsage: "Usage: /language <fr|en>",
|
|
83
|
+
rolesUsage: "Usage: /roles <role...>",
|
|
84
|
+
ollamaInfoCommand: "afficher modeles installes",
|
|
85
|
+
ollamaSyncCommand: "choisir un modele installe disponible",
|
|
70
86
|
interfaceDefault: (value) => `Interface par defaut: ${value}.`,
|
|
71
87
|
languageUpdated: (value) => `Langue mise a jour: ${value}.`,
|
|
72
88
|
askConfigMode: "Configuration Ask.",
|
|
@@ -81,6 +97,8 @@ export const tuiMessages = {
|
|
|
81
97
|
debateSummaryFallback: "Synthese Debat revenue au fallback.",
|
|
82
98
|
askSummaryAgent: (value) => `Synthese Ask: ${value}.`,
|
|
83
99
|
debateSummaryAgent: (value) => `Synthese Debat: ${value}.`,
|
|
100
|
+
ollamaInfo: (current, installed, api) => `Ollama ${api}. Modele actuel: ${current}. Modeles installes: ${installed}.`,
|
|
101
|
+
ollamaUnavailable: (baseUrl) => `API Ollama indisponible (${baseUrl}). Lance ollama serve puis reessaie /ollama.`,
|
|
84
102
|
askAgentsUpdated: (value) => `Agents Ask mis a jour: ${value}.`,
|
|
85
103
|
debateAgentsUpdated: (value) => `Agents Debat mis a jour: ${value}.`,
|
|
86
104
|
askRolesUpdated: (value) => `Roles Ask mis a jour: ${value}.`,
|
|
@@ -102,7 +120,8 @@ export const tuiMessages = {
|
|
|
102
120
|
lastAskAgent: "last ask agent",
|
|
103
121
|
roles: "Roles",
|
|
104
122
|
summary: "Summary",
|
|
105
|
-
|
|
123
|
+
ollamaModel: "Ollama model",
|
|
124
|
+
responses: "Turns",
|
|
106
125
|
folder: "Folder",
|
|
107
126
|
docs: "Docs",
|
|
108
127
|
commands: "commands",
|
|
@@ -110,15 +129,24 @@ export const tuiMessages = {
|
|
|
110
129
|
changeMode: "change mode",
|
|
111
130
|
tipContext: "* Tip Add context with --context <folder> or --files <file>.",
|
|
112
131
|
helpTitle: "TUI Commands",
|
|
113
|
-
helpAsk: "
|
|
114
|
-
helpDebate: "
|
|
115
|
-
helpAgents: "
|
|
116
|
-
helpRoles: "
|
|
117
|
-
helpConfig: "
|
|
118
|
-
helpNew: "
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
132
|
+
helpAsk: "Ask mode",
|
|
133
|
+
helpDebate: "Debate mode",
|
|
134
|
+
helpAgents: "choose agents",
|
|
135
|
+
helpRoles: "choose roles",
|
|
136
|
+
helpConfig: "settings",
|
|
137
|
+
helpNew: "guided assistant",
|
|
138
|
+
helpRetry: "rerun the last session",
|
|
139
|
+
helpHistory: "show recent exports",
|
|
140
|
+
helpHelp: "help",
|
|
141
|
+
helpQuit: "quit",
|
|
142
|
+
helpFallback: "Type a topic or a command.",
|
|
143
|
+
historyTitle: "Palabre History",
|
|
144
|
+
historyEmpty: "No export found yet.",
|
|
145
|
+
historyOpenHint: "The file path is clickable in compatible terminals.",
|
|
146
|
+
historyFile: "File",
|
|
147
|
+
historyMode: (mode) => mode === "ask" ? "Ask mode" : "Debate mode",
|
|
148
|
+
historyCount: (mode) => mode === "ask" ? "Responses" : "Turns",
|
|
149
|
+
retryUnavailable: "No session to retry yet.",
|
|
122
150
|
agentsTitle: "Palabre Agents",
|
|
123
151
|
activeMode: "Active mode",
|
|
124
152
|
activeAgents: "Active agents",
|
|
@@ -141,8 +169,7 @@ export const tuiMessages = {
|
|
|
141
169
|
availableCommands: "Available commands",
|
|
142
170
|
noConfiguredAgents: "no configured agent",
|
|
143
171
|
or: "or",
|
|
144
|
-
|
|
145
|
-
modeConfigCommand: "change configuration mode",
|
|
172
|
+
modeConfigCommand: "switch and set as default",
|
|
146
173
|
backCommand: "return to home",
|
|
147
174
|
quitCommand: "quit",
|
|
148
175
|
subject: "Subject",
|
|
@@ -150,6 +177,7 @@ export const tuiMessages = {
|
|
|
150
177
|
agentsPrompt: "Agents",
|
|
151
178
|
rolesPrompt: "Roles",
|
|
152
179
|
sessionDone: "Session complete",
|
|
180
|
+
sessionHistoryHint: "Find your exports again with /history.",
|
|
153
181
|
askResponse: (response, totalResponses) => `response ${response}/${totalResponses}`,
|
|
154
182
|
turnLabel: (turn) => `turn ${turn}`,
|
|
155
183
|
planTitle: "Session plan",
|
|
@@ -159,9 +187,15 @@ export const tuiMessages = {
|
|
|
159
187
|
planSummaryDisabled: "Summary disabled",
|
|
160
188
|
planExport: "Markdown export",
|
|
161
189
|
ptyNotice: (agents) => `Note: ${agents} uses a pseudo-terminal; a window may briefly appear.`,
|
|
162
|
-
unknownCommand: "Unknown command. Use /
|
|
163
|
-
turnsUsage: "Usage: /turns <
|
|
190
|
+
unknownCommand: "Unknown command. Use /home to return.",
|
|
191
|
+
turnsUsage: "Usage: /turns <turns>",
|
|
164
192
|
summaryUsage: "Usage: /summary <agent|none>",
|
|
193
|
+
ollamaModelUsage: "Usage: /ollama-model <model>",
|
|
194
|
+
interfaceUsage: "Usage: /interface <tui|terminal>",
|
|
195
|
+
languageUsage: "Usage: /language <fr|en>",
|
|
196
|
+
rolesUsage: "Usage: /roles <role...>",
|
|
197
|
+
ollamaInfoCommand: "show installed models",
|
|
198
|
+
ollamaSyncCommand: "choose an available installed model",
|
|
165
199
|
interfaceDefault: (value) => `Default interface: ${value}.`,
|
|
166
200
|
languageUpdated: (value) => `Language updated: ${value}.`,
|
|
167
201
|
askConfigMode: "Ask configuration.",
|
|
@@ -176,6 +210,8 @@ export const tuiMessages = {
|
|
|
176
210
|
debateSummaryFallback: "Debate summary returned to fallback.",
|
|
177
211
|
askSummaryAgent: (value) => `Ask summary: ${value}.`,
|
|
178
212
|
debateSummaryAgent: (value) => `Debate summary: ${value}.`,
|
|
213
|
+
ollamaInfo: (current, installed, api) => `Ollama ${api}. Current model: ${current}. Installed models: ${installed}.`,
|
|
214
|
+
ollamaUnavailable: (baseUrl) => `Ollama API unavailable (${baseUrl}). Run ollama serve, then try /ollama again.`,
|
|
179
215
|
askAgentsUpdated: (value) => `Ask agents updated: ${value}.`,
|
|
180
216
|
debateAgentsUpdated: (value) => `Debate agents updated: ${value}.`,
|
|
181
217
|
askRolesUpdated: (value) => `Ask roles updated: ${value}.`,
|
package/dist/orchestrator.js
CHANGED
|
@@ -106,6 +106,7 @@ export async function runDebate(config, options, renderer, messages = createTran
|
|
|
106
106
|
const cancellation = cancellationFailureIfAborted(options, messages, {
|
|
107
107
|
phase: "summary",
|
|
108
108
|
agent: resolveSummaryAgentName(options),
|
|
109
|
+
role: summaryRole(),
|
|
109
110
|
turn: transcript.length + 1
|
|
110
111
|
});
|
|
111
112
|
if (cancellation) {
|
|
@@ -123,6 +124,7 @@ export async function runDebate(config, options, renderer, messages = createTran
|
|
|
123
124
|
failure = toDebateFailure(error, {
|
|
124
125
|
phase: "summary",
|
|
125
126
|
agent: resolveSummaryAgentName(options),
|
|
127
|
+
role: summaryRole(),
|
|
126
128
|
turn: transcript.length + 1
|
|
127
129
|
});
|
|
128
130
|
renderer?.error(failure);
|
|
@@ -243,6 +245,7 @@ export async function runAsk(config, options, renderer, messages = createTransla
|
|
|
243
245
|
const cancellation = cancellationFailureIfAborted(options, messages, {
|
|
244
246
|
phase: "summary",
|
|
245
247
|
agent: summaryAgentName,
|
|
248
|
+
role: summaryRole(),
|
|
246
249
|
turn: transcript.length + 1
|
|
247
250
|
});
|
|
248
251
|
if (cancellation) {
|
|
@@ -259,6 +262,7 @@ export async function runAsk(config, options, renderer, messages = createTransla
|
|
|
259
262
|
failure = toDebateFailure(error, {
|
|
260
263
|
phase: "summary",
|
|
261
264
|
agent: resolveSummaryAgentName(options),
|
|
265
|
+
role: summaryRole(),
|
|
262
266
|
turn: transcript.length + 1
|
|
263
267
|
});
|
|
264
268
|
renderer?.error(failure);
|
|
@@ -332,15 +336,16 @@ async function generateSummary(config, options, transcript, renderer, messages =
|
|
|
332
336
|
throw new Error(messages.orchestrator.unknownSummaryAgent(summaryAgentName));
|
|
333
337
|
}
|
|
334
338
|
const summaryAgent = createAgent(summaryAgentName, summaryConfig);
|
|
335
|
-
|
|
336
|
-
renderer?.
|
|
339
|
+
const role = summaryRole();
|
|
340
|
+
renderer?.summaryStart(summaryAgent.name, role);
|
|
341
|
+
renderer?.thinkingStart(summaryAgent.name, role);
|
|
337
342
|
const response = await summaryAgent.generate({
|
|
338
343
|
topic: options.topic,
|
|
339
344
|
turn: transcript.length + 1,
|
|
340
345
|
totalTurns: options.mode === "ask" ? transcript.length : options.turns,
|
|
341
346
|
selfName: summaryAgent.name,
|
|
342
347
|
peerName: options.mode === "ask" ? "ask-responses" : "transcript",
|
|
343
|
-
selfRole:
|
|
348
|
+
selfRole: role,
|
|
344
349
|
mode: "summary",
|
|
345
350
|
language: options.language,
|
|
346
351
|
session: options.session,
|
|
@@ -350,13 +355,16 @@ async function generateSummary(config, options, transcript, renderer, messages =
|
|
|
350
355
|
}).finally(() => renderer?.thinkingEnd());
|
|
351
356
|
const summary = {
|
|
352
357
|
agent: summaryAgent.name,
|
|
353
|
-
role
|
|
358
|
+
role,
|
|
354
359
|
content: response.content,
|
|
355
360
|
createdAt: new Date().toISOString()
|
|
356
361
|
};
|
|
357
362
|
renderer?.message(summary.content);
|
|
358
363
|
return summary;
|
|
359
364
|
}
|
|
365
|
+
function summaryRole() {
|
|
366
|
+
return "summarizer";
|
|
367
|
+
}
|
|
360
368
|
function cancellationFailureIfAborted(options, messages, context) {
|
|
361
369
|
if (!options.signal?.aborted) {
|
|
362
370
|
return undefined;
|
package/dist/presets.js
CHANGED
|
@@ -56,30 +56,6 @@ const presets = {
|
|
|
56
56
|
agentA: "antigravity",
|
|
57
57
|
agentB: "claude"
|
|
58
58
|
},
|
|
59
|
-
"gemini-opencode": {
|
|
60
|
-
agentA: "gemini",
|
|
61
|
-
agentB: "opencode"
|
|
62
|
-
},
|
|
63
|
-
"opencode-gemini": {
|
|
64
|
-
agentA: "opencode",
|
|
65
|
-
agentB: "gemini"
|
|
66
|
-
},
|
|
67
|
-
"gemini-vibe": {
|
|
68
|
-
agentA: "gemini",
|
|
69
|
-
agentB: "vibe"
|
|
70
|
-
},
|
|
71
|
-
"vibe-gemini": {
|
|
72
|
-
agentA: "vibe",
|
|
73
|
-
agentB: "gemini"
|
|
74
|
-
},
|
|
75
|
-
"gemini-antigravity": {
|
|
76
|
-
agentA: "gemini",
|
|
77
|
-
agentB: "antigravity"
|
|
78
|
-
},
|
|
79
|
-
"antigravity-gemini": {
|
|
80
|
-
agentA: "antigravity",
|
|
81
|
-
agentB: "gemini"
|
|
82
|
-
},
|
|
83
59
|
"opencode-antigravity": {
|
|
84
60
|
agentA: "opencode",
|
|
85
61
|
agentB: "antigravity"
|
|
@@ -136,14 +112,6 @@ const presets = {
|
|
|
136
112
|
agentA: "ollama-local",
|
|
137
113
|
agentB: "claude"
|
|
138
114
|
},
|
|
139
|
-
"gemini-ollama": {
|
|
140
|
-
agentA: "gemini",
|
|
141
|
-
agentB: "ollama-local"
|
|
142
|
-
},
|
|
143
|
-
"ollama-gemini": {
|
|
144
|
-
agentA: "ollama-local",
|
|
145
|
-
agentB: "gemini"
|
|
146
|
-
},
|
|
147
115
|
"antigravity-ollama": {
|
|
148
116
|
agentA: "antigravity",
|
|
149
117
|
agentB: "ollama-local"
|
|
@@ -151,22 +119,6 @@ const presets = {
|
|
|
151
119
|
"ollama-antigravity": {
|
|
152
120
|
agentA: "ollama-local",
|
|
153
121
|
agentB: "antigravity"
|
|
154
|
-
},
|
|
155
|
-
"codex-gemini": {
|
|
156
|
-
agentA: "codex",
|
|
157
|
-
agentB: "gemini"
|
|
158
|
-
},
|
|
159
|
-
"gemini-codex": {
|
|
160
|
-
agentA: "gemini",
|
|
161
|
-
agentB: "codex"
|
|
162
|
-
},
|
|
163
|
-
"claude-gemini": {
|
|
164
|
-
agentA: "claude",
|
|
165
|
-
agentB: "gemini"
|
|
166
|
-
},
|
|
167
|
-
"gemini-claude": {
|
|
168
|
-
agentA: "gemini",
|
|
169
|
-
agentB: "claude"
|
|
170
122
|
}
|
|
171
123
|
};
|
|
172
124
|
/** Retourne la paire d'agents pour `name`. Lève une erreur avec la liste des presets disponibles si inconnu. */
|