@erosolaraijs/cure 2.2.0 → 2.3.1

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 (35) hide show
  1. package/README.md +314 -26
  2. package/dist/bin/cure.js +173 -23
  3. package/dist/bin/cure.js.map +1 -1
  4. package/dist/capabilities/cureValidationFramework.d.ts +195 -0
  5. package/dist/capabilities/cureValidationFramework.d.ts.map +1 -0
  6. package/dist/capabilities/cureValidationFramework.js +577 -0
  7. package/dist/capabilities/cureValidationFramework.js.map +1 -0
  8. package/dist/capabilities/emergingTherapeutics.d.ts +145 -0
  9. package/dist/capabilities/emergingTherapeutics.d.ts.map +1 -0
  10. package/dist/capabilities/emergingTherapeutics.js +600 -0
  11. package/dist/capabilities/emergingTherapeutics.js.map +1 -0
  12. package/dist/capabilities/globalCancerCoverage.d.ts +143 -0
  13. package/dist/capabilities/globalCancerCoverage.d.ts.map +1 -0
  14. package/dist/capabilities/globalCancerCoverage.js +1066 -0
  15. package/dist/capabilities/globalCancerCoverage.js.map +1 -0
  16. package/dist/capabilities/index.d.ts +21 -0
  17. package/dist/capabilities/index.d.ts.map +1 -1
  18. package/dist/capabilities/index.js +24 -0
  19. package/dist/capabilities/index.js.map +1 -1
  20. package/dist/capabilities/resistanceManagement.d.ts +89 -0
  21. package/dist/capabilities/resistanceManagement.d.ts.map +1 -0
  22. package/dist/capabilities/resistanceManagement.js +713 -0
  23. package/dist/capabilities/resistanceManagement.js.map +1 -0
  24. package/dist/capabilities/universalCancerCureEngine.d.ts +254 -0
  25. package/dist/capabilities/universalCancerCureEngine.d.ts.map +1 -0
  26. package/dist/capabilities/universalCancerCureEngine.js +734 -0
  27. package/dist/capabilities/universalCancerCureEngine.js.map +1 -0
  28. package/package.json +1 -1
  29. package/src/bin/cure.ts +186 -23
  30. package/src/capabilities/cureValidationFramework.ts +757 -0
  31. package/src/capabilities/emergingTherapeutics.ts +760 -0
  32. package/src/capabilities/globalCancerCoverage.ts +1256 -0
  33. package/src/capabilities/index.ts +53 -0
  34. package/src/capabilities/resistanceManagement.ts +835 -0
  35. package/src/capabilities/universalCancerCureEngine.ts +1040 -0
