@astrale-domains/services 0.3.1 → 0.3.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.
Files changed (28) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +44 -7
  3. package/dist/schema/index.d.ts +1 -1
  4. package/dist/schema/index.js +1 -1
  5. package/dist/schema/modules/service/classes/cloudflare-worker.d.ts +516 -506
  6. package/dist/schema/modules/service/classes/cloudflare-worker.js +2 -0
  7. package/dist/schema/modules/service/classes/service-owned-by.js +3 -4
  8. package/dist/schema/modules/service/classes/service.js +0 -2
  9. package/dist/schema/modules/service/functions/delete-service-secret.d.ts +2 -2
  10. package/dist/schema/modules/service/functions/deploy-cloudflare-worker.d.ts +5 -160
  11. package/dist/schema/modules/service/functions/deploy-cloudflare-worker.js +1 -46
  12. package/dist/schema/modules/service/functions/index.d.ts +1 -2
  13. package/dist/schema/modules/service/functions/index.js +1 -1
  14. package/dist/schema/modules/service/index.d.ts +3 -5
  15. package/dist/schema/modules/service/index.js +2 -3
  16. package/dist/schema/modules/service/types/deploy-cloudflare-worker.d.ts +176 -0
  17. package/dist/schema/modules/service/types/deploy-cloudflare-worker.js +49 -0
  18. package/dist/schema/modules/service/types/index.d.ts +3 -0
  19. package/dist/schema/modules/service/types/index.js +2 -0
  20. package/dist/schema/modules/service/types/service-readiness.d.ts +6 -0
  21. package/dist/schema/modules/service/types/service-readiness.js +6 -0
  22. package/dist/schema/schema.d.ts +529 -521
  23. package/dist/schema/schema.js +1 -2
  24. package/package.json +6 -5
  25. package/dist/schema/modules/service/dependencies/index.d.ts +0 -1
  26. package/dist/schema/modules/service/dependencies/index.js +0 -1
  27. package/dist/schema/modules/service/dependencies/shell.d.ts +0 -4
  28. package/dist/schema/modules/service/dependencies/shell.js +0 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.3.3](https://github.com/astrale-os/domains/compare/services-v0.3.2...services-v0.3.3) (2026-09-05)
4
+
5
+
6
+ ### Features
7
+
8
+ * **services:** adopt Project environments with published SDK ([#175](https://github.com/astrale-os/domains/issues/175)) ([4e90698](https://github.com/astrale-os/domains/commit/4e906982ecafb6d9d660ba0c52e421b7a7a760f8))
9
+ * **services:** verify private candidate startup before promotion ([#173](https://github.com/astrale-os/domains/issues/173)) ([271424e](https://github.com/astrale-os/domains/commit/271424ee1c2296c4d090b32881d8951ec7834e1d))
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * **schema:** migrate downstream Class Policy contracts ([#174](https://github.com/astrale-os/domains/issues/174)) ([15abf49](https://github.com/astrale-os/domains/commit/15abf49f3c8ecc1e23313f9fdde8d7c85085d3a3))
15
+ * **services:** align development launcher with domain layout ([#177](https://github.com/astrale-os/domains/issues/177)) ([707eee1](https://github.com/astrale-os/domains/commit/707eee16bf7fbb34148581341622c8b22781cdc0))
16
+ * **services:** reconcile Identity-owned Services and recover deletion ([#168](https://github.com/astrale-os/domains/issues/168)) ([44f0bf8](https://github.com/astrale-os/domains/commit/44f0bf83d7bf8bb1ef852590e61720b4b8ed41e2))
17
+
18
+ ## [0.3.2](https://github.com/astrale-os/domains/compare/services-v0.3.1...services-v0.3.2) (2026-09-04)
19
+
20
+
21
+ ### Bug Fixes
22
+
23
+ * **deps:** align SDK and Kernel release cohort ([#167](https://github.com/astrale-os/domains/issues/167)) ([68a40b6](https://github.com/astrale-os/domains/commit/68a40b6a82435212ed499bc1c102894f09bf917c))
24
+
3
25
  ## [0.3.1](https://github.com/astrale-os/domains/compare/services-v0.3.0...services-v0.3.1) (2026-09-02)
4
26
 
5
27
 
package/README.md CHANGED
@@ -1,14 +1,16 @@
1
1
  # Services
2
2
 
3
- `services.astrale.ai` turns an authored module artifact into an owner-scoped, Cloudflare-backed
4
- Service. It keeps provider protocols behind a neutral SDK Integration and stores only admitted
5
- deployment evidence in the graph.
3
+ `services.astrale.ai` owns provider-backed compute resources. It keeps provider
4
+ protocols behind neutral SDK Integrations and stores only admitted lifecycle evidence in the graph.
6
5
 
7
6
  ## Model
8
7
 
9
8
  - `Service` records one opaque provider name, its owner-scoped stable `serviceKey`, deployment mode,
10
9
  URL, lifecycle, provider digest, operation receipt, and exact cleanup locators.
11
10
  - `service_owned_by` connects each Service to its owning Identity and governs graph visibility.
11
+ - Owners may be Shell users, local Kernel roots, or application/CI identities. Services requires only
12
+ the Kernel Schema; a Shell installation is not required to deploy. Ownership
13
+ remains exact-subject scoped, and existing Shell-user ownership edges remain valid.
12
14
  - secret values stay write-only at Cloudflare and never enter Astrale mutations or graph state.
13
15
  - schedules remain provider state; only the owner may read or replace them.
14
16
  - logs are remote evidence admitted by the Cloudflare Provider before a Workflow returns them.
@@ -19,11 +21,18 @@ The View, CLI, and agent consumers read the named Service Queries directly; ther
19
21
  no list Function wrapping `listServicesQuery`. Deployment, secrets, schedules, logs, and deletion
20
22
  are Workflows because they coordinate admitted caller intent with external effects. Receiver Methods
21
23
  are authorized by the ownership Policy before their Workflows begin. `service-hosting`
22
- is the provider-neutral Integration contract; Cloudflare is its first Provider.
24
+ is the provider-neutral compute Integration contract. Cloudflare is its first Provider.
23
25
 
24
26
  ## Development
25
27
 
26
- Copy `.env.example` to `.env.dev`, fill the Cloudflare values, then run:
28
+ Copy `.env.example` to `.env.dev` and fill the Cloudflare values.
29
+
30
+ `pnpm dev` watches and deploys the development Environment remotely. `pnpm dev beta`
31
+ selects beta; `pnpm beta` and `pnpm prod` deploy once. These bootstrap Environments
32
+ are deliberately deploy-only: install the resulting URL on the intended Kernel explicitly.
33
+ Stopping development leaves the remote Worker available. No local Worker or tunnel is started.
34
+
35
+ To validate without deploying:
27
36
 
28
37
  ```sh
29
38
  pnpm typecheck
@@ -41,7 +50,35 @@ distinct modes and cannot replace each other at one Service record. Five-field c
41
50
  supported when `CLOUDFLARE_SCHEDULE_KV_ID` is configured.
42
51
 
43
52
  SDK-authored Applications should deploy through `@astrale-os/adapter-astrale`, which projects the
44
- admitted Cloudflare artifact into the revisioned Services request, verifies the live Publication,
45
- and deliberately installs the exact Release on its configured Kernel. Services never interprets or
53
+ admitted Cloudflare artifact into the revisioned Services request and verifies the live Publication.
54
+ Project tooling installs the exact Release only when that environment declares installation.
55
+ Services never interprets or
46
56
  caches Application, Publication, Schema revision, issuer, or callable inventory. Manual callers may
47
57
  deploy provider compute first and then use the ordinary Domain installation command themselves.
58
+
59
+ Revisioned deployments may request `readiness: { paths: ['/health'] }`. Services executes these
60
+ bounded local GET paths through its private candidate dispatch binding and requires HTTP 200 before
61
+ public promotion. It never follows redirects or reads the response body as Application metadata.
62
+ For an existing Service, required checks need every retained secret supplied in the candidate
63
+ configuration. Missing values fail before staging or promotion. A caller may explicitly request
64
+ `readiness: { paths: ['/health'], required: false }` to preserve updates with Worker-only secrets:
65
+ Services then retains those secrets on the serving Worker and returns
66
+ `candidateReadiness: 'unavailable-retained-secrets'` without invoking the incomplete candidate.
67
+ An executed, successful check returns `candidateReadiness: 'passed'`. Failed checks still refuse
68
+ promotion even when `required` is false; this is not a fallback for broken candidates.
69
+ Checks share a 30-second budget, shortened by invocation cancellation/deadline. A failed check leaves
70
+ the public Worker unchanged and removes the newly owned candidate. Unchecked provider-only requests
71
+ retain their existing contract.
72
+
73
+ The updated Astrale adapter requests optional `/health` preflight automatically: SDK Workers
74
+ initialize their Runtime before serving it. No Project option is needed. The adapter reports
75
+ unavailable preflight explicitly and always verifies the public Publication, Bundle, and identity
76
+ after deployment. Private preflight alone never proves complete product correctness.
77
+ Provision and deploy the updated Services Runtime before using this adapter cohort. Older strict
78
+ Services schemas reject the new field; the adapter must not retry without the safety check.
79
+
80
+ An uncertain provider promotion is adopted only after observing its exact, non-secret attempt
81
+ receipt alongside the artifact tag. Matching code alone is insufficient: Cloudflare's script ETag
82
+ can remain unchanged when only secrets change. Services-owned operation leases serialize callers;
83
+ operators making direct provider changes must coordinate with those operations. The code ETag is
84
+ not a lock for concurrent configuration changes.
@@ -2,4 +2,4 @@ export { schema } from './schema.js';
2
2
  export type { ServicesDomain, ServicesSchema } from './schema.js';
3
3
  export { artifact, artifactModule, assetBundle, assetFile, deployServiceInput, deployServiceOutput, resourceLimits, revisionedDeployment, } from './modules/service/index.js';
4
4
  export type { ArtifactModule, AssetBundle, DeployServiceInput, DeployServiceOutput, ResourceLimits, } from './modules/service/index.js';
5
- export { CloudflareWorker, OwnService, ServicesShell, Service, TraverseOwnedService, service_owned_by, } from './modules/service/index.js';
5
+ export { CloudflareWorker, OwnService, Service, TraverseOwnedService, service_owned_by, } from './modules/service/index.js';
@@ -1,3 +1,3 @@
1
1
  export { schema } from './schema.js';
2
2
  export { artifact, artifactModule, assetBundle, assetFile, deployServiceInput, deployServiceOutput, resourceLimits, revisionedDeployment, } from './modules/service/index.js';
3
- export { CloudflareWorker, OwnService, ServicesShell, Service, TraverseOwnedService, service_owned_by, } from './modules/service/index.js';
3
+ export { CloudflareWorker, OwnService, Service, TraverseOwnedService, service_owned_by, } from './modules/service/index.js';