@intentius/chant-lexicon-fly 0.16.0 → 0.18.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.
- package/README.md +2 -2
- package/dist/composites/fly-deploy.d.ts +1 -1
- package/dist/composites/fly-deploy.d.ts.map +1 -1
- package/dist/coverage.d.ts +15 -0
- package/dist/coverage.d.ts.map +1 -0
- package/dist/emulator-freshness-cli.d.ts +11 -0
- package/dist/emulator-freshness-cli.d.ts.map +1 -0
- package/dist/emulator-freshness.d.ts +38 -0
- package/dist/emulator-freshness.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/mcp/context-tools.d.ts +15 -0
- package/dist/mcp/context-tools.d.ts.map +1 -0
- package/dist/op/activities/emulator-images.d.ts +20 -0
- package/dist/op/activities/emulator-images.d.ts.map +1 -0
- package/dist/op/activities/flaps.d.ts +1 -1
- package/dist/op/activities/flaps.d.ts.map +1 -1
- package/dist/op/activities/index.d.ts +4 -0
- package/dist/op/activities/index.d.ts.map +1 -1
- package/dist/op/activities/machines-contract.d.ts +36 -0
- package/dist/op/activities/machines-contract.d.ts.map +1 -0
- package/dist/op/activities/sprites-contract.d.ts +45 -0
- package/dist/op/activities/sprites-contract.d.ts.map +1 -0
- package/dist/op/activities/sprites-emulator.d.ts +29 -0
- package/dist/op/activities/sprites-emulator.d.ts.map +1 -0
- package/dist/op/activities/sprites-fake.d.ts +62 -0
- package/dist/op/activities/sprites-fake.d.ts.map +1 -0
- package/dist/op/activities/sprites.d.ts +195 -0
- package/dist/op/activities/sprites.d.ts.map +1 -0
- package/dist/plugin.d.ts.map +1 -1
- package/dist/reference-catalog.d.ts +21 -0
- package/dist/reference-catalog.d.ts.map +1 -0
- package/package.json +6 -2
- package/src/composites/fly-deploy.ts +1 -1
- package/src/coverage.ts +49 -0
- package/src/emulator-freshness-cli.ts +49 -0
- package/src/emulator-freshness.test.ts +86 -0
- package/src/emulator-freshness.ts +87 -0
- package/src/index.ts +15 -0
- package/src/mcp/context-tools.test.ts +27 -0
- package/src/mcp/context-tools.ts +120 -0
- package/src/op/activities/emulator-images.ts +21 -0
- package/src/op/activities/flaps.test.ts +2 -1
- package/src/op/activities/flaps.ts +3 -2
- package/src/op/activities/index.ts +53 -0
- package/src/op/activities/machines-contract.docker.integration.test.ts +72 -0
- package/src/op/activities/machines-contract.test.ts +49 -0
- package/src/op/activities/machines-contract.ts +73 -0
- package/src/op/activities/sprites-contract.docker.integration.test.ts +74 -0
- package/src/op/activities/sprites-contract.test.ts +60 -0
- package/src/op/activities/sprites-contract.ts +61 -0
- package/src/op/activities/sprites-emulator.ts +46 -0
- package/src/op/activities/sprites-fake.ts +314 -0
- package/src/op/activities/sprites.docker.integration.test.ts +99 -0
- package/src/op/activities/sprites.integration.test.ts +158 -0
- package/src/op/activities/sprites.real.test.ts +56 -0
- package/src/op/activities/sprites.test.ts +296 -0
- package/src/op/activities/sprites.ts +527 -0
- package/src/plugin.ts +28 -5
- package/src/reference-catalog.test.ts +50 -0
- package/src/reference-catalog.ts +39 -0
- package/src/skills/chant-fly-patterns.md +2 -2
- package/src/skills/chant-fly-sprites.md +104 -0
- package/src/skills/chant-fly.md +2 -2
- package/src/generated/.gitkeep +0 -0
package/README.md
CHANGED
|
@@ -26,9 +26,9 @@ It fits two kinds of user: teams running on Fly who want their infrastructure as
|
|
|
26
26
|
## Author infrastructure as typed code
|
|
27
27
|
|
|
28
28
|
```ts
|
|
29
|
-
import { App, Machine, MachineConfig, MachineGuest } from "@intentius/chant-lexicon-fly";
|
|
29
|
+
import { App, Machine, MachineConfig, MachineGuest, Fly } from "@intentius/chant-lexicon-fly";
|
|
30
30
|
|
|
31
|
-
export const app = new App({ name: "my-app" });
|
|
31
|
+
export const app = new App({ name: "my-app", org_slug: Fly.OrgSlug });
|
|
32
32
|
|
|
33
33
|
export const web = new Machine({
|
|
34
34
|
region: "iad",
|
|
@@ -32,7 +32,7 @@ export interface FlapsStepOpts {
|
|
|
32
32
|
name?: string;
|
|
33
33
|
/** Host port mapped to the emulator's `:4280`. Default: `4280`. */
|
|
34
34
|
port?: number;
|
|
35
|
-
/** Image. Default: `
|
|
35
|
+
/** Image. Default: the pinned mudflaps image (`MUDFLAPS_IMAGE`, from the flapsUp activity). */
|
|
36
36
|
image?: string;
|
|
37
37
|
/** Readiness timeout in ms. */
|
|
38
38
|
timeoutMs?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fly-deploy.d.ts","sourceRoot":"","sources":["../../src/composites/fly-deploy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,oEAAoE;AACpE,eAAO,MAAM,oBAAoB,0BAA0B,CAAC;AAE5D,gEAAgE;AAChE,MAAM,WAAW,aAAa;IAC5B,iDAAiD;IACjD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd
|
|
1
|
+
{"version":3,"file":"fly-deploy.d.ts","sourceRoot":"","sources":["../../src/composites/fly-deploy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,oEAAoE;AACpE,eAAO,MAAM,oBAAoB,0BAA0B,CAAC;AAE5D,gEAAgE;AAChE,MAAM,WAAW,aAAa;IAC5B,iDAAiD;IACjD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+FAA+F;IAC/F,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+BAA+B;IA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AC3E,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,wEAAwE;IACxE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,IAAI,GAAE,aAAkB,GAAG,YAAY,CAAC,OAAO,UAAU,CAAC,CAyCnF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Coverage analysis for the fly lexicon (#804) — how much of the generated
|
|
3
|
+
* Machines API surface the lexicon's typed resources cover. Thin wrapper over
|
|
4
|
+
* the shared `computeCoverage`, mirroring the docker/gcp/github peers.
|
|
5
|
+
*/
|
|
6
|
+
import { computeCoverage, overallPct, formatSummary, formatVerbose, checkThresholds, type CoverageReport, type CoverageThresholds } from "@intentius/chant/codegen/coverage";
|
|
7
|
+
export type { CoverageReport, CoverageThresholds };
|
|
8
|
+
export { computeCoverage, overallPct, formatSummary, formatVerbose, checkThresholds };
|
|
9
|
+
/** Run coverage analysis for the fly lexicon. */
|
|
10
|
+
export declare function analyzeFlyCoverage(opts?: {
|
|
11
|
+
basePath?: string;
|
|
12
|
+
verbose?: boolean;
|
|
13
|
+
minOverall?: number;
|
|
14
|
+
}): Promise<CoverageReport>;
|
|
15
|
+
//# sourceMappingURL=coverage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coverage.d.ts","sourceRoot":"","sources":["../src/coverage.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,EACL,eAAe,EACf,UAAU,EACV,aAAa,EACb,aAAa,EACb,eAAe,EACf,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACxB,MAAM,mCAAmC,CAAC;AAE3C,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,aAAa,EAAE,aAAa,EAAE,eAAe,EAAE,CAAC;AAEtF,iDAAiD;AACjD,wBAAsB,kBAAkB,CAAC,IAAI,CAAC,EAAE;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,OAAO,CAAC,cAAc,CAAC,CAqB1B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI for the emulator-freshness check (#808 T2). Fetches the latest mudflaps /
|
|
3
|
+
* spritzer releases, compares to the pinned tags, prints a report, and — when
|
|
4
|
+
* run in CI — writes `behind` + a Markdown `body` to `$GITHUB_OUTPUT` so the
|
|
5
|
+
* weekly workflow can open/refresh a single "N releases behind" notice issue.
|
|
6
|
+
*
|
|
7
|
+
* Advisory only: exits 0 whether or not a pin is behind (the bump is a human
|
|
8
|
+
* decision per the #808 policy). A hard failure (network/API) exits 1.
|
|
9
|
+
*/
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=emulator-freshness-cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emulator-freshness-cli.d.ts","sourceRoot":"","sources":["../src/emulator-freshness-cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Emulator-freshness check (#808 T2, second half).
|
|
3
|
+
*
|
|
4
|
+
* mudflaps (Machines) and spritzer (Sprites) are pinned to a single source
|
|
5
|
+
* (./op/activities/emulator-images.ts). Their upstream repos cut GitHub releases,
|
|
6
|
+
* so this compares each pinned tag against the latest release and reports how far
|
|
7
|
+
* behind it is. A weekly workflow surfaces a "N releases behind" notice — never
|
|
8
|
+
* an auto-bump. Per the bump policy (#808), the tag moves only when a consuming
|
|
9
|
+
* test needs the newer emulator, so this is advisory, not gating on the pin.
|
|
10
|
+
*/
|
|
11
|
+
export interface EmulatorPin {
|
|
12
|
+
/** Short name, e.g. "mudflaps". */
|
|
13
|
+
name: string;
|
|
14
|
+
/** GitHub repo "owner/name" whose releases publish the emulator. */
|
|
15
|
+
repo: string;
|
|
16
|
+
/** Pinned version, no leading "v" (e.g. "0.3.1"). */
|
|
17
|
+
pinned: string;
|
|
18
|
+
}
|
|
19
|
+
export interface FreshnessResult {
|
|
20
|
+
name: string;
|
|
21
|
+
pinned: string;
|
|
22
|
+
latest: string;
|
|
23
|
+
/** True when the latest release is newer than the pinned version. */
|
|
24
|
+
behind: boolean;
|
|
25
|
+
}
|
|
26
|
+
/** Parse the version tag from a ghcr image ref (".../mudflaps:0.3.1" → "0.3.1"). */
|
|
27
|
+
export declare function parseVersion(image: string): string;
|
|
28
|
+
/** Compare pinned vs latest as dotted numeric versions; `behind` when latest > pinned. */
|
|
29
|
+
export declare function compare(name: string, pinned: string, latest: string): FreshnessResult;
|
|
30
|
+
/** The emulator pins to check, read from the single-source image constants. */
|
|
31
|
+
export declare const EMULATOR_PINS: readonly EmulatorPin[];
|
|
32
|
+
/** Fetch the latest release tag for a repo via the GitHub REST API. */
|
|
33
|
+
export declare function latestRelease(repo: string, fetchImpl?: typeof fetch): Promise<string>;
|
|
34
|
+
/** Check every emulator pin against its latest release. */
|
|
35
|
+
export declare function checkFreshness(fetchImpl?: typeof fetch): Promise<FreshnessResult[]>;
|
|
36
|
+
/** One-line human summary of a result. */
|
|
37
|
+
export declare function formatResult(r: FreshnessResult): string;
|
|
38
|
+
//# sourceMappingURL=emulator-freshness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emulator-freshness.d.ts","sourceRoot":"","sources":["../src/emulator-freshness.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,MAAM,WAAW,WAAW;IAC1B,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,oEAAoE;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,qDAAqD;IACrD,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,qEAAqE;IACrE,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,oFAAoF;AACpF,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGlD;AAMD,0FAA0F;AAC1F,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,eAAe,CAcrF;AAED,+EAA+E;AAC/E,eAAO,MAAM,aAAa,EAAE,SAAS,WAAW,EAGtC,CAAC;AAEX,uEAAuE;AACvE,wBAAsB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,GAAE,OAAO,KAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CAQlG;AAED,2DAA2D;AAC3D,wBAAsB,cAAc,CAAC,SAAS,GAAE,OAAO,KAAa,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CAIhG;AAED,0CAA0C;AAC1C,wBAAgB,YAAY,CAAC,CAAC,EAAE,eAAe,GAAG,MAAM,CAIvD"}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,5 +4,6 @@ export { Fly, Region, OrgSlug, AppName, PseudoParameter } from "./pseudo.js";
|
|
|
4
4
|
export { FLY_METADATA_OWNERSHIP_KEYS } from "./ownership.js";
|
|
5
5
|
export { flyDeploy, flapsUp, flapsDown, flyApplyStep, LOCAL_FLAPS_ENDPOINT } from "./composites/fly-deploy.js";
|
|
6
6
|
export type { FlyDeployOpts, FlyApplyStepOpts, FlapsStepOpts } from "./composites/fly-deploy.js";
|
|
7
|
+
export { spriteCreate, spriteExec, spriteCheckpoint, spriteRestore, listCheckpoints, spriteDestroy, spritesUp, spritesDown, } from "@intentius/chant/op";
|
|
7
8
|
export * from "./generated/index.js";
|
|
8
9
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAGrC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAI7C,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAG1E,OAAO,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAK1D,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC5G,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAGrC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAI7C,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAG1E,OAAO,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAK1D,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC5G,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAM9F,OAAO,EACL,YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,aAAa,EACb,SAAS,EACT,WAAW,GACZ,MAAM,qBAAqB,CAAC;AAK7B,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Read-only MCP tools that expose what `chant build` already computes about a
|
|
3
|
+
* Fly deploy — its apps and machines, the flaps create bodies, image pinning,
|
|
4
|
+
* and the lexicon's findings — so an agent can ask about a change *before it
|
|
5
|
+
* runs* (#804).
|
|
6
|
+
*
|
|
7
|
+
* Every tool builds from source and returns data. None touch a live Fly org,
|
|
8
|
+
* read run history, or write anything — the same context-producer boundary the
|
|
9
|
+
* AWS/GitLab context tools hold.
|
|
10
|
+
*/
|
|
11
|
+
import type { McpToolContribution } from "@intentius/chant/mcp/types";
|
|
12
|
+
/** A container image reference is pinned when it names a digest, not a tag. */
|
|
13
|
+
export declare function imagePinned(image: string): boolean;
|
|
14
|
+
export declare function flyContextTools(): McpToolContribution[];
|
|
15
|
+
//# sourceMappingURL=context-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-tools.d.ts","sourceRoot":"","sources":["../../src/mcp/context-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AA+BtE,+EAA+E;AAC/E,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAElD;AAED,wBAAgB,eAAe,IAAI,mBAAmB,EAAE,CAoEvD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single source of truth for the Fly emulator image pins (#808 T2).
|
|
3
|
+
*
|
|
4
|
+
* mudflaps (Machines API) and spritzer (Sprites API) are the local fakes fly's
|
|
5
|
+
* activities are exercised against. These tags were previously duplicated across
|
|
6
|
+
* flaps.ts, sprites-emulator.ts, the fly-deploy composite, and tests — and had
|
|
7
|
+
* already drifted (the composite's docstring said mudflaps 0.3.0 while the
|
|
8
|
+
* activity pinned 0.3.1). Pin each here so a bump touches one line and the
|
|
9
|
+
* emulator-freshness check (#808 T2) has a single target to compare against the
|
|
10
|
+
* latest GHCR release.
|
|
11
|
+
*
|
|
12
|
+
* Bump policy (#808): move these only when a consuming test needs a newer
|
|
13
|
+
* emulator (a fidelity fix the activities exercise), not on every emulator
|
|
14
|
+
* release. For new upstream API surface the emulator leads, then fly bumps here.
|
|
15
|
+
*/
|
|
16
|
+
/** Pinned mudflaps (Fly Machines / flaps emulator) image. */
|
|
17
|
+
export declare const MUDFLAPS_IMAGE = "ghcr.io/intentius/mudflaps:0.4.0";
|
|
18
|
+
/** Pinned spritzer (Fly Sprites emulator) image. */
|
|
19
|
+
export declare const SPRITZER_IMAGE = "ghcr.io/intentius/spritzer:0.3.1";
|
|
20
|
+
//# sourceMappingURL=emulator-images.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emulator-images.d.ts","sourceRoot":"","sources":["../../../src/op/activities/emulator-images.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,6DAA6D;AAC7D,eAAO,MAAM,cAAc,qCAAqC,CAAC;AAEjE,oDAAoD;AACpD,eAAO,MAAM,cAAc,qCAAqC,CAAC"}
|
|
@@ -3,7 +3,7 @@ export interface FlapsUpArgs {
|
|
|
3
3
|
name?: string;
|
|
4
4
|
/** Host port mapped to the emulator's `:4280`. Default: `4280`. */
|
|
5
5
|
port?: number;
|
|
6
|
-
/** Image. Default:
|
|
6
|
+
/** Image. Default: the pinned mudflaps image ({@link MUDFLAPS_IMAGE}). */
|
|
7
7
|
image?: string;
|
|
8
8
|
/** Readiness timeout in ms. Default: `60000`. */
|
|
9
9
|
timeoutMs?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flaps.d.ts","sourceRoot":"","sources":["../../../src/op/activities/flaps.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"flaps.d.ts","sourceRoot":"","sources":["../../../src/op/activities/flaps.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,WAAW;IAC1B,iDAAiD;IACjD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0EAA0E;IAC1E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mDAAmD;IACnD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B,2DAA2D;IAC3D,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAYD,eAAO,MAAM,kBAAkB,0BAAsB,CAAC;AACtD,eAAO,MAAM,cAAc,0BAAkB,CAAC;AAC9C,eAAO,MAAM,cAAc,0BAAkB,CAAC;AAC9C,4FAA4F;AAC5F,eAAO,MAAM,aAAa,0BAAiB,CAAC;AAC5C,eAAO,MAAM,eAAe,GAAI,OAAM,WAAgB,KAAG,MAAgC,CAAC;AAE1F,2FAA2F;AAC3F,eAAO,MAAM,OAAO,GAAI,OAAM,WAAgB,EAAE,SAAS,WAAW,KAAG,OAAO,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAC3E,CAAC;AAEzB,4EAA4E;AAC5E,eAAO,MAAM,SAAS,GAAI,OAAM,aAAkB,EAAE,SAAS,WAAW,KAAG,OAAO,CAAC,IAAI,CAC7D,CAAC"}
|
|
@@ -9,4 +9,8 @@ export { flyApply, flyDelete, applyApp, applyMachine, destroyMachine, deleteApp,
|
|
|
9
9
|
export type { FlyApplyArgs, FlyPlan, FlapsRequest, FlapsMachine, FlyHttp, WaitOpts, ApplyCtx } from "./fly-apply.js";
|
|
10
10
|
export { flapsUp, flapsDown, flapsRunCommand, flapsRmCommand, flapsExistsCommand, flapsHealthUrl, flapsEndpoint, } from "./flaps.js";
|
|
11
11
|
export type { FlapsUpArgs, FlapsDownArgs } from "./flaps.js";
|
|
12
|
+
export { spriteCreate, spriteExec, spriteCheckpoint, spriteRestore, listCheckpoints, spriteDestroy, resolveSpritesEndpoint, defaultSpritesHttp, spriteCreateBody, parseCreateResponse, accumulateExecFrames, parseCheckpointNdjson, pickCheckpointByComment, splitCommand, spriteExecWsUrl, DEFAULT_SPRITES_BASE_URL, } from "./sprites.js";
|
|
13
|
+
export type { SpritesHttp, SpriteCreateArgs, SpriteCreateResult, SpriteExecArgs, SpriteExecResult, SpriteCheckpointArgs, SpriteCheckpointResult, SpriteRestoreArgs, ListCheckpointsArgs, Checkpoint, SpriteDestroyArgs, } from "./sprites.js";
|
|
14
|
+
export { spritesUp, spritesDown, spritesRunCommand, spritesRmCommand, spritesExistsCommand, spritesHealthUrl, spritesEndpoint, } from "./sprites-emulator.js";
|
|
15
|
+
export type { SpritesUpArgs, SpritesDownArgs } from "./sprites-emulator.js";
|
|
12
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/op/activities/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EACL,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,SAAS,EACT,YAAY,EACZ,aAAa,EACb,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,eAAe,EACf,SAAS,EACT,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,UAAU,EACV,kBAAkB,EAClB,YAAY,EACZ,WAAW,EACX,eAAe,EACf,cAAc,EACd,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAIlH,OAAO,EACL,OAAO,EACP,SAAS,EACT,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/op/activities/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EACL,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,SAAS,EACT,YAAY,EACZ,aAAa,EACb,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,eAAe,EACf,SAAS,EACT,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,UAAU,EACV,kBAAkB,EAClB,YAAY,EACZ,WAAW,EACX,eAAe,EACf,cAAc,EACd,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAIlH,OAAO,EACL,OAAO,EACP,SAAS,EACT,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAQ1D,OAAO,EACL,YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,aAAa,EACb,sBAAsB,EACtB,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,uBAAuB,EACvB,YAAY,EACZ,eAAe,EACf,wBAAwB,GACzB,MAAM,WAAW,CAAC;AACnB,YAAY,EACV,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,mBAAmB,EACnB,UAAU,EACV,iBAAiB,GAClB,MAAM,WAAW,CAAC;AAMnB,OAAO,EACL,SAAS,EACT,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,GAChB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fly Machines (flaps) API contract — the endpoint set the `flyApply` applier
|
|
3
|
+
* (./fly-apply.ts) depends on, and the mudflaps counterpart of the hand-authored
|
|
4
|
+
* Sprites contract (./sprites-contract.ts, #808 T3).
|
|
5
|
+
*
|
|
6
|
+
* Unlike Sprites, Machines *does* ship a machine-readable OpenAPI that the fly
|
|
7
|
+
* resource surface drift-checks against (docs.machines.dev, the rolling-upgrade
|
|
8
|
+
* path #813). This contract serves a different fidelity axis: it pins the exact
|
|
9
|
+
* endpoints flyApply calls so the docker-gated coverage test can prove the pinned
|
|
10
|
+
* mudflaps emulator serves them all. mudflaps carries roadmap endpoints that
|
|
11
|
+
* answer 501 (currently machines/{id}/signal, /exec, /ps) — flyApply must never
|
|
12
|
+
* depend on one; if it ever does, the coverage test fails instead of the applier
|
|
13
|
+
* silently passing against a fake that can't model the call.
|
|
14
|
+
*
|
|
15
|
+
* Param names match ./fly-apply.ts's URL builders (`{app}`, `{id}`); the coverage
|
|
16
|
+
* check normalizes param names before comparing, since mudflaps spells volume
|
|
17
|
+
* ids `{vol}` and cert hostnames `{hostname}`.
|
|
18
|
+
*/
|
|
19
|
+
/** One flaps endpoint the flyApply applier calls. */
|
|
20
|
+
export interface MachinesEndpoint {
|
|
21
|
+
method: "GET" | "POST" | "PUT" | "DELETE";
|
|
22
|
+
/** Path template under the flaps base, e.g. `/v1/apps/{app}/machines/{id}`. */
|
|
23
|
+
path: string;
|
|
24
|
+
/** The applier operation that calls it. */
|
|
25
|
+
op: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The flaps endpoints ./fly-apply.ts depends on. Keep in sync with the applier —
|
|
29
|
+
* the unit test asserts every path segment appears in fly-apply.ts.
|
|
30
|
+
*/
|
|
31
|
+
export declare const MACHINES_CONTRACT: readonly MachinesEndpoint[];
|
|
32
|
+
/** Normalize a `METHOD path` key: collapse every `{param}` to `{}` so param names match. */
|
|
33
|
+
export declare function normalizeEndpoint(method: string, path: string): string;
|
|
34
|
+
/** The contract as a set of normalized `METHOD path` keys. */
|
|
35
|
+
export declare function contractKeys(): Set<string>;
|
|
36
|
+
//# sourceMappingURL=machines-contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"machines-contract.d.ts","sourceRoot":"","sources":["../../../src/op/activities/machines-contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,qDAAqD;AACrD,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,CAAC;IAC1C,+EAA+E;IAC/E,IAAI,EAAE,MAAM,CAAC;IACb,2CAA2C;IAC3C,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS,gBAAgB,EA8B/C,CAAC;AAEX,4FAA4F;AAC5F,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAEtE;AAED,8DAA8D;AAC9D,wBAAgB,YAAY,IAAI,GAAG,CAAC,MAAM,CAAC,CAE1C"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hand-authored Fly Sprites API contract (#808 T3).
|
|
3
|
+
*
|
|
4
|
+
* The Fly Machines API ships a machine-readable OpenAPI (docs.machines.dev) that
|
|
5
|
+
* the fly resource surface generates + drift-checks against. The Sprites API
|
|
6
|
+
* (api.sprites.dev) ships no such spec at any conventional path, so there is
|
|
7
|
+
* nothing to diff automatically. This module is the manual stand-in: the exact
|
|
8
|
+
* endpoint set the fly sprite activities (./sprites.ts) depend on, maintained by
|
|
9
|
+
* hand from https://docs.sprites.dev.
|
|
10
|
+
*
|
|
11
|
+
* It anchors two fidelity checks:
|
|
12
|
+
* 1. Coverage — every endpoint here must be served by the pinned spritzer
|
|
13
|
+
* emulator (its `/_spritzer/health` enumerates implemented paths). If an
|
|
14
|
+
* activity ever calls something spritzer doesn't model, the docker-gated
|
|
15
|
+
* contract test fails instead of silently passing against a partial fake.
|
|
16
|
+
* 2. Drift anchor — when the Sprites API changes, a human updates this file;
|
|
17
|
+
* reviewers see exactly which activity/endpoint moved.
|
|
18
|
+
*
|
|
19
|
+
* Path params are written with names matching ./sprites.ts (`{id}`, `{cp}`);
|
|
20
|
+
* the coverage check normalizes param names before comparing, since spritzer
|
|
21
|
+
* spells the checkpoint id `{cid}`.
|
|
22
|
+
*/
|
|
23
|
+
/** One endpoint the fly sprite activities call. */
|
|
24
|
+
export interface SpritesEndpoint {
|
|
25
|
+
/** HTTP method, or "WS" for the control-WebSocket exec channel. */
|
|
26
|
+
method: "GET" | "POST" | "DELETE" | "WS";
|
|
27
|
+
/** Path template under the Sprites base, e.g. `/v1/sprites/{id}/checkpoint`. */
|
|
28
|
+
path: string;
|
|
29
|
+
/** The fly activity that calls it (./sprites.ts export). */
|
|
30
|
+
activity: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The Sprites endpoints ./sprites.ts depends on. Keep in sync with the activity
|
|
34
|
+
* implementations — the unit test asserts every sprite activity is represented.
|
|
35
|
+
*/
|
|
36
|
+
export declare const SPRITES_CONTRACT: readonly SpritesEndpoint[];
|
|
37
|
+
/**
|
|
38
|
+
* Normalize a `METHOD path` key for comparison across sources: collapse every
|
|
39
|
+
* `{param}` to `{}` (so `{cp}` and `{cid}` match) and treat the WebSocket exec
|
|
40
|
+
* channel as a `GET` (spritzer registers it as `GET .../exec`).
|
|
41
|
+
*/
|
|
42
|
+
export declare function normalizeEndpoint(method: string, path: string): string;
|
|
43
|
+
/** The contract as a set of normalized `METHOD path` keys. */
|
|
44
|
+
export declare function contractKeys(): Set<string>;
|
|
45
|
+
//# sourceMappingURL=sprites-contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sprites-contract.d.ts","sourceRoot":"","sources":["../../../src/op/activities/sprites-contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,mDAAmD;AACnD,MAAM,WAAW,eAAe;IAC9B,mEAAmE;IACnE,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,QAAQ,GAAG,IAAI,CAAC;IACzC,gFAAgF;IAChF,IAAI,EAAE,MAAM,CAAC;IACb,4DAA4D;IAC5D,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAAS,eAAe,EAO7C,CAAC;AAEX;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAItE;AAED,8DAA8D;AAC9D,wBAAgB,YAAY,IAAI,GAAG,CAAC,MAAM,CAAC,CAE1C"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface SpritesUpArgs {
|
|
2
|
+
/** Container name. Default: `chant-spritzer`. */
|
|
3
|
+
name?: string;
|
|
4
|
+
/** Host port mapped to the emulator's `:4290`. Default: `4290`. */
|
|
5
|
+
port?: number;
|
|
6
|
+
/** Image. Default: the pinned spritzer image ({@link SPRITZER_IMAGE}). */
|
|
7
|
+
image?: string;
|
|
8
|
+
/** Readiness timeout in ms. Default: `60000`. */
|
|
9
|
+
timeoutMs?: number;
|
|
10
|
+
/** Health poll interval in ms. Default: `2000`. */
|
|
11
|
+
intervalMs?: number;
|
|
12
|
+
}
|
|
13
|
+
export interface SpritesDownArgs {
|
|
14
|
+
/** Container name to remove. Default: `chant-spritzer`. */
|
|
15
|
+
name?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const spritesExistsCommand: (name: string) => string;
|
|
18
|
+
export declare const spritesRmCommand: (name: string) => string;
|
|
19
|
+
export declare const spritesHealthUrl: (port: number) => string;
|
|
20
|
+
/** The Sprites endpoint URL (what the sprite activities' `SPRITES_BASE_URL`/`endpoint` points at). */
|
|
21
|
+
export declare const spritesEndpoint: (port: number) => string;
|
|
22
|
+
export declare const spritesRunCommand: (args?: SpritesUpArgs) => string;
|
|
23
|
+
/** Boot a local spritzer (Fly Sprites API emulator) in Docker and return its endpoint. */
|
|
24
|
+
export declare const spritesUp: (args?: SpritesUpArgs, signal?: AbortSignal) => Promise<{
|
|
25
|
+
endpoint: string;
|
|
26
|
+
}>;
|
|
27
|
+
/** Stop and remove the local spritzer container (no-op if already gone). */
|
|
28
|
+
export declare const spritesDown: (args?: SpritesDownArgs, signal?: AbortSignal) => Promise<void>;
|
|
29
|
+
//# sourceMappingURL=sprites-emulator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sprites-emulator.d.ts","sourceRoot":"","sources":["../../../src/op/activities/sprites-emulator.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,aAAa;IAC5B,iDAAiD;IACjD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0EAA0E;IAC1E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mDAAmD;IACnD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B,2DAA2D;IAC3D,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAaD,eAAO,MAAM,oBAAoB,0BAAyB,CAAC;AAC3D,eAAO,MAAM,gBAAgB,0BAAqB,CAAC;AACnD,eAAO,MAAM,gBAAgB,0BAAqB,CAAC;AACnD,sGAAsG;AACtG,eAAO,MAAM,eAAe,0BAAoB,CAAC;AACjD,eAAO,MAAM,iBAAiB,GAAI,OAAM,aAAkB,KAAG,MAAmC,CAAC;AAEjG,0FAA0F;AAC1F,eAAO,MAAM,SAAS,GAAI,OAAM,aAAkB,EAAE,SAAS,WAAW,KAAG,OAAO,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAC5E,CAAC;AAE5B,4EAA4E;AAC5E,eAAO,MAAM,WAAW,GAAI,OAAM,eAAoB,EAAE,SAAS,WAAW,KAAG,OAAO,CAAC,IAAI,CAC9D,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* In-process Sprites fake (#762, #766, S7) — a fake of the faithful Sprites API
|
|
3
|
+
* surface for offline, Docker-free integration tests.
|
|
4
|
+
*
|
|
5
|
+
* It models the lifecycle state machine and checkpoint/restore semantics, not
|
|
6
|
+
* real Firecracker VMs or real code execution (that fidelity is out of scope).
|
|
7
|
+
* A sprite's filesystem is a `Record<string, string>`; `exec` runs a small
|
|
8
|
+
* scripted interpreter that can write/modify an `fs` key so checkpoint/restore
|
|
9
|
+
* is observable; `checkpoint` deep-copies `fs` under a version id; `restore`
|
|
10
|
+
* replaces `fs` with that copy. Started in-process by a test and reached via
|
|
11
|
+
* `SPRITES_BASE_URL`, so the same activities that hit real Sprites hit the fake.
|
|
12
|
+
*
|
|
13
|
+
* The wire surface matches the released `spritzer:0.3.1` image so the CI
|
|
14
|
+
* fake-based test and the docker test exercise the same protocol:
|
|
15
|
+
* - `exec` over the control WebSocket with `[StreamID][payload]` binary framing;
|
|
16
|
+
* - `POST /checkpoint` (singular) returning NDJSON progress + a `complete` event;
|
|
17
|
+
* - `GET /checkpoints` returning a bare array of `{ id, comment, create_time, is_auto }`;
|
|
18
|
+
* - `POST /checkpoints/{id}/restore` returning NDJSON.
|
|
19
|
+
* Checkpoint ids are server versions (`v1`, `v2`, ...).
|
|
20
|
+
*/
|
|
21
|
+
type SpriteStatus = "starting" | "running" | "paused" | "destroyed";
|
|
22
|
+
interface StoredCheckpoint {
|
|
23
|
+
id: string;
|
|
24
|
+
comment: string;
|
|
25
|
+
create_time: string;
|
|
26
|
+
is_auto: boolean;
|
|
27
|
+
fs: Record<string, string>;
|
|
28
|
+
}
|
|
29
|
+
interface SpriteState {
|
|
30
|
+
id: string;
|
|
31
|
+
status: SpriteStatus;
|
|
32
|
+
url: string;
|
|
33
|
+
/** Filesystem model: path → contents. */
|
|
34
|
+
fs: Record<string, string>;
|
|
35
|
+
/** Checkpoints in creation order; each holds a full copy of `fs` at that time. */
|
|
36
|
+
checkpoints: StoredCheckpoint[];
|
|
37
|
+
/** Monotonic version counter for `v<N>` ids. */
|
|
38
|
+
version: number;
|
|
39
|
+
policy?: unknown;
|
|
40
|
+
}
|
|
41
|
+
interface ExecResult {
|
|
42
|
+
stdout: string;
|
|
43
|
+
stderr: string;
|
|
44
|
+
exitCode: number;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Run one command against a sprite's `fs`. Not a real shell: it recognizes a
|
|
48
|
+
* small set of forms so a test (and the example `guarded-task` Op) can write a
|
|
49
|
+
* key, then overwrite/fail it, and prove restore rewinds. Segments split on
|
|
50
|
+
* `;` run in order; the exit code is the last segment's (shell `;` semantics).
|
|
51
|
+
*/
|
|
52
|
+
export declare function fakeExec(sprite: SpriteState, cmd: string): ExecResult;
|
|
53
|
+
/**
|
|
54
|
+
* Start the in-process Sprites fake on an ephemeral port. Returns its base
|
|
55
|
+
* `url` (feed it to `SPRITES_BASE_URL`) and a `close()`.
|
|
56
|
+
*/
|
|
57
|
+
export declare function createSpritesFake(): Promise<{
|
|
58
|
+
url: string;
|
|
59
|
+
close(): Promise<void>;
|
|
60
|
+
}>;
|
|
61
|
+
export {};
|
|
62
|
+
//# sourceMappingURL=sprites-fake.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sprites-fake.d.ts","sourceRoot":"","sources":["../../../src/op/activities/sprites-fake.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAMH,KAAK,YAAY,GAAG,UAAU,GAAG,SAAS,GAAG,QAAQ,GAAG,WAAW,CAAC;AAEpE,UAAU,gBAAgB;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC5B;AAED,UAAU,WAAW;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,YAAY,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,yCAAyC;IACzC,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3B,kFAAkF;IAClF,WAAW,EAAE,gBAAgB,EAAE,CAAC;IAChC,gDAAgD;IAChD,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,UAAU,UAAU;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,GAAG,UAAU,CAwCrE;AAqCD;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE,CAAC,CA4KpF"}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sprites lifecycle activities (#762, #766) — imperative, checkpointable sandbox
|
|
3
|
+
* primitives ([sprites.dev](https://sprites.dev)) as chant Op activities, wired
|
|
4
|
+
* to the faithful Sprites API.
|
|
5
|
+
*
|
|
6
|
+
* Unlike a resource lexicon, Sprites have no desired state to reconcile: they
|
|
7
|
+
* are runtime-orchestration primitives (the same category as `k3dUp` /
|
|
8
|
+
* `httpCheck`). Most activities are a direct call over an injectable HTTP client
|
|
9
|
+
* (`SpritesHttp`); `spriteExec` is the exception — it speaks the control
|
|
10
|
+
* WebSocket exec protocol (non-PTY stream framing, per superfly/sprites-go), so
|
|
11
|
+
* it opens a `ws` connection instead. Exported pure helpers (endpoint
|
|
12
|
+
* resolution, the exec frame accumulator, NDJSON parsers, the comment picker)
|
|
13
|
+
* keep the logic unit-testable without a socket or an HTTP server.
|
|
14
|
+
*
|
|
15
|
+
* The headline capability is checkpoint-as-compensation (S5): an Op checkpoints
|
|
16
|
+
* before a risky phase and, on failure, `spriteRestore`s the labeled checkpoint
|
|
17
|
+
* instead of unwinding with an inverse action — the environment itself is the
|
|
18
|
+
* transaction.
|
|
19
|
+
*
|
|
20
|
+
* S3: endpoint override via `SPRITES_BASE_URL` (an explicit `endpoint` arg wins,
|
|
21
|
+
* then the env, then the real Sprites base), so the same Op targets real Sprites
|
|
22
|
+
* or the in-process fake with no code change.
|
|
23
|
+
*/
|
|
24
|
+
export declare const DEFAULT_SPRITES_BASE_URL = "https://api.sprites.dev";
|
|
25
|
+
/**
|
|
26
|
+
* Resolve the Sprites base URL (S3): an explicit `endpoint` arg wins, then the
|
|
27
|
+
* `SPRITES_BASE_URL` env, then the real-Sprites default. The trailing slash is
|
|
28
|
+
* stripped so `${base}/v1/...` never doubles up. Pure — mirrors fly's
|
|
29
|
+
* `resolveEndpoint`.
|
|
30
|
+
*/
|
|
31
|
+
export declare function resolveSpritesEndpoint(args?: {
|
|
32
|
+
endpoint?: string;
|
|
33
|
+
}, env?: NodeJS.ProcessEnv): string;
|
|
34
|
+
export declare const STREAM_STDIN = 0;
|
|
35
|
+
export declare const STREAM_STDOUT = 1;
|
|
36
|
+
export declare const STREAM_STDERR = 2;
|
|
37
|
+
export declare const STREAM_EXIT = 3;
|
|
38
|
+
export declare const STREAM_STDIN_EOF = 4;
|
|
39
|
+
/**
|
|
40
|
+
* Accumulate a stream of exec frames into `{ stdout, stderr, exitCode }`. Pure
|
|
41
|
+
* and socket-free so the framing is unit-testable: feed `[1]"hi\n"`, `[3]\x00`
|
|
42
|
+
* and get `{ stdout: "hi\n", exitCode: 0 }`. Per-stream payloads are collected
|
|
43
|
+
* as bytes and decoded once, so a multi-byte character split across frames is
|
|
44
|
+
* preserved. The exit code is the first byte of the `[3]` frame (0 when absent).
|
|
45
|
+
*/
|
|
46
|
+
export declare function accumulateExecFrames(frames: Iterable<Uint8Array>): SpriteExecResult;
|
|
47
|
+
/**
|
|
48
|
+
* Tokenize a command string into an argv, respecting single/double quotes so
|
|
49
|
+
* `sh -c "exit 7"` becomes `["sh", "-c", "exit 7"]`. Each element is sent as a
|
|
50
|
+
* `cmd` query param; `path` is `argv[0]`. Pure.
|
|
51
|
+
*/
|
|
52
|
+
export declare function splitCommand(cmd: string): string[];
|
|
53
|
+
/**
|
|
54
|
+
* Build the `wss://.../exec?cmd=...&path=...&stdin=false&cc=true` URL for a
|
|
55
|
+
* command (http→ws, https→wss). Pure.
|
|
56
|
+
*/
|
|
57
|
+
export declare function spriteExecWsUrl(base: string, id: string, cmd: string): string;
|
|
58
|
+
/**
|
|
59
|
+
* Parse a checkpoint create NDJSON body (line-delimited JSON progress events)
|
|
60
|
+
* and capture the created version id. Real Sprites tags each event with a
|
|
61
|
+
* `type` and a human `data` string — the version id rides inside the text
|
|
62
|
+
* (" ID: v1" and "Checkpoint v1 created successfully"), not a structured
|
|
63
|
+
* field. The in-process fake mirrors that. An older shape (`{event, id}`) is
|
|
64
|
+
* still honored so a structured id always wins. Pure; blank/unparseable lines
|
|
65
|
+
* are skipped; `checkpointId` is "" when the stream carries no id.
|
|
66
|
+
*/
|
|
67
|
+
export declare function parseCheckpointNdjson(text: string): SpriteCheckpointResult;
|
|
68
|
+
/**
|
|
69
|
+
* Pick the newest checkpoint whose `comment` matches, so a comment-tagged
|
|
70
|
+
* restore rewinds to the most recent labeled snapshot. Newest is by
|
|
71
|
+
* `create_time`; array order breaks ties (the list is chronological). Pure.
|
|
72
|
+
*/
|
|
73
|
+
export declare function pickCheckpointByComment(list: Checkpoint[], comment: string): Checkpoint | undefined;
|
|
74
|
+
export interface SpriteCreateArgs {
|
|
75
|
+
/** Caller-chosen name, used as the sprite `id` (S4). Every later activity keys on it. */
|
|
76
|
+
name: string;
|
|
77
|
+
/** Base image for the sandbox. */
|
|
78
|
+
image?: string;
|
|
79
|
+
/** Sandbox size (vCPU/memory class). */
|
|
80
|
+
size?: string;
|
|
81
|
+
/** Network / execution policy passed through to the sprite. */
|
|
82
|
+
policy?: unknown;
|
|
83
|
+
/** Endpoint override (S3). Default: `SPRITES_BASE_URL`, else real Sprites. */
|
|
84
|
+
endpoint?: string;
|
|
85
|
+
/** Bearer token. Default: `SPRITES_API_TOKEN`. The fake ignores it. */
|
|
86
|
+
token?: string;
|
|
87
|
+
}
|
|
88
|
+
export interface SpriteCreateResult {
|
|
89
|
+
id: string;
|
|
90
|
+
url: string;
|
|
91
|
+
}
|
|
92
|
+
export interface SpriteExecArgs {
|
|
93
|
+
/** Target sprite id (the `name` passed to `spriteCreate`). */
|
|
94
|
+
id: string;
|
|
95
|
+
/** Command to run inside the sprite (tokenized into argv, quotes respected). */
|
|
96
|
+
cmd: string;
|
|
97
|
+
/** Per-exec timeout in ms. */
|
|
98
|
+
timeoutMs?: number;
|
|
99
|
+
endpoint?: string;
|
|
100
|
+
token?: string;
|
|
101
|
+
}
|
|
102
|
+
export interface SpriteExecResult {
|
|
103
|
+
stdout: string;
|
|
104
|
+
stderr: string;
|
|
105
|
+
exitCode: number;
|
|
106
|
+
}
|
|
107
|
+
export interface SpriteCheckpointArgs {
|
|
108
|
+
id: string;
|
|
109
|
+
/** Caller-chosen checkpoint comment (S4); a comment-tagged `spriteRestore` matches it. */
|
|
110
|
+
comment?: string;
|
|
111
|
+
endpoint?: string;
|
|
112
|
+
token?: string;
|
|
113
|
+
}
|
|
114
|
+
export interface SpriteCheckpointResult {
|
|
115
|
+
/** The server checkpoint version (e.g. `v3`) captured from the `complete` event. */
|
|
116
|
+
checkpointId: string;
|
|
117
|
+
}
|
|
118
|
+
export interface Checkpoint {
|
|
119
|
+
id: string;
|
|
120
|
+
comment: string;
|
|
121
|
+
create_time: string;
|
|
122
|
+
is_auto: boolean;
|
|
123
|
+
}
|
|
124
|
+
export interface SpriteRestoreArgs {
|
|
125
|
+
id: string;
|
|
126
|
+
/** Explicit checkpoint id (e.g. `v3`); wins over `comment`. */
|
|
127
|
+
checkpoint?: string;
|
|
128
|
+
/** Restore the newest checkpoint carrying this comment. */
|
|
129
|
+
comment?: string;
|
|
130
|
+
endpoint?: string;
|
|
131
|
+
token?: string;
|
|
132
|
+
}
|
|
133
|
+
export interface ListCheckpointsArgs {
|
|
134
|
+
id: string;
|
|
135
|
+
endpoint?: string;
|
|
136
|
+
token?: string;
|
|
137
|
+
}
|
|
138
|
+
export interface SpriteDestroyArgs {
|
|
139
|
+
id: string;
|
|
140
|
+
endpoint?: string;
|
|
141
|
+
token?: string;
|
|
142
|
+
}
|
|
143
|
+
/** Build the `POST /v1/sprites` body. Pure. */
|
|
144
|
+
export declare function spriteCreateBody(args: SpriteCreateArgs): Record<string, unknown>;
|
|
145
|
+
/** Parse the create response; the caller-chosen `name` is the id fallback (S4). Pure. */
|
|
146
|
+
export declare function parseCreateResponse(text: string, name: string): SpriteCreateResult;
|
|
147
|
+
/**
|
|
148
|
+
* Injectable HTTP client — mirrors fly's `FlyHttp`. Tests inject a fake; the
|
|
149
|
+
* default hits `fetch`. Used by create/destroy/checkpoint/list/restore; exec
|
|
150
|
+
* goes over the control WebSocket instead.
|
|
151
|
+
*/
|
|
152
|
+
export type SpritesHttp = (method: string, url: string, body?: unknown, headers?: Record<string, string>, signal?: AbortSignal) => Promise<{
|
|
153
|
+
status: number;
|
|
154
|
+
text: string;
|
|
155
|
+
}>;
|
|
156
|
+
/**
|
|
157
|
+
* Default `fetch`-based client. Sends `Authorization: Bearer <token>` when a
|
|
158
|
+
* token is set (real Sprites); the fake ignores it. The token defaults to
|
|
159
|
+
* `SPRITES_API_TOKEN` at call time. `fetchImpl` is injectable for tests.
|
|
160
|
+
*/
|
|
161
|
+
export declare function defaultSpritesHttp(token?: string, fetchImpl?: typeof fetch): SpritesHttp;
|
|
162
|
+
/** Create a sprite with the caller-chosen `name` as its id (S4). `POST /v1/sprites`. */
|
|
163
|
+
export declare function spriteCreate(args: SpriteCreateArgs, signal?: AbortSignal, http?: SpritesHttp): Promise<SpriteCreateResult>;
|
|
164
|
+
/**
|
|
165
|
+
* Run a command in the sprite over the control WebSocket (non-PTY stream
|
|
166
|
+
* framing, per superfly/sprites-go). Connects to `wss://.../exec`, sends a
|
|
167
|
+
* single `[4]` (stdin EOF), accumulates stdout/stderr frames, and reads the
|
|
168
|
+
* exit code from the `[3]` frame. A non-zero exit is a failed activity (it
|
|
169
|
+
* throws) so a risky step fails its phase and triggers `onFailure`
|
|
170
|
+
* compensation (S5).
|
|
171
|
+
*/
|
|
172
|
+
export declare function spriteExec(args: SpriteExecArgs, signal?: AbortSignal): Promise<SpriteExecResult>;
|
|
173
|
+
/**
|
|
174
|
+
* Checkpoint the sprite. `POST /v1/sprites/{id}/checkpoint` (singular); the
|
|
175
|
+
* `comment` key is omitted when empty. The response is an NDJSON progress
|
|
176
|
+
* stream; the created version id is mined from the message text (see
|
|
177
|
+
* `parseCheckpointNdjson`).
|
|
178
|
+
*/
|
|
179
|
+
export declare function spriteCheckpoint(args: SpriteCheckpointArgs, signal?: AbortSignal, http?: SpritesHttp): Promise<SpriteCheckpointResult>;
|
|
180
|
+
/**
|
|
181
|
+
* List a sprite's checkpoints. `GET /v1/sprites/{id}/checkpoints` → a bare array
|
|
182
|
+
* `[{ id, comment, create_time, is_auto }]` (auto checkpoints excluded by
|
|
183
|
+
* default on the server).
|
|
184
|
+
*/
|
|
185
|
+
export declare function listCheckpoints(args: ListCheckpointsArgs, signal?: AbortSignal, http?: SpritesHttp): Promise<Checkpoint[]>;
|
|
186
|
+
/**
|
|
187
|
+
* Restore the sprite to a checkpoint (S5, the compensation path). Resolution
|
|
188
|
+
* order: an explicit `checkpoint` id wins; otherwise the newest checkpoint
|
|
189
|
+
* carrying `comment`; otherwise the newest checkpoint overall. Restore is
|
|
190
|
+
* `POST /v1/sprites/{id}/checkpoints/{cp}/restore` and returns an NDJSON stream.
|
|
191
|
+
*/
|
|
192
|
+
export declare function spriteRestore(args: SpriteRestoreArgs, signal?: AbortSignal, http?: SpritesHttp): Promise<Record<string, never>>;
|
|
193
|
+
/** Destroy the sprite (idempotent; a 404 means it is already gone). `DELETE /v1/sprites/{id}`. */
|
|
194
|
+
export declare function spriteDestroy(args: SpriteDestroyArgs, signal?: AbortSignal, http?: SpritesHttp): Promise<Record<string, never>>;
|
|
195
|
+
//# sourceMappingURL=sprites.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sprites.d.ts","sourceRoot":"","sources":["../../../src/op/activities/sprites.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAIH,eAAO,MAAM,wBAAwB,4BAA4B,CAAC;AAIlE;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,GAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAO,EAChC,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,MAAM,CAGR;AAwBD,eAAO,MAAM,YAAY,IAAI,CAAC;AAC9B,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,WAAW,IAAI,CAAC;AAC7B,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAUlC;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,QAAQ,CAAC,UAAU,CAAC,GAAG,gBAAgB,CAkBnF;AAQD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAoClD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC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","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAkD,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAkD,MAAM,0BAA0B,CAAC;AAmB9G;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,aA2RvB,CAAC"}
|