@immediately-run/preauth-core 0.1.1 → 0.1.2
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 +5 -5
- package/dist/capabilities.js +13 -4
- 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';
|
|
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';
|
|
4
4
|
export interface CapabilityDef {
|
|
5
5
|
kind: CapabilityKind;
|
|
6
6
|
tier: CapabilityTier;
|
|
@@ -27,10 +27,10 @@ export interface CapabilityDef {
|
|
|
27
27
|
maximallyExplicit?: boolean;
|
|
28
28
|
}
|
|
29
29
|
export declare const CAPABILITIES: Record<Capability, CapabilityDef>;
|
|
30
|
-
/** The current registry/vocabulary version (§5.11). Bumped to 1.
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
export declare const REGISTRY_VERSION = "1.
|
|
30
|
+
/** The current registry/vocabulary version (§5.11). Bumped to 1.3.0 with the
|
|
31
|
+
* provider-agnostic `llm:chat` capability (the `llm.chat@1` slot), mirroring
|
|
32
|
+
* capabilities.json. (1.2.0 added the per-user settings-space capabilities.) */
|
|
33
|
+
export declare const REGISTRY_VERSION = "1.3.0";
|
|
34
34
|
/** Is `cap` a known kernel capability? (Closed vocabulary — §5.12.) */
|
|
35
35
|
export declare function isKnownCapability(cap: string): cap is Capability;
|
|
36
36
|
export declare function tierOf(cap: Capability): CapabilityTier;
|
package/dist/capabilities.js
CHANGED
|
@@ -170,11 +170,20 @@ exports.CAPABILITIES = {
|
|
|
170
170
|
// consent line, D4); read-only and scoped to the paired previewed app's own
|
|
171
171
|
// diagnostics (no cross-app bleed — enforced host-side by the channel projection).
|
|
172
172
|
'diagnostics:read': { kind: 'action', tier: 'elevated', since: '1.2.0', appScoped: true },
|
|
173
|
+
// SERVICE_PROVIDERS_SPEC `llm.chat@1` / LLM_AND_AGENTS_SPEC D5: invoke the shared,
|
|
174
|
+
// provider-agnostic chat slot. The app calls ONE slot; the host resolves which
|
|
175
|
+
// vendor answers from the key the user holds (`SecretView.boundOrigin`) + their
|
|
176
|
+
// `preferredImplementation` choice, injects the key host-side (§6, look-at-nothing
|
|
177
|
+
// proxy), and streams normalized deltas back. The app never names a vendor, never
|
|
178
|
+
// sees the key, and needs NO `net:fetch`/`secrets` grant of its own — only this.
|
|
179
|
+
// Elevated + app-scoped: a fork/previewed app EARNS it via lazy/manifest consent
|
|
180
|
+
// (the fork-needs-more-caps story), recorded as a per-(user,appKey) §8.15 grant.
|
|
181
|
+
'llm:chat': { kind: 'action', tier: 'elevated', since: '1.3.0', appScoped: true },
|
|
173
182
|
};
|
|
174
|
-
/** The current registry/vocabulary version (§5.11). Bumped to 1.
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
exports.REGISTRY_VERSION = '1.
|
|
183
|
+
/** The current registry/vocabulary version (§5.11). Bumped to 1.3.0 with the
|
|
184
|
+
* provider-agnostic `llm:chat` capability (the `llm.chat@1` slot), mirroring
|
|
185
|
+
* capabilities.json. (1.2.0 added the per-user settings-space capabilities.) */
|
|
186
|
+
exports.REGISTRY_VERSION = '1.3.0';
|
|
178
187
|
/** Is `cap` a known kernel capability? (Closed vocabulary — §5.12.) */
|
|
179
188
|
function isKnownCapability(cap) {
|
|
180
189
|
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.2",
|
|
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": {
|