@astrale-os/cli 1.0.0-beta.10 → 1.0.0-beta.12

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.
@@ -14,42 +14,13 @@ export declare const DEFAULT_ADMIN_TARGET_CONFIG: {
14
14
  kernelIssuer: string;
15
15
  domainIssuer: string;
16
16
  };
17
- export declare const AdminTargetConfigSchema: z.ZodEffects<z.ZodObject<{
18
- /** Friendly name / auth registration slug for direct URL admin targets. */
17
+ export declare const AdminTargetConfigSchema: z.ZodObject<{
19
18
  name: z.ZodOptional<z.ZodString>;
20
- /** Direct admin kernel URL. */
21
- url: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
22
- /** Kernel issuer / JWT audience when different from url. */
23
- kernelIssuer: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
24
- /** Exact native Admin Domain issuer used by the standard token exchange. */
25
- domainIssuer: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
26
- /** Bookmark name for the admin kernel. */
19
+ url: z.ZodOptional<z.ZodString>;
20
+ kernelIssuer: z.ZodOptional<z.ZodString>;
21
+ domainIssuer: z.ZodOptional<z.ZodString>;
27
22
  instance: z.ZodOptional<z.ZodString>;
28
- }, "strip", z.ZodTypeAny, {
29
- name?: string | undefined;
30
- url?: string | undefined;
31
- kernelIssuer?: string | undefined;
32
- domainIssuer?: string | undefined;
33
- instance?: string | undefined;
34
- }, {
35
- name?: string | undefined;
36
- url?: string | undefined;
37
- kernelIssuer?: string | undefined;
38
- domainIssuer?: string | undefined;
39
- instance?: string | undefined;
40
- }>, {
41
- name?: string | undefined;
42
- url?: string | undefined;
43
- kernelIssuer?: string | undefined;
44
- domainIssuer?: string | undefined;
45
- instance?: string | undefined;
46
- }, {
47
- name?: string | undefined;
48
- url?: string | undefined;
49
- kernelIssuer?: string | undefined;
50
- domainIssuer?: string | undefined;
51
- instance?: string | undefined;
52
- }>;
23
+ }, z.core.$strip>;
53
24
  export type AdminTargetConfig = z.infer<typeof AdminTargetConfigSchema>;
54
25
  export type AdminTargetCommandOpts = {
55
26
  admin?: string;
@@ -1,69 +1,17 @@
1
1
  import { z } from 'zod';
2
2
  export declare const AstraleConfigSchema: z.ZodObject<{
3
3
  issuer: z.ZodDefault<z.ZodString>;
4
- admin: z.ZodDefault<z.ZodEffects<z.ZodObject<{
4
+ admin: z.ZodDefault<z.ZodObject<{
5
5
  name: z.ZodOptional<z.ZodString>;
6
- url: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
7
- kernelIssuer: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
8
- domainIssuer: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
6
+ url: z.ZodOptional<z.ZodString>;
7
+ kernelIssuer: z.ZodOptional<z.ZodString>;
8
+ domainIssuer: z.ZodOptional<z.ZodString>;
9
9
  instance: z.ZodOptional<z.ZodString>;
10
- }, "strip", z.ZodTypeAny, {
11
- name?: string | undefined;
12
- url?: string | undefined;
13
- kernelIssuer?: string | undefined;
14
- domainIssuer?: string | undefined;
15
- instance?: string | undefined;
16
- }, {
17
- name?: string | undefined;
18
- url?: string | undefined;
19
- kernelIssuer?: string | undefined;
20
- domainIssuer?: string | undefined;
21
- instance?: string | undefined;
22
- }>, {
23
- name?: string | undefined;
24
- url?: string | undefined;
25
- kernelIssuer?: string | undefined;
26
- domainIssuer?: string | undefined;
27
- instance?: string | undefined;
28
- }, {
29
- name?: string | undefined;
30
- url?: string | undefined;
31
- kernelIssuer?: string | undefined;
32
- domainIssuer?: string | undefined;
33
- instance?: string | undefined;
34
- }>>;
10
+ }, z.core.$strip>>;
35
11
  telemetry: z.ZodDefault<z.ZodObject<{
36
12
  enabled: z.ZodDefault<z.ZodBoolean>;
37
- }, "strip", z.ZodTypeAny, {
38
- enabled: boolean;
39
- }, {
40
- enabled?: boolean | undefined;
41
- }>>;
42
- }, "strip", z.ZodTypeAny, {
43
- issuer: string;
44
- admin: {
45
- name?: string | undefined;
46
- url?: string | undefined;
47
- kernelIssuer?: string | undefined;
48
- domainIssuer?: string | undefined;
49
- instance?: string | undefined;
50
- };
51
- telemetry: {
52
- enabled: boolean;
53
- };
54
- }, {
55
- issuer?: string | undefined;
56
- admin?: {
57
- name?: string | undefined;
58
- url?: string | undefined;
59
- kernelIssuer?: string | undefined;
60
- domainIssuer?: string | undefined;
61
- instance?: string | undefined;
62
- } | undefined;
63
- telemetry?: {
64
- enabled?: boolean | undefined;
65
- } | undefined;
66
- }>;
13
+ }, z.core.$strip>>;
14
+ }, z.core.$strip>;
67
15
  export type AstraleConfig = z.infer<typeof AstraleConfigSchema>;
