@kya-os/consent 0.1.47 → 0.1.49
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/README.md +89 -0
- package/dist/bundle/index.d.ts +2 -0
- package/dist/bundle/index.d.ts.map +1 -1
- package/dist/bundle/index.js +1 -0
- package/dist/bundle/index.js.map +1 -1
- package/dist/bundle/inline.d.ts +1 -0
- package/dist/bundle/inline.d.ts.map +1 -1
- package/dist/bundle/inline.js +5 -4
- package/dist/bundle/inline.js.map +1 -1
- package/dist/bundle/shell.d.ts +4 -0
- package/dist/bundle/shell.d.ts.map +1 -1
- package/dist/bundle/shell.js +7 -3
- package/dist/bundle/shell.js.map +1 -1
- package/dist/capabilities/registry.d.ts.map +1 -1
- package/dist/capabilities/registry.js +5 -1
- package/dist/capabilities/registry.js.map +1 -1
- package/dist/cedar/compile.d.ts +67 -2
- package/dist/cedar/compile.d.ts.map +1 -1
- package/dist/cedar/compile.js +34 -5
- package/dist/cedar/compile.js.map +1 -1
- package/dist/cedar/index.d.ts +1 -0
- package/dist/cedar/index.d.ts.map +1 -1
- package/dist/cedar/index.js.map +1 -1
- package/dist/cjs/bundle/index.js +3 -1
- package/dist/cjs/bundle/index.js.map +1 -1
- package/dist/cjs/bundle/inline.js +4 -4
- package/dist/cjs/bundle/inline.js.map +1 -1
- package/dist/cjs/bundle/shell.js +7 -3
- package/dist/cjs/bundle/shell.js.map +1 -1
- package/dist/cjs/capabilities/registry.js +5 -1
- package/dist/cjs/capabilities/registry.js.map +1 -1
- package/dist/cjs/cedar/compile.js +34 -5
- package/dist/cjs/cedar/compile.js.map +1 -1
- package/dist/cjs/cedar/index.js.map +1 -1
- package/dist/cjs/components/consent-action-bar.js +16 -5
- package/dist/cjs/components/consent-action-bar.js.map +1 -1
- package/dist/cjs/components/consent-capabilities-screen.js +116 -42
- package/dist/cjs/components/consent-capabilities-screen.js.map +1 -1
- package/dist/cjs/components/consent-capability-card.js +35 -4
- package/dist/cjs/components/consent-capability-card.js.map +1 -1
- package/dist/cjs/components/consent-revocation-notice.js +14 -6
- package/dist/cjs/components/consent-revocation-notice.js.map +1 -1
- package/dist/cjs/components/mcp-consent.js +153 -37
- package/dist/cjs/components/mcp-consent.js.map +1 -1
- package/dist/cjs/constants/capabilities.js +10 -0
- package/dist/cjs/constants/capabilities.js.map +1 -0
- package/dist/cjs/constants/index.js +3 -1
- package/dist/cjs/constants/index.js.map +1 -1
- package/dist/cjs/copy/tokens.js +2 -0
- package/dist/cjs/copy/tokens.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.map +1 -1
- package/dist/cjs/resolution/selected-capabilities.js +73 -0
- package/dist/cjs/resolution/selected-capabilities.js.map +1 -0
- package/dist/cjs/schemas/api.schemas.js +1 -0
- package/dist/cjs/schemas/api.schemas.js.map +1 -1
- package/dist/cjs/schemas/capabilities.schemas.js +14 -2
- package/dist/cjs/schemas/capabilities.schemas.js.map +1 -1
- package/dist/cjs/types/capabilities.types.js +55 -0
- package/dist/cjs/types/capabilities.types.js.map +1 -1
- package/dist/components/consent-action-bar.d.ts +2 -0
- package/dist/components/consent-action-bar.d.ts.map +1 -1
- package/dist/components/consent-action-bar.js +16 -5
- package/dist/components/consent-action-bar.js.map +1 -1
- package/dist/components/consent-capabilities-screen.d.ts +19 -5
- package/dist/components/consent-capabilities-screen.d.ts.map +1 -1
- package/dist/components/consent-capabilities-screen.js +116 -42
- package/dist/components/consent-capabilities-screen.js.map +1 -1
- package/dist/components/consent-capability-card.d.ts +2 -0
- package/dist/components/consent-capability-card.d.ts.map +1 -1
- package/dist/components/consent-capability-card.js +35 -4
- package/dist/components/consent-capability-card.js.map +1 -1
- package/dist/components/consent-revocation-notice.d.ts +2 -1
- package/dist/components/consent-revocation-notice.d.ts.map +1 -1
- package/dist/components/consent-revocation-notice.js +14 -6
- package/dist/components/consent-revocation-notice.js.map +1 -1
- package/dist/components/mcp-consent.d.ts +11 -0
- package/dist/components/mcp-consent.d.ts.map +1 -1
- package/dist/components/mcp-consent.js +153 -37
- package/dist/components/mcp-consent.js.map +1 -1
- package/dist/consent.js +358 -63
- package/dist/consent.min.js +271 -163
- package/dist/constants/capabilities.d.ts +7 -0
- package/dist/constants/capabilities.d.ts.map +1 -0
- package/dist/constants/capabilities.js +7 -0
- package/dist/constants/capabilities.js.map +1 -0
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/index.js +1 -0
- package/dist/constants/index.js.map +1 -1
- package/dist/copy/tokens.d.ts +2 -0
- package/dist/copy/tokens.d.ts.map +1 -1
- package/dist/copy/tokens.js +2 -0
- package/dist/copy/tokens.js.map +1 -1
- package/dist/mcp-app/index.d.ts +1 -0
- package/dist/mcp-app/index.js +1 -0
- package/dist/mcp-app/inline.d.ts +1 -0
- package/dist/mcp-app/inline.d.ts.map +1 -1
- package/dist/mcp-app/inline.js +3 -2
- package/dist/mcp-app/inline.js.map +1 -1
- package/dist/mcp-app/types.d.ts +1 -0
- package/dist/mcp-app/types.js +1 -0
- package/dist/resolution/credential-capabilities.d.ts +2 -2
- package/dist/resolution/credential-capabilities.d.ts.map +1 -1
- package/dist/resolution/credential-capabilities.js.map +1 -1
- package/dist/resolution/selected-capabilities.d.ts +26 -0
- package/dist/resolution/selected-capabilities.d.ts.map +1 -0
- package/dist/resolution/selected-capabilities.js +69 -0
- package/dist/resolution/selected-capabilities.js.map +1 -0
- package/dist/schemas/api.schemas.d.ts +93 -68
- package/dist/schemas/api.schemas.d.ts.map +1 -1
- package/dist/schemas/api.schemas.js +1 -0
- package/dist/schemas/api.schemas.js.map +1 -1
- package/dist/schemas/branding.schemas.d.ts +2 -2
- package/dist/schemas/capabilities.schemas.d.ts +58 -12
- package/dist/schemas/capabilities.schemas.d.ts.map +1 -1
- package/dist/schemas/capabilities.schemas.js +14 -2
- package/dist/schemas/capabilities.schemas.js.map +1 -1
- package/dist/schemas/config.schemas.d.ts +140 -100
- package/dist/schemas/config.schemas.d.ts.map +1 -1
- package/dist/types/api.types.d.ts +2 -0
- package/dist/types/api.types.d.ts.map +1 -1
- package/dist/types/capabilities.types.d.ts +69 -0
- package/dist/types/capabilities.types.d.ts.map +1 -1
- package/dist/types/capabilities.types.js +53 -1
- package/dist/types/capabilities.types.js.map +1 -1
- package/package.json +8 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consent-capabilities-screen.js","sourceRoot":"","sources":["../../../src/components/consent-capabilities-screen.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;;;;;;;AAEH,6BAAqD;AACrD,qDAAmE;AAEnE,iDAAqE;AACrE,iDAA0E;AAO1E,oDAA8D;AAC9D,yFAGkD;AAClD,qCAAmC;AACnC,wCAAsC;AACtC,mCAAiC;AACjC,+BAA6B;AAC7B,0CAAwC;AACxC,yCAAuC;
|
|
1
|
+
{"version":3,"file":"consent-capabilities-screen.js","sourceRoot":"","sources":["../../../src/components/consent-capabilities-screen.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;;;;;;;AAEH,6BAAqD;AACrD,qDAAmE;AAEnE,iDAAqE;AACrE,iDAA0E;AAO1E,oDAA8D;AAC9D,yFAGkD;AAClD,kEAA6E;AAC7E,qCAAmC;AACnC,wCAAsC;AACtC,mCAAiC;AACjC,+BAA6B;AAC7B,0CAAwC;AACxC,yCAAuC;AAYhC,IAAM,yBAAyB,GAA/B,MAAM,yBAA0B,SAAQ,gBAAU;IAAlD;;QAGsB,iBAAY,GAA6B,EAAE,CAAC;QAG3C,YAAO,GAAG,EAAE,CAAC;QACb,iBAAY,GAAG,KAAK,CAAC;QACrB,mBAAc,GAAG,4BAA4B,CAAC;QAC9C,mBAAc,GAAG,EAAE,CAAC;QACQ,gBAAW,GAAG,KAAK,CAAC;QAChD,UAAK,GAAiB,OAAO,CAAC;QACC,kBAAa,GAAG,E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AAe,EAAE,CAAC;+DAAmB;AAOjB;IAAxD,IAAA,wBAAQ,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;+DAAmB;AAOjB;IAAzD,IAAA,wBAAQ,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC;gEAAoB;AAGtB;IAAtD,IAAA,wBAAQ,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;6DAAoB;AAEzD;IAAhB,IAAA,qBAAK,GAAE;2DAAsC;oCA5DnC,yBAAyB;IADrC,IAAA,6BAAa,EAAC,6BAA6B,CAAC;GAChC,yBAAyB,CA6XrC;AAQD,SAAS,UAAU,CAAC,KAAa;IAC/B,OAAO,KAAK;SACT,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC;SACtB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC;SACvB,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAC5B,CAAC"}
|
|
@@ -32,10 +32,14 @@ let ConsentCapabilityCard = class ConsentCapabilityCard extends lit_1.LitElement
|
|
|
32
32
|
this.icon = "neutral";
|
|
33
33
|
this.riskLevel = "low";
|
|
34
34
|
this.checked = false;
|
|
35
|
+
this.disabled = false;
|
|
36
|
+
this.scopes = [];
|
|
35
37
|
this.compiledCedar = "";
|
|
36
38
|
this.policyOpen = false;
|
|
37
39
|
}
|
|
38
40
|
toggleChecked() {
|
|
41
|
+
if (this.disabled)
|
|
42
|
+
return;
|
|
39
43
|
this.checked = !this.checked;
|
|
40
44
|
const detail = {
|
|
41
45
|
id: this.capabilityId,
|
|
@@ -119,10 +123,11 @@ let ConsentCapabilityCard = class ConsentCapabilityCard extends lit_1.LitElement
|
|
|
119
123
|
class="row"
|
|
120
124
|
part="row"
|
|
121
125
|
role="button"
|
|
122
|
-
tabindex
|
|
126
|
+
tabindex=${this.disabled ? "-1" : "0"}
|
|
127
|
+
aria-disabled=${String(this.disabled)}
|
|
123
128
|
@click=${this.onRowClick}
|
|
124
129
|
@keydown=${(e) => {
|
|
125
|
-
if (e.key === " " || e.key === "Enter") {
|
|
130
|
+
if (e.target === e.currentTarget && (e.key === " " || e.key === "Enter")) {
|
|
126
131
|
e.preventDefault();
|
|
127
132
|
this.toggleChecked();
|
|
128
133
|
}
|
|
@@ -134,6 +139,7 @@ let ConsentCapabilityCard = class ConsentCapabilityCard extends lit_1.LitElement
|
|
|
134
139
|
role="checkbox"
|
|
135
140
|
aria-checked="${String(this.checked)}"
|
|
136
141
|
aria-label="${this.label}"
|
|
142
|
+
?disabled=${this.disabled}
|
|
137
143
|
@click=${(e) => {
|
|
138
144
|
e.stopPropagation();
|
|
139
145
|
this.toggleChecked();
|
|
@@ -154,14 +160,17 @@ let ConsentCapabilityCard = class ConsentCapabilityCard extends lit_1.LitElement
|
|
|
154
160
|
? (0, lit_1.html) `<span class="risk-chip">${tokens.higherRiskChip}</span>`
|
|
155
161
|
: lit_1.nothing}
|
|
156
162
|
</div>
|
|
157
|
-
|
|
163
|
+
${this.scopes.length > 0
|
|
164
|
+
? (0, lit_1.html) `<ul class="scopes" aria-label="Scopes">${this.scopes.map((scope) => (0, lit_1.html) `<li><code part="scope">${scope}</code></li>`)}</ul>`
|
|
165
|
+
: lit_1.nothing}
|
|
166
|
+
${this.compiledCedar.trim() ? (0, lit_1.html) `<button
|
|
158
167
|
class="policy-toggle"
|
|
159
168
|
type="button"
|
|
160
169
|
@click=${this.togglePolicy}
|
|
161
170
|
aria-expanded="${String(this.policyOpen)}"
|
|
162
171
|
>
|
|
163
172
|
${tokens.viewPolicyLink}
|
|
164
|
-
</button
|
|
173
|
+
</button>` : lit_1.nothing}
|
|
165
174
|
${this.renderPolicy()}
|
|
166
175
|
</div>
|
|
167
176
|
</div>
|
|
@@ -197,6 +206,22 @@ ConsentCapabilityCard.styles = (0, lit_1.css) `
|
|
|
197
206
|
background: var(--cs-row-hover-bg, rgba(15, 23, 42, 0.025));
|
|
198
207
|
}
|
|
199
208
|
|
|
209
|
+
.row[aria-disabled="true"], .checkbox:disabled {
|
|
210
|
+
cursor: not-allowed;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.scopes {
|
|
214
|
+
display: flex;
|
|
215
|
+
flex-direction: column;
|
|
216
|
+
gap: 4px;
|
|
217
|
+
margin: 0;
|
|
218
|
+
padding: 0;
|
|
219
|
+
list-style: none;
|
|
220
|
+
font-size: var(--cs-scope-font-size, 11.5px);
|
|
221
|
+
color: var(--cs-text-secondary, #334155);
|
|
222
|
+
overflow-wrap: anywhere;
|
|
223
|
+
}
|
|
224
|
+
|
|
200
225
|
.checkbox {
|
|
201
226
|
width: 22px;
|
|
202
227
|
height: 22px;
|
|
@@ -352,6 +377,12 @@ __decorate([
|
|
|
352
377
|
__decorate([
|
|
353
378
|
(0, decorators_js_1.property)({ type: Boolean, reflect: true })
|
|
354
379
|
], ConsentCapabilityCard.prototype, "checked", void 0);
|
|
380
|
+
__decorate([
|
|
381
|
+
(0, decorators_js_1.property)({ type: Boolean, reflect: true })
|
|
382
|
+
], ConsentCapabilityCard.prototype, "disabled", void 0);
|
|
383
|
+
__decorate([
|
|
384
|
+
(0, decorators_js_1.property)({ type: Array })
|
|
385
|
+
], ConsentCapabilityCard.prototype, "scopes", void 0);
|
|
355
386
|
__decorate([
|
|
356
387
|
(0, decorators_js_1.property)({ type: String, attribute: "compiled-cedar" })
|
|
357
388
|
], ConsentCapabilityCard.prototype, "compiledCedar", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consent-capability-card.js","sourceRoot":"","sources":["../../../src/components/consent-capability-card.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;;;;;;;AAEH,6BAAqD;AACrD,qDAAmE;AAEnE,iDAAwD;AACxD,oDAA2D;AAYpD,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,gBAAU;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;
|
|
1
|
+
{"version":3,"file":"consent-capability-card.js","sourceRoot":"","sources":["../../../src/components/consent-capability-card.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;;;;;;;AAEH,6BAAqD;AACrD,qDAAmE;AAEnE,iDAAwD;AACxD,oDAA2D;AAYpD,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,gBAAU;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;QAChB,aAAQ,GAAG,KAAK,CAAC;QAClC,WAAM,GAAa,EAAE,CAAC;QACQ,kBAAa,GAAG,EAAE,CAAC;QAE3D,eAAU,GAAG,KAAK,CAAC;IA6UtC,CAAC;IArJS,aAAa;QACnB,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO;QAC1B,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;QAC7B,MAAM,MAAM,GAA2B;YACrC,EAAE,EAAE,IAAI,CAAC,YAAY;YACrB,OAAO,EAAE,IAAI,CAAC,OAAO;SACtB,CAAC;QACF,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAyB,mBAAmB,EAAE;YAC3D,MAAM;YACN,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;SACf,CAAC,CACH,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACK,UA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AO,IAAA,UAAI,EAAA;;;;;;;;;;;aAWJ,CAAC;QACV,KAAK,QAAQ;YACX,OAAO,IAAA,UAAI,EAAA;;;;;;;;;aASJ,CAAC;QACV,KAAK,KAAK;YACR,OAAO,IAAA,UAAI,EAAA;;;;;;;;;;;aAWJ,CAAC;QACV,KAAK,OAAO;YACV,OAAO,IAAA,UAAI,EAAA;;;;;;;;;;;aAWJ,CAAC;QACV,KAAK,MAAM;YACT,OAAO,IAAA,UAAI,EAAA;;;;;;;;;;aAUJ,CAAC;QACV,KAAK,UAAU;YACb,OAAO,IAAA,UAAI,EAAA;;;;;;;;;;;aAWJ,CAAC;QACV,KAAK,MAAM;YACT,OAAO,IAAA,UAAI,EAAA;;;;;;;;;;aAUJ,CAAC;QACV,KAAK,KAAK;YACR,OAAO,IAAA,UAAI,EAAA;;;;;;;;;;aAUJ,CAAC;QACV,KAAK,MAAM;YACT,OAAO,IAAA,UAAI,EAAA;;;;;;;;;aASJ,CAAC;QACV,KAAK,SAAS;YACZ,OAAO,IAAA,UAAI,EAAA;;;;;;;;;;;aAWJ,CAAC;QACV;YACE,OAAO,IAAA,UAAI,EAAA;;;;;;;;;aASJ,CAAC;IACZ,CAAC;AACH,CAAC"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Consent Revocation Notice
|
|
4
4
|
*
|
|
5
5
|
* Clock-iconed footer block telling the user where they can revoke and that
|
|
6
|
-
* permissions
|
|
6
|
+
* permissions expire according to the applicable authorization policy.
|
|
7
7
|
*
|
|
8
8
|
* @module components/consent-revocation-notice
|
|
9
9
|
*/
|
|
@@ -24,13 +24,18 @@ let ConsentRevocationNotice = class ConsentRevocationNotice extends lit_1.LitEle
|
|
|
24
24
|
this.revocationPath = "Account → Connected Agents";
|
|
25
25
|
this.orgName = "this site";
|
|
26
26
|
this.inactivityDays = 90;
|
|
27
|
+
this.fixedExpiry = false;
|
|
27
28
|
}
|
|
28
29
|
render() {
|
|
29
30
|
const revoke = (0, tokens_js_1.formatToken)(tokens_js_1.CONSENT_COPY_TOKENS.footer.revocationTemplate, {
|
|
30
31
|
RevocationPath: this.revocationPath,
|
|
31
32
|
Org: this.orgName,
|
|
32
33
|
});
|
|
33
|
-
const
|
|
34
|
+
const expiry = this.fixedExpiry
|
|
35
|
+
? tokens_js_1.CONSENT_COPY_TOKENS.footer.fixedExpiryNotice
|
|
36
|
+
: (0, tokens_js_1.formatToken)(tokens_js_1.CONSENT_COPY_TOKENS.footer.inactivityTemplate, {
|
|
37
|
+
Days: this.inactivityDays,
|
|
38
|
+
});
|
|
34
39
|
return (0, lit_1.html) `
|
|
35
40
|
<svg
|
|
36
41
|
class="icon"
|
|
@@ -47,7 +52,7 @@ let ConsentRevocationNotice = class ConsentRevocationNotice extends lit_1.LitEle
|
|
|
47
52
|
</svg>
|
|
48
53
|
<div class="content">
|
|
49
54
|
<span>${revoke}</span>
|
|
50
|
-
<span>${
|
|
55
|
+
<span>${expiry}</span>
|
|
51
56
|
</div>
|
|
52
57
|
`;
|
|
53
58
|
}
|
|
@@ -60,7 +65,7 @@ ConsentRevocationNotice.styles = (0, lit_1.css) `
|
|
|
60
65
|
gap: 10px;
|
|
61
66
|
padding: 12px 14px;
|
|
62
67
|
border-radius: 12px;
|
|
63
|
-
background: var(--cs-surface-inset, #
|
|
68
|
+
background: var(--cs-surface-inset, #f1ece2);
|
|
64
69
|
color: var(--cs-text-secondary, #334155);
|
|
65
70
|
font-size: 12.5px;
|
|
66
71
|
line-height: 1.5;
|
|
@@ -71,7 +76,7 @@ ConsentRevocationNotice.styles = (0, lit_1.css) `
|
|
|
71
76
|
height: 16px;
|
|
72
77
|
flex-shrink: 0;
|
|
73
78
|
margin-top: 2px;
|
|
74
|
-
color: var(--cs-text-tertiary, #
|
|
79
|
+
color: var(--cs-text-tertiary, #64748b);
|
|
75
80
|
}
|
|
76
81
|
|
|
77
82
|
.content {
|
|
@@ -82,7 +87,7 @@ ConsentRevocationNotice.styles = (0, lit_1.css) `
|
|
|
82
87
|
|
|
83
88
|
em {
|
|
84
89
|
font-style: normal;
|
|
85
|
-
color: var(--cs-text-primary, #
|
|
90
|
+
color: var(--cs-text-primary, #0f172a);
|
|
86
91
|
font-weight: 500;
|
|
87
92
|
}
|
|
88
93
|
`;
|
|
@@ -95,6 +100,9 @@ __decorate([
|
|
|
95
100
|
__decorate([
|
|
96
101
|
(0, decorators_js_1.property)({ type: Number })
|
|
97
102
|
], ConsentRevocationNotice.prototype, "inactivityDays", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
(0, decorators_js_1.property)({ type: Boolean, attribute: "fixed-expiry" })
|
|
105
|
+
], ConsentRevocationNotice.prototype, "fixedExpiry", void 0);
|
|
98
106
|
exports.ConsentRevocationNotice = ConsentRevocationNotice = __decorate([
|
|
99
107
|
(0, decorators_js_1.customElement)("consent-revocation-notice")
|
|
100
108
|
], ConsentRevocationNotice);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consent-revocation-notice.js","sourceRoot":"","sources":["../../../src/components/consent-revocation-notice.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;;;;;AAEH,6BAA4C;AAC5C,qDAA4D;AAE5D,iDAAqE;AAG9D,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,gBAAU;IAAhD;;QACuB,mBAAc,GAAG,4BAA4B,CAAC;QAC9C,YAAO,GAAG,WAAW,CAAC;QACtB,mBAAc,GAAG,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"consent-revocation-notice.js","sourceRoot":"","sources":["../../../src/components/consent-revocation-notice.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;;;;;AAEH,6BAA4C;AAC5C,qDAA4D;AAE5D,iDAAqE;AAG9D,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,gBAAU;IAAhD;;QACuB,mBAAc,GAAG,4BAA4B,CAAC;QAC9C,YAAO,GAAG,WAAW,CAAC;QACtB,mBAAc,GAAG,EAAE,CAAC;QACQ,gBAAW,GAAG,KAAK,CAAC;IAmE9E,CAAC;IA/BU,MAAM;QACb,MAAM,MAAM,GAAG,IAAA,uBAAW,EAAC,+BAAmB,CAAC,MAAM,CAAC,kBAAkB,EAAE;YACxE,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,GAAG,EAAE,IAAI,CAAC,OAAO;SAClB,CAAC,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW;YAC7B,CAAC,CAAC,+BAAmB,CAAC,MAAM,CAAC,iBAAiB;YAC9C,CAAC,CAAC,IAAA,uBAAW,EAAC,+BAAmB,CAAC,MAAM,CAAC,kBAAkB,EAAE;gBACzD,IAAI,EAAE,IAAI,CAAC,cAAc;aAC1B,CAAC,CAAC;QAEP,OAAO,IAAA,UAAI,EAAA;;;;;;;;;;;;;;;gBAeC,MAAM;gBACN,MAAM;;KAEjB,CAAC;IACJ,CAAC;;AAtEU,0DAAuB;AAMlB,8BAAM,GAAG,IAAA,SAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgC3B,AAhCqB,CAgCpB;AArC0B;IAA3B,IAAA,wBAAQ,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+DAA+C;AAC9C;IAA3B,IAAA,wBAAQ,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wDAAuB;AACtB;IAA3B,IAAA,wBAAQ,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+DAAqB;AACQ;IAAvD,IAAA,wBAAQ,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;4DAAqB;kCAJjE,uBAAuB;IADnC,IAAA,6BAAa,EAAC,2BAA2B,CAAC;GAC9B,uBAAuB,CAuEnC"}
|
|
@@ -32,6 +32,7 @@ const AUTH_REQUIRED_MODES = new Set([
|
|
|
32
32
|
const resolve_config_js_1 = require("../resolution/resolve-config.js");
|
|
33
33
|
const credential_capabilities_js_1 = require("../resolution/credential-capabilities.js");
|
|
34
34
|
const identity_assertion_js_1 = require("../security/identity-assertion.js");
|
|
35
|
+
const selected_capabilities_js_1 = require("../resolution/selected-capabilities.js");
|
|
35
36
|
// Import component definitions for side effects
|
|
36
37
|
require("./consent-shell.js");
|
|
37
38
|
require("./consent-button.js");
|
|
@@ -85,6 +86,8 @@ let McpConsent = class McpConsent extends lit_1.LitElement {
|
|
|
85
86
|
* Session ID
|
|
86
87
|
*/
|
|
87
88
|
this.sessionId = "";
|
|
89
|
+
/** Explicit HTTP anchor routing, separate from legacy session ID syntax. */
|
|
90
|
+
this.anchorSid = "";
|
|
88
91
|
/**
|
|
89
92
|
* Project ID
|
|
90
93
|
*/
|
|
@@ -144,6 +147,9 @@ let McpConsent = class McpConsent extends lit_1.LitElement {
|
|
|
144
147
|
* Example: https://github.com/login/oauth/authorize?client_id=...
|
|
145
148
|
*/
|
|
146
149
|
this.oauthUrl = "";
|
|
150
|
+
/** Native HTTP resolves assertion scopes from its immutable anchor, so the
|
|
151
|
+
* submitted grant may safely narrow to the human's selected permissions. */
|
|
152
|
+
this.nativeScopeSelection = false;
|
|
147
153
|
// === HUMANIZED CONSENT (capability-based) ===
|
|
148
154
|
/**
|
|
149
155
|
* Operator-authored capability groups. When present and non-empty, the new
|
|
@@ -188,25 +194,14 @@ let McpConsent = class McpConsent extends lit_1.LitElement {
|
|
|
188
194
|
this.selectedScopes = [];
|
|
189
195
|
this.closeFailed = false;
|
|
190
196
|
this.onCapabilitiesAllow = (event) => {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
// from the tool protection's requiredScopes — even by spelling — the
|
|
197
|
-
// lookup misses, the api-client gets no Cookie, and the upstream call
|
|
198
|
-
// hits an unauthenticated session (e.g. Hardware World silently spawns
|
|
199
|
-
// a fresh CIX → cart writes vanish). Submit the URL-supplied scopes
|
|
200
|
-
// (which come from `protection.requiredScopes`) so storage and retrieval
|
|
201
|
-
// hash the same set. The capability list is still consulted for which
|
|
202
|
-
// permissions the user wants — denying the only capability still denies
|
|
203
|
-
// the grant (size === 0 path) — but the *stored* scope set tracks the
|
|
204
|
-
// tool's canonical required set.
|
|
205
|
-
if (detail.selectedCapabilityIds.length === 0) {
|
|
206
|
-
this.handleDeny();
|
|
197
|
+
if (this.loading)
|
|
198
|
+
return;
|
|
199
|
+
const selection = (0, selected_capabilities_js_1.resolveCapabilitySelection)(this.scopes, this.getFlatCapabilities(), event.detail, this.requiresAllCapabilities);
|
|
200
|
+
if (!selection.ok) {
|
|
201
|
+
this.error = selection.error;
|
|
207
202
|
return;
|
|
208
203
|
}
|
|
209
|
-
this.selectedScopes =
|
|
204
|
+
this.selectedScopes = selection.scopes;
|
|
210
205
|
// Capability layout has no terms checkbox — the WYSIWYG renders T&Cs in
|
|
211
206
|
// the revocation notice text. Auto-accept so the legacy require-terms
|
|
212
207
|
// guard in handleApprove doesn't fire.
|
|
@@ -229,6 +224,18 @@ let McpConsent = class McpConsent extends lit_1.LitElement {
|
|
|
229
224
|
}
|
|
230
225
|
return this.flatCapabilitiesCache.flattened;
|
|
231
226
|
}
|
|
227
|
+
getRequestedCapabilities() {
|
|
228
|
+
const source = this.getFlatCapabilities();
|
|
229
|
+
if (this.requestedCapabilitiesCache?.source !== source ||
|
|
230
|
+
this.requestedCapabilitiesCache.scopes !== this.scopes) {
|
|
231
|
+
this.requestedCapabilitiesCache = {
|
|
232
|
+
source,
|
|
233
|
+
scopes: this.scopes,
|
|
234
|
+
result: (0, selected_capabilities_js_1.projectRequestedCapabilities)(this.scopes, source),
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
return this.requestedCapabilitiesCache.result;
|
|
238
|
+
}
|
|
232
239
|
// === LIFECYCLE ===
|
|
233
240
|
connectedCallback() {
|
|
234
241
|
super.connectedCallback();
|
|
@@ -386,16 +393,11 @@ let McpConsent = class McpConsent extends lit_1.LitElement {
|
|
|
386
393
|
// The server creates the DelegationCredential (VC) when this request succeeds
|
|
387
394
|
const formData = new FormData();
|
|
388
395
|
formData.append("tool", this.tool);
|
|
389
|
-
//
|
|
390
|
-
//
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
// Scope narrowing on this path isn't supported (same reasoning as
|
|
395
|
-
// onCapabilitiesAllow forcing the full set for idp-token-storage below):
|
|
396
|
-
// post the full set whenever an assertion is bound to it, and only fall
|
|
397
|
-
// back to the user's selection on the assertion-less consent-only path.
|
|
398
|
-
formData.append("scopes", JSON.stringify(this.identityAssertion ? this.scopes : this.selectedScopes));
|
|
396
|
+
// Legacy assertion gates hash the posted scope set. Native HTTP verifies
|
|
397
|
+
// against its immutable anchor separately, then grants only this selection.
|
|
398
|
+
formData.append("scopes", JSON.stringify(this.identityAssertion && !this.nativeScopeSelection
|
|
399
|
+
? this.scopes
|
|
400
|
+
: this.selectedScopes));
|
|
399
401
|
formData.append("agent_did", this.agentDid);
|
|
400
402
|
// The credential flow redirects to a second (consent-only) screen, and
|
|
401
403
|
// the agent name only ever arrives as a URL param — it is never stored on
|
|
@@ -405,6 +407,8 @@ let McpConsent = class McpConsent extends lit_1.LitElement {
|
|
|
405
407
|
formData.append("agent_name", this.agentName);
|
|
406
408
|
}
|
|
407
409
|
formData.append("session_id", this.sessionId);
|
|
410
|
+
if (this.anchorSid)
|
|
411
|
+
formData.append("sid", this.anchorSid);
|
|
408
412
|
formData.append("project_id", this.projectId);
|
|
409
413
|
formData.append("auth_mode", this.currentMode);
|
|
410
414
|
// Set provider_type based on auth mode to ensure correct server-side routing
|
|
@@ -486,6 +490,15 @@ let McpConsent = class McpConsent extends lit_1.LitElement {
|
|
|
486
490
|
return; // Don't show success yet - the redirect page will handle it
|
|
487
491
|
}
|
|
488
492
|
// No redirect - VC/delegation created successfully, show success screen
|
|
493
|
+
if (this.nativeScopeSelection) {
|
|
494
|
+
const expiresAt = result.expires_at;
|
|
495
|
+
this.issuedExpiresAt =
|
|
496
|
+
Number.isSafeInteger(expiresAt) &&
|
|
497
|
+
expiresAt > 0 &&
|
|
498
|
+
Number.isFinite(new Date(expiresAt * 1000).getTime())
|
|
499
|
+
? expiresAt
|
|
500
|
+
: undefined;
|
|
501
|
+
}
|
|
489
502
|
this.step = "success";
|
|
490
503
|
this.dispatchEvent(new CustomEvent("mcp-consent:approve", {
|
|
491
504
|
detail: { success: true, delegationId: result.delegation_id },
|
|
@@ -552,6 +565,20 @@ let McpConsent = class McpConsent extends lit_1.LitElement {
|
|
|
552
565
|
}));
|
|
553
566
|
}
|
|
554
567
|
// === RENDER METHODS ===
|
|
568
|
+
renderNativeAgentKey() {
|
|
569
|
+
// The native bridge derives agentDid from the proved holder pin. Legacy
|
|
570
|
+
// agent metadata does not establish possession of a key, so do not make
|
|
571
|
+
// this disclosure on shells without the native opt-in.
|
|
572
|
+
if (!this.nativeScopeSelection || !this.agentDid)
|
|
573
|
+
return lit_1.nothing;
|
|
574
|
+
return (0, lit_1.html) `
|
|
575
|
+
<section class="agent-key" aria-label="Agent key">
|
|
576
|
+
<p><strong>Agent key</strong></p>
|
|
577
|
+
<p>This permission is bound to this key.</p>
|
|
578
|
+
<code>${this.agentDid}</code>
|
|
579
|
+
</section>
|
|
580
|
+
`;
|
|
581
|
+
}
|
|
555
582
|
renderAgentInfo() {
|
|
556
583
|
const agentDisplay = this.agentName || "this agent";
|
|
557
584
|
return (0, lit_1.html) `
|
|
@@ -578,6 +605,7 @@ let McpConsent = class McpConsent extends lit_1.LitElement {
|
|
|
578
605
|
</p>
|
|
579
606
|
</div>
|
|
580
607
|
</div>
|
|
608
|
+
${this.renderNativeAgentKey()}
|
|
581
609
|
`;
|
|
582
610
|
}
|
|
583
611
|
handlePermissionsChange(e) {
|
|
@@ -594,7 +622,8 @@ let McpConsent = class McpConsent extends lit_1.LitElement {
|
|
|
594
622
|
// would let the user "uncheck" a scope that gets granted anyway, so this
|
|
595
623
|
// renders display-only rows instead until the deferred subset-binding
|
|
596
624
|
// follow-up lands. See `shouldRenderScopesInteractive`.
|
|
597
|
-
const interactive =
|
|
625
|
+
const interactive = this.nativeScopeSelection ||
|
|
626
|
+
(0, credential_capabilities_js_1.shouldRenderScopesInteractive)(this.identityAssertion);
|
|
598
627
|
return (0, lit_1.html) `
|
|
599
628
|
<p class="permissions-header">
|
|
600
629
|
${this.resolved?.ui.permissionsHeader ??
|
|
@@ -611,6 +640,10 @@ let McpConsent = class McpConsent extends lit_1.LitElement {
|
|
|
611
640
|
`;
|
|
612
641
|
}
|
|
613
642
|
renderExpiration() {
|
|
643
|
+
// Native expiry is determined by the issued VC, not this UI configuration.
|
|
644
|
+
// It is only available after approval; do not advertise a guessed duration.
|
|
645
|
+
if (this.nativeScopeSelection)
|
|
646
|
+
return lit_1.nothing;
|
|
614
647
|
const days = this.resolved?.expirationDays ?? 7;
|
|
615
648
|
return (0, lit_1.html) `
|
|
616
649
|
<p class="expiration">
|
|
@@ -914,6 +947,31 @@ let McpConsent = class McpConsent extends lit_1.LitElement {
|
|
|
914
947
|
year: "numeric",
|
|
915
948
|
});
|
|
916
949
|
}
|
|
950
|
+
renderSuccessExpiry() {
|
|
951
|
+
if (!this.nativeScopeSelection)
|
|
952
|
+
return (0, lit_1.html) `<div class="credential-expiry">
|
|
953
|
+
Expires ${this.formatExpiryDate()}
|
|
954
|
+
</div>`;
|
|
955
|
+
if (this.issuedExpiresAt === undefined)
|
|
956
|
+
return (0, lit_1.html) `<div class="credential-expiry">
|
|
957
|
+
Expiration time unavailable.
|
|
958
|
+
</div>`;
|
|
959
|
+
const expiry = new Date(this.issuedExpiresAt * 1000);
|
|
960
|
+
return (0, lit_1.html) `<div class="credential-expiry">
|
|
961
|
+
Expires
|
|
962
|
+
<time datetime=${expiry.toISOString()}
|
|
963
|
+
>${expiry.toLocaleString("en-US", {
|
|
964
|
+
month: "short",
|
|
965
|
+
day: "numeric",
|
|
966
|
+
year: "numeric",
|
|
967
|
+
hour: "numeric",
|
|
968
|
+
minute: "2-digit",
|
|
969
|
+
second: "2-digit",
|
|
970
|
+
timeZoneName: "short",
|
|
971
|
+
})}</time
|
|
972
|
+
>
|
|
973
|
+
</div>`;
|
|
974
|
+
}
|
|
917
975
|
/**
|
|
918
976
|
* Get the display name for the agent.
|
|
919
977
|
* Returns agent name if available, otherwise falls back to agent DID.
|
|
@@ -924,7 +982,6 @@ let McpConsent = class McpConsent extends lit_1.LitElement {
|
|
|
924
982
|
renderSuccess() {
|
|
925
983
|
const success = this.resolved?.success;
|
|
926
984
|
const agentDisplay = this.getAgentDisplayName();
|
|
927
|
-
const expiryDate = this.formatExpiryDate();
|
|
928
985
|
// Use selectedScopes if available (user may have deselected some), otherwise fall back to scopes
|
|
929
986
|
const displayScopes = this.selectedScopes.length > 0 ? this.selectedScopes : this.scopes;
|
|
930
987
|
return (0, lit_1.html) `
|
|
@@ -972,8 +1029,7 @@ let McpConsent = class McpConsent extends lit_1.LitElement {
|
|
|
972
1029
|
</div>
|
|
973
1030
|
`
|
|
974
1031
|
: lit_1.nothing}
|
|
975
|
-
|
|
976
|
-
<div class="credential-expiry">Expires ${expiryDate}</div>
|
|
1032
|
+
${this.renderSuccessExpiry()}
|
|
977
1033
|
|
|
978
1034
|
<!-- Verified Badge -->
|
|
979
1035
|
<div class="verified-badge">
|
|
@@ -1058,13 +1114,16 @@ let McpConsent = class McpConsent extends lit_1.LitElement {
|
|
|
1058
1114
|
* existing handleApprove submission logic.
|
|
1059
1115
|
*/
|
|
1060
1116
|
renderCapabilitiesScreen() {
|
|
1061
|
-
const
|
|
1117
|
+
const projection = this.getRequestedCapabilities();
|
|
1118
|
+
const flatCapabilities = projection.ok ? projection.capabilities : [];
|
|
1119
|
+
const error = this.error || (!projection.ok ? projection.error : undefined);
|
|
1062
1120
|
// The credential path doubles the screen as the sign-in form: every
|
|
1063
1121
|
// capability starts selected (the granted scope set is fixed and
|
|
1064
1122
|
// all-or-nothing, so nothing is actually held back), rows stay
|
|
1065
1123
|
// interactive like the consent-only path, and Allow stays disabled
|
|
1066
1124
|
// until both credentials are filled in.
|
|
1067
|
-
const
|
|
1125
|
+
const credentials = (0, credential_capabilities_js_1.shouldSelectAllCapabilities)(this.currentMode);
|
|
1126
|
+
const allSelected = this.requiresAllCapabilities;
|
|
1068
1127
|
// orgName falls back to the resolved config's branding block: the
|
|
1069
1128
|
// deployed worker does not pass org-name on this path, so
|
|
1070
1129
|
// branding.companyName / branding.logoUrl are the only source of the
|
|
@@ -1073,7 +1132,7 @@ let McpConsent = class McpConsent extends lit_1.LitElement {
|
|
|
1073
1132
|
// site" with placeholder logos — a visible branding regression versus
|
|
1074
1133
|
// the sign-in screen it replaces.
|
|
1075
1134
|
return (0, lit_1.html) `
|
|
1076
|
-
${
|
|
1135
|
+
${error
|
|
1077
1136
|
? (0, lit_1.html) `<div
|
|
1078
1137
|
role="alert"
|
|
1079
1138
|
style="
|
|
@@ -1083,7 +1142,7 @@ let McpConsent = class McpConsent extends lit_1.LitElement {
|
|
|
1083
1142
|
font-size: 13px;
|
|
1084
1143
|
"
|
|
1085
1144
|
>
|
|
1086
|
-
${
|
|
1145
|
+
${error}
|
|
1087
1146
|
</div>`
|
|
1088
1147
|
: lit_1.nothing}
|
|
1089
1148
|
<consent-capabilities-screen
|
|
@@ -1095,20 +1154,38 @@ let McpConsent = class McpConsent extends lit_1.LitElement {
|
|
|
1095
1154
|
headlineVerb="${this.headlineVerb}"
|
|
1096
1155
|
revocationPath="${this.revocationPath}"
|
|
1097
1156
|
inactivityDays=${this.inactivityDays}
|
|
1157
|
+
?fixed-expiry=${this.nativeScopeSelection}
|
|
1098
1158
|
theme="${this.consentTheme}"
|
|
1099
1159
|
how-it-works-url="${this.howItWorksUrl}"
|
|
1100
1160
|
?loading=${this.loading}
|
|
1101
1161
|
?all-selected=${allSelected}
|
|
1102
|
-
?
|
|
1162
|
+
?require-all=${allSelected}
|
|
1163
|
+
?allow-disabled=${!projection.ok ||
|
|
1164
|
+
(credentials && !(0, credential_capabilities_js_1.areCredentialsComplete)(this.formData))}
|
|
1103
1165
|
@capabilities-allow=${this.onCapabilitiesAllow}
|
|
1104
1166
|
@capabilities-deny=${this.handleDeny}
|
|
1105
1167
|
>
|
|
1168
|
+
${this.nativeScopeSelection && this.agentDid
|
|
1169
|
+
? (0, lit_1.html) `<div slot="agent-key">${this.renderNativeAgentKey()}</div>`
|
|
1170
|
+
: lit_1.nothing}
|
|
1106
1171
|
${allSelected
|
|
1107
|
-
? (0, lit_1.html) `<div slot="auth"
|
|
1172
|
+
? (0, lit_1.html) `<div slot="auth">
|
|
1173
|
+
<p>
|
|
1174
|
+
This request grants every listed permission. Select all
|
|
1175
|
+
permissions or deny the request.
|
|
1176
|
+
</p>
|
|
1177
|
+
${credentials ? this.renderCredentialFields() : lit_1.nothing}
|
|
1178
|
+
</div>`
|
|
1108
1179
|
: lit_1.nothing}
|
|
1109
1180
|
</consent-capabilities-screen>
|
|
1110
1181
|
`;
|
|
1111
1182
|
}
|
|
1183
|
+
get requiresAllCapabilities() {
|
|
1184
|
+
// Credentials use a fixed session scope key; signed identity assertions
|
|
1185
|
+
// bind the complete requested set. Neither path can narrow implicitly.
|
|
1186
|
+
return ((0, credential_capabilities_js_1.shouldSelectAllCapabilities)(this.currentMode) ||
|
|
1187
|
+
(!this.nativeScopeSelection && Boolean(this.identityAssertion)));
|
|
1188
|
+
}
|
|
1112
1189
|
};
|
|
1113
1190
|
exports.McpConsent = McpConsent;
|
|
1114
1191
|
McpConsent.styles = (0, lit_1.css) `
|
|
@@ -1166,6 +1243,36 @@ McpConsent.styles = (0, lit_1.css) `
|
|
|
1166
1243
|
color: #111827;
|
|
1167
1244
|
}
|
|
1168
1245
|
|
|
1246
|
+
.agent-key {
|
|
1247
|
+
min-width: 0;
|
|
1248
|
+
padding: 1rem;
|
|
1249
|
+
margin-bottom: 1rem;
|
|
1250
|
+
border: 1px solid var(--cs-surface-border, #e5e7eb);
|
|
1251
|
+
border-radius: 0.5rem;
|
|
1252
|
+
color: var(--cs-text-primary, #111827);
|
|
1253
|
+
font-size: 0.875rem;
|
|
1254
|
+
line-height: 1.5;
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
.agent-key p {
|
|
1258
|
+
margin: 0 0 0.5rem;
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
.agent-key code {
|
|
1262
|
+
display: block;
|
|
1263
|
+
white-space: normal;
|
|
1264
|
+
overflow-wrap: anywhere;
|
|
1265
|
+
font-size: 0.75rem;
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
[slot="agent-key"] {
|
|
1269
|
+
min-width: 0;
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
[slot="agent-key"] .agent-key {
|
|
1273
|
+
margin-bottom: 0;
|
|
1274
|
+
}
|
|
1275
|
+
|
|
1169
1276
|
/* Permissions section */
|
|
1170
1277
|
.permissions-header {
|
|
1171
1278
|
font-size: 0.875rem;
|
|
@@ -1521,6 +1628,9 @@ __decorate([
|
|
|
1521
1628
|
__decorate([
|
|
1522
1629
|
(0, decorators_js_1.property)({ type: String, attribute: "session-id" })
|
|
1523
1630
|
], McpConsent.prototype, "sessionId", void 0);
|
|
1631
|
+
__decorate([
|
|
1632
|
+
(0, decorators_js_1.property)({ type: String, attribute: "anchor-sid" })
|
|
1633
|
+
], McpConsent.prototype, "anchorSid", void 0);
|
|
1524
1634
|
__decorate([
|
|
1525
1635
|
(0, decorators_js_1.property)({ type: String, attribute: "project-id" })
|
|
1526
1636
|
], McpConsent.prototype, "projectId", void 0);
|
|
@@ -1557,6 +1667,9 @@ __decorate([
|
|
|
1557
1667
|
__decorate([
|
|
1558
1668
|
(0, decorators_js_1.property)({ type: String, attribute: "oauth-url" })
|
|
1559
1669
|
], McpConsent.prototype, "oauthUrl", void 0);
|
|
1670
|
+
__decorate([
|
|
1671
|
+
(0, decorators_js_1.property)({ type: Boolean, attribute: "native-scope-selection" })
|
|
1672
|
+
], McpConsent.prototype, "nativeScopeSelection", void 0);
|
|
1560
1673
|
__decorate([
|
|
1561
1674
|
(0, decorators_js_1.property)({
|
|
1562
1675
|
type: Array,
|
|
@@ -1674,6 +1787,9 @@ __decorate([
|
|
|
1674
1787
|
__decorate([
|
|
1675
1788
|
(0, decorators_js_1.state)()
|
|
1676
1789
|
], McpConsent.prototype, "step", void 0);
|
|
1790
|
+
__decorate([
|
|
1791
|
+
(0, decorators_js_1.state)()
|
|
1792
|
+
], McpConsent.prototype, "issuedExpiresAt", void 0);
|
|
1677
1793
|
__decorate([
|
|
1678
1794
|
(0, decorators_js_1.state)()
|
|
1679
1795
|
], McpConsent.prototype, "termsAccepted", void 0);
|