@recursiv/sdk 0.7.82 → 0.7.89

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.
Files changed (59) hide show
  1. package/README.md +128 -1
  2. package/dist/assistant/fixedCardData.d.ts +91 -0
  3. package/dist/assistant/fixedCardData.js +372 -0
  4. package/dist/assistant/fixedCards.d.ts +35 -0
  5. package/dist/assistant/fixedCards.js +904 -0
  6. package/dist/assistant/hiddenText.d.ts +24 -0
  7. package/dist/assistant/hiddenText.js +263 -0
  8. package/dist/assistant/index.d.ts +30 -0
  9. package/dist/assistant/index.js +30 -0
  10. package/dist/assistant/render.d.ts +31 -0
  11. package/dist/assistant/render.js +434 -0
  12. package/dist/assistant/subjectBundle.d.ts +30 -0
  13. package/dist/assistant/subjectBundle.js +535 -0
  14. package/dist/assistant/turnCaps.d.ts +3 -0
  15. package/dist/assistant/turnCaps.js +141 -0
  16. package/dist/assistant/types.d.ts +569 -0
  17. package/dist/assistant/types.js +26 -0
  18. package/dist/assistant-surfaces.d.ts +42 -0
  19. package/dist/assistant-surfaces.js +113 -0
  20. package/dist/index.d.ts +15 -6
  21. package/dist/index.js +8 -1
  22. package/dist/privacy/facts.generated.d.ts +79 -0
  23. package/dist/privacy/facts.generated.js +93 -0
  24. package/dist/privacy/index.d.ts +48 -0
  25. package/dist/privacy/index.js +42 -0
  26. package/dist/realtime.d.ts +10 -3
  27. package/dist/realtime.js +11 -2
  28. package/dist/resources/agents.d.ts +6 -1
  29. package/dist/resources/agents.js +12 -2
  30. package/dist/resources/discovery-merge.d.ts +17 -1
  31. package/dist/resources/discovery-merge.js +84 -4
  32. package/dist/resources/discovery-progressive.d.ts +4 -3
  33. package/dist/resources/discovery-progressive.js +11 -8
  34. package/dist/resources/discovery.d.ts +9 -1
  35. package/dist/resources/discovery.js +62 -15
  36. package/dist/resources/e2ee.d.ts +56 -0
  37. package/dist/resources/e2ee.js +21 -0
  38. package/dist/resources/feeds.d.ts +15 -6
  39. package/dist/resources/feeds.js +2 -1
  40. package/dist/resources/integrations.d.ts +3 -0
  41. package/dist/resources/link-preview.d.ts +42 -1
  42. package/dist/resources/link-preview.js +36 -2
  43. package/dist/resources/network.d.ts +6 -0
  44. package/dist/resources/privacy.d.ts +13 -0
  45. package/dist/resources/privacy.js +14 -0
  46. package/dist/resources/project-brain.d.ts +8 -0
  47. package/dist/resources/protocols.d.ts +99 -11
  48. package/dist/resources/protocols.js +45 -0
  49. package/dist/resources/sealed.d.ts +127 -7
  50. package/dist/resources/sealed.js +33 -6
  51. package/dist/resources/settings.d.ts +3 -1
  52. package/dist/resources/settings.js +3 -1
  53. package/dist/resources/users.d.ts +11 -2
  54. package/dist/resources/users.js +1 -1
  55. package/dist/social-protocol-ids.d.ts +28 -0
  56. package/dist/social-protocol-ids.js +30 -0
  57. package/dist/types.d.ts +71 -0
  58. package/llm.md +45 -4
  59. package/package.json +11 -1
