@output.ai/core 0.1.13 → 0.1.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@output.ai/core",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "The core module of the output framework",
5
5
  "type": "module",
6
6
  "exports": {
@@ -1,5 +1,5 @@
1
1
  // THIS RUNS IN THE TEMPORAL'S SANDBOX ENVIRONMENT
2
- import { defineSignal, setHandler, proxyActivities, workflowInfo, proxySinks } from '@temporalio/workflow';
2
+ import { defineSignal, setHandler, proxyActivities, workflowInfo, proxySinks, uuid4 } from '@temporalio/workflow';
3
3
  import { ACTIVITY_SEND_WEBHOOK } from '#consts';
4
4
  import { FatalError } from '#errors';
5
5
  import { validateCreateWebhook } from './validations/static.js';
@@ -20,7 +20,7 @@ export async function createWebhook( { url, payload } ) {
20
20
  const sinks = await proxySinks();
21
21
  const resumeSignal = defineSignal( 'resume' );
22
22
 
23
- const traceId = `${workflowId}-${url}-${Date.now()}`;
23
+ const traceId = `${workflowId}-${url}-${uuid4}`;
24
24
  sinks.trace.addEventStart( { id: traceId, name: 'resume', kind: 'webhook' } );
25
25
  return new Promise( resolve =>
26
26
  setHandler( resumeSignal, responsePayload => {
@@ -1,5 +1,5 @@
1
1
  // THIS RUNS IN THE TEMPORAL'S SANDBOX ENVIRONMENT
2
- import { proxyActivities, inWorkflowContext, executeChild, workflowInfo, ParentClosePolicy } from '@temporalio/workflow';
2
+ import { proxyActivities, inWorkflowContext, executeChild, workflowInfo, uuid4, ParentClosePolicy } from '@temporalio/workflow';
3
3
  import { validateWorkflow } from './validations/static.js';
4
4
  import { validateWithSchema } from './validations/runtime.js';
5
5
  import { SHARED_STEP_PREFIX, ACTIVITY_GET_TRACE_DESTINATIONS } from '#consts';
@@ -72,7 +72,7 @@ export function workflow( { name, description, inputSchema, outputSchema, fn, op
72
72
  startWorkflow: async ( childName, input, extra = {} ) =>
73
73
  executeChild( childName, {
74
74
  args: input ? [ input ] : [],
75
- workflowId: `${workflowId}-${childName}-${Date.now()}`,
75
+ workflowId: `${workflowId}-${childName}-${uuid4()}`,
76
76
  parentClosePolicy: ParentClosePolicy[extra?.detached ? 'ABANDON' : 'TERMINATE'],
77
77
  memo: {
78
78
  executionContext,