@intentius/chant-lexicon-fly 0.89.0 → 0.91.0

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 (75) hide show
  1. package/dist/components/capability-plugin.d.ts +1 -0
  2. package/dist/components/capability-plugin.d.ts.map +1 -1
  3. package/dist/components/fly-release.d.ts +148 -0
  4. package/dist/components/fly-release.d.ts.map +1 -0
  5. package/dist/components/index.d.ts +2 -0
  6. package/dist/components/index.d.ts.map +1 -1
  7. package/dist/describe-resources.d.ts +11 -0
  8. package/dist/describe-resources.d.ts.map +1 -1
  9. package/dist/index.d.ts +3 -1
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/integrity.json +4 -4
  12. package/dist/manifest.json +1 -1
  13. package/dist/op/activities/emulator-images.d.ts +13 -0
  14. package/dist/op/activities/emulator-images.d.ts.map +1 -1
  15. package/dist/op/activities/fly-apply.d.ts +8 -22
  16. package/dist/op/activities/fly-apply.d.ts.map +1 -1
  17. package/dist/op/activities/index.d.ts +6 -2
  18. package/dist/op/activities/index.d.ts.map +1 -1
  19. package/dist/op/activities/machine-release.d.ts +176 -0
  20. package/dist/op/activities/machine-release.d.ts.map +1 -0
  21. package/dist/op/activities/machines-contract.d.ts +8 -0
  22. package/dist/op/activities/machines-contract.d.ts.map +1 -1
  23. package/dist/op/activities/machines-fake.d.ts +53 -0
  24. package/dist/op/activities/machines-fake.d.ts.map +1 -0
  25. package/dist/op/activities/sprite-services.d.ts +158 -0
  26. package/dist/op/activities/sprite-services.d.ts.map +1 -0
  27. package/dist/op/activities/sprites-contract.d.ts +17 -1
  28. package/dist/op/activities/sprites-contract.d.ts.map +1 -1
  29. package/dist/op/activities/sprites-emulator.d.ts +12 -0
  30. package/dist/op/activities/sprites-emulator.d.ts.map +1 -1
  31. package/dist/op/activities/sprites-fake.d.ts +4 -0
  32. package/dist/op/activities/sprites-fake.d.ts.map +1 -1
  33. package/dist/op/activities/sprites.d.ts +53 -0
  34. package/dist/op/activities/sprites.d.ts.map +1 -1
  35. package/dist/op/builders.d.ts +33 -1
  36. package/dist/op/builders.d.ts.map +1 -1
  37. package/dist/release-metadata.d.ts +48 -0
  38. package/dist/release-metadata.d.ts.map +1 -0
  39. package/dist/release-store.d.ts +36 -0
  40. package/dist/release-store.d.ts.map +1 -0
  41. package/dist/skills/chant-fly-ops.md +33 -0
  42. package/dist/skills/chant-fly-sprites.md +4 -2
  43. package/package.json +2 -2
  44. package/src/components/capability-plugin.ts +11 -3
  45. package/src/components/fly-release.test.ts +244 -0
  46. package/src/components/fly-release.ts +341 -0
  47. package/src/components/index.ts +16 -0
  48. package/src/describe-resources.test.ts +18 -3
  49. package/src/describe-resources.ts +69 -5
  50. package/src/index.ts +21 -0
  51. package/src/op/activities/emulator-images.ts +14 -0
  52. package/src/op/activities/fly-apply.ts +15 -3
  53. package/src/op/activities/index.ts +57 -0
  54. package/src/op/activities/machine-release.integration.test.ts +113 -0
  55. package/src/op/activities/machine-release.test.ts +138 -0
  56. package/src/op/activities/machine-release.ts +407 -0
  57. package/src/op/activities/machines-contract.docker.integration.test.ts +10 -1
  58. package/src/op/activities/machines-contract.test.ts +11 -1
  59. package/src/op/activities/machines-contract.ts +17 -0
  60. package/src/op/activities/machines-fake.ts +165 -0
  61. package/src/op/activities/sprite-config.test.ts +19 -0
  62. package/src/op/activities/sprite-services.docker.integration.test.ts +87 -0
  63. package/src/op/activities/sprite-services.test.ts +263 -0
  64. package/src/op/activities/sprite-services.ts +311 -0
  65. package/src/op/activities/sprites-contract.test.ts +15 -4
  66. package/src/op/activities/sprites-contract.ts +24 -6
  67. package/src/op/activities/sprites-emulator.ts +52 -1
  68. package/src/op/activities/sprites-fake.ts +57 -8
  69. package/src/op/activities/sprites.test.ts +102 -0
  70. package/src/op/activities/sprites.ts +108 -7
  71. package/src/op/builders.ts +53 -1
  72. package/src/release-metadata.ts +72 -0
  73. package/src/release-store.ts +70 -0
  74. package/src/skills/chant-fly-ops.md +33 -0
  75. package/src/skills/chant-fly-sprites.md +4 -2
