@decaf-ts/ui-decorators 0.20.3 → 0.20.6
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/ui-decorators.cjs +1 -1
- package/lib/cjs/graph/GraphExecutionStateMapper.cjs +97 -0
- package/lib/cjs/graph/GraphExecutionStateMapper.cjs.map +1 -0
- package/lib/cjs/graph/GraphResolution.cjs +17 -0
- package/lib/cjs/graph/GraphResolution.cjs.map +1 -0
- package/lib/cjs/graph/constants.cjs +157 -1
- package/lib/cjs/graph/constants.cjs.map +1 -1
- package/lib/cjs/graph/index.cjs +3 -0
- package/lib/cjs/graph/index.cjs.map +1 -1
- package/lib/cjs/graph/nodes/agents/agent.cjs +110 -0
- package/lib/cjs/graph/nodes/agents/agent.cjs.map +1 -0
- package/lib/cjs/graph/nodes/base.cjs +36 -0
- package/lib/cjs/graph/nodes/base.cjs.map +1 -0
- package/lib/cjs/graph/nodes/boundary/input-value.cjs +57 -0
- package/lib/cjs/graph/nodes/boundary/input-value.cjs.map +1 -0
- package/lib/cjs/graph/nodes/category-styles.cjs +38 -0
- package/lib/cjs/graph/nodes/category-styles.cjs.map +1 -0
- package/lib/cjs/graph/nodes/flow-control/break.cjs +63 -0
- package/lib/cjs/graph/nodes/flow-control/break.cjs.map +1 -0
- package/lib/cjs/graph/nodes/flow-control/error-boundary.cjs +67 -0
- package/lib/cjs/graph/nodes/flow-control/error-boundary.cjs.map +1 -0
- package/lib/cjs/graph/nodes/flow-control/human-approval.cjs +69 -0
- package/lib/cjs/graph/nodes/flow-control/human-approval.cjs.map +1 -0
- package/lib/cjs/graph/nodes/flow-control/if.cjs +71 -0
- package/lib/cjs/graph/nodes/flow-control/if.cjs.map +1 -0
- package/lib/cjs/graph/nodes/flow-control/parallel.cjs +61 -0
- package/lib/cjs/graph/nodes/flow-control/parallel.cjs.map +1 -0
- package/lib/cjs/graph/nodes/flow-control/switch.cjs +121 -0
- package/lib/cjs/graph/nodes/flow-control/switch.cjs.map +1 -0
- package/lib/cjs/graph/nodes/index.cjs +123 -0
- package/lib/cjs/graph/nodes/index.cjs.map +1 -0
- package/lib/cjs/graph/nodes/loops/foreach.cjs +86 -0
- package/lib/cjs/graph/nodes/loops/foreach.cjs.map +1 -0
- package/lib/cjs/graph/nodes/loops/until.cjs +74 -0
- package/lib/cjs/graph/nodes/loops/until.cjs.map +1 -0
- package/lib/cjs/graph/nodes/loops/while.cjs +74 -0
- package/lib/cjs/graph/nodes/loops/while.cjs.map +1 -0
- package/lib/cjs/graph/nodes/manifests.cjs +338 -0
- package/lib/cjs/graph/nodes/manifests.cjs.map +1 -0
- package/lib/cjs/graph/nodes/triggers/chat.cjs +70 -0
- package/lib/cjs/graph/nodes/triggers/chat.cjs.map +1 -0
- package/lib/cjs/graph/nodes/triggers/event.cjs +58 -0
- package/lib/cjs/graph/nodes/triggers/event.cjs.map +1 -0
- package/lib/cjs/graph/nodes/triggers/form.cjs +59 -0
- package/lib/cjs/graph/nodes/triggers/form.cjs.map +1 -0
- package/lib/cjs/graph/nodes/triggers/manual.cjs +60 -0
- package/lib/cjs/graph/nodes/triggers/manual.cjs.map +1 -0
- package/lib/cjs/graph/nodes/triggers/schedule.cjs +60 -0
- package/lib/cjs/graph/nodes/triggers/schedule.cjs.map +1 -0
- package/lib/cjs/graph/nodes/triggers/webhook.cjs +62 -0
- package/lib/cjs/graph/nodes/triggers/webhook.cjs.map +1 -0
- package/lib/cjs/graph/nodes/utility/code.cjs +99 -0
- package/lib/cjs/graph/nodes/utility/code.cjs.map +1 -0
- package/lib/cjs/graph/nodes/utility/delay.cjs +61 -0
- package/lib/cjs/graph/nodes/utility/delay.cjs.map +1 -0
- package/lib/cjs/graph/nodes/utility/log.cjs +62 -0
- package/lib/cjs/graph/nodes/utility/log.cjs.map +1 -0
- package/lib/cjs/graph/nodes/utility/map.cjs +61 -0
- package/lib/cjs/graph/nodes/utility/map.cjs.map +1 -0
- package/lib/cjs/graph/nodes/utility/merge.cjs +62 -0
- package/lib/cjs/graph/nodes/utility/merge.cjs.map +1 -0
- package/lib/cjs/graph/nodes/utility/return.cjs +61 -0
- package/lib/cjs/graph/nodes/utility/return.cjs.map +1 -0
- package/lib/cjs/graph/nodes/utility/utility-log.cjs +66 -0
- package/lib/cjs/graph/nodes/utility/utility-log.cjs.map +1 -0
- package/lib/cjs/index.cjs +3 -3
- package/lib/esm/graph/GraphExecutionStateMapper.js +91 -0
- package/lib/esm/graph/GraphExecutionStateMapper.js.map +1 -0
- package/lib/esm/graph/GraphResolution.js +13 -0
- package/lib/esm/graph/GraphResolution.js.map +1 -0
- package/lib/esm/graph/constants.js +179 -0
- package/lib/esm/graph/constants.js.map +1 -1
- package/lib/esm/graph/index.js +3 -0
- package/lib/esm/graph/index.js.map +1 -1
- package/lib/esm/graph/nodes/agents/agent.js +101 -0
- package/lib/esm/graph/nodes/agents/agent.js.map +1 -0
- package/lib/esm/graph/nodes/base.js +31 -0
- package/lib/esm/graph/nodes/base.js.map +1 -0
- package/lib/esm/graph/nodes/boundary/input-value.js +48 -0
- package/lib/esm/graph/nodes/boundary/input-value.js.map +1 -0
- package/lib/esm/graph/nodes/category-styles.js +34 -0
- package/lib/esm/graph/nodes/category-styles.js.map +1 -0
- package/lib/esm/graph/nodes/flow-control/break.js +54 -0
- package/lib/esm/graph/nodes/flow-control/break.js.map +1 -0
- package/lib/esm/graph/nodes/flow-control/error-boundary.js +58 -0
- package/lib/esm/graph/nodes/flow-control/error-boundary.js.map +1 -0
- package/lib/esm/graph/nodes/flow-control/human-approval.js +60 -0
- package/lib/esm/graph/nodes/flow-control/human-approval.js.map +1 -0
- package/lib/esm/graph/nodes/flow-control/if.js +62 -0
- package/lib/esm/graph/nodes/flow-control/if.js.map +1 -0
- package/lib/esm/graph/nodes/flow-control/parallel.js +52 -0
- package/lib/esm/graph/nodes/flow-control/parallel.js.map +1 -0
- package/lib/esm/graph/nodes/flow-control/switch.js +112 -0
- package/lib/esm/graph/nodes/flow-control/switch.js.map +1 -0
- package/lib/esm/graph/nodes/index.js +105 -0
- package/lib/esm/graph/nodes/index.js.map +1 -0
- package/lib/esm/graph/nodes/loops/foreach.js +77 -0
- package/lib/esm/graph/nodes/loops/foreach.js.map +1 -0
- package/lib/esm/graph/nodes/loops/until.js +65 -0
- package/lib/esm/graph/nodes/loops/until.js.map +1 -0
- package/lib/esm/graph/nodes/loops/while.js +65 -0
- package/lib/esm/graph/nodes/loops/while.js.map +1 -0
- package/lib/esm/graph/nodes/manifests.js +334 -0
- package/lib/esm/graph/nodes/manifests.js.map +1 -0
- package/lib/esm/graph/nodes/triggers/chat.js +61 -0
- package/lib/esm/graph/nodes/triggers/chat.js.map +1 -0
- package/lib/esm/graph/nodes/triggers/event.js +49 -0
- package/lib/esm/graph/nodes/triggers/event.js.map +1 -0
- package/lib/esm/graph/nodes/triggers/form.js +50 -0
- package/lib/esm/graph/nodes/triggers/form.js.map +1 -0
- package/lib/esm/graph/nodes/triggers/manual.js +51 -0
- package/lib/esm/graph/nodes/triggers/manual.js.map +1 -0
- package/lib/esm/graph/nodes/triggers/schedule.js +51 -0
- package/lib/esm/graph/nodes/triggers/schedule.js.map +1 -0
- package/lib/esm/graph/nodes/triggers/webhook.js +53 -0
- package/lib/esm/graph/nodes/triggers/webhook.js.map +1 -0
- package/lib/esm/graph/nodes/utility/code.js +90 -0
- package/lib/esm/graph/nodes/utility/code.js.map +1 -0
- package/lib/esm/graph/nodes/utility/delay.js +52 -0
- package/lib/esm/graph/nodes/utility/delay.js.map +1 -0
- package/lib/esm/graph/nodes/utility/log.js +53 -0
- package/lib/esm/graph/nodes/utility/log.js.map +1 -0
- package/lib/esm/graph/nodes/utility/map.js +52 -0
- package/lib/esm/graph/nodes/utility/map.js.map +1 -0
- package/lib/esm/graph/nodes/utility/merge.js +53 -0
- package/lib/esm/graph/nodes/utility/merge.js.map +1 -0
- package/lib/esm/graph/nodes/utility/return.js +52 -0
- package/lib/esm/graph/nodes/utility/return.js.map +1 -0
- package/lib/esm/graph/nodes/utility/utility-log.js +57 -0
- package/lib/esm/graph/nodes/utility/utility-log.js.map +1 -0
- package/lib/esm/index.js +3 -3
- package/lib/types/graph/GraphExecutionStateMapper.d.cts +66 -0
- package/lib/types/graph/GraphExecutionStateMapper.d.mts +66 -0
- package/lib/types/graph/GraphResolution.d.cts +53 -0
- package/lib/types/graph/GraphResolution.d.mts +53 -0
- package/lib/types/graph/constants.d.cts +165 -0
- package/lib/types/graph/constants.d.mts +165 -0
- package/lib/types/graph/index.d.cts +3 -0
- package/lib/types/graph/index.d.mts +3 -0
- package/lib/types/graph/nodes/agents/agent.d.cts +44 -0
- package/lib/types/graph/nodes/agents/agent.d.mts +44 -0
- package/lib/types/graph/nodes/base.d.cts +28 -0
- package/lib/types/graph/nodes/base.d.mts +28 -0
- package/lib/types/graph/nodes/boundary/input-value.d.cts +13 -0
- package/lib/types/graph/nodes/boundary/input-value.d.mts +13 -0
- package/lib/types/graph/nodes/category-styles.d.cts +8 -0
- package/lib/types/graph/nodes/category-styles.d.mts +8 -0
- package/lib/types/graph/nodes/flow-control/break.d.cts +15 -0
- package/lib/types/graph/nodes/flow-control/break.d.mts +15 -0
- package/lib/types/graph/nodes/flow-control/error-boundary.d.cts +12 -0
- package/lib/types/graph/nodes/flow-control/error-boundary.d.mts +12 -0
- package/lib/types/graph/nodes/flow-control/human-approval.d.cts +13 -0
- package/lib/types/graph/nodes/flow-control/human-approval.d.mts +13 -0
- package/lib/types/graph/nodes/flow-control/if.d.cts +16 -0
- package/lib/types/graph/nodes/flow-control/if.d.mts +16 -0
- package/lib/types/graph/nodes/flow-control/parallel.d.cts +11 -0
- package/lib/types/graph/nodes/flow-control/parallel.d.mts +11 -0
- package/lib/types/graph/nodes/flow-control/switch.d.cts +21 -0
- package/lib/types/graph/nodes/flow-control/switch.d.mts +21 -0
- package/lib/types/graph/nodes/index.d.cts +79 -0
- package/lib/types/graph/nodes/index.d.mts +79 -0
- package/lib/types/graph/nodes/loops/foreach.d.cts +19 -0
- package/lib/types/graph/nodes/loops/foreach.d.mts +19 -0
- package/lib/types/graph/nodes/loops/until.d.cts +16 -0
- package/lib/types/graph/nodes/loops/until.d.mts +16 -0
- package/lib/types/graph/nodes/loops/while.d.cts +16 -0
- package/lib/types/graph/nodes/loops/while.d.mts +16 -0
- package/lib/types/graph/nodes/manifests.d.cts +62 -0
- package/lib/types/graph/nodes/manifests.d.mts +62 -0
- package/lib/types/graph/nodes/triggers/chat.d.cts +13 -0
- package/lib/types/graph/nodes/triggers/chat.d.mts +13 -0
- package/lib/types/graph/nodes/triggers/event.d.cts +10 -0
- package/lib/types/graph/nodes/triggers/event.d.mts +10 -0
- package/lib/types/graph/nodes/triggers/form.d.cts +11 -0
- package/lib/types/graph/nodes/triggers/form.d.mts +11 -0
- package/lib/types/graph/nodes/triggers/manual.d.cts +12 -0
- package/lib/types/graph/nodes/triggers/manual.d.mts +12 -0
- package/lib/types/graph/nodes/triggers/schedule.d.cts +11 -0
- package/lib/types/graph/nodes/triggers/schedule.d.mts +11 -0
- package/lib/types/graph/nodes/triggers/webhook.d.cts +11 -0
- package/lib/types/graph/nodes/triggers/webhook.d.mts +11 -0
- package/lib/types/graph/nodes/utility/code.d.cts +31 -0
- package/lib/types/graph/nodes/utility/code.d.mts +31 -0
- package/lib/types/graph/nodes/utility/delay.d.cts +11 -0
- package/lib/types/graph/nodes/utility/delay.d.mts +11 -0
- package/lib/types/graph/nodes/utility/log.d.cts +13 -0
- package/lib/types/graph/nodes/utility/log.d.mts +13 -0
- package/lib/types/graph/nodes/utility/map.d.cts +11 -0
- package/lib/types/graph/nodes/utility/map.d.mts +11 -0
- package/lib/types/graph/nodes/utility/merge.d.cts +12 -0
- package/lib/types/graph/nodes/utility/merge.d.mts +12 -0
- package/lib/types/graph/nodes/utility/return.d.cts +11 -0
- package/lib/types/graph/nodes/utility/return.d.mts +11 -0
- package/lib/types/graph/nodes/utility/utility-log.d.cts +15 -0
- package/lib/types/graph/nodes/utility/utility-log.d.mts +15 -0
- package/lib/types/graph/types.d.cts +286 -0
- package/lib/types/graph/types.d.mts +286 -0
- package/lib/types/index.d.cts +3 -3
- package/lib/types/index.d.mts +3 -3
- package/package.json +1 -1
|
@@ -282,3 +282,168 @@ export declare function resolveEffectiveColor(explicitColor?: string, category?:
|
|
|
282
282
|
* category icon, which overrides the default.
|
|
283
283
|
*/
|
|
284
284
|
export declare function resolveEffectiveIcon(explicitIcon?: string, category?: string): string;
|
|
285
|
+
import type { GraphRunStatus } from "./types.d.mts";
|
|
286
|
+
/**
|
|
287
|
+
* Disabled-node execution semantics (DECAF-50 §4.9).
|
|
288
|
+
*
|
|
289
|
+
* - `skip` — the node does not execute and produces no outputs.
|
|
290
|
+
* - `passThroughFirstInput` — the first incoming edge value is forwarded on
|
|
291
|
+
* the node's first declared output port.
|
|
292
|
+
* - `emitDefaults` — every declared output port is emitted with its default
|
|
293
|
+
* (absent a declared default, `undefined`).
|
|
294
|
+
*/
|
|
295
|
+
export declare const GRAPH_DISABLED_NODE_BEHAVIORS: readonly ["skip", "passThroughFirstInput", "emitDefaults"];
|
|
296
|
+
/** How a disabled node behaves during execution (DECAF-50 §4.8): skip it, pass through its first input, or emit default outputs. */
|
|
297
|
+
export type GraphDisabledNodeBehavior = (typeof GRAPH_DISABLED_NODE_BEHAVIORS)[number];
|
|
298
|
+
/** The disabled-node behavior applied when a node declares none. */
|
|
299
|
+
export declare const GRAPH_DEFAULT_DISABLED_NODE_BEHAVIOR: GraphDisabledNodeBehavior;
|
|
300
|
+
/** Type guard for {@link GraphDisabledNodeBehavior}. */
|
|
301
|
+
export declare function isGraphDisabledNodeBehavior(value: unknown): value is GraphDisabledNodeBehavior;
|
|
302
|
+
/**
|
|
303
|
+
* Execution status for a workflow or individual node.
|
|
304
|
+
*/
|
|
305
|
+
export declare enum GraphExecutionStatus {
|
|
306
|
+
PENDING = "pending",
|
|
307
|
+
PLANNING = "planning",
|
|
308
|
+
RUNNING = "running",
|
|
309
|
+
SUCCEEDED = "succeeded",
|
|
310
|
+
FAILED = "failed",
|
|
311
|
+
SKIPPED = "skipped",
|
|
312
|
+
CANCELLED = "cancelled",
|
|
313
|
+
CACHED = "cached"
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* Visual execution state for a node or edge on the workflow canvas.
|
|
317
|
+
*
|
|
318
|
+
* Frontend-safe (DECAF-48 §4.4): a superset of {@link GraphExecutionStatus}
|
|
319
|
+
* normalised for rendering. `BLOCKED` is derived from the plan and execution
|
|
320
|
+
* events (waiting on upstream dependencies), not emitted as an engine status.
|
|
321
|
+
* `SKIPPED` is the post-failure "unexecuted/disabled" visual state.
|
|
322
|
+
*/
|
|
323
|
+
export declare enum GraphVisualState {
|
|
324
|
+
IDLE = "idle",
|
|
325
|
+
RUNNING = "running",
|
|
326
|
+
BLOCKED = "blocked",
|
|
327
|
+
SUCCEEDED = "succeeded",
|
|
328
|
+
FAILED = "failed",
|
|
329
|
+
SKIPPED = "skipped"
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* Namespace root for graph run SSE topics (DECAF-48 §4.2). A subscription
|
|
333
|
+
* filters on these granular topics before `observer.next(...)`.
|
|
334
|
+
*/
|
|
335
|
+
export declare const GRAPH_RUN_TOPIC = "graph.run";
|
|
336
|
+
/**
|
|
337
|
+
* SSE sub-topic streaming per-node log lines during a run.
|
|
338
|
+
*/
|
|
339
|
+
export declare const GRAPH_RUN_LOG_TOPIC = "graph.run.log";
|
|
340
|
+
/**
|
|
341
|
+
* SSE sub-topic streaming node/edge execution-state updates during a run.
|
|
342
|
+
*/
|
|
343
|
+
export declare const GRAPH_RUN_STATE_TOPIC = "graph.run.state";
|
|
344
|
+
/**
|
|
345
|
+
* Logger custom-attribute keys attached to every run log line via
|
|
346
|
+
* DECAF-9 `logger.for({...})` (DECAF-48 §4.3). Rendered as discrete columns
|
|
347
|
+
* (not buried in the message string).
|
|
348
|
+
*/
|
|
349
|
+
export declare enum GraphLogAttribute {
|
|
350
|
+
NODE_ID = "nodeId",
|
|
351
|
+
WORKFLOW_ID = "workflowId",
|
|
352
|
+
RUN_ID = "runId",
|
|
353
|
+
USER = "user"
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* Namespace topic helper for a graph execution event.
|
|
357
|
+
*
|
|
358
|
+
* Log-carrier events resolve to `graph.run.log`; node/edge execution-state
|
|
359
|
+
* events resolve to `graph.run.state`; everything else stays under the shared
|
|
360
|
+
* `graph.run` topic and is only delivered to subscribers that match it.
|
|
361
|
+
*
|
|
362
|
+
* @param eventType - The graph execution event type to scope to a topic.
|
|
363
|
+
* @returns The SSE topic constant for the given event type.
|
|
364
|
+
*/
|
|
365
|
+
export declare function graphRunTopicOf(eventType: GraphExecutionEventType): string;
|
|
366
|
+
/**
|
|
367
|
+
* Event types emitted through the graph execution observer pipeline.
|
|
368
|
+
*
|
|
369
|
+
* DECAF-48 extends this set with the visual-state and run-log event types the
|
|
370
|
+
* engine emits on the existing Observable: {@link GraphExecutionEventType.NODE_STATE_CHANGED},
|
|
371
|
+
* {@link GraphExecutionEventType.EDGE_STATE_CHANGED} and
|
|
372
|
+
* {@link GraphExecutionEventType.GRAPH_RUN_LOG}.
|
|
373
|
+
*/
|
|
374
|
+
export declare enum GraphExecutionEventType {
|
|
375
|
+
WORKFLOW_STARTED = "workflow.started",
|
|
376
|
+
WORKFLOW_PLANNED = "workflow.planned",
|
|
377
|
+
WORKFLOW_COMPLETED = "workflow.completed",
|
|
378
|
+
WORKFLOW_FAILED = "workflow.failed",
|
|
379
|
+
WORKFLOW_CANCELLED = "workflow.cancelled",
|
|
380
|
+
NODE_QUEUED = "node.queued",
|
|
381
|
+
NODE_STARTED = "node.started",
|
|
382
|
+
NODE_OUTPUT = "node.output",
|
|
383
|
+
NODE_COMPLETED = "node.completed",
|
|
384
|
+
NODE_FAILED = "node.failed",
|
|
385
|
+
NODE_SKIPPED = "node.skipped",
|
|
386
|
+
NODE_CACHE_HIT = "node.cacheHit",
|
|
387
|
+
NODE_PINNED = "node.pinned",
|
|
388
|
+
NODE_UNPINNED = "node.unpinned",
|
|
389
|
+
/** Node execution-state transition carrying a `GraphNodeStateChangedPayload` (DECAF-48 §4.4). */
|
|
390
|
+
NODE_STATE_CHANGED = "node.stateChanged",
|
|
391
|
+
EDGE_VALUE_ROUTED = "edge.valueRouted",
|
|
392
|
+
/** Edge execution-state transition carrying a `GraphEdgeStateChangedPayload` (DECAF-48 §4.4). */
|
|
393
|
+
EDGE_STATE_CHANGED = "edge.stateChanged",
|
|
394
|
+
/** Structured run log line carrying a `GraphRunLogEntry` (DECAF-48 §4.3). */
|
|
395
|
+
GRAPH_RUN_LOG = "graph.run.log",
|
|
396
|
+
LOOP_STARTED = "loop.started",
|
|
397
|
+
LOOP_ITERATION_STARTED = "loop.iteration.started",
|
|
398
|
+
LOOP_ITERATION_COMPLETED = "loop.iteration.completed",
|
|
399
|
+
LOOP_CONDITION_EVALUATED = "loop.condition.evaluated",
|
|
400
|
+
LOOP_COMPLETED = "loop.completed",
|
|
401
|
+
LOOP_LIMIT_REACHED = "loop.limitReached",
|
|
402
|
+
VALIDATION_STARTED = "validation.started",
|
|
403
|
+
VALIDATION_FAILED = "validation.failed",
|
|
404
|
+
VALIDATION_COMPLETED = "validation.completed",
|
|
405
|
+
STORE_READ = "store.read",
|
|
406
|
+
STORE_WRITE = "store.write",
|
|
407
|
+
STORE_DELETE = "store.delete"
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* Hard limits for the graph run subsystem (DECAF-50 §4.14/§4.16).
|
|
411
|
+
*
|
|
412
|
+
* Enforced by the run executor and the HTTP run controller; every omitted
|
|
413
|
+
* field falls back to {@link DEFAULT_GRAPH_RUN_LIMITS}.
|
|
414
|
+
*/
|
|
415
|
+
export interface GraphRunLimits {
|
|
416
|
+
/** Maximum serialised JSON size accepted for a run create request. */
|
|
417
|
+
maxRequestBytes?: number;
|
|
418
|
+
/**
|
|
419
|
+
* Maximum number of runs in flight per caller: the run's owner user, or
|
|
420
|
+
* the caller-key bucket supplied by the HTTP layer for anonymous callers
|
|
421
|
+
* (per-IP where the host exposes it, a shared `"anonymous"` bucket
|
|
422
|
+
* otherwise).
|
|
423
|
+
*/
|
|
424
|
+
maxConcurrentRuns?: number;
|
|
425
|
+
/** Maximum events retained per run by the in-memory event store. */
|
|
426
|
+
maxEventsPerRun?: number;
|
|
427
|
+
/** Maximum serialised size of a single event envelope `payload`. */
|
|
428
|
+
maxEventPayloadBytes?: number;
|
|
429
|
+
/** Hard wall-clock budget for a run's engine execution. */
|
|
430
|
+
executionTimeoutMs?: number;
|
|
431
|
+
/**
|
|
432
|
+
* How long a terminal run's replayable event state is kept after the run
|
|
433
|
+
* finishes before being released (SAA-595 resource governance).
|
|
434
|
+
*/
|
|
435
|
+
eventReplayWindowMs?: number;
|
|
436
|
+
}
|
|
437
|
+
/** Default run limits: request size, per-caller concurrency, event retention/payload size, execution timeout, and post-terminal event replay window. */
|
|
438
|
+
export declare const DEFAULT_GRAPH_RUN_LIMITS: Required<GraphRunLimits>;
|
|
439
|
+
/**
|
|
440
|
+
* Terminal graph event types closing a run's SSE stream
|
|
441
|
+
* (DECAF-50 §4.15). The run SSE endpoint never emits anything after these.
|
|
442
|
+
*/
|
|
443
|
+
export declare const GRAPH_RUN_TERMINAL_EVENT_TYPES: readonly GraphExecutionEventType[];
|
|
444
|
+
/** Whether the event type is a run-stream terminal type (see {@link GRAPH_RUN_TERMINAL_EVENT_TYPES}). */
|
|
445
|
+
export declare function isGraphRunTerminalEventType(type: GraphExecutionEventType): boolean;
|
|
446
|
+
/** Whether the run status is terminal (`succeeded`, `failed`, or `cancelled`). */
|
|
447
|
+
export declare function isGraphRunTerminalStatus(status: GraphRunStatus): boolean;
|
|
448
|
+
/** Type guard for {@link GraphRunStatus}. */
|
|
449
|
+
export declare function isGraphRunStatus(value: unknown): value is GraphRunStatus;
|
|
@@ -9,4 +9,7 @@ export * from "./reader.d.cts";
|
|
|
9
9
|
export * from "./document/index.d.cts";
|
|
10
10
|
export * from "./catalog/index.d.cts";
|
|
11
11
|
export * from "./types.d.cts";
|
|
12
|
+
export * from "./GraphExecutionStateMapper.d.cts";
|
|
13
|
+
export * from "./GraphResolution.d.cts";
|
|
14
|
+
export * from "./nodes/index.d.cts";
|
|
12
15
|
export * from "./overrides/index.d.cts";
|
|
@@ -9,4 +9,7 @@ export * from "./reader.d.mts";
|
|
|
9
9
|
export * from "./document/index.d.mts";
|
|
10
10
|
export * from "./catalog/index.d.mts";
|
|
11
11
|
export * from "./types.d.mts";
|
|
12
|
+
export * from "./GraphExecutionStateMapper.d.mts";
|
|
13
|
+
export * from "./GraphResolution.d.mts";
|
|
14
|
+
export * from "./nodes/index.d.mts";
|
|
12
15
|
export * from "./overrides/index.d.mts";
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module ui-decorators/graph/nodes/agents/agent
|
|
3
|
+
* @summary Production Agent node declaration.
|
|
4
|
+
* @description The Agent node is the primary AI agent entrypoint. It is a
|
|
5
|
+
* rectangular node with `@connection()` ports for its structural
|
|
6
|
+
* dependencies: `model` (the LLM), `memory` (the memory store), and
|
|
7
|
+
* `workspace` (the workspace/context). Connections are rendered on the
|
|
8
|
+
* bottom side of the node (DECAF-32 §21.3). Each connection category has a
|
|
9
|
+
* distinct color defined in the category style registry.
|
|
10
|
+
*
|
|
11
|
+
* The single `prompt` input accepts placeholder expressions (§22.4) such as
|
|
12
|
+
* `{{ $input.brief }}` or `{{ $node["Research"].output.summary }}` that are
|
|
13
|
+
* resolved at execution time by the placeholder compiler.
|
|
14
|
+
*/
|
|
15
|
+
import { Model } from "@decaf-ts/decorator-validation";
|
|
16
|
+
import "../category-styles";
|
|
17
|
+
/**
|
|
18
|
+
* Agent node — an AI agent that orchestrates a model, memory, and workspace.
|
|
19
|
+
*
|
|
20
|
+
* The agent has:
|
|
21
|
+
* - `@input` port on the **left**: `prompt` (the task prompt; supports
|
|
22
|
+
* placeholder expressions like `{{ $input.something }}` per §22.4).
|
|
23
|
+
* - `@output` ports on the **right**: `response` (the agent's output), `actions`
|
|
24
|
+
* (any actions the agent decided to take).
|
|
25
|
+
* - `@connection` ports on the **bottom**: `model` (LLM), `memory` (memory
|
|
26
|
+
* store), `workspace` (workspace/context). Each connection has a distinct
|
|
27
|
+
* category color.
|
|
28
|
+
*
|
|
29
|
+
* The node is rectangular (not rounded) to visually distinguish it from
|
|
30
|
+
* regular processing nodes. The `color` and `icon` are omitted from `@node()`
|
|
31
|
+
* so they are resolved from the `"Agent"` category style.
|
|
32
|
+
*/
|
|
33
|
+
export declare class AgentNode extends Model {
|
|
34
|
+
prompt: string;
|
|
35
|
+
response: string;
|
|
36
|
+
actions: unknown[];
|
|
37
|
+
model: unknown;
|
|
38
|
+
memory: unknown;
|
|
39
|
+
workspace: unknown;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* All built-in agent node constructors.
|
|
43
|
+
*/
|
|
44
|
+
export declare const GRAPH_AGENT_NODES: readonly [typeof AgentNode];
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module ui-decorators/graph/nodes/agents/agent
|
|
3
|
+
* @summary Production Agent node declaration.
|
|
4
|
+
* @description The Agent node is the primary AI agent entrypoint. It is a
|
|
5
|
+
* rectangular node with `@connection()` ports for its structural
|
|
6
|
+
* dependencies: `model` (the LLM), `memory` (the memory store), and
|
|
7
|
+
* `workspace` (the workspace/context). Connections are rendered on the
|
|
8
|
+
* bottom side of the node (DECAF-32 §21.3). Each connection category has a
|
|
9
|
+
* distinct color defined in the category style registry.
|
|
10
|
+
*
|
|
11
|
+
* The single `prompt` input accepts placeholder expressions (§22.4) such as
|
|
12
|
+
* `{{ $input.brief }}` or `{{ $node["Research"].output.summary }}` that are
|
|
13
|
+
* resolved at execution time by the placeholder compiler.
|
|
14
|
+
*/
|
|
15
|
+
import { Model } from "@decaf-ts/decorator-validation";
|
|
16
|
+
import "../category-styles";
|
|
17
|
+
/**
|
|
18
|
+
* Agent node — an AI agent that orchestrates a model, memory, and workspace.
|
|
19
|
+
*
|
|
20
|
+
* The agent has:
|
|
21
|
+
* - `@input` port on the **left**: `prompt` (the task prompt; supports
|
|
22
|
+
* placeholder expressions like `{{ $input.something }}` per §22.4).
|
|
23
|
+
* - `@output` ports on the **right**: `response` (the agent's output), `actions`
|
|
24
|
+
* (any actions the agent decided to take).
|
|
25
|
+
* - `@connection` ports on the **bottom**: `model` (LLM), `memory` (memory
|
|
26
|
+
* store), `workspace` (workspace/context). Each connection has a distinct
|
|
27
|
+
* category color.
|
|
28
|
+
*
|
|
29
|
+
* The node is rectangular (not rounded) to visually distinguish it from
|
|
30
|
+
* regular processing nodes. The `color` and `icon` are omitted from `@node()`
|
|
31
|
+
* so they are resolved from the `"Agent"` category style.
|
|
32
|
+
*/
|
|
33
|
+
export declare class AgentNode extends Model {
|
|
34
|
+
prompt: string;
|
|
35
|
+
response: string;
|
|
36
|
+
actions: unknown[];
|
|
37
|
+
model: unknown;
|
|
38
|
+
memory: unknown;
|
|
39
|
+
workspace: unknown;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* All built-in agent node constructors.
|
|
43
|
+
*/
|
|
44
|
+
export declare const GRAPH_AGENT_NODES: readonly [typeof AgentNode];
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module ui-decorators/graph/nodes/base
|
|
3
|
+
* @summary Base class for shared graph node declarations.
|
|
4
|
+
* @description `GraphNode` extends `Model` with an overridable
|
|
5
|
+
* `applyMetadata` static method. Concrete node kinds that support dynamic
|
|
6
|
+
* metadata changes (e.g. `SwitchFlowNode` adding case output ports) override
|
|
7
|
+
* this method to compute their own ports, size, and data patches — the node
|
|
8
|
+
* is exclusively responsible for itself in every way.
|
|
9
|
+
*/
|
|
10
|
+
import { Model } from "@decaf-ts/decorator-validation";
|
|
11
|
+
import type { NodeMetadataChange } from "../types.d.cts";
|
|
12
|
+
export declare class GraphNode extends Model {
|
|
13
|
+
/**
|
|
14
|
+
* Applies a metadata patch to this node class, returning the resulting
|
|
15
|
+
* ports, size, and data patches.
|
|
16
|
+
*
|
|
17
|
+
* The default implementation returns `null` (no changes). Concrete node
|
|
18
|
+
* kinds that support dynamic metadata override this to compute their own
|
|
19
|
+
* ports and size from the metadata — the caller (renderer) simply relays
|
|
20
|
+
* the result to the diagram model.
|
|
21
|
+
*
|
|
22
|
+
* @param _meta - The metadata patch (node-kind-specific, e.g.
|
|
23
|
+
* `SwitchNodeMetadata`).
|
|
24
|
+
* @returns The computed change, or `null` when the node kind does not
|
|
25
|
+
* support dynamic metadata.
|
|
26
|
+
*/
|
|
27
|
+
static applyMetadata(_meta: unknown): NodeMetadataChange | null;
|
|
28
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module ui-decorators/graph/nodes/base
|
|
3
|
+
* @summary Base class for shared graph node declarations.
|
|
4
|
+
* @description `GraphNode` extends `Model` with an overridable
|
|
5
|
+
* `applyMetadata` static method. Concrete node kinds that support dynamic
|
|
6
|
+
* metadata changes (e.g. `SwitchFlowNode` adding case output ports) override
|
|
7
|
+
* this method to compute their own ports, size, and data patches — the node
|
|
8
|
+
* is exclusively responsible for itself in every way.
|
|
9
|
+
*/
|
|
10
|
+
import { Model } from "@decaf-ts/decorator-validation";
|
|
11
|
+
import type { NodeMetadataChange } from "../types.d.mts";
|
|
12
|
+
export declare class GraphNode extends Model {
|
|
13
|
+
/**
|
|
14
|
+
* Applies a metadata patch to this node class, returning the resulting
|
|
15
|
+
* ports, size, and data patches.
|
|
16
|
+
*
|
|
17
|
+
* The default implementation returns `null` (no changes). Concrete node
|
|
18
|
+
* kinds that support dynamic metadata override this to compute their own
|
|
19
|
+
* ports and size from the metadata — the caller (renderer) simply relays
|
|
20
|
+
* the result to the diagram model.
|
|
21
|
+
*
|
|
22
|
+
* @param _meta - The metadata patch (node-kind-specific, e.g.
|
|
23
|
+
* `SwitchNodeMetadata`).
|
|
24
|
+
* @returns The computed change, or `null` when the node kind does not
|
|
25
|
+
* support dynamic metadata.
|
|
26
|
+
*/
|
|
27
|
+
static applyMetadata(_meta: unknown): NodeMetadataChange | null;
|
|
28
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module ui-decorators/graph/nodes/boundary/input-value
|
|
3
|
+
* @summary Workflow input value boundary node declaration.
|
|
4
|
+
* @description Shared canvas node representing a workflow input value
|
|
5
|
+
* (decorator id `graph-input-value-node`), moved from the for-angular
|
|
6
|
+
* boundary nodes so both sides share the declaration. Reusable value node
|
|
7
|
+
* whose single `value` output may feed multiple targets.
|
|
8
|
+
*/
|
|
9
|
+
import { Model } from "@decaf-ts/decorator-validation";
|
|
10
|
+
import "../category-styles";
|
|
11
|
+
export declare class GraphInputValueNode extends Model {
|
|
12
|
+
value: unknown;
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module ui-decorators/graph/nodes/boundary/input-value
|
|
3
|
+
* @summary Workflow input value boundary node declaration.
|
|
4
|
+
* @description Shared canvas node representing a workflow input value
|
|
5
|
+
* (decorator id `graph-input-value-node`), moved from the for-angular
|
|
6
|
+
* boundary nodes so both sides share the declaration. Reusable value node
|
|
7
|
+
* whose single `value` output may feed multiple targets.
|
|
8
|
+
*/
|
|
9
|
+
import { Model } from "@decaf-ts/decorator-validation";
|
|
10
|
+
import "../category-styles";
|
|
11
|
+
export declare class GraphInputValueNode extends Model {
|
|
12
|
+
value: unknown;
|
|
13
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registers all built-in category styles. Called once at module init.
|
|
3
|
+
*
|
|
4
|
+
* Categories define the default visual style for nodes and connection ports.
|
|
5
|
+
* A node's explicit `color` / `icon` (on `@node()`) overrides the category
|
|
6
|
+
* style; when omitted, the category style is used.
|
|
7
|
+
*/
|
|
8
|
+
export declare function registerBuiltinCategoryStyles(): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registers all built-in category styles. Called once at module init.
|
|
3
|
+
*
|
|
4
|
+
* Categories define the default visual style for nodes and connection ports.
|
|
5
|
+
* A node's explicit `color` / `icon` (on `@node()`) overrides the category
|
|
6
|
+
* style; when omitted, the category style is used.
|
|
7
|
+
*/
|
|
8
|
+
export declare function registerBuiltinCategoryStyles(): void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module ui-decorators/graph/nodes/flow-control/break
|
|
3
|
+
* @summary Break flow-control node declaration (DECAF-32 §22.2.2).
|
|
4
|
+
* @description Break — breaks out of the enclosing loop (foreach/while/until).
|
|
5
|
+
* When executed inside a loop body, the loop terminates early and the loop's
|
|
6
|
+
* `completed`/`state` output carries the results collected so far. The Break
|
|
7
|
+
* node executor throws a `GraphBreakSignal` that the enclosing loop executor
|
|
8
|
+
* catches.
|
|
9
|
+
*/
|
|
10
|
+
import { Model } from "@decaf-ts/decorator-validation";
|
|
11
|
+
import "../category-styles";
|
|
12
|
+
export declare class BreakFlowNode extends Model {
|
|
13
|
+
value: unknown;
|
|
14
|
+
broken: unknown;
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module ui-decorators/graph/nodes/flow-control/break
|
|
3
|
+
* @summary Break flow-control node declaration (DECAF-32 §22.2.2).
|
|
4
|
+
* @description Break — breaks out of the enclosing loop (foreach/while/until).
|
|
5
|
+
* When executed inside a loop body, the loop terminates early and the loop's
|
|
6
|
+
* `completed`/`state` output carries the results collected so far. The Break
|
|
7
|
+
* node executor throws a `GraphBreakSignal` that the enclosing loop executor
|
|
8
|
+
* catches.
|
|
9
|
+
*/
|
|
10
|
+
import { Model } from "@decaf-ts/decorator-validation";
|
|
11
|
+
import "../category-styles";
|
|
12
|
+
export declare class BreakFlowNode extends Model {
|
|
13
|
+
value: unknown;
|
|
14
|
+
broken: unknown;
|
|
15
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module ui-decorators/graph/nodes/flow-control/error-boundary
|
|
3
|
+
* @summary Error-boundary flow-control node declaration (DECAF-32 §22.2.2).
|
|
4
|
+
* @description Error boundary — try/catch/finally workflow behaviour.
|
|
5
|
+
*/
|
|
6
|
+
import { Model } from "@decaf-ts/decorator-validation";
|
|
7
|
+
import "../category-styles";
|
|
8
|
+
export declare class ErrorBoundaryFlowNode extends Model {
|
|
9
|
+
value: unknown;
|
|
10
|
+
result: unknown;
|
|
11
|
+
error: unknown;
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module ui-decorators/graph/nodes/flow-control/error-boundary
|
|
3
|
+
* @summary Error-boundary flow-control node declaration (DECAF-32 §22.2.2).
|
|
4
|
+
* @description Error boundary — try/catch/finally workflow behaviour.
|
|
5
|
+
*/
|
|
6
|
+
import { Model } from "@decaf-ts/decorator-validation";
|
|
7
|
+
import "../category-styles";
|
|
8
|
+
export declare class ErrorBoundaryFlowNode extends Model {
|
|
9
|
+
value: unknown;
|
|
10
|
+
result: unknown;
|
|
11
|
+
error: unknown;
|
|
12
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module ui-decorators/graph/nodes/flow-control/human-approval
|
|
3
|
+
* @summary Human-approval flow-control node declaration (DECAF-32 §22.2.2).
|
|
4
|
+
* @description Human approval — suspends execution until a human approves
|
|
5
|
+
* or rejects.
|
|
6
|
+
*/
|
|
7
|
+
import { Model } from "@decaf-ts/decorator-validation";
|
|
8
|
+
import "../category-styles";
|
|
9
|
+
export declare class HumanApprovalFlowNode extends Model {
|
|
10
|
+
value: unknown;
|
|
11
|
+
approved: unknown;
|
|
12
|
+
rejected: unknown;
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module ui-decorators/graph/nodes/flow-control/human-approval
|
|
3
|
+
* @summary Human-approval flow-control node declaration (DECAF-32 §22.2.2).
|
|
4
|
+
* @description Human approval — suspends execution until a human approves
|
|
5
|
+
* or rejects.
|
|
6
|
+
*/
|
|
7
|
+
import { Model } from "@decaf-ts/decorator-validation";
|
|
8
|
+
import "../category-styles";
|
|
9
|
+
export declare class HumanApprovalFlowNode extends Model {
|
|
10
|
+
value: unknown;
|
|
11
|
+
approved: unknown;
|
|
12
|
+
rejected: unknown;
|
|
13
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module ui-decorators/graph/nodes/flow-control/if
|
|
3
|
+
* @summary If flow-control node declaration (DECAF-32 §22.2.2).
|
|
4
|
+
* @description If — conditional branch. Evaluates a `ConditionExpression`
|
|
5
|
+
* (§22.3) and routes the input to the `then` or `else` output. A graph-level
|
|
6
|
+
* macro: the engine's planner recognises it as an ordinary executable node
|
|
7
|
+
* (§5.7) but it has no built-in executor — downstream projects register
|
|
8
|
+
* custom executors or compile it into composition APIs (§22.2.2).
|
|
9
|
+
*/
|
|
10
|
+
import { Model } from "@decaf-ts/decorator-validation";
|
|
11
|
+
import "../category-styles";
|
|
12
|
+
export declare class IfFlowNode extends Model {
|
|
13
|
+
value: unknown;
|
|
14
|
+
then: unknown;
|
|
15
|
+
else: unknown;
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module ui-decorators/graph/nodes/flow-control/if
|
|
3
|
+
* @summary If flow-control node declaration (DECAF-32 §22.2.2).
|
|
4
|
+
* @description If — conditional branch. Evaluates a `ConditionExpression`
|
|
5
|
+
* (§22.3) and routes the input to the `then` or `else` output. A graph-level
|
|
6
|
+
* macro: the engine's planner recognises it as an ordinary executable node
|
|
7
|
+
* (§5.7) but it has no built-in executor — downstream projects register
|
|
8
|
+
* custom executors or compile it into composition APIs (§22.2.2).
|
|
9
|
+
*/
|
|
10
|
+
import { Model } from "@decaf-ts/decorator-validation";
|
|
11
|
+
import "../category-styles";
|
|
12
|
+
export declare class IfFlowNode extends Model {
|
|
13
|
+
value: unknown;
|
|
14
|
+
then: unknown;
|
|
15
|
+
else: unknown;
|
|
16
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module ui-decorators/graph/nodes/flow-control/parallel
|
|
3
|
+
* @summary Parallel flow-control node declaration (DECAF-32 §22.2.2).
|
|
4
|
+
* @description Parallel — splits execution into concurrent branches.
|
|
5
|
+
*/
|
|
6
|
+
import { Model } from "@decaf-ts/decorator-validation";
|
|
7
|
+
import "../category-styles";
|
|
8
|
+
export declare class ParallelFlowNode extends Model {
|
|
9
|
+
value: unknown;
|
|
10
|
+
branches: unknown[];
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module ui-decorators/graph/nodes/flow-control/parallel
|
|
3
|
+
* @summary Parallel flow-control node declaration (DECAF-32 §22.2.2).
|
|
4
|
+
* @description Parallel — splits execution into concurrent branches.
|
|
5
|
+
*/
|
|
6
|
+
import { Model } from "@decaf-ts/decorator-validation";
|
|
7
|
+
import "../category-styles";
|
|
8
|
+
export declare class ParallelFlowNode extends Model {
|
|
9
|
+
value: unknown;
|
|
10
|
+
branches: unknown[];
|
|
11
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { NodeMetadataChange, SwitchNodeMetadata } from "../../types.d.cts";
|
|
2
|
+
import { GraphNode } from "../base.d.cts";
|
|
3
|
+
import "../category-styles";
|
|
4
|
+
export declare class SwitchFlowNode extends GraphNode {
|
|
5
|
+
value: unknown;
|
|
6
|
+
default: unknown;
|
|
7
|
+
/**
|
|
8
|
+
* Computes the node's ports, size, and data patch from the given switch
|
|
9
|
+
* metadata. Each case gets its own output port on the right side; the
|
|
10
|
+
* `default` port always renders **last** (DECAF-32 §21 port-ordering rule,
|
|
11
|
+
* DECAF-34 §6.2). When `hasDefault` is `false`, the `default` output port
|
|
12
|
+
* is omitted entirely. The node grows in height as cases are added.
|
|
13
|
+
*
|
|
14
|
+
* @param meta - The switch metadata patch (`metadata.switch`), carrying
|
|
15
|
+
* the cases and the optional default-port configuration.
|
|
16
|
+
* @returns The computed {@link NodeMetadataChange}: reordered ports
|
|
17
|
+
* (case outputs inserted before the optional default), the grown size,
|
|
18
|
+
* and the `switchMetadata` data patch.
|
|
19
|
+
*/
|
|
20
|
+
static applyMetadata(meta: SwitchNodeMetadata): NodeMetadataChange;
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { NodeMetadataChange, SwitchNodeMetadata } from "../../types.d.mts";
|
|
2
|
+
import { GraphNode } from "../base.d.mts";
|
|
3
|
+
import "../category-styles";
|
|
4
|
+
export declare class SwitchFlowNode extends GraphNode {
|
|
5
|
+
value: unknown;
|
|
6
|
+
default: unknown;
|
|
7
|
+
/**
|
|
8
|
+
* Computes the node's ports, size, and data patch from the given switch
|
|
9
|
+
* metadata. Each case gets its own output port on the right side; the
|
|
10
|
+
* `default` port always renders **last** (DECAF-32 §21 port-ordering rule,
|
|
11
|
+
* DECAF-34 §6.2). When `hasDefault` is `false`, the `default` output port
|
|
12
|
+
* is omitted entirely. The node grows in height as cases are added.
|
|
13
|
+
*
|
|
14
|
+
* @param meta - The switch metadata patch (`metadata.switch`), carrying
|
|
15
|
+
* the cases and the optional default-port configuration.
|
|
16
|
+
* @returns The computed {@link NodeMetadataChange}: reordered ports
|
|
17
|
+
* (case outputs inserted before the optional default), the grown size,
|
|
18
|
+
* and the `switchMetadata` data patch.
|
|
19
|
+
*/
|
|
20
|
+
static applyMetadata(meta: SwitchNodeMetadata): NodeMetadataChange;
|
|
21
|
+
}
|