@astrale-domains/services 0.2.1 → 0.2.3
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/CHANGELOG.md +101 -0
- package/README.md +12 -7
- package/dist/schema/deployment/deployment-rejection.d.ts +11 -0
- package/dist/schema/deployment/deployment-rejection.js +6 -0
- package/dist/schema/deployment/index.d.ts +3 -1
- package/dist/schema/deployment/index.js +2 -1
- package/dist/schema/deployment/request.d.ts +3 -45
- package/dist/schema/deployment/request.js +11 -4
- package/dist/schema/deployment/result.d.ts +57 -7
- package/dist/schema/deployment/result.js +14 -5
- package/dist/schema/index.d.ts +4 -4
- package/dist/schema/index.js +3 -3
- package/dist/schema/schema.d.ts +8288 -0
- package/dist/schema/schema.js +15 -0
- package/dist/schema/service/cloudflare-worker-class.d.ts +8029 -0
- package/dist/schema/service/cloudflare-worker-class.js +18 -0
- package/dist/schema/service/index.d.ts +4 -3
- package/dist/schema/service/index.js +4 -3
- package/dist/schema/service/methods/delete-secret.d.ts +11 -0
- package/dist/schema/service/methods/delete-secret.js +10 -0
- package/dist/schema/service/methods/delete-service.d.ts +9 -0
- package/dist/schema/service/methods/delete-service.js +14 -0
- package/dist/schema/service/methods/deploy-cloudflare-worker.d.ts +81 -0
- package/dist/schema/service/methods/deploy-cloudflare-worker.js +9 -0
- package/dist/schema/service/methods/index.d.ts +8 -0
- package/dist/schema/service/methods/index.js +8 -0
- package/dist/schema/service/methods/list-service-logs.d.ts +12 -0
- package/dist/schema/service/methods/list-service-logs.js +11 -0
- package/dist/schema/service/methods/list-service-schedules.d.ts +4 -0
- package/dist/schema/service/methods/list-service-schedules.js +8 -0
- package/dist/schema/service/methods/list-service-secret-names.d.ts +4 -0
- package/dist/schema/service/methods/list-service-secret-names.js +9 -0
- package/dist/schema/service/methods/replace-service-schedules.d.ts +11 -0
- package/dist/schema/service/methods/replace-service-schedules.js +14 -0
- package/dist/schema/service/methods/secret-name.js +2 -0
- package/dist/schema/service/methods/secret-operation-rejection.js +5 -0
- package/dist/schema/service/methods/set-service-secret.d.ts +12 -0
- package/dist/schema/service/methods/set-service-secret.js +16 -0
- package/dist/schema/service/policies.js +1 -1
- package/dist/schema/service/{class.d.ts → service-class.d.ts} +71 -184
- package/dist/schema/service/service-class.js +46 -0
- package/dist/schema/service/{relationships.js → service-owned-by-edge-class.js} +2 -2
- package/package.json +29 -23
- package/dist/schema/application/functions.js +0 -20
- package/dist/schema/application/index.d.ts +0 -391
- package/dist/schema/application/index.js +0 -10
- package/dist/schema/service/class.js +0 -22
- package/dist/schema/service/methods.d.ts +0 -135
- package/dist/schema/service/methods.js +0 -64
- /package/dist/schema/service/{relationships.d.ts → service-owned-by-edge-class.d.ts} +0 -0
|
@@ -1,6 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const serviceLifecycle: z.ZodEnum<{
|
|
3
|
+
deleting: "deleting";
|
|
4
|
+
deploying: "deploying";
|
|
5
|
+
failed: "failed";
|
|
6
|
+
ready: "ready";
|
|
7
|
+
reconciling: "reconciling";
|
|
8
|
+
}>;
|
|
9
|
+
/** Provider-neutral deployed resource. Provider implementation versions are deliberately external. */
|
|
10
|
+
export declare const Service: import("@astrale-os/sdk/schema").NodeClass<{
|
|
2
11
|
readonly depth: 1;
|
|
3
|
-
readonly abstract:
|
|
12
|
+
readonly abstract: true;
|
|
4
13
|
readonly extends: readonly [import("@astrale-os/sdk/schema").ClassProjection<"node", import("@astrale-os/sdk/schema").NodeClassDefinition & {
|
|
5
14
|
readonly ref: import("@astrale-os/sdk/schema").ClassRef<"Named"> & {
|
|
6
15
|
readonly origin: "kernel.astrale.ai";
|
|
@@ -53,104 +62,36 @@ export declare const CloudflareWorker: import("@astrale-os/sdk/schema").NodeClas
|
|
|
53
62
|
readonly properties: {
|
|
54
63
|
readonly providerKey: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, true, "providerKey", "self">;
|
|
55
64
|
readonly providerName: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, true, "providerName", "self">;
|
|
56
|
-
readonly
|
|
65
|
+
readonly serviceKey: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, true, "serviceKey", "self">;
|
|
57
66
|
readonly url: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, false, "url", "self">;
|
|
58
|
-
readonly state: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<"deploying" | "failed" | "ready", "deploying" | "failed" | "ready", true, "state", "self">;
|
|
67
|
+
readonly state: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<"deleting" | "deploying" | "failed" | "ready" | "reconciling", "deleting" | "deploying" | "failed" | "ready" | "reconciling", true, "state", "self">;
|
|
59
68
|
readonly digest: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, false, "digest", "self">;
|
|
60
69
|
readonly revision: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, false, "revision", "self">;
|
|
61
|
-
readonly coordinate: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, true, "coordinate", "self">;
|
|
62
70
|
readonly deploymentReceipt: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, false, "deploymentReceipt", "self">;
|
|
71
|
+
readonly operationExpiresAt: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<import("@astrale-os/sdk/schema").Value, import("@astrale-os/sdk/schema").Value, false, "operationExpiresAt", "self">;
|
|
72
|
+
readonly hostedIssuer: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, false, "hostedIssuer", "self">;
|
|
73
|
+
readonly hostedOrigin: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, false, "hostedOrigin", "self">;
|
|
74
|
+
readonly hostedRevision: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, false, "hostedRevision", "self">;
|
|
75
|
+
readonly hostedPublicationEtag: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, false, "hostedPublicationEtag", "self">;
|
|
76
|
+
readonly hostedFunctions: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<{
|
|
77
|
+
ref: string;
|
|
78
|
+
path: string;
|
|
79
|
+
}[], {
|
|
80
|
+
ref: string;
|
|
81
|
+
path: string;
|
|
82
|
+
}[], false, "hostedFunctions", "self">;
|
|
63
83
|
readonly error: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, false, "error", "self">;
|
|
64
84
|
};
|
|
65
85
|
readonly methods: {
|
|
66
|
-
readonly deploy: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
67
|
-
path: string;
|
|
68
|
-
name?: string | undefined;
|
|
69
|
-
entry?: string | undefined;
|
|
70
|
-
modules?: ({
|
|
71
|
-
contentBase64: string;
|
|
72
|
-
name: string;
|
|
73
|
-
kind?: "data" | "esm" | "text" | "wasm" | undefined;
|
|
74
|
-
} | {
|
|
75
|
-
contentBase64Chunks: string[];
|
|
76
|
-
name: string;
|
|
77
|
-
kind?: "data" | "esm" | "text" | "wasm" | undefined;
|
|
78
|
-
})[] | undefined;
|
|
79
|
-
revisioned?: {
|
|
80
|
-
revision: string;
|
|
81
|
-
release: {
|
|
82
|
-
entry: string;
|
|
83
|
-
modules: ({
|
|
84
|
-
contentBase64: string;
|
|
85
|
-
name: string;
|
|
86
|
-
kind?: "data" | "esm" | "text" | "wasm" | undefined;
|
|
87
|
-
} | {
|
|
88
|
-
contentBase64Chunks: string[];
|
|
89
|
-
name: string;
|
|
90
|
-
kind?: "data" | "esm" | "text" | "wasm" | undefined;
|
|
91
|
-
})[];
|
|
92
|
-
};
|
|
93
|
-
gateway: {
|
|
94
|
-
entry: string;
|
|
95
|
-
modules: ({
|
|
96
|
-
contentBase64: string;
|
|
97
|
-
name: string;
|
|
98
|
-
kind?: "data" | "esm" | "text" | "wasm" | undefined;
|
|
99
|
-
} | {
|
|
100
|
-
contentBase64Chunks: string[];
|
|
101
|
-
name: string;
|
|
102
|
-
kind?: "data" | "esm" | "text" | "wasm" | undefined;
|
|
103
|
-
})[];
|
|
104
|
-
};
|
|
105
|
-
} | undefined;
|
|
106
|
-
compatibilityDate?: string | undefined;
|
|
107
|
-
compatibilityFlags?: string[] | undefined;
|
|
108
|
-
serviceBindings?: {
|
|
109
|
-
name: string;
|
|
110
|
-
service: string;
|
|
111
|
-
}[] | undefined;
|
|
112
|
-
vars?: Record<string, string> | undefined;
|
|
113
|
-
secrets?: Record<string, string> | undefined;
|
|
114
|
-
assets?: {
|
|
115
|
-
files: ({
|
|
116
|
-
contentBase64: string;
|
|
117
|
-
path: string;
|
|
118
|
-
contentType?: string | undefined;
|
|
119
|
-
} | {
|
|
120
|
-
contentBase64Chunks: string[];
|
|
121
|
-
path: string;
|
|
122
|
-
contentType?: string | undefined;
|
|
123
|
-
})[];
|
|
124
|
-
notFound?: "404-page" | "none" | "single-page-application" | undefined;
|
|
125
|
-
runWorkerFirst?: boolean | undefined;
|
|
126
|
-
htmlHandling?: "none" | undefined;
|
|
127
|
-
} | undefined;
|
|
128
|
-
limits?: {
|
|
129
|
-
cpuMs?: number | undefined;
|
|
130
|
-
subrequests?: number | undefined;
|
|
131
|
-
} | undefined;
|
|
132
|
-
}, {
|
|
133
|
-
readonly mode: 'value';
|
|
134
|
-
readonly value: {
|
|
135
|
-
path: string;
|
|
136
|
-
url: string;
|
|
137
|
-
digest: string;
|
|
138
|
-
revision?: string | undefined;
|
|
139
|
-
state: "deploying" | "failed" | "ready";
|
|
140
|
-
error?: string | null | undefined;
|
|
141
|
-
functions: {
|
|
142
|
-
id: string;
|
|
143
|
-
path: string;
|
|
144
|
-
ref: string;
|
|
145
|
-
}[];
|
|
146
|
-
};
|
|
147
|
-
}, "authenticated", true, "default">>;
|
|
148
86
|
readonly setSecret: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
149
87
|
name: string;
|
|
150
88
|
value: string;
|
|
151
89
|
}, {
|
|
152
90
|
readonly mode: 'value';
|
|
153
91
|
readonly value: {
|
|
92
|
+
kind: "rejected";
|
|
93
|
+
reason: "binding-unavailable" | "invalid-secret-name" | "service-unavailable";
|
|
94
|
+
} | {
|
|
154
95
|
name: string;
|
|
155
96
|
};
|
|
156
97
|
}, "authenticated", false, "default">>;
|
|
@@ -159,6 +100,9 @@ export declare const CloudflareWorker: import("@astrale-os/sdk/schema").NodeClas
|
|
|
159
100
|
}, {
|
|
160
101
|
readonly mode: 'value';
|
|
161
102
|
readonly value: {
|
|
103
|
+
kind: "rejected";
|
|
104
|
+
reason: "binding-unavailable" | "invalid-secret-name" | "service-unavailable";
|
|
105
|
+
} | {
|
|
162
106
|
ok: true;
|
|
163
107
|
};
|
|
164
108
|
}, "authenticated", false, "default">>;
|
|
@@ -172,6 +116,9 @@ export declare const CloudflareWorker: import("@astrale-os/sdk/schema").NodeClas
|
|
|
172
116
|
readonly mode: 'value';
|
|
173
117
|
readonly value: {
|
|
174
118
|
crons: string[];
|
|
119
|
+
} | {
|
|
120
|
+
kind: "rejected";
|
|
121
|
+
reason: "invalid-schedule" | "service-unavailable";
|
|
175
122
|
};
|
|
176
123
|
}, "authenticated", false, "default">>;
|
|
177
124
|
readonly schedules: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<Record<string, never>, {
|
|
@@ -193,11 +140,20 @@ export declare const CloudflareWorker: import("@astrale-os/sdk/schema").NodeClas
|
|
|
193
140
|
readonly delete: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<Record<string, never>, {
|
|
194
141
|
readonly mode: 'value';
|
|
195
142
|
readonly value: {
|
|
196
|
-
|
|
143
|
+
kind: "deleted";
|
|
144
|
+
} | {
|
|
145
|
+
kind: "deleting";
|
|
146
|
+
retryAfterMs: number;
|
|
197
147
|
};
|
|
198
148
|
}, "authenticated", false, "default">>;
|
|
199
149
|
};
|
|
200
|
-
readonly effectiveProperties: (import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string,
|
|
150
|
+
readonly effectiveProperties: (import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, false, "deploymentReceipt", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, false, "digest", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, false, "error", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<{
|
|
151
|
+
ref: string;
|
|
152
|
+
path: string;
|
|
153
|
+
}[], {
|
|
154
|
+
ref: string;
|
|
155
|
+
path: string;
|
|
156
|
+
}[], false, "hostedFunctions", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, false, "hostedIssuer", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, false, "hostedOrigin", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, false, "hostedPublicationEtag", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, false, "hostedRevision", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<import("@astrale-os/sdk/schema").Value, import("@astrale-os/sdk/schema").Value, false, "operationExpiresAt", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, true, "providerKey", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, true, "providerName", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, false, "revision", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, true, "serviceKey", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<"deleting" | "deploying" | "failed" | "ready" | "reconciling", "deleting" | "deploying" | "failed" | "ready" | "reconciling", true, "state", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, false, "url", "self">) | (import("@astrale-os/sdk/schema").ResolvedProperty<import("@astrale-os/sdk/schema").Value, false> & {
|
|
201
157
|
readonly name: "description";
|
|
202
158
|
readonly key: "kernel.astrale.ai:class.Descriptable.property.description";
|
|
203
159
|
}) | (import("@astrale-os/sdk/schema").ResolvedProperty<import("@astrale-os/sdk/schema").Value, true> & {
|
|
@@ -219,14 +175,31 @@ export declare const CloudflareWorker: import("@astrale-os/sdk/schema").NodeClas
|
|
|
219
175
|
}, "authenticated", false, "default">>, "secrets", "self"> | import("@astrale-os/sdk/schema").AuthoredMethodProjection<import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<Record<string, never>, {
|
|
220
176
|
readonly mode: 'value';
|
|
221
177
|
readonly value: {
|
|
222
|
-
|
|
178
|
+
kind: "deleted";
|
|
179
|
+
} | {
|
|
180
|
+
kind: "deleting";
|
|
181
|
+
retryAfterMs: number;
|
|
223
182
|
};
|
|
224
183
|
}, "authenticated", false, "default">>, "delete", "self"> | import("@astrale-os/sdk/schema").AuthoredMethodProjection<import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
184
|
+
tail?: number | undefined;
|
|
185
|
+
since?: number | undefined;
|
|
186
|
+
}, {
|
|
187
|
+
readonly mode: 'value';
|
|
188
|
+
readonly value: {
|
|
189
|
+
id: string;
|
|
190
|
+
ts: number;
|
|
191
|
+
level: string;
|
|
192
|
+
line: string;
|
|
193
|
+
}[];
|
|
194
|
+
}, "authenticated", false, "default">>, "logs", "self"> | import("@astrale-os/sdk/schema").AuthoredMethodProjection<import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
225
195
|
name: string;
|
|
226
196
|
value: string;
|
|
227
197
|
}, {
|
|
228
198
|
readonly mode: 'value';
|
|
229
199
|
readonly value: {
|
|
200
|
+
kind: "rejected";
|
|
201
|
+
reason: "binding-unavailable" | "invalid-secret-name" | "service-unavailable";
|
|
202
|
+
} | {
|
|
230
203
|
name: string;
|
|
231
204
|
};
|
|
232
205
|
}, "authenticated", false, "default">>, "setSecret", "self"> | import("@astrale-os/sdk/schema").AuthoredMethodProjection<import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
@@ -234,6 +207,9 @@ export declare const CloudflareWorker: import("@astrale-os/sdk/schema").NodeClas
|
|
|
234
207
|
}, {
|
|
235
208
|
readonly mode: 'value';
|
|
236
209
|
readonly value: {
|
|
210
|
+
kind: "rejected";
|
|
211
|
+
reason: "binding-unavailable" | "invalid-secret-name" | "service-unavailable";
|
|
212
|
+
} | {
|
|
237
213
|
ok: true;
|
|
238
214
|
};
|
|
239
215
|
}, "authenticated", false, "default">>, "deleteSecret", "self"> | import("@astrale-os/sdk/schema").AuthoredMethodProjection<import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
@@ -242,99 +218,10 @@ export declare const CloudflareWorker: import("@astrale-os/sdk/schema").NodeClas
|
|
|
242
218
|
readonly mode: 'value';
|
|
243
219
|
readonly value: {
|
|
244
220
|
crons: string[];
|
|
245
|
-
};
|
|
246
|
-
}, "authenticated", false, "default">>, "setSchedule", "self"> | import("@astrale-os/sdk/schema").AuthoredMethodProjection<import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
247
|
-
tail?: number | undefined;
|
|
248
|
-
since?: number | undefined;
|
|
249
|
-
}, {
|
|
250
|
-
readonly mode: 'value';
|
|
251
|
-
readonly value: {
|
|
252
|
-
id: string;
|
|
253
|
-
ts: number;
|
|
254
|
-
level: string;
|
|
255
|
-
line: string;
|
|
256
|
-
}[];
|
|
257
|
-
}, "authenticated", false, "default">>, "logs", "self">;
|
|
258
|
-
readonly effectiveStaticMethods: import("@astrale-os/sdk/schema").AuthoredMethodProjection<import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
259
|
-
path: string;
|
|
260
|
-
name?: string | undefined;
|
|
261
|
-
entry?: string | undefined;
|
|
262
|
-
modules?: ({
|
|
263
|
-
contentBase64: string;
|
|
264
|
-
name: string;
|
|
265
|
-
kind?: "data" | "esm" | "text" | "wasm" | undefined;
|
|
266
221
|
} | {
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
kind?: "data" | "esm" | "text" | "wasm" | undefined;
|
|
270
|
-
})[] | undefined;
|
|
271
|
-
revisioned?: {
|
|
272
|
-
revision: string;
|
|
273
|
-
release: {
|
|
274
|
-
entry: string;
|
|
275
|
-
modules: ({
|
|
276
|
-
contentBase64: string;
|
|
277
|
-
name: string;
|
|
278
|
-
kind?: "data" | "esm" | "text" | "wasm" | undefined;
|
|
279
|
-
} | {
|
|
280
|
-
contentBase64Chunks: string[];
|
|
281
|
-
name: string;
|
|
282
|
-
kind?: "data" | "esm" | "text" | "wasm" | undefined;
|
|
283
|
-
})[];
|
|
284
|
-
};
|
|
285
|
-
gateway: {
|
|
286
|
-
entry: string;
|
|
287
|
-
modules: ({
|
|
288
|
-
contentBase64: string;
|
|
289
|
-
name: string;
|
|
290
|
-
kind?: "data" | "esm" | "text" | "wasm" | undefined;
|
|
291
|
-
} | {
|
|
292
|
-
contentBase64Chunks: string[];
|
|
293
|
-
name: string;
|
|
294
|
-
kind?: "data" | "esm" | "text" | "wasm" | undefined;
|
|
295
|
-
})[];
|
|
296
|
-
};
|
|
297
|
-
} | undefined;
|
|
298
|
-
compatibilityDate?: string | undefined;
|
|
299
|
-
compatibilityFlags?: string[] | undefined;
|
|
300
|
-
serviceBindings?: {
|
|
301
|
-
name: string;
|
|
302
|
-
service: string;
|
|
303
|
-
}[] | undefined;
|
|
304
|
-
vars?: Record<string, string> | undefined;
|
|
305
|
-
secrets?: Record<string, string> | undefined;
|
|
306
|
-
assets?: {
|
|
307
|
-
files: ({
|
|
308
|
-
contentBase64: string;
|
|
309
|
-
path: string;
|
|
310
|
-
contentType?: string | undefined;
|
|
311
|
-
} | {
|
|
312
|
-
contentBase64Chunks: string[];
|
|
313
|
-
path: string;
|
|
314
|
-
contentType?: string | undefined;
|
|
315
|
-
})[];
|
|
316
|
-
notFound?: "404-page" | "none" | "single-page-application" | undefined;
|
|
317
|
-
runWorkerFirst?: boolean | undefined;
|
|
318
|
-
htmlHandling?: "none" | undefined;
|
|
319
|
-
} | undefined;
|
|
320
|
-
limits?: {
|
|
321
|
-
cpuMs?: number | undefined;
|
|
322
|
-
subrequests?: number | undefined;
|
|
323
|
-
} | undefined;
|
|
324
|
-
}, {
|
|
325
|
-
readonly mode: 'value';
|
|
326
|
-
readonly value: {
|
|
327
|
-
path: string;
|
|
328
|
-
url: string;
|
|
329
|
-
digest: string;
|
|
330
|
-
revision?: string | undefined;
|
|
331
|
-
state: "deploying" | "failed" | "ready";
|
|
332
|
-
error?: string | null | undefined;
|
|
333
|
-
functions: {
|
|
334
|
-
id: string;
|
|
335
|
-
path: string;
|
|
336
|
-
ref: string;
|
|
337
|
-
}[];
|
|
222
|
+
kind: "rejected";
|
|
223
|
+
reason: "invalid-schedule" | "service-unavailable";
|
|
338
224
|
};
|
|
339
|
-
}, "authenticated",
|
|
340
|
-
|
|
225
|
+
}, "authenticated", false, "default">>, "setSchedule", "self">;
|
|
226
|
+
readonly effectiveStaticMethods: never;
|
|
227
|
+
}> & import("@astrale-os/sdk/schema").StateClass<Readonly<Omit<Readonly<Record<never, never>>, never> & {}>>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { K, nodeClass, property, schema as valueSchema } from '@astrale-os/sdk/schema';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { deleteService, deleteServiceSecret, listServiceLogs, listServiceSchedules, listServiceSecretNames, replaceServiceSchedules, setServiceSecret, } from './methods/index.js';
|
|
4
|
+
import { ObserveService } from './policies.js';
|
|
5
|
+
export const serviceLifecycle = z.enum(['deploying', 'reconciling', 'ready', 'failed', 'deleting']);
|
|
6
|
+
const digest = z
|
|
7
|
+
.string()
|
|
8
|
+
.length(71)
|
|
9
|
+
.regex(/sha256:[0-9a-f]{64}/);
|
|
10
|
+
const publishedFunction = z.strictObject({
|
|
11
|
+
ref: z.string().min(1).max(512),
|
|
12
|
+
path: z.string().min(1).max(2_048),
|
|
13
|
+
});
|
|
14
|
+
/** Provider-neutral deployed resource. Provider implementation versions are deliberately external. */
|
|
15
|
+
export const Service = nodeClass({
|
|
16
|
+
abstract: true,
|
|
17
|
+
description: 'One caller-owned provider-neutral deployed Service.',
|
|
18
|
+
extends: [K.classes.Named, K.classes.Descriptable, K.classes.Timestamped],
|
|
19
|
+
properties: {
|
|
20
|
+
providerKey: z.string().min(1).max(80),
|
|
21
|
+
providerName: z.string().min(1).max(120),
|
|
22
|
+
serviceKey: z.string().min(1).max(63),
|
|
23
|
+
url: property(z.string().min(1).max(2_048), { required: false }),
|
|
24
|
+
state: serviceLifecycle,
|
|
25
|
+
digest: property(z.string().min(1).max(256), { required: false }),
|
|
26
|
+
revision: property(digest, { required: false }),
|
|
27
|
+
deploymentReceipt: property(z.string().min(1).max(128), { required: false }),
|
|
28
|
+
operationExpiresAt: property(valueSchema.values.instant, { required: false }),
|
|
29
|
+
hostedIssuer: property(z.string().min(1).max(2_048), { required: false }),
|
|
30
|
+
hostedOrigin: property(z.string().min(1).max(512), { required: false }),
|
|
31
|
+
hostedRevision: property(digest, { required: false }),
|
|
32
|
+
hostedPublicationEtag: property(digest, { required: false }),
|
|
33
|
+
hostedFunctions: property(z.array(publishedFunction).max(1_024), { required: false }),
|
|
34
|
+
error: property(z.string().max(5_000), { required: false }),
|
|
35
|
+
},
|
|
36
|
+
methods: {
|
|
37
|
+
setSecret: setServiceSecret,
|
|
38
|
+
deleteSecret: deleteServiceSecret,
|
|
39
|
+
secrets: listServiceSecretNames,
|
|
40
|
+
setSchedule: replaceServiceSchedules,
|
|
41
|
+
schedules: listServiceSchedules,
|
|
42
|
+
logs: listServiceLogs,
|
|
43
|
+
delete: deleteService,
|
|
44
|
+
},
|
|
45
|
+
policies: { read: () => ObserveService },
|
|
46
|
+
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { K, edgeClass } from '@astrale-os/sdk/schema';
|
|
2
|
-
import { CloudflareWorker } from './class.js';
|
|
3
2
|
import { TraverseOwnedService } from './policies.js';
|
|
3
|
+
import { Service } from './service-class.js';
|
|
4
4
|
export const service_owned_by = edgeClass.directed({
|
|
5
5
|
description: 'The Identity that owns and may manage one Service.',
|
|
6
6
|
source: { as: 'owner', accepts: [K.classes.Identity], outgoing: '0..*' },
|
|
7
|
-
target: { as: 'service', accepts: [() =>
|
|
7
|
+
target: { as: 'service', accepts: [() => Service], incoming: '1' },
|
|
8
8
|
policies: { traverse: () => TraverseOwnedService },
|
|
9
9
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrale-domains/services",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/astrale-os/domains.git",
|
|
@@ -28,29 +28,34 @@
|
|
|
28
28
|
"registry": "https://registry.npmjs.org/"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@astrale-os/sdk": "0.5.0-beta.
|
|
31
|
+
"@astrale-os/sdk": "0.5.0-beta.75",
|
|
32
32
|
"zod": "^4.4.3"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@astrale-os/adapter-
|
|
36
|
-
"@astrale-os/
|
|
37
|
-
"@astrale-os/
|
|
38
|
-
"@astrale-os/shell": "0.
|
|
39
|
-
"@astrale-os/
|
|
40
|
-
"@
|
|
41
|
-
"@
|
|
42
|
-
"@tanstack/router
|
|
43
|
-
"@
|
|
44
|
-
"@
|
|
45
|
-
"@
|
|
46
|
-
"@
|
|
47
|
-
"
|
|
48
|
-
"react": "^19.2.
|
|
49
|
-
"react-dom": "^19.2.
|
|
50
|
-
"
|
|
35
|
+
"@astrale-os/adapter-cloudflare": "0.5.0-beta.78",
|
|
36
|
+
"@astrale-os/ox": ">=0.1.4 <1.0.0",
|
|
37
|
+
"@astrale-os/shell": "0.4.2-beta.8",
|
|
38
|
+
"@astrale-os/shell-react": "0.3.2-beta.5",
|
|
39
|
+
"@astrale-os/ui": "0.3.0-beta.13",
|
|
40
|
+
"@cloudflare/workers-types": "5.20260821.1",
|
|
41
|
+
"@tailwindcss/vite": "^4.3.3",
|
|
42
|
+
"@tanstack/react-router": "1.170.18",
|
|
43
|
+
"@tanstack/router-plugin": "1.168.23",
|
|
44
|
+
"@testing-library/jest-dom": "7.0.1",
|
|
45
|
+
"@testing-library/react": "16.3.2",
|
|
46
|
+
"@testing-library/user-event": "14.6.5",
|
|
47
|
+
"@types/node": "^26.2.0",
|
|
48
|
+
"@types/react": "^19.2.18",
|
|
49
|
+
"@types/react-dom": "^19.2.4",
|
|
50
|
+
"@vitejs/plugin-react": "^6.1.0",
|
|
51
|
+
"jsdom": "30.0.1",
|
|
52
|
+
"oxlint": ">=1.79.0 <2.0.0",
|
|
53
|
+
"react": "^19.2.8",
|
|
54
|
+
"react-dom": "^19.2.8",
|
|
55
|
+
"tailwindcss": "^4.3.3",
|
|
51
56
|
"typescript": "7.0.2",
|
|
52
|
-
"vite": "^8.2.
|
|
53
|
-
"vitest": "^4.1.
|
|
57
|
+
"vite": "^8.2.2",
|
|
58
|
+
"vitest": "^4.1.11"
|
|
54
59
|
},
|
|
55
60
|
"engines": {
|
|
56
61
|
"node": ">=22.13"
|
|
@@ -63,6 +68,7 @@
|
|
|
63
68
|
"scripts": {
|
|
64
69
|
"dev": "astrale-domain dev",
|
|
65
70
|
"prod": "astrale-domain deploy prod",
|
|
71
|
+
"beta": "astrale-domain deploy beta",
|
|
66
72
|
"deploy": "astrale-domain deploy",
|
|
67
73
|
"build": "astrale-domain build",
|
|
68
74
|
"lint": "astrale-domain lint",
|
|
@@ -71,9 +77,9 @@
|
|
|
71
77
|
"provider:bootstrap": "bun providers/cloudflare/operator/provision/bootstrap.ts",
|
|
72
78
|
"provider:route-wildcard": "bun providers/cloudflare/operator/routing/wildcard.ts",
|
|
73
79
|
"provider:route-tenant": "bun providers/cloudflare/operator/routing/tenant.ts",
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
80
|
+
"typecheck": "tsc --noEmit && tsc --project providers/cloudflare/operator/dispatch/tsconfig.json",
|
|
81
|
+
"test": "vitest run --config vitest.config.ts && pnpm run accessibility:check",
|
|
82
|
+
"accessibility:check": "oxlint ui views frontend/src --jsx-a11y-plugin --react-plugin --deny-warnings",
|
|
77
83
|
"frontend:dev": "vite",
|
|
78
84
|
"frontend:build": "vite build"
|
|
79
85
|
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { func } from '@astrale-os/sdk/schema';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
export const serviceRecord = z.strictObject({
|
|
4
|
-
id: z.string().min(1),
|
|
5
|
-
name: z.string().min(1),
|
|
6
|
-
description: z.string(),
|
|
7
|
-
providerName: z.string().min(1),
|
|
8
|
-
coordinate: z.string().min(1),
|
|
9
|
-
url: z.string().min(1).optional(),
|
|
10
|
-
state: z.enum(['deploying', 'ready', 'failed']),
|
|
11
|
-
digest: z.string().min(1).optional(),
|
|
12
|
-
revision: z.string().optional(),
|
|
13
|
-
error: z.string().optional(),
|
|
14
|
-
});
|
|
15
|
-
export const listServices = func({
|
|
16
|
-
description: 'List Services visible to the authenticated caller.',
|
|
17
|
-
auth: 'authenticated',
|
|
18
|
-
input: z.strictObject({}),
|
|
19
|
-
output: z.array(serviceRecord),
|
|
20
|
-
});
|