68
16
  export declare const DEFAULT_CONFIG: AstraleConfig;
69
17
  export declare function readConfig(): Promise<AstraleConfig>;
@@ -47,114 +47,47 @@ export declare const OidcMetadataSchema: z.ZodObject<{
47
47
  jwks_uri: z.ZodString;
48
48
  device_authorization_endpoint: z.ZodOptional<z.ZodString>;
49
49
  revocation_endpoint: z.ZodOptional<z.ZodString>;
50
- scopes_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
51
- grant_types_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
52
- response_types_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
53
- code_challenge_methods_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
54
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
55
- issuer: z.ZodString;
56
- authorization_endpoint: z.ZodOptional<z.ZodString>;
57
- token_endpoint: z.ZodString;
58
- jwks_uri: z.ZodString;
59
- device_authorization_endpoint: z.ZodOptional<z.ZodString>;
60
- revocation_endpoint: z.ZodOptional<z.ZodString>;
61
- scopes_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
62
- grant_types_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
63
- response_types_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
64
- code_challenge_methods_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
65
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
66
- issuer: z.ZodString;
67
- authorization_endpoint: z.ZodOptional<z.ZodString>;
68
- token_endpoint: z.ZodString;
69
- jwks_uri: z.ZodString;
70
- device_authorization_endpoint: z.ZodOptional<z.ZodString>;
71
- revocation_endpoint: z.ZodOptional<z.ZodString>;
72
- scopes_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
73
- grant_types_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
74
- response_types_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
75
- code_challenge_methods_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
76
- }, z.ZodTypeAny, "passthrough">>;
50
+ scopes_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
51
+ grant_types_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
52
+ response_types_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
53
+ code_challenge_methods_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
54
+ }, z.core.$loose>;
77
55
  export type OidcMetadata = z.infer<typeof OidcMetadataSchema>;
