fleetbo-svro 1.0.51 → 1.0.52
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/fleetbo-mcp.js +17 -5
- package/package.json +1 -1
package/dist/fleetbo-mcp.js
CHANGED
|
@@ -168,7 +168,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
168
168
|
description: "Clé unique d'application déduite automatiquement sans espace ni caractères spéciaux (ex: coworking_prod)",
|
|
169
169
|
},
|
|
170
170
|
},
|
|
171
|
-
required: ["name"
|
|
171
|
+
required: ["name"],
|
|
172
172
|
},
|
|
173
173
|
},
|
|
174
174
|
{
|
|
@@ -289,10 +289,21 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
289
289
|
if (name === "fleetbo_create_project") {
|
|
290
290
|
const schema = z.object({
|
|
291
291
|
name: z.string().min(2),
|
|
292
|
-
keyApp: z.string().
|
|
292
|
+
keyApp: z.string().optional(), // <-- Optionnel ici
|
|
293
293
|
});
|
|
294
294
|
const params = schema.parse(args);
|
|
295
295
|
|
|
296
|
+
// Slugification automatique si l'agent a omis keyApp
|
|
297
|
+
const resolvedKeyApp =
|
|
298
|
+
params.keyApp?.trim() ||
|
|
299
|
+
params.name
|
|
300
|
+
.toLowerCase()
|
|
301
|
+
.normalize("NFD")
|
|
302
|
+
.replace(/[\u0300-\u036f]/g, "")
|
|
303
|
+
.replace(/[^a-z0-9]/g, "_")
|
|
304
|
+
.replace(/^_+|_+$/g, "")
|
|
305
|
+
.slice(0, 30);
|
|
306
|
+
|
|
296
307
|
const res = await fetch(`https://createprojectlight-${CLOUD_RUN_REGION}`, {
|
|
297
308
|
method: "POST",
|
|
298
309
|
headers: {
|
|
@@ -302,7 +313,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
302
313
|
body: JSON.stringify({
|
|
303
314
|
data: {
|
|
304
315
|
name: params.name,
|
|
305
|
-
keyApp:
|
|
316
|
+
keyApp: resolvedKeyApp, // Utilise la clé validée ou calculée
|
|
306
317
|
},
|
|
307
318
|
}),
|
|
308
319
|
});
|
|
@@ -316,7 +327,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
316
327
|
const resolvedId = proj.enterpriseId || proj.referenceId || proj.id;
|
|
317
328
|
|
|
318
329
|
// Commande chaînée : init + sync immédiat
|
|
319
|
-
const fullBootstrapCommand = `npx fleetbo-svro init --keyApp=${
|
|
330
|
+
const fullBootstrapCommand = `npx fleetbo-svro init --keyApp=${resolvedKeyApp} --token=${proj.bootstrapToken} && npx fleetbo-svro sync`;
|
|
320
331
|
|
|
321
332
|
return {
|
|
322
333
|
content: [
|
|
@@ -327,9 +338,10 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
327
338
|
status: "SUCCESS",
|
|
328
339
|
message: `Project "${params.name}" successfully created. Ready for bootstrap and modeling.`,
|
|
329
340
|
enterpriseID: resolvedId,
|
|
330
|
-
keyApp:
|
|
341
|
+
keyApp: resolvedKeyApp,
|
|
331
342
|
bootstrapToken: proj.bootstrapToken,
|
|
332
343
|
commandInit: fullBootstrapCommand,
|
|
344
|
+
directive: "Execute commandInit immediately in terminal shell to bootstrap local env, generate src/fleetbo.d.ts and seal Fleetbo_contract.md.",
|
|
333
345
|
nextSteps: [
|
|
334
346
|
"1. Run commandInit in your terminal to bootstrap local env, fetch initial contracts, and generate src/fleetbo.d.ts + Fleetbo_contract.md.",
|
|
335
347
|
"2. Inspect Fleetbo_contract.md and start writing UI views (.jsx/.tsx) using global Fleetbo.* and <fleetbo-*> tags directly.",
|