nexakit 0.10.0 → 0.13.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/README.md +13 -6
- package/assets/runtime/package-lock.json +415 -6
- package/bench/casos/arquitectura/alta-usuarios/base/controladores/usuarios.js +16 -0
- package/bench/casos/arquitectura/alta-usuarios/base/db.js +14 -0
- package/bench/casos/arquitectura/alta-usuarios/base/docs/adr/0003-capas.md +15 -0
- package/bench/casos/arquitectura/alta-usuarios/base/errores.js +3 -0
- package/bench/casos/arquitectura/alta-usuarios/base/repositorios/usuarios.js +14 -0
- package/bench/casos/arquitectura/alta-usuarios/base/servicios/usuarios.js +20 -0
- package/bench/casos/arquitectura/alta-usuarios/cambio/controladores/usuarios.js +47 -0
- package/bench/casos/arquitectura/alta-usuarios/cambio/repositorios/usuarios.js +21 -0
- package/bench/casos/arquitectura/alta-usuarios/cambio/servicios/perfil.js +14 -0
- package/bench/casos/arquitectura/alta-usuarios/esperado.json +53 -0
- package/bench/casos/arquitectura/pedidos-facturacion/base/docs/adr/0001-capas.md +18 -0
- package/bench/casos/arquitectura/pedidos-facturacion/base/src/aplicacion/confirmar.ts +8 -0
- package/bench/casos/arquitectura/pedidos-facturacion/base/src/dominio/pedido.ts +15 -0
- package/bench/casos/arquitectura/pedidos-facturacion/base/src/dominio/puertos.ts +6 -0
- package/bench/casos/arquitectura/pedidos-facturacion/base/src/infra/db.ts +14 -0
- package/bench/casos/arquitectura/pedidos-facturacion/base/src/main.ts +9 -0
- package/bench/casos/arquitectura/pedidos-facturacion/cambio/src/aplicacion/facturar.ts +19 -0
- package/bench/casos/arquitectura/pedidos-facturacion/cambio/src/dominio/informe.ts +7 -0
- package/bench/casos/arquitectura/pedidos-facturacion/cambio/src/dominio/pedido.ts +21 -0
- package/bench/casos/arquitectura/pedidos-facturacion/cambio/src/infra/db.ts +22 -0
- package/bench/casos/arquitectura/pedidos-facturacion/esperado.json +53 -0
- package/bench/casos/arquitectura/resumen-cliente/base/docs/adr/0001-capas.md +18 -0
- package/bench/casos/arquitectura/resumen-cliente/base/src/aplicacion/confirmar.ts +8 -0
- package/bench/casos/arquitectura/resumen-cliente/base/src/dominio/pedido.ts +15 -0
- package/bench/casos/arquitectura/resumen-cliente/base/src/dominio/puertos.ts +6 -0
- package/bench/casos/arquitectura/resumen-cliente/base/src/infra/db.ts +14 -0
- package/bench/casos/arquitectura/resumen-cliente/base/src/main.ts +9 -0
- package/bench/casos/arquitectura/resumen-cliente/cambio/src/aplicacion/resumen.ts +6 -0
- package/bench/casos/arquitectura/resumen-cliente/cambio/src/dominio/pedido.ts +33 -0
- package/bench/casos/arquitectura/resumen-cliente/cambio/src/dominio/puertos.ts +7 -0
- package/bench/casos/arquitectura/resumen-cliente/cambio/src/infra/db.ts +18 -0
- package/bench/casos/arquitectura/resumen-cliente/cambio/src/main.ts +14 -0
- package/bench/casos/arquitectura/resumen-cliente/esperado.json +23 -0
- package/bench/casos/documentacion/comentario-obsoleto/base/README.md +18 -0
- package/bench/casos/documentacion/comentario-obsoleto/base/src/usuarios.ts +35 -0
- package/bench/casos/documentacion/comentario-obsoleto/cambio/src/copia.ts +8 -0
- package/bench/casos/documentacion/comentario-obsoleto/cambio/src/usuarios.ts +43 -0
- package/bench/casos/documentacion/comentario-obsoleto/esperado.json +42 -0
- package/bench/casos/documentacion/reportes-config/base/README.md +23 -0
- package/bench/casos/documentacion/reportes-config/base/src/cli.js +33 -0
- package/bench/casos/documentacion/reportes-config/base/src/config.js +15 -0
- package/bench/casos/documentacion/reportes-config/base/src/envio.js +23 -0
- package/bench/casos/documentacion/reportes-config/cambio/src/cli.js +35 -0
- package/bench/casos/documentacion/reportes-config/cambio/src/config.js +15 -0
- package/bench/casos/documentacion/reportes-config/esperado.json +42 -0
- package/bench/casos/documentacion/tiempo-espera/base/README.md +10 -0
- package/bench/casos/documentacion/tiempo-espera/base/src/config.js +8 -0
- package/bench/casos/documentacion/tiempo-espera/cambio/README.md +10 -0
- package/bench/casos/documentacion/tiempo-espera/cambio/src/config.js +8 -0
- package/bench/casos/documentacion/tiempo-espera/esperado.json +16 -0
- package/bench/casos/pruebas/calendario-laboral/base/src/fechas.js +3 -0
- package/bench/casos/pruebas/calendario-laboral/base/test/fechas.test.js +7 -0
- package/bench/casos/pruebas/calendario-laboral/cambio/src/fechas.js +37 -0
- package/bench/casos/pruebas/calendario-laboral/cambio/test/calendario.test.js +31 -0
- package/bench/casos/pruebas/calendario-laboral/esperado.json +49 -0
- package/bench/casos/pruebas/fin-de-semana/base/src/fechas.js +3 -0
- package/bench/casos/pruebas/fin-de-semana/base/test/fechas.test.js +7 -0
- package/bench/casos/pruebas/fin-de-semana/cambio/src/fechas.js +8 -0
- package/bench/casos/pruebas/fin-de-semana/cambio/test/fines-de-semana.test.js +13 -0
- package/bench/casos/pruebas/fin-de-semana/esperado.json +16 -0
- package/bench/casos/pruebas/precios-carrito/base/src/precio.ts +3 -0
- package/bench/casos/pruebas/precios-carrito/base/test/precio.test.js +11 -0
- package/bench/casos/pruebas/precios-carrito/cambio/src/precio.ts +34 -0
- package/bench/casos/pruebas/precios-carrito/cambio/test/precio.test.js +42 -0
- package/bench/casos/pruebas/precios-carrito/esperado.json +42 -0
- package/bench/casos/rendimiento/boletin-correo/base/src/correo.html +1 -0
- package/bench/casos/rendimiento/boletin-correo/base/src/plantilla.ts +11 -0
- package/bench/casos/rendimiento/boletin-correo/cambio/src/envios.ts +44 -0
- package/bench/casos/rendimiento/boletin-correo/cambio/src/plantilla.ts +10 -0
- package/bench/casos/rendimiento/boletin-correo/esperado.json +42 -0
- package/bench/casos/rendimiento/clientes-por-lote/base/src/informe.js +8 -0
- package/bench/casos/rendimiento/clientes-por-lote/cambio/src/informe.js +6 -0
- package/bench/casos/rendimiento/clientes-por-lote/esperado.json +14 -0
- package/bench/casos/rendimiento/informe-ventas/base/src/informe.js +6 -0
- package/bench/casos/rendimiento/informe-ventas/base/src/tasas.json +1 -0
- package/bench/casos/rendimiento/informe-ventas/cambio/src/informe.js +33 -0
- package/bench/casos/rendimiento/informe-ventas/cambio/src/tasas.js +7 -0
- package/bench/casos/rendimiento/informe-ventas/esperado.json +42 -0
- package/bench/casos/seguridad/inyeccion-orden/base/src/respaldo.ts +13 -0
- package/bench/casos/seguridad/inyeccion-orden/cambio/src/respaldo.ts +69 -0
- package/bench/casos/seguridad/inyeccion-orden/esperado.json +42 -0
- package/bench/casos/seguridad/limpio-validacion/base/servidor.js +11 -0
- package/bench/casos/seguridad/limpio-validacion/cambio/servidor.js +39 -0
- package/bench/casos/seguridad/limpio-validacion/esperado.json +14 -0
- package/bench/casos/seguridad/servidor-archivos/base/servidor.js +21 -0
- package/bench/casos/seguridad/servidor-archivos/cambio/servidor.js +79 -0
- package/bench/casos/seguridad/servidor-archivos/esperado.json +42 -0
- package/bin/nexakit-fabrica-mcp.js +12 -0
- package/dist/fabrica/banco/casos.js +304 -0
- package/dist/fabrica/banco/ejecutar.js +483 -0
- package/dist/fabrica/banco/medir.js +120 -0
- package/dist/fabrica/cli.js +737 -0
- package/dist/fabrica/conectores/antigravity.js +1040 -0
- package/dist/fabrica/conectores/codex.js +967 -0
- package/dist/fabrica/conectores/tipos.js +8 -0
- package/dist/fabrica/config.js +44 -0
- package/dist/fabrica/consolidar.js +218 -0
- package/dist/fabrica/decision.js +210 -0
- package/dist/fabrica/diff.js +247 -0
- package/dist/fabrica/disco.js +356 -0
- package/dist/fabrica/ejecutor.js +597 -0
- package/dist/fabrica/encargo/candado.js +274 -0
- package/dist/fabrica/encargo/ejecutar.js +827 -0
- package/dist/fabrica/encargo/evidencia.js +308 -0
- package/dist/fabrica/encargo/parche.js +146 -0
- package/dist/fabrica/encargo/worktree.js +394 -0
- package/dist/fabrica/enrutador.js +425 -0
- package/dist/fabrica/errores.js +14 -0
- package/dist/fabrica/esquemas.js +57 -0
- package/dist/fabrica/estaciones.js +75 -0
- package/dist/fabrica/evidencia.js +406 -0
- package/dist/fabrica/indice.js +1 -0
- package/dist/fabrica/jsonrpc.js +274 -0
- package/dist/fabrica/lecciones.js +363 -0
- package/dist/fabrica/mcp.js +376 -0
- package/dist/fabrica/preferencias.js +56 -0
- package/dist/fabrica/protocolos/codex/AbsolutePathBuf.js +2 -0
- package/dist/fabrica/protocolos/codex/ApplyPatchApprovalResponse.js +2 -0
- package/dist/fabrica/protocolos/codex/ClientInfo.js +2 -0
- package/dist/fabrica/protocolos/codex/ExecCommandApprovalParams.js +2 -0
- package/dist/fabrica/protocolos/codex/ExecCommandApprovalResponse.js +2 -0
- package/dist/fabrica/protocolos/codex/ExecPolicyAmendment.js +2 -0
- package/dist/fabrica/protocolos/codex/FunctionCallOutputBody.js +2 -0
- package/dist/fabrica/protocolos/codex/FunctionCallOutputContentItem.js +2 -0
- package/dist/fabrica/protocolos/codex/ImageDetail.js +2 -0
- package/dist/fabrica/protocolos/codex/InitializeCapabilities.js +2 -0
- package/dist/fabrica/protocolos/codex/InitializeParams.js +2 -0
- package/dist/fabrica/protocolos/codex/InitializeResponse.js +2 -0
- package/dist/fabrica/protocolos/codex/InputModality.js +2 -0
- package/dist/fabrica/protocolos/codex/LegacyAppPathString.js +2 -0
- package/dist/fabrica/protocolos/codex/NetworkPolicyAmendment.js +2 -0
- package/dist/fabrica/protocolos/codex/NetworkPolicyRuleAction.js +2 -0
- package/dist/fabrica/protocolos/codex/ParsedCommand.js +2 -0
- package/dist/fabrica/protocolos/codex/Personality.js +2 -0
- package/dist/fabrica/protocolos/codex/ReasoningEffort.js +2 -0
- package/dist/fabrica/protocolos/codex/ReasoningSummary.js +2 -0
- package/dist/fabrica/protocolos/codex/ReviewDecision.js +2 -0
- package/dist/fabrica/protocolos/codex/ThreadId.js +2 -0
- package/dist/fabrica/protocolos/codex/serde_json/JsonValue.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/AdditionalFileSystemPermissions.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/AdditionalNetworkPermissions.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/ApprovalsReviewer.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/AskForApproval.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/ByteRange.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/CommandAction.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/CommandExecutionApprovalDecision.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/CommandExecutionApprovalKind.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/CommandExecutionRequestApprovalParams.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/CommandExecutionRequestApprovalResponse.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/ConfigReadParams.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/CyberAccessProgram.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/ExecPolicyAmendment.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/FileChangeApprovalDecision.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/FileChangeRequestApprovalResponse.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/FileSystemAccessMode.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/FileSystemPath.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/FileSystemSandboxEntry.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/FileSystemSpecialPath.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/GrantedPermissionProfile.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/ListMcpServerStatusParams.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/McpServerElicitationAction.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/McpServerElicitationRequestResponse.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/McpServerStatusDetail.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/Model.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/ModelAccessPrograms.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/ModelAvailabilityNux.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/ModelListParams.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/ModelListResponse.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/ModelServiceTier.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/ModelUpgradeInfo.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/MultiAgentVersion.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/NetworkAccess.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/NetworkApprovalContext.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/NetworkApprovalProtocol.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/NetworkPolicyAmendment.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/NetworkPolicyRuleAction.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/PermissionGrantScope.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/PermissionsRequestApprovalResponse.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/ReasoningEffortOption.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/SandboxMode.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/SandboxPolicy.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/TextElement.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/ThreadSource.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/ThreadStartParams.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/ThreadStartSource.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/ThreadTokenUsage.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/ThreadTokenUsageUpdatedNotification.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/TokenUsageBreakdown.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/ToolRequestUserInputAnswer.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/ToolRequestUserInputResponse.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/TurnInterruptParams.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/TurnStartParams.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/TurnToolOutput.js +2 -0
- package/dist/fabrica/protocolos/codex/v2/UserInput.js +2 -0
- package/dist/fabrica/rastro.js +487 -0
- package/dist/fabrica/sesion.js +230 -0
- package/dist/fabrica/tabla-modelos.json +29 -0
- package/dist/fabrica/veredictos.js +327 -0
- package/package.json +16 -8
- package/plugins/huellas.json +6 -6
- package/plugins/nexakit-lecciones/.claude-plugin/plugin.json +1 -1
- package/plugins/nexakit-lecciones/README.md +6 -5
- package/plugins/nexakit-lecciones/hooks/lecciones.js +29 -5
- package/plugins/nexakit-lecciones/hooks/register.js +7 -3
- package/plugins/nexakit-modelo/.claude-plugin/plugin.json +1 -1
- package/plugins/nexakit-modelo/hooks/barra.js +100 -4
- package/plugins/nexakit-modelo/hooks/decidir.js +2 -2
- package/plugins/nexakit-modelo/hooks/recomendar.js +1 -1
- package/plugins/nexakit-modelo/hooks/register.js +122 -7
- package/plugins/nexakit-modelo/tests/register.test.ts +301 -0
- package/plugins/niveles/.claude-plugin/plugin.json +1 -1
- package/plugins/niveles/agents/cazador-de-flakes.md +1 -0
- package/plugins/niveles/agents/cierre-de-memoria.md +1 -0
- package/plugins/niveles/agents/investigador.md +1 -0
- package/plugins/niveles/agents/nivel-alto.md +1 -0
- package/plugins/niveles/agents/nivel-exigente.md +1 -0
- package/plugins/niveles/agents/nivel-ligero.md +1 -0
- package/plugins/niveles/agents/nivel-normal.md +1 -0
- package/plugins/niveles/agents/revisor-de-calidad.md +1 -0
- package/plugins/niveles/agents/sincronizador-docs.md +1 -0
- package/plugins/niveles/agents/subir-al-repo.md +1 -0
- package/skills/elegir-modelo/SKILL.md +4 -3
- package/skills/elegir-modelo/modelos.mjs +100 -1
- package/skills/fabrica/SKILL.md +55 -0
- package/skills/gemini/SKILL.md +2 -3
- package/skills/quality-gate/SKILL.md +2 -2
- package/src/agent-models.js +6 -4
- package/src/antigravity-barra.js +64 -12
- package/src/antigravity-command.js +4 -2
- package/src/antigravity-models.js +61 -0
- package/src/antigravity-pre-tool.js +11 -3
- package/src/antigravity-recommendation.js +15 -9
- package/src/antigravity-setup.js +4 -31
- package/src/cli-executable.d.ts +11 -0
- package/src/codex-pre-tool.js +3 -3
- package/src/codex-recommendation.js +1 -2
- package/src/codex-setup.js +3 -20
- package/src/codex-team.js +31 -4
- package/src/fabrica/banco/casos.ts +315 -0
- package/src/fabrica/banco/ejecutar.ts +587 -0
- package/src/fabrica/banco/medir.ts +160 -0
- package/src/fabrica/cli.ts +781 -0
- package/src/fabrica/conectores/antigravity.ts +1090 -0
- package/src/fabrica/conectores/codex.ts +1013 -0
- package/src/fabrica/conectores/tipos.ts +54 -0
- package/src/fabrica/config.ts +43 -0
- package/src/fabrica/consolidar.ts +277 -0
- package/src/fabrica/decision.ts +285 -0
- package/src/fabrica/diff.ts +294 -0
- package/src/fabrica/disco.ts +380 -0
- package/src/fabrica/ejecutor.ts +716 -0
- package/src/fabrica/encargo/candado.ts +287 -0
- package/src/fabrica/encargo/ejecutar.ts +953 -0
- package/src/fabrica/encargo/evidencia.ts +301 -0
- package/src/fabrica/encargo/parche.ts +151 -0
- package/src/fabrica/encargo/worktree.ts +427 -0
- package/src/fabrica/enrutador.ts +494 -0
- package/src/fabrica/errores.ts +15 -0
- package/src/fabrica/esquemas.ts +92 -0
- package/src/fabrica/estaciones.ts +83 -0
- package/src/fabrica/evidencia.ts +445 -0
- package/src/fabrica/indice.ts +1 -0
- package/src/fabrica/jsonrpc.ts +314 -0
- package/src/fabrica/lecciones.ts +411 -0
- package/src/fabrica/mcp.ts +450 -0
- package/src/fabrica/preferencias.ts +66 -0
- package/src/fabrica/protocolos/codex/AbsolutePathBuf.ts +14 -0
- package/src/fabrica/protocolos/codex/ApplyPatchApprovalResponse.ts +6 -0
- package/src/fabrica/protocolos/codex/ClientInfo.ts +5 -0
- package/src/fabrica/protocolos/codex/ExecCommandApprovalParams.ts +16 -0
- package/src/fabrica/protocolos/codex/ExecCommandApprovalResponse.ts +6 -0
- package/src/fabrica/protocolos/codex/ExecPolicyAmendment.ts +12 -0
- package/src/fabrica/protocolos/codex/FunctionCallOutputBody.ts +6 -0
- package/src/fabrica/protocolos/codex/FunctionCallOutputContentItem.ts +10 -0
- package/src/fabrica/protocolos/codex/ImageDetail.ts +5 -0
- package/src/fabrica/protocolos/codex/InitializeCapabilities.ts +42 -0
- package/src/fabrica/protocolos/codex/InitializeParams.ts +7 -0
- package/src/fabrica/protocolos/codex/InitializeResponse.ts +20 -0
- package/src/fabrica/protocolos/codex/InputModality.ts +8 -0
- package/src/fabrica/protocolos/codex/LegacyAppPathString.ts +27 -0
- package/src/fabrica/protocolos/codex/NetworkPolicyAmendment.ts +6 -0
- package/src/fabrica/protocolos/codex/NetworkPolicyRuleAction.ts +5 -0
- package/src/fabrica/protocolos/codex/ParsedCommand.ts +12 -0
- package/src/fabrica/protocolos/codex/Personality.ts +8 -0
- package/src/fabrica/protocolos/codex/ReasoningEffort.ts +8 -0
- package/src/fabrica/protocolos/codex/ReasoningSummary.ts +10 -0
- package/src/fabrica/protocolos/codex/ReviewDecision.ts +10 -0
- package/src/fabrica/protocolos/codex/ThreadId.ts +10 -0
- package/src/fabrica/protocolos/codex/VERSION +1 -0
- package/src/fabrica/protocolos/codex/serde_json/JsonValue.ts +5 -0
- package/src/fabrica/protocolos/codex/v2/AdditionalFileSystemPermissions.ts +15 -0
- package/src/fabrica/protocolos/codex/v2/AdditionalNetworkPermissions.ts +5 -0
- package/src/fabrica/protocolos/codex/v2/ApprovalsReviewer.ts +12 -0
- package/src/fabrica/protocolos/codex/v2/AskForApproval.ts +5 -0
- package/src/fabrica/protocolos/codex/v2/ByteRange.ts +5 -0
- package/src/fabrica/protocolos/codex/v2/CommandAction.ts +6 -0
- package/src/fabrica/protocolos/codex/v2/CommandExecutionApprovalDecision.ts +7 -0
- package/src/fabrica/protocolos/codex/v2/CommandExecutionApprovalKind.ts +8 -0
- package/src/fabrica/protocolos/codex/v2/CommandExecutionRequestApprovalParams.ts +51 -0
- package/src/fabrica/protocolos/codex/v2/CommandExecutionRequestApprovalResponse.ts +6 -0
- package/src/fabrica/protocolos/codex/v2/ConfigReadParams.ts +11 -0
- package/src/fabrica/protocolos/codex/v2/CyberAccessProgram.ts +9 -0
- package/src/fabrica/protocolos/codex/v2/ExecPolicyAmendment.ts +5 -0
- package/src/fabrica/protocolos/codex/v2/FileChangeApprovalDecision.ts +5 -0
- package/src/fabrica/protocolos/codex/v2/FileChangeRequestApprovalResponse.ts +6 -0
- package/src/fabrica/protocolos/codex/v2/FileSystemAccessMode.ts +5 -0
- package/src/fabrica/protocolos/codex/v2/FileSystemPath.ts +7 -0
- package/src/fabrica/protocolos/codex/v2/FileSystemSandboxEntry.ts +7 -0
- package/src/fabrica/protocolos/codex/v2/FileSystemSpecialPath.ts +6 -0
- package/src/fabrica/protocolos/codex/v2/GrantedPermissionProfile.ts +7 -0
- package/src/fabrica/protocolos/codex/v2/ListMcpServerStatusParams.ts +23 -0
- package/src/fabrica/protocolos/codex/v2/McpServerElicitationAction.ts +5 -0
- package/src/fabrica/protocolos/codex/v2/McpServerElicitationRequestResponse.ts +17 -0
- package/src/fabrica/protocolos/codex/v2/McpServerStatusDetail.ts +5 -0
- package/src/fabrica/protocolos/codex/v2/Model.ts +33 -0
- package/src/fabrica/protocolos/codex/v2/ModelAccessPrograms.ts +13 -0
- package/src/fabrica/protocolos/codex/v2/ModelAvailabilityNux.ts +5 -0
- package/src/fabrica/protocolos/codex/v2/ModelListParams.ts +17 -0
- package/src/fabrica/protocolos/codex/v2/ModelListResponse.ts +11 -0
- package/src/fabrica/protocolos/codex/v2/ModelServiceTier.ts +5 -0
- package/src/fabrica/protocolos/codex/v2/ModelUpgradeInfo.ts +9 -0
- package/src/fabrica/protocolos/codex/v2/MultiAgentVersion.ts +8 -0
- package/src/fabrica/protocolos/codex/v2/NetworkAccess.ts +5 -0
- package/src/fabrica/protocolos/codex/v2/NetworkApprovalContext.ts +6 -0
- package/src/fabrica/protocolos/codex/v2/NetworkApprovalProtocol.ts +5 -0
- package/src/fabrica/protocolos/codex/v2/NetworkPolicyAmendment.ts +6 -0
- package/src/fabrica/protocolos/codex/v2/NetworkPolicyRuleAction.ts +5 -0
- package/src/fabrica/protocolos/codex/v2/PermissionGrantScope.ts +5 -0
- package/src/fabrica/protocolos/codex/v2/PermissionsRequestApprovalResponse.ts +11 -0
- package/src/fabrica/protocolos/codex/v2/ReasoningEffortOption.ts +6 -0
- package/src/fabrica/protocolos/codex/v2/SandboxMode.ts +5 -0
- package/src/fabrica/protocolos/codex/v2/SandboxPolicy.ts +7 -0
- package/src/fabrica/protocolos/codex/v2/TextElement.ts +14 -0
- package/src/fabrica/protocolos/codex/v2/ThreadSource.ts +5 -0
- package/src/fabrica/protocolos/codex/v2/ThreadStartParams.ts +22 -0
- package/src/fabrica/protocolos/codex/v2/ThreadStartSource.ts +5 -0
- package/src/fabrica/protocolos/codex/v2/ThreadTokenUsage.ts +6 -0
- package/src/fabrica/protocolos/codex/v2/ThreadTokenUsageUpdatedNotification.ts +6 -0
- package/src/fabrica/protocolos/codex/v2/TokenUsageBreakdown.ts +5 -0
- package/src/fabrica/protocolos/codex/v2/ToolRequestUserInputAnswer.ts +8 -0
- package/src/fabrica/protocolos/codex/v2/ToolRequestUserInputResponse.ts +9 -0
- package/src/fabrica/protocolos/codex/v2/TurnInterruptParams.ts +5 -0
- package/src/fabrica/protocolos/codex/v2/TurnStartParams.ts +75 -0
- package/src/fabrica/protocolos/codex/v2/TurnToolOutput.ts +10 -0
- package/src/fabrica/protocolos/codex/v2/UserInput.ts +11 -0
- package/src/fabrica/rastro.ts +508 -0
- package/src/fabrica/sesion.ts +280 -0
- package/src/fabrica/tabla-modelos.json +29 -0
- package/src/fabrica/veredictos.ts +365 -0
- package/src/gemini-cli.js +15 -12
- package/src/gemini-tools.js +1 -1
- package/src/gemini-usage-store.js +32 -0
- package/src/instructions-block.js +69 -0
- package/src/lecciones-command.js +105 -4
- package/src/lecciones-instructions.js +178 -0
- package/src/legacy-repair.js +1 -1
- package/src/level-agents.js +5 -3
- package/src/memory-mcp-policy.js +1 -1
- package/src/missing-dependencies.js +5 -0
- package/src/model-command.d.ts +29 -0
- package/src/model-command.js +4 -27
- package/src/regla-ordenes-simples.d.ts +2 -0
- package/src/regla-ordenes-simples.js +4 -0
- package/src/review-instructions.js +69 -81
- package/src/safe-paths.js +38 -0
- package/src/setup-apply.js +24 -2
- package/src/setup-plan.js +57 -1
- package/src/setup-state.js +14 -0
- package/src/shell-quote.js +2 -0
- package/src/skill-recommendations.js +101 -28
- package/src/stable-command.js +2 -2
- package/src/stable-install.js +4 -2
- package/src/superpowers.js +0 -7
- package/src/task-document.js +59 -0
- package/src/terminal-text.js +2 -19
- package/src/toolkit-cli.js +63 -8
- package/src/toolkit-setup.js +192 -37
- package/templates/agent-team/README.md +7 -19
- package/bin/agent-task.js +0 -14
- package/bin/agent-toolkit-inbox.js +0 -14
- package/bin/agent-toolkit-mcp.js +0 -17
- package/schemas/agent-client-adapter.schema.json +0 -786
- package/schemas/agent-client-auth-diagnostic.schema.json +0 -801
- package/schemas/agent-client-isolated-variant.schema.json +0 -105
- package/schemas/agent-client-isolated-verification.schema.json +0 -99
- package/schemas/agent-client-managed-preferences-invocation.schema.json +0 -67
- package/schemas/agent-client-managed-preferences.schema.json +0 -63
- package/schemas/agent-client-native-diagnostics.schema.json +0 -85
- package/schemas/agent-client-native-evaluation.schema.json +0 -171
- package/schemas/agent-client-native-preflight.schema.json +0 -90
- package/schemas/agent-client-output.schema.json +0 -551
- package/schemas/agent-client-runtime-fixture.schema.json +0 -90
- package/schemas/agent-client-runtime-local.schema.json +0 -95
- package/schemas/agent-client-runtime.schema.json +0 -1288
- package/schemas/agent-client-selective-config.schema.json +0 -77
- package/schemas/agent-client-supervised-local.schema.json +0 -135
- package/schemas/agent-client-supervised.schema.json +0 -186
- package/schemas/agent-task-approvals.schema.json +0 -362
- package/schemas/agent-task-prepare.schema.json +0 -1324
- package/schemas/agent-task-verify.schema.json +0 -198
- package/schemas/task-workflow-plan-output.schema.json +0 -35
- package/skills/revisar/SKILL.md +0 -51
- package/src/claude-code-runner.js +0 -642
- package/src/client-adapter-plan.js +0 -271
- package/src/client-auth-diagnostic-parser.js +0 -211
- package/src/client-auth-diagnostic.js +0 -257
- package/src/client-isolated-variant.js +0 -106
- package/src/client-isolated-verification.js +0 -130
- package/src/client-local-platform.js +0 -14
- package/src/client-managed-preferences-invocation.js +0 -209
- package/src/client-managed-preferences.js +0 -78
- package/src/client-native-access.js +0 -134
- package/src/client-native-diagnostics.js +0 -253
- package/src/client-native-evaluation.js +0 -106
- package/src/client-native-preflight-files.js +0 -68
- package/src/client-native-preflight.js +0 -95
- package/src/client-output-parser.js +0 -278
- package/src/client-runtime-admission.js +0 -80
- package/src/client-runtime-coordinator.js +0 -70
- package/src/client-runtime-core.js +0 -92
- package/src/client-runtime-fixture-permit.js +0 -20
- package/src/client-runtime-fixture-protocol.js +0 -39
- package/src/client-runtime-state.js +0 -67
- package/src/client-runtime-store-files.js +0 -91
- package/src/client-runtime-store.js +0 -239
- package/src/client-runtime-supervisor.js +0 -146
- package/src/client-selective-config.js +0 -195
- package/src/client-selective-files.js +0 -126
- package/src/client-supervised-codes.js +0 -32
- package/src/client-supervised-contract.js +0 -52
- package/src/client-supervised-coordinator.js +0 -36
- package/src/client-supervised-permit.js +0 -20
- package/src/client-supervised-protocol.js +0 -37
- package/src/client-supervised-store.js +0 -167
- package/src/client-supervised-supervisor.js +0 -167
- package/src/client-supervised.js +0 -160
- package/src/codex-cli-runner.js +0 -358
- package/src/codex-delivery.js +0 -101
- package/src/memory-connection-artifacts.js +0 -192
- package/src/memory-connection-descriptor.js +0 -158
- package/src/memory-connection-diagnostic.js +0 -177
- package/src/memory-connection-files.js +0 -191
- package/src/memory-connection-manifest.js +0 -118
- package/src/memory-connection-package.js +0 -176
- package/src/memory-connection-plan.js +0 -217
- package/src/memory-connection-skill.js +0 -211
- package/src/memory-connection-toml.js +0 -153
- package/src/native/managed-preferences.c +0 -100
- package/src/native/managed-preferences.h +0 -17
- package/src/package-lock-path.js +0 -13
- package/src/peer-handoff.js +0 -27
- package/src/peer-inbox-cli.js +0 -211
- package/src/peer-review-mcp.js +0 -210
- package/src/peer-review-store.js +0 -532
- package/src/review-policy.js +0 -35
- package/src/revision-adapters.js +0 -158
- package/src/revision-context.js +0 -86
- package/src/revision-isolation.js +0 -222
- package/src/revision-process.js +0 -103
- package/src/revision-provenance.js +0 -89
- package/src/revision-snapshot.js +0 -120
- package/src/revision.js +0 -242
- package/src/runtime-fixtures/runtime-supervisor/child.cjs +0 -3
- package/src/runtime-fixtures/runtime-supervisor/fixture.cjs +0 -49
- package/src/runtime-fixtures/supervised/child.cjs +0 -3
- package/src/runtime-fixtures/supervised/fixture.cjs +0 -47
- package/src/task-approvals.js +0 -367
- package/src/task-cli.js +0 -79
- package/src/task-external-verifier.js +0 -584
- package/src/task-prepare-files.js +0 -115
- package/src/task-prepare.js +0 -180
- package/src/task-verify-cli.js +0 -67
- package/src/task-verify-files.js +0 -188
- package/src/task-verify.js +0 -118
- package/src/task-workflow-mcp.js +0 -544
- package/src/task-workflow-store.js +0 -254
- package/src/toolkit-commands-guide.js +0 -115
package/src/toolkit-setup.js
CHANGED
|
@@ -4,6 +4,7 @@ import os from 'node:os';
|
|
|
4
4
|
import path from 'node:path';
|
|
5
5
|
import { fileURLToPath } from 'node:url';
|
|
6
6
|
import { createRequire } from 'node:module';
|
|
7
|
+
import { shellQuote as quote } from './shell-quote.js';
|
|
7
8
|
import { parseTOML, getStaticTOMLValue } from 'toml-eslint-parser';
|
|
8
9
|
import { IS_WINDOWS } from './platform.js';
|
|
9
10
|
import { acquireLock } from './install-lock.js';
|
|
@@ -22,7 +23,10 @@ import {
|
|
|
22
23
|
} from './link-states.js';
|
|
23
24
|
import { actualRoot, ensureStableInstall, nexakitDir } from './stable-install.js';
|
|
24
25
|
import { inspectMods } from './mods.js';
|
|
25
|
-
import { inspectSuperpowers } from './superpowers.js';
|
|
26
|
+
import { defaultRunner, inspectSuperpowers } from './superpowers.js';
|
|
27
|
+
import { planReviewInstructions } from './review-instructions.js';
|
|
28
|
+
import { planLeccionesInstructions } from './lecciones-instructions.js';
|
|
29
|
+
import { teamMarks } from './codex-team.js';
|
|
26
30
|
|
|
27
31
|
import packageJson from '../package.json' with { type: 'json' };
|
|
28
32
|
|
|
@@ -41,10 +45,16 @@ const SKILL_HOMES = {
|
|
|
41
45
|
const MCP_CLIENTS = ['codex', 'claude'];
|
|
42
46
|
// Skills nexakit no longer ships. Links it created are removed; anything else with the name is reported, never
|
|
43
47
|
// touched. The last three are now covered by Superpowers (brainstorming/writing-plans, systematic-debugging and
|
|
44
|
-
// test-driven-development), which is required. revision-cruzada merged into revisar
|
|
45
|
-
export const RETIRED_SKILLS = Object.freeze(['programar', 'estado', 'spec-driven-development', 'depurar', 'desarrollo-con-pruebas', 'revision-cruzada']);
|
|
46
|
-
const
|
|
48
|
+
// test-driven-development), which is required. revision-cruzada merged into revisar, which `fabrica` replaced.
|
|
49
|
+
export const RETIRED_SKILLS = Object.freeze(['programar', 'estado', 'spec-driven-development', 'depurar', 'desarrollo-con-pruebas', 'revision-cruzada', 'revisar']);
|
|
50
|
+
const MCP_NAME = 'nexakit-fabrica';
|
|
51
|
+
const MCP_SUFFIX = 'bin/nexakit-fabrica-mcp.js';
|
|
52
|
+
// The MCP this one replaces. An entry that runs its script is nexakit's and `npx nexakit` migrates it (see
|
|
53
|
+
// applyMcpMigration); anything else under those names is only reported.
|
|
54
|
+
const LEGACY_MCP_NAMES = ['agent-toolkit-workflow', 'agent-toolkit'];
|
|
55
|
+
const LEGACY_MCP_SUFFIX = 'bin/agent-toolkit-mcp.js';
|
|
47
56
|
const COMMANDS = { codex: 'codex', claude: 'claude', antigravity: 'agy' };
|
|
57
|
+
const CLIENT_NAMES = { codex: 'Codex', claude: 'Claude Code', antigravity: 'Antigravity' };
|
|
48
58
|
export const globalSkillTarget = (home, client, name) => path.join(home, ...SKILL_HOMES[client], name);
|
|
49
59
|
// Registry key of an MCP entry: it has no path of its own in the home folder.
|
|
50
60
|
export const mcpRegistryTarget = (client, name) => `mcp:${client}:${name}`;
|
|
@@ -60,7 +70,6 @@ async function clientsFor(agent, environment, home) {
|
|
|
60
70
|
Boolean(await stat(path.join(home, '.gemini', 'antigravity-cli')));
|
|
61
71
|
return antigravity ? ['codex', 'claude', 'antigravity'] : ['codex', 'claude'];
|
|
62
72
|
}
|
|
63
|
-
const quote = (value) => "'" + value.replaceAll("'", "'\\''") + "'";
|
|
64
73
|
const stat = (file) =>
|
|
65
74
|
fs.lstat(file).catch((e) => {
|
|
66
75
|
if (e.code === 'ENOENT') return null;
|
|
@@ -125,12 +134,84 @@ async function parents(home, target, create = false) {
|
|
|
125
134
|
export function registrationCommand(client, current, nodePath, entry) {
|
|
126
135
|
const add =
|
|
127
136
|
client === 'codex'
|
|
128
|
-
? `codex mcp add
|
|
129
|
-
: `claude mcp add --scope user --transport stdio
|
|
137
|
+
? `codex mcp add ${MCP_NAME} -- ${quote(nodePath)} ${quote(entry)}`
|
|
138
|
+
: `claude mcp add --scope user --transport stdio ${MCP_NAME} -- ${quote(nodePath)} ${quote(entry)}`;
|
|
130
139
|
if (current.state === 'falta') return add;
|
|
131
140
|
// Moving or repairing an existing entry: remove it first under the name it has now.
|
|
132
141
|
return `${client === 'codex' ? `codex mcp remove ${current.name}` : `claude mcp remove ${current.name} -s user`} && ${add}`;
|
|
133
142
|
}
|
|
143
|
+
// The same orders as registrationCommand, as arguments for the agent's CLI (no shell in between).
|
|
144
|
+
const addArgs = (client, nodePath, entry) =>
|
|
145
|
+
client === 'codex'
|
|
146
|
+
? ['mcp', 'add', MCP_NAME, '--', nodePath, entry]
|
|
147
|
+
: ['mcp', 'add', '--scope', 'user', '--transport', 'stdio', MCP_NAME, '--', nodePath, entry];
|
|
148
|
+
const removeArgs = (client, name) => (client === 'codex' ? ['mcp', 'remove', name] : ['mcp', 'remove', name, '-s', 'user']);
|
|
149
|
+
|
|
150
|
+
// Runs what `fabrica` planned for one agent with its own CLI, never editing ~/.claude.json or config.toml by hand:
|
|
151
|
+
// register nexakit-fabrica (or repair a broken entry: remove it and add it again), and only after that succeeded
|
|
152
|
+
// remove the old MCP. A failure never leaves the agent without a working MCP, and the next run resumes from the real
|
|
153
|
+
// state, which is read again right before.
|
|
154
|
+
export async function applyFabricaMcp(
|
|
155
|
+
client,
|
|
156
|
+
{
|
|
157
|
+
homeDirectory = os.homedir(),
|
|
158
|
+
toolkitRoot = TOOLKIT_ROOT,
|
|
159
|
+
environment = process.env,
|
|
160
|
+
codexHome = environment.CODEX_HOME ?? path.join(homeDirectory, '.codex'),
|
|
161
|
+
runCommand,
|
|
162
|
+
} = {},
|
|
163
|
+
) {
|
|
164
|
+
if (!MCP_CLIENTS.includes(client)) throw new Error(`Agente sin MCP de la fábrica: ${client}`);
|
|
165
|
+
const setup = await setupToolkit({ agent: client, homeDirectory, toolkitRoot, environment, codexHome });
|
|
166
|
+
const action = setup.mcp.fabrica[client];
|
|
167
|
+
if (!action || action.bloqueado) return false;
|
|
168
|
+
const run = runCommand ?? (await defaultRunner(COMMANDS[client], environment));
|
|
169
|
+
const step = async (args, what) => {
|
|
170
|
+
const result = await run(COMMANDS[client], args);
|
|
171
|
+
if (result?.status !== 0) {
|
|
172
|
+
const detail = String(result?.stderr || result?.stdout || result?.errorCode || '').trim();
|
|
173
|
+
throw new Error(`No se pudo ${what} en ${CLIENT_NAMES[client]}.${detail ? ` ${detail}` : ''}`);
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
if (action.registrar || action.reparar) {
|
|
177
|
+
const entry = path.join(setup.activeRoot, MCP_SUFFIX);
|
|
178
|
+
if (!(await stat(entry))) throw new Error(`No se pudo registrar ${MCP_NAME}: falta ${entry}.`);
|
|
179
|
+
if (action.reparar) await step(removeArgs(client, MCP_NAME), `quitar el registro roto de ${MCP_NAME}`);
|
|
180
|
+
await step(addArgs(client, await resolveNodeExecutable(environment), entry), `registrar ${MCP_NAME}`);
|
|
181
|
+
}
|
|
182
|
+
if (action.retirar) await step(removeArgs(client, action.retirar), `retirar el MCP antiguo ${action.retirar}`);
|
|
183
|
+
return true;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// The MCP entries of nexakit in one agent: nexakit-fabrica and the old one, only when they run nexakit's script.
|
|
187
|
+
// `quitar --global` removes exactly these.
|
|
188
|
+
export async function nexakitMcpEntries(client, { homeDirectory = os.homedir(), codexHome } = {}) {
|
|
189
|
+
let servers;
|
|
190
|
+
try {
|
|
191
|
+
servers = await readServers(client, homeDirectory, codexHome ?? path.join(homeDirectory, '.codex'));
|
|
192
|
+
} catch {
|
|
193
|
+
return [];
|
|
194
|
+
}
|
|
195
|
+
const names = [];
|
|
196
|
+
if (servers?.[MCP_NAME] && scriptOf(servers[MCP_NAME], MCP_SUFFIX)) names.push(MCP_NAME);
|
|
197
|
+
for (const name of LEGACY_MCP_NAMES)
|
|
198
|
+
if (servers?.[name] && scriptOf(servers[name], LEGACY_MCP_SUFFIX)) names.push(name);
|
|
199
|
+
return names;
|
|
200
|
+
}
|
|
201
|
+
// Removes one MCP entry with the agent's own CLI; returns null when it worked, or what failed.
|
|
202
|
+
export async function removeMcpEntry(client, name, { environment = process.env, runCommand } = {}) {
|
|
203
|
+
if (!MCP_CLIENTS.includes(client)) throw new Error(`Agente sin MCP: ${client}`);
|
|
204
|
+
const run = runCommand ?? (await defaultRunner(COMMANDS[client], environment));
|
|
205
|
+
let result;
|
|
206
|
+
try {
|
|
207
|
+
result = await run(COMMANDS[client], removeArgs(client, name));
|
|
208
|
+
} catch (error) {
|
|
209
|
+
result = { status: null, stderr: error instanceof Error ? error.message : String(error) };
|
|
210
|
+
}
|
|
211
|
+
if (result?.status === 0) return null;
|
|
212
|
+
const detail = result?.errorCode === 'ENOENT' ? `no encontré ${COMMANDS[client]}` : String(result?.stderr || result?.stdout || result?.errorCode || '').trim();
|
|
213
|
+
return `No se pudo retirar ${name} de ${CLIENT_NAMES[client]}${detail ? `: ${detail}` : ''}`;
|
|
214
|
+
}
|
|
134
215
|
|
|
135
216
|
// Classifies every global skill link and the coordination MCP, and with `apply` creates what is missing and
|
|
136
217
|
// moves or repairs only what nexakit can prove is its own. Conflicts are skipped and reported, never replaced.
|
|
@@ -215,9 +296,12 @@ export async function setupToolkit({
|
|
|
215
296
|
}
|
|
216
297
|
for (const item of skills) item.source = path.join(activeRoot, 'skills', item.name);
|
|
217
298
|
|
|
218
|
-
const mcpStates = {}
|
|
299
|
+
const mcpStates = {},
|
|
300
|
+
fabrica = {};
|
|
219
301
|
for (const client of clients.filter((c) => MCP_CLIENTS.includes(c))) {
|
|
220
|
-
|
|
302
|
+
const { fabrica: action, ...state } = await inspectMcp(client, home, codexHome, { activeRoots, isOwned });
|
|
303
|
+
mcpStates[client] = state;
|
|
304
|
+
if (action) fabrica[client] = action;
|
|
221
305
|
}
|
|
222
306
|
const mcpDeadRoot = Object.values(mcpStates).find((s) => s.state === 'roto-ajeno')?.root;
|
|
223
307
|
const legacy = legacyGroups(skills, {
|
|
@@ -294,11 +378,13 @@ export async function setupToolkit({
|
|
|
294
378
|
}
|
|
295
379
|
|
|
296
380
|
const obsolete = Object.entries(mcpStates)
|
|
297
|
-
.filter(([, state]) => state.
|
|
381
|
+
.filter(([, state]) => state.retirar)
|
|
298
382
|
.map(([client, state]) => ({
|
|
299
383
|
message: 'Ya no se usa; si quieres quitarlo:',
|
|
300
384
|
command:
|
|
301
|
-
client === 'codex' ? `codex mcp remove ${state.
|
|
385
|
+
client === 'codex' ? `codex mcp remove ${state.retirar}` : `claude mcp remove ${state.retirar} -s user`,
|
|
386
|
+
// `npx nexakit` migrates it when it is nexakit's: `comprobar` shows that instead of this command.
|
|
387
|
+
...(fabrica[client]?.retirar && { migrated: client }),
|
|
302
388
|
}));
|
|
303
389
|
const agentsPath = path.join(codexHome, 'agents');
|
|
304
390
|
for (const name of await fs.readdir(agentsPath).catch(() => [])) {
|
|
@@ -332,6 +418,10 @@ export async function setupToolkit({
|
|
|
332
418
|
states: mcpStates,
|
|
333
419
|
registrationCommands,
|
|
334
420
|
...(registrationPending.length && { registrationPending }),
|
|
421
|
+
// Per agent, what `npx nexakit` does with nexakit-fabrica and the old MCP (see fabricaAction), and whether the
|
|
422
|
+
// script to register exists already.
|
|
423
|
+
fabrica,
|
|
424
|
+
entryExists,
|
|
335
425
|
},
|
|
336
426
|
restartRequired: created > 0,
|
|
337
427
|
...(clients.includes('codex') && { codexSandbox: await codexSandbox(home, codexHome, codexProfile) }),
|
|
@@ -391,7 +481,7 @@ async function codexSandbox(home, codexHome, codexProfile) {
|
|
|
391
481
|
const unknown = (reason) => ({
|
|
392
482
|
state: 'unknown',
|
|
393
483
|
writableRoot: state,
|
|
394
|
-
hint: `${reason}: no se puede saber si Codex deja escribir en ${state}. Si
|
|
484
|
+
hint: `${reason}: no se puede saber si Codex deja escribir en ${state}. Si Gemini no consigue guardar su historial o su consumo, permite esa carpeta.`,
|
|
395
485
|
});
|
|
396
486
|
let config = {},
|
|
397
487
|
profileFiles = [];
|
|
@@ -444,7 +534,7 @@ async function sandboxState(effective, home, state, file, command, unknown) {
|
|
|
444
534
|
return {
|
|
445
535
|
state: 'read-only',
|
|
446
536
|
writableRoot: state,
|
|
447
|
-
hint: `El perfil de permisos :read-only no deja escribir:
|
|
537
|
+
hint: `El perfil de permisos :read-only no deja escribir: Gemini no puede guardar su historial. Usa sandbox_mode = "workspace-write" con ${state} en writable_roots.`,
|
|
448
538
|
};
|
|
449
539
|
return unknown('Codex usa un perfil de permisos propio');
|
|
450
540
|
}
|
|
@@ -455,7 +545,7 @@ async function sandboxState(effective, home, state, file, command, unknown) {
|
|
|
455
545
|
return {
|
|
456
546
|
state: 'read-only',
|
|
457
547
|
writableRoot: state,
|
|
458
|
-
hint: `Codex está en solo lectura:
|
|
548
|
+
hint: `Codex está en solo lectura: Gemini no puede guardar su historial. Usa sandbox_mode = "workspace-write" con ${state} en writable_roots.`,
|
|
459
549
|
};
|
|
460
550
|
if (mode !== undefined && mode !== 'workspace-write')
|
|
461
551
|
return unknown(`sandbox_mode = ${JSON.stringify(mode)} no es conocido`);
|
|
@@ -485,44 +575,75 @@ async function boundedConfig(file) {
|
|
|
485
575
|
if (!info.isFile() || info.isSymbolicLink() || info.size > 1_048_576) throw new Error('config');
|
|
486
576
|
return fs.readFile(file);
|
|
487
577
|
}
|
|
488
|
-
// The
|
|
489
|
-
|
|
578
|
+
// The script a server entry runs when it is `node …/<suffix>`; anything else is not nexakit's.
|
|
579
|
+
function scriptOf(server, suffix) {
|
|
580
|
+
const entry = Array.isArray(server?.args)
|
|
581
|
+
? server.args.find((arg) => typeof arg === 'string' && arg.replaceAll('\\', '/').endsWith(`/${suffix}`))
|
|
582
|
+
: undefined;
|
|
583
|
+
const runsNode = typeof server?.command === 'string' && /^node(\.exe)?$/iu.test(path.basename(server.command));
|
|
584
|
+
return runsNode ? entry : undefined;
|
|
585
|
+
}
|
|
586
|
+
// null when the agent has no configuration file yet.
|
|
587
|
+
async function readServers(client, home, codexHome) {
|
|
588
|
+
const bytes = await boundedConfig(
|
|
589
|
+
client === 'codex' ? path.join(codexHome, 'config.toml') : path.join(home, '.claude.json'),
|
|
590
|
+
);
|
|
591
|
+
if (!bytes) return null;
|
|
592
|
+
return client === 'codex'
|
|
593
|
+
? getStaticTOMLValue(parseTOML(bytes.toString('utf8'), { tomlVersion: '1.0.0' })).mcp_servers ?? {}
|
|
594
|
+
: JSON.parse(bytes.toString('utf8')).mcpServers ?? {};
|
|
595
|
+
}
|
|
596
|
+
const REPAIRABLE_MCP_STATES = ['efimero', 'roto-propio', 'roto-ajeno'];
|
|
597
|
+
// What `npx nexakit` does in one agent: register nexakit-fabrica when it is missing, repair it when its entry points
|
|
598
|
+
// at a copy that is gone, and remove the old MCP (`oldName`, only when it runs nexakit's old script) only if
|
|
599
|
+
// nexakit-fabrica is healthy or is being registered or repaired in the same step. An entry the person disabled, or
|
|
600
|
+
// a server of someone else under that name, is left alone, and then the old MCP stays too. null: nothing to do.
|
|
601
|
+
function fabricaAction(current, oldName) {
|
|
602
|
+
const old = oldName ? { retirar: oldName } : {};
|
|
603
|
+
if (!current) return { registrar: true, ...old };
|
|
604
|
+
if (REPAIRABLE_MCP_STATES.includes(current.state)) return { reparar: true, ...old };
|
|
605
|
+
if (READY_LINK_STATES.includes(current.state)) return oldName ? old : null;
|
|
606
|
+
return oldName ? { bloqueado: current.state, antiguo: oldName } : null;
|
|
607
|
+
}
|
|
608
|
+
// The entry is recognized by the script it runs (`…/bin/nexakit-fabrica-mcp.js` under `node`), then classified like
|
|
609
|
+
// a link: installed only if that script exists in a root in use. The MCP it replaces (`agent-toolkit-workflow`,
|
|
610
|
+
// `agent-toolkit`) is reported in `retirar`: it never counts as the installed one, except when its root is dead,
|
|
611
|
+
// which `reparar` still needs to see. `fabrica` is the plan for both (fabricaAction).
|
|
490
612
|
async function inspectMcp(client, home, codexHome, { activeRoots, isOwned }) {
|
|
491
613
|
let servers;
|
|
492
614
|
try {
|
|
493
|
-
|
|
494
|
-
client === 'codex' ? path.join(codexHome, 'config.toml') : path.join(home, '.claude.json'),
|
|
495
|
-
);
|
|
496
|
-
if (!bytes) return { state: 'falta' };
|
|
497
|
-
servers =
|
|
498
|
-
client === 'codex'
|
|
499
|
-
? getStaticTOMLValue(parseTOML(bytes.toString('utf8'), { tomlVersion: '1.0.0' })).mcp_servers
|
|
500
|
-
: JSON.parse(bytes.toString('utf8')).mcpServers;
|
|
615
|
+
servers = await readServers(client, home, codexHome);
|
|
501
616
|
} catch {
|
|
502
617
|
return { state: 'unreadable' };
|
|
503
618
|
}
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
619
|
+
if (!servers) return { state: 'falta', fabrica: fabricaAction(null, null) };
|
|
620
|
+
const classify = async (name, suffix) => {
|
|
621
|
+
const server = servers[name];
|
|
622
|
+
if (!server) return null;
|
|
507
623
|
if (server.enabled === false) return { state: 'disabled', name };
|
|
508
|
-
const entry =
|
|
509
|
-
|
|
510
|
-
(arg) => typeof arg === 'string' && arg.replaceAll('\\', '/').endsWith(`/${MCP_SUFFIX}`),
|
|
511
|
-
)
|
|
512
|
-
: undefined;
|
|
513
|
-
const runsNode =
|
|
514
|
-
typeof server.command === 'string' && /^node(\.exe)?$/iu.test(path.basename(server.command));
|
|
515
|
-
if (!entry || !runsNode) return { state: 'conflicto', name };
|
|
624
|
+
const entry = scriptOf(server, suffix);
|
|
625
|
+
if (!entry) return { state: 'conflicto', name };
|
|
516
626
|
const { state, root } = await classifyReference({
|
|
517
627
|
target: mcpRegistryTarget(client, name),
|
|
518
628
|
literal: entry,
|
|
519
|
-
suffix
|
|
629
|
+
suffix,
|
|
520
630
|
activeRoots,
|
|
521
631
|
isOwned,
|
|
522
632
|
});
|
|
523
633
|
return { state, name, literal: entry, ...(root && { root }) };
|
|
634
|
+
};
|
|
635
|
+
let legacy = null;
|
|
636
|
+
for (const name of LEGACY_MCP_NAMES) {
|
|
637
|
+
legacy = await classify(name, LEGACY_MCP_SUFFIX);
|
|
638
|
+
if (legacy) break;
|
|
524
639
|
}
|
|
525
|
-
|
|
640
|
+
const current = await classify(MCP_NAME, MCP_SUFFIX);
|
|
641
|
+
const oldName = legacy && scriptOf(servers[legacy.name], LEGACY_MCP_SUFFIX) ? legacy.name : null;
|
|
642
|
+
const action = fabricaAction(current, oldName);
|
|
643
|
+
const extra = { ...(legacy && { retirar: legacy.name }), ...(action && { fabrica: action }) };
|
|
644
|
+
if (current) return { ...current, ...extra };
|
|
645
|
+
if (legacy?.state === 'roto-ajeno') return { ...legacy, ...extra };
|
|
646
|
+
return { state: 'falta', ...extra };
|
|
526
647
|
}
|
|
527
648
|
async function findExecutable(name, environment, accept = () => true) {
|
|
528
649
|
const extensions = IS_WINDOWS
|
|
@@ -545,6 +666,33 @@ async function findExecutable(name, environment, accept = () => true) {
|
|
|
545
666
|
}
|
|
546
667
|
return null;
|
|
547
668
|
}
|
|
669
|
+
// The state of each global instructions file, without the texts: what `comprobar` reports.
|
|
670
|
+
async function reviewInstructionsReport(options) {
|
|
671
|
+
try {
|
|
672
|
+
return (await planReviewInstructions(options)).items.map(({ client, name, state, reason, update }) => ({
|
|
673
|
+
client,
|
|
674
|
+
name,
|
|
675
|
+
state,
|
|
676
|
+
...(reason && { reason }),
|
|
677
|
+
...(update && { update }),
|
|
678
|
+
}));
|
|
679
|
+
} catch {
|
|
680
|
+
return [];
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
async function leccionesInstructionsReport(options) {
|
|
684
|
+
try {
|
|
685
|
+
return (await planLeccionesInstructions(options)).items.map(({ client, name, state, reason, update }) => ({
|
|
686
|
+
client,
|
|
687
|
+
name,
|
|
688
|
+
state,
|
|
689
|
+
...(reason && { reason }),
|
|
690
|
+
...(update && { update }),
|
|
691
|
+
}));
|
|
692
|
+
} catch {
|
|
693
|
+
return [];
|
|
694
|
+
}
|
|
695
|
+
}
|
|
548
696
|
export async function executable(name, environment) {
|
|
549
697
|
return Boolean(await findExecutable(name, environment));
|
|
550
698
|
}
|
|
@@ -595,6 +743,13 @@ export async function doctorToolkit({
|
|
|
595
743
|
retiredSkills: setup.retiredSkills,
|
|
596
744
|
registrationCommands: setup.mcp.registrationCommands,
|
|
597
745
|
...(setup.mcp.registrationPending && { registrationPending: setup.mcp.registrationPending }),
|
|
746
|
+
// What `npx nexakit` would migrate or leaves alone; `comprobar` only reports it.
|
|
747
|
+
fabricaMcp: setup.mcp.entryExists
|
|
748
|
+
? setup.mcp.fabrica
|
|
749
|
+
: Object.fromEntries(Object.entries(setup.mcp.fabrica).filter(([, action]) => !action.registrar && !action.reparar)),
|
|
750
|
+
reviewInstructions: await reviewInstructionsReport({ homeDirectory, environment, codexHome, agents: setup.clients }),
|
|
751
|
+
leccionesInstructions: await leccionesInstructionsReport({ homeDirectory, environment, codexHome, agents: setup.clients }),
|
|
752
|
+
...(setup.clients.includes('codex') && { codexAgents: await teamMarks({ codexHome }) }),
|
|
598
753
|
activeRoot: setup.activeRoot,
|
|
599
754
|
legacy: setup.legacy,
|
|
600
755
|
...(setup.otherCopy && { otherCopy: setup.otherCopy }),
|
|
@@ -38,29 +38,18 @@ la bóveda, una carpeta sincronizada o un repositorio público por defecto.
|
|
|
38
38
|
|
|
39
39
|
## Ayudas locales disponibles
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
[
|
|
44
|
-
|
|
45
|
-
instalación global:
|
|
46
|
-
|
|
47
|
-
```text
|
|
48
|
-
node bin/agent-task.js --help
|
|
49
|
-
node bin/agent-task.js verify --help
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
`prepare` no escribe ni envía el encargo, ni interpreta tareas libres mediante IA
|
|
53
|
-
ni verifica cuentas. `verify` no aplica una propuesta ni acredita permisos,
|
|
54
|
-
calidad, estado Git completo o modelo. `prepared-draft` y `matched` no autorizan
|
|
55
|
-
al siguiente agente: la revisión humana y el permiso del receptor siguen aparte.
|
|
41
|
+
Las plantillas se completan a mano: no hay un preparador ni un verificador
|
|
42
|
+
automáticos. Para pedir una revisión por otras IA existe la
|
|
43
|
+
[fábrica](../../docs/agentes/coordinacion/fabrica.md), que no sustituye el permiso
|
|
44
|
+
del receptor ni la revisión humana del encargo.
|
|
56
45
|
|
|
57
46
|
## Modelo recomendado y modelo observado
|
|
58
47
|
|
|
59
48
|
El [selector local](../../docs/agentes/modelos/agent-model-selector.md) recomienda a partir de
|
|
60
49
|
solicitud, catálogo y política; no guarda informes, ejecuta IA o cambia el CLI.
|
|
61
50
|
Estas plantillas tampoco lo invocan automáticamente. Su bloque se completa
|
|
62
|
-
manualmente
|
|
63
|
-
|
|
51
|
+
manualmente y la persona la revisa; no deja listo un encargo bajo esta política
|
|
52
|
+
por el simple hecho de haberla rellenado.
|
|
64
53
|
|
|
65
54
|
1. El coordinador obtiene una decisión para el participante y rol realmente
|
|
66
55
|
encargados, con datos de confianza y acceso declarado. Si faltan datos, no
|
|
@@ -201,8 +190,7 @@ no demuestra cumplimiento de agentes reales ni instala barreras técnicas.
|
|
|
201
190
|
|
|
202
191
|
## Qué falta y qué ya se puede utilizar
|
|
203
192
|
|
|
204
|
-
Las plantillas
|
|
205
|
-
apoyar entregas manuales delimitadas. Sus datos ficticios no sirven como política
|
|
193
|
+
Las plantillas pueden apoyar entregas manuales delimitadas. Sus datos ficticios no sirven como política
|
|
206
194
|
real de modelos. Cuando exista inventario y evaluación aprobados, un traspaso
|
|
207
195
|
nuevo conservará sus propios permisos y evidencia; no se repite ni altera el
|
|
208
196
|
piloto histórico para rellenar datos faltantes.
|
package/bin/agent-task.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { loadWithDependencyCheck } from "../src/missing-dependencies.js";
|
|
3
|
-
|
|
4
|
-
const cli = await loadWithDependencyCheck(() => import("../src/task-cli.js"));
|
|
5
|
-
if (cli) {
|
|
6
|
-
const write = (stream, text) => new Promise((resolve, reject) => stream.write(text, error => error ? reject(error) : resolve()));
|
|
7
|
-
// Catch stream errors such as EPIPE without a raw stack or a retry.
|
|
8
|
-
process.stdout.on("error", () => {});
|
|
9
|
-
process.stderr.on("error", () => {});
|
|
10
|
-
process.exitCode = await cli.runTaskCli(process.argv.slice(2), {
|
|
11
|
-
out: text => write(process.stdout, text),
|
|
12
|
-
err: text => write(process.stderr, text)
|
|
13
|
-
});
|
|
14
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { loadWithDependencyCheck } from "../src/missing-dependencies.js";
|
|
3
|
-
|
|
4
|
-
const cli = await loadWithDependencyCheck(() => import("../src/peer-inbox-cli.js"));
|
|
5
|
-
if (cli) {
|
|
6
|
-
const write = (stream, text) => new Promise((resolve, reject) => stream.write(text, error => error ? reject(error) : resolve()));
|
|
7
|
-
// Catch stream errors such as EPIPE without a raw stack or a retry.
|
|
8
|
-
process.stdout.on("error", () => {});
|
|
9
|
-
process.stderr.on("error", () => {});
|
|
10
|
-
process.exitCode = await cli.runPeerInboxCli(process.argv.slice(2), {
|
|
11
|
-
out: text => write(process.stdout, text),
|
|
12
|
-
err: text => write(process.stderr, text)
|
|
13
|
-
});
|
|
14
|
-
}
|
package/bin/agent-toolkit-mcp.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { loadWithDependencyCheck } from "../src/missing-dependencies.js";
|
|
3
|
-
|
|
4
|
-
const modules = await loadWithDependencyCheck(async () => {
|
|
5
|
-
const [{ serveStdio }, { createTaskWorkflowMcp }] = await Promise.all([
|
|
6
|
-
import("@modelcontextprotocol/server/stdio"),
|
|
7
|
-
import("../src/task-workflow-mcp.js")
|
|
8
|
-
]);
|
|
9
|
-
return { serveStdio, createTaskWorkflowMcp };
|
|
10
|
-
});
|
|
11
|
-
if (modules) {
|
|
12
|
-
modules.serveStdio(() => modules.createTaskWorkflowMcp(), {
|
|
13
|
-
onerror() {
|
|
14
|
-
process.stderr.write("agent-toolkit-mcp: error de conexión MCP\n");
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
}
|