78
56
  export declare const IdpClientConfigSchema: z.ZodObject<{
79
57
  client_id: z.ZodOptional<z.ZodString>;
80
58
  client_secret_env: z.ZodOptional<z.ZodString>;
81
- redirect_uris: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
82
- scope: z.ZodOptional<z.ZodString>;
83
- public: z.ZodOptional<z.ZodBoolean>;
84
- token_response: z.ZodOptional<z.ZodEnum<["oauth", "workos-authkit"]>>;
85
- token_request_format: z.ZodOptional<z.ZodEnum<["form", "json"]>>;
86
- workos_application_id: z.ZodOptional<z.ZodString>;
87
- workos_application_type: z.ZodOptional<z.ZodEnum<["oauth", "m2m"]>>;
88
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
89
- client_id: z.ZodOptional<z.ZodString>;
90
- client_secret_env: z.ZodOptional<z.ZodString>;
91
- redirect_uris: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
92
- scope: z.ZodOptional<z.ZodString>;
93
- public: z.ZodOptional<z.ZodBoolean>;
94
- token_response: z.ZodOptional<z.ZodEnum<["oauth", "workos-authkit"]>>;
95
- token_request_format: z.ZodOptional<z.ZodEnum<["form", "json"]>>;
96
- workos_application_id: z.ZodOptional<z.ZodString>;
97
- workos_application_type: z.ZodOptional<z.ZodEnum<["oauth", "m2m"]>>;
98
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
99
- client_id: z.ZodOptional<z.ZodString>;
100
- client_secret_env: z.ZodOptional<z.ZodString>;
101
- redirect_uris: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
59
+ redirect_uris: z.ZodOptional<z.ZodArray<z.ZodString>>;
102
60
  scope: z.ZodOptional<z.ZodString>;
103
61
  public: z.ZodOptional<z.ZodBoolean>;
104
- token_response: z.ZodOptional<z.ZodEnum<["oauth", "workos-authkit"]>>;
105
- token_request_format: z.ZodOptional<z.ZodEnum<["form", "json"]>>;
62
+ token_response: z.ZodOptional<z.ZodEnum<{
63
+ oauth: "oauth";
64
+ "workos-authkit": "workos-authkit";
65
+ }>>;
66
+ token_request_format: z.ZodOptional<z.ZodEnum<{
67
+ form: "form";
68
+ json: "json";
69
+ }>>;
106
70
  workos_application_id: z.ZodOptional<z.ZodString>;
107
- workos_application_type: z.ZodOptional<z.ZodEnum<["oauth", "m2m"]>>;
108
- }, z.ZodTypeAny, "passthrough">>;
71
+ workos_application_type: z.ZodOptional<z.ZodEnum<{
72
+ m2m: "m2m";
73
+ oauth: "oauth";
74
+ }>>;
75
+ }, z.core.$loose>;
109
76
  export type IdpClientConfig = z.infer<typeof IdpClientConfigSchema>;
110
77
  export declare const IdpIndexEntrySchema: z.ZodObject<{
111
78
  issuer: z.ZodString;
112
79
  builtIn: z.ZodOptional<z.ZodBoolean>;
113
80
  createdAt: z.ZodString;
114
81
  updatedAt: z.ZodString;
115
- }, "strip", z.ZodTypeAny, {
116
- issuer: string;
117
- builtIn?: boolean | undefined;
118
- createdAt: string;
119
- updatedAt: string;
120
- }, {
121
- issuer: string;
122
- builtIn?: boolean | undefined;
123
- createdAt: string;
124
- updatedAt: string;
125
- }>;
82
+ }, z.core.$strip>;
126
83
  export declare const IdpStoreSchema: z.ZodObject<{
127
84
  idps: z.ZodRecord<z.ZodString, z.ZodObject<{
128
85
  issuer: z.ZodString;
129
86
  builtIn: z.ZodOptional<z.ZodBoolean>;
130
87
  createdAt: z.ZodString;
131
88
  updatedAt: z.ZodString;
132
- }, "strip", z.ZodTypeAny, {
133
- issuer: string;
134
- builtIn?: boolean | undefined;
135
- createdAt: string;
136
- updatedAt: string;
137
- }, {
138
- issuer: string;
139
- builtIn?: boolean | undefined;
140
- createdAt: string;
141
- updatedAt: string;
142
- }>>;
143
- }, "strip", z.ZodTypeAny, {
144
- idps: Record<string, {
145
- issuer: string;
146
- builtIn?: boolean | undefined;
147
- createdAt: string;
148
- updatedAt: string;
149
- }>;
150
- }, {
151
- idps: Record<string, {
152
- issuer: string;
153
- builtIn?: boolean | undefined;
154
- createdAt: string;
155
- updatedAt: string;
156
- }>;
157
- }>;
89
+ }, z.core.$strip>>;
90
+ }, z.core.$strip>;
158
91
  export type IdpStore = z.infer<typeof IdpStoreSchema>;
