@workglow/task-graph 0.3.11 → 0.3.13

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 (65) hide show
  1. package/dist/browser.js +3368 -3321
  2. package/dist/browser.js.map +36 -34
  3. package/dist/bun.js +3368 -3321
  4. package/dist/bun.js.map +36 -34
  5. package/dist/cache/CacheJanitor.d.ts +2 -2
  6. package/dist/cache/RunPrivateCacheRepo.d.ts +6 -5
  7. package/dist/cache/RunPrivateCacheRepo.d.ts.map +1 -1
  8. package/dist/common.d.ts +9 -6
  9. package/dist/common.d.ts.map +1 -1
  10. package/dist/node.js +3368 -3321
  11. package/dist/node.js.map +36 -34
  12. package/dist/storage/ITaskOutputStorage.d.ts +35 -0
  13. package/dist/storage/ITaskOutputStorage.d.ts.map +1 -0
  14. package/dist/storage/TabularTaskOutputStorage.d.ts +29 -0
  15. package/dist/storage/TabularTaskOutputStorage.d.ts.map +1 -0
  16. package/dist/storage/TaskOutputRepository.d.ts +0 -48
  17. package/dist/storage/TaskOutputRepository.d.ts.map +1 -1
  18. package/dist/storage/TaskOutputStorageSchema.d.ts +31 -0
  19. package/dist/storage/TaskOutputStorageSchema.d.ts.map +1 -0
  20. package/dist/storage/TaskOutputTabularRepository.d.ts +10 -90
  21. package/dist/storage/TaskOutputTabularRepository.d.ts.map +1 -1
  22. package/dist/task/CacheCoordinator.d.ts +8 -2
  23. package/dist/task/CacheCoordinator.d.ts.map +1 -1
  24. package/dist/task/ConditionalTask.d.ts +10 -202
  25. package/dist/task/ConditionalTask.d.ts.map +1 -1
  26. package/dist/task/FallbackTask.d.ts +7 -59
  27. package/dist/task/FallbackTask.d.ts.map +1 -1
  28. package/dist/task/GraphAsTask.d.ts +8 -28
  29. package/dist/task/GraphAsTask.d.ts.map +1 -1
  30. package/dist/task/ITask.d.ts +2 -27
  31. package/dist/task/ITask.d.ts.map +1 -1
  32. package/dist/task/InputResolver.d.ts +0 -3
  33. package/dist/task/InputResolver.d.ts.map +1 -1
  34. package/dist/task/IteratorTask.d.ts +5 -43
  35. package/dist/task/IteratorTask.d.ts.map +1 -1
  36. package/dist/task/MapTask.d.ts +1 -25
  37. package/dist/task/MapTask.d.ts.map +1 -1
  38. package/dist/task/ReduceTask.d.ts +0 -18
  39. package/dist/task/ReduceTask.d.ts.map +1 -1
  40. package/dist/task/Task.d.ts +2 -106
  41. package/dist/task/Task.d.ts.map +1 -1
  42. package/dist/task/TaskError.d.ts +2 -29
  43. package/dist/task/TaskError.d.ts.map +1 -1
  44. package/dist/task/TaskJSON.d.ts +0 -10
  45. package/dist/task/TaskJSON.d.ts.map +1 -1
  46. package/dist/task/TaskRegistry.d.ts +0 -14
  47. package/dist/task/TaskRegistry.d.ts.map +1 -1
  48. package/dist/task/TaskRunner.d.ts +0 -41
  49. package/dist/task/TaskRunner.d.ts.map +1 -1
  50. package/dist/task/WhileTask.d.ts +3 -89
  51. package/dist/task/WhileTask.d.ts.map +1 -1
  52. package/dist/task/index.d.ts +6 -6
  53. package/dist/task/index.d.ts.map +1 -1
  54. package/dist/task-graph/Conversions.d.ts +10 -0
  55. package/dist/task-graph/Conversions.d.ts.map +1 -1
  56. package/dist/task-graph/Dataflow.d.ts +1 -29
  57. package/dist/task-graph/Dataflow.d.ts.map +1 -1
  58. package/dist/task-graph/TaskGraph.d.ts +0 -29
  59. package/dist/task-graph/TaskGraph.d.ts.map +1 -1
  60. package/dist/task-graph/TaskGraphRunner.d.ts +3 -65
  61. package/dist/task-graph/TaskGraphRunner.d.ts.map +1 -1
  62. package/dist/task-graph/Workflow.d.ts +1 -60
  63. package/dist/task-graph/Workflow.d.ts.map +1 -1
  64. package/package.json +7 -7
  65. package/src/EXECUTION_MODEL.md +4 -4
