@xentom/integration-framework 0.0.16 → 0.0.17

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.
@@ -112,6 +112,23 @@ export interface TriggerSubscribeOptions<I extends TriggerNodeInputs, O extends
112
112
  * persist across restarts and be accessible from any instance.
113
113
  */
114
114
  kv: KeyValueStore;
115
+ /**
116
+ * Workflow-related utilities and metadata.
117
+ *
118
+ * Provides access to workflow lifecycle information and hooks
119
+ * that allow the integration to react to workflow behavior.
120
+ */
121
+ workflow: {
122
+ /**
123
+ * Subscribe to workflow lifecycle events (e.g. start).
124
+ *
125
+ * Use this to run initialization logic when a workflow starts
126
+ * or respond to other lifecycle state changes.
127
+ *
128
+ * Returns an unsubscribe function that removes the listener.
129
+ */
130
+ on<T extends keyof WorkflowEventMap>(type: T, callback: (...args: WorkflowEventMap[T]) => void): () => void;
131
+ };
115
132
  /**
116
133
  * Function used to programmatically run an output pin of the trigger.
117
134
  * Calling this starts a workflow run with optional execution context and output values.
@@ -137,6 +154,9 @@ export interface TriggerSubscribeOptions<I extends TriggerNodeInputs, O extends
137
154
  */
138
155
  next: NodeNextCallback<O, [options?: TriggerNextOptions]>;
139
156
  }
157
+ export type WorkflowEventMap = {
158
+ start: [];
159
+ };
140
160
  export interface TriggerNextOptions {
141
161
  /**
142
162
  * Optional context object to pass custom data to integration nodes.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@xentom/integration-framework",
3
3
  "description": "A type-safe, declarative framework for building composable workflow integrations using nodes, pins, and rich controls.",
4
- "version": "0.0.16",
4
+ "version": "0.0.17",
5
5
  "license": "MIT",
6
6
  "homepage": "https://xentom.com",
7
7
  "author": {
@@ -61,4 +61,4 @@
61
61
  "bun-types": "^1.3.6",
62
62
  "typescript": "^5.9.3"
63
63
  }
64
- }
64
+ }