@astrale-domains/services 0.8.2 → 0.8.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/README.md +9 -7
- package/dist/schema/modules/deployment/classes/cloudflare-deployment.d.ts +1 -0
- package/dist/schema/modules/deployment/classes/cloudflare-deployment.js +1 -1
- package/dist/schema/modules/deployment/classes/current-deployment.js +1 -1
- package/dist/schema/modules/deployment/classes/deployment-of.js +4 -1
- package/dist/schema/modules/deployment/functions/retire-deployment.d.ts +1 -3
- package/dist/schema/modules/deployment/functions/retire-deployment.js +1 -3
- package/dist/schema/modules/service/classes/cloudflare-service.d.ts +1 -0
- package/dist/schema/modules/service/classes/cloudflare-service.js +1 -1
- package/dist/schema/modules/service/classes/service-owned-by.js +1 -1
- package/dist/schema/modules/service/types/service-management.js +3 -6
- package/dist/schema/schema.d.ts +2 -0
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -52,13 +52,10 @@ caller in three groups also reaches the Services of each.
|
|
|
52
52
|
Service of the group, deletion included.
|
|
53
53
|
- `OwnDeployment` gives a deployment to the owner of its Service.
|
|
54
54
|
|
|
55
|
-
Every Method is `authenticated
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
`DEPLOYMENT_NOT_FOUND`), and a deploy of another owner's Service is refused
|
|
60
|
-
`service-owned-elsewhere`. The day the Admin instance grants deployers `can_use` on these Methods,
|
|
61
|
-
they become `authorized` with the Policy and the handler checks go.
|
|
55
|
+
Every Method is `authenticated`. Each handler asks the Kernel `Identity.can` for the caller on its
|
|
56
|
+
own session before it reads anything: a caller who does not own the Service finds none
|
|
57
|
+
(`SERVICE_NOT_FOUND`, `DEPLOYMENT_NOT_FOUND`), and a deploy of another owner's Service is refused
|
|
58
|
+
`service-owned-elsewhere`.
|
|
62
59
|
|
|
63
60
|
`list` reads Services under the Services Domain credential and keeps those the Kernel answers
|
|
64
61
|
`OwnService` for, in batches: a caller-mode read does not reach the Identity end of
|
|
@@ -231,6 +228,11 @@ sets `SERVICES_SECRET_DIGEST_KEY` (at least 32 UTF-8 bytes), `CLOUDFLARE_DISPATC
|
|
|
231
228
|
`CLOUDFLARE_SCHEDULE_KV_ID`; the configuration refuses a file without them or one that sets a
|
|
232
229
|
hosting var.
|
|
233
230
|
|
|
231
|
+
`.env.admin.tpl` is that file with each secret as a 1Password reference.
|
|
232
|
+
`scripts/with-secrets.sh admin -- <command>` resolves it for one command: `.env.admin` (0600)
|
|
233
|
+
exists while the command runs, its values are in the command's environment, and the file is
|
|
234
|
+
removed afterwards. A resolved `.env.admin` left on disk is refused rather than overwritten.
|
|
235
|
+
|
|
234
236
|
`pnpm run deploy admin` makes one immutable deployment of this release in the platform dispatch
|
|
235
237
|
namespace. Deploying never installs: install the deployed URL with
|
|
236
238
|
`astrale domain install <url> -i <instance>`. The Cloudflare Provider and its operator tooling
|
|
@@ -8,5 +8,5 @@ export const CloudflareDeployment = nodeClass({
|
|
|
8
8
|
icon: classIcon.lucide(CloudUpload),
|
|
9
9
|
extends: [Deployment],
|
|
10
10
|
methods: { retire: retireDeployment },
|
|
11
|
-
policies: { read: () => OwnDeployment },
|
|
11
|
+
policies: { read: () => OwnDeployment, traverse: () => OwnDeployment },
|
|
12
12
|
});
|
|
@@ -9,5 +9,5 @@ export const current_deployment = edgeClass.directed({
|
|
|
9
9
|
description: 'The deployment one Service currently serves.',
|
|
10
10
|
source: { as: 'service', accepts: [() => Service], outgoing: '0..1' },
|
|
11
11
|
target: { as: 'deployment', accepts: [() => Deployment], incoming: '0..1' },
|
|
12
|
-
policies: { traverse: () => TraverseOwnedService },
|
|
12
|
+
policies: { read: () => TraverseOwnedService, traverse: () => TraverseOwnedService },
|
|
13
13
|
});
|
|
@@ -7,5 +7,8 @@ export const deployment_of = edgeClass.directed({
|
|
|
7
7
|
description: 'The Service one Deployment is a version of.',
|
|
8
8
|
source: { as: 'deployment', accepts: [() => Deployment], outgoing: '1' },
|
|
9
9
|
target: { as: 'service', accepts: [() => Service], incoming: '0..*' },
|
|
10
|
-
policies: {
|
|
10
|
+
policies: {
|
|
11
|
+
read: () => TraverseOwnedServiceDeployment,
|
|
12
|
+
traverse: () => TraverseOwnedServiceDeployment,
|
|
13
|
+
},
|
|
11
14
|
});
|
|
@@ -4,9 +4,7 @@
|
|
|
4
4
|
* retired alone: promote another one first, or delete the Service.
|
|
5
5
|
*
|
|
6
6
|
* Only the owner of the deployment's Service, or an Identity acting as it, withdraws it: the
|
|
7
|
-
* handler asks the Kernel `OwnDeployment` for the caller before it reads the deployment.
|
|
8
|
-
* `authorized` Method would also require the caller's principal to hold `can_use` on this
|
|
9
|
-
* Function, which no deployer identity holds on the Admin instance.
|
|
7
|
+
* handler asks the Kernel `OwnDeployment` for the caller before it reads the deployment.
|
|
10
8
|
*/
|
|
11
9
|
export declare const retireDeployment: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<Record<string, never>, {
|
|
12
10
|
readonly mode: 'value';
|
|
@@ -6,9 +6,7 @@ import { retireDeploymentInput, retireDeploymentOutput } from '../types/deployme
|
|
|
6
6
|
* retired alone: promote another one first, or delete the Service.
|
|
7
7
|
*
|
|
8
8
|
* Only the owner of the deployment's Service, or an Identity acting as it, withdraws it: the
|
|
9
|
-
* handler asks the Kernel `OwnDeployment` for the caller before it reads the deployment.
|
|
10
|
-
* `authorized` Method would also require the caller's principal to hold `can_use` on this
|
|
11
|
-
* Function, which no deployer identity holds on the Admin instance.
|
|
9
|
+
* handler asks the Kernel `OwnDeployment` for the caller before it reads the deployment.
|
|
12
10
|
*/
|
|
13
11
|
export const retireDeployment = method({
|
|
14
12
|
description: 'Withdraw this deployment for good.',
|
|
@@ -5,5 +5,5 @@ export const service_owned_by = edgeClass.directed({
|
|
|
5
5
|
description: 'The authenticated Identity that owns and may manage one Service.',
|
|
6
6
|
source: { as: 'service', accepts: [() => Service], outgoing: '1' },
|
|
7
7
|
target: { as: 'owner', accepts: [K.classes.Identity], incoming: '0..*' },
|
|
8
|
-
policies: { traverse: () => TraverseOwnedService },
|
|
8
|
+
policies: { read: () => TraverseOwnedService, traverse: () => TraverseOwnedService },
|
|
9
9
|
});
|
|
@@ -2,12 +2,9 @@ import { z } from 'zod';
|
|
|
2
2
|
import { deploymentRejection, deploymentSecretRejection } from '../../deployment/index.js';
|
|
3
3
|
import { secretName } from './service-secret-name.js';
|
|
4
4
|
/**
|
|
5
|
-
* Every Service Method is `authenticated
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* reads anything, and a caller who does not own the Service finds none (`SERVICE_NOT_FOUND`). The
|
|
9
|
-
* day the Admin instance grants deployers `can_use` on these Methods, they become `authorized` with
|
|
10
|
-
* the `OwnService` Policy and the handler checks go.
|
|
5
|
+
* Every Service Method is `authenticated`. Each handler asks the Kernel `OwnService` for the caller
|
|
6
|
+
* on its own session before it reads anything, and a caller who does not own the Service finds
|
|
7
|
+
* none (`SERVICE_NOT_FOUND`).
|
|
11
8
|
*/
|
|
12
9
|
/** One deployment of this Service, named by its label. */
|
|
13
10
|
const deploymentLabel = z.string().min(33).max(57);
|
package/dist/schema/schema.d.ts
CHANGED
|
@@ -263,6 +263,7 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"se
|
|
|
263
263
|
};
|
|
264
264
|
readonly policies: {
|
|
265
265
|
read: () => import("@astrale-os/sdk/schema").Policy;
|
|
266
|
+
traverse: () => import("@astrale-os/sdk/schema").Policy;
|
|
266
267
|
};
|
|
267
268
|
}>;
|
|
268
269
|
readonly service_owned_by: import("@astrale-os/sdk/schema").DirectedEdgeClass<{
|
|
@@ -468,6 +469,7 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"se
|
|
|
468
469
|
};
|
|
469
470
|
readonly policies: {
|
|
470
471
|
read: () => import("@astrale-os/sdk/schema").Policy;
|
|
472
|
+
traverse: () => import("@astrale-os/sdk/schema").Policy;
|
|
471
473
|
};
|
|
472
474
|
}>;
|
|
473
475
|
readonly deployment_of: import("@astrale-os/sdk/schema").DirectedEdgeClass<{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrale-domains/services",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.3",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/astrale-os/domains.git",
|
|
@@ -31,15 +31,15 @@
|
|
|
31
31
|
"registry": "https://registry.npmjs.org/"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@astrale-os/sdk": "0.6.0-beta.
|
|
34
|
+
"@astrale-os/sdk": "0.6.0-beta.28",
|
|
35
35
|
"zod": "4.4.3"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@astrale-os/adapter-astrale": "0.5.0-beta.
|
|
39
|
-
"@astrale-os/adapter-cloudflare": "0.5.0-beta.
|
|
38
|
+
"@astrale-os/adapter-astrale": "0.5.0-beta.176",
|
|
39
|
+
"@astrale-os/adapter-cloudflare": "0.5.0-beta.183",
|
|
40
40
|
"@astrale-os/ox": ">=0.1.4 <1.0.0",
|
|
41
|
-
"@astrale-os/shell": "0.7.0-beta.
|
|
42
|
-
"@astrale-os/shell-react": "0.6.0-beta.
|
|
41
|
+
"@astrale-os/shell": "0.7.0-beta.2",
|
|
42
|
+
"@astrale-os/shell-react": "0.6.0-beta.3",
|
|
43
43
|
"@astrale-os/ui": "1.0.0-beta.32",
|
|
44
44
|
"@cloudflare/workers-types": "5.20260821.1",
|
|
45
45
|
"@tailwindcss/vite": "^4.3.3",
|