159
92
  export type IdpIndexEntry = z.infer<typeof IdpIndexEntrySchema>;
160
93
  export declare const IdpSessionSchema: z.ZodObject<{
@@ -162,75 +95,6 @@ export declare const IdpSessionSchema: z.ZodObject<{
162
95
  idp: z.ZodString;
163
96
  issuer: z.ZodString;
164
97
  subject: z.ZodString;
165
- /** OAuth client that issued this session's refresh token. */
166
- clientId: z.ZodOptional<z.ZodString>;
167
- audience: z.ZodOptional<z.ZodString>;
168
- organizationId: z.ZodOptional<z.ZodString>;
169
- access_token: z.ZodString;
170
- id_token: z.ZodOptional<z.ZodString>;
171
- refresh_token: z.ZodOptional<z.ZodString>;
172
- token_type: z.ZodOptional<z.ZodString>;
173
- scope: z.ZodOptional<z.ZodString>;
174
- expires_at: z.ZodOptional<z.ZodString>;
175
- claims: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
176
- /**
177
- * Access tokens by audience. WorkOS mints one `aud` per token, so a
178
- * session juggling several instances would otherwise burn a (single-use)
179
- * refresh-token rotation on every instance flip. The top-level
180
- * `access_token`/`expires_at` stay the most recently minted token for
181
- * back-compat with older CLI builds.
182
- */
183
- tokens: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
184
- access_token: z.ZodString;
185
- expires_at: z.ZodOptional<z.ZodString>;
186
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
187
- access_token: z.ZodString;
188
- expires_at: z.ZodOptional<z.ZodString>;
189
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
190
- access_token: z.ZodString;
191
- expires_at: z.ZodOptional<z.ZodString>;
192
- }, z.ZodTypeAny, "passthrough">>>>;
193
- updatedAt: z.ZodString;
194
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
195
- identity: z.ZodString;
196
- idp: z.ZodString;
197
- issuer: z.ZodString;
198
- subject: z.ZodString;
199
- /** OAuth client that issued this session's refresh token. */
200
- clientId: z.ZodOptional<z.ZodString>;
201
- audience: z.ZodOptional<z.ZodString>;
202
- organizationId: z.ZodOptional<z.ZodString>;
203
- access_token: z.ZodString;
204
- id_token: z.ZodOptional<z.ZodString>;
205
- refresh_token: z.ZodOptional<z.ZodString>;
206
- token_type: z.ZodOptional<z.ZodString>;
207
- scope: z.ZodOptional<z.ZodString>;
208
- expires_at: z.ZodOptional<z.ZodString>;
209
- claims: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
210
- /**
211
- * Access tokens by audience. WorkOS mints one `aud` per token, so a
212
- * session juggling several instances would otherwise burn a (single-use)
213
- * refresh-token rotation on every instance flip. The top-level
214
- * `access_token`/`expires_at` stay the most recently minted token for
215
- * back-compat with older CLI builds.
216
- */
217
- tokens: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
218
- access_token: z.ZodString;
219
- expires_at: z.ZodOptional<z.ZodString>;
220
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
221
- access_token: z.ZodString;
222
- expires_at: z.ZodOptional<z.ZodString>;
223
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
224
- access_token: z.ZodString;
225
- expires_at: z.ZodOptional<z.ZodString>;
226
- }, z.ZodTypeAny, "passthrough">>>>;
227
- updatedAt: z.ZodString;
228
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
229
- identity: z.ZodString;
230
- idp: z.ZodString;
231
- issuer: z.ZodString;
232
- subject: z.ZodString;
233
- /** OAuth client that issued this session's refresh token. */
234
98
  clientId: z.ZodOptional<z.ZodString>;