@@ -11,8 +11,8 @@ export interface CacheJanitorOptions {
11
11
  * Periodic cleanup helper for run-private cache entries left behind by runs
12
12
  * that crashed and were never restarted.
13
13
  *
14
- * Run-private rows are namespaced by `RunPrivateCacheRepo` with the taskType
15
- * prefix `__run:`. This janitor sweeps those rows when they are older than
14
+ * Run-private rows are namespaced by `RunPrivateCacheRepo` with the
15
+ * `__run:${runId}::${taskId}` prefix. This janitor sweeps those rows when they are older than
16
16
  * `olderThanMs`. Entries lacking the prefix (deterministic cache, shared tier)
17
17
  * are not touched.
18
18
  *
@@ -12,9 +12,10 @@ export interface RunPrivateCacheRepoOptions {
12
12
  /**
13
13
  * Wraps a TaskOutputRepository so that all entries are namespaced by `runId`.
14
14
  *
15
- * Namespacing happens at the `taskType` axis: rows are stored as
16
- * `__run:${runId}::${taskType}` in the backing store. The input fingerprint is
17
- * unchanged, so deterministic-style keying still works.
15
+ * Namespacing happens at the repository's `taskType` axis: {@link CacheCoordinator}
16
+ * passes each task's instance `id` for private-policy entries, so rows are stored
17
+ * as `__run:${runId}::${taskId}` in the backing store. The input fingerprint is
18
+ * unchanged for resume lookups within the same node.
18
19
  *
19
20
  * - Two wrappers with the same `runId` (e.g., a restart after a crash) see each
20
21
  * other's writes via the backing store — that's the restart-survival contract.
@@ -25,8 +26,8 @@ export declare class RunPrivateCacheRepo extends TaskOutputRepository {
25
26
  private readonly runId;
26
27
  constructor({ backing, runId }: RunPrivateCacheRepoOptions);
27
28
  private ns;
28
- saveOutput(taskType: string, inputs: TaskInput, output: TaskOutput, createdAt?: Date): Promise<void>;
29
- getOutput(taskType: string, inputs: TaskInput): Promise<TaskOutput | undefined>;
29
+ saveOutput(cacheIdentity: string, inputs: TaskInput, output: TaskOutput, createdAt?: Date): Promise<void>;
30
+ getOutput(cacheIdentity: string, inputs: TaskInput): Promise<TaskOutput | undefined>;
30
31
  /**
31
32
  * Override of `TaskOutputRepository.clear()` that only deletes entries
32
33
  * namespaced under THIS wrapper's `runId`. Entries from other runs are not
@@ -1 +1 @@
1
- {"version":3,"file":"RunPrivateCacheRepo.d.ts","sourceRoot":"","sources":["../../src/cache/RunPrivateCacheRepo.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,oBAAoB,EAA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E/D,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,oBAAoB,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;;;;GAWG;AACH,qBAAa,mBAAoB,SAAQ,oBAAoB;IAC3D,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAuB;IAC/C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAE/B,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,0BAA0B,EAIzD;IAED,OAAO,CAAC,EAAE;IAIG,UAAU,CACrB,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,UAAU,EAClB,SAAS,CAAC,EAAE,IAAI,GACf,OAAO,CAAC,IAAI,CAAC,CAEf;IAEY,SAAS,CACpB,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,SAAS,GAChB,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAEjC;IAED;;;;OAIG;IACU,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAElC;IAED;;;;OAIG;IACU,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAErC;IAED;;;OAGG;IACU,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,CAEnC;IAED;;;;;OAKG;IACU,cAAc,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEhE;IAEM,SAAS,IAAI,OAAO,CAE1B;CACF"}
package/dist/common.d.ts CHANGED
@@ -9,13 +9,13 @@ export * from "./task-graph/GraphEntitlementUtils";
9
9
  export * from "./task-graph/GraphFormatScanner";
10
10
  export * from "./task-graph/GraphSchemaUtils";
11
11
  export * from "./task-graph/ITaskGraph";
12
- export * from "./task-graph/TaskGraph";
13
- export * from "./task-graph/TaskGraphEvents";
14
- export * from "./task-graph/EdgeMaterializer";
15
12
  export * from "./task-graph/RunContext";
16
13
  export * from "./task-graph/RunScheduler";
17
14
  export * from "./task-graph/StreamPump";
15
+ export * from "./task-graph/TaskGraph";
16
+ export * from "./task-graph/TaskGraphEvents";
18
17
  export * from "./task-graph/TaskGraphRunner";
18
+ export * from "./task-graph/EdgeMaterializer";
19
19
  export * from "./task-graph/Conversions";
20
20
  export * from "./task-graph/GraphToWorkflowCode";
21
21
  export * from "./task-graph/IWorkflow";
@@ -27,19 +27,22 @@ export * from "./task-graph/WorkflowEventBridge";
27
27
  export * from "./task-graph/WorkflowFactories";
28
28
  export * from "./task-graph/WorkflowPipe";
29
29
  export * from "./task-graph/WorkflowRunContext";
30
+ export * from "./task-graph/autoConnect";
30
31
  export * from "./task-graph/TransformRegistry";
31
- export * from "./task-graph/TransformTypes";
32
32
  export * from "./task-graph/transforms";
33
- export * from "./task-graph/autoConnect";
33
+ export * from "./task-graph/TransformTypes";
34
34
  export * from "./cache";
35
35
  export * from "./task/CacheCoordinator";
36
36
  export * from "./task/StreamProcessor";
37
37
  export * from "./task/TaskRunContext";
38
38
  export * from "./task";
39
+ export * from "./storage/ITaskOutputStorage";
40
+ export * from "./storage/TabularTaskOutputStorage";
39
41
  export * from "./storage/TaskGraphRepository";
40
42
  export * from "./storage/TaskGraphTabularRepository";
41
43
  export * from "./storage/TaskOutputRepository";
44
+ export * from "./storage/TaskOutputStorageSchema";
42
45
  export * from "./storage/TaskOutputTabularRepository";
43
- export { registerPortCodec, getPortCodec, _resetPortCodecsForTests, } from "./storage/PortCodecRegistry";
46
+ export { _resetPortCodecsForTests, getPortCodec, registerPortCodec, } from "./storage/PortCodecRegistry";
44
47
  export type { PortCodec } from "./storage/PortCodecRegistry";
45
48
  //# sourceMappingURL=common.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAE5C,cAAc,oCAAoC,CAAC;AACnD,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AA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