@q1k-oss/btree-workflows 0.0.1 → 0.0.2

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.
Files changed (206) hide show
  1. package/README.md +13 -13
  2. package/dist/index.cjs +5011 -0
  3. package/dist/index.d.cts +3320 -0
  4. package/dist/index.d.ts +3320 -0
  5. package/dist/index.js +4879 -0
  6. package/package.json +33 -3
  7. package/.claude/settings.local.json +0 -31
  8. package/CLAUDE.md +0 -181
  9. package/behaviour-tree-workflows-landing/index.html +0 -16
  10. package/behaviour-tree-workflows-landing/package-lock.json +0 -2074
  11. package/behaviour-tree-workflows-landing/package.json +0 -31
  12. package/behaviour-tree-workflows-landing/public/favicon.svg +0 -17
  13. package/behaviour-tree-workflows-landing/src/App.css +0 -103
  14. package/behaviour-tree-workflows-landing/src/App.tsx +0 -176
  15. package/behaviour-tree-workflows-landing/src/components/BlackboardInspector.css +0 -89
  16. package/behaviour-tree-workflows-landing/src/components/BlackboardInspector.tsx +0 -64
  17. package/behaviour-tree-workflows-landing/src/components/ExampleSelector.css +0 -64
  18. package/behaviour-tree-workflows-landing/src/components/ExampleSelector.tsx +0 -34
  19. package/behaviour-tree-workflows-landing/src/components/ExecutionLog.css +0 -107
  20. package/behaviour-tree-workflows-landing/src/components/ExecutionLog.tsx +0 -85
  21. package/behaviour-tree-workflows-landing/src/components/Header.css +0 -50
  22. package/behaviour-tree-workflows-landing/src/components/Header.tsx +0 -26
  23. package/behaviour-tree-workflows-landing/src/components/StatusBadge.css +0 -45
  24. package/behaviour-tree-workflows-landing/src/components/StatusBadge.tsx +0 -15
  25. package/behaviour-tree-workflows-landing/src/components/Toolbar.css +0 -74
  26. package/behaviour-tree-workflows-landing/src/components/Toolbar.tsx +0 -53
  27. package/behaviour-tree-workflows-landing/src/components/TreeVisualizer.css +0 -67
  28. package/behaviour-tree-workflows-landing/src/components/TreeVisualizer.tsx +0 -192
  29. package/behaviour-tree-workflows-landing/src/components/YamlEditor.css +0 -18
  30. package/behaviour-tree-workflows-landing/src/components/YamlEditor.tsx +0 -96
  31. package/behaviour-tree-workflows-landing/src/lib/count-nodes.ts +0 -11
  32. package/behaviour-tree-workflows-landing/src/lib/execution-engine.ts +0 -96
  33. package/behaviour-tree-workflows-landing/src/lib/tree-layout.ts +0 -136
  34. package/behaviour-tree-workflows-landing/src/lib/yaml-examples.ts +0 -549
  35. package/behaviour-tree-workflows-landing/src/main.tsx +0 -9
  36. package/behaviour-tree-workflows-landing/src/stubs/activepieces.ts +0 -18
  37. package/behaviour-tree-workflows-landing/src/stubs/fs.ts +0 -24
  38. package/behaviour-tree-workflows-landing/src/stubs/path.ts +0 -16
  39. package/behaviour-tree-workflows-landing/src/stubs/temporal-activity.ts +0 -6
  40. package/behaviour-tree-workflows-landing/src/stubs/temporal-workflow.ts +0 -22
  41. package/behaviour-tree-workflows-landing/tsconfig.json +0 -25
  42. package/behaviour-tree-workflows-landing/vite.config.ts +0 -40
  43. package/demo-google-sheets.ts +0 -181
  44. package/demo-runtime-variables.ts +0 -174
  45. package/demo-template.ts +0 -208
  46. package/docs/ARCHITECTURE_SUMMARY.md +0 -613
  47. package/docs/NODE_REFERENCE.md +0 -504
  48. package/docs/README.md +0 -53
  49. package/docs/custom-nodes-architecture.md +0 -826
  50. package/docs/observability.md +0 -175
  51. package/docs/yaml-specification.md +0 -990
  52. package/examples/temporal/README.md +0 -117
  53. package/examples/temporal/activities.ts +0 -373
  54. package/examples/temporal/client.ts +0 -115
  55. package/examples/temporal/python-worker/activities.py +0 -339
  56. package/examples/temporal/python-worker/requirements.txt +0 -12
  57. package/examples/temporal/python-worker/worker.py +0 -106
  58. package/examples/temporal/worker.ts +0 -66
  59. package/examples/temporal/workflows.ts +0 -6
  60. package/examples/temporal/yaml-workflow-loader.ts +0 -105
  61. package/examples/yaml-test.ts +0 -97
  62. package/examples/yaml-workflows/01-simple-sequence.yaml +0 -25
  63. package/examples/yaml-workflows/02-parallel-timeout.yaml +0 -45
  64. package/examples/yaml-workflows/03-ecommerce-checkout.yaml +0 -94
  65. package/examples/yaml-workflows/04-ai-agent-workflow.yaml +0 -346
  66. package/examples/yaml-workflows/05-order-processing.yaml +0 -146
  67. package/examples/yaml-workflows/06-activity-test.yaml +0 -71
  68. package/examples/yaml-workflows/07-activity-simple-test.yaml +0 -43
  69. package/examples/yaml-workflows/08-file-processing.yaml +0 -141
  70. package/examples/yaml-workflows/09-http-request.yaml +0 -137
  71. package/examples/yaml-workflows/README.md +0 -211
  72. package/src/actions/code-execution.schema.ts +0 -27
  73. package/src/actions/code-execution.ts +0 -218
  74. package/src/actions/generate-file.test.ts +0 -516
  75. package/src/actions/generate-file.ts +0 -166
  76. package/src/actions/http-request.test.ts +0 -784
  77. package/src/actions/http-request.ts +0 -228
  78. package/src/actions/index.ts +0 -20
  79. package/src/actions/parse-file.test.ts +0 -448
  80. package/src/actions/parse-file.ts +0 -139
  81. package/src/actions/python-script.test.ts +0 -439
  82. package/src/actions/python-script.ts +0 -154
  83. package/src/base-node.test.ts +0 -511
  84. package/src/base-node.ts +0 -605
  85. package/src/behavior-tree.test.ts +0 -431
  86. package/src/behavior-tree.ts +0 -283
  87. package/src/blackboard.test.ts +0 -222
  88. package/src/blackboard.ts +0 -192
  89. package/src/composites/conditional.schema.ts +0 -19
  90. package/src/composites/conditional.test.ts +0 -309
  91. package/src/composites/conditional.ts +0 -129
  92. package/src/composites/for-each.schema.ts +0 -23
  93. package/src/composites/for-each.test.ts +0 -254
  94. package/src/composites/for-each.ts +0 -132
  95. package/src/composites/index.ts +0 -15
  96. package/src/composites/memory-sequence.schema.ts +0 -19
  97. package/src/composites/memory-sequence.test.ts +0 -223
  98. package/src/composites/memory-sequence.ts +0 -98
  99. package/src/composites/parallel.schema.ts +0 -28
  100. package/src/composites/parallel.test.ts +0 -502
  101. package/src/composites/parallel.ts +0 -157
  102. package/src/composites/reactive-sequence.schema.ts +0 -19
  103. package/src/composites/reactive-sequence.test.ts +0 -170
  104. package/src/composites/reactive-sequence.ts +0 -85
  105. package/src/composites/recovery.schema.ts +0 -19
  106. package/src/composites/recovery.test.ts +0 -366
  107. package/src/composites/recovery.ts +0 -90
  108. package/src/composites/selector.schema.ts +0 -19
  109. package/src/composites/selector.test.ts +0 -387
  110. package/src/composites/selector.ts +0 -85
  111. package/src/composites/sequence.schema.ts +0 -19
  112. package/src/composites/sequence.test.ts +0 -337
  113. package/src/composites/sequence.ts +0 -72
  114. package/src/composites/sub-tree.schema.ts +0 -21
  115. package/src/composites/sub-tree.test.ts +0 -893
  116. package/src/composites/sub-tree.ts +0 -177
  117. package/src/composites/while.schema.ts +0 -24
  118. package/src/composites/while.test.ts +0 -381
  119. package/src/composites/while.ts +0 -149
  120. package/src/data-store/index.ts +0 -10
  121. package/src/data-store/memory-store.ts +0 -161
  122. package/src/data-store/types.ts +0 -94
  123. package/src/debug/breakpoint.test.ts +0 -47
  124. package/src/debug/breakpoint.ts +0 -30
  125. package/src/debug/index.ts +0 -17
  126. package/src/debug/resume-point.test.ts +0 -49
  127. package/src/debug/resume-point.ts +0 -29
  128. package/src/decorators/delay.schema.ts +0 -21
  129. package/src/decorators/delay.test.ts +0 -261
  130. package/src/decorators/delay.ts +0 -140
  131. package/src/decorators/force-result.schema.ts +0 -32
  132. package/src/decorators/force-result.test.ts +0 -133
  133. package/src/decorators/force-result.ts +0 -63
  134. package/src/decorators/index.ts +0 -13
  135. package/src/decorators/invert.schema.ts +0 -19
  136. package/src/decorators/invert.test.ts +0 -135
  137. package/src/decorators/invert.ts +0 -42
  138. package/src/decorators/keep-running.schema.ts +0 -20
  139. package/src/decorators/keep-running.test.ts +0 -105
  140. package/src/decorators/keep-running.ts +0 -49
  141. package/src/decorators/precondition.schema.ts +0 -19
  142. package/src/decorators/precondition.test.ts +0 -351
  143. package/src/decorators/precondition.ts +0 -139
  144. package/src/decorators/repeat.schema.ts +0 -21
  145. package/src/decorators/repeat.test.ts +0 -187
  146. package/src/decorators/repeat.ts +0 -94
  147. package/src/decorators/run-once.schema.ts +0 -19
  148. package/src/decorators/run-once.test.ts +0 -140
  149. package/src/decorators/run-once.ts +0 -61
  150. package/src/decorators/soft-assert.schema.ts +0 -19
  151. package/src/decorators/soft-assert.test.ts +0 -107
  152. package/src/decorators/soft-assert.ts +0 -68
  153. package/src/decorators/timeout.schema.ts +0 -21
  154. package/src/decorators/timeout.test.ts +0 -274
  155. package/src/decorators/timeout.ts +0 -159
  156. package/src/errors.test.ts +0 -63
  157. package/src/errors.ts +0 -34
  158. package/src/events.test.ts +0 -347
  159. package/src/events.ts +0 -183
  160. package/src/index.ts +0 -80
  161. package/src/integrations/index.ts +0 -30
  162. package/src/integrations/integration-action.test.ts +0 -571
  163. package/src/integrations/integration-action.ts +0 -233
  164. package/src/integrations/piece-executor.ts +0 -320
  165. package/src/observability/execution-tracker.ts +0 -320
  166. package/src/observability/index.ts +0 -23
  167. package/src/observability/sinks.ts +0 -138
  168. package/src/observability/types.ts +0 -130
  169. package/src/registry-utils.ts +0 -147
  170. package/src/registry.test.ts +0 -466
  171. package/src/registry.ts +0 -334
  172. package/src/schemas/base.schema.ts +0 -104
  173. package/src/schemas/index.ts +0 -223
  174. package/src/schemas/integration.test.ts +0 -238
  175. package/src/schemas/tree-definition.schema.ts +0 -170
  176. package/src/schemas/validation.test.ts +0 -146
  177. package/src/schemas/validation.ts +0 -122
  178. package/src/scripting/index.ts +0 -22
  179. package/src/templates/template-loader.test.ts +0 -281
  180. package/src/templates/template-loader.ts +0 -152
  181. package/src/temporal-integration.test.ts +0 -213
  182. package/src/test-nodes.ts +0 -259
  183. package/src/types.ts +0 -503
  184. package/src/utilities/index.ts +0 -17
  185. package/src/utilities/log-message.test.ts +0 -275
  186. package/src/utilities/log-message.ts +0 -134
  187. package/src/utilities/regex-extract.test.ts +0 -138
  188. package/src/utilities/regex-extract.ts +0 -108
  189. package/src/utilities/variable-resolver.test.ts +0 -416
  190. package/src/utilities/variable-resolver.ts +0 -318
  191. package/src/utils/error-handler.test.ts +0 -117
  192. package/src/utils/error-handler.ts +0 -48
  193. package/src/utils/signal-check.test.ts +0 -234
  194. package/src/utils/signal-check.ts +0 -140
  195. package/src/yaml/errors.ts +0 -143
  196. package/src/yaml/index.ts +0 -30
  197. package/src/yaml/loader.ts +0 -39
  198. package/src/yaml/parser.ts +0 -286
  199. package/src/yaml/validation/semantic-validator.ts +0 -196
  200. package/templates/google-sheets/insert-row.yaml +0 -76
  201. package/templates/notification-sender.yaml +0 -33
  202. package/templates/order-validation.yaml +0 -44
  203. package/tsconfig.json +0 -24
  204. package/vitest.config.ts +0 -25
  205. package/workflows/order-processor.yaml +0 -59
  206. package/workflows/process-order-workflow.yaml +0 -142
