@astrale-domains/services 0.3.2 → 0.3.4

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 (27) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +53 -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 +456 -446
  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.d.ts +4 -4
  9. package/dist/schema/modules/service/classes/service.js +0 -2
  10. package/dist/schema/modules/service/functions/delete-service-secret.d.ts +2 -2
  11. package/dist/schema/modules/service/functions/deploy-cloudflare-worker.d.ts +5 -0
  12. package/dist/schema/modules/service/functions/set-service-secret.d.ts +2 -2
  13. package/dist/schema/modules/service/index.d.ts +0 -1
  14. package/dist/schema/modules/service/index.js +0 -1
  15. package/dist/schema/modules/service/types/deploy-cloudflare-worker.d.ts +16 -0
  16. package/dist/schema/modules/service/types/deploy-cloudflare-worker.js +3 -0
  17. package/dist/schema/modules/service/types/index.d.ts +1 -0
  18. package/dist/schema/modules/service/types/index.js +1 -0
  19. package/dist/schema/modules/service/types/service-readiness.d.ts +6 -0
  20. package/dist/schema/modules/service/types/service-readiness.js +6 -0
  21. package/dist/schema/schema.d.ts +470 -462
  22. package/dist/schema/schema.js +1 -2
  23. package/package.json +6 -5
  24. package/dist/schema/modules/service/dependencies/index.d.ts +0 -1
  25. package/dist/schema/modules/service/dependencies/index.js +0 -1
  26. package/dist/schema/modules/service/dependencies/shell.d.ts +0 -4
  27. package/dist/schema/modules/service/dependencies/shell.js +0 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.3.4](https://github.com/astrale-os/domains/compare/services-v0.3.3...services-v0.3.4) (2026-09-05)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **services:** bind Workers to their canonical public URL ([#182](https://github.com/astrale-os/domains/issues/182)) ([fc8be8e](https://github.com/astrale-os/domains/commit/fc8be8eb10fc81491665d076daa8d12c6d2fe63f))
9
+ * **services:** explain interrupted deployment recovery ([#180](https://github.com/astrale-os/domains/issues/180)) ([d65f814](https://github.com/astrale-os/domains/commit/d65f814603202ff5769c2c2bcc5f86bc703f9b44))
10
+
11
+ ## [0.3.3](https://github.com/astrale-os/domains/compare/services-v0.3.2...services-v0.3.3) (2026-09-05)
12
+
13
+
14
+ ### Features
15
+
16
+ * **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))
17
+ * **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))
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * **schema:** migrate downstream Class Policy contracts ([#174](https://github.com/astrale-os/domains/issues/174)) ([15abf49](https://github.com/astrale-os/domains/commit/15abf49f3c8ecc1e23313f9fdde8d7c85085d3a3))
23
+ * **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))
24
+ * **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))
25
+
3
26
  ## [0.3.2](https://github.com/astrale-os/domains/compare/services-v0.3.1...services-v0.3.2) (2026-09-04)
4
27
 
5
28
 
package/README.md CHANGED
@@ -1,29 +1,41 @@
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.
15
17
  - the only admitted Worker service binding is the logical platform router; the provider resolves
16
18
  it to the selected environment and callers cannot name arbitrary same-account Workers.
19
+ - the provider supplies `WORKER_URL` as the Service's canonical HTTPS URL to both candidate and
20
+ public Workers. It is reserved provider metadata, not a caller variable or secret. Applications
21
+ therefore keep one issuer even when requests arrive over HTTP or through a dispatcher alias.
17
22
 
18
23
  The View, CLI, and agent consumers read the named Service Queries directly; there is intentionally
19
24
  no list Function wrapping `listServicesQuery`. Deployment, secrets, schedules, logs, and deletion
20
25
  are Workflows because they coordinate admitted caller intent with external effects. Receiver Methods
21
26
  are authorized by the ownership Policy before their Workflows begin. `service-hosting`
