@immediately-run/preauth-core 0.1.13 → 0.1.14
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 +2 -2
- package/dist/capabilities.js +18 -1
- 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' | 'chrome: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' | 'feed:fetch' | 'secrets:add' | 'secrets:list' | 'secrets:revoke' | 'agent:session' | 'diagnostics:read' | 'llm:chat' | 'authoring:run' | 'analytics:emit';
|
|
3
|
+
export type Capability = 'theme:read' | 'theme:set' | 'auth:status' | 'auth:identity' | 'route:read' | 'formFactor:read' | 'chrome: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:reveal' | 'editor:write' | 'editor:document' | 'editor:requestEdit' | 'vcs:read' | 'vcs:reset' | 'dnd:source' | 'catalog:read' | 'commands:read' | 'commands:run' | 'ipc' | 'task:invoke' | 'net:fetch' | 'feed:fetch' | 'secrets:add' | 'secrets:list' | 'secrets:revoke' | 'agent:session' | 'diagnostics:read' | 'llm:chat' | 'authoring:run' | 'analytics:emit';
|
|
4
4
|
export interface CapabilityDef {
|
|
5
5
|
kind: CapabilityKind;
|
|
6
6
|
tier: CapabilityTier;
|
|
@@ -45,7 +45,7 @@ export declare const CAPABILITIES: Record<Capability, CapabilityDef>;
|
|
|
45
45
|
* A host older than 1.8.0 therefore refuses a binding that requests `feed:fetch` (T26)
|
|
46
46
|
* rather than mounting half-working, which is the right outcome: a host that cannot
|
|
47
47
|
* enforce target-fixing must not run a connector that assumes it. */
|
|
48
|
-
export declare const REGISTRY_VERSION = "1.
|
|
48
|
+
export declare const REGISTRY_VERSION = "1.9.0";
|
|
49
49
|
/** Is `cap` a known host-core capability? (Closed vocabulary — §5.12.) */
|
|
50
50
|
export declare function isKnownCapability(cap: string): cap is Capability;
|
|
51
51
|
export declare function tierOf(cap: Capability): CapabilityTier;
|
package/dist/capabilities.js
CHANGED
|
@@ -74,6 +74,23 @@ exports.CAPABILITIES = {
|
|
|
74
74
|
// validates the path and drives Sandpack. Elevated — it moves the host's focus,
|
|
75
75
|
// so a previewed app must not hold it; only a consented/build-default binding.
|
|
76
76
|
'editor:open': { kind: 'action', tier: 'elevated', since: '1.0.0' },
|
|
77
|
+
// Bring the user TO the editor across an activity boundary (R3-389,
|
|
78
|
+
// TOOLS_ACTIVITY_SPEC §5.2). Strictly more than `editor:open`, which opens a file
|
|
79
|
+
// in whatever column the editor already occupies: an activity that owns the main
|
|
80
|
+
// pane UNMOUNTS the editor, so a surface there must be able to switch the active
|
|
81
|
+
// activity for its click to be visible at all.
|
|
82
|
+
//
|
|
83
|
+
// That is an attention move, so it is the parameterized ESCALATION of `open`
|
|
84
|
+
// (§8.4): `open({ reveal: true })` requires THIS instead of `editor:open`, and a
|
|
85
|
+
// frame holding only `editor:open` is refused rather than silently downgraded to a
|
|
86
|
+
// no-op reveal (T11).
|
|
87
|
+
//
|
|
88
|
+
// Elevated, and it buys no new REACH — the caller names a path, never an activity;
|
|
89
|
+
// the host resolves which activity owns the editor from its own state, reads its
|
|
90
|
+
// OWN `navigator.userActivation` (an app cannot forge it, and the gate fails closed
|
|
91
|
+
// without it), and rate-limits. The authority is "may ask", not "may decide where
|
|
92
|
+
// the user goes".
|
|
93
|
+
'editor:reveal': { kind: 'action', tier: 'elevated', since: '1.9.0' },
|
|
77
94
|
// Mutate the editor session's working tree — create/delete/rename/upload a file
|
|
78
95
|
// (migrate-sidebars Phase 04, EDITOR_AS_APP_SPEC §5.2). A NARROW, per-path gated
|
|
79
96
|
// action: the file explorer NAMES a path and the HOST performs the COW write
|
|
@@ -275,7 +292,7 @@ exports.CAPABILITIES = {
|
|
|
275
292
|
* A host older than 1.8.0 therefore refuses a binding that requests `feed:fetch` (T26)
|
|
276
293
|
* rather than mounting half-working, which is the right outcome: a host that cannot
|
|
277
294
|
* enforce target-fixing must not run a connector that assumes it. */
|
|
278
|
-
exports.REGISTRY_VERSION = '1.
|
|
295
|
+
exports.REGISTRY_VERSION = '1.9.0';
|
|
279
296
|
/** Is `cap` a known host-core capability? (Closed vocabulary — §5.12.) */
|
|
280
297
|
function isKnownCapability(cap) {
|
|
281
298
|
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.14",
|
|
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": {
|