@astrale-os/kernel-client 1.0.0-beta.42 → 1.0.0-beta.44
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.
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { NodePath, PathLike } from '@astrale-os/kernel-core/path';
|
|
1
|
+
import type { NodePath, NodeTarget, PathLike } from '@astrale-os/kernel-core/path';
|
|
3
2
|
import type { PolicyRef } from '@astrale-os/kernel-dsl/v1';
|
|
4
3
|
import type { RequestOptions } from '../transport/index.js';
|
|
5
4
|
import type { AuthCall } from './auth.js';
|
|
6
5
|
export interface PolicyDecisionInput {
|
|
7
6
|
readonly policy: PathLike | PolicyRef;
|
|
8
|
-
|
|
7
|
+
/** The observed Node: its ID, or a Path or DefinitionRef the Kernel resolves on its Registry. */
|
|
8
|
+
readonly object: NodeTarget;
|
|
9
9
|
}
|
|
10
10
|
export declare const IDENTITY_CAN_PATH: NodePath;
|
|
11
11
|
export declare function authorizationApi(call: AuthCall): Readonly<{
|
|
@@ -28,7 +28,11 @@ function isBatch(input) {
|
|
|
28
28
|
return Array.isArray(input);
|
|
29
29
|
}
|
|
30
30
|
function check(input) {
|
|
31
|
-
return Object.freeze({ policy: policyPath(input.policy), object: input.object });
|
|
31
|
+
return Object.freeze({ policy: policyPath(input.policy), object: objectTarget(input.object) });
|
|
32
|
+
}
|
|
33
|
+
/** Text is already its wire form; a rich target serializes to its canonical Path. */
|
|
34
|
+
function objectTarget(input) {
|
|
35
|
+
return typeof input === 'string' ? input : Path.target(input).raw;
|
|
32
36
|
}
|
|
33
37
|
function policyPath(input) {
|
|
34
38
|
return input instanceof Path || typeof input === 'string'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrale-os/kernel-client",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.44",
|
|
4
4
|
"description": "Universal Client — protocol-first, transport-agnostic",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"astrale",
|
|
@@ -65,13 +65,13 @@
|
|
|
65
65
|
"access": "public"
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@astrale-os/kernel-core": "1.0.0-beta.
|
|
69
|
-
"@astrale-os/kernel-dsl": "1.0.0-beta.
|
|
70
|
-
"@astrale-os/kernel-protocol": "1.0.0-beta.
|
|
68
|
+
"@astrale-os/kernel-core": "1.0.0-beta.41",
|
|
69
|
+
"@astrale-os/kernel-dsl": "1.0.0-beta.29",
|
|
70
|
+
"@astrale-os/kernel-protocol": "1.0.0-beta.41",
|
|
71
71
|
"@tanstack/pacer": "0.20.1"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
|
-
"@astrale-os/kernel-server": "1.0.0-beta.
|
|
74
|
+
"@astrale-os/kernel-server": "1.0.0-beta.41",
|
|
75
75
|
"@astrale/typescript-config": "npm:@jsr/astrale__typescript-config@~1.1.0",
|
|
76
76
|
"@types/node": "^24.10.0",
|
|
77
77
|
"esbuild": "0.28.1",
|