235
99
  audience: z.ZodOptional<z.ZodString>;
236
100
  organizationId: z.ZodOptional<z.ZodString>;
@@ -241,25 +105,12 @@ export declare const IdpSessionSchema: z.ZodObject<{
241
105
  scope: z.ZodOptional<z.ZodString>;
242
106
  expires_at: z.ZodOptional<z.ZodString>;
243
107
  claims: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
244
- /**
245
- * Access tokens by audience. WorkOS mints one `aud` per token, so a
246
- * session juggling several instances would otherwise burn a (single-use)
247
- * refresh-token rotation on every instance flip. The top-level
248
- * `access_token`/`expires_at` stay the most recently minted token for
249
- * back-compat with older CLI builds.
250
- */
251
108
  tokens: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
252
109
  access_token: z.ZodString;
253
110
  expires_at: z.ZodOptional<z.ZodString>;
254
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
255
- access_token: z.ZodString;
256
- expires_at: z.ZodOptional<z.ZodString>;
257
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
258
- access_token: z.ZodString;
259
- expires_at: z.ZodOptional<z.ZodString>;
260
- }, z.ZodTypeAny, "passthrough">>>>;
111
+ }, z.core.$loose>>>;
261
112
  updatedAt: z.ZodString;
262
- }, z.ZodTypeAny, "passthrough">>;
113
+ }, z.core.$loose>;
263
114
  export type IdpSession = z.infer<typeof IdpSessionSchema>;