@@ -0,0 +1,372 @@
1
+ /**
2
+ * The numbers and addresses the fixed election and crisis cards show (George plan G6b, risks 3 and 22). Every one was
3
+ * checked against the source cited beside it on FIXED_CARD_DATA_AS_OF; nothing here is filled in from memory, and a
4
+ * country with no checked entry gets the generic card, never a guessed number or address.
5
+ *
6
+ * Crisis lines come from findahelpline.com (ThroughLine's maintained directory, the per-country source the plan
7
+ * names) and, where the service publishes its own page, from that page too. Emergency numbers are findahelpline.com's
8
+ * per-country `emergencyNumber`; where that reaches an ambulance alone, the police number is added from a government
9
+ * page. Election sites are each country's own election authority, or the government's page that points to it.
10
+ *
11
+ * To change an entry: check it at its source, update `sources`, the comment above the entry and
12
+ * FIXED_CARD_DATA_AS_OF, and keep the contract test passing (it holds every number and address to the comment above
13
+ * its entry). Plain, frozen data only, so a phone and the server show the same card.
14
+ */
15
+ /** The day every number and address below was last checked against its sources. */
16
+ export const FIXED_CARD_DATA_AS_OF = '2026-10-08';
17
+ /** Freezes plain data all the way down, so no importer can change what a later card shows. Hermes-safe. */
18
+ function deepFreeze(value) {
19
+ if (value !== null && typeof value === 'object' && !Object.isFrozen(value)) {
20
+ Object.freeze(value);
21
+ for (const key of Object.keys(value))
22
+ deepFreeze(value[key]);
23
+ }
24
+ return value;
25
+ }
26
+ const FIND_A_HELPLINE = (country) => `https://findahelpline.com/countries/${country}`;
27
+ /**
28
+ * Per-country crisis lines, keyed by ISO 3166-1 alpha-2 code. Each line is free and open all day, every day, by its
29
+ * source. Kept to countries where that could be checked. The comment above each entry names every number in it and
30
+ * where it was checked; the contract test holds each number to its comment.
31
+ */
32
+ export const CRISIS_LINES = deepFreeze({
33
+ // US: 988 Suicide & Crisis Lifeline, call or text 988. Spanish: press 2 on a call, or text AYUDA to 988.
34
+ // Source: https://988lifeline.org, its FAQ on other languages,
35
+ // https://988lifeline.org/faq/calling-the-988-lifeline/faq-is-the-988-lifeline-available-in-other-languages-for-non-english-speakers/
36
+ // and findahelpline.com/countries/us. Emergency: 911, per findahelpline.com/countries/us.
37
+ US: {
38
+ name: { en: 'the US', es: 'EE. UU.' },
39
+ lines: [{
40
+ name: '988 Suicide & Crisis Lifeline', number: '988', dial: '988', text: '988', always_open: true,
41
+ after_dialling: null,
42
+ extra_line: { es: 'Para hablar en español, llama al 988 y oprime 2, o envía AYUDA por mensaje de texto al 988.' },
43
+ sources: [
44
+ 'https://988lifeline.org',
45
+ 'https://988lifeline.org/faq/calling-the-988-lifeline/faq-is-the-988-lifeline-available-in-other-languages-for-non-english-speakers/',
46
+ FIND_A_HELPLINE('us'),
47
+ ],
48
+ }],
49
+ emergency: '911',
50
+ emergency_sources: [FIND_A_HELPLINE('us')],
51
+ },
52
+ // Canada: 9-8-8 Suicide Crisis Helpline, call or text 988, 24/7. Source: https://988.ca; findahelpline.com/countries/ca.
53
+ // Emergency: 911, per findahelpline.com/countries/ca.
54
+ CA: {
55
+ name: { en: 'Canada', es: 'Canadá' },
56
+ lines: [{
57
+ name: '9-8-8 Suicide Crisis Helpline', number: '9-8-8', dial: '988', text: '988', always_open: true,
58
+ after_dialling: null, extra_line: null,
59
+ sources: ['https://988.ca', FIND_A_HELPLINE('ca')],
60
+ }],
61
+ emergency: '911',
62
+ emergency_sources: [FIND_A_HELPLINE('ca')],
63
+ },
64
+ // UK: Samaritans, 116 123, free, 24/7. Source: https://www.samaritans.org/how-we-can-help/contact-samaritan/;
65
+ // findahelpline.com/countries/gb. Emergency: 999, per findahelpline.com/countries/gb.
66
+ GB: {
67
+ name: { en: 'the UK', es: 'el Reino Unido' },
68
+ lines: [{
69
+ name: 'Samaritans', number: '116 123', dial: '116123', text: null, always_open: true, after_dialling: null, extra_line: null,
70
+ sources: ['https://www.samaritans.org/how-we-can-help/contact-samaritan/', FIND_A_HELPLINE('gb')],
71
+ }],
72
+ emergency: '999',
73
+ emergency_sources: [FIND_A_HELPLINE('gb')],
74
+ },
75
+ // Ireland: Samaritans Ireland, 116 123, 24/7. Source: https://www.samaritans.org/samaritans-ireland/;
76
+ // findahelpline.com/countries/ie. Emergency: 112, per findahelpline.com/countries/ie.
77
+ IE: {
78
+ name: { en: 'Ireland', es: 'Irlanda' },
79
+ lines: [{
80
+ name: 'Samaritans', number: '116 123', dial: '116123', text: null, always_open: true, after_dialling: null, extra_line: null,
81
+ sources: ['https://www.samaritans.org/samaritans-ireland/', FIND_A_HELPLINE('ie')],
82
+ }],
83
+ emergency: '112',
84
+ emergency_sources: [FIND_A_HELPLINE('ie')],
85
+ },
86
+ // Australia: Lifeline, call 13 11 14 or text 0477 13 11 14, 24/7. Source: https://www.lifeline.org.au;
87
+ // findahelpline.com/countries/au. Emergency: 000, per findahelpline.com/countries/au.
88
+ AU: {
89
+ name: { en: 'Australia', es: 'Australia' },
90
+ lines: [{
91
+ name: 'Lifeline', number: '13 11 14', dial: '131114', text: '0477 13 11 14', always_open: true,
92
+ after_dialling: null, extra_line: null,
93
+ sources: ['https://www.lifeline.org.au', FIND_A_HELPLINE('au')],
94
+ }],
95
+ emergency: '000',
96
+ emergency_sources: [FIND_A_HELPLINE('au')],
97
+ },
98
+ // New Zealand: 1737, call or text 1737, 24/7. Source: https://1737.org.nz; findahelpline.com/countries/nz.
99
+ // Emergency: 111, per findahelpline.com/countries/nz.
100
+ NZ: {
101
+ name: { en: 'New Zealand', es: 'Nueva Zelanda' },
102
+ lines: [{
103
+ name: '1737', number: '1737', dial: '1737', text: '1737', always_open: true, after_dialling: null, extra_line: null,
104
+ sources: ['https://1737.org.nz', FIND_A_HELPLINE('nz')],
105
+ }],
106
+ emergency: '111',
107
+ emergency_sources: [FIND_A_HELPLINE('nz')],
108
+ },
109
+ // Mexico: Línea de la Vida (CONASAMA, Secretaría de Salud), 800 911 2000, 24/7.
110
+ // Source: https://www.gob.mx/conasama/articulos/linea-de-la-vida-800-911-2000; findahelpline.com/countries/mx.
111
+ // Emergency: 911, per findahelpline.com/countries/mx.
112
+ MX: {
113
+ name: { en: 'Mexico', es: 'México' },
114
+ lines: [{
115
+ name: 'Línea de la Vida', number: '800 911 2000', dial: '8009112000', text: null, always_open: true,
116
+ after_dialling: null, extra_line: null,
117
+ sources: ['https://www.gob.mx/conasama/articulos/linea-de-la-vida-800-911-2000', FIND_A_HELPLINE('mx')],
118
+ }],
119
+ emergency: '911',
120
+ emergency_sources: [FIND_A_HELPLINE('mx')],
121
+ },
122
+ // Spain: Línea 024 de atención a la conducta suicida (Ministerio de Sanidad), 024, 24/7.
123
+ // Source: https://www.sanidad.gob.es/linea024/home.htm; findahelpline.com/countries/es.
124
+ // Emergency: 112, per the Línea 024 page and findahelpline.com/countries/es.
125
+ ES: {
126
+ name: { en: 'Spain', es: 'España' },
127
+ lines: [{
128
+ name: 'Línea 024', number: '024', dial: '024', text: null, always_open: true, after_dialling: null, extra_line: null,
129
+ sources: ['https://www.sanidad.gob.es/linea024/home.htm', FIND_A_HELPLINE('es')],
130
+ }],
131
+ emergency: '112',
132
+ emergency_sources: ['https://www.sanidad.gob.es/linea024/home.htm', FIND_A_HELPLINE('es')],
133
+ },
134
+ // Argentina: Línea Nacional de Orientación y Apoyo en la Urgencia de Salud Mental, 0800-999-0091, 24/7, 365 days.
135
+ // Source: https://www.argentina.gob.ar/dispositivo-0800; findahelpline.com/countries/ar. (The Centro de Asistencia
136
+ // al Suicida, 0800 345 1435, is open 08:00 to midnight, so it is not the line the card leads with.)
137
+ // Emergency: 911, per findahelpline.com/countries/ar. No police number is added: 911 is the police line where it
138
+ // runs, so a danger card already leads with the police.
139
+ AR: {
140
+ name: { en: 'Argentina', es: 'Argentina' },
141
+ lines: [{
142
+ name: 'Línea de Urgencia en Salud Mental', number: '0800-999-0091', dial: '08009990091', text: null, always_open: true,
143
+ after_dialling: null, extra_line: null,
144
+ sources: ['https://www.argentina.gob.ar/dispositivo-0800', FIND_A_HELPLINE('ar')],
145
+ }],
146
+ emergency: '911',
147
+ emergency_sources: [FIND_A_HELPLINE('ar')],
148
+ },
149
+ // Colombia: Línea 106 Nacional de Salud Mental (Ministerio de Salud), 106, 24/7. Source: findahelpline.com/countries/co;
150
+ // MinSalud, Directorio Nacional de Líneas de Atención en Salud Mental (August 2025):
151
+ // https://www.minsalud.gov.co/sites/rid/Lists/BibliotecaDigital/RIDE/VS/PP/ET/directorio-salud-mental-prevencion-suicidio-minsalud.pdf
152
+ // Emergency: 123, per findahelpline.com/countries/co.
153
+ CO: {
154
+ name: { en: 'Colombia', es: 'Colombia' },
155
+ lines: [{
156
+ name: 'Línea 106', number: '106', dial: '106', text: null, always_open: true, after_dialling: null, extra_line: null,
157
+ sources: [
158
+ FIND_A_HELPLINE('co'),
159
+ 'https://www.minsalud.gov.co/sites/rid/Lists/BibliotecaDigital/RIDE/VS/PP/ET/directorio-salud-mental-prevencion-suicidio-minsalud.pdf',
160
+ ],
161
+ }],
162
+ emergency: '123',
163
+ emergency_sources: [FIND_A_HELPLINE('co')],
164
+ },
165
+ // Chile: *4141 Línea de Prevención del Suicidio (MINSAL), 24/7.
166
+ // Source: https://www.gob.cl/noticias/linea-prevencion-suicidio-4141-24-horas-atencion-balance-cifras/;
167
+ // findahelpline.com/countries/cl. Emergency: 131 (ambulance, SAMU), per findahelpline.com/countries/cl.
168
+ // Police: 133 (Carabineros), free, 24 hours, per https://www.chileatiende.gob.cl/fichas/139663-fono-emergencias-133.
169
+ CL: {
170
+ name: { en: 'Chile', es: 'Chile' },
171
+ lines: [{
172
+ name: 'Línea de Prevención del Suicidio', number: '*4141', dial: '*4141', text: null, always_open: true,
173
+ after_dialling: null, extra_line: null,
174
+ sources: ['https://www.gob.cl/noticias/linea-prevencion-suicidio-4141-24-horas-atencion-balance-cifras/', FIND_A_HELPLINE('cl')],
175
+ }],
176
+ emergency: '131',
177
+ emergency_sources: [FIND_A_HELPLINE('cl')],
178
+ police: { number: '133', sources: ['https://www.chileatiende.gob.cl/fichas/139663-fono-emergencias-133'] },
179
+ },
180
+ // Peru: Línea 113 Salud (Minsa), 113, option 5 for mental health, 24/7. Source: https://www.gob.pe/555;
181
+ // findahelpline.com/countries/pe ("Al marcar, selecciona la opción 5"). Emergency: 106 (ambulance, SAMU), per
182
+ // findahelpline.com/countries/pe. Police: 105 (Policía Nacional del Perú), per its page of emergency numbers,
183
+ // https://www.gob.pe/institucion/pnp/contacto-y-numeros-de-emergencias.
184
+ PE: {
185
+ name: { en: 'Peru', es: 'Perú' },
186
+ lines: [{
187
+ name: 'Línea 113 Salud', number: '113', dial: '113', text: null, always_open: true,
188
+ after_dialling: { en: 'choose option 5', es: 'elige la opción 5' }, extra_line: null,
189
+ sources: ['https://www.gob.pe/555', FIND_A_HELPLINE('pe')],
190
+ }],
191
+ emergency: '106',
192
+ emergency_sources: [FIND_A_HELPLINE('pe')],
193
+ police: { number: '105', sources: ['https://www.gob.pe/institucion/pnp/contacto-y-numeros-de-emergencias'] },
194
+ },
195
+ // Brazil: CVV (Centro de Valorização da Vida), 188, 24 hours, free. Source: https://cvv.org.br;
196
+ // findahelpline.com/countries/br. Emergency: 192 (ambulance, SAMU), per findahelpline.com/countries/br and the
197
+ // Ministério das Comunicações. Police: 190 (Polícia Militar), per the Ministério das Comunicações,
198
+ // https://www.gov.br/mcom/pt-br/noticias/noticias_alt/2026/setembro/emergencia-voce-sabe-para-quem-ligar-quando-precisa-de-ajuda
199
+ BR: {
200
+ name: { en: 'Brazil', es: 'Brasil' },
201
+ lines: [{
202
+ name: 'CVV', number: '188', dial: '188', text: null, always_open: true, after_dialling: null, extra_line: null,
203
+ sources: ['https://cvv.org.br', FIND_A_HELPLINE('br')],
204
+ }],
205
+ emergency: '192',
206
+ emergency_sources: [
207
+ FIND_A_HELPLINE('br'),
208
+ 'https://www.gov.br/mcom/pt-br/noticias/noticias_alt/2026/setembro/emergencia-voce-sabe-para-quem-ligar-quando-precisa-de-ajuda',
209
+ ],
210
+ police: {
211
+ number: '190',
212
+ sources: ['https://www.gov.br/mcom/pt-br/noticias/noticias_alt/2026/setembro/emergencia-voce-sabe-para-quem-ligar-quando-precisa-de-ajuda'],
213
+ },
214
+ },
215
+ // France: 3114, numéro national de prévention du suicide, 24/7. Source: https://3114.fr;
216
+ // findahelpline.com/countries/fr. Emergency: 112, per findahelpline.com/countries/fr.
217
+ FR: {
218
+ name: { en: 'France', es: 'Francia' },
219
+ lines: [{
220
+ name: '3114', number: '3114', dial: '3114', text: null, always_open: true, after_dialling: null, extra_line: null,
221
+ sources: ['https://3114.fr', FIND_A_HELPLINE('fr')],
222
+ }],
223
+ emergency: '112',
224
+ emergency_sources: [FIND_A_HELPLINE('fr')],
225
+ },
226
+ // Germany: TelefonSeelsorge, 0800 111 0 111 (also 0800 111 0 222 and 116 123), 24/7.
227
+ // Source: https://www.telefonseelsorge.de; findahelpline.com/countries/de. Emergency: 112, per
228
+ // findahelpline.com/countries/de.
229
+ DE: {
230
+ name: { en: 'Germany', es: 'Alemania' },
231
+ lines: [{
232
+ name: 'TelefonSeelsorge', number: '0800 111 0 111', dial: '08001110111', text: null, always_open: true,
233
+ after_dialling: null, extra_line: null,
234
+ sources: ['https://www.telefonseelsorge.de', FIND_A_HELPLINE('de')],
235
+ }],
236
+ emergency: '112',
237
+ emergency_sources: [FIND_A_HELPLINE('de')],
238
+ },
239
+ // India: Tele MANAS (Ministry of Health and Family Welfare), 14416, 24/7. Source:
240
+ // https://telemanas.mohfw.gov.in/home; findahelpline.com/countries/in. Emergency: 112, per
241
+ // findahelpline.com/countries/in.
242
+ IN: {
243
+ name: { en: 'India', es: 'la India' },
244
+ lines: [{
245
+ name: 'Tele MANAS', number: '14416', dial: '14416', text: null, always_open: true, after_dialling: null, extra_line: null,
246
+ sources: ['https://telemanas.mohfw.gov.in/home', FIND_A_HELPLINE('in')],
247
+ }],
248
+ emergency: '112',
249
+ emergency_sources: [FIND_A_HELPLINE('in')],
250
+ },
251
+ // Netherlands: 113 Zelfmoordpreventie, 113, 24/7. Source: https://www.113.nl; findahelpline.com/countries/nl.
252
+ // Emergency: 112, per findahelpline.com/countries/nl.
253
+ NL: {
254
+ name: { en: 'the Netherlands', es: 'los Países Bajos' },
255
+ lines: [{
256
+ name: '113 Zelfmoordpreventie', number: '113', dial: '113', text: null, always_open: true, after_dialling: null, extra_line: null,
257
+ sources: ['https://www.113.nl', FIND_A_HELPLINE('nl')],
258
+ }],
259
+ emergency: '112',
260
+ emergency_sources: [FIND_A_HELPLINE('nl')],
261
+ },
262
+ });
263
+ /** The directory the generic crisis card points to when the member's country is unknown or has no entry above. */
264
+ export const CRISIS_DIRECTORY = deepFreeze({
265
+ name: 'findahelpline.com',
266
+ url: 'https://findahelpline.com',
267
+ // Source: https://findahelpline.com (ThroughLine's international helpline directory), checked 2026-10-08.
268
+ sources: ['https://findahelpline.com'],
269
+ });
270
+ /**
271
+ * Official election sites, keyed by ISO 3166-1 alpha-2 code: each country's national election authority, or the
272
+ * government page for voters. A country not listed gets the generic line, never a guessed address. Some of these
273
+ * hosts refuse scripted requests (403), so they were checked by hand on the date above.
274
+ */
275
+ export const ELECTION_SITES = deepFreeze({
276
+ // US: vote.gov (U.S. government, GSA) links to every state's election office; CanIVote.org (the National
277
+ // Association of Secretaries of State) finds a state's site and polling place. The plan's "Find my state's site"
278
+ // button. Source: https://vote.gov, https://www.canivote.org (redirects to https://www.nass.org/can-I-vote).
279
+ US: {
280
+ name: { en: 'the US', es: 'EE. UU.' },
281
+ sites: [
282
+ { name: 'vote.gov', url: 'https://vote.gov', sources: ['https://vote.gov'] },
283
+ { name: 'CanIVote.org', url: 'https://www.canivote.org', sources: ['https://www.nass.org/can-I-vote'] },
284
+ ],
285
+ },
286
+ // Canada: Elections Canada (federal). Source: https://www.elections.ca.
287
+ CA: {
288
+ name: { en: 'Canada', es: 'Canadá' },
289
+ sites: [{ name: 'Elections Canada', url: 'https://www.elections.ca', sources: ['https://www.elections.ca'] }],
290
+ },
291
+ // UK: the Electoral Commission. Source: https://www.electoralcommission.org.uk.
292
+ GB: {
293
+ name: { en: 'the UK', es: 'el Reino Unido' },
294
+ sites: [{
295
+ name: 'Electoral Commission', url: 'https://www.electoralcommission.org.uk',
296
+ sources: ['https://www.electoralcommission.org.uk'],
297
+ }],
298
+ },
299
+ // Ireland: An Coimisiún Toghcháin, the Electoral Commission. Source: https://www.electoralcommission.ie.
300
+ IE: {
301
+ name: { en: 'Ireland', es: 'Irlanda' },
302
+ sites: [{ name: 'Electoral Commission', url: 'https://www.electoralcommission.ie', sources: ['https://www.electoralcommission.ie'] }],
303
+ },
304
+ // Australia: the Australian Electoral Commission. Source: https://www.aec.gov.au.
305
+ AU: {
306
+ name: { en: 'Australia', es: 'Australia' },
307
+ sites: [{ name: 'Australian Electoral Commission', url: 'https://www.aec.gov.au', sources: ['https://www.aec.gov.au'] }],
308
+ },
309
+ // New Zealand: the Electoral Commission (elections.org.nz redirects here). Source: https://vote.nz.
310
+ NZ: {
311
+ name: { en: 'New Zealand', es: 'Nueva Zelanda' },
312
+ sites: [{ name: 'Electoral Commission', url: 'https://vote.nz', sources: ['https://vote.nz', 'https://www.elections.org.nz'] }],
313
+ },
314
+ // India: the Election Commission of India. Source: https://www.eci.gov.in.
315
+ IN: {
316
+ name: { en: 'India', es: 'la India' },
317
+ sites: [{ name: 'Election Commission of India', url: 'https://www.eci.gov.in', sources: ['https://www.eci.gov.in'] }],
318
+ },
319
+ // Mexico: the Instituto Nacional Electoral. Source: https://www.ine.mx.
320
+ MX: {
321
+ name: { en: 'Mexico', es: 'México' },
322
+ sites: [{ name: 'Instituto Nacional Electoral', url: 'https://www.ine.mx', sources: ['https://www.ine.mx'] }],
323
+ },
324
+ // Brazil: the Tribunal Superior Eleitoral. Source: https://www.tse.jus.br.
325
+ BR: {
326
+ name: { en: 'Brazil', es: 'Brasil' },
327
+ sites: [{ name: 'Tribunal Superior Eleitoral', url: 'https://www.tse.jus.br', sources: ['https://www.tse.jus.br'] }],
328
+ },
329
+ // Spain: the INE's Oficina del Censo Electoral (the electoral roll and where to vote). Source:
330
+ // https://www.ine.es/oficina_censo/.
331
+ ES: {
332
+ name: { en: 'Spain', es: 'España' },
333
+ sites: [{
334
+ name: 'Oficina del Censo Electoral del INE', url: 'https://www.ine.es/oficina_censo/',
335
+ sources: ['https://www.ine.es/oficina_censo/'],
336
+ }],
337
+ },
338
+ // Argentina: the Justicia Nacional Electoral's padrón lookup (where you vote). Source: https://www.padron.gob.ar.
339
+ AR: {
340
+ name: { en: 'Argentina', es: 'Argentina' },
341
+ sites: [{ name: 'Justicia Nacional Electoral', url: 'https://www.padron.gob.ar', sources: ['https://www.padron.gob.ar'] }],
342
+ },
343
+ // Colombia: the Registraduría Nacional del Estado Civil. Source: https://www.registraduria.gov.co.
344
+ CO: {
345
+ name: { en: 'Colombia', es: 'Colombia' },
346
+ sites: [{
347
+ name: 'Registraduría Nacional del Estado Civil', url: 'https://www.registraduria.gov.co',
348
+ sources: ['https://www.registraduria.gov.co'],
349
+ }],
350
+ },
351
+ // Chile: the Servicio Electoral de Chile (Servel). Source: https://www.servel.cl.
352
+ CL: {
353
+ name: { en: 'Chile', es: 'Chile' },
354
+ sites: [{ name: 'Servicio Electoral de Chile', url: 'https://www.servel.cl', sources: ['https://www.servel.cl'] }],
355
+ },
356
+ // Germany: Die Bundeswahlleiterin (the Federal Returning Officer). Source: https://www.bundeswahlleiterin.de.
357
+ DE: {
358
+ name: { en: 'Germany', es: 'Alemania' },
359
+ sites: [{ name: 'Die Bundeswahlleiterin', url: 'https://www.bundeswahlleiterin.de', sources: ['https://www.bundeswahlleiterin.de'] }],
360
+ },
361
+ // France: Service-Public.fr's elections pages (the government's site for voters). Source:
362
+ // https://www.service-public.gouv.fr/particuliers/vosdroits/N47.
363
+ FR: {
364
+ name: { en: 'France', es: 'Francia' },
365
+ sites: [{
366
+ name: 'Service-Public.fr', url: 'https://www.service-public.gouv.fr/particuliers/vosdroits/N47',
367
+ sources: ['https://www.service-public.gouv.fr/particuliers/vosdroits/N47'],
368
+ }],
369
+ },
370
+ });
371
+ /** Common names for a country that are not its ISO 3166-1 alpha-2 code. */
372
+ export const COUNTRY_ALIASES = deepFreeze({ UK: 'GB' });
@@ -0,0 +1,35 @@
1
+ import type { FixedCard, FixedCardAnswer, FixedCardKind, FixedCardMatch, FixedCardOptions } from './types.js';
2
+ /**
3
+ * The longest message read in full, counted after invisible characters are dropped. Past it, the first and the last
4
+ * FIXED_CARD_SCAN_LIMIT / 2 characters are read, each on its own, so a long paste that ends with a crisis statement
5
+ * still matches.
6
+ */
7
+ export declare const FIXED_CARD_SCAN_LIMIT = 20000;
8
+ /**
9
+ * Until this moment an election card replaces the model's answer; after it, the card shows first and the turn may go
10
+ * on. Noon UTC on 2026-11-04: the day after the US midterms (2026-11-03), after the last US polls close (Hawaii and
11
+ * the Aleutians, 05:00 to 06:00 UTC on 11-04).
12
+ */
13
+ export declare const ELECTION_CARD_ONLY_UNTIL = "2026-11-04T12:00:00Z";
14
+ /**
15
+ * Lower case, no accents, no apostrophes ("I'm" reads "im"), look-alike and "fancy font" letters as plain ones, digits
16
+ * standing for letters read as letters, and every other run of non-letters one space: what the phrase lists are
17
+ * written against. Past FIXED_CARD_SCAN_LIMIT characters, the first and last halves joined by a space.
18
+ */
19
+ export declare function normaliseForMatching(text: string): string;
20
+ /**
21
+ * The fixed card a member's message calls for, or null. Crisis wins over election when a message shows both. Pass
22
+ * the member's own words (their question to George), not the post or chat they are asking about.
23
+ */
24
+ export declare function matchFixedCard(text: string, options?: FixedCardOptions): FixedCardMatch | null;
25
+ /**
26
+ * A fixed card without reading a message: for a caller that already knows it must show one (the crisis card for a
27
+ * known under-18 member, D10). The language comes from `locale`, else English.
28
+ */
29
+ export declare function fixedCardFor(kind: FixedCardKind, options?: FixedCardOptions): FixedCard;
30
+ /**
31
+ * What the turn does after a card: a crisis card always shows first and the turn may go on to a supportive answer;
32
+ * an election card replaces the model's answer until ELECTION_CARD_ONLY_UNTIL. `now` is epoch milliseconds or an ISO
33
+ * time from the caller's clock; one that cannot be read gives 'card_only'.
34
+ */
35
+ export declare function fixedCardAnswer(kind: FixedCardKind, now: number | string): FixedCardAnswer;