palabre 0.6.1 → 0.6.4

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/dist/presets.js CHANGED
@@ -1,4 +1,4 @@
1
- import path from "node:path";
1
+ import { detectionForCommand } from "./agentRegistry.js";
2
2
  const presets = {
3
3
  "codex-claude": {
4
4
  agentA: "codex",
@@ -181,7 +181,7 @@ function checkAgentAvailability(agentName, config, discovery, messages) {
181
181
  }
182
182
  return available(agentName);
183
183
  }
184
- const detection = knownCliDetection(agent, discovery);
184
+ const detection = detectionForCommand(agent.command, discovery);
185
185
  if (!detection) {
186
186
  // Les CLIs custom déclarées par l'utilisateur restent considérées utilisables :
187
187
  // Palabre ne peut pas connaître leur sémantique sans les lancer.
@@ -191,25 +191,6 @@ function checkAgentAvailability(agentName, config, discovery, messages) {
191
191
  ? available(agentName)
192
192
  : unavailable(agentName, messages?.presets.missingCommand(agentName, detection.command) ?? `commande non détectée pour ${agentName}: ${detection.command}`);
193
193
  }
194
- function knownCliDetection(agent, discovery) {
195
- const command = normalizeCommandName(agent.command);
196
- if (command === "codex")
197
- return discovery.codex;
198
- if (command === "claude")
199
- return discovery.claude;
200
- if (command === "gemini")
201
- return discovery.gemini;
202
- if (command === "agy")
203
- return discovery.antigravity;
204
- if (command === "antigravity")
205
- return discovery.antigravity;
206
- if (command === "opencode")
207
- return discovery.opencode;
208
- return undefined;
209
- }
210
- function normalizeCommandName(command) {
211
- return path.basename(command).toLowerCase().replace(/\.(exe|cmd|ps1|bat)$/i, "");
212
- }
213
194
  function available(agent) {
214
195
  return { agent, available: true, reason: "" };
215
196
  }
package/dist/prompt.js CHANGED
@@ -25,6 +25,8 @@ export function formatAgentPrompt(input) {
25
25
  messages.sessionStartedAt(input.session.startedAt),
26
26
  messages.turnProgress(input.turn, input.totalTurns),
27
27
  "",
28
+ messages.responseLanguageInstruction,
29
+ "",
28
30
  messages.objectiveTitle,
29
31
  ...messages.debateObjectives,
30
32
  "",
@@ -56,6 +58,8 @@ function formatSummaryPrompt(input, messages) {
56
58
  messages.cwd(input.session.cwd),
57
59
  messages.sessionStartedAt(input.session.startedAt),
58
60
  "",
61
+ messages.responseLanguageInstruction,
62
+ "",
59
63
  messages.objectiveTitle,
60
64
  ...messages.summaryObjectives,
61
65
  "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "palabre",
3
- "version": "0.6.1",
3
+ "version": "0.6.4",
4
4
  "description": "Orchestrateur de debat entre agents IA locaux, CLIs et Ollama.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -38,7 +38,8 @@
38
38
  "prepack": "pnpm build",
39
39
  "start": "node ./dist/index.js",
40
40
  "test": "pnpm build:test && node --test .tmp/test-dist/tests/*.test.js",
41
- "build:test": "node -e \"fs.rmSync('.tmp/test-dist',{recursive:true,force:true})\" && tsc -p tsconfig.test.json"
41
+ "build:test": "node -e \"fs.rmSync('.tmp/test-dist',{recursive:true,force:true})\" && tsc -p tsconfig.test.json",
42
+ "smoke:real-presets": "node -e \"fs.rmSync('.tmp/smoke-real',{recursive:true,force:true})\" && tsc --target ES2022 --module NodeNext --moduleResolution NodeNext --types node --outDir .tmp/smoke-real scripts/smoke_real_presets.ts && node .tmp/smoke-real/smoke_real_presets.js"
42
43
  },
43
44
  "engines": {
44
45
  "node": ">=20"