import { PROTOCOL_VERSION } from '@agentclientprotocol/sdk';
const ACP_MODES = ['normal', 'auto-accept', 'yolo', 'plan'];
const MODE_MAP = {
    normal: 'normal',
    'auto-accept': 'auto-accept',
    yolo: 'yolo',
    plan: 'plan',
};
export function getAgentCapabilities() {
    return {
        loadSession: true,
        sessionCapabilities: {
            close: {},
        },
    };
}
export function getAvailableModes() {
    return ACP_MODES;
}
/**
 * Resolve the protocol version to report back to the client. We must never
 * claim support for a newer protocol than this SDK implements, so clamp the
 * client's requested version down to ours.
 */
export function negotiateProtocolVersion(requested) {
    if (typeof requested === 'number' && requested < PROTOCOL_VERSION) {
        return requested;
    }
    return PROTOCOL_VERSION;
}
export function acpModeToDevelopmentMode(modeId) {
    return MODE_MAP[modeId] ?? 'auto-accept';
}
export function developmentModeToAcpMode(mode) {
    if (mode === 'headless')
        return 'auto-accept';
    return mode;
}
//# sourceMappingURL=acp-capabilities.js.map