@@ -0,0 +1,713 @@
1
+ /**
2
+ * Comprehensive Cancer Treatment Resistance Management
3
+ *
4
+ * ╔═══════════════════════════════════════════════════════════════════════════════╗
5
+ * ║ RESISTANCE MANAGEMENT - ENSURING CURE DESPITE TREATMENT RESISTANCE ║
6
+ * ╠═══════════════════════════════════════════════════════════════════════════════╣
7
+ * ║ This module handles: ║
8
+ * ║ - All known resistance mechanisms for every approved targeted therapy ║
9
+ * ║ - Real-time resistance detection via ctDNA and repeat biopsy ║
10
+ * ║ - Sequential therapy strategies to overcome resistance ║
11
+ * ║ - Combination approaches to prevent resistance ║
12
+ * ║ - Novel investigational strategies for resistant disease ║
13
+ * ╚═══════════════════════════════════════════════════════════════════════════════╝
14
+ */
15
+ export const RESISTANCE_MECHANISM_DATABASE = [
16
+ // ═══════════════════════════════════════════════════════════════════════════
17
+ // EGFR RESISTANCE MECHANISMS
18
+ // ═══════════════════════════════════════════════════════════════════════════
19
+ {
20
+ id: 'egfr-t790m',
21
+ originalTarget: 'EGFR sensitizing mutations (exon 19 del, L858R)',
22
+ originalDrugs: ['Erlotinib', 'Gefitinib', 'Afatinib'],
23
+ resistanceMutation: 'EGFR T790M gatekeeper mutation',
24
+ frequency: '50-60% of acquired resistance',
25
+ detectionMethod: ['ctDNA (plasma)', 'Repeat tissue biopsy', 'Cobas EGFR test'],
26
+ overcomingStrategies: [
27
+ {
28
+ approach: 'Third-generation EGFR TKI',
29
+ drugs: ['Osimertinib'],
30
+ evidenceLevel: 'FDA-Approved',
31
+ expectedResponse: 'ORR 70%, median PFS 10 months'
32
+ }
33
+ ],
34
+ preventionStrategies: ['Frontline osimertinib (FLAURA trial)'],
35
+ prognosis: 'Good - effective third-generation options available'
36
+ },
37
+ {
38
+ id: 'egfr-c797s',
39
+ originalTarget: 'EGFR T790M',
40
+ originalDrugs: ['Osimertinib'],
41
+ resistanceMutation: 'EGFR C797S mutation',
42
+ frequency: '10-25% of osimertinib resistance',
43
+ detectionMethod: ['ctDNA (plasma)', 'Repeat tissue biopsy'],
44
+ overcomingStrategies: [
45
+ {
46
+ approach: 'EGFR-MET bispecific antibody',
47
+ drugs: ['Amivantamab'],
48
+ evidenceLevel: 'FDA-Approved',
49
+ expectedResponse: 'ORR 30-40%'
50
+ },
51
+ {
52
+ approach: 'Fourth-generation EGFR TKI',
53
+ drugs: ['BLU-945', 'BLU-701'],
54
+ evidenceLevel: 'Phase I',
55
+ expectedResponse: 'Under investigation',
56
+ clinicalTrials: ['NCT04862780']
57
+ },
58
+ {
59
+ approach: 'First-gen + third-gen TKI combination (if in trans)',
60
+ drugs: ['Erlotinib + Osimertinib'],
61
+ evidenceLevel: 'Phase II',
62
+ expectedResponse: 'May overcome if mutations in trans'
63
+ }
64
+ ],
65
+ preventionStrategies: ['Combination therapy upfront', 'Early resistance detection'],
66
+ prognosis: 'Challenging - emerging options in development'
67
+ },
68
+ {
69
+ id: 'egfr-met-amp',
70
+ originalTarget: 'EGFR',
71
+ originalDrugs: ['All EGFR TKIs'],
72
+ resistanceMutation: 'MET amplification (bypass pathway)',
73
+ frequency: '5-20% of EGFR TKI resistance',
74
+ detectionMethod: ['NGS', 'FISH', 'ctDNA'],
75
+ overcomingStrategies: [
76
+ {
77
+ approach: 'EGFR + MET inhibitor combination',
78
+ drugs: ['Osimertinib + Savolitinib', 'Amivantamab + Lazertinib'],
79
+ evidenceLevel: 'FDA-Approved',
80
+ expectedResponse: 'ORR 30-50%'
81
+ },
82
+ {
83
+ approach: 'MET-targeted therapy',
84
+ drugs: ['Capmatinib', 'Tepotinib', 'Crizotinib'],
85
+ evidenceLevel: 'FDA-Approved',
86
+ expectedResponse: 'Response in combination'
87
+ }
88
+ ],
89
+ preventionStrategies: ['MET monitoring during treatment'],
90
+ prognosis: 'Addressable with combination therapy'
91
+ },
92
+ {
93
+ id: 'egfr-transformation',
94
+ originalTarget: 'EGFR',
95
+ originalDrugs: ['All EGFR TKIs'],
96
+ resistanceMutation: 'Histologic transformation to SCLC',
97
+ frequency: '3-14% of EGFR TKI resistance',
98
+ detectionMethod: ['Repeat biopsy (mandatory)', 'Neuroendocrine markers'],
99
+ overcomingStrategies: [
100
+ {
101
+ approach: 'SCLC-directed chemotherapy',
102
+ drugs: ['Platinum + Etoposide'],
103
+ evidenceLevel: 'FDA-Approved',
104
+ expectedResponse: 'Response in most cases, often transient'
105
+ },
106
+ {
107
+ approach: 'SCLC regimen + continue EGFR TKI',
108
+ drugs: ['Platinum/Etoposide + Osimertinib'],
109
+ evidenceLevel: 'Phase II',
110
+ expectedResponse: 'May improve outcomes'
111
+ }
112
+ ],
113
+ preventionStrategies: ['Early detection with repeat biopsy at progression'],
114
+ prognosis: 'Poor - aggressive histology'
115
+ },
116
+ // ═══════════════════════════════════════════════════════════════════════════
117
+ // ALK RESISTANCE MECHANISMS
118
+ // ═══════════════════════════════════════════════════════════════════════════
119
+ {
120
+ id: 'alk-secondary',
121
+ originalTarget: 'ALK fusion',
122
+ originalDrugs: ['Crizotinib', 'Alectinib'],
123
+ resistanceMutation: 'ALK secondary mutations (G1202R, L1196M, etc.)',
124
+ frequency: '30-50% of ALK TKI resistance',
125
+ detectionMethod: ['ctDNA', 'Repeat biopsy with ALK resistance panel'],
126
+ overcomingStrategies: [
127
+ {
128
+ approach: 'Next-generation ALK TKI based on mutation',
129
+ drugs: ['Lorlatinib (covers most)', 'Brigatinib', 'Ensartinib'],
130
+ evidenceLevel: 'FDA-Approved',
131
+ expectedResponse: 'Mutation-dependent response'
132
+ },
133
+ {
134
+ approach: 'Compound mutation strategies',
135
+ drugs: ['Lorlatinib', 'Chemotherapy'],
136
+ evidenceLevel: 'Phase II',
137
+ expectedResponse: 'Variable'
138
+ }
139
+ ],
140
+ preventionStrategies: ['Sequential TKI selection based on resistance profile'],
141
+ prognosis: 'Moderate - sequential TKIs can provide disease control'
142
+ },
143
+ {
144
+ id: 'alk-g1202r',
145
+ originalTarget: 'ALK fusion',
146
+ originalDrugs: ['Crizotinib', 'Alectinib', 'Ceritinib', 'Brigatinib'],
147
+ resistanceMutation: 'ALK G1202R solvent front mutation',
148
+ frequency: 'Most common resistance mutation to second-gen ALK TKIs',
149
+ detectionMethod: ['ctDNA', 'Repeat biopsy'],
150
+ overcomingStrategies: [
151
+ {
152
+ approach: 'Third-generation ALK TKI',
153
+ drugs: ['Lorlatinib'],
154
+ evidenceLevel: 'FDA-Approved',
155
+ expectedResponse: 'ORR 40-50% in G1202R+'
156
+ }
157
+ ],
158
+ preventionStrategies: ['Consider lorlatinib earlier in treatment sequence'],
159
+ prognosis: 'Addressable with lorlatinib'
160
+ },
161
+ // ═══════════════════════════════════════════════════════════════════════════
162
+ // BRAF RESISTANCE MECHANISMS
163
+ // ═══════════════════════════════════════════════════════════════════════════
164
+ {
165
+ id: 'braf-reactivation',
166
+ originalTarget: 'BRAF V600E',
167
+ originalDrugs: ['Vemurafenib', 'Dabrafenib', 'Encorafenib'],
168
+ resistanceMutation: 'MAPK pathway reactivation (NRAS, MEK, BRAF splice variants)',
169
+ frequency: 'Nearly universal within 12-18 months',
170
+ detectionMethod: ['ctDNA', 'Repeat biopsy'],
171
+ overcomingStrategies: [
172
+ {
173
+ approach: 'BRAF + MEK inhibitor combination (if not already on)',
174
+ drugs: ['Dabrafenib + Trametinib', 'Encorafenib + Binimetinib'],
175
+ evidenceLevel: 'FDA-Approved',
176
+ expectedResponse: 'Standard of care upfront'
177
+ },
178
+ {
179
+ approach: 'ERK inhibitor',
180
+ drugs: ['Ulixertinib'],
181
+ evidenceLevel: 'Phase I',
182
+ expectedResponse: 'Under investigation',
183
+ clinicalTrials: ['NCT01781429']
184
+ },
185
+ {
186
+ approach: 'Immunotherapy switch',
187
+ drugs: ['Nivolumab + Ipilimumab'],
188
+ evidenceLevel: 'FDA-Approved',
189
+ expectedResponse: 'ORR 50-60% in melanoma'
190
+ }
191
+ ],
192
+ preventionStrategies: ['Upfront BRAF/MEK combination', 'Immunotherapy sequencing'],
193
+ prognosis: 'Moderate - immunotherapy provides durable responses'
194
+ },
195
+ // ═══════════════════════════════════════════════════════════════════════════
196
+ // HER2 RESISTANCE MECHANISMS
197
+ // ═══════════════════════════════════════════════════════════════════════════
198
+ {
199
+ id: 'her2-resistance',
200
+ originalTarget: 'HER2 amplification',
201
+ originalDrugs: ['Trastuzumab', 'Pertuzumab'],
202
+ resistanceMutation: 'PI3K pathway activation, HER2 mutations, truncated HER2',
203
+ frequency: 'Variable, 40-50% eventually progress',
204
+ detectionMethod: ['ctDNA', 'Repeat biopsy', 'PIK3CA testing'],
205
+ overcomingStrategies: [
206
+ {
207
+ approach: 'Antibody-drug conjugate',
208
+ drugs: ['T-DXd (Trastuzumab Deruxtecan)', 'T-DM1'],
209
+ evidenceLevel: 'FDA-Approved',
210
+ expectedResponse: 'T-DXd ORR 60%, median PFS 25 months'
211
+ },
212
+ {
213
+ approach: 'Tyrosine kinase inhibitor combination',
214
+ drugs: ['Tucatinib + Trastuzumab + Capecitabine', 'Neratinib', 'Lapatinib'],
215
+ evidenceLevel: 'FDA-Approved',
216
+ expectedResponse: 'ORR 40-50%'
217
+ },
218
+ {
219
+ approach: 'PI3K inhibitor addition (if PIK3CA+)',
220
+ drugs: ['Alpelisib'],
221
+ evidenceLevel: 'FDA-Approved',
222
+ expectedResponse: 'Improved PFS in PIK3CA-mutant'
223
+ }
224
+ ],
225
+ preventionStrategies: ['ADC-based therapy earlier', 'Combination approaches'],
226
+ prognosis: 'Good - multiple effective later-line options'
227
+ },
228
+ // ═══════════════════════════════════════════════════════════════════════════
229
+ // HORMONE RECEPTOR RESISTANCE
230
+ // ═══════════════════════════════════════════════════════════════════════════
231
+ {
232
+ id: 'esr1-mutations',
233
+ originalTarget: 'Estrogen receptor',
234
+ originalDrugs: ['Aromatase inhibitors', 'Tamoxifen'],
235
+ resistanceMutation: 'ESR1 mutations (Y537S, D538G, etc.)',
236
+ frequency: '30-40% of metastatic ER+ breast cancer',
237
+ detectionMethod: ['ctDNA (sensitive)', 'Repeat biopsy'],
238
+ overcomingStrategies: [
239
+ {
240
+ approach: 'Oral SERD',
241
+ drugs: ['Elacestrant'],
242
+ evidenceLevel: 'FDA-Approved',
243
+ expectedResponse: 'PFS benefit in ESR1-mutant'
244
+ },
245
+ {
246
+ approach: 'Pure antiestrogen',
247
+ drugs: ['Fulvestrant'],
248
+ evidenceLevel: 'FDA-Approved',
249
+ expectedResponse: 'Response in some ESR1-mutant cases'
250
+ },
251
+ {
252
+ approach: 'CDK4/6 inhibitor continuation',
253
+ drugs: ['Palbociclib', 'Ribociclib', 'Abemaciclib'],
254
+ evidenceLevel: 'FDA-Approved',
255
+ expectedResponse: 'Continue if tolerated'
256
+ }
257
+ ],
258
+ preventionStrategies: ['Monitoring for ESR1 mutations', 'Consider SERDs earlier'],
259
+ prognosis: 'Moderate - multiple options available'
260
+ },
261
+ {
262
+ id: 'ar-resistance',
263
+ originalTarget: 'Androgen receptor',
264
+ originalDrugs: ['Enzalutamide', 'Abiraterone', 'Apalutamide'],
265
+ resistanceMutation: 'AR amplification, AR-V7 splice variant, glucocorticoid receptor activation',
266
+ frequency: '30-50% of mCRPC',
267
+ detectionMethod: ['CTC-based AR-V7', 'ctDNA', 'Repeat biopsy'],
268
+ overcomingStrategies: [
269
+ {
270
+ approach: 'Taxane chemotherapy',
271
+ drugs: ['Docetaxel', 'Cabazitaxel'],
272
+ evidenceLevel: 'FDA-Approved',
273
+ expectedResponse: 'Effective regardless of AR-V7'
274
+ },
275
+ {
276
+ approach: 'Radioligand therapy',
277
+ drugs: ['Lu-PSMA-617'],
278
+ evidenceLevel: 'FDA-Approved',
279
+ expectedResponse: 'ORR 30%, OS benefit'
280
+ },
281
+ {
282
+ approach: 'PARP inhibitor (if HRR+)',
283
+ drugs: ['Olaparib', 'Rucaparib'],
284
+ evidenceLevel: 'FDA-Approved',
285
+ expectedResponse: 'Effective in HRR-deficient'
286
+ }
287
+ ],
288
+ preventionStrategies: ['Early taxane consideration', 'HRR testing upfront'],
289
+ prognosis: 'Moderate - taxanes and PSMA effective'
290
+ },
291
+ // ═══════════════════════════════════════════════════════════════════════════
292
+ // BTK INHIBITOR RESISTANCE
293
+ // ═══════════════════════════════════════════════════════════════════════════
294
+ {
295
+ id: 'btk-c481s',
296
+ originalTarget: 'BTK',
297
+ originalDrugs: ['Ibrutinib', 'Acalabrutinib', 'Zanubrutinib'],
298
+ resistanceMutation: 'BTK C481S mutation',
299
+ frequency: '80% of CLL resistance to covalent BTK inhibitors',
300
+ detectionMethod: ['ctDNA', 'Repeat bone marrow'],
301
+ overcomingStrategies: [
302
+ {
303
+ approach: 'Non-covalent BTK inhibitor',
304
+ drugs: ['Pirtobrutinib'],
305
+ evidenceLevel: 'FDA-Approved',
306
+ expectedResponse: 'ORR 70% in BTK C481S+'
307
+ },
308
+ {
309
+ approach: 'BCL2 inhibitor',
310
+ drugs: ['Venetoclax'],
311
+ evidenceLevel: 'FDA-Approved',
312
+ expectedResponse: 'Effective alternative pathway'
313
+ },
314
+ {
315
+ approach: 'CAR-T therapy',
316
+ drugs: ['Lisocabtagene maraleucel'],
317
+ evidenceLevel: 'FDA-Approved',
318
+ expectedResponse: 'Deep responses in R/R CLL'
319
+ }
320
+ ],
321
+ preventionStrategies: ['Time-limited venetoclax-based regimens', 'Resistance monitoring'],
322
+ prognosis: 'Good - multiple effective options'
323
+ },
324
+ // ═══════════════════════════════════════════════════════════════════════════
325
+ // BCR-ABL RESISTANCE
326
+ // ═══════════════════════════════════════════════════════════════════════════
327
+ {
328
+ id: 'bcr-abl-t315i',
329
+ originalTarget: 'BCR-ABL',
330
+ originalDrugs: ['Imatinib', 'Dasatinib', 'Nilotinib', 'Bosutinib'],
331
+ resistanceMutation: 'BCR-ABL T315I gatekeeper mutation',
332
+ frequency: '15-20% of TKI-resistant CML',
333
+ detectionMethod: ['BCR-ABL mutation analysis', 'Sanger sequencing', 'NGS'],
334
+ overcomingStrategies: [
335
+ {
336
+ approach: 'Third-generation TKI',
337
+ drugs: ['Ponatinib'],
338
+ evidenceLevel: 'FDA-Approved',
339
+ expectedResponse: 'High response rates'
340
+ },
341
+ {
342
+ approach: 'Allosteric inhibitor',
343
+ drugs: ['Asciminib'],
344
+ evidenceLevel: 'FDA-Approved',
345
+ expectedResponse: 'Effective in T315I'
346
+ },
347
+ {
348
+ approach: 'Allogeneic stem cell transplant',
349
+ drugs: ['Allo-HSCT'],
350
+ evidenceLevel: 'FDA-Approved',
351
+ expectedResponse: 'Curative option'
352
+ }
353
+ ],
354
+ preventionStrategies: ['Adherence monitoring', 'Early mutation detection'],
355
+ prognosis: 'Good - ponatinib and asciminib effective'
356
+ },
357
+ // ═══════════════════════════════════════════════════════════════════════════
358
+ // IMMUNOTHERAPY RESISTANCE
359
+ // ═══════════════════════════════════════════════════════════════════════════
360
+ {
361
+ id: 'checkpoint-primary',
362
+ originalTarget: 'PD-1/PD-L1',
363
+ originalDrugs: ['Pembrolizumab', 'Nivolumab', 'Atezolizumab'],
364
+ resistanceMutation: 'Primary resistance (JAK1/2 loss, B2M loss, WNT activation)',
365
+ frequency: '40-60% never respond',
366
+ detectionMethod: ['Repeat biopsy with immune profiling', 'Gene expression analysis'],
367
+ overcomingStrategies: [
368
+ {
369
+ approach: 'Dual checkpoint blockade',
370
+ drugs: ['Ipilimumab + Nivolumab', 'Relatlimab + Nivolumab'],
371
+ evidenceLevel: 'FDA-Approved',
372
+ expectedResponse: 'May convert some non-responders'
373
+ },
374
+ {
375
+ approach: 'Combination with chemotherapy',
376
+ drugs: ['Pembrolizumab + Chemotherapy'],
377
+ evidenceLevel: 'FDA-Approved',
378
+ expectedResponse: 'Synergistic effect'
379
+ },
380
+ {
381
+ approach: 'Novel immune targets',
382
+ drugs: ['TIGIT inhibitors', 'LAG-3 inhibitors', 'TIM-3 inhibitors'],
383
+ evidenceLevel: 'Phase II',
384
+ expectedResponse: 'Under investigation',
385
+ clinicalTrials: ['Multiple ongoing']
386
+ }
387
+ ],
388
+ preventionStrategies: ['Biomarker selection (PD-L1, TMB, MSI-H)', 'Combination upfront'],
389
+ prognosis: 'Variable - depends on mechanism'
390
+ },
391
+ {
392
+ id: 'checkpoint-acquired',
393
+ originalTarget: 'PD-1/PD-L1',
394
+ originalDrugs: ['All checkpoint inhibitors'],
395
+ resistanceMutation: 'Acquired resistance (antigen loss, neoantigen editing, T-cell exhaustion)',
396
+ frequency: '30-50% of initial responders',
397
+ detectionMethod: ['Repeat biopsy', 'T-cell profiling', 'Neoantigen analysis'],
398
+ overcomingStrategies: [
399
+ {
400
+ approach: 'Rechallenge after break',
401
+ drugs: ['Same or different checkpoint inhibitor'],
402
+ evidenceLevel: 'Phase II',
403
+ expectedResponse: 'Variable, some responses'
404
+ },
405
+ {
406
+ approach: 'Cellular therapy',
407
+ drugs: ['TIL therapy (Lifileucel)', 'TCR-T cells'],
408
+ evidenceLevel: 'FDA-Approved',
409
+ expectedResponse: 'ORR 30-40% in melanoma'
410
+ },
411
+ {
412
+ approach: 'Oncolytic virus combination',
413
+ drugs: ['T-VEC + Pembrolizumab'],
414
+ evidenceLevel: 'Phase II',
415
+ expectedResponse: 'May enhance immune response'
416
+ }
417
+ ],
418
+ preventionStrategies: ['Optimize duration of therapy', 'Early detection of resistance'],
419
+ prognosis: 'Challenging - cellular therapies show promise'
420
+ },
421
+ // ═══════════════════════════════════════════════════════════════════════════
422
+ // KRAS INHIBITOR RESISTANCE
423
+ // ═══════════════════════════════════════════════════════════════════════════
424
+ {
425
+ id: 'kras-g12c-resistance',
426
+ originalTarget: 'KRAS G12C',
427
+ originalDrugs: ['Sotorasib', 'Adagrasib'],
428
+ resistanceMutation: 'Secondary KRAS mutations, RTK amplification, SHP2 activation',
429
+ frequency: 'Common within 6-12 months',
430
+ detectionMethod: ['ctDNA', 'Repeat biopsy'],
431
+ overcomingStrategies: [
432
+ {
433
+ approach: 'KRAS G12C + SHP2 inhibitor',
434
+ drugs: ['Sotorasib + RMC-4630'],
435
+ evidenceLevel: 'Phase I',
436
+ expectedResponse: 'Under investigation',
437
+ clinicalTrials: ['NCT04330664']
438
+ },
439
+ {
440
+ approach: 'KRAS G12C + SOS1 inhibitor',
441
+ drugs: ['Adagrasib + BI 1701963'],
442
+ evidenceLevel: 'Phase I',
443
+ expectedResponse: 'Under investigation'
444
+ },
445
+ {
446
+ approach: 'Immunotherapy combination',
447
+ drugs: ['Sotorasib + Pembrolizumab', 'Adagrasib + Pembrolizumab'],
448
+ evidenceLevel: 'Phase II',
449
+ expectedResponse: 'May extend benefit'
450
+ }
451
+ ],
452
+ preventionStrategies: ['Combination approaches upfront', 'Resistance monitoring'],
453
+ prognosis: 'Active area of research - combinations promising'
454
+ },
455
+ // ═══════════════════════════════════════════════════════════════════════════
456
+ // CAR-T RESISTANCE
457
+ // ═══════════════════════════════════════════════════════════════════════════
458
+ {
459
+ id: 'cart-antigen-loss',
460
+ originalTarget: 'CD19, BCMA',
461
+ originalDrugs: ['CD19 CAR-T', 'BCMA CAR-T'],
462
+ resistanceMutation: 'Antigen loss/downregulation, T-cell exhaustion',
463
+ frequency: '30-50% of CAR-T relapses',
464
+ detectionMethod: ['Flow cytometry for antigen', 'Repeat biopsy'],
465
+ overcomingStrategies: [
466
+ {
467
+ approach: 'Alternative target CAR-T',
468
+ drugs: ['CD22 CAR-T (for CD19 loss)', 'GPRC5D CAR-T (for BCMA loss)'],
469
+ evidenceLevel: 'Phase I',
470
+ expectedResponse: 'Responses seen'
471
+ },
472
+ {
473
+ approach: 'Bispecific antibodies',
474
+ drugs: ['Blinatumomab', 'Teclistamab', 'Talquetamab'],
475
+ evidenceLevel: 'FDA-Approved',
476
+ expectedResponse: 'Alternative target engagement'
477
+ },
478
+ {
479
+ approach: 'Dual-targeting CAR-T',
480
+ drugs: ['CD19/CD22 CAR-T', 'BCMA/CD38 CAR-T'],
481
+ evidenceLevel: 'Phase I',
482
+ expectedResponse: 'May prevent escape',
483
+ clinicalTrials: ['Multiple ongoing']
484
+ }
485
+ ],
486
+ preventionStrategies: ['Dual-targeting from start', 'Early CAR-T consideration'],
487
+ prognosis: 'Challenging - alternative targets help'
488
+ }
489
+ ];
490
+ export const RESISTANCE_MONITORING_PROTOCOLS = {
491
+ egfr: {
492
+ baseline: ['Comprehensive genomic profiling', 'ctDNA baseline'],
493
+ onTreatment: ['ctDNA every 8 weeks', 'T790M monitoring'],
494
+ atProgression: ['Repeat biopsy if accessible', 'ctDNA comprehensive', 'MET FISH'],
495
+ frequency: 'Every 8-12 weeks'
496
+ },
497
+ alk: {
498
+ baseline: ['ALK FISH/IHC', 'NGS for resistance mutations'],
499
+ onTreatment: ['ctDNA for ALK resistance mutations'],
500
+ atProgression: ['Repeat biopsy', 'Full ALK resistance panel'],
501
+ frequency: 'Every 12 weeks'
502
+ },
503
+ her2: {
504
+ baseline: ['HER2 IHC/FISH', 'PIK3CA mutation status', 'ctDNA'],
505
+ onTreatment: ['ctDNA monitoring'],
506
+ atProgression: ['Repeat HER2 testing', 'PIK3CA status', 'Genomic profiling'],
507
+ frequency: 'Every 12 weeks'
508
+ },
509
+ hormone: {
510
+ baseline: ['ER/PR status', 'ESR1 ctDNA', 'PIK3CA status'],
511
+ onTreatment: ['ESR1 ctDNA every 12 weeks', 'Tumor markers'],
512
+ atProgression: ['Repeat biopsy for ER status', 'ESR1 full panel', 'Genomic profiling'],
513
+ frequency: 'Every 12 weeks'
514
+ },
515
+ immunotherapy: {
516
+ baseline: ['PD-L1', 'TMB', 'MSI status', 'Gene expression profiling'],
517
+ onTreatment: ['ctDNA for response', 'irRC imaging'],
518
+ atProgression: ['Repeat biopsy with immune profiling', 'JAK/B2M status', 'WNT pathway'],
519
+ frequency: 'Every 8-12 weeks'
520
+ }
521
+ };
522
+ // ═══════════════════════════════════════════════════════════════════════════════
523
+ // RESISTANCE MANAGEMENT ENGINE
524
+ // ═══════════════════════════════════════════════════════════════════════════════
525
+ export class ResistanceManagementEngine {
526
+ /**
527
+ * Analyze resistance and provide next-step recommendations
528
+ */
529
+ analyzeResistance(currentTherapy, target, detectedMechanism, patientProfile) {
530
+ // Find matching resistance mechanism
531
+ const mechanism = RESISTANCE_MECHANISM_DATABASE.find(m => m.originalTarget.toLowerCase().includes(target.toLowerCase()) ||
532
+ m.resistanceMutation.toLowerCase().includes(detectedMechanism.toLowerCase()));
533
+ if (!mechanism) {
534
+ return {
535
+ mechanism: undefined,
536
+ recommendedStrategies: [{
537
+ approach: 'Comprehensive genomic profiling',
538
+ drugs: ['Clinical trial enrollment recommended'],
539
+ evidenceLevel: 'Phase II',
540
+ expectedResponse: 'Personalized approach needed'
541
+ }],
542
+ clinicalTrials: ['Search clinicaltrials.gov for target + resistance'],
543
+ prognosis: 'Unknown mechanism - further workup needed',
544
+ urgency: 'soon'
545
+ };
546
+ }
547
+ // Filter strategies by patient fitness
548
+ let strategies = [...mechanism.overcomingStrategies];
549
+ if (patientProfile.ps >= 2 || patientProfile.age >= 75) {
550
+ strategies = strategies.filter(s => s.evidenceLevel === 'FDA-Approved' ||
551
+ s.expectedResponse.toLowerCase().includes('tolerable'));
552
+ }
553
+ // Collect clinical trials
554
+ const trials = strategies
555
+ .filter(s => s.clinicalTrials)
556
+ .flatMap(s => s.clinicalTrials);
557
+ // Determine urgency
558
+ const urgency = detectedMechanism.toLowerCase().includes('transform') ? 'immediate' :
559
+ patientProfile.priorLines >= 3 ? 'immediate' : 'soon';
560
+ return {
561
+ mechanism,
562
+ recommendedStrategies: strategies,
563
+ clinicalTrials: trials,
564
+ prognosis: mechanism.prognosis,
565
+ urgency
566
+ };
567
+ }
568
+ /**
569
+ * Generate resistance prevention strategy
570
+ */
571
+ generatePreventionPlan(cancerType, targetedTherapy, biomarkers) {
572
+ const strategies = [];
573
+ const combinationOptions = [];
574
+ // General prevention strategies
575
+ strategies.push('Regular ctDNA monitoring for early detection');
576
+ strategies.push('Consider combination therapy to delay resistance');
577
+ strategies.push('Optimize drug exposure with TDM if available');
578
+ // Target-specific strategies
579
+ if (targetedTherapy.toLowerCase().includes('egfr')) {
580
+ strategies.push('Start with osimertinib to prevent T790M');
581
+ combinationOptions.push('EGFR + MET inhibitor');
582
+ combinationOptions.push('EGFR + antiangiogenic');
583
+ }
584
+ if (targetedTherapy.toLowerCase().includes('braf')) {
585
+ strategies.push('Always use BRAF + MEK combination');
586
+ strategies.push('Consider immunotherapy sequencing');
587
+ combinationOptions.push('BRAF/MEK + immunotherapy');
588
+ }
589
+ if (targetedTherapy.toLowerCase().includes('cdk4')) {
590
+ strategies.push('Monitor ESR1 mutations');
591
+ strategies.push('Consider triplet therapy in high-risk');
592
+ combinationOptions.push('CDK4/6i + endocrine + PI3K inhibitor');
593
+ }
594
+ const monitoringKey = targetedTherapy.toLowerCase().includes('egfr') ? 'egfr' :
595
+ targetedTherapy.toLowerCase().includes('alk') ? 'alk' :
596
+ targetedTherapy.toLowerCase().includes('her2') ? 'her2' :
597
+ 'immunotherapy';
598
+ return {
599
+ strategies,
600
+ monitoring: RESISTANCE_MONITORING_PROTOCOLS[monitoringKey] || RESISTANCE_MONITORING_PROTOCOLS.immunotherapy,
601
+ combinationOptions
602
+ };
603
+ }
604
+ /**
605
+ * Get all resistance mechanisms for a target
606
+ */
607
+ getResistanceMechanismsForTarget(target) {
608
+ return RESISTANCE_MECHANISM_DATABASE.filter(m => m.originalTarget.toLowerCase().includes(target.toLowerCase()) ||
609
+ m.originalDrugs.some(d => d.toLowerCase().includes(target.toLowerCase())));
610
+ }
611
+ }
612
+ export class CureVerificationEngine {
613
+ /**
614
+ * Verify cure status based on multiple criteria
615
+ */
616
+ verifyCureStatus(cancerType, treatmentDuration, imagingResult, mrdStatus, ctdnaStatus, timeOffTherapy, // months
617
+ lastProgression // months since
618
+ ) {
619
+ const evidence = [];
620
+ let status = 'STABLE';
621
+ let confidence = 0.5;
622
+ // Imaging evidence
623
+ if (imagingResult === 'CR' || imagingResult === 'NED') {
624
+ evidence.push('Complete radiographic response / No evidence of disease');
625
+ confidence += 0.2;
626
+ }
627
+ else if (imagingResult === 'PR') {
628
+ evidence.push('Partial radiographic response');
629
+ }
630
+ // MRD evidence
631
+ if (mrdStatus === 'negative') {
632
+ evidence.push('MRD negative by validated assay');
633
+ confidence += 0.2;
634
+ }
635
+ // ctDNA evidence
636
+ if (ctdnaStatus === 'undetectable') {
637
+ evidence.push('ctDNA undetectable');
638
+ confidence += 0.1;
639
+ }
640
+ // Time-based criteria
641
+ if (timeOffTherapy >= 24 && imagingResult === 'NED') {
642
+ evidence.push('Disease-free for 2+ years off therapy');
643
+ confidence += 0.2;
644
+ }
645
+ // Determine status
646
+ if (confidence >= 0.9 && imagingResult === 'NED' && (mrdStatus === 'negative' || ctdnaStatus === 'undetectable') && timeOffTherapy >= 24) {
647
+ status = 'CURED';
648
+ }
649
+ else if (confidence >= 0.7 && (mrdStatus === 'negative' || ctdnaStatus === 'undetectable')) {
650
+ status = 'MRD_NEGATIVE';
651
+ }
652
+ else if (imagingResult === 'CR' || imagingResult === 'NED') {
653
+ status = 'REMISSION';
654
+ }
655
+ else if (imagingResult === 'PR') {
656
+ status = 'RESPONDING';
657
+ }
658
+ else if (imagingResult === 'PD') {
659
+ status = 'PROGRESSING';
660
+ }
661
+ // Generate surveillance plan
662
+ const surveillancePlan = this.generateSurveillancePlan(cancerType, status);
663
+ // Long-term risks
664
+ const longTermRisks = this.assessLongTermRisks(cancerType, treatmentDuration);
665
+ return {
666
+ status,
667
+ confidence: Math.min(confidence, 0.98),
668
+ evidence,
669
+ surveillancePlan,
670
+ nextAssessment: this.getNextAssessmentTime(status),
671
+ longTermRisks
672
+ };
673
+ }
674
+ generateSurveillancePlan(cancerType, status) {
675
+ const basePlan = [
676
+ 'History and physical exam every 3-6 months for 2 years',
677
+ 'Annual imaging per cancer-specific guidelines',
678
+ 'Tumor markers if applicable'
679
+ ];
680
+ if (status === 'CURED' || status === 'MRD_NEGATIVE') {
681
+ basePlan.push('Transition to annual survivorship visits after 5 years');
682
+ basePlan.push('Long-term effects monitoring');
683
+ basePlan.push('Secondary malignancy screening');
684
+ }
685
+ return basePlan;
686
+ }
687
+ assessLongTermRisks(cancerType, treatmentDuration) {
688
+ const risks = [];
689
+ risks.push('Late recurrence (monitor per guidelines)');
690
+ risks.push('Second primary malignancy');
691
+ risks.push('Treatment-related late effects');
692
+ if (treatmentDuration > 12) {
693
+ risks.push('Cardiovascular monitoring recommended');
694
+ risks.push('Bone health assessment');
695
+ }
696
+ return risks;
697
+ }
698
+ getNextAssessmentTime(status) {
699
+ switch (status) {
700
+ case 'CURED': return '12 months (annual surveillance)';
701
+ case 'MRD_NEGATIVE': return '3-6 months (confirm durability)';
702
+ case 'REMISSION': return '3 months (confirm stability)';
703
+ case 'RESPONDING': return '2-3 months (assess depth of response)';
704
+ case 'STABLE': return '2-3 months (monitor for progression)';
705
+ case 'PROGRESSING': return 'Immediate (treatment change needed)';
706
+ default: return '3 months';
707
+ }
708
+ }
709
+ }
710
+ // Export singleton instances
711
+ export const resistanceManagementEngine = new ResistanceManagementEngine();
712
+ export const cureVerificationEngine = new CureVerificationEngine();
713
+ //# sourceMappingURL=resistanceManagement.js.map