@immediately-run/preauth-core 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/capabilities.d.ts +7 -6
- package/dist/capabilities.js +20 -5
- package/package.json +1 -1
package/dist/capabilities.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type CapabilityKind = 'read' | 'action';
|
|
2
2
|
export type CapabilityTier = 'baseline' | 'elevated' | 'first-party-only';
|
|
3
|
-
export type Capability = 'theme:read' | 'theme:set' | 'auth:status' | 'auth:identity' | 'route:read' | 'formFactor:read' | 'mounts:read' | 'spaces:app' | 'spaces:user' | 'spaces:admin' | 'settings:app' | 'settings:fork' | 'settings:all' | 'contribute:self' | 'contribute:any' | 'contribute:direct' | 'editor:read' | 'editor:open' | 'editor:write' | 'editor:document' | 'editor:requestEdit' | 'vcs:read' | 'vcs:reset' | 'dnd:source' | 'catalog:read' | 'commands:read' | 'commands:run' | 'ipc' | 'task:invoke' | 'net:fetch' | 'secrets:add' | 'secrets:list' | 'secrets:revoke' | 'agent:session' | 'diagnostics:read' | 'llm:chat' | 'authoring:run';
|
|
3
|
+
export type Capability = 'theme:read' | 'theme:set' | 'auth:status' | 'auth:identity' | 'route:read' | 'formFactor:read' | 'mounts:read' | 'mounts:registry' | 'spaces:app' | 'spaces:user' | 'spaces:admin' | 'settings:app' | 'settings:fork' | 'settings:all' | 'contribute:self' | 'contribute:any' | 'contribute:direct' | 'editor:read' | 'editor:open' | 'editor:write' | 'editor:document' | 'editor:requestEdit' | 'vcs:read' | 'vcs:reset' | 'dnd:source' | 'catalog:read' | 'commands:read' | 'commands:run' | 'ipc' | 'task:invoke' | 'net:fetch' | 'secrets:add' | 'secrets:list' | 'secrets:revoke' | 'agent:session' | 'diagnostics:read' | 'llm:chat' | 'authoring:run';
|
|
4
4
|
export interface CapabilityDef {
|
|
5
5
|
kind: CapabilityKind;
|
|
6
6
|
tier: CapabilityTier;
|
|
@@ -31,11 +31,12 @@ export interface CapabilityDef {
|
|
|
31
31
|
maximallyExplicit?: boolean;
|
|
32
32
|
}
|
|
33
33
|
export declare const CAPABILITIES: Record<Capability, CapabilityDef>;
|
|
34
|
-
/** The current registry/vocabulary version (§5.11). Bumped to 1.
|
|
35
|
-
* `
|
|
36
|
-
* R3-
|
|
37
|
-
* `llm:chat` slot; 1.2.0 added the per-user
|
|
38
|
-
|
|
34
|
+
/** The current registry/vocabulary version (§5.11). Bumped to 1.5.0 with the
|
|
35
|
+
* first-party-only `mounts:registry` capability (the PRINCIPALS §9 B2 Session-lens
|
|
36
|
+
* mount oracle — R3-95), mirroring capabilities.json. (1.4.0 added `authoring:run`;
|
|
37
|
+
* 1.3.0 added the provider-agnostic `llm:chat` slot; 1.2.0 added the per-user
|
|
38
|
+
* settings-space capabilities.) */
|
|
39
|
+
export declare const REGISTRY_VERSION = "1.5.0";
|
|
39
40
|
/** Is `cap` a known host-core capability? (Closed vocabulary — §5.12.) */
|
|
40
41
|
export declare function isKnownCapability(cap: string): cap is Capability;
|
|
41
42
|
export declare function tierOf(cap: Capability): CapabilityTier;
|
package/dist/capabilities.js
CHANGED
|
@@ -25,6 +25,20 @@ exports.CAPABILITIES = {
|
|
|
25
25
|
'route:read': { kind: 'read', tier: 'baseline', since: '1.0.0' },
|
|
26
26
|
'formFactor:read': { kind: 'read', tier: 'baseline', since: '1.0.0' },
|
|
27
27
|
'mounts:read': { kind: 'read', tier: 'baseline', since: '1.0.0' },
|
|
28
|
+
// Enumerate the session's mounts BEYOND the app's own — the Session-lens
|
|
29
|
+
// "App | Session" superset (PRINCIPALS_SPEC §9 B2 / §8.9.1 / D-PRIN-4). Where
|
|
30
|
+
// `mounts:read` is a per-app filter (own mounts only, baseline), this is the
|
|
31
|
+
// cross-scope registry oracle: it reveals mounts the previewed app was never
|
|
32
|
+
// granted (the editor/agent session's own), so it is an activity oracle exactly
|
|
33
|
+
// like `settings:all`. **Permanently first-party-only:** a URL-loaded/previewed
|
|
34
|
+
// fork of the File Explorer may hold the App lens (`mounts:read`) but NEVER the
|
|
35
|
+
// Session lens — `buildConsent` refuses a first-party-only cap to a non-first-
|
|
36
|
+
// party binding regardless of consent, `overridePolicy` strips it on a repoint
|
|
37
|
+
// (D-PRIN-4 rejected both a forkable Session lens and a separate "session lens"
|
|
38
|
+
// capability: this IS the settled `mounts:registry`, a view selector over the
|
|
39
|
+
// mount registry, not a new power). Read kind — it gates the first-party
|
|
40
|
+
// `session-mounts` push channel (§8.3 view() projection).
|
|
41
|
+
'mounts:registry': { kind: 'read', tier: 'first-party-only', since: '1.5.0' },
|
|
28
42
|
'spaces:app': { kind: 'action', tier: 'baseline', since: '1.0.0', parameterized: true },
|
|
29
43
|
'spaces:user': { kind: 'action', tier: 'elevated', since: '1.0.0' },
|
|
30
44
|
'spaces:admin': { kind: 'action', tier: 'elevated', since: '1.0.0' },
|
|
@@ -194,11 +208,12 @@ exports.CAPABILITIES = {
|
|
|
194
208
|
// input-size). Not app-scoped: it confers no authority over other apps/mounts.
|
|
195
209
|
'authoring:run': { kind: 'action', tier: 'baseline', since: '1.4.0' },
|
|
196
210
|
};
|
|
197
|
-
/** The current registry/vocabulary version (§5.11). Bumped to 1.
|
|
198
|
-
* `
|
|
199
|
-
* R3-
|
|
200
|
-
* `llm:chat` slot; 1.2.0 added the per-user
|
|
201
|
-
|
|
211
|
+
/** The current registry/vocabulary version (§5.11). Bumped to 1.5.0 with the
|
|
212
|
+
* first-party-only `mounts:registry` capability (the PRINCIPALS §9 B2 Session-lens
|
|
213
|
+
* mount oracle — R3-95), mirroring capabilities.json. (1.4.0 added `authoring:run`;
|
|
214
|
+
* 1.3.0 added the provider-agnostic `llm:chat` slot; 1.2.0 added the per-user
|
|
215
|
+
* settings-space capabilities.) */
|
|
216
|
+
exports.REGISTRY_VERSION = '1.5.0';
|
|
202
217
|
/** Is `cap` a known host-core capability? (Closed vocabulary — §5.12.) */
|
|
203
218
|
function isKnownCapability(cap) {
|
|
204
219
|
return Object.prototype.hasOwnProperty.call(exports.CAPABILITIES, cap);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@immediately-run/preauth-core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "The shared §8.9 pre-auth target check + the single grant-mint path (mintConsentedGrants) + the capability vocabulary + the byte-faithful grant/space/net-fetch document layout. Consumed by site-main (browser Firestore) and the backend (admin Firestore) so there is ONE gate, ONE mint path, ONE wire layout.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"repository": {
|