@grida/fx 0.3.0 → 0.5.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 CHANGED
@@ -3,7 +3,8 @@
3
3
  Grida FX for JavaScript and TypeScript: an SDK to write workflow files and to plan, price and
4
4
  run them, and the standalone `grida-fx` command. Grida FX is a workflow engine for generative asset
5
5
  pipelines: write a workflow file, and FX plans it, prices it before anything is spent, caches
6
- every paid call by its request, and records the run. It works with your own provider keys.
6
+ every paid call by its request, and records the run. It works with one Grida Gateway key
7
+ (`GG_API_KEY`), or your own provider keys.
7
8
 
8
9
  To run FX from a terminal, install the Grida CLI: `npm install -g grida`, then `grida fx --help`.
9
10
  It pins this package. Install `@grida/fx` itself for the SDK, or for `grida-fx` on its own (in a
@@ -159,8 +159,11 @@ export interface RunFinished extends RunEvent {
159
159
  }
160
160
  /** One instance in {@link Projection}. */
161
161
  export interface ProjectedInstance {
162
- state: "running" | "succeeded" | "failed" | "skipped";
162
+ /** `waiting`: started, its paid call waiting for its route's slot (older records never have it). */
163
+ state: "running" | "waiting" | "succeeded" | "failed" | "skipped";
163
164
  path: string;
165
+ /** Waiting: the route it waits for. */
166
+ waiting_for?: string | null;
164
167
  /** Succeeded: whether its result came from the cache. */
165
168
  cache?: "hit" | "miss" | null;
166
169
  /** Succeeded: the facts its body reported. */
@@ -188,9 +191,11 @@ export interface Projection {
188
191
  export interface InspectedStep {
189
192
  id: string;
190
193
  path: string;
191
- state: "succeeded" | "failed" | "skipped" | "running" | "pending";
194
+ state: "succeeded" | "failed" | "skipped" | "running" | "waiting" | "pending";
192
195
  error?: string;
193
196
  cache?: "hit" | "miss";
197
+ /** Waiting: the route whose slot it waits for. */
198
+ waiting_for?: string;
194
199
  /** Its files, where the run placed them: paths relative to the run folder. */
195
200
  files: {
196
201
  path: string;
package/dist/engine.js CHANGED
@@ -31,6 +31,7 @@ export async function call(args, options = {}) {
31
31
  // A value inherited from a launcher (a node body run under `grida fx`) would change the prefix.
32
32
  env.GRIDA_FX_INVOKER = "grida-fx";
33
33
  if (args[0] === "run") {
34
+ // Also tells the engine the inputs file is temporary: the run records no `repeat`.
34
35
  env.GRIDA_FX_CANCEL_SOURCE = "sdk";
35
36
  }
36
37
  const engine = findEngine(machineLookup(env, cwd));
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  * the engine package for the machine); this package drives it: plan, price and run workflows,
4
4
  * read their runs, and write workflow documents.
5
5
  */
6
- export declare const version = "0.3.0";
6
+ export declare const version = "0.5.0";
7
7
  export { engineVersion, expand, identity, type InspectOptions, inspect, Plan, PlanRefused, plan, price, project, RunFile, RunResult, type RunValue, run, } from "./api.js";
8
8
  export { BINARY_VARIABLE, type BinaryOptions, binary, type Environment } from "./binary.js";
9
9
  export { cancel, type CancelOptions, inspectControl, RunControlError, type RunControlResult } from "./control.js";
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  * the engine package for the machine); this package drives it: plan, price and run workflows,
4
4
  * read their runs, and write workflow documents.
5
5
  */
6
- export const version = "0.3.0";
6
+ export const version = "0.5.0";
7
7
  export { engineVersion, expand, identity, inspect, Plan, PlanRefused, plan, price, project, RunFile, RunResult, run, } from "./api.js";
8
8
  export { BINARY_VARIABLE, binary } from "./binary.js";
9
9
  export { cancel, inspectControl, RunControlError } from "./control.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grida/fx",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "description": "Grida FX for JavaScript: the grida-fx command, and an SDK to build workflows and drive the engine.",
5
5
  "keywords": [
6
6
  "grida",
@@ -46,10 +46,10 @@
46
46
  ],
47
47
  "sideEffects": false,
48
48
  "optionalDependencies": {
49
- "@grida/fx-darwin-arm64": "0.3.0",
50
- "@grida/fx-darwin-x64": "0.3.0",
51
- "@grida/fx-linux-arm64-gnu": "0.3.0",
52
- "@grida/fx-linux-x64-gnu": "0.3.0"
49
+ "@grida/fx-darwin-arm64": "0.5.0",
50
+ "@grida/fx-darwin-x64": "0.5.0",
51
+ "@grida/fx-linux-arm64-gnu": "0.5.0",
52
+ "@grida/fx-linux-x64-gnu": "0.5.0"
53
53
  },
54
54
  "publishConfig": {
55
55
  "access": "public",