@@ -28,11 +28,27 @@
28
28
 
29
29
  import { activity, type NamedActivityStep, type WithStepRefs } from "@intentius/chant/op";
30
30
  import type { ActivityStep } from "@intentius/chant/op";
31
- import type { SpriteCreateArgs, SpriteExecArgs, SpriteCheckpointArgs, SpriteRestoreArgs, ListCheckpointsArgs, SpriteDestroyArgs } from "./activities/sprites";
31
+ import type { SpriteCreateArgs, SpriteExecArgs, SpriteCheckpointArgs, SpriteRestoreArgs, ListCheckpointsArgs, SpriteDestroyArgs, SpriteDeleteArgs, SpriteUrlArgs } from "./activities/sprites";
32
32
  import type { SpriteWriteFileArgs, SpriteReadFileArgs, SpriteListDirArgs, SpriteRemoveArgs } from "./activities/sprite-fs";
33
33
  import type { SpriteApplyNetworkPolicyArgs, SpriteApplyServicesArgs } from "./activities/sprite-config";
34
+ import type {
35
+ SpriteServiceCreateArgs,
36
+ SpriteServiceGetArgs,
37
+ SpriteServiceListArgs,
38
+ SpriteServiceStartArgs,
39
+ SpriteServiceStopArgs,
40
+ SpriteServiceDeleteArgs,
41
+ SpriteServiceLogsArgs,
42
+ } from "./activities/sprite-services";
34
43
  import type { SpriteTaskCreateArgs, SpriteTaskRefreshArgs, SpriteTaskReleaseArgs } from "./activities/sprite-tasks";
35
44
  import type { SpritesUpArgs, SpritesDownArgs } from "./activities/sprites-emulator";
45
+ import type {
46
+ FlyMachineReleaseArgs,
47
+ FlyMachineExecArgs,
48
+ FlyMachineStateArgs,
49
+ FlyMachineVerifyArgs,
50
+ FlyMachineRestoreArgs,
51
+ } from "./activities/machine-release";
36
52
 
37
53
  type StepOpts = { profile?: ActivityStep["profile"] };
38
54
 