264
115
  export type TokenResponse = {
265
116
  access_token?: string;
@@ -1,7 +1,9 @@
1
1
  import { z } from 'zod';
2
2
  import type { AstraleConfig } from './config';
3
3
  import { type RegistryMode } from './validation';
4
- export declare const InstanceKindSchema: z.ZodEnum<["bookmark"]>;
4
+ export declare const InstanceKindSchema: z.ZodEnum<{
5
+ bookmark: "bookmark";
6
+ }>;
5
7
  export type InstanceKind = z.infer<typeof InstanceKindSchema>;
6
8
  export declare const InstanceEntrySchema: z.ZodObject<{
7
9
  url: z.ZodOptional<z.ZodString>;
@@ -10,36 +12,17 @@ export declare const InstanceEntrySchema: z.ZodObject<{
10
12
  createdAt: z.ZodOptional<z.ZodString>;
11
13
  slug: z.ZodOptional<z.ZodString>;
12
14
  name: z.ZodOptional<z.ZodString>;
13
- kind: z.ZodOptional<z.ZodEnum<["bookmark"]>>;
14
- mode: z.ZodOptional<z.ZodEnum<["local", "remote"]>>;
15
+ kind: z.ZodOptional<z.ZodEnum<{
16
+ bookmark: "bookmark";
17
+ }>>;
18
+ mode: z.ZodOptional<z.ZodEnum<{
19
+ local: "local";
20
+ remote: "remote";
21
+ }>>;
15
22
  defaultIdentity: z.ZodOptional<z.ZodString>;
16
23
  caFile: z.ZodOptional<z.ZodString>;
17
24
  organizationId: z.ZodOptional<z.ZodString>;
18
- }, "strip", z.ZodTypeAny, {
19
- url?: string | undefined;
20
- issuer?: string | undefined;
21
- domainIssuer?: string | undefined;
22
- createdAt?: string | undefined;
23
- slug?: string | undefined;
24
- name?: string | undefined;
25
- kind?: "bookmark" | undefined;
26
- mode?: "local" | "remote" | undefined;
27
- defaultIdentity?: string | undefined;
28
- caFile?: string | undefined;
29
- organizationId?: string | undefined;
30
- }, {
31
- url?: string | undefined;
32
- issuer?: string | undefined;
33
- domainIssuer?: string | undefined;
34
- createdAt?: string | undefined;
35
- slug?: string | undefined;
36
- name?: string | undefined;
37
- kind?: "bookmark" | undefined;
38
- mode?: "local" | "remote" | undefined;
39
- defaultIdentity?: string | undefined;
40
- caFile?: string | undefined;
41
- organizationId?: string | undefined;
42
- }>;
25
+ }, z.core.$strip>;
43
26
  export declare const InstanceStoreSchema: z.ZodObject<{
44
27
  active: z.ZodString;
45
28
  instances: z.ZodRecord<z.ZodString, z.ZodObject<{
@@ -49,67 +32,18 @@ export declare const InstanceStoreSchema: z.ZodObject<{
49
32
  createdAt: z.ZodOptional<z.ZodString>;
50
33
  slug: z.ZodOptional<z.ZodString>;
51
34
  name: z.ZodOptional<z.ZodString>;
52
- kind: z.ZodOptional<z.ZodEnum<["bookmark"]>>;
53
- mode: z.ZodOptional<z.ZodEnum<["local", "remote"]>>;
35
+ kind: z.ZodOptional<z.ZodEnum<{
36
+ bookmark: "bookmark";
37
+ }>>;
38
+ mode: z.ZodOptional<z.ZodEnum<{
39
+ local: "local";
40
+ remote: "remote";
41
+ }>>;
54
42
  defaultIdentity: z.ZodOptional<z.ZodString>;
55
43
  caFile: z.ZodOptional<z.ZodString>;
56
44
  organizationId: z.ZodOptional<z.ZodString>;
57
- }, "strip", z.ZodTypeAny, {
58
- url?: string | undefined;
59
- issuer?: string | undefined;
60
- domainIssuer?: string | undefined;
61
- createdAt?: string | undefined;
62
- slug?: string | undefined;
63
- name?: string | undefined;
64
- kind?: "bookmark" | undefined;
65
- mode?: "local" | "remote" | undefined;
66
- defaultIdentity?: string | undefined;
67
- caFile?: string | undefined;
68
- organizationId?: string | undefined;
69
- }, {
70
- url?: string | undefined;
71
- issuer?: string | undefined;
72
- domainIssuer?: string | undefined;
73
- createdAt?: string | undefined;
74
- slug?: string | undefined;
75
- name?: string | undefined;
76
- kind?: "bookmark" | undefined;
77
- mode?: "local" | "remote" | undefined;
78
- defaultIdentity?: string | undefined;
79
- caFile?: string | undefined;
80
- organizationId?: string | undefined;
81
- }>>;
82
- }, "strip", z.ZodTypeAny, {
83
- active: string;
84
- instances: Record<string, {
85
- url?: string | undefined;
86
- issuer?: string | undefined;
87
- domainIssuer?: string | undefined;
88
- createdAt?: string | undefined;
89
- slug?: string | undefined;
90
- name?: string | undefined;
91
- kind?: "bookmark" | undefined;
92
- mode?: "local" | "remote" | undefined;
93
- defaultIdentity?: string | undefined;
94
- caFile?: string | undefined;
95
- organizationId?: string | undefined;
96
- }>;
97
- }, {
98
- active: string;
99
- instances: Record<string, {
100
- url?: string | undefined;
101
- issuer?: string | undefined;
102
- domainIssuer?: string | undefined;
103
- createdAt?: string | undefined;
104
- slug?: string | undefined;
105
- name?: string | undefined;
106
- kind?: "bookmark" | undefined;
107
- mode?: "local" | "remote" | undefined;
108
- defaultIdentity?: string | undefined;
109
- caFile?: string | undefined;
110
- organizationId?: string | undefined;
111
- }>;
112
- }>;
45
+ }, z.core.$strip>>;
46
+ }, z.core.$strip>;
113
47
  export type InstanceEntry = z.infer<typeof InstanceEntrySchema>;
114
48
  export type InstanceStore = z.infer<typeof InstanceStoreSchema>;
