@north-light/identity 0.3.485 → 0.3.486
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 +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -70,6 +70,7 @@ The grammar `parseScope` accepts:
|
|
|
70
70
|
|---|---|
|
|
71
71
|
| `crtr:llm`, `crtr:act`, `crtr:schedule` | Model calls and starting runs; acting on nodes, files and bash; scheduling crons |
|
|
72
72
|
| `crtr:memory:read:user[:path]`, `crtr:memory:rw:user[:path]`, `crtr:memory:manage:user` | The person's documents, optionally limited to a path; `manage` covers both access levels |
|
|
73
|
+
| `crtr:memory:read_private:user` | Read-only access to `public` and `private` documents, never `friends`; no path; covered by `manage`, covers only itself |
|
|
73
74
|
| `crtr:memory:read\|rw:app:<id>[:profile:<profile>[:path]]` | An app's documents |
|
|
74
75
|
| `crtr:files:read\|rw:user:<dir>`, `crtr:files:read\|rw:app:<id>:<dir>`, `crtr:files:share` | Host files a run may mount, and sharing them |
|
|
75
76
|
| `crtr:conversations:read:app:<id>`, `crtr:objects:read:app:<id>` | Reading another app's conversations or node objects |
|
package/dist/index.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export interface IdTokenClaims extends JWTPayload {
|
|
|
22
22
|
family_name?: string;
|
|
23
23
|
picture?: string;
|
|
24
24
|
}
|
|
25
|
-
export type Scope = 'crtr:llm' | 'crtr:act' | 'crtr:schedule' | `crtr:memory:${'read' | 'rw'}:user${'' | `:${string}`}` | 'crtr:memory:manage:user' | `crtr:memory:${'read' | 'rw'}:app:${string}` | `crtr:files:${'read' | 'rw'}:${'user' | `app:${string}`}:${string}` | 'crtr:files:share' | `crtr:${'conversations' | 'objects'}:read:app:${string}` | `crtr:objects:${'message' | 'spawn'}:app:${string}` | `crtr:objects:${'read' | 'watch' | 'link' | 'write'}:${'user' | 'node' | `profile:${string}` | `app:${string}`}` | `crtr:peer:${string}` | `${string}:${string}`;
|
|
25
|
+
export type Scope = 'crtr:llm' | 'crtr:act' | 'crtr:schedule' | `crtr:memory:${'read' | 'rw'}:user${'' | `:${string}`}` | 'crtr:memory:manage:user' | 'crtr:memory:read_private:user' | `crtr:memory:${'read' | 'rw'}:app:${string}` | `crtr:files:${'read' | 'rw'}:${'user' | `app:${string}`}:${string}` | 'crtr:files:share' | `crtr:${'conversations' | 'objects'}:read:app:${string}` | `crtr:objects:${'message' | 'spawn'}:app:${string}` | `crtr:objects:${'read' | 'watch' | 'link' | 'write'}:${'user' | 'node' | `profile:${string}` | `app:${string}`}` | `crtr:peer:${string}` | `${string}:${string}`;
|
|
26
26
|
/** App-memory form keys omit the app id. */
|
|
27
27
|
export declare const ENFORCED: ReadonlySet<string>;
|
|
28
28
|
export declare function parseScope(value: string, grantee?: string): Scope;
|
package/dist/index.js
CHANGED
|
@@ -21,6 +21,9 @@ function selector(value) {
|
|
|
21
21
|
return { kind: 'share', value };
|
|
22
22
|
if (value === 'crtr:memory:manage:user')
|
|
23
23
|
return { kind: 'memory', access: 'manage', holder: 'user' };
|
|
24
|
+
// Read-only access to the person's `public` and `private` memory (never `friends`). It names no document path.
|
|
25
|
+
if (value === 'crtr:memory:read_private:user')
|
|
26
|
+
return { kind: 'memory', access: 'read_private', holder: 'user' };
|
|
24
27
|
let match = /^crtr:memory:(read|rw):user(?::(.+))?$/.exec(value);
|
|
25
28
|
if (match && (match[2] === undefined || validPath(match[2])))
|
|
26
29
|
return { kind: 'memory', access: match[1], holder: 'user', path: match[2] };
|