alora-mcp 0.8.0 → 0.9.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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/index.js +6 -2
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "alora-mcp",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "description": "MCP server for Alora, the cloud where your agent works — deploy, preview, share and run the apps your agent writes. Claude Code, Codex, Cursor and any MCP client.",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "alora-mcp": "src/index.js"
8
8
  },
9
9
  "dependencies": {
10
- "alora-sdk": "^0.8.0",
10
+ "alora-sdk": "^0.9.0",
11
11
  "@modelcontextprotocol/sdk": "^1.12.0",
12
12
  "tar": "^7.4.3",
13
13
  "zod": "^3.24.0"
package/src/index.js CHANGED
@@ -18,7 +18,7 @@ function client() {
18
18
  return new AloraClient({ api: cfg.api || 'https://api.alora.build', token: cfg.token });
19
19
  }
20
20
 
21
- const server = new McpServer({ name: 'alora', version: '0.8.0' });
21
+ const server = new McpServer({ name: 'alora', version: '0.9.0' });
22
22
 
23
23
  const ok = (data) => ({ content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] });
24
24
  const asError = (e) => ({
@@ -50,7 +50,11 @@ server.registerTool('account_create_and_connect', {
50
50
  email: z.string().describe('El email que el usuario te dio en el chat'),
51
51
  agent_name: z.string().optional().describe('Cómo se llama este agente, ej: "Claude de Ana"'),
52
52
  },
53
- }, wrap(({ email, agent_name }) => client().signupStart(email, agent_name || 'agente MCP')));
53
+ }, wrap(({ email, agent_name }) => {
54
+ let old;
55
+ try { old = JSON.parse(readFileSync(CONFIG_FILE, 'utf8')).token; } catch {}
56
+ return client().signupStart(email, agent_name || 'agente MCP', old);
57
+ }));
54
58
 
55
59
  server.registerTool('account_connect_poll', {
56
60
  description: 'Después de account_create_and_connect: llamá esto cada ~5s con el device_code. Cuando el usuario toque el email devuelve approved y GUARDA el token automáticamente — desde ahí todas las demás tools funcionan. expired = el link venció sin click: pedile al usuario que revise el inbox y volvé a empezar.',