orquestra-mcp 1.87.0 → 1.88.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.
- package/package.json +1 -1
- package/src/codingContext.mjs +25 -0
- package/src/server.mjs +12 -2
- package/src/toolGuides.mjs +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "orquestra-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.88.0",
|
|
4
4
|
"description": "Servidor MCP de Orquestra -- 161 tools para leer y escribir tareas, ideas, changelog, infraestructura, contenido, QA y más desde un agente de IA",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/src/codingContext.mjs
CHANGED
|
@@ -65,3 +65,28 @@ export function codingContextQuery({ taskId, distributionIds, stack, q, budget }
|
|
|
65
65
|
const list = v => (Array.isArray(v) && v.length ? v.join(',') : undefined)
|
|
66
66
|
return { taskId, distributionIds: list(distributionIds), stack: list(stack), q, budget }
|
|
67
67
|
}
|
|
68
|
+
|
|
69
|
+
// ── Al pasar a "En progreso" (después de ORQ-661) ─────────────────────────────
|
|
70
|
+
// Mover una tarea a un estatus de trabajo es el inicio real del código (más común que create_task_branch, que exige la
|
|
71
|
+
// integración de GitHub). Misma clasificación que `classifyStatus` de orquestra-infra (lib/presence.mjs), que la API usa
|
|
72
|
+
// para marcar la presencia del agente: cambiar las dos juntas.
|
|
73
|
+
const foldName = s => String(s || '').normalize('NFD').replace(/[\u0300-\u036f]/g, '').toLowerCase()
|
|
74
|
+
export function isWorkStatus(status) {
|
|
75
|
+
if (!status || status.isFinal || status.isCancel || status.isArchive || status.isInitial) return false
|
|
76
|
+
const n = foldName(status.name)
|
|
77
|
+
if (/revis|review/.test(n)) return false
|
|
78
|
+
return /progres|progress|curso|doing|desarroll|trabaj/.test(n)
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/** Contexto completo si `statusId` es de trabajo; null si no aplica o si algo falla (nunca rompe update_task). */
|
|
82
|
+
export async function codingContextOnWorkStart(statusId, loadStatuses, loadContext) {
|
|
83
|
+
try {
|
|
84
|
+
if (!statusId) return null
|
|
85
|
+
const statuses = await loadStatuses()
|
|
86
|
+
if (!isWorkStatus((statuses || []).find(s => s.id === statusId))) return null
|
|
87
|
+
return await loadContext()
|
|
88
|
+
} catch (err) {
|
|
89
|
+
console.error('codingContext omitido:', err?.message || err)
|
|
90
|
+
return null
|
|
91
|
+
}
|
|
92
|
+
}
|
package/src/server.mjs
CHANGED
|
@@ -12,7 +12,7 @@ import { FOUNDATIONS } from './foundations.mjs'
|
|
|
12
12
|
import { PLATFORM_PLAYBOOKS, TRACKING_TOOLS } from './platformPlaybooks.mjs'
|
|
13
13
|
import { SKILLS_CATALOG } from './skillsCatalog.mjs'
|
|
14
14
|
import { withRecommendedSkills } from './skillRecommend.mjs'
|
|
15
|
-
import { withCodingContextIndex, withCodingContext, codingContextQuery, CONTEXT_TIMEOUT_MS } from './codingContext.mjs'
|
|
15
|
+
import { withCodingContextIndex, withCodingContext, codingContextQuery, codingContextOnWorkStart, CONTEXT_TIMEOUT_MS } from './codingContext.mjs'
|
|
16
16
|
import { parseSource, previewSkill, installSkill } from './skillInstall.mjs'
|
|
17
17
|
import { normalizeStatuses, findClosePath } from './closePath.mjs'
|
|
18
18
|
import { TOOL_GUIDES, GUIDE_TOPICS } from './toolGuides.mjs'
|
|
@@ -395,7 +395,17 @@ export function createServer() {
|
|
|
395
395
|
} else {
|
|
396
396
|
data = await apiPatch(config, path, { projectId: pid, id, ...rest }, query)
|
|
397
397
|
}
|
|
398
|
-
|
|
398
|
+
const out = compact && wantsCompact ? compactTaskResult(data, sent) : data
|
|
399
|
+
// Al pasar una tarea a un estatus de trabajo ("En progreso"), las convenciones del proyecto llegan solas:
|
|
400
|
+
// es el inicio real del código. Best-effort con plazo corto; nunca rompe la respuesta.
|
|
401
|
+
if (transition && rest.statusId !== undefined) {
|
|
402
|
+
const ctxOpts = { timeoutMs: CONTEXT_TIMEOUT_MS, retries: 0 }
|
|
403
|
+
const ctx = await codingContextOnWorkStart(rest.statusId,
|
|
404
|
+
async () => normalizeStatuses(await apiGet(config, '/v1/statuses', { projectId: pid }, ctxOpts)),
|
|
405
|
+
() => apiGet(config, '/v1/coding-context', { projectId: pid, taskId: id }, ctxOpts))
|
|
406
|
+
if (ctx) return textResult({ ...out, codingContext: ctx })
|
|
407
|
+
}
|
|
408
|
+
return textResult(out)
|
|
399
409
|
} catch (err) {
|
|
400
410
|
return errorResult(err)
|
|
401
411
|
}
|
package/src/toolGuides.mjs
CHANGED
|
@@ -9,6 +9,7 @@ export const TOOL_GUIDES = {
|
|
|
9
9
|
- Checklist: no deja pasar a un estatus final (isFinal) con ítems sin terminar (400 "Quedan X de Y..."). Marca primero los que de verdad hiciste con update_checklist_item y descarta los que ya no aplican con skipped:true + skipReason (no bloquean). completeChecklist:true (solo junto con un statusId final) marca como hechos los pendientes y cierra, y solo si el usuario confirma que lo pendiente ya está hecho.
|
|
10
10
|
- Verificaciones: no deja cerrar con verificaciones por plataforma abiertas (pending/failed, ver list_verifications): no cierres a mano; deja la tarea en "En revisión" y se cierra sola cuando todas quedan aprobadas. waiveVerifications:true (solo con statusId final) las marca "waived" y cierra: SOLO con confirmación explícita del usuario de que ya no aplican.
|
|
11
11
|
- taskId es alias de id. compact:true responde solo { id, shortCode, statusId, updatedAt } y los campos que modificaste.
|
|
12
|
+
- Convenciones (ORQ-669): al pasar a un estatus de trabajo ("En progreso") la respuesta trae codingContext con las convenciones del proyecto que aplican a la tarea (mismo formato que get_coding_context). Léelas y respétalas antes de escribir código. Si no viene, no hay convenciones o no se pudieron leer a tiempo: puedes pedirlas con get_coding_context({taskId}).
|
|
12
13
|
- Presencia (ORQ-513): al pasar a "En progreso" el server te marca como agente activo (activeAgents, caduca a los 15 min sin actividad; tocar el checklist o llamar update_task la renueva; pasar a "En revisión" o cerrar te quita). Si la respuesta trae presenceConflict ({ others: [labels] }), otro agente ya trabaja la tarea: avisa al usuario con los nombres y NO sigas editando en paralelo sin su confirmación.
|
|
13
14
|
- relatedImpact: ver el tema related_impact.
|
|
14
15
|
- unresolvedLinks: si la respuesta trae unresolvedLinks ([{ text, suggestions }]), algún [[enlace]] del texto no se resolvió; corrige el texto con la forma exacta de las suggestions y avisa al usuario cuáles quedaron sin resolver; no ignores el campo.
|