@@ -1,135 +0,0 @@
1
- import { beforeEach, describe, expect, it } from "vitest";
2
- import { ScopedBlackboard } from "../blackboard.js";
3
- import { ConfigurationError } from "../errors.js";
4
- import { MockAction } from "../test-nodes.js";
5
- import { type TemporalContext, NodeStatus } from "../types.js";
6
- import { Invert } from "./invert.js";
7
-
8
- describe("Invert", () => {
9
- let context: TemporalContext;
10
- let invert: Invert;
11
-
12
- beforeEach(() => {
13
- context = {
14
- blackboard: new ScopedBlackboard(),
15
- timestamp: Date.now(),
16
- deltaTime: 0,
17
- };
18
- invert = new Invert({ id: "test-invert" });
19
- });
20
-
21
- it("should propagate ConfigurationError if no child is set", async () => {
22
- try {
23
- await invert.tick(context);
24
- throw new Error("Expected tick to throw");
25
- } catch (error) {
26
- expect(error).toBeInstanceOf(ConfigurationError);
27
- expect((error as ConfigurationError).message).toContain(
28
- "Decorator must have a child",
29
- );
30
- }
31
- });
32
-
33
- it("should invert SUCCESS to FAILURE", async () => {
34
- const child = new MockAction({
35
- id: "child",
36
- returnStatus: NodeStatus.SUCCESS,
37
- });
38
-
39
- invert.setChild(child);
40
-
41
- const status = await invert.tick(context);
42
- expect(status).toBe(NodeStatus.FAILURE);
43
- expect(invert.status()).toBe(NodeStatus.FAILURE);
44
- });
45
-
46
- it("should invert FAILURE to SUCCESS", async () => {
47
- const child = new MockAction({
48
- id: "child",
49
- returnStatus: NodeStatus.FAILURE,
50
- });
51
-
52
- invert.setChild(child);
53
-
54
- const status = await invert.tick(context);
55
- expect(status).toBe(NodeStatus.SUCCESS);
56
- expect(invert.status()).toBe(NodeStatus.SUCCESS);
57
- });
58
-
59
- it("should pass through RUNNING status", async () => {
60
- const child = new MockAction({
61
- id: "child",
62
- returnStatus: NodeStatus.RUNNING,
63
- });
64
-
65
- invert.setChild(child);
66
-
67
- const status = await invert.tick(context);
68
- expect(status).toBe(NodeStatus.RUNNING);
69
- expect(invert.status()).toBe(NodeStatus.RUNNING);
70
- });
71
-
72
- it("should pass through other statuses unchanged", async () => {
73
- const child = new MockAction({
74
- id: "child",
75
- returnStatus: NodeStatus.IDLE,
76
- });
77
-
78
- invert.setChild(child);
79
-
80
- const status = await invert.tick(context);
81
- expect(status).toBe(NodeStatus.IDLE);
82
- });
83
-
84
- it("should properly propagate halt to child", () => {
85
- const child = new MockAction({
86
- id: "child",
87
- returnStatus: NodeStatus.RUNNING,
88
- });
89
-
90
- invert.setChild(child);
91
-
92
- // Set child to RUNNING state
93
- (child as unknown)._status = NodeStatus.RUNNING;
94
-
95
- // Halt the invert decorator
96
- invert.halt();
97
-
98
- expect(child.status()).toBe(NodeStatus.IDLE);
99
- });
100
-
101
- it("should properly propagate reset to child", () => {
102
- const child = new MockAction({
103
- id: "child",
104
- returnStatus: NodeStatus.SUCCESS,
105
- });
106
-
107
- invert.setChild(child);
108
-
109
- // Set child to SUCCESS state
110
- (child as unknown)._status = NodeStatus.SUCCESS;
111
-
112
- // Reset the invert decorator
113
- invert.reset();
114
-
115
- expect(child.status()).toBe(NodeStatus.IDLE);
116
- });
117
-
118
- it("should work with async children", async () => {
119
- const child = new MockAction({
120
- id: "child",
121
- returnStatus: NodeStatus.SUCCESS,
122
- ticksBeforeComplete: 2, // Will return RUNNING first
123
- });
124
-
125
- invert.setChild(child);
126
-
127
- // First tick - child returns RUNNING
128
- let status = await invert.tick(context);
129
- expect(status).toBe(NodeStatus.RUNNING);
130
-
131
- // Second tick - child returns SUCCESS, inverted to FAILURE
132
- status = await invert.tick(context);
133
- expect(status).toBe(NodeStatus.FAILURE);
134
- });
135
- });
@@ -1,42 +0,0 @@
1
- /**
2
- * Invert decorator node
3
- * Inverts the result of its child (SUCCESS becomes FAILURE and vice versa)
4
- */
5
-
6
- import { DecoratorNode } from "../base-node.js";
7
- import { ConfigurationError } from "../errors.js";
8
- import { type TemporalContext, NodeStatus } from "../types.js";
9
- import { checkSignal } from "../utils/signal-check.js";
10
-
11
- export class Invert extends DecoratorNode {
12
- async executeTick(context: TemporalContext): Promise<NodeStatus> {
13
- checkSignal(context.signal);
14
-
15
- if (!this.child) {
16
- throw new ConfigurationError(`${this.name}: Decorator must have a child`);
17
- }
18
-
19
- this.log("Ticking child");
20
- const childStatus = await this.child.tick(context);
21
-
22
- switch (childStatus) {
23
- case NodeStatus.SUCCESS:
24
- this.log("Child succeeded - returning FAILURE");
25
- this._status = NodeStatus.FAILURE;
26
- return NodeStatus.FAILURE;
27
-
28
- case NodeStatus.FAILURE:
29
- this.log("Child failed - returning SUCCESS");
30
- this._status = NodeStatus.SUCCESS;
31
- return NodeStatus.SUCCESS;
32
-
33
- case NodeStatus.RUNNING:
34
- this.log("Child is running");
35
- this._status = NodeStatus.RUNNING;
36
- return NodeStatus.RUNNING;
37
-
38
- default:
39
- return childStatus;
40
- }
41
- }
42
- }
@@ -1,20 +0,0 @@
1
- /**
2
- * KeepRunningUntilFailure decorator configuration schema
3
- */
4
-
5
- import { z } from "zod";
6
- import { nodeConfigurationSchema } from "../schemas/base.schema.js";
7
-
8
- /**
9
- * Schema for KeepRunningUntilFailure decorator configuration
10
- * Uses base schema only (no additional properties)
11
- */
12
- export const keepRunningUntilFailureConfigurationSchema =
13
- nodeConfigurationSchema;
14
-
15
- /**
16
- * Validated KeepRunningUntilFailure configuration type
17
- */
18
- export type ValidatedKeepRunningUntilFailureConfiguration = z.infer<
19
- typeof keepRunningUntilFailureConfigurationSchema
20
- >;
@@ -1,105 +0,0 @@
1
- /**
2
- * Tests for KeepRunningUntilFailure decorator
3
- */
4
-
5
- import { beforeEach, describe, expect, it } from "vitest";
6
- import { ScopedBlackboard } from "../blackboard.js";
7
- import { ConfigurationError } from "../errors.js";
8
- import { FailureNode, SuccessNode } from "../test-nodes.js";
9
- import { type TemporalContext, NodeStatus } from "../types.js";
10
- import { KeepRunningUntilFailure } from "./keep-running.js";
11
-
12
- describe("KeepRunningUntilFailure", () => {
13
- let blackboard: ScopedBlackboard;
14
- let context: TemporalContext;
15
-
16
- beforeEach(() => {
17
- blackboard = new ScopedBlackboard("root");
18
- context = {
19
- blackboard,
20
- timestamp: Date.now(),
21
- deltaTime: 0,
22
- };
23
- });
24
-
25
- it("should return RUNNING while child succeeds", async () => {
26
- const keep = new KeepRunningUntilFailure({ id: "keep1" });
27
- keep.setChild(new SuccessNode({ id: "child" }));
28
-
29
- const result = await keep.tick(context);
30
- expect(result).toBe(NodeStatus.RUNNING);
31
- });
32
-
33
- it("should return SUCCESS on child failure", async () => {
34
- const keep = new KeepRunningUntilFailure({ id: "keep1" });
35
- keep.setChild(new FailureNode({ id: "child" }));
36
-
37
- const result = await keep.tick(context);
38
- expect(result).toBe(NodeStatus.SUCCESS);
39
- });
40
-
41
- it("should reset child between ticks", async () => {
42
- const keep = new KeepRunningUntilFailure({ id: "keep1" });
43
-
44
- let tickCount = 0;
45
- class CountingNode extends SuccessNode {
46
- tick(context: TemporalContext) {
47
- tickCount++;
48
- return super.tick(context);
49
- }
50
- }
51
-
52
- keep.setChild(new CountingNode({ id: "child" }));
53
-
54
- await keep.tick(context);
55
- await keep.tick(context);
56
- await keep.tick(context);
57
-
58
- expect(tickCount).toBe(3); // Ticked 3 times (reset between each)
59
- });
60
-
61
- it("should propagate RUNNING from child", async () => {
62
- const keep = new KeepRunningUntilFailure({ id: "keep1" });
63
-
64
- let tickCount = 0;
65
- class RunningThenFail extends SuccessNode {
66
- tick(_context: TemporalContext) {
67
- const self = this;
68
- return (async () => {
69
- tickCount++;
70
- if (tickCount < 3) {
71
- self._status = NodeStatus.RUNNING;
72
- return NodeStatus.RUNNING;
73
- }
74
- self._status = NodeStatus.FAILURE;
75
- return NodeStatus.FAILURE;
76
- })();
77
- }
78
- }
79
-
80
- keep.setChild(new RunningThenFail({ id: "child" }));
81
-
82
- let result = await keep.tick(context);
83
- expect(result).toBe(NodeStatus.RUNNING);
84
-
85
- result = await keep.tick(context);
86
- expect(result).toBe(NodeStatus.RUNNING);
87
-
88
- result = await keep.tick(context);
89
- expect(result).toBe(NodeStatus.SUCCESS); // Child failed
90
- });
91
-
92
- it("should propagate ConfigurationError if no child", async () => {
93
- const keep = new KeepRunningUntilFailure({ id: "keep1" });
94
-
95
- try {
96
- await keep.tick(context);
97
- throw new Error("Expected tick to throw");
98
- } catch (error) {
99
- expect(error).toBeInstanceOf(ConfigurationError);
100
- expect((error as ConfigurationError).message).toContain(
101
- "KeepRunningUntilFailure requires a child",
102
- );
103
- }
104
- });
105
- });
@@ -1,49 +0,0 @@
1
- /**
2
- * KeepRunningUntilFailure decorator
3
- * Opposite of Retry - keeps running while child succeeds
4
- */
5
-
6
- import { DecoratorNode } from "../base-node.js";
7
- import { ConfigurationError } from "../errors.js";
8
- import { type TemporalContext, NodeStatus } from "../types.js";
9
- import { checkSignal } from "../utils/signal-check.js";
10
-
11
- /**
12
- * KeepRunningUntilFailure keeps executing its child while it succeeds.
13
- * Returns SUCCESS when child fails (goal achieved).
14
- * Returns RUNNING while child succeeds (keep going).
15
- */
16
- export class KeepRunningUntilFailure extends DecoratorNode {
17
- async executeTick(context: TemporalContext): Promise<NodeStatus> {
18
- checkSignal(context.signal);
19
-
20
- if (!this.child) {
21
- throw new ConfigurationError(
22
- "KeepRunningUntilFailure requires a child",
23
- );
24
- }
25
-
26
- const result = await this.child.tick(context);
27
-
28
- switch (result) {
29
- case NodeStatus.SUCCESS:
30
- this.log("Child succeeded - resetting and continuing");
31
- this.child.reset();
32
- this._status = NodeStatus.RUNNING;
33
- return NodeStatus.RUNNING;
34
-
35
- case NodeStatus.FAILURE:
36
- this.log("Child failed - goal achieved");
37
- this._status = NodeStatus.SUCCESS;
38
- return NodeStatus.SUCCESS;
39
-
40
- case NodeStatus.RUNNING:
41
- this.log("Child is running");
42
- this._status = NodeStatus.RUNNING;
43
- return NodeStatus.RUNNING;
44
-
45
- default:
46
- throw new Error(`Unexpected status from child: ${result}`);
47
- }
48
- }
49
- }
@@ -1,19 +0,0 @@
1
- /**
2
- * Precondition decorator configuration schema
3
- */
4
-
5
- import { z } from "zod";
6
- import { nodeConfigurationSchema } from "../schemas/base.schema.js";
7
-
8
- /**
9
- * Schema for Precondition decorator configuration
10
- * Uses base schema only - preconditions are set programmatically via API
11
- */
12
- export const preconditionConfigurationSchema = nodeConfigurationSchema;
13
-
14
- /**
15
- * Validated Precondition configuration type
16
- */
17
- export type ValidatedPreconditionConfiguration = z.infer<
18
- typeof preconditionConfigurationSchema
19
- >;