@taico/events 0.2.12 → 0.2.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.
@@ -22,6 +22,8 @@ export declare const ExecutionWireEvents: {
22
22
  readonly EXECUTION_HEARTBEAT_POST: "execution.heartbeat.post";
23
23
  readonly WORKER_HEARTBEAT_POST: "worker.heartbeat.post";
24
24
  readonly WORKER_HARNESSES_REPORT_REQUESTED: "worker.harnesses.report.requested";
25
+ readonly TASK_EXECUTION_QUEUED: "task.execution.queued";
26
+ readonly EXECUTION_INTERRUPT_REQUEST: "execution.interrupt.request";
25
27
  };
26
28
  export type ExecutionWireEventName = (typeof ExecutionWireEvents)[keyof typeof ExecutionWireEvents];
27
29
  /**
@@ -102,10 +104,26 @@ export interface ExecutionActivityWireEvent {
102
104
  payload: ExecutionActivityPayload;
103
105
  actor: MinimalEventActor;
104
106
  }
107
+ /**
108
+ * Task execution queued event
109
+ * Emitted when a task enters the execution queue and is ready to be claimed by workers
110
+ */
111
+ export interface TaskExecutionQueuedWireEvent {
112
+ taskId: string;
113
+ occurredAt: string;
114
+ }
115
+ /**
116
+ * Execution interrupt request event
117
+ * Emitted when a user requests to interrupt/cancel an active execution
118
+ */
119
+ export interface ExecutionInterruptRequestWireEvent {
120
+ executionId: string;
121
+ requestedAt: string;
122
+ }
105
123
  /**
106
124
  * Union type of all execution wire events
107
125
  */
108
- export type ExecutionWireEvent = ExecutionCreatedWireEvent | ExecutionUpdatedWireEvent | ExecutionDeletedWireEvent | ExecutionActivityWireEvent;
126
+ export type ExecutionWireEvent = ExecutionCreatedWireEvent | ExecutionUpdatedWireEvent | ExecutionDeletedWireEvent | ExecutionActivityWireEvent | TaskExecutionQueuedWireEvent | ExecutionInterruptRequestWireEvent;
109
127
  /**
110
128
  * Type guards for event identification
111
129
  */
@@ -21,6 +21,8 @@ export const ExecutionWireEvents = {
21
21
  EXECUTION_HEARTBEAT_POST: 'execution.heartbeat.post',
22
22
  WORKER_HEARTBEAT_POST: 'worker.heartbeat.post',
23
23
  WORKER_HARNESSES_REPORT_REQUESTED: 'worker.harnesses.report.requested',
24
+ TASK_EXECUTION_QUEUED: 'task.execution.queued',
25
+ EXECUTION_INTERRUPT_REQUEST: 'execution.interrupt.request',
24
26
  };
25
27
  /**
26
28
  * Type guards for event identification
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taico/events",
3
- "version": "0.2.12",
3
+ "version": "0.2.14",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "license": "MIT",