orquestra-mcp 1.0.1 → 1.0.3
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 +2 -2
- package/package.json +1 -1
- package/src/api.mjs +1 -1
- package/src/setup.mjs +20 -4
- package/src/stages.mjs +1 -1
package/README.md
CHANGED
|
@@ -143,8 +143,8 @@ Compuestas:
|
|
|
143
143
|
|
|
144
144
|
Los campos enum (`type`, `priority`, `status`, etc.) están fijos y
|
|
145
145
|
documentados en el `inputSchema` de cada tool — el modelo los ve sin
|
|
146
|
-
adivinar. Todo lo que se crea/edita aparece en vivo en `orquestra-web
|
|
147
|
-
|
|
146
|
+
adivinar. Todo lo que se crea/edita aparece en vivo en `orquestra-web`,
|
|
147
|
+
sin necesidad de refrescar.
|
|
148
148
|
|
|
149
149
|
`projectId` es opcional en todas las tools de proyecto si hay un
|
|
150
150
|
`defaultProjectId` configurado (por `setup` o por
|
package/package.json
CHANGED
package/src/api.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { readConfigFile, CONFIG_PATH } from './configFile.mjs'
|
|
2
2
|
|
|
3
|
-
const DEFAULT_API_BASE = 'https://
|
|
3
|
+
const DEFAULT_API_BASE = 'https://api.orquestra.me'
|
|
4
4
|
|
|
5
5
|
export function loadConfig() {
|
|
6
6
|
const fileConfig = readConfigFile()
|
package/src/setup.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { exec } from 'child_process'
|
|
|
4
4
|
import { createInterface } from 'readline'
|
|
5
5
|
import { writeConfigFile, CONFIG_PATH } from './configFile.mjs'
|
|
6
6
|
|
|
7
|
-
const DEFAULT_API_BASE = 'https://
|
|
7
|
+
const DEFAULT_API_BASE = 'https://api.orquestra.me'
|
|
8
8
|
const DEFAULT_WEB_URL = 'https://app.orquestra.me'
|
|
9
9
|
const CALLBACK_TIMEOUT_MS = 5 * 60 * 1000
|
|
10
10
|
|
|
@@ -91,11 +91,27 @@ export async function runSetup() {
|
|
|
91
91
|
console.log(`Usando tu proyecto "${projects[0].name}" como default.`)
|
|
92
92
|
} else {
|
|
93
93
|
console.log('\nElige el proyecto que este MCP va a usar por default:')
|
|
94
|
+
console.log(' 0. (crear un proyecto nuevo)')
|
|
94
95
|
projects.forEach((p, i) => console.log(` ${i + 1}. ${p.name}`))
|
|
95
96
|
const answer = await prompt('Número: ')
|
|
96
|
-
const idx = parseInt(answer, 10)
|
|
97
|
-
if (idx < 0 || idx
|
|
98
|
-
|
|
97
|
+
const idx = parseInt(answer, 10)
|
|
98
|
+
if (Number.isNaN(idx) || idx < 0 || idx > projects.length) throw new Error('Selección inválida')
|
|
99
|
+
|
|
100
|
+
if (idx === 0) {
|
|
101
|
+
const name = await prompt('Nombre del proyecto nuevo: ')
|
|
102
|
+
if (!name.trim()) throw new Error('El nombre no puede estar vacío')
|
|
103
|
+
const res2 = await fetch(`${apiBase}/v1/projects?workspaceId=${workspaceId}`, {
|
|
104
|
+
method: 'POST',
|
|
105
|
+
headers: { Authorization: `Bearer ${token}`, 'Content-Type': 'application/json' },
|
|
106
|
+
body: JSON.stringify({ name: name.trim() }),
|
|
107
|
+
})
|
|
108
|
+
const newProject = await res2.json()
|
|
109
|
+
if (!res2.ok) throw new Error(newProject?.error || `HTTP ${res2.status}`)
|
|
110
|
+
defaultProjectId = newProject.id
|
|
111
|
+
console.log(`Proyecto "${newProject.name}" creado y configurado como default.`)
|
|
112
|
+
} else {
|
|
113
|
+
defaultProjectId = projects[idx - 1].id
|
|
114
|
+
}
|
|
99
115
|
}
|
|
100
116
|
|
|
101
117
|
writeConfigFile({ apiBase, apiToken: token, workspaceId, defaultProjectId })
|
package/src/stages.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Puerto exacto de orquestra-web/src/lib/stages.js (STAGES + PLAYBOOKS) --
|
|
2
|
-
// constantes estaticas, sin acceso a red ni
|
|
2
|
+
// constantes estaticas, sin acceso a red ni a la base de datos. get_stage_playbook y
|
|
3
3
|
// apply_stage_playbook las leen directo desde aca.
|
|
4
4
|
export const STAGES = [
|
|
5
5
|
{
|