@@ -75,6 +91,10 @@ export const spriteRestore = spriteStep<SpriteRestoreArgs>("spriteRestore", "lon
75
91
  export const listCheckpoints = spriteStep<ListCheckpointsArgs>("listCheckpoints", "fastIdempotent");
76
92
  /** Destroy a sprite — the fully typed twin of core's `spriteDestroy`. Defaults to the `fastIdempotent` profile. */
77
93
  export const spriteDestroy = spriteStep<SpriteDestroyArgs>("spriteDestroy", "fastIdempotent");
94
+ /** Delete a sprite (#2711; alias of `spriteDestroy`). Defaults to the `fastIdempotent` profile. */
95
+ export const spriteDelete = spriteStep<SpriteDeleteArgs>("spriteDelete", "fastIdempotent");
96
+ /** Resolve a sprite's URL, optionally waiting until a path on it answers (#2711). Defaults to the `fastIdempotent` profile. */
97
+ export const spriteUrl = spriteStep<SpriteUrlArgs>("spriteUrl", "fastIdempotent");
78
98
  /** Write a file into a sprite — the fully typed twin of core's `spriteWriteFile`. Defaults to the `fastIdempotent` profile. */
79
99
  export const spriteWriteFile = spriteStep<SpriteWriteFileArgs>("spriteWriteFile", "fastIdempotent");
80
100
  /** Read a file from a sprite — the fully typed twin of core's `spriteReadFile`. Defaults to the `fastIdempotent` profile. */
@@ -87,6 +107,20 @@ export const spriteRemove = spriteStep<SpriteRemoveArgs>("spriteRemove", "fastId
87
107
  export const spriteApplyNetworkPolicy = spriteStep<SpriteApplyNetworkPolicyArgs>("spriteApplyNetworkPolicy", "fastIdempotent");
88
108
  /** Reconcile a sprite's background services — the fully typed twin of core's `spriteApplyServices`. Defaults to the `fastIdempotent` profile. */
89
109
  export const spriteApplyServices = spriteStep<SpriteApplyServicesArgs>("spriteApplyServices", "fastIdempotent");
110
+ /** Create-and-start one background service (#2711) — the single-service primitive underneath `spriteApplyServices`. Defaults to the `longInfra` profile (the create+start NDJSON round trip). */
111
+ export const spriteServiceCreate = spriteStep<SpriteServiceCreateArgs>("spriteServiceCreate", "longInfra");
112
+ /** Get one background service's definition and live state (#2711). Defaults to the `fastIdempotent` profile. */
113
+ export const spriteServiceGet = spriteStep<SpriteServiceGetArgs>("spriteServiceGet", "fastIdempotent");
114
+ /** List a sprite's background services (#2711). Defaults to the `fastIdempotent` profile. */
115
+ export const spriteServiceList = spriteStep<SpriteServiceListArgs>("spriteServiceList", "fastIdempotent");
116
+ /** Start a stopped background service (#2711). Defaults to the `longInfra` profile (the NDJSON round trip). */
117
+ export const spriteServiceStart = spriteStep<SpriteServiceStartArgs>("spriteServiceStart", "longInfra");
118
+ /** Stop a running background service (#2711). Defaults to the `fastIdempotent` profile. */
119
+ export const spriteServiceStop = spriteStep<SpriteServiceStopArgs>("spriteServiceStop", "fastIdempotent");
120
+ /** Delete a background service, idempotent (#2711). Defaults to the `fastIdempotent` profile. */
121
+ export const spriteServiceDelete = spriteStep<SpriteServiceDeleteArgs>("spriteServiceDelete", "fastIdempotent");
122
+ /** Read a background service's log tail (#2711). Defaults to the `fastIdempotent` profile. */
123
+ export const spriteServiceLogs = spriteStep<SpriteServiceLogsArgs>("spriteServiceLogs", "fastIdempotent");
90
124
  /** Create a keep-alive task — the fully typed twin of core's `spriteTaskCreate`. Defaults to the `fastIdempotent` profile. */
91
125
  export const spriteTaskCreate = spriteStep<SpriteTaskCreateArgs>("spriteTaskCreate", "fastIdempotent");
92
126
  /** Refresh a keep-alive task's expiry — the fully typed twin of core's `spriteTaskRefresh`. Defaults to the `fastIdempotent` profile. */
@@ -100,3 +134,21 @@ export const spritesUp = (args: WithStepRefs<SpritesUpArgs> & StepOpts = {}): Na
100
134
  /** Stop and remove the local spritzer container — the fully typed twin of core's `spritesDown`. Defaults to the `fastIdempotent` profile. */
101
135
  export const spritesDown = (args: WithStepRefs<SpritesDownArgs> & StepOpts = {}): NamedActivityStep =>
102
136
  spriteStep<SpritesDownArgs>("spritesDown", "fastIdempotent")(args);
137
+
138
+ // ── Machines release activities (#2736, ws-056) ──────────────────────────────
139
+ // The site steps as Op steps: upload and start, a migration inside the
140
+ // Machine, restart, stop, verify and restore. Wrap a migration's
141
+ // `flyMachineExec` in `effect()` so it fires once per environment.
142
+
143
+ /** Apply the plan with the Machine serving a release (its digest in the Machine's metadata). Defaults to the `longInfra` profile. */
144
+ export const flyMachineRelease = spriteStep<FlyMachineReleaseArgs>("flyMachineRelease", "longInfra");
145
+ /** Run a command inside a Machine (a migration). Defaults to the `atMostOnce` profile: chant cannot know the command is safe to repeat. */
146
+ export const flyMachineExec = spriteStep<FlyMachineExecArgs>("flyMachineExec", "atMostOnce");
147
+ /** Restart a Machine under a lease and wait for it to be started. Defaults to the `longInfra` profile. */
148
+ export const flyMachineRestart = spriteStep<FlyMachineStateArgs>("flyMachineRestart", "longInfra");
149
+ /** Stop a Machine under a lease. Defaults to the `longInfra` profile. */
150
+ export const flyMachineStop = spriteStep<FlyMachineStateArgs>("flyMachineStop", "longInfra");
151
+ /** Check a Machine is started with a release, and its health endpoint answers. Defaults to the `longInfra` profile. */
152
+ export const flyMachineVerify = spriteStep<FlyMachineVerifyArgs>("flyMachineVerify", "longInfra");
153
+ /** Put a recorded Machine config back (restore, rollback). Defaults to the `longInfra` profile. */
154
+ export const flyMachineRestore = spriteStep<FlyMachineRestoreArgs>("flyMachineRestore", "longInfra");
@@ -0,0 +1,72 @@
1
+ /**
2
+ * The release a Fly Machine serves, as its metadata records it (#2736, ws-056).
3
+ *
4
+ * Pure: the keys, a reader, and a writer over a Machine config. The Machines
5
+ * activities (./op/activities/machine-release.ts) stamp these on a release,
6
+ * `describeResources` (./describe-resources.ts) reads them back, and
7
+ * `chant components status --live` compares the digest with the release
8
+ * ledger.
9
+ */
10
+
11
+ /**
12
+ * The Machine metadata keys that say which release it serves. Fly metadata is
13
+ * a string map, so each field is its own key.
14
+ *
15
+ * - `digest`: the release's digest, the release ledger's join key.
16
+ * - `gitSha`: the commit the release was built from.
17
+ * - `release`: an optional human label (a tag, a release id).
18
+ * - `previousDigest`: the release this one replaced when it first shipped, so
19
+ * a rollback knows where to go back to with no history of its own.
20
+ */
21
+ export const RELEASE_METADATA_KEYS = {
22
+ digest: "chant-release-digest",
23
+ gitSha: "chant-release-git-sha",
24
+ release: "chant-release",
25
+ previousDigest: "chant-release-previous-digest",
26
+ } as const;
27
+
28
+ /** A release, as a Machine's metadata records it. */
29
+ export interface MachineRelease {
30
+ /** The release's digest (`sha256:...`): what the release ledger records. */
31
+ digest: string;
32
+ /** The commit it was built from. */
33
+ gitSha?: string;
34
+ /** A human label for it. */
35
+ release?: string;
36
+ /** The digest of the release it replaced, when there was one. */
37
+ previousDigest?: string;
38
+ }
39
+
40
+ export type MachineConfig = Record<string, unknown> & { metadata?: Record<string, string>; env?: Record<string, string> };
41
+
42
+ /** The release a Machine's metadata names, or undefined when it names none. Pure. */
43
+ export function readMachineRelease(metadata: Record<string, string> | null | undefined): MachineRelease | undefined {
44
+ const digest = metadata?.[RELEASE_METADATA_KEYS.digest];
45
+ if (!digest) return undefined;
46
+ const gitSha = metadata?.[RELEASE_METADATA_KEYS.gitSha];
47
+ const release = metadata?.[RELEASE_METADATA_KEYS.release];
48
+ const previousDigest = metadata?.[RELEASE_METADATA_KEYS.previousDigest];
49
+ return {
50
+ digest,
51
+ ...(gitSha ? { gitSha } : {}),
52
+ ...(release ? { release } : {}),
53
+ ...(previousDigest ? { previousDigest } : {}),
54
+ };
55
+ }
56
+
57
+ /**
58
+ * A Machine config serving `release`: a copy of `config` with the release's
59
+ * metadata keys set (and any it does not carry removed). Pure.
60
+ */
61
+ export function withReleaseMetadata(config: MachineConfig | undefined, release: MachineRelease): MachineConfig {
62
+ const out = structuredClone(config ?? {}) as MachineConfig;
63
+ const metadata = { ...(out.metadata ?? {}) };
64
+ for (const key of Object.values(RELEASE_METADATA_KEYS)) delete metadata[key];
65
+ metadata[RELEASE_METADATA_KEYS.digest] = release.digest;
66
+ if (release.gitSha) metadata[RELEASE_METADATA_KEYS.gitSha] = release.gitSha;
67
+ if (release.release) metadata[RELEASE_METADATA_KEYS.release] = release.release;
68
+ if (release.previousDigest) metadata[RELEASE_METADATA_KEYS.previousDigest] = release.previousDigest;
69
+ out.metadata = metadata;
70
+ return out;
71
+ }
72
+
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Where a Fly release's Machine config is kept, so a rollback can put it back
3
+ * (#2736, ws-056).
4
+ *
5
+ * The Machine's metadata says which release it serves and which one it
6
+ * replaced; the config that earlier release applied is kept on the
7
+ * `chant/lifecycle` branch beside the release ledger, one file per release at
8
+ * `<env>/fly/<app>/<machine>/<digest>.json`. It is written through core's
9
+ * ledger plumbing, so a workspace member's copy lands under its own prefix,
10
+ * and every checkout that fetches the branch can roll back.
11
+ *
12
+ * Not exported from the package entry point: it spawns git, which stays off
13
+ * the build path. The `fly-release` and `fly-rollback` capabilities import it.
14
+ */
15
+
16
+ import { readBlobFromPath, writeBlobToPath } from "@intentius/chant/lifecycle/git";
17
+
18
+ /** Which Machine and release a config belongs to. */
19
+ export interface MachineConfigRef {
20
+ app: string;
21
+ machine: string;
22
+ digest: string;
23
+ }
24
+
25
+ /** A store of the Machine config each release applied. */
26
+ export interface MachineConfigStore {
27
+ read(ref: MachineConfigRef): Promise<Record<string, unknown> | undefined>;
28
+ write(ref: MachineConfigRef, config: Record<string, unknown>): Promise<void>;
29
+ }
30
+
31
+ const safe = (s: string) => s.replace(/[^a-zA-Z0-9_.-]/g, "_");
32
+
33
+ /** The file a release's Machine config is kept in, under the environment's ledger directory. */
34
+ export function machineConfigFile(ref: MachineConfigRef): string {
35
+ return `fly/${safe(ref.app)}/${safe(ref.machine)}/${safe(ref.digest.replace(/^sha256:/, ""))}.json`;
36
+ }
37
+
38
+ /** The lifecycle-branch store for `environment`. */
39
+ export function lifecycleMachineConfigStore(environment: string, opts?: { cwd?: string }): MachineConfigStore {
40
+ return {
41
+ async read(ref) {
42
+ const content = await readBlobFromPath(environment, machineConfigFile(ref), opts);
43
+ return content === null ? undefined : (JSON.parse(content) as Record<string, unknown>);
44
+ },
45
+ async write(ref, config) {
46
+ await writeBlobToPath(
47
+ environment,
48
+ machineConfigFile(ref),
49
+ `${JSON.stringify(config, null, 2)}\n`,
50
+ `Fly release config ${ref.app}/${ref.machine} ${ref.digest}`,
51
+ opts,
52
+ );
53
+ },
54
+ };
55
+ }
56
+
57
+ /** An in-memory store, for tests and for a caller with nowhere to keep configs. */
58
+ export function memoryMachineConfigStore(): MachineConfigStore & { entries: Map<string, Record<string, unknown>> } {
59
+ const entries = new Map<string, Record<string, unknown>>();
60
+ return {
61
+ entries,
62
+ async read(ref) {
63
+ const found = entries.get(machineConfigFile(ref));
64
+ return found ? structuredClone(found) : undefined;
65
+ },
66
+ async write(ref, config) {
67
+ entries.set(machineConfigFile(ref), structuredClone(config));
68
+ },
69
+ };
70
+ }
@@ -53,3 +53,36 @@ Each prune logs the resource and endpoint it removed, so a prune run is auditabl
53
53
  ## Re-applying is safe
54
54
 
55
55
  A re-apply of an unchanged stack is a no-op per resource: machines whose config is structurally equal to live are skipped, volumes and certificates that already exist are skipped, and an IP of an already-present family is skipped. Only apply-only secrets are always re-set, because flaps exposes no value to diff against.
56
+
57
+ ## Releases on a Machine
58
+
59
+ A component can deploy to Fly with this lexicon alone. It declares an `App` and the `Machine` that serves, builds them with `chant build --lexicon fly -o dist/fly.json`, and deploys with the `fly-release` step. Here a `Publish` phase (`publish-image`, elided) pushes the image, and the release serves it by digest:
60
+
61
+ ```ts
62
+ import { phase, type Component } from "@intentius/chant/components";
63
+
64
+ export const web: Component = {
65
+ name: "web",
66
+ deploy: [
67
+ phase("Publish", [/* publish-image */]),
68
+ phase("Release", [
69
+ {
70
+ kind: "fly-release",
71
+ plan: "dist/fly.json",
72
+ digest: "@Publish.digest",
73
+ image: "@Publish.uri",
74
+ migrations: [{ name: "001_init.sql", command: "node migrate.js 001_init.sql" }],
75
+ verify: { url: "https://web.example.com", healthPath: "/health" },
76
+ },
77
+ ]),
78
+ ],
79
+ };
80
+ ```
81
+
82
+ The step updates the Machine in place with the release in its `config.metadata`: `chant-release-digest`, `chant-release-git-sha` (the commit, `git rev-parse HEAD` unless given), and `chant-release-previous-digest` (the release it replaced). Each migration then runs inside the Machine through the Machines API's exec, once per environment: its receipt is kept on `chant/lifecycle` at `<env>/receipts/`, and a migration fires again only when its `sha` (or command) changes. After a migration fires, the Machine restarts, and the step checks that it is started with this release and, given a `url`, that its health endpoint answers with this commit or digest. If anything fails after the Machine changed, the step puts back the config the Machine served before (on a first release, it stops the Machine) and fails.
83
+
84
+ The step's output carries `uri` and `digest`, so `chant run --components web --env prod` records the release in the ledger. `chant components status prod --live` reads the Machine's metadata back and compares its digest with the ledger's: the row is `reconciled` when they agree and `drifted` when the Machine serves something the ledger does not name. The component joins the Machine by name: name the component after the Machine entity, or list it in `liveNames`.
85
+
86
+ Each release's Machine config is kept on `chant/lifecycle` at `<env>/fly/<app>/<machine>/<digest>.json`. `fly-rollback` puts back the config of the release the serving one replaced (or the digest given as `to`), checks it, and outputs that digest so the ledger records it again. `fly-release`'s own saga compensation does the same.
87
+
88
+ The steps are also Op activities, for an Op that composes them itself: `flyMachineRelease`, `flyMachineExec`, `flyMachineRestart`, `flyMachineStop`, `flyMachineVerify` and `flyMachineRestore`. Wrap a migration's `flyMachineExec` in `effect()` so it fires once.
@@ -78,7 +78,7 @@ When the `Run` phase's command exits non-zero, `spriteExec` throws, the phase fa
78
78
 
79
79
  ## Targeting the emulator or real Sprites
80
80
 
81
- The activities resolve their endpoint in this order: an explicit `endpoint` arg, then `SPRITES_BASE_URL`, then the real Sprites base. The same Op targets an emulator or real Sprites with no code change. The default `fetch` client adds `Authorization: Bearer ${SPRITES_API_TOKEN}` when a token is set; the emulator ignores it.
81
+ The activities resolve their endpoint in this order: an explicit `endpoint` arg, then `SPRITES_BASE_URL`, then its alias `SPRITES_API_URL` (the name the studio and wisp's own docs use), then the real Sprites base. The same Op targets an emulator or real Sprites with no code change. The default `fetch` client adds `Authorization: Bearer <token>` when a token is set — `SPRITES_API_TOKEN`, or its alias `SPRITE_TOKEN` — the emulator ignores it. Either alias is read only when the original name is unset, so an existing deployment using `SPRITES_BASE_URL`/`SPRITES_API_TOKEN` is unaffected.
82
82
 
83
83
  ```bash
84
84
  # Point at a self-hosted or in-process emulator.
@@ -105,9 +105,11 @@ The same lexicon ships more Sprite primitives, all imported from `@intentius/cha
105
105
  |--------|-----------|-----|
106
106
  | Filesystem (#848) | `spriteWriteFile` / `spriteReadFile` / `spriteListDir` / `spriteRemove` | stage an input file and read a result out without shelling `spriteExec` + `cat` |
107
107
  | Config reconcile (#849) | `spriteApplyNetworkPolicy` / `spriteApplyServices` | reconcile a Sprite's egress allowlist and background services against typed config (validated before any HTTP; a whole-object replace for policy, create-or-update by name for services) |
108
+ | Services (#2711) | `spriteServiceCreate` / `spriteServiceGet` / `spriteServiceList` / `spriteServiceStart` / `spriteServiceStop` / `spriteServiceDelete` / `spriteServiceLogs` | the single-service primitives underneath `spriteApplyServices` — create-and-start one long-lived service (a box's door, hud or chud), inspect or list what's running, stop/start or delete one by name, read its log tail |
109
+ | Sprite URL / delete (#2711) | `spriteUrl` / `spriteDelete` | resolve a Sprite's URL, optionally waiting until a path on it answers; delete the Sprite (`spriteDelete` is `spriteDestroy` under the name spritzer/wisp and the other lexicons' delete activities use — same call, either name) |
108
110
  | Keep-alive (#847) | `spriteTaskCreate` / `spriteTaskRefresh` / `spriteTaskRelease` | hold a Sprite active for a session so it will not pause; a session past the 1-hour task cap refreshes on an interval |
109
111
 
110
- These are still runtime-orchestration primitives, not declarable resources — a Sprite has no desired-state create body to reconcile.
112
+ These are still runtime-orchestration primitives, not declarable resources — a Sprite has no desired-state create body to reconcile. Services created directly with `spriteServiceCreate` are what a box's `spritzer` preset provisions door/hud/chud on (arugula-salad/studio#27) — the same wire surface as `sprite-env services` inside the sprite, spritzer 0.6.0's container mode, and wisp.
111
113
 
112
114
  ## Where it fits
113
115