@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
@@ -245,7 +245,7 @@ interface CacheRegistry {
245
245
 
246
246
  `TaskGraphRunner` resolves the registry from the per-run `ServiceRegistry` and dispatches each task's read/write to the slot named by its policy. Both slots are independently optional. A missing slot is a silent no-op: the task runs uncached, no error.
247
247
 
248
- For the `private` slot, the runner constructs a per-run `RunPrivateCacheRepo` wrapper that prefixes every key with `__run:${runId}::`. Two runs with different `runId`s never see each other's rows; the same `runId` (a restart) does.
248
+ For the `private` slot, the runner constructs a per-run `RunPrivateCacheRepo` wrapper that prefixes every key with `__run:${runId}::${taskId}`. Two runs with different `runId`s never see each other's rows; the same `runId` (a restart) does. Two task nodes of the same class in one graph never share private entries because each keys by its instance id, not its type.
249
249
 
250
250
  ### Run identity (`runId`)
251
251
 
@@ -275,9 +275,9 @@ key = sha256(taskType + getCacheVersion() + fingerprint(inputs))
275
275
 
276
276
  ### Lifecycle of cache rows
277
277
 
278
- | Tier | Written | Read | Deleted |
279
- | --------------- | -------------- | ------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
280
- | `deterministic` | On task success | On task start | Never automatically. App owns invalidation (typically via `version` bumps). |
278
+ | Tier | Written | Read | Deleted |
279
+ | --------------- | --------------- | ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
280
+ | `deterministic` | On task success | On task start | Never automatically. App owns invalidation (typically via `version` bumps). |
281
281
  | `private` | On task success | On task start, filtered to current `runId` | **(a)** `privateRepo.clearRun()` on `succeeded` (the wrapper already knows its `runId`). **(b)** TTL sweep via `CacheJanitor.sweepStaleRunPrivate(olderThanMs)` for abandoned runs. |
282
282
 
283
283
  Failed tasks are never cached — only `Ok` results reach `saveOutput`. `saveOutput` is upsert by primary key (last writer wins) — the underlying `TaskOutputTabularRepository` calls `put()` on its tabular storage, so a same-key write replaces the existing row.