@decaf-ts/integrations 0.6.2 → 0.8.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/dist/integrations.cjs +1 -1
- package/jest.config.cjs +10 -0
- package/lib/cjs/graph/engine/execution/GraphExecutionContext.cjs +23 -2
- package/lib/cjs/graph/engine/execution/GraphExecutionContext.cjs.map +1 -1
- package/lib/cjs/graph/engine/execution/GraphExecutionEngine.cjs +76 -0
- package/lib/cjs/graph/engine/execution/GraphExecutionEngine.cjs.map +1 -1
- package/lib/cjs/graph/engine/execution/LogGraphNodeExecutor.cjs +29 -4
- package/lib/cjs/graph/engine/execution/LogGraphNodeExecutor.cjs.map +1 -1
- package/lib/cjs/graph/index.cjs +1 -0
- package/lib/cjs/graph/index.cjs.map +1 -1
- package/lib/cjs/graph/log/GraphRunLogger.cjs +142 -0
- package/lib/cjs/graph/log/GraphRunLogger.cjs.map +1 -0
- package/lib/cjs/graph/log/LogParameters.cjs +73 -0
- package/lib/cjs/graph/log/LogParameters.cjs.map +1 -0
- package/lib/cjs/graph/shared/GraphExecutionStateMapper.cjs +97 -0
- package/lib/cjs/graph/shared/GraphExecutionStateMapper.cjs.map +1 -0
- package/lib/cjs/graph/shared/constants.cjs +56 -1
- package/lib/cjs/graph/shared/constants.cjs.map +1 -1
- package/lib/cjs/graph/shared/index.cjs +9 -1
- package/lib/cjs/graph/shared/index.cjs.map +1 -1
- package/lib/cjs/graph/shared/nodes/flow-control.cjs +50 -6
- package/lib/cjs/graph/shared/nodes/flow-control.cjs.map +1 -1
- package/lib/cjs/index.cjs +3 -3
- package/lib/cjs/nest/graph/GraphExecutionResultModel.cjs +1 -1
- package/lib/cjs/nest/graph/GraphExecutionResultModel.cjs.map +1 -1
- package/lib/cjs/nest/graph/GraphExecutorRegistryFactory.cjs +4 -3
- package/lib/cjs/nest/graph/GraphExecutorRegistryFactory.cjs.map +1 -1
- package/lib/cjs/nest/graph/GraphWorkflowModel.cjs +1 -5
- package/lib/cjs/nest/graph/GraphWorkflowModel.cjs.map +1 -1
- package/lib/cjs/sftp/aws/AwsSftpService.cjs +120 -0
- package/lib/cjs/sftp/aws/AwsSftpService.cjs.map +1 -0
- package/lib/cjs/sftp/core/SftpSource.cjs +29 -0
- package/lib/cjs/sftp/core/SftpSource.cjs.map +1 -0
- package/lib/cjs/sftp/core/index.cjs +19 -0
- package/lib/cjs/sftp/core/index.cjs.map +1 -0
- package/lib/cjs/sftp/index.cjs +21 -0
- package/lib/cjs/sftp/index.cjs.map +1 -0
- package/lib/cjs/sftp/ssh2/Ssh2SftpService.cjs +172 -0
- package/lib/cjs/sftp/ssh2/Ssh2SftpService.cjs.map +1 -0
- package/lib/cjs/user-requests/index.cjs +27 -0
- package/lib/cjs/user-requests/index.cjs.map +1 -0
- package/lib/esm/graph/engine/execution/GraphExecutionContext.js +23 -2
- package/lib/esm/graph/engine/execution/GraphExecutionContext.js.map +1 -1
- package/lib/esm/graph/engine/execution/GraphExecutionEngine.js +77 -1
- package/lib/esm/graph/engine/execution/GraphExecutionEngine.js.map +1 -1
- package/lib/esm/graph/engine/execution/LogGraphNodeExecutor.js +29 -4
- package/lib/esm/graph/engine/execution/LogGraphNodeExecutor.js.map +1 -1
- package/lib/esm/graph/index.js +1 -0
- package/lib/esm/graph/index.js.map +1 -1
- package/lib/esm/graph/log/GraphRunLogger.js +137 -0
- package/lib/esm/graph/log/GraphRunLogger.js.map +1 -0
- package/lib/esm/graph/log/LogParameters.js +69 -0
- package/lib/esm/graph/log/LogParameters.js.map +1 -0
- package/lib/esm/graph/shared/GraphExecutionStateMapper.js +91 -0
- package/lib/esm/graph/shared/GraphExecutionStateMapper.js.map +1 -0
- package/lib/esm/graph/shared/constants.js +82 -3
- package/lib/esm/graph/shared/constants.js.map +1 -1
- package/lib/esm/graph/shared/index.js +6 -0
- package/lib/esm/graph/shared/index.js.map +1 -1
- package/lib/esm/graph/shared/nodes/flow-control.js +49 -5
- package/lib/esm/graph/shared/nodes/flow-control.js.map +1 -1
- package/lib/esm/index.js +3 -3
- package/lib/esm/nest/graph/GraphExecutionResultModel.js +3 -3
- package/lib/esm/nest/graph/GraphExecutionResultModel.js.map +1 -1
- package/lib/esm/nest/graph/GraphExecutorRegistryFactory.js +4 -3
- package/lib/esm/nest/graph/GraphExecutorRegistryFactory.js.map +1 -1
- package/lib/esm/nest/graph/GraphWorkflowModel.js +3 -7
- package/lib/esm/nest/graph/GraphWorkflowModel.js.map +1 -1
- package/lib/esm/sftp/aws/AwsSftpService.js +82 -0
- package/lib/esm/sftp/aws/AwsSftpService.js.map +1 -0
- package/lib/esm/sftp/core/SftpSource.js +23 -0
- package/lib/esm/sftp/core/SftpSource.js.map +1 -0
- package/lib/esm/sftp/core/index.js +2 -0
- package/lib/esm/sftp/core/index.js.map +1 -0
- package/lib/esm/sftp/index.js +4 -0
- package/lib/esm/sftp/index.js.map +1 -0
- package/lib/esm/sftp/ssh2/Ssh2SftpService.js +135 -0
- package/lib/esm/sftp/ssh2/Ssh2SftpService.js.map +1 -0
- package/lib/esm/user-requests/index.js +10 -0
- package/lib/esm/user-requests/index.js.map +1 -0
- package/lib/types/graph/engine/execution/GraphExecutionContext.d.cts +12 -2
- package/lib/types/graph/engine/execution/GraphExecutionContext.d.mts +12 -2
- package/lib/types/graph/engine/execution/GraphExecutionEngine.d.cts +34 -1
- package/lib/types/graph/engine/execution/GraphExecutionEngine.d.mts +34 -1
- package/lib/types/graph/engine/execution/LogGraphNodeExecutor.d.cts +16 -10
- package/lib/types/graph/engine/execution/LogGraphNodeExecutor.d.mts +16 -10
- package/lib/types/graph/index.d.cts +1 -0
- package/lib/types/graph/index.d.mts +1 -0
- package/lib/types/graph/log/GraphRunLogger.d.cts +72 -0
- package/lib/types/graph/log/GraphRunLogger.d.mts +72 -0
- package/lib/types/graph/log/LogParameters.d.cts +7 -0
- package/lib/types/graph/log/LogParameters.d.mts +7 -0
- package/lib/types/graph/shared/GraphExecutionStateMapper.d.cts +66 -0
- package/lib/types/graph/shared/GraphExecutionStateMapper.d.mts +66 -0
- package/lib/types/graph/shared/constants.d.cts +70 -3
- package/lib/types/graph/shared/constants.d.mts +70 -3
- package/lib/types/graph/shared/index.d.cts +3 -0
- package/lib/types/graph/shared/index.d.mts +3 -0
- package/lib/types/graph/shared/nodes/flow-control.d.cts +20 -7
- package/lib/types/graph/shared/nodes/flow-control.d.mts +20 -7
- package/lib/types/graph/shared/types.d.cts +94 -5
- package/lib/types/graph/shared/types.d.mts +94 -5
- package/lib/types/index.d.cts +2 -2
- package/lib/types/index.d.mts +2 -2
- package/lib/types/nest/graph/GraphExecutionResultModel.d.cts +3 -3
- package/lib/types/nest/graph/GraphExecutionResultModel.d.mts +3 -3
- package/lib/types/nest/graph/GraphExecutorRegistryFactory.d.cts +3 -3
- package/lib/types/nest/graph/GraphExecutorRegistryFactory.d.mts +3 -3
- package/lib/types/nest/graph/GraphWorkflowModel.d.cts +3 -4
- package/lib/types/nest/graph/GraphWorkflowModel.d.mts +3 -4
- package/lib/types/sftp/aws/AwsSftpService.d.cts +37 -0
- package/lib/types/sftp/aws/AwsSftpService.d.mts +37 -0
- package/lib/types/sftp/core/SftpSource.d.cts +40 -0
- package/lib/types/sftp/core/SftpSource.d.mts +40 -0
- package/lib/types/sftp/core/index.d.cts +1 -0
- package/lib/types/sftp/core/index.d.mts +1 -0
- package/lib/types/sftp/index.d.cts +3 -0
- package/lib/types/sftp/index.d.mts +3 -0
- package/lib/types/sftp/ssh2/Ssh2SftpService.d.cts +47 -0
- package/lib/types/sftp/ssh2/Ssh2SftpService.d.mts +47 -0
- package/lib/types/user-requests/index.d.cts +9 -0
- package/lib/types/user-requests/index.d.mts +9 -0
- package/package.json +26 -3
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
* @module integrations/graph/shared/types
|
|
3
3
|
* @summary Frontend-safe graph type declarations.
|
|
4
4
|
* @description Type aliases and interfaces that are safe to import from a
|
|
5
|
-
* frontend bundle.
|
|
6
|
-
* condition DSL, switch cases, node metadata patches)
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* frontend bundle. Alongside the declarative graph metadata types (loop
|
|
6
|
+
* condition DSL, switch cases, node metadata patches), this module carries the
|
|
7
|
+
* DECAF-48 execution contract consumed by the frontend via SSE: the node/edge
|
|
8
|
+
* state-change payloads, the structured run log entry, the node I/O
|
|
9
|
+
* inspection payload, the run-scoped subscription ownership tuple, and the
|
|
10
|
+
* Log-node level. All consumed over SSE — no engine runtime dependency.
|
|
9
11
|
*/
|
|
10
12
|
import type { GraphPortDefinition } from "@decaf-ts/ui-decorators/graph";
|
|
11
|
-
import type { GraphExecutionEventType, GraphExecutionStatus } from "./constants.d.cts";
|
|
13
|
+
import type { GraphExecutionEventType, GraphExecutionStatus, GraphVisualState } from "./constants.d.cts";
|
|
12
14
|
/**
|
|
13
15
|
* A value reference inside a {@link ConditionExpression}.
|
|
14
16
|
*
|
|
@@ -166,3 +168,90 @@ export interface GraphExecutionEvent {
|
|
|
166
168
|
error?: GraphExecutionErrorPayload;
|
|
167
169
|
metadata?: Record<string, unknown>;
|
|
168
170
|
}
|
|
171
|
+
/**
|
|
172
|
+
* Payload carried by `NODE_STATE_CHANGED` events (DECAF-48 §4.4).
|
|
173
|
+
*
|
|
174
|
+
* The visual state is the engine-agnostic contract a Mastra/NestJS driver
|
|
175
|
+
* MUST emit; the reference engine derives it from its own execution events.
|
|
176
|
+
*/
|
|
177
|
+
export interface GraphNodeStateChangedPayload {
|
|
178
|
+
nodeId: string;
|
|
179
|
+
state: GraphVisualState;
|
|
180
|
+
runId: string;
|
|
181
|
+
workflowId: string;
|
|
182
|
+
/** Engine status that produced the visual state (when available). */
|
|
183
|
+
status?: GraphExecutionStatus;
|
|
184
|
+
iteration?: number;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Payload carried by `EDGE_STATE_CHANGED` events (DECAF-48 §4.4).
|
|
188
|
+
*/
|
|
189
|
+
export interface GraphEdgeStateChangedPayload {
|
|
190
|
+
edgeId: string;
|
|
191
|
+
state: GraphVisualState;
|
|
192
|
+
runId: string;
|
|
193
|
+
workflowId: string;
|
|
194
|
+
/** Source node of the routed edge (when available). */
|
|
195
|
+
nodeId?: string;
|
|
196
|
+
/** Engine status that produced the visual state (when available). */
|
|
197
|
+
status?: GraphExecutionStatus;
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Structured log line streamed over the `graph.run.log` SSE channel
|
|
201
|
+
* (DECAF-48 §4.3). Serialized from the run's `ctx.logger` output; the level
|
|
202
|
+
* drives the Chrome-console-style filter while the attributes render as
|
|
203
|
+
* discrete columns.
|
|
204
|
+
*/
|
|
205
|
+
export interface GraphRunLogEntry {
|
|
206
|
+
/** Log severity level driving the Chrome-console-style widget filter (all `LogNodeLevel` values plus `benchmark`). */
|
|
207
|
+
level: "silly" | "trace" | "debug" | "verbose" | "info" | "warn" | "error" | "critical" | "fatal" | "benchmark";
|
|
208
|
+
message: string;
|
|
209
|
+
timestamp: string;
|
|
210
|
+
runId: string;
|
|
211
|
+
workflowId: string;
|
|
212
|
+
nodeId?: string;
|
|
213
|
+
user?: string | null;
|
|
214
|
+
/** Structured payload associated with the log line, if any. */
|
|
215
|
+
payload?: unknown;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Structured per-node I/O payload exposed for node inspection (DECAF-48 §4.6).
|
|
219
|
+
*
|
|
220
|
+
* Frontend-safe: pure data delivered via `graph/shared` types over the SSE
|
|
221
|
+
* state channel (or a `GET /graph/results/:runId` lookup); the frontend
|
|
222
|
+
* renders both panes (inputs right, outputs/error left) from this one shape.
|
|
223
|
+
*/
|
|
224
|
+
export interface GraphNodeInspectionPayload {
|
|
225
|
+
runId: string;
|
|
226
|
+
workflowId: string;
|
|
227
|
+
nodeId: string;
|
|
228
|
+
state: GraphVisualState;
|
|
229
|
+
inputs: Record<string, unknown>;
|
|
230
|
+
/** Present when SUCCEEDED (or from cache). */
|
|
231
|
+
outputs?: Record<string, unknown>;
|
|
232
|
+
/** Present when FAILED. */
|
|
233
|
+
error?: GraphExecutionErrorPayload;
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* Log levels accepted by the Log node (DECAF-48 §4.3).
|
|
237
|
+
*
|
|
238
|
+
* Mirrors the DECAF-9 log level set so the Log node executor (and the
|
|
239
|
+
* {@link GraphRunLogger} dispatch) can forward onto the run's `ctx.logger`.
|
|
240
|
+
* Includes every level rendered by the Chrome-console-style widget filter.
|
|
241
|
+
*/
|
|
242
|
+
export type LogNodeLevel = "silly" | "trace" | "debug" | "verbose" | "info" | "warn" | "error" | "critical" | "fatal";
|
|
243
|
+
/**
|
|
244
|
+
* Run-scoped SSE subscription ownership key (DECAF-48 §4.2).
|
|
245
|
+
*
|
|
246
|
+
* Subscription-mode SSE is keyed by run ownership: a consumer is only
|
|
247
|
+
* delivered graph events/logs for runs it owns. This tuple is the
|
|
248
|
+
* engine-agnostic contract a Mastra/NestJS driver MUST honour —
|
|
249
|
+
* `runId` together with the owning `user` (or a `system` runner when the
|
|
250
|
+
* identity is absent) scope every `graph.run.*` event before `next(...)`.
|
|
251
|
+
*/
|
|
252
|
+
export interface GraphRunSubscription {
|
|
253
|
+
runId: string;
|
|
254
|
+
ownerUser: string | null;
|
|
255
|
+
/** Optional topic filter (e.g. `graph.run.log`, `graph.run.state`). */
|
|
256
|
+
topics?: string[];
|
|
257
|
+
}
|
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
* @module integrations/graph/shared/types
|
|
3
3
|
* @summary Frontend-safe graph type declarations.
|
|
4
4
|
* @description Type aliases and interfaces that are safe to import from a
|
|
5
|
-
* frontend bundle.
|
|
6
|
-
* condition DSL, switch cases, node metadata patches)
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* frontend bundle. Alongside the declarative graph metadata types (loop
|
|
6
|
+
* condition DSL, switch cases, node metadata patches), this module carries the
|
|
7
|
+
* DECAF-48 execution contract consumed by the frontend via SSE: the node/edge
|
|
8
|
+
* state-change payloads, the structured run log entry, the node I/O
|
|
9
|
+
* inspection payload, the run-scoped subscription ownership tuple, and the
|
|
10
|
+
* Log-node level. All consumed over SSE — no engine runtime dependency.
|
|
9
11
|
*/
|
|
10
12
|
import type { GraphPortDefinition } from "@decaf-ts/ui-decorators/graph";
|
|
11
|
-
import type { GraphExecutionEventType, GraphExecutionStatus } from "./constants.d.mts";
|
|
13
|
+
import type { GraphExecutionEventType, GraphExecutionStatus, GraphVisualState } from "./constants.d.mts";
|
|
12
14
|
/**
|
|
13
15
|
* A value reference inside a {@link ConditionExpression}.
|
|
14
16
|
*
|
|
@@ -166,3 +168,90 @@ export interface GraphExecutionEvent {
|
|
|
166
168
|
error?: GraphExecutionErrorPayload;
|
|
167
169
|
metadata?: Record<string, unknown>;
|
|
168
170
|
}
|
|
171
|
+
/**
|
|
172
|
+
* Payload carried by `NODE_STATE_CHANGED` events (DECAF-48 §4.4).
|
|
173
|
+
*
|
|
174
|
+
* The visual state is the engine-agnostic contract a Mastra/NestJS driver
|
|
175
|
+
* MUST emit; the reference engine derives it from its own execution events.
|
|
176
|
+
*/
|
|
177
|
+
export interface GraphNodeStateChangedPayload {
|
|
178
|
+
nodeId: string;
|
|
179
|
+
state: GraphVisualState;
|
|
180
|
+
runId: string;
|
|
181
|
+
workflowId: string;
|
|
182
|
+
/** Engine status that produced the visual state (when available). */
|
|
183
|
+
status?: GraphExecutionStatus;
|
|
184
|
+
iteration?: number;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Payload carried by `EDGE_STATE_CHANGED` events (DECAF-48 §4.4).
|
|
188
|
+
*/
|
|
189
|
+
export interface GraphEdgeStateChangedPayload {
|
|
190
|
+
edgeId: string;
|
|
191
|
+
state: GraphVisualState;
|
|
192
|
+
runId: string;
|
|
193
|
+
workflowId: string;
|
|
194
|
+
/** Source node of the routed edge (when available). */
|
|
195
|
+
nodeId?: string;
|
|
196
|
+
/** Engine status that produced the visual state (when available). */
|
|
197
|
+
status?: GraphExecutionStatus;
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Structured log line streamed over the `graph.run.log` SSE channel
|
|
201
|
+
* (DECAF-48 §4.3). Serialized from the run's `ctx.logger` output; the level
|
|
202
|
+
* drives the Chrome-console-style filter while the attributes render as
|
|
203
|
+
* discrete columns.
|
|
204
|
+
*/
|
|
205
|
+
export interface GraphRunLogEntry {
|
|
206
|
+
/** Log severity level driving the Chrome-console-style widget filter (all `LogNodeLevel` values plus `benchmark`). */
|
|
207
|
+
level: "silly" | "trace" | "debug" | "verbose" | "info" | "warn" | "error" | "critical" | "fatal" | "benchmark";
|
|
208
|
+
message: string;
|
|
209
|
+
timestamp: string;
|
|
210
|
+
runId: string;
|
|
211
|
+
workflowId: string;
|
|
212
|
+
nodeId?: string;
|
|
213
|
+
user?: string | null;
|
|
214
|
+
/** Structured payload associated with the log line, if any. */
|
|
215
|
+
payload?: unknown;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Structured per-node I/O payload exposed for node inspection (DECAF-48 §4.6).
|
|
219
|
+
*
|
|
220
|
+
* Frontend-safe: pure data delivered via `graph/shared` types over the SSE
|
|
221
|
+
* state channel (or a `GET /graph/results/:runId` lookup); the frontend
|
|
222
|
+
* renders both panes (inputs right, outputs/error left) from this one shape.
|
|
223
|
+
*/
|
|
224
|
+
export interface GraphNodeInspectionPayload {
|
|
225
|
+
runId: string;
|
|
226
|
+
workflowId: string;
|
|
227
|
+
nodeId: string;
|
|
228
|
+
state: GraphVisualState;
|
|
229
|
+
inputs: Record<string, unknown>;
|
|
230
|
+
/** Present when SUCCEEDED (or from cache). */
|
|
231
|
+
outputs?: Record<string, unknown>;
|
|
232
|
+
/** Present when FAILED. */
|
|
233
|
+
error?: GraphExecutionErrorPayload;
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* Log levels accepted by the Log node (DECAF-48 §4.3).
|
|
237
|
+
*
|
|
238
|
+
* Mirrors the DECAF-9 log level set so the Log node executor (and the
|
|
239
|
+
* {@link GraphRunLogger} dispatch) can forward onto the run's `ctx.logger`.
|
|
240
|
+
* Includes every level rendered by the Chrome-console-style widget filter.
|
|
241
|
+
*/
|
|
242
|
+
export type LogNodeLevel = "silly" | "trace" | "debug" | "verbose" | "info" | "warn" | "error" | "critical" | "fatal";
|
|
243
|
+
/**
|
|
244
|
+
* Run-scoped SSE subscription ownership key (DECAF-48 §4.2).
|
|
245
|
+
*
|
|
246
|
+
* Subscription-mode SSE is keyed by run ownership: a consumer is only
|
|
247
|
+
* delivered graph events/logs for runs it owns. This tuple is the
|
|
248
|
+
* engine-agnostic contract a Mastra/NestJS driver MUST honour —
|
|
249
|
+
* `runId` together with the owning `user` (or a `system` runner when the
|
|
250
|
+
* identity is absent) scope every `graph.run.*` event before `next(...)`.
|
|
251
|
+
*/
|
|
252
|
+
export interface GraphRunSubscription {
|
|
253
|
+
runId: string;
|
|
254
|
+
ownerUser: string | null;
|
|
255
|
+
/** Optional topic filter (e.g. `graph.run.log`, `graph.run.state`). */
|
|
256
|
+
topics?: string[];
|
|
257
|
+
}
|
package/lib/types/index.d.cts
CHANGED
|
@@ -7,6 +7,6 @@ export * from "./utils.d.cts";
|
|
|
7
7
|
export * from "./namespaces/index.d.cts";
|
|
8
8
|
export * from "./feature-flags/index.d.cts";
|
|
9
9
|
export declare const VERSION: string;
|
|
10
|
-
export declare const COMMIT = "
|
|
11
|
-
export declare const FULL_VERSION = "0.
|
|
10
|
+
export declare const COMMIT = "2a891e0";
|
|
11
|
+
export declare const FULL_VERSION = "0.7.0-2a891e0";
|
|
12
12
|
export declare const PACKAGE_NAME: string;
|
package/lib/types/index.d.mts
CHANGED
|
@@ -7,6 +7,6 @@ export * from "./utils.d.mts";
|
|
|
7
7
|
export * from "./namespaces/index.d.mts";
|
|
8
8
|
export * from "./feature-flags/index.d.mts";
|
|
9
9
|
export declare const VERSION: string;
|
|
10
|
-
export declare const COMMIT = "
|
|
11
|
-
export declare const FULL_VERSION = "0.
|
|
10
|
+
export declare const COMMIT = "2a891e0";
|
|
11
|
+
export declare const FULL_VERSION = "0.7.0-2a891e0";
|
|
12
12
|
export declare const PACKAGE_NAME: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare class GraphExecutionResultModel extends
|
|
1
|
+
import { BaseModel } from "@decaf-ts/core";
|
|
2
|
+
export declare class GraphExecutionResultModel extends BaseModel {
|
|
3
3
|
runId: string;
|
|
4
4
|
workflowId: string;
|
|
5
5
|
status: string;
|
|
@@ -8,5 +8,5 @@ export declare class GraphExecutionResultModel extends Model {
|
|
|
8
8
|
nodeResults: Record<string, unknown>;
|
|
9
9
|
startedAt: Date;
|
|
10
10
|
finishedAt?: Date;
|
|
11
|
-
constructor(arg?:
|
|
11
|
+
constructor(arg?: Partial<GraphExecutionResultModel>);
|
|
12
12
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare class GraphExecutionResultModel extends
|
|
1
|
+
import { BaseModel } from "@decaf-ts/core";
|
|
2
|
+
export declare class GraphExecutionResultModel extends BaseModel {
|
|
3
3
|
runId: string;
|
|
4
4
|
workflowId: string;
|
|
5
5
|
status: string;
|
|
@@ -8,5 +8,5 @@ export declare class GraphExecutionResultModel extends Model {
|
|
|
8
8
|
nodeResults: Record<string, unknown>;
|
|
9
9
|
startedAt: Date;
|
|
10
10
|
finishedAt?: Date;
|
|
11
|
-
constructor(arg?:
|
|
11
|
+
constructor(arg?: Partial<GraphExecutionResultModel>);
|
|
12
12
|
}
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* @description Creates a registry pre-loaded with the demo executors used by
|
|
5
5
|
* the graph execution backend's sample workflows. The executors cover the
|
|
6
6
|
* flow-control kinds (including Code, Log, and Switch with code conditions),
|
|
7
|
-
* the agent kind, and the loop
|
|
8
|
-
*
|
|
9
|
-
* {@link GraphExecutionEngine}.
|
|
7
|
+
* the DECAF-48 `core.utility.log` Log node, the agent kind, and the loop
|
|
8
|
+
* kinds. Additional executors can be registered on the returned registry
|
|
9
|
+
* before it is handed to the {@link GraphExecutionEngine}.
|
|
10
10
|
*/
|
|
11
11
|
import { GraphNodeExecutorRegistry, GraphExecutionEngine, type GraphNodeExecutor, IsolatedVmCodeSandboxEvaluator } from "../../graph/index.d.cts";
|
|
12
12
|
/**
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* @description Creates a registry pre-loaded with the demo executors used by
|
|
5
5
|
* the graph execution backend's sample workflows. The executors cover the
|
|
6
6
|
* flow-control kinds (including Code, Log, and Switch with code conditions),
|
|
7
|
-
* the agent kind, and the loop
|
|
8
|
-
*
|
|
9
|
-
* {@link GraphExecutionEngine}.
|
|
7
|
+
* the DECAF-48 `core.utility.log` Log node, the agent kind, and the loop
|
|
8
|
+
* kinds. Additional executors can be registered on the returned registry
|
|
9
|
+
* before it is handed to the {@link GraphExecutionEngine}.
|
|
10
10
|
*/
|
|
11
11
|
import { GraphNodeExecutorRegistry, GraphExecutionEngine, type GraphNodeExecutor, IsolatedVmCodeSandboxEvaluator } from "../../graph/index.d.mts";
|
|
12
12
|
/**
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare class GraphWorkflowModel extends
|
|
1
|
+
import { BaseModel } from "@decaf-ts/core";
|
|
2
|
+
export declare class GraphWorkflowModel extends BaseModel {
|
|
3
3
|
workflowId: string;
|
|
4
4
|
snapshot: Record<string, unknown>;
|
|
5
|
-
|
|
6
|
-
constructor(arg?: ModelArg<GraphWorkflowModel>);
|
|
5
|
+
constructor(arg?: Partial<GraphWorkflowModel>);
|
|
7
6
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare class GraphWorkflowModel extends
|
|
1
|
+
import { BaseModel } from "@decaf-ts/core";
|
|
2
|
+
export declare class GraphWorkflowModel extends BaseModel {
|
|
3
3
|
workflowId: string;
|
|
4
4
|
snapshot: Record<string, unknown>;
|
|
5
|
-
|
|
6
|
-
constructor(arg?: ModelArg<GraphWorkflowModel>);
|
|
5
|
+
constructor(arg?: Partial<GraphWorkflowModel>);
|
|
7
6
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type ContextualArgs, type MaybeContextualArg } from "@decaf-ts/core";
|
|
2
|
+
import { SftpSource, type SftpFileEntry, type SftpFileResult, type SftpSourceConfig } from "../core/SftpSource.d.cts";
|
|
3
|
+
export interface AwsTransferSftpConfig extends SftpSourceConfig {
|
|
4
|
+
provider: "aws-transfer";
|
|
5
|
+
region: string;
|
|
6
|
+
bucket: string;
|
|
7
|
+
s3Prefix?: string;
|
|
8
|
+
serverId?: string;
|
|
9
|
+
}
|
|
10
|
+
interface S3ListObjectsV2Output {
|
|
11
|
+
Contents?: Array<{
|
|
12
|
+
Key?: string;
|
|
13
|
+
Size?: number;
|
|
14
|
+
LastModified?: Date;
|
|
15
|
+
}>;
|
|
16
|
+
NextContinuationToken?: string;
|
|
17
|
+
}
|
|
18
|
+
interface S3LikeClient {
|
|
19
|
+
listObjectsV2(params: unknown): Promise<S3ListObjectsV2Output>;
|
|
20
|
+
getObject(params: unknown): Promise<{
|
|
21
|
+
body: AsyncIterable<Uint8Array>;
|
|
22
|
+
}>;
|
|
23
|
+
deleteObject(params: unknown): Promise<unknown>;
|
|
24
|
+
}
|
|
25
|
+
export declare class AwsSftpService extends SftpSource<S3LikeClient, AwsTransferSftpConfig> {
|
|
26
|
+
constructor();
|
|
27
|
+
initialize(...args: ContextualArgs<any>): Promise<{
|
|
28
|
+
config: AwsTransferSftpConfig;
|
|
29
|
+
client: S3LikeClient;
|
|
30
|
+
}>;
|
|
31
|
+
private s3Prefix;
|
|
32
|
+
list(remoteDir?: string, ...args: MaybeContextualArg<any>): Promise<SftpFileEntry[]>;
|
|
33
|
+
fetch(remotePath: string, ...args: MaybeContextualArg<any>): Promise<SftpFileResult>;
|
|
34
|
+
delete(remotePath: string, ...args: MaybeContextualArg<any>): Promise<void>;
|
|
35
|
+
close(...args: MaybeContextualArg<any>): Promise<void>;
|
|
36
|
+
}
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type ContextualArgs, type MaybeContextualArg } from "@decaf-ts/core";
|
|
2
|
+
import { SftpSource, type SftpFileEntry, type SftpFileResult, type SftpSourceConfig } from "../core/SftpSource.d.mts";
|
|
3
|
+
export interface AwsTransferSftpConfig extends SftpSourceConfig {
|
|
4
|
+
provider: "aws-transfer";
|
|
5
|
+
region: string;
|
|
6
|
+
bucket: string;
|
|
7
|
+
s3Prefix?: string;
|
|
8
|
+
serverId?: string;
|
|
9
|
+
}
|
|
10
|
+
interface S3ListObjectsV2Output {
|
|
11
|
+
Contents?: Array<{
|
|
12
|
+
Key?: string;
|
|
13
|
+
Size?: number;
|
|
14
|
+
LastModified?: Date;
|
|
15
|
+
}>;
|
|
16
|
+
NextContinuationToken?: string;
|
|
17
|
+
}
|
|
18
|
+
interface S3LikeClient {
|
|
19
|
+
listObjectsV2(params: unknown): Promise<S3ListObjectsV2Output>;
|
|
20
|
+
getObject(params: unknown): Promise<{
|
|
21
|
+
body: AsyncIterable<Uint8Array>;
|
|
22
|
+
}>;
|
|
23
|
+
deleteObject(params: unknown): Promise<unknown>;
|
|
24
|
+
}
|
|
25
|
+
export declare class AwsSftpService extends SftpSource<S3LikeClient, AwsTransferSftpConfig> {
|
|
26
|
+
constructor();
|
|
27
|
+
initialize(...args: ContextualArgs<any>): Promise<{
|
|
28
|
+
config: AwsTransferSftpConfig;
|
|
29
|
+
client: S3LikeClient;
|
|
30
|
+
}>;
|
|
31
|
+
private s3Prefix;
|
|
32
|
+
list(remoteDir?: string, ...args: MaybeContextualArg<any>): Promise<SftpFileEntry[]>;
|
|
33
|
+
fetch(remotePath: string, ...args: MaybeContextualArg<any>): Promise<SftpFileResult>;
|
|
34
|
+
delete(remotePath: string, ...args: MaybeContextualArg<any>): Promise<void>;
|
|
35
|
+
close(...args: MaybeContextualArg<any>): Promise<void>;
|
|
36
|
+
}
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ClientBasedService, type ContextualArgs, type MaybeContextualArg } from "@decaf-ts/core";
|
|
2
|
+
export type SftpProvider = "ssh2" | "aws-transfer";
|
|
3
|
+
export interface SftpSourceConfig {
|
|
4
|
+
provider: SftpProvider;
|
|
5
|
+
sourceId: string;
|
|
6
|
+
host: string;
|
|
7
|
+
port?: number;
|
|
8
|
+
username: string;
|
|
9
|
+
password?: string;
|
|
10
|
+
privateKey?: string;
|
|
11
|
+
passphrase?: string;
|
|
12
|
+
remotePath?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface SftpFileEntry {
|
|
15
|
+
path: string;
|
|
16
|
+
name: string;
|
|
17
|
+
size: number;
|
|
18
|
+
modifyTime: number;
|
|
19
|
+
isDirectory: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface SftpFileResult {
|
|
22
|
+
path: string;
|
|
23
|
+
name: string;
|
|
24
|
+
content: Buffer;
|
|
25
|
+
size: number;
|
|
26
|
+
}
|
|
27
|
+
export declare abstract class SftpSource<TClient = unknown, TConfig extends SftpSourceConfig = SftpSourceConfig> extends ClientBasedService<TClient, TConfig> {
|
|
28
|
+
constructor();
|
|
29
|
+
get provider(): SftpProvider;
|
|
30
|
+
get sourceId(): string;
|
|
31
|
+
abstract initialize(...args: ContextualArgs<any>): Promise<{
|
|
32
|
+
config: TConfig;
|
|
33
|
+
client: TClient;
|
|
34
|
+
}>;
|
|
35
|
+
abstract list(remoteDir?: string, ...args: MaybeContextualArg<any>): Promise<SftpFileEntry[]>;
|
|
36
|
+
abstract fetch(remotePath: string, ...args: MaybeContextualArg<any>): Promise<SftpFileResult>;
|
|
37
|
+
abstract delete(remotePath: string, ...args: MaybeContextualArg<any>): Promise<void>;
|
|
38
|
+
abstract close(...args: MaybeContextualArg<any>): Promise<void>;
|
|
39
|
+
}
|
|
40
|
+
export declare function assertSftpConfig(config: SftpSourceConfig): void;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ClientBasedService, type ContextualArgs, type MaybeContextualArg } from "@decaf-ts/core";
|
|
2
|
+
export type SftpProvider = "ssh2" | "aws-transfer";
|
|
3
|
+
export interface SftpSourceConfig {
|
|
4
|
+
provider: SftpProvider;
|
|
5
|
+
sourceId: string;
|
|
6
|
+
host: string;
|
|
7
|
+
port?: number;
|
|
8
|
+
username: string;
|
|
9
|
+
password?: string;
|
|
10
|
+
privateKey?: string;
|
|
11
|
+
passphrase?: string;
|
|
12
|
+
remotePath?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface SftpFileEntry {
|
|
15
|
+
path: string;
|
|
16
|
+
name: string;
|
|
17
|
+
size: number;
|
|
18
|
+
modifyTime: number;
|
|
19
|
+
isDirectory: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface SftpFileResult {
|
|
22
|
+
path: string;
|
|
23
|
+
name: string;
|
|
24
|
+
content: Buffer;
|
|
25
|
+
size: number;
|
|
26
|
+
}
|
|
27
|
+
export declare abstract class SftpSource<TClient = unknown, TConfig extends SftpSourceConfig = SftpSourceConfig> extends ClientBasedService<TClient, TConfig> {
|
|
28
|
+
constructor();
|
|
29
|
+
get provider(): SftpProvider;
|
|
30
|
+
get sourceId(): string;
|
|
31
|
+
abstract initialize(...args: ContextualArgs<any>): Promise<{
|
|
32
|
+
config: TConfig;
|
|
33
|
+
client: TClient;
|
|
34
|
+
}>;
|
|
35
|
+
abstract list(remoteDir?: string, ...args: MaybeContextualArg<any>): Promise<SftpFileEntry[]>;
|
|
36
|
+
abstract fetch(remotePath: string, ...args: MaybeContextualArg<any>): Promise<SftpFileResult>;
|
|
37
|
+
abstract delete(remotePath: string, ...args: MaybeContextualArg<any>): Promise<void>;
|
|
38
|
+
abstract close(...args: MaybeContextualArg<any>): Promise<void>;
|
|
39
|
+
}
|
|
40
|
+
export declare function assertSftpConfig(config: SftpSourceConfig): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./SftpSource.d.cts";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./SftpSource.d.mts";
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { type ContextualArgs, type MaybeContextualArg } from "@decaf-ts/core";
|
|
2
|
+
import { SftpSource, type SftpFileEntry, type SftpFileResult, type SftpSourceConfig } from "../core/SftpSource.d.cts";
|
|
3
|
+
export interface Ssh2SftpConfig extends SftpSourceConfig {
|
|
4
|
+
provider: "ssh2";
|
|
5
|
+
readyTimeout?: number;
|
|
6
|
+
}
|
|
7
|
+
interface Ssh2Client {
|
|
8
|
+
connect(config: unknown): void;
|
|
9
|
+
on(event: "ready", cb: () => void): void;
|
|
10
|
+
on(event: "error", cb: (err: Error) => void): void;
|
|
11
|
+
sftp(cb: (err: Error | null, sftp: Ssh2SftpHandle) => void): void;
|
|
12
|
+
end(): void;
|
|
13
|
+
}
|
|
14
|
+
interface Ssh2SftpHandle {
|
|
15
|
+
readdir(dir: string, cb: (err: Error | null, list: Array<{
|
|
16
|
+
filename: string;
|
|
17
|
+
attrs: {
|
|
18
|
+
size: number;
|
|
19
|
+
mtime: number;
|
|
20
|
+
mode: number;
|
|
21
|
+
};
|
|
22
|
+
}>) => void): void;
|
|
23
|
+
stat(path: string, cb: (err: Error | null, stat: {
|
|
24
|
+
size: number;
|
|
25
|
+
mtime: number;
|
|
26
|
+
mode: number;
|
|
27
|
+
}) => void): void;
|
|
28
|
+
open(path: string, flags: string, cb: (err: Error | null, handle: Buffer) => void): void;
|
|
29
|
+
read(handle: Buffer, buffer: Buffer, offset: number, length: number, position: number, cb: (err: Error | null, bytesRead: number, buffer: Buffer) => void): void;
|
|
30
|
+
close(handle: Buffer, cb: (err: Error | null) => void): void;
|
|
31
|
+
unlink(path: string, cb: (err: Error | null) => void): void;
|
|
32
|
+
end(cb?: () => void): void;
|
|
33
|
+
}
|
|
34
|
+
export declare class Ssh2SftpService extends SftpSource<Ssh2Client, Ssh2SftpConfig> {
|
|
35
|
+
private sftp?;
|
|
36
|
+
constructor();
|
|
37
|
+
initialize(...args: ContextualArgs<any>): Promise<{
|
|
38
|
+
config: Ssh2SftpConfig;
|
|
39
|
+
client: Ssh2Client;
|
|
40
|
+
}>;
|
|
41
|
+
list(remoteDir?: string, ...args: MaybeContextualArg<any>): Promise<SftpFileEntry[]>;
|
|
42
|
+
fetch(remotePath: string, ...args: MaybeContextualArg<any>): Promise<SftpFileResult>;
|
|
43
|
+
delete(remotePath: string, ...args: MaybeContextualArg<any>): Promise<void>;
|
|
44
|
+
close(...args: MaybeContextualArg<any>): Promise<void>;
|
|
45
|
+
private requireSftp;
|
|
46
|
+
}
|
|
47
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { type ContextualArgs, type MaybeContextualArg } from "@decaf-ts/core";
|
|
2
|
+
import { SftpSource, type SftpFileEntry, type SftpFileResult, type SftpSourceConfig } from "../core/SftpSource.d.mts";
|
|
3
|
+
export interface Ssh2SftpConfig extends SftpSourceConfig {
|
|
4
|
+
provider: "ssh2";
|
|
5
|
+
readyTimeout?: number;
|
|
6
|
+
}
|
|
7
|
+
interface Ssh2Client {
|
|
8
|
+
connect(config: unknown): void;
|
|
9
|
+
on(event: "ready", cb: () => void): void;
|
|
10
|
+
on(event: "error", cb: (err: Error) => void): void;
|
|
11
|
+
sftp(cb: (err: Error | null, sftp: Ssh2SftpHandle) => void): void;
|
|
12
|
+
end(): void;
|
|
13
|
+
}
|
|
14
|
+
interface Ssh2SftpHandle {
|
|
15
|
+
readdir(dir: string, cb: (err: Error | null, list: Array<{
|
|
16
|
+
filename: string;
|
|
17
|
+
attrs: {
|
|
18
|
+
size: number;
|
|
19
|
+
mtime: number;
|
|
20
|
+
mode: number;
|
|
21
|
+
};
|
|
22
|
+
}>) => void): void;
|
|
23
|
+
stat(path: string, cb: (err: Error | null, stat: {
|
|
24
|
+
size: number;
|
|
25
|
+
mtime: number;
|
|
26
|
+
mode: number;
|
|
27
|
+
}) => void): void;
|
|
28
|
+
open(path: string, flags: string, cb: (err: Error | null, handle: Buffer) => void): void;
|
|
29
|
+
read(handle: Buffer, buffer: Buffer, offset: number, length: number, position: number, cb: (err: Error | null, bytesRead: number, buffer: Buffer) => void): void;
|
|
30
|
+
close(handle: Buffer, cb: (err: Error | null) => void): void;
|
|
31
|
+
unlink(path: string, cb: (err: Error | null) => void): void;
|
|
32
|
+
end(cb?: () => void): void;
|
|
33
|
+
}
|
|
34
|
+
export declare class Ssh2SftpService extends SftpSource<Ssh2Client, Ssh2SftpConfig> {
|
|
35
|
+
private sftp?;
|
|
36
|
+
constructor();
|
|
37
|
+
initialize(...args: ContextualArgs<any>): Promise<{
|
|
38
|
+
config: Ssh2SftpConfig;
|
|
39
|
+
client: Ssh2Client;
|
|
40
|
+
}>;
|
|
41
|
+
list(remoteDir?: string, ...args: MaybeContextualArg<any>): Promise<SftpFileEntry[]>;
|
|
42
|
+
fetch(remotePath: string, ...args: MaybeContextualArg<any>): Promise<SftpFileResult>;
|
|
43
|
+
delete(remotePath: string, ...args: MaybeContextualArg<any>): Promise<void>;
|
|
44
|
+
close(...args: MaybeContextualArg<any>): Promise<void>;
|
|
45
|
+
private requireSftp;
|
|
46
|
+
}
|
|
47
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/user-requests
|
|
3
|
+
* @summary User Request Resolution Engine surface exported to integrations
|
|
4
|
+
* consumers.
|
|
5
|
+
* @description Re-exports the `@decaf-ts/ui-decorators/user-requests` barrel so
|
|
6
|
+
* integrations packages can hand user-request handling to app consumers
|
|
7
|
+
* through a flat entry point.
|
|
8
|
+
*/
|
|
9
|
+
export * from '@decaf-ts/ui-decorators/user-requests';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/user-requests
|
|
3
|
+
* @summary User Request Resolution Engine surface exported to integrations
|
|
4
|
+
* consumers.
|
|
5
|
+
* @description Re-exports the `@decaf-ts/ui-decorators/user-requests` barrel so
|
|
6
|
+
* integrations packages can hand user-request handling to app consumers
|
|
7
|
+
* through a flat entry point.
|
|
8
|
+
*/
|
|
9
|
+
export * from '@decaf-ts/ui-decorators/user-requests';
|