filemayor 4.0.5 → 4.0.7

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.
@@ -133,7 +133,7 @@ async function callOpenAI(prompt, context, apiKey) {
133
133
  method: 'POST',
134
134
  headers: { 'Content-Type': 'application/json', 'Authorization': `Bearer ${apiKey}` },
135
135
  body: JSON.stringify({
136
- model: 'gpt-4o',
136
+ model: 'gpt-4o-mini',
137
137
  response_format: { type: 'json_object' },
138
138
  messages: [
139
139
  { role: 'system', content: systemPrompt },
@@ -156,7 +156,7 @@ async function callAnthropic(prompt, context, apiKey) {
156
156
  'anthropic-version': '2023-06-01'
157
157
  },
158
158
  body: JSON.stringify({
159
- model: 'claude-3-5-haiku-20241022',
159
+ model: 'claude-haiku-4-5-20251001',
160
160
  max_tokens: 1024,
161
161
  system: systemPrompt,
162
162
  messages: [{ role: 'user', content: `User request: ${prompt}\n\nFolder context: ${JSON.stringify(context)}` }]
@@ -232,6 +232,25 @@ class IntentInterpreter {
232
232
  }
233
233
  }
234
234
 
235
+ // Direct-provider responses (Gemini/OpenAI/Anthropic via callAi) follow
236
+ // the getSystemPrompt() schema: { summary, operations:[{action,from,to}] }.
237
+ // Convert that into the { source, destination, reason } move shape the
238
+ // architect + apply engine expect. The proxy path already returns moves.
239
+ if (curativePlan && Array.isArray(curativePlan.operations)) {
240
+ curativePlan = {
241
+ narrative: curativePlan.summary || '',
242
+ confidence: 80,
243
+ warnings: curativePlan.warnings || [],
244
+ plan: curativePlan.operations
245
+ .filter(op => op && (op.action === 'move' || op.action === 'rename') && op.from && op.to)
246
+ .map(op => ({
247
+ source: op.from,
248
+ destination: op.to,
249
+ reason: curativePlan.summary || 'AI suggested move',
250
+ })),
251
+ };
252
+ }
253
+
235
254
  // If the proxy returned a raw plan object rather than a full curative plan shape,
236
255
  // wrap it so downstream code always sees { narrative, plan, confidence }
237
256
  if (curativePlan && !curativePlan.plan && !curativePlan.narrative) {
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "filemayor",
3
- "version": "4.0.5",
3
+ "version": "4.0.7",
4
4
  "description": "FileMayor — Your intelligent filesystem clerk. CLI + Desktop + PWA.",
5
5
  "main": "index.js",
6
6
  "bin": {
7
7
  "filemayor": "./index.js"
8
8
  },
9
9
  "scripts": {
10
- "test": "node --test ../tests/core.test.js"
10
+ "test": "node --test ../tests/*.test.js"
11
11
  },
12
12
  "keywords": [
13
13
  "file-manager",