@immediately-run/preauth-core 0.1.3 → 0.1.5
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 +6 -5
- package/dist/capabilities.js +12 -4
- package/dist/docLayout.d.ts +0 -4
- package/dist/docLayout.js +1 -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';
|
|
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';
|
|
4
4
|
export interface CapabilityDef {
|
|
5
5
|
kind: CapabilityKind;
|
|
6
6
|
tier: CapabilityTier;
|
|
@@ -31,10 +31,11 @@ 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
|
-
* capabilities.json. (1.
|
|
37
|
-
|
|
34
|
+
/** The current registry/vocabulary version (§5.11). Bumped to 1.4.0 with the
|
|
35
|
+
* `authoring:run` capability (the kernel authoring services — CLIENT_SERVICES §6,
|
|
36
|
+
* R3-107), mirroring capabilities.json. (1.3.0 added the provider-agnostic
|
|
37
|
+
* `llm:chat` slot; 1.2.0 added the per-user settings-space capabilities.) */
|
|
38
|
+
export declare const REGISTRY_VERSION = "1.4.0";
|
|
38
39
|
/** Is `cap` a known host-core capability? (Closed vocabulary — §5.12.) */
|
|
39
40
|
export declare function isKnownCapability(cap: string): cap is Capability;
|
|
40
41
|
export declare function tierOf(cap: Capability): CapabilityTier;
|
package/dist/capabilities.js
CHANGED
|
@@ -186,11 +186,19 @@ exports.CAPABILITIES = {
|
|
|
186
186
|
// Elevated + app-scoped: a fork/previewed app EARNS it via lazy/manifest consent
|
|
187
187
|
// (the fork-needs-more-caps story), recorded as a per-(user,appKey) §8.15 grant.
|
|
188
188
|
'llm:chat': { kind: 'action', tier: 'elevated', since: '1.3.0', appScoped: true },
|
|
189
|
+
// Authoring services (CLIENT_SERVICES_SPEC §6, R3-107): typecheck/lint/format
|
|
190
|
+
// source via a kernel-owned same-origin worker (the in-browser coding agent's
|
|
191
|
+
// quality tools, LLM_AND_AGENTS §3.3). Baseline action — the worker only
|
|
192
|
+
// transforms data the app already holds and returns diagnostics, runs under host
|
|
193
|
+
// authority with nothing to confine (§3a), and is bounded per call (timeout +
|
|
194
|
+
// input-size). Not app-scoped: it confers no authority over other apps/mounts.
|
|
195
|
+
'authoring:run': { kind: 'action', tier: 'baseline', since: '1.4.0' },
|
|
189
196
|
};
|
|
190
|
-
/** The current registry/vocabulary version (§5.11). Bumped to 1.
|
|
191
|
-
*
|
|
192
|
-
* capabilities.json. (1.
|
|
193
|
-
|
|
197
|
+
/** The current registry/vocabulary version (§5.11). Bumped to 1.4.0 with the
|
|
198
|
+
* `authoring:run` capability (the kernel authoring services — CLIENT_SERVICES §6,
|
|
199
|
+
* R3-107), mirroring capabilities.json. (1.3.0 added the provider-agnostic
|
|
200
|
+
* `llm:chat` slot; 1.2.0 added the per-user settings-space capabilities.) */
|
|
201
|
+
exports.REGISTRY_VERSION = '1.4.0';
|
|
194
202
|
/** Is `cap` a known host-core capability? (Closed vocabulary — §5.12.) */
|
|
195
203
|
function isKnownCapability(cap) {
|
|
196
204
|
return Object.prototype.hasOwnProperty.call(exports.CAPABILITIES, cap);
|
package/dist/docLayout.d.ts
CHANGED
|
@@ -23,10 +23,6 @@ export declare const GRANT_EXPIRY_MS: number;
|
|
|
23
23
|
* RENAME-1). The stored Firestore path segment is a doc-ID, not a field literally
|
|
24
24
|
* named `principal`, so this rename is code-symbol-only — no data migration. */
|
|
25
25
|
export declare const granteeId: (uid: string) => string;
|
|
26
|
-
/** @deprecated use {@link granteeId}. Kept as an alias for the `userPrincipal →
|
|
27
|
-
* granteeId` migration (the SDK + site-main + backend RENAME-1 track); removed once
|
|
28
|
-
* consumers migrate. */
|
|
29
|
-
export declare const userPrincipal: (uid: string) => string;
|
|
30
26
|
/** Drop undefined values — Firestore rejects them. The two adapters historically
|
|
31
27
|
* each had their own copy of this; sharing it keeps the "omit absent optionals"
|
|
32
28
|
* rule identical on both sides. */
|
package/dist/docLayout.js
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
// `.set()`/`.update()` is the only thing each adapter does itself. Drift is then
|
|
17
17
|
// impossible without editing a helper both consume.
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.netFetchGrantFields = exports.mergeNetFetchHosts = exports.appSpaceGrantFields = exports.appKeyTouchFields = exports.appCountFields = exports.userCountFields = exports.ownerUserSpaceFields = exports.ownerMemberFields = exports.spaceDocFields = exports.appCountPath = exports.userCountPath = exports.appSpacePath = exports.appKeyPath = exports.userSpacePath = exports.memberPath = exports.spacePath = exports.defined = exports.
|
|
19
|
+
exports.netFetchGrantFields = exports.mergeNetFetchHosts = exports.appSpaceGrantFields = exports.appKeyTouchFields = exports.appCountFields = exports.userCountFields = exports.ownerUserSpaceFields = exports.ownerMemberFields = exports.spaceDocFields = exports.appCountPath = exports.userCountPath = exports.appSpacePath = exports.appKeyPath = exports.userSpacePath = exports.memberPath = exports.spacePath = exports.defined = exports.granteeId = exports.GRANT_EXPIRY_MS = exports.grantKey = void 0;
|
|
20
20
|
/** Stable per-user identifier for a grant `(appKey, spaceId)`, used as the value
|
|
21
21
|
* of a delegated grant's `parentGrantId`. `::` is delimiter-safe: `appKey` uses
|
|
22
22
|
* `__` separators and a Firestore `spaceId` is alphanumeric. */
|
|
@@ -33,10 +33,6 @@ exports.GRANT_EXPIRY_MS = 90 * 24 * 60 * 60 * 1000;
|
|
|
33
33
|
* named `principal`, so this rename is code-symbol-only — no data migration. */
|
|
34
34
|
const granteeId = (uid) => `user:${uid}`;
|
|
35
35
|
exports.granteeId = granteeId;
|
|
36
|
-
/** @deprecated use {@link granteeId}. Kept as an alias for the `userPrincipal →
|
|
37
|
-
* granteeId` migration (the SDK + site-main + backend RENAME-1 track); removed once
|
|
38
|
-
* consumers migrate. */
|
|
39
|
-
exports.userPrincipal = exports.granteeId;
|
|
40
36
|
/** Drop undefined values — Firestore rejects them. The two adapters historically
|
|
41
37
|
* each had their own copy of this; sharing it keeps the "omit absent optionals"
|
|
42
38
|
* rule identical on both sides. */
|
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.5",
|
|
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": {
|