{
  "$schema": "./changelog-schema.json",
  "unpublished": [],
  "1.0.4-3": [
    {
      "type": "added",
      "description": "Add `session.shell.exec` and `session.shell.kill` RPC methods for executing shell commands with streaming stdout/stderr output",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4596"]
    },
    {
      "type": "fixed",
      "description": "Custom agents from --plugin-dir plugins now load correctly in ACP mode",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4615"]
    }
  ],
  "1.0.4-2": [
    {
      "type": "new",
      "description": "Adaptive color engine with dynamic color modes and interactive theme picker. Gracefully degrades on limited-color terminals and Windows",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4306"]
    },
    {
      "type": "fixed",
      "description": "MCP OAuth re-authentication works reliably when callback port changes or when using Microsoft Entra ID",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4598"]
    },
    {
      "type": "improved",
      "description": "Replace /pr open with /pr view [local|web] to view PR status locally or open in browser",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4590"]
    }
  ],
  "1.0.4-1": [
    {
      "type": "new",
      "description": "Enables OpenTelemetry instrumentation for observability into agent sessions, LLM calls, and tool executions",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4169"]
    },
    {
      "type": "added",
      "description": "Extensions can now be written as CommonJS modules (extension.cjs)",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4546"]
    },
    {
      "type": "added",
      "description": "Show loaded extensions count in the Environment loaded startup message",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4479"]
    },
    {
      "type": "added",
      "description": "Support disableAllHooks flag to disable all hooks from a configuration file",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4451"],
      "related_issues": ["https://github.com/github/copilot-agent-runtime/issues/4195"]
    },
    {
      "type": "added",
      "description": "Support Azure DevOps repository identification in session logs",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4504"]
    },
    {
      "type": "fixed",
      "description": "Session export header renders each field on its own line in shared gists",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/3922"]
    },
    {
      "type": "fixed",
      "description": "Auto-update now retries without authentication token on SAML enforcement errors",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4523"]
    },
    {
      "type": "fixed",
      "description": "Autopilot mode stops continuing after API errors instead of looping indefinitely",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4553"]
    },
    {
      "type": "fixed",
      "description": "Status line context window percentage no longer inflates across turns by using the last call's input and output tokens instead of cumulative totals",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4420"],
      "related_issues": ["https://github.com/github/copilot-agent-runtime/issues/4419"]
    },
    {
      "type": "fixed",
      "description": "Kitty keyboard protocol is properly disabled on suspend when using alternate screen",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4573"]
    },
    {
      "type": "improved",
      "description": "Only show reasoning headers when it's the only reasoning text available.",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4549"]
    },
    {
      "type": "improved",
      "description": "Terminal properly resets when CLI crashes, preventing shell corruption",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4527"]
    },
    {
      "type": "improved",
      "description": "/update command automatically restarts to apply updates instead of requiring manual exit",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4531"]
    },
    {
      "type": "improved",
      "description": "OAuth authentication now handles Microsoft Entra ID and other OIDC servers reliably with proper resource indicators and refresh token support",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4376"]
    },
    {
      "type": "improved",
      "description": "Show individual instruction file names in /instructions picker with [external] labels for injected files",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4415"],
      "related_issues": ["https://github.com/github/copilot-agent-runtime/issues/4380"]
    },
    {
      "type": "improved",
      "description": "Path permission dialog offers a one-time approval option in addition to adding the path to the allowed list",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4588"]
    }
  ],
  "1.0.4-0": [
    {
      "type": "added",
      "description": "Add --reasoning-effort CLI flag to set reasoning effort level",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4481"]
    },
    {
      "type": "added",
      "description": "Hooks can now request user confirmation before tool execution with 'ask' permission decision",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4399"],
      "related_issues": ["https://github.com/github/copilot-agent-runtime/issues/4342"]
    },
    {
      "type": "added",
      "description": "Add configure-copilot sub-agent for managing MCP servers, custom agents, and skills via the task tool",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/3664"]
    },
    {
      "type": "fixed",
      "description": "Interactive shell initialization no longer times out on slow machines",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4416"]
    },
    {
      "type": "improved",
      "description": "Faster shell commands on Windows by skipping PowerShell profile loading",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4416"]
    },
    {
      "type": "improved",
      "description": "Improve CLI help documentation to use standard --option=value format and comma-separated list syntax",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4490"]
    }
  ],
  "1.0.3": [
    {
      "type": "new",
      "description": "Extensions are now available as an experimental feature — ask Copilot to write custom tools and hooks for itself using @github/copilot-sdk",
      "related_issues": ["https://github.com/github/copilot-agent-runtime/issues/4232"],
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4470"]
    },
    {
      "type": "added",
      "description": "Document GH_HOST, HTTP_PROXY, HTTPS_PROXY, NO_COLOR, and NO_PROXY environment variables in help",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4388"]
    },
    {
      "type": "added",
      "description": "Read MCP server configuration from .devcontainer/devcontainer.json",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4215"],
      "related_issues": ["https://github.com/github/copilot-cli/issues/1431"]
    },
    {
      "type": "added",
      "description": "Add --binary-version flag to query the CLI binary version without launching",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4346"]
    },
    {
      "type": "added",
      "description": "Add /restart command to hot restart the CLI while preserving your session",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4452"]
    },
    {
      "type": "added",
      "description": "Background task notifications display in timeline with expandable detail",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4265"]
    },
    {
      "type": "added",
      "description": "Type 'quit' to exit the CLI, in addition to 'exit'",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4403"],
      "related_issues": ["https://github.com/github/copilot-agent-runtime/issues/4060"]
    },
    {
      "type": "added",
      "description": "Add extraKnownMarketplaces repository setting to replace marketplaces",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4470"]
    },
    {
      "type": "added",
      "description": "Add Windows Terminal support to /terminal-setup command",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4366"]
    },
    {
      "type": "fixed",
      "description": "/reset-allowed-tools now fully undoes /allow-all and re-triggers the autopilot permission dialog",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4093"]
    },
    {
      "type": "fixed",
      "description": "Improved handling of batched queries in the SQL tool",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4383"]
    },
    {
      "type": "fixed",
      "description": "Login flow no longer hangs on Ubuntu when system keyring is unresponsive",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4349"],
      "related_issues": ["https://github.com/github/copilot-cli/issues/1866"]
    },
    {
      "type": "fixed",
      "description": "Terminal is properly reset when CLI crashes unexpectedly",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4387"]
    },
    {
      "type": "fixed",
      "description": "Table disables borders in screen reader mode to prevent announcing decorative characters",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4401"],
      "related_issues": ["https://github.com/github/copilot-agent-runtime/issues/4385"]
    },
    {
      "type": "fixed",
      "description": "MCP servers with non-conforming outputSchema are now accessible",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4345"],
      "related_issues": ["https://github.com/github/copilot-agent-runtime/issues/4324"]
    },
    {
      "type": "fixed",
      "description": "/plugin update now works for GitHub-installed plugins",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4398"],
      "related_issues": ["https://github.com/github/copilot-cli/issues/1290"]
    },
    {
      "type": "fixed",
      "description": "/add-dir directories persist across session changes like /clear and /resume",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4069"]
    },
    {
      "type": "fixed",
      "description": "Prevent env command from being treated as safe to allow without approval",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4406"],
      "related_issues": ["https://github.com/github/copilot-agent-runtime/issues/4054"]
    },
    {
      "type": "fixed",
      "description": "Placeholder text color displays correctly when wrapping in narrow terminals",
      "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/4396"]
    },
    {
      "type": "fixed",
      "description": "/plugin update now works with marketplaces defined in project settings",
      "related_pull_requests": ["htt<?php

    /********************************************************************************************************************************
     * Creado por: Luis Cano
     * Fecha creación: 01-07-2024
     * Descripción: Realiza llamada a servicio alojado en https://donatello.aptuslegal.app que devuelve token almacenado en bdd
     ********************************************************************************************************************************/
    
    class OAuthV2 {
        
        // url para servicio de autenticación
        private static $OAUTH_URL = "https://donatello.aptuslegal.app/oauth/token";
        // token para acceso en servicio de autenticación
        private static $OAUTH_SERVICE_TOKEN = "Token e68d5a079f937ea29ad2ec5a5b105b75491a0e0c";

        /**
         * Devuelve token de conexión a aplicación de cliente
         * @param { string } organizationId - ID de Organización con la que fue registrado token de aplicación del cliente
         * @returns object<Response>
         */
        public static function getToken($organizationId) {

            // configuración de headers para autorización
            $headers = [
                'Content-Type: application/json',
                'Authorization: ' . self::$OAUTH_SERVICE_TOKEN,
            ];
            
            // configuración de llamada http
            $curl = curl_init();
            curl_setopt($curl, CURLOPT_URL, self::$OAUTH_URL . "/". $organizationId);
            curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'GET');
            curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
            curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
            curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);

            // ejecución de parámetros http
            $response = curl_exec($curl);

            // verifica si hubo un error en la solicitud
            if (curl_errno($curl)) {
                $error_msg = curl_error($curl);
                curl_close($curl);
                return (object) Array(
                        "status" => "error",
                        "message" => "error trying to get oauth token:" . $error_msg
                    );
            }

            // obtención de código de respuesta http
            $http_code = curl_getinfo($curl, CURLINFO_HTTP_CODE);
            curl_close($curl);

            // verifica el código de estado HTTP
            if ($http_code !== 200) {
                return (object) Array(
                        "status" => "error",
                        "message" => "HTTP request failed with code " . $http_code
                    );
            }

            // verifica si la respuesta está vacía
            if (!$response) {
                return (object) Array(
                        "status" => "error",
                        "message" => "Empty response from server"
                    );
            }

            // codifica respuesta obtenida de servicio
            $array = json_decode($response, true);

            // verifica si la respuesta pudo ser decodificada
            if (json_last_error() !== JSON_ERROR_NONE) {
                return (object) Array(
                        "status" => "error",
                        "message" => "JSON decode error: " . json_last_error_msg()
                    );
            }

            return (object) Array(
                "status" => "success",
                "message" => "oauth token successfully obtained",
                "token" => $array['access_token']
            );
        }

    }
?>