@aikirun/workflow 0.9.1 → 0.10.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
@@ -56,7 +56,7 @@ const result = await handle.waitForStatus("completed");
56
56
 
57
57
  ## Documentation
58
58
 
59
- For comprehensive documentation including retry strategies, schema validation, child workflows, and best practices, see the [Workflows Guide](https://aiki.run/docs/core-concepts/workflows).
59
+ For comprehensive documentation including retry strategies, schema validation, child workflows, and best practices, see the [Workflows Guide](https://github.com/aikirun/aiki/blob/main/docs/core-concepts/workflows.md).
60
60
 
61
61
  ## Related Packages
62
62
 
package/dist/index.d.ts CHANGED
@@ -255,7 +255,7 @@ interface WorkflowVersion<Input, Output, AppContext, TEventsDefinition extends E
255
255
  with(): WorkflowBuilder<Input, Output, AppContext, TEventsDefinition>;
256
256
  start: (client: Client<AppContext>, ...args: Input extends void ? [] : [Input]) => Promise<WorkflowRunHandle<Input, Output, AppContext, TEventsDefinition>>;
257
257
  startAsChild: <ParentInput, ParentEventsDefinition extends EventsDefinition>(parentRun: WorkflowRunContext<ParentInput, AppContext, ParentEventsDefinition>, ...args: Input extends void ? [] : [Input]) => Promise<ChildWorkflowRunHandle<Input, Output, AppContext, TEventsDefinition>>;
258
- getHandle: (client: Client<AppContext>, runId: WorkflowRunId) => Promise<WorkflowRunHandle<Input, Output, AppContext, TEventsDefinition>>;
258
+ getHandle: (client: Client<AppContext>, runId: string) => Promise<WorkflowRunHandle<Input, Output, AppContext, TEventsDefinition>>;
259
259
  [INTERNAL]: {
260
260
  eventsDefinition: TEventsDefinition;
261
261
  handler: (run: WorkflowRunContext<Input, AppContext, TEventsDefinition>, input: Input, context: AppContext) => Promise<void>;
@@ -277,7 +277,7 @@ declare class WorkflowVersionImpl<Input, Output, AppContext, TEventsDefinition e
277
277
  start(client: Client<AppContext>, ...args: Input extends void ? [] : [Input]): Promise<WorkflowRunHandle<Input, Output, AppContext, TEventsDefinition>>;
278
278
  startAsChild(parentRun: WorkflowRunContext<unknown, AppContext, EventsDefinition>, ...args: Input extends void ? [] : [Input]): Promise<ChildWorkflowRunHandle<Input, Output, AppContext, TEventsDefinition>>;
279
279
  private assertUniqueChildRunReferenceId;
280
- getHandle(client: Client<AppContext>, runId: WorkflowRunId): Promise<WorkflowRunHandle<Input, Output, AppContext, TEventsDefinition>>;
280
+ getHandle(client: Client<AppContext>, runId: string): Promise<WorkflowRunHandle<Input, Output, AppContext, TEventsDefinition>>;
281
281
  private handler;
282
282
  private tryExecuteWorkflow;
283
283
  private assertRetryAllowed;
package/dist/index.js CHANGED
@@ -648,7 +648,7 @@ function createSleeper(handle, logger) {
648
648
  if (!sleepState) {
649
649
  try {
650
650
  await handle[INTERNAL3].transitionState({ status: "sleeping", sleepName, durationMs });
651
- logger.info("Sleeping", {
651
+ logger.info("Going to sleeping", {
652
652
  "aiki.sleepName": sleepName,
653
653
  "aiki.durationMs": durationMs
654
654
  });
@@ -692,11 +692,6 @@ function createSleeper(handle, logger) {
692
692
  });
693
693
  durationMs -= sleepState.durationMs;
694
694
  } else {
695
- logger.warn("Lower sleep duration encountered during replay. Already slept enough", {
696
- "aiki.sleepName": sleepName,
697
- "aiki.historicDurationMs": sleepState.durationMs,
698
- "aiki.latestDurationMs": durationMs
699
- });
700
695
  return { cancelled: false };
701
696
  }
702
697
  try {
@@ -1007,9 +1002,8 @@ var WorkflowVersionImpl = class _WorkflowVersionImpl {
1007
1002
  for (const [key, value] of Object.entries(awaitingRetryState)) {
1008
1003
  logMeta[`aiki.${key}`] = value;
1009
1004
  }
1010
- run.logger.info("Workflow failed. Awaiting retry", {
1005
+ run.logger.info("Workflow awaiting retry", {
1011
1006
  "aiki.attempts": attempts,
1012
- "aiki.delayMs": retryParams.delayMs,
1013
1007
  ...logMeta
1014
1008
  });
1015
1009
  throw new WorkflowRunSuspendedError4(run.id);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aikirun/workflow",
3
- "version": "0.9.1",
3
+ "version": "0.10.0",
4
4
  "description": "Workflow SDK for Aiki - define durable workflows with tasks, sleeps, waits, and event handling",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -18,7 +18,7 @@
18
18
  "build": "tsup"
19
19
  },
20
20
  "dependencies": {
21
- "@aikirun/types": "0.9.1"
21
+ "@aikirun/types": "0.10.0"
22
22
  },
23
23
  "publishConfig": {
24
24
  "access": "public"