@kya-os/consent 0.5.2 → 0.5.3
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 +25 -8
- 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/approver-lockup.js +365 -0
- package/dist/cjs/components/approver-lockup.js.map +1 -0
- package/dist/cjs/components/consent-capabilities-screen.js +357 -97
- package/dist/cjs/components/consent-capabilities-screen.js.map +1 -1
- package/dist/cjs/components/consent-headline.js +35 -7
- package/dist/cjs/components/consent-headline.js.map +1 -1
- package/dist/cjs/components/decision-icons.js +2 -0
- package/dist/cjs/components/decision-icons.js.map +1 -1
- package/dist/cjs/components/flow-blocks.js +26 -312
- package/dist/cjs/components/flow-blocks.js.map +1 -1
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/copy/tokens.js +14 -1
- 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/react/index.js +1 -0
- package/dist/cjs/react/index.js.map +1 -1
- package/dist/cjs/schemas/capabilities.schemas.js +1 -0
- package/dist/cjs/schemas/capabilities.schemas.js.map +1 -1
- package/dist/cjs/styles/theme.js +3 -0
- package/dist/cjs/styles/theme.js.map +1 -1
- package/dist/components/approver-lockup.d.ts +73 -0
- package/dist/components/approver-lockup.d.ts.map +1 -0
- package/dist/components/approver-lockup.js +358 -0
- package/dist/components/approver-lockup.js.map +1 -0
- package/dist/components/consent-capabilities-screen.d.ts +88 -8
- package/dist/components/consent-capabilities-screen.d.ts.map +1 -1
- package/dist/components/consent-capabilities-screen.js +357 -97
- package/dist/components/consent-capabilities-screen.js.map +1 -1
- package/dist/components/consent-headline.d.ts +15 -3
- package/dist/components/consent-headline.d.ts.map +1 -1
- package/dist/components/consent-headline.js +35 -7
- package/dist/components/consent-headline.js.map +1 -1
- package/dist/components/decision-icons.d.ts +2 -0
- package/dist/components/decision-icons.d.ts.map +1 -1
- package/dist/components/decision-icons.js +2 -0
- package/dist/components/decision-icons.js.map +1 -1
- package/dist/components/flow-blocks.d.ts +0 -9
- package/dist/components/flow-blocks.d.ts.map +1 -1
- package/dist/components/flow-blocks.js +26 -309
- package/dist/components/flow-blocks.js.map +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js.map +1 -1
- package/dist/consent.js +899 -605
- package/dist/consent.min.js +620 -507
- package/dist/copy/tokens.d.ts +14 -1
- package/dist/copy/tokens.d.ts.map +1 -1
- package/dist/copy/tokens.js +14 -1
- package/dist/copy/tokens.js.map +1 -1
- package/dist/flow/model.d.ts +1 -1
- package/dist/flow/schema.d.ts +12 -12
- 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/react/index.d.ts +3 -2
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +1 -0
- package/dist/react/index.js.map +1 -1
- package/dist/schemas/api.schemas.d.ts +9 -0
- package/dist/schemas/api.schemas.d.ts.map +1 -1
- package/dist/schemas/capabilities.schemas.d.ts +5 -0
- package/dist/schemas/capabilities.schemas.d.ts.map +1 -1
- package/dist/schemas/capabilities.schemas.js +1 -0
- package/dist/schemas/capabilities.schemas.js.map +1 -1
- package/dist/schemas/config.schemas.d.ts +14 -0
- package/dist/schemas/config.schemas.d.ts.map +1 -1
- package/dist/styles/theme.d.ts +5 -0
- package/dist/styles/theme.d.ts.map +1 -1
- package/dist/styles/theme.js +3 -0
- package/dist/styles/theme.js.map +1 -1
- package/dist/types/capabilities.types.d.ts +20 -0
- package/dist/types/capabilities.types.d.ts.map +1 -1
- package/dist/types/decision.types.d.ts +10 -2
- package/dist/types/decision.types.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -253,7 +253,7 @@ Slotted parts are children, as in `<ConsentGrantTermsReact slot="details" chaine
|
|
|
253
253
|
## The decision page
|
|
254
254
|
|
|
255
255
|
The capabilities screen draws the consent page Checkpoint serves.
|
|
256
|
-
Top to bottom: the connector, then a card with the eyebrow, the headline, the subhead (only when you set `description`), a warning for an agent that registered itself,
|
|
256
|
+
Top to bottom: the connector, then a card with the eyebrow, the headline, the subhead (only when you set `description`), who is authorizing which agent (or, with no one signed in, a warning for an agent that registered itself), the permission rows, the "Permission details" box, and Allow and Deny; under the card, "Secured by" and the Vouched lockup, then your legal links.
|
|
257
257
|
|
|
258
258
|
```js
|
|
259
259
|
screen.agentMetadata = {
|
|
@@ -261,7 +261,11 @@ screen.agentMetadata = {
|
|
|
261
261
|
did: "did:web:claude.ai",
|
|
262
262
|
verification: "unverified",
|
|
263
263
|
};
|
|
264
|
-
screen.approver = {
|
|
264
|
+
screen.approver = {
|
|
265
|
+
identifier: "alice@example.com",
|
|
266
|
+
name: "Alice Martin",
|
|
267
|
+
method: "Email code",
|
|
268
|
+
};
|
|
265
269
|
screen.grantDetails = {
|
|
266
270
|
resource: "https://shop.example.com/mcp",
|
|
267
271
|
duration: {
|
|
@@ -273,26 +277,38 @@ screen.grantDetails = {
|
|
|
273
277
|
```
|
|
274
278
|
|
|
275
279
|
- **The headline** reads "{Agent} is requesting permission on your behalf", or "{Agent} would like to {verb} on your behalf" with `headlineVerb`.
|
|
280
|
+
`headline` sets your own, with `{Agent}`, `{Verb}` (`headlineVerb`) and `{Merchant}` (`orgName`, in italics) in it, as `<consent-flow>` draws its headline. A headline that names a verb or merchant you don't give (an empty `headlineVerb`, or "use") falls back to the standard line, so the page never reads "would like to on your behalf". `eyebrow` sets the line over it ("PERMISSION REQUEST" when empty).
|
|
276
281
|
The agent's name is a button that opens what is known about it: its logo or initial, how its name was checked (for a domain-bound agent, the host that vouches for it), and its ID.
|
|
277
282
|
Nothing follows the name: no badge and no host chip.
|
|
278
|
-
-
|
|
283
|
+
- **`approver`** draws who is authorizing which agent, as `<consent-flow>`'s approver box does: "You are authorizing" over the person's initials, name and a signed-in mark, then each check they passed (`checks: [{ label, summary, source }]`), then "To act for you" over the agent's logo (or initial) and name.
|
|
284
|
+
`name` is drawn over `identifier`; without a name, the identifier is the name. `method` ("Email code") names the mark, and shows under the name when no identifier does.
|
|
285
|
+
The agent's row says "Unverified" for an agent that registered itself, with what that means behind an info button, or "Identified by chatgpt.com" for a `domain` agent.
|
|
286
|
+
`agentMetadata.identityNote` puts your plain-words account of that identification behind an info button on "Identified by" (such as a client that runs on the person's own computer); without it there is no button.
|
|
287
|
+
With no identifier, name or check, as for a confirmation without sign-in, no box is drawn.
|
|
288
|
+
- **An unverified agent** with no box gets "Unverified agent: it registered itself, so the name it gives is not checked. Allow only if you asked it to." under the headline. The box says the same in its agent row, so the warning is left out beside it.
|
|
279
289
|
A `domain` or `verified` agent gets no warning, and nothing on the screen says "Verified".
|
|
280
|
-
- **`approver`** draws who is signing in, with their initial, and each check they passed (`checks: [{ label, summary, source }]`).
|
|
281
|
-
With neither an identifier nor a check, as for a confirmation without sign-in, no box is drawn.
|
|
282
290
|
- **`grantDetails`** draws the "Permission details" box: "Connects to" (`orgName` over `resource`), "Duration", "Budget", "Amount limits" and "Already granted", in that order, leaving out a row with nothing in it.
|
|
283
291
|
You word every value, so times, amounts and your own rules (such as leaving out a budget beside a per-call limit) stay yours.
|
|
284
292
|
Without `grantDetails` the screen draws its revocation notice instead.
|
|
293
|
+
- **`infoNote`** draws your note under "Permission details" (Checkpoint's "Info note"), with `{Agent}`, `{Verb}` and `{Merchant}` filled in. Empty draws nothing.
|
|
285
294
|
- **Rows** are the label over its description, the "HIGHER RISK" chip at the label's right, and each scope as a code badge.
|
|
286
295
|
They draw no icon; set `show-icons` to draw each row's icon tile.
|
|
287
296
|
Set `hide-risk` (on the screen, `<mcp-consent>` or one `<consent-capability-card>`) to leave out the "HIGHER RISK" chip, and `hide-scopes` to leave out the scope badges; each row's `riskLevel` and `scopes` stay as they are. Each is a plain on/off, for an editor to offer as a switch.
|
|
288
297
|
In "Permission details", every row is the host's to give or leave out: without `grantDetails.resource`, "Connects to" names the organization alone.
|
|
298
|
+
- **A row that needs a check first**, such as an identity check, gets `check: { action }` on its capability.
|
|
299
|
+
The row then shows "Requires verification" and a button with `action` ("Use RPPS number").
|
|
300
|
+
The button never ticks the row: it sends `capability-check` with `capabilityId` and what Allow would send had the person ticked that row too (`selectedCapabilityIds`, `selectedScopes`, `grantTerms`), and you run the check.
|
|
301
|
+
It is off while the screen is `loading` or the grant terms can't be used, and in a preview it sends nothing.
|
|
302
|
+
- **`heldScopes`** lists scopes an earlier approval already holds. Unticking a row that grants one doesn't withdraw it, so the row then says "orders:place stays granted because of your earlier approval." under it, the scope in code, as a status announcement.
|
|
303
|
+
- **`error`** draws a notice at the top of the card that the last action failed, in your words, as an alert.
|
|
304
|
+
It scrolls into view each time you set it, so clear it (`""`) when the next action starts.
|
|
289
305
|
|
|
290
306
|
## Host content and styling
|
|
291
307
|
|
|
292
308
|
Named slots place host content in the existing screen layout:
|
|
293
309
|
|
|
294
310
|
- `recovery`: after the headline, such as an error.
|
|
295
|
-
- `identity`: after the unverified-agent warning, before who is
|
|
311
|
+
- `identity`: after the unverified-agent warning, before who is authorizing which agent.
|
|
296
312
|
- `auth`: after the capability rows, preserving the existing credential form integration.
|
|
297
313
|
- `details`: after the authentication slot.
|
|
298
314
|
- `notice`: replaces the revocation and inactivity notice, which the screen draws when you give no `grantDetails`.
|
|
@@ -303,8 +319,9 @@ Named slots place host content in the existing screen layout:
|
|
|
303
319
|
|
|
304
320
|
Use the `notice` slot whenever the host has different expiry or revocation behavior.
|
|
305
321
|
An omitted slot preserves the existing Cedar screen's default content.
|
|
306
|
-
The public parts are `connector`, `card`, `eyebrow`, `headline`, `agent-name`, `subhead`, `agent-details` (what the name opens), `unverified`, `approver`, `permissions`, `section-header` (the eyebrow over the rows), `section-hint` ("Tap to toggle"), `grant-details`, `actions`, `submit`, `cancel`, and `below` (under the card).
|
|
322
|
+
The public parts are `connector`, `card`, `eyebrow`, `headline`, `agent-name`, `merchant-name` (with `headline`), `subhead`, `agent-details` (what the name opens), `error`, `unverified`, `approver` (with `approver-check`, `approver-agent` and `agent-status` inside), `permissions`, `section-header` (the eyebrow over the rows), `section-hint` ("Tap to toggle"), `grant-details`, `info-note`, `actions`, `submit`, `cancel`, and `below` (under the card).
|
|
307
323
|
Each row's parts are forwarded with a `capability-` prefix: `capability-row`, `capability-checkbox`, `capability-check` (the mark in a ticked box), `capability-icon` (with `show-icons`), `capability-body`, `capability-label-row` (the label, description and risk chip), `capability-label-text` (the label and description), `capability-label`, `capability-description`, `capability-risk`, `capability-scopes`, `capability-scope`, and `capability-policy`.
|
|
324
|
+
A row the screen adds to also has `capability-verify`, `capability-verify-label` and `capability-verify-action` (its "Requires verification" strip) and `capability-held` (its held-scope notice).
|
|
308
325
|
|
|
309
326
|
### Theming from the page
|
|
310
327
|
|
|
@@ -419,7 +436,7 @@ Replace objects and arrays to change them (`capabilities`, `editSource`): a chan
|
|
|
419
436
|
- `domain`: bound to the https host that served the client's metadata (a CIMD client). Set `domain` to that host, such as `chatgpt.com`.
|
|
420
437
|
- `unverified`: self-asserted, such as a dynamically registered client.
|
|
421
438
|
|
|
422
|
-
The screen draws no "Verified" badge for any of them. An `unverified` agent gets a warning under the headline, a `domain` agent
|
|
439
|
+
The screen draws no "Verified" badge for any of them. An `unverified` agent gets a warning under the headline (or "Unverified" in the approver box), a `domain` agent is "Identified by" its host in the approver box, and the name opens what is known about the agent (see [The decision page](#the-decision-page)).
|
|
423
440
|
The verification decides what a grant may reach instead: `isCappedAtProbe` caps any agent that isn't `verified`, or has no `connectedAt`, at probe, and `compileCapabilitiesToCedar` holds to that cap.
|
|
424
441
|
The deprecated `verified` boolean is read only when `verification` is absent.
|
|
425
442
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inline.d.ts","sourceRoot":"","sources":["../../src/bundle/inline.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"inline.d.ts","sourceRoot":"","sources":["../../src/bundle/inline.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,MAA+jzc,CAAC;AAE7lzc;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAe,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAA2B,CAAC;AAE9D;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAuC,CAAC"}
|