@tinycloud/operations 0.3.4-beta.6 → 0.4.0-beta.8

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.
@@ -0,0 +1,30 @@
1
+ import { PermissionEntry } from '@tinycloud/sdk-core';
2
+
3
+ /**
4
+ * A capability in the canonical form persisted in a v1 request artifact.
5
+ *
6
+ * The SDK remains the semantic authority for containment. This module only
7
+ * establishes deterministic exact identity for persistence and display.
8
+ */
9
+ type CanonicalPermissionEntry = Readonly<PermissionEntry>;
10
+ interface AuthorityEvaluation {
11
+ readonly satisfied: boolean;
12
+ readonly missing: readonly CanonicalPermissionEntry[];
13
+ }
14
+ /**
15
+ * Operation-owned space resolution. The SDK's general capability evaluator
16
+ * intentionally preserves its historical short/full-space compatibility; the
17
+ * operation kernel supplies this narrower resolver when a space identifies a
18
+ * remote owner's resource.
19
+ */
20
+ type OperationSpaceResolver = (space: string) => string;
21
+ /**
22
+ * Evaluates required authority with the SDK's public subset primitive.
23
+ *
24
+ * In particular, this intentionally does not implement matching rules or
25
+ * manufacture wildcards. A wildcard can cover a requirement only when it was
26
+ * already present in the supplied granted authority and the SDK says so.
27
+ */
28
+ declare function evaluateAuthority(granted: readonly PermissionEntry[], required: readonly PermissionEntry[]): AuthorityEvaluation;
29
+
30
+ export { type OperationSpaceResolver as O, evaluateAuthority as e };
@@ -0,0 +1,30 @@
1
+ import { PermissionEntry } from '@tinycloud/sdk-core';
2
+
3
+ /**
4
+ * A capability in the canonical form persisted in a v1 request artifact.
5
+ *
6
+ * The SDK remains the semantic authority for containment. This module only
7
+ * establishes deterministic exact identity for persistence and display.
8
+ */
9
+ type CanonicalPermissionEntry = Readonly<PermissionEntry>;
10
+ interface AuthorityEvaluation {
11
+ readonly satisfied: boolean;
12
+ readonly missing: readonly CanonicalPermissionEntry[];
13
+ }
14
+ /**
15
+ * Operation-owned space resolution. The SDK's general capability evaluator
16
+ * intentionally preserves its historical short/full-space compatibility; the
17
+ * operation kernel supplies this narrower resolver when a space identifies a
18
+ * remote owner's resource.
19
+ */
20
+ type OperationSpaceResolver = (space: string) => string;
21
+ /**
22
+ * Evaluates required authority with the SDK's public subset primitive.
23
+ *
24
+ * In particular, this intentionally does not implement matching rules or
25
+ * manufacture wildcards. A wildcard can cover a requirement only when it was
26
+ * already present in the supplied granted authority and the SDK says so.
27
+ */
28
+ declare function evaluateAuthority(granted: readonly PermissionEntry[], required: readonly PermissionEntry[]): AuthorityEvaluation;
29
+
30
+ export { type OperationSpaceResolver as O, evaluateAuthority as e };