Repository Public
1// SP Wallet Core2// File: Sources/SPWalletCore/Domains/Ops/AlertCatalog.swift3// Description: The alert catalogue of the backend (packages/core/src/alert-catalog.ts): every alert kind with its group, default4// severity, default switch and FR/EN wording. GENERATED from the backend's own TypeScript (ALERT_DEFS, SAFE_PARAMS,5// VOCAB are read by a script, never typed by hand) — regenerate when the backend adds a kind; do not edit.6// A kind this file does not know decodes to `.unknown(String)` and is shown verbatim.7//8// Author: Simon-Pierre Boucher9// Contact: contact@spboucher.ai10import Foundation1112/** The kind of an alert. 66 kinds in the catalogue of production (branch v11); anything else is `.unknown`. */13public enum AlertKind: Sendable, Hashable, Codable, CustomStringConvertible {14 case transferConfirmed15 case transferFailed16 case swapConfirmed17 case swapFailed18 case bridgeConfirmed19 case bridgeFailed20 case transferStuck21 case depositReceived22 case planStepReady23 case planPaused24 case planDone25 case agentOrderFilled26 case agentStoppedLoss27 case agentStoppedMandate28 case agentStopped29 case agentMmBreaker30 case agentMmHalted31 case agentMmDeadManSwitch32 case agentMmSignerRefusals33 case agentMmRateBudget34 case agentMmSessionEnded35 case agentMandateRevoked36 case agentDataStale37 case agentSignalFailures38 case agentResearchSubmitted39 case agentResearchFailed40 case mandateExpiring41 case derivPaperFilled42 case derivLiveFilled43 case derivOrderRejected44 case derivOrderUnknown45 case derivPositionOpened46 case derivPositionClosed47 case derivMarginWarning48 case derivPaperLiquidation49 case derivLiveLiquidation50 case derivFunding51 case derivLossLimit52 case derivHalt53 case derivDivergence54 case derivDivergenceCleared55 case derivAssetTableMismatch56 case securityPasskeyAdded57 case securityNewDevice58 case securityLoginFailed59 case securitySignerUnreachable60 case securitySignerBack61 case securitySignerHalted62 case securitySignerUnhalted63 case securityKillSwitchOn64 case securityKillSwitchOff65 case securitySignerRefused66 case securityPinMismatch67 case securityAuditBroken68 case securityPolicyChanged69 case systemApiRestarted70 case systemWorkerFailing71 case systemBackupMissing72 case systemDiskLow73 case systemLabSandboxUnavailable74 case systemLabSandboxBack75 case systemLabSandboxOff76 case connDown77 case connUp78 case systemAlertsCapped79 case systemTest80 /** A kind added by a newer server: kept verbatim, never mapped to a known one. */81 case unknown(String)8283 public static let allKnown: [AlertKind] = [.transferConfirmed, .transferFailed, .swapConfirmed, .swapFailed, .bridgeConfirmed, .bridgeFailed, .transferStuck, .depositReceived, .planStepReady, .planPaused, .planDone, .agentOrderFilled, .agentStoppedLoss, .agentStoppedMandate, .agentStopped, .agentMmBreaker, .agentMmHalted, .agentMmDeadManSwitch, .agentMmSignerRefusals, .agentMmRateBudget, .agentMmSessionEnded, .agentMandateRevoked, .agentDataStale, .agentSignalFailures, .agentResearchSubmitted, .agentResearchFailed, .mandateExpiring, .derivPaperFilled, .derivLiveFilled, .derivOrderRejected, .derivOrderUnknown, .derivPositionOpened, .derivPositionClosed, .derivMarginWarning, .derivPaperLiquidation, .derivLiveLiquidation, .derivFunding, .derivLossLimit, .derivHalt, .derivDivergence, .derivDivergenceCleared, .derivAssetTableMismatch, .securityPasskeyAdded, .securityNewDevice, .securityLoginFailed, .securitySignerUnreachable, .securitySignerBack, .securitySignerHalted, .securitySignerUnhalted, .securityKillSwitchOn, .securityKillSwitchOff, .securitySignerRefused, .securityPinMismatch, .securityAuditBroken, .securityPolicyChanged, .systemApiRestarted, .systemWorkerFailing, .systemBackupMissing, .systemDiskLow, .systemLabSandboxUnavailable, .systemLabSandboxBack, .systemLabSandboxOff, .connDown, .connUp, .systemAlertsCapped, .systemTest]8485 public var rawValue: String {86 switch self {87 case .transferConfirmed: "transfer.confirmed"88 case .transferFailed: "transfer.failed"89 case .swapConfirmed: "swap.confirmed"90 case .swapFailed: "swap.failed"91 case .bridgeConfirmed: "bridge.confirmed"92 case .bridgeFailed: "bridge.failed"93 case .transferStuck: "transfer.stuck"94 case .depositReceived: "deposit.received"95 case .planStepReady: "plan.step_ready"96 case .planPaused: "plan.paused"97 case .planDone: "plan.done"98 case .agentOrderFilled: "agent.order_filled"99 case .agentStoppedLoss: "agent.stopped_loss"100 case .agentStoppedMandate: "agent.stopped_mandate"101 case .agentStopped: "agent.stopped"102 case .agentMmBreaker: "agent.mm_breaker"103 case .agentMmHalted: "agent.mm_halted"104 case .agentMmDeadManSwitch: "agent.mm_dead_man_switch"105 case .agentMmSignerRefusals: "agent.mm_signer_refusals"106 case .agentMmRateBudget: "agent.mm_rate_budget"107 case .agentMmSessionEnded: "agent.mm_session_ended"108 case .agentMandateRevoked: "agent.mandate_revoked"109 case .agentDataStale: "agent.data_stale"110 case .agentSignalFailures: "agent.signal_failures"111 case .agentResearchSubmitted: "agent.research_submitted"112 case .agentResearchFailed: "agent.research_failed"113 case .mandateExpiring: "mandate.expiring"114 case .derivPaperFilled: "deriv.paper.filled"115 case .derivLiveFilled: "deriv.live.filled"116 case .derivOrderRejected: "deriv.order_rejected"117 case .derivOrderUnknown: "deriv.order_unknown"118 case .derivPositionOpened: "deriv.position_opened"119 case .derivPositionClosed: "deriv.position_closed"120 case .derivMarginWarning: "deriv.margin_warning"121 case .derivPaperLiquidation: "deriv.paper.liquidation"122 case .derivLiveLiquidation: "deriv.live.liquidation"123 case .derivFunding: "deriv.funding"124 case .derivLossLimit: "deriv.loss_limit"125 case .derivHalt: "deriv.halt"126 case .derivDivergence: "deriv.divergence"127 case .derivDivergenceCleared: "deriv.divergence_cleared"128 case .derivAssetTableMismatch: "deriv.asset_table_mismatch"129 case .securityPasskeyAdded: "security.passkey_added"130 case .securityNewDevice: "security.new_device"131 case .securityLoginFailed: "security.login_failed"132 case .securitySignerUnreachable: "security.signer_unreachable"133 case .securitySignerBack: "security.signer_back"134 case .securitySignerHalted: "security.signer_halted"135 case .securitySignerUnhalted: "security.signer_unhalted"136 case .securityKillSwitchOn: "security.kill_switch_on"137 case .securityKillSwitchOff: "security.kill_switch_off"138 case .securitySignerRefused: "security.signer_refused"139 case .securityPinMismatch: "security.pin_mismatch"140 case .securityAuditBroken: "security.audit_broken"141 case .securityPolicyChanged: "security.policy_changed"142 case .systemApiRestarted: "system.api_restarted"143 case .systemWorkerFailing: "system.worker_failing"144 case .systemBackupMissing: "system.backup_missing"145 case .systemDiskLow: "system.disk_low"146 case .systemLabSandboxUnavailable: "system.lab_sandbox_unavailable"147 case .systemLabSandboxBack: "system.lab_sandbox_back"148 case .systemLabSandboxOff: "system.lab_sandbox_off"149 case .connDown: "conn.down"150 case .connUp: "conn.up"151 case .systemAlertsCapped: "system.alerts_capped"152 case .systemTest: "system.test"153 case .unknown(let s): s154 }155 }156 public init(rawValue: String) { self = AlertCatalog.kindsByRawValue[rawValue] ?? .unknown(rawValue) }157 public init(from decoder: Decoder) throws { self.init(rawValue: try decoder.singleValueContainer().decode(String.self)) }158 public func encode(to encoder: Encoder) throws { var c = encoder.singleValueContainer(); try c.encode(rawValue) }159 public var description: String { rawValue }160 public var isKnown: Bool { if case .unknown = self { false } else { true } }161}162163extension AlertCatalog {164 static let kindsByRawValue: [String: AlertKind] = Dictionary(uniqueKeysWithValues: AlertKind.allKnown.map { ($0.rawValue, $0) })165166 /** Parameters that may appear on a lock screen and in a webhook without "details" (SAFE_PARAMS). */167 public static let safeParams: [String] = ["agent", "account", "network", "to", "what", "mode", "scope", "count", "minutes", "hours", "seconds", "bars", "interval", "instrument", "name", "loop", "pct", "positions", "state"]168169 /** Parameter values of the form `@word` are vocabulary, translated where the alert is shown (VOCAB): [fr, en]. */170 static let vocabulary: [String: [String]] = [171 "paper": ["papier, simulé", "paper, simulated"],172 "live": ["réel", "live"],173 "transfer": ["Transfert", "Transfer"],174 "swap": ["Échange", "Swap"],175 "bridge": ["Transfert inter-réseaux", "Bridge transfer"],176 "buy": ["achat", "buy"],177 "sell": ["vente", "sell"],178 "daily": ["quotidienne", "daily"],179 "total": ["totale", "total"],180 "router": ["Routeur d’échange", "Swap router"],181 "jupiter": ["Programme Jupiter", "Jupiter program"],182 "cctp": ["Contrats CCTP (Circle)", "CCTP contracts (Circle)"],183 "signer": ["Signataire", "Signer"],184 "derivatives": ["Compte de dérivés", "Derivatives account"],185 "signed": ["signé", "signed"],186 "broadcast": ["diffusé", "broadcast"],187 "confirming": ["en confirmation", "confirming"],188 "attesting": ["en attente d’attestation", "awaiting attestation"],189 "minting": ["en cours de réception", "minting"],190 "market": ["Données de marché", "Market data"],191 "rpc": ["RPC", "RPC"],192 "unknown": ["inconnu", "unknown"],193 "failed": ["échec", "failed"],194 "over_budget": ["budget dépassé", "over budget"],195 ]196197 /** ALERT_DEFS, in the order of the backend. */198 public static let definitions: [AlertDefinition] = [199 AlertDefinition(kind: .transferConfirmed, group: .transfers, severity: .info, defaultOn: true, fixed: false,200 title: ["Transfert confirmé", "Transfer confirmed"],201 body: ["{amount} {symbol} envoyés sur {network}.", "{amount} {symbol} sent on {network}."],202 priv: ["Sur {network}.", "On {network}."]),203 AlertDefinition(kind: .transferFailed, group: .transfers, severity: .warning, defaultOn: true, fixed: false,204 title: ["Transfert échoué", "Transfer failed"],205 body: ["{amount} {symbol} sur {network} : {reason}", "{amount} {symbol} on {network}: {reason}"],206 priv: ["Sur {network}. Rien de plus n’a été envoyé.", "On {network}. Nothing more was sent."]),207 AlertDefinition(kind: .swapConfirmed, group: .transfers, severity: .info, defaultOn: true, fixed: false,208 title: ["Échange confirmé", "Swap confirmed"],209 body: ["{amount} {symbol} échangés contre {toSymbol} sur {network}.", "{amount} {symbol} swapped for {toSymbol} on {network}."],210 priv: ["Sur {network}.", "On {network}."]),211 AlertDefinition(kind: .swapFailed, group: .transfers, severity: .warning, defaultOn: true, fixed: false,212 title: ["Échange échoué", "Swap failed"],213 body: ["{amount} {symbol} sur {network} : {reason}", "{amount} {symbol} on {network}: {reason}"],214 priv: ["Sur {network}.", "On {network}."]),215 AlertDefinition(kind: .bridgeConfirmed, group: .transfers, severity: .info, defaultOn: true, fixed: false,216 title: ["Transfert inter-réseaux terminé", "Bridge transfer completed"],217 body: ["{amount} {symbol} arrivés sur {to} (depuis {network}).", "{amount} {symbol} arrived on {to} (from {network})."],218 priv: ["De {network} vers {to}.", "From {network} to {to}."]),219 AlertDefinition(kind: .bridgeFailed, group: .transfers, severity: .warning, defaultOn: true, fixed: false,220 title: ["Transfert inter-réseaux à vérifier", "Bridge transfer needs attention"],221 body: ["{network} → {to} : {reason}", "{network} → {to}: {reason}"],222 priv: ["De {network} vers {to}.", "From {network} to {to}."]),223 AlertDefinition(kind: .transferStuck, group: .transfers, severity: .warning, defaultOn: true, fixed: false,224 title: ["Opération en attente", "Operation still pending"],225 body: ["{what} sur {network} : toujours « {state} » après {minutes} min.", "{what} on {network}: still “{state}” after {minutes} min."],226 priv: ["{what} sur {network} : en attente depuis {minutes} min.", "{what} on {network}: pending for {minutes} min."]),227 AlertDefinition(kind: .depositReceived, group: .transfers, severity: .info, defaultOn: true, fixed: false,228 title: ["Dépôt reçu", "Deposit received"],229 body: ["{amount} {symbol} reçus sur {network}.", "{amount} {symbol} received on {network}."],230 priv: ["Sur {network}.", "On {network}."]),231 AlertDefinition(kind: .planStepReady, group: .transfers, severity: .info, defaultOn: true, fixed: false,232 title: ["Plan : étape à approuver", "Plan: step to approve"],233 body: ["{what} : l’étape {step} sur {steps} est prête sur {network}. Elle attend votre clé d’accès.", "{what}: step {step} of {steps} is ready on {network}. It waits for your passkey."],234 priv: ["Une étape d’un plan d’échange attend votre approbation sur {network}.", "A step of a swap plan waits for your approval on {network}."]),235 AlertDefinition(kind: .planPaused, group: .transfers, severity: .warning, defaultOn: true, fixed: false,236 title: ["Plan en pause", "Plan paused"],237 body: ["{what} : arrêté à l’étape {step} sur {steps}. {reason} Les fonds restent dans votre portefeuille.", "{what}: stopped at step {step} of {steps}. {reason} The funds stay in your wallet."],238 priv: ["Un plan d’échange est en pause sur {network}. Les fonds restent dans votre portefeuille.", "A swap plan is paused on {network}. The funds stay in your wallet."]),239 AlertDefinition(kind: .planDone, group: .transfers, severity: .info, defaultOn: true, fixed: false,240 title: ["Plan terminé", "Plan completed"],241 body: ["{what} : {amount} {symbol} reçus après {steps} étape(s).", "{what}: {amount} {symbol} received after {steps} step(s)."],242 priv: ["Un plan d’échange est terminé.", "A swap plan is completed."]),243 AlertDefinition(kind: .agentOrderFilled, group: .agents, severity: .info, defaultOn: true, fixed: false,244 title: ["Ordre d’agent exécuté", "Agent order filled"],245 body: ["{agent} : {count} ordre(s) exécuté(s), dernier {from} → {to}.", "{agent}: {count} order(s) filled, last {from} → {to}."],246 priv: ["{agent} : {count} ordre(s) exécuté(s).", "{agent}: {count} order(s) filled."]),247 AlertDefinition(kind: .agentStoppedLoss, group: .agents, severity: .critical, defaultOn: true, fixed: false,248 title: ["Agent arrêté : limite de perte", "Agent stopped: loss limit"],249 body: ["{agent} : {reason}", "{agent}: {reason}"],250 priv: ["{agent} a atteint sa limite de perte et s’est arrêté.", "{agent} reached its loss limit and stopped."]),251 AlertDefinition(kind: .agentStoppedMandate, group: .agents, severity: .warning, defaultOn: true, fixed: false,252 title: ["Agent arrêté : mandat expiré", "Agent stopped: mandate expired"],253 body: ["{agent} : le mandat a expiré ; approuvez-en un nouveau pour continuer.", "{agent}: the mandate expired; approve a new one to continue."],254 priv: ["{agent} : le mandat a expiré.", "{agent}: the mandate expired."]),255 AlertDefinition(kind: .agentStopped, group: .agents, severity: .warning, defaultOn: true, fixed: false,256 title: ["Agent arrêté", "Agent stopped"],257 body: ["{agent} : {reason}", "{agent}: {reason}"],258 priv: ["{agent} s’est arrêté.", "{agent} stopped."]),259 AlertDefinition(kind: .agentMmBreaker, group: .agents, severity: .warning, defaultOn: true, fixed: false,260 title: ["Tenue de marché : disjoncteur déclenché", "Market making: circuit breaker tripped"],261 body: ["{agent} ({mode}) : {what} : cotations retirées ({state}).", "{agent} ({mode}): {what}: quotes pulled ({state})."],262 priv: ["{agent} : un disjoncteur a retiré les cotations.", "{agent}: a circuit breaker pulled the quotes."]),263 AlertDefinition(kind: .agentMmHalted, group: .agents, severity: .critical, defaultOn: true, fixed: false,264 title: ["Tenue de marché : session arrêtée", "Market making: session halted"],265 body: ["{agent} ({mode}) : {what}. Les cotations sont retirées ; la session attend votre décision.", "{agent} ({mode}): {what}. Quotes are pulled; the session waits for your decision."],266 priv: ["{agent} : session de tenue de marché arrêtée.", "{agent}: market-making session halted."]),267 AlertDefinition(kind: .agentMmDeadManSwitch, group: .agents, severity: .critical, defaultOn: true, fixed: false,268 title: ["Tenue de marché : annulation programmée échue", "Market making: scheduled cancel lapsed"],269 body: ["{agent} : l’annulation programmée de la plateforme a expiré {count} fois aujourd’hui (10 déclenchements par jour au plus ; plus de cotation à partir de 8).", "{agent}: the venue’s scheduled cancel lapsed {count} time(s) today (10 triggers a day at most; no more quotes from 8)."],270 priv: ["{agent} : l’annulation programmée a expiré.", "{agent}: the scheduled cancel lapsed."]),271 AlertDefinition(kind: .agentMmSignerRefusals, group: .agents, severity: .warning, defaultOn: true, fixed: false,272 title: ["Tenue de marché : cotations refusées par le signataire", "Market making: quotes refused by the signer"],273 body: ["{agent} : {count} lot(s) refusé(s), motif : {reason}", "{agent}: {count} batch(es) refused, reason: {reason}"],274 priv: ["{agent} : le signataire a refusé des cotations.", "{agent}: the signer refused quotes."]),275 AlertDefinition(kind: .agentMmRateBudget, group: .agents, severity: .warning, defaultOn: true, fixed: false,276 title: ["Tenue de marché : limite de débit de la plateforme", "Market making: venue rate limit"],277 body: ["{agent} : {what}. Les cotations sont réduites ou retirées.", "{agent}: {what}. Quoting is reduced or pulled."],278 priv: ["{agent} : limite de débit de la plateforme.", "{agent}: venue rate limit."]),279 AlertDefinition(kind: .agentMmSessionEnded, group: .agents, severity: .info, defaultOn: true, fixed: false,280 title: ["Tenue de marché : session terminée", "Market making: session ended"],281 body: ["{agent} ({mode}) : {reason}", "{agent} ({mode}): {reason}"],282 priv: ["{agent} : session de tenue de marché terminée.", "{agent}: market-making session ended."]),283 AlertDefinition(kind: .agentMandateRevoked, group: .agents, severity: .info, defaultOn: true, fixed: false,284 title: ["Mandat révoqué", "Mandate revoked"],285 body: ["{agent} : le mandat a été révoqué ; l’agent ne peut plus signer.", "{agent}: the mandate was revoked; the agent can no longer sign."],286 priv: ["{agent} : mandat révoqué.", "{agent}: mandate revoked."]),287 AlertDefinition(kind: .agentDataStale, group: .agents, severity: .warning, defaultOn: true, fixed: false,288 title: ["Agent sans données fraîches", "Agent without fresh data"],289 body: ["{agent} n’a pas décidé depuis {bars} barres ({interval}) : données périmées ou incohérentes. Il n’a rien négocié.", "{agent} has not decided for {bars} bars ({interval}): stale or inconsistent data. It did not trade."],290 priv: ["{agent} : aucune décision depuis {bars} barres.", "{agent}: no decision for {bars} bars."]),291 AlertDefinition(kind: .agentSignalFailures, group: .agents, severity: .warning, defaultOn: true, fixed: false,292 title: ["Signal de stratégie en échec", "Strategy signal failing"],293 body: ["{agent} : {count} signaux invalides de suite ; l’agent conserve ses positions.", "{agent}: {count} invalid signals in a row; the agent is holding."],294 priv: ["{agent} : {count} signaux invalides de suite.", "{agent}: {count} invalid signals in a row."]),295 AlertDefinition(kind: .agentResearchSubmitted, group: .agents, severity: .info, defaultOn: true, fixed: false,296 title: ["Recherche terminée : stratégie à approuver", "Research done: strategy awaiting approval"],297 body: ["{name} : backtest serveur terminé ({count} essais comptés). À approuver ou à rejeter.", "{name}: server-side backtest done ({count} trials counted). Approve or dismiss it."],298 priv: ["{name} : une stratégie attend votre approbation.", "{name}: a strategy awaits your approval."]),299 AlertDefinition(kind: .agentResearchFailed, group: .agents, severity: .warning, defaultOn: true, fixed: false,300 title: ["Tâche de recherche interrompue", "Research job stopped"],301 body: ["{name} : {state} ({reason})", "{name}: {state} ({reason})"],302 priv: ["{name} : {state}.", "{name}: {state}."]),303 AlertDefinition(kind: .mandateExpiring, group: .agents, severity: .warning, defaultOn: true, fixed: false,304 title: ["Mandat bientôt expiré", "Mandate about to expire"],305 body: ["Le mandat de {agent} expire dans moins de {hours} h.", "The mandate of {agent} expires in less than {hours} h."],306 priv: ["Le mandat de {agent} expire dans moins de {hours} h.", "The mandate of {agent} expires in less than {hours} h."]),307 AlertDefinition(kind: .derivPaperFilled, group: .derivatives, severity: .info, defaultOn: true, fixed: false,308 title: ["Ordre simulé exécuté", "Simulated order filled"],309 body: ["{account} (papier, simulé) : {side} {size} {instrument} à {price}.", "{account} (paper, simulated): {side} {size} {instrument} at {price}."],310 priv: ["{account} (papier, simulé) : {instrument}.", "{account} (paper, simulated): {instrument}."]),311 AlertDefinition(kind: .derivLiveFilled, group: .derivatives, severity: .info, defaultOn: true, fixed: false,312 title: ["Ordre réel exécuté", "Live order filled"],313 body: ["{account} : {side} {size} {instrument} à {price}.", "{account}: {side} {size} {instrument} at {price}."],314 priv: ["{account} : {instrument}.", "{account}: {instrument}."]),315 AlertDefinition(kind: .derivOrderRejected, group: .derivatives, severity: .warning, defaultOn: true, fixed: false,316 title: ["Ordre refusé", "Order rejected"],317 body: ["{account} ({mode}) : {reason}", "{account} ({mode}): {reason}"],318 priv: ["{account} ({mode}) : {count} ordre(s) refusé(s).", "{account} ({mode}): {count} order(s) rejected."]),319 AlertDefinition(kind: .derivOrderUnknown, group: .derivatives, severity: .critical, defaultOn: true, fixed: false,320 title: ["Ordre réel dans un état inconnu", "Live order in an unknown state"],321 body: ["{account} : l’ordre {clientId} sur {instrument} est sans réponse de la plateforme depuis plus de {seconds} s. Vérifiez sur la plateforme.", "{account}: order {clientId} on {instrument} has had no answer from the venue for more than {seconds} s. Check on the venue."],322 priv: ["{account} : un ordre sur {instrument} est sans réponse depuis plus de {seconds} s.", "{account}: an order on {instrument} has had no answer for more than {seconds} s."]),323 AlertDefinition(kind: .derivPositionOpened, group: .derivatives, severity: .info, defaultOn: false, fixed: false,324 title: ["Position ouverte", "Position opened"],325 body: ["{account} ({mode}) : {instrument}, {size}.", "{account} ({mode}): {instrument}, {size}."],326 priv: ["{account} ({mode}) : {instrument}.", "{account} ({mode}): {instrument}."]),327 AlertDefinition(kind: .derivPositionClosed, group: .derivatives, severity: .info, defaultOn: true, fixed: false,328 title: ["Position fermée", "Position closed"],329 body: ["{account} ({mode}) : {instrument}, PnL réalisé {pnl}.", "{account} ({mode}): {instrument}, realized PnL {pnl}."],330 priv: ["{account} ({mode}) : {instrument}.", "{account} ({mode}): {instrument}."]),331 AlertDefinition(kind: .derivMarginWarning, group: .derivatives, severity: .warning, defaultOn: true, fixed: false,332 title: ["Alerte de marge", "Margin warning"],333 body: ["{account} ({mode}) : {reason}", "{account} ({mode}): {reason}"],334 priv: ["{account} ({mode}) : la marge de maintien approche des fonds propres.", "{account} ({mode}): maintenance margin is close to equity."]),335 AlertDefinition(kind: .derivPaperLiquidation, group: .derivatives, severity: .warning, defaultOn: true, fixed: false,336 title: ["Liquidation simulée", "Simulated liquidation"],337 body: ["{account} (papier) : liquidation SIMULÉE, {positions} position(s) fermée(s). Aucun fonds réel touché.", "{account} (paper): SIMULATED liquidation, {positions} position(s) closed. No real funds involved."],338 priv: ["{account} (papier) : liquidation SIMULÉE. Aucun fonds réel touché.", "{account} (paper): SIMULATED liquidation. No real funds involved."]),339 AlertDefinition(kind: .derivLiveLiquidation, group: .derivatives, severity: .critical, defaultOn: true, fixed: false,340 title: ["Liquidation", "Liquidation"],341 body: ["{account} : la plateforme a liquidé {instrument} ({size} à {price}).", "{account}: the venue liquidated {instrument} ({size} at {price})."],342 priv: ["{account} : liquidation sur {instrument}.", "{account}: liquidation on {instrument}."]),343 AlertDefinition(kind: .derivFunding, group: .derivatives, severity: .info, defaultOn: true, fixed: false,344 title: ["Paiement de financement", "Funding payment"],345 body: ["{account} ({mode}) : {amount} USD sur {instrument}.", "{account} ({mode}): {amount} USD on {instrument}."],346 priv: ["{account} ({mode}) : {instrument}.", "{account} ({mode}): {instrument}."]),347 AlertDefinition(kind: .derivLossLimit, group: .derivatives, severity: .critical, defaultOn: true, fixed: false,348 title: ["Limite de perte atteinte", "Loss limit reached"],349 body: ["{account} ({mode}) : limite de perte {scope} atteinte ; négociation arrêtée.", "{account} ({mode}): {scope} loss limit reached; trading halted."],350 priv: ["{account} ({mode}) : limite de perte {scope} atteinte ; négociation arrêtée.", "{account} ({mode}): {scope} loss limit reached; trading halted."]),351 AlertDefinition(kind: .derivHalt, group: .derivatives, severity: .critical, defaultOn: true, fixed: false,352 title: ["Arrêt de négociation", "Trading halt set"],353 body: ["{account} : arrêt posé. {reason}", "{account}: halt set. {reason}"],354 priv: ["{account} : arrêt de négociation posé.", "{account}: trading halt set."]),355 AlertDefinition(kind: .derivDivergence, group: .derivatives, severity: .critical, defaultOn: true, fixed: false,356 title: ["Écart avec la plateforme", "Divergence with the venue"],357 body: ["{account} : l’état de la plateforme et les registres du portefeuille diffèrent. {reason}", "{account}: the venue’s state and the wallet’s records differ. {reason}"],358 priv: ["{account} : l’état de la plateforme et les registres diffèrent ; nouveaux ordres arrêtés.", "{account}: venue state and records differ; new orders are stopped."]),359 AlertDefinition(kind: .derivDivergenceCleared, group: .derivatives, severity: .info, defaultOn: true, fixed: false,360 title: ["Écart résorbé", "Divergence cleared"],361 body: ["{account} : la plateforme et les registres concordent de nouveau.", "{account}: the venue and the records agree again."],362 priv: ["{account} : la plateforme et les registres concordent de nouveau.", "{account}: the venue and the records agree again."]),363 AlertDefinition(kind: .derivAssetTableMismatch, group: .derivatives, severity: .critical, defaultOn: true, fixed: false,364 title: ["Table d’actifs modifiée", "Asset table mismatch"],365 body: ["La table d’actifs de la plateforme ne correspond plus à la table épinglée : négociation réelle suspendue, rien n’est signé.", "The venue’s asset table no longer matches the pinned table: live trading is suspended, nothing is signed."],366 priv: ["Négociation réelle suspendue, rien n’est signé.", "Live trading is suspended, nothing is signed."]),367 AlertDefinition(kind: .securityPasskeyAdded, group: .security, severity: .critical, defaultOn: true, fixed: false,368 title: ["Nouvelle clé d’accès", "New passkey enrolled"],369 body: ["Une clé d’accès « {label} » a été ajoutée. Si ce n’est pas vous : arrêt d’urgence.", "A passkey “{label}” was added. If this was not you: emergency halt."],370 priv: ["Une clé d’accès a été ajoutée. Si ce n’est pas vous : arrêt d’urgence.", "A passkey was added. If this was not you: emergency halt."]),371 AlertDefinition(kind: .securityNewDevice, group: .security, severity: .warning, defaultOn: true, fixed: false,372 title: ["Connexion depuis un nouvel appareil", "Sign-in from a new device"],373 body: ["{device} ({ip}).", "{device} ({ip})."],374 priv: ["Un appareil jamais vu a ouvert une session.", "A device never seen before signed in."]),375 AlertDefinition(kind: .securityLoginFailed, group: .security, severity: .warning, defaultOn: true, fixed: false,376 title: ["Connexions refusées", "Sign-in attempts refused"],377 body: ["{count} tentative(s) refusée(s), dernière depuis {ip}.", "{count} attempt(s) refused, last from {ip}."],378 priv: ["{count} tentative(s) refusée(s).", "{count} attempt(s) refused."]),379 AlertDefinition(kind: .securitySignerUnreachable, group: .security, severity: .critical, defaultOn: true, fixed: false,380 title: ["Signataire injoignable", "Signer unreachable"],381 body: ["Le signataire ne répond plus depuis {minutes} min. Rien ne peut être signé.", "The signer has not answered for {minutes} min. Nothing can be signed."],382 priv: ["Le signataire ne répond plus depuis {minutes} min. Rien ne peut être signé.", "The signer has not answered for {minutes} min. Nothing can be signed."]),383 AlertDefinition(kind: .securitySignerBack, group: .security, severity: .info, defaultOn: true, fixed: false,384 title: ["Signataire de nouveau joignable", "Signer reachable again"],385 body: ["Le signataire répond de nouveau.", "The signer answers again."],386 priv: ["Le signataire répond de nouveau.", "The signer answers again."]),387 AlertDefinition(kind: .securitySignerHalted, group: .security, severity: .critical, defaultOn: true, fixed: false,388 title: ["Signataire à l’arrêt", "Signer halted"],389 body: ["L’arrêt d’urgence est actif : plus rien n’est signé.", "The emergency halt is on: nothing is signed any more."],390 priv: ["L’arrêt d’urgence est actif.", "The emergency halt is on."]),391 AlertDefinition(kind: .securitySignerUnhalted, group: .security, severity: .warning, defaultOn: true, fixed: false,392 title: ["Signataire réactivé", "Signer resumed"],393 body: ["L’arrêt d’urgence a été levé sur la machine du signataire.", "The emergency halt was lifted on the signer machine."],394 priv: ["L’arrêt d’urgence a été levé.", "The emergency halt was lifted."]),395 AlertDefinition(kind: .securityKillSwitchOn, group: .security, severity: .critical, defaultOn: true, fixed: true,396 title: ["Coupe-circuit global activé", "Global kill switch engaged"],397 body: ["Plus aucun nouveau risque n’est pris, sur aucune plateforme ({what}). {state} Les annulations et les réductions restent possibles.", "No new risk is taken on any venue ({what}). {state} Cancels and reductions still pass."],398 priv: ["Le coupe-circuit global est activé.", "The global kill switch is engaged."]),399 AlertDefinition(kind: .securityKillSwitchOff, group: .security, severity: .warning, defaultOn: true, fixed: false,400 title: ["Coupe-circuit global levé", "Global kill switch released"],401 body: ["Le coupe-circuit global a été levé avec la clé d’accès.", "The global kill switch was released with the passkey."],402 priv: ["Le coupe-circuit global a été levé.", "The global kill switch was released."]),403 AlertDefinition(kind: .securitySignerRefused, group: .security, severity: .warning, defaultOn: true, fixed: false,404 title: ["Demandes refusées par le signataire", "Requests refused by the signer"],405 body: ["{count} refus, dernier : {reason}", "{count} refusal(s), last: {reason}"],406 priv: ["{count} demande(s) refusée(s).", "{count} request(s) refused."]),407 AlertDefinition(kind: .securityPinMismatch, group: .security, severity: .critical, defaultOn: true, fixed: false,408 title: ["Contrat épinglé modifié", "Pinned contract changed"],409 body: ["{what} : le code ne correspond plus à la version révisée. Les opérations concernées sont refusées. {reason}", "{what}: the code no longer matches the reviewed version. The operations concerned are refused. {reason}"],410 priv: ["{what} : le code ne correspond plus à la version révisée ; opérations refusées.", "{what}: the code no longer matches the reviewed version; operations refused."]),411 AlertDefinition(kind: .securityAuditBroken, group: .security, severity: .critical, defaultOn: true, fixed: false,412 title: ["Journal d’audit altéré", "Audit chain broken"],413 body: ["La chaîne d’audit est rompue à l’événement n° {seq}.", "The audit chain is broken at event #{seq}."],414 priv: ["La chaîne d’audit est rompue.", "The audit chain is broken."]),415 AlertDefinition(kind: .securityPolicyChanged, group: .security, severity: .warning, defaultOn: true, fixed: false,416 title: ["Politique modifiée", "Policy changed"],417 body: ["{what} : la politique de limites a changé ({detail}).", "{what}: the limits policy changed ({detail})."],418 priv: ["{what} : la politique de limites a changé.", "{what}: the limits policy changed."]),419 AlertDefinition(kind: .systemApiRestarted, group: .system, severity: .info, defaultOn: true, fixed: false,420 title: ["Service redémarré", "Service restarted"],421 body: ["L’API du portefeuille a redémarré.", "The wallet API restarted."],422 priv: ["L’API du portefeuille a redémarré.", "The wallet API restarted."]),423 AlertDefinition(kind: .systemWorkerFailing, group: .system, severity: .warning, defaultOn: true, fixed: false,424 title: ["Tâche de fond en échec", "Background task failing"],425 body: ["« {loop} » échoue depuis {count} passes : {reason}", "“{loop}” has failed {count} passes in a row: {reason}"],426 priv: ["« {loop} » échoue depuis {count} passes.", "“{loop}” has failed {count} passes in a row."]),427 AlertDefinition(kind: .systemBackupMissing, group: .system, severity: .warning, defaultOn: true, fixed: false,428 title: ["Sauvegarde absente", "Backup missing"],429 body: ["Aucune sauvegarde de la base depuis {hours} h.", "No database backup for {hours} h."],430 priv: ["Aucune sauvegarde de la base depuis {hours} h.", "No database backup for {hours} h."]),431 AlertDefinition(kind: .systemDiskLow, group: .system, severity: .warning, defaultOn: true, fixed: false,432 title: ["Espace disque faible", "Disk space low"],433 body: ["Il reste {pct} % d’espace libre sur la machine de l’API.", "{pct} % of disk space is left on the API host."],434 priv: ["Il reste {pct} % d’espace libre sur la machine de l’API.", "{pct} % of disk space is left on the API host."]),435 AlertDefinition(kind: .systemLabSandboxUnavailable, group: .system, severity: .critical, defaultOn: true, fixed: false,436 title: ["Bac à sable des stratégies indisponible", "Strategy sandbox unavailable"],437 body: ["Le bac à sable du code de stratégie ne fonctionne pas ({reason}). Aucun signal ni backtest n’est exécuté : les agents restent en attente.", "The sandbox for strategy code does not work ({reason}). No signal and no backtest is run: agents hold."],438 priv: ["Le bac à sable du code de stratégie ne fonctionne pas. Aucun signal ni backtest n’est exécuté : les agents restent en attente.", "The sandbox for strategy code does not work. No signal and no backtest is run: agents hold."]),439 AlertDefinition(kind: .systemLabSandboxBack, group: .system, severity: .info, defaultOn: true, fixed: false,440 title: ["Bac à sable des stratégies rétabli", "Strategy sandbox back"],441 body: ["Le bac à sable du code de stratégie fonctionne de nouveau.", "The sandbox for strategy code works again."],442 priv: ["Le bac à sable du code de stratégie fonctionne de nouveau.", "The sandbox for strategy code works again."]),443 AlertDefinition(kind: .systemLabSandboxOff, group: .system, severity: .critical, defaultOn: true, fixed: false,444 title: ["Bac à sable des stratégies DÉSACTIVÉ", "Strategy sandbox turned OFF"],445 body: ["SPW_LAB_SANDBOX=off : le code de stratégie s’exécute SANS confinement du système. Réglage de développement, à retirer sur une machine qui détient des fonds.", "SPW_LAB_SANDBOX=off: strategy code runs WITHOUT OS confinement. A development setting: remove it on a machine that holds funds."],446 priv: ["SPW_LAB_SANDBOX=off : le code de stratégie s’exécute SANS confinement du système.", "SPW_LAB_SANDBOX=off: strategy code runs WITHOUT OS confinement."]),447 AlertDefinition(kind: .connDown, group: .system, severity: .warning, defaultOn: true, fixed: false,448 title: ["Source indisponible", "Source unavailable"],449 body: ["{name} ne répond plus depuis {minutes} min.", "{name} has not answered for {minutes} min."],450 priv: ["{name} ne répond plus depuis {minutes} min.", "{name} has not answered for {minutes} min."]),451 AlertDefinition(kind: .connUp, group: .system, severity: .info, defaultOn: true, fixed: false,452 title: ["Source rétablie", "Source back"],453 body: ["{name} répond de nouveau.", "{name} answers again."],454 priv: ["{name} répond de nouveau.", "{name} answers again."]),455 AlertDefinition(kind: .systemAlertsCapped, group: .system, severity: .info, defaultOn: true, fixed: true,456 title: ["Autres alertes", "More alerts"],457 body: ["{count} autre(s) alerte(s) dans l’application (plafond horaire de notifications atteint).", "{count} more alert(s) in the app (hourly notification cap reached)."],458 priv: ["{count} autre(s) alerte(s) dans l’application.", "{count} more alert(s) in the app."]),459 AlertDefinition(kind: .systemTest, group: .system, severity: .info, defaultOn: true, fixed: true,460 title: ["Notification de test", "Test notification"],461 body: ["Les notifications fonctionnent sur cet appareil.", "Notifications work on this device."],462 priv: ["Les notifications fonctionnent sur cet appareil.", "Notifications work on this device."]),463 ]464}465