@kya-os/consent 0.1.44 → 0.1.47
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.
- package/dist/bundle/inline.d.ts.map +1 -1
- package/dist/bundle/inline.js +4 -4
- package/dist/bundle/inline.js.map +1 -1
- package/dist/cjs/bundle/inline.js +4 -4
- package/dist/cjs/bundle/inline.js.map +1 -1
- package/dist/cjs/components/consent-capabilities-screen.js +52 -12
- package/dist/cjs/components/consent-capabilities-screen.js.map +1 -1
- package/dist/cjs/components/consent-capability-card.js +191 -32
- package/dist/cjs/components/consent-capability-card.js.map +1 -1
- package/dist/cjs/components/mcp-consent.js +231 -79
- package/dist/cjs/components/mcp-consent.js.map +1 -1
- package/dist/cjs/mcp-app/inline.js +2 -2
- package/dist/cjs/mcp-app/inline.js.map +1 -1
- package/dist/cjs/resolution/credential-capabilities.js +69 -0
- package/dist/cjs/resolution/credential-capabilities.js.map +1 -0
- package/dist/cjs/security/identity-assertion.js +69 -0
- package/dist/cjs/security/identity-assertion.js.map +1 -0
- package/dist/cjs/security/index.js +1 -0
- package/dist/cjs/security/index.js.map +1 -1
- package/dist/components/consent-capabilities-screen.d.ts +32 -0
- package/dist/components/consent-capabilities-screen.d.ts.map +1 -1
- package/dist/components/consent-capabilities-screen.js +53 -13
- package/dist/components/consent-capabilities-screen.js.map +1 -1
- package/dist/components/consent-capability-card.d.ts.map +1 -1
- package/dist/components/consent-capability-card.js +191 -32
- package/dist/components/consent-capability-card.js.map +1 -1
- package/dist/components/mcp-consent.d.ts +60 -0
- package/dist/components/mcp-consent.d.ts.map +1 -1
- package/dist/components/mcp-consent.js +231 -79
- package/dist/components/mcp-consent.js.map +1 -1
- package/dist/consent.js +486 -167
- package/dist/consent.min.js +286 -127
- package/dist/mcp-app/inline.d.ts.map +1 -1
- package/dist/mcp-app/inline.js +2 -2
- package/dist/mcp-app/inline.js.map +1 -1
- package/dist/resolution/credential-capabilities.d.ts +38 -0
- package/dist/resolution/credential-capabilities.d.ts.map +1 -0
- package/dist/resolution/credential-capabilities.js +61 -0
- package/dist/resolution/credential-capabilities.js.map +1 -0
- package/dist/security/identity-assertion.d.ts +49 -0
- package/dist/security/identity-assertion.d.ts.map +1 -0
- package/dist/security/identity-assertion.js +66 -0
- package/dist/security/identity-assertion.js.map +1 -0
- package/dist/security/index.d.ts +1 -0
- package/dist/security/index.d.ts.map +1 -1
- package/dist/security/index.js +1 -0
- package/dist/security/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -102,9 +102,7 @@ let ConsentCapabilityCard = class ConsentCapabilityCard extends LitElement {
|
|
|
102
102
|
: explanation.actions.map((action) => html `<li><code>${action}</code></li>`)}
|
|
103
103
|
</ul>
|
|
104
104
|
${explanation.resource
|
|
105
|
-
? html `<p>
|
|
106
|
-
On <code>${explanation.resource}</code>
|
|
107
|
-
</p>`
|
|
105
|
+
? html `<p>On <code>${explanation.resource}</code></p>`
|
|
108
106
|
: html `<p>On ${tokens.glossUnknownResource}</p>`}
|
|
109
107
|
<h4>${tokens.rawPolicyTitle}</h4>
|
|
110
108
|
<pre><code>${this.compiledCedar}</code></pre>
|
|
@@ -145,7 +143,10 @@ let ConsentCapabilityCard = class ConsentCapabilityCard extends LitElement {
|
|
|
145
143
|
<div class="icon-tile" aria-hidden="true">${this.renderIcon()}</div>
|
|
146
144
|
<div class="body">
|
|
147
145
|
<div class="row-label">
|
|
148
|
-
<span
|
|
146
|
+
<span
|
|
147
|
+
><strong>${this.label}</strong>
|
|
148
|
+
<span class="description">${this.description}</span></span
|
|
149
|
+
>
|
|
149
150
|
${this.isHigherRisk()
|
|
150
151
|
? html `<span class="risk-chip">${tokens.higherRiskChip}</span>`
|
|
151
152
|
: nothing}
|
|
@@ -203,16 +204,18 @@ ConsentCapabilityCard.styles = css `
|
|
|
203
204
|
align-items: center;
|
|
204
205
|
justify-content: center;
|
|
205
206
|
padding: 0;
|
|
206
|
-
transition:
|
|
207
|
+
transition:
|
|
208
|
+
background 0.12s ease,
|
|
209
|
+
border-color 0.12s ease;
|
|
207
210
|
}
|
|
208
211
|
|
|
209
212
|
.checkbox[aria-checked="true"] {
|
|
210
|
-
background: var(--cs-surface-accent, #
|
|
211
|
-
border-color: var(--cs-surface-accent, #
|
|
213
|
+
background: var(--cs-surface-accent, #0f172a);
|
|
214
|
+
border-color: var(--cs-surface-accent, #0f172a);
|
|
212
215
|
}
|
|
213
216
|
|
|
214
217
|
.checkbox:focus-visible {
|
|
215
|
-
outline: 2px solid var(--cs-focus-ring, #
|
|
218
|
+
outline: 2px solid var(--cs-focus-ring, #0f172a);
|
|
216
219
|
outline-offset: 2px;
|
|
217
220
|
}
|
|
218
221
|
|
|
@@ -226,7 +229,7 @@ ConsentCapabilityCard.styles = css `
|
|
|
226
229
|
width: 36px;
|
|
227
230
|
height: 36px;
|
|
228
231
|
border-radius: 10px;
|
|
229
|
-
background: var(--cs-surface-inset, #
|
|
232
|
+
background: var(--cs-surface-inset, #f1ece2);
|
|
230
233
|
display: flex;
|
|
231
234
|
align-items: center;
|
|
232
235
|
justify-content: center;
|
|
@@ -251,7 +254,7 @@ ConsentCapabilityCard.styles = css `
|
|
|
251
254
|
gap: 10px;
|
|
252
255
|
flex-wrap: wrap;
|
|
253
256
|
font-size: 14.5px;
|
|
254
|
-
color: var(--cs-text-primary, #
|
|
257
|
+
color: var(--cs-text-primary, #0f172a);
|
|
255
258
|
line-height: 1.45;
|
|
256
259
|
}
|
|
257
260
|
|
|
@@ -270,8 +273,8 @@ ConsentCapabilityCard.styles = css `
|
|
|
270
273
|
font-size: 10.5px;
|
|
271
274
|
font-weight: 700;
|
|
272
275
|
letter-spacing: 0.06em;
|
|
273
|
-
background: var(--cs-chip-risk-bg, #
|
|
274
|
-
color: var(--cs-chip-risk-text, #
|
|
276
|
+
background: var(--cs-chip-risk-bg, #fce7b6);
|
|
277
|
+
color: var(--cs-chip-risk-text, #7a4f00);
|
|
275
278
|
}
|
|
276
279
|
|
|
277
280
|
.policy-toggle {
|
|
@@ -281,21 +284,21 @@ ConsentCapabilityCard.styles = css `
|
|
|
281
284
|
padding: 0;
|
|
282
285
|
font-size: 12px;
|
|
283
286
|
font-weight: 500;
|
|
284
|
-
color: var(--cs-text-tertiary, #
|
|
287
|
+
color: var(--cs-text-tertiary, #64748b);
|
|
285
288
|
text-decoration: underline;
|
|
286
289
|
text-underline-offset: 2px;
|
|
287
290
|
cursor: pointer;
|
|
288
291
|
}
|
|
289
292
|
|
|
290
293
|
.policy-toggle:focus-visible {
|
|
291
|
-
outline: 2px solid var(--cs-focus-ring, #
|
|
294
|
+
outline: 2px solid var(--cs-focus-ring, #0f172a);
|
|
292
295
|
outline-offset: 2px;
|
|
293
296
|
}
|
|
294
297
|
|
|
295
298
|
.policy-disclosure {
|
|
296
299
|
margin-top: 8px;
|
|
297
300
|
border-radius: 10px;
|
|
298
|
-
background: var(--cs-surface-inset, #
|
|
301
|
+
background: var(--cs-surface-inset, #f1ece2);
|
|
299
302
|
padding: 10px 12px;
|
|
300
303
|
font-size: 12px;
|
|
301
304
|
color: var(--cs-text-secondary, #334155);
|
|
@@ -309,7 +312,7 @@ ConsentCapabilityCard.styles = css `
|
|
|
309
312
|
font-size: 11px;
|
|
310
313
|
letter-spacing: 0.08em;
|
|
311
314
|
text-transform: uppercase;
|
|
312
|
-
color: var(--cs-text-tertiary, #
|
|
315
|
+
color: var(--cs-text-tertiary, #64748b);
|
|
313
316
|
}
|
|
314
317
|
|
|
315
318
|
.policy-disclosure pre {
|
|
@@ -319,7 +322,7 @@ ConsentCapabilityCard.styles = css `
|
|
|
319
322
|
line-height: 1.5;
|
|
320
323
|
white-space: pre-wrap;
|
|
321
324
|
word-break: break-word;
|
|
322
|
-
color: var(--cs-text-primary, #
|
|
325
|
+
color: var(--cs-text-primary, #0f172a);
|
|
323
326
|
}
|
|
324
327
|
|
|
325
328
|
.policy-disclosure ul {
|
|
@@ -362,35 +365,191 @@ export { ConsentCapabilityCard };
|
|
|
362
365
|
function iconSvgFor(icon) {
|
|
363
366
|
switch (icon) {
|
|
364
367
|
case "search":
|
|
365
|
-
return html `<svg
|
|
368
|
+
return html `<svg
|
|
369
|
+
viewBox="0 0 20 20"
|
|
370
|
+
fill="none"
|
|
371
|
+
stroke="currentColor"
|
|
372
|
+
stroke-width="1.6"
|
|
373
|
+
stroke-linecap="round"
|
|
374
|
+
stroke-linejoin="round"
|
|
375
|
+
>
|
|
376
|
+
<circle cx="9" cy="9" r="5.25" />
|
|
377
|
+
<path d="m13.25 13.25 3.5 3.5" />
|
|
378
|
+
</svg>`;
|
|
366
379
|
case "cart":
|
|
367
|
-
return html `<svg
|
|
380
|
+
return html `<svg
|
|
381
|
+
viewBox="0 0 20 20"
|
|
382
|
+
fill="none"
|
|
383
|
+
stroke="currentColor"
|
|
384
|
+
stroke-width="1.6"
|
|
385
|
+
stroke-linecap="round"
|
|
386
|
+
stroke-linejoin="round"
|
|
387
|
+
>
|
|
388
|
+
<path
|
|
389
|
+
d="M3 3h2l1.4 9.4a1.5 1.5 0 0 0 1.5 1.3h7.6a1.5 1.5 0 0 0 1.5-1.2L18 6H6"
|
|
390
|
+
/>
|
|
391
|
+
<circle cx="9" cy="17" r="1.2" />
|
|
392
|
+
<circle cx="15" cy="17" r="1.2" />
|
|
393
|
+
</svg>`;
|
|
368
394
|
case "card":
|
|
369
|
-
return html `<svg
|
|
395
|
+
return html `<svg
|
|
396
|
+
viewBox="0 0 20 20"
|
|
397
|
+
fill="none"
|
|
398
|
+
stroke="currentColor"
|
|
399
|
+
stroke-width="1.6"
|
|
400
|
+
stroke-linecap="round"
|
|
401
|
+
stroke-linejoin="round"
|
|
402
|
+
>
|
|
403
|
+
<rect x="2.5" y="4.5" width="15" height="11" rx="2" />
|
|
404
|
+
<path d="M2.5 9h15" />
|
|
405
|
+
<path d="M5.5 13h3" />
|
|
406
|
+
</svg>`;
|
|
370
407
|
case "pin":
|
|
371
|
-
return html `<svg
|
|
408
|
+
return html `<svg
|
|
409
|
+
viewBox="0 0 20 20"
|
|
410
|
+
fill="none"
|
|
411
|
+
stroke="currentColor"
|
|
412
|
+
stroke-width="1.6"
|
|
413
|
+
stroke-linecap="round"
|
|
414
|
+
stroke-linejoin="round"
|
|
415
|
+
>
|
|
416
|
+
<path d="M10 17s-5.5-5-5.5-9a5.5 5.5 0 1 1 11 0c0 4-5.5 9-5.5 9z" />
|
|
417
|
+
<circle cx="10" cy="8" r="2" />
|
|
418
|
+
</svg>`;
|
|
372
419
|
case "pin-new":
|
|
373
|
-
return html `<svg
|
|
420
|
+
return html `<svg
|
|
421
|
+
viewBox="0 0 20 20"
|
|
422
|
+
fill="none"
|
|
423
|
+
stroke="currentColor"
|
|
424
|
+
stroke-width="1.6"
|
|
425
|
+
stroke-linecap="round"
|
|
426
|
+
stroke-linejoin="round"
|
|
427
|
+
>
|
|
428
|
+
<path d="M10 17s-5.5-5-5.5-9a5.5 5.5 0 1 1 11 0c0 4-5.5 9-5.5 9z" />
|
|
429
|
+
<path d="M10 6v4" />
|
|
430
|
+
<path d="M8 8h4" />
|
|
431
|
+
</svg>`;
|
|
374
432
|
case "shield":
|
|
375
|
-
return html `<svg
|
|
433
|
+
return html `<svg
|
|
434
|
+
viewBox="0 0 20 20"
|
|
435
|
+
fill="none"
|
|
436
|
+
stroke="currentColor"
|
|
437
|
+
stroke-width="1.6"
|
|
438
|
+
stroke-linecap="round"
|
|
439
|
+
stroke-linejoin="round"
|
|
440
|
+
>
|
|
441
|
+
<path d="M10 2.5 4 5v5.5C4 14 6.5 16.5 10 17.5c3.5-1 6-3.5 6-7V5z" />
|
|
442
|
+
</svg>`;
|
|
376
443
|
case "key":
|
|
377
|
-
return html `<svg
|
|
444
|
+
return html `<svg
|
|
445
|
+
viewBox="0 0 20 20"
|
|
446
|
+
fill="none"
|
|
447
|
+
stroke="currentColor"
|
|
448
|
+
stroke-width="1.6"
|
|
449
|
+
stroke-linecap="round"
|
|
450
|
+
stroke-linejoin="round"
|
|
451
|
+
>
|
|
452
|
+
<circle cx="7" cy="13" r="3.25" />
|
|
453
|
+
<path d="m9.5 11 6.5-6.5" />
|
|
454
|
+
<path d="m13.5 7 2 2" />
|
|
455
|
+
</svg>`;
|
|
378
456
|
case "tools":
|
|
379
|
-
return html `<svg
|
|
457
|
+
return html `<svg
|
|
458
|
+
viewBox="0 0 20 20"
|
|
459
|
+
fill="none"
|
|
460
|
+
stroke="currentColor"
|
|
461
|
+
stroke-width="1.6"
|
|
462
|
+
stroke-linecap="round"
|
|
463
|
+
stroke-linejoin="round"
|
|
464
|
+
>
|
|
465
|
+
<path d="m4 4 6 6" />
|
|
466
|
+
<path d="m10 4 6 6" />
|
|
467
|
+
<path d="m4 16 12-12" />
|
|
468
|
+
</svg>`;
|
|
380
469
|
case "user":
|
|
381
|
-
return html `<svg
|
|
470
|
+
return html `<svg
|
|
471
|
+
viewBox="0 0 20 20"
|
|
472
|
+
fill="none"
|
|
473
|
+
stroke="currentColor"
|
|
474
|
+
stroke-width="1.6"
|
|
475
|
+
stroke-linecap="round"
|
|
476
|
+
stroke-linejoin="round"
|
|
477
|
+
>
|
|
478
|
+
<circle cx="10" cy="7" r="3" />
|
|
479
|
+
<path d="M3 17a7 7 0 0 1 14 0" />
|
|
480
|
+
</svg>`;
|
|
382
481
|
case "calendar":
|
|
383
|
-
return html `<svg
|
|
482
|
+
return html `<svg
|
|
483
|
+
viewBox="0 0 20 20"
|
|
484
|
+
fill="none"
|
|
485
|
+
stroke="currentColor"
|
|
486
|
+
stroke-width="1.6"
|
|
487
|
+
stroke-linecap="round"
|
|
488
|
+
stroke-linejoin="round"
|
|
489
|
+
>
|
|
490
|
+
<rect x="3" y="4" width="14" height="13" rx="2" />
|
|
491
|
+
<path d="M3 8h14" />
|
|
492
|
+
<path d="M7 2v4M13 2v4" />
|
|
493
|
+
</svg>`;
|
|
384
494
|
case "lock":
|
|
385
|
-
return html `<svg
|
|
495
|
+
return html `<svg
|
|
496
|
+
viewBox="0 0 20 20"
|
|
497
|
+
fill="none"
|
|
498
|
+
stroke="currentColor"
|
|
499
|
+
stroke-width="1.6"
|
|
500
|
+
stroke-linecap="round"
|
|
501
|
+
stroke-linejoin="round"
|
|
502
|
+
>
|
|
503
|
+
<rect x="4" y="9" width="12" height="8" rx="2" />
|
|
504
|
+
<path d="M7 9V6a3 3 0 0 1 6 0v3" />
|
|
505
|
+
</svg>`;
|
|
386
506
|
case "eye":
|
|
387
|
-
return html `<svg
|
|
507
|
+
return html `<svg
|
|
508
|
+
viewBox="0 0 20 20"
|
|
509
|
+
fill="none"
|
|
510
|
+
stroke="currentColor"
|
|
511
|
+
stroke-width="1.6"
|
|
512
|
+
stroke-linecap="round"
|
|
513
|
+
stroke-linejoin="round"
|
|
514
|
+
>
|
|
515
|
+
<path d="M2 10s3-6 8-6 8 6 8 6-3 6-8 6-8-6-8-6z" />
|
|
516
|
+
<circle cx="10" cy="10" r="2.25" />
|
|
517
|
+
</svg>`;
|
|
388
518
|
case "send":
|
|
389
|
-
return html `<svg
|
|
519
|
+
return html `<svg
|
|
520
|
+
viewBox="0 0 20 20"
|
|
521
|
+
fill="none"
|
|
522
|
+
stroke="currentColor"
|
|
523
|
+
stroke-width="1.6"
|
|
524
|
+
stroke-linecap="round"
|
|
525
|
+
stroke-linejoin="round"
|
|
526
|
+
>
|
|
527
|
+
<path d="m17 3-7 7-2 7-3-9z" />
|
|
528
|
+
</svg>`;
|
|
390
529
|
case "package":
|
|
391
|
-
return html `<svg
|
|
530
|
+
return html `<svg
|
|
531
|
+
viewBox="0 0 20 20"
|
|
532
|
+
fill="none"
|
|
533
|
+
stroke="currentColor"
|
|
534
|
+
stroke-width="1.6"
|
|
535
|
+
stroke-linecap="round"
|
|
536
|
+
stroke-linejoin="round"
|
|
537
|
+
>
|
|
538
|
+
<path d="m10 2 7 4v8l-7 4-7-4V6z" />
|
|
539
|
+
<path d="m3 6 7 4 7-4" />
|
|
540
|
+
<path d="M10 18V10" />
|
|
541
|
+
</svg>`;
|
|
392
542
|
default:
|
|
393
|
-
return html `<svg
|
|
543
|
+
return html `<svg
|
|
544
|
+
viewBox="0 0 20 20"
|
|
545
|
+
fill="none"
|
|
546
|
+
stroke="currentColor"
|
|
547
|
+
stroke-width="1.6"
|
|
548
|
+
stroke-linecap="round"
|
|
549
|
+
stroke-linejoin="round"
|
|
550
|
+
>
|
|
551
|
+
<circle cx="10" cy="10" r="5" />
|
|
552
|
+
</svg>`;
|
|
394
553
|
}
|
|
395
554
|
}
|
|
396
555
|
//# sourceMappingURL=consent-capability-card.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consent-capability-card.js","sourceRoot":"","sources":["../../src/components/consent-capability-card.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;;;;;;;AAEH,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAEnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAYpD,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,UAAU;IAA9C;;QACuB,iBAAY,GAAG,EAAE,CAAC;QAClB,UAAK,GAAG,EAAE,CAAC;QACX,gBAAW,GAAG,EAAE,CAAC;QACjB,SAAI,GAAmB,SAAS,CAAC;QACjC,cAAS,GAAc,KAAK,CAAC;QACb,YAAO,GAAG,KAAK,CAAC;QACH,kBAAa,GAAG,EAAE,CAAC;QAE3D,eAAU,GAAG,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"consent-capability-card.js","sourceRoot":"","sources":["../../src/components/consent-capability-card.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;;;;;;;AAEH,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACrD,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K,QAAQ;YACX,OAAO,IAAI,CAAA;;;;;;;;;aASJ,CAAC;QACV,KAAK,KAAK;YACR,OAAO,IAAI,CAAA;;;;;;;;;;;aAWJ,CAAC;QACV,KAAK,OAAO;YACV,OAAO,IAAI,CAAA;;;;;;;;;;;aAWJ,CAAC;QACV,KAAK,MAAM;YACT,OAAO,IAAI,CAAA;;;;;;;;;;aAUJ,CAAC;QACV,KAAK,UAAU;YACb,OAAO,IAAI,CAAA;;;;;;;;;;;aAWJ,CAAC;QACV,KAAK,MAAM;YACT,OAAO,IAAI,CAAA;;;;;;;;;;aAUJ,CAAC;QACV,KAAK,KAAK;YACR,OAAO,IAAI,CAAA;;;;;;;;;;aAUJ,CAAC;QACV,KAAK,MAAM;YACT,OAAO,IAAI,CAAA;;;;;;;;;aASJ,CAAC;QACV,KAAK,SAAS;YACZ,OAAO,IAAI,CAAA;;;;;;;;;;;aAWJ,CAAC;QACV;YACE,OAAO,IAAI,CAAA;;;;;;;;;aASJ,CAAC;IACZ,CAAC;AACH,CAAC"}
|
|
@@ -229,8 +229,51 @@ export declare class McpConsent extends LitElement {
|
|
|
229
229
|
* Stored as class property for cleanup in disconnectedCallback
|
|
230
230
|
*/
|
|
231
231
|
private resendCooldownInterval?;
|
|
232
|
+
/**
|
|
233
|
+
* Grant-bound signed identity assertion read from the URL fragment
|
|
234
|
+
* (`#identity_assertion=...`) after credential/OAuth sign-in - see
|
|
235
|
+
* `readIdentityAssertionFromLocation`. Not a `@property`/`@state`: it
|
|
236
|
+
* never arrives as an attribute (the server-rendered shell can't see the
|
|
237
|
+
* fragment, so it has nothing to pass down) and reading it must not
|
|
238
|
+
* trigger a re-render.
|
|
239
|
+
*/
|
|
240
|
+
private identityAssertion?;
|
|
241
|
+
/**
|
|
242
|
+
* Memoized `this.capabilities.flatMap((group) => group.capabilities)`.
|
|
243
|
+
* Recomputed only when `this.capabilities` itself changes identity, not on
|
|
244
|
+
* every render. `<consent-capabilities-screen>` re-seeds its selection
|
|
245
|
+
* whenever the array it receives changes contents, so handing it a fresh
|
|
246
|
+
* array on every keystroke (this component re-renders on every `formData`
|
|
247
|
+
* change) would silently reset the user's toggles.
|
|
248
|
+
*/
|
|
249
|
+
private flatCapabilitiesCache?;
|
|
250
|
+
/**
|
|
251
|
+
* Flattened capability list, memoized against `this.capabilities` array
|
|
252
|
+
* identity so repeated calls within (and across) renders return the same
|
|
253
|
+
* array instance until the operator-supplied capability groups actually
|
|
254
|
+
* change. See `flatCapabilitiesCache`.
|
|
255
|
+
*/
|
|
256
|
+
private getFlatCapabilities;
|
|
232
257
|
static styles: import("lit").CSSResult;
|
|
233
258
|
connectedCallback(): void;
|
|
259
|
+
/**
|
|
260
|
+
* Read the grant-bound signed identity assertion the worker delivers via
|
|
261
|
+
* the URL fragment (`#identity_assertion=...`) after credential/OAuth
|
|
262
|
+
* sign-in - see docs/superpowers/specs/2026-07-29-consent-approve-auth-gate-design.md
|
|
263
|
+
* §3.1/§4. Fragments are never sent to the server (not in access logs, not
|
|
264
|
+
* in `Referer`), so the server-rendered shell never sees this value and
|
|
265
|
+
* cannot pass it down as an attribute; this is the only place it can be
|
|
266
|
+
* read.
|
|
267
|
+
*
|
|
268
|
+
* Guards for environments without `window`/`location` (SSR, or the
|
|
269
|
+
* component constructed outside a browser) so this never throws.
|
|
270
|
+
*
|
|
271
|
+
* Clears the fragment immediately after reading it (via
|
|
272
|
+
* `history.replaceState`) so the token doesn't linger in browser history
|
|
273
|
+
* or get replayed via back/forward navigation. Only clears when an
|
|
274
|
+
* assertion was actually found.
|
|
275
|
+
*/
|
|
276
|
+
private readIdentityAssertionFromLocation;
|
|
234
277
|
disconnectedCallback(): void;
|
|
235
278
|
protected updated(changedProperties: Map<string, unknown>): void;
|
|
236
279
|
/**
|
|
@@ -281,8 +324,25 @@ export declare class McpConsent extends LitElement {
|
|
|
281
324
|
private renderExpiration;
|
|
282
325
|
private renderTerms;
|
|
283
326
|
private renderError;
|
|
327
|
+
/**
|
|
328
|
+
* Whether the user's identity has already been established, either via a
|
|
329
|
+
* completed OAuth round trip or a prior credential/OTP auth step. The
|
|
330
|
+
* OAuth screen (`renderOAuth`) uses this to suppress its primary approve
|
|
331
|
+
* button: without it, nothing on that screen can ever flip `termsAccepted`
|
|
332
|
+
* or verify who the user is, so a direct approve there would mint a
|
|
333
|
+
* delegation with no user_did (see PR2 plan, "The trap in defect 1").
|
|
334
|
+
*/
|
|
335
|
+
private get hasEstablishedIdentity();
|
|
284
336
|
private renderFooter;
|
|
285
337
|
private renderConsentOnly;
|
|
338
|
+
/**
|
|
339
|
+
* The username/password inputs plus the forgot-password link. Extracted so
|
|
340
|
+
* both the legacy sign-in shell (`renderCredentials`) and the capability
|
|
341
|
+
* disclosure screen can render the same fields — on the credential path the
|
|
342
|
+
* sign-in submit IS the approval, so the fields have to live inside whichever
|
|
343
|
+
* screen the user is shown.
|
|
344
|
+
*/
|
|
345
|
+
private renderCredentialFields;
|
|
286
346
|
private renderCredentials;
|
|
287
347
|
private renderOAuth;
|
|
288
348
|
private renderMagicLink;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-consent.d.ts","sourceRoot":"","sources":["../../src/components/mcp-consent.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAwB,cAAc,EAAW,MAAM,KAAK,CAAC;AAEhF,OAAO,KAAK,EACV,aAAa,EAEd,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,QAAQ,EAAgB,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"mcp-consent.d.ts","sourceRoot":"","sources":["../../src/components/mcp-consent.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAwB,cAAc,EAAW,MAAM,KAAK,CAAC;AAEhF,OAAO,KAAK,EACV,aAAa,EAEd,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,QAAQ,EAAgB,MAAM,yBAAyB,CAA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