115
49
  export type AddInstanceOpts = {
@@ -8,60 +8,20 @@ export declare const InstallMetadataSchema: z.ZodObject<{
8
8
  repo: z.ZodDefault<z.ZodString>;
9
9
  bin: z.ZodString;
10
10
  installedAt: z.ZodOptional<z.ZodString>;
11
- }, "strip", z.ZodTypeAny, {
12
- method: "script";
13
- channel: string;
14
- version?: string | undefined;
15
- repo: string;
16
- bin: string;
17
- installedAt?: string | undefined;
18
- }, {
19
- method: "script";
20
- channel?: string | undefined;
21
- version?: string | undefined;
22
- repo?: string | undefined;
23
- bin: string;
24
- installedAt?: string | undefined;
25
- }>;
11
+ }, z.core.$strip>;
26
12
  export type InstallMetadata = z.infer<typeof InstallMetadataSchema>;
27
13
  export declare const UpdateManifestSchema: z.ZodObject<{
28
14
  version: z.ZodString;
29
15
  binaryVersion: z.ZodOptional<z.ZodString>;
30
16
  channel: z.ZodString;
31
17
  repo: z.ZodOptional<z.ZodString>;
32
- assets: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
18
+ assets: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
33
19
  name: z.ZodString;
34
20
  sha256: z.ZodOptional<z.ZodString>;
35
- }, "strip", z.ZodTypeAny, {
36
- name: string;
37
- sha256?: string | undefined;
38
- }, {
39
- name: string;
40
- sha256?: string | undefined;
41
- }>, z.ZodEffects<z.ZodString, {
21
+ }, z.core.$strip>, z.ZodPipe<z.ZodString, z.ZodTransform<{
42
22
  name: string;
43
- }, string>]>>;
44
- }, "strip", z.ZodTypeAny, {
45
- version: string;
46
- binaryVersion?: string | undefined;
47
- channel: string;
48
- repo?: string | undefined;
49
- assets: Record<string, {
50
- name: string;
51
- sha256?: string | undefined;
52
- } | {
53
- name: string;
54
- }>;
55
- }, {
56
- version: string;
57
- binaryVersion?: string | undefined;
58
- channel: string;
59
- repo?: string | undefined;
60
- assets: Record<string, string | {
61
- name: string;
62
- sha256?: string | undefined;
63
- }>;
64
- }>;
23
+ }, string>>]>>;
24
+ }, z.core.$strip>;
65
25
  export type UpdateManifest = z.infer<typeof UpdateManifestSchema>;