22
- is the provider-neutral Integration contract; Cloudflare is its first Provider.
27
+ is the provider-neutral compute Integration contract. Cloudflare is its first Provider.
23
28
 
24
29
  ## Development
25
30
 
26
- Copy `.env.example` to `.env.dev`, fill the Cloudflare values, then run:
31
+ Copy `.env.example` to `.env.dev` and fill the Cloudflare values.
32
+
33
+ `pnpm dev` watches and deploys the development Environment remotely. `pnpm dev beta`
34
+ selects beta; `pnpm beta` and `pnpm prod` deploy once. These bootstrap Environments
35
+ are deliberately deploy-only: install the resulting URL on the intended Kernel explicitly.
36
+ Stopping development leaves the remote Worker available. No local Worker or tunnel is started.
37
+
38
+ To validate without deploying:
27
39
 
28
40
  ```sh
29
41
  pnpm typecheck
@@ -41,7 +53,41 @@ distinct modes and cannot replace each other at one Service record. Five-field c
41
53
  supported when `CLOUDFLARE_SCHEDULE_KV_ID` is configured.
42
54
 
43
55
  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
56
+ admitted Cloudflare artifact into the revisioned Services request and verifies the live Publication.
57
+ Project tooling installs the exact Release only when that environment declares installation.
58
+ Services never interprets or
46
59
  caches Application, Publication, Schema revision, issuer, or callable inventory. Manual callers may
47
60
  deploy provider compute first and then use the ordinary Domain installation command themselves.
61
+
62
+ Revisioned deployments may request `readiness: { paths: ['/health'] }`. Services executes these
63
+ bounded local GET paths through its private candidate dispatch binding and requires HTTP 200 before
64
+ public promotion. It never follows redirects or reads the response body as Application metadata.
65
+ For an existing Service, required checks need every retained secret supplied in the candidate
66
+ configuration. Missing values fail before staging or promotion. A caller may explicitly request
67
+ `readiness: { paths: ['/health'], required: false }` to preserve updates with Worker-only secrets:
68
+ Services then retains those secrets on the serving Worker and returns
69
+ `candidateReadiness: 'unavailable-retained-secrets'` without invoking the incomplete candidate.
70
+ An executed, successful check returns `candidateReadiness: 'passed'`. Failed checks still refuse
71
+ promotion even when `required` is false; this is not a fallback for broken candidates.
72
+ Checks share a 30-second budget, shortened by invocation cancellation/deadline. A failed check leaves
73
+ the public Worker unchanged and removes the newly owned candidate. Unchecked provider-only requests
74
+ retain their existing contract.
75
+
76
+ The updated Astrale adapter requests optional `/health` preflight automatically: SDK Workers
77
+ initialize their Runtime before serving it. No Project option is needed. The adapter reports
78
+ unavailable preflight explicitly and always verifies the public Publication, Bundle, and identity
79
+ after deployment. Private preflight alone never proves complete product correctness.
80
+ Provision and deploy the updated Services Runtime before using this adapter cohort. Older strict
81
+ Services schemas reject the new field; the adapter must not retry without the safety check.
82
+
83
+ An uncertain provider promotion is adopted only after observing its exact, non-secret attempt
84
+ receipt alongside the artifact tag. Matching code alone is insufficient: Cloudflare's script ETag
85
+ can remain unchanged when only secrets change. Services-owned operation leases serialize callers;
86
+ operators making direct provider changes must coordinate with those operations. The code ETag is
87
+ not a lock for concurrent configuration changes.
88
+
89
+ If a Kernel interruption prevents recording a deployment outcome, the Service can remain busy
90
+ until its retained operation lease expires (currently 30 minutes from acquisition or renewal).
91
+ Retry the same deployment after the expiry reported in the rejection; it reuses the Service and
92
+ provider identity. Do not clear the lease or create another Service to bypass an uncertain outcome.
93
+ An operation without a recorded expiry needs operator inspection, not a guessed retry deadline.
@@ -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';