@decaf-ts/ui-decorators 0.20.4 → 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
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* @module ui-decorators/graph/nodes/utility/return
|
|
12
|
+
* @summary Return utility node declaration (DECAF-32 §22.2.2).
|
|
13
|
+
* @description Return — defines and normalises the final workflow output.
|
|
14
|
+
*/
|
|
15
|
+
import { Model, model, required } from "@decaf-ts/decorator-validation";
|
|
16
|
+
import { uielement } from "./../../../ui/decorators.js";
|
|
17
|
+
import { input, node, output } from "./../../decorators.js";
|
|
18
|
+
// Ensure category styles are registered (idempotent).
|
|
19
|
+
import "./../category-styles.js";
|
|
20
|
+
let ReturnFlowNode = class ReturnFlowNode extends Model {
|
|
21
|
+
};
|
|
22
|
+
__decorate([
|
|
23
|
+
required(),
|
|
24
|
+
uielement("textarea", { label: "Input value", placeholder: "Value to normalise" }),
|
|
25
|
+
input({ handle: "value" }),
|
|
26
|
+
__metadata("design:type", Object)
|
|
27
|
+
], ReturnFlowNode.prototype, "value", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
required(),
|
|
30
|
+
uielement("input", { label: "Returned output", placeholder: "Normalised output" }),
|
|
31
|
+
output({ handle: "result" }),
|
|
32
|
+
__metadata("design:type", Object)
|
|
33
|
+
], ReturnFlowNode.prototype, "result", void 0);
|
|
34
|
+
ReturnFlowNode = __decorate([
|
|
35
|
+
node("core.flow.return", {
|
|
36
|
+
kind: "core.flow.return",
|
|
37
|
+
category: "Utility",
|
|
38
|
+
color: "#22c55e",
|
|
39
|
+
icon: "ti-arrow-back-up",
|
|
40
|
+
width: 96,
|
|
41
|
+
height: 96,
|
|
42
|
+
labels: ["flow", "return", "output"],
|
|
43
|
+
metadata: {
|
|
44
|
+
title: "Return",
|
|
45
|
+
description: "Normalises the input into the final workflow output object.",
|
|
46
|
+
outputSchema: {},
|
|
47
|
+
},
|
|
48
|
+
}),
|
|
49
|
+
model()
|
|
50
|
+
], ReturnFlowNode);
|
|
51
|
+
export { ReturnFlowNode };
|
|
52
|
+
//# sourceMappingURL=return.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"return.js","sourceRoot":"","sources":["../../../../../src/graph/nodes/utility/return.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;GAIG;AACH,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,oCAA+B;AACnD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,8BAAyB;AAEvD,sDAAsD;AACtD,iCAA4B;AAiBrB,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,KAAK;CAUxC,CAAA;AANC;IAHC,QAAQ,EAAE;IACV,SAAS,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,oBAAoB,EAAE,CAAC;IAClF,KAAK,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;;6CACX;AAKhB;IAHC,QAAQ,EAAE;IACV,SAAS,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,mBAAmB,EAAE,CAAC;IAClF,MAAM,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;;8CACZ;AATN,cAAc;IAf1B,IAAI,CAAC,kBAAkB,EAAE;QACxB,IAAI,EAAE,kBAAkB;QACxB,QAAQ,EAAE,SAAS;QACnB,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,kBAAkB;QACxB,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,EAAE;QACV,MAAM,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,CAAC;QACpC,QAAQ,EAAE;YACR,KAAK,EAAE,QAAQ;YACf,WAAW,EAAE,6DAA6D;YAC1E,YAAY,EAAE,EAAE;SACjB;KACF,CAAC;IACD,KAAK,EAAE;GACK,cAAc,CAU1B"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* @module ui-decorators/graph/nodes/utility/utility-log
|
|
12
|
+
* @summary Utility Log node declaration (DECAF-48 §4.3).
|
|
13
|
+
* @description Utility Log — logs the input value through the run's
|
|
14
|
+
* `ctx.logger` at a configurable level and forwards it unchanged on the
|
|
15
|
+
* `logged` output port.
|
|
16
|
+
*/
|
|
17
|
+
import { Model, model, required } from "@decaf-ts/decorator-validation";
|
|
18
|
+
import { uielement } from "./../../../ui/decorators.js";
|
|
19
|
+
import { input, node, output } from "./../../decorators.js";
|
|
20
|
+
// Ensure category styles are registered (idempotent).
|
|
21
|
+
import "./../category-styles.js";
|
|
22
|
+
let UtilityLogNode = class UtilityLogNode extends Model {
|
|
23
|
+
};
|
|
24
|
+
__decorate([
|
|
25
|
+
required(),
|
|
26
|
+
uielement("textarea", { label: "Input value", placeholder: "Value to log" }),
|
|
27
|
+
input({ handle: "value" }),
|
|
28
|
+
__metadata("design:type", Object)
|
|
29
|
+
], UtilityLogNode.prototype, "value", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
uielement("input", { label: "Log level", placeholder: "info, warn, error, ..." }),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], UtilityLogNode.prototype, "level", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
required(),
|
|
36
|
+
uielement("input", { label: "Logged value", placeholder: "Forwarded value" }),
|
|
37
|
+
output({ handle: "logged" }),
|
|
38
|
+
__metadata("design:type", Object)
|
|
39
|
+
], UtilityLogNode.prototype, "logged", void 0);
|
|
40
|
+
UtilityLogNode = __decorate([
|
|
41
|
+
node("core.utility.log", {
|
|
42
|
+
kind: "core.utility.log",
|
|
43
|
+
category: "Utility",
|
|
44
|
+
color: "#6366f1",
|
|
45
|
+
icon: "ti-terminal",
|
|
46
|
+
width: 96,
|
|
47
|
+
height: 96,
|
|
48
|
+
labels: ["utility", "log", "debug", "observability"],
|
|
49
|
+
metadata: {
|
|
50
|
+
title: "Utility Log",
|
|
51
|
+
description: "Logs the input value to the run's ctx.logger at a configurable level and forwards it unchanged.",
|
|
52
|
+
},
|
|
53
|
+
}),
|
|
54
|
+
model()
|
|
55
|
+
], UtilityLogNode);
|
|
56
|
+
export { UtilityLogNode };
|
|
57
|
+
//# sourceMappingURL=utility-log.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utility-log.js","sourceRoot":"","sources":["../../../../../src/graph/nodes/utility/utility-log.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;GAMG;AACH,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,oCAA+B;AACnD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,8BAAyB;AAGvD,sDAAsD;AACtD,iCAA4B;AAgBrB,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,KAAK;CAaxC,CAAA;AATC;IAHC,QAAQ,EAAE;IACV,SAAS,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC;IAC5E,KAAK,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;;6CACX;AAGhB;IADC,SAAS,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,wBAAwB,EAAE,CAAC;;6CAC7D;AAKrB;IAHC,QAAQ,EAAE;IACV,SAAS,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,iBAAiB,EAAE,CAAC;IAC7E,MAAM,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;;8CACZ;AAZN,cAAc;IAd1B,IAAI,CAAC,kBAAkB,EAAE;QACxB,IAAI,EAAE,kBAAkB;QACxB,QAAQ,EAAE,SAAS;QACnB,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,aAAa;QACnB,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,EAAE;QACV,MAAM,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,eAAe,CAAC;QACpD,QAAQ,EAAE;YACR,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,iGAAiG;SAC/G;KACF,CAAC;IACD,KAAK,EAAE;GACK,cAAc,CAa1B"}
|
package/lib/esm/index.js
CHANGED
|
@@ -16,21 +16,21 @@ export * from "./ui/index.js";
|
|
|
16
16
|
* @const VERSION
|
|
17
17
|
* @memberOf module:ui-decorators
|
|
18
18
|
*/
|
|
19
|
-
export const VERSION = "0.20.
|
|
19
|
+
export const VERSION = "0.20.5";
|
|
20
20
|
/**
|
|
21
21
|
* @description Represents the current commit hash of the module build.
|
|
22
22
|
* @summary Stores the current git commit hash for the package. The build replaces
|
|
23
23
|
* the placeholder with the actual commit hash at publish time.
|
|
24
24
|
* @const COMMIT
|
|
25
25
|
*/
|
|
26
|
-
export const COMMIT = "
|
|
26
|
+
export const COMMIT = "4e03aa0";
|
|
27
27
|
/**
|
|
28
28
|
* @description Represents the full version string of the module.
|
|
29
29
|
* @summary Stores the semver version and commit hash for the package.
|
|
30
30
|
* The build replaces the placeholder with the actual `<version>-<commit>` value at publish time.
|
|
31
31
|
* @const FULL_VERSION
|
|
32
32
|
*/
|
|
33
|
-
export const FULL_VERSION = "0.20.
|
|
33
|
+
export const FULL_VERSION = "0.20.5-4e03aa0";
|
|
34
34
|
export const PACKAGE_NAME = "@decaf-ts/ui-decorators";
|
|
35
35
|
Metadata.registerLibrary(PACKAGE_NAME, VERSION);
|
|
36
36
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module ui-decorators/graph/GraphExecutionStateMapper
|
|
3
|
+
* @summary Maps engine state to the frontend-safe visual-state contract.
|
|
4
|
+
* @description Pure, engine-agnostic helpers that derive
|
|
5
|
+
* `GraphVisualState` values from engine execution signals. Frontend
|
|
6
|
+
* bundles may import this from `@decaf-ts/ui-decorators/graph` (no
|
|
7
|
+
* engine runtime dependency); a future Mastra/NestJS driver maps its own
|
|
8
|
+
* runtime states onto `GraphVisualState` with the same rules.
|
|
9
|
+
*/
|
|
10
|
+
import type { GraphExecutionEvent } from "./types.d.cts";
|
|
11
|
+
import { GraphExecutionStatus, GraphVisualState } from "./constants.d.cts";
|
|
12
|
+
/**
|
|
13
|
+
* Maps an engine execution `GraphExecutionStatus` to the shared visual
|
|
14
|
+
* state. `CACHED` collapses onto `GraphVisualState.SUCCEEDED` for
|
|
15
|
+
* rendering; `CANCELLED`/`PENDING`/`PLANNING` yield `IDLE`.
|
|
16
|
+
*
|
|
17
|
+
* @param status - The engine execution status, if any.
|
|
18
|
+
* @returns The visual state for the node/edge.
|
|
19
|
+
*/
|
|
20
|
+
export declare function mapExecutionStatus(status?: GraphExecutionStatus): GraphVisualState;
|
|
21
|
+
/**
|
|
22
|
+
* Options describing a single node's position within a run (DECAF-48 §4.4).
|
|
23
|
+
*/
|
|
24
|
+
export interface GraphVisualStateDerivation {
|
|
25
|
+
/** Whether the node has already executed (any terminal engine status). */
|
|
26
|
+
executed: boolean;
|
|
27
|
+
/** Whether the node is currently running. */
|
|
28
|
+
running: boolean;
|
|
29
|
+
/** Whether the node completed successfully (or from cache). */
|
|
30
|
+
succeeded?: boolean;
|
|
31
|
+
/** Whether the node failed. */
|
|
32
|
+
failed?: boolean;
|
|
33
|
+
/** Number of incoming edges that have completed value routing. */
|
|
34
|
+
completedUpstreams?: number;
|
|
35
|
+
/** Total number of incoming edges for the node. */
|
|
36
|
+
upstreamCount?: number;
|
|
37
|
+
/** Whether the node is reachable from the workflow inputs in the plan. */
|
|
38
|
+
reachable?: boolean;
|
|
39
|
+
/** Whether the whole run has failed (unexecuted nodes then fade/disable). */
|
|
40
|
+
runFailed?: boolean;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Derives the visual state for one node from its execution signals.
|
|
44
|
+
*
|
|
45
|
+
* Rules (DECAF-48 §4.4 / Req-5/Req-6):
|
|
46
|
+
* - currently running → `GraphVisualState.RUNNING`
|
|
47
|
+
* - failed → `GraphVisualState.FAILED`
|
|
48
|
+
* - executed and succeeded (or from cache) → `GraphVisualState.SUCCEEDED`
|
|
49
|
+
* - unexecuted and reachable with incomplete upstream deps → `GraphVisualState.BLOCKED`
|
|
50
|
+
* - unexecuted with `runFailed` → `GraphVisualState.SKIPPED` (faded/disabled)
|
|
51
|
+
* - otherwise → `GraphVisualState.IDLE`
|
|
52
|
+
*
|
|
53
|
+
* @param options - The node execution signals.
|
|
54
|
+
* @returns The derived visual state.
|
|
55
|
+
*/
|
|
56
|
+
export declare function deriveNodeVisualState(options: GraphVisualStateDerivation): GraphVisualState;
|
|
57
|
+
/**
|
|
58
|
+
* Translates a `GraphExecutionEvent` into a node visual state when the
|
|
59
|
+
* event carries enough information. Used by contract conformance checks and
|
|
60
|
+
* engine-agnostic consumers that derive state from the shared event stream.
|
|
61
|
+
*
|
|
62
|
+
* @param event - The graph execution event.
|
|
63
|
+
* @returns The corresponding `GraphVisualState`, or `IDLE` when the
|
|
64
|
+
* event does not indicate a specific visual transition.
|
|
65
|
+
*/
|
|
66
|
+
export declare function visualStateOfEvent(event: GraphExecutionEvent): GraphVisualState;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module ui-decorators/graph/GraphExecutionStateMapper
|
|
3
|
+
* @summary Maps engine state to the frontend-safe visual-state contract.
|
|
4
|
+
* @description Pure, engine-agnostic helpers that derive
|
|
5
|
+
* `GraphVisualState` values from engine execution signals. Frontend
|
|
6
|
+
* bundles may import this from `@decaf-ts/ui-decorators/graph` (no
|
|
7
|
+
* engine runtime dependency); a future Mastra/NestJS driver maps its own
|
|
8
|
+
* runtime states onto `GraphVisualState` with the same rules.
|
|
9
|
+
*/
|
|
10
|
+
import type { GraphExecutionEvent } from "./types.d.mts";
|
|
11
|
+
import { GraphExecutionStatus, GraphVisualState } from "./constants.d.mts";
|
|
12
|
+
/**
|
|
13
|
+
* Maps an engine execution `GraphExecutionStatus` to the shared visual
|
|
14
|
+
* state. `CACHED` collapses onto `GraphVisualState.SUCCEEDED` for
|
|
15
|
+
* rendering; `CANCELLED`/`PENDING`/`PLANNING` yield `IDLE`.
|
|
16
|
+
*
|
|
17
|
+
* @param status - The engine execution status, if any.
|
|
18
|
+
* @returns The visual state for the node/edge.
|
|
19
|
+
*/
|
|
20
|
+
export declare function mapExecutionStatus(status?: GraphExecutionStatus): GraphVisualState;
|
|
21
|
+
/**
|
|
22
|
+
* Options describing a single node's position within a run (DECAF-48 §4.4).
|
|
23
|
+
*/
|
|
24
|
+
export interface GraphVisualStateDerivation {
|
|
25
|
+
/** Whether the node has already executed (any terminal engine status). */
|
|
26
|
+
executed: boolean;
|
|
27
|
+
/** Whether the node is currently running. */
|
|
28
|
+
running: boolean;
|
|
29
|
+
/** Whether the node completed successfully (or from cache). */
|
|
30
|
+
succeeded?: boolean;
|
|
31
|
+
/** Whether the node failed. */
|
|
32
|
+
failed?: boolean;
|
|
33
|
+
/** Number of incoming edges that have completed value routing. */
|
|
34
|
+
completedUpstreams?: number;
|
|
35
|
+
/** Total number of incoming edges for the node. */
|
|
36
|
+
upstreamCount?: number;
|
|
37
|
+
/** Whether the node is reachable from the workflow inputs in the plan. */
|
|
38
|
+
reachable?: boolean;
|
|
39
|
+
/** Whether the whole run has failed (unexecuted nodes then fade/disable). */
|
|
40
|
+
runFailed?: boolean;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Derives the visual state for one node from its execution signals.
|
|
44
|
+
*
|
|
45
|
+
* Rules (DECAF-48 §4.4 / Req-5/Req-6):
|
|
46
|
+
* - currently running → `GraphVisualState.RUNNING`
|
|
47
|
+
* - failed → `GraphVisualState.FAILED`
|
|
48
|
+
* - executed and succeeded (or from cache) → `GraphVisualState.SUCCEEDED`
|
|
49
|
+
* - unexecuted and reachable with incomplete upstream deps → `GraphVisualState.BLOCKED`
|
|
50
|
+
* - unexecuted with `runFailed` → `GraphVisualState.SKIPPED` (faded/disabled)
|
|
51
|
+
* - otherwise → `GraphVisualState.IDLE`
|
|
52
|
+
*
|
|
53
|
+
* @param options - The node execution signals.
|
|
54
|
+
* @returns The derived visual state.
|
|
55
|
+
*/
|
|
56
|
+
export declare function deriveNodeVisualState(options: GraphVisualStateDerivation): GraphVisualState;
|
|
57
|
+
/**
|
|
58
|
+
* Translates a `GraphExecutionEvent` into a node visual state when the
|
|
59
|
+
* event carries enough information. Used by contract conformance checks and
|
|
60
|
+
* engine-agnostic consumers that derive state from the shared event stream.
|
|
61
|
+
*
|
|
62
|
+
* @param event - The graph execution event.
|
|
63
|
+
* @returns The corresponding `GraphVisualState`, or `IDLE` when the
|
|
64
|
+
* event does not indicate a specific visual transition.
|
|
65
|
+
*/
|
|
66
|
+
export declare function visualStateOfEvent(event: GraphExecutionEvent): GraphVisualState;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module ui-decorators/graph/GraphResolution
|
|
3
|
+
* @summary Shared graph manifest-resolution contracts.
|
|
4
|
+
* @description Frontend/backend-shared manifest-resolution types (DECAF-50
|
|
5
|
+
* §4.11): the effective per-node manifest shape consumed by the planner,
|
|
6
|
+
* executor, and the frontend catalogue, plus its structural type guard and
|
|
7
|
+
* the resolution/query contexts. Node/browser compatible — no engine
|
|
8
|
+
* runtime dependency.
|
|
9
|
+
*/
|
|
10
|
+
import type { GraphCredentialReference, GraphCredentialRequirement, GraphDynamicPortRule, GraphJsonValue, GraphNodeCapability, GraphNodeDisplayManifest, GraphNodePolicyManifest, GraphParameterDefinition, GraphPortManifest } from "./catalog/index.d.cts";
|
|
11
|
+
/**
|
|
12
|
+
* The effective manifest for one node instance (DECAF-50 §4.11): the
|
|
13
|
+
* published manifest with dynamic ports expanded against the instance's
|
|
14
|
+
* parameters. This is the shape the planner and executor consume — the only
|
|
15
|
+
* input the nine-stage validator's resolved workflow carries per node.
|
|
16
|
+
*/
|
|
17
|
+
export interface GraphResolvedNodeManifest {
|
|
18
|
+
/** Node kind. */
|
|
19
|
+
kind: string;
|
|
20
|
+
/** Display metadata (name, category, icon). */
|
|
21
|
+
display: GraphNodeDisplayManifest;
|
|
22
|
+
/** Effective input ports (static plus expanded dynamic). */
|
|
23
|
+
inputs: GraphPortManifest[];
|
|
24
|
+
/** Effective output ports (static plus expanded dynamic). */
|
|
25
|
+
outputs: GraphPortManifest[];
|
|
26
|
+
/** Effective connection ports, when any. */
|
|
27
|
+
connections?: GraphPortManifest[];
|
|
28
|
+
/** Declared parameters. */
|
|
29
|
+
parameters: GraphParameterDefinition[];
|
|
30
|
+
/** Dynamic-port rules the manifest declares, when any. */
|
|
31
|
+
dynamicPorts?: GraphDynamicPortRule[];
|
|
32
|
+
/** Credential requirements, when any. */
|
|
33
|
+
credentials?: GraphCredentialRequirement[];
|
|
34
|
+
/** Capabilities, when any. */
|
|
35
|
+
capabilities?: GraphNodeCapability[];
|
|
36
|
+
/** Execution policies, when declared. */
|
|
37
|
+
policies?: GraphNodePolicyManifest;
|
|
38
|
+
/** Free-form metadata. */
|
|
39
|
+
metadata?: Record<string, GraphJsonValue>;
|
|
40
|
+
}
|
|
41
|
+
/** Structural type guard for `GraphResolvedNodeManifest`. */
|
|
42
|
+
export declare function isGraphResolvedNodeManifest(value: unknown): value is GraphResolvedNodeManifest;
|
|
43
|
+
/** Context handed to manifest resolution for a node instance: authorized credentials plus caller metadata. */
|
|
44
|
+
export interface GraphNodeResolutionContext {
|
|
45
|
+
credentials?: GraphCredentialReference[];
|
|
46
|
+
requestContext?: unknown;
|
|
47
|
+
metadata?: Record<string, GraphJsonValue>;
|
|
48
|
+
}
|
|
49
|
+
/** Filters for catalogue manifest listing: restrict results to the given display categories and/or kinds. */
|
|
50
|
+
export interface GraphCatalogueQueryContext {
|
|
51
|
+
categories?: string[];
|
|
52
|
+
kinds?: string[];
|
|
53
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module ui-decorators/graph/GraphResolution
|
|
3
|
+
* @summary Shared graph manifest-resolution contracts.
|
|
4
|
+
* @description Frontend/backend-shared manifest-resolution types (DECAF-50
|
|
5
|
+
* §4.11): the effective per-node manifest shape consumed by the planner,
|
|
6
|
+
* executor, and the frontend catalogue, plus its structural type guard and
|
|
7
|
+
* the resolution/query contexts. Node/browser compatible — no engine
|
|
8
|
+
* runtime dependency.
|
|
9
|
+
*/
|
|
10
|
+
import type { GraphCredentialReference, GraphCredentialRequirement, GraphDynamicPortRule, GraphJsonValue, GraphNodeCapability, GraphNodeDisplayManifest, GraphNodePolicyManifest, GraphParameterDefinition, GraphPortManifest } from "./catalog/index.d.mts";
|
|
11
|
+
/**
|
|
12
|
+
* The effective manifest for one node instance (DECAF-50 §4.11): the
|
|
13
|
+
* published manifest with dynamic ports expanded against the instance's
|
|
14
|
+
* parameters. This is the shape the planner and executor consume — the only
|
|
15
|
+
* input the nine-stage validator's resolved workflow carries per node.
|
|
16
|
+
*/
|
|
17
|
+
export interface GraphResolvedNodeManifest {
|
|
18
|
+
/** Node kind. */
|
|
19
|
+
kind: string;
|
|
20
|
+
/** Display metadata (name, category, icon). */
|
|
21
|
+
display: GraphNodeDisplayManifest;
|
|
22
|
+
/** Effective input ports (static plus expanded dynamic). */
|
|
23
|
+
inputs: GraphPortManifest[];
|
|
24
|
+
/** Effective output ports (static plus expanded dynamic). */
|
|
25
|
+
outputs: GraphPortManifest[];
|
|
26
|
+
/** Effective connection ports, when any. */
|
|
27
|
+
connections?: GraphPortManifest[];
|
|
28
|
+
/** Declared parameters. */
|
|
29
|
+
parameters: GraphParameterDefinition[];
|
|
30
|
+
/** Dynamic-port rules the manifest declares, when any. */
|
|
31
|
+
dynamicPorts?: GraphDynamicPortRule[];
|
|
32
|
+
/** Credential requirements, when any. */
|
|
33
|
+
credentials?: GraphCredentialRequirement[];
|
|
34
|
+
/** Capabilities, when any. */
|
|
35
|
+
capabilities?: GraphNodeCapability[];
|
|
36
|
+
/** Execution policies, when declared. */
|
|
37
|
+
policies?: GraphNodePolicyManifest;
|
|
38
|
+
/** Free-form metadata. */
|
|
39
|
+
metadata?: Record<string, GraphJsonValue>;
|
|
40
|
+
}
|
|
41
|
+
/** Structural type guard for `GraphResolvedNodeManifest`. */
|
|
42
|
+
export declare function isGraphResolvedNodeManifest(value: unknown): value is GraphResolvedNodeManifest;
|
|
43
|
+
/** Context handed to manifest resolution for a node instance: authorized credentials plus caller metadata. */
|
|
44
|
+
export interface GraphNodeResolutionContext {
|
|
45
|
+
credentials?: GraphCredentialReference[];
|
|
46
|
+
requestContext?: unknown;
|
|
47
|
+
metadata?: Record<string, GraphJsonValue>;
|
|
48
|
+
}
|
|
49
|
+
/** Filters for catalogue manifest listing: restrict results to the given display categories and/or kinds. */
|
|
50
|
+
export interface GraphCatalogueQueryContext {
|
|
51
|
+
categories?: string[];
|
|
52
|
+
kinds?: string[];
|
|
53
|
+
}
|
|
@@ -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.cts";
|
|
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;
|