66
26
  export type Platform = {
67
27
  os: 'darwin' | 'linux';
@@ -7,5 +7,8 @@ export declare function validateUrl(url: string): void;
7
7
  /** Non-throwing predicate form of `validateUrl`. */
8
8
  export declare function isHttpUrl(url: string): boolean;
9
9
  /** `local` = only this machine. `remote` = mirrored via astrale cloud (§2.7). */
10
- export declare const RegistryModeSchema: z.ZodEnum<["local", "remote"]>;
10
+ export declare const RegistryModeSchema: z.ZodEnum<{
11
+ local: "local";
12
+ remote: "remote";
13
+ }>;
11
14
  export type RegistryMode = z.infer<typeof RegistryModeSchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrale-os/cli",
3
- "version": "1.0.0-beta.10",
3
+ "version": "1.0.0-beta.12",
4
4
  "description": "Astrale CLI — connect to existing Astrale kernels",
5
5
  "keywords": [
6
6
  "astrale",
@@ -58,24 +58,23 @@
58
58
  "ora": "^9.0.0",
59
59
  "ts-morph": "^25.0.1",
60
60
  "yaml": "^2.8.2",
61
- "zod": "^3.25.0"
61
+ "zod": "^4.4.3"
62
62
  },
63
63
  "devDependencies": {
64
64
  "@astrale-os/ox": ">=0.1.3 <1.0.0",
65
- "@astrale-os/sdk": "0.5.0-beta.32",
66
- "@astrale-os/shell": "0.4.2-beta.1",
65
+ "@astrale-os/sdk": "0.5.0-beta.38",
66
+ "@astrale-os/shell": "0.4.2-beta.3",
67
67
  "@astrale/commitlint-config": "npm:@jsr/astrale__commitlint-config@~2.0.1",
68
- "@commitlint/cli": "~20.3.1",
69
- "@commitlint/config-conventional": "~20.3.1",
68
+ "@commitlint/cli": "21.2.2",
69
+ "@commitlint/config-conventional": "21.2.2",
70
70
  "@types/bun": "^1.1.16",
71
71
  "@types/node": "^22.0.0",
72
- "@typescript/native-preview": "latest",
73
72
  "husky": "~9.1.7",
74
- "lint-staged": "~16.2.7",
73
+ "lint-staged": "17.3.0",
75
74
  "msgpackr": "^2.0.5",
76
- "oxfmt": "0.52.0",
77
- "oxlint": "latest",
78
- "typescript": "~6.0.1-rc"
75
+ "oxfmt": "0.63.0",
76
+ "oxlint": "1.78.0",
77
+ "typescript": "7.0.2"
79
78
  },
80
79
  "lint-staged": {
81
80
  "*.{js,cjs,mjs,ts,tsx}": [
@@ -99,7 +98,7 @@
99
98
  "scripts": {
100
99
  "build": "bun scripts/build.ts",
101
100
  "package:check": "pnpm run typecheck && pnpm run test && pnpm run build && node scripts/verify-public-exports.mjs && node scripts/verify-public-dependency-boundary.mjs",
102
- "typecheck": "tsgo --noEmit && tsgo --noEmit -p tsconfig.tests.json && tsgo --noEmit -p viewer && tsgo --noEmit -p studio",
101
+ "typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.tests.json && tsc --noEmit -p viewer && pnpm --dir studio run typecheck",
103
102
  "lint": "oxlint .",
104
103
  "lint:fix": "oxlint --fix .",
105
104
  "format": "pnpm exec oxfmt --write .",
@@ -1,10 +1,12 @@
1
- import { describe, expect, test } from 'bun:test'
1
+ import type { AuthApi } from '@astrale-os/sdk/auth'
2
+
3
+ import { describe, expect, mock, test } from 'bun:test'
2
4
  import { once } from 'node:events'
3
5
 
4
6
  import type { ViewServeConfig } from '../view/session'
5
7
 
6
8
  import { findFreePort } from '../port'
7
- import { startViewServer } from '../view/server'
9
+ import { mintViewCredential, startViewServer } from '../view/server'
8
10
 
9
11
  const digest = (character: string) => `sha256:${character.repeat(64)}` as const
10
12
  const target = (value: string) => value as ViewServeConfig['session']['view']['target']
@@ -13,6 +15,19 @@ const revision = (character: string) =>
13
15
  digest(character) as ViewServeConfig['session']['view']['route']['revision']
14
16
 
15
17
  describe('view session server credentials', () => {
18
+ test('mints a proof-bounded credential for the Kernel audience', async () => {
19
+ const mint = mock(async () => 'minted-credential')
20
+ const auth = { mint } as unknown as Pick<AuthApi, 'mint'>
21
+
22
+ await expect(mintViewCredential(auth, issuer('https://kernel.test'))).resolves.toBe(
23
+ 'minted-credential',
24
+ )
25
+ expect(mint).toHaveBeenCalledWith({
26
+ audience: 'https://kernel.test',
27
+ ttlSeconds: 240,
28
+ })
29
+ })
30
+
16
31
  /** @evidence TEST-CLI-PLAIN-VIEW-RECEIVES-NO-CREDENTIAL */
17
32
  test('refuses to mint a token for a handshake-none View', async () => {
18
33
  const nonce = 'plain-view'