@kya-os/consent 0.2.3 → 0.4.0
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 +223 -4
- package/dist/bundle/index.d.ts +10 -0
- package/dist/bundle/index.d.ts.map +1 -1
- package/dist/bundle/index.js +10 -0
- package/dist/bundle/index.js.map +1 -1
- 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/index.js +10 -0
- 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/components/consent-action-bar.js +66 -15
- package/dist/cjs/components/consent-action-bar.js.map +1 -1
- package/dist/cjs/components/consent-agent-header.js +5 -1
- package/dist/cjs/components/consent-agent-header.js.map +1 -1
- package/dist/cjs/components/consent-capabilities-screen.js +56 -4
- package/dist/cjs/components/consent-capabilities-screen.js.map +1 -1
- package/dist/cjs/components/consent-capability-card.js +75 -24
- package/dist/cjs/components/consent-capability-card.js.map +1 -1
- package/dist/cjs/components/consent-checkbox.js +2 -2
- package/dist/cjs/components/consent-checkbox.js.map +1 -1
- package/dist/cjs/components/consent-duration.js +187 -0
- package/dist/cjs/components/consent-duration.js.map +1 -0
- package/dist/cjs/components/consent-folder-scope.js +169 -0
- package/dist/cjs/components/consent-folder-scope.js.map +1 -0
- package/dist/cjs/components/consent-footer.js +13 -2
- package/dist/cjs/components/consent-footer.js.map +1 -1
- package/dist/cjs/components/consent-grant-terms.js +321 -0
- package/dist/cjs/components/consent-grant-terms.js.map +1 -0
- package/dist/cjs/components/consent-headline.js +50 -1
- package/dist/cjs/components/consent-headline.js.map +1 -1
- package/dist/cjs/components/consent-input.js +47 -27
- package/dist/cjs/components/consent-input.js.map +1 -1
- package/dist/cjs/components/consent-otp-input.js +49 -42
- package/dist/cjs/components/consent-otp-input.js.map +1 -1
- package/dist/cjs/components/consent-phone-handoff.js +219 -0
- package/dist/cjs/components/consent-phone-handoff.js.map +1 -0
- package/dist/cjs/components/consent-request-expiry.js +159 -0
- package/dist/cjs/components/consent-request-expiry.js.map +1 -0
- package/dist/cjs/components/consent-revoke.js +308 -0
- package/dist/cjs/components/consent-revoke.js.map +1 -0
- package/dist/cjs/components/consent-shell.js +3 -0
- package/dist/cjs/components/consent-shell.js.map +1 -1
- package/dist/cjs/components/consent-terms.js +2 -2
- package/dist/cjs/components/consent-terms.js.map +1 -1
- package/dist/cjs/components/consent-wallet-check.js +107 -0
- package/dist/cjs/components/consent-wallet-check.js.map +1 -0
- package/dist/cjs/components/consent-wallet-notice.js +189 -0
- package/dist/cjs/components/consent-wallet-notice.js.map +1 -0
- package/dist/cjs/components/consent-wallet-orb.js +273 -0
- package/dist/cjs/components/consent-wallet-orb.js.map +1 -0
- package/dist/cjs/components/consent-wallet-signature.js +104 -0
- package/dist/cjs/components/consent-wallet-signature.js.map +1 -0
- package/dist/cjs/components/grant-field-styles.js +85 -0
- package/dist/cjs/components/grant-field-styles.js.map +1 -0
- package/dist/cjs/components/index.js +33 -1
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/components/mcp-consent.js +18 -1
- package/dist/cjs/components/mcp-consent.js.map +1 -1
- package/dist/cjs/components/template-link.js +32 -0
- package/dist/cjs/components/template-link.js.map +1 -0
- package/dist/cjs/components/wallet-globe.js +184 -0
- package/dist/cjs/components/wallet-globe.js.map +1 -0
- package/dist/cjs/components/wallet-icons.js +19 -0
- package/dist/cjs/components/wallet-icons.js.map +1 -0
- package/dist/cjs/components/wallet-status.js +34 -0
- package/dist/cjs/components/wallet-status.js.map +1 -0
- package/dist/cjs/constants/capabilities.js +11 -2
- package/dist/cjs/constants/capabilities.js.map +1 -1
- package/dist/cjs/copy/tokens.js +91 -0
- package/dist/cjs/copy/tokens.js.map +1 -1
- package/dist/cjs/grant/index.js +24 -0
- package/dist/cjs/grant/index.js.map +1 -0
- package/dist/cjs/grant/terms.js +148 -0
- package/dist/cjs/grant/terms.js.map +1 -0
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/index.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 +120 -1
- package/dist/cjs/react/index.js.map +1 -1
- package/dist/components/consent-action-bar.d.ts +17 -0
- package/dist/components/consent-action-bar.d.ts.map +1 -1
- package/dist/components/consent-action-bar.js +67 -16
- package/dist/components/consent-action-bar.js.map +1 -1
- package/dist/components/consent-agent-header.d.ts.map +1 -1
- package/dist/components/consent-agent-header.js +5 -1
- package/dist/components/consent-agent-header.js.map +1 -1
- package/dist/components/consent-capabilities-screen.d.ts +24 -3
- package/dist/components/consent-capabilities-screen.d.ts.map +1 -1
- package/dist/components/consent-capabilities-screen.js +54 -3
- package/dist/components/consent-capabilities-screen.js.map +1 -1
- package/dist/components/consent-capability-card.d.ts +19 -2
- package/dist/components/consent-capability-card.d.ts.map +1 -1
- package/dist/components/consent-capability-card.js +74 -23
- package/dist/components/consent-capability-card.js.map +1 -1
- package/dist/components/consent-checkbox.d.ts +1 -1
- package/dist/components/consent-checkbox.js +2 -2
- package/dist/components/consent-checkbox.js.map +1 -1
- package/dist/components/consent-duration.d.ts +64 -0
- package/dist/components/consent-duration.d.ts.map +1 -0
- package/dist/components/consent-duration.js +184 -0
- package/dist/components/consent-duration.js.map +1 -0
- package/dist/components/consent-folder-scope.d.ts +70 -0
- package/dist/components/consent-folder-scope.d.ts.map +1 -0
- package/dist/components/consent-folder-scope.js +166 -0
- package/dist/components/consent-folder-scope.js.map +1 -0
- package/dist/components/consent-footer.d.ts.map +1 -1
- package/dist/components/consent-footer.js +13 -2
- package/dist/components/consent-footer.js.map +1 -1
- package/dist/components/consent-grant-terms.d.ts +88 -0
- package/dist/components/consent-grant-terms.d.ts.map +1 -0
- package/dist/components/consent-grant-terms.js +318 -0
- package/dist/components/consent-grant-terms.js.map +1 -0
- package/dist/components/consent-headline.d.ts +25 -0
- package/dist/components/consent-headline.d.ts.map +1 -1
- package/dist/components/consent-headline.js +52 -3
- package/dist/components/consent-headline.js.map +1 -1
- package/dist/components/consent-input.d.ts +4 -4
- package/dist/components/consent-input.d.ts.map +1 -1
- package/dist/components/consent-input.js +49 -29
- package/dist/components/consent-input.js.map +1 -1
- package/dist/components/consent-otp-input.d.ts +4 -4
- package/dist/components/consent-otp-input.d.ts.map +1 -1
- package/dist/components/consent-otp-input.js +51 -44
- package/dist/components/consent-otp-input.js.map +1 -1
- package/dist/components/consent-phone-handoff.d.ts +50 -0
- package/dist/components/consent-phone-handoff.d.ts.map +1 -0
- package/dist/components/consent-phone-handoff.js +215 -0
- package/dist/components/consent-phone-handoff.js.map +1 -0
- package/dist/components/consent-request-expiry.d.ts +52 -0
- package/dist/components/consent-request-expiry.d.ts.map +1 -0
- package/dist/components/consent-request-expiry.js +154 -0
- package/dist/components/consent-request-expiry.js.map +1 -0
- package/dist/components/consent-revoke.d.ts +53 -0
- package/dist/components/consent-revoke.d.ts.map +1 -0
- package/dist/components/consent-revoke.js +305 -0
- package/dist/components/consent-revoke.js.map +1 -0
- package/dist/components/consent-shell.d.ts.map +1 -1
- package/dist/components/consent-shell.js +3 -0
- package/dist/components/consent-shell.js.map +1 -1
- package/dist/components/consent-terms.d.ts +1 -1
- package/dist/components/consent-terms.js +2 -2
- package/dist/components/consent-terms.js.map +1 -1
- package/dist/components/consent-wallet-check.d.ts +45 -0
- package/dist/components/consent-wallet-check.d.ts.map +1 -0
- package/dist/components/consent-wallet-check.js +102 -0
- package/dist/components/consent-wallet-check.js.map +1 -0
- package/dist/components/consent-wallet-notice.d.ts +54 -0
- package/dist/components/consent-wallet-notice.d.ts.map +1 -0
- package/dist/components/consent-wallet-notice.js +186 -0
- package/dist/components/consent-wallet-notice.js.map +1 -0
- package/dist/components/consent-wallet-orb.d.ts +48 -0
- package/dist/components/consent-wallet-orb.d.ts.map +1 -0
- package/dist/components/consent-wallet-orb.js +269 -0
- package/dist/components/consent-wallet-orb.js.map +1 -0
- package/dist/components/consent-wallet-signature.d.ts +26 -0
- package/dist/components/consent-wallet-signature.d.ts.map +1 -0
- package/dist/components/consent-wallet-signature.js +101 -0
- package/dist/components/consent-wallet-signature.js.map +1 -0
- package/dist/components/grant-field-styles.d.ts +9 -0
- package/dist/components/grant-field-styles.d.ts.map +1 -0
- package/dist/components/grant-field-styles.js +82 -0
- package/dist/components/grant-field-styles.js.map +1 -0
- package/dist/components/index.d.ts +11 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +14 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/mcp-consent.d.ts.map +1 -1
- package/dist/components/mcp-consent.js +18 -1
- package/dist/components/mcp-consent.js.map +1 -1
- package/dist/components/template-link.d.ts +24 -0
- package/dist/components/template-link.d.ts.map +1 -0
- package/dist/components/template-link.js +29 -0
- package/dist/components/template-link.js.map +1 -0
- package/dist/components/wallet-globe.d.ts +29 -0
- package/dist/components/wallet-globe.d.ts.map +1 -0
- package/dist/components/wallet-globe.js +181 -0
- package/dist/components/wallet-globe.js.map +1 -0
- package/dist/components/wallet-icons.d.ts +16 -0
- package/dist/components/wallet-icons.d.ts.map +1 -0
- package/dist/components/wallet-icons.js +16 -0
- package/dist/components/wallet-icons.js.map +1 -0
- package/dist/components/wallet-status.d.ts +19 -0
- package/dist/components/wallet-status.d.ts.map +1 -0
- package/dist/components/wallet-status.js +29 -0
- package/dist/components/wallet-status.js.map +1 -0
- package/dist/consent.js +3246 -807
- package/dist/consent.min.js +1360 -281
- package/dist/constants/capabilities.d.ts +5 -2
- package/dist/constants/capabilities.d.ts.map +1 -1
- package/dist/constants/capabilities.js +11 -2
- package/dist/constants/capabilities.js.map +1 -1
- package/dist/copy/tokens.d.ts +91 -0
- package/dist/copy/tokens.d.ts.map +1 -1
- package/dist/copy/tokens.js +91 -0
- package/dist/copy/tokens.js.map +1 -1
- package/dist/grant/index.d.ts +8 -0
- package/dist/grant/index.d.ts.map +1 -0
- package/dist/grant/index.js +8 -0
- package/dist/grant/index.js.map +1 -0
- package/dist/grant/terms.d.ts +97 -0
- package/dist/grant/terms.d.ts.map +1 -0
- package/dist/grant/terms.js +139 -0
- package/dist/grant/terms.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- 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 +74 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +119 -0
- package/dist/react/index.js.map +1 -1
- package/package.json +10 -4
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
/** Public feature contract for hosts that embed the standalone screen bundle. */
|
|
2
2
|
export declare const CONSENT_CAPABILITIES_FEATURES: Readonly<{
|
|
3
|
-
|
|
3
|
+
/** 2 adds the `headline` slot, a slot per row and the row parts. */
|
|
4
|
+
version: 2;
|
|
4
5
|
scopesOnly: true;
|
|
5
|
-
slots: readonly ["identity", "details", "notice", "footer"];
|
|
6
|
+
slots: readonly ["identity", "details", "notice", "footer", "headline"];
|
|
7
|
+
/** A row's slot is this prefix and the capability's id. */
|
|
8
|
+
capabilitySlotPrefix: "capability-";
|
|
6
9
|
}>;
|
|
7
10
|
//# sourceMappingURL=capabilities.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../src/constants/capabilities.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,eAAO,MAAM,6BAA6B;;;;
|
|
1
|
+
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../src/constants/capabilities.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,eAAO,MAAM,6BAA6B;IACxC,oEAAoE;;;;IAUpE,2DAA2D;;EAE3D,CAAC"}
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
/** Public feature contract for hosts that embed the standalone screen bundle. */
|
|
2
2
|
export const CONSENT_CAPABILITIES_FEATURES = Object.freeze({
|
|
3
|
-
|
|
3
|
+
/** 2 adds the `headline` slot, a slot per row and the row parts. */
|
|
4
|
+
version: 2,
|
|
4
5
|
scopesOnly: true,
|
|
5
|
-
slots: Object.freeze([
|
|
6
|
+
slots: Object.freeze([
|
|
7
|
+
"identity",
|
|
8
|
+
"details",
|
|
9
|
+
"notice",
|
|
10
|
+
"footer",
|
|
11
|
+
"headline",
|
|
12
|
+
]),
|
|
13
|
+
/** A row's slot is this prefix and the capability's id. */
|
|
14
|
+
capabilitySlotPrefix: "capability-",
|
|
6
15
|
});
|
|
7
16
|
//# sourceMappingURL=capabilities.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.js","sourceRoot":"","sources":["../../src/constants/capabilities.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,MAAM,CAAC,MAAM,6BAA6B,GAAG,MAAM,CAAC,MAAM,CAAC;IACzD,OAAO,EAAE,CAAC;IACV,UAAU,EAAE,IAAI;IAChB,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"capabilities.js","sourceRoot":"","sources":["../../src/constants/capabilities.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,MAAM,CAAC,MAAM,6BAA6B,GAAG,MAAM,CAAC,MAAM,CAAC;IACzD,oEAAoE;IACpE,OAAO,EAAE,CAAC;IACV,UAAU,EAAE,IAAI;IAChB,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC;QACnB,UAAU;QACV,SAAS;QACT,QAAQ;QACR,QAAQ;QACR,UAAU;KACF,CAAC;IACX,2DAA2D;IAC3D,oBAAoB,EAAE,aAAa;CACpC,CAAC,CAAC"}
|
package/dist/copy/tokens.d.ts
CHANGED
|
@@ -104,6 +104,97 @@ export declare const CONSENT_COPY_TOKENS: {
|
|
|
104
104
|
/** Dark theme secondary. */
|
|
105
105
|
readonly deny: "Deny";
|
|
106
106
|
};
|
|
107
|
+
/**
|
|
108
|
+
* `consent-grant-terms`, `consent-duration` and `consent-folder-scope`
|
|
109
|
+
* defaults. Each element takes its own label, hint and placeholder too.
|
|
110
|
+
*/
|
|
111
|
+
readonly grant: {
|
|
112
|
+
/** The button that opens the terms. */
|
|
113
|
+
readonly customize: "Customize";
|
|
114
|
+
/** Between the parts of the closed summary: "8 hours · Every folder". */
|
|
115
|
+
readonly summarySeparator: " · ";
|
|
116
|
+
readonly durationLabel: "Valid for";
|
|
117
|
+
readonly durationHint: "The grant ends on its own after this. The agent has to ask again.";
|
|
118
|
+
readonly folderLabel: "Limit to a folder (optional)";
|
|
119
|
+
readonly folderPlaceholder: "e.g. notes/";
|
|
120
|
+
readonly folderHint: "Only files under this folder. Leave it blank to allow every folder.";
|
|
121
|
+
/** The summary when no folder is set. */
|
|
122
|
+
readonly everyFolder: "Every folder";
|
|
123
|
+
/** `{Folder}` → the folder, e.g. "notes/". */
|
|
124
|
+
readonly onlyFolderTemplate: "Only {Folder}";
|
|
125
|
+
/** A folder with a `.` or `..` segment, which no request can match. */
|
|
126
|
+
readonly folderDotSegment: "Use a folder path without . or .. in it.";
|
|
127
|
+
/** The summary while the folder can't be used. */
|
|
128
|
+
readonly folderNeedsFixing: "Folder needs fixing";
|
|
129
|
+
/** `chained`: what a delegation chain lets the agent do with the grant. */
|
|
130
|
+
readonly passOn: "The agent can pass on only a narrower grant, never a wider one.";
|
|
131
|
+
};
|
|
132
|
+
/** `consent-revoke` defaults. `{Agent}` → agent display name. */
|
|
133
|
+
readonly revoke: {
|
|
134
|
+
readonly titleTemplate: "Take back {Agent}'s access?";
|
|
135
|
+
readonly bodyTemplate: "It ends right away, and {Agent} has to ask again to get it back.";
|
|
136
|
+
/** Heading over what ends. */
|
|
137
|
+
readonly endsTitle: "This ends";
|
|
138
|
+
/** `chained`: the grants the agent made under this one end too. */
|
|
139
|
+
readonly chainedItemTemplate: "Every narrower grant {Agent} passed on";
|
|
140
|
+
readonly confirm: "Take back access";
|
|
141
|
+
readonly keep: "Keep access";
|
|
142
|
+
readonly working: "Taking back…";
|
|
143
|
+
readonly doneTitle: "Access taken back";
|
|
144
|
+
/** `{Agent}` never starts a sentence: it falls back to "this agent". */
|
|
145
|
+
readonly doneBodyTemplate: "It has ended, and {Agent} can no longer use it.";
|
|
146
|
+
};
|
|
147
|
+
/**
|
|
148
|
+
* The wallet elements: `consent-wallet-check`, `consent-wallet-notice`,
|
|
149
|
+
* `consent-wallet-signature` and `consent-phone-handoff`. `{App}` → the
|
|
150
|
+
* app's name. `{CredentialsLink}` and `{RevokeLink}` → a link to the page
|
|
151
|
+
* where the person manages their wallet and their grants.
|
|
152
|
+
*/
|
|
153
|
+
readonly wallet: {
|
|
154
|
+
/** The caption under the wallet check, one per status. */
|
|
155
|
+
readonly check: {
|
|
156
|
+
readonly checking: "Checking wallet identity…";
|
|
157
|
+
readonly syncing: "Syncing this device's wallet to your account…";
|
|
158
|
+
readonly ready: "Wallet verified";
|
|
159
|
+
readonly conflict: "This browser can't sign for your wallet";
|
|
160
|
+
readonly error: "Couldn't verify your wallet";
|
|
161
|
+
};
|
|
162
|
+
readonly notice: {
|
|
163
|
+
/** `{App}` when the host doesn't name its app. */
|
|
164
|
+
readonly appFallback: "this app";
|
|
165
|
+
readonly credentialsLink: "your credentials page";
|
|
166
|
+
/** `updates-on-its-own`: the page reflects an approval made elsewhere. */
|
|
167
|
+
readonly updatesOnItsOwn: "This page updates on its own once you do.";
|
|
168
|
+
readonly errorTitle: "Couldn't check your wallet";
|
|
169
|
+
readonly errorBody: "Refresh the page to try again. If it keeps happening, open {CredentialsLink} to check the wallet there.";
|
|
170
|
+
readonly passkeyUnreachableTitle: "Approve from the browser that holds your passkey";
|
|
171
|
+
readonly passkeyUnreachableBody: "Your wallet is derived from a passkey this browser can't reach, so nothing can be signed here. Open this same link in the browser where {App} is already set up and approve it there.";
|
|
172
|
+
readonly passkeyUnreachableMore: "To approve from this browser in future, sync that passkey to it (iCloud Keychain, Google Password Manager, or 1Password).";
|
|
173
|
+
readonly keyDriftTitle: "This browser's wallet key doesn't match your account";
|
|
174
|
+
readonly keyDriftBody: "It holds your account identity but signs with a different key than the one your account publishes, so anything it signs would be rejected. Approve from the browser where {App} was first set up, or re-link this browser from {CredentialsLink}.";
|
|
175
|
+
readonly supersededTitle: "Your identity was re-registered";
|
|
176
|
+
readonly supersededBody: "The registry's current record for your account doesn't include this device's signing key. Re-link your account with the registry from {CredentialsLink}, then reopen this request.";
|
|
177
|
+
/** A conflict with a reason the element doesn't know: `message` follows. */
|
|
178
|
+
readonly otherTitle: "This browser can't sign this request";
|
|
179
|
+
};
|
|
180
|
+
readonly signature: {
|
|
181
|
+
readonly signedBy: "Signed by your KYA-OS wallet.";
|
|
182
|
+
readonly revokeTemplate: "Revoke any time from {RevokeLink}.";
|
|
183
|
+
readonly revokeLink: "your credentials list";
|
|
184
|
+
};
|
|
185
|
+
readonly handoff: {
|
|
186
|
+
readonly title: "Approve on your phone instead";
|
|
187
|
+
readonly body: "If your wallet's passkey is on your phone, approving there with Face ID or Touch ID is faster and more reliable than signing from this computer.";
|
|
188
|
+
readonly scan: "Scan this with your phone's camera and approve there.";
|
|
189
|
+
readonly updatesOnItsOwn: "This page updates on its own once you do.";
|
|
190
|
+
readonly qrLabel: "QR code that opens this request on your phone";
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
/** `consent-request-expiry`. `{Time}` → the time left, e.g. "4:59". */
|
|
194
|
+
readonly request: {
|
|
195
|
+
readonly expiresTemplate: "This request expires in {Time}. Approve before then, or the agent will need to ask again.";
|
|
196
|
+
readonly expired: "This request expired. Ask the agent to try again.";
|
|
197
|
+
};
|
|
107
198
|
readonly attribution: {
|
|
108
199
|
/** Light theme. */
|
|
109
200
|
readonly protectedBy: "Protected by Checkpoint";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.d.ts","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nE,wEAAwE;;;IAG1E;;;;;OAKG;;QAED,0DAA0D;;;;;;;;;YASxD,kDAAkD;;;YAGlD,0EAA0E;;;;;;;;;;;YAiB1E,4EAA4E;;;;;;;;;;;;;;;;IAgBhF,uEAAuE;;;;;;QAOrE,mBAAmB;;QAEnB,kBAAkB;;;;IAIpB;;;OAGG;;;;;;;;;;;;;;;;;;;QAuBD,6EAA6E;;;;;;;;;;CAavE,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,OAAO,mBAAmB,CAAC;AAE3D;;;;GAIG;AACH,wBAAgB,WAAW,CACzB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,GAClD,MAAM,CAKR"}
|
package/dist/copy/tokens.js
CHANGED
|
@@ -104,6 +104,97 @@ export const CONSENT_COPY_TOKENS = {
|
|
|
104
104
|
/** Dark theme secondary. */
|
|
105
105
|
deny: "Deny",
|
|
106
106
|
},
|
|
107
|
+
/**
|
|
108
|
+
* `consent-grant-terms`, `consent-duration` and `consent-folder-scope`
|
|
109
|
+
* defaults. Each element takes its own label, hint and placeholder too.
|
|
110
|
+
*/
|
|
111
|
+
grant: {
|
|
112
|
+
/** The button that opens the terms. */
|
|
113
|
+
customize: "Customize",
|
|
114
|
+
/** Between the parts of the closed summary: "8 hours · Every folder". */
|
|
115
|
+
summarySeparator: " · ",
|
|
116
|
+
durationLabel: "Valid for",
|
|
117
|
+
durationHint: "The grant ends on its own after this. The agent has to ask again.",
|
|
118
|
+
folderLabel: "Limit to a folder (optional)",
|
|
119
|
+
folderPlaceholder: "e.g. notes/",
|
|
120
|
+
folderHint: "Only files under this folder. Leave it blank to allow every folder.",
|
|
121
|
+
/** The summary when no folder is set. */
|
|
122
|
+
everyFolder: "Every folder",
|
|
123
|
+
/** `{Folder}` → the folder, e.g. "notes/". */
|
|
124
|
+
onlyFolderTemplate: "Only {Folder}",
|
|
125
|
+
/** A folder with a `.` or `..` segment, which no request can match. */
|
|
126
|
+
folderDotSegment: "Use a folder path without . or .. in it.",
|
|
127
|
+
/** The summary while the folder can't be used. */
|
|
128
|
+
folderNeedsFixing: "Folder needs fixing",
|
|
129
|
+
/** `chained`: what a delegation chain lets the agent do with the grant. */
|
|
130
|
+
passOn: "The agent can pass on only a narrower grant, never a wider one.",
|
|
131
|
+
},
|
|
132
|
+
/** `consent-revoke` defaults. `{Agent}` → agent display name. */
|
|
133
|
+
revoke: {
|
|
134
|
+
titleTemplate: "Take back {Agent}'s access?",
|
|
135
|
+
bodyTemplate: "It ends right away, and {Agent} has to ask again to get it back.",
|
|
136
|
+
/** Heading over what ends. */
|
|
137
|
+
endsTitle: "This ends",
|
|
138
|
+
/** `chained`: the grants the agent made under this one end too. */
|
|
139
|
+
chainedItemTemplate: "Every narrower grant {Agent} passed on",
|
|
140
|
+
confirm: "Take back access",
|
|
141
|
+
keep: "Keep access",
|
|
142
|
+
working: "Taking back…",
|
|
143
|
+
doneTitle: "Access taken back",
|
|
144
|
+
/** `{Agent}` never starts a sentence: it falls back to "this agent". */
|
|
145
|
+
doneBodyTemplate: "It has ended, and {Agent} can no longer use it.",
|
|
146
|
+
},
|
|
147
|
+
/**
|
|
148
|
+
* The wallet elements: `consent-wallet-check`, `consent-wallet-notice`,
|
|
149
|
+
* `consent-wallet-signature` and `consent-phone-handoff`. `{App}` → the
|
|
150
|
+
* app's name. `{CredentialsLink}` and `{RevokeLink}` → a link to the page
|
|
151
|
+
* where the person manages their wallet and their grants.
|
|
152
|
+
*/
|
|
153
|
+
wallet: {
|
|
154
|
+
/** The caption under the wallet check, one per status. */
|
|
155
|
+
check: {
|
|
156
|
+
checking: "Checking wallet identity…",
|
|
157
|
+
syncing: "Syncing this device's wallet to your account…",
|
|
158
|
+
ready: "Wallet verified",
|
|
159
|
+
conflict: "This browser can't sign for your wallet",
|
|
160
|
+
error: "Couldn't verify your wallet",
|
|
161
|
+
},
|
|
162
|
+
notice: {
|
|
163
|
+
/** `{App}` when the host doesn't name its app. */
|
|
164
|
+
appFallback: "this app",
|
|
165
|
+
credentialsLink: "your credentials page",
|
|
166
|
+
/** `updates-on-its-own`: the page reflects an approval made elsewhere. */
|
|
167
|
+
updatesOnItsOwn: "This page updates on its own once you do.",
|
|
168
|
+
errorTitle: "Couldn't check your wallet",
|
|
169
|
+
errorBody: "Refresh the page to try again. If it keeps happening, open {CredentialsLink} to check the wallet there.",
|
|
170
|
+
passkeyUnreachableTitle: "Approve from the browser that holds your passkey",
|
|
171
|
+
passkeyUnreachableBody: "Your wallet is derived from a passkey this browser can't reach, so nothing can be signed here. Open this same link in the browser where {App} is already set up and approve it there.",
|
|
172
|
+
passkeyUnreachableMore: "To approve from this browser in future, sync that passkey to it (iCloud Keychain, Google Password Manager, or 1Password).",
|
|
173
|
+
keyDriftTitle: "This browser's wallet key doesn't match your account",
|
|
174
|
+
keyDriftBody: "It holds your account identity but signs with a different key than the one your account publishes, so anything it signs would be rejected. Approve from the browser where {App} was first set up, or re-link this browser from {CredentialsLink}.",
|
|
175
|
+
supersededTitle: "Your identity was re-registered",
|
|
176
|
+
supersededBody: "The registry's current record for your account doesn't include this device's signing key. Re-link your account with the registry from {CredentialsLink}, then reopen this request.",
|
|
177
|
+
/** A conflict with a reason the element doesn't know: `message` follows. */
|
|
178
|
+
otherTitle: "This browser can't sign this request",
|
|
179
|
+
},
|
|
180
|
+
signature: {
|
|
181
|
+
signedBy: "Signed by your KYA-OS wallet.",
|
|
182
|
+
revokeTemplate: "Revoke any time from {RevokeLink}.",
|
|
183
|
+
revokeLink: "your credentials list",
|
|
184
|
+
},
|
|
185
|
+
handoff: {
|
|
186
|
+
title: "Approve on your phone instead",
|
|
187
|
+
body: "If your wallet's passkey is on your phone, approving there with Face ID or Touch ID is faster and more reliable than signing from this computer.",
|
|
188
|
+
scan: "Scan this with your phone's camera and approve there.",
|
|
189
|
+
updatesOnItsOwn: "This page updates on its own once you do.",
|
|
190
|
+
qrLabel: "QR code that opens this request on your phone",
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
/** `consent-request-expiry`. `{Time}` → the time left, e.g. "4:59". */
|
|
194
|
+
request: {
|
|
195
|
+
expiresTemplate: "This request expires in {Time}. Approve before then, or the agent will need to ask again.",
|
|
196
|
+
expired: "This request expired. Ask the agent to try again.",
|
|
197
|
+
},
|
|
107
198
|
attribution: {
|
|
108
199
|
/** Light theme. */
|
|
109
200
|
protectedBy: "Protected by Checkpoint",
|
package/dist/copy/tokens.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../src/copy/tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,OAAO,EAAE;QACP,oCAAoC;QACpC,iBAAiB,EAAE,oBAAoB;QACvC,iEAAiE;QACjE,YAAY,EAAE,iBAAiB;KAChC;IACD,QAAQ,EAAE;QACR;;;;WAIG;QACH,QAAQ,EAAE,gDAAgD;QAC1D,gBAAgB,EAAE,4CAA4C;KAC/D;IACD,OAAO,EAAE;QACP,sCAAsC;QACtC,QAAQ,EACN,kGAAkG;KACrG;IACD,SAAS,EAAE;QACT,YAAY,EAAE,UAAU;QACxB,cAAc,EAAE,YAAY;QAC5B;;;;WAIG;QACH,gBAAgB,EAAE,eAAe;QACjC;;;;;;WAMG;QACH,MAAM,EAAE,kBAAkB;QAC1B,+CAA+C;QAC/C,UAAU,EAAE,4BAA4B;QACxC,aAAa,EAAE,KAAK;QACpB;;;;WAIG;QACH,YAAY,EAAE,6DAA6D;QAC3E,gBAAgB,EAAE,oBAAoB;QACtC,8CAA8C;QAC9C,mBAAmB,EAAE,6BAA6B;KACnD;IACD,OAAO,EAAE;QACP,kEAAkE;QAClE,kBAAkB,EAAE,6BAA6B;QACjD,WAAW,EAAE,eAAe;QAC5B,sCAAsC;QACtC,oBAAoB,EAAE,uBAAuB;KAC9C;IACD,aAA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@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/grant/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Grant terms: how long a grant lasts and which folder it covers.
|
|
3
|
+
*
|
|
4
|
+
* The person chooses them on the consent screen (`consent-duration`,
|
|
5
|
+
* `consent-folder-scope`, grouped by `consent-grant-terms`), and the host
|
|
6
|
+
* mints a credential with them. `GrantTerms` has the field names of
|
|
7
|
+
* `@kya-os/id`'s `DelegationRequest`, so the terms spread straight into
|
|
8
|
+
* `wallet.issueDelegation({ ...terms, capability, subjectDid })`. The types
|
|
9
|
+
* are declared here, not imported, so this module never needs `@kya-os/id`.
|
|
10
|
+
*
|
|
11
|
+
* Pure functions, no DOM.
|
|
12
|
+
*
|
|
13
|
+
* @module @kya-os/consent/grant
|
|
14
|
+
*/
|
|
15
|
+
/** One choice in a duration picker. */
|
|
16
|
+
export interface DurationOption {
|
|
17
|
+
/** What the person reads, e.g. "8 hours". */
|
|
18
|
+
label: string;
|
|
19
|
+
/** How long the grant lasts, in seconds. */
|
|
20
|
+
seconds: number;
|
|
21
|
+
}
|
|
22
|
+
/** The durations a picker offers when its host sets none. */
|
|
23
|
+
export declare const DURATION_OPTIONS: readonly DurationOption[];
|
|
24
|
+
/**
|
|
25
|
+
* The duration a picker starts on: a working session, so the agent doesn't
|
|
26
|
+
* have to ask again within the hour.
|
|
27
|
+
*/
|
|
28
|
+
export declare const DEFAULT_DURATION_SECONDS: number;
|
|
29
|
+
/**
|
|
30
|
+
* The options no longer than `maxSeconds`, in their own order. Never empty:
|
|
31
|
+
* a cap shorter than every option still offers the shortest one.
|
|
32
|
+
*/
|
|
33
|
+
export declare function durationOptionsWithin(options: readonly DurationOption[], maxSeconds?: number): DurationOption[];
|
|
34
|
+
/**
|
|
35
|
+
* The option a picker shows for `seconds`: that option when it is offered,
|
|
36
|
+
* otherwise the longest offered option shorter than it, otherwise the
|
|
37
|
+
* shortest. A grant never gets longer than the host asked for.
|
|
38
|
+
*/
|
|
39
|
+
export declare function pickDuration(seconds: number, options: readonly DurationOption[], maxSeconds?: number): DurationOption;
|
|
40
|
+
/**
|
|
41
|
+
* A duration in words: "1 hour", "8 hours", "7 days", "90 seconds".
|
|
42
|
+
* Uses the largest unit that divides it evenly.
|
|
43
|
+
*/
|
|
44
|
+
export declare function formatDuration(seconds: number): string;
|
|
45
|
+
/**
|
|
46
|
+
* A CRISP scope that limits a grant to one folder. The verifier's
|
|
47
|
+
* `path-prefix` matcher (`@kya-os/mcp`) is folder-aware: `notes/` covers
|
|
48
|
+
* `notes/a.md` and never `notesx/a.md`.
|
|
49
|
+
*/
|
|
50
|
+
export interface PathPrefixScope {
|
|
51
|
+
resource: string;
|
|
52
|
+
matcher: "path-prefix";
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* What a person chose, named as `@kya-os/id`'s `DelegationRequest` names it.
|
|
56
|
+
* A field that is absent leaves the credential at its default: no
|
|
57
|
+
* `notAfter` is the issuer's own default lifetime, and no `crispScopes` is
|
|
58
|
+
* the whole surface.
|
|
59
|
+
*/
|
|
60
|
+
export interface GrantTerms {
|
|
61
|
+
/** Seconds from now until the grant ends. */
|
|
62
|
+
notAfter?: number;
|
|
63
|
+
/** The folders the grant covers. */
|
|
64
|
+
crispScopes?: PathPrefixScope[];
|
|
65
|
+
}
|
|
66
|
+
/** Why a folder can't become a scope. */
|
|
67
|
+
export type FolderProblem = "dot-segment";
|
|
68
|
+
/** A folder the person typed, read as a scope. */
|
|
69
|
+
export type FolderScope = {
|
|
70
|
+
ok: true;
|
|
71
|
+
/** The folder the grant is limited to, or "" for every folder. */
|
|
72
|
+
folder: string;
|
|
73
|
+
} | {
|
|
74
|
+
ok: false;
|
|
75
|
+
problem: FolderProblem;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Read what a person typed into a folder field.
|
|
79
|
+
*
|
|
80
|
+
* - Blank, `/` or `*` means every folder.
|
|
81
|
+
* - Leading slashes and a trailing `*` are dropped: `/notes/*` is `notes/`.
|
|
82
|
+
* - `\` reads as `/`, and repeated slashes as one: `notes\\a//b` is
|
|
83
|
+
* `notes/a/b`. The matcher compares the raw string, so either would
|
|
84
|
+
* otherwise cover nothing a vault path can be.
|
|
85
|
+
* - A `.` or `..` segment is refused. The matcher refuses those too, so the
|
|
86
|
+
* grant would cover nothing at all.
|
|
87
|
+
*/
|
|
88
|
+
export declare function readFolder(input: string): FolderScope;
|
|
89
|
+
/** The grant terms for a folder: none for every folder. */
|
|
90
|
+
export declare function folderTerms(folder: string): GrantTerms;
|
|
91
|
+
/**
|
|
92
|
+
* Combine the terms several fields chose. Folder scopes add up (a grant
|
|
93
|
+
* covers each of them); when more than one field sets a duration, the
|
|
94
|
+
* shortest wins, so combining terms never lengthens a grant.
|
|
95
|
+
*/
|
|
96
|
+
export declare function mergeGrantTerms(...parts: GrantTerms[]): GrantTerms;
|
|
97
|
+
//# sourceMappingURL=terms.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terms.d.ts","sourceRoot":"","sources":["../../src/grant/terms.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,uCAAuC;AACvC,MAAM,WAAW,cAAc;IAC7B,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,4CAA4C;IAC5C,OAAO,EAAE,MAAM,CAAC;CACjB;AAMD,6DAA6D;AAC7D,eAAO,MAAM,gBAAgB,EAAE,SAAS,cAAc,EAQpD,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,wBAAwB,QAAW,CAAC;AAEjD;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,SAAS,cAAc,EAAE,EAClC,UAAU,CAAC,EAAE,MAAM,GAClB,cAAc,EAAE,CAYlB;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,SAAS,cAAc,EAAE,EAClC,UAAU,CAAC,EAAE,MAAM,GAClB,cAAc,CAShB;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAetD;AAED;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,aAAa,CAAC;CACxB;AAED;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oCAAoC;IACpC,WAAW,CAAC,EAAE,eAAe,EAAE,CAAC;CACjC;AAED,yCAAyC;AACzC,MAAM,MAAM,aAAa,GAAG,aAAa,CAAC;AAE1C,kDAAkD;AAClD,MAAM,MAAM,WAAW,GACnB;IACE,EAAE,EAAE,IAAI,CAAC;IACT,kEAAkE;IAClE,MAAM,EAAE,MAAM,CAAC;CAChB,GACD;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,aAAa,CAAA;CAAE,CAAC;AAE1C;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,CAarD;AAED,2DAA2D;AAC3D,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAItD;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,GAAG,KAAK,EAAE,UAAU,EAAE,GAAG,UAAU,CAclE"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Grant terms: how long a grant lasts and which folder it covers.
|
|
3
|
+
*
|
|
4
|
+
* The person chooses them on the consent screen (`consent-duration`,
|
|
5
|
+
* `consent-folder-scope`, grouped by `consent-grant-terms`), and the host
|
|
6
|
+
* mints a credential with them. `GrantTerms` has the field names of
|
|
7
|
+
* `@kya-os/id`'s `DelegationRequest`, so the terms spread straight into
|
|
8
|
+
* `wallet.issueDelegation({ ...terms, capability, subjectDid })`. The types
|
|
9
|
+
* are declared here, not imported, so this module never needs `@kya-os/id`.
|
|
10
|
+
*
|
|
11
|
+
* Pure functions, no DOM.
|
|
12
|
+
*
|
|
13
|
+
* @module @kya-os/consent/grant
|
|
14
|
+
*/
|
|
15
|
+
const MINUTE = 60;
|
|
16
|
+
const HOUR = 60 * MINUTE;
|
|
17
|
+
const DAY = 24 * HOUR;
|
|
18
|
+
/** The durations a picker offers when its host sets none. */
|
|
19
|
+
export const DURATION_OPTIONS = Object.freeze([
|
|
20
|
+
{ label: "15 minutes", seconds: 15 * MINUTE },
|
|
21
|
+
{ label: "30 minutes", seconds: 30 * MINUTE },
|
|
22
|
+
{ label: "1 hour", seconds: HOUR },
|
|
23
|
+
{ label: "8 hours", seconds: 8 * HOUR },
|
|
24
|
+
{ label: "24 hours", seconds: DAY },
|
|
25
|
+
{ label: "7 days", seconds: 7 * DAY },
|
|
26
|
+
{ label: "30 days", seconds: 30 * DAY },
|
|
27
|
+
]);
|
|
28
|
+
/**
|
|
29
|
+
* The duration a picker starts on: a working session, so the agent doesn't
|
|
30
|
+
* have to ask again within the hour.
|
|
31
|
+
*/
|
|
32
|
+
export const DEFAULT_DURATION_SECONDS = 8 * HOUR;
|
|
33
|
+
/**
|
|
34
|
+
* The options no longer than `maxSeconds`, in their own order. Never empty:
|
|
35
|
+
* a cap shorter than every option still offers the shortest one.
|
|
36
|
+
*/
|
|
37
|
+
export function durationOptionsWithin(options, maxSeconds) {
|
|
38
|
+
const valid = options.filter((o) => Number.isFinite(o.seconds) && o.seconds > 0);
|
|
39
|
+
if (valid.length === 0)
|
|
40
|
+
return [...DURATION_OPTIONS.slice(0, 1)];
|
|
41
|
+
if (maxSeconds === undefined || !Number.isFinite(maxSeconds)) {
|
|
42
|
+
return valid;
|
|
43
|
+
}
|
|
44
|
+
const within = valid.filter((o) => o.seconds <= maxSeconds);
|
|
45
|
+
if (within.length > 0)
|
|
46
|
+
return within;
|
|
47
|
+
const shortest = valid.reduce((a, b) => (b.seconds < a.seconds ? b : a));
|
|
48
|
+
return [shortest];
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* The option a picker shows for `seconds`: that option when it is offered,
|
|
52
|
+
* otherwise the longest offered option shorter than it, otherwise the
|
|
53
|
+
* shortest. A grant never gets longer than the host asked for.
|
|
54
|
+
*/
|
|
55
|
+
export function pickDuration(seconds, options, maxSeconds) {
|
|
56
|
+
const offered = durationOptionsWithin(options, maxSeconds);
|
|
57
|
+
const exact = offered.find((o) => o.seconds === seconds);
|
|
58
|
+
if (exact)
|
|
59
|
+
return exact;
|
|
60
|
+
const shorter = offered.filter((o) => o.seconds < seconds);
|
|
61
|
+
if (shorter.length > 0) {
|
|
62
|
+
return shorter.reduce((a, b) => (b.seconds > a.seconds ? b : a));
|
|
63
|
+
}
|
|
64
|
+
return offered.reduce((a, b) => (b.seconds < a.seconds ? b : a));
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* A duration in words: "1 hour", "8 hours", "7 days", "90 seconds".
|
|
68
|
+
* Uses the largest unit that divides it evenly.
|
|
69
|
+
*/
|
|
70
|
+
export function formatDuration(seconds) {
|
|
71
|
+
const units = [
|
|
72
|
+
[DAY, "day"],
|
|
73
|
+
[HOUR, "hour"],
|
|
74
|
+
[MINUTE, "minute"],
|
|
75
|
+
[1, "second"],
|
|
76
|
+
];
|
|
77
|
+
const whole = Math.max(0, Math.round(seconds));
|
|
78
|
+
for (const [size, name] of units) {
|
|
79
|
+
if (whole >= size && whole % size === 0) {
|
|
80
|
+
const n = whole / size;
|
|
81
|
+
return `${n} ${name}${n === 1 ? "" : "s"}`;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return `${whole} seconds`;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Read what a person typed into a folder field.
|
|
88
|
+
*
|
|
89
|
+
* - Blank, `/` or `*` means every folder.
|
|
90
|
+
* - Leading slashes and a trailing `*` are dropped: `/notes/*` is `notes/`.
|
|
91
|
+
* - `\` reads as `/`, and repeated slashes as one: `notes\\a//b` is
|
|
92
|
+
* `notes/a/b`. The matcher compares the raw string, so either would
|
|
93
|
+
* otherwise cover nothing a vault path can be.
|
|
94
|
+
* - A `.` or `..` segment is refused. The matcher refuses those too, so the
|
|
95
|
+
* grant would cover nothing at all.
|
|
96
|
+
*/
|
|
97
|
+
export function readFolder(input) {
|
|
98
|
+
let folder = input
|
|
99
|
+
.trim()
|
|
100
|
+
.replace(/\\/g, "/")
|
|
101
|
+
.replace(/\/{2,}/g, "/")
|
|
102
|
+
.replace(/^\//, "");
|
|
103
|
+
if (folder.endsWith("*"))
|
|
104
|
+
folder = folder.slice(0, -1);
|
|
105
|
+
if (folder.replace(/\/+$/, "") === "")
|
|
106
|
+
return { ok: true, folder: "" };
|
|
107
|
+
const segments = folder.split("/");
|
|
108
|
+
if (segments.some((s) => s === "." || s === "..")) {
|
|
109
|
+
return { ok: false, problem: "dot-segment" };
|
|
110
|
+
}
|
|
111
|
+
return { ok: true, folder };
|
|
112
|
+
}
|
|
113
|
+
/** The grant terms for a folder: none for every folder. */
|
|
114
|
+
export function folderTerms(folder) {
|
|
115
|
+
return folder
|
|
116
|
+
? { crispScopes: [{ resource: folder, matcher: "path-prefix" }] }
|
|
117
|
+
: {};
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Combine the terms several fields chose. Folder scopes add up (a grant
|
|
121
|
+
* covers each of them); when more than one field sets a duration, the
|
|
122
|
+
* shortest wins, so combining terms never lengthens a grant.
|
|
123
|
+
*/
|
|
124
|
+
export function mergeGrantTerms(...parts) {
|
|
125
|
+
const merged = {};
|
|
126
|
+
for (const part of parts) {
|
|
127
|
+
if (part.notAfter !== undefined) {
|
|
128
|
+
merged.notAfter =
|
|
129
|
+
merged.notAfter === undefined
|
|
130
|
+
? part.notAfter
|
|
131
|
+
: Math.min(merged.notAfter, part.notAfter);
|
|
132
|
+
}
|
|
133
|
+
if (part.crispScopes?.length) {
|
|
134
|
+
merged.crispScopes = [...(merged.crispScopes ?? []), ...part.crispScopes];
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
return merged;
|
|
138
|
+
}
|
|
139
|
+
//# sourceMappingURL=terms.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terms.js","sourceRoot":"","sources":["../../src/grant/terms.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAUH,MAAM,MAAM,GAAG,EAAE,CAAC;AAClB,MAAM,IAAI,GAAG,EAAE,GAAG,MAAM,CAAC;AACzB,MAAM,GAAG,GAAG,EAAE,GAAG,IAAI,CAAC;AAEtB,6DAA6D;AAC7D,MAAM,CAAC,MAAM,gBAAgB,GAA8B,MAAM,CAAC,MAAM,CAAC;IACvE,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,GAAG,MAAM,EAAE;IAC7C,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,GAAG,MAAM,EAAE;IAC7C,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE;IAClC,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE;IACvC,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE;IACnC,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,GAAG,GAAG,EAAE;IACrC,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,GAAG,GAAG,EAAE;CACxC,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,GAAG,IAAI,CAAC;AAEjD;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CACnC,OAAkC,EAClC,UAAmB;IAEnB,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,CAC1B,CAAC,CAA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SAAS,EAAE,CAAC;YAChC,MAAM,CAAC,QAAQ;gBACb,MAAM,CAAC,QAAQ,KAAK,SAAS;oBAC3B,CAAC,CAAC,IAAI,CAAC,QAAQ;oBACf,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QACjD,CAAC;QACD,IAAI,IAAI,CAAC,WAAW,EAAE,MAAM,EAAE,CAAC;YAC7B,MAAM,CAAC,WAAW,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,WAAW,IAAI,EAAE,CAAC,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC;QAC5E,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,cAAc,kBAAkB,CAAC;AAGjC,cAAc,oBAAoB,CAAC;AAGnC,cAAc,sBAAsB,CAAC;AAGrC,cAAc,mBAAmB,CAAC;AAGlC,cAAc,uBAAuB,CAAC;AAGtC,cAAc,qBAAqB,CAAC;AAGpC,cAAc,sBAAsB,CAAC;AAGrC,OAAO,EACL,oBAAoB,EACpB,0BAA0B,GAC3B,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAG7D,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAG5B,cAAc,yBAAyB,CAAC;AAGxC,cAAc,kBAAkB,CAAC;AAGjC,cAAc,iBAAiB,CAAC;AAGhC,cAAc,kBAAkB,CAAC;AAGjC,cAAc,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,cAAc,kBAAkB,CAAC;AAGjC,cAAc,oBAAoB,CAAC;AAGnC,cAAc,sBAAsB,CAAC;AAGrC,cAAc,mBAAmB,CAAC;AAGlC,cAAc,uBAAuB,CAAC;AAGtC,cAAc,qBAAqB,CAAC;AAGpC,cAAc,sBAAsB,CAAC;AAGrC,OAAO,EACL,oBAAoB,EACpB,0BAA0B,GAC3B,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAG7D,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAG5B,cAAc,yBAAyB,CAAC;AAGxC,cAAc,kBAAkB,CAAC;AAGjC,cAAc,iBAAiB,CAAC;AAGhC,cAAc,kBAAkB,CAAC;AAGjC,cAAc,qBAAqB,CAAC;AAGpC,cAAc,kBAAkB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -35,4 +35,6 @@ export * from "./copy/index.js";
|
|
|
35
35
|
export * from "./popup/index.js";
|
|
36
36
|
// Re-export agent identity in the KYA-OS Entity Card shape
|
|
37
37
|
export * from "./identity/index.js";
|
|
38
|
+
// Re-export grant terms: a grant's duration and folder
|
|
39
|
+
export * from "./grant/index.js";
|
|
38
40
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,sBAAsB;AACtB,2EAA2E;AAC3E,cAAc,kBAAkB,CAAC;AAEjC,wBAAwB;AACxB,cAAc,oBAAoB,CAAC;AAEnC,0BAA0B;AAC1B,cAAc,sBAAsB,CAAC;AAErC,uBAAuB;AACvB,cAAc,mBAAmB,CAAC;AAElC,qCAAqC;AACrC,cAAc,uBAAuB,CAAC;AAEtC,m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,CAAC;AAEjC,2DAA2D;AAC3D,cAAc,qBAAqB,CAAC;AAEpC,uDAAuD;AACvD,cAAc,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inline.d.ts","sourceRoot":"","sources":["../../src/mcp-app/inline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,sEAAsE;AACtE,eAAO,MAAM,oBAAoB,EAAE,
|
|
1
|
+
{"version":3,"file":"inline.d.ts","sourceRoot":"","sources":["../../src/mcp-app/inline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,sEAAsE;AACtE,eAAO,MAAM,oBAAoB,EAAE,MAAg/h1B,CAAC;AAEphi1B,4CAA4C;AAC5C,eAAO,MAAM,yBAAyB,EAAE,MAAe,CAAC"}
|